@florid-kit/components 0.8.31 → 0.8.32
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/side-panel.d.ts +2 -2
- package/index.js +19 -19
- package/index.mjs +43 -43
- package/package.json +1 -1
|
@@ -10,11 +10,11 @@ export declare class OccitaneSidePanel extends LitElement {
|
|
|
10
10
|
firstButtonLabel: string;
|
|
11
11
|
firstButtonVariant: string;
|
|
12
12
|
firstButtonProps: {};
|
|
13
|
-
onFirstButtonClick?: (clickEvent: Event, sidePanel: OccitaneSidePanel) => void;
|
|
13
|
+
onFirstButtonClick?: ((clickEvent: Event, sidePanel: OccitaneSidePanel) => void) | "closePanel";
|
|
14
14
|
secondButtonLabel: string;
|
|
15
15
|
secondButtonVariant: string;
|
|
16
16
|
secondButtonProps: {};
|
|
17
|
-
onSecondButtonClick?: (clickEvent: Event, sidePanel: OccitaneSidePanel) => void;
|
|
17
|
+
onSecondButtonClick?: (clickEvent: Event, sidePanel: OccitaneSidePanel) => void | "closePanel";
|
|
18
18
|
disablePortal: boolean;
|
|
19
19
|
zIndex: number;
|
|
20
20
|
initialized: boolean;
|
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const pt=globalThis,
|
|
5
|
+
*/const pt=globalThis,St=pt.ShadowRoot&&(pt.ShadyCSS===void 0||pt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Et=Symbol(),Nt=new WeakMap;let Yt=class{constructor(t,e,n){if(this._$cssResult$=!0,n!==Et)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(St&&t===void 0){const n=e!==void 0&&e.length===1;n&&(t=Nt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&Nt.set(e,t))}return t}toString(){return this.cssText}};const se=o=>new Yt(typeof o=="string"?o:o+"",void 0,Et),g=(o,...t)=>{const e=o.length===1?o[0]:t.reduce((n,i,r)=>n+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[r+1],o[0]);return new Yt(e,o,Et)},ae=(o,t)=>{if(St)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const n=document.createElement("style"),i=pt.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=e.cssText,o.appendChild(n)}},Ft=St?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return se(e)})(o):o;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2023 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: Apache-2.0
|
|
47
|
-
*/function
|
|
47
|
+
*/function Se(o){o.addInitializer(t=>{const e=t;e.addEventListener("click",async n=>{const{type:i,[Ot]:r}=e,{form:s}=r;if(!(!s||i==="button")&&(await new Promise(h=>{setTimeout(h)}),!n.defaultPrevented)){if(i==="reset"){s.reset();return}s.addEventListener("submit",h=>{Object.defineProperty(h,"submitter",{configurable:!0,enumerable:!0,get:()=>e})},{capture:!0,once:!0}),r.setFormValue(e.value),s.requestSubmit()}})})}const Ee=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
48
48
|
<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"/>
|
|
49
49
|
</svg>
|
|
50
50
|
`,Le=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
</svg>
|
|
128
128
|
`,Xe=`<svg viewBox="0 0 200 200" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg">
|
|
129
129
|
<line x1="0" y1="0" x2="200" y2="200" />
|
|
130
|
-
</svg>`,W={wishlist:
|
|
130
|
+
</svg>`,W={wishlist:Ee,playerv:Le,chevronRight:Ie,chevronLeft:Pe,icoPlus:je,icoMinus:Ue,"star-0":Oe,"star-25":Be,"star-50":ze,"star-75":De,"star-100":He,cross:Me,search:Te,arrowLeft:Ne,arrowTop:Fe,cart:Re,notifyme:Ve,triangledown:Ze,triangleup:qe,checkstroke:We,pause:Ke,mapDualArrow:Ge},Je={strikeDiagonal:Xe};/**
|
|
131
131
|
* @license
|
|
132
132
|
* Copyright 2017 Google LLC
|
|
133
133
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
* @license
|
|
140
140
|
* Copyright 2017 Google LLC
|
|
141
141
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
142
|
-
*/class Ct extends kt{}Ct.directiveName="unsafeSVG",Ct.resultType=2;const
|
|
142
|
+
*/class Ct extends kt{}Ct.directiveName="unsafeSVG",Ct.resultType=2;const E=Dt(Ct);var Qe=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,w=(o,t,e,n)=>{for(var i=n>1?void 0:n?Ye(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&Qe(t,e,i),i};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=W[t].replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return l`<span class="${o==="start"?"icon-start":"icon-end"}">${E(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`
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
`:l`<slot></slot>`}
|
|
163
163
|
${this.endIcon?this.renderIcon("end"):d}
|
|
164
164
|
</a>
|
|
165
|
-
`}};
|
|
165
|
+
`}};Se(v);v.formAssociated=!0;v.styles=g`
|
|
166
166
|
:host {
|
|
167
167
|
--button-border: transparent;
|
|
168
168
|
cursor: pointer;
|
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
`;w([a()],v.prototype,"type",2);w([a({reflect:!0})],v.prototype,"value",2);w([a({type:String,reflect:!0})],v.prototype,"variant",2);w([a({type:String})],v.prototype,"text",2);w([a({type:String})],v.prototype,"textsecond",2);w([a({type:Boolean,reflect:!0})],v.prototype,"fullwidth",2);w([a({type:Boolean,reflect:!0})],v.prototype,"disabled",2);w([a({type:String,reflect:!0})],v.prototype,"startIconModel",2);w([a({type:String,reflect:!0})],v.prototype,"endIconModel",2);w([a({type:Boolean,reflect:!0,attribute:"starticon"})],v.prototype,"startIcon",2);w([a({type:Boolean,reflect:!0,attribute:"endicon"})],v.prototype,"endIcon",2);w([a({type:String,attribute:"paneltarget",reflect:!0})],v.prototype,"panelTarget",2);w([a({type:String})],v.prototype,"href",2);w([a({type:String})],v.prototype,"target",2);w([a({type:Boolean,reflect:!0})],v.prototype,"underlined",2);v=w([x("o-button")],v);var eo=Object.defineProperty,oo=Object.getOwnPropertyDescriptor,gt=(o,t,e,n)=>{for(var i=n>1?void 0:n?oo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&eo(t,e,i),i};let J=class extends u{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=W.wishlist.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return l`
|
|
350
350
|
<button type="button" aria-describedby="${this.ariaDescribedBy}" class="wishlist-button">
|
|
351
351
|
<span class="sr-only">${this.label}</span>
|
|
352
|
-
${
|
|
352
|
+
${E(o)}
|
|
353
353
|
</button>
|
|
354
354
|
`}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()}};J.styles=g`
|
|
355
355
|
:host {
|
|
@@ -423,7 +423,7 @@
|
|
|
423
423
|
*/const $=o=>o??d;var io=Object.defineProperty,no=Object.getOwnPropertyDescriptor,I=(o,t,e,n)=>{for(var i=n>1?void 0:n?no(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&io(t,e,i),i};let _=class extends u{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,this.showSrLabel=!1,this.srLabel=""}updated(o){super.updated(o),this.style.setProperty("--icon-stroke-width",this.strokewidth)}render(){const o=W[this.icon]??"",t=`icon-${this.icon}`,e=o.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"'),n=this.showSrLabel?l`<span class="sr-only">${this.srLabel}</span>`:null,i=this.showSrLabel?null:"icon";return l`
|
|
424
424
|
${this.type==="span"?l`
|
|
425
425
|
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
426
|
-
${
|
|
426
|
+
${E(e)}
|
|
427
427
|
</span>
|
|
428
428
|
`:l`
|
|
429
429
|
<button
|
|
@@ -432,7 +432,7 @@
|
|
|
432
432
|
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
|
|
433
433
|
?disabled="${this.disabled}"
|
|
434
434
|
>
|
|
435
|
-
${
|
|
435
|
+
${E(e)}
|
|
436
436
|
${n}
|
|
437
437
|
</button>
|
|
438
438
|
`}
|
|
@@ -758,7 +758,7 @@
|
|
|
758
758
|
`;K([a({type:String})],B.prototype,"href",2);K([a({type:String})],B.prototype,"target",2);K([a({type:String,reflect:!0})],B.prototype,"template",2);K([a({type:Boolean,reflect:!0})],B.prototype,"inverse",2);K([a({type:Boolean,reflect:!0})],B.prototype,"endIcon",2);K([a({type:Boolean,reflect:!0})],B.prototype,"reverseEndIcon",2);B=K([x("o-link")],B);var ao=Object.defineProperty,lo=Object.getOwnPropertyDescriptor,yt=(o,t,e,n)=>{for(var i=n>1?void 0:n?lo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&ao(t,e,i),i};let Q=class extends u{constructor(){super(...arguments),this.rating=0}getStarKeys(){const o=[];for(let t=0;t<5;t++){const e=this.rating-t;let n;e>=1?n=100:e<=0?n=0:n=Math.round(e*100/25)*25,o.push(`star-${n}`)}return o}render(){const o=this.getStarKeys();return l`
|
|
759
759
|
<div class="rating">
|
|
760
760
|
<div class="stars">
|
|
761
|
-
${o.map(t=>l`<span class="star">${
|
|
761
|
+
${o.map(t=>l`<span class="star">${E(W[t]??"")}</span>`)}
|
|
762
762
|
</div>
|
|
763
763
|
${this.reviewCount!=null&&this.href!=null?l`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>`:null}
|
|
764
764
|
</div>
|
|
@@ -803,7 +803,7 @@
|
|
|
803
803
|
* @license
|
|
804
804
|
* Copyright 2017 Google LLC
|
|
805
805
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
806
|
-
*/const ot=(o,t)=>{var n;const e=o._$AN;if(e===void 0)return!1;for(const i of e)(n=i._$AO)==null||n.call(i,t,!1),ot(i,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)},ne=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,ne(this)):this._$AM=o}function po(o,t=!1,e=0){const n=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(n))for(let r=e;r<n.length;r++)ot(n[r],!1),bt(n[r]);else n!=null&&(ot(n,!1),bt(n));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,n){super._$AT(t,e,n),ne(this),this.isConnected=t._$AU}_$AO(t,e=!0){var n,i;t!==this.isConnected&&(this.isConnected=t,t?(n=this.reconnected)==null||n.call(this):(i=this.disconnected)==null||i.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 n;this.element!==t.element&&(this.element=t.element),this.host=((n=t.options)===null||n===void 0?void 0:n.host)||this.element,this.apply(e),this.groom(e),this.prevData={...e}}apply(t){if(!t)return;const{prevData:e,element:n}=this;for(const i in t){const r=t[i];r!==e[i]&&(n[i]=r)}}groom(t){const{prevData:e,element:n}=this;if(e)for(const i in e)(!t||!(i in t)&&n[i]===e[i])&&(n[i]=void 0)}}class fo extends bo{constructor(){super(...arguments),this.eventData={}}apply(t){if(t)for(const e in t){const n=t[e];n!==this.eventData[e]&&this.applyEvent(e,n)}}applyEvent(t,e){const{prevData:n,element:i}=this;this.eventData[t]=e,n[t]&&i.removeEventListener(t,this,e),i.addEventListener(t,this,e)}groom(t){const{prevData:e,element:n}=this;if(e)for(const i in e)(!t||!(i in t)&&n[i]===e[i])&&this.groomEvent(i,e[i])}groomEvent(t,e){const{element:n}=this;delete this.eventData[t],n.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 n in t){const i=n.slice(1),r=t[n];e.removeEventListener(i,this,r)}}reconnected(){const{eventData:t,element:e}=this;for(const n in t){const i=n.slice(1),r=t[n];e.addEventListener(i,this,r)}}}class go extends fo{apply(t){if(!t)return;const{prevData:e,element:n}=this;for(const i in t){const r=t[i];if(r===e[i])continue;const s=i.slice(1);switch(i[0]){case"@":this.eventData[s]=r,this.applyEvent(s,r);break;case".":n[s]=r;break;case"?":r?n.setAttribute(s,""):n.removeAttribute(s);break;default:r!=null?n.setAttribute(i,String(r)):n.removeAttribute(i);break}}}groom(t){const{prevData:e,element:n}=this;if(e)for(const i in e){const r=i.slice(1);if(!t||!(i in t)&&n[r]===e[i])switch(i[0]){case"@":this.groomEvent(r,e[i]);break;case".":n[r]=void 0;break;case"?":n.removeAttribute(r);break;default:n.removeAttribute(i);break}}}}const Jt=Dt(go);var yo=Object.defineProperty,mo=Object.getOwnPropertyDescriptor,y=(o,t,e,n)=>{for(var i=n>1?void 0:n?mo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&yo(t,e,i),i};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.secondButtonLabel="",this.secondButtonVariant="secondary",this.secondButtonProps={},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],n=t[t.length-1];o.shiftKey&&document.activeElement===e?(o.preventDefault(),n.focus()):!o.shiftKey&&document.activeElement===n&&(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(o){typeof this.onFirstButtonClick=="function"&&this.onFirstButtonClick(o,this)}handleSecondaryClick(o){typeof this.onSecondButtonClick=="function"&&this.onSecondButtonClick(o,this)}updated(){
|
|
806
|
+
*/const ot=(o,t)=>{var n;const e=o._$AN;if(e===void 0)return!1;for(const i of e)(n=i._$AO)==null||n.call(i,t,!1),ot(i,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)},ne=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,ne(this)):this._$AM=o}function po(o,t=!1,e=0){const n=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(n))for(let r=e;r<n.length;r++)ot(n[r],!1),bt(n[r]);else n!=null&&(ot(n,!1),bt(n));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,n){super._$AT(t,e,n),ne(this),this.isConnected=t._$AU}_$AO(t,e=!0){var n,i;t!==this.isConnected&&(this.isConnected=t,t?(n=this.reconnected)==null||n.call(this):(i=this.disconnected)==null||i.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 n;this.element!==t.element&&(this.element=t.element),this.host=((n=t.options)===null||n===void 0?void 0:n.host)||this.element,this.apply(e),this.groom(e),this.prevData={...e}}apply(t){if(!t)return;const{prevData:e,element:n}=this;for(const i in t){const r=t[i];r!==e[i]&&(n[i]=r)}}groom(t){const{prevData:e,element:n}=this;if(e)for(const i in e)(!t||!(i in t)&&n[i]===e[i])&&(n[i]=void 0)}}class fo extends bo{constructor(){super(...arguments),this.eventData={}}apply(t){if(t)for(const e in t){const n=t[e];n!==this.eventData[e]&&this.applyEvent(e,n)}}applyEvent(t,e){const{prevData:n,element:i}=this;this.eventData[t]=e,n[t]&&i.removeEventListener(t,this,e),i.addEventListener(t,this,e)}groom(t){const{prevData:e,element:n}=this;if(e)for(const i in e)(!t||!(i in t)&&n[i]===e[i])&&this.groomEvent(i,e[i])}groomEvent(t,e){const{element:n}=this;delete this.eventData[t],n.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 n in t){const i=n.slice(1),r=t[n];e.removeEventListener(i,this,r)}}reconnected(){const{eventData:t,element:e}=this;for(const n in t){const i=n.slice(1),r=t[n];e.addEventListener(i,this,r)}}}class go extends fo{apply(t){if(!t)return;const{prevData:e,element:n}=this;for(const i in t){const r=t[i];if(r===e[i])continue;const s=i.slice(1);switch(i[0]){case"@":this.eventData[s]=r,this.applyEvent(s,r);break;case".":n[s]=r;break;case"?":r?n.setAttribute(s,""):n.removeAttribute(s);break;default:r!=null?n.setAttribute(i,String(r)):n.removeAttribute(i);break}}}groom(t){const{prevData:e,element:n}=this;if(e)for(const i in e){const r=i.slice(1);if(!t||!(i in t)&&n[r]===e[i])switch(i[0]){case"@":this.groomEvent(r,e[i]);break;case".":n[r]=void 0;break;case"?":n.removeAttribute(r);break;default:n.removeAttribute(i);break}}}}const Jt=Dt(go);var yo=Object.defineProperty,mo=Object.getOwnPropertyDescriptor,y=(o,t,e,n)=>{for(var i=n>1?void 0:n?mo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&yo(t,e,i),i};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.secondButtonLabel="",this.secondButtonVariant="secondary",this.secondButtonProps={},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],n=t[t.length-1];o.shiftKey&&document.activeElement===e?(o.preventDefault(),n.focus()):!o.shiftKey&&document.activeElement===n&&(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(o){console.log("First button clicked",o,typeof this.onFirstButtonClick,this.onFirstButtonClick),this.onFirstButtonClick==="closePanel"?this.closePanel():typeof this.onFirstButtonClick=="function"&&this.onFirstButtonClick(o,this)}handleSecondaryClick(o){console.log("Second button clicked",o,typeof this.onSecondButtonClick,this.onSecondButtonClick),this.onFirstButtonClick==="closePanel"?this.closePanel():typeof this.onSecondButtonClick=="function"&&this.onSecondButtonClick(o,this)}updated(){this.style.setProperty("--z-overlay",`${this.zIndex||99}`),this.style.setProperty("--z-panel",`${this.zIndex?this.zIndex+1:99}`)}render(){return l`
|
|
807
807
|
<div class="overlay" style="z-index: ${this.zIndex}" @click=${this.closePanel}></div>
|
|
808
808
|
<div
|
|
809
809
|
class="panel"
|
|
@@ -992,7 +992,7 @@
|
|
|
992
992
|
--line-height: var(--line-height-280);
|
|
993
993
|
}
|
|
994
994
|
}
|
|
995
|
-
`;y([a({type:Boolean,reflect:!0})],b.prototype,"open",2);y([a({type:Boolean,reflect:!0})],b.prototype,"showHeader",2);y([a({type:Boolean,reflect:!0})],b.prototype,"showFooter",2);y([a({type:Boolean,reflect:!0})],b.prototype,"showHeaderStartIcon",2);y([a({type:String,reflect:!0})],b.prototype,"headerTitle",2);y([a({type:String,reflect:!0})],b.prototype,"closeButtonLabel",2);y([a({type:String,reflect:!0})],b.prototype,"firstButtonLabel",2);y([a({type:String,reflect:!0})],b.prototype,"firstButtonVariant",2);y([a({type:Object,reflect:!0})],b.prototype,"firstButtonProps",2);y([a({type:
|
|
995
|
+
`;y([a({type:Boolean,reflect:!0})],b.prototype,"open",2);y([a({type:Boolean,reflect:!0})],b.prototype,"showHeader",2);y([a({type:Boolean,reflect:!0})],b.prototype,"showFooter",2);y([a({type:Boolean,reflect:!0})],b.prototype,"showHeaderStartIcon",2);y([a({type:String,reflect:!0})],b.prototype,"headerTitle",2);y([a({type:String,reflect:!0})],b.prototype,"closeButtonLabel",2);y([a({type:String,reflect:!0})],b.prototype,"firstButtonLabel",2);y([a({type:String,reflect:!0})],b.prototype,"firstButtonVariant",2);y([a({type:Object,reflect:!0})],b.prototype,"firstButtonProps",2);y([a({type:String})],b.prototype,"onFirstButtonClick",2);y([a({type:String,reflect:!0})],b.prototype,"secondButtonLabel",2);y([a({type:String,reflect:!0})],b.prototype,"secondButtonVariant",2);y([a({type:Object,reflect:!0})],b.prototype,"secondButtonProps",2);y([a({type:String})],b.prototype,"onSecondButtonClick",2);y([a({type:Boolean,reflect:!0})],b.prototype,"disablePortal",2);y([a({type:Number,reflect:!0})],b.prototype,"zIndex",2);y([a({type:Boolean,reflect:!0})],b.prototype,"initialized",2);b=y([x("o-side-panel")],b);var xo=Object.defineProperty,wo=Object.getOwnPropertyDescriptor,N=(o,t,e,n)=>{for(var i=n>1?void 0:n?wo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&xo(t,e,i),i};let L=class extends u{constructor(){super(...arguments),this.thumbnails=[],this.activeIndex=0,this.disabledIndexes=[],this.maxWidth="100%",this.altressource="visual",this.focusedIndex=0,this.playerIconTemplate=l`
|
|
996
996
|
<o-icon-button
|
|
997
997
|
icon="playerv"
|
|
998
998
|
size="xsmall"
|
|
@@ -1282,7 +1282,7 @@
|
|
|
1282
1282
|
border-color: transparent var(--color-alpha-dark-strongest) transparent transparent;
|
|
1283
1283
|
}
|
|
1284
1284
|
|
|
1285
|
-
`;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,
|
|
1285
|
+
`;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,n)=>{for(var i=n>1?void 0:n?So(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&Ao(t,e,i),i};let A=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=W.checkstroke.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"'),t=this.options.find(e=>e.value===this.value);return l`
|
|
1286
1286
|
<button
|
|
1287
1287
|
role="combobox"
|
|
1288
1288
|
aria-haspopup="listbox"
|
|
@@ -1322,10 +1322,10 @@
|
|
|
1322
1322
|
${e.url?l`
|
|
1323
1323
|
<a href="${e.url}">
|
|
1324
1324
|
<span>${e.label}</span>
|
|
1325
|
-
${e.value===this.value?l`<span class="check">${
|
|
1325
|
+
${e.value===this.value?l`<span class="check">${E(o)}</span>`:null}
|
|
1326
1326
|
</a>`:l`
|
|
1327
1327
|
<span>${e.label}</span>
|
|
1328
|
-
${e.value===this.value?l`<span class="check">${
|
|
1328
|
+
${e.value===this.value?l`<span class="check">${E(o)}</span>`:null}`}
|
|
1329
1329
|
</li>`)}
|
|
1330
1330
|
</ul>`:null}
|
|
1331
1331
|
|
|
@@ -1469,7 +1469,7 @@
|
|
|
1469
1469
|
input[type="hidden"] {
|
|
1470
1470
|
display: none;
|
|
1471
1471
|
}
|
|
1472
|
-
`;z([a({type:Array,reflect:!0})],A.prototype,"options",2);z([a({type:String,reflect:!0})],A.prototype,"value",2);z([a({type:String,reflect:!0})],A.prototype,"name",2);z([a({type:Boolean,reflect:!0})],A.prototype,"disabled",2);z([a({type:String,reflect:!0})],A.prototype,"width",2);z([q()],A.prototype,"open",2);z([q()],A.prototype,"activeIndex",2);z([q()],A.prototype,"menuWidth",2);A=z([x("o-dropdown")],A);var
|
|
1472
|
+
`;z([a({type:Array,reflect:!0})],A.prototype,"options",2);z([a({type:String,reflect:!0})],A.prototype,"value",2);z([a({type:String,reflect:!0})],A.prototype,"name",2);z([a({type:Boolean,reflect:!0})],A.prototype,"disabled",2);z([a({type:String,reflect:!0})],A.prototype,"width",2);z([q()],A.prototype,"open",2);z([q()],A.prototype,"activeIndex",2);z([q()],A.prototype,"menuWidth",2);A=z([x("o-dropdown")],A);var Eo=Object.getOwnPropertyDescriptor,Lo=(o,t,e,n)=>{for(var i=n>1?void 0:n?Eo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=s(i)||i);return i};let At=class extends u{render(){return l` <span class="dots"></span> `}};At.styles=g`
|
|
1473
1473
|
:host {
|
|
1474
1474
|
display: flex;
|
|
1475
1475
|
align-items: center;
|
|
@@ -1574,7 +1574,7 @@
|
|
|
1574
1574
|
<div class="right">
|
|
1575
1575
|
<span class="additional-text">${$(e.additionaltext)}</span>
|
|
1576
1576
|
${e.value===this.value&&!e.additionaltext?l`
|
|
1577
|
-
<span class="check">${
|
|
1577
|
+
<span class="check">${E(o)}</span>`:null}
|
|
1578
1578
|
</div>
|
|
1579
1579
|
</a>
|
|
1580
1580
|
</li>
|
|
@@ -1951,7 +1951,7 @@
|
|
|
1951
1951
|
flex-wrap: wrap;
|
|
1952
1952
|
gap: var(--spacing-s);
|
|
1953
1953
|
}
|
|
1954
|
-
`;Ut([a({reflect:!0})],ct.prototype,"name",2);Ut([a({reflect:!0})],ct.prototype,"value",2);ct=Ut([x("o-chipset")],ct);var No=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,H=(o,t,e,n)=>{for(var i=n>1?void 0:n?Fo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&No(t,e,i),i};const Ro=Bt(u);let
|
|
1954
|
+
`;Ut([a({reflect:!0})],ct.prototype,"name",2);Ut([a({reflect:!0})],ct.prototype,"value",2);ct=Ut([x("o-chipset")],ct);var No=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,H=(o,t,e,n)=>{for(var i=n>1?void 0:n?Fo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&No(t,e,i),i};const Ro=Bt(u);let S=class extends Ro{constructor(){super(...arguments),this.name="",this.value="",this.type="",this.dataHref="",this.text="",this.selected=!1,this.disabled=!1,this.fullwidth=!1,this.crossIconName="cross",this.strikethroughImgName="strikeDiagonal"}handleClick(o){if(o instanceof KeyboardEvent&&o.key!=="Enter"&&o.key!==" ")return;this.selected=!this.selected;const t={selected:this.selected},e=new CustomEvent("selected",{detail:t,bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(e),e.defaultPrevented&&o.preventDefault(),this.selected=t.selected}crossIcon(){const o=W[this.crossIconName].replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"').replace(/stroke=[#"'a-z1-9]*/gi,"");return l`<span class="cross-icon">${E(o)}</span>`}strikeThroughImg(){const o=Je[this.strikethroughImgName].replace("<svg",'<svg aria-hidden="true" focusable="false" part="strikethrough"').replace(/stroke=[#"'a-z1-9]*/gi,"");return E(o)}render(){const o=this.text;return l`${this.type==="link"?l`
|
|
1955
1955
|
<a role="button" tabindex="0" class="button" href=${this.dataHref} ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}
|
|
1956
1956
|
aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
|
|
1957
1957
|
${o?l`
|
|
@@ -1971,7 +1971,7 @@
|
|
|
1971
1971
|
</button>
|
|
1972
1972
|
`}
|
|
1973
1973
|
${this.disabled?this.strikeThroughImg():d}
|
|
1974
|
-
`}};
|
|
1974
|
+
`}};S.styles=g`
|
|
1975
1975
|
:host {
|
|
1976
1976
|
cursor: pointer;
|
|
1977
1977
|
display: inline-flex;
|
|
@@ -2092,4 +2092,4 @@
|
|
|
2092
2092
|
stroke-linecap: round;
|
|
2093
2093
|
}
|
|
2094
2094
|
}
|
|
2095
|
-
`;H([a({reflect:!0})],
|
|
2095
|
+
`;H([a({reflect:!0})],S.prototype,"name",2);H([a({reflect:!0})],S.prototype,"value",2);H([a({type:String,reflect:!0})],S.prototype,"type",2);H([a({type:String,reflect:!0,attribute:"data-href"})],S.prototype,"dataHref",2);H([a({type:String})],S.prototype,"text",2);H([a({type:Boolean,reflect:!0})],S.prototype,"selected",2);H([a({type:Boolean,reflect:!0})],S.prototype,"disabled",2);H([a({type:Boolean,reflect:!0})],S.prototype,"fullwidth",2);S=H([x("o-filter-chip")],S);
|
package/index.mjs
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const pt = globalThis,
|
|
6
|
+
const pt = globalThis, St = pt.ShadowRoot && (pt.ShadyCSS === void 0 || pt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Et = Symbol(), Nt = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
let Yt = class {
|
|
8
8
|
constructor(t, e, n) {
|
|
9
|
-
if (this._$cssResult$ = !0, n !==
|
|
9
|
+
if (this._$cssResult$ = !0, n !== Et) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = t, this.t = e;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
13
13
|
let t = this.o;
|
|
14
14
|
const e = this.t;
|
|
15
|
-
if (
|
|
15
|
+
if (St && t === void 0) {
|
|
16
16
|
const n = e !== void 0 && e.length === 1;
|
|
17
17
|
n && (t = Nt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && Nt.set(e, t));
|
|
18
18
|
}
|
|
@@ -22,20 +22,20 @@ let Yt = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const se = (o) => new Yt(typeof o == "string" ? o : o + "", void 0,
|
|
25
|
+
const se = (o) => new Yt(typeof o == "string" ? o : o + "", void 0, Et), g = (o, ...t) => {
|
|
26
26
|
const e = o.length === 1 ? o[0] : t.reduce((n, i, r) => n + ((s) => {
|
|
27
27
|
if (s._$cssResult$ === !0) return s.cssText;
|
|
28
28
|
if (typeof s == "number") return s;
|
|
29
29
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + s + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
30
|
})(i) + o[r + 1], o[0]);
|
|
31
|
-
return new Yt(e, o,
|
|
31
|
+
return new Yt(e, o, Et);
|
|
32
32
|
}, ae = (o, t) => {
|
|
33
|
-
if (
|
|
33
|
+
if (St) o.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
34
|
else for (const e of t) {
|
|
35
35
|
const n = document.createElement("style"), i = pt.litNonce;
|
|
36
36
|
i !== void 0 && n.setAttribute("nonce", i), n.textContent = e.cssText, o.appendChild(n);
|
|
37
37
|
}
|
|
38
|
-
}, Ft =
|
|
38
|
+
}, Ft = St ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let e = "";
|
|
40
40
|
for (const n of t.cssRules) e += n.cssText;
|
|
41
41
|
return se(e);
|
|
@@ -629,7 +629,7 @@ function Bt(o) {
|
|
|
629
629
|
* Copyright 2023 Google LLC
|
|
630
630
|
* SPDX-License-Identifier: Apache-2.0
|
|
631
631
|
*/
|
|
632
|
-
function
|
|
632
|
+
function Se(o) {
|
|
633
633
|
o.addInitializer((t) => {
|
|
634
634
|
const e = t;
|
|
635
635
|
e.addEventListener("click", async (n) => {
|
|
@@ -656,7 +656,7 @@ function Ee(o) {
|
|
|
656
656
|
});
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
|
-
const
|
|
659
|
+
const Ee = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
660
660
|
<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"/>
|
|
661
661
|
</svg>
|
|
662
662
|
`, Le = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -740,7 +740,7 @@ const Se = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="h
|
|
|
740
740
|
`, Xe = `<svg viewBox="0 0 200 200" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg">
|
|
741
741
|
<line x1="0" y1="0" x2="200" y2="200" />
|
|
742
742
|
</svg>`, W = {
|
|
743
|
-
wishlist:
|
|
743
|
+
wishlist: Ee,
|
|
744
744
|
playerv: Le,
|
|
745
745
|
chevronRight: Ie,
|
|
746
746
|
chevronLeft: Pe,
|
|
@@ -815,7 +815,7 @@ kt.directiveName = "unsafeHTML", kt.resultType = 1;
|
|
|
815
815
|
class Ct extends kt {
|
|
816
816
|
}
|
|
817
817
|
Ct.directiveName = "unsafeSVG", Ct.resultType = 2;
|
|
818
|
-
const
|
|
818
|
+
const E = Dt(Ct);
|
|
819
819
|
var Qe = Object.defineProperty, Ye = Object.getOwnPropertyDescriptor, w = (o, t, e, n) => {
|
|
820
820
|
for (var i = n > 1 ? void 0 : n ? Ye(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
821
821
|
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
@@ -851,7 +851,7 @@ let v = class extends to {
|
|
|
851
851
|
"<svg",
|
|
852
852
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
853
853
|
);
|
|
854
|
-
return l`<span class="${o === "start" ? "icon-start" : "icon-end"}">${
|
|
854
|
+
return l`<span class="${o === "start" ? "icon-start" : "icon-end"}">${E(e)}</span>`;
|
|
855
855
|
}
|
|
856
856
|
renderButton() {
|
|
857
857
|
const o = this.text || this.textsecond;
|
|
@@ -885,7 +885,7 @@ let v = class extends to {
|
|
|
885
885
|
`;
|
|
886
886
|
}
|
|
887
887
|
};
|
|
888
|
-
|
|
888
|
+
Se(v);
|
|
889
889
|
v.formAssociated = !0;
|
|
890
890
|
v.styles = g`
|
|
891
891
|
:host {
|
|
@@ -1152,7 +1152,7 @@ let J = class extends u {
|
|
|
1152
1152
|
return l`
|
|
1153
1153
|
<button type="button" aria-describedby="${this.ariaDescribedBy}" class="wishlist-button">
|
|
1154
1154
|
<span class="sr-only">${this.label}</span>
|
|
1155
|
-
${
|
|
1155
|
+
${E(o)}
|
|
1156
1156
|
</button>
|
|
1157
1157
|
`;
|
|
1158
1158
|
}
|
|
@@ -1270,7 +1270,7 @@ let _ = class extends u {
|
|
|
1270
1270
|
return l`
|
|
1271
1271
|
${this.type === "span" ? l`
|
|
1272
1272
|
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
1273
|
-
${
|
|
1273
|
+
${E(e)}
|
|
1274
1274
|
</span>
|
|
1275
1275
|
` : l`
|
|
1276
1276
|
<button
|
|
@@ -1279,7 +1279,7 @@ let _ = class extends u {
|
|
|
1279
1279
|
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
|
|
1280
1280
|
?disabled="${this.disabled}"
|
|
1281
1281
|
>
|
|
1282
|
-
${
|
|
1282
|
+
${E(e)}
|
|
1283
1283
|
${n}
|
|
1284
1284
|
</button>
|
|
1285
1285
|
`}
|
|
@@ -1699,7 +1699,7 @@ let Q = class extends u {
|
|
|
1699
1699
|
<div class="rating">
|
|
1700
1700
|
<div class="stars">
|
|
1701
1701
|
${o.map(
|
|
1702
|
-
(t) => l`<span class="star">${
|
|
1702
|
+
(t) => l`<span class="star">${E(W[t] ?? "")}</span>`
|
|
1703
1703
|
)}
|
|
1704
1704
|
</div>
|
|
1705
1705
|
${this.reviewCount != null && this.href != null ? l`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>` : null}
|
|
@@ -1988,13 +1988,13 @@ let b = class extends u {
|
|
|
1988
1988
|
);
|
|
1989
1989
|
}
|
|
1990
1990
|
handleFirstClick(o) {
|
|
1991
|
-
typeof this.onFirstButtonClick == "function" && this.onFirstButtonClick(o, this);
|
|
1991
|
+
console.log("First button clicked", o, typeof this.onFirstButtonClick, this.onFirstButtonClick), this.onFirstButtonClick === "closePanel" ? this.closePanel() : typeof this.onFirstButtonClick == "function" && this.onFirstButtonClick(o, this);
|
|
1992
1992
|
}
|
|
1993
1993
|
handleSecondaryClick(o) {
|
|
1994
|
-
typeof this.onSecondButtonClick == "function" && this.onSecondButtonClick(o, this);
|
|
1994
|
+
console.log("Second button clicked", o, typeof this.onSecondButtonClick, this.onSecondButtonClick), this.onFirstButtonClick === "closePanel" ? this.closePanel() : typeof this.onSecondButtonClick == "function" && this.onSecondButtonClick(o, this);
|
|
1995
1995
|
}
|
|
1996
1996
|
updated() {
|
|
1997
|
-
|
|
1997
|
+
this.style.setProperty("--z-overlay", `${this.zIndex || 99}`), this.style.setProperty("--z-panel", `${this.zIndex ? this.zIndex + 1 : 99}`);
|
|
1998
1998
|
}
|
|
1999
1999
|
render() {
|
|
2000
2000
|
return l`
|
|
@@ -2218,7 +2218,7 @@ y([
|
|
|
2218
2218
|
a({ type: Object, reflect: !0 })
|
|
2219
2219
|
], b.prototype, "firstButtonProps", 2);
|
|
2220
2220
|
y([
|
|
2221
|
-
a({ type:
|
|
2221
|
+
a({ type: String })
|
|
2222
2222
|
], b.prototype, "onFirstButtonClick", 2);
|
|
2223
2223
|
y([
|
|
2224
2224
|
a({ type: String, reflect: !0 })
|
|
@@ -2230,7 +2230,7 @@ y([
|
|
|
2230
2230
|
a({ type: Object, reflect: !0 })
|
|
2231
2231
|
], b.prototype, "secondButtonProps", 2);
|
|
2232
2232
|
y([
|
|
2233
|
-
a({ type:
|
|
2233
|
+
a({ type: String })
|
|
2234
2234
|
], b.prototype, "onSecondButtonClick", 2);
|
|
2235
2235
|
y([
|
|
2236
2236
|
a({ type: Boolean, reflect: !0 })
|
|
@@ -2656,8 +2656,8 @@ Tt([
|
|
|
2656
2656
|
at = Tt([
|
|
2657
2657
|
x("o-tooltip")
|
|
2658
2658
|
], at);
|
|
2659
|
-
var Ao = Object.defineProperty,
|
|
2660
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
2659
|
+
var Ao = Object.defineProperty, So = Object.getOwnPropertyDescriptor, z = (o, t, e, n) => {
|
|
2660
|
+
for (var i = n > 1 ? void 0 : n ? So(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
2661
2661
|
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
2662
2662
|
return n && i && Ao(t, e, i), i;
|
|
2663
2663
|
};
|
|
@@ -2772,10 +2772,10 @@ let A = class extends u {
|
|
|
2772
2772
|
${e.url ? l`
|
|
2773
2773
|
<a href="${e.url}">
|
|
2774
2774
|
<span>${e.label}</span>
|
|
2775
|
-
${e.value === this.value ? l`<span class="check">${
|
|
2775
|
+
${e.value === this.value ? l`<span class="check">${E(o)}</span>` : null}
|
|
2776
2776
|
</a>` : l`
|
|
2777
2777
|
<span>${e.label}</span>
|
|
2778
|
-
${e.value === this.value ? l`<span class="check">${
|
|
2778
|
+
${e.value === this.value ? l`<span class="check">${E(o)}</span>` : null}`}
|
|
2779
2779
|
</li>`
|
|
2780
2780
|
)}
|
|
2781
2781
|
</ul>` : null}
|
|
@@ -2951,8 +2951,8 @@ z([
|
|
|
2951
2951
|
A = z([
|
|
2952
2952
|
x("o-dropdown")
|
|
2953
2953
|
], A);
|
|
2954
|
-
var
|
|
2955
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
2954
|
+
var Eo = Object.getOwnPropertyDescriptor, Lo = (o, t, e, n) => {
|
|
2955
|
+
for (var i = n > 1 ? void 0 : n ? Eo(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
2956
2956
|
(s = o[r]) && (i = s(i) || i);
|
|
2957
2957
|
return i;
|
|
2958
2958
|
};
|
|
@@ -3146,7 +3146,7 @@ let k = class extends u {
|
|
|
3146
3146
|
<div class="right">
|
|
3147
3147
|
<span class="additional-text">${$(e.additionaltext)}</span>
|
|
3148
3148
|
${e.value === this.value && !e.additionaltext ? l`
|
|
3149
|
-
<span class="check">${
|
|
3149
|
+
<span class="check">${E(o)}</span>` : null}
|
|
3150
3150
|
</div>
|
|
3151
3151
|
</a>
|
|
3152
3152
|
</li>
|
|
@@ -3695,7 +3695,7 @@ var No = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor, H = (o, t,
|
|
|
3695
3695
|
return n && i && No(t, e, i), i;
|
|
3696
3696
|
};
|
|
3697
3697
|
const Ro = Bt(u);
|
|
3698
|
-
let
|
|
3698
|
+
let S = class extends Ro {
|
|
3699
3699
|
constructor() {
|
|
3700
3700
|
super(...arguments), this.name = "", this.value = "", this.type = "", this.dataHref = "", this.text = "", this.selected = !1, this.disabled = !1, this.fullwidth = !1, this.crossIconName = "cross", this.strikethroughImgName = "strikeDiagonal";
|
|
3701
3701
|
}
|
|
@@ -3711,14 +3711,14 @@ let E = class extends Ro {
|
|
|
3711
3711
|
"<svg",
|
|
3712
3712
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
3713
3713
|
).replace(/stroke=[#"'a-z1-9]*/gi, "");
|
|
3714
|
-
return l`<span class="cross-icon">${
|
|
3714
|
+
return l`<span class="cross-icon">${E(o)}</span>`;
|
|
3715
3715
|
}
|
|
3716
3716
|
strikeThroughImg() {
|
|
3717
3717
|
const o = Je[this.strikethroughImgName].replace(
|
|
3718
3718
|
"<svg",
|
|
3719
3719
|
'<svg aria-hidden="true" focusable="false" part="strikethrough"'
|
|
3720
3720
|
).replace(/stroke=[#"'a-z1-9]*/gi, "");
|
|
3721
|
-
return
|
|
3721
|
+
return E(o);
|
|
3722
3722
|
}
|
|
3723
3723
|
render() {
|
|
3724
3724
|
const o = this.text;
|
|
@@ -3745,7 +3745,7 @@ let E = class extends Ro {
|
|
|
3745
3745
|
`;
|
|
3746
3746
|
}
|
|
3747
3747
|
};
|
|
3748
|
-
|
|
3748
|
+
S.styles = g`
|
|
3749
3749
|
:host {
|
|
3750
3750
|
cursor: pointer;
|
|
3751
3751
|
display: inline-flex;
|
|
@@ -3869,28 +3869,28 @@ E.styles = g`
|
|
|
3869
3869
|
`;
|
|
3870
3870
|
H([
|
|
3871
3871
|
a({ reflect: !0 })
|
|
3872
|
-
],
|
|
3872
|
+
], S.prototype, "name", 2);
|
|
3873
3873
|
H([
|
|
3874
3874
|
a({ reflect: !0 })
|
|
3875
|
-
],
|
|
3875
|
+
], S.prototype, "value", 2);
|
|
3876
3876
|
H([
|
|
3877
3877
|
a({ type: String, reflect: !0 })
|
|
3878
|
-
],
|
|
3878
|
+
], S.prototype, "type", 2);
|
|
3879
3879
|
H([
|
|
3880
3880
|
a({ type: String, reflect: !0, attribute: "data-href" })
|
|
3881
|
-
],
|
|
3881
|
+
], S.prototype, "dataHref", 2);
|
|
3882
3882
|
H([
|
|
3883
3883
|
a({ type: String })
|
|
3884
|
-
],
|
|
3884
|
+
], S.prototype, "text", 2);
|
|
3885
3885
|
H([
|
|
3886
3886
|
a({ type: Boolean, reflect: !0 })
|
|
3887
|
-
],
|
|
3887
|
+
], S.prototype, "selected", 2);
|
|
3888
3888
|
H([
|
|
3889
3889
|
a({ type: Boolean, reflect: !0 })
|
|
3890
|
-
],
|
|
3890
|
+
], S.prototype, "disabled", 2);
|
|
3891
3891
|
H([
|
|
3892
3892
|
a({ type: Boolean, reflect: !0 })
|
|
3893
|
-
],
|
|
3894
|
-
|
|
3893
|
+
], S.prototype, "fullwidth", 2);
|
|
3894
|
+
S = H([
|
|
3895
3895
|
x("o-filter-chip")
|
|
3896
|
-
],
|
|
3896
|
+
], S);
|