@florid-kit/components 0.9.15 → 0.9.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/aria.d.ts +1 -1
  2. package/index.js +827 -824
  3. package/index.mjs +1498 -1495
  4. package/package.json +1 -1
package/index.js CHANGED
@@ -158,967 +158,970 @@
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);var mo=Object.defineProperty,xo=Object.getOwnPropertyDescriptor,x=(o,t,e,n)=>{for(var i=n>1?void 0:n?xo(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&&mo(t,e,i),i};const wo=Ft(u);let b=class extends wo{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!=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`
162
- <button type=${this.type} class="button" ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}>
163
- ${this.startIcon?this.renderIcon("start"):d}
164
- ${o?l`
165
- ${this.text?l`<span class="text">${this.text}</span>`:d}
166
- ${this.textsecond?l`<span class="text">${this.textsecond}</span>`:d}
167
- ${this.withbadge?l`<slot></slot>`:d}
168
- `:l`<slot></slot>`}
169
- ${this.endIcon?this.renderIcon("end"):d}
170
- </button>
171
- `}renderLink(){const o=this.text||this.textsecond;return l`
172
- <a
173
- href=${this.href}
174
- target=${this.target||d}
175
- class="button"
176
- ?disabled=${this.disabled}
177
- role="button"
178
- @click=${this.handleClick}
179
- @keydown=${this.handleClick}
180
- aria-describedby=${this.getAttribute("aria-describedby")||d}
181
- >
182
- ${this.startIcon?this.renderIcon("start"):d}
183
- ${o?l`
184
- ${this.text?l`<span>${this.text}</span>`:d}
185
- ${this.textsecond?l`<span>${this.textsecond}</span>`:d}
186
- `:l`<slot></slot>`}
187
- ${this.endIcon?this.renderIcon("end"):d}
188
- </a>
189
- `}};Re(b);b.formAssociated=!0;b.styles=f`
190
- :host {
191
- --button-border: transparent;
192
- --badge-outer-width: 19px;
193
- cursor: pointer;
194
- display: inline-flex;
195
- }
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
+ }
196
196
 
197
- :host(.a--tabfocus) {
198
- outline: none !important;
199
- }
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;
200
207
 
201
- :host([fullwidth]) {
202
- width: 100%;
203
- }
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
+ }
204
217
 
205
- :host([variant="primary"]) {
206
- --button-bg: var(--color-container-action-primary-default);
207
- --button-bg-hover: var(--color-container-action-primary-hover);
208
- --button-bg-pressed: var(--color-container-action-primary-pressed);
209
- --button-text: var(--color-content-action-primary);
210
- --button-text-hover: var(--color-content-action-primary);
211
- --button-border: transparent;
212
- --button-border-width: var(--border-m);
213
- --button-padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
214
- --button-starticon-svg-width: 0px; /* No starticon SVG for primary button */
215
- --button-endicon-svg-width: 0px; /* No endicon SVG for primary button */
216
- }
218
+ .icon-button.filled svg {
219
+ fill: var(--color-content-action-secondary);
220
+ }
217
221
 
218
- :host([variant="secondary"]) {
219
- --button-bg: var(--color-container-action-secondary-default);
220
- --button-bg-hover: var(--color-container-action-secondary-hover);
221
- --button-bg-pressed: var(--color-container-action-secondary-pressed);
222
- --button-text: var(--color-content-action-secondary);
223
- --button-text-hover: var(--color-content-action-secondary);
224
- --button-border: var(--color-border-secondary);
225
- --button-border-width: var(--border-m);
226
- --button-padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
227
- --button-starticon-svg-width: 16px;
228
- --button-endicon-svg-width: 0px; /* No endicon SVG for secondary button */
229
- }
222
+ .icon-button.xsmall {
223
+ width: 20px;
224
+ height: 20px;
230
225
 
231
- :host([variant="ghost"]) {
232
- --button-bg: transparent;
233
- --button-bg-hover: var(--color-alpha-dark-lightest);
234
- --button-bg-pressed: var(--color-alpha-dark-lighter);
235
- --button-text: var(--color-content-action-secondary);
236
- --button-text-hover: var(--color-content-action-secondary);
237
- --button-border-width: 0;
238
- --button-padding: var(--spacing-m, 10px) var(--spacing-xl, 16px);
239
- --button-starticon-svg-width: 16px;
240
- --button-endicon-svg-width: 12px;
241
- }
226
+ &:not(.icon-wishlist) {
227
+ svg {
228
+ width: 8px;
229
+ height: 8px;
230
+ }
231
+ }
232
+ }
242
233
 
243
- :host([variant="tertiary"]) {
244
- --button-bg: var(--color-container-action-tertiary-default);
245
- --button-bg-hover: var(--color-container-action-tertiary-hover);
246
- --button-bg-pressed: var(--color-container-action-tertiary-pressed);
247
- --button-text: var(--color-content-body);
248
- --button-text-hover: var(--color-content-action-tertiary);
249
- --button-border-width: 0;
250
- --button-padding: var(--spacing-m, 10px) var(--spacing-l, 12px);
251
- --button-starticon-svg-width: 0px; /* No starticon SVG for tertiary button */
252
- --button-endicon-svg-width: 8px;
253
- }
234
+ .icon-button.small {
235
+ width: 32px;
236
+ height: 32px;
254
237
 
255
- :host([disabled]),
256
- :host([aria-disabled="true"]),
257
- :host([aria-disabled="true"]:hover) {
258
- --button-bg: var(--color-container-disabled);
259
- --button-text: var(--color-content-disabled);
260
- --button-border: transparent;
261
- }
238
+ &:not(.icon-wishlist) {
239
+ svg {
240
+ width: 16px;
241
+ height: 16px;
242
+ }
243
+ }
244
+ }
262
245
 
263
- :host([disabled][variant="secondary"]) {
264
- --button-border: var(--color-border-secondary);
265
- }
246
+ .icon-button.medium {
247
+ width: 40px;
248
+ height: 40px;
266
249
 
267
- .button {
268
- display: inline-flex;
269
- align-items: center;
270
- justify-content: center;
271
- width: 100%;
272
- gap: var(--spacing-s, 8px);
273
- height: 100%;
274
- background-color: var(--button-bg);
275
- color: var(--button-text);
276
- border: var(--button-border-width, var(--border-m)) solid var(--button-border);
277
- border-radius: var(--radius-m);
278
- font-family: var(--font-family-loccitane-sans);
279
- font-size: var(--font-size-150);
280
- font-weight: var(--font-weight-400);
281
- line-height: var(--line-height-200);
282
- min-width: 64px;
283
- padding: var(--button-padding);
284
- text-decoration: none;
285
- cursor: inherit;
286
- box-sizing: border-box;
250
+ &:not(.icon-wishlist) {
251
+ svg {
252
+ width: 16px;
253
+ height: 16px;
254
+ }
255
+ }
256
+ }
287
257
 
288
- span {
289
- font-family: var(--font-family-loccitane-sans);
290
- font-size: var(--font-size-150);
291
- font-weight: var(--font-weight-400);
292
- line-height: var(--line-height-200);
293
- }
294
- }
258
+ .icon-button.large {
259
+ width: 40px;
260
+ height: 40px;
295
261
 
296
- .button:hover:not([disabled]) {
297
- background-color: var(--button-bg-hover);
298
- color: var(--button-text-hover);
299
- }
262
+ &:not(.icon-wishlist) {
263
+ svg {
264
+ width: 24px;
265
+ height: 24px;
266
+ }
267
+ }
268
+ }
300
269
 
301
- .button:active:not([disabled]) {
302
- background-color: var(--button-bg-pressed);
303
- }
270
+ .icon-button.none-light, .icon-button.none-contrast {
271
+ background-color: transparent;
272
+ width: auto;
273
+ height: auto;
304
274
 
305
- .button:focus-visible {
306
- ${at};
307
- }
275
+ &.xsmall {
276
+ svg {
277
+ width: 8px;
278
+ height: 8px;
279
+ }
280
+ }
308
281
 
309
- span.text + span.text::before {
310
- content: "•";
311
- margin-right: 8px;
312
- }
282
+ &.small {
283
+ svg {
284
+ width: 16px;
285
+ height: 16px;
286
+ }
287
+ }
313
288
 
314
- .icon-start,
315
- .icon-end {
316
- display: inline-flex;
317
- align-items: center;
289
+ &.medium {
290
+ svg {
291
+ width: 16px;
292
+ height: 16px;
293
+ }
294
+ }
318
295
 
319
- svg {
320
- max-height: 20px;
321
- }
322
- svg[x] {
323
- width: 15px;
324
- }
325
- path[fill],
326
- path[class] {
327
- fill: var(--button-text) !important;
328
- }
329
- path[stroke] {
330
- stroke: var(--button-text) !important;
331
- }
332
- }
333
-
334
- :host([variant="tertiary"][fullwidth][endIcon]) .button {
335
- justify-content: space-between;
336
- }
337
-
338
- .button span {
339
- display: inline-flex;
340
- align-items: center;
341
- }
342
-
343
- .button slot {
344
- display: inline-flex;
345
- align-items: center;
346
- }
347
-
348
- :host([variant="tertiary"][endIcon]) .button .icon-end {
349
- width: var(--button-endicon-svg-width, 8px);
350
- }
351
-
352
- :host([underlined]) span:not([class*="icon-"]),
353
- :host([underlined]) .text,
354
- :host([underlined]:not([text])) .button slot {
355
- position: relative;
356
-
357
- &::after {
358
- content: "";
359
- display: block;
360
- position: absolute;
361
- bottom: 0;
362
- left: 0;
363
- width: 100%;
364
- border-bottom: var(--border-M, 1px) solid var(--button-text);
365
- }
366
- }
367
-
368
- :host([underlined]:not([text])) .button slot {
369
- display: inline-flex;
370
- gap: 8px;
371
- }
372
-
373
- :host([underlined][withbadge]:not([text])) .button slot {
374
- &::after {
375
- width: calc(100% - var(--badge-outer-width, 19px) - var(--spacing-s, 8px))
376
- }
377
- }
378
-
379
- //Icon movement on hover
380
- :host([variant="tertiary"][endIcon]) .icon-end {
381
- display: inline-flex;
382
- align-items: center;
383
- }
296
+ &.large {
297
+ svg {
298
+ width: 24px;
299
+ height: 24px;
300
+ }
301
+ }
384
302
 
385
- :host([variant="tertiary"][endIcon]:hover) .icon-end {
386
- transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
387
- transform: translateX(4px);
388
- }
389
- //End icon movment on hover
390
- `;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,At=(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`
391
- <button type="button" aria-describedby="${this.ariaDescribedBy}" class="wishlist-button">
392
- <span class="sr-only">${this.label}</span>
393
- ${C(o)}
394
- </button>
395
- `}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`
396
- :host {
397
- display: inline-flex;
398
- justify-content: center;
399
- align-items: center;
400
- outline: none !important;
303
+ &:disabled {
304
+ background-color: transparent;
305
+ }
401
306
  }
402
307
 
403
- .wishlist-button {
404
- display: flex;
405
- justify-content: center;
406
- align-items: center;
407
- width: 40px;
408
- height: 40px;
409
- border: transparent;
410
- border-radius: var(--radius-full);
411
- background-color: var(--color-alpha-light-strong);
412
- position: relative;
413
- 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
+ }
414
315
  }
415
316
 
416
- .wishlist-button:hover {
417
- background-color: var(--color-alpha-light-stronger);
317
+ .icon-button.none-light.icon-wishlist svg path {
318
+ fill: none;
418
319
  }
419
320
 
420
- .wishlist-button:active {
421
- background-color: var(--color-alpha-light-strongest);
321
+ :host([status="filled"]) .icon-button.none-light.icon-wishlist svg path {
322
+ fill: var(--color-content-action-primary);
422
323
  }
423
324
 
424
- .wishlist-button:focus-visible {
425
- ${at};
426
- }
325
+ .icon-button.background-light {
326
+ background-color: var(--color-alpha-light-strong);
427
327
 
428
- .wishlist-button:hover svg path {
429
- fill: var(--color-content-action-secondary);
430
- }
328
+ &:hover:not(:disabled) {
329
+ background-color: var(--color-alpha-light-stronger);
330
+ }
431
331
 
432
- :host([status="filled"]) .wishlist-button svg path {
433
- fill: var(--color-content-action-secondary);
332
+ &:active:not(:disabled) {
333
+ background-color: var(--color-alpha-light-strongest);
334
+ }
434
335
  }
435
336
 
436
- :host([status="empty"]) .wishlist-button svg path {
437
- fill: var(--color-alpha-light-strong);
438
- }
337
+ .icon-button.background-contrast {
338
+ background-color: var(--color-container-action-tertiary-default);
439
339
 
440
- @media (hover: hover) and (pointer: fine) {
441
- :host([status="empty"]) .wishlist-button:hover svg path {
442
- fill: var(--color-content-action-secondary);
340
+ &:hover:not(:disabled) {
341
+ background-color: var(--color-container-action-tertiary-hover);
443
342
  }
444
- }
445
343
 
446
- .sr-only {
447
- border: 0 !important;
448
- clip: rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;
449
- -webkit-clip-path: inset(50%) !important;
450
- clip-path: inset(50%) !important;
451
- height: 0.1rem !important;
452
- margin: -0.1rem !important;
453
- overflow: hidden !important;
454
- padding: 0 !important;
455
- position: absolute !important;
456
- width: 0.1rem !important;
457
- white-space: nowrap !important;
458
- }
459
- `;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);/**
460
- * @license
461
- * Copyright 2018 Google LLC
462
- * SPDX-License-Identifier: BSD-3-Clause
463
- */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`
464
- ${this.type==="span"?l`
465
- <span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
466
- ${C(e)}
467
- </span>
468
- `:l`
469
- <button
470
- type="button"
471
- aria-label=${k(i)}
472
- class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
473
- ?disabled="${this.disabled}"
474
- >
475
- ${C(e)}
476
- ${n}
477
- </button>
478
- `}
479
- `}};S.styles=f`
480
- :host {
481
- display: inline-flex;
482
- justify-content: center;
483
- align-items: center;
484
- outline: none !important;
344
+ &:active:not(:disabled) {
345
+ background-color: var(--color-container-action-tertiary-pressed);
346
+ }
485
347
  }
486
348
 
487
- .icon-button {
488
- display: flex;
489
- justify-content: center;
490
- align-items: center;
491
- width: 32px;
492
- height: 32px;
493
- border: transparent;
494
- border-radius: var(--radius-full);
495
- cursor: pointer;
496
- position: relative;
349
+ .icon-button.ghost-light {
350
+ background-color: transparent;
497
351
 
498
- &.icon-wishlist {
499
- svg {
500
- path {
501
- stroke: var(--color-content-action-secondary);
502
- stroke-width: var(--icon-stroke-width, 1);
503
- }
352
+ svg {
353
+ path {
354
+ stroke: var(--color-content-action-primary);
355
+ fill: var(--color-content-action-primary);
504
356
  }
505
357
  }
506
- }
507
-
508
- .icon-button.filled svg {
509
- fill: var(--color-content-action-secondary);
510
- }
511
358
 
512
- .icon-button.xsmall {
513
- width: 20px;
514
- height: 20px;
359
+ &:hover:not(:disabled) {
360
+ background-color: var(--color-alpha-light-lightest);
361
+ }
515
362
 
516
- &:not(.icon-wishlist) {
517
- svg {
518
- width: 8px;
519
- height: 8px;
520
- }
363
+ &:active:not(:disabled) {
364
+ background-color: var(--color-alpha-light-light);
521
365
  }
522
366
  }
523
367
 
524
- .icon-button.small {
525
- width: 32px;
526
- height: 32px;
368
+ .icon-button.ghost-contrast {
369
+ background-color: transparent;
527
370
 
528
- &:not(.icon-wishlist) {
529
- svg {
530
- width: 16px;
531
- height: 16px;
532
- }
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);
533
377
  }
534
378
  }
535
379
 
536
- .icon-button.medium {
537
- width: 40px;
538
- height: 40px;
380
+ .icon-button:disabled {
381
+ background-color: var(--color-container-disabled);
382
+ cursor: default;
539
383
 
540
- &:not(.icon-wishlist) {
541
- svg {
542
- width: 16px;
543
- height: 16px;
384
+ svg {
385
+ fill: var(--color-content-disabled);
386
+
387
+ path {
388
+ fill: var(--color-content-disabled);
544
389
  }
545
390
  }
546
391
  }
547
392
 
548
- .icon-button.large {
549
- width: 40px;
550
- height: 40px;
551
-
552
- &:not(.icon-wishlist) {
553
- svg {
554
- width: 24px;
555
- height: 24px;
556
- }
557
- }
393
+ .icon-button:focus-visible {
394
+ ${at}
558
395
  }
559
396
 
560
- .icon-button.none-light, .icon-button.none-contrast {
561
- background-color: transparent;
562
- width: auto;
563
- height: auto;
564
-
565
- &.xsmall {
566
- svg {
567
- width: 8px;
568
- height: 8px;
569
- }
570
- }
571
-
572
- &.small {
573
- svg {
574
- width: 16px;
575
- height: 16px;
576
- }
577
- }
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}
578
444
 
579
- &.medium {
580
- svg {
581
- width: 16px;
582
- height: 16px;
583
- }
584
- }
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>
585
456
 
586
- &.large {
587
- svg {
588
- width: 24px;
589
- height: 24px;
590
- }
591
- }
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}
592
469
 
593
- &:disabled {
594
- background-color: transparent;
595
- }
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);
596
499
  }
597
500
 
598
- .icon-button.none-light {
599
- svg {
600
- path {
601
- stroke: var(--color-content-action-primary);
602
- fill: var(--color-content-action-primary);
603
- }
604
- }
501
+ /* Hide content until it is initialized */
502
+ :host(:not([initialized])) .content {
503
+ display: none;
605
504
  }
606
505
 
607
- .icon-button.none-light.icon-wishlist svg path {
608
- fill: none;
506
+ /* hide the host completely until its initialized */
507
+ :host(:not([initialized])) {
508
+ display: none !important;
609
509
  }
610
510
 
611
- :host([status="filled"]) .icon-button.none-light.icon-wishlist svg path {
612
- fill: var(--color-content-action-primary);
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);
613
520
  }
614
521
 
615
- .icon-button.background-light {
616
- background-color: var(--color-alpha-light-strong);
617
-
618
- &:hover:not(:disabled) {
619
- background-color: var(--color-alpha-light-stronger);
620
- }
621
-
622
- &:active:not(:disabled) {
623
- background-color: var(--color-alpha-light-strongest);
624
- }
522
+ :host([open]) .overlay {
523
+ opacity: 1;
524
+ pointer-events: auto;
625
525
  }
626
526
 
627
- .icon-button.background-contrast {
628
- background-color: var(--color-container-action-tertiary-default);
629
-
630
- &:hover:not(:disabled) {
631
- background-color: var(--color-container-action-tertiary-hover);
632
- }
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
+ }
633
543
 
634
- &:active:not(:disabled) {
635
- background-color: var(--color-container-action-tertiary-pressed);
636
- }
544
+ :host([open]) .panel {
545
+ transform: translateX(0%);
637
546
  }
638
547
 
639
- .icon-button.ghost-light {
640
- background-color: transparent;
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);
641
554
 
642
- svg {
643
- path {
644
- stroke: var(--color-content-action-primary);
645
- fill: var(--color-content-action-primary);
646
- }
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);
647
570
  }
648
571
 
649
- &:hover:not(:disabled) {
650
- background-color: var(--color-alpha-light-lightest);
572
+ .close-btn {
573
+ margin-left: 8px;
574
+ margin-top: 0;
575
+ flex-direction: column;
576
+ justify-content: start;
651
577
  }
652
578
 
653
- &:active:not(:disabled) {
654
- background-color: var(--color-alpha-light-light);
579
+ .return-btn {
580
+ margin-right: 8px;
655
581
  }
656
582
  }
657
583
 
658
- .icon-button.ghost-contrast {
659
- background-color: transparent;
660
-
661
- &:hover:not(:disabled) {
662
- background-color: var(--color-alpha-light-medium);
663
- }
584
+ .panel:focus-visible,
585
+ .close-btn:focus-visible {
586
+ ${at}
587
+ }
664
588
 
665
- &:active:not(:disabled) {
666
- background-color: var(--color-alpha-light-strongest);
667
- }
589
+ [role="document"] {
590
+ overflow-y: auto;
591
+ overflow-x: hidden;
668
592
  }
669
593
 
670
- .icon-button:disabled {
671
- background-color: var(--color-container-disabled);
672
- cursor: default;
673
-
674
- svg {
675
- fill: var(--color-content-disabled);
594
+ .content {
595
+ flex: 1 1 auto;
596
+ padding: var(--spacing-xl);
676
597
 
677
- path {
678
- fill: var(--color-content-disabled);
679
- }
598
+ &.with-detail {
599
+ width: 100%;
600
+ height: 100%;
601
+ position: absolute;
602
+ top: 0;
603
+ left: 0;
604
+ background: var(--color-container-bg-white);
605
+ z-index: 3;
606
+ padding: var(--spacing-4-xs);
680
607
  }
681
608
  }
682
609
 
683
- .icon-button:focus-visible {
684
- ${at}
610
+ .footer {
611
+ flex: 0 0 auto;
612
+ padding: var(--spacing-xl);
613
+ border-top: var(--border-050) solid var(--color-border-tertiary);
614
+ display: flex;
615
+ flex-direction: column;
616
+ gap: var(--spacing-l);
617
+ justify-content: flex-start;
685
618
  }
686
619
 
687
- .sr-only {
688
- display: none;
620
+ /* Mobile */
621
+ @media (max-width: 767px) {
622
+ :host {
623
+ --side-panel-width: 100%;
624
+ --side-panel-max-width: none;
625
+ }
689
626
  }
690
- `;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,Ao=Object.getOwnPropertyDescriptor,ot=(o,t,e,n)=>{for(var i=n>1?void 0:n?Ao(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`
691
- <a
692
- href="${o}"
693
- target="${k(this.target||void 0)}"
694
- @click="${this._handleClick}"
695
- >
696
- ${this.endIcon&&this.reverseEndIcon?l`
697
- <o-icon-button
698
- icon="chevronLeft"
699
- bgstyle="${this.inverse?"none-light":"none-contrast"}"
700
- size="xsmall"
701
- aria-hidden="true"
702
- type="span"
703
- ></o-icon-button>
704
- `:null}
705
- <span class="link-text"><slot></slot></span>
706
- ${this.endIcon&&!this.reverseEndIcon?l`
707
- <o-icon-button
708
- icon="chevronRight"
709
- bgstyle="${this.inverse?"none-light":"none-contrast"}"
710
- size="xsmall"
711
- aria-hidden="true"
712
- type="span"
713
- ></o-icon-button>
714
- `:null}
715
- </a>
716
- `}};F.styles=f`
717
- :host([template="standard"]) a {
718
- color: var(--color-content-action-secondary);
719
- font-size: var(--font-size-200);
720
- font-weight: var(--font-weight-400);
721
- line-height: var(--line-height-240);
722
- letter-spacing: var(--letter-spacing-400);
723
- font-family: var(--font-family-loccitane-serif);
724
- }
725
627
 
726
- :host([template="discret"]) a {
727
- color: var(--color-content-action-secondary);
728
- font-size: var(--font-size-100);
729
- font-weight: var(--font-weight-400);
730
- line-height: var(--line-height-160);
731
- letter-spacing: var(--letter-spacing-400);
732
- font-family: var(--font-family-loccitane-sans);
733
- }
628
+ /* Tablet */
629
+ @media (min-width: 768px) and (max-width: 1024px) {
630
+ :host {
631
+ --side-panel-width: 375px;
632
+ --side-panel-max-width: 375px;
633
+ }
634
+ }
734
635
 
735
- :host([template="review"]) a {
736
- color: var(--color-content-action-secondary);
737
- font-size: var(--font-size-100);
738
- font-weight: var(--font-weight-500);
739
- line-height: var(--line-height-160);
740
- letter-spacing: var(--letter-spacing-400);
741
- font-family: var(--font-family-loccitane-sans);
742
- text-transform: uppercase;
743
- }
636
+ @media (min-width: 1025px) {
637
+ :host {
638
+ --side-panel-width: 100%;
639
+ --side-panel-max-width: 416px;
640
+ --font-size: var(--font-size-400);
641
+ --line-height: var(--line-height-280);
642
+ }
643
+ }
644
+
645
+ @keyframes slideInRight {
646
+ from {
647
+ transform: translateX(100%);
648
+ }
649
+ to {
650
+ transform: translateX(0%);
651
+ }
652
+ }
653
+
654
+ @keyframes slideOutRight {
655
+ from {
656
+ transform: translateX(0%);
657
+ }
658
+ to {
659
+ transform: translateX(100%);
660
+ }
661
+ }
744
662
 
745
- :host([inverse]) a {
746
- color: var(--color-container-action-tertiary-default);
747
- }
663
+ .slide-out-right {
664
+ animation: slideOutRight 0.3s ease-in forwards;
665
+ }
666
+
667
+ .detail-view {
668
+ animation: slideInRight 0.3s ease-out both;
669
+ }
670
+ .detail-content {
671
+ padding: var(--spacing-xl);
672
+ }
673
+ `;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`
674
+ <button type=${this.type} class="button" ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}>
675
+ ${this.startIcon?this.renderIcon("start"):d}
676
+ ${o?l`
677
+ ${this.text?l`<span class="text">${this.text}</span>`:d}
678
+ ${this.textsecond?l`<span class="text">${this.textsecond}</span>`:d}
679
+ ${this.withbadge?l`<slot></slot>`:d}
680
+ `:l`<slot></slot>`}
681
+ ${this.endIcon?this.renderIcon("end"):d}
682
+ </button>
683
+ `}renderLink(){const o=this.text||this.textsecond;return l`
684
+ <a
685
+ href=${this.href}
686
+ target=${this.target||d}
687
+ class="button"
688
+ ?disabled=${this.disabled}
689
+ role="button"
690
+ @click=${this.handleClick}
691
+ @keydown=${this.handleClick}
692
+ aria-describedby=${this.getAttribute("aria-describedby")||d}
693
+ >
694
+ ${this.startIcon?this.renderIcon("start"):d}
695
+ ${o?l`
696
+ ${this.text?l`<span>${this.text}</span>`:d}
697
+ ${this.textsecond?l`<span>${this.textsecond}</span>`:d}
698
+ `:l`<slot></slot>`}
699
+ ${this.endIcon?this.renderIcon("end"):d}
700
+ </a>
701
+ `}};Re(b);b.formAssociated=!0;b.styles=f`
702
+ :host {
703
+ --button-border: transparent;
704
+ --badge-outer-width: 19px;
705
+ cursor: pointer;
706
+ display: inline-flex;
707
+ }
748
708
 
749
- :host([endIcon]) a o-icon-button {
750
- margin-left: 2px;
751
- transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
752
- }
709
+ :host(.a--tabfocus) {
710
+ outline: none !important;
711
+ }
753
712
 
754
- :host([endIcon][reverseEndIcon]) a o-icon-button {
755
- margin-right: 2px;
756
- transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
757
- }
713
+ :host([fullwidth]) {
714
+ width: 100%;
715
+ }
758
716
 
759
- :host([endIcon]) a {
760
- &:hover {
761
- o-icon-button {
762
- transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
763
- :host(:not([reverseEndIcon])) & {
764
- transform: translateX(4px);
765
- }
717
+ :host([variant="primary"]) {
718
+ --button-bg: var(--color-container-action-primary-default);
719
+ --button-bg-hover: var(--color-container-action-primary-hover);
720
+ --button-bg-pressed: var(--color-container-action-primary-pressed);
721
+ --button-text: var(--color-content-action-primary);
722
+ --button-text-hover: var(--color-content-action-primary);
723
+ --button-border: transparent;
724
+ --button-border-width: var(--border-m);
725
+ --button-padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
726
+ --button-starticon-svg-width: 0px; /* No starticon SVG for primary button */
727
+ --button-endicon-svg-width: 0px; /* No endicon SVG for primary button */
728
+ }
766
729
 
767
- :host([reverseEndIcon]) & {
768
- transform: translateX(-4px);
769
- }
770
- }
771
- }
772
- }
730
+ :host([variant="secondary"]) {
731
+ --button-bg: var(--color-container-action-secondary-default);
732
+ --button-bg-hover: var(--color-container-action-secondary-hover);
733
+ --button-bg-pressed: var(--color-container-action-secondary-pressed);
734
+ --button-text: var(--color-content-action-secondary);
735
+ --button-text-hover: var(--color-content-action-secondary);
736
+ --button-border: var(--color-border-secondary);
737
+ --button-border-width: var(--border-m);
738
+ --button-padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
739
+ --button-starticon-svg-width: 16px;
740
+ --button-endicon-svg-width: 0px; /* No endicon SVG for secondary button */
741
+ }
773
742
 
774
- :host a {
775
- position: relative;
776
- text-decoration: none;
777
- color: inherit;
778
- }
743
+ :host([variant="ghost"]) {
744
+ --button-bg: transparent;
745
+ --button-bg-hover: var(--color-alpha-dark-lightest);
746
+ --button-bg-pressed: var(--color-alpha-dark-lighter);
747
+ --button-text: var(--color-content-action-secondary);
748
+ --button-text-hover: var(--color-content-action-secondary);
749
+ --button-border-width: 0;
750
+ --button-padding: var(--spacing-m, 10px) var(--spacing-xl, 16px);
751
+ --button-starticon-svg-width: 16px;
752
+ --button-endicon-svg-width: 12px;
753
+ }
779
754
 
780
- .link-text {
781
- position: relative;
782
- display: inline-block;
783
- }
755
+ :host([variant="tertiary"]) {
756
+ --button-bg: var(--color-container-action-tertiary-default);
757
+ --button-bg-hover: var(--color-container-action-tertiary-hover);
758
+ --button-bg-pressed: var(--color-container-action-tertiary-pressed);
759
+ --button-text: var(--color-content-body);
760
+ --button-text-hover: var(--color-content-action-tertiary);
761
+ --button-border-width: 0;
762
+ --button-padding: var(--spacing-m, 10px) var(--spacing-l, 12px);
763
+ --button-starticon-svg-width: 0px; /* No starticon SVG for tertiary button */
764
+ --button-endicon-svg-width: 8px;
765
+ }
784
766
 
785
- .link-text::after {
786
- content: "";
787
- position: absolute;
788
- left: 0;
789
- bottom: 0;
790
- width: 100%;
791
- opacity: 1;
792
- height: 1px;
793
- background-color: currentColor;
794
- transition: opacity 0.3s ease, height 0.3s ease;
795
- pointer-events: none;
796
- }
767
+ :host([disabled]),
768
+ :host([aria-disabled="true"]),
769
+ :host([aria-disabled="true"]:hover) {
770
+ --button-bg: var(--color-container-disabled);
771
+ --button-text: var(--color-content-disabled);
772
+ --button-border: transparent;
773
+ }
797
774
 
798
- :host a:hover .link-text::after {
799
- opacity: 0;
800
- height: 1px;
801
- }
802
- /* End of underline effect */
803
- `;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 Eo=Object.defineProperty,Lo=Object.getOwnPropertyDescriptor,Et=(o,t,e,n)=>{for(var i=n>1?void 0:n?Lo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&Eo(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`
804
- <div class="rating">
805
- <div class="stars">
806
- ${o.map(t=>l`<span class="star">${C(N[t]??"")}</span>`)}
807
- </div>
808
- ${this.reviewCount!=null&&this.href!=null?l`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>`:null}
809
- </div>
810
- `}};st.styles=f`
811
- svg {
812
- width: 12px;
813
- height: 12px;
814
- }
815
- .rating {
816
- display: flex;
817
- align-items: center;
818
- }
775
+ :host([disabled][variant="secondary"]) {
776
+ --button-border: var(--color-border-secondary);
777
+ }
819
778
 
820
- .stars {
821
- display: flex;
822
- gap: 2px;
823
- }
779
+ .button {
780
+ display: inline-flex;
781
+ align-items: center;
782
+ justify-content: center;
783
+ width: 100%;
784
+ gap: var(--spacing-s, 8px);
785
+ height: 100%;
786
+ background-color: var(--button-bg);
787
+ color: var(--button-text);
788
+ border: var(--button-border-width, var(--border-m)) solid var(--button-border);
789
+ border-radius: var(--radius-m);
790
+ font-family: var(--font-family-loccitane-sans);
791
+ font-size: var(--font-size-150);
792
+ font-weight: var(--font-weight-400);
793
+ line-height: var(--line-height-200);
794
+ min-width: 64px;
795
+ padding: var(--button-padding);
796
+ text-decoration: none;
797
+ cursor: inherit;
798
+ box-sizing: border-box;
824
799
 
825
- .star {
826
- display: block;
827
- }
800
+ span {
801
+ font-family: var(--font-family-loccitane-sans);
802
+ font-size: var(--font-size-150);
803
+ font-weight: var(--font-weight-400);
804
+ line-height: var(--line-height-200);
805
+ }
806
+ }
828
807
 
829
- o-link {
830
- margin-left: 6px;
831
- font-family: var(--font-family-loccitane-sans);
832
- font-weight: var(--font-weight-500);
833
- font-size: var(--font-size-100);
834
- line-height: var(--line-height-160);
835
- letter-spacing: var(--letter-spacing-400);
836
- color: var(--color-content-action-secondary);
837
- }
808
+ .button:hover:not([disabled]) {
809
+ background-color: var(--button-bg-hover);
810
+ color: var(--button-text-hover);
811
+ }
838
812
 
839
- .review-link {
840
- text-decoration: underline;
841
- cursor: pointer;
842
- }
843
- `;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);/**
844
- * @license
845
- * Copyright 2020 Google LLC
846
- * SPDX-License-Identifier: BSD-3-Clause
847
- */const Po=o=>o.strings===void 0;/**
848
- * @license
849
- * Copyright 2017 Google LLC
850
- * SPDX-License-Identifier: BSD-3-Clause
851
- */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`
852
- <div tabindex="-1" class="header">
853
- ${this.showHeaderStartIcon?l`
854
- <o-icon-button
855
- icon="arrowLeft"
856
- size="small"
857
- class="return-btn"
858
- bgstyle="background-light"
859
- data-role="back"
860
- @click=${this.handleClosePanel}
861
- @keydown=${this.handleClosePanel}
862
- aria-label="${this.closeButtonLabel}"
863
- srlabel="${this.closeButtonLabel}"
864
- showsrlabel="true"
865
- ></o-icon-button>
866
- `:null}
867
- <p role="heading" aria-level="1" id="panel-title" class="${this.headerTitleClassName}">
868
- ${this.headerTitle}
869
- </p>
870
- <o-icon-button
871
- icon="cross"
872
- size="small"
873
- class="close-btn"
874
- bgstyle="background-light"
875
- @click=${this.handleClosePanel}
876
- @keydown=${this.handleClosePanel}
877
- aria-label="${this.closeButtonLabel}"
878
- aria-describedby="panel-title"
879
- srlabel="${this.closeButtonLabel}"
880
- showsrlabel="true"
881
- ></o-icon-button>
882
- </div>
883
- `:null;return l`
884
- <div class="overlay" style="z-index: ${this.zIndex}" @click=${this.handleClosePanel}></div>
885
- <div
886
- class="panel"
887
- role="dialog"
888
- aria-modal="true"
889
- aria-labelledby="panel-title"
890
- style="z-index: ${this.zIndex+1}"
891
- tabindex="-1"
892
- >
893
- <div role="document">
894
- ${o}
813
+ .button:active:not([disabled]) {
814
+ background-color: var(--button-bg-pressed);
815
+ }
895
816
 
896
- <div class="content ${this.isHidingDetail?"slide-out-right":""} ${this.showDetail?"with-detail":""}">
897
-
898
- ${this.showDetail?l`
899
- <div class="detail-view">
900
- ${o}
901
- <div class="detail-content">
902
- <slot name="detail" @slotchange=${this._onDetailSlotChange}></slot>
903
- </div>
904
- </div>
905
- `:l`<slot></slot>`}
906
- </div>
817
+ .button:focus-visible {
818
+ ${at};
819
+ }
907
820
 
908
- ${this.showFooter?l`
909
- <div class="footer">
910
- ${this.firstButtonVariant&&this.firstButtonLabel?l`
911
- <o-button
912
- variant="${this.firstButtonVariant}"
913
- @click=${this.handleFirstClick}
914
- @keydown=${this.handleFirstClick}
915
- ${le(this.firstButtonProps)}
916
- >
917
- ${this.firstButtonLabel}
918
- </o-button>
919
- `:null}
821
+ span.text + span.text::before {
822
+ content: "";
823
+ margin-right: 8px;
824
+ }
920
825
 
921
- ${this.secondButtonVariant&&this.secondButtonLabel?l`
922
- <o-button
923
- variant="${this.secondButtonVariant}"
924
- @click=${this.handleSecondClick}
925
- @keydown=${this.handleSecondClick}
926
- ${le(this.secondButtonProps)}
927
- >
928
- ${this.secondButtonLabel}
929
- </o-button>
930
- `:null}
931
- </div>
932
- `:null}
933
- </div>
934
- </div>
935
- `}};p.styles=f`
936
- :host {
937
- --z-overlay: 99;
938
- --z-panel: 100;
939
- position: fixed;
940
- top: 0;
941
- right: 0;
942
- height: 100%;
943
- width: 100%;
944
- pointer-events: none;
945
- z-index: var(--z-overlay);
946
- --side-panel-width: 100%;
947
- --side-panel-max-width: 416px;
948
- --font-size: var(--font-size-300);
949
- --line-height: var(--line-height-240);
950
- }
826
+ .icon-start,
827
+ .icon-end {
828
+ display: inline-flex;
829
+ align-items: center;
951
830
 
952
- /* Hide content until it is initialized */
953
- :host(:not([initialized])) .content {
954
- display: none;
955
- }
831
+ svg {
832
+ max-height: 20px;
833
+ }
834
+ svg[x] {
835
+ width: 15px;
836
+ }
837
+ path[fill],
838
+ path[class] {
839
+ fill: var(--button-text) !important;
840
+ }
841
+ path[stroke] {
842
+ stroke: var(--button-text) !important;
843
+ }
844
+ }
956
845
 
957
- /* hide the host completely until its initialized */
958
- :host(:not([initialized])) {
959
- display: none !important;
960
- }
846
+ :host([variant="tertiary"][fullwidth][endIcon]) .button {
847
+ justify-content: space-between;
848
+ }
961
849
 
962
- .overlay {
963
- position: absolute;
964
- inset: 0;
965
- backdrop-filter: blur(4px);
966
- background-color: rgba(0, 0, 0, 0.3);
967
- opacity: 0;
968
- transition: opacity 0.3s ease;
969
- pointer-events: none;
970
- z-index: var(--z-overlay);
971
- }
850
+ .button span {
851
+ display: inline-flex;
852
+ align-items: center;
853
+ }
972
854
 
973
- :host([open]) .overlay {
974
- opacity: 1;
975
- pointer-events: auto;
976
- }
855
+ .button slot {
856
+ display: inline-flex;
857
+ align-items: center;
858
+ }
859
+
860
+ :host([variant="tertiary"][endIcon]) .button .icon-end {
861
+ width: var(--button-endicon-svg-width, 8px);
862
+ }
977
863
 
978
- .panel {
979
- position: absolute;
980
- top: 0;
981
- right: 0;
982
- width: var(--side-panel-width);
983
- max-width: var(--side-panel-max-width);
984
- height: 100%;
985
- background: white;
986
- box-shadow: var(--colors-alpha-dark-60);
987
- transform: translateX(100%);
988
- transition: transform 0.3s ease;
989
- display: flex;
990
- flex-direction: column;
991
- pointer-events: auto;
992
- z-index: var(--z-panel);
993
- }
864
+ :host([underlined]) span:not([class*="icon-"]),
865
+ :host([underlined]) .text,
866
+ :host([underlined]:not([text])) .button slot {
867
+ position: relative;
994
868
 
995
- :host([open]) .panel {
996
- transform: translateX(0%);
869
+ &::after {
870
+ content: "";
871
+ display: block;
872
+ position: absolute;
873
+ bottom: 0;
874
+ left: 0;
875
+ width: 100%;
876
+ border-bottom: var(--border-M, 1px) solid var(--button-text);
877
+ }
878
+ }
879
+
880
+ :host([underlined]:not([text])) .button slot {
881
+ display: inline-flex;
882
+ gap: 8px;
883
+ }
884
+
885
+ :host([underlined][withbadge]:not([text])) .button slot {
886
+ &::after {
887
+ width: calc(100% - var(--badge-outer-width, 19px) - var(--spacing-s, 8px))
888
+ }
889
+ }
890
+
891
+ //Icon movement on hover
892
+ :host([variant="tertiary"][endIcon]) .icon-end {
893
+ display: inline-flex;
894
+ align-items: center;
895
+ }
896
+
897
+ :host([variant="tertiary"][endIcon]:hover) .icon-end {
898
+ transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
899
+ transform: translateX(4px);
900
+ }
901
+ //End icon movment on hover
902
+ `;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`
903
+ <button type="button" aria-describedby="${this.ariaDescribedBy}" class="wishlist-button">
904
+ <span class="sr-only">${this.label}</span>
905
+ ${C(o)}
906
+ </button>
907
+ `}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`
908
+ :host {
909
+ display: inline-flex;
910
+ justify-content: center;
911
+ align-items: center;
912
+ outline: none !important;
997
913
  }
998
914
 
999
- .header {
1000
- flex: 0 0 auto;
915
+ .wishlist-button {
1001
916
  display: flex;
1002
- justify-content: space-between;
1003
- padding: 20px 16px;
1004
- border-bottom: var(--border-050) solid var(--color-border-tertiary);
1005
-
1006
- .panel-title {
1007
- font-family: var(--font-family-loccitane-serif);
1008
- font-size: var(--font-size);
1009
- font-weight: var(--font-weight-400);
1010
- line-height: var(--line-height);
1011
- font-style: italic;
1012
- display: -webkit-box;
1013
- -webkit-line-clamp: 2;
1014
- -webkit-box-orient: vertical;
1015
- height: auto;
1016
- margin-top: auto;
1017
- margin-bottom: auto;
1018
- overflow: hidden;
1019
- width: 100%;
1020
- color: var(--color-content-heading);
1021
- }
917
+ justify-content: center;
918
+ align-items: center;
919
+ width: 40px;
920
+ height: 40px;
921
+ border: transparent;
922
+ border-radius: var(--radius-full);
923
+ background-color: var(--color-alpha-light-strong);
924
+ position: relative;
925
+ cursor: pointer;
926
+ }
1022
927
 
1023
- .close-btn {
1024
- margin-left: 8px;
1025
- margin-top: 0;
1026
- flex-direction: column;
1027
- justify-content: start;
1028
- }
928
+ .wishlist-button:hover {
929
+ background-color: var(--color-alpha-light-stronger);
930
+ }
1029
931
 
1030
- .return-btn {
1031
- margin-right: 8px;
1032
- }
932
+ .wishlist-button:active {
933
+ background-color: var(--color-alpha-light-strongest);
1033
934
  }
1034
935
 
1035
- .panel:focus-visible,
1036
- .close-btn:focus-visible {
1037
- ${at}
936
+ .wishlist-button:focus-visible {
937
+ ${at};
1038
938
  }
1039
939
 
1040
- .content {
1041
- flex: 1 1 auto;
1042
- overflow-y: auto;
1043
- overflow-x: hidden;
1044
- padding: var(--spacing-xl);
940
+ .wishlist-button:hover svg path {
941
+ fill: var(--color-content-action-secondary);
942
+ }
1045
943
 
1046
- &.with-detail {
1047
- width: 100%;
1048
- height: 100%;
1049
- position: absolute;
1050
- top: 0;
1051
- left: 0;
1052
- background: var(--color-container-bg-white);
1053
- z-index: 3;
1054
- padding: var(--spacing-4-xs);
1055
- }
944
+ :host([status="filled"]) .wishlist-button svg path {
945
+ fill: var(--color-content-action-secondary);
1056
946
  }
1057
947
 
1058
- .footer {
1059
- flex: 0 0 auto;
1060
- padding: var(--spacing-xl);
1061
- border-top: var(--border-050) solid var(--color-border-tertiary);
1062
- display: flex;
1063
- flex-direction: column;
1064
- gap: var(--spacing-l);
1065
- justify-content: flex-start;
948
+ :host([status="empty"]) .wishlist-button svg path {
949
+ fill: var(--color-alpha-light-strong);
1066
950
  }
1067
951
 
1068
- /* Mobile */
1069
- @media (max-width: 767px) {
1070
- :host {
1071
- --side-panel-width: 100%;
1072
- --side-panel-max-width: none;
952
+ @media (hover: hover) and (pointer: fine) {
953
+ :host([status="empty"]) .wishlist-button:hover svg path {
954
+ fill: var(--color-content-action-secondary);
1073
955
  }
1074
956
  }
1075
957
 
1076
- /* Tablet */
1077
- @media (min-width: 768px) and (max-width: 1024px) {
1078
- :host {
1079
- --side-panel-width: 375px;
1080
- --side-panel-max-width: 375px;
1081
- }
958
+ .sr-only {
959
+ border: 0 !important;
960
+ clip: rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;
961
+ -webkit-clip-path: inset(50%) !important;
962
+ clip-path: inset(50%) !important;
963
+ height: 0.1rem !important;
964
+ margin: -0.1rem !important;
965
+ overflow: hidden !important;
966
+ padding: 0 !important;
967
+ position: absolute !important;
968
+ width: 0.1rem !important;
969
+ white-space: nowrap !important;
1082
970
  }
971
+ `;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`
972
+ <a
973
+ href="${o}"
974
+ target="${k(this.target||void 0)}"
975
+ @click="${this._handleClick}"
976
+ >
977
+ ${this.endIcon&&this.reverseEndIcon?l`
978
+ <o-icon-button
979
+ icon="chevronLeft"
980
+ bgstyle="${this.inverse?"none-light":"none-contrast"}"
981
+ size="xsmall"
982
+ aria-hidden="true"
983
+ type="span"
984
+ ></o-icon-button>
985
+ `:null}
986
+ <span class="link-text"><slot></slot></span>
987
+ ${this.endIcon&&!this.reverseEndIcon?l`
988
+ <o-icon-button
989
+ icon="chevronRight"
990
+ bgstyle="${this.inverse?"none-light":"none-contrast"}"
991
+ size="xsmall"
992
+ aria-hidden="true"
993
+ type="span"
994
+ ></o-icon-button>
995
+ `:null}
996
+ </a>
997
+ `}};F.styles=f`
998
+ :host([template="standard"]) a {
999
+ color: var(--color-content-action-secondary);
1000
+ font-size: var(--font-size-200);
1001
+ font-weight: var(--font-weight-400);
1002
+ line-height: var(--line-height-240);
1003
+ letter-spacing: var(--letter-spacing-400);
1004
+ font-family: var(--font-family-loccitane-serif);
1005
+ }
1083
1006
 
1084
- @media (min-width: 1025px) {
1085
- :host {
1086
- --side-panel-width: 100%;
1087
- --side-panel-max-width: 416px;
1088
- --font-size: var(--font-size-400);
1089
- --line-height: var(--line-height-280);
1090
- }
1007
+ :host([template="discret"]) a {
1008
+ color: var(--color-content-action-secondary);
1009
+ font-size: var(--font-size-100);
1010
+ font-weight: var(--font-weight-400);
1011
+ line-height: var(--line-height-160);
1012
+ letter-spacing: var(--letter-spacing-400);
1013
+ font-family: var(--font-family-loccitane-sans);
1014
+ }
1015
+
1016
+ :host([template="review"]) a {
1017
+ color: var(--color-content-action-secondary);
1018
+ font-size: var(--font-size-100);
1019
+ font-weight: var(--font-weight-500);
1020
+ line-height: var(--line-height-160);
1021
+ letter-spacing: var(--letter-spacing-400);
1022
+ font-family: var(--font-family-loccitane-sans);
1023
+ text-transform: uppercase;
1024
+ }
1025
+
1026
+ :host([inverse]) a {
1027
+ color: var(--color-container-action-tertiary-default);
1028
+ }
1029
+
1030
+ :host([endIcon]) a o-icon-button {
1031
+ margin-left: 2px;
1032
+ transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
1033
+ }
1034
+
1035
+ :host([endIcon][reverseEndIcon]) a o-icon-button {
1036
+ margin-right: 2px;
1037
+ transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
1038
+ }
1039
+
1040
+ :host([endIcon]) a {
1041
+ &:hover {
1042
+ o-icon-button {
1043
+ transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
1044
+ :host(:not([reverseEndIcon])) & {
1045
+ transform: translateX(4px);
1046
+ }
1047
+
1048
+ :host([reverseEndIcon]) & {
1049
+ transform: translateX(-4px);
1050
+ }
1051
+ }
1052
+ }
1053
+ }
1054
+
1055
+ :host a {
1056
+ position: relative;
1057
+ text-decoration: none;
1058
+ color: inherit;
1059
+ }
1060
+
1061
+ .link-text {
1062
+ position: relative;
1063
+ display: inline-block;
1064
+ }
1065
+
1066
+ .link-text::after {
1067
+ content: "";
1068
+ position: absolute;
1069
+ left: 0;
1070
+ bottom: 0;
1071
+ width: 100%;
1072
+ opacity: 1;
1073
+ height: 1px;
1074
+ background-color: currentColor;
1075
+ transition: opacity 0.3s ease, height 0.3s ease;
1076
+ pointer-events: none;
1077
+ }
1078
+
1079
+ :host a:hover .link-text::after {
1080
+ opacity: 0;
1081
+ height: 1px;
1082
+ }
1083
+ /* End of underline effect */
1084
+ `;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`
1085
+ <div class="rating">
1086
+ <div class="stars">
1087
+ ${o.map(t=>l`<span class="star">${C(N[t]??"")}</span>`)}
1088
+ </div>
1089
+ ${this.reviewCount!=null&&this.href!=null?l`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>`:null}
1090
+ </div>
1091
+ `}};st.styles=f`
1092
+ svg {
1093
+ width: 12px;
1094
+ height: 12px;
1091
1095
  }
1092
-
1093
- @keyframes slideInRight {
1094
- from {
1095
- transform: translateX(100%);
1096
- }
1097
- to {
1098
- transform: translateX(0%);
1099
- }
1096
+ .rating {
1097
+ display: flex;
1098
+ align-items: center;
1100
1099
  }
1101
-
1102
- @keyframes slideOutRight {
1103
- from {
1104
- transform: translateX(0%);
1105
- }
1106
- to {
1107
- transform: translateX(100%);
1108
- }
1100
+
1101
+ .stars {
1102
+ display: flex;
1103
+ gap: 2px;
1109
1104
  }
1110
1105
 
1111
- .slide-out-right {
1112
- animation: slideOutRight 0.3s ease-in forwards;
1106
+ .star {
1107
+ display: block;
1113
1108
  }
1114
-
1115
- .detail-view {
1116
- animation: slideInRight 0.3s ease-out both;
1109
+
1110
+ o-link {
1111
+ margin-left: 6px;
1112
+ font-family: var(--font-family-loccitane-sans);
1113
+ font-weight: var(--font-weight-500);
1114
+ font-size: var(--font-size-100);
1115
+ line-height: var(--line-height-160);
1116
+ letter-spacing: var(--letter-spacing-400);
1117
+ color: var(--color-content-action-secondary);
1117
1118
  }
1118
- .detail-content {
1119
- padding: var(--spacing-xl);
1119
+
1120
+ .review-link {
1121
+ text-decoration: underline;
1122
+ cursor: pointer;
1120
1123
  }
1121
- `;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 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`
1124
+ `;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`
1122
1125
  <o-icon-button
1123
1126
  icon="playerv"
1124
1127
  size="xsmall"