@florid-kit/components 0.9.15 → 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.
Files changed (4) hide show
  1. package/aria.d.ts +1 -1
  2. package/index.js +819 -819
  3. package/index.mjs +1495 -1495
  4. package/package.json +1 -1
package/index.js CHANGED
@@ -158,967 +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);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;
393
+ .icon-button:focus-visible {
394
+ ${at}
395
+ }
551
396
 
552
- &:not(.icon-wishlist) {
553
- svg {
554
- width: 24px;
555
- height: 24px;
556
- }
557
- }
397
+ .sr-only {
398
+ display: none;
558
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}
559
444
 
560
- .icon-button.none-light, .icon-button.none-contrast {
561
- background-color: transparent;
562
- width: auto;
563
- height: auto;
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>
564
456
 
565
- &.xsmall {
566
- svg {
567
- width: 8px;
568
- height: 8px;
569
- }
570
- }
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}
571
469
 
572
- &.small {
573
- svg {
574
- width: 16px;
575
- height: 16px;
576
- }
577
- }
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);
499
+ }
578
500
 
579
- &.medium {
580
- svg {
581
- width: 16px;
582
- height: 16px;
583
- }
584
- }
501
+ /* Hide content until it is initialized */
502
+ :host(:not([initialized])) .content {
503
+ display: none;
504
+ }
585
505
 
586
- &.large {
587
- svg {
588
- width: 24px;
589
- height: 24px;
590
- }
591
- }
506
+ /* hide the host completely until its initialized */
507
+ :host(:not([initialized])) {
508
+ display: none !important;
509
+ }
592
510
 
593
- &:disabled {
594
- background-color: transparent;
595
- }
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);
596
520
  }
597
521
 
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
- }
522
+ :host([open]) .overlay {
523
+ opacity: 1;
524
+ pointer-events: auto;
605
525
  }
606
526
 
607
- .icon-button.none-light.icon-wishlist svg path {
608
- fill: none;
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);
609
542
  }
610
543
 
611
- :host([status="filled"]) .icon-button.none-light.icon-wishlist svg path {
612
- fill: var(--color-content-action-primary);
544
+ :host([open]) .panel {
545
+ transform: translateX(0%);
613
546
  }
614
547
 
615
- .icon-button.background-light {
616
- background-color: var(--color-alpha-light-strong);
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);
617
554
 
618
- &:hover:not(:disabled) {
619
- background-color: var(--color-alpha-light-stronger);
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);
620
570
  }
621
571
 
622
- &:active:not(:disabled) {
623
- background-color: var(--color-alpha-light-strongest);
572
+ .close-btn {
573
+ margin-left: 8px;
574
+ margin-top: 0;
575
+ flex-direction: column;
576
+ justify-content: start;
624
577
  }
625
- }
626
-
627
- .icon-button.background-contrast {
628
- background-color: var(--color-container-action-tertiary-default);
629
578
 
630
- &:hover:not(:disabled) {
631
- background-color: var(--color-container-action-tertiary-hover);
579
+ .return-btn {
580
+ margin-right: 8px;
632
581
  }
582
+ }
633
583
 
634
- &:active:not(:disabled) {
635
- background-color: var(--color-container-action-tertiary-pressed);
636
- }
584
+ .panel:focus-visible,
585
+ .close-btn:focus-visible {
586
+ ${at}
637
587
  }
638
588
 
639
- .icon-button.ghost-light {
640
- background-color: transparent;
589
+ .content {
590
+ flex: 1 1 auto;
591
+ overflow-y: auto;
592
+ overflow-x: hidden;
593
+ padding: var(--spacing-xl);
641
594
 
642
- svg {
643
- path {
644
- stroke: var(--color-content-action-primary);
645
- fill: var(--color-content-action-primary);
646
- }
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);
647
604
  }
605
+ }
648
606
 
649
- &:hover:not(:disabled) {
650
- background-color: var(--color-alpha-light-lightest);
651
- }
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
+ }
652
616
 
653
- &:active:not(:disabled) {
654
- background-color: var(--color-alpha-light-light);
617
+ /* Mobile */
618
+ @media (max-width: 767px) {
619
+ :host {
620
+ --side-panel-width: 100%;
621
+ --side-panel-max-width: none;
655
622
  }
656
623
  }
657
624
 
658
- .icon-button.ghost-contrast {
659
- background-color: transparent;
660
-
661
- &:hover:not(:disabled) {
662
- background-color: var(--color-alpha-light-medium);
625
+ /* Tablet */
626
+ @media (min-width: 768px) and (max-width: 1024px) {
627
+ :host {
628
+ --side-panel-width: 375px;
629
+ --side-panel-max-width: 375px;
663
630
  }
631
+ }
664
632
 
665
- &:active:not(:disabled) {
666
- background-color: var(--color-alpha-light-strongest);
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);
667
639
  }
668
640
  }
669
-
670
- .icon-button:disabled {
671
- background-color: var(--color-container-disabled);
672
- cursor: default;
673
-
674
- svg {
675
- fill: var(--color-content-disabled);
676
-
677
- path {
678
- fill: var(--color-content-disabled);
679
- }
641
+
642
+ @keyframes slideInRight {
643
+ from {
644
+ transform: translateX(100%);
645
+ }
646
+ to {
647
+ transform: translateX(0%);
680
648
  }
681
649
  }
682
-
683
- .icon-button:focus-visible {
684
- ${at}
650
+
651
+ @keyframes slideOutRight {
652
+ from {
653
+ transform: translateX(0%);
654
+ }
655
+ to {
656
+ transform: translateX(100%);
657
+ }
685
658
  }
686
659
 
687
- .sr-only {
688
- display: none;
660
+ .slide-out-right {
661
+ animation: slideOutRight 0.3s ease-in forwards;
689
662
  }
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
- }
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
+ }
725
705
 
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
- }
706
+ :host(.a--tabfocus) {
707
+ outline: none !important;
708
+ }
734
709
 
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
- }
710
+ :host([fullwidth]) {
711
+ width: 100%;
712
+ }
744
713
 
745
- :host([inverse]) a {
746
- color: var(--color-container-action-tertiary-default);
747
- }
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
+ }
748
726
 
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
- }
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
+ }
753
739
 
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
- }
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
+ }
758
751
 
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
- }
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
+ }
766
763
 
767
- :host([reverseEndIcon]) & {
768
- transform: translateX(-4px);
769
- }
770
- }
771
- }
772
- }
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
+ }
773
771
 
774
- :host a {
775
- position: relative;
776
- text-decoration: none;
777
- color: inherit;
778
- }
772
+ :host([disabled][variant="secondary"]) {
773
+ --button-border: var(--color-border-secondary);
774
+ }
779
775
 
780
- .link-text {
781
- position: relative;
782
- display: inline-block;
783
- }
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;
784
796
 
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
- }
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
+ }
797
804
 
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
- }
805
+ .button:hover:not([disabled]) {
806
+ background-color: var(--button-bg-hover);
807
+ color: var(--button-text-hover);
808
+ }
819
809
 
820
- .stars {
821
- display: flex;
822
- gap: 2px;
823
- }
810
+ .button:active:not([disabled]) {
811
+ background-color: var(--button-bg-pressed);
812
+ }
824
813
 
825
- .star {
826
- display: block;
827
- }
814
+ .button:focus-visible {
815
+ ${at};
816
+ }
828
817
 
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
- }
818
+ span.text + span.text::before {
819
+ content: "•";
820
+ margin-right: 8px;
821
+ }
838
822
 
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}
823
+ .icon-start,
824
+ .icon-end {
825
+ display: inline-flex;
826
+ align-items: center;
895
827
 
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>
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
+ }
907
842
 
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}
843
+ :host([variant="tertiary"][fullwidth][endIcon]) .button {
844
+ justify-content: space-between;
845
+ }
920
846
 
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
- }
847
+ .button span {
848
+ display: inline-flex;
849
+ align-items: center;
850
+ }
951
851
 
952
- /* Hide content until it is initialized */
953
- :host(:not([initialized])) .content {
954
- display: none;
955
- }
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
+ }
956
860
 
957
- /* hide the host completely until its initialized */
958
- :host(:not([initialized])) {
959
- display: none !important;
960
- }
861
+ :host([underlined]) span:not([class*="icon-"]),
862
+ :host([underlined]) .text,
863
+ :host([underlined]:not([text])) .button slot {
864
+ position: relative;
961
865
 
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
- }
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
+ }
972
876
 
973
- :host([open]) .overlay {
974
- opacity: 1;
975
- pointer-events: auto;
976
- }
877
+ :host([underlined]:not([text])) .button slot {
878
+ display: inline-flex;
879
+ gap: 8px;
880
+ }
977
881
 
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
- }
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
+ }
994
887
 
995
- :host([open]) .panel {
996
- transform: translateX(0%);
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;
997
910
  }
998
911
 
999
- .header {
1000
- flex: 0 0 auto;
912
+ .wishlist-button {
1001
913
  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
- }
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
+ }
1022
924
 
1023
- .close-btn {
1024
- margin-left: 8px;
1025
- margin-top: 0;
1026
- flex-direction: column;
1027
- justify-content: start;
1028
- }
925
+ .wishlist-button:hover {
926
+ background-color: var(--color-alpha-light-stronger);
927
+ }
1029
928
 
1030
- .return-btn {
1031
- margin-right: 8px;
1032
- }
929
+ .wishlist-button:active {
930
+ background-color: var(--color-alpha-light-strongest);
1033
931
  }
1034
932
 
1035
- .panel:focus-visible,
1036
- .close-btn:focus-visible {
1037
- ${at}
933
+ .wishlist-button:focus-visible {
934
+ ${at};
1038
935
  }
1039
936
 
1040
- .content {
1041
- flex: 1 1 auto;
1042
- overflow-y: auto;
1043
- overflow-x: hidden;
1044
- padding: var(--spacing-xl);
937
+ .wishlist-button:hover svg path {
938
+ fill: var(--color-content-action-secondary);
939
+ }
1045
940
 
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
- }
941
+ :host([status="filled"]) .wishlist-button svg path {
942
+ fill: var(--color-content-action-secondary);
1056
943
  }
1057
944
 
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;
945
+ :host([status="empty"]) .wishlist-button svg path {
946
+ fill: var(--color-alpha-light-strong);
1066
947
  }
1067
948
 
1068
- /* Mobile */
1069
- @media (max-width: 767px) {
1070
- :host {
1071
- --side-panel-width: 100%;
1072
- --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);
1073
952
  }
1074
953
  }
1075
954
 
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
- }
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;
1082
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
+ }
1083
1003
 
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
- }
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;
1091
1092
  }
1092
-
1093
- @keyframes slideInRight {
1094
- from {
1095
- transform: translateX(100%);
1096
- }
1097
- to {
1098
- transform: translateX(0%);
1099
- }
1093
+ .rating {
1094
+ display: flex;
1095
+ align-items: center;
1100
1096
  }
1101
-
1102
- @keyframes slideOutRight {
1103
- from {
1104
- transform: translateX(0%);
1105
- }
1106
- to {
1107
- transform: translateX(100%);
1108
- }
1097
+
1098
+ .stars {
1099
+ display: flex;
1100
+ gap: 2px;
1109
1101
  }
1110
1102
 
1111
- .slide-out-right {
1112
- animation: slideOutRight 0.3s ease-in forwards;
1103
+ .star {
1104
+ display: block;
1113
1105
  }
1114
-
1115
- .detail-view {
1116
- animation: slideInRight 0.3s ease-out both;
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);
1117
1115
  }
1118
- .detail-content {
1119
- padding: var(--spacing-xl);
1116
+
1117
+ .review-link {
1118
+ text-decoration: underline;
1119
+ cursor: pointer;
1120
1120
  }
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`
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`
1122
1122
  <o-icon-button
1123
1123
  icon="playerv"
1124
1124
  size="xsmall"