@florid-kit/components 0.8.16 → 0.8.17
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/index.js +13 -13
- package/index.mjs +39 -37
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
13
|
*/const et=globalThis,vt=et.trustedTypes,Zt=vt?vt.createPolicy("lit-html",{createHTML:o=>o}):void 0,te="$lit$",H=`lit$${Math.random().toFixed(9).slice(2)}$`,ee="?"+H,be=`<${ee}>`,V=document,rt=()=>V.createComment(""),it=o=>o===null||typeof o!="object"&&typeof o!="function",It=Array.isArray,fe=o=>It(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",xt=`[
|
|
14
14
|
\f\r]`,Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,qt=/-->/g,Wt=/>/g,N=RegExp(`>|${xt}(?:([^\\s"'>=/]+)(${xt}*=${xt}*(?:[^
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Kt=/'/g,Gt=/"/g,oe=/^(?:script|style|textarea|title)$/i,ge=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=ge(1),T=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Xt=new WeakMap,F=V.createTreeWalker(V,129);function re(o,t){if(!It(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Zt!==void 0?Zt.createHTML(t):t}const ye=(o,t)=>{const e=o.length-1,i=[];let r,n=t===2?"<svg>":t===3?"<math>":"",s=Y;for(let h=0;h<e;h++){const c=o[h];let f,m,p=-1,P=0;for(;P<c.length&&(s.lastIndex=P,m=s.exec(c),m!==null);)P=s.lastIndex,s===Y?m[1]==="!--"?s=qt:m[1]!==void 0?s=Wt:m[2]!==void 0?(oe.test(m[2])&&(r=RegExp("</"+m[2],"g")),s=N):m[3]!==void 0&&(s=N):s===N?m[0]===">"?(s=r??Y,p=-1):m[1]===void 0?p=-2:(p=s.lastIndex-m[2].length,f=m[1],s=m[3]===void 0?N:m[3]==='"'?Gt:Kt):s===Gt||s===Kt?s=N:s===qt||s===Wt?s=Y:(s=N,r=void 0);const D=s===N&&o[h+1].startsWith("/>")?" ":"";n+=s===Y?c+be:p>=0?(i.push(f),c.slice(0,p)+te+c.slice(p)+H+D):c+H+(p===-2?h:D)}return[re(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class nt{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let n=0,s=0;const h=t.length-1,c=this.parts,[f,m]=ye(t,e);if(this.el=nt.createElement(f,i),F.currentNode=this.el.content,e===2||e===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(r=F.nextNode())!==null&&c.length<h;){if(r.nodeType===1){if(r.hasAttributes())for(const p of r.getAttributeNames())if(p.endsWith(te)){const P=m[s++],D=r.getAttribute(p).split(H),dt=/([.?@])?(.*)/.exec(P);c.push({type:1,index:n,name:dt[2],strings:D,ctor:dt[1]==="."?xe:dt[1]==="?"?we:dt[1]==="@"?$e:ft}),r.removeAttribute(p)}else p.startsWith(H)&&(c.push({type:6,index:n}),r.removeAttribute(p));if(oe.test(r.tagName)){const p=r.textContent.split(H),P=p.length-1;if(P>0){r.textContent=vt?vt.emptyScript:"";for(let D=0;D<P;D++)r.append(p[D],rt()),F.nextNode(),c.push({type:2,index:++n});r.append(p[P],rt())}}}else if(r.nodeType===8)if(r.data===ee)c.push({type:2,index:n});else{let p=-1;for(;(p=r.data.indexOf(H,p+1))!==-1;)c.push({type:7,index:n}),p+=H.length-1}n++}}static createElement(t,e){const i=V.createElement("template");return i.innerHTML=t,i}}function X(o,t,e=o,i){var s,h;if(t===T)return t;let r=i!==void 0?(s=e._$Co)==null?void 0:s[i]:e._$Cl;const n=it(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((h=r==null?void 0:r._$AO)==null||h.call(r,!1),n===void 0?r=void 0:(r=new n(o),r._$AT(o,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=r:e._$Cl=r),r!==void 0&&(t=X(o,r._$AS(o,t.values),r,i)),t}class me{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=((t==null?void 0:t.creationScope)??V).importNode(e,!0);F.currentNode=r;let n=F.nextNode(),s=0,h=0,c=i[0];for(;c!==void 0;){if(s===c.index){let f;c.type===2?f=new ht(n,n.nextSibling,this,t):c.type===1?f=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(f=new _e(n,this,t)),this._$AV.push(f),c=i[++h]}s!==(c==null?void 0:c.index)&&(n=F.nextNode(),s++)}return F.currentNode=V,r}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class ht{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=(r==null?void 0:r.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=X(this,t,e),it(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==T&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):fe(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!==d&&it(this._$AH)?this._$AA.nextSibling.data=t:this.T(V.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:i}=t,r=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=nt.createElement(re(i.h,i.h[0]),this.options)),i);if(((n=this._$AH)==null?void 0:n._$AD)===r)this._$AH.p(e);else{const s=new me(r,this),h=s.u(this.options);s.p(e),this.T(h),this._$AH=s}}_$AC(t){let e=Xt.get(t.strings);return e===void 0&&Xt.set(t.strings,e=new nt(t)),e}k(t){It(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const n of t)r===e.length?e.push(i=new ht(this.O(rt()),this.O(rt()),this,this.options)):i=e[r],i._$AI(n),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class ft{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=d}_$AI(t,e=this,i,r){const n=this.strings;let s=!1;if(n===void 0)t=X(this,t,e,0),s=!it(t)||t!==this._$AH&&t!==T,s&&(this._$AH=t);else{const h=t;let c,f;for(t=n[0],c=0;c<n.length-1;c++)f=X(this,h[i+c],e,c),f===T&&(f=this._$AH[c]),s||(s=!it(f)||f!==this._$AH[c]),f===d?t=d:t!==d&&(t+=(f??"")+n[c+1]),this._$AH[c]=f}s&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class xe extends ft{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class we extends ft{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class $e extends ft{constructor(t,e,i,r,n){super(t,e,i,r,n),this.type=5}_$AI(t,e=this){if((t=X(this,t,e,0)??d)===T)return;const i=this._$AH,r=t===d&&i!==d||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==d&&(i===d||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class _e{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){X(this,t)}}const wt=et.litHtmlPolyfillSupport;wt==null||wt(nt,ht),(et.litHtmlVersions??(et.litHtmlVersions=[])).push("3.3.0");const
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Kt=/'/g,Gt=/"/g,oe=/^(?:script|style|textarea|title)$/i,ge=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=ge(1),T=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Xt=new WeakMap,F=V.createTreeWalker(V,129);function re(o,t){if(!It(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Zt!==void 0?Zt.createHTML(t):t}const ye=(o,t)=>{const e=o.length-1,i=[];let r,n=t===2?"<svg>":t===3?"<math>":"",s=Y;for(let h=0;h<e;h++){const c=o[h];let f,m,p=-1,P=0;for(;P<c.length&&(s.lastIndex=P,m=s.exec(c),m!==null);)P=s.lastIndex,s===Y?m[1]==="!--"?s=qt:m[1]!==void 0?s=Wt:m[2]!==void 0?(oe.test(m[2])&&(r=RegExp("</"+m[2],"g")),s=N):m[3]!==void 0&&(s=N):s===N?m[0]===">"?(s=r??Y,p=-1):m[1]===void 0?p=-2:(p=s.lastIndex-m[2].length,f=m[1],s=m[3]===void 0?N:m[3]==='"'?Gt:Kt):s===Gt||s===Kt?s=N:s===qt||s===Wt?s=Y:(s=N,r=void 0);const D=s===N&&o[h+1].startsWith("/>")?" ":"";n+=s===Y?c+be:p>=0?(i.push(f),c.slice(0,p)+te+c.slice(p)+H+D):c+H+(p===-2?h:D)}return[re(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class nt{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let n=0,s=0;const h=t.length-1,c=this.parts,[f,m]=ye(t,e);if(this.el=nt.createElement(f,i),F.currentNode=this.el.content,e===2||e===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(r=F.nextNode())!==null&&c.length<h;){if(r.nodeType===1){if(r.hasAttributes())for(const p of r.getAttributeNames())if(p.endsWith(te)){const P=m[s++],D=r.getAttribute(p).split(H),dt=/([.?@])?(.*)/.exec(P);c.push({type:1,index:n,name:dt[2],strings:D,ctor:dt[1]==="."?xe:dt[1]==="?"?we:dt[1]==="@"?$e:ft}),r.removeAttribute(p)}else p.startsWith(H)&&(c.push({type:6,index:n}),r.removeAttribute(p));if(oe.test(r.tagName)){const p=r.textContent.split(H),P=p.length-1;if(P>0){r.textContent=vt?vt.emptyScript:"";for(let D=0;D<P;D++)r.append(p[D],rt()),F.nextNode(),c.push({type:2,index:++n});r.append(p[P],rt())}}}else if(r.nodeType===8)if(r.data===ee)c.push({type:2,index:n});else{let p=-1;for(;(p=r.data.indexOf(H,p+1))!==-1;)c.push({type:7,index:n}),p+=H.length-1}n++}}static createElement(t,e){const i=V.createElement("template");return i.innerHTML=t,i}}function X(o,t,e=o,i){var s,h;if(t===T)return t;let r=i!==void 0?(s=e._$Co)==null?void 0:s[i]:e._$Cl;const n=it(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((h=r==null?void 0:r._$AO)==null||h.call(r,!1),n===void 0?r=void 0:(r=new n(o),r._$AT(o,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=r:e._$Cl=r),r!==void 0&&(t=X(o,r._$AS(o,t.values),r,i)),t}class me{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=((t==null?void 0:t.creationScope)??V).importNode(e,!0);F.currentNode=r;let n=F.nextNode(),s=0,h=0,c=i[0];for(;c!==void 0;){if(s===c.index){let f;c.type===2?f=new ht(n,n.nextSibling,this,t):c.type===1?f=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(f=new _e(n,this,t)),this._$AV.push(f),c=i[++h]}s!==(c==null?void 0:c.index)&&(n=F.nextNode(),s++)}return F.currentNode=V,r}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class ht{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=(r==null?void 0:r.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=X(this,t,e),it(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==T&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):fe(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!==d&&it(this._$AH)?this._$AA.nextSibling.data=t:this.T(V.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:i}=t,r=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=nt.createElement(re(i.h,i.h[0]),this.options)),i);if(((n=this._$AH)==null?void 0:n._$AD)===r)this._$AH.p(e);else{const s=new me(r,this),h=s.u(this.options);s.p(e),this.T(h),this._$AH=s}}_$AC(t){let e=Xt.get(t.strings);return e===void 0&&Xt.set(t.strings,e=new nt(t)),e}k(t){It(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const n of t)r===e.length?e.push(i=new ht(this.O(rt()),this.O(rt()),this,this.options)):i=e[r],i._$AI(n),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class ft{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=d}_$AI(t,e=this,i,r){const n=this.strings;let s=!1;if(n===void 0)t=X(this,t,e,0),s=!it(t)||t!==this._$AH&&t!==T,s&&(this._$AH=t);else{const h=t;let c,f;for(t=n[0],c=0;c<n.length-1;c++)f=X(this,h[i+c],e,c),f===T&&(f=this._$AH[c]),s||(s=!it(f)||f!==this._$AH[c]),f===d?t=d:t!==d&&(t+=(f??"")+n[c+1]),this._$AH[c]=f}s&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class xe extends ft{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class we extends ft{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class $e extends ft{constructor(t,e,i,r,n){super(t,e,i,r,n),this.type=5}_$AI(t,e=this){if((t=X(this,t,e,0)??d)===T)return;const i=this._$AH,r=t===d&&i!==d||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==d&&(i===d||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class _e{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){X(this,t)}}const wt=et.litHtmlPolyfillSupport;wt==null||wt(nt,ht),(et.litHtmlVersions??(et.litHtmlVersions=[])).push("3.3.0");const Ce=(o,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let r=i._$litPart$;if(r===void 0){const n=(e==null?void 0:e.renderBefore)??null;i._$litPart$=r=new ht(t.insertBefore(rt(),n),n,void 0,e??{})}return r._$AI(o),r};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const R=globalThis;let u=class extends G{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=
|
|
19
|
+
*/const R=globalThis;let u=class extends G{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ce(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return T}};var Qt;u._$litElement$=!0,u.finalized=!0,(Qt=R.litElementHydrateSupport)==null||Qt.call(R,{LitElement:u});const $t=R.litElementPolyfillSupport;$t==null||$t({LitElement:u});(R.litElementVersions??(R.litElementVersions=[])).push("4.2.0");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const
|
|
27
|
+
*/const ke={attribute:!0,type:String,converter:ut,reflect:!1,hasChanged:Lt},Ae=(o=ke,t,e)=>{const{kind:i,metadata:r}=e;let n=globalThis.litPropertyMetadata.get(r);if(n===void 0&&globalThis.litPropertyMetadata.set(r,n=new Map),i==="setter"&&((o=Object.create(o)).wrapped=!0),n.set(e.name,o),i==="accessor"){const{name:s}=e;return{set(h){const c=t.get.call(this);t.set.call(this,h),this.requestUpdate(s,c,o)},init(h){return h!==void 0&&this.C(s,void 0,o,h),h}}}if(i==="setter"){const{name:s}=e;return function(h){const c=this[s];t.call(this,h),this.requestUpdate(s,c,o)}}throw Error("Unsupported decorator location: "+i)};function a(o){return(t,e)=>typeof e=="object"?Ae(o,t,e):((i,r,n)=>{const s=r.hasOwnProperty(n);return r.constructor.createProperty(n,i),s?Object.getOwnPropertyDescriptor(r,n):void 0})(o,t,e)}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -135,11 +135,11 @@
|
|
|
135
135
|
* @license
|
|
136
136
|
* Copyright 2017 Google LLC
|
|
137
137
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
138
|
-
*/class
|
|
138
|
+
*/class Ct extends Ht{constructor(t){if(super(t),this.it=d,t.type!==zt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===d||t==null)return this._t=void 0,this.it=t;if(t===T)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Ct.directiveName="unsafeHTML",Ct.resultType=1;/**
|
|
139
139
|
* @license
|
|
140
140
|
* Copyright 2017 Google LLC
|
|
141
141
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
142
|
-
*/class
|
|
142
|
+
*/class kt extends Ct{}kt.directiveName="unsafeSVG",kt.resultType=2;const S=Dt(kt);var Qe=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,w=(o,t,e,i)=>{for(var r=i>1?void 0:i?Ye(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&Qe(t,e,r),r};const to=Bt(u);let v=class extends to{constructor(){super(...arguments),this.type="submit",this.value="",this.variant="primary",this.text="",this.textsecond="",this.fullwidth=!1,this.disabled=!1,this.startIconModel="",this.endIconModel="",this.startIcon=!1,this.endIcon=!1,this.panelTarget="",this.href="",this.target="",this.underlined=!1}get name(){return this.getAttribute("name")??""}set name(o){this.setAttribute("name",o)}get form(){return this[Ot].form}handleClick(){if(this.panelTarget){const o=document.getElementById(this.panelTarget);o!=null&&o.openPanel&&typeof o.openPanel=="function"?o.openPanel():console.warn(`[o-button] No side panel with id="${this.panelTarget}" found or it does not have an openPanel method.`)}}render(){return this.href?this.renderLink():this.renderButton()}renderIcon(o){const t=o==="start"?this.startIconModel:this.endIconModel;if(!t)return d;const e=q[t].replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return l`<span class="${o==="start"?"icon-start":"icon-end"}">${S(e)}</span>`}renderButton(){const o=this.text||this.textsecond;return l`
|
|
143
143
|
<button type=${this.type} class="button" ?disabled=${this.disabled} @click=${this.handleClick}>
|
|
144
144
|
${this.startIcon?this.renderIcon("start"):d}
|
|
145
145
|
${o?l`
|
|
@@ -801,7 +801,7 @@
|
|
|
801
801
|
* @license
|
|
802
802
|
* Copyright 2017 Google LLC
|
|
803
803
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
804
|
-
*/const ot=(o,t)=>{var i;const e=o._$AN;if(e===void 0)return!1;for(const r of e)(i=r._$AO)==null||i.call(r,t,!1),ot(r,t);return!0},bt=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while((e==null?void 0:e.size)===0)},ie=o=>{for(let t;t=o._$AM;o=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(o))break;e.add(o),uo(t)}};function ho(o){this._$AN!==void 0?(bt(this),this._$AM=o,ie(this)):this._$AM=o}function po(o,t=!1,e=0){const i=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(i))for(let n=e;n<i.length;n++)ot(i[n],!1),bt(i[n]);else i!=null&&(ot(i,!1),bt(i));else ot(this,o)}const uo=o=>{o.type==zt.CHILD&&(o._$AP??(o._$AP=po),o._$AQ??(o._$AQ=ho))};class vo extends Ht{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),ie(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,r;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(r=this.disconnected)==null||r.call(this)),e&&(ot(this,t),bt(this))}setValue(t){if(co(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class bo extends vo{constructor(){super(...arguments),this.prevData={}}render(t){return d}update(t,[e]){var i;this.element!==t.element&&(this.element=t.element),this.host=((i=t.options)===null||i===void 0?void 0:i.host)||this.element,this.apply(e),this.groom(e),this.prevData={...e}}apply(t){if(!t)return;const{prevData:e,element:i}=this;for(const r in t){const n=t[r];n!==e[r]&&(i[r]=n)}}groom(t){const{prevData:e,element:i}=this;if(e)for(const r in e)(!t||!(r in t)&&i[r]===e[r])&&(i[r]=void 0)}}class fo extends bo{constructor(){super(...arguments),this.eventData={}}apply(t){if(t)for(const e in t){const i=t[e];i!==this.eventData[e]&&this.applyEvent(e,i)}}applyEvent(t,e){const{prevData:i,element:r}=this;this.eventData[t]=e,i[t]&&r.removeEventListener(t,this,e),r.addEventListener(t,this,e)}groom(t){const{prevData:e,element:i}=this;if(e)for(const r in e)(!t||!(r in t)&&i[r]===e[r])&&this.groomEvent(r,e[r])}groomEvent(t,e){const{element:i}=this;delete this.eventData[t],i.removeEventListener(t,this,e)}handleEvent(t){const e=this.eventData[t.type];typeof e=="function"?e.call(this.host,t):e.handleEvent(t)}disconnected(){const{eventData:t,element:e}=this;for(const i in t){const r=i.slice(1),n=t[i];e.removeEventListener(r,this,n)}}reconnected(){const{eventData:t,element:e}=this;for(const i in t){const r=i.slice(1),n=t[i];e.addEventListener(r,this,n)}}}class go extends fo{apply(t){if(!t)return;const{prevData:e,element:i}=this;for(const r in t){const n=t[r];if(n===e[r])continue;const s=r.slice(1);switch(r[0]){case"@":this.eventData[s]=n,this.applyEvent(s,n);break;case".":i[s]=n;break;case"?":n?i.setAttribute(s,""):i.removeAttribute(s);break;default:n!=null?i.setAttribute(r,String(n)):i.removeAttribute(r);break}}}groom(t){const{prevData:e,element:i}=this;if(e)for(const r in e){const n=r.slice(1);if(!t||!(r in t)&&i[n]===e[r])switch(r[0]){case"@":this.groomEvent(n,e[r]);break;case".":i[n]=void 0;break;case"?":i.removeAttribute(n);break;default:i.removeAttribute(r);break}}}}const Jt=Dt(go);var yo=Object.defineProperty,mo=Object.getOwnPropertyDescriptor,y=(o,t,e,i)=>{for(var r=i>1?void 0:i?mo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&yo(t,e,r),r};let b=class extends u{constructor(){super(...arguments),this.open=!1,this.showHeader=!0,this.showFooter=!1,this.showHeaderStartIcon=!1,this.headerTitle="",this.closeButtonLabel="Close the modal",this.firstButtonLabel="Close",this.firstButtonVariant="primary",this.firstButtonProps={},this.secondaryButtonLabel="",this.secondaryButtonVariant="secondary",this.secondaryButtonProps={},this.disablePortal=!1,this.zIndex=99,this.initialized=!1,this.previousFocusedElement=null,this.handleKeyDown=o=>{this.open&&(o.key==="Escape"?this.closePanel():o.key==="Tab"&&this.trapFocus(o))}}connectedCallback(){super.connectedCallback(),!this.disablePortal&&this.parentElement!==document.body&&document.body.appendChild(this),window.addEventListener("keydown",this.handleKeyDown),this.updateComplete.then(()=>{this.initialized=!0})}disconnectedCallback(){document.body.style.overflow="",document.body.removeAttribute("data-side-panel"),window.removeEventListener("keydown",this.handleKeyDown),super.disconnectedCallback()}trapFocus(o){const t=this.getFocusableElements();if(t.length===0)return;const e=t[0],i=t[t.length-1];o.shiftKey&&document.activeElement===e?(o.preventDefault(),i.focus()):!o.shiftKey&&document.activeElement===i&&(o.preventDefault(),e.focus())}getFocusableElements(){const o=this.renderRoot.querySelector(".panel");return o?Array.from(o.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(t=>!t.hasAttribute("disabled")):[]}openPanel(){this.previousFocusedElement=document.activeElement,this.open=!0,document.body.style.overflow="hidden",document.body.setAttribute("data-side-panel","open"),this.updateComplete.then(()=>{const o=this.getFocusableElements()[0];o==null||o.focus()})}closePanel(){var o;this.open=!1,document.body.style.overflow="",document.body.removeAttribute("data-side-panel"),(o=this.previousFocusedElement)==null||o.focus(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}handleFirstClick(){typeof this.onFirstButtonClick=="function"&&this.onFirstButtonClick(),this.closePanel()}handleSecondaryClick(){typeof this.onSecondaryButtonClick=="function"&&this.onSecondaryButtonClick(),this.closePanel()}updated(){this.style.setProperty("--z-overlay",`${this.zIndex}`),this.style.setProperty("--z-panel",`${this.zIndex+1}`)}render(){return l`
|
|
804
|
+
*/const ot=(o,t)=>{var i;const e=o._$AN;if(e===void 0)return!1;for(const r of e)(i=r._$AO)==null||i.call(r,t,!1),ot(r,t);return!0},bt=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while((e==null?void 0:e.size)===0)},ie=o=>{for(let t;t=o._$AM;o=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(o))break;e.add(o),uo(t)}};function ho(o){this._$AN!==void 0?(bt(this),this._$AM=o,ie(this)):this._$AM=o}function po(o,t=!1,e=0){const i=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(i))for(let n=e;n<i.length;n++)ot(i[n],!1),bt(i[n]);else i!=null&&(ot(i,!1),bt(i));else ot(this,o)}const uo=o=>{o.type==zt.CHILD&&(o._$AP??(o._$AP=po),o._$AQ??(o._$AQ=ho))};class vo extends Ht{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),ie(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,r;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(r=this.disconnected)==null||r.call(this)),e&&(ot(this,t),bt(this))}setValue(t){if(co(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class bo extends vo{constructor(){super(...arguments),this.prevData={}}render(t){return d}update(t,[e]){var i;this.element!==t.element&&(this.element=t.element),this.host=((i=t.options)===null||i===void 0?void 0:i.host)||this.element,this.apply(e),this.groom(e),this.prevData={...e}}apply(t){if(!t)return;const{prevData:e,element:i}=this;for(const r in t){const n=t[r];n!==e[r]&&(i[r]=n)}}groom(t){const{prevData:e,element:i}=this;if(e)for(const r in e)(!t||!(r in t)&&i[r]===e[r])&&(i[r]=void 0)}}class fo extends bo{constructor(){super(...arguments),this.eventData={}}apply(t){if(t)for(const e in t){const i=t[e];i!==this.eventData[e]&&this.applyEvent(e,i)}}applyEvent(t,e){const{prevData:i,element:r}=this;this.eventData[t]=e,i[t]&&r.removeEventListener(t,this,e),r.addEventListener(t,this,e)}groom(t){const{prevData:e,element:i}=this;if(e)for(const r in e)(!t||!(r in t)&&i[r]===e[r])&&this.groomEvent(r,e[r])}groomEvent(t,e){const{element:i}=this;delete this.eventData[t],i.removeEventListener(t,this,e)}handleEvent(t){const e=this.eventData[t.type];typeof e=="function"?e.call(this.host,t):e.handleEvent(t)}disconnected(){const{eventData:t,element:e}=this;for(const i in t){const r=i.slice(1),n=t[i];e.removeEventListener(r,this,n)}}reconnected(){const{eventData:t,element:e}=this;for(const i in t){const r=i.slice(1),n=t[i];e.addEventListener(r,this,n)}}}class go extends fo{apply(t){if(!t)return;const{prevData:e,element:i}=this;for(const r in t){const n=t[r];if(n===e[r])continue;const s=r.slice(1);switch(r[0]){case"@":this.eventData[s]=n,this.applyEvent(s,n);break;case".":i[s]=n;break;case"?":n?i.setAttribute(s,""):i.removeAttribute(s);break;default:n!=null?i.setAttribute(r,String(n)):i.removeAttribute(r);break}}}groom(t){const{prevData:e,element:i}=this;if(e)for(const r in e){const n=r.slice(1);if(!t||!(r in t)&&i[n]===e[r])switch(r[0]){case"@":this.groomEvent(n,e[r]);break;case".":i[n]=void 0;break;case"?":i.removeAttribute(n);break;default:i.removeAttribute(r);break}}}}const Jt=Dt(go);var yo=Object.defineProperty,mo=Object.getOwnPropertyDescriptor,y=(o,t,e,i)=>{for(var r=i>1?void 0:i?mo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&yo(t,e,r),r};let b=class extends u{constructor(){super(...arguments),this.open=!1,this.showHeader=!0,this.showFooter=!1,this.showHeaderStartIcon=!1,this.headerTitle="",this.closeButtonLabel="Close the modal",this.firstButtonLabel="Close",this.firstButtonVariant="primary",this.firstButtonProps={},this.secondaryButtonLabel="",this.secondaryButtonVariant="secondary",this.secondaryButtonProps={},this.disablePortal=!1,this.zIndex=99,this.initialized=!1,this.previousFocusedElement=null,this.handleKeyDown=o=>{this.open&&(o.key==="Escape"?this.closePanel():o.key==="Tab"&&this.trapFocus(o))}}connectedCallback(){super.connectedCallback(),!this.disablePortal&&this.parentElement!==document.body&&document.body.appendChild(this),window.addEventListener("keydown",this.handleKeyDown),this.updateComplete.then(()=>{this.initialized=!0})}disconnectedCallback(){document.body.style.overflow="",document.body.removeAttribute("data-side-panel"),window.removeEventListener("keydown",this.handleKeyDown),super.disconnectedCallback()}trapFocus(o){const t=this.getFocusableElements();if(t.length===0)return;const e=t[0],i=t[t.length-1];o.shiftKey&&document.activeElement===e?(o.preventDefault(),i.focus()):!o.shiftKey&&document.activeElement===i&&(o.preventDefault(),e.focus())}getFocusableElements(){const o=this.renderRoot.querySelector(".panel");return o?Array.from(o.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(t=>!t.hasAttribute("disabled")):[]}openPanel(){this.previousFocusedElement=document.activeElement,this.open=!0,document.body.style.overflow="hidden",document.body.setAttribute("data-side-panel","open"),this.updateComplete.then(()=>{const o=this.getFocusableElements()[0];o==null||o.focus()}),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0}))}closePanel(){var o;this.open=!1,document.body.style.overflow="",document.body.removeAttribute("data-side-panel"),(o=this.previousFocusedElement)==null||o.focus(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}handleFirstClick(){typeof this.onFirstButtonClick=="function"&&this.onFirstButtonClick(),this.closePanel()}handleSecondaryClick(){typeof this.onSecondaryButtonClick=="function"&&this.onSecondaryButtonClick(),this.closePanel()}updated(){this.style.setProperty("--z-overlay",`${this.zIndex}`),this.style.setProperty("--z-panel",`${this.zIndex+1}`)}render(){return l`
|
|
805
805
|
<div class="overlay" style="z-index: ${this.zIndex}" @click=${this.closePanel}></div>
|
|
806
806
|
<div
|
|
807
807
|
class="panel"
|
|
@@ -1183,7 +1183,7 @@
|
|
|
1183
1183
|
background-color: var(--color-content-success);
|
|
1184
1184
|
}
|
|
1185
1185
|
|
|
1186
|
-
`;Mt([a({type:String,reflect:!0})],st.prototype,"type",2);Mt([a({type:String,reflect:!0})],st.prototype,"bgstyle",2);st=Mt([x("o-tag")],st);var
|
|
1186
|
+
`;Mt([a({type:String,reflect:!0})],st.prototype,"type",2);Mt([a({type:String,reflect:!0})],st.prototype,"bgstyle",2);st=Mt([x("o-tag")],st);var Co=Object.defineProperty,ko=Object.getOwnPropertyDescriptor,Tt=(o,t,e,i)=>{for(var r=i>1?void 0:i?ko(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&Co(t,e,r),r};let at=class extends u{constructor(){super(...arguments),this.type="top",this.text=""}render(){return l`
|
|
1187
1187
|
<div class="tooltip">
|
|
1188
1188
|
<span class="tooltiptext">${this.text}</span>
|
|
1189
1189
|
<slot></slot>
|
|
@@ -1280,7 +1280,7 @@
|
|
|
1280
1280
|
border-color: transparent var(--color-alpha-dark-strongest) transparent transparent;
|
|
1281
1281
|
}
|
|
1282
1282
|
|
|
1283
|
-
`;Tt([a({type:String,reflect:!0})],at.prototype,"type",2);Tt([a({type:String,reflect:!0})],at.prototype,"text",2);at=Tt([x("o-tooltip")],at);var Ao=Object.defineProperty,So=Object.getOwnPropertyDescriptor,z=(o,t,e,i)=>{for(var r=i>1?void 0:i?So(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&Ao(t,e,r),r};let
|
|
1283
|
+
`;Tt([a({type:String,reflect:!0})],at.prototype,"type",2);Tt([a({type:String,reflect:!0})],at.prototype,"text",2);at=Tt([x("o-tooltip")],at);var Ao=Object.defineProperty,So=Object.getOwnPropertyDescriptor,z=(o,t,e,i)=>{for(var r=i>1?void 0:i?So(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&Ao(t,e,r),r};let k=class extends u{constructor(){super(...arguments),this.options=[],this.value="",this.name="",this.disabled=!1,this.width="100%",this.open=!1,this.activeIndex=-1,this.menuWidth="",this._handleOutsideClick=o=>{this.contains(o.target)||(this.open=!1,this.activeIndex=-1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this._handleOutsideClick),super.disconnectedCallback()}toggle(){var o;if(!this.disabled){if(this.open=!this.open,this.activeIndex=this.open?this.options.findIndex(t=>t.value===this.value):-1,this.open&&this.width==="auto"){const t=(o=this.renderRoot)==null?void 0:o.querySelector("button");t&&(this.menuWidth=`${t.getBoundingClientRect().width}px`)}this.open&&this.updateComplete.then(()=>{this._focusActiveOption()})}}_focusActiveOption(){var t;const o=(t=this.renderRoot)==null?void 0:t.querySelector(`#option-${this.activeIndex}`);o==null||o.focus()}selectOption(o){this.value=o.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,url:o.url}})),this.open=!1,this.activeIndex=-1}handleKeydown(o){if(this.disabled){o.preventDefault();return}if(!this.open){(o.key==="ArrowDown"||o.key==="ArrowUp")&&(o.preventDefault(),this.open=!0,this.activeIndex=this.options.findIndex(t=>t.value===this.value),this.updateComplete.then(()=>this._focusActiveOption()));return}switch(o.key){case"ArrowDown":o.preventDefault(),this.activeIndex=(this.activeIndex+1)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"ArrowUp":o.preventDefault(),this.activeIndex=(this.activeIndex-1+this.options.length)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"Home":o.preventDefault(),this.activeIndex=0,this.updateComplete.then(()=>this._focusActiveOption());break;case"End":o.preventDefault(),this.activeIndex=this.options.length-1,this.updateComplete.then(()=>this._focusActiveOption());break;case"Enter":o.preventDefault(),this.activeIndex>=0&&this.selectOption(this.options[this.activeIndex]);break;case"Escape":o.preventDefault(),this.open=!1,this.activeIndex=-1;break}}updated(o){this.options.length>0&&(this.options.some(e=>e.value===this.value)||(this.value=this.options[0].value))}render(){const o=q.checkstroke.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"'),t=this.options.find(e=>e.value===this.value);return l`
|
|
1284
1284
|
<button
|
|
1285
1285
|
role="combobox"
|
|
1286
1286
|
aria-haspopup="listbox"
|
|
@@ -1328,7 +1328,7 @@
|
|
|
1328
1328
|
</ul>`:null}
|
|
1329
1329
|
|
|
1330
1330
|
<input type="hidden" name="${this.name}" .value="${this.value}" />
|
|
1331
|
-
`}};
|
|
1331
|
+
`}};k.styles=g`
|
|
1332
1332
|
:host {
|
|
1333
1333
|
display: inline-block;
|
|
1334
1334
|
position: relative;
|
|
@@ -1467,7 +1467,7 @@
|
|
|
1467
1467
|
input[type="hidden"] {
|
|
1468
1468
|
display: none;
|
|
1469
1469
|
}
|
|
1470
|
-
`;z([a({type:Array,reflect:!0})],
|
|
1470
|
+
`;z([a({type:Array,reflect:!0})],k.prototype,"options",2);z([a({type:String,reflect:!0})],k.prototype,"value",2);z([a({type:String,reflect:!0})],k.prototype,"name",2);z([a({type:Boolean,reflect:!0})],k.prototype,"disabled",2);z([a({type:String,reflect:!0})],k.prototype,"width",2);z([Z()],k.prototype,"open",2);z([Z()],k.prototype,"activeIndex",2);z([Z()],k.prototype,"menuWidth",2);k=z([x("o-dropdown")],k);var Eo=Object.getOwnPropertyDescriptor,Lo=(o,t,e,i)=>{for(var r=i>1?void 0:i?Eo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=s(r)||r);return r};let At=class extends u{render(){return l` <span class="dots"></span> `}};At.styles=g`
|
|
1471
1471
|
:host {
|
|
1472
1472
|
display: flex;
|
|
1473
1473
|
align-items: center;
|
|
@@ -1518,7 +1518,7 @@
|
|
|
1518
1518
|
background-color: var(--color-container-action-primary-pressed);
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
|
-
`;At=Lo([x("o-dots")],At);var Io=Object.defineProperty,Po=Object.getOwnPropertyDescriptor,I=(o,t,e,i)=>{for(var r=i>1?void 0:i?Po(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&Io(t,e,r),r};let
|
|
1521
|
+
`;At=Lo([x("o-dots")],At);var Io=Object.defineProperty,Po=Object.getOwnPropertyDescriptor,I=(o,t,e,i)=>{for(var r=i>1?void 0:i?Po(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&Io(t,e,r),r};let C=class extends u{constructor(){super(...arguments),this.options=[],this.value="",this.name="",this.additionaltext="+X variant(s)",this.disabled=!1,this.width="100%",this.open=!1,this.activeIndex=-1,this.menuWidth="",this._handleOutsideClick=o=>{this.contains(o.target)||(this.open=!1,this.activeIndex=-1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this._handleOutsideClick),super.disconnectedCallback()}toggle(){var o;if(!this.disabled){if(this.open=!this.open,this.activeIndex=this.open?this.options.findIndex(t=>t.value===this.value):-1,this.open&&this.width==="auto"){const t=(o=this.renderRoot)==null?void 0:o.querySelector("button");t&&(this.menuWidth=`${t.getBoundingClientRect().width}px`)}this.open&&this.updateComplete.then(()=>this._focusActiveOption())}}_focusActiveOption(){var t;const o=(t=this.renderRoot)==null?void 0:t.querySelector(`#option-${this.activeIndex}`);o==null||o.focus()}selectOption(o){this.value=o.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,url:o.url}})),this.open=!1,this.activeIndex=-1}handleKeydown(o){if(this.disabled){o.preventDefault();return}if(!this.open){(o.key==="ArrowDown"||o.key==="ArrowUp")&&(o.preventDefault(),this.open=!0,this.activeIndex=this.options.findIndex(t=>t.value===this.value),this.updateComplete.then(()=>this._focusActiveOption()));return}switch(o.key){case"ArrowDown":o.preventDefault(),this.activeIndex=(this.activeIndex+1)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"ArrowUp":o.preventDefault(),this.activeIndex=(this.activeIndex-1+this.options.length)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"Home":o.preventDefault(),this.activeIndex=0,this.updateComplete.then(()=>this._focusActiveOption());break;case"End":o.preventDefault(),this.activeIndex=this.options.length-1,this.updateComplete.then(()=>this._focusActiveOption());break;case"Enter":o.preventDefault(),this.activeIndex>=0&&this.selectOption(this.options[this.activeIndex]);break;case"Escape":o.preventDefault(),this.open=!1,this.activeIndex=-1;break}}updated(){this.options.length>0&&(this.options.some(t=>t.value===this.value)||(this.value=this.options[0].value))}render(){const o=q.checkstroke.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"'),t=this.options.find(e=>e.value===this.value);return l`
|
|
1522
1522
|
<button
|
|
1523
1523
|
role="combobox"
|
|
1524
1524
|
aria-haspopup="listbox"
|
|
@@ -1580,7 +1580,7 @@
|
|
|
1580
1580
|
</ul>`:null}
|
|
1581
1581
|
|
|
1582
1582
|
<input type="hidden" name="${this.name}" .value="${this.value}" />
|
|
1583
|
-
`}};
|
|
1583
|
+
`}};C.styles=g`
|
|
1584
1584
|
:host {
|
|
1585
1585
|
display: inline-block;
|
|
1586
1586
|
position: relative;
|
|
@@ -1755,7 +1755,7 @@
|
|
|
1755
1755
|
input[type="hidden"] {
|
|
1756
1756
|
display: none;
|
|
1757
1757
|
}
|
|
1758
|
-
`;I([a({type:Array,reflect:!0})],
|
|
1758
|
+
`;I([a({type:Array,reflect:!0})],C.prototype,"options",2);I([a({type:String,reflect:!0})],C.prototype,"value",2);I([a({type:String,reflect:!0})],C.prototype,"name",2);I([a({type:String,reflect:!0})],C.prototype,"additionaltext",2);I([a({type:Boolean,reflect:!0})],C.prototype,"disabled",2);I([a({type:String,reflect:!0})],C.prototype,"width",2);I([Z()],C.prototype,"open",2);I([Z()],C.prototype,"activeIndex",2);I([Z()],C.prototype,"menuWidth",2);C=I([x("o-dropdown-variant")],C);/**
|
|
1759
1759
|
* @license
|
|
1760
1760
|
* Copyright 2018 Google LLC
|
|
1761
1761
|
* SPDX-License-Identifier: BSD-3-Clause
|
package/index.mjs
CHANGED
|
@@ -504,7 +504,7 @@ class _e {
|
|
|
504
504
|
}
|
|
505
505
|
const wt = et.litHtmlPolyfillSupport;
|
|
506
506
|
wt == null || wt(nt, ht), (et.litHtmlVersions ?? (et.litHtmlVersions = [])).push("3.3.0");
|
|
507
|
-
const
|
|
507
|
+
const Ce = (o, t, e) => {
|
|
508
508
|
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
509
509
|
let r = i._$litPart$;
|
|
510
510
|
if (r === void 0) {
|
|
@@ -530,7 +530,7 @@ let u = class extends G {
|
|
|
530
530
|
}
|
|
531
531
|
update(t) {
|
|
532
532
|
const e = this.render();
|
|
533
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
533
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ce(e, this.renderRoot, this.renderOptions);
|
|
534
534
|
}
|
|
535
535
|
connectedCallback() {
|
|
536
536
|
var t;
|
|
@@ -564,7 +564,7 @@ const x = (o) => (t, e) => {
|
|
|
564
564
|
* Copyright 2017 Google LLC
|
|
565
565
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
566
566
|
*/
|
|
567
|
-
const
|
|
567
|
+
const ke = { attribute: !0, type: String, converter: ut, reflect: !1, hasChanged: Lt }, Ae = (o = ke, t, e) => {
|
|
568
568
|
const { kind: i, metadata: r } = e;
|
|
569
569
|
let n = globalThis.litPropertyMetadata.get(r);
|
|
570
570
|
if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), i === "setter" && ((o = Object.create(o)).wrapped = !0), n.set(e.name, o), i === "accessor") {
|
|
@@ -792,7 +792,7 @@ let Ht = class {
|
|
|
792
792
|
* Copyright 2017 Google LLC
|
|
793
793
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
794
794
|
*/
|
|
795
|
-
class
|
|
795
|
+
class Ct extends Ht {
|
|
796
796
|
constructor(t) {
|
|
797
797
|
if (super(t), this.it = d, t.type !== zt.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
798
798
|
}
|
|
@@ -806,16 +806,16 @@ class kt extends Ht {
|
|
|
806
806
|
return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
|
807
807
|
}
|
|
808
808
|
}
|
|
809
|
-
|
|
809
|
+
Ct.directiveName = "unsafeHTML", Ct.resultType = 1;
|
|
810
810
|
/**
|
|
811
811
|
* @license
|
|
812
812
|
* Copyright 2017 Google LLC
|
|
813
813
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
814
814
|
*/
|
|
815
|
-
class
|
|
815
|
+
class kt extends Ct {
|
|
816
816
|
}
|
|
817
|
-
|
|
818
|
-
const S = Dt(
|
|
817
|
+
kt.directiveName = "unsafeSVG", kt.resultType = 2;
|
|
818
|
+
const S = Dt(kt);
|
|
819
819
|
var Qe = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, w = (o, t, e, i) => {
|
|
820
820
|
for (var r = i > 1 ? void 0 : i ? Ye(t, e) : t, n = o.length - 1, s; n >= 0; n--)
|
|
821
821
|
(s = o[n]) && (r = (i ? s(t, e, r) : s(r)) || r);
|
|
@@ -1975,7 +1975,9 @@ let b = class extends u {
|
|
|
1975
1975
|
this.previousFocusedElement = document.activeElement, this.open = !0, document.body.style.overflow = "hidden", document.body.setAttribute("data-side-panel", "open"), this.updateComplete.then(() => {
|
|
1976
1976
|
const o = this.getFocusableElements()[0];
|
|
1977
1977
|
o == null || o.focus();
|
|
1978
|
-
})
|
|
1978
|
+
}), this.dispatchEvent(
|
|
1979
|
+
new CustomEvent("open", { bubbles: !0, composed: !0 })
|
|
1980
|
+
);
|
|
1979
1981
|
}
|
|
1980
1982
|
closePanel() {
|
|
1981
1983
|
var o;
|
|
@@ -2532,10 +2534,10 @@ Mt([
|
|
|
2532
2534
|
st = Mt([
|
|
2533
2535
|
x("o-tag")
|
|
2534
2536
|
], st);
|
|
2535
|
-
var
|
|
2536
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
2537
|
+
var Co = Object.defineProperty, ko = Object.getOwnPropertyDescriptor, Tt = (o, t, e, i) => {
|
|
2538
|
+
for (var r = i > 1 ? void 0 : i ? ko(t, e) : t, n = o.length - 1, s; n >= 0; n--)
|
|
2537
2539
|
(s = o[n]) && (r = (i ? s(t, e, r) : s(r)) || r);
|
|
2538
|
-
return i && r &&
|
|
2540
|
+
return i && r && Co(t, e, r), r;
|
|
2539
2541
|
};
|
|
2540
2542
|
let at = class extends u {
|
|
2541
2543
|
constructor() {
|
|
@@ -2657,7 +2659,7 @@ var Ao = Object.defineProperty, So = Object.getOwnPropertyDescriptor, z = (o, t,
|
|
|
2657
2659
|
(s = o[n]) && (r = (i ? s(t, e, r) : s(r)) || r);
|
|
2658
2660
|
return i && r && Ao(t, e, r), r;
|
|
2659
2661
|
};
|
|
2660
|
-
let
|
|
2662
|
+
let k = class extends u {
|
|
2661
2663
|
constructor() {
|
|
2662
2664
|
super(...arguments), this.options = [], this.value = "", this.name = "", this.disabled = !1, this.width = "100%", this.open = !1, this.activeIndex = -1, this.menuWidth = "", this._handleOutsideClick = (o) => {
|
|
2663
2665
|
this.contains(o.target) || (this.open = !1, this.activeIndex = -1);
|
|
@@ -2780,7 +2782,7 @@ let C = class extends u {
|
|
|
2780
2782
|
`;
|
|
2781
2783
|
}
|
|
2782
2784
|
};
|
|
2783
|
-
|
|
2785
|
+
k.styles = g`
|
|
2784
2786
|
:host {
|
|
2785
2787
|
display: inline-block;
|
|
2786
2788
|
position: relative;
|
|
@@ -2922,31 +2924,31 @@ C.styles = g`
|
|
|
2922
2924
|
`;
|
|
2923
2925
|
z([
|
|
2924
2926
|
a({ type: Array, reflect: !0 })
|
|
2925
|
-
],
|
|
2927
|
+
], k.prototype, "options", 2);
|
|
2926
2928
|
z([
|
|
2927
2929
|
a({ type: String, reflect: !0 })
|
|
2928
|
-
],
|
|
2930
|
+
], k.prototype, "value", 2);
|
|
2929
2931
|
z([
|
|
2930
2932
|
a({ type: String, reflect: !0 })
|
|
2931
|
-
],
|
|
2933
|
+
], k.prototype, "name", 2);
|
|
2932
2934
|
z([
|
|
2933
2935
|
a({ type: Boolean, reflect: !0 })
|
|
2934
|
-
],
|
|
2936
|
+
], k.prototype, "disabled", 2);
|
|
2935
2937
|
z([
|
|
2936
2938
|
a({ type: String, reflect: !0 })
|
|
2937
|
-
],
|
|
2939
|
+
], k.prototype, "width", 2);
|
|
2938
2940
|
z([
|
|
2939
2941
|
Z()
|
|
2940
|
-
],
|
|
2942
|
+
], k.prototype, "open", 2);
|
|
2941
2943
|
z([
|
|
2942
2944
|
Z()
|
|
2943
|
-
],
|
|
2945
|
+
], k.prototype, "activeIndex", 2);
|
|
2944
2946
|
z([
|
|
2945
2947
|
Z()
|
|
2946
|
-
],
|
|
2947
|
-
|
|
2948
|
+
], k.prototype, "menuWidth", 2);
|
|
2949
|
+
k = z([
|
|
2948
2950
|
x("o-dropdown")
|
|
2949
|
-
],
|
|
2951
|
+
], k);
|
|
2950
2952
|
var Eo = Object.getOwnPropertyDescriptor, Lo = (o, t, e, i) => {
|
|
2951
2953
|
for (var r = i > 1 ? void 0 : i ? Eo(t, e) : t, n = o.length - 1, s; n >= 0; n--)
|
|
2952
2954
|
(s = o[n]) && (r = s(r) || r);
|
|
@@ -3017,7 +3019,7 @@ var Io = Object.defineProperty, Po = Object.getOwnPropertyDescriptor, I = (o, t,
|
|
|
3017
3019
|
(s = o[n]) && (r = (i ? s(t, e, r) : s(r)) || r);
|
|
3018
3020
|
return i && r && Io(t, e, r), r;
|
|
3019
3021
|
};
|
|
3020
|
-
let
|
|
3022
|
+
let C = class extends u {
|
|
3021
3023
|
constructor() {
|
|
3022
3024
|
super(...arguments), this.options = [], this.value = "", this.name = "", this.additionaltext = "+X variant(s)", this.disabled = !1, this.width = "100%", this.open = !1, this.activeIndex = -1, this.menuWidth = "", this._handleOutsideClick = (o) => {
|
|
3023
3025
|
this.contains(o.target) || (this.open = !1, this.activeIndex = -1);
|
|
@@ -3154,7 +3156,7 @@ let k = class extends u {
|
|
|
3154
3156
|
`;
|
|
3155
3157
|
}
|
|
3156
3158
|
};
|
|
3157
|
-
|
|
3159
|
+
C.styles = g`
|
|
3158
3160
|
:host {
|
|
3159
3161
|
display: inline-block;
|
|
3160
3162
|
position: relative;
|
|
@@ -3332,34 +3334,34 @@ k.styles = g`
|
|
|
3332
3334
|
`;
|
|
3333
3335
|
I([
|
|
3334
3336
|
a({ type: Array, reflect: !0 })
|
|
3335
|
-
],
|
|
3337
|
+
], C.prototype, "options", 2);
|
|
3336
3338
|
I([
|
|
3337
3339
|
a({ type: String, reflect: !0 })
|
|
3338
|
-
],
|
|
3340
|
+
], C.prototype, "value", 2);
|
|
3339
3341
|
I([
|
|
3340
3342
|
a({ type: String, reflect: !0 })
|
|
3341
|
-
],
|
|
3343
|
+
], C.prototype, "name", 2);
|
|
3342
3344
|
I([
|
|
3343
3345
|
a({ type: String, reflect: !0 })
|
|
3344
|
-
],
|
|
3346
|
+
], C.prototype, "additionaltext", 2);
|
|
3345
3347
|
I([
|
|
3346
3348
|
a({ type: Boolean, reflect: !0 })
|
|
3347
|
-
],
|
|
3349
|
+
], C.prototype, "disabled", 2);
|
|
3348
3350
|
I([
|
|
3349
3351
|
a({ type: String, reflect: !0 })
|
|
3350
|
-
],
|
|
3352
|
+
], C.prototype, "width", 2);
|
|
3351
3353
|
I([
|
|
3352
3354
|
Z()
|
|
3353
|
-
],
|
|
3355
|
+
], C.prototype, "open", 2);
|
|
3354
3356
|
I([
|
|
3355
3357
|
Z()
|
|
3356
|
-
],
|
|
3358
|
+
], C.prototype, "activeIndex", 2);
|
|
3357
3359
|
I([
|
|
3358
3360
|
Z()
|
|
3359
|
-
],
|
|
3360
|
-
|
|
3361
|
+
], C.prototype, "menuWidth", 2);
|
|
3362
|
+
C = I([
|
|
3361
3363
|
x("o-dropdown-variant")
|
|
3362
|
-
],
|
|
3364
|
+
], C);
|
|
3363
3365
|
/**
|
|
3364
3366
|
* @license
|
|
3365
3367
|
* Copyright 2018 Google LLC
|