@aurodesignsystem-dev/auro-popover 0.0.0-pr102.3 → 0.0.0-pr106.0

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.
@@ -0,0 +1,57 @@
1
+ <!--
2
+ Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
3
+ See LICENSE in the project root for license information.
4
+
5
+ HTML in this document is standardized and NOT to be edited.
6
+ All demo code should be added/edited in ./demo/index.md
7
+
8
+ With the exception of adding custom elements if needed for the demo.
9
+
10
+ ----------------------- DO NOT EDIT -----------------------------
11
+
12
+ -->
13
+
14
+ <!DOCTYPE html>
15
+ <html lang="en">
16
+ <head>
17
+ <meta charset="UTF-8" />
18
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19
+ <title>Auro Web Component Demo | auro-popover</title>
20
+
21
+ <!-- Prism.js Stylesheet -->
22
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
23
+
24
+ <!-- Legacy reference is still needed to support auro-popover's use of legacy token values at this time -->
25
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
26
+
27
+ <!-- Design Token Alaska Theme -->
28
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
29
+
30
+ <!-- Webcore Stylesheet Alaska Theme -->
31
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
32
+
33
+ <!-- Demo Specific Styles -->
34
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
35
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
36
+ </head>
37
+ <body class="auro-markdown">
38
+ <main></main>
39
+
40
+ <script type="module">
41
+ import 'https://cdn.jsdelivr.net/npm/marked@latest/marked.min.js';
42
+ import 'https://cdn.jsdelivr.net/npm/prismjs@latest/prism.js';
43
+ fetch('./index.md')
44
+ .then((response) => response.text())
45
+ .then((text) => {
46
+ const rawHtml = marked.parse(text);
47
+ document.querySelector('main').innerHTML = rawHtml;
48
+ Prism.highlightAll();
49
+ });
50
+ </script>
51
+ <script type="module" data-demo-script="true" src="./index.min.js"></script>
52
+
53
+ <!-- If additional elements are needed for the demo, add them here. -->
54
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/dist/auro-accordion__bundled.js" type="module"></script>
55
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-button@latest/dist/auro-button__bundled.js" type="module"></script>
56
+ </body>
57
+ </html>
package/demo/index.js ADDED
@@ -0,0 +1,4 @@
1
+ import { AuroPopover } from "../src/index";
2
+
3
+ AuroPopover.register();
4
+ AuroPopover.register("custom-popover");
package/demo/index.md CHANGED
@@ -68,7 +68,7 @@ There are two important parts of every Auro component. The <a href="https://deve
68
68
  To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our `AuroPopover.register(name)` method and pass in a unique name.
69
69
 
70
70
  ```js
71
- import { AuroPopover } from './src/auro-popover.js';
71
+ import { AuroPopover } from '@aurodesignsystem/auro-popover/class';
72
72
 
73
73
  AuroPopover.register('custom-popover');
74
74
  ```
package/demo/index.min.js CHANGED
@@ -1,388 +1,4 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- const t$2=globalThis,i$5=t$2.trustedTypes,s$4=i$5?i$5.createPolicy("lit-html",{createHTML:t=>t}):void 0,e$5="$lit$",h$4=`lit$${Math.random().toFixed(9).slice(2)}$`,o$7="?"+h$4,n$5=`<${o$7}>`,r$3=document,l$3=()=>r$3.createComment(""),c$4=t=>null===t||"object"!=typeof t&&"function"!=typeof t,a$3=Array.isArray,u$3=t=>a$3(t)||"function"==typeof t?.[Symbol.iterator],d$2="[ \t\n\f\r]",f$4=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v$1=/-->/g,_$1=/>/g,m$1=RegExp(`>|${d$2}(?:([^\\s"'>=/]+)(${d$2}*=${d$2}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),p$2=/'/g,g$1=/"/g,$$1=/^(?:script|style|textarea|title)$/i,y$2=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x$1=y$2(1),T$1=Symbol.for("lit-noChange"),E$1=Symbol.for("lit-nothing"),A$1=new WeakMap,C$1=r$3.createTreeWalker(r$3,129);function P$1(t,i){if(!a$3(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==s$4?s$4.createHTML(i):i}const V$1=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"<svg>":3===i?"<math>":"",c=f$4;for(let i=0;i<s;i++){const s=t[i];let a,u,d=-1,y=0;for(;y<s.length&&(c.lastIndex=y,u=c.exec(s),null!==u);)y=c.lastIndex,c===f$4?"!--"===u[1]?c=v$1:void 0!==u[1]?c=_$1:void 0!==u[2]?($$1.test(u[2])&&(r=RegExp("</"+u[2],"g")),c=m$1):void 0!==u[3]&&(c=m$1):c===m$1?">"===u[0]?(c=r??f$4,d=-1):void 0===u[1]?d=-2:(d=c.lastIndex-u[2].length,a=u[1],c=void 0===u[3]?m$1:'"'===u[3]?g$1:p$2):c===g$1||c===p$2?c=m$1:c===v$1||c===_$1?c=f$4:(c=m$1,r=void 0);const x=c===m$1&&t[i+1].startsWith("/>")?" ":"";l+=c===f$4?s+n$5:d>=0?(o.push(a),s.slice(0,d)+e$5+s.slice(d)+h$4+x):s+h$4+(-2===d?i:x);}return [P$1(t,l+(t[s]||"<?>")+(2===i?"</svg>":3===i?"</math>":"")),o]};let N$1 = class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V$1(t,s);if(this.el=N.createElement(f,n),C$1.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C$1.nextNode())&&d.length<u;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(e$5)){const i=v[a++],s=r.getAttribute(t).split(h$4),e=/([.?@])?(.*)/.exec(i);d.push({type:1,index:c,name:e[2],strings:s,ctor:"."===e[1]?H$1:"?"===e[1]?I$1:"@"===e[1]?L$1:k$1}),r.removeAttribute(t);}else t.startsWith(h$4)&&(d.push({type:6,index:c}),r.removeAttribute(t));if($$1.test(r.tagName)){const t=r.textContent.split(h$4),s=t.length-1;if(s>0){r.textContent=i$5?i$5.emptyScript:"";for(let i=0;i<s;i++)r.append(t[i],l$3()),C$1.nextNode(),d.push({type:2,index:++c});r.append(t[s],l$3());}}}else if(8===r.nodeType)if(r.data===o$7)d.push({type:2,index:c});else {let t=-1;for(;-1!==(t=r.data.indexOf(h$4,t+1));)d.push({type:7,index:c}),t+=h$4.length-1;}c++;}}static createElement(t,i){const s=r$3.createElement("template");return s.innerHTML=t,s}};function S$2(t,i,s=t,e){if(i===T$1)return i;let h=void 0!==e?s._$Co?.[e]:s._$Cl;const o=c$4(i)?void 0:i._$litDirective$;return h?.constructor!==o&&(h?._$AO?.(false),void 0===o?h=void 0:(h=new o(t),h._$AT(t,s,e)),void 0!==e?(s._$Co??=[])[e]=h:s._$Cl=h),void 0!==h&&(i=S$2(t,h._$AS(t,i.values),h,e)),i}let M$1 = class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:i},parts:s}=this._$AD,e=(t?.creationScope??r$3).importNode(i,true);C$1.currentNode=e;let h=C$1.nextNode(),o=0,n=0,l=s[0];for(;void 0!==l;){if(o===l.index){let i;2===l.type?i=new R$1(h,h.nextSibling,this,t):1===l.type?i=new l.ctor(h,l.name,l.strings,this,t):6===l.type&&(i=new z$1(h,this,t)),this._$AV.push(i),l=s[++n];}o!==l?.index&&(h=C$1.nextNode(),o++);}return C$1.currentNode=r$3,e}p(t){let i=0;for(const s of this._$AV) void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++;}};let R$1 = class R{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,s,e){this.type=2,this._$AH=E$1,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cv=e?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t?.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S$2(this,t,i),c$4(t)?t===E$1||null==t||""===t?(this._$AH!==E$1&&this._$AR(),this._$AH=E$1):t!==this._$AH&&t!==T$1&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):u$3(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==E$1&&c$4(this._$AH)?this._$AA.nextSibling.data=t:this.T(r$3.createTextNode(t)),this._$AH=t;}$(t){const{values:i,_$litType$:s}=t,e="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=N$1.createElement(P$1(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===e)this._$AH.p(i);else {const t=new M$1(e,this),s=t.u(this.options);t.p(i),this.T(s),this._$AH=t;}}_$AC(t){let i=A$1.get(t.strings);return void 0===i&&A$1.set(t.strings,i=new N$1(t)),i}k(t){a$3(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const h of t)e===i.length?i.push(s=new R(this.O(l$3()),this.O(l$3()),this,this.options)):s=i[e],s._$AI(h),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e);}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(false,true,i);t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i;}}setConnected(t){ void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t));}};let k$1 = class k{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,s,e,h){this.type=1,this._$AH=E$1,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=h,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=E$1;}_$AI(t,i=this,s,e){const h=this.strings;let o=false;if(void 0===h)t=S$2(this,t,i,0),o=!c$4(t)||t!==this._$AH&&t!==T$1,o&&(this._$AH=t);else {const e=t;let n,r;for(t=h[0],n=0;n<h.length-1;n++)r=S$2(this,e[s+n],i,n),r===T$1&&(r=this._$AH[n]),o||=!c$4(r)||r!==this._$AH[n],r===E$1?t=E$1:t!==E$1&&(t+=(r??"")+h[n+1]),this._$AH[n]=r;}o&&!e&&this.j(t);}j(t){t===E$1?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}};let H$1 = class H extends k$1{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===E$1?void 0:t;}};let I$1 = class I extends k$1{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==E$1);}};let L$1 = class L extends k$1{constructor(t,i,s,e,h){super(t,i,s,e,h),this.type=5;}_$AI(t,i=this){if((t=S$2(this,t,i,0)??E$1)===T$1)return;const s=this._$AH,e=t===E$1&&s!==E$1||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,h=t!==E$1&&(s===E$1||e);e&&this.element.removeEventListener(this.name,this,s),h&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}};let z$1 = class z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s;}get _$AU(){return this._$AM._$AU}_$AI(t){S$2(this,t);}};const j$1=t$2.litHtmlPolyfillSupport;j$1?.(N$1,R$1),(t$2.litHtmlVersions??=[]).push("3.3.1");const B$1=(t,i,s)=>{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R$1(i.insertBefore(l$3(),t),t,void 0,s??{});}return h._$AI(t),h};
7
-
8
- /**
9
- * @license
10
- * Copyright 2020 Google LLC
11
- * SPDX-License-Identifier: BSD-3-Clause
12
- */
13
- const a$2=Symbol.for(""),o$6=t=>{if(t?.r===a$2)return t?._$litStatic$},s$3=t=>({_$litStatic$:t,r:a$2}),i$4=(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$2}),l$2=new Map,n$4=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$6(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$2.get(t))&&(n.raw=n,l$2.set(t,r=n)),e=u;}return t(r,...e)},u$2=n$4(x$1);
14
-
15
- /**
16
- * @license
17
- * Copyright 2019 Google LLC
18
- * SPDX-License-Identifier: BSD-3-Clause
19
- */
20
- const t$1=globalThis,e$4=t$1.ShadowRoot&&(void 0===t$1.ShadyCSS||t$1.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s$2=Symbol(),o$5=new WeakMap;let n$3 = class n{constructor(t,e,o){if(this._$cssResult$=true,o!==s$2)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e$4&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o$5.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o$5.set(s,t));}return t}toString(){return this.cssText}};const r$2=t=>new n$3("string"==typeof t?t:t+"",void 0,s$2),i$3=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(true===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1]),t[0]);return new n$3(o,t,s$2)},S$1=(s,o)=>{if(e$4)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement("style"),n=t$1.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c$3=e$4?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r$2(e)})(t):t;
21
-
22
- /**
23
- * @license
24
- * Copyright 2017 Google LLC
25
- * SPDX-License-Identifier: BSD-3-Clause
26
- */const{is:i$2,defineProperty:e$3,getOwnPropertyDescriptor:h$3,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$1=globalThis,c$2=a$1.trustedTypes,l$1=c$2?c$2.emptyScript:"",p$1=a$1.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$1={toAttribute(t,s){switch(s){case Boolean:t=t?l$1: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$3=(t,s)=>!i$2(t,s),b$1={attribute:true,type:String,converter:u$1,reflect:false,useDefault:false,hasChanged:f$3};Symbol.metadata??=Symbol("metadata"),a$1.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$1){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$3(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$1}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$3(s));}else void 0!==s&&i.push(c$3(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$1).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$1;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$3)(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$1.reactiveElementVersions??=[]).push("2.1.1");
27
-
28
- /**
29
- * @license
30
- * Copyright 2017 Google LLC
31
- * SPDX-License-Identifier: BSD-3-Clause
32
- */const s$1=globalThis;let i$1 = class i extends y$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B$1(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T$1}};i$1._$litElement$=true,i$1["finalized"]=true,s$1.litElementHydrateSupport?.({LitElement:i$1});const o$3=s$1.litElementPolyfillSupport;o$3?.({LitElement:i$1});(s$1.litElementVersions??=[]).push("4.2.1");
33
-
34
- /**
35
- * @license
36
- * Copyright 2020 Google LLC
37
- * SPDX-License-Identifier: BSD-3-Clause
38
- */const f$2=o=>void 0===o.strings;
39
-
40
- /**
41
- * @license
42
- * Copyright 2017 Google LLC
43
- * SPDX-License-Identifier: BSD-3-Clause
44
- */
45
- const t={ATTRIBUTE:1,CHILD:2},e$2=t=>(...e)=>({_$litDirective$:t,values:e});class i{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
46
-
47
- /**
48
- * @license
49
- * Copyright 2017 Google LLC
50
- * SPDX-License-Identifier: BSD-3-Clause
51
- */const s=(i,t)=>{const e=i._$AN;if(void 0===e)return false;for(const i of e)i._$AO?.(t,false),s(i,t);return true},o$2=i=>{let t,e;do{if(void 0===(t=i._$AM))break;e=t._$AN,e.delete(i),i=t;}while(0===e?.size)},r=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),c$1(t);}};function h$2(i){ void 0!==this._$AN?(o$2(this),this._$AM=i,r(this)):this._$AM=i;}function n$1(i,t=false,e=0){const r=this._$AH,h=this._$AN;if(void 0!==h&&0!==h.size)if(t)if(Array.isArray(r))for(let i=e;i<r.length;i++)s(r[i],false),o$2(r[i]);else null!=r&&(s(r,false),o$2(r));else s(this,i);}const c$1=i=>{i.type==t.CHILD&&(i._$AP??=n$1,i._$AQ??=h$2);};let f$1 = class f extends i{constructor(){super(...arguments),this._$AN=void 0;}_$AT(i,t,e){super._$AT(i,t,e),r(this),this.isConnected=i._$AU;}_$AO(i,t=true){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(s(this,i),o$2(this));}setValue(t){if(f$2(this._$Ct))this._$Ct._$AI(t,this);else {const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0);}}disconnected(){}reconnected(){}};
52
-
53
- /**
54
- * @license
55
- * Copyright 2020 Google LLC
56
- * SPDX-License-Identifier: BSD-3-Clause
57
- */const e$1=()=>new h$1;let h$1 = class h{};const o$1=new WeakMap,n=e$2(class extends f$1{render(i){return E$1}update(i,[s]){const e=s!==this.G;return e&&void 0!==this.G&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=s,this.ht=i.options?.host,this.rt(this.ct=i.element)),E$1}rt(t){if(this.isConnected||(t=void 0),"function"==typeof this.G){const i=this.ht??globalThis;let s=o$1.get(i);void 0===s&&(s=new WeakMap,o$1.set(i,s)),void 0!==s.get(this.G)&&this.G.call(this.ht,void 0),s.set(this.G,t),void 0!==t&&this.G.call(this.ht,t);}else this.G.value=t;}get lt(){return "function"==typeof this.G?o$1.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0);}reconnected(){this.rt(this.ct);}});
58
-
59
- // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
60
- // See LICENSE in the project root for license information.
61
-
62
-
63
- class AuroDependencyVersioning {
64
-
65
- /**
66
- * Generates a unique string to be used for child auro element naming.
67
- * @private
68
- * @param {string} baseName - Defines the first part of the unique element name.
69
- * @param {string} version - Version of the component that will be appended to the baseName.
70
- * @returns {string} - Unique string to be used for naming.
71
- */
72
- generateElementName(baseName, version) {
73
- let result = baseName;
74
-
75
- result += '-';
76
- result += version.replace(/[.]/g, '_');
77
-
78
- return result;
79
- }
80
-
81
- /**
82
- * Generates a unique string to be used for child auro element naming.
83
- * @param {string} baseName - Defines the first part of the unique element name.
84
- * @param {string} version - Version of the component that will be appended to the baseName.
85
- * @returns {string} - Unique string to be used for naming.
86
- */
87
- generateTag(baseName, version, tagClass) {
88
- const elementName = this.generateElementName(baseName, version);
89
- const tag = i$4`${s$3(elementName)}`;
90
-
91
- if (!customElements.get(elementName)) {
92
- customElements.define(elementName, class extends tagClass {});
93
- }
94
-
95
- return tag;
96
- }
97
- }
98
-
99
- // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
100
- // See LICENSE in the project root for license information.
101
-
102
- // ---------------------------------------------------------------------
103
-
104
- /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
105
-
106
- class AuroLibraryRuntimeUtils {
107
-
108
- /* eslint-disable jsdoc/require-param */
109
-
110
- /**
111
- * This will register a new custom element with the browser.
112
- * @param {String} name - The name of the custom element.
113
- * @param {Object} componentClass - The class to register as a custom element.
114
- * @returns {void}
115
- */
116
- registerComponent(name, componentClass) {
117
- if (!customElements.get(name)) {
118
- customElements.define(name, class extends componentClass {});
119
- }
120
- }
121
-
122
- /**
123
- * Finds and returns the closest HTML Element based on a selector.
124
- * @returns {void}
125
- */
126
- closestElement(
127
- selector, // selector like in .closest()
128
- base = this, // extra functionality to skip a parent
129
- __Closest = (el, found = el && el.closest(selector)) =>
130
- !el || el === document || el === window
131
- ? null // standard .closest() returns null for non-found selectors also
132
- : found
133
- ? found // found a selector INside this element
134
- : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
135
- ) {
136
- return __Closest(base);
137
- }
138
- /* eslint-enable jsdoc/require-param */
139
-
140
- /**
141
- * 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.
142
- * @param {Object} elem - The element to check.
143
- * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
144
- * @returns {void}
145
- */
146
- handleComponentTagRename(elem, tagName) {
147
- const tag = tagName.toLowerCase();
148
- const elemTag = elem.tagName.toLowerCase();
149
-
150
- if (elemTag !== tag) {
151
- elem.setAttribute(tag, true);
152
- }
153
- }
154
-
155
- /**
156
- * Validates if an element is a specific Auro component.
157
- * @param {Object} elem - The element to validate.
158
- * @param {String} tagName - The name of the Auro component to check against.
159
- * @returns {Boolean} - Returns true if the element is the specified Auro component.
160
- */
161
- elementMatch(elem, tagName) {
162
- const tag = tagName.toLowerCase();
163
- const elemTag = elem.tagName.toLowerCase();
164
-
165
- return elemTag === tag || elem.hasAttribute(tag);
166
- }
167
- }
168
-
169
- /**
170
- * @license
171
- * Copyright 2018 Google LLC
172
- * SPDX-License-Identifier: BSD-3-Clause
173
- */const e=e$2(class extends i{constructor(t$1){if(super(t$1),t$1.type!==t.ATTRIBUTE||"class"!==t$1.name||t$1.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return " "+Object.keys(t).filter((s=>t[s])).join(" ")+" "}update(s,[i]){if(void 0===this.st){this.st=new Set,void 0!==s.strings&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in i)i[t]&&!this.nt?.has(t)&&this.st.add(t);return this.render(i)}const r=s.element.classList;for(const t of this.st)t in i||(r.remove(t),this.st.delete(t));for(const t in i){const s=!!i[t];s===this.st.has(t)||this.nt?.has(t)||(s?(r.add(t),this.st.add(t)):(r.remove(t),this.st.delete(t)));}return T$1}});
174
-
175
- /**
176
- * @license
177
- * Copyright 2018 Google LLC
178
- * SPDX-License-Identifier: BSD-3-Clause
179
- */const o=o=>o??E$1;
180
-
181
- const a=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])",'[role="tab"]:not([disabled])','[role="link"]:not([disabled])','[role="button"]:not([disabled])','[tabindex]:not([tabindex="-1"])','[contenteditable]:not([contenteditable="false"])'],l=["auro-checkbox","auro-radio","auro-dropdown","auro-button","auro-combobox","auro-input","auro-counter","auro-select","auro-datepicker","auro-hyperlink","auro-accordion"];function c(t){const e=[],n=t=>{if(t.nodeType===Node.ELEMENT_NODE){if(function(t){const e=t.tagName.toLowerCase();return !(!l.some(n=>t.hasAttribute(n)||e===n)||t.hasAttribute("disabled")||e.match("hyperlink")&&!t.hasAttribute("href"))}(t))return void e.push(t);for(const n of a)if(t.matches?.(n)){e.push(t);break}if(t.shadowRoot&&t.shadowRoot.children&&Array.from(t.shadowRoot.children).forEach(t=>{n(t);}),"SLOT"===t.tagName){const e=t.assignedNodes({flatten:true});for(const t of e)n(t);}else t.children&&Array.from(t.children).forEach(t=>{n(t);});}};n(t);const o=[],i=new Set;for(const t of e)i.has(t)||(i.add(t),o.push(t));const r=o.filter(t=>t.hasAttribute("tabindex")&&(parseInt(t.getAttribute("tabindex"))??-1)>0);r.sort((t,e)=>parseInt(t.getAttribute("tabindex"),10)-parseInt(e.getAttribute("tabindex"),10));const s=o.filter(t=>!t.hasAttribute("tabindex")||0===(parseInt(t.getAttribute("tabindex"))??-1));return [...r,...s]}class h{constructor(t,e=false){if(!(t&&t instanceof HTMLElement))throw new Error("FocusTrap requires a valid HTMLElement.");this.container=t,this.tabDirection="forward",this.controlTabOrder=e,this._init();}_init(){"inert"in HTMLElement.prototype&&(this.container.inert=false,this.container.setAttribute("data-focus-trap-container",true)),this.container.addEventListener("keydown",this._onKeydown);}_getActiveElements(){let{activeElement:t}=document;const e=[t];for(;t?.shadowRoot?.activeElement;)e.push(t.shadowRoot.activeElement),t=t.shadowRoot.activeElement;return e}_getNextFocusIndex(t,e,n){const o=n.includes(e[0])||n.includes(this.container),i=n.includes(e[e.length-1]);if(this.controlTabOrder){let n=t+("forward"===this.tabDirection?1:-1);return n<0&&(n=e.length-1),n>=e.length&&(n=0),n}return "backward"===this.tabDirection&&o?e.length-1:"forward"===this.tabDirection&&i?0:null}_handleTabKey(t){const e=this._getFocusableElements();if(!e.length)return void console.warn("FocusTrap: No focusable elements found in the container.");this.tabDirection=t.shiftKey?"backward":"forward";const n=this._getActiveElements();let o=e.findIndex(t=>n.includes(t));-1===o&&(o=0);let i=this._getNextFocusIndex(o,e,n);null!==i&&(t.preventDefault(),e[i].focus());}_onKeydown=t=>{"Tab"===t.key&&this._handleTabKey(t);};_getFocusableElements(){return c(this.container)}focusFirstElement(){const t=this._getFocusableElements();t.length&&t[0].focus();}focusLastElement(){const t=this._getFocusableElements();t.length&&t[t.length-1].focus();}disconnect(){this.container.hasAttribute("data-focus-trap-container")&&this.container.removeAttribute("data-focus-trap-container"),this.container.removeEventListener("keydown",this._onKeydown);}}const u={fromAttribute:t=>null!=t&&(""===t||"false"!==t.toLowerCase()),toAttribute:t=>t?"":null},d=["top","right","bottom","left"],f=["start","end"],p=d.reduce((t,e)=>t.concat(e,e+"-"+f[0],e+"-"+f[1]),[]),g=Math.min,m=Math.max,v=Math.round,w=Math.floor,y=t=>({x:t,y:t}),b={left:"right",right:"left",bottom:"top",top:"bottom"},_={start:"end",end:"start"};function x(t,e,n){return m(t,g(e,n))}function E(t,e){return "function"==typeof t?t(e):t}function T(t){return t.split("-")[0]}function S(t){return t.split("-")[1]}function R(t){return "y"===t?"height":"width"}const L=new Set(["top","bottom"]);function C(t){return L.has(T(t))?"y":"x"}function P(t){return "x"===C(t)?"y":"x"}function A(t,e,n){ void 0===n&&(n=false);const o=S(t),i=P(t),r=R(i);let s="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=D(s)),[s,D(s)]}function O(t){return t.replace(/start|end/g,t=>_[t])}const k=["left","right"],F=["right","left"],B=["top","bottom"],H=["bottom","top"];function I(t,e,n,o){const i=S(t);let r=function(t,e,n){switch(t){case "top":case "bottom":return n?e?F:k:e?k:F;case "left":case "right":return e?B:H;default:return []}}(T(t),"start"===n,o);return i&&(r=r.map(t=>t+"-"+i),e&&(r=r.concat(r.map(O)))),r}function D(t){return t.replace(/left|right|bottom|top/g,t=>b[t])}function N(t){return "number"!=typeof t?function(t){return {top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function $(t){const{x:e,y:n,width:o,height:i}=t;return {width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function V(t,e,n){let{reference:o,floating:i}=t;const r=C(e),s=P(e),a=R(s),l=T(e),c="y"===r,h=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,d=o[a]/2-i[a]/2;let f;switch(l){case "top":f={x:h,y:o.y-i.height};break;case "bottom":f={x:h,y:o.y+o.height};break;case "right":f={x:o.x+o.width,y:u};break;case "left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y};}switch(S(e)){case "start":f[s]-=d*(n&&c?-1:1);break;case "end":f[s]+=d*(n&&c?-1:1);}return f}async function W(t,e){var n;void 0===e&&(e={});const{x:o,y:i,platform:r,rects:s,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:h="viewport",elementContext:u="floating",altBoundary:d=false,padding:f=0}=E(e,t),p=N(f),g=a[d?"floating"===u?"reference":"floating":u],m=$(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(g)))||n?g:g.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:h,strategy:l})),v="floating"===u?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,w=await(null==r.getOffsetParent?void 0:r.getOffsetParent(a.floating)),y=await(null==r.isElement?void 0:r.isElement(w))&&await(null==r.getScale?void 0:r.getScale(w))||{x:1,y:1},b=$(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:w,strategy:l}):v);return {top:(m.top-b.top+p.top)/y.y,bottom:(b.bottom-m.bottom+p.bottom)/y.y,left:(m.left-b.left+p.left)/y.x,right:(b.right-m.right+p.right)/y.x}}function M(t,e){return {top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function j(t){return d.some(e=>t[e]>=0)}function z(t){const e=g(...t.map(t=>t.left)),n=g(...t.map(t=>t.top));return {x:e,y:n,width:m(...t.map(t=>t.right))-e,height:m(...t.map(t=>t.bottom))-n}}const K=new Set(["left","top"]);function Y(){return "undefined"!=typeof window}function q(t){return G(t)?(t.nodeName||"").toLowerCase():"#document"}function U(t){var e;return (null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function X(t){var e;return null==(e=(G(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function G(t){return !!Y()&&(t instanceof Node||t instanceof U(t).Node)}function J(t){return !!Y()&&(t instanceof Element||t instanceof U(t).Element)}function Q(t){return !!Y()&&(t instanceof HTMLElement||t instanceof U(t).HTMLElement)}function Z(t){return !(!Y()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof U(t).ShadowRoot)}const tt=new Set(["inline","contents"]);function et(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=ft(t);return /auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!tt.has(i)}const nt=new Set(["table","td","th"]);function ot(t){return nt.has(q(t))}const it=[":popover-open",":modal"];function rt(t){return it.some(e=>{try{return t.matches(e)}catch(t){return false}})}const st=["transform","translate","scale","rotate","perspective"],at=["transform","translate","scale","rotate","perspective","filter"],lt=["paint","layout","strict","content"];function ct(t){const e=ht(),n=J(t)?ft(t):t;return st.some(t=>!!n[t]&&"none"!==n[t])||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||at.some(t=>(n.willChange||"").includes(t))||lt.some(t=>(n.contain||"").includes(t))}function ht(){return !("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ut=new Set(["html","body","#document"]);function dt(t){return ut.has(q(t))}function ft(t){return U(t).getComputedStyle(t)}function pt(t){return J(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function gt(t){if("html"===q(t))return t;const e=t.assignedSlot||t.parentNode||Z(t)&&t.host||X(t);return Z(e)?e.host:e}function mt(t){const e=gt(t);return dt(e)?t.ownerDocument?t.ownerDocument.body:t.body:Q(e)&&et(e)?e:mt(e)}function vt(t,e,n){var o;void 0===e&&(e=[]),void 0===n&&(n=true);const i=mt(t),r=i===(null==(o=t.ownerDocument)?void 0:o.body),s=U(i);if(r){const t=wt(s);return e.concat(s,s.visualViewport||[],et(i)?i:[],t&&n?vt(t):[])}return e.concat(i,vt(i,[],n))}function wt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function yt(t){const e=ft(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=Q(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,a=v(n)!==r||v(o)!==s;return a&&(n=r,o=s),{width:n,height:o,$:a}}function bt(t){return J(t)?t:t.contextElement}function _t(t){const e=bt(t);if(!Q(e))return y(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=yt(e);let s=(r?v(n.width):n.width)/o,a=(r?v(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const xt=y(0);function Et(t){const e=U(t);return ht()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:xt}function Tt(t,e,n,o){ void 0===e&&(e=false),void 0===n&&(n=false);const i=t.getBoundingClientRect(),r=bt(t);let s=y(1);e&&(o?J(o)&&(s=_t(o)):s=_t(t));const a=function(t,e,n){return void 0===e&&(e=false),!(!n||e&&n!==U(t))&&e}(r,n,o)?Et(r):y(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,h=i.width/s.x,u=i.height/s.y;if(r){const t=U(r),e=o&&J(o)?U(o):o;let n=t,i=wt(n);for(;i&&o&&e!==n;){const t=_t(i),e=i.getBoundingClientRect(),o=ft(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,s=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x,c*=t.y,h*=t.x,u*=t.y,l+=r,c+=s,n=U(i),i=wt(n);}}return $({width:h,height:u,x:l,y:c})}function St(t,e){const n=pt(t).scrollLeft;return e?e.left+n:Tt(X(t)).left+n}function Rt(t,e,n){ void 0===n&&(n=false);const o=t.getBoundingClientRect();return {x:o.left+e.scrollLeft-(n?0:St(t,o)),y:o.top+e.scrollTop}}const Lt=new Set(["absolute","fixed"]);function Ct(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=U(t),o=X(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,a=0,l=0;if(i){r=i.width,s=i.height;const t=ht();(!t||t&&"fixed"===e)&&(a=i.offsetLeft,l=i.offsetTop);}return {width:r,height:s,x:a,y:l}}(t,n);else if("document"===e)o=function(t){const e=X(t),n=pt(t),o=t.ownerDocument.body,i=m(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=m(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+St(t);const a=-n.scrollTop;return "rtl"===ft(o).direction&&(s+=m(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:a}}(X(t));else if(J(e))o=function(t,e){const n=Tt(t,true,"fixed"===e),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=Q(t)?_t(t):y(1);return {width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:i*r.x,y:o*r.y}}(e,n);else {const n=Et(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height};}return $(o)}function Pt(t,e){const n=gt(t);return !(n===e||!J(n)||dt(n))&&("fixed"===ft(n).position||Pt(n,e))}function At(t,e,n){const o=Q(e),i=X(e),r="fixed"===n,s=Tt(t,true,r,e);let a={scrollLeft:0,scrollTop:0};const l=y(0);function c(){l.x=St(i);}if(o||!o&&!r)if(("body"!==q(e)||et(i))&&(a=pt(e)),o){const t=Tt(e,true,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop;}else i&&c();r&&!o&&i&&c();const h=!i||o||r?y(0):Rt(i,a);return {x:s.left+a.scrollLeft-l.x-h.x,y:s.top+a.scrollTop-l.y-h.y,width:s.width,height:s.height}}function Ot(t){return "static"===ft(t).position}function kt(t,e){if(!Q(t)||"fixed"===ft(t).position)return null;if(e)return e(t);let n=t.offsetParent;return X(t)===n&&(n=n.ownerDocument.body),n}function Ft(t,e){const n=U(t);if(rt(t))return n;if(!Q(t)){let e=gt(t);for(;e&&!dt(e);){if(J(e)&&!Ot(e))return e;e=gt(e);}return n}let o=kt(t,e);for(;o&&ot(o)&&Ot(o);)o=kt(o,e);return o&&dt(o)&&Ot(o)&&!ct(o)?n:o||function(t){let e=gt(t);for(;Q(e)&&!dt(e);){if(ct(e))return e;if(rt(e))return null;e=gt(e);}return null}(t)||n}const Bt={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r="fixed"===i,s=X(o),a=!!e&&rt(e.floating);if(o===s||a&&r)return n;let l={scrollLeft:0,scrollTop:0},c=y(1);const h=y(0),u=Q(o);if((u||!u&&!r)&&(("body"!==q(o)||et(s))&&(l=pt(o)),Q(o))){const t=Tt(o);c=_t(o),h.x=t.x+o.clientLeft,h.y=t.y+o.clientTop;}const d=!s||u||r?y(0):Rt(s,l,true);return {width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+h.x+d.x,y:n.y*c.y-l.scrollTop*c.y+h.y+d.y}},getDocumentElement:X,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[..."clippingAncestors"===n?rt(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=vt(t,[],false).filter(t=>J(t)&&"body"!==q(t)),i=null;const r="fixed"===ft(t).position;let s=r?gt(t):t;for(;J(s)&&!dt(s);){const e=ft(s),n=ct(s);n||"fixed"!==e.position||(i=null),(r?!n&&!i:!n&&"static"===e.position&&i&&Lt.has(i.position)||et(s)&&!n&&Pt(t,s))?o=o.filter(t=>t!==s):i=e,s=gt(s);}return e.set(t,o),o}(e,this._c):[].concat(n),o],s=r[0],a=r.reduce((t,n)=>{const o=Ct(e,n,i);return t.top=m(o.top,t.top),t.right=g(o.right,t.right),t.bottom=g(o.bottom,t.bottom),t.left=m(o.left,t.left),t},Ct(e,s,i));return {width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:Ft,getElementRects:async function(t){const e=this.getOffsetParent||Ft,n=this.getDimensions,o=await n(t.floating);return {reference:At(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=yt(t);return {width:e,height:n}},getScale:_t,isElement:J,isRTL:function(t){return "rtl"===ft(t).direction}};function Ht(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function It(t,e,n,o){ void 0===o&&(o={});const{ancestorScroll:i=true,ancestorResize:r=true,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=false}=o,c=bt(t),h=i||r?[...c?vt(c):[],...vt(e)]:[];h.forEach(t=>{i&&t.addEventListener("scroll",n,{passive:true}),r&&t.addEventListener("resize",n);});const u=c&&a?function(t,e){let n,o=null;const i=X(t);function r(){var t;clearTimeout(n),null==(t=o)||t.disconnect(),o=null;}return function s(a,l){ void 0===a&&(a=false),void 0===l&&(l=1),r();const c=t.getBoundingClientRect(),{left:h,top:u,width:d,height:f}=c;if(a||e(),!d||!f)return;const p={rootMargin:-w(u)+"px "+-w(i.clientWidth-(h+d))+"px "+-w(i.clientHeight-(u+f))+"px "+-w(h)+"px",threshold:m(0,g(1,l))||1};let v=true;function y(e){const o=e[0].intersectionRatio;if(o!==l){if(!v)return s();o?s(false,o):n=setTimeout(()=>{s(false,1e-7);},1e3);}1!==o||Ht(c,t.getBoundingClientRect())||s(),v=false;}try{o=new IntersectionObserver(y,{...p,root:i.ownerDocument});}catch(t){o=new IntersectionObserver(y,p);}o.observe(t);}(true),r}(c,n):null;let d,f=-1,p=null;s&&(p=new ResizeObserver(t=>{let[o]=t;o&&o.target===c&&p&&(p.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var t;null==(t=p)||t.observe(e);})),n();}),c&&!l&&p.observe(c),p.observe(e));let v=l?Tt(t):null;return l&&function e(){const o=Tt(t);v&&!Ht(v,o)&&n();v=o,d=requestAnimationFrame(e);}(),n(),()=>{var t;h.forEach(t=>{i&&t.removeEventListener("scroll",n),r&&t.removeEventListener("resize",n);}),null==u||u(),null==(t=p)||t.disconnect(),p=null,l&&cancelAnimationFrame(d);}}const Dt=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:a}=e,l=await async function(t,e){const{placement:n,platform:o,elements:i}=t,r=await(null==o.isRTL?void 0:o.isRTL(i.floating)),s=T(n),a=S(n),l="y"===C(n),c=K.has(s)?-1:1,h=r&&l?-1:1,u=E(e,t);let{mainAxis:d,crossAxis:f,alignmentAxis:p}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return a&&"number"==typeof p&&(f="end"===a?-1*p:p),l?{x:f*h,y:d*c}:{x:d*c,y:f*h}}(e,t);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(o=a.arrow)&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},Nt=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;const{rects:r,middlewareData:s,placement:a,platform:l,elements:c}=e,{crossAxis:h=false,alignment:u,allowedPlacements:d=p,autoAlignment:f=true,...g}=E(t,e),m=void 0!==u||d===p?function(t,e,n){return (t?[...n.filter(e=>S(e)===t),...n.filter(e=>S(e)!==t)]:n.filter(t=>T(t)===t)).filter(n=>!t||S(n)===t||!!e&&O(n)!==n)}(u||null,f,d):d,v=await W(e,g),w=(null==(n=s.autoPlacement)?void 0:n.index)||0,y=m[w];if(null==y)return {};const b=A(y,r,await(null==l.isRTL?void 0:l.isRTL(c.floating)));if(a!==y)return {reset:{placement:m[0]}};const _=[v[T(y)],v[b[0]],v[b[1]]],x=[...(null==(o=s.autoPlacement)?void 0:o.overflows)||[],{placement:y,overflows:_}],R=m[w+1];if(R)return {data:{index:w+1,overflows:x},reset:{placement:R}};const L=x.map(t=>{const e=S(t.placement);return [t.placement,e&&h?t.overflows.slice(0,2).reduce((t,e)=>t+e,0):t.overflows[0],t.overflows]}).sort((t,e)=>t[1]-e[1]),C=(null==(i=L.filter(t=>t[2].slice(0,S(t[0])?2:3).every(t=>t<=0))[0])?void 0:i[0])||L[0][0];return C!==a?{data:{index:w+1,overflows:x},reset:{placement:C}}:{}}}},$t=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:h=true,crossAxis:u=true,fallbackPlacements:d,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=true,...m}=E(t,e);if(null!=(n=r.arrow)&&n.alignmentOffset)return {};const v=T(i),w=C(a),y=T(a)===a,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),_=d||(y||!g?[D(a)]:function(t){const e=D(t);return [O(t),e,O(e)]}(a)),x="none"!==p;!d&&x&&_.push(...I(a,g,p,b));const S=[a,..._],R=await W(e,m),L=[];let P=(null==(o=r.flip)?void 0:o.overflows)||[];if(h&&L.push(R[v]),u){const t=A(i,s,b);L.push(R[t[0]],R[t[1]]);}if(P=[...P,{placement:i,overflows:L}],!L.every(t=>t<=0)){var k,F;const t=((null==(k=r.flip)?void 0:k.index)||0)+1,e=S[t];if(e){if(!("alignment"===u&&w!==C(e))||P.every(t=>t.overflows[0]>0&&C(t.placement)===w))return {data:{index:t,overflows:P},reset:{placement:e}}}let n=null==(F=P.filter(t=>t.overflows[0]<=0).sort((t,e)=>t.overflows[1]-e.overflows[1])[0])?void 0:F.placement;if(!n)switch(f){case "bestFit":{var B;const t=null==(B=P.filter(t=>{if(x){const e=C(t.placement);return e===w||"y"===e}return true}).map(t=>[t.placement,t.overflows.filter(t=>t>0).reduce((t,e)=>t+e,0)]).sort((t,e)=>t[1]-e[1])[0])?void 0:B[0];t&&(n=t);break}case "initialPlacement":n=a;}if(i!==n)return {reset:{placement:n}}}return {}}}},Vt=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...i}=E(t,e);switch(o){case "referenceHidden":{const t=M(await W(e,{...i,elementContext:"reference"}),n.reference);return {data:{referenceHiddenOffsets:t,referenceHidden:j(t)}}}case "escaped":{const t=M(await W(e,{...i,altBoundary:true}),n.floating);return {data:{escapedOffsets:t,escaped:j(t)}}}default:return {}}}}},Wt=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:a,middlewareData:l}=e,{element:c,padding:h=0}=E(t,e)||{};if(null==c)return {};const u=N(h),d={x:n,y:o},f=P(i),p=R(f),m=await s.getDimensions(c),v="y"===f,w=v?"top":"left",y=v?"bottom":"right",b=v?"clientHeight":"clientWidth",_=r.reference[p]+r.reference[f]-d[f]-r.floating[p],T=d[f]-r.reference[f],L=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let C=L?L[b]:0;C&&await(null==s.isElement?void 0:s.isElement(L))||(C=a.floating[b]||r.floating[p]);const A=_/2-T/2,O=C/2-m[p]/2-1,k=g(u[w],O),F=g(u[y],O),B=k,H=C-m[p]-F,I=C/2-m[p]/2+A,D=x(B,I,H),$=!l.arrow&&null!=S(i)&&I!==D&&r.reference[p]/2-(I<B?k:F)-m[p]/2<0,V=$?I<B?I-B:I-H:0;return {[f]:d[f]+V,data:{[f]:D,centerOffset:I-D-V,...$&&{alignmentOffset:V}},reset:$}}}),Mt=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:i,platform:r,strategy:s}=e,{padding:a=2,x:l,y:c}=E(t,e),h=Array.from(await(null==r.getClientRects?void 0:r.getClientRects(o.reference))||[]),u=function(t){const e=t.slice().sort((t,e)=>t.y-e.y),n=[];let o=null;for(let t=0;t<e.length;t++){const i=e[t];!o||i.y-o.y>o.height/2?n.push([i]):n[n.length-1].push(i),o=i;}return n.map(t=>$(z(t)))}(h),d=$(z(h)),f=N(a);const p=await r.getElementRects({reference:{getBoundingClientRect:function(){if(2===u.length&&u[0].left>u[1].right&&null!=l&&null!=c)return u.find(t=>l>t.left-f.left&&l<t.right+f.right&&c>t.top-f.top&&c<t.bottom+f.bottom)||d;if(u.length>=2){if("y"===C(n)){const t=u[0],e=u[u.length-1],o="top"===T(n),i=t.top,r=e.bottom,s=o?t.left:e.left,a=o?t.right:e.right;return {top:i,bottom:r,left:s,right:a,width:a-s,height:r-i,x:s,y:i}}const t="left"===T(n),e=m(...u.map(t=>t.right)),o=g(...u.map(t=>t.left)),i=u.filter(n=>t?n.left===o:n.right===e),r=i[0].top,s=i[i.length-1].bottom;return {top:r,bottom:s,left:o,right:e,width:e-o,height:s-r,x:o,y:r}}return d}},floating:o.floating,strategy:s});return i.reference.x!==p.reference.x||i.reference.y!==p.reference.y||i.reference.width!==p.reference.width||i.reference.height!==p.reference.height?{reset:{rects:p}}:{}}}},jt=(t,e,n)=>{const o=new Map,i={platform:Bt,...n},r={...i.platform,_c:o};return (async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,a=r.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(e));let c=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:h,y:u}=V(c,o,l),d=o,f={},p=0;for(let n=0;n<a.length;n++){const{name:r,fn:g}=a[n],{x:m,y:v,data:w,reset:y}=await g({x:h,y:u,initialPlacement:o,placement:d,strategy:i,middlewareData:f,rects:c,platform:s,elements:{reference:t,floating:e}});h=null!=m?m:h,u=null!=v?v:u,f={...f,[r]:{...f[r],...w}},y&&p<=50&&(p++,"object"==typeof y&&(y.placement&&(d=y.placement),y.rects&&(c=true===y.rects?await s.getElementRects({reference:t,floating:e,strategy:i}):y.rects),({x:h,y:u}=V(c,d,l))),n=-1);}return {x:h,y:u,placement:d,strategy:i,middlewareData:f}})(t,e,{...i,platform:r})};class zt{constructor(t,e,n={}){this.referenceEl=t,this.floatingEl=e,this.options=n,this.setFloaterStyles(),false!==this.options.autoStart&&this.start(),this.cleanup=null;}setFloaterStyles(){if(!this.floatingEl)return;Object.assign(this.floatingEl.style,{position:"absolute",margin:"0"});}updatePosition(){if(!this.referenceEl||!this.floatingEl)return;const t=[].concat(this.options.offset&&0!==this.options.offset?Dt(this.options.offset):[],this.options.arrowEl?Wt({element:this.options.arrowEl}):[],this.options.useFlip?$t():[],this.options.useAutoPlacement?Nt():[],this.options.useHide?Vt():[],this.options.inline?Mt():[]);jt(this.referenceEl,this.floatingEl,{strategy:this.options.strategy||"absolute",placement:this.options.placement||"bottom-start",middleware:t}).then(({x:t,y:e,middlewareData:n})=>{Object.assign(this.floatingEl?.style??{},{visibility:n.hide?.referenceHidden?"hidden":"visible",left:`${t}px`,top:`${e}px`});});}start(){return this.cleanup&&this.cleanup(),this.cleanup=It(this.referenceEl,this.floatingEl,this.updatePosition.bind(this)),this.cleanup}stop(){this.cleanup&&(this.cleanup(),this.cleanup=null);}disconnect(){this.stop(),this.referenceEl=null,this.floatingEl=null;}}class Kt{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,n=(e,o=e&&e.closest(t))=>e&&e!==document&&e!==window?o||n(e.getRootNode().host):null){return n(e)}handleComponentTagRename(t,e){const n=e.toLowerCase();t.tagName.toLowerCase()!==n&&t.setAttribute(n,true);}elementMatch(t,e){const n=e.toLowerCase();return t.tagName.toLowerCase()===n||t.hasAttribute(n)}}var Yt=i$3`.popover,.popover-trigger{outline:inherit;background:inherit;border:inherit;padding:0;overflow:visible}:host(:not([shown])) .popover{opacity:0;pointer-events:none;position:absolute}.popover .popover-arrow{position:absolute}.popover .popover-arrow.direction-down{bottom:0;transform:translateY(100%)}.popover .popover-arrow.direction-up{top:0;transform:translateY(-100%)}.popover .popover-arrow.direction-left{left:0;transform:translate(-100%)}.popover .popover-arrow.direction-right{right:0;transform:translate(100%)}.popover-trigger{margin:0;width:inherit;font-size:inherit;text-align:inherit;font:inherit;display:inline-flex}:host([behavior\$=-fullscreen]) [popover]{width:100%;height:100%;top:0;left:0}.popover::backdrop{background:var(--auro-layover-backdrop-background, transparent);backdrop-filter:var(--auro-layover-backdrop-filter, none);opacity:var(--auro-layover-backdrop-opacity, 1);transition:var(--auro-layover-backdrop-transition, none)}
182
- `;const qt={disabled:false,type:"manual",behavior:"dropdown",showOnHover:false,showOnFocus:true,showOnChange:true,useHide:true,useFlip:true,offset:0,useAutoPlacement:false,placement:"bottom-start",inline:false,shown:false,hideOnNoValue:true},Ut={offset:0,placement:"bottom-start",strategy:"absolute"},Xt=["input","input-fullscreen","input-dropdown"],Gt=["dialog","dialog-fullscreen"],Jt=["dropdown"],Qt=["tooltip"];class Zt extends i$1{static register(t="auro-layover"){Kt.prototype.registerComponent(t,Zt);}constructor(){super(),this._setDefaults(qt),this._createElementRefs(),this._runtimeUtils=new Kt;}_createElementRefs(){this._popoverRef=e$1(),this._arrowElRef=e$1(),this._arrowSlotRef=e$1(),this._buttonRef=e$1(),this._positioningTargetRef=e$1(),this._triggerSlotRef=e$1();}_setDefaults(t){Object.keys(t).forEach(e=>{ void 0===this[e]&&(this[e]=t[e]);});}static get properties(){return {allowBodyScroll:{type:Boolean,reflect:true,converter:u},disabled:{type:Boolean,reflect:true},title:{type:String,reflect:false},type:{type:String,reflect:false},behavior:{type:String,reflect:true},offset:{type:Number,reflect:false},placement:{type:String,reflect:false},showOnHover:{type:Boolean,reflect:false},showOnFocus:{type:String,reflect:false,converter:u},showOnChange:{type:String,reflect:false,converter:u},hideOnNoValue:{type:String,reflect:false,converter:u},shown:{type:Boolean,reflect:true},matchWidth:{type:Boolean,reflect:false,converter:u},minInputLength:{type:Number,reflect:false},input:{type:Object,state:true},useHide:{type:String,reflect:false,converter:u},useAutoPlacement:{type:String,reflect:false,converter:u},useFlip:{type:String,reflect:false,converter:u},inline:{type:String,reflect:false,converter:u},_open:{type:Boolean,reflect:false,state:true},_hasTriggerContent:{type:Boolean,reflect:false,state:true},_currentBehaviorState:{type:String,state:true}}}static get styles(){return [Yt]}get button(){return this._buttonRef.value}get popover(){return this._popoverRef.value}get arrow(){return this._arrowElRef.value}toggle(){this._open?this.hide():this.show();}get _shouldPosition(){return ["dropdown","tooltip","input","input-dropdown"].includes(this.behavior)}show({internal:t=false}={}){this.popover&&!this.disabled&&(this._manageBehavior(this.behavior),this._matchPopoverToTriggerWidth(),this._disableBodyScroll(),this._shouldPosition?this._attachPopoverPositioner():this._detachPopoverPositioner(),this._shouldAdjustFocus&&this.popover.focus(),this._attachFocusTrap(),t||this.popover.showPopover(),this.shown=true,this._dispatchShowEvent());}hide({internal:t=false}={}){if(this.popover&&!this.disabled){if(this._resetBodyScroll(),this._detachPopoverPositioner(),this._detachFocusTrap(),t||this.popover.hidePopover(),this.shown=false,this._shouldAdjustFocus){const t=window.scrollY,e=this._triggerElInSlot||this.button;e?.focus({preventScroll:true}),window.scrollY!==t&&window.scrollTo({top:t,behavior:"instant"});}this._dispatchHideEvent();}}connectedCallback(){super.connectedCallback(),this._runtimeUtils=new Kt,this._runtimeUtils.handleComponentTagRename(this,"auro-layover");}updated(t){["input"].some(e=>t.has(e))&&this.input&&!this.behavior.match("input")&&(this.behavior="input"),["behavior","_hasTriggerContent","input"].some(e=>t.has(e))&&this._manageBehavior(this.behavior);}disconnectedCallback(){super.disconnectedCallback(),this._cleanupCurrentBehavior();}get _shouldAdjustFocus(){return ![...Xt,...Qt].includes(this.behavior)}get _dropdownOptions(){const{placement:t,offset:e,inline:n,useHide:o,useAutoPlacement:i,useFlip:r}=this;return {...Ut,arrowEl:this.arrow,placement:t,offset:e,inline:n,useHide:o,useAutoPlacement:i,useFlip:r}}get _shouldDisableBodyScroll(){return ["dialog"].includes(this.behavior)&&!this.allowBodyScroll}get _triggerSlot(){return this._triggerSlotRef.value}get _positioningTarget(){return this._positioningTargetRef.value}get _triggerElInSlot(){if(!this._triggerSlot)return;const t=this._triggerSlot.assignedNodes({flatten:true});t.length>1&&console.warn("\nAuroLayover: The input behavior requires a single trigger element to be passed to the trigger slot.\n\nExample:\n<auro-layover>\n\t<auro-button slot='trigger'>Click me</auro-button>\n</auro-layover>\n\nPassing more than one element may lead to undesireable behavior.\n");const e=t.find(t=>t.tagName);return t.length&&!e&&console.warn("\nAuroLayover: The trigger slot should not contain text nodes.\n\nExample:\n<auro-layover>\n\t<auro-button slot='trigger'>Click me</auro-button>\n</auro-layover>\n"),e??void 0}get _shouldAttachFocusTrap(){return !this._focusTrap&&!["input","input-dropdown",...Qt].includes(this.behavior)}_matchPopoverToTriggerWidth(){if(!this.matchWidth)return void(this.popover.style.width=null);const t=this._triggerElInSlot||this.button,{width:e}=t?.getBoundingClientRect()||{};this.popover.style.width=e?`${e}px`:"auto";}_calcType(t){return Xt.includes(t)?"manual":Gt.includes(t)||Jt.includes(t)?this._hasTriggerContent?"auto":"manual":Qt.includes(t)?"hint":"manual"}_manageBehavior(t=this.behavior){switch(this._currentBehaviorState=t,this._cleanupCurrentBehavior(),this.type=this._calcType(t),t){case "input":case "input-dropdown":case "input-fullscreen":this._bindToInput();break;case "dropdown":this.shown&&this._attachPopoverPositioner();break;case "tooltip":this.showOnHover=true,this._bindHover(),this.shown&&this._attachPopoverPositioner();break;case "dialog":case "dialog-fullscreen":break;default:console.warn(`AuroLayover: Unknown behavior type "${t}"`);}}_cleanupCurrentBehavior(){this._detachInput(),this._detachHover(),this._detachPopoverPositioner(),this._resetBodyScroll(),this._resetPositionStyles(),this._detachFocusTrap();}_resetPositionStyles(){this.popover&&(this.popover.style.margin=null,this.popover.style.position=null,this.popover.style.top=null,this.popover.style.left=null);}_attachFocusTrap(){this._shouldAttachFocusTrap&&(this._focusTrap=new h(this.popover,true),setTimeout(()=>{this._focusTrap&&this._focusTrap.focusFirstElement();}));}_detachFocusTrap(){this._focusTrap&&(this._focusTrap.disconnect(),this._focusTrap=null);}_attachPopoverPositioner(){this._positioningTarget&&this.popover&&(this._positioner=new zt(this._positioningTarget,this.popover,this._dropdownOptions));}_detachPopoverPositioner(){this._resetPositionStyles(),this._positioner&&(this._positioner.disconnect(),this._positioner=null);}_checkForInput(){!this.input&&this._triggerElInSlot&&this._triggerElInSlot.tagName.toLowerCase().match("input")&&(this.input=this._triggerElInSlot),this.input||setTimeout(()=>{if(!this.input)throw new Error("\nAuroLayover: The input behavior requires an input element to be passed to the trigger slot.\n\nExample:\n<auro-layover>\n\t<auro-input slot='trigger'></auro-input>\n</auro-layover>\n");this._bindToInput();},50);}_bindToInput(){this._checkForInput(),this.input&&(this.input.addEventListener("input",this._handleInputChange),this.input.addEventListener("focus",this._handleInputFocus),["input-fullscreen"].includes(this.behavior)||this.input.addEventListener("blur",this._handleInputBlur));}_detachInput(){const{input:t}=this;t&&(t.removeEventListener("focus",this._handleInputFocus),t.removeEventListener("input",this._handleInputChange),t.removeEventListener("blur",this._handleInputBlur));}_bindHover(){const t=this._triggerElInSlot;t&&(t.addEventListener("mouseover",this._handleOnHover),t.addEventListener("mouseout",this._handleOnHoverLeave));}_detachHover(){const t=this._triggerElInSlot;t&&(t.removeEventListener("mouseover",this._handleOnHover),t.removeEventListener("mouseout",this._handleOnHoverLeave));}_disableBodyScroll(){this._shouldDisableBodyScroll&&(document.documentElement.style.overflow="hidden");}_resetBodyScroll(){document.documentElement.style.overflow=null;}_dispatchShowEvent(){this.dispatchEvent(new CustomEvent("auro-layover-shown",{detail:{target:this,newState:"shown"},bubbles:true,composed:true})),this._dispatchChangeEvent({state:"shown"});}_dispatchHideEvent(){this.dispatchEvent(new CustomEvent("auro-layover-hidden",{detail:{target:this,newState:"hidden"},bubbles:true,composed:true})),this._dispatchChangeEvent({state:"hidden"});}_dispatchChangeEvent({state:t}){this.dispatchEvent(new CustomEvent("auro-layover-change",{detail:{target:this,newState:t},bubbles:true,composed:true}));}_dispatchBeforeChangeEvent({state:t}){this.dispatchEvent(new CustomEvent("auro-layover-beforechange",{detail:{target:this,newState:t},bubbles:true,composed:true}));}_inputPassesValueCheck=t=>{const{value:e}=t;return !(e&&e.length||this.hideOnNoValue)||(e&&e.length>=this.minInputLength||!this.minInputLength||this.minInputLength<=0)};_handleInputChange=t=>{if(!this.showOnChange)return false;const e=t.target;this._inputPassesValueCheck(e)?this.show():this.hide();};_handleInputFocus=t=>{if(!this.showOnFocus)return false;const e=t.target;this._inputPassesValueCheck(e)&&this.show();};_handleInputBlur=()=>{this.hide();};_handleTriggerSlotChange(){const t=this._triggerSlot.assignedNodes({flatten:true});this._hasTriggerContent=!!(t.length>0);}_handlePopoverBeforeToggle(t){const e="open"===t.newState;if(e)return this._dispatchBeforeChangeEvent({state:"shown"}),void this.show({internal:true});if(!e){if(window.closingLayover&&window.closingLayover!==this)return t.preventDefault(),t.stopPropagation(),void this.popover.showPopover();window.closingLayover=this,this._dispatchBeforeChangeEvent({state:"hidden"}),this.hide({internal:true});}}_handlePopoverToggle(t){const e="open"===t.newState,n=window.closingLayover===this;e||(n||this.popover.showPopover(),n&&setTimeout(()=>{window.closingLayover=null;}));}_handleOnHover=()=>{this.showOnHover&&this.show();};_handleOnHoverLeave=()=>{this.showOnHover&&this.hide();};_renderTriggerSlot(){return x$1`
183
- <span class="popover-trigger" ${n(this._positioningTargetRef)}>
184
- <slot
185
- name="trigger"
186
- ${n(this._triggerSlotRef)}
187
- @slotchange="${()=>this._handleTriggerSlotChange()}"
188
- ></slot>
189
- </span>
190
- `}_renderTrigger(){return ["manual","input"].includes(this.type)?this._renderTriggerSlot():"auto"===this.type||"hint"===this.type?x$1`
191
- <button
192
- ${n(this._buttonRef)}
193
- ${n(this._positioningTargetRef)}
194
- part="popover-trigger"
195
- class="popover-trigger"
196
- type="button"
197
- popovertarget="${o(this.disabled?void 0:"popover")}"
198
- tabindex="-1"
199
- >
200
- ${this._renderTriggerSlot()}
201
- </button>
202
- `:void 0}get _arrowDirection(){return {top:"down","top-start":"down","top-end":"down",bottom:"up","bottom-start":"up","bottom-end":"up",left:"right","left-start":"right","left-end":"right",right:"left","right-start":"left","right-end":"left"}[this.placement]}_renderPopover(){const t={"popover-arrow":true,[`direction-${this._arrowDirection}`]:true};return x$1`
203
- <div
204
- part="popover"
205
- ${n(this._popoverRef)}
206
- popover="${o(this.disabled?void 0:this.type)}"
207
- id="popover"
208
- class="popover"
209
- role="dialog"
210
- aria-label="${this.title}"
211
- @toggle=${this._handlePopoverToggle.bind(this)}
212
- @beforetoggle=${this._handlePopoverBeforeToggle.bind(this)}
213
- tabindex="-1"
214
- >
215
- <div
216
- ${n(this._arrowElRef)}
217
- class="${e(t)}"
218
- part="arrow"
219
- >
220
- <slot name="arrow" ${n(this._arrowSlotRef)}></slot>
221
- </div>
222
- <slot></slot>
223
- </div>
224
- `}render(){return x$1`
225
- ${this._renderTrigger()}
226
- ${this._renderPopover()}
227
- `}}
228
-
229
- var layoverVersion = '0.0.0-pr1.17';
230
-
231
- var styleCss = i$3`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.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.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.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, 1rem)}.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.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, 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"),var(--wcss-display-xl-family-fallback, 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"),var(--wcss-display-lg-family-fallback, 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"),var(--wcss-display-md-family-fallback, 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"),var(--wcss-display-sm-family-fallback, 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"),var(--wcss-display-xs-family-fallback, 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"),var(--wcss-heading-xl-family-fallback, 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"),var(--wcss-heading-lg-family-fallback, 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"),var(--wcss-heading-md-family-fallback, 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"),var(--wcss-heading-sm-family-fallback, 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"),var(--wcss-heading-xs-family-fallback, 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"),var(--wcss-heading-2xs-family-fallback, 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"),var(--wcss-accent-2xl-family-fallback, 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"),var(--wcss-accent-xl-family-fallback, 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"),var(--wcss-accent-lg-family-fallback, 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"),var(--wcss-accent-md-family-fallback, 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"),var(--wcss-accent-sm-family-fallback, 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"),var(--wcss-accent-xs-family-fallback, 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"),var(--wcss-accent-2xs-family-fallback, 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}:focus:not(:focus-visible){outline:3px solid transparent}.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}.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}::slotted(*){white-space:normal}::slotted(*:hover){cursor:pointer}:host([removeSpace]) .popover{margin:calc(-1*(var(--ds-size-50, 0.25rem) + 1px)) 0 !important}.arrow{width:0;height:0;position:relative;border-style:solid}.arrow[data-placement=top]{border-width:var(--ds-size-150, 0.75rem) calc(var(--ds-size-150, 0.75rem)/2 + .5px) 0 calc(var(--ds-size-150, 0.75rem)/2 + .5px);border-color:var(--ds-auro-popover-container-color) transparent transparent transparent}.arrow[data-placement=bottom]{border-width:0 calc(var(--ds-size-150, 0.75rem)/2 + .5px) var(--ds-size-150, 0.75rem) calc(var(--ds-size-150, 0.75rem)/2 + .5px);border-color:transparent transparent var(--ds-auro-popover-container-color) transparent}.arrow[data-placement=left]{border-width:calc(var(--ds-size-150, 0.75rem)/2 + .5px) 0 calc(var(--ds-size-150, 0.75rem)/2 + .5px) var(--ds-size-150, 0.75rem);border-color:transparent transparent transparent var(--ds-auro-popover-container-color)}.arrow[data-placement=right]{border-width:calc(var(--ds-size-150, 0.75rem)/2 + .5px) var(--ds-size-150, 0.75rem) calc(var(--ds-size-150, 0.75rem)/2 + .5px) 0;border-color:transparent var(--ds-auro-popover-container-color) transparent transparent}.popover{display:inline-block;max-width:calc(100% - var(--ds-size-400, 2rem));border-radius:var(--ds-border-radius, 0.375rem)}@media screen and (min-width: 576px){.popover{max-width:50%}}@media screen and (min-width: 768px){.popover{max-width:40%}}@media screen and (min-width: 1024px){.popover{max-width:27rem}}`;
232
-
233
- var colorCss = i$3`::slotted(*){color:var(--ds-auro-popover-text-color)}.popover{background-color:var(--ds-auro-popover-container-color);box-shadow:var(--ds-auro-popover-boxshadow-color)}.arrow{box-shadow:2px 2px 1px 0 var(--ds-auro-popover-boxshadow-color)}`;
234
-
235
- var tokensCss = i$3`:host{--ds-auro-popover-boxshadow-color:var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-popover-container-color:var(--ds-basic-color-surface-default, #ffffff);--ds-auro-popover-text-color:var(--ds-basic-color-texticon-default, #2a2a2a)}`;
236
-
237
- // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
238
- // See LICENSE in the project root for license information.
239
-
240
-
241
- const DEFAULTS = {
242
- placement: 'top',
243
- };
244
-
245
- /** The amount of extra spacing to add when the user passes "addSpace" */
246
- const ADD_SPACE_AMOUNT = 22;
247
-
248
- /**
249
- * Popover attaches to an element and displays on hover/blur.
250
- *
251
- * @attr {boolean} disabled - If true, will disable the popover from showing on hover and focus
252
- * @attr {boolean} addSpace - If true, will add additional top and bottom space around the appearance of the popover in relation to the trigger
253
- * @attr {boolean} removeSpace - If true, will remove top and bottom space around the appearance of the popover in relation to the trigger
254
- * @attr {"top"|"bottom"} placement - position for popover in relation to the element
255
- * @slot - Default unnamed slot for the use of popover content
256
- * @slot trigger - The element in this slot triggers hiding and showing the popover.
257
- */
258
- class AuroPopover extends i$1 {
259
- constructor() {
260
- super();
261
- this._privateDefaults();
262
- this._setDefaults(DEFAULTS);
263
- this._createRefs();
264
- }
265
-
266
- /**
267
- * Internal Defaults.
268
- * @private
269
- * @returns {void}
270
- */
271
- _setDefaults(defaults) {
272
- Object.keys(defaults).forEach((key) => {
273
- if (this[key] === undefined) {
274
- this[key] = defaults[key];
275
- }
276
- });
277
- };
278
-
279
- /**
280
- * Creates references for the layover and arrow elements.
281
- * @returns {void}
282
- */
283
- _createRefs() {
284
- this._layoverRef = e$1();
285
- this._arrowRef = e$1();
286
- }
287
-
288
- /**
289
- * Creates versioned tags for internal use.
290
- * @returns {void}
291
- */
292
- _privateDefaults() {
293
- const versioning = new AuroDependencyVersioning();
294
- this.runtimeUtils = new AuroLibraryRuntimeUtils();
295
- this.layoverTag = versioning.generateTag("auro-popover-layover", layoverVersion, Zt);
296
- }
297
-
298
- // function to define props used within the scope of this component
299
- static get properties() {
300
- return {
301
- placement: { type: String },
302
- disabled: { type: Boolean },
303
- boundary: { type: String },
304
- addSpace: { type: Boolean, reflect: true }
305
- };
306
- }
307
-
308
- static get styles() {
309
- return [
310
- i$3`${styleCss}`,
311
- i$3`${colorCss}`,
312
- i$3`${tokensCss}`
313
- ];
314
- }
315
-
316
- /**
317
- * This will register this element with the browser.
318
- * @param {string} [name="auro-popover"] - The name of element that you want to register to.
319
- *
320
- * @example
321
- * AuroPopover.register("custom-popover") // this will register this element to <custom-popover/>
322
- *
323
- */
324
- static register(name = "auro-popover") {
325
- AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroPopover);
326
- }
327
-
328
- get _layover () {
329
- return this._layoverRef.value;
330
- }
331
-
332
- /**
333
- * Toggles the display of the popover content.
334
- * @private
335
- * @returns {void} Fires an update lifecycle.
336
- */
337
- toggle() {
338
- this._layover.toggle();
339
- }
340
-
341
- /**
342
- * Hides the popover.
343
- * @private
344
- * @returns {void} Fires an update lifecycle.
345
- */
346
- toggleHide() {
347
- this._layover.hide();
348
- }
349
-
350
- /**
351
- * Shows the popover.
352
- * @private
353
- * @returns {void} Fires an update lifecycle.
354
- */
355
- toggleShow() {
356
- this._layover.show();
357
- }
358
-
359
- get _popoverOffset() {
360
- // If addSpace is true, we add extra space to the offset
361
- return this.addSpace ? 12 + ADD_SPACE_AMOUNT : 12;
362
- }
363
-
364
- // function that renders the HTML and CSS into the scope of the component
365
- render() {
366
- return u$2`
367
- <${this.layoverTag}
368
- ${n(this._layoverRef)}
369
- behavior="tooltip"
370
- .placement="${this.placement}"
371
- inline="true"
372
- offset="${this._popoverOffset}"
373
- ?disabled="${this.disabled}"
374
- >
375
- <div slot="arrow" ${n(this._arrowRef)} data-placement="${this.placement}" id="arrow" class="arrow"></div>
376
- <slot name="trigger" slot="trigger"></slot>
377
- <div id="popover" class="popover util_insetLg body-default" aria-live="polite" part="popover">
378
- <slot></slot>
379
- </div>
380
- </${this.layoverTag}>
381
- `;
382
- }
383
- }
384
-
385
- /* eslint-disable jsdoc/require-jsdoc, no-magic-numbers, no-param-reassign */
1
+ import { A as AuroPopover } from './auro-popover.min.js';
386
2
 
387
3
  AuroPopover.register();
388
- AuroPopover.register('custom-popover');
4
+ AuroPopover.register("custom-popover");