@florid-kit/components 0.8.42 → 0.8.45
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 +3 -0
- package/components/tag.d.ts +1 -1
- package/index.js +81 -78
- package/index.mjs +361 -341
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const
|
|
5
|
+
*/const ft=globalThis,Pt=ft.ShadowRoot&&(ft.ShadyCSS===void 0||ft.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,It=Symbol(),Vt=new WeakMap;let oe=class{constructor(t,e,n){if(this._$cssResult$=!0,n!==It)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(Pt&&t===void 0){const n=e!==void 0&&e.length===1;n&&(t=Vt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&Vt.set(e,t))}return t}toString(){return this.cssText}};const ce=o=>new oe(typeof o=="string"?o:o+"",void 0,It),y=(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 oe(e,o,It)},he=(o,t)=>{if(Pt)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const n=document.createElement("style"),i=ft.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=e.cssText,o.appendChild(n)}},Zt=Pt?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return ce(e)})(o):o;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:de,defineProperty:pe,getOwnPropertyDescriptor:ue,getOwnPropertyNames:ve,getOwnPropertySymbols:fe,getPrototypeOf:be}=Object,U=globalThis,qt=U.trustedTypes,ge=qt?qt.emptyScript:"",$t=U.reactiveElementPolyfillSupport,ot=(o,t)=>o,
|
|
9
|
+
*/const{is:de,defineProperty:pe,getOwnPropertyDescriptor:ue,getOwnPropertyNames:ve,getOwnPropertySymbols:fe,getPrototypeOf:be}=Object,U=globalThis,qt=U.trustedTypes,ge=qt?qt.emptyScript:"",$t=U.reactiveElementPolyfillSupport,ot=(o,t)=>o,bt={toAttribute(o,t){switch(t){case Boolean:o=o?ge: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}},Ot=(o,t)=>!de(o,t),Wt={attribute:!0,type:String,converter:bt,reflect:!1,useDefault:!1,hasChanged:Ot};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),U.litPropertyMetadata??(U.litPropertyMetadata=new WeakMap);let J=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=Wt){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 n=Symbol(),i=this.getPropertyDescriptor(t,n,e);i!==void 0&&pe(this.prototype,t,i)}}static getPropertyDescriptor(t,e,n){const{get:i,set:r}=ue(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get:i,set(s){const h=i==null?void 0:i.call(this);r==null||r.call(this,s),this.requestUpdate(t,h,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Wt}static _$Ei(){if(this.hasOwnProperty(ot("elementProperties")))return;const t=be(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ot("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ot("properties"))){const e=this.properties,n=[...ve(e),...fe(e)];for(const i of n)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[n,i]of e)this.elementProperties.set(n,i)}this._$Eh=new Map;for(const[e,n]of this.elementProperties){const i=this._$Eu(e,n);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const i of n)e.unshift(Zt(i))}else t!==void 0&&e.push(Zt(t));return e}static _$Eu(t,e){const n=e.attribute;return n===!1?void 0:typeof n=="string"?n: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 n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return he(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 n;return(n=e.hostConnected)==null?void 0:n.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var n;return(n=e.hostDisconnected)==null?void 0:n.call(e)})}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){var r;const n=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,n);if(i!==void 0&&n.reflect===!0){const s=(((r=n.converter)==null?void 0:r.toAttribute)!==void 0?n.converter:bt).toAttribute(e,n.type);this._$Em=t,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,e){var r,s;const n=this.constructor,i=n._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const h=n.getPropertyOptions(i),c=typeof h.converter=="function"?{fromAttribute:h.converter}:((r=h.converter)==null?void 0:r.fromAttribute)!==void 0?h.converter:bt;this._$Em=i,this[i]=c.fromAttribute(e,h.type)??((s=this._$Ej)==null?void 0:s.get(i))??null,this._$Em=null}}requestUpdate(t,e,n){var i;if(t!==void 0){const r=this.constructor,s=this[t];if(n??(n=r.getPropertyOptions(t)),!((n.hasChanged??Ot)(s,e)||n.useDefault&&n.reflect&&s===((i=this._$Ej)==null?void 0:i.get(t))&&!this.hasAttribute(r._$Eu(t,n))))return;this.C(t,e,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:i,wrapped:r},s){n&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,s??e??this[t]),r!==!0||s!==void 0)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),i===!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 n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,s]of i){const{wrapped:h}=s,c=this[r];h!==!0||this._$AL.has(r)||c===void 0||this.C(r,void 0,s,c)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(n=this._$EO)==null||n.forEach(i=>{var r;return(r=i.hostUpdate)==null?void 0:r.call(i)}),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(n=>{var i;return(i=n.hostUpdated)==null?void 0:i.call(n)}),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){}};J.elementStyles=[],J.shadowRootOptions={mode:"open"},J[ot("elementProperties")]=new Map,J[ot("finalized")]=new Map,$t==null||$t({ReactiveElement:J}),(U.reactiveElementVersions??(U.reactiveElementVersions=[])).push("2.1.0");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const it=globalThis,
|
|
13
|
+
*/const it=globalThis,gt=it.trustedTypes,Kt=gt?gt.createPolicy("lit-html",{createHTML:o=>o}):void 0,ie="$lit$",j=`lit$${Math.random().toFixed(9).slice(2)}$`,ne="?"+j,ye=`<${ne}>`,W=document,rt=()=>W.createComment(""),st=o=>o===null||typeof o!="object"&&typeof o!="function",Bt=Array.isArray,me=o=>Bt(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",_t=`[
|
|
14
14
|
\f\r]`,et=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Gt=/-->/g,Xt=/>/g,V=RegExp(`>|${_t}(?:([^\\s"'>=/]+)(${_t}*=${_t}*(?:[^
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Jt=/'/g,Qt=/"/g,re=/^(?:script|style|textarea|title)$/i,xe=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=xe(1),
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Jt=/'/g,Qt=/"/g,re=/^(?:script|style|textarea|title)$/i,xe=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=xe(1),F=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Yt=new WeakMap,Z=W.createTreeWalker(W,129);function se(o,t){if(!Bt(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Kt!==void 0?Kt.createHTML(t):t}const we=(o,t)=>{const e=o.length-1,n=[];let i,r=t===2?"<svg>":t===3?"<math>":"",s=et;for(let h=0;h<e;h++){const c=o[h];let v,g,p=-1,$=0;for(;$<c.length&&(s.lastIndex=$,g=s.exec(c),g!==null);)$=s.lastIndex,s===et?g[1]==="!--"?s=Gt:g[1]!==void 0?s=Xt:g[2]!==void 0?(re.test(g[2])&&(i=RegExp("</"+g[2],"g")),s=V):g[3]!==void 0&&(s=V):s===V?g[0]===">"?(s=i??et,p=-1):g[1]===void 0?p=-2:(p=s.lastIndex-g[2].length,v=g[1],s=g[3]===void 0?V:g[3]==='"'?Qt:Jt):s===Qt||s===Jt?s=V:s===Gt||s===Xt?s=et:(s=V,i=void 0);const E=s===V&&o[h+1].startsWith("/>")?" ":"";r+=s===et?c+ye:p>=0?(n.push(v),c.slice(0,p)+ie+c.slice(p)+j+E):c+j+(p===-2?h:E)}return[se(o,r+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]};class at{constructor({strings:t,_$litType$:e},n){let i;this.parts=[];let r=0,s=0;const h=t.length-1,c=this.parts,[v,g]=we(t,e);if(this.el=at.createElement(v,n),Z.currentNode=this.el.content,e===2||e===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(i=Z.nextNode())!==null&&c.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(const p of i.getAttributeNames())if(p.endsWith(ie)){const $=g[s++],E=i.getAttribute(p).split(j),vt=/([.?@])?(.*)/.exec($);c.push({type:1,index:r,name:vt[2],strings:E,ctor:vt[1]==="."?_e:vt[1]==="?"?Ce:vt[1]==="@"?ke:mt}),i.removeAttribute(p)}else p.startsWith(j)&&(c.push({type:6,index:r}),i.removeAttribute(p));if(re.test(i.tagName)){const p=i.textContent.split(j),$=p.length-1;if($>0){i.textContent=gt?gt.emptyScript:"";for(let E=0;E<$;E++)i.append(p[E],rt()),Z.nextNode(),c.push({type:2,index:++r});i.append(p[$],rt())}}}else if(i.nodeType===8)if(i.data===ne)c.push({type:2,index:r});else{let p=-1;for(;(p=i.data.indexOf(j,p+1))!==-1;)c.push({type:7,index:r}),p+=j.length-1}r++}}static createElement(t,e){const n=W.createElement("template");return n.innerHTML=t,n}}function Q(o,t,e=o,n){var s,h;if(t===F)return t;let i=n!==void 0?(s=e._$Co)==null?void 0:s[n]:e._$Cl;const r=st(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==r&&((h=i==null?void 0:i._$AO)==null||h.call(i,!1),r===void 0?i=void 0:(i=new r(o),i._$AT(o,e,n)),n!==void 0?(e._$Co??(e._$Co=[]))[n]=i:e._$Cl=i),i!==void 0&&(t=Q(o,i._$AS(o,t.values),i,n)),t}class $e{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:n}=this._$AD,i=((t==null?void 0:t.creationScope)??W).importNode(e,!0);Z.currentNode=i;let r=Z.nextNode(),s=0,h=0,c=n[0];for(;c!==void 0;){if(s===c.index){let v;c.type===2?v=new pt(r,r.nextSibling,this,t):c.type===1?v=new c.ctor(r,c.name,c.strings,this,t):c.type===6&&(v=new Ae(r,this,t)),this._$AV.push(v),c=n[++h]}s!==(c==null?void 0:c.index)&&(r=Z.nextNode(),s++)}return Z.currentNode=W,i}p(t){let e=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class pt{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,n,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=i,this._$Cv=(i==null?void 0:i.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=Q(this,t,e),st(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==F&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):me(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&st(this._$AH)?this._$AA.nextSibling.data=t:this.T(W.createTextNode(t)),this._$AH=t}$(t){var r;const{values:e,_$litType$:n}=t,i=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=at.createElement(se(n.h,n.h[0]),this.options)),n);if(((r=this._$AH)==null?void 0:r._$AD)===i)this._$AH.p(e);else{const s=new $e(i,this),h=s.u(this.options);s.p(e),this.T(h),this._$AH=s}}_$AC(t){let e=Yt.get(t.strings);return e===void 0&&Yt.set(t.strings,e=new at(t)),e}k(t){Bt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,i=0;for(const r of t)i===e.length?e.push(n=new pt(this.O(rt()),this.O(rt()),this,this.options)):n=e[i],n._$AI(r),i++;i<e.length&&(this._$AR(n&&n._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var n;for((n=this._$AP)==null?void 0:n.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class mt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,i,r){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=d}_$AI(t,e=this,n,i){const r=this.strings;let s=!1;if(r===void 0)t=Q(this,t,e,0),s=!st(t)||t!==this._$AH&&t!==F,s&&(this._$AH=t);else{const h=t;let c,v;for(t=r[0],c=0;c<r.length-1;c++)v=Q(this,h[n+c],e,c),v===F&&(v=this._$AH[c]),s||(s=!st(v)||v!==this._$AH[c]),v===d?t=d:t!==d&&(t+=(v??"")+r[c+1]),this._$AH[c]=v}s&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class _e extends mt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class Ce extends mt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class ke extends mt{constructor(t,e,n,i,r){super(t,e,n,i,r),this.type=5}_$AI(t,e=this){if((t=Q(this,t,e,0)??d)===F)return;const n=this._$AH,i=t===d&&n!==d||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,r=t!==d&&(n===d||i);i&&this.element.removeEventListener(this.name,this,n),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 Ae{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}}const Ct=it.litHtmlPolyfillSupport;Ct==null||Ct(at,pt),(it.litHtmlVersions??(it.litHtmlVersions=[])).push("3.3.0");const Ee=(o,t,e)=>{const n=(e==null?void 0:e.renderBefore)??t;let i=n._$litPart$;if(i===void 0){const r=(e==null?void 0:e.renderBefore)??null;n._$litPart$=i=new pt(t.insertBefore(rt(),r),r,void 0,e??{})}return i._$AI(o),i};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const q=globalThis;let
|
|
19
|
+
*/const q=globalThis;let f=class extends J{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ee(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return F}};var ee;f._$litElement$=!0,f.finalized=!0,(ee=q.litElementHydrateSupport)==null||ee.call(q,{LitElement:f});const kt=q.litElementPolyfillSupport;kt==null||kt({LitElement:f});(q.litElementVersions??(q.litElementVersions=[])).push("4.2.0");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const Se={attribute:!0,type:String,converter:
|
|
27
|
+
*/const Se={attribute:!0,type:String,converter:bt,reflect:!1,hasChanged:Ot},Le=(o=Se,t,e)=>{const{kind:n,metadata:i}=e;let r=globalThis.litPropertyMetadata.get(i);if(r===void 0&&globalThis.litPropertyMetadata.set(i,r=new Map),n==="setter"&&((o=Object.create(o)).wrapped=!0),r.set(e.name,o),n==="accessor"){const{name:s}=e;return{set(h){const c=t.get.call(this);t.set.call(this,h),this.requestUpdate(s,c,o)},init(h){return h!==void 0&&this.C(s,void 0,o,h),h}}}if(n==="setter"){const{name:s}=e;return function(h){const c=this[s];t.call(this,h),this.requestUpdate(s,c,o)}}throw Error("Unsupported decorator location: "+n)};function a(o){return(t,e)=>typeof e=="object"?Le(o,t,e):((n,i,r)=>{const s=i.hasOwnProperty(r);return i.constructor.createProperty(r,n),s?Object.getOwnPropertyDescriptor(i,r):void 0})(o,t,e)}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/function K(o){return a({...o,state:!0,attribute:!1})}const
|
|
31
|
+
*/function K(o){return a({...o,state:!0,attribute:!1})}const ut=y`
|
|
32
32
|
outline: 1px dashed var(--color-border-primary);
|
|
33
33
|
outline-offset: 2px;
|
|
34
|
-
`;
|
|
34
|
+
`;y`
|
|
35
35
|
:host * {
|
|
36
36
|
box-sizing: border-box;
|
|
37
37
|
}
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
`,He=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
62
62
|
<path d="M15 6.43789H9.63446L8 1.5L6.36554 6.43789H1L5.33977 9.5387L3.69404 14.5L7.98873 11.4343L12.2834 14.5H12.306L10.6602 9.5387L15 6.43789ZM6.36554 11.5396V7.32718H6.97424L8 4.21467L9.02576 7.32718H12.2721L9.64573 9.19937L10.6602 12.2768L8 10.3812L6.36554 11.5513V11.5396Z" fill="#3F2B2E"/>
|
|
63
63
|
</svg>
|
|
64
|
-
`,
|
|
64
|
+
`,Me=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
65
65
|
<path d="M15 6.39639H9.63446L8 1.4585L6.36554 6.39639H1L5.33977 9.4972L3.69404 14.4585L7.98873 11.3928L12.2834 14.4585L10.6377 9.4972L14.9775 6.39639H15ZM10.6715 12.2353L8.05636 10.3631V4.32528L9.03704 7.27398H12.2834L9.65701 9.14616L10.6715 12.2236V12.2353Z" fill="#3F2B2E"/>
|
|
66
66
|
</svg>
|
|
67
|
-
`,
|
|
67
|
+
`,Te=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
68
68
|
<path d="M15 6.43789H9.63446L8 1.5L6.36554 6.43789H1L5.33977 9.5387L3.69404 14.5L7.98873 11.4343L9.46538 12.4874L12.2834 14.5H12.306L10.6602 9.5387L15 6.43789ZM9.46538 11.4226V7.32718H12.2721L9.64573 9.19937L10.6602 12.2768L9.46538 11.4226Z" fill="#3F2B2E"/>
|
|
69
69
|
</svg>
|
|
70
70
|
`,je=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -74,10 +74,10 @@
|
|
|
74
74
|
<path d="M2 2L14 14" stroke="#3F2B2E"/>
|
|
75
75
|
<path d="M14 2L2 14" stroke="#3F2B2E"/>
|
|
76
76
|
</svg>
|
|
77
|
-
`,
|
|
77
|
+
`,Fe=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
78
78
|
<path d="M7.12506 1C10.5018 1 13.2509 3.74834 13.251 7.125C13.2511 8.59738 12.7172 10.0206 11.7491 11.1299L14.8731 14.2539C15.0433 14.4253 15.0435 14.7018 14.8731 14.873C14.7913 14.9555 14.6797 15.002 14.5635 15.002C14.4475 15.0019 14.3357 14.9554 14.254 14.873L11.1309 11.749C10.0555 12.6818 8.6564 13.251 7.12506 13.251C3.7484 13.2508 1.00006 10.5017 1.00006 7.125C1.00025 3.74846 3.74852 1.00019 7.12506 1ZM7.12506 1.875C4.22971 1.87522 1.87506 4.23058 1.87506 7.12598C1.87532 10.0212 4.22987 12.3758 7.12506 12.376C10.0204 12.376 12.3758 10.0213 12.376 7.12598C12.376 4.23044 10.0206 1.875 7.12506 1.875Z" fill="#3F2B2E"/>
|
|
79
79
|
</svg>
|
|
80
|
-
`,
|
|
80
|
+
`,Ne=`<?xml version="1.0" encoding="utf-8"?>
|
|
81
81
|
<!-- Generator: $$$/GeneralStr/196=Adobe Illustrator 27.6.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
82
82
|
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
83
83
|
viewBox="0 0 40 40" style="enable-background:new 0 0 40 40;" xml:space="preserve">
|
|
@@ -130,19 +130,19 @@
|
|
|
130
130
|
<path d="M2.31202e-08 7.85218C0.974855 6.83983 3.01741 4.44477 6.12766 0.666992L6.54545 0.926252C5.54739 3.04971 4.35203 5.40773 2.95938 8.00033C4.35203 10.5929 5.54739 12.9509 6.54545 15.0744L6.12766 15.3337C3.01741 11.5559 0.974855 9.16082 0 8.14847L2.31202e-08 7.85218Z" fill="#3F2B2E"/>
|
|
131
131
|
<path d="M16 8.14847C15.0251 9.16082 12.9826 11.5559 9.87234 15.3337L9.45455 15.0744C10.4526 12.9509 11.648 10.5929 13.0406 8.00033C11.648 5.40773 10.4526 3.04971 9.45455 0.92625L9.87234 0.666992C12.9826 4.44477 15.0251 6.83983 16 7.85218V8.14847Z" fill="#3F2B2E"/>
|
|
132
132
|
</svg>
|
|
133
|
-
`,G={wishlist:Ie,playerv:Oe,chevronRight:Be,chevronLeft:ze,icoPlus:
|
|
133
|
+
`,G={wishlist:Ie,playerv:Oe,chevronRight:Be,chevronLeft:ze,icoPlus:Ne,icoMinus:Re,"star-0":De,"star-25":He,"star-50":Me,"star-75":Te,"star-100":je,cross:Ue,search:Fe,arrowLeft:Ve,arrowTop:Ze,cart:qe,notifyme:We,triangledown:Ke,triangleup:Ge,checkstroke:Xe,pause:Je,mapDualArrow:Qe,swipeDualArrow:to},eo={strikeDiagonal:Ye};/**
|
|
134
134
|
* @license
|
|
135
135
|
* Copyright 2017 Google LLC
|
|
136
136
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
137
|
-
*/const Ht={ATTRIBUTE:1,CHILD:2},
|
|
137
|
+
*/const Ht={ATTRIBUTE:1,CHILD:2},Mt=o=>(...t)=>({_$litDirective$:o,values:t});let Tt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};/**
|
|
138
138
|
* @license
|
|
139
139
|
* Copyright 2017 Google LLC
|
|
140
140
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
141
|
-
*/class Et extends
|
|
141
|
+
*/class Et extends Tt{constructor(t){if(super(t),this.it=d,t.type!==Ht.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===d||t==null)return this._t=void 0,this.it=t;if(t===F)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:[]}}}Et.directiveName="unsafeHTML",Et.resultType=1;/**
|
|
142
142
|
* @license
|
|
143
143
|
* Copyright 2017 Google LLC
|
|
144
144
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
145
|
-
*/class St extends Et{}St.directiveName="unsafeSVG",St.resultType=2;const
|
|
145
|
+
*/class St extends Et{}St.directiveName="unsafeSVG",St.resultType=2;const I=Mt(St);var oo=Object.defineProperty,io=Object.getOwnPropertyDescriptor,w=(o,t,e,n)=>{for(var i=n>1?void 0:n?io(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&&oo(t,e,i),i};const no=Dt(f);let b=class extends no{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[zt].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=G[t].replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return l`<span class="${o==="start"?"icon-start":"icon-end"}">${I(e)}</span>`}renderButton(){const o=this.text||this.textsecond;return l`
|
|
146
146
|
<button type=${this.type} class="button" ?disabled=${this.disabled} @click=${this.handleClick}>
|
|
147
147
|
${this.startIcon?this.renderIcon("start"):d}
|
|
148
148
|
${o?l`
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
`:l`<slot></slot>`}
|
|
166
166
|
${this.endIcon?this.renderIcon("end"):d}
|
|
167
167
|
</a>
|
|
168
|
-
`}};Pe(
|
|
168
|
+
`}};Pe(b);b.formAssociated=!0;b.styles=y`
|
|
169
169
|
:host {
|
|
170
170
|
--button-border: transparent;
|
|
171
171
|
cursor: pointer;
|
|
@@ -281,7 +281,7 @@
|
|
|
281
281
|
}
|
|
282
282
|
|
|
283
283
|
.button:focus-visible {
|
|
284
|
-
${
|
|
284
|
+
${ut};
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
span.text + span.text::before {
|
|
@@ -353,12 +353,12 @@
|
|
|
353
353
|
transform: translateX(4px);
|
|
354
354
|
}
|
|
355
355
|
//End icon movment on hover
|
|
356
|
-
`;w([a()],
|
|
356
|
+
`;w([a()],b.prototype,"type",2);w([a({reflect:!0})],b.prototype,"value",2);w([a({type:String,reflect:!0})],b.prototype,"variant",2);w([a({type:String})],b.prototype,"text",2);w([a({type:String})],b.prototype,"textsecond",2);w([a({type:Boolean,reflect:!0})],b.prototype,"fullwidth",2);w([a({type:Boolean,reflect:!0})],b.prototype,"disabled",2);w([a({type:String,reflect:!0})],b.prototype,"startIconModel",2);w([a({type:String,reflect:!0})],b.prototype,"endIconModel",2);w([a({type:Boolean,reflect:!0,attribute:"starticon"})],b.prototype,"startIcon",2);w([a({type:Boolean,reflect:!0,attribute:"endicon"})],b.prototype,"endIcon",2);w([a({type:String,attribute:"paneltarget",reflect:!0})],b.prototype,"panelTarget",2);w([a({type:String})],b.prototype,"href",2);w([a({type:String})],b.prototype,"target",2);w([a({type:Boolean,reflect:!0})],b.prototype,"underlined",2);b=w([x("o-button")],b);var ro=Object.defineProperty,so=Object.getOwnPropertyDescriptor,xt=(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&&ro(t,e,i),i};let Y=class extends f{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=G.wishlist.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return l`
|
|
357
357
|
<button type="button" aria-describedby="${this.ariaDescribedBy}" class="wishlist-button">
|
|
358
358
|
<span class="sr-only">${this.label}</span>
|
|
359
|
-
${
|
|
359
|
+
${I(o)}
|
|
360
360
|
</button>
|
|
361
|
-
`}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()}};Y.styles=
|
|
361
|
+
`}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()}};Y.styles=y`
|
|
362
362
|
:host {
|
|
363
363
|
display: inline-flex;
|
|
364
364
|
justify-content: center;
|
|
@@ -427,27 +427,28 @@
|
|
|
427
427
|
* @license
|
|
428
428
|
* Copyright 2018 Google LLC
|
|
429
429
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
430
|
-
*/const
|
|
430
|
+
*/const _=o=>o??d;var ao=Object.defineProperty,lo=Object.getOwnPropertyDescriptor,B=(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 C=class extends f{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=G[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`
|
|
431
431
|
${this.type==="span"?l`
|
|
432
432
|
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
433
|
-
${
|
|
433
|
+
${I(e)}
|
|
434
434
|
</span>
|
|
435
435
|
`:l`
|
|
436
436
|
<button
|
|
437
437
|
type="button"
|
|
438
|
-
aria-label=${
|
|
438
|
+
aria-label=${_(i)}
|
|
439
439
|
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
|
|
440
440
|
?disabled="${this.disabled}"
|
|
441
441
|
>
|
|
442
|
-
${
|
|
442
|
+
${I(e)}
|
|
443
443
|
${n}
|
|
444
444
|
</button>
|
|
445
445
|
`}
|
|
446
|
-
`}};
|
|
446
|
+
`}};C.styles=y`
|
|
447
447
|
:host {
|
|
448
448
|
display: inline-flex;
|
|
449
449
|
justify-content: center;
|
|
450
450
|
align-items: center;
|
|
451
|
+
outline: none !important;
|
|
451
452
|
}
|
|
452
453
|
|
|
453
454
|
.icon-button {
|
|
@@ -647,16 +648,16 @@
|
|
|
647
648
|
}
|
|
648
649
|
|
|
649
650
|
.icon-button:focus-visible {
|
|
650
|
-
|
|
651
|
+
${ut}
|
|
651
652
|
}
|
|
652
653
|
|
|
653
654
|
.sr-only {
|
|
654
655
|
display: none;
|
|
655
656
|
}
|
|
656
|
-
`;
|
|
657
|
+
`;B([a({type:String,reflect:!0})],C.prototype,"bgstyle",2);B([a({type:String,reflect:!0})],C.prototype,"size",2);B([a({type:String,reflect:!0})],C.prototype,"status",2);B([a({type:String,reflect:!0})],C.prototype,"type",2);B([a({type:String})],C.prototype,"strokewidth",2);B([a({type:String})],C.prototype,"icon",2);B([a({type:Boolean,reflect:!0})],C.prototype,"disabled",2);B([a({type:Boolean})],C.prototype,"showSrLabel",2);B([a({type:String})],C.prototype,"srLabel",2);C=B([x("o-icon-button")],C);var co=Object.defineProperty,ho=Object.getOwnPropertyDescriptor,X=(o,t,e,n)=>{for(var i=n>1?void 0:n?ho(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&&co(t,e,i),i};let D=class extends f{constructor(){super(...arguments),this.href="",this.target="",this.template="standard",this.inverse=!1,this.endIcon=!1,this.reverseEndIcon=!1}_handleClick(o){(!this.href||this.href==="#")&&o.preventDefault()}render(){const o=this.href||"#";return l`
|
|
657
658
|
<a
|
|
658
659
|
href="${o}"
|
|
659
|
-
target="${
|
|
660
|
+
target="${_(this.target||void 0)}"
|
|
660
661
|
@click="${this._handleClick}"
|
|
661
662
|
>
|
|
662
663
|
${this.endIcon&&this.reverseEndIcon?l`
|
|
@@ -679,7 +680,7 @@
|
|
|
679
680
|
></o-icon-button>
|
|
680
681
|
`:null}
|
|
681
682
|
</a>
|
|
682
|
-
`}};
|
|
683
|
+
`}};D.styles=y`
|
|
683
684
|
:host([template="standard"]) a {
|
|
684
685
|
color: var(--color-content-action-secondary);
|
|
685
686
|
font-size: var(--font-size-200);
|
|
@@ -766,14 +767,14 @@
|
|
|
766
767
|
height: 1px;
|
|
767
768
|
}
|
|
768
769
|
/* End of underline effect */
|
|
769
|
-
`;X([a({type:String})],
|
|
770
|
+
`;X([a({type:String})],D.prototype,"href",2);X([a({type:String})],D.prototype,"target",2);X([a({type:String,reflect:!0})],D.prototype,"template",2);X([a({type:Boolean,reflect:!0})],D.prototype,"inverse",2);X([a({type:Boolean,reflect:!0})],D.prototype,"endIcon",2);X([a({type:Boolean,reflect:!0})],D.prototype,"reverseEndIcon",2);D=X([x("o-link")],D);var po=Object.defineProperty,uo=Object.getOwnPropertyDescriptor,wt=(o,t,e,n)=>{for(var i=n>1?void 0:n?uo(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&&po(t,e,i),i};let tt=class extends f{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`
|
|
770
771
|
<div class="rating">
|
|
771
772
|
<div class="stars">
|
|
772
|
-
${o.map(t=>l`<span class="star">${
|
|
773
|
+
${o.map(t=>l`<span class="star">${I(G[t]??"")}</span>`)}
|
|
773
774
|
</div>
|
|
774
775
|
${this.reviewCount!=null&&this.href!=null?l`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>`:null}
|
|
775
776
|
</div>
|
|
776
|
-
`}};tt.styles=
|
|
777
|
+
`}};tt.styles=y`
|
|
777
778
|
svg {
|
|
778
779
|
width: 12px;
|
|
779
780
|
height: 12px;
|
|
@@ -814,7 +815,7 @@
|
|
|
814
815
|
* @license
|
|
815
816
|
* Copyright 2017 Google LLC
|
|
816
817
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
817
|
-
*/const nt=(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),nt(i,t);return!0},
|
|
818
|
+
*/const nt=(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),nt(i,t);return!0},yt=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)},ae=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),go(t)}};function fo(o){this._$AN!==void 0?(yt(this),this._$AM=o,ae(this)):this._$AM=o}function bo(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++)nt(n[r],!1),yt(n[r]);else n!=null&&(nt(n,!1),yt(n));else nt(this,o)}const go=o=>{o.type==Ht.CHILD&&(o._$AP??(o._$AP=bo),o._$AQ??(o._$AQ=fo))};class yo extends Tt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,n){super._$AT(t,e,n),ae(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&&(nt(this,t),yt(this))}setValue(t){if(vo(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 mo extends yo{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 xo extends mo{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 wo extends xo{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 te=Mt(wo);var $o=Object.defineProperty,_o=Object.getOwnPropertyDescriptor,m=(o,t,e,n)=>{for(var i=n>1?void 0:n?_o(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&&$o(t,e,i),i};let u=class extends f{constructor(){super(...arguments),this.open=!1,this.showHeader=!0,this.showFooter=!1,this.showHeaderStartIcon=!1,this.headerTitle="",this.headerTitleClassName="panel-title",this.closeButtonLabel="Close the modal",this.firstButtonLabel="Close",this.firstButtonVariant="primary",this.firstButtonProps={},this.onFirstButtonClickClose=!1,this.secondButtonLabel="",this.secondButtonVariant="secondary",this.secondButtonProps={},this.onSecondButtonClickClose=!1,this.disablePortal=!1,this.zIndex=99,this.initialized=!1,this.previousFocusedElement=null,this.innerFocusedElement=null,this.handleKeyDown=o=>{this.open&&(o.key==="Escape"?this.closePanel():o.key==="Tab"&&this.trapFocus(o))},this.handleClosePanel=o=>{o instanceof KeyboardEvent&&o.key!=="Enter"&&o.key!==" "||(o.preventDefault(),o.stopPropagation(),this.closePanel())}}connectedCallback(){super.connectedCallback(),!this.disablePortal&&this.parentElement!==document.body&&document.body.appendChild(this),this.addEventListener("keydown",this.handleKeyDown),this.updateComplete.then(()=>{this.initialized=!0})}disconnectedCallback(){document.body.style.overflow="",document.body.removeAttribute("data-side-panel"),this.removeEventListener("keydown",this.handleKeyDown),super.disconnectedCallback()}trapFocus(o){var i,r,s,h,c,v,g,p,$,E;this.innerFocusedElement=document.activeElement||null,this.innerFocusedElement=((r=(i=this.innerFocusedElement)==null?void 0:i.shadowRoot)==null?void 0:r.activeElement)||this.innerFocusedElement;const t=this.getFocusableElements();if(t.length===0)return;const e=t[0],n=t[t.length-1];o.shiftKey&&this.innerFocusedElement===e?(o.preventDefault(),n.shadowRoot?(c=(h=(s=n.shadowRoot)==null?void 0:s.querySelector(u.focusablesSelector))==null?void 0:h.focus)==null||c.call(h):(v=n.focus)==null||v.call(n)):!o.shiftKey&&this.innerFocusedElement===n&&(o.preventDefault(),e.shadowRoot?($=(p=(g=e.shadowRoot)==null?void 0:g.querySelector(u.focusablesSelector))==null?void 0:p.focus)==null||$.call(p):(E=e.focus)==null||E.call(e))}getFocusableElements(){const o=this.renderRoot.querySelector(".panel");if(!o)return[];function t(i){return!(i.disabled||i.hasAttribute("disabled")||i.hasAttribute("tabindex")&&i.getAttribute("tabindex")==="-1")}function e(i){var s;const r=[i.matches(u.focusablesSelector)?i:[]];if(!["o-icon-button","o-button"].includes(i.tagName.toLowerCase())){const h=Array.from(i instanceof HTMLSlotElement?i.assignedElements({flatten:!0}):[]).filter(t).flatMap(e),c=Array.from(((s=i.shadowRoot)==null?void 0:s.querySelectorAll("*"))||[]).filter(t).flatMap(e);r.push(...h,...c)}return r.flat()}return Array.from(o.querySelectorAll("*")).filter(t).flatMap(e)}openPanel(){this.previousFocusedElement=document.activeElement,this.open=!0,document.body.style.overflow="hidden",document.body.setAttribute("data-side-panel","open"),this.updateComplete.then(()=>{var o,t,e,n;if(this.showHeader){const i=((o=this.shadowRoot)==null?void 0:o.querySelector(".panel .close-btn"))||null,r=((t=i==null?void 0:i.shadowRoot)==null?void 0:t.querySelector("button"))||null;r&&((e=r.focus)==null||e.call(r))}else{const i=this.getFocusableElements()[0];(n=i==null?void 0:i.focus)==null||n.call(i)}}),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){o instanceof KeyboardEvent&&o.key!=="Enter"&&o.key!==" "||(o.preventDefault(),o.stopPropagation(),this.onFirstButtonClickClose&&this.closePanel(),this.dispatchEvent(new CustomEvent("firstbuttonclick",{bubbles:!0,composed:!0,cancelable:!0,detail:{button:"first",target:o.target}})))}handleSecondClick(o){o instanceof KeyboardEvent&&o.key!=="Enter"&&o.key!==" "||(o.preventDefault(),o.stopPropagation(),this.onSecondButtonClickClose&&this.closePanel(),this.dispatchEvent(new CustomEvent("secondbuttonclick",{bubbles:!0,composed:!0,cancelable:!0,detail:{button:"second",target:o.target}})))}updated(){this.style.setProperty("--z-overlay",`${this.zIndex||99}`),this.style.setProperty("--z-panel",`${this.zIndex?this.zIndex+1:99}`)}render(){return l`
|
|
818
819
|
<div class="overlay" style="z-index: ${this.zIndex}" @click=${this.handleClosePanel}></div>
|
|
819
820
|
<div
|
|
820
821
|
class="panel"
|
|
@@ -865,7 +866,7 @@
|
|
|
865
866
|
</div>
|
|
866
867
|
`:null}
|
|
867
868
|
</div>
|
|
868
|
-
`}};
|
|
869
|
+
`}};u.styles=y`
|
|
869
870
|
:host {
|
|
870
871
|
--z-overlay: 99;
|
|
871
872
|
--z-panel: 100;
|
|
@@ -969,7 +970,7 @@
|
|
|
969
970
|
.panel:focus-visible,
|
|
970
971
|
.close-btn:focus,
|
|
971
972
|
.close-btn:focus-visible {
|
|
972
|
-
${
|
|
973
|
+
${ut}
|
|
973
974
|
}
|
|
974
975
|
|
|
975
976
|
.content {
|
|
@@ -1013,7 +1014,7 @@
|
|
|
1013
1014
|
--line-height: var(--line-height-280);
|
|
1014
1015
|
}
|
|
1015
1016
|
}
|
|
1016
|
-
`;
|
|
1017
|
+
`;u.focusablesSelector='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), o-icon-button, o-button';u.focusablesCustomElementsSelector="o-icon-button, o-button";m([a({type:Boolean,reflect:!0})],u.prototype,"open",2);m([a({type:Boolean,reflect:!0})],u.prototype,"showHeader",2);m([a({type:Boolean,reflect:!0})],u.prototype,"showFooter",2);m([a({type:Boolean,reflect:!0})],u.prototype,"showHeaderStartIcon",2);m([a({type:String,reflect:!0})],u.prototype,"headerTitle",2);m([a({type:String,reflect:!0})],u.prototype,"headerTitleClassName",2);m([a({type:String,reflect:!0})],u.prototype,"closeButtonLabel",2);m([a({type:String,reflect:!0})],u.prototype,"firstButtonLabel",2);m([a({type:String,reflect:!0})],u.prototype,"firstButtonVariant",2);m([a({type:Object,reflect:!0})],u.prototype,"firstButtonProps",2);m([a({type:Boolean,reflect:!0})],u.prototype,"onFirstButtonClickClose",2);m([a({type:String,reflect:!0})],u.prototype,"secondButtonLabel",2);m([a({type:String,reflect:!0})],u.prototype,"secondButtonVariant",2);m([a({type:Object,reflect:!0})],u.prototype,"secondButtonProps",2);m([a({type:Boolean,reflect:!0})],u.prototype,"onSecondButtonClickClose",2);m([a({type:Boolean,reflect:!0})],u.prototype,"disablePortal",2);m([a({type:Number,reflect:!0})],u.prototype,"zIndex",2);m([a({type:Boolean,reflect:!0})],u.prototype,"initialized",2);u=m([x("o-side-panel")],u);var Co=Object.defineProperty,ko=Object.getOwnPropertyDescriptor,N=(o,t,e,n)=>{for(var i=n>1?void 0:n?ko(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&&Co(t,e,i),i};let O=class extends f{constructor(){super(...arguments),this.thumbnails=[],this.activeIndex=0,this.disabledIndexes=[],this.maxWidth="100%",this.altressource="visual",this.focusedIndex=0,this.playerIconTemplate=l`
|
|
1017
1018
|
<o-icon-button
|
|
1018
1019
|
icon="playerv"
|
|
1019
1020
|
size="xsmall"
|
|
@@ -1044,7 +1045,7 @@
|
|
|
1044
1045
|
</li>
|
|
1045
1046
|
`})}
|
|
1046
1047
|
</ul>
|
|
1047
|
-
`}};
|
|
1048
|
+
`}};O.styles=y`
|
|
1048
1049
|
:host {
|
|
1049
1050
|
display: flex;
|
|
1050
1051
|
gap: 5px;
|
|
@@ -1149,9 +1150,9 @@
|
|
|
1149
1150
|
height: 0;
|
|
1150
1151
|
width: 0;
|
|
1151
1152
|
}
|
|
1152
|
-
`;
|
|
1153
|
+
`;N([a({type:Array})],O.prototype,"thumbnails",2);N([a({type:Number})],O.prototype,"activeIndex",2);N([a({type:Array})],O.prototype,"disabledIndexes",2);N([a({type:String})],O.prototype,"maxWidth",2);N([a({type:String})],O.prototype,"altressource",2);N([a({type:Object})],O.prototype,"swiperInstance",2);N([K()],O.prototype,"focusedIndex",2);O=N([x("thumbnail-navigation")],O);var Ao=Object.defineProperty,Eo=Object.getOwnPropertyDescriptor,jt=(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=(n?s(t,e,i):s(i))||i);return n&&i&&Ao(t,e,i),i};let lt=class extends f{constructor(){super(...arguments),this.type="",this.bgstyle="background-white"}render(){return l`
|
|
1153
1154
|
<span class="tag ${this.bgstyle}"><slot></slot></span>
|
|
1154
|
-
`}};lt.styles=
|
|
1155
|
+
`}};lt.styles=y`
|
|
1155
1156
|
.tag {
|
|
1156
1157
|
display: inline-block;
|
|
1157
1158
|
padding: var(--spacing-2-xs) var(--spacing-s);
|
|
@@ -1162,13 +1163,6 @@
|
|
|
1162
1163
|
font-family: var(--font-family-loccitane-sans);
|
|
1163
1164
|
letter-spacing: var(--letter-spacing-400);
|
|
1164
1165
|
position: relative;
|
|
1165
|
-
|
|
1166
|
-
@media (max-width: 375px) {
|
|
1167
|
-
overflow: hidden;
|
|
1168
|
-
white-space: nowrap;
|
|
1169
|
-
text-overflow: ellipsis;
|
|
1170
|
-
max-width: 19ch;
|
|
1171
|
-
}
|
|
1172
1166
|
}
|
|
1173
1167
|
|
|
1174
1168
|
.tag.background-emphasis {
|
|
@@ -1206,12 +1200,21 @@
|
|
|
1206
1200
|
background-color: var(--color-content-success);
|
|
1207
1201
|
}
|
|
1208
1202
|
|
|
1209
|
-
|
|
1203
|
+
:host(:not([type$="percentage"])) .tag, {
|
|
1204
|
+
@media (max-width: 375px) {
|
|
1205
|
+
overflow: hidden;
|
|
1206
|
+
white-space: nowrap;
|
|
1207
|
+
text-overflow: ellipsis;
|
|
1208
|
+
max-width: 19ch;
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
`;jt([a({type:String,reflect:!0})],lt.prototype,"type",2);jt([a({type:String,reflect:!0})],lt.prototype,"bgstyle",2);lt=jt([x("o-tag")],lt);var So=Object.defineProperty,Lo=Object.getOwnPropertyDescriptor,Ut=(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&&So(t,e,i),i};let ct=class extends f{constructor(){super(...arguments),this.type="top",this.text=""}render(){return l`
|
|
1210
1213
|
<div class="tooltip">
|
|
1211
1214
|
<span class="tooltiptext">${this.text}</span>
|
|
1212
1215
|
<slot></slot>
|
|
1213
1216
|
</div>
|
|
1214
|
-
`}};ct.styles=
|
|
1217
|
+
`}};ct.styles=y`
|
|
1215
1218
|
.tooltip {
|
|
1216
1219
|
position: relative;
|
|
1217
1220
|
display: inline-block;
|
|
@@ -1303,7 +1306,7 @@
|
|
|
1303
1306
|
border-color: transparent var(--color-alpha-dark-strongest) transparent transparent;
|
|
1304
1307
|
}
|
|
1305
1308
|
|
|
1306
|
-
`;Ut([a({type:String,reflect:!0})],ct.prototype,"type",2);Ut([a({type:String,reflect:!0})],ct.prototype,"text",2);ct=Ut([x("o-tooltip")],ct);var Po=Object.defineProperty,Io=Object.getOwnPropertyDescriptor,
|
|
1309
|
+
`;Ut([a({type:String,reflect:!0})],ct.prototype,"type",2);Ut([a({type:String,reflect:!0})],ct.prototype,"text",2);ct=Ut([x("o-tooltip")],ct);var Po=Object.defineProperty,Io=Object.getOwnPropertyDescriptor,H=(o,t,e,n)=>{for(var i=n>1?void 0:n?Io(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&&Po(t,e,i),i};let S=class extends f{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=G.checkstroke.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"'),t=this.options.find(e=>e.value===this.value);return l`
|
|
1307
1310
|
<button
|
|
1308
1311
|
role="combobox"
|
|
1309
1312
|
aria-haspopup="listbox"
|
|
@@ -1343,15 +1346,15 @@
|
|
|
1343
1346
|
${e.url?l`
|
|
1344
1347
|
<a href="${e.url}">
|
|
1345
1348
|
<span>${e.label}</span>
|
|
1346
|
-
${e.value===this.value?l`<span class="check">${
|
|
1349
|
+
${e.value===this.value?l`<span class="check">${I(o)}</span>`:null}
|
|
1347
1350
|
</a>`:l`
|
|
1348
1351
|
<span>${e.label}</span>
|
|
1349
|
-
${e.value===this.value?l`<span class="check">${
|
|
1352
|
+
${e.value===this.value?l`<span class="check">${I(o)}</span>`:null}`}
|
|
1350
1353
|
</li>`)}
|
|
1351
1354
|
</ul>`:null}
|
|
1352
1355
|
|
|
1353
1356
|
<input type="hidden" name="${this.name}" .value="${this.value}" />
|
|
1354
|
-
`}};
|
|
1357
|
+
`}};S.styles=y`
|
|
1355
1358
|
:host {
|
|
1356
1359
|
display: inline-block;
|
|
1357
1360
|
position: relative;
|
|
@@ -1490,7 +1493,7 @@
|
|
|
1490
1493
|
input[type="hidden"] {
|
|
1491
1494
|
display: none;
|
|
1492
1495
|
}
|
|
1493
|
-
`;
|
|
1496
|
+
`;H([a({type:Array,reflect:!0})],S.prototype,"options",2);H([a({type:String,reflect:!0})],S.prototype,"value",2);H([a({type:String,reflect:!0})],S.prototype,"name",2);H([a({type:Boolean,reflect:!0})],S.prototype,"disabled",2);H([a({type:String,reflect:!0})],S.prototype,"width",2);H([K()],S.prototype,"open",2);H([K()],S.prototype,"activeIndex",2);H([K()],S.prototype,"menuWidth",2);S=H([x("o-dropdown")],S);var Oo=Object.getOwnPropertyDescriptor,Bo=(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=s(i)||i);return i};let Lt=class extends f{render(){return l` <span class="dots"></span> `}};Lt.styles=y`
|
|
1494
1497
|
:host {
|
|
1495
1498
|
display: flex;
|
|
1496
1499
|
align-items: center;
|
|
@@ -1541,7 +1544,7 @@
|
|
|
1541
1544
|
background-color: var(--color-container-action-primary-pressed);
|
|
1542
1545
|
}
|
|
1543
1546
|
}
|
|
1544
|
-
`;Lt=Bo([x("o-dots")],Lt);var zo=Object.defineProperty,Do=Object.getOwnPropertyDescriptor,
|
|
1547
|
+
`;Lt=Bo([x("o-dots")],Lt);var zo=Object.defineProperty,Do=Object.getOwnPropertyDescriptor,z=(o,t,e,n)=>{for(var i=n>1?void 0:n?Do(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&&zo(t,e,i),i};let k=class extends f{constructor(){super(...arguments),this.options=[],this.value="",this.name="",this.additionaltext="+X variant(s)",this.disabled=!1,this.width="100%",this.open=!1,this.activeIndex=-1,this.menuWidth="",this._handleOutsideClick=o=>{this.contains(o.target)||(this.open=!1,this.activeIndex=-1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this._handleOutsideClick),super.disconnectedCallback()}toggle(){var o;if(!this.disabled){if(this.open=!this.open,this.activeIndex=this.open?this.options.findIndex(t=>t.value===this.value):-1,this.open&&this.width==="auto"){const t=(o=this.renderRoot)==null?void 0:o.querySelector("button");t&&(this.menuWidth=`${t.getBoundingClientRect().width}px`)}this.open&&this.updateComplete.then(()=>this._focusActiveOption())}}_focusActiveOption(){var t;const o=(t=this.renderRoot)==null?void 0:t.querySelector(`#option-${this.activeIndex}`);o==null||o.focus()}selectOption(o){this.value=o.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,url:o.url}})),this.open=!1,this.activeIndex=-1}handleKeydown(o){if(this.disabled){o.preventDefault();return}if(!this.open){(o.key==="ArrowDown"||o.key==="ArrowUp")&&(o.preventDefault(),this.open=!0,this.activeIndex=this.options.findIndex(t=>t.value===this.value),this.updateComplete.then(()=>this._focusActiveOption()));return}switch(o.key){case"ArrowDown":o.preventDefault(),this.activeIndex=(this.activeIndex+1)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"ArrowUp":o.preventDefault(),this.activeIndex=(this.activeIndex-1+this.options.length)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"Home":o.preventDefault(),this.activeIndex=0,this.updateComplete.then(()=>this._focusActiveOption());break;case"End":o.preventDefault(),this.activeIndex=this.options.length-1,this.updateComplete.then(()=>this._focusActiveOption());break;case"Enter":o.preventDefault(),this.activeIndex>=0&&this.selectOption(this.options[this.activeIndex]);break;case"Escape":o.preventDefault(),this.open=!1,this.activeIndex=-1;break}}updated(){this.options.length>0&&(this.options.some(t=>t.value===this.value)||(this.value=this.options[0].value))}render(){const o=G.checkstroke.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"'),t=this.options.find(e=>e.value===this.value);return l`
|
|
1545
1548
|
<button
|
|
1546
1549
|
role="combobox"
|
|
1547
1550
|
aria-haspopup="listbox"
|
|
@@ -1555,7 +1558,7 @@
|
|
|
1555
1558
|
?disabled=${this.disabled}
|
|
1556
1559
|
class="btn-dropdown"
|
|
1557
1560
|
>
|
|
1558
|
-
<img alt="${
|
|
1561
|
+
<img alt="${_(t==null?void 0:t.label)}" src="${_(t==null?void 0:t.imgurl)}" />
|
|
1559
1562
|
<span id="dropdown-label" class="label">
|
|
1560
1563
|
${t?t.label:"Select an option"}
|
|
1561
1564
|
</span>
|
|
@@ -1589,13 +1592,13 @@
|
|
|
1589
1592
|
class="${n===this.activeIndex?"active":""} ${e.disabled?"disabled":""}"
|
|
1590
1593
|
@click=${()=>this.selectOption(e)}
|
|
1591
1594
|
>
|
|
1592
|
-
<a href="${
|
|
1593
|
-
<img alt="${
|
|
1595
|
+
<a href="${_(e.url)}">
|
|
1596
|
+
<img alt="${_(e.label)}" src="${_(e.imgurl)}" />
|
|
1594
1597
|
<span class="label">${e.label}</span>
|
|
1595
1598
|
<div class="right">
|
|
1596
|
-
<span class="additional-text">${
|
|
1599
|
+
<span class="additional-text">${_(e.additionaltext)}</span>
|
|
1597
1600
|
${e.value===this.value&&!e.additionaltext?l`
|
|
1598
|
-
<span class="check">${
|
|
1601
|
+
<span class="check">${I(o)}</span>`:null}
|
|
1599
1602
|
</div>
|
|
1600
1603
|
</a>
|
|
1601
1604
|
</li>
|
|
@@ -1603,7 +1606,7 @@
|
|
|
1603
1606
|
</ul>`:null}
|
|
1604
1607
|
|
|
1605
1608
|
<input type="hidden" name="${this.name}" .value="${this.value}" />
|
|
1606
|
-
`}};
|
|
1609
|
+
`}};k.styles=y`
|
|
1607
1610
|
:host {
|
|
1608
1611
|
display: inline-block;
|
|
1609
1612
|
position: relative;
|
|
@@ -1778,17 +1781,17 @@
|
|
|
1778
1781
|
input[type="hidden"] {
|
|
1779
1782
|
display: none;
|
|
1780
1783
|
}
|
|
1781
|
-
`;
|
|
1784
|
+
`;z([a({type:Array,reflect:!0})],k.prototype,"options",2);z([a({type:String,reflect:!0})],k.prototype,"value",2);z([a({type:String,reflect:!0})],k.prototype,"name",2);z([a({type:String,reflect:!0})],k.prototype,"additionaltext",2);z([a({type:Boolean,reflect:!0})],k.prototype,"disabled",2);z([a({type:String,reflect:!0})],k.prototype,"width",2);z([K()],k.prototype,"open",2);z([K()],k.prototype,"activeIndex",2);z([K()],k.prototype,"menuWidth",2);k=z([x("o-dropdown-variant")],k);/**
|
|
1782
1785
|
* @license
|
|
1783
1786
|
* Copyright 2018 Google LLC
|
|
1784
1787
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1785
|
-
*/const le="important",Ho=" !"+le,
|
|
1786
|
-
${this.option.imgurl?l`<img src="${this.option.imgurl}" alt="${
|
|
1788
|
+
*/const le="important",Ho=" !"+le,Mo=Mt(class extends Tt{constructor(o){var t;if(super(o),o.type!==Ht.ATTRIBUTE||o.name!=="style"||((t=o.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((t,e)=>{const n=o[e];return n==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`},"")}update(o,[t]){const{style:e}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const n of this.ft)t[n]==null&&(this.ft.delete(n),n.includes("-")?e.removeProperty(n):e[n]=null);for(const n in t){const i=t[n];if(i!=null){this.ft.add(n);const r=typeof i=="string"&&i.endsWith(Ho);n.includes("-")||r?e.setProperty(n,r?i.slice(0,-11):i,r?le:""):e[n]=i}}return F}});var To=Object.defineProperty,jo=Object.getOwnPropertyDescriptor,Ft=(o,t,e,n)=>{for(var i=n>1?void 0:n?jo(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&&To(t,e,i),i};let ht=class extends f{constructor(){super(...arguments),this.option={},this.imageSize=64}render(){const o=this.option.clickable,t={width:`${this.imageSize}px`,height:`${this.imageSize}px`},e=l`
|
|
1789
|
+
${this.option.imgurl?l`<img src="${this.option.imgurl}" alt="${_(this.option.title)}" aria-hidden="true" style=${Mo(t)} />`:""}
|
|
1787
1790
|
<div class="m-reassurance-content">
|
|
1788
|
-
<h3 class="a-reassurance-text">${
|
|
1789
|
-
<p class="a-reassurance-description">${
|
|
1791
|
+
<h3 class="a-reassurance-text">${_(this.option.title)}</h3>
|
|
1792
|
+
<p class="a-reassurance-description">${_(this.option.description)}</p>
|
|
1790
1793
|
</div>
|
|
1791
|
-
`;return o?l`<a href="${
|
|
1794
|
+
`;return o?l`<a href="${_(this.option.url)}" class="reassurance-item clickable">${e}</a>`:l`<div class="reassurance-item">${e}</div>`}};ht.styles=y`
|
|
1792
1795
|
:host {
|
|
1793
1796
|
display: inline-block;
|
|
1794
1797
|
position: relative;
|
|
@@ -1869,7 +1872,7 @@
|
|
|
1869
1872
|
overflow: hidden;
|
|
1870
1873
|
}
|
|
1871
1874
|
}
|
|
1872
|
-
`;
|
|
1875
|
+
`;Ft([a({type:Object,reflect:!0})],ht.prototype,"option",2);Ft([a({type:Number,reflect:!0})],ht.prototype,"imageSize",2);ht=Ft([x("o-reassurance")],ht);var Uo=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,M=(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&&Uo(t,e,i),i};const No=Dt(f);let A=class extends No{constructor(){super(...arguments),this.link="",this.name="",this.value="",this.text="",this.size="standard",this.selected=!1,this.fullwidth=!1,this.inactive=!1}handleClick(o){this.selected||(this.selected=!0);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}render(){const o=this.text;return this.link?l`
|
|
1873
1876
|
<a href="${this.link}" class="o-chip" tabindex="${this.inactive?"-1":"0"}" aria-hidden="${this.inactive?"true":"false"}">
|
|
1874
1877
|
${o?this.text:l`<slot></slot>`}
|
|
1875
1878
|
</a>
|
|
@@ -1878,7 +1881,7 @@
|
|
|
1878
1881
|
aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
|
|
1879
1882
|
${o?this.text:l`<slot></slot>`}
|
|
1880
1883
|
</button>
|
|
1881
|
-
`}};
|
|
1884
|
+
`}};A.styles=y`
|
|
1882
1885
|
:host {
|
|
1883
1886
|
cursor: pointer;
|
|
1884
1887
|
display: inline-flex;
|
|
@@ -1954,7 +1957,7 @@
|
|
|
1954
1957
|
}
|
|
1955
1958
|
|
|
1956
1959
|
&:focus-visible {
|
|
1957
|
-
${
|
|
1960
|
+
${ut};
|
|
1958
1961
|
}
|
|
1959
1962
|
}
|
|
1960
1963
|
|
|
@@ -1967,16 +1970,16 @@
|
|
|
1967
1970
|
display: inline-flex;
|
|
1968
1971
|
align-items: center;
|
|
1969
1972
|
}
|
|
1970
|
-
`;
|
|
1973
|
+
`;M([a({type:String,reflect:!0})],A.prototype,"link",2);M([a({reflect:!0})],A.prototype,"name",2);M([a({reflect:!0})],A.prototype,"value",2);M([a({type:String})],A.prototype,"text",2);M([a({type:String,reflect:!0})],A.prototype,"size",2);M([a({type:Boolean,reflect:!0})],A.prototype,"selected",2);M([a({type:Boolean,reflect:!0})],A.prototype,"fullwidth",2);M([a({type:Boolean,reflect:!0})],A.prototype,"inactive",2);A=M([x("o-chip")],A);var Ro=Object.defineProperty,Vo=Object.getOwnPropertyDescriptor,Nt=(o,t,e,n)=>{for(var i=n>1?void 0:n?Vo(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&&Ro(t,e,i),i};let dt=class extends f{constructor(){super(),this.name="",this.value="",this.addEventListener("selected",this.onChipSelected)}onChipSelected(o){const t=o.target instanceof A?o.target:null;t!=null&&t.link||(this.name=(t==null?void 0:t.name)||"",this.value=(t==null?void 0:t.value)||"",this.querySelectorAll("o-chip").forEach(e=>{e!==t&&(e.selected=!1)}))}render(){return l`
|
|
1971
1974
|
<slot></slot>
|
|
1972
|
-
`}};dt.styles=
|
|
1975
|
+
`}};dt.styles=y`
|
|
1973
1976
|
:host {
|
|
1974
1977
|
display: flex;
|
|
1975
1978
|
flex-direction: row;
|
|
1976
1979
|
flex-wrap: wrap;
|
|
1977
1980
|
gap: var(--spacing-s);
|
|
1978
1981
|
}
|
|
1979
|
-
`;
|
|
1982
|
+
`;Nt([a({reflect:!0})],dt.prototype,"name",2);Nt([a({reflect:!0})],dt.prototype,"value",2);dt=Nt([x("o-chipset")],dt);var Zo=Object.defineProperty,qo=Object.getOwnPropertyDescriptor,T=(o,t,e,n)=>{for(var i=n>1?void 0:n?qo(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&&Zo(t,e,i),i};const Wo=Dt(f);let L=class extends Wo{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=G[this.crossIconName].replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"').replace(/stroke=[#"'a-z1-9]*/gi,"");return l`<span class="cross-icon">${I(o)}</span>`}strikeThroughImg(){const o=eo[this.strikethroughImgName].replace("<svg",'<svg aria-hidden="true" focusable="false" part="strikethrough"').replace(/stroke=[#"'a-z1-9]*/gi,"");return I(o)}render(){const o=this.text;return l`${this.type==="link"?l`
|
|
1980
1983
|
<a role="button" tabindex="0" class="button" href=${this.dataHref} ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}
|
|
1981
1984
|
aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
|
|
1982
1985
|
${o?l`
|
|
@@ -1996,7 +1999,7 @@
|
|
|
1996
1999
|
</button>
|
|
1997
2000
|
`}
|
|
1998
2001
|
${this.disabled?this.strikeThroughImg():d}
|
|
1999
|
-
`}};
|
|
2002
|
+
`}};L.styles=y`
|
|
2000
2003
|
:host {
|
|
2001
2004
|
cursor: pointer;
|
|
2002
2005
|
display: inline-flex;
|
|
@@ -2076,7 +2079,7 @@
|
|
|
2076
2079
|
}
|
|
2077
2080
|
|
|
2078
2081
|
.button:focus-visible {
|
|
2079
|
-
${
|
|
2082
|
+
${ut};
|
|
2080
2083
|
}
|
|
2081
2084
|
|
|
2082
2085
|
span.text + span.text::before {
|
|
@@ -2121,7 +2124,7 @@
|
|
|
2121
2124
|
stroke-linecap: round;
|
|
2122
2125
|
}
|
|
2123
2126
|
}
|
|
2124
|
-
`;T([a({reflect:!0})],
|
|
2127
|
+
`;T([a({reflect:!0})],L.prototype,"name",2);T([a({reflect:!0})],L.prototype,"value",2);T([a({type:String,reflect:!0})],L.prototype,"type",2);T([a({type:String,reflect:!0,attribute:"data-href"})],L.prototype,"dataHref",2);T([a({type:String})],L.prototype,"text",2);T([a({type:Boolean,reflect:!0})],L.prototype,"selected",2);T([a({type:Boolean,reflect:!0})],L.prototype,"disabled",2);T([a({type:Boolean,reflect:!0})],L.prototype,"fullwidth",2);L=T([x("o-filter-chip")],L);var Ko=Object.defineProperty,R=(o,t,e,n)=>{for(var i=void 0,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=s(t,e,i)||i);return i&&Ko(t,e,i),i};const Rt=class Rt extends f{constructor(){super(...arguments),this.type="cart | chevron",this.titleProduct="",this.volume="",this.perLiter="",this.mainPrice="",this.imageUrl="https://placehold.co/56x70",this.altImage=""}onClick(){typeof this.onClickTile=="function"&&this.onClickTile()}get icons(){return this.type==="chevron"?l`
|
|
2125
2128
|
<o-icon-button
|
|
2126
2129
|
@click=${this.onClick}
|
|
2127
2130
|
icon="chevronRight"
|
|
@@ -2153,7 +2156,7 @@
|
|
|
2153
2156
|
</div>
|
|
2154
2157
|
${this.icons}
|
|
2155
2158
|
</div>
|
|
2156
|
-
`}};Rt.styles=
|
|
2159
|
+
`}};Rt.styles=y`
|
|
2157
2160
|
.tile {
|
|
2158
2161
|
display: flex;
|
|
2159
2162
|
align-items: center;
|
|
@@ -2226,4 +2229,4 @@
|
|
|
2226
2229
|
letter-spacing: var(--letter-spacing-absolute);
|
|
2227
2230
|
line-height: var(--line-height-160);
|
|
2228
2231
|
}
|
|
2229
|
-
`;let
|
|
2232
|
+
`;let P=Rt;R([a({type:String})],P.prototype,"type");R([a({type:String})],P.prototype,"titleProduct");R([a({type:String})],P.prototype,"volume");R([a({type:String})],P.prototype,"perLiter");R([a({type:String})],P.prototype,"mainPrice");R([a({type:String})],P.prototype,"imageUrl");R([a({type:String})],P.prototype,"altImage");R([a({type:Function})],P.prototype,"onClickTile");customElements.define("mini-tile",P);
|