@florid-kit/components 0.9.14 → 0.9.16
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/aria.d.ts +1 -1
- package/index.js +831 -830
- package/index.mjs +1524 -1523
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const ht=globalThis,_t=ht.trustedTypes,oe=_t?_t.createPolicy("lit-html",{createHTML:o=>o}):void 0,de="$lit$",K=`lit$${Math.random().toFixed(9).slice(2)}$`,pe="?"+K,
|
|
13
|
+
*/const ht=globalThis,_t=ht.trustedTypes,oe=_t?_t.createPolicy("lit-html",{createHTML:o=>o}):void 0,de="$lit$",K=`lit$${Math.random().toFixed(9).slice(2)}$`,pe="?"+K,Ae=`<${pe}>`,tt=document,pt=()=>tt.createComment(""),ut=o=>o===null||typeof o!="object"&&typeof o!="function",Rt=Array.isArray,Ee=o=>Rt(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",Pt=`[
|
|
14
14
|
\f\r]`,lt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ie=/-->/g,ne=/>/g,J=RegExp(`>|${Pt}(?:([^\\s"'>=/]+)(${Pt}*=${Pt}*(?:[^
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),re=/'/g,se=/"/g,ue=/^(?:script|style|textarea|title)$/i,Le=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=Le(1),G=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),ae=new WeakMap,Q=tt.createTreeWalker(tt,129);function ve(o,t){if(!Rt(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return oe!==void 0?oe.createHTML(t):t}const Pe=(o,t)=>{const e=o.length-1,n=[];let i,r=t===2?"<svg>":t===3?"<math>":"",s=lt;for(let h=0;h<e;h++){const c=o[h];let m,w,v=-1,R=0;for(;R<c.length&&(s.lastIndex=R,w=s.exec(c),w!==null);)R=s.lastIndex,s===lt?w[1]==="!--"?s=ie:w[1]!==void 0?s=ne:w[2]!==void 0?(ue.test(w[2])&&(i=RegExp("</"+w[2],"g")),s=J):w[3]!==void 0&&(s=J):s===J?w[0]===">"?(s=i??lt,v=-1):w[1]===void 0?v=-2:(v=s.lastIndex-w[2].length,m=w[1],s=w[3]===void 0?J:w[3]==='"'?se:re):s===se||s===re?s=J:s===ie||s===ne?s=lt:(s=J,i=void 0);const Z=s===J&&o[h+1].startsWith("/>")?" ":"";r+=s===lt?c+
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),re=/'/g,se=/"/g,ue=/^(?:script|style|textarea|title)$/i,Le=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=Le(1),G=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),ae=new WeakMap,Q=tt.createTreeWalker(tt,129);function ve(o,t){if(!Rt(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return oe!==void 0?oe.createHTML(t):t}const Pe=(o,t)=>{const e=o.length-1,n=[];let i,r=t===2?"<svg>":t===3?"<math>":"",s=lt;for(let h=0;h<e;h++){const c=o[h];let m,w,v=-1,R=0;for(;R<c.length&&(s.lastIndex=R,w=s.exec(c),w!==null);)R=s.lastIndex,s===lt?w[1]==="!--"?s=ie:w[1]!==void 0?s=ne:w[2]!==void 0?(ue.test(w[2])&&(i=RegExp("</"+w[2],"g")),s=J):w[3]!==void 0&&(s=J):s===J?w[0]===">"?(s=i??lt,v=-1):w[1]===void 0?v=-2:(v=s.lastIndex-w[2].length,m=w[1],s=w[3]===void 0?J:w[3]==='"'?se:re):s===se||s===re?s=J:s===ie||s===ne?s=lt:(s=J,i=void 0);const Z=s===J&&o[h+1].startsWith("/>")?" ":"";r+=s===lt?c+Ae:v>=0?(n.push(m),c.slice(0,v)+de+c.slice(v)+K+Z):c+K+(v===-2?h:Z)}return[ve(o,r+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]};class vt{constructor({strings:t,_$litType$:e},n){let i;this.parts=[];let r=0,s=0;const h=t.length-1,c=this.parts,[m,w]=Pe(t,e);if(this.el=vt.createElement(m,n),Q.currentNode=this.el.content,e===2||e===3){const v=this.el.content.firstChild;v.replaceWith(...v.childNodes)}for(;(i=Q.nextNode())!==null&&c.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(const v of i.getAttributeNames())if(v.endsWith(de)){const R=w[s++],Z=i.getAttribute(v).split(K),wt=/([.?@])?(.*)/.exec(R);c.push({type:1,index:r,name:wt[2],strings:Z,ctor:wt[1]==="."?Oe:wt[1]==="?"?ze:wt[1]==="@"?Be:St}),i.removeAttribute(v)}else v.startsWith(K)&&(c.push({type:6,index:r}),i.removeAttribute(v));if(ue.test(i.tagName)){const v=i.textContent.split(K),R=v.length-1;if(R>0){i.textContent=_t?_t.emptyScript:"";for(let Z=0;Z<R;Z++)i.append(v[Z],pt()),Q.nextNode(),c.push({type:2,index:++r});i.append(v[R],pt())}}}else if(i.nodeType===8)if(i.data===pe)c.push({type:2,index:r});else{let v=-1;for(;(v=i.data.indexOf(K,v+1))!==-1;)c.push({type:7,index:r}),v+=K.length-1}r++}}static createElement(t,e){const n=tt.createElement("template");return n.innerHTML=t,n}}function nt(o,t,e=o,n){var s,h;if(t===G)return t;let i=n!==void 0?(s=e._$Co)==null?void 0:s[n]:e._$Cl;const r=ut(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=nt(o,i._$AS(o,t.values),i,n)),t}class Ie{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)??tt).importNode(e,!0);Q.currentNode=i;let r=Q.nextNode(),s=0,h=0,c=n[0];for(;c!==void 0;){if(s===c.index){let m;c.type===2?m=new xt(r,r.nextSibling,this,t):c.type===1?m=new c.ctor(r,c.name,c.strings,this,t):c.type===6&&(m=new De(r,this,t)),this._$AV.push(m),c=n[++h]}s!==(c==null?void 0:c.index)&&(r=Q.nextNode(),s++)}return Q.currentNode=tt,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 xt{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=nt(this,t,e),ut(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==G&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ee(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&&ut(this._$AH)?this._$AA.nextSibling.data=t:this.T(tt.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=vt.createElement(ve(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 Ie(i,this),h=s.u(this.options);s.p(e),this.T(h),this._$AH=s}}_$AC(t){let e=ae.get(t.strings);return e===void 0&&ae.set(t.strings,e=new vt(t)),e}k(t){Rt(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 xt(this.O(pt()),this.O(pt()),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 St{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=nt(this,t,e,0),s=!ut(t)||t!==this._$AH&&t!==G,s&&(this._$AH=t);else{const h=t;let c,m;for(t=r[0],c=0;c<r.length-1;c++)m=nt(this,h[n+c],e,c),m===G&&(m=this._$AH[c]),s||(s=!ut(m)||m!==this._$AH[c]),m===d?t=d:t!==d&&(t+=(m??"")+r[c+1]),this._$AH[c]=m}s&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Oe extends St{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class ze extends St{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class Be extends St{constructor(t,e,n,i,r){super(t,e,n,i,r),this.type=5}_$AI(t,e=this){if((t=nt(this,t,e,0)??d)===G)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 De{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){nt(this,t)}}const It=ht.litHtmlPolyfillSupport;It==null||It(vt,xt),(ht.litHtmlVersions??(ht.litHtmlVersions=[])).push("3.3.0");const He=(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 xt(t.insertBefore(pt(),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
|
|
@@ -158,966 +158,967 @@
|
|
|
158
158
|
* @license
|
|
159
159
|
* Copyright 2017 Google LLC
|
|
160
160
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
161
|
-
*/class Dt extends Bt{}Dt.directiveName="unsafeSVG",Dt.resultType=2;const C=Vt(Dt)
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
161
|
+
*/class Dt extends Bt{}Dt.directiveName="unsafeSVG",Dt.resultType=2;const C=Vt(Dt);/**
|
|
162
|
+
* @license
|
|
163
|
+
* Copyright 2020 Google LLC
|
|
164
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
165
|
+
*/const mo=o=>o.strings===void 0;/**
|
|
166
|
+
* @license
|
|
167
|
+
* Copyright 2017 Google LLC
|
|
168
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
169
|
+
*/const dt=(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),dt(i,t);return!0},kt=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)},be=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),$o(t)}};function xo(o){this._$AN!==void 0?(kt(this),this._$AM=o,be(this)):this._$AM=o}function wo(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++)dt(n[r],!1),kt(n[r]);else n!=null&&(dt(n,!1),kt(n));else dt(this,o)}const $o=o=>{o.type==Ut.CHILD&&(o._$AP??(o._$AP=wo),o._$AQ??(o._$AQ=xo))};class Co extends qt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,n){super._$AT(t,e,n),be(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&&(dt(this,t),kt(this))}setValue(t){if(mo(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 _o extends Co{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 ko extends _o{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 So extends ko{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 le=Vt(So);/**
|
|
170
|
+
* @license
|
|
171
|
+
* Copyright 2018 Google LLC
|
|
172
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
173
|
+
*/const k=o=>o??d;var Ao=Object.defineProperty,Eo=Object.getOwnPropertyDescriptor,H=(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 S=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=N[this.icon]??"",t=`icon-${this.icon}`,e=o.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"').replace(/<path\b/g,'<path part="icon-path"').replace(/<g\b/g,'<g part="icon-group"').replace(/<circle\b/g,'<circle part="icon-circle"'),n=this.showSrLabel?l`<span class="sr-only">${this.srLabel}</span>`:null,i=this.showSrLabel?null:"icon";return l`
|
|
174
|
+
${this.type==="span"?l`
|
|
175
|
+
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
176
|
+
${C(e)}
|
|
177
|
+
</span>
|
|
178
|
+
`:l`
|
|
179
|
+
<button
|
|
180
|
+
type="button"
|
|
181
|
+
aria-label=${k(i)}
|
|
182
|
+
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
|
|
183
|
+
?disabled="${this.disabled}"
|
|
184
|
+
>
|
|
185
|
+
${C(e)}
|
|
186
|
+
${n}
|
|
187
|
+
</button>
|
|
188
|
+
`}
|
|
189
|
+
`}};S.styles=f`
|
|
190
|
+
:host {
|
|
191
|
+
display: inline-flex;
|
|
192
|
+
justify-content: center;
|
|
193
|
+
align-items: center;
|
|
194
|
+
outline: none !important;
|
|
195
|
+
}
|
|
195
196
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
197
|
+
.icon-button {
|
|
198
|
+
display: flex;
|
|
199
|
+
justify-content: center;
|
|
200
|
+
align-items: center;
|
|
201
|
+
width: 32px;
|
|
202
|
+
height: 32px;
|
|
203
|
+
border: transparent;
|
|
204
|
+
border-radius: var(--radius-full);
|
|
205
|
+
cursor: pointer;
|
|
206
|
+
position: relative;
|
|
199
207
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
208
|
+
&.icon-wishlist {
|
|
209
|
+
svg {
|
|
210
|
+
path {
|
|
211
|
+
stroke: var(--color-content-action-secondary);
|
|
212
|
+
stroke-width: var(--icon-stroke-width, 1);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
203
217
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
--button-bg-pressed: var(--color-container-action-primary-pressed);
|
|
208
|
-
--button-text: var(--color-content-action-primary);
|
|
209
|
-
--button-text-hover: var(--color-content-action-primary);
|
|
210
|
-
--button-border: transparent;
|
|
211
|
-
--button-border-width: var(--border-m);
|
|
212
|
-
--button-padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
|
|
213
|
-
--button-starticon-svg-width: 0px; /* No starticon SVG for primary button */
|
|
214
|
-
--button-endicon-svg-width: 0px; /* No endicon SVG for primary button */
|
|
215
|
-
}
|
|
218
|
+
.icon-button.filled svg {
|
|
219
|
+
fill: var(--color-content-action-secondary);
|
|
220
|
+
}
|
|
216
221
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
--button-bg-pressed: var(--color-container-action-secondary-pressed);
|
|
221
|
-
--button-text: var(--color-content-action-secondary);
|
|
222
|
-
--button-text-hover: var(--color-content-action-secondary);
|
|
223
|
-
--button-border: var(--color-border-secondary);
|
|
224
|
-
--button-border-width: var(--border-m);
|
|
225
|
-
--button-padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
|
|
226
|
-
--button-starticon-svg-width: 16px;
|
|
227
|
-
--button-endicon-svg-width: 0px; /* No endicon SVG for secondary button */
|
|
228
|
-
}
|
|
222
|
+
.icon-button.xsmall {
|
|
223
|
+
width: 20px;
|
|
224
|
+
height: 20px;
|
|
229
225
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
--button-padding: var(--spacing-m, 10px) var(--spacing-xl, 16px);
|
|
238
|
-
--button-starticon-svg-width: 16px;
|
|
239
|
-
--button-endicon-svg-width: 12px;
|
|
240
|
-
}
|
|
226
|
+
&:not(.icon-wishlist) {
|
|
227
|
+
svg {
|
|
228
|
+
width: 8px;
|
|
229
|
+
height: 8px;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
241
233
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
--button-bg-pressed: var(--color-container-action-tertiary-pressed);
|
|
246
|
-
--button-text: var(--color-content-body);
|
|
247
|
-
--button-text-hover: var(--color-content-action-tertiary);
|
|
248
|
-
--button-border-width: 0;
|
|
249
|
-
--button-padding: var(--spacing-m, 10px) var(--spacing-l, 12px);
|
|
250
|
-
--button-starticon-svg-width: 0px; /* No starticon SVG for tertiary button */
|
|
251
|
-
--button-endicon-svg-width: 8px;
|
|
252
|
-
}
|
|
234
|
+
.icon-button.small {
|
|
235
|
+
width: 32px;
|
|
236
|
+
height: 32px;
|
|
253
237
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
238
|
+
&:not(.icon-wishlist) {
|
|
239
|
+
svg {
|
|
240
|
+
width: 16px;
|
|
241
|
+
height: 16px;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
261
245
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
246
|
+
.icon-button.medium {
|
|
247
|
+
width: 40px;
|
|
248
|
+
height: 40px;
|
|
265
249
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
background-color: var(--button-bg);
|
|
274
|
-
color: var(--button-text);
|
|
275
|
-
border: var(--button-border-width, var(--border-m)) solid var(--button-border);
|
|
276
|
-
border-radius: var(--radius-m);
|
|
277
|
-
font-family: var(--font-family-loccitane-sans);
|
|
278
|
-
font-size: var(--font-size-150);
|
|
279
|
-
font-weight: var(--font-weight-400);
|
|
280
|
-
line-height: var(--line-height-200);
|
|
281
|
-
min-width: 64px;
|
|
282
|
-
padding: var(--button-padding);
|
|
283
|
-
text-decoration: none;
|
|
284
|
-
cursor: inherit;
|
|
285
|
-
box-sizing: border-box;
|
|
250
|
+
&:not(.icon-wishlist) {
|
|
251
|
+
svg {
|
|
252
|
+
width: 16px;
|
|
253
|
+
height: 16px;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
286
257
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
font-weight: var(--font-weight-400);
|
|
291
|
-
line-height: var(--line-height-200);
|
|
292
|
-
}
|
|
293
|
-
}
|
|
258
|
+
.icon-button.large {
|
|
259
|
+
width: 40px;
|
|
260
|
+
height: 40px;
|
|
294
261
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
262
|
+
&:not(.icon-wishlist) {
|
|
263
|
+
svg {
|
|
264
|
+
width: 24px;
|
|
265
|
+
height: 24px;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
299
269
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
270
|
+
.icon-button.none-light, .icon-button.none-contrast {
|
|
271
|
+
background-color: transparent;
|
|
272
|
+
width: auto;
|
|
273
|
+
height: auto;
|
|
303
274
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
275
|
+
&.xsmall {
|
|
276
|
+
svg {
|
|
277
|
+
width: 8px;
|
|
278
|
+
height: 8px;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
307
281
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
282
|
+
&.small {
|
|
283
|
+
svg {
|
|
284
|
+
width: 16px;
|
|
285
|
+
height: 16px;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
312
288
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
289
|
+
&.medium {
|
|
290
|
+
svg {
|
|
291
|
+
width: 16px;
|
|
292
|
+
height: 16px;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
317
295
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
path[fill],
|
|
325
|
-
path[class] {
|
|
326
|
-
fill: var(--button-text) !important;
|
|
327
|
-
}
|
|
328
|
-
path[stroke] {
|
|
329
|
-
stroke: var(--button-text) !important;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
:host([variant="tertiary"][fullwidth][endIcon]) .button {
|
|
334
|
-
justify-content: space-between;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.button span {
|
|
338
|
-
display: inline-flex;
|
|
339
|
-
align-items: center;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
.button slot {
|
|
343
|
-
display: inline-flex;
|
|
344
|
-
align-items: center;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
:host([variant="tertiary"][endIcon]) .button .icon-end {
|
|
348
|
-
width: var(--button-endicon-svg-width, 8px);
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
:host([underlined]) span:not([class*="icon-"]),
|
|
352
|
-
:host([underlined]) .text,
|
|
353
|
-
:host([underlined]:not([text])) .button slot {
|
|
354
|
-
position: relative;
|
|
355
|
-
|
|
356
|
-
&::after {
|
|
357
|
-
content: "";
|
|
358
|
-
display: block;
|
|
359
|
-
position: absolute;
|
|
360
|
-
bottom: 0;
|
|
361
|
-
left: 0;
|
|
362
|
-
width: 100%;
|
|
363
|
-
border-bottom: var(--border-M, 1px) solid var(--button-text);
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
:host([underlined]:not([text])) .button slot {
|
|
368
|
-
display: inline-flex;
|
|
369
|
-
gap: 8px;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
:host([underlined][withbadge]:not([text])) .button slot {
|
|
373
|
-
&::after {
|
|
374
|
-
width: calc(100% - var(--badge-outer-width, 19px) - var(--spacing-s, 8px))
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
//Icon movement on hover
|
|
379
|
-
:host([variant="tertiary"][endIcon]) .icon-end {
|
|
380
|
-
display: inline-flex;
|
|
381
|
-
align-items: center;
|
|
382
|
-
}
|
|
296
|
+
&.large {
|
|
297
|
+
svg {
|
|
298
|
+
width: 24px;
|
|
299
|
+
height: 24px;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
383
302
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
}
|
|
388
|
-
//End icon movment on hover
|
|
389
|
-
`;x([a()],b.prototype,"type",2);x([a({reflect:!0})],b.prototype,"value",2);x([a({type:String,reflect:!0})],b.prototype,"variant",2);x([a({type:String})],b.prototype,"text",2);x([a({type:String})],b.prototype,"textsecond",2);x([a({type:Boolean,reflect:!0})],b.prototype,"fullwidth",2);x([a({type:Boolean,reflect:!0})],b.prototype,"disabled",2);x([a({type:String,reflect:!0})],b.prototype,"startIconModel",2);x([a({type:String,reflect:!0})],b.prototype,"endIconModel",2);x([a({type:Boolean,reflect:!0,attribute:"starticon"})],b.prototype,"startIcon",2);x([a({type:Boolean,reflect:!0,attribute:"endicon"})],b.prototype,"endIcon",2);x([a({type:String,attribute:"paneltarget",reflect:!0})],b.prototype,"panelTarget",2);x([a({type:String})],b.prototype,"href",2);x([a({type:String})],b.prototype,"target",2);x([a({type:Boolean,reflect:!0})],b.prototype,"underlined",2);x([a({type:Boolean,reflect:!0})],b.prototype,"withbadge",2);b=x([y("o-button")],b);var $o=Object.defineProperty,Co=Object.getOwnPropertyDescriptor,Et=(o,t,e,n)=>{for(var i=n>1?void 0:n?Co(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 rt=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("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=N.wishlist.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return l`
|
|
390
|
-
<button type="button" aria-describedby="${this.ariaDescribedBy}" class="wishlist-button">
|
|
391
|
-
<span class="sr-only">${this.label}</span>
|
|
392
|
-
${C(o)}
|
|
393
|
-
</button>
|
|
394
|
-
`}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()}};rt.styles=f`
|
|
395
|
-
:host {
|
|
396
|
-
display: inline-flex;
|
|
397
|
-
justify-content: center;
|
|
398
|
-
align-items: center;
|
|
399
|
-
outline: none !important;
|
|
303
|
+
&:disabled {
|
|
304
|
+
background-color: transparent;
|
|
305
|
+
}
|
|
400
306
|
}
|
|
401
307
|
|
|
402
|
-
.
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
border-radius: var(--radius-full);
|
|
410
|
-
background-color: var(--color-alpha-light-strong);
|
|
411
|
-
position: relative;
|
|
412
|
-
cursor: pointer;
|
|
308
|
+
.icon-button.none-light {
|
|
309
|
+
svg {
|
|
310
|
+
path {
|
|
311
|
+
stroke: var(--color-content-action-primary);
|
|
312
|
+
fill: var(--color-content-action-primary);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
413
315
|
}
|
|
414
316
|
|
|
415
|
-
.
|
|
416
|
-
|
|
317
|
+
.icon-button.none-light.icon-wishlist svg path {
|
|
318
|
+
fill: none;
|
|
417
319
|
}
|
|
418
320
|
|
|
419
|
-
.
|
|
420
|
-
|
|
321
|
+
:host([status="filled"]) .icon-button.none-light.icon-wishlist svg path {
|
|
322
|
+
fill: var(--color-content-action-primary);
|
|
421
323
|
}
|
|
422
324
|
|
|
423
|
-
.
|
|
424
|
-
|
|
425
|
-
}
|
|
325
|
+
.icon-button.background-light {
|
|
326
|
+
background-color: var(--color-alpha-light-strong);
|
|
426
327
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
328
|
+
&:hover:not(:disabled) {
|
|
329
|
+
background-color: var(--color-alpha-light-stronger);
|
|
330
|
+
}
|
|
430
331
|
|
|
431
|
-
|
|
432
|
-
|
|
332
|
+
&:active:not(:disabled) {
|
|
333
|
+
background-color: var(--color-alpha-light-strongest);
|
|
334
|
+
}
|
|
433
335
|
}
|
|
434
336
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
}
|
|
337
|
+
.icon-button.background-contrast {
|
|
338
|
+
background-color: var(--color-container-action-tertiary-default);
|
|
438
339
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
fill: var(--color-content-action-secondary);
|
|
340
|
+
&:hover:not(:disabled) {
|
|
341
|
+
background-color: var(--color-container-action-tertiary-hover);
|
|
442
342
|
}
|
|
443
|
-
}
|
|
444
343
|
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
-webkit-clip-path: inset(50%) !important;
|
|
449
|
-
clip-path: inset(50%) !important;
|
|
450
|
-
height: 0.1rem !important;
|
|
451
|
-
margin: -0.1rem !important;
|
|
452
|
-
overflow: hidden !important;
|
|
453
|
-
padding: 0 !important;
|
|
454
|
-
position: absolute !important;
|
|
455
|
-
width: 0.1rem !important;
|
|
456
|
-
white-space: nowrap !important;
|
|
457
|
-
}
|
|
458
|
-
`;Et([a({type:String,reflect:!0})],rt.prototype,"status",2);Et([a({type:String,reflect:!0})],rt.prototype,"ariaDescribedBy",2);Et([a({type:String,reflect:!0})],rt.prototype,"label",2);rt=Et([y("o-wishlist-button")],rt);/**
|
|
459
|
-
* @license
|
|
460
|
-
* Copyright 2018 Google LLC
|
|
461
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
462
|
-
*/const k=o=>o??d;var _o=Object.defineProperty,ko=Object.getOwnPropertyDescriptor,H=(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&&_o(t,e,i),i};let S=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=N[this.icon]??"",t=`icon-${this.icon}`,e=o.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"').replace(/<path\b/g,'<path part="icon-path"').replace(/<g\b/g,'<g part="icon-group"').replace(/<circle\b/g,'<circle part="icon-circle"'),n=this.showSrLabel?l`<span class="sr-only">${this.srLabel}</span>`:null,i=this.showSrLabel?null:"icon";return l`
|
|
463
|
-
${this.type==="span"?l`
|
|
464
|
-
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
465
|
-
${C(e)}
|
|
466
|
-
</span>
|
|
467
|
-
`:l`
|
|
468
|
-
<button
|
|
469
|
-
type="button"
|
|
470
|
-
aria-label=${k(i)}
|
|
471
|
-
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
|
|
472
|
-
?disabled="${this.disabled}"
|
|
473
|
-
>
|
|
474
|
-
${C(e)}
|
|
475
|
-
${n}
|
|
476
|
-
</button>
|
|
477
|
-
`}
|
|
478
|
-
`}};S.styles=f`
|
|
479
|
-
:host {
|
|
480
|
-
display: inline-flex;
|
|
481
|
-
justify-content: center;
|
|
482
|
-
align-items: center;
|
|
483
|
-
outline: none !important;
|
|
344
|
+
&:active:not(:disabled) {
|
|
345
|
+
background-color: var(--color-container-action-tertiary-pressed);
|
|
346
|
+
}
|
|
484
347
|
}
|
|
485
348
|
|
|
486
|
-
.icon-button {
|
|
487
|
-
|
|
488
|
-
justify-content: center;
|
|
489
|
-
align-items: center;
|
|
490
|
-
width: 32px;
|
|
491
|
-
height: 32px;
|
|
492
|
-
border: transparent;
|
|
493
|
-
border-radius: var(--radius-full);
|
|
494
|
-
cursor: pointer;
|
|
495
|
-
position: relative;
|
|
349
|
+
.icon-button.ghost-light {
|
|
350
|
+
background-color: transparent;
|
|
496
351
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
stroke-width: var(--icon-stroke-width, 1);
|
|
502
|
-
}
|
|
352
|
+
svg {
|
|
353
|
+
path {
|
|
354
|
+
stroke: var(--color-content-action-primary);
|
|
355
|
+
fill: var(--color-content-action-primary);
|
|
503
356
|
}
|
|
504
357
|
}
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
.icon-button.filled svg {
|
|
508
|
-
fill: var(--color-content-action-secondary);
|
|
509
|
-
}
|
|
510
358
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
359
|
+
&:hover:not(:disabled) {
|
|
360
|
+
background-color: var(--color-alpha-light-lightest);
|
|
361
|
+
}
|
|
514
362
|
|
|
515
|
-
&:not(
|
|
516
|
-
|
|
517
|
-
width: 8px;
|
|
518
|
-
height: 8px;
|
|
519
|
-
}
|
|
363
|
+
&:active:not(:disabled) {
|
|
364
|
+
background-color: var(--color-alpha-light-light);
|
|
520
365
|
}
|
|
521
366
|
}
|
|
522
367
|
|
|
523
|
-
.icon-button.
|
|
524
|
-
|
|
525
|
-
height: 32px;
|
|
368
|
+
.icon-button.ghost-contrast {
|
|
369
|
+
background-color: transparent;
|
|
526
370
|
|
|
527
|
-
&:not(
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
371
|
+
&:hover:not(:disabled) {
|
|
372
|
+
background-color: var(--color-alpha-light-medium);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
&:active:not(:disabled) {
|
|
376
|
+
background-color: var(--color-alpha-light-strongest);
|
|
532
377
|
}
|
|
533
378
|
}
|
|
534
379
|
|
|
535
|
-
.icon-button
|
|
536
|
-
|
|
537
|
-
|
|
380
|
+
.icon-button:disabled {
|
|
381
|
+
background-color: var(--color-container-disabled);
|
|
382
|
+
cursor: default;
|
|
538
383
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
384
|
+
svg {
|
|
385
|
+
fill: var(--color-content-disabled);
|
|
386
|
+
|
|
387
|
+
path {
|
|
388
|
+
fill: var(--color-content-disabled);
|
|
543
389
|
}
|
|
544
390
|
}
|
|
545
391
|
}
|
|
546
392
|
|
|
547
|
-
.icon-button
|
|
548
|
-
|
|
549
|
-
height: 40px;
|
|
550
|
-
|
|
551
|
-
&:not(.icon-wishlist) {
|
|
552
|
-
svg {
|
|
553
|
-
width: 24px;
|
|
554
|
-
height: 24px;
|
|
555
|
-
}
|
|
556
|
-
}
|
|
393
|
+
.icon-button:focus-visible {
|
|
394
|
+
${at}
|
|
557
395
|
}
|
|
558
396
|
|
|
559
|
-
.
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
397
|
+
.sr-only {
|
|
398
|
+
display: none;
|
|
399
|
+
}
|
|
400
|
+
`;H([a({type:String,reflect:!0})],S.prototype,"bgstyle",2);H([a({type:String,reflect:!0})],S.prototype,"size",2);H([a({type:String,reflect:!0})],S.prototype,"status",2);H([a({type:String,reflect:!0})],S.prototype,"type",2);H([a({type:String})],S.prototype,"strokewidth",2);H([a({type:String})],S.prototype,"icon",2);H([a({type:Boolean,reflect:!0})],S.prototype,"disabled",2);H([a({type:Boolean})],S.prototype,"showSrLabel",2);H([a({type:String})],S.prototype,"srLabel",2);S=H([y("o-icon-button")],S);var Lo=Object.defineProperty,Po=Object.getOwnPropertyDescriptor,g=(o,t,e,n)=>{for(var i=n>1?void 0:n?Po(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&&Lo(t,e,i),i};let p=class extends u{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.showDetail=!1,this.isHidingDetail=!1,this.previousFocusedElement=null,this._onOpenDetail=async o=>{var e,n;const t=((e=o.detail)==null?void 0:e.origin)??document.activeElement;if(this._detailOriginEl=t,this._detailOriginClass=(t==null?void 0:t.className)??"",this.showDetail=!0,this.showHeaderStartIcon=!0,await this.updateComplete,this._detailOriginClass){const i=(n=this.shadowRoot)==null?void 0:n.querySelector(".detail-view");i&&i.setAttribute("fromelement",this._detailOriginClass)}this._setPriceTabindex(),await this.focusDetailReturnBtn()},this._detailOriginEl=null,this._detailOriginClass="",this.handleKeyDown=o=>{this.open&&(o.key==="Escape"?this.closePanel():o.key==="Tab"&&this.trapFocus(o))},this.handleClosePanel=o=>{if(o instanceof KeyboardEvent&&o.key!=="Enter"&&o.key!==" ")return;o.preventDefault(),o.stopPropagation();const t=o.currentTarget,e=(t==null?void 0:t.getAttribute("data-role"))==="back";if(this.showDetail&&e){this.isHidingDetail=!0;const n=this.renderRoot.querySelector(".content"),i=async()=>{this.showDetail=!1,this.isHidingDetail=!1,this.showHeaderStartIcon=!1,await this.updateComplete,this._restoreFocusToOrigin()};if(n){this.showHeaderStartIcon=!1;const r=()=>{this.showDetail=!1,this.isHidingDetail=!1,n.removeEventListener("animationend",r),i()};n.addEventListener("animationend",r)}else this.showDetail=!1,this.isHidingDetail=!1,this.showHeaderStartIcon=!1;return}this.closePanel()},this._onDetailSlotChange=o=>{const n=o.target.assignedElements({flatten:!0}).flatMap(i=>Array.from(i.querySelectorAll("img")))[0];n==null||n.setAttribute("tabindex","0")}}connectedCallback(){super.connectedCallback(),!this.disablePortal&&this.parentElement!==document.body&&document.body.appendChild(this),this.addEventListener("keydown",this.handleKeyDown),this.updateComplete.then(()=>{this.initialized=!0}),this.addEventListener("open-detail",this._onOpenDetail)}disconnectedCallback(){document.body.style.overflow="",document.body.removeAttribute("data-side-panel"),this.removeEventListener("keydown",this.handleKeyDown),super.disconnectedCallback(),this.removeEventListener("open-detail",this._onOpenDetail)}async focusDetailReturnBtn(){var n,i,r,s;await this.updateComplete;const o=this.getDeepActiveElement(document);if(o&&o!==document.body)try{o.blur()}catch{}await new Promise(requestAnimationFrame);const t=(n=this.shadowRoot)==null?void 0:n.querySelector(".detail-view .return-btn");if(!t)return;t.updateComplete&&await t.updateComplete,(s=(r=((i=t.shadowRoot)==null?void 0:i.querySelector("button"))??t)==null?void 0:r.focus)==null||s.call(r,{preventScroll:!0})}_setPriceTabindex(){var n;const o=(n=this.shadowRoot)==null?void 0:n.querySelector('slot[name="detail"]');if(!o)return;const e=o.assignedElements({flatten:!0}).flatMap(i=>Array.from(i.querySelectorAll(".m-product-price-standard")));for(const i of e)i.hasAttribute("tabindex")||i.setAttribute("tabindex","0")}_restoreFocusToOrigin(){var t,e;const o=this._detailOriginEl;!o||!document.contains(o)||((e=(t=document.activeElement)==null?void 0:t.blur)==null||e.call(t),requestAnimationFrame(()=>{var i;o.classList.add("a--tabfocus"),(((i=o.shadowRoot)==null?void 0:i.querySelector('button, .button, [tabindex]:not([tabindex="-1"])'))??null??o).focus({preventScroll:!0})}))}getDeepActiveElement(o=this.shadowRoot){let t=o.activeElement;for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}trapFocus(o){if(o.key!=="Tab")return;const t=this.getDeepActiveElement(),e=this.renderRoot.querySelector(".close-btn");if(!o.shiftKey&&e&&e.contains(t)){o.preventDefault();const n=this.renderRoot.querySelector(".o-whats-inside--content p");n==null||n.focus()}}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(p.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.removeAttribute("hidden"),this.getBoundingClientRect(),this.previousFocusedElement=document.activeElement,this.open=!0,document.body.style.overflow="hidden",document.body.setAttribute("data-side-panel","open");const o=this.renderRoot.querySelector(".panel");o&&o.setAttribute("aria-modal","true"),this.updateComplete.then(()=>{var t,e,n,i;if(this.showHeader){const r=((t=this.shadowRoot)==null?void 0:t.querySelector(".panel .close-btn"))||null,s=((e=r==null?void 0:r.shadowRoot)==null?void 0:e.querySelector("button"))||null;s&&((n=s.focus)==null||n.call(s))}else{const r=this.getFocusableElements()[0];(i=r==null?void 0:r.focus)==null||i.call(r)}}),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0}))}closePanel(){var t,e,n,i,r;this.open=!1,this.showDetail=!1,document.body.style.overflow="",document.body.removeAttribute("data-side-panel"),((t=this.previousFocusedElement)==null?void 0:t.tagName.toLowerCase())==="o-button"?(i=(n=(e=this.previousFocusedElement.shadowRoot)==null?void 0:e.querySelector(".button"))==null?void 0:n.focus)==null||i.call(n):(r=this.previousFocusedElement)==null||r.focus();const o=this.renderRoot.querySelector(".panel");o&&o.removeAttribute("aria-modal"),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}`),this.open||setTimeout(()=>{this.setAttribute("hidden","hidden")},500)}render(){const o=this.showHeader?l`
|
|
401
|
+
<div tabindex="-1" class="header">
|
|
402
|
+
${this.showHeaderStartIcon?l`
|
|
403
|
+
<o-icon-button
|
|
404
|
+
icon="arrowLeft"
|
|
405
|
+
size="small"
|
|
406
|
+
class="return-btn"
|
|
407
|
+
bgstyle="background-light"
|
|
408
|
+
data-role="back"
|
|
409
|
+
@click=${this.handleClosePanel}
|
|
410
|
+
@keydown=${this.handleClosePanel}
|
|
411
|
+
aria-label="${this.closeButtonLabel}"
|
|
412
|
+
srlabel="${this.closeButtonLabel}"
|
|
413
|
+
showsrlabel="true"
|
|
414
|
+
></o-icon-button>
|
|
415
|
+
`:null}
|
|
416
|
+
<p role="heading" aria-level="1" id="panel-title" class="${this.headerTitleClassName}">
|
|
417
|
+
${this.headerTitle}
|
|
418
|
+
</p>
|
|
419
|
+
<o-icon-button
|
|
420
|
+
icon="cross"
|
|
421
|
+
size="small"
|
|
422
|
+
class="close-btn"
|
|
423
|
+
bgstyle="background-light"
|
|
424
|
+
@click=${this.handleClosePanel}
|
|
425
|
+
@keydown=${this.handleClosePanel}
|
|
426
|
+
aria-label="${this.closeButtonLabel}"
|
|
427
|
+
aria-describedby="panel-title"
|
|
428
|
+
srlabel="${this.closeButtonLabel}"
|
|
429
|
+
showsrlabel="true"
|
|
430
|
+
></o-icon-button>
|
|
431
|
+
</div>
|
|
432
|
+
`:null;return l`
|
|
433
|
+
<div class="overlay" style="z-index: ${this.zIndex}" @click=${this.handleClosePanel}></div>
|
|
434
|
+
<div
|
|
435
|
+
class="panel"
|
|
436
|
+
role="dialog"
|
|
437
|
+
aria-modal="true"
|
|
438
|
+
aria-labelledby="panel-title"
|
|
439
|
+
style="z-index: ${this.zIndex+1}"
|
|
440
|
+
tabindex="-1"
|
|
441
|
+
>
|
|
442
|
+
<div role="document">
|
|
443
|
+
${o}
|
|
577
444
|
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
445
|
+
<div class="content ${this.isHidingDetail?"slide-out-right":""} ${this.showDetail?"with-detail":""}">
|
|
446
|
+
|
|
447
|
+
${this.showDetail?l`
|
|
448
|
+
<div class="detail-view">
|
|
449
|
+
${o}
|
|
450
|
+
<div class="detail-content">
|
|
451
|
+
<slot name="detail" @slotchange=${this._onDetailSlotChange}></slot>
|
|
452
|
+
</div>
|
|
453
|
+
</div>
|
|
454
|
+
`:l`<slot></slot>`}
|
|
455
|
+
</div>
|
|
584
456
|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
457
|
+
${this.showFooter?l`
|
|
458
|
+
<div class="footer">
|
|
459
|
+
${this.firstButtonVariant&&this.firstButtonLabel?l`
|
|
460
|
+
<o-button
|
|
461
|
+
variant="${this.firstButtonVariant}"
|
|
462
|
+
@click=${this.handleFirstClick}
|
|
463
|
+
@keydown=${this.handleFirstClick}
|
|
464
|
+
${le(this.firstButtonProps)}
|
|
465
|
+
>
|
|
466
|
+
${this.firstButtonLabel}
|
|
467
|
+
</o-button>
|
|
468
|
+
`:null}
|
|
591
469
|
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
470
|
+
${this.secondButtonVariant&&this.secondButtonLabel?l`
|
|
471
|
+
<o-button
|
|
472
|
+
variant="${this.secondButtonVariant}"
|
|
473
|
+
@click=${this.handleSecondClick}
|
|
474
|
+
@keydown=${this.handleSecondClick}
|
|
475
|
+
${le(this.secondButtonProps)}
|
|
476
|
+
>
|
|
477
|
+
${this.secondButtonLabel}
|
|
478
|
+
</o-button>
|
|
479
|
+
`:null}
|
|
480
|
+
</div>
|
|
481
|
+
`:null}
|
|
482
|
+
</div>
|
|
483
|
+
</div>
|
|
484
|
+
`}};p.styles=f`
|
|
485
|
+
:host {
|
|
486
|
+
--z-overlay: 99;
|
|
487
|
+
--z-panel: 100;
|
|
488
|
+
position: fixed;
|
|
489
|
+
top: 0;
|
|
490
|
+
right: 0;
|
|
491
|
+
height: 100%;
|
|
492
|
+
width: 100%;
|
|
493
|
+
pointer-events: none;
|
|
494
|
+
z-index: var(--z-overlay);
|
|
495
|
+
--side-panel-width: 100%;
|
|
496
|
+
--side-panel-max-width: 416px;
|
|
497
|
+
--font-size: var(--font-size-300);
|
|
498
|
+
--line-height: var(--line-height-240);
|
|
595
499
|
}
|
|
596
500
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
stroke: var(--color-content-action-primary);
|
|
601
|
-
fill: var(--color-content-action-primary);
|
|
602
|
-
}
|
|
603
|
-
}
|
|
501
|
+
/* Hide content until it is initialized */
|
|
502
|
+
:host(:not([initialized])) .content {
|
|
503
|
+
display: none;
|
|
604
504
|
}
|
|
605
505
|
|
|
606
|
-
|
|
607
|
-
|
|
506
|
+
/* hide the host completely until its initialized */
|
|
507
|
+
:host(:not([initialized])) {
|
|
508
|
+
display: none !important;
|
|
608
509
|
}
|
|
609
510
|
|
|
610
|
-
|
|
611
|
-
|
|
511
|
+
.overlay {
|
|
512
|
+
position: absolute;
|
|
513
|
+
inset: 0;
|
|
514
|
+
backdrop-filter: blur(4px);
|
|
515
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
516
|
+
opacity: 0;
|
|
517
|
+
transition: opacity 0.3s ease;
|
|
518
|
+
pointer-events: none;
|
|
519
|
+
z-index: var(--z-overlay);
|
|
612
520
|
}
|
|
613
521
|
|
|
614
|
-
.
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
&:hover:not(:disabled) {
|
|
618
|
-
background-color: var(--color-alpha-light-stronger);
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
&:active:not(:disabled) {
|
|
622
|
-
background-color: var(--color-alpha-light-strongest);
|
|
623
|
-
}
|
|
522
|
+
:host([open]) .overlay {
|
|
523
|
+
opacity: 1;
|
|
524
|
+
pointer-events: auto;
|
|
624
525
|
}
|
|
625
526
|
|
|
626
|
-
.
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
527
|
+
.panel {
|
|
528
|
+
position: absolute;
|
|
529
|
+
top: 0;
|
|
530
|
+
right: 0;
|
|
531
|
+
width: var(--side-panel-width);
|
|
532
|
+
max-width: var(--side-panel-max-width);
|
|
533
|
+
height: 100%;
|
|
534
|
+
background: white;
|
|
535
|
+
box-shadow: var(--colors-alpha-dark-60);
|
|
536
|
+
transform: translateX(100%);
|
|
537
|
+
transition: transform 0.3s ease;
|
|
538
|
+
display: flex;
|
|
539
|
+
flex-direction: column;
|
|
540
|
+
pointer-events: auto;
|
|
541
|
+
z-index: var(--z-panel);
|
|
542
|
+
}
|
|
632
543
|
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
}
|
|
544
|
+
:host([open]) .panel {
|
|
545
|
+
transform: translateX(0%);
|
|
636
546
|
}
|
|
637
547
|
|
|
638
|
-
.
|
|
639
|
-
|
|
548
|
+
.header {
|
|
549
|
+
flex: 0 0 auto;
|
|
550
|
+
display: flex;
|
|
551
|
+
justify-content: space-between;
|
|
552
|
+
padding: 20px 16px;
|
|
553
|
+
border-bottom: var(--border-050) solid var(--color-border-tertiary);
|
|
640
554
|
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
555
|
+
.panel-title {
|
|
556
|
+
font-family: var(--font-family-loccitane-serif);
|
|
557
|
+
font-size: var(--font-size);
|
|
558
|
+
font-weight: var(--font-weight-400);
|
|
559
|
+
line-height: var(--line-height);
|
|
560
|
+
font-style: italic;
|
|
561
|
+
display: -webkit-box;
|
|
562
|
+
-webkit-line-clamp: 2;
|
|
563
|
+
-webkit-box-orient: vertical;
|
|
564
|
+
height: auto;
|
|
565
|
+
margin-top: auto;
|
|
566
|
+
margin-bottom: auto;
|
|
567
|
+
overflow: hidden;
|
|
568
|
+
width: 100%;
|
|
569
|
+
color: var(--color-content-heading);
|
|
646
570
|
}
|
|
647
571
|
|
|
648
|
-
|
|
649
|
-
|
|
572
|
+
.close-btn {
|
|
573
|
+
margin-left: 8px;
|
|
574
|
+
margin-top: 0;
|
|
575
|
+
flex-direction: column;
|
|
576
|
+
justify-content: start;
|
|
650
577
|
}
|
|
651
578
|
|
|
652
|
-
|
|
653
|
-
|
|
579
|
+
.return-btn {
|
|
580
|
+
margin-right: 8px;
|
|
654
581
|
}
|
|
655
582
|
}
|
|
656
583
|
|
|
657
|
-
.
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
background-color: var(--color-alpha-light-medium);
|
|
662
|
-
}
|
|
584
|
+
.panel:focus-visible,
|
|
585
|
+
.close-btn:focus-visible {
|
|
586
|
+
${at}
|
|
587
|
+
}
|
|
663
588
|
|
|
664
|
-
|
|
665
|
-
|
|
589
|
+
.content {
|
|
590
|
+
flex: 1 1 auto;
|
|
591
|
+
overflow-y: auto;
|
|
592
|
+
overflow-x: hidden;
|
|
593
|
+
padding: var(--spacing-xl);
|
|
594
|
+
|
|
595
|
+
&.with-detail {
|
|
596
|
+
width: 100%;
|
|
597
|
+
height: 100%;
|
|
598
|
+
position: absolute;
|
|
599
|
+
top: 0;
|
|
600
|
+
left: 0;
|
|
601
|
+
background: var(--color-container-bg-white);
|
|
602
|
+
z-index: 3;
|
|
603
|
+
padding: var(--spacing-4-xs);
|
|
666
604
|
}
|
|
667
605
|
}
|
|
668
606
|
|
|
669
|
-
.
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
607
|
+
.footer {
|
|
608
|
+
flex: 0 0 auto;
|
|
609
|
+
padding: var(--spacing-xl);
|
|
610
|
+
border-top: var(--border-050) solid var(--color-border-tertiary);
|
|
611
|
+
display: flex;
|
|
612
|
+
flex-direction: column;
|
|
613
|
+
gap: var(--spacing-l);
|
|
614
|
+
justify-content: flex-start;
|
|
615
|
+
}
|
|
675
616
|
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
617
|
+
/* Mobile */
|
|
618
|
+
@media (max-width: 767px) {
|
|
619
|
+
:host {
|
|
620
|
+
--side-panel-width: 100%;
|
|
621
|
+
--side-panel-max-width: none;
|
|
679
622
|
}
|
|
680
623
|
}
|
|
681
624
|
|
|
682
|
-
|
|
683
|
-
|
|
625
|
+
/* Tablet */
|
|
626
|
+
@media (min-width: 768px) and (max-width: 1024px) {
|
|
627
|
+
:host {
|
|
628
|
+
--side-panel-width: 375px;
|
|
629
|
+
--side-panel-max-width: 375px;
|
|
630
|
+
}
|
|
684
631
|
}
|
|
685
632
|
|
|
686
|
-
|
|
687
|
-
|
|
633
|
+
@media (min-width: 1025px) {
|
|
634
|
+
:host {
|
|
635
|
+
--side-panel-width: 100%;
|
|
636
|
+
--side-panel-max-width: 416px;
|
|
637
|
+
--font-size: var(--font-size-400);
|
|
638
|
+
--line-height: var(--line-height-280);
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
@keyframes slideInRight {
|
|
643
|
+
from {
|
|
644
|
+
transform: translateX(100%);
|
|
645
|
+
}
|
|
646
|
+
to {
|
|
647
|
+
transform: translateX(0%);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
@keyframes slideOutRight {
|
|
652
|
+
from {
|
|
653
|
+
transform: translateX(0%);
|
|
654
|
+
}
|
|
655
|
+
to {
|
|
656
|
+
transform: translateX(100%);
|
|
657
|
+
}
|
|
688
658
|
}
|
|
689
|
-
`;H([a({type:String,reflect:!0})],S.prototype,"bgstyle",2);H([a({type:String,reflect:!0})],S.prototype,"size",2);H([a({type:String,reflect:!0})],S.prototype,"status",2);H([a({type:String,reflect:!0})],S.prototype,"type",2);H([a({type:String})],S.prototype,"strokewidth",2);H([a({type:String})],S.prototype,"icon",2);H([a({type:Boolean,reflect:!0})],S.prototype,"disabled",2);H([a({type:Boolean})],S.prototype,"showSrLabel",2);H([a({type:String})],S.prototype,"srLabel",2);S=H([y("o-icon-button")],S);var So=Object.defineProperty,Eo=Object.getOwnPropertyDescriptor,ot=(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&&So(t,e,i),i};let F=class extends u{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`
|
|
690
|
-
<a
|
|
691
|
-
href="${o}"
|
|
692
|
-
target="${k(this.target||void 0)}"
|
|
693
|
-
@click="${this._handleClick}"
|
|
694
|
-
>
|
|
695
|
-
${this.endIcon&&this.reverseEndIcon?l`
|
|
696
|
-
<o-icon-button
|
|
697
|
-
icon="chevronLeft"
|
|
698
|
-
bgstyle="${this.inverse?"none-light":"none-contrast"}"
|
|
699
|
-
size="xsmall"
|
|
700
|
-
aria-hidden="true"
|
|
701
|
-
type="span"
|
|
702
|
-
></o-icon-button>
|
|
703
|
-
`:null}
|
|
704
|
-
<span class="link-text"><slot></slot></span>
|
|
705
|
-
${this.endIcon&&!this.reverseEndIcon?l`
|
|
706
|
-
<o-icon-button
|
|
707
|
-
icon="chevronRight"
|
|
708
|
-
bgstyle="${this.inverse?"none-light":"none-contrast"}"
|
|
709
|
-
size="xsmall"
|
|
710
|
-
aria-hidden="true"
|
|
711
|
-
type="span"
|
|
712
|
-
></o-icon-button>
|
|
713
|
-
`:null}
|
|
714
|
-
</a>
|
|
715
|
-
`}};F.styles=f`
|
|
716
|
-
:host([template="standard"]) a {
|
|
717
|
-
color: var(--color-content-action-secondary);
|
|
718
|
-
font-size: var(--font-size-200);
|
|
719
|
-
font-weight: var(--font-weight-400);
|
|
720
|
-
line-height: var(--line-height-240);
|
|
721
|
-
letter-spacing: var(--letter-spacing-400);
|
|
722
|
-
font-family: var(--font-family-loccitane-serif);
|
|
723
|
-
}
|
|
724
659
|
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
660
|
+
.slide-out-right {
|
|
661
|
+
animation: slideOutRight 0.3s ease-in forwards;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.detail-view {
|
|
665
|
+
animation: slideInRight 0.3s ease-out both;
|
|
666
|
+
}
|
|
667
|
+
.detail-content {
|
|
668
|
+
padding: var(--spacing-xl);
|
|
669
|
+
}
|
|
670
|
+
`;p.focusablesSelector='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), o-icon-button, o-button';p.focusablesCustomElementsSelector="o-icon-button, o-button";g([a({type:Boolean,reflect:!0})],p.prototype,"open",2);g([a({type:Boolean,reflect:!0})],p.prototype,"showHeader",2);g([a({type:Boolean,reflect:!0})],p.prototype,"showFooter",2);g([a({type:Boolean,reflect:!0})],p.prototype,"showHeaderStartIcon",2);g([a({type:String,reflect:!0})],p.prototype,"headerTitle",2);g([a({type:String,reflect:!0})],p.prototype,"headerTitleClassName",2);g([a({type:String,reflect:!0})],p.prototype,"closeButtonLabel",2);g([a({type:String,reflect:!0})],p.prototype,"firstButtonLabel",2);g([a({type:String,reflect:!0})],p.prototype,"firstButtonVariant",2);g([a({type:Object,reflect:!0})],p.prototype,"firstButtonProps",2);g([a({type:Boolean,reflect:!0})],p.prototype,"onFirstButtonClickClose",2);g([a({type:String,reflect:!0})],p.prototype,"secondButtonLabel",2);g([a({type:String,reflect:!0})],p.prototype,"secondButtonVariant",2);g([a({type:Object,reflect:!0})],p.prototype,"secondButtonProps",2);g([a({type:Boolean,reflect:!0})],p.prototype,"onSecondButtonClickClose",2);g([a({type:Boolean,reflect:!0})],p.prototype,"disablePortal",2);g([a({type:Number,reflect:!0})],p.prototype,"zIndex",2);g([a({type:Boolean,reflect:!0})],p.prototype,"initialized",2);g([a({type:Boolean})],p.prototype,"showDetail",2);g([a({type:Boolean})],p.prototype,"isHidingDetail",2);p=g([y("o-side-panel")],p);var Io=Object.defineProperty,Oo=Object.getOwnPropertyDescriptor,x=(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&&Io(t,e,i),i};const zo=Ft(u);let b=class extends zo{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,this.withbadge=!1}get name(){return this.getAttribute("name")??""}set name(o){this.setAttribute("name",o)}get form(){return this[Nt].form}handleClick(o){if(!(o instanceof KeyboardEvent&&!["Enter"," "].includes(o.key))&&this.panelTarget){const t=document.getElementById(this.panelTarget);t instanceof p&&(t!=null&&t.openPanel)&&typeof t.openPanel=="function"?(o.preventDefault(),t.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=N[t].replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return l`<span class="${o==="start"?"icon-start":"icon-end"}">${C(e)}</span>`}renderButton(){const o=this.text||this.textsecond;return l`
|
|
671
|
+
<button type=${this.type} class="button" ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}>
|
|
672
|
+
${this.startIcon?this.renderIcon("start"):d}
|
|
673
|
+
${o?l`
|
|
674
|
+
${this.text?l`<span class="text">${this.text}</span>`:d}
|
|
675
|
+
${this.textsecond?l`<span class="text">${this.textsecond}</span>`:d}
|
|
676
|
+
${this.withbadge?l`<slot></slot>`:d}
|
|
677
|
+
`:l`<slot></slot>`}
|
|
678
|
+
${this.endIcon?this.renderIcon("end"):d}
|
|
679
|
+
</button>
|
|
680
|
+
`}renderLink(){const o=this.text||this.textsecond;return l`
|
|
681
|
+
<a
|
|
682
|
+
href=${this.href}
|
|
683
|
+
target=${this.target||d}
|
|
684
|
+
class="button"
|
|
685
|
+
?disabled=${this.disabled}
|
|
686
|
+
role="button"
|
|
687
|
+
@click=${this.handleClick}
|
|
688
|
+
@keydown=${this.handleClick}
|
|
689
|
+
aria-describedby=${this.getAttribute("aria-describedby")||d}
|
|
690
|
+
>
|
|
691
|
+
${this.startIcon?this.renderIcon("start"):d}
|
|
692
|
+
${o?l`
|
|
693
|
+
${this.text?l`<span>${this.text}</span>`:d}
|
|
694
|
+
${this.textsecond?l`<span>${this.textsecond}</span>`:d}
|
|
695
|
+
`:l`<slot></slot>`}
|
|
696
|
+
${this.endIcon?this.renderIcon("end"):d}
|
|
697
|
+
</a>
|
|
698
|
+
`}};Re(b);b.formAssociated=!0;b.styles=f`
|
|
699
|
+
:host {
|
|
700
|
+
--button-border: transparent;
|
|
701
|
+
--badge-outer-width: 19px;
|
|
702
|
+
cursor: pointer;
|
|
703
|
+
display: inline-flex;
|
|
704
|
+
}
|
|
733
705
|
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
font-weight: var(--font-weight-500);
|
|
738
|
-
line-height: var(--line-height-160);
|
|
739
|
-
letter-spacing: var(--letter-spacing-400);
|
|
740
|
-
font-family: var(--font-family-loccitane-sans);
|
|
741
|
-
text-transform: uppercase;
|
|
742
|
-
}
|
|
706
|
+
:host(.a--tabfocus) {
|
|
707
|
+
outline: none !important;
|
|
708
|
+
}
|
|
743
709
|
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
710
|
+
:host([fullwidth]) {
|
|
711
|
+
width: 100%;
|
|
712
|
+
}
|
|
747
713
|
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
714
|
+
:host([variant="primary"]) {
|
|
715
|
+
--button-bg: var(--color-container-action-primary-default);
|
|
716
|
+
--button-bg-hover: var(--color-container-action-primary-hover);
|
|
717
|
+
--button-bg-pressed: var(--color-container-action-primary-pressed);
|
|
718
|
+
--button-text: var(--color-content-action-primary);
|
|
719
|
+
--button-text-hover: var(--color-content-action-primary);
|
|
720
|
+
--button-border: transparent;
|
|
721
|
+
--button-border-width: var(--border-m);
|
|
722
|
+
--button-padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
|
|
723
|
+
--button-starticon-svg-width: 0px; /* No starticon SVG for primary button */
|
|
724
|
+
--button-endicon-svg-width: 0px; /* No endicon SVG for primary button */
|
|
725
|
+
}
|
|
752
726
|
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
727
|
+
:host([variant="secondary"]) {
|
|
728
|
+
--button-bg: var(--color-container-action-secondary-default);
|
|
729
|
+
--button-bg-hover: var(--color-container-action-secondary-hover);
|
|
730
|
+
--button-bg-pressed: var(--color-container-action-secondary-pressed);
|
|
731
|
+
--button-text: var(--color-content-action-secondary);
|
|
732
|
+
--button-text-hover: var(--color-content-action-secondary);
|
|
733
|
+
--button-border: var(--color-border-secondary);
|
|
734
|
+
--button-border-width: var(--border-m);
|
|
735
|
+
--button-padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
|
|
736
|
+
--button-starticon-svg-width: 16px;
|
|
737
|
+
--button-endicon-svg-width: 0px; /* No endicon SVG for secondary button */
|
|
738
|
+
}
|
|
757
739
|
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
740
|
+
:host([variant="ghost"]) {
|
|
741
|
+
--button-bg: transparent;
|
|
742
|
+
--button-bg-hover: var(--color-alpha-dark-lightest);
|
|
743
|
+
--button-bg-pressed: var(--color-alpha-dark-lighter);
|
|
744
|
+
--button-text: var(--color-content-action-secondary);
|
|
745
|
+
--button-text-hover: var(--color-content-action-secondary);
|
|
746
|
+
--button-border-width: 0;
|
|
747
|
+
--button-padding: var(--spacing-m, 10px) var(--spacing-xl, 16px);
|
|
748
|
+
--button-starticon-svg-width: 16px;
|
|
749
|
+
--button-endicon-svg-width: 12px;
|
|
750
|
+
}
|
|
765
751
|
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
752
|
+
:host([variant="tertiary"]) {
|
|
753
|
+
--button-bg: var(--color-container-action-tertiary-default);
|
|
754
|
+
--button-bg-hover: var(--color-container-action-tertiary-hover);
|
|
755
|
+
--button-bg-pressed: var(--color-container-action-tertiary-pressed);
|
|
756
|
+
--button-text: var(--color-content-body);
|
|
757
|
+
--button-text-hover: var(--color-content-action-tertiary);
|
|
758
|
+
--button-border-width: 0;
|
|
759
|
+
--button-padding: var(--spacing-m, 10px) var(--spacing-l, 12px);
|
|
760
|
+
--button-starticon-svg-width: 0px; /* No starticon SVG for tertiary button */
|
|
761
|
+
--button-endicon-svg-width: 8px;
|
|
762
|
+
}
|
|
772
763
|
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
764
|
+
:host([disabled]),
|
|
765
|
+
:host([aria-disabled="true"]),
|
|
766
|
+
:host([aria-disabled="true"]:hover) {
|
|
767
|
+
--button-bg: var(--color-container-disabled);
|
|
768
|
+
--button-text: var(--color-content-disabled);
|
|
769
|
+
--button-border: transparent;
|
|
770
|
+
}
|
|
778
771
|
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
}
|
|
772
|
+
:host([disabled][variant="secondary"]) {
|
|
773
|
+
--button-border: var(--color-border-secondary);
|
|
774
|
+
}
|
|
783
775
|
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
776
|
+
.button {
|
|
777
|
+
display: inline-flex;
|
|
778
|
+
align-items: center;
|
|
779
|
+
justify-content: center;
|
|
780
|
+
width: 100%;
|
|
781
|
+
gap: var(--spacing-s, 8px);
|
|
782
|
+
height: 100%;
|
|
783
|
+
background-color: var(--button-bg);
|
|
784
|
+
color: var(--button-text);
|
|
785
|
+
border: var(--button-border-width, var(--border-m)) solid var(--button-border);
|
|
786
|
+
border-radius: var(--radius-m);
|
|
787
|
+
font-family: var(--font-family-loccitane-sans);
|
|
788
|
+
font-size: var(--font-size-150);
|
|
789
|
+
font-weight: var(--font-weight-400);
|
|
790
|
+
line-height: var(--line-height-200);
|
|
791
|
+
min-width: 64px;
|
|
792
|
+
padding: var(--button-padding);
|
|
793
|
+
text-decoration: none;
|
|
794
|
+
cursor: inherit;
|
|
795
|
+
box-sizing: border-box;
|
|
796
796
|
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
<div class="stars">
|
|
805
|
-
${o.map(t=>l`<span class="star">${C(N[t]??"")}</span>`)}
|
|
806
|
-
</div>
|
|
807
|
-
${this.reviewCount!=null&&this.href!=null?l`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>`:null}
|
|
808
|
-
</div>
|
|
809
|
-
`}};st.styles=f`
|
|
810
|
-
svg {
|
|
811
|
-
width: 12px;
|
|
812
|
-
height: 12px;
|
|
813
|
-
}
|
|
814
|
-
.rating {
|
|
815
|
-
display: flex;
|
|
816
|
-
align-items: center;
|
|
817
|
-
}
|
|
797
|
+
span {
|
|
798
|
+
font-family: var(--font-family-loccitane-sans);
|
|
799
|
+
font-size: var(--font-size-150);
|
|
800
|
+
font-weight: var(--font-weight-400);
|
|
801
|
+
line-height: var(--line-height-200);
|
|
802
|
+
}
|
|
803
|
+
}
|
|
818
804
|
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
805
|
+
.button:hover:not([disabled]) {
|
|
806
|
+
background-color: var(--button-bg-hover);
|
|
807
|
+
color: var(--button-text-hover);
|
|
808
|
+
}
|
|
823
809
|
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
810
|
+
.button:active:not([disabled]) {
|
|
811
|
+
background-color: var(--button-bg-pressed);
|
|
812
|
+
}
|
|
827
813
|
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
font-weight: var(--font-weight-500);
|
|
832
|
-
font-size: var(--font-size-100);
|
|
833
|
-
line-height: var(--line-height-160);
|
|
834
|
-
letter-spacing: var(--letter-spacing-400);
|
|
835
|
-
color: var(--color-content-action-secondary);
|
|
836
|
-
}
|
|
814
|
+
.button:focus-visible {
|
|
815
|
+
${at};
|
|
816
|
+
}
|
|
837
817
|
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
`;At([a({type:Number})],st.prototype,"rating",2);At([a({type:String})],st.prototype,"reviewCount",2);At([a({type:String})],st.prototype,"href",2);st=At([y("o-rating")],st);/**
|
|
843
|
-
* @license
|
|
844
|
-
* Copyright 2020 Google LLC
|
|
845
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
846
|
-
*/const Po=o=>o.strings===void 0;/**
|
|
847
|
-
* @license
|
|
848
|
-
* Copyright 2017 Google LLC
|
|
849
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
850
|
-
*/const dt=(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),dt(i,t);return!0},kt=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)},be=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),zo(t)}};function Io(o){this._$AN!==void 0?(kt(this),this._$AM=o,be(this)):this._$AM=o}function Oo(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++)dt(n[r],!1),kt(n[r]);else n!=null&&(dt(n,!1),kt(n));else dt(this,o)}const zo=o=>{o.type==Ut.CHILD&&(o._$AP??(o._$AP=Oo),o._$AQ??(o._$AQ=Io))};class Bo extends qt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,n){super._$AT(t,e,n),be(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&&(dt(this,t),kt(this))}setValue(t){if(Po(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 Do extends Bo{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 Ho extends Do{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 Mo extends Ho{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 le=Vt(Mo);var To=Object.defineProperty,jo=Object.getOwnPropertyDescriptor,g=(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 p=class extends u{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.showDetail=!1,this.isHidingDetail=!1,this.previousFocusedElement=null,this._onOpenDetail=async o=>{var e,n;const t=((e=o.detail)==null?void 0:e.origin)??document.activeElement;if(this._detailOriginEl=t,this._detailOriginClass=(t==null?void 0:t.className)??"",this.showDetail=!0,this.showHeaderStartIcon=!0,await this.updateComplete,this._detailOriginClass){const i=(n=this.shadowRoot)==null?void 0:n.querySelector(".detail-view");i&&i.setAttribute("fromelement",this._detailOriginClass)}this._setPriceTabindex(),await this.focusDetailReturnBtn()},this._detailOriginEl=null,this._detailOriginClass="",this.handleKeyDown=o=>{this.open&&(o.key==="Escape"?this.closePanel():o.key==="Tab"&&this.trapFocus(o))},this.handleClosePanel=o=>{if(o instanceof KeyboardEvent&&o.key!=="Enter"&&o.key!==" ")return;o.preventDefault(),o.stopPropagation();const t=o.currentTarget,e=(t==null?void 0:t.getAttribute("data-role"))==="back";if(this.showDetail&&e){this.isHidingDetail=!0;const n=this.renderRoot.querySelector(".content"),i=async()=>{this.showDetail=!1,this.isHidingDetail=!1,this.showHeaderStartIcon=!1,await this.updateComplete,this._restoreFocusToOrigin()};if(n){this.showHeaderStartIcon=!1;const r=()=>{this.showDetail=!1,this.isHidingDetail=!1,n.removeEventListener("animationend",r),i()};n.addEventListener("animationend",r)}else this.showDetail=!1,this.isHidingDetail=!1,this.showHeaderStartIcon=!1;return}this.closePanel()},this._onDetailSlotChange=o=>{const n=o.target.assignedElements({flatten:!0}).flatMap(i=>Array.from(i.querySelectorAll("img")))[0];n==null||n.setAttribute("tabindex","0")}}connectedCallback(){super.connectedCallback(),!this.disablePortal&&this.parentElement!==document.body&&document.body.appendChild(this),this.addEventListener("keydown",this.handleKeyDown),this.updateComplete.then(()=>{this.initialized=!0}),this.addEventListener("open-detail",this._onOpenDetail)}disconnectedCallback(){document.body.style.overflow="",document.body.removeAttribute("data-side-panel"),this.removeEventListener("keydown",this.handleKeyDown),super.disconnectedCallback(),this.removeEventListener("open-detail",this._onOpenDetail)}async focusDetailReturnBtn(){var n,i,r,s;await this.updateComplete;const o=this.getDeepActiveElement(document);if(o&&o!==document.body)try{o.blur()}catch{}await new Promise(requestAnimationFrame);const t=(n=this.shadowRoot)==null?void 0:n.querySelector(".detail-view .return-btn");if(!t)return;t.updateComplete&&await t.updateComplete,(s=(r=((i=t.shadowRoot)==null?void 0:i.querySelector("button"))??t)==null?void 0:r.focus)==null||s.call(r,{preventScroll:!0})}_setPriceTabindex(){var n;const o=(n=this.shadowRoot)==null?void 0:n.querySelector('slot[name="detail"]');if(!o)return;const e=o.assignedElements({flatten:!0}).flatMap(i=>Array.from(i.querySelectorAll(".m-product-price-standard")));for(const i of e)i.hasAttribute("tabindex")||i.setAttribute("tabindex","0")}_restoreFocusToOrigin(){var t,e;const o=this._detailOriginEl;!o||!document.contains(o)||((e=(t=document.activeElement)==null?void 0:t.blur)==null||e.call(t),requestAnimationFrame(()=>{var i;o.classList.add("a--tabfocus"),(((i=o.shadowRoot)==null?void 0:i.querySelector('button, .button, [tabindex]:not([tabindex="-1"])'))??null??o).focus({preventScroll:!0})}))}getDeepActiveElement(o=this.shadowRoot){let t=o.activeElement;for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}trapFocus(o){if(o.key!=="Tab")return;const t=this.getDeepActiveElement(),e=this.renderRoot.querySelector(".close-btn");if(!o.shiftKey&&e&&e.contains(t)){o.preventDefault();const n=this.renderRoot.querySelector(".o-whats-inside--content p");n==null||n.focus()}}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(p.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.removeAttribute("hidden"),this.getBoundingClientRect(),this.previousFocusedElement=document.activeElement,this.open=!0,document.body.style.overflow="hidden",document.body.setAttribute("data-side-panel","open");const o=this.renderRoot.querySelector(".panel");o&&o.setAttribute("aria-modal","true"),this.updateComplete.then(()=>{var t,e,n,i;if(this.showHeader){const r=((t=this.shadowRoot)==null?void 0:t.querySelector(".panel .close-btn"))||null,s=((e=r==null?void 0:r.shadowRoot)==null?void 0:e.querySelector("button"))||null;s&&((n=s.focus)==null||n.call(s))}else{const r=this.getFocusableElements()[0];(i=r==null?void 0:r.focus)==null||i.call(r)}}),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0}))}closePanel(){var t,e,n,i,r;this.open=!1,this.showDetail=!1,document.body.style.overflow="",document.body.removeAttribute("data-side-panel"),((t=this.previousFocusedElement)==null?void 0:t.tagName.toLowerCase())==="o-button"?(i=(n=(e=this.previousFocusedElement.shadowRoot)==null?void 0:e.querySelector(".button"))==null?void 0:n.focus)==null||i.call(n):(r=this.previousFocusedElement)==null||r.focus();const o=this.renderRoot.querySelector(".panel");o&&o.removeAttribute("aria-modal"),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}`),this.open||setTimeout(()=>{this.setAttribute("hidden","hidden")},500)}render(){const o=this.showHeader?l`
|
|
851
|
-
<div tabindex="-1" class="header">
|
|
852
|
-
${this.showHeaderStartIcon?l`
|
|
853
|
-
<o-icon-button
|
|
854
|
-
icon="arrowLeft"
|
|
855
|
-
size="small"
|
|
856
|
-
class="return-btn"
|
|
857
|
-
bgstyle="background-light"
|
|
858
|
-
data-role="back"
|
|
859
|
-
@click=${this.handleClosePanel}
|
|
860
|
-
@keydown=${this.handleClosePanel}
|
|
861
|
-
aria-label="${this.closeButtonLabel}"
|
|
862
|
-
srlabel="${this.closeButtonLabel}"
|
|
863
|
-
showsrlabel="true"
|
|
864
|
-
></o-icon-button>
|
|
865
|
-
`:null}
|
|
866
|
-
<p role="heading" aria-level="1" id="panel-title" class="${this.headerTitleClassName}">
|
|
867
|
-
${this.headerTitle}
|
|
868
|
-
</p>
|
|
869
|
-
<o-icon-button
|
|
870
|
-
icon="cross"
|
|
871
|
-
size="small"
|
|
872
|
-
class="close-btn"
|
|
873
|
-
bgstyle="background-light"
|
|
874
|
-
@click=${this.handleClosePanel}
|
|
875
|
-
@keydown=${this.handleClosePanel}
|
|
876
|
-
aria-label="${this.closeButtonLabel}"
|
|
877
|
-
aria-describedby="panel-title"
|
|
878
|
-
srlabel="${this.closeButtonLabel}"
|
|
879
|
-
showsrlabel="true"
|
|
880
|
-
></o-icon-button>
|
|
881
|
-
</div>
|
|
882
|
-
`:null;return l`
|
|
883
|
-
<div class="overlay" style="z-index: ${this.zIndex}" @click=${this.handleClosePanel}></div>
|
|
884
|
-
<div
|
|
885
|
-
class="panel"
|
|
886
|
-
role="dialog"
|
|
887
|
-
aria-modal="true"
|
|
888
|
-
aria-labelledby="panel-title"
|
|
889
|
-
style="z-index: ${this.zIndex+1}"
|
|
890
|
-
tabindex="-1"
|
|
891
|
-
>
|
|
892
|
-
<div role="document">
|
|
893
|
-
${o}
|
|
818
|
+
span.text + span.text::before {
|
|
819
|
+
content: "•";
|
|
820
|
+
margin-right: 8px;
|
|
821
|
+
}
|
|
894
822
|
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
${o}
|
|
900
|
-
<div class="detail-content">
|
|
901
|
-
<slot name="detail" @slotchange=${this._onDetailSlotChange}></slot>
|
|
902
|
-
</div>
|
|
903
|
-
</div>
|
|
904
|
-
`:l`<slot></slot>`}
|
|
905
|
-
</div>
|
|
823
|
+
.icon-start,
|
|
824
|
+
.icon-end {
|
|
825
|
+
display: inline-flex;
|
|
826
|
+
align-items: center;
|
|
906
827
|
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
828
|
+
svg {
|
|
829
|
+
max-height: 20px;
|
|
830
|
+
}
|
|
831
|
+
svg[x] {
|
|
832
|
+
width: 15px;
|
|
833
|
+
}
|
|
834
|
+
path[fill],
|
|
835
|
+
path[class] {
|
|
836
|
+
fill: var(--button-text) !important;
|
|
837
|
+
}
|
|
838
|
+
path[stroke] {
|
|
839
|
+
stroke: var(--button-text) !important;
|
|
840
|
+
}
|
|
841
|
+
}
|
|
919
842
|
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
@click=${this.handleSecondClick}
|
|
924
|
-
@keydown=${this.handleSecondClick}
|
|
925
|
-
${le(this.secondButtonProps)}
|
|
926
|
-
>
|
|
927
|
-
${this.secondButtonLabel}
|
|
928
|
-
</o-button>
|
|
929
|
-
`:null}
|
|
930
|
-
</div>
|
|
931
|
-
`:null}
|
|
932
|
-
</div>
|
|
933
|
-
</div>
|
|
934
|
-
`}};p.styles=f`
|
|
935
|
-
:host {
|
|
936
|
-
--z-overlay: 99;
|
|
937
|
-
--z-panel: 100;
|
|
938
|
-
position: fixed;
|
|
939
|
-
top: 0;
|
|
940
|
-
right: 0;
|
|
941
|
-
height: 100%;
|
|
942
|
-
width: 100%;
|
|
943
|
-
pointer-events: none;
|
|
944
|
-
z-index: var(--z-overlay);
|
|
945
|
-
--side-panel-width: 100%;
|
|
946
|
-
--side-panel-max-width: 416px;
|
|
947
|
-
--font-size: var(--font-size-300);
|
|
948
|
-
--line-height: var(--line-height-240);
|
|
949
|
-
}
|
|
843
|
+
:host([variant="tertiary"][fullwidth][endIcon]) .button {
|
|
844
|
+
justify-content: space-between;
|
|
845
|
+
}
|
|
950
846
|
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
847
|
+
.button span {
|
|
848
|
+
display: inline-flex;
|
|
849
|
+
align-items: center;
|
|
850
|
+
}
|
|
955
851
|
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
852
|
+
.button slot {
|
|
853
|
+
display: inline-flex;
|
|
854
|
+
align-items: center;
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
:host([variant="tertiary"][endIcon]) .button .icon-end {
|
|
858
|
+
width: var(--button-endicon-svg-width, 8px);
|
|
859
|
+
}
|
|
960
860
|
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
background-color: rgba(0, 0, 0, 0.3);
|
|
966
|
-
opacity: 0;
|
|
967
|
-
transition: opacity 0.3s ease;
|
|
968
|
-
pointer-events: none;
|
|
969
|
-
z-index: var(--z-overlay);
|
|
970
|
-
}
|
|
861
|
+
:host([underlined]) span:not([class*="icon-"]),
|
|
862
|
+
:host([underlined]) .text,
|
|
863
|
+
:host([underlined]:not([text])) .button slot {
|
|
864
|
+
position: relative;
|
|
971
865
|
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
866
|
+
&::after {
|
|
867
|
+
content: "";
|
|
868
|
+
display: block;
|
|
869
|
+
position: absolute;
|
|
870
|
+
bottom: 0;
|
|
871
|
+
left: 0;
|
|
872
|
+
width: 100%;
|
|
873
|
+
border-bottom: var(--border-M, 1px) solid var(--button-text);
|
|
874
|
+
}
|
|
875
|
+
}
|
|
976
876
|
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
width: var(--side-panel-width);
|
|
982
|
-
max-width: var(--side-panel-max-width);
|
|
983
|
-
height: 100%;
|
|
984
|
-
background: white;
|
|
985
|
-
box-shadow: var(--colors-alpha-dark-60);
|
|
986
|
-
transform: translateX(100%);
|
|
987
|
-
transition: transform 0.3s ease;
|
|
988
|
-
display: flex;
|
|
989
|
-
flex-direction: column;
|
|
990
|
-
pointer-events: auto;
|
|
991
|
-
z-index: var(--z-panel);
|
|
992
|
-
}
|
|
877
|
+
:host([underlined]:not([text])) .button slot {
|
|
878
|
+
display: inline-flex;
|
|
879
|
+
gap: 8px;
|
|
880
|
+
}
|
|
993
881
|
|
|
994
|
-
|
|
995
|
-
|
|
882
|
+
:host([underlined][withbadge]:not([text])) .button slot {
|
|
883
|
+
&::after {
|
|
884
|
+
width: calc(100% - var(--badge-outer-width, 19px) - var(--spacing-s, 8px))
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
//Icon movement on hover
|
|
889
|
+
:host([variant="tertiary"][endIcon]) .icon-end {
|
|
890
|
+
display: inline-flex;
|
|
891
|
+
align-items: center;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
:host([variant="tertiary"][endIcon]:hover) .icon-end {
|
|
895
|
+
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
896
|
+
transform: translateX(4px);
|
|
897
|
+
}
|
|
898
|
+
//End icon movment on hover
|
|
899
|
+
`;x([a()],b.prototype,"type",2);x([a()],b.prototype,"value",2);x([a({type:String,reflect:!0})],b.prototype,"variant",2);x([a({type:String})],b.prototype,"text",2);x([a({type:String})],b.prototype,"textsecond",2);x([a({type:Boolean,reflect:!0})],b.prototype,"fullwidth",2);x([a({type:Boolean,reflect:!0})],b.prototype,"disabled",2);x([a({type:String})],b.prototype,"startIconModel",2);x([a({type:String})],b.prototype,"endIconModel",2);x([a({type:Boolean,reflect:!0,attribute:"starticon"})],b.prototype,"startIcon",2);x([a({type:Boolean,reflect:!0,attribute:"endicon"})],b.prototype,"endIcon",2);x([a({type:String,attribute:"paneltarget"})],b.prototype,"panelTarget",2);x([a({type:String})],b.prototype,"href",2);x([a({type:String})],b.prototype,"target",2);x([a({type:Boolean,reflect:!0})],b.prototype,"underlined",2);x([a({type:Boolean,reflect:!0})],b.prototype,"withbadge",2);b=x([y("o-button")],b);var Bo=Object.defineProperty,Do=Object.getOwnPropertyDescriptor,At=(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&&Bo(t,e,i),i};let rt=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("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=N.wishlist.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return l`
|
|
900
|
+
<button type="button" aria-describedby="${this.ariaDescribedBy}" class="wishlist-button">
|
|
901
|
+
<span class="sr-only">${this.label}</span>
|
|
902
|
+
${C(o)}
|
|
903
|
+
</button>
|
|
904
|
+
`}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()}};rt.styles=f`
|
|
905
|
+
:host {
|
|
906
|
+
display: inline-flex;
|
|
907
|
+
justify-content: center;
|
|
908
|
+
align-items: center;
|
|
909
|
+
outline: none !important;
|
|
996
910
|
}
|
|
997
911
|
|
|
998
|
-
.
|
|
999
|
-
flex: 0 0 auto;
|
|
912
|
+
.wishlist-button {
|
|
1000
913
|
display: flex;
|
|
1001
|
-
justify-content:
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
display: -webkit-box;
|
|
1012
|
-
-webkit-line-clamp: 2;
|
|
1013
|
-
-webkit-box-orient: vertical;
|
|
1014
|
-
height: auto;
|
|
1015
|
-
margin-top: auto;
|
|
1016
|
-
margin-bottom: auto;
|
|
1017
|
-
overflow: hidden;
|
|
1018
|
-
width: 100%;
|
|
1019
|
-
color: var(--color-content-heading);
|
|
1020
|
-
}
|
|
914
|
+
justify-content: center;
|
|
915
|
+
align-items: center;
|
|
916
|
+
width: 40px;
|
|
917
|
+
height: 40px;
|
|
918
|
+
border: transparent;
|
|
919
|
+
border-radius: var(--radius-full);
|
|
920
|
+
background-color: var(--color-alpha-light-strong);
|
|
921
|
+
position: relative;
|
|
922
|
+
cursor: pointer;
|
|
923
|
+
}
|
|
1021
924
|
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
flex-direction: column;
|
|
1026
|
-
justify-content: start;
|
|
1027
|
-
}
|
|
925
|
+
.wishlist-button:hover {
|
|
926
|
+
background-color: var(--color-alpha-light-stronger);
|
|
927
|
+
}
|
|
1028
928
|
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
}
|
|
929
|
+
.wishlist-button:active {
|
|
930
|
+
background-color: var(--color-alpha-light-strongest);
|
|
1032
931
|
}
|
|
1033
932
|
|
|
1034
|
-
.
|
|
1035
|
-
|
|
1036
|
-
${at}
|
|
933
|
+
.wishlist-button:focus-visible {
|
|
934
|
+
${at};
|
|
1037
935
|
}
|
|
1038
936
|
|
|
1039
|
-
.
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
overflow-x: hidden;
|
|
1043
|
-
padding: var(--spacing-xl);
|
|
937
|
+
.wishlist-button:hover svg path {
|
|
938
|
+
fill: var(--color-content-action-secondary);
|
|
939
|
+
}
|
|
1044
940
|
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
height: 100%;
|
|
1048
|
-
position: absolute;
|
|
1049
|
-
top: 0;
|
|
1050
|
-
left: 0;
|
|
1051
|
-
background: var(--color-container-bg-white);
|
|
1052
|
-
z-index: 3;
|
|
1053
|
-
padding: var(--spacing-4-xs);
|
|
1054
|
-
}
|
|
941
|
+
:host([status="filled"]) .wishlist-button svg path {
|
|
942
|
+
fill: var(--color-content-action-secondary);
|
|
1055
943
|
}
|
|
1056
944
|
|
|
1057
|
-
.
|
|
1058
|
-
|
|
1059
|
-
padding: var(--spacing-xl);
|
|
1060
|
-
border-top: var(--border-050) solid var(--color-border-tertiary);
|
|
1061
|
-
display: flex;
|
|
1062
|
-
flex-direction: column;
|
|
1063
|
-
gap: var(--spacing-l);
|
|
1064
|
-
justify-content: flex-start;
|
|
945
|
+
:host([status="empty"]) .wishlist-button svg path {
|
|
946
|
+
fill: var(--color-alpha-light-strong);
|
|
1065
947
|
}
|
|
1066
948
|
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
--side-panel-width: 100%;
|
|
1071
|
-
--side-panel-max-width: none;
|
|
949
|
+
@media (hover: hover) and (pointer: fine) {
|
|
950
|
+
:host([status="empty"]) .wishlist-button:hover svg path {
|
|
951
|
+
fill: var(--color-content-action-secondary);
|
|
1072
952
|
}
|
|
1073
953
|
}
|
|
1074
954
|
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
:
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
955
|
+
.sr-only {
|
|
956
|
+
border: 0 !important;
|
|
957
|
+
clip: rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;
|
|
958
|
+
-webkit-clip-path: inset(50%) !important;
|
|
959
|
+
clip-path: inset(50%) !important;
|
|
960
|
+
height: 0.1rem !important;
|
|
961
|
+
margin: -0.1rem !important;
|
|
962
|
+
overflow: hidden !important;
|
|
963
|
+
padding: 0 !important;
|
|
964
|
+
position: absolute !important;
|
|
965
|
+
width: 0.1rem !important;
|
|
966
|
+
white-space: nowrap !important;
|
|
1081
967
|
}
|
|
968
|
+
`;At([a({type:String,reflect:!0})],rt.prototype,"status",2);At([a({type:String,reflect:!0})],rt.prototype,"ariaDescribedBy",2);At([a({type:String,reflect:!0})],rt.prototype,"label",2);rt=At([y("o-wishlist-button")],rt);var Ho=Object.defineProperty,Mo=Object.getOwnPropertyDescriptor,ot=(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&&Ho(t,e,i),i};let F=class extends u{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`
|
|
969
|
+
<a
|
|
970
|
+
href="${o}"
|
|
971
|
+
target="${k(this.target||void 0)}"
|
|
972
|
+
@click="${this._handleClick}"
|
|
973
|
+
>
|
|
974
|
+
${this.endIcon&&this.reverseEndIcon?l`
|
|
975
|
+
<o-icon-button
|
|
976
|
+
icon="chevronLeft"
|
|
977
|
+
bgstyle="${this.inverse?"none-light":"none-contrast"}"
|
|
978
|
+
size="xsmall"
|
|
979
|
+
aria-hidden="true"
|
|
980
|
+
type="span"
|
|
981
|
+
></o-icon-button>
|
|
982
|
+
`:null}
|
|
983
|
+
<span class="link-text"><slot></slot></span>
|
|
984
|
+
${this.endIcon&&!this.reverseEndIcon?l`
|
|
985
|
+
<o-icon-button
|
|
986
|
+
icon="chevronRight"
|
|
987
|
+
bgstyle="${this.inverse?"none-light":"none-contrast"}"
|
|
988
|
+
size="xsmall"
|
|
989
|
+
aria-hidden="true"
|
|
990
|
+
type="span"
|
|
991
|
+
></o-icon-button>
|
|
992
|
+
`:null}
|
|
993
|
+
</a>
|
|
994
|
+
`}};F.styles=f`
|
|
995
|
+
:host([template="standard"]) a {
|
|
996
|
+
color: var(--color-content-action-secondary);
|
|
997
|
+
font-size: var(--font-size-200);
|
|
998
|
+
font-weight: var(--font-weight-400);
|
|
999
|
+
line-height: var(--line-height-240);
|
|
1000
|
+
letter-spacing: var(--letter-spacing-400);
|
|
1001
|
+
font-family: var(--font-family-loccitane-serif);
|
|
1002
|
+
}
|
|
1082
1003
|
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1004
|
+
:host([template="discret"]) a {
|
|
1005
|
+
color: var(--color-content-action-secondary);
|
|
1006
|
+
font-size: var(--font-size-100);
|
|
1007
|
+
font-weight: var(--font-weight-400);
|
|
1008
|
+
line-height: var(--line-height-160);
|
|
1009
|
+
letter-spacing: var(--letter-spacing-400);
|
|
1010
|
+
font-family: var(--font-family-loccitane-sans);
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
:host([template="review"]) a {
|
|
1014
|
+
color: var(--color-content-action-secondary);
|
|
1015
|
+
font-size: var(--font-size-100);
|
|
1016
|
+
font-weight: var(--font-weight-500);
|
|
1017
|
+
line-height: var(--line-height-160);
|
|
1018
|
+
letter-spacing: var(--letter-spacing-400);
|
|
1019
|
+
font-family: var(--font-family-loccitane-sans);
|
|
1020
|
+
text-transform: uppercase;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
:host([inverse]) a {
|
|
1024
|
+
color: var(--color-container-action-tertiary-default);
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
:host([endIcon]) a o-icon-button {
|
|
1028
|
+
margin-left: 2px;
|
|
1029
|
+
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
:host([endIcon][reverseEndIcon]) a o-icon-button {
|
|
1033
|
+
margin-right: 2px;
|
|
1034
|
+
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
:host([endIcon]) a {
|
|
1038
|
+
&:hover {
|
|
1039
|
+
o-icon-button {
|
|
1040
|
+
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1041
|
+
:host(:not([reverseEndIcon])) & {
|
|
1042
|
+
transform: translateX(4px);
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
:host([reverseEndIcon]) & {
|
|
1046
|
+
transform: translateX(-4px);
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
:host a {
|
|
1053
|
+
position: relative;
|
|
1054
|
+
text-decoration: none;
|
|
1055
|
+
color: inherit;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
.link-text {
|
|
1059
|
+
position: relative;
|
|
1060
|
+
display: inline-block;
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.link-text::after {
|
|
1064
|
+
content: "";
|
|
1065
|
+
position: absolute;
|
|
1066
|
+
left: 0;
|
|
1067
|
+
bottom: 0;
|
|
1068
|
+
width: 100%;
|
|
1069
|
+
opacity: 1;
|
|
1070
|
+
height: 1px;
|
|
1071
|
+
background-color: currentColor;
|
|
1072
|
+
transition: opacity 0.3s ease, height 0.3s ease;
|
|
1073
|
+
pointer-events: none;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
:host a:hover .link-text::after {
|
|
1077
|
+
opacity: 0;
|
|
1078
|
+
height: 1px;
|
|
1079
|
+
}
|
|
1080
|
+
/* End of underline effect */
|
|
1081
|
+
`;ot([a({type:String})],F.prototype,"href",2);ot([a({type:String})],F.prototype,"target",2);ot([a({type:String,reflect:!0})],F.prototype,"template",2);ot([a({type:Boolean,reflect:!0})],F.prototype,"inverse",2);ot([a({type:Boolean,reflect:!0})],F.prototype,"endIcon",2);ot([a({type:Boolean,reflect:!0})],F.prototype,"reverseEndIcon",2);F=ot([y("o-link")],F);var To=Object.defineProperty,jo=Object.getOwnPropertyDescriptor,Et=(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 st=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`
|
|
1082
|
+
<div class="rating">
|
|
1083
|
+
<div class="stars">
|
|
1084
|
+
${o.map(t=>l`<span class="star">${C(N[t]??"")}</span>`)}
|
|
1085
|
+
</div>
|
|
1086
|
+
${this.reviewCount!=null&&this.href!=null?l`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>`:null}
|
|
1087
|
+
</div>
|
|
1088
|
+
`}};st.styles=f`
|
|
1089
|
+
svg {
|
|
1090
|
+
width: 12px;
|
|
1091
|
+
height: 12px;
|
|
1090
1092
|
}
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
transform: translateX(100%);
|
|
1095
|
-
}
|
|
1096
|
-
to {
|
|
1097
|
-
transform: translateX(0%);
|
|
1098
|
-
}
|
|
1093
|
+
.rating {
|
|
1094
|
+
display: flex;
|
|
1095
|
+
align-items: center;
|
|
1099
1096
|
}
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
}
|
|
1105
|
-
to {
|
|
1106
|
-
transform: translateX(100%);
|
|
1107
|
-
}
|
|
1097
|
+
|
|
1098
|
+
.stars {
|
|
1099
|
+
display: flex;
|
|
1100
|
+
gap: 2px;
|
|
1108
1101
|
}
|
|
1109
1102
|
|
|
1110
|
-
.
|
|
1111
|
-
|
|
1103
|
+
.star {
|
|
1104
|
+
display: block;
|
|
1112
1105
|
}
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1106
|
+
|
|
1107
|
+
o-link {
|
|
1108
|
+
margin-left: 6px;
|
|
1109
|
+
font-family: var(--font-family-loccitane-sans);
|
|
1110
|
+
font-weight: var(--font-weight-500);
|
|
1111
|
+
font-size: var(--font-size-100);
|
|
1112
|
+
line-height: var(--line-height-160);
|
|
1113
|
+
letter-spacing: var(--letter-spacing-400);
|
|
1114
|
+
color: var(--color-content-action-secondary);
|
|
1116
1115
|
}
|
|
1117
|
-
|
|
1118
|
-
|
|
1116
|
+
|
|
1117
|
+
.review-link {
|
|
1118
|
+
text-decoration: underline;
|
|
1119
|
+
cursor: pointer;
|
|
1119
1120
|
}
|
|
1120
|
-
`;
|
|
1121
|
+
`;Et([a({type:Number})],st.prototype,"rating",2);Et([a({type:String})],st.prototype,"reviewCount",2);Et([a({type:String})],st.prototype,"href",2);st=Et([y("o-rating")],st);var Ro=Object.defineProperty,No=Object.getOwnPropertyDescriptor,X=(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&&Ro(t,e,i),i};let D=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`
|
|
1121
1122
|
<o-icon-button
|
|
1122
1123
|
icon="playerv"
|
|
1123
1124
|
size="xsmall"
|
|
@@ -1645,7 +1646,7 @@
|
|
|
1645
1646
|
background-color: var(--color-container-action-primary-pressed);
|
|
1646
1647
|
}
|
|
1647
1648
|
}
|
|
1648
|
-
`;Ht=Go([y("o-dots")],Ht);var Xo=Object.defineProperty,Jo=Object.getOwnPropertyDescriptor,M=(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&&Xo(t,e,i),i};let
|
|
1649
|
+
`;Ht=Go([y("o-dots")],Ht);var Xo=Object.defineProperty,Jo=Object.getOwnPropertyDescriptor,M=(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&&Xo(t,e,i),i};let A=class extends u{constructor(){super(...arguments),this.options=[],this.value="",this.name="",this.additionaltext="+X variant(s)",this.disabled=!1,this.width="100%",this.open=!1,this.activeIndex=-1,this.menuWidth="",this._handleOutsideClick=o=>{this.contains(o.target)||(this.open=!1,this.activeIndex=-1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this._handleOutsideClick),super.disconnectedCallback()}toggle(){var o;if(!this.disabled){if(this.open=!this.open,this.activeIndex=this.open?this.options.findIndex(t=>t.value===this.value):-1,this.open&&this.width==="auto"){const t=(o=this.renderRoot)==null?void 0:o.querySelector("button");t&&(this.menuWidth=`${t.getBoundingClientRect().width}px`)}this.open&&this.updateComplete.then(()=>this._focusActiveOption())}}_focusActiveOption(){var t;const o=(t=this.renderRoot)==null?void 0:t.querySelector(`#option-${this.activeIndex}`);o==null||o.focus()}selectOption(o){this.value=o.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,url:o.url}})),this.open=!1,this.activeIndex=-1}handleKeydown(o){if(this.disabled){o.preventDefault();return}if(!this.open){(o.key==="ArrowDown"||o.key==="ArrowUp")&&(o.preventDefault(),this.open=!0,this.activeIndex=this.options.findIndex(t=>t.value===this.value),this.updateComplete.then(()=>this._focusActiveOption()));return}switch(o.key){case"ArrowDown":o.preventDefault(),this.activeIndex=(this.activeIndex+1)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"ArrowUp":o.preventDefault(),this.activeIndex=(this.activeIndex-1+this.options.length)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"Home":o.preventDefault(),this.activeIndex=0,this.updateComplete.then(()=>this._focusActiveOption());break;case"End":o.preventDefault(),this.activeIndex=this.options.length-1,this.updateComplete.then(()=>this._focusActiveOption());break;case"Enter":o.preventDefault(),this.activeIndex>=0&&this.selectOption(this.options[this.activeIndex]);break;case"Escape":o.preventDefault(),this.open=!1,this.activeIndex=-1;break}}updated(){this.options.length>0&&(this.options.some(t=>t.value===this.value)||(this.value=this.options[0].value))}render(){const o=N.checkstroke.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"'),t=this.options.find(e=>e.value===this.value);return l`
|
|
1649
1650
|
<button
|
|
1650
1651
|
role="combobox"
|
|
1651
1652
|
aria-haspopup="listbox"
|
|
@@ -1707,7 +1708,7 @@
|
|
|
1707
1708
|
</ul>`:null}
|
|
1708
1709
|
|
|
1709
1710
|
<input type="hidden" name="${this.name}" .value="${this.value}" />
|
|
1710
|
-
`}};
|
|
1711
|
+
`}};A.styles=f`
|
|
1711
1712
|
:host {
|
|
1712
1713
|
display: inline-block;
|
|
1713
1714
|
position: relative;
|
|
@@ -1882,7 +1883,7 @@
|
|
|
1882
1883
|
input[type="hidden"] {
|
|
1883
1884
|
display: none;
|
|
1884
1885
|
}
|
|
1885
|
-
`;M([a({type:Array,reflect:!0})],
|
|
1886
|
+
`;M([a({type:Array,reflect:!0})],A.prototype,"options",2);M([a({type:String,reflect:!0})],A.prototype,"value",2);M([a({type:String,reflect:!0})],A.prototype,"name",2);M([a({type:String,reflect:!0})],A.prototype,"additionaltext",2);M([a({type:Boolean,reflect:!0})],A.prototype,"disabled",2);M([a({type:String,reflect:!0})],A.prototype,"width",2);M([et()],A.prototype,"open",2);M([et()],A.prototype,"activeIndex",2);M([et()],A.prototype,"menuWidth",2);A=M([y("o-dropdown-variant")],A);/**
|
|
1886
1887
|
* @license
|
|
1887
1888
|
* Copyright 2018 Google LLC
|
|
1888
1889
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1973,7 +1974,7 @@
|
|
|
1973
1974
|
overflow: hidden;
|
|
1974
1975
|
}
|
|
1975
1976
|
}
|
|
1976
|
-
`;Wt([a({type:Object,reflect:!0})],gt.prototype,"option",2);Wt([a({type:Number,reflect:!0})],gt.prototype,"imageSize",2);gt=Wt([y("o-reassurance")],gt);var oi=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,V=(o,t,e,n)=>{for(var i=n>1?void 0:n?ii(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&&oi(t,e,i),i};const ni=Ft(u);let
|
|
1977
|
+
`;Wt([a({type:Object,reflect:!0})],gt.prototype,"option",2);Wt([a({type:Number,reflect:!0})],gt.prototype,"imageSize",2);gt=Wt([y("o-reassurance")],gt);var oi=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,V=(o,t,e,n)=>{for(var i=n>1?void 0:n?ii(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&&oi(t,e,i),i};const ni=Ft(u);let E=class extends ni{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`
|
|
1977
1978
|
<a href="${this.link}" class="o-chip" tabindex="${this.inactive?"-1":"0"}" aria-hidden="${this.inactive?"true":"false"}">
|
|
1978
1979
|
${o?this.text:l`<slot></slot>`}
|
|
1979
1980
|
</a>
|
|
@@ -1982,7 +1983,7 @@
|
|
|
1982
1983
|
aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
|
|
1983
1984
|
${o?this.text:l`<slot></slot>`}
|
|
1984
1985
|
</button>
|
|
1985
|
-
`}};
|
|
1986
|
+
`}};E.styles=f`
|
|
1986
1987
|
:host {
|
|
1987
1988
|
cursor: pointer;
|
|
1988
1989
|
display: inline-flex;
|
|
@@ -2071,7 +2072,7 @@
|
|
|
2071
2072
|
display: inline-flex;
|
|
2072
2073
|
align-items: center;
|
|
2073
2074
|
}
|
|
2074
|
-
`;V([a({type:String,reflect:!0})],
|
|
2075
|
+
`;V([a({type:String,reflect:!0})],E.prototype,"link",2);V([a({reflect:!0})],E.prototype,"name",2);V([a({reflect:!0})],E.prototype,"value",2);V([a({type:String})],E.prototype,"text",2);V([a({type:String,reflect:!0})],E.prototype,"size",2);V([a({type:Boolean,reflect:!0})],E.prototype,"selected",2);V([a({type:Boolean,reflect:!0})],E.prototype,"fullwidth",2);V([a({type:Boolean,reflect:!0})],E.prototype,"inactive",2);E=V([y("o-chip")],E);var ri=Object.defineProperty,si=Object.getOwnPropertyDescriptor,Gt=(o,t,e,n)=>{for(var i=n>1?void 0:n?si(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&&ri(t,e,i),i};let yt=class extends u{constructor(){super(),this.name="",this.value="",this.addEventListener("selected",this.onChipSelected)}onChipSelected(o){const t=o.target instanceof E?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`
|
|
2075
2076
|
<slot></slot>
|
|
2076
2077
|
`}};yt.styles=f`
|
|
2077
2078
|
:host {
|