@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
|
@@ -9,7 +9,7 @@ const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.na
|
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
|
-
*/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
|
|
12
|
+
*/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");
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
@@ -44,7 +44,7 @@ const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});let i$1 = cl
|
|
|
44
44
|
*/
|
|
45
45
|
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);
|
|
46
46
|
|
|
47
|
-
let AuroElement$
|
|
47
|
+
let AuroElement$4 = class AuroElement extends i$2 {
|
|
48
48
|
static get properties() {
|
|
49
49
|
return {
|
|
50
50
|
|
|
@@ -79,19 +79,22 @@ let AuroElement$3 = class AuroElement extends i$2 {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
resetShapeClasses() {
|
|
82
|
-
|
|
83
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
82
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
84
83
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
if (wrapper) {
|
|
85
|
+
wrapper.classList.forEach((className) => {
|
|
86
|
+
if (className.startsWith('shape-')) {
|
|
87
|
+
wrapper.classList.remove(className);
|
|
88
|
+
}
|
|
89
|
+
});
|
|
91
90
|
|
|
91
|
+
if (this.shape && this.size) {
|
|
92
92
|
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
93
|
+
} else {
|
|
94
|
+
wrapper.classList.add('shape-none');
|
|
93
95
|
}
|
|
94
96
|
}
|
|
97
|
+
|
|
95
98
|
}
|
|
96
99
|
|
|
97
100
|
resetLayoutClasses() {
|
|
@@ -136,9 +139,9 @@ let AuroElement$3 = class AuroElement extends i$2 {
|
|
|
136
139
|
}
|
|
137
140
|
};
|
|
138
141
|
|
|
139
|
-
var shapeSizeCss$
|
|
142
|
+
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}`;
|
|
140
143
|
|
|
141
|
-
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-
|
|
144
|
+
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}`;
|
|
142
145
|
|
|
143
146
|
class DateFormatter {
|
|
144
147
|
|
|
@@ -556,7 +559,7 @@ const {
|
|
|
556
559
|
|
|
557
560
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
558
561
|
|
|
559
|
-
let AuroLibraryRuntimeUtils$
|
|
562
|
+
let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
560
563
|
|
|
561
564
|
/* eslint-disable jsdoc/require-param */
|
|
562
565
|
|
|
@@ -626,7 +629,7 @@ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
|
626
629
|
class AuroFormValidation {
|
|
627
630
|
|
|
628
631
|
constructor() {
|
|
629
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
632
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
630
633
|
}
|
|
631
634
|
|
|
632
635
|
/**
|
|
@@ -686,19 +689,19 @@ class AuroFormValidation {
|
|
|
686
689
|
{
|
|
687
690
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
688
691
|
validity: 'tooShort',
|
|
689
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
692
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
690
693
|
},
|
|
691
694
|
{
|
|
692
695
|
check: (e) => e.value?.length > e.maxLength,
|
|
693
696
|
validity: 'tooLong',
|
|
694
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
697
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
695
698
|
}
|
|
696
699
|
],
|
|
697
700
|
pattern: [
|
|
698
701
|
{
|
|
699
702
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
700
703
|
validity: 'patternMismatch',
|
|
701
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
704
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
702
705
|
}
|
|
703
706
|
]
|
|
704
707
|
},
|
|
@@ -845,13 +848,24 @@ class AuroFormValidation {
|
|
|
845
848
|
this.getInputElements(elem);
|
|
846
849
|
this.getAuroInputs(elem);
|
|
847
850
|
|
|
848
|
-
//
|
|
851
|
+
// Check if validation should run
|
|
849
852
|
let validationShouldRun =
|
|
853
|
+
|
|
854
|
+
// If the validation was forced
|
|
850
855
|
force ||
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
856
|
+
|
|
857
|
+
// If the validation should run on input
|
|
858
|
+
elem.validateOnInput ||
|
|
859
|
+
|
|
860
|
+
// State-based checks
|
|
861
|
+
(
|
|
862
|
+
// Element is not currently focused
|
|
863
|
+
!elem.contains(document.activeElement) && // native input is not focused directly
|
|
864
|
+
!document.activeElement.shadowRoot?.contains(elem) && // native input is not focused in the shadow DOM of another component
|
|
865
|
+
|
|
866
|
+
// And element has been touched or is untouched but has a value
|
|
867
|
+
( elem.touched || (!elem.touched && typeof elem.value !== "undefined") )
|
|
868
|
+
);
|
|
855
869
|
|
|
856
870
|
if (elem.hasAttribute('error')) {
|
|
857
871
|
elem.validity = 'customError';
|
|
@@ -893,10 +907,10 @@ class AuroFormValidation {
|
|
|
893
907
|
if (!hasValue && elem.required && elem.touched) {
|
|
894
908
|
elem.validity = 'valueMissing';
|
|
895
909
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
896
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
910
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
897
911
|
this.validateType(elem);
|
|
898
912
|
this.validateElementAttributes(elem);
|
|
899
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
913
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
900
914
|
this.validateElementAttributes(elem);
|
|
901
915
|
}
|
|
902
916
|
}
|
|
@@ -905,7 +919,9 @@ class AuroFormValidation {
|
|
|
905
919
|
elem.validity = this.auroInputElements[0].validity;
|
|
906
920
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
907
921
|
|
|
908
|
-
|
|
922
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
923
|
+
// combobox's 2nd input will have noValidate set true.
|
|
924
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
|
|
909
925
|
elem.validity = this.auroInputElements[1].validity;
|
|
910
926
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
911
927
|
}
|
|
@@ -2717,7 +2733,7 @@ class AuroFloatingUI {
|
|
|
2717
2733
|
*/
|
|
2718
2734
|
mirrorSize() {
|
|
2719
2735
|
// mirror the boxsize from bibSizer
|
|
2720
|
-
if (this.element.bibSizer) {
|
|
2736
|
+
if (this.element.bibSizer && this.element.matchWidth) {
|
|
2721
2737
|
const sizerStyle = window.getComputedStyle(this.element.bibSizer);
|
|
2722
2738
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
2723
2739
|
if (sizerStyle.width !== '0px') {
|
|
@@ -2853,6 +2869,7 @@ class AuroFloatingUI {
|
|
|
2853
2869
|
this.element.bib.style.left = "0px";
|
|
2854
2870
|
this.element.bib.style.width = '';
|
|
2855
2871
|
this.element.bib.style.height = '';
|
|
2872
|
+
this.element.style.contain = '';
|
|
2856
2873
|
|
|
2857
2874
|
// reset the size that was mirroring `size` css-part
|
|
2858
2875
|
const bibContent = this.element.bib.shadowRoot.querySelector(".container");
|
|
@@ -2877,6 +2894,7 @@ class AuroFloatingUI {
|
|
|
2877
2894
|
this.element.bib.style.position = '';
|
|
2878
2895
|
this.element.bib.removeAttribute('isfullscreen');
|
|
2879
2896
|
this.element.isBibFullscreen = false;
|
|
2897
|
+
this.element.style.contain = 'layout';
|
|
2880
2898
|
}
|
|
2881
2899
|
|
|
2882
2900
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -2929,13 +2947,13 @@ class AuroFloatingUI {
|
|
|
2929
2947
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
2930
2948
|
return;
|
|
2931
2949
|
}
|
|
2932
|
-
|
|
2950
|
+
|
|
2933
2951
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
2934
2952
|
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
2935
2953
|
return;
|
|
2936
2954
|
}
|
|
2937
2955
|
|
|
2938
|
-
this.hideBib();
|
|
2956
|
+
this.hideBib("keydown");
|
|
2939
2957
|
}
|
|
2940
2958
|
|
|
2941
2959
|
setupHideHandlers() {
|
|
@@ -2960,7 +2978,7 @@ class AuroFloatingUI {
|
|
|
2960
2978
|
document.expandedAuroFormkitDropdown = null;
|
|
2961
2979
|
document.expandedAuroFloater = this;
|
|
2962
2980
|
} else {
|
|
2963
|
-
this.hideBib();
|
|
2981
|
+
this.hideBib("click");
|
|
2964
2982
|
}
|
|
2965
2983
|
}
|
|
2966
2984
|
};
|
|
@@ -2973,7 +2991,7 @@ class AuroFloatingUI {
|
|
|
2973
2991
|
// if something else is open, let it handle itself
|
|
2974
2992
|
return;
|
|
2975
2993
|
}
|
|
2976
|
-
this.hideBib();
|
|
2994
|
+
this.hideBib("keydown");
|
|
2977
2995
|
}
|
|
2978
2996
|
};
|
|
2979
2997
|
|
|
@@ -3056,7 +3074,11 @@ class AuroFloatingUI {
|
|
|
3056
3074
|
}
|
|
3057
3075
|
}
|
|
3058
3076
|
|
|
3059
|
-
|
|
3077
|
+
/**
|
|
3078
|
+
* Hides the floating UI element.
|
|
3079
|
+
* @param {String} eventType - The event type that triggered the hiding action.
|
|
3080
|
+
*/
|
|
3081
|
+
hideBib(eventType = "unknown") {
|
|
3060
3082
|
if (!this.element.disabled && !this.element.noToggle) {
|
|
3061
3083
|
this.lockScroll(false);
|
|
3062
3084
|
this.element.triggerChevron?.removeAttribute('data-expanded');
|
|
@@ -3067,7 +3089,7 @@ class AuroFloatingUI {
|
|
|
3067
3089
|
if (this.showing) {
|
|
3068
3090
|
this.cleanupHideHandlers();
|
|
3069
3091
|
this.showing = false;
|
|
3070
|
-
this.dispatchEventDropdownToggle();
|
|
3092
|
+
this.dispatchEventDropdownToggle(eventType);
|
|
3071
3093
|
}
|
|
3072
3094
|
}
|
|
3073
3095
|
document.expandedAuroFloater = null;
|
|
@@ -3076,11 +3098,13 @@ class AuroFloatingUI {
|
|
|
3076
3098
|
/**
|
|
3077
3099
|
* @private
|
|
3078
3100
|
* @returns {void} Dispatches event with an object showing the state of the dropdown.
|
|
3101
|
+
* @param {String} eventType - The event type that triggered the toggle action.
|
|
3079
3102
|
*/
|
|
3080
|
-
dispatchEventDropdownToggle() {
|
|
3103
|
+
dispatchEventDropdownToggle(eventType) {
|
|
3081
3104
|
const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
|
|
3082
3105
|
detail: {
|
|
3083
3106
|
expanded: this.showing,
|
|
3107
|
+
eventType: eventType || "unknown",
|
|
3084
3108
|
},
|
|
3085
3109
|
composed: true
|
|
3086
3110
|
});
|
|
@@ -3090,7 +3114,7 @@ class AuroFloatingUI {
|
|
|
3090
3114
|
|
|
3091
3115
|
handleClick() {
|
|
3092
3116
|
if (this.element.isPopoverVisible) {
|
|
3093
|
-
this.hideBib();
|
|
3117
|
+
this.hideBib("click");
|
|
3094
3118
|
} else {
|
|
3095
3119
|
this.showBib();
|
|
3096
3120
|
}
|
|
@@ -3113,8 +3137,9 @@ class AuroFloatingUI {
|
|
|
3113
3137
|
// Space is included as it's expected behavior for interactive elements
|
|
3114
3138
|
|
|
3115
3139
|
const origin = event.composedPath()[0];
|
|
3116
|
-
if (event.key === 'Enter' || (
|
|
3117
|
-
|
|
3140
|
+
if (event.key === 'Enter' || event.key === ' ' && (!origin || origin.tagName !== "INPUT")) {
|
|
3141
|
+
|
|
3142
|
+
event.preventDefault();
|
|
3118
3143
|
this.handleClick();
|
|
3119
3144
|
}
|
|
3120
3145
|
break;
|
|
@@ -3125,7 +3150,7 @@ class AuroFloatingUI {
|
|
|
3125
3150
|
break;
|
|
3126
3151
|
case 'mouseleave':
|
|
3127
3152
|
if (this.element.hoverToggle) {
|
|
3128
|
-
this.hideBib();
|
|
3153
|
+
this.hideBib("mouseleave");
|
|
3129
3154
|
}
|
|
3130
3155
|
break;
|
|
3131
3156
|
case 'focus':
|
|
@@ -3268,6 +3293,267 @@ class AuroFloatingUI {
|
|
|
3268
3293
|
}
|
|
3269
3294
|
}
|
|
3270
3295
|
|
|
3296
|
+
// Selectors for focusable elements
|
|
3297
|
+
const FOCUSABLE_SELECTORS = [
|
|
3298
|
+
'a[href]',
|
|
3299
|
+
'button:not([disabled])',
|
|
3300
|
+
'textarea:not([disabled])',
|
|
3301
|
+
'input:not([disabled])',
|
|
3302
|
+
'select:not([disabled])',
|
|
3303
|
+
'[role="tab"]:not([disabled])',
|
|
3304
|
+
'[role="link"]:not([disabled])',
|
|
3305
|
+
'[role="button"]:not([disabled])',
|
|
3306
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
3307
|
+
'[contenteditable]:not([contenteditable="false"])'
|
|
3308
|
+
];
|
|
3309
|
+
|
|
3310
|
+
// List of custom components that are known to be focusable
|
|
3311
|
+
const FOCUSABLE_COMPONENTS = [
|
|
3312
|
+
'auro-checkbox',
|
|
3313
|
+
'auro-radio',
|
|
3314
|
+
'auro-dropdown',
|
|
3315
|
+
'auro-button',
|
|
3316
|
+
'auro-combobox',
|
|
3317
|
+
'auro-input',
|
|
3318
|
+
'auro-counter',
|
|
3319
|
+
'auro-menu',
|
|
3320
|
+
'auro-select',
|
|
3321
|
+
'auro-datepicker',
|
|
3322
|
+
'auro-hyperlink',
|
|
3323
|
+
'auro-accordion',
|
|
3324
|
+
];
|
|
3325
|
+
|
|
3326
|
+
/**
|
|
3327
|
+
* Determines if a given element is a custom focusable component.
|
|
3328
|
+
* Returns true if the element matches a known focusable component and is not disabled.
|
|
3329
|
+
*
|
|
3330
|
+
* @param {HTMLElement} element The element to check for focusability.
|
|
3331
|
+
* @returns {boolean} True if the element is a focusable custom component, false otherwise.
|
|
3332
|
+
*/
|
|
3333
|
+
function isFocusableComponent(element) {
|
|
3334
|
+
const componentName = element.tagName.toLowerCase();
|
|
3335
|
+
|
|
3336
|
+
// Guard Clause: Element is a focusable component
|
|
3337
|
+
if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
|
|
3338
|
+
|
|
3339
|
+
// Guard Clause: Element is not disabled
|
|
3340
|
+
if (element.hasAttribute('disabled')) return false;
|
|
3341
|
+
|
|
3342
|
+
// Guard Clause: The element is a hyperlink and has no href attribute
|
|
3343
|
+
if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
|
|
3344
|
+
|
|
3345
|
+
// If all guard clauses pass, the element is a focusable component
|
|
3346
|
+
return true;
|
|
3347
|
+
}
|
|
3348
|
+
|
|
3349
|
+
/**
|
|
3350
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3351
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3352
|
+
*
|
|
3353
|
+
* @param {HTMLElement} container The container to search within
|
|
3354
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3355
|
+
*/
|
|
3356
|
+
function getFocusableElements(container) {
|
|
3357
|
+
// Get elements in DOM order by walking the tree
|
|
3358
|
+
const orderedFocusableElements = [];
|
|
3359
|
+
|
|
3360
|
+
// Define a recursive function to collect focusable elements in DOM order
|
|
3361
|
+
const collectFocusableElements = (root) => {
|
|
3362
|
+
// Check if current element is focusable
|
|
3363
|
+
if (root.nodeType === Node.ELEMENT_NODE) {
|
|
3364
|
+
// Check if this is a custom component that is focusable
|
|
3365
|
+
const isComponentFocusable = isFocusableComponent(root);
|
|
3366
|
+
|
|
3367
|
+
if (isComponentFocusable) {
|
|
3368
|
+
// Add the component itself as a focusable element and don't traverse its shadow DOM
|
|
3369
|
+
orderedFocusableElements.push(root);
|
|
3370
|
+
return; // Skip traversing inside this component
|
|
3371
|
+
}
|
|
3372
|
+
|
|
3373
|
+
// Check if the element itself matches any selector
|
|
3374
|
+
for (const selector of FOCUSABLE_SELECTORS) {
|
|
3375
|
+
if (root.matches?.(selector)) {
|
|
3376
|
+
orderedFocusableElements.push(root);
|
|
3377
|
+
break; // Once we know it's focusable, no need to check other selectors
|
|
3378
|
+
}
|
|
3379
|
+
}
|
|
3380
|
+
|
|
3381
|
+
// Process shadow DOM only for non-Auro components
|
|
3382
|
+
if (root.shadowRoot) {
|
|
3383
|
+
// Process shadow DOM children in order
|
|
3384
|
+
if (root.shadowRoot.children) {
|
|
3385
|
+
Array.from(root.shadowRoot.children).forEach(child => {
|
|
3386
|
+
collectFocusableElements(child);
|
|
3387
|
+
});
|
|
3388
|
+
}
|
|
3389
|
+
}
|
|
3390
|
+
|
|
3391
|
+
// Process slots and their assigned nodes in order
|
|
3392
|
+
if (root.tagName === 'SLOT') {
|
|
3393
|
+
const assignedNodes = root.assignedNodes({ flatten: true });
|
|
3394
|
+
for (const node of assignedNodes) {
|
|
3395
|
+
collectFocusableElements(node);
|
|
3396
|
+
}
|
|
3397
|
+
} else {
|
|
3398
|
+
// Process light DOM children in order
|
|
3399
|
+
if (root.children) {
|
|
3400
|
+
Array.from(root.children).forEach(child => {
|
|
3401
|
+
collectFocusableElements(child);
|
|
3402
|
+
});
|
|
3403
|
+
}
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
};
|
|
3407
|
+
|
|
3408
|
+
// Start the traversal from the container
|
|
3409
|
+
collectFocusableElements(container);
|
|
3410
|
+
|
|
3411
|
+
// Remove duplicates that might have been collected through different paths
|
|
3412
|
+
// while preserving order
|
|
3413
|
+
const uniqueElements = [];
|
|
3414
|
+
const seen = new Set();
|
|
3415
|
+
|
|
3416
|
+
for (const element of orderedFocusableElements) {
|
|
3417
|
+
if (!seen.has(element)) {
|
|
3418
|
+
seen.add(element);
|
|
3419
|
+
uniqueElements.push(element);
|
|
3420
|
+
}
|
|
3421
|
+
}
|
|
3422
|
+
|
|
3423
|
+
return uniqueElements;
|
|
3424
|
+
}
|
|
3425
|
+
|
|
3426
|
+
/**
|
|
3427
|
+
* FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
|
|
3428
|
+
* It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
|
|
3429
|
+
*/
|
|
3430
|
+
class FocusTrap {
|
|
3431
|
+
/**
|
|
3432
|
+
* Creates a new FocusTrap instance for the given container element.
|
|
3433
|
+
* Initializes event listeners and prepares the container for focus management.
|
|
3434
|
+
*
|
|
3435
|
+
* @param {HTMLElement} container The DOM element to trap focus within.
|
|
3436
|
+
* @throws {Error} If the provided container is not a valid HTMLElement.
|
|
3437
|
+
*/
|
|
3438
|
+
constructor(container) {
|
|
3439
|
+
if (!container || !(container instanceof HTMLElement)) {
|
|
3440
|
+
throw new Error("FocusTrap requires a valid HTMLElement.");
|
|
3441
|
+
}
|
|
3442
|
+
|
|
3443
|
+
this.container = container;
|
|
3444
|
+
this.tabDirection = 'forward'; // or 'backward'
|
|
3445
|
+
|
|
3446
|
+
this._init();
|
|
3447
|
+
}
|
|
3448
|
+
|
|
3449
|
+
/**
|
|
3450
|
+
* Initializes the focus trap by setting up event listeners and attributes on the container.
|
|
3451
|
+
* Prepares the container for focus management, including support for shadow DOM and inert attributes.
|
|
3452
|
+
*
|
|
3453
|
+
* @private
|
|
3454
|
+
*/
|
|
3455
|
+
_init() {
|
|
3456
|
+
|
|
3457
|
+
// Add inert attribute to prevent focusing programmatically as well (if supported)
|
|
3458
|
+
if ('inert' in HTMLElement.prototype) {
|
|
3459
|
+
this.container.inert = false; // Ensure the container isn't inert
|
|
3460
|
+
this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
|
|
3461
|
+
}
|
|
3462
|
+
|
|
3463
|
+
// Track tab direction
|
|
3464
|
+
this.container.addEventListener('keydown', this._onKeydown);
|
|
3465
|
+
}
|
|
3466
|
+
|
|
3467
|
+
/**
|
|
3468
|
+
* Handles keydown events to manage tab navigation within the container.
|
|
3469
|
+
* Ensures that focus wraps around when reaching the first or last focusable element.
|
|
3470
|
+
*
|
|
3471
|
+
* @param {KeyboardEvent} e The keyboard event triggered by user interaction.
|
|
3472
|
+
* @private
|
|
3473
|
+
*/
|
|
3474
|
+
_onKeydown = (e) => {
|
|
3475
|
+
|
|
3476
|
+
if (e.key === 'Tab') {
|
|
3477
|
+
|
|
3478
|
+
// Set the tab direction based on the key pressed
|
|
3479
|
+
this.tabDirection = e.shiftKey ? 'backward' : 'forward';
|
|
3480
|
+
|
|
3481
|
+
// Get the active element(s) in the document and shadow root
|
|
3482
|
+
// This will include the active element in the shadow DOM if it exists
|
|
3483
|
+
// Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
|
|
3484
|
+
let activeElement = document.activeElement;
|
|
3485
|
+
const actives = [activeElement];
|
|
3486
|
+
while (activeElement?.shadowRoot?.activeElement) {
|
|
3487
|
+
actives.push(activeElement.shadowRoot.activeElement);
|
|
3488
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
3489
|
+
}
|
|
3490
|
+
|
|
3491
|
+
// Update the focusable elements
|
|
3492
|
+
const focusables = this._getFocusableElements();
|
|
3493
|
+
|
|
3494
|
+
// If we're at either end of the focusable elements, wrap around to the other end
|
|
3495
|
+
const focusIndex =
|
|
3496
|
+
(actives.includes(focusables[0]) || actives.includes(this.container)) && this.tabDirection === 'backward'
|
|
3497
|
+
? focusables.length - 1
|
|
3498
|
+
: actives.includes(focusables[focusables.length - 1]) && this.tabDirection === 'forward'
|
|
3499
|
+
? 0
|
|
3500
|
+
: null;
|
|
3501
|
+
|
|
3502
|
+
if (focusIndex !== null) {
|
|
3503
|
+
focusables[focusIndex].focus();
|
|
3504
|
+
e.preventDefault(); // Prevent default tab behavior
|
|
3505
|
+
e.stopPropagation(); // Stop the event from bubbling up
|
|
3506
|
+
}
|
|
3507
|
+
}
|
|
3508
|
+
};
|
|
3509
|
+
|
|
3510
|
+
/**
|
|
3511
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
3512
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
3513
|
+
*
|
|
3514
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
3515
|
+
* @private
|
|
3516
|
+
*/
|
|
3517
|
+
_getFocusableElements() {
|
|
3518
|
+
// Use the imported utility function to get focusable elements
|
|
3519
|
+
const elements = getFocusableElements(this.container);
|
|
3520
|
+
|
|
3521
|
+
// Filter out any elements with the 'focus-bookend' class
|
|
3522
|
+
return elements;
|
|
3523
|
+
}
|
|
3524
|
+
|
|
3525
|
+
/**
|
|
3526
|
+
* Moves focus to the first focusable element within the container.
|
|
3527
|
+
* Useful for setting initial focus when activating the focus trap.
|
|
3528
|
+
*/
|
|
3529
|
+
focusFirstElement() {
|
|
3530
|
+
const focusables = this._getFocusableElements();
|
|
3531
|
+
if (focusables.length) focusables[0].focus();
|
|
3532
|
+
}
|
|
3533
|
+
|
|
3534
|
+
/**
|
|
3535
|
+
* Moves focus to the last focusable element within the container.
|
|
3536
|
+
* Useful for setting focus when deactivating or cycling focus in reverse.
|
|
3537
|
+
*/
|
|
3538
|
+
focusLastElement() {
|
|
3539
|
+
const focusables = this._getFocusableElements();
|
|
3540
|
+
if (focusables.length) focusables[focusables.length - 1].focus();
|
|
3541
|
+
}
|
|
3542
|
+
|
|
3543
|
+
/**
|
|
3544
|
+
* Removes event listeners and attributes added by the focus trap.
|
|
3545
|
+
* Call this method to clean up when the focus trap is no longer needed.
|
|
3546
|
+
*/
|
|
3547
|
+
disconnect() {
|
|
3548
|
+
|
|
3549
|
+
if (this.container.hasAttribute('data-focus-trap-container')) {
|
|
3550
|
+
this.container.removeAttribute('data-focus-trap-container');
|
|
3551
|
+
}
|
|
3552
|
+
|
|
3553
|
+
this.container.removeEventListener('keydown', this._onKeydown);
|
|
3554
|
+
}
|
|
3555
|
+
}
|
|
3556
|
+
|
|
3271
3557
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3272
3558
|
// See LICENSE in the project root for license information.
|
|
3273
3559
|
|
|
@@ -3374,7 +3660,7 @@ const cacheFetch$2 = (uri, options = {}) => {
|
|
|
3374
3660
|
return _fetchMap$2.get(uri);
|
|
3375
3661
|
};
|
|
3376
3662
|
|
|
3377
|
-
var styleCss$
|
|
3663
|
+
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}`;
|
|
3378
3664
|
|
|
3379
3665
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3380
3666
|
// See LICENSE in the project root for license information.
|
|
@@ -3417,7 +3703,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$1$1 {
|
|
|
3417
3703
|
|
|
3418
3704
|
static get styles() {
|
|
3419
3705
|
return i$5`
|
|
3420
|
-
${styleCss$
|
|
3706
|
+
${styleCss$3$2}
|
|
3421
3707
|
`;
|
|
3422
3708
|
}
|
|
3423
3709
|
|
|
@@ -3458,9 +3744,9 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$1$1 {
|
|
|
3458
3744
|
}
|
|
3459
3745
|
};
|
|
3460
3746
|
|
|
3461
|
-
var tokensCss$2$
|
|
3747
|
+
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)}`;
|
|
3462
3748
|
|
|
3463
|
-
var colorCss$3$
|
|
3749
|
+
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)}`;
|
|
3464
3750
|
|
|
3465
3751
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3466
3752
|
// See LICENSE in the project root for license information.
|
|
@@ -3618,9 +3904,9 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3618
3904
|
static get styles() {
|
|
3619
3905
|
return [
|
|
3620
3906
|
super.styles,
|
|
3621
|
-
i$5`${tokensCss$2$
|
|
3622
|
-
i$5`${styleCss$
|
|
3623
|
-
i$5`${colorCss$3$
|
|
3907
|
+
i$5`${tokensCss$2$2}`,
|
|
3908
|
+
i$5`${styleCss$3$2}`,
|
|
3909
|
+
i$5`${colorCss$3$2}`
|
|
3624
3910
|
];
|
|
3625
3911
|
}
|
|
3626
3912
|
|
|
@@ -3654,8 +3940,12 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3654
3940
|
async firstUpdated() {
|
|
3655
3941
|
await super.firstUpdated();
|
|
3656
3942
|
|
|
3657
|
-
|
|
3658
|
-
|
|
3943
|
+
/**
|
|
3944
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
3945
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
3946
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
3947
|
+
*/
|
|
3948
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
3659
3949
|
const svgDesc = this.svg.querySelector('desc');
|
|
3660
3950
|
|
|
3661
3951
|
if (svgDesc) {
|
|
@@ -3701,11 +3991,11 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3701
3991
|
|
|
3702
3992
|
var iconVersion$2 = '6.1.2';
|
|
3703
3993
|
|
|
3704
|
-
var styleCss$
|
|
3994
|
+
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}`;
|
|
3705
3995
|
|
|
3706
|
-
var colorCss$2$
|
|
3996
|
+
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)}`;
|
|
3707
3997
|
|
|
3708
|
-
var tokensCss$1$
|
|
3998
|
+
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)}`;
|
|
3709
3999
|
|
|
3710
4000
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3711
4001
|
// See LICENSE in the project root for license information.
|
|
@@ -3726,7 +4016,7 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
3726
4016
|
*/
|
|
3727
4017
|
|
|
3728
4018
|
class AuroDropdownBib extends i$2 {
|
|
3729
|
-
|
|
4019
|
+
// not extending AuroElement because Bib needs only `shape` prop
|
|
3730
4020
|
constructor() {
|
|
3731
4021
|
super();
|
|
3732
4022
|
|
|
@@ -3736,13 +4026,16 @@ class AuroDropdownBib extends i$2 {
|
|
|
3736
4026
|
this._mobileBreakpointValue = undefined;
|
|
3737
4027
|
|
|
3738
4028
|
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
4029
|
+
|
|
4030
|
+
this.shape = "rounded";
|
|
4031
|
+
this.matchWidth = false;
|
|
3739
4032
|
}
|
|
3740
4033
|
|
|
3741
4034
|
static get styles() {
|
|
3742
4035
|
return [
|
|
3743
|
-
styleCss$
|
|
3744
|
-
colorCss$2$
|
|
3745
|
-
tokensCss$1$
|
|
4036
|
+
styleCss$2$2,
|
|
4037
|
+
colorCss$2$2,
|
|
4038
|
+
tokensCss$1$2
|
|
3746
4039
|
];
|
|
3747
4040
|
}
|
|
3748
4041
|
|
|
@@ -3773,6 +4066,15 @@ class AuroDropdownBib extends i$2 {
|
|
|
3773
4066
|
reflect: true
|
|
3774
4067
|
},
|
|
3775
4068
|
|
|
4069
|
+
/**
|
|
4070
|
+
* If declared, the bib width will match the trigger width.
|
|
4071
|
+
* @private
|
|
4072
|
+
*/
|
|
4073
|
+
matchWidth: {
|
|
4074
|
+
type: Boolean,
|
|
4075
|
+
reflect: true
|
|
4076
|
+
},
|
|
4077
|
+
|
|
3776
4078
|
/**
|
|
3777
4079
|
* If declared, will apply border-radius to the bib.
|
|
3778
4080
|
*/
|
|
@@ -3786,6 +4088,11 @@ class AuroDropdownBib extends i$2 {
|
|
|
3786
4088
|
*/
|
|
3787
4089
|
bibTemplate: {
|
|
3788
4090
|
type: Object
|
|
4091
|
+
},
|
|
4092
|
+
|
|
4093
|
+
shape: {
|
|
4094
|
+
type: String,
|
|
4095
|
+
reflect: true
|
|
3789
4096
|
}
|
|
3790
4097
|
};
|
|
3791
4098
|
}
|
|
@@ -3865,8 +4172,16 @@ class AuroDropdownBib extends i$2 {
|
|
|
3865
4172
|
|
|
3866
4173
|
// function that renders the HTML and CSS into the scope of the component
|
|
3867
4174
|
render() {
|
|
4175
|
+
const classes = {
|
|
4176
|
+
container: true
|
|
4177
|
+
};
|
|
4178
|
+
|
|
4179
|
+
// Since this class does not inherit from AuroElement, we apply the shape-related class within the `render` function,
|
|
4180
|
+
// mimicking the class naming convention used in AuroElement.resetShapeClasses.
|
|
4181
|
+
classes[`shape-${this.shape}`] = true;
|
|
4182
|
+
|
|
3868
4183
|
return u`
|
|
3869
|
-
<div class="
|
|
4184
|
+
<div class="${e(classes)}" part="bibContainer">
|
|
3870
4185
|
<slot></slot>
|
|
3871
4186
|
</div>
|
|
3872
4187
|
`;
|
|
@@ -3875,21 +4190,23 @@ class AuroDropdownBib extends i$2 {
|
|
|
3875
4190
|
|
|
3876
4191
|
var dropdownVersion$1 = '3.0.0';
|
|
3877
4192
|
|
|
3878
|
-
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:
|
|
4193
|
+
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}`;
|
|
4194
|
+
|
|
4195
|
+
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)}`;
|
|
3879
4196
|
|
|
3880
|
-
var
|
|
4197
|
+
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%}`;
|
|
3881
4198
|
|
|
3882
|
-
var classicColorCss = i$5
|
|
4199
|
+
var classicColorCss = i$5``;
|
|
3883
4200
|
|
|
3884
|
-
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]) .
|
|
4201
|
+
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)}`;
|
|
3885
4202
|
|
|
3886
|
-
var styleEmphasizedCss = i$5
|
|
4203
|
+
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)}`;
|
|
3887
4204
|
|
|
3888
|
-
var styleSnowflakeCss = i$5`:host
|
|
4205
|
+
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)}`;
|
|
3889
4206
|
|
|
3890
|
-
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-
|
|
4207
|
+
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)}`;
|
|
3891
4208
|
|
|
3892
|
-
var styleCss$6 = i$5`.
|
|
4209
|
+
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}`;
|
|
3893
4210
|
|
|
3894
4211
|
var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
3895
4212
|
|
|
@@ -3900,7 +4217,7 @@ var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
3900
4217
|
|
|
3901
4218
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3902
4219
|
|
|
3903
|
-
let AuroLibraryRuntimeUtils$
|
|
4220
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
3904
4221
|
|
|
3905
4222
|
/* eslint-disable jsdoc/require-param */
|
|
3906
4223
|
|
|
@@ -3969,8 +4286,6 @@ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
|
3969
4286
|
|
|
3970
4287
|
/**
|
|
3971
4288
|
* Displays help text or error messages within form elements - Internal Use Only.
|
|
3972
|
-
*
|
|
3973
|
-
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
3974
4289
|
*/
|
|
3975
4290
|
let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
3976
4291
|
|
|
@@ -3981,7 +4296,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
3981
4296
|
this.onDark = false;
|
|
3982
4297
|
this.hasTextContent = false;
|
|
3983
4298
|
|
|
3984
|
-
AuroLibraryRuntimeUtils$
|
|
4299
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
3985
4300
|
}
|
|
3986
4301
|
|
|
3987
4302
|
static get styles() {
|
|
@@ -4037,7 +4352,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4037
4352
|
*
|
|
4038
4353
|
*/
|
|
4039
4354
|
static register(name = "auro-helptext") {
|
|
4040
|
-
AuroLibraryRuntimeUtils$
|
|
4355
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroHelpText);
|
|
4041
4356
|
}
|
|
4042
4357
|
|
|
4043
4358
|
updated() {
|
|
@@ -4086,7 +4401,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4086
4401
|
// function that renders the HTML and CSS into the scope of the component
|
|
4087
4402
|
render() {
|
|
4088
4403
|
return x`
|
|
4089
|
-
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
4404
|
+
<div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
|
|
4090
4405
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
4091
4406
|
</div>
|
|
4092
4407
|
`;
|
|
@@ -4095,7 +4410,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
4095
4410
|
|
|
4096
4411
|
var helpTextVersion$1 = '1.0.0';
|
|
4097
4412
|
|
|
4098
|
-
let AuroElement$
|
|
4413
|
+
let AuroElement$3 = class AuroElement extends i$2 {
|
|
4099
4414
|
static get properties() {
|
|
4100
4415
|
return {
|
|
4101
4416
|
|
|
@@ -4130,19 +4445,22 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
4130
4445
|
}
|
|
4131
4446
|
|
|
4132
4447
|
resetShapeClasses() {
|
|
4133
|
-
|
|
4134
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4448
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
4135
4449
|
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4450
|
+
if (wrapper) {
|
|
4451
|
+
wrapper.classList.forEach((className) => {
|
|
4452
|
+
if (className.startsWith('shape-')) {
|
|
4453
|
+
wrapper.classList.remove(className);
|
|
4454
|
+
}
|
|
4455
|
+
});
|
|
4142
4456
|
|
|
4457
|
+
if (this.shape && this.size) {
|
|
4143
4458
|
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
4459
|
+
} else {
|
|
4460
|
+
wrapper.classList.add('shape-none');
|
|
4144
4461
|
}
|
|
4145
4462
|
}
|
|
4463
|
+
|
|
4146
4464
|
}
|
|
4147
4465
|
|
|
4148
4466
|
resetLayoutClasses() {
|
|
@@ -4191,10 +4509,9 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
4191
4509
|
// See LICENSE in the project root for license information.
|
|
4192
4510
|
|
|
4193
4511
|
|
|
4194
|
-
|
|
4195
|
-
|
|
4512
|
+
|
|
4513
|
+
/*
|
|
4196
4514
|
* @slot - Default slot for the popover content.
|
|
4197
|
-
* @slot label - Defines the content of the label.
|
|
4198
4515
|
* @slot helpText - Defines the content of the helpText.
|
|
4199
4516
|
* @slot trigger - Defines the content of the trigger.
|
|
4200
4517
|
* @csspart trigger - The trigger content container.
|
|
@@ -4204,7 +4521,7 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
4204
4521
|
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
4205
4522
|
* @event auroDropdown-idAdded - Notifies consumers that the unique ID for the dropdown bib has been generated.
|
|
4206
4523
|
*/
|
|
4207
|
-
class AuroDropdown extends AuroElement$
|
|
4524
|
+
class AuroDropdown extends AuroElement$3 {
|
|
4208
4525
|
constructor() {
|
|
4209
4526
|
super();
|
|
4210
4527
|
|
|
@@ -4213,23 +4530,25 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4213
4530
|
this.matchWidth = false;
|
|
4214
4531
|
this.noHideOnThisFocusLoss = false;
|
|
4215
4532
|
|
|
4216
|
-
this.errorMessage =
|
|
4533
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
4217
4534
|
|
|
4218
4535
|
// Layout Config
|
|
4219
|
-
this.layout =
|
|
4220
|
-
this.shape =
|
|
4221
|
-
this.size =
|
|
4536
|
+
this.layout = undefined;
|
|
4537
|
+
this.shape = undefined;
|
|
4538
|
+
this.size = undefined;
|
|
4539
|
+
|
|
4222
4540
|
this.parentBorder = false;
|
|
4223
4541
|
|
|
4224
|
-
|
|
4225
|
-
|
|
4542
|
+
/** @private */
|
|
4543
|
+
this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
|
|
4226
4544
|
|
|
4227
|
-
|
|
4228
|
-
return {
|
|
4229
|
-
// 'withValue': this.value && this.value.length > 0
|
|
4230
|
-
};
|
|
4545
|
+
this.privateDefaults();
|
|
4231
4546
|
}
|
|
4232
4547
|
|
|
4548
|
+
/**
|
|
4549
|
+
* @private
|
|
4550
|
+
* @returns {object} Class definition for the wrapper element.
|
|
4551
|
+
*/
|
|
4233
4552
|
get commonWrapperClasses() {
|
|
4234
4553
|
return {
|
|
4235
4554
|
'trigger': true,
|
|
@@ -4247,13 +4566,10 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4247
4566
|
privateDefaults() {
|
|
4248
4567
|
this.chevron = false;
|
|
4249
4568
|
this.disabled = false;
|
|
4569
|
+
this.disableFocusTrap = false;
|
|
4250
4570
|
this.error = false;
|
|
4251
|
-
this.inset = false;
|
|
4252
|
-
this.rounded = false;
|
|
4253
4571
|
this.tabIndex = 0;
|
|
4254
4572
|
this.noToggle = false;
|
|
4255
|
-
this.a11yAutocomplete = 'none';
|
|
4256
|
-
this.labeled = true;
|
|
4257
4573
|
this.a11yRole = 'button';
|
|
4258
4574
|
this.onDark = false;
|
|
4259
4575
|
this.showTriggerBorders = true;
|
|
@@ -4349,6 +4665,18 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4349
4665
|
this.floater.showBib();
|
|
4350
4666
|
}
|
|
4351
4667
|
|
|
4668
|
+
/**
|
|
4669
|
+
* When bib is open, focus on the first element inside of bib.
|
|
4670
|
+
* If not, trigger element will get focus.
|
|
4671
|
+
*/
|
|
4672
|
+
focus() {
|
|
4673
|
+
if (this.isPopoverVisible && this.focusTrap) {
|
|
4674
|
+
this.focusTrap.focusFirstElement();
|
|
4675
|
+
} else {
|
|
4676
|
+
this.trigger.focus();
|
|
4677
|
+
}
|
|
4678
|
+
}
|
|
4679
|
+
|
|
4352
4680
|
// function to define props used within the scope of this component
|
|
4353
4681
|
static get properties() {
|
|
4354
4682
|
return {
|
|
@@ -4362,6 +4690,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4362
4690
|
reflect: true
|
|
4363
4691
|
},
|
|
4364
4692
|
|
|
4693
|
+
/**
|
|
4694
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
4695
|
+
* @default false
|
|
4696
|
+
*/
|
|
4697
|
+
disableEventShow: {
|
|
4698
|
+
type: Boolean,
|
|
4699
|
+
reflect: true
|
|
4700
|
+
},
|
|
4701
|
+
|
|
4365
4702
|
/**
|
|
4366
4703
|
* If declared, applies a border around the trigger slot.
|
|
4367
4704
|
*/
|
|
@@ -4380,17 +4717,17 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4380
4717
|
},
|
|
4381
4718
|
|
|
4382
4719
|
/**
|
|
4383
|
-
* If declared, the dropdown
|
|
4720
|
+
* If declared, the dropdown is not interactive.
|
|
4384
4721
|
*/
|
|
4385
|
-
|
|
4722
|
+
disabled: {
|
|
4386
4723
|
type: Boolean,
|
|
4387
4724
|
reflect: true
|
|
4388
4725
|
},
|
|
4389
4726
|
|
|
4390
4727
|
/**
|
|
4391
|
-
* If declared, the
|
|
4728
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
4392
4729
|
*/
|
|
4393
|
-
|
|
4730
|
+
disableFocusTrap: {
|
|
4394
4731
|
type: Boolean,
|
|
4395
4732
|
reflect: true
|
|
4396
4733
|
},
|
|
@@ -4435,27 +4772,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4435
4772
|
reflect: true
|
|
4436
4773
|
},
|
|
4437
4774
|
|
|
4438
|
-
/**
|
|
4439
|
-
* Makes the trigger to be full width of its parent container.
|
|
4440
|
-
*/
|
|
4441
|
-
fluid: {
|
|
4442
|
-
type: Boolean,
|
|
4443
|
-
reflect: true
|
|
4444
|
-
},
|
|
4445
|
-
|
|
4446
|
-
/**
|
|
4447
|
-
* If declared, will apply padding around trigger slot content.
|
|
4448
|
-
*/
|
|
4449
|
-
inset: {
|
|
4450
|
-
type: Boolean,
|
|
4451
|
-
reflect: true
|
|
4452
|
-
},
|
|
4453
|
-
|
|
4454
4775
|
/**
|
|
4455
4776
|
* If true, the dropdown bib is displayed.
|
|
4456
4777
|
*/
|
|
4457
4778
|
isPopoverVisible: {
|
|
4458
|
-
type: Boolean
|
|
4779
|
+
type: Boolean,
|
|
4780
|
+
reflect: true,
|
|
4781
|
+
attribute: 'open'
|
|
4459
4782
|
},
|
|
4460
4783
|
|
|
4461
4784
|
/**
|
|
@@ -4494,15 +4817,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4494
4817
|
reflect: true
|
|
4495
4818
|
},
|
|
4496
4819
|
|
|
4497
|
-
/**
|
|
4498
|
-
* Defines if there is a label preset.
|
|
4499
|
-
* @private
|
|
4500
|
-
*/
|
|
4501
|
-
labeled: {
|
|
4502
|
-
type: Boolean,
|
|
4503
|
-
reflect: true
|
|
4504
|
-
},
|
|
4505
|
-
|
|
4506
4820
|
/**
|
|
4507
4821
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4508
4822
|
* @private
|
|
@@ -4563,6 +4877,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4563
4877
|
reflect: true
|
|
4564
4878
|
},
|
|
4565
4879
|
|
|
4880
|
+
/**
|
|
4881
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
4882
|
+
*/
|
|
4566
4883
|
onSlotChange: {
|
|
4567
4884
|
type: Function,
|
|
4568
4885
|
reflect: false
|
|
@@ -4577,14 +4894,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4577
4894
|
reflect: true
|
|
4578
4895
|
},
|
|
4579
4896
|
|
|
4580
|
-
/**
|
|
4581
|
-
* If declared, will apply border-radius to trigger and default slots.
|
|
4582
|
-
*/
|
|
4583
|
-
rounded: {
|
|
4584
|
-
type: Boolean,
|
|
4585
|
-
reflect: true
|
|
4586
|
-
},
|
|
4587
|
-
|
|
4588
4897
|
/**
|
|
4589
4898
|
* @private
|
|
4590
4899
|
*/
|
|
@@ -4599,22 +4908,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4599
4908
|
type: String || undefined,
|
|
4600
4909
|
attribute: false,
|
|
4601
4910
|
reflect: false
|
|
4602
|
-
},
|
|
4603
|
-
|
|
4604
|
-
/**
|
|
4605
|
-
* The value for the aria-autocomplete attribute of the trigger element.
|
|
4606
|
-
*/
|
|
4607
|
-
a11yAutocomplete: {
|
|
4608
|
-
type: String,
|
|
4609
|
-
attribute: false,
|
|
4610
4911
|
}
|
|
4611
4912
|
};
|
|
4612
4913
|
}
|
|
4613
4914
|
|
|
4614
4915
|
static get styles() {
|
|
4615
4916
|
return [
|
|
4917
|
+
styleCss$1$2,
|
|
4918
|
+
tokensCss$1$2,
|
|
4616
4919
|
colorCss$1$2,
|
|
4617
|
-
tokensCss$1$1,
|
|
4618
4920
|
|
|
4619
4921
|
// default layout
|
|
4620
4922
|
classicColorCss,
|
|
@@ -4626,7 +4928,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4626
4928
|
// snowflake layout
|
|
4627
4929
|
styleSnowflakeCss,
|
|
4628
4930
|
|
|
4629
|
-
shapeSizeCss
|
|
4931
|
+
shapeSizeCss$1
|
|
4630
4932
|
];
|
|
4631
4933
|
}
|
|
4632
4934
|
|
|
@@ -4676,13 +4978,27 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4676
4978
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
4677
4979
|
this.handleTriggerContentSlotChange();
|
|
4678
4980
|
}
|
|
4981
|
+
}
|
|
4679
4982
|
|
|
4983
|
+
/**
|
|
4984
|
+
* Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
|
|
4985
|
+
* @private
|
|
4986
|
+
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
4987
|
+
*/
|
|
4988
|
+
handleDropdownToggle(event) {
|
|
4989
|
+
this.updateFocusTrap();
|
|
4990
|
+
this.isPopoverVisible = event.detail.expanded;
|
|
4991
|
+
const eventType = event.detail.eventType || "unknown";
|
|
4992
|
+
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
4993
|
+
this.trigger.focus();
|
|
4994
|
+
}
|
|
4680
4995
|
}
|
|
4681
4996
|
|
|
4682
4997
|
firstUpdated() {
|
|
4683
4998
|
|
|
4684
4999
|
// Configure the floater to, this will generate the ID for the bib
|
|
4685
5000
|
this.floater.configure(this, 'auroDropdown');
|
|
5001
|
+
this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
|
|
4686
5002
|
|
|
4687
5003
|
/**
|
|
4688
5004
|
* @description Let subscribers know that the dropdown ID ha been generated and added.
|
|
@@ -4700,6 +5016,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4700
5016
|
|
|
4701
5017
|
// Add the tag name as an attribute if it is different than the component name
|
|
4702
5018
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
|
|
5019
|
+
|
|
5020
|
+
this.trigger.addEventListener('click', () => {
|
|
5021
|
+
this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
|
|
5022
|
+
bubbles: true,
|
|
5023
|
+
composed: true
|
|
5024
|
+
}));
|
|
5025
|
+
});
|
|
4703
5026
|
}
|
|
4704
5027
|
|
|
4705
5028
|
/**
|
|
@@ -4742,6 +5065,27 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4742
5065
|
this.hasFocus = true;
|
|
4743
5066
|
}
|
|
4744
5067
|
|
|
5068
|
+
/**
|
|
5069
|
+
* @private
|
|
5070
|
+
*/
|
|
5071
|
+
updateFocusTrap() {
|
|
5072
|
+
// If the dropdown is open, create a focus trap and focus the first element
|
|
5073
|
+
if (this.isPopoverVisible && !this.disableFocusTrap) {
|
|
5074
|
+
this.focusTrap = new FocusTrap(this.bibContent);
|
|
5075
|
+
this.focusTrap.focusFirstElement();
|
|
5076
|
+
return;
|
|
5077
|
+
}
|
|
5078
|
+
|
|
5079
|
+
// Guard Clause: Ensure there is a focus trap currently active before continuing
|
|
5080
|
+
if (!this.focusTrap) {
|
|
5081
|
+
return;
|
|
5082
|
+
}
|
|
5083
|
+
|
|
5084
|
+
// If the dropdown is not open, disconnect the focus trap if it exists
|
|
5085
|
+
this.focusTrap.disconnect();
|
|
5086
|
+
this.focusTrap = undefined;
|
|
5087
|
+
}
|
|
5088
|
+
|
|
4745
5089
|
/**
|
|
4746
5090
|
* Function to support @focusout event.
|
|
4747
5091
|
* @private
|
|
@@ -4752,67 +5096,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4752
5096
|
}
|
|
4753
5097
|
|
|
4754
5098
|
/**
|
|
4755
|
-
*
|
|
5099
|
+
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
4756
5100
|
* @private
|
|
4757
|
-
* @param {
|
|
4758
|
-
* @returns {Boolean} - True if the element or any children are focusable.
|
|
4759
|
-
*/
|
|
4760
|
-
containsFocusableElement(element) {
|
|
4761
|
-
this.showTriggerBorders = true;
|
|
4762
|
-
|
|
4763
|
-
const nodes = [
|
|
4764
|
-
element,
|
|
4765
|
-
...element.children
|
|
4766
|
-
];
|
|
4767
|
-
|
|
4768
|
-
const focusableElements = [
|
|
4769
|
-
'a',
|
|
4770
|
-
'auro-hyperlink',
|
|
4771
|
-
'button',
|
|
4772
|
-
'auro-button',
|
|
4773
|
-
'input',
|
|
4774
|
-
'auro-input',
|
|
4775
|
-
];
|
|
4776
|
-
|
|
4777
|
-
const focusableElementsThatNeedBorders = ['auro-input'];
|
|
4778
|
-
|
|
4779
|
-
const result = nodes.some((node) => {
|
|
4780
|
-
const tagName = node.tagName.toLowerCase();
|
|
4781
|
-
|
|
4782
|
-
if (node.tabIndex > -1) {
|
|
4783
|
-
return true;
|
|
4784
|
-
}
|
|
4785
|
-
|
|
4786
|
-
if (focusableElements.includes(tagName)) {
|
|
4787
|
-
if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
|
|
4788
|
-
return true;
|
|
4789
|
-
}
|
|
4790
|
-
if (!node.hasAttribute('disabled')) {
|
|
4791
|
-
return true;
|
|
4792
|
-
}
|
|
4793
|
-
}
|
|
4794
|
-
|
|
4795
|
-
if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
|
|
4796
|
-
return true;
|
|
4797
|
-
}
|
|
4798
|
-
|
|
4799
|
-
return false;
|
|
4800
|
-
});
|
|
4801
|
-
|
|
4802
|
-
if (result) {
|
|
4803
|
-
this.showTriggerBorders = !nodes.some((node) => {
|
|
4804
|
-
const tagName = node.tagName.toLowerCase();
|
|
4805
|
-
return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
|
|
4806
|
-
});
|
|
4807
|
-
}
|
|
4808
|
-
|
|
4809
|
-
return result;
|
|
4810
|
-
}
|
|
4811
|
-
|
|
4812
|
-
/**
|
|
4813
|
-
* Creates and dispatches a duplicate focus event on the trigger element.
|
|
4814
|
-
* @private
|
|
4815
|
-
* @param {Event} event - The original focus event.
|
|
5101
|
+
* @param {Event} event - The original focus event.
|
|
4816
5102
|
*/
|
|
4817
5103
|
bindFocusEventToTrigger(event) {
|
|
4818
5104
|
const dupEvent = new FocusEvent(event.type, {
|
|
@@ -4902,14 +5188,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4902
5188
|
* @returns {void}
|
|
4903
5189
|
*/
|
|
4904
5190
|
handleTriggerContentSlotChange(event) {
|
|
4905
|
-
|
|
4906
5191
|
this.floater.handleTriggerTabIndex();
|
|
4907
5192
|
|
|
4908
5193
|
// Get the trigger
|
|
4909
5194
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
4910
5195
|
|
|
4911
5196
|
// Get the trigger slot
|
|
4912
|
-
const triggerSlot = this.shadowRoot.querySelector('.
|
|
5197
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContentWrapper slot');
|
|
4913
5198
|
|
|
4914
5199
|
// If there's a trigger slot
|
|
4915
5200
|
if (triggerSlot) {
|
|
@@ -4921,7 +5206,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4921
5206
|
if (triggerContentNodes) {
|
|
4922
5207
|
|
|
4923
5208
|
// See if any of them are focusable elements
|
|
4924
|
-
this.triggerContentFocusable = triggerContentNodes.some((node) =>
|
|
5209
|
+
this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
|
|
4925
5210
|
|
|
4926
5211
|
// If any of them are focusable elements
|
|
4927
5212
|
if (this.triggerContentFocusable) {
|
|
@@ -4972,7 +5257,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4972
5257
|
*
|
|
4973
5258
|
* @private
|
|
4974
5259
|
* @method handleDefaultSlot
|
|
4975
|
-
* @param {Event} event - The event object representing the slot change.
|
|
4976
5260
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
4977
5261
|
*/
|
|
4978
5262
|
handleDefaultSlot() {
|
|
@@ -4982,29 +5266,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4982
5266
|
}
|
|
4983
5267
|
}
|
|
4984
5268
|
|
|
4985
|
-
/**
|
|
4986
|
-
* @private
|
|
4987
|
-
* @method handleLabelSlotChange
|
|
4988
|
-
* @param {event} event - The event object representing the slot change.
|
|
4989
|
-
* @description Handles the slot change event for the label slot.
|
|
4990
|
-
*/
|
|
4991
|
-
handleLabelSlotChange (event) {
|
|
4992
|
-
|
|
4993
|
-
// Get the nodes from the event
|
|
4994
|
-
const nodes = event.target.assignedNodes();
|
|
4995
|
-
|
|
4996
|
-
// Guard clause for no nodes
|
|
4997
|
-
if (!nodes) {
|
|
4998
|
-
return;
|
|
4999
|
-
}
|
|
5000
|
-
|
|
5001
|
-
// Convert the nodes to a measurable array so we can get the length
|
|
5002
|
-
const nodesArr = Array.from(nodes);
|
|
5003
|
-
|
|
5004
|
-
// If the nodes array has a length, the dropdown is labeled
|
|
5005
|
-
this.labeled = nodesArr.length > 0;
|
|
5006
|
-
}
|
|
5007
|
-
|
|
5008
5269
|
/**
|
|
5009
5270
|
* Returns HTML for the common portion of the layouts.
|
|
5010
5271
|
* @private
|
|
@@ -5017,24 +5278,19 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5017
5278
|
<div
|
|
5018
5279
|
id="trigger"
|
|
5019
5280
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
5020
|
-
tabindex="${this.tabIndex}"
|
|
5281
|
+
tabindex="${o(this.triggerContentFocusable ? undefined : this.tabIndex)}"
|
|
5021
5282
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5022
|
-
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5023
|
-
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5283
|
+
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5284
|
+
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5024
5285
|
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5025
5286
|
@focusin="${this.handleFocusin}"
|
|
5026
5287
|
@blur="${this.handleFocusOut}">
|
|
5027
|
-
<div class="triggerContentWrapper">
|
|
5028
|
-
<
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
<div class="triggerContent">
|
|
5032
|
-
<slot
|
|
5033
|
-
name="trigger"
|
|
5034
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5035
|
-
</div>
|
|
5288
|
+
<div class="triggerContentWrapper" id="triggerLabel">
|
|
5289
|
+
<slot
|
|
5290
|
+
name="trigger"
|
|
5291
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5036
5292
|
</div>
|
|
5037
|
-
${this.chevron
|
|
5293
|
+
${this.chevron ? u`
|
|
5038
5294
|
<div
|
|
5039
5295
|
id="showStateIcon"
|
|
5040
5296
|
class="chevron"
|
|
@@ -5055,11 +5311,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5055
5311
|
<div id="bibSizer" part="size"></div>
|
|
5056
5312
|
<${this.dropdownBibTag}
|
|
5057
5313
|
id="bib"
|
|
5314
|
+
shape="${this.shape}"
|
|
5058
5315
|
?data-show="${this.isPopoverVisible}"
|
|
5059
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5060
|
-
?common="${this.common}"
|
|
5061
|
-
?rounded="${this.common || this.rounded}"
|
|
5062
|
-
?inset="${this.common || this.inset}">
|
|
5316
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
5063
5317
|
<div class="slotContent">
|
|
5064
5318
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5065
5319
|
</div>
|
|
@@ -5074,62 +5328,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5074
5328
|
* @returns {html} - Returns HTML for the classic layout.
|
|
5075
5329
|
*/
|
|
5076
5330
|
renderLayoutClassic() {
|
|
5331
|
+
// TODO: check with Doug why this was never used?
|
|
5332
|
+
const helpTextClasses = {
|
|
5333
|
+
'helpText': true
|
|
5334
|
+
};
|
|
5077
5335
|
|
|
5078
5336
|
return u`
|
|
5079
|
-
|
|
5080
|
-
<div
|
|
5081
|
-
id="trigger"
|
|
5082
|
-
class="trigger"
|
|
5083
|
-
part="trigger"
|
|
5084
|
-
tabindex="${this.tabIndex}"
|
|
5085
|
-
?showBorder="${this.showTriggerBorders}"
|
|
5086
|
-
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5087
|
-
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5088
|
-
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5089
|
-
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5090
|
-
>
|
|
5091
|
-
<div class="triggerContentWrapper">
|
|
5092
|
-
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
5093
|
-
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
5094
|
-
</label>
|
|
5095
|
-
<div class="triggerContent">
|
|
5096
|
-
<slot
|
|
5097
|
-
name="trigger"
|
|
5098
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5099
|
-
</div>
|
|
5100
|
-
</div>
|
|
5101
|
-
${this.chevron || this.common ? u`
|
|
5102
|
-
<div
|
|
5103
|
-
id="showStateIcon"
|
|
5104
|
-
part="chevron">
|
|
5105
|
-
<${this.iconTag}
|
|
5106
|
-
category="interface"
|
|
5107
|
-
name="chevron-down"
|
|
5108
|
-
?onDark="${this.onDark}"
|
|
5109
|
-
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
5110
|
-
>
|
|
5111
|
-
</${this.iconTag}>
|
|
5112
|
-
</div>
|
|
5113
|
-
` : undefined }
|
|
5114
|
-
</div>
|
|
5115
|
-
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
5116
|
-
<slot name="helpText"></slot>
|
|
5117
|
-
</${this.helpTextTag}>
|
|
5118
|
-
|
|
5119
|
-
<div id="bibSizer" part="size"></div>
|
|
5120
|
-
<${this.dropdownBibTag}
|
|
5121
|
-
id="bib"
|
|
5122
|
-
?data-show="${this.isPopoverVisible}"
|
|
5123
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
5124
|
-
?common="${this.common}"
|
|
5125
|
-
?rounded="${this.common || this.rounded}"
|
|
5126
|
-
?inset="${this.common || this.inset}"
|
|
5127
|
-
>
|
|
5128
|
-
<div class="slotContent">
|
|
5129
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5130
|
-
</div>
|
|
5131
|
-
</${this.dropdownBibTag}>
|
|
5132
|
-
</div>
|
|
5337
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5133
5338
|
`;
|
|
5134
5339
|
}
|
|
5135
5340
|
|
|
@@ -5197,9 +5402,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5197
5402
|
|
|
5198
5403
|
var dropdownVersion = '3.0.0';
|
|
5199
5404
|
|
|
5200
|
-
var colorCss$
|
|
5405
|
+
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)}`;
|
|
5201
5406
|
|
|
5202
|
-
var styleCss$
|
|
5407
|
+
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)}`;
|
|
5203
5408
|
|
|
5204
5409
|
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)}`;
|
|
5205
5410
|
|
|
@@ -5210,7 +5415,7 @@ var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
5210
5415
|
|
|
5211
5416
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5212
5417
|
|
|
5213
|
-
let AuroLibraryRuntimeUtils$
|
|
5418
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
5214
5419
|
|
|
5215
5420
|
/* eslint-disable jsdoc/require-param */
|
|
5216
5421
|
|
|
@@ -5242,77 +5447,1171 @@ let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
|
5242
5447
|
) {
|
|
5243
5448
|
return __Closest(base);
|
|
5244
5449
|
}
|
|
5245
|
-
/* eslint-enable jsdoc/require-param */
|
|
5450
|
+
/* eslint-enable jsdoc/require-param */
|
|
5451
|
+
|
|
5452
|
+
/**
|
|
5453
|
+
* 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.
|
|
5454
|
+
* @param {Object} elem - The element to check.
|
|
5455
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5456
|
+
* @returns {void}
|
|
5457
|
+
*/
|
|
5458
|
+
handleComponentTagRename(elem, tagName) {
|
|
5459
|
+
const tag = tagName.toLowerCase();
|
|
5460
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5461
|
+
|
|
5462
|
+
if (elemTag !== tag) {
|
|
5463
|
+
elem.setAttribute(tag, true);
|
|
5464
|
+
}
|
|
5465
|
+
}
|
|
5466
|
+
|
|
5467
|
+
/**
|
|
5468
|
+
* Validates if an element is a specific Auro component.
|
|
5469
|
+
* @param {Object} elem - The element to validate.
|
|
5470
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5471
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5472
|
+
*/
|
|
5473
|
+
elementMatch(elem, tagName) {
|
|
5474
|
+
const tag = tagName.toLowerCase();
|
|
5475
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5476
|
+
|
|
5477
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5478
|
+
}
|
|
5479
|
+
};
|
|
5480
|
+
|
|
5481
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5482
|
+
// See LICENSE in the project root for license information.
|
|
5483
|
+
|
|
5484
|
+
|
|
5485
|
+
class AuroDependencyVersioning {
|
|
5486
|
+
|
|
5487
|
+
/**
|
|
5488
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5489
|
+
* @private
|
|
5490
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5491
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5492
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5493
|
+
*/
|
|
5494
|
+
generateElementName(baseName, version) {
|
|
5495
|
+
let result = baseName;
|
|
5496
|
+
|
|
5497
|
+
result += '-';
|
|
5498
|
+
result += version.replace(/[.]/g, '_');
|
|
5499
|
+
|
|
5500
|
+
return result;
|
|
5501
|
+
}
|
|
5502
|
+
|
|
5503
|
+
/**
|
|
5504
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5505
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5506
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5507
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5508
|
+
*/
|
|
5509
|
+
generateTag(baseName, version, tagClass) {
|
|
5510
|
+
const elementName = this.generateElementName(baseName, version);
|
|
5511
|
+
const tag = i`${s(elementName)}`;
|
|
5512
|
+
|
|
5513
|
+
if (!customElements.get(elementName)) {
|
|
5514
|
+
customElements.define(elementName, class extends tagClass {});
|
|
5515
|
+
}
|
|
5516
|
+
|
|
5517
|
+
return tag;
|
|
5518
|
+
}
|
|
5519
|
+
}
|
|
5520
|
+
|
|
5521
|
+
/**
|
|
5522
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
5523
|
+
*/
|
|
5524
|
+
const _observers = new WeakMap();
|
|
5525
|
+
|
|
5526
|
+
/**
|
|
5527
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
5528
|
+
* Structure: {
|
|
5529
|
+
* host: {
|
|
5530
|
+
* matchers: Set<Function>,
|
|
5531
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
5532
|
+
* }
|
|
5533
|
+
* }
|
|
5534
|
+
*/
|
|
5535
|
+
const _transportConfig = new WeakMap();
|
|
5536
|
+
|
|
5537
|
+
/**
|
|
5538
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
5539
|
+
*
|
|
5540
|
+
* @param {Object} params - The parameters for the function.
|
|
5541
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
5542
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5543
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
5544
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
5545
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
5546
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
5547
|
+
*/
|
|
5548
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
5549
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
5550
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
5551
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
5552
|
+
}
|
|
5553
|
+
|
|
5554
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
5555
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
5556
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
5557
|
+
}
|
|
5558
|
+
|
|
5559
|
+
// Guard Clause: Ensure match is a function
|
|
5560
|
+
if (typeof match !== 'function') {
|
|
5561
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
5562
|
+
}
|
|
5563
|
+
|
|
5564
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
5565
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
5566
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
5567
|
+
}
|
|
5568
|
+
|
|
5569
|
+
// Register this transport and get cleanup function
|
|
5570
|
+
return _registerTransport({
|
|
5571
|
+
host,
|
|
5572
|
+
target,
|
|
5573
|
+
matcher: match,
|
|
5574
|
+
removeOriginal
|
|
5575
|
+
});
|
|
5576
|
+
};
|
|
5577
|
+
|
|
5578
|
+
/**
|
|
5579
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
5580
|
+
*
|
|
5581
|
+
* @param {Object} params - The parameters object.
|
|
5582
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
5583
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
5584
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
5585
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
5586
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
5587
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
5588
|
+
* @private
|
|
5589
|
+
*/
|
|
5590
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5591
|
+
// Initialize config for this host if it doesn't exist
|
|
5592
|
+
if (!_transportConfig.has(host)) {
|
|
5593
|
+
_transportConfig.set(host, {
|
|
5594
|
+
matchers: new Set(),
|
|
5595
|
+
targets: new Map()
|
|
5596
|
+
});
|
|
5597
|
+
}
|
|
5598
|
+
|
|
5599
|
+
const config = _transportConfig.get(host);
|
|
5600
|
+
|
|
5601
|
+
// Add the matcher to the set of matchers for this host
|
|
5602
|
+
config.matchers.add(matcher);
|
|
5603
|
+
|
|
5604
|
+
// Initialize target entry if it doesn't exist
|
|
5605
|
+
if (!config.targets.has(target)) {
|
|
5606
|
+
config.targets.set(target, new Map());
|
|
5607
|
+
}
|
|
5608
|
+
|
|
5609
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
5610
|
+
config.targets.get(target).set(matcher, {
|
|
5611
|
+
removeOriginal,
|
|
5612
|
+
currentAttributes: new Map()
|
|
5613
|
+
});
|
|
5614
|
+
|
|
5615
|
+
// Perform initial attribute transport
|
|
5616
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
5617
|
+
|
|
5618
|
+
// Attach observer
|
|
5619
|
+
_attachObserver(host);
|
|
5620
|
+
|
|
5621
|
+
// Return cleanup function and utility functions
|
|
5622
|
+
return {
|
|
5623
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
5624
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
5625
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
5626
|
+
}
|
|
5627
|
+
};
|
|
5628
|
+
|
|
5629
|
+
/**
|
|
5630
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
5631
|
+
*
|
|
5632
|
+
* @param {HTMLElement} host - The host element
|
|
5633
|
+
* @param {HTMLElement} target - The target element
|
|
5634
|
+
* @param {Function} matcher - The matcher function
|
|
5635
|
+
* @private
|
|
5636
|
+
*/
|
|
5637
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
5638
|
+
const config = _transportConfig.get(host);
|
|
5639
|
+
if (!config) return;
|
|
5640
|
+
|
|
5641
|
+
// Remove this matcher from this target
|
|
5642
|
+
const targetMatchers = config.targets.get(target);
|
|
5643
|
+
if (targetMatchers) {
|
|
5644
|
+
targetMatchers.delete(matcher);
|
|
5645
|
+
|
|
5646
|
+
// If this target has no more matchers, remove it
|
|
5647
|
+
if (targetMatchers.size === 0) {
|
|
5648
|
+
config.targets.delete(target);
|
|
5649
|
+
}
|
|
5650
|
+
}
|
|
5651
|
+
|
|
5652
|
+
// Check if this matcher is still used by any target
|
|
5653
|
+
let matcherStillUsed = false;
|
|
5654
|
+
for (const matcherMap of config.targets.values()) {
|
|
5655
|
+
if (matcherMap.has(matcher)) {
|
|
5656
|
+
matcherStillUsed = true;
|
|
5657
|
+
break;
|
|
5658
|
+
}
|
|
5659
|
+
}
|
|
5660
|
+
|
|
5661
|
+
// If not used anymore, remove from matchers set
|
|
5662
|
+
if (!matcherStillUsed) {
|
|
5663
|
+
config.matchers.delete(matcher);
|
|
5664
|
+
}
|
|
5665
|
+
|
|
5666
|
+
// If no more targets or matchers, detach observer
|
|
5667
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
5668
|
+
_detachObserver(host);
|
|
5669
|
+
}
|
|
5670
|
+
};
|
|
5671
|
+
|
|
5672
|
+
/**
|
|
5673
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
5674
|
+
*
|
|
5675
|
+
* @param {Object} params - The parameters object.
|
|
5676
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
5677
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
5678
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
5679
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
5680
|
+
* @returns {void}
|
|
5681
|
+
* @private
|
|
5682
|
+
*/
|
|
5683
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
5684
|
+
// Get a list of all matching attributes on the host element and their values
|
|
5685
|
+
const matchingAttributes = host.getAttributeNames()
|
|
5686
|
+
.filter(attr => matcher(attr))
|
|
5687
|
+
.reduce((acc, attr) => {
|
|
5688
|
+
acc[attr] = host.getAttribute(attr);
|
|
5689
|
+
return acc;
|
|
5690
|
+
}, {});
|
|
5691
|
+
|
|
5692
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
5693
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
5694
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
5695
|
+
target.setAttribute(key, value);
|
|
5696
|
+
if (removeOriginal) {
|
|
5697
|
+
host.removeAttribute(key);
|
|
5698
|
+
}
|
|
5699
|
+
});
|
|
5700
|
+
};
|
|
5701
|
+
|
|
5702
|
+
/**
|
|
5703
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
5704
|
+
*
|
|
5705
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
5706
|
+
* @returns {MutationObserver} The observer instance.
|
|
5707
|
+
* @private
|
|
5708
|
+
*/
|
|
5709
|
+
const _attachObserver = (host) => {
|
|
5710
|
+
// If an observer for this host already exists, return it
|
|
5711
|
+
if (_observers.has(host)) {
|
|
5712
|
+
return _observers.get(host);
|
|
5713
|
+
}
|
|
5714
|
+
|
|
5715
|
+
// Create a new MutationObserver
|
|
5716
|
+
const observer = new MutationObserver((mutations) => {
|
|
5717
|
+
const config = _transportConfig.get(host);
|
|
5718
|
+
if (!config) return;
|
|
5719
|
+
|
|
5720
|
+
// For each mutation affecting attributes
|
|
5721
|
+
mutations
|
|
5722
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
5723
|
+
.forEach(mutation => {
|
|
5724
|
+
const attributeName = mutation.attributeName;
|
|
5725
|
+
|
|
5726
|
+
// Find matchers that care about this attribute
|
|
5727
|
+
for (const matcher of config.matchers) {
|
|
5728
|
+
if (matcher(attributeName)) {
|
|
5729
|
+
// For each target that uses this matcher
|
|
5730
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
5731
|
+
if (matcherConfigs.has(matcher)) {
|
|
5732
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
5733
|
+
_transportAttributes({
|
|
5734
|
+
host,
|
|
5735
|
+
target,
|
|
5736
|
+
matcher,
|
|
5737
|
+
removeOriginal
|
|
5738
|
+
});
|
|
5739
|
+
}
|
|
5740
|
+
}
|
|
5741
|
+
}
|
|
5742
|
+
}
|
|
5743
|
+
});
|
|
5744
|
+
});
|
|
5745
|
+
|
|
5746
|
+
// Start observing attribute changes
|
|
5747
|
+
observer.observe(host, { attributes: true });
|
|
5748
|
+
|
|
5749
|
+
// Store the observer
|
|
5750
|
+
_observers.set(host, observer);
|
|
5751
|
+
|
|
5752
|
+
return observer;
|
|
5753
|
+
};
|
|
5754
|
+
|
|
5755
|
+
/**
|
|
5756
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
5757
|
+
*
|
|
5758
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
5759
|
+
* @private
|
|
5760
|
+
*/
|
|
5761
|
+
const _detachObserver = (host) => {
|
|
5762
|
+
if (_observers.has(host)) {
|
|
5763
|
+
const observer = _observers.get(host);
|
|
5764
|
+
observer.disconnect();
|
|
5765
|
+
_observers.delete(host);
|
|
5766
|
+
}
|
|
5767
|
+
|
|
5768
|
+
// Clean up the transport config as well
|
|
5769
|
+
if (_transportConfig.has(host)) {
|
|
5770
|
+
_transportConfig.delete(host);
|
|
5771
|
+
}
|
|
5772
|
+
};
|
|
5773
|
+
|
|
5774
|
+
/**
|
|
5775
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
5776
|
+
* @param {HTMLElement} host - The host element
|
|
5777
|
+
* @param {HTMLElement} target - The target element
|
|
5778
|
+
* @param {Function} matcher - The matcher function
|
|
5779
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
5780
|
+
* @private
|
|
5781
|
+
*/
|
|
5782
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
5783
|
+
const config = _transportConfig.get(host);
|
|
5784
|
+
if (!config) return undefined;
|
|
5785
|
+
|
|
5786
|
+
const targetMatchers = config.targets.get(target);
|
|
5787
|
+
if (!targetMatchers) return undefined;
|
|
5788
|
+
|
|
5789
|
+
return targetMatchers.get(matcher);
|
|
5790
|
+
};
|
|
5791
|
+
|
|
5792
|
+
/**
|
|
5793
|
+
* Sets an observed attribute value
|
|
5794
|
+
* @param {HTMLElement} host - The host element
|
|
5795
|
+
* @param {HTMLElement} target - The target element
|
|
5796
|
+
* @param {Function} matcher - The matcher function
|
|
5797
|
+
* @param {string} key - The attribute name
|
|
5798
|
+
* @param {string} value - The attribute value
|
|
5799
|
+
* @private
|
|
5800
|
+
*/
|
|
5801
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
5802
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5803
|
+
if (matcherConfig) {
|
|
5804
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
5805
|
+
}
|
|
5806
|
+
};
|
|
5807
|
+
|
|
5808
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
5809
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5810
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
5811
|
+
return undefined;
|
|
5812
|
+
};
|
|
5813
|
+
|
|
5814
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
5815
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
5816
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
5817
|
+
return [];
|
|
5818
|
+
};
|
|
5819
|
+
|
|
5820
|
+
const _matchers = {
|
|
5821
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
5822
|
+
'role': attr => attr.match(/^role$/)
|
|
5823
|
+
};
|
|
5824
|
+
|
|
5825
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
5826
|
+
return transportAttributes({
|
|
5827
|
+
host,
|
|
5828
|
+
target,
|
|
5829
|
+
match: attr => {
|
|
5830
|
+
for (const key in _matchers) {
|
|
5831
|
+
if (_matchers[key](attr)) return true;
|
|
5832
|
+
}
|
|
5833
|
+
return false;
|
|
5834
|
+
},
|
|
5835
|
+
removeOriginal
|
|
5836
|
+
});
|
|
5837
|
+
};
|
|
5838
|
+
|
|
5839
|
+
let AuroElement$1 = class AuroElement extends i$2 {
|
|
5840
|
+
|
|
5841
|
+
/**
|
|
5842
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
5843
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
5844
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
5845
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
5846
|
+
* @private
|
|
5847
|
+
*/
|
|
5848
|
+
attributeWatcher;
|
|
5849
|
+
|
|
5850
|
+
static get properties() {
|
|
5851
|
+
return {
|
|
5852
|
+
|
|
5853
|
+
/**
|
|
5854
|
+
* Defines the layout of an element.
|
|
5855
|
+
* @default {'default'}
|
|
5856
|
+
*/
|
|
5857
|
+
layout: {
|
|
5858
|
+
type: String,
|
|
5859
|
+
attribute: "layout",
|
|
5860
|
+
reflect: true
|
|
5861
|
+
},
|
|
5862
|
+
|
|
5863
|
+
/**
|
|
5864
|
+
* Defines the shape of an element.
|
|
5865
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
5866
|
+
* @default {'default'}
|
|
5867
|
+
*/
|
|
5868
|
+
shape: {
|
|
5869
|
+
type: String,
|
|
5870
|
+
attribute: "shape",
|
|
5871
|
+
reflect: true
|
|
5872
|
+
},
|
|
5873
|
+
|
|
5874
|
+
/**
|
|
5875
|
+
* Defines the size of an element.
|
|
5876
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
5877
|
+
* @default {'md'}
|
|
5878
|
+
*/
|
|
5879
|
+
size: {
|
|
5880
|
+
type: String,
|
|
5881
|
+
attribute: "size",
|
|
5882
|
+
reflect: true
|
|
5883
|
+
},
|
|
5884
|
+
|
|
5885
|
+
/**
|
|
5886
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
5887
|
+
* @default {false}
|
|
5888
|
+
*/
|
|
5889
|
+
onDark: {
|
|
5890
|
+
type: Boolean,
|
|
5891
|
+
attribute: "ondark",
|
|
5892
|
+
reflect: true
|
|
5893
|
+
},
|
|
5894
|
+
|
|
5895
|
+
/**
|
|
5896
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
5897
|
+
* This is used to apply layout and shape classes dynamically.
|
|
5898
|
+
* @type {HTMLElement|null}
|
|
5899
|
+
* @default {null}
|
|
5900
|
+
* @private
|
|
5901
|
+
*/
|
|
5902
|
+
wrapper: {
|
|
5903
|
+
attribute: false,
|
|
5904
|
+
reflect: false
|
|
5905
|
+
}
|
|
5906
|
+
};
|
|
5907
|
+
}
|
|
5908
|
+
|
|
5909
|
+
|
|
5910
|
+
|
|
5911
|
+
resetShapeClasses() {
|
|
5912
|
+
if (this.shape && this.size) {
|
|
5913
|
+
|
|
5914
|
+
if (this.wrapper) {
|
|
5915
|
+
this.wrapper.classList.forEach((className) => {
|
|
5916
|
+
if (className.startsWith('shape-')) {
|
|
5917
|
+
this.wrapper.classList.remove(className);
|
|
5918
|
+
}
|
|
5919
|
+
});
|
|
5920
|
+
|
|
5921
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
5922
|
+
}
|
|
5923
|
+
}
|
|
5924
|
+
}
|
|
5925
|
+
|
|
5926
|
+
resetLayoutClasses() {
|
|
5927
|
+
if (this.layout) {
|
|
5928
|
+
if (this.wrapper) {
|
|
5929
|
+
this.wrapper.classList.forEach((className) => {
|
|
5930
|
+
if (className.startsWith('layout-')) {
|
|
5931
|
+
this.wrapper.classList.remove(className);
|
|
5932
|
+
}
|
|
5933
|
+
});
|
|
5934
|
+
|
|
5935
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
5936
|
+
}
|
|
5937
|
+
}
|
|
5938
|
+
}
|
|
5939
|
+
|
|
5940
|
+
updateComponentArchitecture() {
|
|
5941
|
+
this.resetLayoutClasses();
|
|
5942
|
+
this.resetShapeClasses();
|
|
5943
|
+
}
|
|
5944
|
+
|
|
5945
|
+
updated(changedProperties) {
|
|
5946
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
5947
|
+
this.updateComponentArchitecture();
|
|
5948
|
+
}
|
|
5949
|
+
}
|
|
5950
|
+
|
|
5951
|
+
firstUpdated() {
|
|
5952
|
+
super.firstUpdated();
|
|
5953
|
+
|
|
5954
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
5955
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
5956
|
+
|
|
5957
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
5958
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
5959
|
+
}
|
|
5960
|
+
|
|
5961
|
+
disconnectedCallback() {
|
|
5962
|
+
super.disconnectedCallback();
|
|
5963
|
+
|
|
5964
|
+
// Cleanup the ARIA observer if it exists
|
|
5965
|
+
if (this.attributeWatcher) {
|
|
5966
|
+
this.attributeWatcher.cleanup();
|
|
5967
|
+
this.attributeWatcher = null;
|
|
5968
|
+
}
|
|
5969
|
+
}
|
|
5970
|
+
|
|
5971
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
5972
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
5973
|
+
render() {
|
|
5974
|
+
try {
|
|
5975
|
+
return this.renderLayout();
|
|
5976
|
+
} catch (error) {
|
|
5977
|
+
// failed to get the defined layout
|
|
5978
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
5979
|
+
|
|
5980
|
+
// fallback to the default layout
|
|
5981
|
+
return this.getLayout('default');
|
|
5982
|
+
}
|
|
5983
|
+
}
|
|
5984
|
+
};
|
|
5985
|
+
|
|
5986
|
+
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}`;
|
|
5987
|
+
|
|
5988
|
+
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)}`;
|
|
5989
|
+
|
|
5990
|
+
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}`;
|
|
5991
|
+
|
|
5992
|
+
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}`;
|
|
5993
|
+
|
|
5994
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5995
|
+
// See LICENSE in the project root for license information.
|
|
5996
|
+
|
|
5997
|
+
// ---------------------------------------------------------------------
|
|
5998
|
+
|
|
5999
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6000
|
+
|
|
6001
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
6002
|
+
|
|
6003
|
+
/* eslint-disable jsdoc/require-param */
|
|
6004
|
+
|
|
6005
|
+
/**
|
|
6006
|
+
* This will register a new custom element with the browser.
|
|
6007
|
+
* @param {String} name - The name of the custom element.
|
|
6008
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6009
|
+
* @returns {void}
|
|
6010
|
+
*/
|
|
6011
|
+
registerComponent(name, componentClass) {
|
|
6012
|
+
if (!customElements.get(name)) {
|
|
6013
|
+
customElements.define(name, class extends componentClass {});
|
|
6014
|
+
}
|
|
6015
|
+
}
|
|
6016
|
+
|
|
6017
|
+
/**
|
|
6018
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6019
|
+
* @returns {void}
|
|
6020
|
+
*/
|
|
6021
|
+
closestElement(
|
|
6022
|
+
selector, // selector like in .closest()
|
|
6023
|
+
base = this, // extra functionality to skip a parent
|
|
6024
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6025
|
+
!el || el === document || el === window
|
|
6026
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6027
|
+
: found
|
|
6028
|
+
? found // found a selector INside this element
|
|
6029
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6030
|
+
) {
|
|
6031
|
+
return __Closest(base);
|
|
6032
|
+
}
|
|
6033
|
+
/* eslint-enable jsdoc/require-param */
|
|
6034
|
+
|
|
6035
|
+
/**
|
|
6036
|
+
* 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.
|
|
6037
|
+
* @param {Object} elem - The element to check.
|
|
6038
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6039
|
+
* @returns {void}
|
|
6040
|
+
*/
|
|
6041
|
+
handleComponentTagRename(elem, tagName) {
|
|
6042
|
+
const tag = tagName.toLowerCase();
|
|
6043
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6044
|
+
|
|
6045
|
+
if (elemTag !== tag) {
|
|
6046
|
+
elem.setAttribute(tag, true);
|
|
6047
|
+
}
|
|
6048
|
+
}
|
|
6049
|
+
|
|
6050
|
+
/**
|
|
6051
|
+
* Validates if an element is a specific Auro component.
|
|
6052
|
+
* @param {Object} elem - The element to validate.
|
|
6053
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6054
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6055
|
+
*/
|
|
6056
|
+
elementMatch(elem, tagName) {
|
|
6057
|
+
const tag = tagName.toLowerCase();
|
|
6058
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6059
|
+
|
|
6060
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6061
|
+
}
|
|
6062
|
+
};
|
|
6063
|
+
|
|
6064
|
+
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}}`;
|
|
6065
|
+
|
|
6066
|
+
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}`;
|
|
6067
|
+
|
|
6068
|
+
var tokensCss$1$1 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
6069
|
+
|
|
6070
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6071
|
+
// See LICENSE in the project root for license information.
|
|
6072
|
+
|
|
6073
|
+
|
|
6074
|
+
class AuroLoader extends i$2 {
|
|
6075
|
+
constructor() {
|
|
6076
|
+
super();
|
|
6077
|
+
|
|
6078
|
+
/**
|
|
6079
|
+
* @private
|
|
6080
|
+
*/
|
|
6081
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
6082
|
+
|
|
6083
|
+
/**
|
|
6084
|
+
* @private
|
|
6085
|
+
*/
|
|
6086
|
+
this.mdCount = 3;
|
|
6087
|
+
|
|
6088
|
+
/**
|
|
6089
|
+
* @private
|
|
6090
|
+
*/
|
|
6091
|
+
this.smCount = 2;
|
|
6092
|
+
|
|
6093
|
+
/**
|
|
6094
|
+
* @private
|
|
6095
|
+
*/
|
|
6096
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
6097
|
+
|
|
6098
|
+
this.orbit = false;
|
|
6099
|
+
this.ringworm = false;
|
|
6100
|
+
this.laser = false;
|
|
6101
|
+
this.pulse = false;
|
|
6102
|
+
}
|
|
6103
|
+
|
|
6104
|
+
// function to define props used within the scope of this component
|
|
6105
|
+
static get properties() {
|
|
6106
|
+
return {
|
|
6107
|
+
|
|
6108
|
+
/**
|
|
6109
|
+
* Sets loader to laser type.
|
|
6110
|
+
*/
|
|
6111
|
+
laser: {
|
|
6112
|
+
type: Boolean,
|
|
6113
|
+
reflect: true
|
|
6114
|
+
},
|
|
6115
|
+
|
|
6116
|
+
/**
|
|
6117
|
+
* Sets loader to orbit type.
|
|
6118
|
+
*/
|
|
6119
|
+
orbit: {
|
|
6120
|
+
type: Boolean,
|
|
6121
|
+
reflect: true
|
|
6122
|
+
},
|
|
6123
|
+
|
|
6124
|
+
/**
|
|
6125
|
+
* Sets loader to pulse type.
|
|
6126
|
+
*/
|
|
6127
|
+
pulse: {
|
|
6128
|
+
type: Boolean,
|
|
6129
|
+
reflect: true
|
|
6130
|
+
},
|
|
6131
|
+
|
|
6132
|
+
/**
|
|
6133
|
+
* Sets loader to ringworm type.
|
|
6134
|
+
*/
|
|
6135
|
+
ringworm: {
|
|
6136
|
+
type: Boolean,
|
|
6137
|
+
reflect: true
|
|
6138
|
+
}
|
|
6139
|
+
};
|
|
6140
|
+
}
|
|
6141
|
+
|
|
6142
|
+
static get styles() {
|
|
6143
|
+
return [
|
|
6144
|
+
i$5`${styleCss$2$1}`,
|
|
6145
|
+
i$5`${colorCss$1$1}`,
|
|
6146
|
+
i$5`${tokensCss$1$1}`
|
|
6147
|
+
];
|
|
6148
|
+
}
|
|
6149
|
+
|
|
6150
|
+
/**
|
|
6151
|
+
* This will register this element with the browser.
|
|
6152
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
6153
|
+
*
|
|
6154
|
+
* @example
|
|
6155
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
6156
|
+
*
|
|
6157
|
+
*/
|
|
6158
|
+
static register(name = "auro-loader") {
|
|
6159
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
6160
|
+
}
|
|
6161
|
+
|
|
6162
|
+
firstUpdated() {
|
|
6163
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
6164
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
6165
|
+
}
|
|
6166
|
+
|
|
6167
|
+
connectedCallback() {
|
|
6168
|
+
super.connectedCallback();
|
|
6169
|
+
}
|
|
6170
|
+
|
|
6171
|
+
/**
|
|
6172
|
+
* @private
|
|
6173
|
+
* @returns {Array} Numbered array for template map.
|
|
6174
|
+
*/
|
|
6175
|
+
defineTemplate() {
|
|
6176
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
6177
|
+
|
|
6178
|
+
if (this.orbit || this.laser) {
|
|
6179
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
6180
|
+
} else if (this.ringworm) {
|
|
6181
|
+
nodes = Array.from(Array(0).keys());
|
|
6182
|
+
}
|
|
6183
|
+
|
|
6184
|
+
return nodes;
|
|
6185
|
+
}
|
|
6186
|
+
|
|
6187
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
6188
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
6189
|
+
|
|
6190
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
6191
|
+
render() {
|
|
6192
|
+
return x`
|
|
6193
|
+
${this.defineTemplate().map((idx) => x`
|
|
6194
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
6195
|
+
`)}
|
|
6196
|
+
|
|
6197
|
+
<div class="no-animation body-default">Loading...</div>
|
|
6198
|
+
|
|
6199
|
+
${this.ringworm ? x`
|
|
6200
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
6201
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
6202
|
+
</svg>`
|
|
6203
|
+
: ``
|
|
6204
|
+
}
|
|
6205
|
+
`;
|
|
6206
|
+
}
|
|
6207
|
+
}
|
|
6208
|
+
|
|
6209
|
+
var loaderVersion = '5.1.0';
|
|
6210
|
+
|
|
6211
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6212
|
+
// See LICENSE in the project root for license information.
|
|
6213
|
+
|
|
6214
|
+
|
|
6215
|
+
/**
|
|
6216
|
+
* @slot - Default slot for the text of the button.
|
|
6217
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
6218
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
6219
|
+
* @csspart text - Apply CSS to text slot.
|
|
6220
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
6221
|
+
*/
|
|
6222
|
+
|
|
6223
|
+
const ICON_ONLY_SHAPES = ['circle', 'square'];
|
|
6224
|
+
|
|
6225
|
+
/**
|
|
6226
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
6227
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
6228
|
+
* @property {'default', 'rounded', 'pill', 'circle', 'square'} shape - Defines the shape of the button.
|
|
6229
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
6230
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
6231
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
6232
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
6233
|
+
*/
|
|
6234
|
+
class AuroButton extends AuroElement$1 {
|
|
6235
|
+
|
|
6236
|
+
/**
|
|
6237
|
+
* Enables form association for this element.
|
|
6238
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
6239
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
6240
|
+
*/
|
|
6241
|
+
static get formAssociated() {
|
|
6242
|
+
return true;
|
|
6243
|
+
}
|
|
6244
|
+
|
|
6245
|
+
constructor() {
|
|
6246
|
+
super();
|
|
6247
|
+
this.autofocus = false;
|
|
6248
|
+
this.disabled = false;
|
|
6249
|
+
this.loading = false;
|
|
6250
|
+
this.size = "md";
|
|
6251
|
+
this.shape = "rounded";
|
|
6252
|
+
this.onDark = false;
|
|
6253
|
+
this.fluid = false;
|
|
6254
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
6255
|
+
this.variant = 'primary';
|
|
6256
|
+
|
|
6257
|
+
// Support for HTML5 forms
|
|
6258
|
+
if (typeof this.attachInternals === 'function') {
|
|
6259
|
+
this.internals = this.attachInternals();
|
|
6260
|
+
} else {
|
|
6261
|
+
this.internals = null;
|
|
6262
|
+
|
|
6263
|
+
// eslint-disable-next-line no-console
|
|
6264
|
+
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.');
|
|
6265
|
+
}
|
|
6266
|
+
|
|
6267
|
+
/**
|
|
6268
|
+
* Generate unique names for dependency components.
|
|
6269
|
+
*/
|
|
6270
|
+
const versioning = new AuroDependencyVersioning();
|
|
6271
|
+
|
|
6272
|
+
/**
|
|
6273
|
+
* @private
|
|
6274
|
+
*/
|
|
6275
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
6276
|
+
|
|
6277
|
+
/**
|
|
6278
|
+
* @private
|
|
6279
|
+
*/
|
|
6280
|
+
this.buttonHref = undefined;
|
|
6281
|
+
|
|
6282
|
+
/**
|
|
6283
|
+
* @private
|
|
6284
|
+
*/
|
|
6285
|
+
this.buttonTarget = undefined;
|
|
6286
|
+
|
|
6287
|
+
/**
|
|
6288
|
+
* @private
|
|
6289
|
+
*/
|
|
6290
|
+
this.buttonRel = undefined;
|
|
6291
|
+
}
|
|
6292
|
+
|
|
6293
|
+
static get styles() {
|
|
6294
|
+
return [
|
|
6295
|
+
tokensCss$2$1,
|
|
6296
|
+
styleCss$3$1,
|
|
6297
|
+
colorCss$2$1,
|
|
6298
|
+
shapeSize
|
|
6299
|
+
];
|
|
6300
|
+
}
|
|
6301
|
+
|
|
6302
|
+
static get properties() {
|
|
6303
|
+
return {
|
|
6304
|
+
|
|
6305
|
+
...super.properties,
|
|
6306
|
+
|
|
6307
|
+
/**
|
|
6308
|
+
* Override layout since it isn't used in this component.
|
|
6309
|
+
* @private
|
|
6310
|
+
*/
|
|
6311
|
+
layout: {
|
|
6312
|
+
type: Boolean,
|
|
6313
|
+
attribute: false,
|
|
6314
|
+
reflect: false
|
|
6315
|
+
},
|
|
6316
|
+
|
|
6317
|
+
/**
|
|
6318
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
6319
|
+
*/
|
|
6320
|
+
autofocus: {
|
|
6321
|
+
type: Boolean,
|
|
6322
|
+
reflect: true
|
|
6323
|
+
},
|
|
6324
|
+
|
|
6325
|
+
/**
|
|
6326
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
6327
|
+
*/
|
|
6328
|
+
disabled: {
|
|
6329
|
+
type: Boolean,
|
|
6330
|
+
reflect: true
|
|
6331
|
+
},
|
|
6332
|
+
|
|
6333
|
+
/**
|
|
6334
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
6335
|
+
*/
|
|
6336
|
+
fluid: {
|
|
6337
|
+
type: Boolean,
|
|
6338
|
+
reflect: true
|
|
6339
|
+
},
|
|
6340
|
+
|
|
6341
|
+
/**
|
|
6342
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
6343
|
+
*/
|
|
6344
|
+
loading: {
|
|
6345
|
+
type: Boolean,
|
|
6346
|
+
reflect: true
|
|
6347
|
+
},
|
|
6348
|
+
|
|
6349
|
+
/**
|
|
6350
|
+
* 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.
|
|
6351
|
+
*/
|
|
6352
|
+
loadingText: {
|
|
6353
|
+
type: String
|
|
6354
|
+
},
|
|
6355
|
+
|
|
6356
|
+
/**
|
|
6357
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6358
|
+
*/
|
|
6359
|
+
tIndex: {
|
|
6360
|
+
type: String,
|
|
6361
|
+
reflect: true
|
|
6362
|
+
},
|
|
6363
|
+
|
|
6364
|
+
/**
|
|
6365
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6366
|
+
* Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
|
|
6367
|
+
* Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`.
|
|
6368
|
+
*/
|
|
6369
|
+
tabindex: {
|
|
6370
|
+
type: String,
|
|
6371
|
+
reflect: false
|
|
6372
|
+
},
|
|
6373
|
+
|
|
6374
|
+
/**
|
|
6375
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6376
|
+
*/
|
|
6377
|
+
title: {
|
|
6378
|
+
type: String,
|
|
6379
|
+
reflect: true
|
|
6380
|
+
},
|
|
6381
|
+
|
|
6382
|
+
/**
|
|
6383
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
6384
|
+
*/
|
|
6385
|
+
type: {
|
|
6386
|
+
type: String,
|
|
6387
|
+
reflect: true
|
|
6388
|
+
},
|
|
6389
|
+
|
|
6390
|
+
/**
|
|
6391
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
6392
|
+
*/
|
|
6393
|
+
value: {
|
|
6394
|
+
type: String,
|
|
6395
|
+
reflect: true
|
|
6396
|
+
},
|
|
6397
|
+
|
|
6398
|
+
/**
|
|
6399
|
+
* Sets button variant option.
|
|
6400
|
+
* @default primary
|
|
6401
|
+
*/
|
|
6402
|
+
variant: {
|
|
6403
|
+
type: String,
|
|
6404
|
+
reflect: true
|
|
6405
|
+
},
|
|
6406
|
+
|
|
6407
|
+
/**
|
|
6408
|
+
* @private
|
|
6409
|
+
*/
|
|
6410
|
+
buttonHref: {
|
|
6411
|
+
type: String,
|
|
6412
|
+
},
|
|
6413
|
+
|
|
6414
|
+
/**
|
|
6415
|
+
* @private
|
|
6416
|
+
*/
|
|
6417
|
+
buttonTarget: {
|
|
6418
|
+
type: String,
|
|
6419
|
+
},
|
|
6420
|
+
|
|
6421
|
+
/**
|
|
6422
|
+
* @private
|
|
6423
|
+
*/
|
|
6424
|
+
buttonRel: {
|
|
6425
|
+
type: String,
|
|
6426
|
+
},
|
|
6427
|
+
};
|
|
6428
|
+
}
|
|
6429
|
+
|
|
6430
|
+
/**
|
|
6431
|
+
* This will register this element with the browser.
|
|
6432
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
6433
|
+
*
|
|
6434
|
+
* @example
|
|
6435
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
6436
|
+
*
|
|
6437
|
+
*/
|
|
6438
|
+
static register(name = "auro-button") {
|
|
6439
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
6440
|
+
}
|
|
6441
|
+
|
|
6442
|
+
/**
|
|
6443
|
+
* Internal method to apply focus to the HTML5 button.
|
|
6444
|
+
* @private
|
|
6445
|
+
* @returns {void}
|
|
6446
|
+
*/
|
|
6447
|
+
focus() {
|
|
6448
|
+
this.renderRoot.querySelector('button').focus();
|
|
6449
|
+
}
|
|
6450
|
+
|
|
6451
|
+
/**
|
|
6452
|
+
* Submits the form that this button is associated with.
|
|
6453
|
+
* @private
|
|
6454
|
+
* @returns {void}
|
|
6455
|
+
*/
|
|
6456
|
+
surfaceSubmitEvent() {
|
|
6457
|
+
if (this.form) {
|
|
6458
|
+
this.form.requestSubmit();
|
|
6459
|
+
}
|
|
6460
|
+
}
|
|
6461
|
+
|
|
6462
|
+
/**
|
|
6463
|
+
* Returns the form element that this button is associated with.
|
|
6464
|
+
* @private
|
|
6465
|
+
* @returns {HTMLFormElement | null}
|
|
6466
|
+
*/
|
|
6467
|
+
get form() {
|
|
6468
|
+
return this.internals ? this.internals.form : null;
|
|
6469
|
+
}
|
|
6470
|
+
|
|
6471
|
+
/**
|
|
6472
|
+
* @private
|
|
6473
|
+
* @returns {Boolean}
|
|
6474
|
+
*/
|
|
6475
|
+
get showText() {
|
|
6476
|
+
return !ICON_ONLY_SHAPES.includes(this.shape);
|
|
6477
|
+
}
|
|
5246
6478
|
|
|
5247
6479
|
/**
|
|
5248
|
-
*
|
|
5249
|
-
* @
|
|
5250
|
-
* @
|
|
5251
|
-
* @returns {void}
|
|
6480
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
6481
|
+
* @returns {string | undefined}
|
|
6482
|
+
* @private
|
|
5252
6483
|
*/
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
6484
|
+
get currentAriaLabel() {
|
|
6485
|
+
if (!this.attributeWatcher) return undefined;
|
|
5256
6486
|
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
}
|
|
6487
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
6488
|
+
return ariaLabel || undefined;
|
|
5260
6489
|
}
|
|
5261
6490
|
|
|
5262
6491
|
/**
|
|
5263
|
-
*
|
|
5264
|
-
* @
|
|
5265
|
-
* @
|
|
5266
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6492
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
6493
|
+
* @returns {string | undefined}
|
|
6494
|
+
* @private
|
|
5267
6495
|
*/
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
6496
|
+
get currentAriaLabelledBy() {
|
|
6497
|
+
if (!this.attributeWatcher) return undefined;
|
|
5271
6498
|
|
|
5272
|
-
|
|
6499
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
6500
|
+
return ariaLabelledBy || undefined;
|
|
5273
6501
|
}
|
|
5274
|
-
};
|
|
5275
6502
|
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
6503
|
+
/**
|
|
6504
|
+
* Whether or not the button is set to an icon-only shape.
|
|
6505
|
+
* @returns {boolean} - True if the button is icon-only, false otherwise.
|
|
6506
|
+
* @private
|
|
6507
|
+
*/
|
|
6508
|
+
get iconOnly() {
|
|
6509
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
6510
|
+
}
|
|
5281
6511
|
|
|
5282
6512
|
/**
|
|
5283
|
-
*
|
|
6513
|
+
* Gets a class name for the font size based on the button's size and shape.
|
|
6514
|
+
* @returns {string} - The font size class name.
|
|
5284
6515
|
* @private
|
|
5285
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5286
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5287
|
-
* @returns {string} - Unique string to be used for naming.
|
|
5288
6516
|
*/
|
|
5289
|
-
|
|
5290
|
-
let result = baseName;
|
|
6517
|
+
getFontSize() {
|
|
5291
6518
|
|
|
5292
|
-
|
|
5293
|
-
|
|
6519
|
+
// Size map for standard buttons
|
|
6520
|
+
const standardButtonSizeMap = {
|
|
6521
|
+
xs: 'body-xs',
|
|
6522
|
+
sm: 'body-sm',
|
|
6523
|
+
md: 'body-default',
|
|
6524
|
+
lg: 'body-lg',
|
|
6525
|
+
xl: 'body-lg'
|
|
6526
|
+
};
|
|
5294
6527
|
|
|
5295
|
-
|
|
6528
|
+
// Size map for icon-only buttons
|
|
6529
|
+
const iconOnlyButtonSizeMap = {
|
|
6530
|
+
xs: 'heading-xs',
|
|
6531
|
+
sm: 'heading-sm',
|
|
6532
|
+
md: 'heading-sm',
|
|
6533
|
+
lg: 'heading-md',
|
|
6534
|
+
xl: 'heading-lg'
|
|
6535
|
+
};
|
|
6536
|
+
|
|
6537
|
+
// Determine which map to use based on the shape
|
|
6538
|
+
const sizeMap = this.iconOnly ? iconOnlyButtonSizeMap : standardButtonSizeMap;
|
|
6539
|
+
|
|
6540
|
+
// Return the font size based on the button size and shape
|
|
6541
|
+
return sizeMap[this.size] || 'body-default';
|
|
5296
6542
|
}
|
|
5297
6543
|
|
|
5298
6544
|
/**
|
|
5299
|
-
*
|
|
5300
|
-
* @
|
|
5301
|
-
* @
|
|
5302
|
-
* @returns {string} - Unique string to be used for naming.
|
|
6545
|
+
* Renders the default layout for the button.
|
|
6546
|
+
* @returns {TemplateResult}
|
|
6547
|
+
* @private
|
|
5303
6548
|
*/
|
|
5304
|
-
|
|
5305
|
-
const elementName = this.generateElementName(baseName, version);
|
|
5306
|
-
const tag = i`${s(elementName)}`;
|
|
6549
|
+
renderLayoutDefault() {
|
|
5307
6550
|
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
6551
|
+
const fontSize = this.getFontSize();
|
|
6552
|
+
const tag = this.buttonHref ? i`a` : i`button`;
|
|
6553
|
+
const part = this.buttonHref ? 'link' : 'button';
|
|
5311
6554
|
|
|
5312
|
-
|
|
6555
|
+
const classes = {
|
|
6556
|
+
"auro-button": true,
|
|
6557
|
+
"inset": this.showText,
|
|
6558
|
+
wrapper: true,
|
|
6559
|
+
loading: this.loading,
|
|
6560
|
+
[`${fontSize}`]: true,
|
|
6561
|
+
|
|
6562
|
+
// These remove the default borders so we can handle focus borders ourselves
|
|
6563
|
+
'simple': !['secondary'].includes(this.variant),
|
|
6564
|
+
'thin': ['secondary'].includes(this.variant),
|
|
6565
|
+
};
|
|
6566
|
+
|
|
6567
|
+
const contentClasses = {
|
|
6568
|
+
"contentWrapper": true,
|
|
6569
|
+
"util_displayHiddenVisually": this.loading
|
|
6570
|
+
};
|
|
6571
|
+
|
|
6572
|
+
return u`
|
|
6573
|
+
<${tag}
|
|
6574
|
+
part="${part}"
|
|
6575
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
6576
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
6577
|
+
tabindex="${o(this.tIndex || this.tabindex)}"
|
|
6578
|
+
?autofocus="${this.autofocus}"
|
|
6579
|
+
class=${e(classes)}
|
|
6580
|
+
?disabled="${this.disabled || this.loading}"
|
|
6581
|
+
?onDark="${this.onDark}"
|
|
6582
|
+
title="${o(this.title ? this.title : undefined)}"
|
|
6583
|
+
name="${o(this.name ? this.name : undefined)}"
|
|
6584
|
+
type="${o(this.type ? this.type : undefined)}"
|
|
6585
|
+
variant="${o(this.variant ? this.variant : undefined)}"
|
|
6586
|
+
.value="${o(this.value ? this.value : undefined)}"
|
|
6587
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
6588
|
+
href="${o(this.buttonHref || undefined)}"
|
|
6589
|
+
target="${o(this.buttonTarget || undefined)}"
|
|
6590
|
+
rel="${o(this.buttonRel || undefined)}"
|
|
6591
|
+
>
|
|
6592
|
+
${o(this.loading ? u`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6593
|
+
|
|
6594
|
+
<span class="${e(contentClasses)}">
|
|
6595
|
+
<span class="textSlot" part="text">
|
|
6596
|
+
<slot></slot>
|
|
6597
|
+
</span>
|
|
6598
|
+
</span>
|
|
6599
|
+
</${tag}>
|
|
6600
|
+
`;
|
|
6601
|
+
}
|
|
6602
|
+
|
|
6603
|
+
/**
|
|
6604
|
+
* Renders the layout of the button.
|
|
6605
|
+
* @returns {TemplateResult}
|
|
6606
|
+
* @private
|
|
6607
|
+
*/
|
|
6608
|
+
renderLayout() {
|
|
6609
|
+
return this.renderLayoutDefault();
|
|
5313
6610
|
}
|
|
5314
6611
|
}
|
|
5315
6612
|
|
|
6613
|
+
var buttonVersion = '11.3.0';
|
|
6614
|
+
|
|
5316
6615
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5317
6616
|
// See LICENSE in the project root for license information.
|
|
5318
6617
|
|
|
@@ -5323,7 +6622,7 @@ class AuroDependencyVersioning {
|
|
|
5323
6622
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
5324
6623
|
*/
|
|
5325
6624
|
|
|
5326
|
-
let AuroElement$
|
|
6625
|
+
let AuroElement$2 = class AuroElement extends i$2 {
|
|
5327
6626
|
|
|
5328
6627
|
// function to define props used within the scope of this component
|
|
5329
6628
|
static get properties() {
|
|
@@ -5391,7 +6690,7 @@ var styleCss$1$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
5391
6690
|
*/
|
|
5392
6691
|
|
|
5393
6692
|
// build the component class
|
|
5394
|
-
let BaseIcon$1 = class BaseIcon extends AuroElement$
|
|
6693
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$2 {
|
|
5395
6694
|
constructor() {
|
|
5396
6695
|
super();
|
|
5397
6696
|
this.onDark = false;
|
|
@@ -5474,7 +6773,7 @@ var colorCss$4 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
5474
6773
|
|
|
5475
6774
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5476
6775
|
|
|
5477
|
-
let AuroLibraryRuntimeUtils$
|
|
6776
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
5478
6777
|
|
|
5479
6778
|
/* eslint-disable jsdoc/require-param */
|
|
5480
6779
|
|
|
@@ -5556,7 +6855,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5556
6855
|
*/
|
|
5557
6856
|
privateDefaults() {
|
|
5558
6857
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5559
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6858
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
5560
6859
|
}
|
|
5561
6860
|
|
|
5562
6861
|
// function to define props used within the scope of this component
|
|
@@ -5638,7 +6937,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5638
6937
|
*
|
|
5639
6938
|
*/
|
|
5640
6939
|
static register(name = "auro-icon") {
|
|
5641
|
-
AuroLibraryRuntimeUtils$
|
|
6940
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroIcon);
|
|
5642
6941
|
}
|
|
5643
6942
|
|
|
5644
6943
|
connectedCallback() {
|
|
@@ -5659,8 +6958,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5659
6958
|
async firstUpdated() {
|
|
5660
6959
|
await super.firstUpdated();
|
|
5661
6960
|
|
|
5662
|
-
|
|
5663
|
-
|
|
6961
|
+
/**
|
|
6962
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
6963
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
6964
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
6965
|
+
*/
|
|
6966
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
5664
6967
|
const svgDesc = this.svg.querySelector('desc');
|
|
5665
6968
|
|
|
5666
6969
|
if (svgDesc) {
|
|
@@ -5704,7 +7007,77 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5704
7007
|
}
|
|
5705
7008
|
};
|
|
5706
7009
|
|
|
5707
|
-
var iconVersion$1 = '8.0
|
|
7010
|
+
var iconVersion$1 = '8.1.0';
|
|
7011
|
+
|
|
7012
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7013
|
+
// See LICENSE in the project root for license information.
|
|
7014
|
+
|
|
7015
|
+
// ---------------------------------------------------------------------
|
|
7016
|
+
|
|
7017
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
7018
|
+
|
|
7019
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
7020
|
+
|
|
7021
|
+
/* eslint-disable jsdoc/require-param */
|
|
7022
|
+
|
|
7023
|
+
/**
|
|
7024
|
+
* This will register a new custom element with the browser.
|
|
7025
|
+
* @param {String} name - The name of the custom element.
|
|
7026
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
7027
|
+
* @returns {void}
|
|
7028
|
+
*/
|
|
7029
|
+
registerComponent(name, componentClass) {
|
|
7030
|
+
if (!customElements.get(name)) {
|
|
7031
|
+
customElements.define(name, class extends componentClass {});
|
|
7032
|
+
}
|
|
7033
|
+
}
|
|
7034
|
+
|
|
7035
|
+
/**
|
|
7036
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
7037
|
+
* @returns {void}
|
|
7038
|
+
*/
|
|
7039
|
+
closestElement(
|
|
7040
|
+
selector, // selector like in .closest()
|
|
7041
|
+
base = this, // extra functionality to skip a parent
|
|
7042
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
7043
|
+
!el || el === document || el === window
|
|
7044
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
7045
|
+
: found
|
|
7046
|
+
? found // found a selector INside this element
|
|
7047
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
7048
|
+
) {
|
|
7049
|
+
return __Closest(base);
|
|
7050
|
+
}
|
|
7051
|
+
/* eslint-enable jsdoc/require-param */
|
|
7052
|
+
|
|
7053
|
+
/**
|
|
7054
|
+
* 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.
|
|
7055
|
+
* @param {Object} elem - The element to check.
|
|
7056
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
7057
|
+
* @returns {void}
|
|
7058
|
+
*/
|
|
7059
|
+
handleComponentTagRename(elem, tagName) {
|
|
7060
|
+
const tag = tagName.toLowerCase();
|
|
7061
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7062
|
+
|
|
7063
|
+
if (elemTag !== tag) {
|
|
7064
|
+
elem.setAttribute(tag, true);
|
|
7065
|
+
}
|
|
7066
|
+
}
|
|
7067
|
+
|
|
7068
|
+
/**
|
|
7069
|
+
* Validates if an element is a specific Auro component.
|
|
7070
|
+
* @param {Object} elem - The element to validate.
|
|
7071
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
7072
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
7073
|
+
*/
|
|
7074
|
+
elementMatch(elem, tagName) {
|
|
7075
|
+
const tag = tagName.toLowerCase();
|
|
7076
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7077
|
+
|
|
7078
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
7079
|
+
}
|
|
7080
|
+
};
|
|
5708
7081
|
|
|
5709
7082
|
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)}`;
|
|
5710
7083
|
|
|
@@ -5735,7 +7108,7 @@ class AuroHeader extends i$2 {
|
|
|
5735
7108
|
/**
|
|
5736
7109
|
* @private
|
|
5737
7110
|
*/
|
|
5738
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7111
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
5739
7112
|
}
|
|
5740
7113
|
|
|
5741
7114
|
// function to define props used within the scope of this component
|
|
@@ -5765,7 +7138,7 @@ class AuroHeader extends i$2 {
|
|
|
5765
7138
|
*
|
|
5766
7139
|
*/
|
|
5767
7140
|
static register(name = "auro-header") {
|
|
5768
|
-
AuroLibraryRuntimeUtils$
|
|
7141
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHeader);
|
|
5769
7142
|
}
|
|
5770
7143
|
|
|
5771
7144
|
firstUpdated() {
|
|
@@ -5861,17 +7234,30 @@ class AuroBibtemplate extends i$2 {
|
|
|
5861
7234
|
|
|
5862
7235
|
this.large = false;
|
|
5863
7236
|
|
|
5864
|
-
AuroLibraryRuntimeUtils$
|
|
7237
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5865
7238
|
|
|
5866
7239
|
const versioning = new AuroDependencyVersioning();
|
|
7240
|
+
|
|
7241
|
+
/**
|
|
7242
|
+
* @private
|
|
7243
|
+
*/
|
|
5867
7244
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$1, AuroIcon$1);
|
|
7245
|
+
|
|
7246
|
+
/**
|
|
7247
|
+
* @private
|
|
7248
|
+
*/
|
|
5868
7249
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
7250
|
+
|
|
7251
|
+
/**
|
|
7252
|
+
* @private
|
|
7253
|
+
*/
|
|
7254
|
+
this.buttonTag = versioning.generateTag('auro-formkit-bibtemplate-button', buttonVersion, AuroButton);
|
|
5869
7255
|
}
|
|
5870
7256
|
|
|
5871
7257
|
static get styles() {
|
|
5872
7258
|
return [
|
|
5873
|
-
colorCss$
|
|
5874
|
-
styleCss$
|
|
7259
|
+
colorCss$3$1,
|
|
7260
|
+
styleCss$4$1,
|
|
5875
7261
|
tokenCss
|
|
5876
7262
|
];
|
|
5877
7263
|
}
|
|
@@ -5900,7 +7286,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
5900
7286
|
*
|
|
5901
7287
|
*/
|
|
5902
7288
|
static register(name = "auro-bibtemplate") {
|
|
5903
|
-
AuroLibraryRuntimeUtils$
|
|
7289
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
5904
7290
|
}
|
|
5905
7291
|
|
|
5906
7292
|
/**
|
|
@@ -5958,9 +7344,9 @@ class AuroBibtemplate extends i$2 {
|
|
|
5958
7344
|
<div id="bibTemplate" part="bibtemplate">
|
|
5959
7345
|
${this.isFullscreen ? u`
|
|
5960
7346
|
<div id="headerContainer">
|
|
5961
|
-
|
|
7347
|
+
<${this.buttonTag} id="closeButton" aria-label="Close" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
5962
7348
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
5963
|
-
|
|
7349
|
+
</${this.buttonTag}>
|
|
5964
7350
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
5965
7351
|
<slot name="header"></slot>
|
|
5966
7352
|
</${this.headerTag}>
|
|
@@ -5984,9 +7370,9 @@ class AuroBibtemplate extends i$2 {
|
|
|
5984
7370
|
|
|
5985
7371
|
var bibTemplateVersion = '1.0.0';
|
|
5986
7372
|
|
|
5987
|
-
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-
|
|
7373
|
+
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)}`;
|
|
5988
7374
|
|
|
5989
|
-
var styleCss$4 = i$5`.
|
|
7375
|
+
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}`;
|
|
5990
7376
|
|
|
5991
7377
|
var tokensCss$2 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
5992
7378
|
|
|
@@ -6066,8 +7452,6 @@ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
|
6066
7452
|
|
|
6067
7453
|
/**
|
|
6068
7454
|
* Displays help text or error messages within form elements - Internal Use Only.
|
|
6069
|
-
*
|
|
6070
|
-
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
6071
7455
|
*/
|
|
6072
7456
|
class AuroHelpText extends i$2 {
|
|
6073
7457
|
|
|
@@ -6183,7 +7567,7 @@ class AuroHelpText extends i$2 {
|
|
|
6183
7567
|
// function that renders the HTML and CSS into the scope of the component
|
|
6184
7568
|
render() {
|
|
6185
7569
|
return x`
|
|
6186
|
-
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
7570
|
+
<div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
|
|
6187
7571
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
6188
7572
|
</div>
|
|
6189
7573
|
`;
|
|
@@ -6192,68 +7576,7 @@ class AuroHelpText extends i$2 {
|
|
|
6192
7576
|
|
|
6193
7577
|
var helpTextVersion = '1.0.0';
|
|
6194
7578
|
|
|
6195
|
-
i$5
|
|
6196
|
-
|
|
6197
|
-
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)}`;
|
|
6198
|
-
|
|
6199
|
-
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)}`;
|
|
6200
|
-
|
|
6201
|
-
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6202
|
-
// See LICENSE in the project root for license information.
|
|
6203
|
-
|
|
6204
|
-
// ---------------------------------------------------------------------
|
|
6205
|
-
|
|
6206
|
-
/**
|
|
6207
|
-
* Converts value to an array.
|
|
6208
|
-
* If the value is a JSON string representing an array, it will be parsed.
|
|
6209
|
-
* If the value is already an array, it is returned.
|
|
6210
|
-
* If the value is undefined, it returns undefined.
|
|
6211
|
-
* @private
|
|
6212
|
-
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
6213
|
-
* @returns {Array|undefined} - The converted array or undefined.
|
|
6214
|
-
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
6215
|
-
* or if the value cannot be parsed into an array from a JSON string.
|
|
6216
|
-
*/
|
|
6217
|
-
function arrayConverter(value) {
|
|
6218
|
-
// Allow undefined
|
|
6219
|
-
if (value === undefined) {
|
|
6220
|
-
return undefined;
|
|
6221
|
-
}
|
|
6222
|
-
|
|
6223
|
-
// Return the value if it is already an array
|
|
6224
|
-
if (Array.isArray(value)) {
|
|
6225
|
-
return value;
|
|
6226
|
-
}
|
|
6227
|
-
|
|
6228
|
-
try {
|
|
6229
|
-
// If value is a JSON string, parse it
|
|
6230
|
-
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
6231
|
-
|
|
6232
|
-
// Check if the parsed value is an array
|
|
6233
|
-
if (Array.isArray(parsed)) {
|
|
6234
|
-
return parsed;
|
|
6235
|
-
}
|
|
6236
|
-
} catch (error) {
|
|
6237
|
-
// If JSON parsing fails, continue to throw an error below
|
|
6238
|
-
/* eslint-disable no-console */
|
|
6239
|
-
console.error('JSON parsing failed:', error);
|
|
6240
|
-
}
|
|
6241
|
-
|
|
6242
|
-
// Throw error if the input is not an array or undefined
|
|
6243
|
-
throw new Error('Invalid value: Input must be an array or undefined');
|
|
6244
|
-
}
|
|
6245
|
-
|
|
6246
|
-
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}`;
|
|
6247
|
-
|
|
6248
|
-
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)}`;
|
|
6249
|
-
|
|
6250
|
-
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}`;
|
|
6251
|
-
|
|
6252
|
-
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)}`;
|
|
6253
|
-
|
|
6254
|
-
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)}`;
|
|
6255
|
-
|
|
6256
|
-
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}`;
|
|
7579
|
+
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}`;
|
|
6257
7580
|
|
|
6258
7581
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6259
7582
|
// See LICENSE in the project root for license information.
|
|
@@ -6266,9 +7589,10 @@ var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock
|
|
|
6266
7589
|
* @slot - Default slot for the menu content.
|
|
6267
7590
|
* @slot bib.fullscreen.headline - Defines the headline to display above menu-options
|
|
6268
7591
|
* @slot label - Defines the content of the label.
|
|
7592
|
+
* @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
|
|
6269
7593
|
* @slot helpText - Defines the content of the helpText.
|
|
6270
|
-
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
6271
7594
|
* @slot valueText - Dropdown value text display.
|
|
7595
|
+
* @slot displayValue - Allows custom HTML content to display the selected value when select is not focused.
|
|
6272
7596
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
6273
7597
|
* @event input - Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object.
|
|
6274
7598
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
@@ -6276,7 +7600,7 @@ var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock
|
|
|
6276
7600
|
*/
|
|
6277
7601
|
|
|
6278
7602
|
// build the component class
|
|
6279
|
-
class AuroSelect extends AuroElement$
|
|
7603
|
+
class AuroSelect extends AuroElement$4 {
|
|
6280
7604
|
constructor() {
|
|
6281
7605
|
super();
|
|
6282
7606
|
|
|
@@ -6286,11 +7610,11 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6286
7610
|
const idSubstrEnd = 8;
|
|
6287
7611
|
const idSubstrStart = 2;
|
|
6288
7612
|
|
|
6289
|
-
this.matchWidth =
|
|
7613
|
+
this.matchWidth = false;
|
|
6290
7614
|
|
|
6291
7615
|
// Layout Config
|
|
6292
|
-
this.layout = '
|
|
6293
|
-
this.shape = '
|
|
7616
|
+
this.layout = 'snowflake';
|
|
7617
|
+
this.shape = 'snowflake';
|
|
6294
7618
|
this.size = 'xl';
|
|
6295
7619
|
|
|
6296
7620
|
// floaterConfig
|
|
@@ -6301,6 +7625,10 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6301
7625
|
|
|
6302
7626
|
this.forceDisplayValue = false;
|
|
6303
7627
|
|
|
7628
|
+
this.layout = 'classic';
|
|
7629
|
+
this.shape = 'classic';
|
|
7630
|
+
this.size = 'xl';
|
|
7631
|
+
|
|
6304
7632
|
/**
|
|
6305
7633
|
* @private
|
|
6306
7634
|
*/
|
|
@@ -6316,7 +7644,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6316
7644
|
/**
|
|
6317
7645
|
* @private
|
|
6318
7646
|
*/
|
|
6319
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
7647
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
6320
7648
|
|
|
6321
7649
|
/**
|
|
6322
7650
|
* Generate unique names for dependency components.
|
|
@@ -6431,14 +7759,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6431
7759
|
reflect: true
|
|
6432
7760
|
},
|
|
6433
7761
|
|
|
6434
|
-
/**
|
|
6435
|
-
* If set, makes dropdown width match the size of the content, rather than the width of the trigger.
|
|
6436
|
-
*/
|
|
6437
|
-
flexMenuWidth: {
|
|
6438
|
-
type: Boolean,
|
|
6439
|
-
reflect: true
|
|
6440
|
-
},
|
|
6441
|
-
|
|
6442
7762
|
/**
|
|
6443
7763
|
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
6444
7764
|
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
@@ -6532,7 +7852,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6532
7852
|
* "top" | "right" | "bottom" | "left" |
|
|
6533
7853
|
* "bottom-start" | "top-start" | "top-end" |
|
|
6534
7854
|
* "right-start" | "right-end" | "bottom-end" |
|
|
6535
|
-
* "left-start" | "left-end"
|
|
7855
|
+
* "left-start" | "left-end".
|
|
6536
7856
|
* @default bottom-start
|
|
6537
7857
|
*/
|
|
6538
7858
|
placement: {
|
|
@@ -6540,6 +7860,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6540
7860
|
reflect: true
|
|
6541
7861
|
},
|
|
6542
7862
|
|
|
7863
|
+
/**
|
|
7864
|
+
* Define custom placeholder text.
|
|
7865
|
+
*/
|
|
7866
|
+
placeholder: {
|
|
7867
|
+
type: String,
|
|
7868
|
+
reflect: true
|
|
7869
|
+
},
|
|
7870
|
+
|
|
6543
7871
|
/**
|
|
6544
7872
|
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
6545
7873
|
*/
|
|
@@ -6586,11 +7914,12 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6586
7914
|
},
|
|
6587
7915
|
|
|
6588
7916
|
/**
|
|
6589
|
-
* Value selected for the component.
|
|
6590
|
-
* @type {String|Array<String>}
|
|
7917
|
+
* Value selected for the component.
|
|
6591
7918
|
*/
|
|
6592
7919
|
value: {
|
|
6593
|
-
type:
|
|
7920
|
+
type: String,
|
|
7921
|
+
reflect: true,
|
|
7922
|
+
attribute: 'value'
|
|
6594
7923
|
},
|
|
6595
7924
|
|
|
6596
7925
|
/**
|
|
@@ -6636,16 +7965,48 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6636
7965
|
|
|
6637
7966
|
static get styles() {
|
|
6638
7967
|
return [
|
|
6639
|
-
i$5`${shapeSizeCss$
|
|
7968
|
+
i$5`${shapeSizeCss$2}`,
|
|
6640
7969
|
i$5`${tokensCss$5}`,
|
|
6641
7970
|
i$5`${styleCss$3}`,
|
|
6642
7971
|
];
|
|
6643
7972
|
}
|
|
6644
7973
|
|
|
7974
|
+
/**
|
|
7975
|
+
* Formatted value based on `multiSelect` state.
|
|
7976
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
7977
|
+
* @private
|
|
7978
|
+
* @returns {String|Array<String>}
|
|
7979
|
+
*/
|
|
7980
|
+
get formattedValue() {
|
|
7981
|
+
if (this.multiSelect) {
|
|
7982
|
+
if (!this.value) {
|
|
7983
|
+
return undefined;
|
|
7984
|
+
}
|
|
7985
|
+
if (this.value.startsWith("[")) {
|
|
7986
|
+
return JSON.parse(this.value);
|
|
7987
|
+
}
|
|
7988
|
+
return [this.value];
|
|
7989
|
+
}
|
|
7990
|
+
return this.value;
|
|
7991
|
+
}
|
|
7992
|
+
|
|
7993
|
+
/**
|
|
7994
|
+
* Returns classmap configuration for html5 input labels in all layouts.
|
|
7995
|
+
* @private
|
|
7996
|
+
* @returns {void}
|
|
7997
|
+
*/
|
|
7998
|
+
get commonLabelClasses() {
|
|
7999
|
+
return {
|
|
8000
|
+
'is-disabled': this.disabled,
|
|
8001
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
8002
|
+
'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
|
|
8003
|
+
};
|
|
8004
|
+
}
|
|
8005
|
+
|
|
6645
8006
|
/**
|
|
6646
8007
|
* Returns classmap configuration for wrapper elements in each layout.
|
|
6647
8008
|
* @private
|
|
6648
|
-
* @
|
|
8009
|
+
* @returns {object} - Returns classmap.
|
|
6649
8010
|
*/
|
|
6650
8011
|
get commonWrapperClasses() {
|
|
6651
8012
|
return {
|
|
@@ -6663,10 +8024,25 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6663
8024
|
|
|
6664
8025
|
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
6665
8026
|
this.isPopoverVisible = this.dropdown.isPopoverVisible;
|
|
8027
|
+
|
|
8028
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8029
|
+
// wait til the bib gets fully rendered
|
|
8030
|
+
setTimeout(() => {
|
|
8031
|
+
if (this.dropdown.isBibFullscreen) {
|
|
8032
|
+
// trigger holds the focus since menu is not a focusable element.
|
|
8033
|
+
this.dropdown.trigger.focus();
|
|
8034
|
+
|
|
8035
|
+
// default focus indicator on the first menu option
|
|
8036
|
+
if (this.menu.index < 0) {
|
|
8037
|
+
this.menu.navigateOptions('down');
|
|
8038
|
+
}
|
|
8039
|
+
}
|
|
8040
|
+
});
|
|
8041
|
+
}
|
|
6666
8042
|
});
|
|
6667
8043
|
|
|
6668
8044
|
// setting up bibtemplate
|
|
6669
|
-
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
8045
|
+
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
6670
8046
|
|
|
6671
8047
|
if (this.customBibWidth) {
|
|
6672
8048
|
this.dropdown.dropdownWidth = this.customBibWidth;
|
|
@@ -6685,7 +8061,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6685
8061
|
*
|
|
6686
8062
|
*/
|
|
6687
8063
|
static register(name = "auro-select") {
|
|
6688
|
-
AuroLibraryRuntimeUtils$
|
|
8064
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroSelect);
|
|
6689
8065
|
}
|
|
6690
8066
|
|
|
6691
8067
|
/**
|
|
@@ -6745,6 +8121,15 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6745
8121
|
return;
|
|
6746
8122
|
}
|
|
6747
8123
|
|
|
8124
|
+
// set menu's default size if there it's not specified.
|
|
8125
|
+
if (!this.menu.getAttribute('size')) {
|
|
8126
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
8127
|
+
}
|
|
8128
|
+
|
|
8129
|
+
if (!this.getAttribute('shape')) {
|
|
8130
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
8131
|
+
}
|
|
8132
|
+
|
|
6748
8133
|
if (this.multiSelect) {
|
|
6749
8134
|
this.menu.multiSelect = this.multiSelect;
|
|
6750
8135
|
}
|
|
@@ -6804,46 +8189,58 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6804
8189
|
configureSelect() {
|
|
6805
8190
|
|
|
6806
8191
|
this.addEventListener('keydown', (evt) => {
|
|
6807
|
-
|
|
6808
|
-
|
|
8192
|
+
// when the focus is on trigger not on close button
|
|
8193
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8194
|
+
if (evt.key === 'ArrowUp') {
|
|
8195
|
+
evt.preventDefault();
|
|
6809
8196
|
|
|
6810
|
-
|
|
8197
|
+
this.dropdown.show();
|
|
6811
8198
|
|
|
6812
|
-
|
|
6813
|
-
|
|
8199
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8200
|
+
this.menu.navigateOptions('up');
|
|
8201
|
+
}
|
|
8202
|
+
|
|
8203
|
+
return;
|
|
6814
8204
|
}
|
|
6815
8205
|
|
|
6816
|
-
|
|
6817
|
-
|
|
8206
|
+
if (evt.key === 'ArrowDown') {
|
|
8207
|
+
evt.preventDefault();
|
|
6818
8208
|
|
|
6819
|
-
|
|
6820
|
-
evt.preventDefault();
|
|
8209
|
+
this.dropdown.show();
|
|
6821
8210
|
|
|
6822
|
-
|
|
8211
|
+
if (this.dropdown.isPopoverVisible) {
|
|
8212
|
+
this.menu.navigateOptions('down');
|
|
8213
|
+
}
|
|
6823
8214
|
|
|
6824
|
-
|
|
6825
|
-
this.menu.navigateOptions('down');
|
|
8215
|
+
return;
|
|
6826
8216
|
}
|
|
6827
8217
|
|
|
6828
|
-
|
|
6829
|
-
|
|
8218
|
+
if (evt.key === 'Enter') {
|
|
8219
|
+
if (!this.dropdown.isPopoverVisible) {
|
|
8220
|
+
evt.preventDefault();
|
|
8221
|
+
this.menu.makeSelection();
|
|
8222
|
+
}
|
|
6830
8223
|
|
|
6831
|
-
|
|
6832
|
-
if (!this.dropdown.isPopoverVisible) {
|
|
6833
|
-
evt.preventDefault();
|
|
6834
|
-
this.menu.makeSelection();
|
|
8224
|
+
return;
|
|
6835
8225
|
}
|
|
6836
|
-
|
|
6837
|
-
return;
|
|
6838
8226
|
}
|
|
6839
8227
|
|
|
6840
|
-
if (evt.key === 'Tab') {
|
|
8228
|
+
if (evt.key === 'Tab' && this.dropdown.isPopoverVisible) {
|
|
6841
8229
|
if (this.dropdown.isBibFullscreen) {
|
|
6842
8230
|
evt.preventDefault();
|
|
8231
|
+
|
|
8232
|
+
// when the focus is on trigger not on close button
|
|
8233
|
+
if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
|
|
8234
|
+
// `dropdown.focus` will move focus to the first focusable element in bib when it's open,
|
|
8235
|
+
// when bib it not open, it will focus onto trigger.
|
|
8236
|
+
this.dropdown.focus();
|
|
8237
|
+
} else {
|
|
8238
|
+
// when close button has the focus, move focus back to the trigger
|
|
8239
|
+
this.dropdown.trigger.focus();
|
|
8240
|
+
}
|
|
6843
8241
|
} else {
|
|
6844
8242
|
this.dropdown.hide();
|
|
6845
8243
|
}
|
|
6846
|
-
|
|
6847
8244
|
return;
|
|
6848
8245
|
}
|
|
6849
8246
|
|
|
@@ -6924,6 +8321,26 @@ class AuroSelect extends AuroElement$3 {
|
|
|
6924
8321
|
}
|
|
6925
8322
|
}
|
|
6926
8323
|
|
|
8324
|
+
/**
|
|
8325
|
+
* Hides the dropdown bib if its open.
|
|
8326
|
+
* @returns {void}
|
|
8327
|
+
*/
|
|
8328
|
+
hideBib() {
|
|
8329
|
+
if (this.dropdown && this.dropdown.isPopoverVisible) {
|
|
8330
|
+
this.dropdown.hide();
|
|
8331
|
+
}
|
|
8332
|
+
}
|
|
8333
|
+
|
|
8334
|
+
/**
|
|
8335
|
+
* Shows the dropdown bib if there are options to show.
|
|
8336
|
+
* @returns {void}
|
|
8337
|
+
*/
|
|
8338
|
+
showBib() {
|
|
8339
|
+
if (this.dropdown && !this.dropdown.isPopoverVisible) {
|
|
8340
|
+
this.dropdown.show();
|
|
8341
|
+
}
|
|
8342
|
+
}
|
|
8343
|
+
|
|
6927
8344
|
/**
|
|
6928
8345
|
* Function to support @focusin event.
|
|
6929
8346
|
* @private
|
|
@@ -7008,34 +8425,39 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7008
8425
|
// Add the tag name as an attribute if it is different than the component name
|
|
7009
8426
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-select');
|
|
7010
8427
|
|
|
7011
|
-
this.configureMenu();
|
|
7012
8428
|
this.configureDropdown();
|
|
8429
|
+
this.configureMenu();
|
|
7013
8430
|
this.configureSelect();
|
|
8431
|
+
}
|
|
7014
8432
|
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
8433
|
+
/**
|
|
8434
|
+
* Update the menu value. With checks for menu existence. Awaits value update.
|
|
8435
|
+
* @param {string} value - The value to set in the menu.
|
|
8436
|
+
* @returns {void}
|
|
8437
|
+
* @private
|
|
8438
|
+
*/
|
|
8439
|
+
async updateMenuValue(value) {
|
|
8440
|
+
if (!this.menu) return;
|
|
8441
|
+
|
|
8442
|
+
this.menu.setAttribute('value', value);
|
|
8443
|
+
this.menu.value = value;
|
|
8444
|
+
await this.menu.updateComplete;
|
|
7020
8445
|
}
|
|
7021
8446
|
|
|
7022
8447
|
async updated(changedProperties) {
|
|
7023
|
-
if (changedProperties.has('multiSelect')) {
|
|
8448
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has('value')) {
|
|
7024
8449
|
this.clearSelection();
|
|
7025
8450
|
}
|
|
7026
8451
|
|
|
7027
8452
|
if (changedProperties.has('value')) {
|
|
7028
8453
|
if (this.value) {
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
this.menu.value = this.value;
|
|
8454
|
+
await this.updateMenuValue(this.value);
|
|
7032
8455
|
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
this.optionSelected = this.menu.optionSelected;
|
|
8456
|
+
if (this.menu) {
|
|
8457
|
+
this.optionSelected = this.menu.optionSelected;
|
|
8458
|
+
}
|
|
7037
8459
|
} else {
|
|
7038
|
-
this.
|
|
8460
|
+
await this.updateMenuValue(undefined);
|
|
7039
8461
|
}
|
|
7040
8462
|
|
|
7041
8463
|
this._updateNativeSelect();
|
|
@@ -7054,7 +8476,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7054
8476
|
composed: true,
|
|
7055
8477
|
detail: {
|
|
7056
8478
|
optionSelected: this.optionSelected,
|
|
7057
|
-
value: this.
|
|
8479
|
+
value: this.formattedValue
|
|
7058
8480
|
}
|
|
7059
8481
|
}));
|
|
7060
8482
|
}
|
|
@@ -7066,6 +8488,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7066
8488
|
if (changedProperties.has('error')) {
|
|
7067
8489
|
this.validate(true);
|
|
7068
8490
|
}
|
|
8491
|
+
|
|
8492
|
+
if (changedProperties.has('shape') && this.menu) {
|
|
8493
|
+
this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
|
|
8494
|
+
}
|
|
8495
|
+
|
|
8496
|
+
if (changedProperties.has('size') && this.menu) {
|
|
8497
|
+
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
8498
|
+
}
|
|
7069
8499
|
}
|
|
7070
8500
|
|
|
7071
8501
|
/**
|
|
@@ -7076,16 +8506,6 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7076
8506
|
this.validation.reset(this);
|
|
7077
8507
|
}
|
|
7078
8508
|
|
|
7079
|
-
/**
|
|
7080
|
-
* Hide dropdownbib.
|
|
7081
|
-
* @private
|
|
7082
|
-
*/
|
|
7083
|
-
hideBib() {
|
|
7084
|
-
if (this.dropdown) {
|
|
7085
|
-
this.dropdown.hide();
|
|
7086
|
-
}
|
|
7087
|
-
}
|
|
7088
|
-
|
|
7089
8509
|
/**
|
|
7090
8510
|
* Validates value.
|
|
7091
8511
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -7105,13 +8525,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7105
8525
|
const selectedValue = selectedOption.value;
|
|
7106
8526
|
|
|
7107
8527
|
if (this.multiSelect) {
|
|
7108
|
-
const currentArray =
|
|
8528
|
+
const currentArray = this.formattedValue;
|
|
7109
8529
|
|
|
7110
8530
|
if (!currentArray.includes(selectedValue)) {
|
|
7111
|
-
this.value = [
|
|
8531
|
+
this.value = JSON.stringify([
|
|
7112
8532
|
...currentArray,
|
|
7113
8533
|
selectedValue
|
|
7114
|
-
];
|
|
8534
|
+
]);
|
|
7115
8535
|
}
|
|
7116
8536
|
} else {
|
|
7117
8537
|
const currentValue = this.value;
|
|
@@ -7134,12 +8554,17 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7134
8554
|
}
|
|
7135
8555
|
|
|
7136
8556
|
if (this.multiSelect) {
|
|
7137
|
-
nativeSelect.value = this.
|
|
8557
|
+
nativeSelect.value = this.multiSelect ? this.multiSelect[0] : '';
|
|
7138
8558
|
} else {
|
|
7139
8559
|
nativeSelect.value = this.value || '';
|
|
7140
8560
|
}
|
|
7141
8561
|
}
|
|
7142
8562
|
|
|
8563
|
+
/**
|
|
8564
|
+
* Returns HTML for the hidden a11y screen reader content.
|
|
8565
|
+
* @private
|
|
8566
|
+
* @returns {html} - Returns HTML for the hidden a11y screen reader content.
|
|
8567
|
+
*/
|
|
7143
8568
|
renderAriaHtml() {
|
|
7144
8569
|
return u`
|
|
7145
8570
|
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
@@ -7160,9 +8585,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7160
8585
|
`;
|
|
7161
8586
|
}
|
|
7162
8587
|
|
|
8588
|
+
/**
|
|
8589
|
+
* Returns HTML for the hidden HTML5 select.
|
|
8590
|
+
* @private
|
|
8591
|
+
* @returns {html} - Returns HTML for the hidden HTML5 select.
|
|
8592
|
+
*/
|
|
7163
8593
|
renderNativeSelect() {
|
|
7164
8594
|
return u`
|
|
7165
|
-
<div class="nativeSelectWrapper">
|
|
8595
|
+
<div class="nativeSelectWrapper util_displayHidden">
|
|
7166
8596
|
<select
|
|
7167
8597
|
tabindex="-1"
|
|
7168
8598
|
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
@@ -7199,14 +8629,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7199
8629
|
? u`
|
|
7200
8630
|
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
7201
8631
|
<p id="${this.uniqueId}" part="helpText">
|
|
7202
|
-
<slot name="
|
|
8632
|
+
<slot name="helpText"></slot>
|
|
7203
8633
|
</p>
|
|
7204
8634
|
</${this.helpTextTag}>
|
|
7205
8635
|
`
|
|
7206
8636
|
: u`
|
|
7207
8637
|
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
7208
8638
|
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7209
|
-
|
|
8639
|
+
${this.errorMessage}
|
|
7210
8640
|
</p>
|
|
7211
8641
|
</${this.helpTextTag}>
|
|
7212
8642
|
`
|
|
@@ -7219,17 +8649,16 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7219
8649
|
* @private
|
|
7220
8650
|
* @returns {import("lit").TemplateResult} - Returns HTML for the emphasized layout.
|
|
7221
8651
|
*/
|
|
7222
|
-
// TODO update to use util class
|
|
7223
8652
|
renderLayoutEmphasized() {
|
|
7224
8653
|
const placeholderClass = {
|
|
7225
|
-
|
|
8654
|
+
'util_displayHidden': this.value
|
|
7226
8655
|
};
|
|
7227
8656
|
|
|
7228
8657
|
const displayValueClasses = {
|
|
7229
8658
|
'displayValue': true,
|
|
7230
8659
|
'hasContent': this.hasDisplayValueContent,
|
|
7231
8660
|
'hasFocus': this.isPopoverVisible,
|
|
7232
|
-
'withValue': this.value && this.value.length > 0,
|
|
8661
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
7233
8662
|
'force': this.forceDisplayValue,
|
|
7234
8663
|
};
|
|
7235
8664
|
|
|
@@ -7246,16 +8675,16 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7246
8675
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7247
8676
|
</div>
|
|
7248
8677
|
<${this.dropdownTag}
|
|
8678
|
+
a11yRole="select"
|
|
7249
8679
|
?autoPlacement="${this.autoPlacement}"
|
|
7250
8680
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7251
|
-
?matchWidth="${
|
|
8681
|
+
?matchWidth="${this.matchWidth}"
|
|
7252
8682
|
?noFlip="${this.noFlip}"
|
|
7253
8683
|
?onDark="${this.onDark}"
|
|
7254
8684
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7255
8685
|
.offset="${this.offset}"
|
|
7256
8686
|
.placement="${this.placement}"
|
|
7257
8687
|
chevron
|
|
7258
|
-
fluid
|
|
7259
8688
|
for="selectMenu"
|
|
7260
8689
|
layout="${this.layout}"
|
|
7261
8690
|
part="dropdown"
|
|
@@ -7267,15 +8696,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7267
8696
|
</div>
|
|
7268
8697
|
<div class="mainContent">
|
|
7269
8698
|
<div class="${e(valueContainerClasses)}">
|
|
7270
|
-
<label>
|
|
8699
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
7271
8700
|
<slot name="label"></slot>
|
|
8701
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7272
8702
|
</label>
|
|
7273
8703
|
<div class="value" id="value"></div>
|
|
7274
|
-
${
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
</div>
|
|
7278
|
-
`}
|
|
8704
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
8705
|
+
${this.placeholder}
|
|
8706
|
+
</div>
|
|
7279
8707
|
</div>
|
|
7280
8708
|
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7281
8709
|
<slot name="displayValue"></slot>
|
|
@@ -7302,14 +8730,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7302
8730
|
*/
|
|
7303
8731
|
renderLayoutSnowflake() {
|
|
7304
8732
|
const placeholderClass = {
|
|
7305
|
-
|
|
8733
|
+
'util_displayHidden': this.value
|
|
7306
8734
|
};
|
|
7307
8735
|
|
|
7308
8736
|
const displayValueClasses = {
|
|
7309
8737
|
'displayValue': true,
|
|
7310
8738
|
'hasContent': this.hasDisplayValueContent,
|
|
7311
8739
|
'hasFocus': this.isPopoverVisible,
|
|
7312
|
-
'withValue': this.value && this.value.length > 0,
|
|
8740
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
7313
8741
|
'force': this.forceDisplayValue,
|
|
7314
8742
|
};
|
|
7315
8743
|
|
|
@@ -7328,14 +8756,13 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7328
8756
|
<${this.dropdownTag}
|
|
7329
8757
|
?autoPlacement="${this.autoPlacement}"
|
|
7330
8758
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7331
|
-
?matchWidth="${
|
|
8759
|
+
?matchWidth="${this.matchWidth}"
|
|
7332
8760
|
?noFlip="${this.noFlip}"
|
|
7333
8761
|
?onDark="${this.onDark}"
|
|
7334
8762
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7335
8763
|
.offset="${this.offset}"
|
|
7336
8764
|
.placement="${this.placement}"
|
|
7337
8765
|
chevron
|
|
7338
|
-
fluid
|
|
7339
8766
|
for="selectMenu"
|
|
7340
8767
|
layout="${this.layout}"
|
|
7341
8768
|
part="dropdown"
|
|
@@ -7347,15 +8774,14 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7347
8774
|
</div>
|
|
7348
8775
|
<div class="mainContent">
|
|
7349
8776
|
<div class="${e(valueContainerClasses)}">
|
|
7350
|
-
<label>
|
|
8777
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
7351
8778
|
<slot name="label"></slot>
|
|
8779
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
7352
8780
|
</label>
|
|
7353
8781
|
<div class="value" id="value"></div>
|
|
7354
|
-
${
|
|
7355
|
-
|
|
7356
|
-
|
|
7357
|
-
</div>
|
|
7358
|
-
`}
|
|
8782
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
8783
|
+
${this.placeholder}
|
|
8784
|
+
</div>
|
|
7359
8785
|
</div>
|
|
7360
8786
|
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7361
8787
|
<slot name="displayValue"></slot>
|
|
@@ -7371,6 +8797,7 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7371
8797
|
${this.renderHtmlHelpText()}
|
|
7372
8798
|
</div>
|
|
7373
8799
|
</${this.dropdownTag}>
|
|
8800
|
+
${this.renderNativeSelect()}
|
|
7374
8801
|
</div>
|
|
7375
8802
|
`;
|
|
7376
8803
|
}
|
|
@@ -7381,11 +8808,75 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7381
8808
|
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7382
8809
|
*/
|
|
7383
8810
|
renderLayoutClassic() {
|
|
8811
|
+
const placeholderClass = {
|
|
8812
|
+
'util_displayHidden': this.value
|
|
8813
|
+
};
|
|
8814
|
+
|
|
8815
|
+
const displayValueClasses = {
|
|
8816
|
+
'displayValue': true,
|
|
8817
|
+
'hasContent': this.hasDisplayValueContent,
|
|
8818
|
+
'hasFocus': this.isPopoverVisible,
|
|
8819
|
+
'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
|
|
8820
|
+
'force': this.forceDisplayValue,
|
|
8821
|
+
};
|
|
8822
|
+
|
|
8823
|
+
const valueContainerClasses = {
|
|
8824
|
+
'valueContainer': true,
|
|
8825
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
8826
|
+
};
|
|
8827
|
+
|
|
7384
8828
|
return u`
|
|
7385
8829
|
<div
|
|
7386
|
-
class="${e(this.commonWrapperClasses)}
|
|
8830
|
+
class="${e(this.commonWrapperClasses)}"
|
|
7387
8831
|
part="wrapper">
|
|
7388
|
-
|
|
8832
|
+
<div id="slotHolder" aria-hidden="true">
|
|
8833
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
8834
|
+
</div>
|
|
8835
|
+
<${this.dropdownTag}
|
|
8836
|
+
?autoPlacement="${this.autoPlacement}"
|
|
8837
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
8838
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
8839
|
+
?noFlip="${this.noFlip}"
|
|
8840
|
+
?onDark="${this.onDark}"
|
|
8841
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
8842
|
+
.offset="${this.offset}"
|
|
8843
|
+
.placement="${this.placement}"
|
|
8844
|
+
chevron
|
|
8845
|
+
for="selectMenu"
|
|
8846
|
+
layout="${this.layout}"
|
|
8847
|
+
part="dropdown"
|
|
8848
|
+
shape="${this.shape}"
|
|
8849
|
+
size="${this.size}">
|
|
8850
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
8851
|
+
<div class="accents left">
|
|
8852
|
+
<slot name="typeIcon"></slot>
|
|
8853
|
+
</div>
|
|
8854
|
+
<div class="mainContent">
|
|
8855
|
+
<div class="${e(valueContainerClasses)}">
|
|
8856
|
+
<label class="${e(this.commonLabelClasses)}">
|
|
8857
|
+
<slot name="label"></slot>
|
|
8858
|
+
${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
|
|
8859
|
+
</label>
|
|
8860
|
+
<div class="value" id="value"></div>
|
|
8861
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
8862
|
+
${this.placeholder}
|
|
8863
|
+
</div>
|
|
8864
|
+
</div>
|
|
8865
|
+
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
8866
|
+
<slot name="displayValue"></slot>
|
|
8867
|
+
</div>
|
|
8868
|
+
</div>
|
|
8869
|
+
<div class="accents right"></div>
|
|
8870
|
+
</div>
|
|
8871
|
+
<div class="menuWrapper"></div>
|
|
8872
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
8873
|
+
<slot></slot>
|
|
8874
|
+
</${this.bibtemplateTag}>
|
|
8875
|
+
<div slot="helpText">
|
|
8876
|
+
${this.renderHtmlHelpText()}
|
|
8877
|
+
</div>
|
|
8878
|
+
</${this.dropdownTag}>
|
|
8879
|
+
${this.renderNativeSelect()}
|
|
7389
8880
|
</div>
|
|
7390
8881
|
`;
|
|
7391
8882
|
}
|
|
@@ -7419,112 +8910,15 @@ class AuroSelect extends AuroElement$3 {
|
|
|
7419
8910
|
|
|
7420
8911
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
7421
8912
|
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
7422
|
-
|
|
7423
|
-
// function that renders the HTML and CSS into the scope of the component
|
|
7424
|
-
renderBACKUP() {
|
|
7425
|
-
const placeholderClass = {
|
|
7426
|
-
hidden: this.value,
|
|
7427
|
-
};
|
|
7428
|
-
|
|
7429
|
-
return u`
|
|
7430
|
-
<div class="outerWrapper">
|
|
7431
|
-
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
7432
|
-
${this.optionActive && this.options.length > 0
|
|
7433
|
-
? u`
|
|
7434
|
-
${`${this.optionActive.innerText}, option ${this.options.indexOf(this.optionActive) + 1} of ${this.options.length}`}
|
|
7435
|
-
`
|
|
7436
|
-
: undefined
|
|
7437
|
-
};
|
|
7438
|
-
|
|
7439
|
-
${this.optionSelected && this.options.length > 0
|
|
7440
|
-
? u`
|
|
7441
|
-
${`${this.optionSelected.innerText} selected`}
|
|
7442
|
-
`
|
|
7443
|
-
: undefined
|
|
7444
|
-
};
|
|
7445
|
-
</div>
|
|
7446
|
-
<div id="slotHolder" aria-hidden="true">
|
|
7447
|
-
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7448
|
-
</div>
|
|
7449
|
-
<${this.dropdownTag}
|
|
7450
|
-
?autoPlacement="${this.autoPlacement}"
|
|
7451
|
-
?disabled="${this.disabled}"
|
|
7452
|
-
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7453
|
-
?matchWidth="${!this.flexMenuWidth}"
|
|
7454
|
-
?noFlip="${this.noFlip}"
|
|
7455
|
-
?onDark="${this.onDark}"
|
|
7456
|
-
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7457
|
-
.offset="${this.offset}"
|
|
7458
|
-
.placement="${this.placement}"
|
|
7459
|
-
chevron
|
|
7460
|
-
fluid
|
|
7461
|
-
for="selectMenu"
|
|
7462
|
-
layout="${this.layout}"
|
|
7463
|
-
part="dropdown"
|
|
7464
|
-
shape="${this.shape}"
|
|
7465
|
-
size="${this.size}">
|
|
7466
|
-
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
7467
|
-
<span id="placeholder"
|
|
7468
|
-
class="${e(placeholderClass)}"
|
|
7469
|
-
?aria-hidden="${this.optionSelected && this.optionSelected.length ? 'true' : false}"
|
|
7470
|
-
>
|
|
7471
|
-
<slot name="placeholder"></slot>
|
|
7472
|
-
</span>
|
|
7473
|
-
<slot name="valueText" id="valueText"></slot>
|
|
7474
|
-
</span>
|
|
7475
|
-
|
|
7476
|
-
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7477
|
-
<slot></slot>
|
|
7478
|
-
</${this.bibtemplateTag}>
|
|
7479
|
-
<slot name="label" slot="label"></slot>
|
|
7480
|
-
<p slot="helpText">
|
|
7481
|
-
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
7482
|
-
? u`
|
|
7483
|
-
<span id="${this.uniqueId}" part="helpText">
|
|
7484
|
-
<slot name="helpText"></slot>
|
|
7485
|
-
</span>`
|
|
7486
|
-
: u`
|
|
7487
|
-
<span id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7488
|
-
${this.errorMessage}
|
|
7489
|
-
</span>`
|
|
7490
|
-
}
|
|
7491
|
-
</p>
|
|
7492
|
-
</${this.dropdownTag}>
|
|
7493
|
-
<div class="nativeSelectWrapper">
|
|
7494
|
-
<select
|
|
7495
|
-
tabindex="-1"
|
|
7496
|
-
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
7497
|
-
name="${this.name || ''}"
|
|
7498
|
-
?disabled="${this.disabled}"
|
|
7499
|
-
?required="${this.required}"
|
|
7500
|
-
aria-hidden="true"
|
|
7501
|
-
autocomplete="${o(this.autocomplete)}"
|
|
7502
|
-
@change="${this._handleNativeSelectChange}">
|
|
7503
|
-
<option value="" ?selected="${!this.value}"></option>
|
|
7504
|
-
${this.options.map((option) => {
|
|
7505
|
-
const optionValue = option.value || option.textContent;
|
|
7506
|
-
return u`
|
|
7507
|
-
<option
|
|
7508
|
-
value="${optionValue}"
|
|
7509
|
-
?selected="${this.value === optionValue}">
|
|
7510
|
-
${option.textContent}
|
|
7511
|
-
</option>
|
|
7512
|
-
`;
|
|
7513
|
-
})}
|
|
7514
|
-
</select>
|
|
7515
|
-
</div>
|
|
7516
|
-
<!-- Help text and error message template -->
|
|
7517
|
-
${this.renderHtmlHelpText()}
|
|
7518
|
-
</div>
|
|
7519
|
-
`;
|
|
7520
|
-
}
|
|
7521
8913
|
}
|
|
7522
8914
|
|
|
7523
|
-
var
|
|
8915
|
+
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}`;
|
|
8916
|
+
|
|
8917
|
+
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)}`;
|
|
7524
8918
|
|
|
7525
8919
|
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)}`;
|
|
7526
8920
|
|
|
7527
|
-
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)}`;
|
|
8921
|
+
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)}`;
|
|
7528
8922
|
|
|
7529
8923
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7530
8924
|
// See LICENSE in the project root for license information.
|
|
@@ -7577,7 +8971,6 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
7577
8971
|
* @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
|
|
7578
8972
|
* @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
|
|
7579
8973
|
* @attr {boolean} multiselect - When true, the selected option can be multiple options.
|
|
7580
|
-
* @attr {String|Array<string>} value - Value selected for the menu, type `string` by default. In multi-select mode, `value` is an array of strings.
|
|
7581
8974
|
* @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
|
|
7582
8975
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
7583
8976
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
@@ -7592,12 +8985,22 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
7592
8985
|
|
|
7593
8986
|
/* eslint-disable no-magic-numbers, max-lines, no-extra-parens */
|
|
7594
8987
|
|
|
7595
|
-
class AuroMenu extends
|
|
8988
|
+
class AuroMenu extends AuroElement$4 {
|
|
7596
8989
|
constructor() {
|
|
7597
8990
|
super();
|
|
7598
8991
|
|
|
7599
8992
|
// State properties (reactive)
|
|
7600
8993
|
|
|
8994
|
+
/**
|
|
8995
|
+
* @private
|
|
8996
|
+
*/
|
|
8997
|
+
this.shape = "box";
|
|
8998
|
+
|
|
8999
|
+
/**
|
|
9000
|
+
* @private
|
|
9001
|
+
*/
|
|
9002
|
+
this.size = "sm";
|
|
9003
|
+
|
|
7601
9004
|
// Value of the selected options
|
|
7602
9005
|
this.value = undefined;
|
|
7603
9006
|
// Currently selected option
|
|
@@ -7656,6 +9059,7 @@ class AuroMenu extends i$2 {
|
|
|
7656
9059
|
|
|
7657
9060
|
static get properties() {
|
|
7658
9061
|
return {
|
|
9062
|
+
...super.properties,
|
|
7659
9063
|
noCheckmark: {
|
|
7660
9064
|
type: Boolean,
|
|
7661
9065
|
reflect: true,
|
|
@@ -7686,15 +9090,31 @@ class AuroMenu extends i$2 {
|
|
|
7686
9090
|
reflect: true,
|
|
7687
9091
|
attribute: 'multiselect'
|
|
7688
9092
|
},
|
|
9093
|
+
|
|
9094
|
+
/**
|
|
9095
|
+
* Value selected for the component.
|
|
9096
|
+
*/
|
|
7689
9097
|
value: {
|
|
7690
|
-
|
|
7691
|
-
|
|
9098
|
+
type: String,
|
|
9099
|
+
reflect: true,
|
|
9100
|
+
attribute: 'value'
|
|
9101
|
+
},
|
|
9102
|
+
|
|
9103
|
+
/**
|
|
9104
|
+
* Indent level for submenus.
|
|
9105
|
+
* @private
|
|
9106
|
+
*/
|
|
9107
|
+
level: {
|
|
9108
|
+
type: Number,
|
|
9109
|
+
reflect: false,
|
|
9110
|
+
attribute: false
|
|
7692
9111
|
}
|
|
7693
9112
|
};
|
|
7694
9113
|
}
|
|
7695
9114
|
|
|
7696
9115
|
static get styles() {
|
|
7697
9116
|
return [
|
|
9117
|
+
shapeSizeCss,
|
|
7698
9118
|
styleCss$2,
|
|
7699
9119
|
colorCss$2,
|
|
7700
9120
|
tokensCss$1
|
|
@@ -7710,7 +9130,26 @@ class AuroMenu extends i$2 {
|
|
|
7710
9130
|
*
|
|
7711
9131
|
*/
|
|
7712
9132
|
static register(name = "auro-menu") {
|
|
7713
|
-
AuroLibraryRuntimeUtils$
|
|
9133
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroMenu);
|
|
9134
|
+
}
|
|
9135
|
+
|
|
9136
|
+
/**
|
|
9137
|
+
* Formatted value based on `multiSelect` state.
|
|
9138
|
+
* Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
9139
|
+
* @private
|
|
9140
|
+
* @returns {String|Array<String>}
|
|
9141
|
+
*/
|
|
9142
|
+
get formattedValue() {
|
|
9143
|
+
if (this.multiSelect) {
|
|
9144
|
+
if (!this.value) {
|
|
9145
|
+
return undefined;
|
|
9146
|
+
}
|
|
9147
|
+
if (this.value.startsWith("[")) {
|
|
9148
|
+
return JSON.parse(this.value);
|
|
9149
|
+
}
|
|
9150
|
+
return [this.value];
|
|
9151
|
+
}
|
|
9152
|
+
return this.value;
|
|
7714
9153
|
}
|
|
7715
9154
|
|
|
7716
9155
|
// Lifecycle Methods
|
|
@@ -7722,6 +9161,7 @@ class AuroMenu extends i$2 {
|
|
|
7722
9161
|
this.addEventListener('mousedown', this.handleMouseSelect);
|
|
7723
9162
|
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
7724
9163
|
this.addEventListener('slotchange', this.handleSlotChange);
|
|
9164
|
+
this.setTagAttribute("auro-menu");
|
|
7725
9165
|
}
|
|
7726
9166
|
|
|
7727
9167
|
disconnectedCallback() {
|
|
@@ -7734,19 +9174,33 @@ class AuroMenu extends i$2 {
|
|
|
7734
9174
|
}
|
|
7735
9175
|
|
|
7736
9176
|
firstUpdated() {
|
|
7737
|
-
AuroLibraryRuntimeUtils$
|
|
9177
|
+
AuroLibraryRuntimeUtils$6.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
7738
9178
|
|
|
7739
9179
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
7740
9180
|
this.initializeMenu();
|
|
7741
9181
|
}
|
|
7742
9182
|
|
|
9183
|
+
/**
|
|
9184
|
+
* Sets an attribute that matches the default tag name if the tag name is not the default.
|
|
9185
|
+
* @param {string} tagName - The tag name to set as an attribute.
|
|
9186
|
+
* @private
|
|
9187
|
+
*/
|
|
9188
|
+
setTagAttribute(tagName) {
|
|
9189
|
+
if (this.tagName.toLowerCase() !== tagName) {
|
|
9190
|
+
this.setAttribute(tagName, true);
|
|
9191
|
+
}
|
|
9192
|
+
}
|
|
9193
|
+
|
|
7743
9194
|
updated(changedProperties) {
|
|
7744
|
-
|
|
9195
|
+
super.updated(changedProperties);
|
|
9196
|
+
|
|
9197
|
+
if (changedProperties.has('multiSelect') && !changedProperties.has("value")) {
|
|
7745
9198
|
// Reset selection if multiSelect mode changes
|
|
7746
9199
|
this.clearSelection();
|
|
7747
9200
|
}
|
|
7748
9201
|
|
|
7749
|
-
|
|
9202
|
+
|
|
9203
|
+
if (changedProperties.has("value")) {
|
|
7750
9204
|
// Handle null/undefined case
|
|
7751
9205
|
if (this.value === undefined || this.value === null) {
|
|
7752
9206
|
this.optionSelected = undefined;
|
|
@@ -7754,7 +9208,7 @@ class AuroMenu extends i$2 {
|
|
|
7754
9208
|
} else {
|
|
7755
9209
|
if (this.multiSelect) {
|
|
7756
9210
|
// In multiselect mode, this.value should be an array of strings
|
|
7757
|
-
const valueArray =
|
|
9211
|
+
const valueArray = this.formattedValue;
|
|
7758
9212
|
const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
|
|
7759
9213
|
|
|
7760
9214
|
this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
|
|
@@ -7814,6 +9268,19 @@ class AuroMenu extends i$2 {
|
|
|
7814
9268
|
this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]').forEach((element) => element.setAttribute('noCheckmark', ''));
|
|
7815
9269
|
}
|
|
7816
9270
|
|
|
9271
|
+
// Handle layout propagation to all menus and options
|
|
9272
|
+
const propagationTargets = this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]');
|
|
9273
|
+
[
|
|
9274
|
+
'size',
|
|
9275
|
+
'shape'
|
|
9276
|
+
].forEach((prop) => {
|
|
9277
|
+
if (changedProperties.has(prop)) {
|
|
9278
|
+
propagationTargets.forEach((el) => {
|
|
9279
|
+
el.setAttribute(prop, this[prop]);
|
|
9280
|
+
});
|
|
9281
|
+
}
|
|
9282
|
+
});
|
|
9283
|
+
|
|
7817
9284
|
// Regex for matchWord if needed
|
|
7818
9285
|
let regexWord = null;
|
|
7819
9286
|
|
|
@@ -7908,14 +9375,14 @@ class AuroMenu extends i$2 {
|
|
|
7908
9375
|
*/
|
|
7909
9376
|
handleSelectState(option) {
|
|
7910
9377
|
if (this.multiSelect) {
|
|
7911
|
-
const currentValue = this.
|
|
9378
|
+
const currentValue = this.formattedValue || [];
|
|
7912
9379
|
const currentSelected = this.optionSelected || [];
|
|
7913
9380
|
|
|
7914
9381
|
if (!currentValue.includes(option.value)) {
|
|
7915
|
-
this.value = [
|
|
9382
|
+
this.value = JSON.stringify([
|
|
7916
9383
|
...currentValue,
|
|
7917
9384
|
option.value
|
|
7918
|
-
];
|
|
9385
|
+
]);
|
|
7919
9386
|
}
|
|
7920
9387
|
if (!currentSelected.includes(option)) {
|
|
7921
9388
|
this.optionSelected = [
|
|
@@ -7938,13 +9405,15 @@ class AuroMenu extends i$2 {
|
|
|
7938
9405
|
* @param {HTMLElement} option - The menuoption to be deselected.
|
|
7939
9406
|
*/
|
|
7940
9407
|
handleDeselectState(option) {
|
|
7941
|
-
if (this.multiSelect
|
|
9408
|
+
if (this.multiSelect) {
|
|
7942
9409
|
// Remove this option from array
|
|
7943
|
-
|
|
9410
|
+
const newFormattedValue = (this.formattedValue || []).filter((val) => val !== option.value);
|
|
7944
9411
|
|
|
7945
9412
|
// If array is empty after removal, set back to undefined
|
|
7946
|
-
if (
|
|
9413
|
+
if (newFormattedValue && newFormattedValue.length === 0) {
|
|
7947
9414
|
this.value = undefined;
|
|
9415
|
+
} else {
|
|
9416
|
+
this.value = JSON.stringify(newFormattedValue);
|
|
7948
9417
|
}
|
|
7949
9418
|
|
|
7950
9419
|
this.optionSelected = this.optionSelected.filter((val) => val !== option);
|
|
@@ -8010,21 +9479,20 @@ class AuroMenu extends i$2 {
|
|
|
8010
9479
|
* @param {HTMLElement} menu - Root menu element.
|
|
8011
9480
|
*/
|
|
8012
9481
|
handleNestedMenus(menu) {
|
|
8013
|
-
|
|
9482
|
+
menu.level = menu.parentElement.level >= 0 ? menu.parentElement.level + 1 : 0;
|
|
8014
9483
|
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
if (!
|
|
8019
|
-
|
|
9484
|
+
if (menu.level > 0) {
|
|
9485
|
+
menu.setAttribute('role', 'group');
|
|
9486
|
+
menu.removeAttribute("root");
|
|
9487
|
+
if (!menu.hasAttribute('aria-label')) {
|
|
9488
|
+
menu.setAttribute('aria-label', 'submenu');
|
|
8020
9489
|
}
|
|
9490
|
+
}
|
|
8021
9491
|
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
this.handleNestedMenus(nestedMenu);
|
|
9492
|
+
const options = menu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption]');
|
|
9493
|
+
options.forEach((option) => {
|
|
9494
|
+
const regex = new RegExp(this.nestingSpacer, "gu");
|
|
9495
|
+
option.innerHTML = this.nestingSpacer.repeat(menu.level) + option.innerHTML.replace(regex, '');
|
|
8028
9496
|
});
|
|
8029
9497
|
}
|
|
8030
9498
|
|
|
@@ -8266,28 +9734,51 @@ class AuroMenu extends i$2 {
|
|
|
8266
9734
|
}
|
|
8267
9735
|
|
|
8268
9736
|
/**
|
|
8269
|
-
*
|
|
8270
|
-
* @returns {
|
|
9737
|
+
* Getter for wrapper classes based on size.
|
|
9738
|
+
* @returns {Object} - Class map for the wrapper element.
|
|
9739
|
+
* @private
|
|
8271
9740
|
*/
|
|
8272
|
-
|
|
9741
|
+
get wrapperClasses() {
|
|
9742
|
+
return e({
|
|
9743
|
+
'menuWrapper': true,
|
|
9744
|
+
[this.size]: true,
|
|
9745
|
+
});
|
|
9746
|
+
}
|
|
9747
|
+
|
|
9748
|
+
/**
|
|
9749
|
+
* Logic to determine the layout of the component.
|
|
9750
|
+
* @protected
|
|
9751
|
+
* @returns {void}
|
|
9752
|
+
*/
|
|
9753
|
+
renderLayout() {
|
|
8273
9754
|
if (this.loading) {
|
|
8274
9755
|
return x`
|
|
8275
|
-
<
|
|
8276
|
-
<
|
|
8277
|
-
|
|
8278
|
-
|
|
8279
|
-
|
|
8280
|
-
|
|
9756
|
+
<div class="${this.wrapperClasses}">
|
|
9757
|
+
<auro-menuoption
|
|
9758
|
+
disabled
|
|
9759
|
+
loadingplaceholder
|
|
9760
|
+
class="${this.hasLoadingPlaceholder ? "" : "empty"}"
|
|
9761
|
+
>
|
|
9762
|
+
<div>
|
|
9763
|
+
<slot name="loadingIcon" class="body-lg"></slot>
|
|
9764
|
+
<slot name="loadingText"></slot>
|
|
9765
|
+
</div>
|
|
9766
|
+
</auro-menuoption>
|
|
9767
|
+
</div>
|
|
8281
9768
|
`;
|
|
8282
9769
|
}
|
|
8283
9770
|
|
|
8284
|
-
return x
|
|
9771
|
+
return x`
|
|
9772
|
+
<div class="${this.wrapperClasses}">
|
|
9773
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
9774
|
+
</div>
|
|
9775
|
+
`;
|
|
8285
9776
|
}
|
|
8286
9777
|
}
|
|
8287
9778
|
|
|
8288
|
-
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}`;
|
|
9779
|
+
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}`;
|
|
8289
9780
|
|
|
8290
|
-
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)}`;
|
|
9781
|
+
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)}`;
|
|
8291
9782
|
|
|
8292
9783
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8293
9784
|
// See LICENSE in the project root for license information.
|
|
@@ -8635,8 +10126,12 @@ class AuroIcon extends BaseIcon {
|
|
|
8635
10126
|
async firstUpdated() {
|
|
8636
10127
|
await super.firstUpdated();
|
|
8637
10128
|
|
|
8638
|
-
|
|
8639
|
-
|
|
10129
|
+
/**
|
|
10130
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
10131
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
10132
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
10133
|
+
*/
|
|
10134
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
8640
10135
|
const svgDesc = this.svg.querySelector('desc');
|
|
8641
10136
|
|
|
8642
10137
|
if (svgDesc) {
|
|
@@ -8680,7 +10175,7 @@ class AuroIcon extends BaseIcon {
|
|
|
8680
10175
|
}
|
|
8681
10176
|
}
|
|
8682
10177
|
|
|
8683
|
-
var iconVersion = '8.0
|
|
10178
|
+
var iconVersion = '8.1.0';
|
|
8684
10179
|
|
|
8685
10180
|
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>"};
|
|
8686
10181
|
|
|
@@ -8698,10 +10193,20 @@ var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlin
|
|
|
8698
10193
|
* @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
|
|
8699
10194
|
* @slot - Specifies text for an option, but is not the value.
|
|
8700
10195
|
*/
|
|
8701
|
-
class AuroMenuOption extends
|
|
10196
|
+
class AuroMenuOption extends AuroElement$4 {
|
|
8702
10197
|
constructor() {
|
|
8703
10198
|
super();
|
|
8704
10199
|
|
|
10200
|
+
/**
|
|
10201
|
+
* @private
|
|
10202
|
+
*/
|
|
10203
|
+
this.shape = "box";
|
|
10204
|
+
|
|
10205
|
+
/**
|
|
10206
|
+
* @private
|
|
10207
|
+
*/
|
|
10208
|
+
this.size = "sm";
|
|
10209
|
+
|
|
8705
10210
|
/**
|
|
8706
10211
|
* Generate unique names for dependency components.
|
|
8707
10212
|
*/
|
|
@@ -8720,11 +10225,12 @@ class AuroMenuOption extends i$2 {
|
|
|
8720
10225
|
/**
|
|
8721
10226
|
* @private
|
|
8722
10227
|
*/
|
|
8723
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
10228
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
8724
10229
|
}
|
|
8725
10230
|
|
|
8726
10231
|
static get properties() {
|
|
8727
10232
|
return {
|
|
10233
|
+
...super.properties,
|
|
8728
10234
|
nocheckmark: {
|
|
8729
10235
|
type: Boolean,
|
|
8730
10236
|
reflect: true
|
|
@@ -8749,6 +10255,7 @@ class AuroMenuOption extends i$2 {
|
|
|
8749
10255
|
|
|
8750
10256
|
static get styles() {
|
|
8751
10257
|
return [
|
|
10258
|
+
shapeSizeCss,
|
|
8752
10259
|
styleCss$1,
|
|
8753
10260
|
colorCss$1,
|
|
8754
10261
|
tokensCss$1
|
|
@@ -8764,7 +10271,7 @@ class AuroMenuOption extends i$2 {
|
|
|
8764
10271
|
*
|
|
8765
10272
|
*/
|
|
8766
10273
|
static register(name = "auro-menuoption") {
|
|
8767
|
-
AuroLibraryRuntimeUtils$
|
|
10274
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroMenuOption);
|
|
8768
10275
|
}
|
|
8769
10276
|
|
|
8770
10277
|
firstUpdated() {
|
|
@@ -8786,6 +10293,8 @@ class AuroMenuOption extends i$2 {
|
|
|
8786
10293
|
|
|
8787
10294
|
// observer for selected property changes
|
|
8788
10295
|
updated(changedProperties) {
|
|
10296
|
+
super.updated(changedProperties);
|
|
10297
|
+
|
|
8789
10298
|
if (changedProperties.has('selected')) {
|
|
8790
10299
|
this.setAttribute('aria-selected', this.selected.toString());
|
|
8791
10300
|
}
|
|
@@ -8804,13 +10313,36 @@ class AuroMenuOption extends i$2 {
|
|
|
8804
10313
|
|
|
8805
10314
|
svg.setAttribute('slot', 'svg');
|
|
8806
10315
|
|
|
8807
|
-
return u`<${this.iconTag} customColor customSvg
|
|
10316
|
+
return u`<${this.iconTag} customColor customSvg>${svg}</${this.iconTag}>`;
|
|
8808
10317
|
}
|
|
8809
10318
|
|
|
8810
|
-
|
|
10319
|
+
/**
|
|
10320
|
+
* Logic to determine the layout of the component.
|
|
10321
|
+
* @protected
|
|
10322
|
+
* @returns {void}
|
|
10323
|
+
*/
|
|
10324
|
+
renderLayout() {
|
|
10325
|
+
|
|
10326
|
+
const fontClassMap = {
|
|
10327
|
+
xs: 'body-sm',
|
|
10328
|
+
sm: 'body-default',
|
|
10329
|
+
md: 'body-default',
|
|
10330
|
+
lg: 'body-lg',
|
|
10331
|
+
xl: 'body-lg'
|
|
10332
|
+
};
|
|
10333
|
+
|
|
10334
|
+
const classes = e({
|
|
10335
|
+
'wrapper': true,
|
|
10336
|
+
[this.size ? fontClassMap[this.size] : 'body-sm']: true,
|
|
10337
|
+
});
|
|
10338
|
+
|
|
8811
10339
|
return u`
|
|
8812
|
-
${
|
|
8813
|
-
|
|
10340
|
+
<div class="${classes}">
|
|
10341
|
+
${this.selected && !this.nocheckmark
|
|
10342
|
+
? this.generateIconHtml(checkmarkIcon.svg)
|
|
10343
|
+
: undefined}
|
|
10344
|
+
<slot></slot>
|
|
10345
|
+
</div>
|
|
8814
10346
|
`;
|
|
8815
10347
|
}
|
|
8816
10348
|
}
|