@florid-kit/components 0.3.21 → 0.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/button.d.ts +3 -1
- package/index.js +21 -23
- package/index.mjs +152 -145
- package/package.json +2 -2
package/components/button.d.ts
CHANGED
|
@@ -18,12 +18,14 @@ export declare class OccitaneButton extends buttonBaseClass implements FormSubmi
|
|
|
18
18
|
fullwidth: boolean;
|
|
19
19
|
disabled: boolean;
|
|
20
20
|
iconstrokewidth: string;
|
|
21
|
+
icon: string;
|
|
21
22
|
startIcon: boolean;
|
|
22
23
|
endIcon: boolean;
|
|
23
24
|
iconSize: size;
|
|
24
|
-
|
|
25
|
+
panelTarget: string;
|
|
25
26
|
href: string;
|
|
26
27
|
target: "_blank" | "_self" | "_top" | "_parent" | "";
|
|
28
|
+
private handleClick;
|
|
27
29
|
protected render(): import('lit').TemplateResult<1>;
|
|
28
30
|
private renderIcon;
|
|
29
31
|
private renderButton;
|
package/index.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const W=globalThis,at=W.ShadowRoot&&(W.ShadyCSS===void 0||W.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,lt=Symbol(),ut=new WeakMap;let At=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==lt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(at&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=ut.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&ut.set(e,t))}return t}toString(){return this.cssText}};const Pt=o=>new At(typeof o=="string"?o:o+"",void 0,lt),E=(o,...t)=>{const e=o.length===1?o[0]:t.reduce((s,n,
|
|
5
|
+
*/const W=globalThis,at=W.ShadowRoot&&(W.ShadyCSS===void 0||W.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,lt=Symbol(),ut=new WeakMap;let At=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==lt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(at&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=ut.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&ut.set(e,t))}return t}toString(){return this.cssText}};const Pt=o=>new At(typeof o=="string"?o:o+"",void 0,lt),E=(o,...t)=>{const e=o.length===1?o[0]:t.reduce((s,n,r)=>s+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+o[r+1],o[0]);return new At(e,o,lt)},kt=(o,t)=>{if(at)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),n=W.litNonce;n!==void 0&&s.setAttribute("nonce",n),s.textContent=e.cssText,o.appendChild(s)}},ft=at?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return Pt(e)})(o):o;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:Bt,defineProperty:Ot,getOwnPropertyDescriptor:Ht,getOwnPropertyNames:Mt,getOwnPropertySymbols:It,getPrototypeOf:
|
|
9
|
+
*/const{is:Bt,defineProperty:Ot,getOwnPropertyDescriptor:Ht,getOwnPropertyNames:Mt,getOwnPropertySymbols:It,getPrototypeOf:Tt}=Object,S=globalThis,gt=S.trustedTypes,zt=gt?gt.emptyScript:"",tt=S.reactiveElementPolyfillSupport,N=(o,t)=>o,K={toAttribute(o,t){switch(t){case Boolean:o=o?zt:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},ct=(o,t)=>!Bt(o,t),vt={attribute:!0,type:String,converter:K,reflect:!1,useDefault:!1,hasChanged:ct};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),S.litPropertyMetadata??(S.litPropertyMetadata=new WeakMap);let M=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=vt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),n=this.getPropertyDescriptor(t,s,e);n!==void 0&&Ot(this.prototype,t,n)}}static getPropertyDescriptor(t,e,s){const{get:n,set:r}=Ht(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:n,set(i){const c=n==null?void 0:n.call(this);r==null||r.call(this,i),this.requestUpdate(t,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??vt}static _$Ei(){if(this.hasOwnProperty(N("elementProperties")))return;const t=Tt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(N("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(N("properties"))){const e=this.properties,s=[...Mt(e),...It(e)];for(const n of s)this.createProperty(n,e[n])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,n]of e)this.elementProperties.set(s,n)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const n=this._$Eu(e,s);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const n of s)e.unshift(ft(n))}else t!==void 0&&e.push(ft(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return kt(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var r;const s=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,s);if(n!==void 0&&s.reflect===!0){const i=(((r=s.converter)==null?void 0:r.toAttribute)!==void 0?s.converter:K).toAttribute(e,s.type);this._$Em=t,i==null?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(t,e){var r,i;const s=this.constructor,n=s._$Eh.get(t);if(n!==void 0&&this._$Em!==n){const c=s.getPropertyOptions(n),a=typeof c.converter=="function"?{fromAttribute:c.converter}:((r=c.converter)==null?void 0:r.fromAttribute)!==void 0?c.converter:K;this._$Em=n,this[n]=a.fromAttribute(e,c.type)??((i=this._$Ej)==null?void 0:i.get(n))??null,this._$Em=null}}requestUpdate(t,e,s){var n;if(t!==void 0){const r=this.constructor,i=this[t];if(s??(s=r.getPropertyOptions(t)),!((s.hasChanged??ct)(i,e)||s.useDefault&&s.reflect&&i===((n=this._$Ej)==null?void 0:n.get(t))&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:n,wrapped:r},i){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,i??e??this[t]),r!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}const n=this.constructor.elementProperties;if(n.size>0)for(const[r,i]of n){const{wrapped:c}=i,a=this[r];c!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,i,a)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(n=>{var r;return(r=n.hostUpdate)==null?void 0:r.call(n)}),this.update(e)):this._$EM()}catch(n){throw t=!1,this._$EM(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(s=>{var n;return(n=s.hostUpdated)==null?void 0:n.call(s)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};M.elementStyles=[],M.shadowRootOptions={mode:"open"},M[N("elementProperties")]=new Map,M[N("finalized")]=new Map,tt==null||tt({ReactiveElement:M}),(S.reactiveElementVersions??(S.reactiveElementVersions=[])).push("2.1.0");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const j=globalThis,G=j.trustedTypes,bt=G?G.createPolicy("lit-html",{createHTML:o=>o}):void 0,St="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,Et="?"+A,
|
|
13
|
+
*/const j=globalThis,G=j.trustedTypes,bt=G?G.createPolicy("lit-html",{createHTML:o=>o}):void 0,St="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,Et="?"+A,Ut=`<${Et}>`,B=document,R=()=>B.createComment(""),F=o=>o===null||typeof o!="object"&&typeof o!="function",ht=Array.isArray,Dt=o=>ht(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",et=`[
|
|
14
14
|
\f\r]`,D=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yt=/-->/g,$t=/>/g,L=RegExp(`>|${et}(?:([^\\s"'>=/]+)(${et}*=${et}*(?:[^
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),mt=/'/g,wt=/"/g,Ct=/^(?:script|style|textarea|title)$/i,Nt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),d=Nt(1),O=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),_t=new WeakMap,P=B.createTreeWalker(B,129);function Lt(o,t){if(!ht(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return bt!==void 0?bt.createHTML(t):t}const jt=(o,t)=>{const e=o.length-1,s=[];let n,
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),mt=/'/g,wt=/"/g,Ct=/^(?:script|style|textarea|title)$/i,Nt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),d=Nt(1),O=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),_t=new WeakMap,P=B.createTreeWalker(B,129);function Lt(o,t){if(!ht(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return bt!==void 0?bt.createHTML(t):t}const jt=(o,t)=>{const e=o.length-1,s=[];let n,r=t===2?"<svg>":t===3?"<math>":"",i=D;for(let c=0;c<e;c++){const a=o[c];let f,g,p=-1,w=0;for(;w<a.length&&(i.lastIndex=w,g=i.exec(a),g!==null);)w=i.lastIndex,i===D?g[1]==="!--"?i=yt:g[1]!==void 0?i=$t:g[2]!==void 0?(Ct.test(g[2])&&(n=RegExp("</"+g[2],"g")),i=L):g[3]!==void 0&&(i=L):i===L?g[0]===">"?(i=n??D,p=-1):g[1]===void 0?p=-2:(p=i.lastIndex-g[2].length,f=g[1],i=g[3]===void 0?L:g[3]==='"'?wt:mt):i===wt||i===mt?i=L:i===yt||i===$t?i=D:(i=L,n=void 0);const x=i===L&&o[c+1].startsWith("/>")?" ":"";r+=i===D?a+Ut:p>=0?(s.push(f),a.slice(0,p)+St+a.slice(p)+A+x):a+A+(p===-2?c:x)}return[Lt(o,r+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class V{constructor({strings:t,_$litType$:e},s){let n;this.parts=[];let r=0,i=0;const c=t.length-1,a=this.parts,[f,g]=jt(t,e);if(this.el=V.createElement(f,s),P.currentNode=this.el.content,e===2||e===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(n=P.nextNode())!==null&&a.length<c;){if(n.nodeType===1){if(n.hasAttributes())for(const p of n.getAttributeNames())if(p.endsWith(St)){const w=g[i++],x=n.getAttribute(p).split(A),q=/([.?@])?(.*)/.exec(w);a.push({type:1,index:r,name:q[2],strings:x,ctor:q[1]==="."?Ft:q[1]==="?"?Vt:q[1]==="@"?Zt:J}),n.removeAttribute(p)}else p.startsWith(A)&&(a.push({type:6,index:r}),n.removeAttribute(p));if(Ct.test(n.tagName)){const p=n.textContent.split(A),w=p.length-1;if(w>0){n.textContent=G?G.emptyScript:"";for(let x=0;x<w;x++)n.append(p[x],R()),P.nextNode(),a.push({type:2,index:++r});n.append(p[w],R())}}}else if(n.nodeType===8)if(n.data===Et)a.push({type:2,index:r});else{let p=-1;for(;(p=n.data.indexOf(A,p+1))!==-1;)a.push({type:7,index:r}),p+=A.length-1}r++}}static createElement(t,e){const s=B.createElement("template");return s.innerHTML=t,s}}function I(o,t,e=o,s){var i,c;if(t===O)return t;let n=s!==void 0?(i=e._$Co)==null?void 0:i[s]:e._$Cl;const r=F(t)?void 0:t._$litDirective$;return(n==null?void 0:n.constructor)!==r&&((c=n==null?void 0:n._$AO)==null||c.call(n,!1),r===void 0?n=void 0:(n=new r(o),n._$AT(o,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=n:e._$Cl=n),n!==void 0&&(t=I(o,n._$AS(o,t.values),n,s)),t}class Rt{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:s}=this._$AD,n=((t==null?void 0:t.creationScope)??B).importNode(e,!0);P.currentNode=n;let r=P.nextNode(),i=0,c=0,a=s[0];for(;a!==void 0;){if(i===a.index){let f;a.type===2?f=new Z(r,r.nextSibling,this,t):a.type===1?f=new a.ctor(r,a.name,a.strings,this,t):a.type===6&&(f=new qt(r,this,t)),this._$AV.push(f),a=s[++c]}i!==(a==null?void 0:a.index)&&(r=P.nextNode(),i++)}return P.currentNode=B,n}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class Z{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,n){this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=n,this._$Cv=(n==null?void 0:n.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=I(this,t,e),F(t)?t===h||t==null||t===""?(this._$AH!==h&&this._$AR(),this._$AH=h):t!==this._$AH&&t!==O&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Dt(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!==h&&F(this._$AH)?this._$AA.nextSibling.data=t:this.T(B.createTextNode(t)),this._$AH=t}$(t){var r;const{values:e,_$litType$:s}=t,n=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=V.createElement(Lt(s.h,s.h[0]),this.options)),s);if(((r=this._$AH)==null?void 0:r._$AD)===n)this._$AH.p(e);else{const i=new Rt(n,this),c=i.u(this.options);i.p(e),this.T(c),this._$AH=i}}_$AC(t){let e=_t.get(t.strings);return e===void 0&&_t.set(t.strings,e=new V(t)),e}k(t){ht(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,n=0;for(const r of t)n===e.length?e.push(s=new Z(this.O(R()),this.O(R()),this,this.options)):s=e[n],s._$AI(r),n++;n<e.length&&(this._$AR(s&&s._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const n=t.nextSibling;t.remove(),t=n}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class J{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,n,r){this.type=1,this._$AH=h,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=h}_$AI(t,e=this,s,n){const r=this.strings;let i=!1;if(r===void 0)t=I(this,t,e,0),i=!F(t)||t!==this._$AH&&t!==O,i&&(this._$AH=t);else{const c=t;let a,f;for(t=r[0],a=0;a<r.length-1;a++)f=I(this,c[s+a],e,a),f===O&&(f=this._$AH[a]),i||(i=!F(f)||f!==this._$AH[a]),f===h?t=h:t!==h&&(t+=(f??"")+r[a+1]),this._$AH[a]=f}i&&!n&&this.j(t)}j(t){t===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ft extends J{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===h?void 0:t}}class Vt extends J{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==h)}}class Zt extends J{constructor(t,e,s,n,r){super(t,e,s,n,r),this.type=5}_$AI(t,e=this){if((t=I(this,t,e,0)??h)===O)return;const s=this._$AH,n=t===h&&s!==h||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==h&&(s===h||n);n&&this.element.removeEventListener(this.name,this,s),r&&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 qt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){I(this,t)}}const st=j.litHtmlPolyfillSupport;st==null||st(V,Z),(j.litHtmlVersions??(j.litHtmlVersions=[])).push("3.3.0");const Wt=(o,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let n=s._$litPart$;if(n===void 0){const r=(e==null?void 0:e.renderBefore)??null;s._$litPart$=n=new Z(t.insertBefore(R(),r),r,void 0,e??{})}return n._$AI(o),n};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const
|
|
23
|
+
*/const U=o=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(o,t)}):customElements.define(o,t)};/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const Kt={attribute:!0,type:String,converter:K,reflect:!1,hasChanged:ct},Gt=(o=Kt,t,e)=>{const{kind:s,metadata:n}=e;let
|
|
27
|
+
*/const Kt={attribute:!0,type:String,converter:K,reflect:!1,hasChanged:ct},Gt=(o=Kt,t,e)=>{const{kind:s,metadata:n}=e;let r=globalThis.litPropertyMetadata.get(n);if(r===void 0&&globalThis.litPropertyMetadata.set(n,r=new Map),s==="setter"&&((o=Object.create(o)).wrapped=!0),r.set(e.name,o),s==="accessor"){const{name:i}=e;return{set(c){const a=t.get.call(this);t.set.call(this,c),this.requestUpdate(i,a,o)},init(c){return c!==void 0&&this.C(i,void 0,o,c),c}}}if(s==="setter"){const{name:i}=e;return function(c){const a=this[i];t.call(this,c),this.requestUpdate(i,a,o)}}throw Error("Unsupported decorator location: "+s)};function l(o){return(t,e)=>typeof e=="object"?Gt(o,t,e):((s,n,r)=>{const i=n.hasOwnProperty(r);return n.constructor.createProperty(r,s),i?Object.getOwnPropertyDescriptor(n,r):void 0})(o,t,e)}const Xt=E`
|
|
28
28
|
outline: 1px dashed var(--button-border-color);
|
|
29
29
|
outline-offset: 2px;
|
|
30
30
|
outline: dashed black;
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright 2023 Google LLC
|
|
42
42
|
* SPDX-License-Identifier: Apache-2.0
|
|
43
|
-
*/function Qt(o){o.addInitializer(t=>{const e=t;e.addEventListener("click",async s=>{const{type:n,[dt]:
|
|
43
|
+
*/function Qt(o){o.addInitializer(t=>{const e=t;e.addEventListener("click",async s=>{const{type:n,[dt]:r}=e,{form:i}=r;if(!(!i||n==="button")&&(await new Promise(c=>{setTimeout(c)}),!s.defaultPrevented)){if(n==="reset"){i.reset();return}i.addEventListener("submit",c=>{Object.defineProperty(c,"submitter",{configurable:!0,enumerable:!0,get:()=>e})},{capture:!0,once:!0}),r.setFormValue(e.value),i.requestSubmit()}})})}/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
-
*/class
|
|
51
|
+
*/class it extends ee{constructor(t){if(super(t),this.it=h,t.type!==Yt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===h||t==null)return this._t=void 0,this.it=t;if(t===O)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:[]}}}it.directiveName="unsafeHTML",it.resultType=1;/**
|
|
52
52
|
* @license
|
|
53
53
|
* Copyright 2017 Google LLC
|
|
54
54
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
55
|
-
*/class
|
|
55
|
+
*/class rt extends it{}rt.directiveName="unsafeSVG",rt.resultType=2;const X=te(rt),se=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
56
56
|
<path d="M8 3.6275C7.06799 0.971489 3.25399 -0.0226278 1.67414 2.30983C0.0877404 4.65197 1.67414 6.99412 2.62598 8.33249C3.0147 8.87905 8 14 8 14C8 14 12.9853 8.87905 13.374 8.33249C14.3259 6.99412 15.9123 4.65197 14.3259 2.30983C12.746 -0.0226277 8.97167 0.971489 8 3.6275Z" stroke="#3F2B2E" stroke-linecap="round"/>
|
|
57
57
|
</svg>
|
|
58
58
|
`,ne=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
`,oe=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
62
62
|
<path d="M12.2266 8.16162C11.0953 9.26599 8.72489 11.8788 5.11546 16L4.63062 15.7172C5.78886 13.4007 7.17607 10.8283 8.79223 8C7.17607 5.17172 5.78886 2.59933 4.63062 0.282827L5.11546 0C8.72489 4.12121 11.0953 6.73401 12.2266 7.83838V8.16162Z" fill="#3F2B2E"/>
|
|
63
63
|
</svg>
|
|
64
|
-
`,
|
|
64
|
+
`,ie=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
65
65
|
<path d="M5 7.83838C6.02128 6.73401 8.16109 4.12121 11.4195 0L11.8571 0.282829C10.8116 2.59933 9.55927 5.17172 8.1003 8C9.55927 10.8283 10.8115 13.4007 11.8571 15.7172L11.4195 16C8.16109 11.8788 6.02128 9.266 5 8.16162L5 7.83838Z" fill="#3F2B2E"/>
|
|
66
66
|
</svg>
|
|
67
|
-
`,
|
|
67
|
+
`,re=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
68
68
|
<path d="M12.2834 14.4585L7.98873 11.3928L3.69404 14.4585L5.33977 9.4972L1 6.39639H6.36554L8 1.4585L9.63446 6.39639H15L10.6602 9.4972L12.306 14.4585H12.2834ZM7.98873 10.328L10.6602 12.2353L9.64573 9.15787L12.2721 7.28568H9.02576L8 4.17317L6.97424 7.28568H3.72786L6.35427 9.15787L5.33977 12.2353L8.01127 10.328H7.98873Z" fill="#3F2B2E"/>
|
|
69
69
|
</svg>
|
|
70
70
|
`,ae=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
</style>
|
|
106
106
|
<path class="st0" d="M27.3,20.7H12.7c-0.4,0-0.7-0.3-0.7-0.7s0.3-0.7,0.7-0.7h14.7c0.4,0,0.7,0.3,0.7,0.7S27.7,20.7,27.3,20.7z"/>
|
|
107
107
|
</svg>
|
|
108
|
-
`,pt={wishlist:se,playerv:ne,chevronRight:oe,chevronLeft:
|
|
108
|
+
`,pt={wishlist:se,playerv:ne,chevronRight:oe,chevronLeft:ie,icoPlus:ue,icoMinus:fe,"star-0":re,"star-25":ae,"star-50":le,"star-75":ce,"star-100":he,cross:de,search:pe};var ge=Object.defineProperty,ve=Object.getOwnPropertyDescriptor,C=(o,t,e,s)=>{for(var n=s>1?void 0:s?ve(t,e):t,r=o.length-1,i;r>=0;r--)(i=o[r])&&(n=(s?i(t,e,n):i(n))||n);return s&&n&&ge(t,e,n),n};let m=class extends ${constructor(){super(...arguments),this.bgstyle="background-light",this.size="medium",this.status="empty",this.type="button",this.strokewidth="1",this.icon="wishlist",this.disabled=!1}updated(o){super.updated(o),this.style.setProperty("--icon-stroke-width",this.strokewidth)}render(){const o=pt[this.icon]??"",t=`icon-${this.icon}`,e=o.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return d`
|
|
109
109
|
${this.type==="span"?d`
|
|
110
110
|
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
111
111
|
${X(e)}
|
|
@@ -277,7 +277,7 @@
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
}
|
|
280
|
-
`;C([l({type:String,reflect:!0})],m.prototype,"bgstyle",2);C([l({type:String,reflect:!0})],m.prototype,"size",2);C([l({type:String,reflect:!0})],m.prototype,"status",2);C([l({type:String,reflect:!0})],m.prototype,"type",2);C([l({type:String})],m.prototype,"strokewidth",2);C([l({type:String})],m.prototype,"icon",2);C([l({type:Boolean,reflect:!0})],m.prototype,"disabled",2);m=C([
|
|
280
|
+
`;C([l({type:String,reflect:!0})],m.prototype,"bgstyle",2);C([l({type:String,reflect:!0})],m.prototype,"size",2);C([l({type:String,reflect:!0})],m.prototype,"status",2);C([l({type:String,reflect:!0})],m.prototype,"type",2);C([l({type:String})],m.prototype,"strokewidth",2);C([l({type:String})],m.prototype,"icon",2);C([l({type:Boolean,reflect:!0})],m.prototype,"disabled",2);m=C([U("o-icon-button")],m);var be=Object.defineProperty,ye=Object.getOwnPropertyDescriptor,v=(o,t,e,s)=>{for(var n=s>1?void 0:s?ye(t,e):t,r=o.length-1,i;r>=0;r--)(i=o[r])&&(n=(s?i(t,e,n):i(n))||n);return s&&n&&be(t,e,n),n};const $e=Jt($);let u=class extends $e{constructor(){super(...arguments),this.type="submit",this.value="",this.variant="primary",this.text="",this.textsecond="",this.fullwidth=!1,this.disabled=!1,this.iconstrokewidth="1",this.icon="",this.startIcon=!1,this.endIcon=!1,this.iconSize="small",this.panelTarget="",this.href="",this.target=""}get name(){return this.getAttribute("name")??""}set name(o){this.setAttribute("name",o)}get form(){return this[dt].form}handleClick(){if(console.log(`[o-button] Click event triggered trying to open ${this.panelTarget} panel.`),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){return this.icon?d`<o-icon-button
|
|
281
281
|
class=${o==="start"?"icon-start":"icon-end"}
|
|
282
282
|
icon=${this.icon}
|
|
283
283
|
bgstyle="${this.variant==="primary"?"none-light":"none-contrast"}"
|
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
aria-hidden="true"
|
|
288
288
|
?disabled=${this.disabled}
|
|
289
289
|
></o-icon-button>`:h}renderButton(){const o=this.text||this.textsecond;return d`
|
|
290
|
-
<button class="button" ?disabled=${this.disabled}>
|
|
290
|
+
<button type=${this.type} class="button" ?disabled=${this.disabled} @click=${this.handleClick}>
|
|
291
291
|
${this.startIcon?this.renderIcon("start"):h}
|
|
292
292
|
${o?d`
|
|
293
293
|
${this.text?d`<span>${this.text}</span>`:h}
|
|
@@ -438,7 +438,7 @@
|
|
|
438
438
|
display: inline-flex;
|
|
439
439
|
align-items: center;
|
|
440
440
|
}
|
|
441
|
-
`;v([l()],u.prototype,"type",2);v([l({reflect:!0})],u.prototype,"value",2);v([l({reflect:!0})],u.prototype,"variant",2);v([l({type:String})],u.prototype,"text",2);v([l({type:String})],u.prototype,"textsecond",2);v([l({reflect:!0
|
|
441
|
+
`;v([l()],u.prototype,"type",2);v([l({reflect:!0})],u.prototype,"value",2);v([l({type:String,reflect:!0})],u.prototype,"variant",2);v([l({type:String})],u.prototype,"text",2);v([l({type:String})],u.prototype,"textsecond",2);v([l({type:Boolean,reflect:!0})],u.prototype,"fullwidth",2);v([l({type:Boolean,reflect:!0})],u.prototype,"disabled",2);v([l({type:String,attribute:"iconstrokewidth"})],u.prototype,"iconstrokewidth",2);v([l({type:String})],u.prototype,"icon",2);v([l({type:Boolean,reflect:!0,attribute:"starticon"})],u.prototype,"startIcon",2);v([l({type:Boolean,reflect:!0,attribute:"endicon"})],u.prototype,"endIcon",2);v([l({type:String,reflect:!0,attribute:"iconsize"})],u.prototype,"iconSize",2);v([l({type:String,attribute:"paneltarget",reflect:!0})],u.prototype,"panelTarget",2);v([l({type:String})],u.prototype,"href",2);v([l({type:String})],u.prototype,"target",2);u=v([U("o-button")],u);var me=Object.defineProperty,we=Object.getOwnPropertyDescriptor,Q=(o,t,e,s)=>{for(var n=s>1?void 0:s?we(t,e):t,r=o.length-1,i;r>=0;r--)(i=o[r])&&(n=(s?i(t,e,n):i(n))||n);return s&&n&&me(t,e,n),n};let T=class extends ${constructor(){super(...arguments),this.status="empty",this.ariaDescribedBy="a-product-name",this.label="Add to wishlist",this.toggleStatus=()=>{this.status=this.status==="empty"?"filled":"empty",this.setAttribute("aria-pressed",String(this.status==="filled")),this.dispatchEvent(new CustomEvent("wishlist-toggle",{detail:{status:this.status},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute("tabindex","0"),this.setAttribute("role","button"),this.setAttribute("aria-pressed",String(this.status==="filled"))}firstUpdated(){this.addEventListener("click",this.toggleStatus),this.addEventListener("keydown",this.handleKeydown)}handleKeydown(o){(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),this.toggleStatus())}render(){const o=pt.wishlist.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return d`
|
|
442
442
|
<button
|
|
443
443
|
type="button"
|
|
444
444
|
aria-describedby="${this.ariaDescribedBy}"
|
|
@@ -448,7 +448,7 @@
|
|
|
448
448
|
<span class="sr-only">${this.label}</span>
|
|
449
449
|
${X(o)}
|
|
450
450
|
</button>
|
|
451
|
-
`}setStatus(o){this.status=o,this.setAttribute("aria-pressed",String(this.status==="filled")),this.requestUpdate()}setAriaDescribedBy(o){this.ariaDescribedBy=o,this.requestUpdate()}setLabel(o){this.label=o,this.requestUpdate()}};
|
|
451
|
+
`}setStatus(o){this.status=o,this.setAttribute("aria-pressed",String(this.status==="filled")),this.requestUpdate()}setAriaDescribedBy(o){this.ariaDescribedBy=o,this.requestUpdate()}setLabel(o){this.label=o,this.requestUpdate()}};T.styles=E`
|
|
452
452
|
:host {
|
|
453
453
|
display: inline-flex;
|
|
454
454
|
justify-content: center;
|
|
@@ -507,7 +507,7 @@
|
|
|
507
507
|
width: 0.1rem !important;
|
|
508
508
|
white-space: nowrap !important;
|
|
509
509
|
}
|
|
510
|
-
`;Q([l({type:String,reflect:!0})],
|
|
510
|
+
`;Q([l({type:String,reflect:!0})],T.prototype,"status",2);Q([l({type:String,reflect:!0})],T.prototype,"ariaDescribedBy",2);Q([l({type:String,reflect:!0})],T.prototype,"label",2);T=Q([U("o-wishlist-button")],T);var _e=Object.defineProperty,xe=Object.getOwnPropertyDescriptor,H=(o,t,e,s)=>{for(var n=s>1?void 0:s?xe(t,e):t,r=o.length-1,i;r>=0;r--)(i=o[r])&&(n=(s?i(t,e,n):i(n))||n);return s&&n&&_e(t,e,n),n};let _=class extends ${constructor(){super(...arguments),this.href="",this.target="",this.template="standard",this.inverse=!1,this.endIcon=!1,this.reverseEndIcon=!1}render(){return d`
|
|
511
511
|
<a href="${this.href}" target="${this.target}">
|
|
512
512
|
${this.endIcon&&this.reverseEndIcon?d`
|
|
513
513
|
<o-icon-button
|
|
@@ -616,14 +616,14 @@
|
|
|
616
616
|
height: 1px;
|
|
617
617
|
}
|
|
618
618
|
/* End of underline effect */
|
|
619
|
-
`;H([l({type:String})],_.prototype,"href",2);H([l({type:String})],_.prototype,"target",2);H([l({type:String,reflect:!0})],_.prototype,"template",2);H([l({type:Boolean,reflect:!0})],_.prototype,"inverse",2);H([l({type:Boolean,reflect:!0})],_.prototype,"endIcon",2);H([l({type:Boolean,reflect:!0})],_.prototype,"reverseEndIcon",2);_=H([
|
|
619
|
+
`;H([l({type:String})],_.prototype,"href",2);H([l({type:String})],_.prototype,"target",2);H([l({type:String,reflect:!0})],_.prototype,"template",2);H([l({type:Boolean,reflect:!0})],_.prototype,"inverse",2);H([l({type:Boolean,reflect:!0})],_.prototype,"endIcon",2);H([l({type:Boolean,reflect:!0})],_.prototype,"reverseEndIcon",2);_=H([U("o-link")],_);var Ae=Object.defineProperty,Se=Object.getOwnPropertyDescriptor,Y=(o,t,e,s)=>{for(var n=s>1?void 0:s?Se(t,e):t,r=o.length-1,i;r>=0;r--)(i=o[r])&&(n=(s?i(t,e,n):i(n))||n);return s&&n&&Ae(t,e,n),n};let z=class extends ${constructor(){super(...arguments),this.rating=0}getStarKeys(){const o=[];for(let t=0;t<5;t++){const e=this.rating-t;let s;e>=1?s=100:e<=0?s=0:s=Math.round(e*100/25)*25,o.push(`star-${s}`)}return o}render(){const o=this.getStarKeys();return d`
|
|
620
620
|
<div class="rating">
|
|
621
621
|
<div class="stars">
|
|
622
622
|
${o.map(t=>d`<span class="star">${X(pt[t]??"")}</span>`)}
|
|
623
623
|
</div>
|
|
624
624
|
${this.reviewCount!=null&&this.href!=null?d`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>`:null}
|
|
625
625
|
</div>
|
|
626
|
-
`}};
|
|
626
|
+
`}};z.styles=E`
|
|
627
627
|
svg {
|
|
628
628
|
width: 12px;
|
|
629
629
|
height: 12px;
|
|
@@ -656,7 +656,7 @@
|
|
|
656
656
|
text-decoration: underline;
|
|
657
657
|
cursor: pointer;
|
|
658
658
|
}
|
|
659
|
-
`;Y([l({type:Number})],
|
|
659
|
+
`;Y([l({type:Number})],z.prototype,"rating",2);Y([l({type:String})],z.prototype,"reviewCount",2);Y([l({type:String})],z.prototype,"href",2);z=Y([U("o-rating")],z);var Ee=Object.defineProperty,Ce=Object.getOwnPropertyDescriptor,y=(o,t,e,s)=>{for(var n=s>1?void 0:s?Ce(t,e):t,r=o.length-1,i;r>=0;r--)(i=o[r])&&(n=(s?i(t,e,n):i(n))||n);return s&&n&&Ee(t,e,n),n};let b=class extends ${constructor(){super(...arguments),this.open=!1,this.showHeader=!0,this.showFooter=!1,this.headerTitle="",this.closeButtonLabel="Close the modal",this.firstButtonLabel="Close",this.firstButtonVariant="primary",this.secondaryButtonLabel="",this.secondaryButtonVariant="secondary",this.previousFocusedElement=null,this.handleKeyDown=o=>{this.open&&(o.key==="Escape"?this.closePanel():o.key==="Tab"&&this.trapFocus(o))}}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){document.body.style.overflow="",window.removeEventListener("keydown",this.handleKeyDown),super.disconnectedCallback()}trapFocus(o){const t=this.getFocusableElements();if(t.length===0)return;const e=t[0],s=t[t.length-1];o.shiftKey&&document.activeElement===e?(o.preventDefault(),s.focus()):!o.shiftKey&&document.activeElement===s&&(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",this.updateComplete.then(()=>{const o=this.getFocusableElements()[0];o==null||o.focus()})}closePanel(){var o;this.open=!1,document.body.style.overflow="",(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()}render(){return d`
|
|
660
660
|
<div class="overlay" @click=${this.closePanel}></div>
|
|
661
661
|
<div
|
|
662
662
|
class="panel"
|
|
@@ -680,7 +680,6 @@
|
|
|
680
680
|
<div class="footer">
|
|
681
681
|
${this.firstButtonVariant&&this.firstButtonLabel?d`
|
|
682
682
|
<o-button
|
|
683
|
-
customclass="full"
|
|
684
683
|
variant="${this.firstButtonVariant}"
|
|
685
684
|
@click=${this.handleFirstClick}
|
|
686
685
|
>
|
|
@@ -690,7 +689,6 @@
|
|
|
690
689
|
|
|
691
690
|
${this.secondaryButtonVariant&&this.secondaryButtonLabel?d`
|
|
692
691
|
<o-button
|
|
693
|
-
customclass="full"
|
|
694
692
|
variant="${this.secondaryButtonVariant}"
|
|
695
693
|
@click=${this.handleSecondaryClick}
|
|
696
694
|
>
|
|
@@ -797,4 +795,4 @@
|
|
|
797
795
|
max-width: none;
|
|
798
796
|
}
|
|
799
797
|
}
|
|
800
|
-
`;y([l({type:Boolean,reflect:!0})],b.prototype,"open",2);y([l({type:Boolean,reflect:!0})],b.prototype,"showHeader",2);y([l({type:Boolean,reflect:!0})],b.prototype,"showFooter",2);y([l({type:String,reflect:!0})],b.prototype,"headerTitle",2);y([l({type:String,reflect:!0})],b.prototype,"closeButtonLabel",2);y([l({type:String,reflect:!0})],b.prototype,"firstButtonLabel",2);y([l({type:String,reflect:!0})],b.prototype,"firstButtonVariant",2);y([l({type:Function})],b.prototype,"onFirstButtonClick",2);y([l({type:String,reflect:!0})],b.prototype,"secondaryButtonLabel",2);y([l({type:String,reflect:!0})],b.prototype,"secondaryButtonVariant",2);y([l({type:Function})],b.prototype,"onSecondaryButtonClick",2);b=y([
|
|
798
|
+
`;y([l({type:Boolean,reflect:!0})],b.prototype,"open",2);y([l({type:Boolean,reflect:!0})],b.prototype,"showHeader",2);y([l({type:Boolean,reflect:!0})],b.prototype,"showFooter",2);y([l({type:String,reflect:!0})],b.prototype,"headerTitle",2);y([l({type:String,reflect:!0})],b.prototype,"closeButtonLabel",2);y([l({type:String,reflect:!0})],b.prototype,"firstButtonLabel",2);y([l({type:String,reflect:!0})],b.prototype,"firstButtonVariant",2);y([l({type:Function})],b.prototype,"onFirstButtonClick",2);y([l({type:String,reflect:!0})],b.prototype,"secondaryButtonLabel",2);y([l({type:String,reflect:!0})],b.prototype,"secondaryButtonVariant",2);y([l({type:Function})],b.prototype,"onSecondaryButtonClick",2);b=y([U("o-side-panel")],b);
|
package/index.mjs
CHANGED
|
@@ -23,11 +23,11 @@ let At = class {
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
const Pt = (o) => new At(typeof o == "string" ? o : o + "", void 0, lt), E = (o, ...t) => {
|
|
26
|
-
const e = o.length === 1 ? o[0] : t.reduce((s, n,
|
|
27
|
-
if (
|
|
28
|
-
if (typeof
|
|
29
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
|
30
|
-
})(n) + o[
|
|
26
|
+
const e = o.length === 1 ? o[0] : t.reduce((s, n, r) => s + ((i) => {
|
|
27
|
+
if (i._$cssResult$ === !0) return i.cssText;
|
|
28
|
+
if (typeof i == "number") return i;
|
|
29
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + i + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
|
+
})(n) + o[r + 1], o[0]);
|
|
31
31
|
return new At(e, o, lt);
|
|
32
32
|
}, kt = (o, t) => {
|
|
33
33
|
if (at) o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
@@ -45,10 +45,10 @@ const Pt = (o) => new At(typeof o == "string" ? o : o + "", void 0, lt), E = (o,
|
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is: Bt, defineProperty: Ot, getOwnPropertyDescriptor: Ht, getOwnPropertyNames: Mt, getOwnPropertySymbols: It, getPrototypeOf:
|
|
48
|
+
const { is: Bt, defineProperty: Ot, getOwnPropertyDescriptor: Ht, getOwnPropertyNames: Mt, getOwnPropertySymbols: It, getPrototypeOf: Tt } = Object, S = globalThis, gt = S.trustedTypes, zt = gt ? gt.emptyScript : "", tt = S.reactiveElementPolyfillSupport, N = (o, t) => o, K = { toAttribute(o, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
o = o ?
|
|
51
|
+
o = o ? zt : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -89,14 +89,14 @@ let M = class extends HTMLElement {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(t, e, s) {
|
|
92
|
-
const { get: n, set:
|
|
92
|
+
const { get: n, set: r } = Ht(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[e];
|
|
94
|
-
}, set(
|
|
95
|
-
this[e] =
|
|
94
|
+
}, set(i) {
|
|
95
|
+
this[e] = i;
|
|
96
96
|
} };
|
|
97
|
-
return { get: n, set(
|
|
97
|
+
return { get: n, set(i) {
|
|
98
98
|
const c = n == null ? void 0 : n.call(this);
|
|
99
|
-
|
|
99
|
+
r == null || r.call(this, i), this.requestUpdate(t, c, s);
|
|
100
100
|
}, configurable: !0, enumerable: !0 };
|
|
101
101
|
}
|
|
102
102
|
static getPropertyOptions(t) {
|
|
@@ -104,7 +104,7 @@ let M = class extends HTMLElement {
|
|
|
104
104
|
}
|
|
105
105
|
static _$Ei() {
|
|
106
106
|
if (this.hasOwnProperty(N("elementProperties"))) return;
|
|
107
|
-
const t =
|
|
107
|
+
const t = Tt(this);
|
|
108
108
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
109
109
|
}
|
|
110
110
|
static finalize() {
|
|
@@ -181,32 +181,32 @@ let M = class extends HTMLElement {
|
|
|
181
181
|
this._$AK(t, s);
|
|
182
182
|
}
|
|
183
183
|
_$ET(t, e) {
|
|
184
|
-
var
|
|
184
|
+
var r;
|
|
185
185
|
const s = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, s);
|
|
186
186
|
if (n !== void 0 && s.reflect === !0) {
|
|
187
|
-
const
|
|
188
|
-
this._$Em = t,
|
|
187
|
+
const i = (((r = s.converter) == null ? void 0 : r.toAttribute) !== void 0 ? s.converter : K).toAttribute(e, s.type);
|
|
188
|
+
this._$Em = t, i == null ? this.removeAttribute(n) : this.setAttribute(n, i), this._$Em = null;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
_$AK(t, e) {
|
|
192
|
-
var
|
|
192
|
+
var r, i;
|
|
193
193
|
const s = this.constructor, n = s._$Eh.get(t);
|
|
194
194
|
if (n !== void 0 && this._$Em !== n) {
|
|
195
|
-
const c = s.getPropertyOptions(n), a = typeof c.converter == "function" ? { fromAttribute: c.converter } : ((
|
|
196
|
-
this._$Em = n, this[n] = a.fromAttribute(e, c.type) ?? ((
|
|
195
|
+
const c = s.getPropertyOptions(n), a = typeof c.converter == "function" ? { fromAttribute: c.converter } : ((r = c.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? c.converter : K;
|
|
196
|
+
this._$Em = n, this[n] = a.fromAttribute(e, c.type) ?? ((i = this._$Ej) == null ? void 0 : i.get(n)) ?? null, this._$Em = null;
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
requestUpdate(t, e, s) {
|
|
200
200
|
var n;
|
|
201
201
|
if (t !== void 0) {
|
|
202
|
-
const
|
|
203
|
-
if (s ?? (s =
|
|
202
|
+
const r = this.constructor, i = this[t];
|
|
203
|
+
if (s ?? (s = r.getPropertyOptions(t)), !((s.hasChanged ?? ct)(i, e) || s.useDefault && s.reflect && i === ((n = this._$Ej) == null ? void 0 : n.get(t)) && !this.hasAttribute(r._$Eu(t, s)))) return;
|
|
204
204
|
this.C(t, e, s);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
207
207
|
}
|
|
208
|
-
C(t, e, { useDefault: s, reflect: n, wrapped:
|
|
209
|
-
s && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t,
|
|
208
|
+
C(t, e, { useDefault: s, reflect: n, wrapped: r }, i) {
|
|
209
|
+
s && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, i ?? e ?? this[t]), r !== !0 || i !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), n === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
|
|
210
210
|
}
|
|
211
211
|
async _$EP() {
|
|
212
212
|
this.isUpdatePending = !0;
|
|
@@ -226,21 +226,21 @@ let M = class extends HTMLElement {
|
|
|
226
226
|
if (!this.isUpdatePending) return;
|
|
227
227
|
if (!this.hasUpdated) {
|
|
228
228
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
229
|
-
for (const [
|
|
229
|
+
for (const [r, i] of this._$Ep) this[r] = i;
|
|
230
230
|
this._$Ep = void 0;
|
|
231
231
|
}
|
|
232
232
|
const n = this.constructor.elementProperties;
|
|
233
|
-
if (n.size > 0) for (const [
|
|
234
|
-
const { wrapped: c } =
|
|
235
|
-
c !== !0 || this._$AL.has(
|
|
233
|
+
if (n.size > 0) for (const [r, i] of n) {
|
|
234
|
+
const { wrapped: c } = i, a = this[r];
|
|
235
|
+
c !== !0 || this._$AL.has(r) || a === void 0 || this.C(r, void 0, i, a);
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
let t = !1;
|
|
239
239
|
const e = this._$AL;
|
|
240
240
|
try {
|
|
241
241
|
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((n) => {
|
|
242
|
-
var
|
|
243
|
-
return (
|
|
242
|
+
var r;
|
|
243
|
+
return (r = n.hostUpdate) == null ? void 0 : r.call(n);
|
|
244
244
|
}), this.update(e)) : this._$EM();
|
|
245
245
|
} catch (n) {
|
|
246
246
|
throw t = !1, this._$EM(), n;
|
|
@@ -282,7 +282,7 @@ M.elementStyles = [], M.shadowRootOptions = { mode: "open" }, M[N("elementProper
|
|
|
282
282
|
* Copyright 2017 Google LLC
|
|
283
283
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
284
284
|
*/
|
|
285
|
-
const j = globalThis, G = j.trustedTypes, bt = G ? G.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, St = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, Et = "?" + A,
|
|
285
|
+
const j = globalThis, G = j.trustedTypes, bt = G ? G.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, St = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, Et = "?" + A, Ut = `<${Et}>`, B = document, R = () => B.createComment(""), F = (o) => o === null || typeof o != "object" && typeof o != "function", ht = Array.isArray, Dt = (o) => ht(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", et = `[
|
|
286
286
|
\f\r]`, D = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, yt = /-->/g, $t = />/g, L = RegExp(`>|${et}(?:([^\\s"'>=/]+)(${et}*=${et}*(?:[^
|
|
287
287
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), mt = /'/g, wt = /"/g, Ct = /^(?:script|style|textarea|title)$/i, Nt = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), d = Nt(1), O = Symbol.for("lit-noChange"), h = Symbol.for("lit-nothing"), _t = /* @__PURE__ */ new WeakMap(), P = B.createTreeWalker(B, 129);
|
|
288
288
|
function Lt(o, t) {
|
|
@@ -291,21 +291,21 @@ function Lt(o, t) {
|
|
|
291
291
|
}
|
|
292
292
|
const jt = (o, t) => {
|
|
293
293
|
const e = o.length - 1, s = [];
|
|
294
|
-
let n,
|
|
294
|
+
let n, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", i = D;
|
|
295
295
|
for (let c = 0; c < e; c++) {
|
|
296
296
|
const a = o[c];
|
|
297
297
|
let f, g, p = -1, w = 0;
|
|
298
|
-
for (; w < a.length && (
|
|
299
|
-
const x =
|
|
300
|
-
|
|
298
|
+
for (; w < a.length && (i.lastIndex = w, g = i.exec(a), g !== null); ) w = i.lastIndex, i === D ? g[1] === "!--" ? i = yt : g[1] !== void 0 ? i = $t : g[2] !== void 0 ? (Ct.test(g[2]) && (n = RegExp("</" + g[2], "g")), i = L) : g[3] !== void 0 && (i = L) : i === L ? g[0] === ">" ? (i = n ?? D, p = -1) : g[1] === void 0 ? p = -2 : (p = i.lastIndex - g[2].length, f = g[1], i = g[3] === void 0 ? L : g[3] === '"' ? wt : mt) : i === wt || i === mt ? i = L : i === yt || i === $t ? i = D : (i = L, n = void 0);
|
|
299
|
+
const x = i === L && o[c + 1].startsWith("/>") ? " " : "";
|
|
300
|
+
r += i === D ? a + Ut : p >= 0 ? (s.push(f), a.slice(0, p) + St + a.slice(p) + A + x) : a + A + (p === -2 ? c : x);
|
|
301
301
|
}
|
|
302
|
-
return [Lt(o,
|
|
302
|
+
return [Lt(o, r + (o[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
303
303
|
};
|
|
304
304
|
class V {
|
|
305
305
|
constructor({ strings: t, _$litType$: e }, s) {
|
|
306
306
|
let n;
|
|
307
307
|
this.parts = [];
|
|
308
|
-
let
|
|
308
|
+
let r = 0, i = 0;
|
|
309
309
|
const c = t.length - 1, a = this.parts, [f, g] = jt(t, e);
|
|
310
310
|
if (this.el = V.createElement(f, s), P.currentNode = this.el.content, e === 2 || e === 3) {
|
|
311
311
|
const p = this.el.content.firstChild;
|
|
@@ -314,23 +314,23 @@ class V {
|
|
|
314
314
|
for (; (n = P.nextNode()) !== null && a.length < c; ) {
|
|
315
315
|
if (n.nodeType === 1) {
|
|
316
316
|
if (n.hasAttributes()) for (const p of n.getAttributeNames()) if (p.endsWith(St)) {
|
|
317
|
-
const w = g[
|
|
318
|
-
a.push({ type: 1, index:
|
|
319
|
-
} else p.startsWith(A) && (a.push({ type: 6, index:
|
|
317
|
+
const w = g[i++], x = n.getAttribute(p).split(A), q = /([.?@])?(.*)/.exec(w);
|
|
318
|
+
a.push({ type: 1, index: r, name: q[2], strings: x, ctor: q[1] === "." ? Ft : q[1] === "?" ? Vt : q[1] === "@" ? Zt : J }), n.removeAttribute(p);
|
|
319
|
+
} else p.startsWith(A) && (a.push({ type: 6, index: r }), n.removeAttribute(p));
|
|
320
320
|
if (Ct.test(n.tagName)) {
|
|
321
321
|
const p = n.textContent.split(A), w = p.length - 1;
|
|
322
322
|
if (w > 0) {
|
|
323
323
|
n.textContent = G ? G.emptyScript : "";
|
|
324
|
-
for (let x = 0; x < w; x++) n.append(p[x], R()), P.nextNode(), a.push({ type: 2, index: ++
|
|
324
|
+
for (let x = 0; x < w; x++) n.append(p[x], R()), P.nextNode(), a.push({ type: 2, index: ++r });
|
|
325
325
|
n.append(p[w], R());
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
} else if (n.nodeType === 8) if (n.data === Et) a.push({ type: 2, index:
|
|
328
|
+
} else if (n.nodeType === 8) if (n.data === Et) a.push({ type: 2, index: r });
|
|
329
329
|
else {
|
|
330
330
|
let p = -1;
|
|
331
|
-
for (; (p = n.data.indexOf(A, p + 1)) !== -1; ) a.push({ type: 7, index:
|
|
331
|
+
for (; (p = n.data.indexOf(A, p + 1)) !== -1; ) a.push({ type: 7, index: r }), p += A.length - 1;
|
|
332
332
|
}
|
|
333
|
-
|
|
333
|
+
r++;
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
336
|
static createElement(t, e) {
|
|
@@ -339,11 +339,11 @@ class V {
|
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
341
|
function I(o, t, e = o, s) {
|
|
342
|
-
var
|
|
342
|
+
var i, c;
|
|
343
343
|
if (t === O) return t;
|
|
344
|
-
let n = s !== void 0 ? (
|
|
345
|
-
const
|
|
346
|
-
return (n == null ? void 0 : n.constructor) !==
|
|
344
|
+
let n = s !== void 0 ? (i = e._$Co) == null ? void 0 : i[s] : e._$Cl;
|
|
345
|
+
const r = F(t) ? void 0 : t._$litDirective$;
|
|
346
|
+
return (n == null ? void 0 : n.constructor) !== r && ((c = n == null ? void 0 : n._$AO) == null || c.call(n, !1), r === void 0 ? n = void 0 : (n = new r(o), n._$AT(o, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = n : e._$Cl = n), n !== void 0 && (t = I(o, n._$AS(o, t.values), n, s)), t;
|
|
347
347
|
}
|
|
348
348
|
class Rt {
|
|
349
349
|
constructor(t, e) {
|
|
@@ -358,13 +358,13 @@ class Rt {
|
|
|
358
358
|
u(t) {
|
|
359
359
|
const { el: { content: e }, parts: s } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? B).importNode(e, !0);
|
|
360
360
|
P.currentNode = n;
|
|
361
|
-
let
|
|
361
|
+
let r = P.nextNode(), i = 0, c = 0, a = s[0];
|
|
362
362
|
for (; a !== void 0; ) {
|
|
363
|
-
if (
|
|
363
|
+
if (i === a.index) {
|
|
364
364
|
let f;
|
|
365
|
-
a.type === 2 ? f = new Z(
|
|
365
|
+
a.type === 2 ? f = new Z(r, r.nextSibling, this, t) : a.type === 1 ? f = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (f = new qt(r, this, t)), this._$AV.push(f), a = s[++c];
|
|
366
366
|
}
|
|
367
|
-
|
|
367
|
+
i !== (a == null ? void 0 : a.index) && (r = P.nextNode(), i++);
|
|
368
368
|
}
|
|
369
369
|
return P.currentNode = B, n;
|
|
370
370
|
}
|
|
@@ -405,12 +405,12 @@ class Z {
|
|
|
405
405
|
this._$AH !== h && F(this._$AH) ? this._$AA.nextSibling.data = t : this.T(B.createTextNode(t)), this._$AH = t;
|
|
406
406
|
}
|
|
407
407
|
$(t) {
|
|
408
|
-
var
|
|
408
|
+
var r;
|
|
409
409
|
const { values: e, _$litType$: s } = t, n = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = V.createElement(Lt(s.h, s.h[0]), this.options)), s);
|
|
410
|
-
if (((
|
|
410
|
+
if (((r = this._$AH) == null ? void 0 : r._$AD) === n) this._$AH.p(e);
|
|
411
411
|
else {
|
|
412
|
-
const
|
|
413
|
-
|
|
412
|
+
const i = new Rt(n, this), c = i.u(this.options);
|
|
413
|
+
i.p(e), this.T(c), this._$AH = i;
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
_$AC(t) {
|
|
@@ -421,7 +421,7 @@ class Z {
|
|
|
421
421
|
ht(this._$AH) || (this._$AH = [], this._$AR());
|
|
422
422
|
const e = this._$AH;
|
|
423
423
|
let s, n = 0;
|
|
424
|
-
for (const
|
|
424
|
+
for (const r of t) n === e.length ? e.push(s = new Z(this.O(R()), this.O(R()), this, this.options)) : s = e[n], s._$AI(r), n++;
|
|
425
425
|
n < e.length && (this._$AR(s && s._$AB.nextSibling, n), e.length = n);
|
|
426
426
|
}
|
|
427
427
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -443,19 +443,19 @@ class J {
|
|
|
443
443
|
get _$AU() {
|
|
444
444
|
return this._$AM._$AU;
|
|
445
445
|
}
|
|
446
|
-
constructor(t, e, s, n,
|
|
447
|
-
this.type = 1, this._$AH = h, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options =
|
|
446
|
+
constructor(t, e, s, n, r) {
|
|
447
|
+
this.type = 1, this._$AH = h, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = h;
|
|
448
448
|
}
|
|
449
449
|
_$AI(t, e = this, s, n) {
|
|
450
|
-
const
|
|
451
|
-
let
|
|
452
|
-
if (
|
|
450
|
+
const r = this.strings;
|
|
451
|
+
let i = !1;
|
|
452
|
+
if (r === void 0) t = I(this, t, e, 0), i = !F(t) || t !== this._$AH && t !== O, i && (this._$AH = t);
|
|
453
453
|
else {
|
|
454
454
|
const c = t;
|
|
455
455
|
let a, f;
|
|
456
|
-
for (t =
|
|
456
|
+
for (t = r[0], a = 0; a < r.length - 1; a++) f = I(this, c[s + a], e, a), f === O && (f = this._$AH[a]), i || (i = !F(f) || f !== this._$AH[a]), f === h ? t = h : t !== h && (t += (f ?? "") + r[a + 1]), this._$AH[a] = f;
|
|
457
457
|
}
|
|
458
|
-
|
|
458
|
+
i && !n && this.j(t);
|
|
459
459
|
}
|
|
460
460
|
j(t) {
|
|
461
461
|
t === h ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
@@ -478,13 +478,13 @@ class Vt extends J {
|
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
class Zt extends J {
|
|
481
|
-
constructor(t, e, s, n,
|
|
482
|
-
super(t, e, s, n,
|
|
481
|
+
constructor(t, e, s, n, r) {
|
|
482
|
+
super(t, e, s, n, r), this.type = 5;
|
|
483
483
|
}
|
|
484
484
|
_$AI(t, e = this) {
|
|
485
485
|
if ((t = I(this, t, e, 0) ?? h) === O) return;
|
|
486
|
-
const s = this._$AH, n = t === h && s !== h || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive,
|
|
487
|
-
n && this.element.removeEventListener(this.name, this, s),
|
|
486
|
+
const s = this._$AH, n = t === h && s !== h || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, r = t !== h && (s === h || n);
|
|
487
|
+
n && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
488
488
|
}
|
|
489
489
|
handleEvent(t) {
|
|
490
490
|
var e;
|
|
@@ -508,8 +508,8 @@ const Wt = (o, t, e) => {
|
|
|
508
508
|
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
509
509
|
let n = s._$litPart$;
|
|
510
510
|
if (n === void 0) {
|
|
511
|
-
const
|
|
512
|
-
s._$litPart$ = n = new Z(t.insertBefore(R(),
|
|
511
|
+
const r = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
512
|
+
s._$litPart$ = n = new Z(t.insertBefore(R(), r), r, void 0, e ?? {});
|
|
513
513
|
}
|
|
514
514
|
return n._$AI(o), n;
|
|
515
515
|
};
|
|
@@ -554,7 +554,7 @@ nt == null || nt({ LitElement: $ });
|
|
|
554
554
|
* Copyright 2017 Google LLC
|
|
555
555
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
556
556
|
*/
|
|
557
|
-
const
|
|
557
|
+
const U = (o) => (t, e) => {
|
|
558
558
|
e !== void 0 ? e.addInitializer(() => {
|
|
559
559
|
customElements.define(o, t);
|
|
560
560
|
}) : customElements.define(o, t);
|
|
@@ -566,29 +566,29 @@ const T = (o) => (t, e) => {
|
|
|
566
566
|
*/
|
|
567
567
|
const Kt = { attribute: !0, type: String, converter: K, reflect: !1, hasChanged: ct }, Gt = (o = Kt, t, e) => {
|
|
568
568
|
const { kind: s, metadata: n } = e;
|
|
569
|
-
let
|
|
570
|
-
if (
|
|
571
|
-
const { name:
|
|
569
|
+
let r = globalThis.litPropertyMetadata.get(n);
|
|
570
|
+
if (r === void 0 && globalThis.litPropertyMetadata.set(n, r = /* @__PURE__ */ new Map()), s === "setter" && ((o = Object.create(o)).wrapped = !0), r.set(e.name, o), s === "accessor") {
|
|
571
|
+
const { name: i } = e;
|
|
572
572
|
return { set(c) {
|
|
573
573
|
const a = t.get.call(this);
|
|
574
|
-
t.set.call(this, c), this.requestUpdate(
|
|
574
|
+
t.set.call(this, c), this.requestUpdate(i, a, o);
|
|
575
575
|
}, init(c) {
|
|
576
|
-
return c !== void 0 && this.C(
|
|
576
|
+
return c !== void 0 && this.C(i, void 0, o, c), c;
|
|
577
577
|
} };
|
|
578
578
|
}
|
|
579
579
|
if (s === "setter") {
|
|
580
|
-
const { name:
|
|
580
|
+
const { name: i } = e;
|
|
581
581
|
return function(c) {
|
|
582
|
-
const a = this[
|
|
583
|
-
t.call(this, c), this.requestUpdate(
|
|
582
|
+
const a = this[i];
|
|
583
|
+
t.call(this, c), this.requestUpdate(i, a, o);
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
586
|
throw Error("Unsupported decorator location: " + s);
|
|
587
587
|
};
|
|
588
588
|
function l(o) {
|
|
589
|
-
return (t, e) => typeof e == "object" ? Gt(o, t, e) : ((s, n,
|
|
590
|
-
const
|
|
591
|
-
return n.constructor.createProperty(
|
|
589
|
+
return (t, e) => typeof e == "object" ? Gt(o, t, e) : ((s, n, r) => {
|
|
590
|
+
const i = n.hasOwnProperty(r);
|
|
591
|
+
return n.constructor.createProperty(r, s), i ? Object.getOwnPropertyDescriptor(n, r) : void 0;
|
|
592
592
|
})(o, t, e);
|
|
593
593
|
}
|
|
594
594
|
const Xt = E`
|
|
@@ -625,15 +625,15 @@ function Qt(o) {
|
|
|
625
625
|
o.addInitializer((t) => {
|
|
626
626
|
const e = t;
|
|
627
627
|
e.addEventListener("click", async (s) => {
|
|
628
|
-
const { type: n, [dt]:
|
|
629
|
-
if (!(!
|
|
628
|
+
const { type: n, [dt]: r } = e, { form: i } = r;
|
|
629
|
+
if (!(!i || n === "button") && (await new Promise((c) => {
|
|
630
630
|
setTimeout(c);
|
|
631
631
|
}), !s.defaultPrevented)) {
|
|
632
632
|
if (n === "reset") {
|
|
633
|
-
|
|
633
|
+
i.reset();
|
|
634
634
|
return;
|
|
635
635
|
}
|
|
636
|
-
|
|
636
|
+
i.addEventListener(
|
|
637
637
|
"submit",
|
|
638
638
|
(c) => {
|
|
639
639
|
Object.defineProperty(c, "submitter", {
|
|
@@ -643,7 +643,7 @@ function Qt(o) {
|
|
|
643
643
|
});
|
|
644
644
|
},
|
|
645
645
|
{ capture: !0, once: !0 }
|
|
646
|
-
),
|
|
646
|
+
), r.setFormValue(e.value), i.requestSubmit();
|
|
647
647
|
}
|
|
648
648
|
});
|
|
649
649
|
});
|
|
@@ -675,7 +675,7 @@ class ee {
|
|
|
675
675
|
* Copyright 2017 Google LLC
|
|
676
676
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
677
677
|
*/
|
|
678
|
-
class
|
|
678
|
+
class it extends ee {
|
|
679
679
|
constructor(t) {
|
|
680
680
|
if (super(t), this.it = h, t.type !== Yt.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
681
681
|
}
|
|
@@ -689,16 +689,16 @@ class rt extends ee {
|
|
|
689
689
|
return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
|
-
|
|
692
|
+
it.directiveName = "unsafeHTML", it.resultType = 1;
|
|
693
693
|
/**
|
|
694
694
|
* @license
|
|
695
695
|
* Copyright 2017 Google LLC
|
|
696
696
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
697
697
|
*/
|
|
698
|
-
class
|
|
698
|
+
class rt extends it {
|
|
699
699
|
}
|
|
700
|
-
|
|
701
|
-
const X = te(
|
|
700
|
+
rt.directiveName = "unsafeSVG", rt.resultType = 2;
|
|
701
|
+
const X = te(rt), se = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
702
702
|
<path d="M8 3.6275C7.06799 0.971489 3.25399 -0.0226278 1.67414 2.30983C0.0877404 4.65197 1.67414 6.99412 2.62598 8.33249C3.0147 8.87905 8 14 8 14C8 14 12.9853 8.87905 13.374 8.33249C14.3259 6.99412 15.9123 4.65197 14.3259 2.30983C12.746 -0.0226277 8.97167 0.971489 8 3.6275Z" stroke="#3F2B2E" stroke-linecap="round"/>
|
|
703
703
|
</svg>
|
|
704
704
|
`, ne = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -707,10 +707,10 @@ const X = te(it), se = `<svg width="16" height="16" viewBox="0 0 16 16" fill="no
|
|
|
707
707
|
`, oe = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
708
708
|
<path d="M12.2266 8.16162C11.0953 9.26599 8.72489 11.8788 5.11546 16L4.63062 15.7172C5.78886 13.4007 7.17607 10.8283 8.79223 8C7.17607 5.17172 5.78886 2.59933 4.63062 0.282827L5.11546 0C8.72489 4.12121 11.0953 6.73401 12.2266 7.83838V8.16162Z" fill="#3F2B2E"/>
|
|
709
709
|
</svg>
|
|
710
|
-
`,
|
|
710
|
+
`, ie = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
711
711
|
<path d="M5 7.83838C6.02128 6.73401 8.16109 4.12121 11.4195 0L11.8571 0.282829C10.8116 2.59933 9.55927 5.17172 8.1003 8C9.55927 10.8283 10.8115 13.4007 11.8571 15.7172L11.4195 16C8.16109 11.8788 6.02128 9.266 5 8.16162L5 7.83838Z" fill="#3F2B2E"/>
|
|
712
712
|
</svg>
|
|
713
|
-
`,
|
|
713
|
+
`, re = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
714
714
|
<path d="M12.2834 14.4585L7.98873 11.3928L3.69404 14.4585L5.33977 9.4972L1 6.39639H6.36554L8 1.4585L9.63446 6.39639H15L10.6602 9.4972L12.306 14.4585H12.2834ZM7.98873 10.328L10.6602 12.2353L9.64573 9.15787L12.2721 7.28568H9.02576L8 4.17317L6.97424 7.28568H3.72786L6.35427 9.15787L5.33977 12.2353L8.01127 10.328H7.98873Z" fill="#3F2B2E"/>
|
|
715
715
|
</svg>
|
|
716
716
|
`, ae = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -755,10 +755,10 @@ const X = te(it), se = `<svg width="16" height="16" viewBox="0 0 16 16" fill="no
|
|
|
755
755
|
wishlist: se,
|
|
756
756
|
playerv: ne,
|
|
757
757
|
chevronRight: oe,
|
|
758
|
-
chevronLeft:
|
|
758
|
+
chevronLeft: ie,
|
|
759
759
|
icoPlus: ue,
|
|
760
760
|
icoMinus: fe,
|
|
761
|
-
"star-0":
|
|
761
|
+
"star-0": re,
|
|
762
762
|
"star-25": ae,
|
|
763
763
|
"star-50": le,
|
|
764
764
|
"star-75": ce,
|
|
@@ -767,8 +767,8 @@ const X = te(it), se = `<svg width="16" height="16" viewBox="0 0 16 16" fill="no
|
|
|
767
767
|
search: pe
|
|
768
768
|
};
|
|
769
769
|
var ge = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, C = (o, t, e, s) => {
|
|
770
|
-
for (var n = s > 1 ? void 0 : s ? ve(t, e) : t,
|
|
771
|
-
(
|
|
770
|
+
for (var n = s > 1 ? void 0 : s ? ve(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
771
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
772
772
|
return s && n && ge(t, e, n), n;
|
|
773
773
|
};
|
|
774
774
|
let m = class extends $ {
|
|
@@ -981,17 +981,17 @@ C([
|
|
|
981
981
|
l({ type: Boolean, reflect: !0 })
|
|
982
982
|
], m.prototype, "disabled", 2);
|
|
983
983
|
m = C([
|
|
984
|
-
|
|
984
|
+
U("o-icon-button")
|
|
985
985
|
], m);
|
|
986
986
|
var be = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, v = (o, t, e, s) => {
|
|
987
|
-
for (var n = s > 1 ? void 0 : s ? ye(t, e) : t,
|
|
988
|
-
(
|
|
987
|
+
for (var n = s > 1 ? void 0 : s ? ye(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
988
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
989
989
|
return s && n && be(t, e, n), n;
|
|
990
990
|
};
|
|
991
991
|
const $e = Jt($);
|
|
992
992
|
let u = class extends $e {
|
|
993
993
|
constructor() {
|
|
994
|
-
super(...arguments), this.type = "submit", this.value = "", this.variant = "primary", this.text = "", this.textsecond = "", this.fullwidth = !1, this.disabled = !1, this.iconstrokewidth = "1", this.startIcon = !1, this.endIcon = !1, this.iconSize = "small", this.
|
|
994
|
+
super(...arguments), this.type = "submit", this.value = "", this.variant = "primary", this.text = "", this.textsecond = "", this.fullwidth = !1, this.disabled = !1, this.iconstrokewidth = "1", this.icon = "", this.startIcon = !1, this.endIcon = !1, this.iconSize = "small", this.panelTarget = "", this.href = "", this.target = "";
|
|
995
995
|
}
|
|
996
996
|
get name() {
|
|
997
997
|
return this.getAttribute("name") ?? "";
|
|
@@ -1002,6 +1002,12 @@ let u = class extends $e {
|
|
|
1002
1002
|
get form() {
|
|
1003
1003
|
return this[dt].form;
|
|
1004
1004
|
}
|
|
1005
|
+
handleClick() {
|
|
1006
|
+
if (console.log(`[o-button] Click event triggered trying to open ${this.panelTarget} panel.`), this.panelTarget) {
|
|
1007
|
+
const o = document.getElementById(this.panelTarget);
|
|
1008
|
+
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.`);
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1005
1011
|
render() {
|
|
1006
1012
|
return this.href ? this.renderLink() : this.renderButton();
|
|
1007
1013
|
}
|
|
@@ -1020,7 +1026,7 @@ let u = class extends $e {
|
|
|
1020
1026
|
renderButton() {
|
|
1021
1027
|
const o = this.text || this.textsecond;
|
|
1022
1028
|
return d`
|
|
1023
|
-
<button class="button" ?disabled=${this.disabled}>
|
|
1029
|
+
<button type=${this.type} class="button" ?disabled=${this.disabled} @click=${this.handleClick}>
|
|
1024
1030
|
${this.startIcon ? this.renderIcon("start") : h}
|
|
1025
1031
|
${o ? d`
|
|
1026
1032
|
${this.text ? d`<span>${this.text}</span>` : h}
|
|
@@ -1188,7 +1194,7 @@ v([
|
|
|
1188
1194
|
l({ reflect: !0 })
|
|
1189
1195
|
], u.prototype, "value", 2);
|
|
1190
1196
|
v([
|
|
1191
|
-
l({ reflect: !0 })
|
|
1197
|
+
l({ type: String, reflect: !0 })
|
|
1192
1198
|
], u.prototype, "variant", 2);
|
|
1193
1199
|
v([
|
|
1194
1200
|
l({ type: String })
|
|
@@ -1197,41 +1203,44 @@ v([
|
|
|
1197
1203
|
l({ type: String })
|
|
1198
1204
|
], u.prototype, "textsecond", 2);
|
|
1199
1205
|
v([
|
|
1200
|
-
l({
|
|
1206
|
+
l({ type: Boolean, reflect: !0 })
|
|
1201
1207
|
], u.prototype, "fullwidth", 2);
|
|
1202
1208
|
v([
|
|
1203
|
-
l({
|
|
1209
|
+
l({ type: Boolean, reflect: !0 })
|
|
1204
1210
|
], u.prototype, "disabled", 2);
|
|
1205
1211
|
v([
|
|
1206
|
-
l({ type: String })
|
|
1212
|
+
l({ type: String, attribute: "iconstrokewidth" })
|
|
1207
1213
|
], u.prototype, "iconstrokewidth", 2);
|
|
1208
1214
|
v([
|
|
1209
|
-
l({ type:
|
|
1215
|
+
l({ type: String })
|
|
1216
|
+
], u.prototype, "icon", 2);
|
|
1217
|
+
v([
|
|
1218
|
+
l({ type: Boolean, reflect: !0, attribute: "starticon" })
|
|
1210
1219
|
], u.prototype, "startIcon", 2);
|
|
1211
1220
|
v([
|
|
1212
|
-
l({ type: Boolean, reflect: !0 })
|
|
1221
|
+
l({ type: Boolean, reflect: !0, attribute: "endicon" })
|
|
1213
1222
|
], u.prototype, "endIcon", 2);
|
|
1214
1223
|
v([
|
|
1215
|
-
l({ type: String, reflect: !0 })
|
|
1224
|
+
l({ type: String, reflect: !0, attribute: "iconsize" })
|
|
1216
1225
|
], u.prototype, "iconSize", 2);
|
|
1217
1226
|
v([
|
|
1218
|
-
l({ type: String })
|
|
1219
|
-
], u.prototype, "
|
|
1227
|
+
l({ type: String, attribute: "paneltarget", reflect: !0 })
|
|
1228
|
+
], u.prototype, "panelTarget", 2);
|
|
1220
1229
|
v([
|
|
1221
|
-
l()
|
|
1230
|
+
l({ type: String })
|
|
1222
1231
|
], u.prototype, "href", 2);
|
|
1223
1232
|
v([
|
|
1224
|
-
l()
|
|
1233
|
+
l({ type: String })
|
|
1225
1234
|
], u.prototype, "target", 2);
|
|
1226
1235
|
u = v([
|
|
1227
|
-
|
|
1236
|
+
U("o-button")
|
|
1228
1237
|
], u);
|
|
1229
1238
|
var me = Object.defineProperty, we = Object.getOwnPropertyDescriptor, Q = (o, t, e, s) => {
|
|
1230
|
-
for (var n = s > 1 ? void 0 : s ? we(t, e) : t,
|
|
1231
|
-
(
|
|
1239
|
+
for (var n = s > 1 ? void 0 : s ? we(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
1240
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
1232
1241
|
return s && n && me(t, e, n), n;
|
|
1233
1242
|
};
|
|
1234
|
-
let
|
|
1243
|
+
let T = class extends $ {
|
|
1235
1244
|
constructor() {
|
|
1236
1245
|
super(...arguments), this.status = "empty", this.ariaDescribedBy = "a-product-name", this.label = "Add to wishlist", this.toggleStatus = () => {
|
|
1237
1246
|
this.status = this.status === "empty" ? "filled" : "empty", this.setAttribute("aria-pressed", String(this.status === "filled")), this.dispatchEvent(new CustomEvent("wishlist-toggle", {
|
|
@@ -1277,7 +1286,7 @@ let z = class extends $ {
|
|
|
1277
1286
|
this.label = o, this.requestUpdate();
|
|
1278
1287
|
}
|
|
1279
1288
|
};
|
|
1280
|
-
|
|
1289
|
+
T.styles = E`
|
|
1281
1290
|
:host {
|
|
1282
1291
|
display: inline-flex;
|
|
1283
1292
|
justify-content: center;
|
|
@@ -1339,19 +1348,19 @@ z.styles = E`
|
|
|
1339
1348
|
`;
|
|
1340
1349
|
Q([
|
|
1341
1350
|
l({ type: String, reflect: !0 })
|
|
1342
|
-
],
|
|
1351
|
+
], T.prototype, "status", 2);
|
|
1343
1352
|
Q([
|
|
1344
1353
|
l({ type: String, reflect: !0 })
|
|
1345
|
-
],
|
|
1354
|
+
], T.prototype, "ariaDescribedBy", 2);
|
|
1346
1355
|
Q([
|
|
1347
1356
|
l({ type: String, reflect: !0 })
|
|
1348
|
-
],
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
],
|
|
1357
|
+
], T.prototype, "label", 2);
|
|
1358
|
+
T = Q([
|
|
1359
|
+
U("o-wishlist-button")
|
|
1360
|
+
], T);
|
|
1352
1361
|
var _e = Object.defineProperty, xe = Object.getOwnPropertyDescriptor, H = (o, t, e, s) => {
|
|
1353
|
-
for (var n = s > 1 ? void 0 : s ? xe(t, e) : t,
|
|
1354
|
-
(
|
|
1362
|
+
for (var n = s > 1 ? void 0 : s ? xe(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
1363
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
1355
1364
|
return s && n && _e(t, e, n), n;
|
|
1356
1365
|
};
|
|
1357
1366
|
let _ = class extends $ {
|
|
@@ -1491,14 +1500,14 @@ H([
|
|
|
1491
1500
|
l({ type: Boolean, reflect: !0 })
|
|
1492
1501
|
], _.prototype, "reverseEndIcon", 2);
|
|
1493
1502
|
_ = H([
|
|
1494
|
-
|
|
1503
|
+
U("o-link")
|
|
1495
1504
|
], _);
|
|
1496
1505
|
var Ae = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, Y = (o, t, e, s) => {
|
|
1497
|
-
for (var n = s > 1 ? void 0 : s ? Se(t, e) : t,
|
|
1498
|
-
(
|
|
1506
|
+
for (var n = s > 1 ? void 0 : s ? Se(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
1507
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
1499
1508
|
return s && n && Ae(t, e, n), n;
|
|
1500
1509
|
};
|
|
1501
|
-
let
|
|
1510
|
+
let z = class extends $ {
|
|
1502
1511
|
constructor() {
|
|
1503
1512
|
super(...arguments), this.rating = 0;
|
|
1504
1513
|
}
|
|
@@ -1525,7 +1534,7 @@ let U = class extends $ {
|
|
|
1525
1534
|
`;
|
|
1526
1535
|
}
|
|
1527
1536
|
};
|
|
1528
|
-
|
|
1537
|
+
z.styles = E`
|
|
1529
1538
|
svg {
|
|
1530
1539
|
width: 12px;
|
|
1531
1540
|
height: 12px;
|
|
@@ -1561,19 +1570,19 @@ U.styles = E`
|
|
|
1561
1570
|
`;
|
|
1562
1571
|
Y([
|
|
1563
1572
|
l({ type: Number })
|
|
1564
|
-
],
|
|
1573
|
+
], z.prototype, "rating", 2);
|
|
1565
1574
|
Y([
|
|
1566
1575
|
l({ type: String })
|
|
1567
|
-
],
|
|
1576
|
+
], z.prototype, "reviewCount", 2);
|
|
1568
1577
|
Y([
|
|
1569
1578
|
l({ type: String })
|
|
1570
|
-
],
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
],
|
|
1579
|
+
], z.prototype, "href", 2);
|
|
1580
|
+
z = Y([
|
|
1581
|
+
U("o-rating")
|
|
1582
|
+
], z);
|
|
1574
1583
|
var Ee = Object.defineProperty, Ce = Object.getOwnPropertyDescriptor, y = (o, t, e, s) => {
|
|
1575
|
-
for (var n = s > 1 ? void 0 : s ? Ce(t, e) : t,
|
|
1576
|
-
(
|
|
1584
|
+
for (var n = s > 1 ? void 0 : s ? Ce(t, e) : t, r = o.length - 1, i; r >= 0; r--)
|
|
1585
|
+
(i = o[r]) && (n = (s ? i(t, e, n) : i(n)) || n);
|
|
1577
1586
|
return s && n && Ee(t, e, n), n;
|
|
1578
1587
|
};
|
|
1579
1588
|
let b = class extends $ {
|
|
@@ -1586,7 +1595,7 @@ let b = class extends $ {
|
|
|
1586
1595
|
super.connectedCallback(), window.addEventListener("keydown", this.handleKeyDown);
|
|
1587
1596
|
}
|
|
1588
1597
|
disconnectedCallback() {
|
|
1589
|
-
window.removeEventListener("keydown", this.handleKeyDown), super.disconnectedCallback();
|
|
1598
|
+
document.body.style.overflow = "", window.removeEventListener("keydown", this.handleKeyDown), super.disconnectedCallback();
|
|
1590
1599
|
}
|
|
1591
1600
|
trapFocus(o) {
|
|
1592
1601
|
const t = this.getFocusableElements();
|
|
@@ -1603,14 +1612,14 @@ let b = class extends $ {
|
|
|
1603
1612
|
).filter((t) => !t.hasAttribute("disabled")) : [];
|
|
1604
1613
|
}
|
|
1605
1614
|
openPanel() {
|
|
1606
|
-
this.previousFocusedElement = document.activeElement, this.open = !0, this.updateComplete.then(() => {
|
|
1615
|
+
this.previousFocusedElement = document.activeElement, this.open = !0, document.body.style.overflow = "hidden", this.updateComplete.then(() => {
|
|
1607
1616
|
const o = this.getFocusableElements()[0];
|
|
1608
1617
|
o == null || o.focus();
|
|
1609
1618
|
});
|
|
1610
1619
|
}
|
|
1611
1620
|
closePanel() {
|
|
1612
1621
|
var o;
|
|
1613
|
-
this.open = !1, (o = this.previousFocusedElement) == null || o.focus(), this.dispatchEvent(
|
|
1622
|
+
this.open = !1, document.body.style.overflow = "", (o = this.previousFocusedElement) == null || o.focus(), this.dispatchEvent(
|
|
1614
1623
|
new CustomEvent("close", { bubbles: !0, composed: !0 })
|
|
1615
1624
|
);
|
|
1616
1625
|
}
|
|
@@ -1645,7 +1654,6 @@ let b = class extends $ {
|
|
|
1645
1654
|
<div class="footer">
|
|
1646
1655
|
${this.firstButtonVariant && this.firstButtonLabel ? d`
|
|
1647
1656
|
<o-button
|
|
1648
|
-
customclass="full"
|
|
1649
1657
|
variant="${this.firstButtonVariant}"
|
|
1650
1658
|
@click=${this.handleFirstClick}
|
|
1651
1659
|
>
|
|
@@ -1655,7 +1663,6 @@ let b = class extends $ {
|
|
|
1655
1663
|
|
|
1656
1664
|
${this.secondaryButtonVariant && this.secondaryButtonLabel ? d`
|
|
1657
1665
|
<o-button
|
|
1658
|
-
customclass="full"
|
|
1659
1666
|
variant="${this.secondaryButtonVariant}"
|
|
1660
1667
|
@click=${this.handleSecondaryClick}
|
|
1661
1668
|
>
|
|
@@ -1800,5 +1807,5 @@ y([
|
|
|
1800
1807
|
l({ type: Function })
|
|
1801
1808
|
], b.prototype, "onSecondaryButtonClick", 2);
|
|
1802
1809
|
b = y([
|
|
1803
|
-
|
|
1810
|
+
U("o-side-panel")
|
|
1804
1811
|
], b);
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@florid-kit/components",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.24",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"module": "index.mjs",
|
|
6
6
|
"typings": "index.d.ts",
|
|
7
7
|
"description": "This library was generated with [Nx](https://nx.dev).",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@florid-kit/tokens": "^0.1.
|
|
9
|
+
"@florid-kit/tokens": "^0.1.5"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@storybook/addon-a11y": "8.6.14",
|