@florid-kit/components 0.10.12 → 0.10.14

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.
@@ -11,7 +11,9 @@ export declare class MiniTile extends LitElement {
11
11
  fullwidth: boolean;
12
12
  tagText: string;
13
13
  onClickTile?: () => void;
14
+ onClickIcon?: () => void;
14
15
  private onClick;
16
+ private onClickIcons;
15
17
  get icons(): import('lit').TemplateResult<1>;
16
18
  static styles: import('lit').CSSResult;
17
19
  render(): import('lit').TemplateResult<1>;
package/index.js CHANGED
@@ -176,7 +176,7 @@
176
176
  * @license
177
177
  * Copyright 2018 Google LLC
178
178
  * SPDX-License-Identifier: BSD-3-Clause
179
- */const P=o=>o??d;var jo=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,F=(o,t,e,r)=>{for(var i=r>1?void 0:r?Fo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&jo(t,e,i),i};let B=class extends p{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=Z[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"'),r=this.showSrLabel?l`<span class="sr-only">${this.srLabel}</span>`:null,i=this.showSrLabel?null:"icon";return l`
179
+ */const P=o=>o??d;var jo=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,R=(o,t,e,r)=>{for(var i=r>1?void 0:r?Fo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&jo(t,e,i),i};let B=class extends p{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=Z[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"'),r=this.showSrLabel?l`<span class="sr-only">${this.srLabel}</span>`:null,i=this.showSrLabel?null:"icon";return l`
180
180
  ${this.type==="span"?l`
181
181
  <span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
182
182
  ${S(e)}
@@ -403,7 +403,7 @@
403
403
  .sr-only {
404
404
  display: none;
405
405
  }
406
- `;F([a({type:String,reflect:!0})],B.prototype,"bgstyle",2);F([a({type:String,reflect:!0})],B.prototype,"size",2);F([a({type:String,reflect:!0})],B.prototype,"status",2);F([a({type:String,reflect:!0})],B.prototype,"type",2);F([a({type:String})],B.prototype,"strokewidth",2);F([a({type:String})],B.prototype,"icon",2);F([a({type:Boolean,reflect:!0})],B.prototype,"disabled",2);F([a({type:Boolean})],B.prototype,"showSrLabel",2);F([a({type:String})],B.prototype,"srLabel",2);B=F([g("o-icon-button")],B);var Ro=Object.defineProperty,Uo=Object.getOwnPropertyDescriptor,b=(o,t,e,r)=>{for(var i=r>1?void 0:r?Uo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&Ro(t,e,i),i};let u=class extends p{constructor(){super(...arguments),this.open=!1,this.showHeader=!0,this.showFooter=!1,this.showHeaderStartIcon=!1,this.headerTitle="",this.headerTitleClassName="panel-title",this.labelDialog="",this.addToBagProductCount="",this.closeButtonLabel="Close the modal",this.goBackButtonLabel="Go back to",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,r;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=(r=this.shadowRoot)==null?void 0:r.querySelector(".detail-view");i&&i.setAttribute("fromelement",this._detailOriginClass)}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 r=this.renderRoot.querySelector(".content"),i=async()=>{this.showDetail=!1,this.isHidingDetail=!1,this.showHeaderStartIcon=!1,await this.updateComplete,this._restoreFocusToOrigin()};if(r){this.showHeaderStartIcon=!1;const n=()=>{this.showDetail=!1,this.isHidingDetail=!1,r.removeEventListener("animationend",n),i()};r.addEventListener("animationend",n)}else this.showDetail=!1,this.isHidingDetail=!1,this.showHeaderStartIcon=!1;return}this.closePanel()}}focusFirstInPanel(){var t,e,r;(r=this.getFocusableElements().map(i=>this.resolveFocusable(i)).filter(i=>!!i&&!i.hasAttribute("disabled"))[0]??((t=this.shadowRoot)==null?void 0:t.querySelector(".close-btn"))??((e=this.shadowRoot)==null?void 0:e.querySelector(".panel")))==null||r.focus({preventScroll:!0})}resolveFocusable(o){var e;const t=o.tagName.toLowerCase();return t==="o-icon-button"||t==="o-button"?((e=o.shadowRoot)==null?void 0:e.querySelector("button, .button"))??o:o}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),this.addEventListener("focusin",o=>{o.composedPath()[0]===this&&this.focusFirstInPanel()})}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 i,n,s,c,h;await this.updateComplete;const o=this.getDeepActiveElement(document);if(o&&o!==document.body)try{o.blur()}catch{}await new Promise(requestAnimationFrame);const t=(i=this.shadowRoot)==null?void 0:i.querySelector(".detail-view .return-btn");if(!t)return;t.updateComplete&&await t.updateComplete,(c=(s=((n=t.shadowRoot)==null?void 0:n.querySelector("button"))??t)==null?void 0:s.focus)==null||c.call(s,{preventScroll:!0});const r=(h=this.shadowRoot)==null?void 0:h.querySelector('.panel[role="dialog"]');r&&r.setAttribute("aria-label",this.headerTitle)}_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 r=this.renderRoot.querySelector(".o-whats-inside--content p");r==null||r.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 n=[i.matches(u.focusablesSelector)?i:[]];if(!["o-icon-button","o-button"].includes(i.tagName.toLowerCase())){const c=Array.from(i instanceof HTMLSlotElement?i.assignedElements({flatten:!0}):[]).filter(t).flatMap(e),h=Array.from(((s=i.shadowRoot)==null?void 0:s.querySelectorAll("*"))||[]).filter(t).flatMap(e);n.push(...c,...h)}return n.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;if(this.showHeader){const r=(t=this.shadowRoot)==null?void 0:t.querySelector(".panel .close-btn"),i=this.resolveFocusable(r);(e=i==null?void 0:i.focus)==null||e.call(i,{preventScroll:!0})}else this.focusFirstInPanel()}),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0}))}closePanel(){var t,e,r,i,n;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=(r=(e=this.previousFocusedElement.shadowRoot)==null?void 0:e.querySelector(".button"))==null?void 0:r.focus)==null||i.call(r):(n=this.previousFocusedElement)==null||n.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`
406
+ `;R([a({type:String,reflect:!0})],B.prototype,"bgstyle",2);R([a({type:String,reflect:!0})],B.prototype,"size",2);R([a({type:String,reflect:!0})],B.prototype,"status",2);R([a({type:String,reflect:!0})],B.prototype,"type",2);R([a({type:String})],B.prototype,"strokewidth",2);R([a({type:String})],B.prototype,"icon",2);R([a({type:Boolean,reflect:!0})],B.prototype,"disabled",2);R([a({type:Boolean})],B.prototype,"showSrLabel",2);R([a({type:String})],B.prototype,"srLabel",2);B=R([g("o-icon-button")],B);var Ro=Object.defineProperty,Uo=Object.getOwnPropertyDescriptor,b=(o,t,e,r)=>{for(var i=r>1?void 0:r?Uo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&Ro(t,e,i),i};let u=class extends p{constructor(){super(...arguments),this.open=!1,this.showHeader=!0,this.showFooter=!1,this.showHeaderStartIcon=!1,this.headerTitle="",this.headerTitleClassName="panel-title",this.labelDialog="",this.addToBagProductCount="",this.closeButtonLabel="Close the modal",this.goBackButtonLabel="Go back to",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,r;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=(r=this.shadowRoot)==null?void 0:r.querySelector(".detail-view");i&&i.setAttribute("fromelement",this._detailOriginClass)}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 r=this.renderRoot.querySelector(".content"),i=async()=>{this.showDetail=!1,this.isHidingDetail=!1,this.showHeaderStartIcon=!1,await this.updateComplete,this._restoreFocusToOrigin()};if(r){this.showHeaderStartIcon=!1;const n=()=>{this.showDetail=!1,this.isHidingDetail=!1,r.removeEventListener("animationend",n),i()};r.addEventListener("animationend",n)}else this.showDetail=!1,this.isHidingDetail=!1,this.showHeaderStartIcon=!1;return}this.closePanel()}}focusFirstInPanel(){var t,e,r;(r=this.getFocusableElements().map(i=>this.resolveFocusable(i)).filter(i=>!!i&&!i.hasAttribute("disabled"))[0]??((t=this.shadowRoot)==null?void 0:t.querySelector(".close-btn"))??((e=this.shadowRoot)==null?void 0:e.querySelector(".panel")))==null||r.focus({preventScroll:!0})}resolveFocusable(o){var e;const t=o.tagName.toLowerCase();return t==="o-icon-button"||t==="o-button"?((e=o.shadowRoot)==null?void 0:e.querySelector("button, .button"))??o:o}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),this.addEventListener("focusin",o=>{o.composedPath()[0]===this&&this.focusFirstInPanel()})}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 i,n,s,c,h;await this.updateComplete;const o=this.getDeepActiveElement(document);if(o&&o!==document.body)try{o.blur()}catch{}await new Promise(requestAnimationFrame);const t=(i=this.shadowRoot)==null?void 0:i.querySelector(".detail-view .return-btn");if(!t)return;t.updateComplete&&await t.updateComplete,(c=(s=((n=t.shadowRoot)==null?void 0:n.querySelector("button"))??t)==null?void 0:s.focus)==null||c.call(s,{preventScroll:!0});const r=(h=this.shadowRoot)==null?void 0:h.querySelector('.panel[role="dialog"]');r&&r.setAttribute("aria-label",this.headerTitle)}_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 r=this.renderRoot.querySelector(".o-whats-inside--content p");r==null||r.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 n=[i.matches(u.focusablesSelector)?i:[]];if(!["o-icon-button","o-button"].includes(i.tagName.toLowerCase())){const c=Array.from(i instanceof HTMLSlotElement?i.assignedElements({flatten:!0}):[]).filter(t).flatMap(e),h=Array.from(((s=i.shadowRoot)==null?void 0:s.querySelectorAll("*"))||[]).filter(t).flatMap(e);n.push(...c,...h)}return n.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;if(this.showHeader){const r=(t=this.shadowRoot)==null?void 0:t.querySelector(".panel .close-btn"),i=this.resolveFocusable(r);(e=i==null?void 0:i.focus)==null||e.call(i,{preventScroll:!0})}else this.focusFirstInPanel()}),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0}))}closePanel(){var t,e,r,i,n;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=(r=(e=this.previousFocusedElement.shadowRoot)==null?void 0:e.querySelector(".button"))==null?void 0:r.focus)==null||i.call(r):(n=this.previousFocusedElement)==null||n.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`
407
407
  <div tabindex="-1" class="header ${this.showDetail?"detail-view-header":""}">
408
408
  ${this.showHeaderStartIcon?l`
409
409
  <o-icon-button
@@ -1095,21 +1095,6 @@
1095
1095
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
1096
1096
  }
1097
1097
 
1098
- :host([endIcon]) a {
1099
- &:hover {
1100
- o-icon-button {
1101
- transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
1102
- :host(:not([reverseEndIcon])) & {
1103
- transform: translateX(4px);
1104
- }
1105
-
1106
- :host([reverseEndIcon]) & {
1107
- transform: translateX(-4px);
1108
- }
1109
- }
1110
- }
1111
- }
1112
-
1113
1098
  :host a {
1114
1099
  position: relative;
1115
1100
  text-decoration: none;
@@ -1134,11 +1119,21 @@
1134
1119
  pointer-events: none;
1135
1120
  }
1136
1121
 
1137
- :host a:hover .link-text::after {
1138
- opacity: 0;
1139
- height: 1px;
1122
+ @media (hover: hover) and (pointer: fine) {
1123
+ :host a:hover .link-text::after {
1124
+ opacity: 0;
1125
+ height: 1px;
1126
+ }
1127
+
1128
+ :host([endIcon]) a:hover o-icon-button {
1129
+ transform: translateX(4px);
1130
+ transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
1131
+ }
1132
+
1133
+ :host([endIcon][reverseEndIcon]) a:hover o-icon-button {
1134
+ transform: translateX(-4px);
1135
+ }
1140
1136
  }
1141
- /* End of underline effect */
1142
1137
  `;lt([a({type:String})],K.prototype,"href",2);lt([a({type:String})],K.prototype,"target",2);lt([a({type:String,reflect:!0})],K.prototype,"template",2);lt([a({type:Boolean,reflect:!0})],K.prototype,"inverse",2);lt([a({type:Boolean,reflect:!0})],K.prototype,"endIcon",2);lt([a({type:Boolean,reflect:!0})],K.prototype,"reverseEndIcon",2);K=lt([g("o-link")],K);var Xo=Object.defineProperty,Yo=Object.getOwnPropertyDescriptor,Dt=(o,t,e,r)=>{for(var i=r>1?void 0:r?Yo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&Xo(t,e,i),i};let pt=class extends p{constructor(){super(...arguments),this.rating=0}getStarKeys(){const o=[];for(let t=0;t<5;t++){const e=this.rating-t;let r;e>=1?r=100:e<=0?r=0:r=Math.round(e*100/25)*25,o.push(`star-${r}`)}return o}render(){const o=this.getStarKeys();return l`
1143
1138
  <div class="rating">
1144
1139
  <div class="stars">
@@ -1179,7 +1174,7 @@
1179
1174
  text-decoration: underline;
1180
1175
  cursor: pointer;
1181
1176
  }
1182
- `;Dt([a({type:Number})],pt.prototype,"rating",2);Dt([a({type:String})],pt.prototype,"reviewCount",2);Dt([a({type:String})],pt.prototype,"href",2);pt=Dt([g("o-rating")],pt);var Jo=Object.defineProperty,Qo=Object.getOwnPropertyDescriptor,ot=(o,t,e,r)=>{for(var i=r>1?void 0:r?Qo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&Jo(t,e,i),i};let j=class extends p{constructor(){super(...arguments),this.thumbnails=[],this.activeIndex=0,this.disabledIndexes=[],this.maxWidth="100%",this.altressource="visual",this.focusedIndex=0,this.playerIconTemplate=l`
1177
+ `;Dt([a({type:Number})],pt.prototype,"rating",2);Dt([a({type:String})],pt.prototype,"reviewCount",2);Dt([a({type:String})],pt.prototype,"href",2);pt=Dt([g("o-rating")],pt);var Jo=Object.defineProperty,Qo=Object.getOwnPropertyDescriptor,ot=(o,t,e,r)=>{for(var i=r>1?void 0:r?Qo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&Jo(t,e,i),i};let F=class extends p{constructor(){super(...arguments),this.thumbnails=[],this.activeIndex=0,this.disabledIndexes=[],this.maxWidth="100%",this.altressource="visual",this.focusedIndex=0,this.playerIconTemplate=l`
1183
1178
  <o-icon-button
1184
1179
  icon="playerv"
1185
1180
  size="xsmall"
@@ -1208,7 +1203,7 @@
1208
1203
  </li>
1209
1204
  `})}
1210
1205
  </ul>
1211
- `}};j.styles=f`
1206
+ `}};F.styles=f`
1212
1207
  :host {
1213
1208
  display: flex;
1214
1209
  gap: 5px;
@@ -1313,7 +1308,7 @@
1313
1308
  height: 0;
1314
1309
  width: 0;
1315
1310
  }
1316
- `;ot([a({type:Array})],j.prototype,"thumbnails",2);ot([a({type:Number})],j.prototype,"activeIndex",2);ot([a({type:Array})],j.prototype,"disabledIndexes",2);ot([a({type:String})],j.prototype,"maxWidth",2);ot([a({type:String})],j.prototype,"altressource",2);ot([a({type:Object})],j.prototype,"swiperInstance",2);ot([W()],j.prototype,"focusedIndex",2);j=ot([g("thumbnail-navigation")],j);var ti=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,te=(o,t,e,r)=>{for(var i=r>1?void 0:r?ei(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&ti(t,e,i),i};let wt=class extends p{constructor(){super(...arguments),this.type="",this.bgstyle="background-white"}render(){return l`
1311
+ `;ot([a({type:Array})],F.prototype,"thumbnails",2);ot([a({type:Number})],F.prototype,"activeIndex",2);ot([a({type:Array})],F.prototype,"disabledIndexes",2);ot([a({type:String})],F.prototype,"maxWidth",2);ot([a({type:String})],F.prototype,"altressource",2);ot([a({type:Object})],F.prototype,"swiperInstance",2);ot([W()],F.prototype,"focusedIndex",2);F=ot([g("thumbnail-navigation")],F);var ti=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,te=(o,t,e,r)=>{for(var i=r>1?void 0:r?ei(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&ti(t,e,i),i};let wt=class extends p{constructor(){super(...arguments),this.type="",this.bgstyle="background-white"}render(){return l`
1317
1312
  <span class="tag ${this.bgstyle}"><slot></slot></span>
1318
1313
  `}};wt.styles=f`
1319
1314
  .tag {
@@ -1709,7 +1704,7 @@
1709
1704
  background-color: var(--color-container-action-primary-pressed);
1710
1705
  }
1711
1706
  }
1712
- `;Nt=ai([g("o-dots")],Nt);var li=Object.defineProperty,ci=Object.getOwnPropertyDescriptor,R=(o,t,e,r)=>{for(var i=r>1?void 0:r?ci(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&li(t,e,i),i};let z=class extends p{constructor(){super(...arguments),this.options=[],this.value="",this.name="",this.additionaltext="+X variant(s)",this.disabled=!1,this.width="100%",this.open=!1,this.activeIndex=-1,this.menuWidth="",this._handleOutsideClick=o=>{this.contains(o.target)||(this.open=!1,this.activeIndex=-1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this._handleOutsideClick),super.disconnectedCallback()}toggle(){var o;if(!this.disabled){if(this.open=!this.open,this.activeIndex=this.open?this.options.findIndex(t=>t.value===this.value):-1,this.open&&this.width==="auto"){const t=(o=this.renderRoot)==null?void 0:o.querySelector("button");t&&(this.menuWidth=`${t.getBoundingClientRect().width}px`)}this.open&&this.updateComplete.then(()=>this._focusActiveOption())}}_focusActiveOption(){var t;const o=(t=this.renderRoot)==null?void 0:t.querySelector(`#option-${this.activeIndex}`);o==null||o.focus()}selectOption(o){this.value=o.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,url:o.url}})),this.open=!1,this.activeIndex=-1}handleKeydown(o){if(this.disabled){o.preventDefault();return}if(!this.open){(o.key==="ArrowDown"||o.key==="ArrowUp")&&(o.preventDefault(),this.open=!0,this.activeIndex=this.options.findIndex(t=>t.value===this.value),this.updateComplete.then(()=>this._focusActiveOption()));return}switch(o.key){case"ArrowDown":o.preventDefault(),this.activeIndex=(this.activeIndex+1)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"ArrowUp":o.preventDefault(),this.activeIndex=(this.activeIndex-1+this.options.length)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"Home":o.preventDefault(),this.activeIndex=0,this.updateComplete.then(()=>this._focusActiveOption());break;case"End":o.preventDefault(),this.activeIndex=this.options.length-1,this.updateComplete.then(()=>this._focusActiveOption());break;case"Enter":o.preventDefault(),this.activeIndex>=0&&this.selectOption(this.options[this.activeIndex]);break;case"Escape":o.preventDefault(),this.open=!1,this.activeIndex=-1;break}}updated(){this.options.length>0&&(this.options.some(t=>t.value===this.value)||(this.value=this.options[0].value))}render(){const o=Z.checkstroke.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"'),t=this.options.find(e=>e.value===this.value);return l`
1707
+ `;Nt=ai([g("o-dots")],Nt);var li=Object.defineProperty,ci=Object.getOwnPropertyDescriptor,U=(o,t,e,r)=>{for(var i=r>1?void 0:r?ci(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&li(t,e,i),i};let z=class extends p{constructor(){super(...arguments),this.options=[],this.value="",this.name="",this.additionaltext="+X variant(s)",this.disabled=!1,this.width="100%",this.open=!1,this.activeIndex=-1,this.menuWidth="",this._handleOutsideClick=o=>{this.contains(o.target)||(this.open=!1,this.activeIndex=-1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this._handleOutsideClick),super.disconnectedCallback()}toggle(){var o;if(!this.disabled){if(this.open=!this.open,this.activeIndex=this.open?this.options.findIndex(t=>t.value===this.value):-1,this.open&&this.width==="auto"){const t=(o=this.renderRoot)==null?void 0:o.querySelector("button");t&&(this.menuWidth=`${t.getBoundingClientRect().width}px`)}this.open&&this.updateComplete.then(()=>this._focusActiveOption())}}_focusActiveOption(){var t;const o=(t=this.renderRoot)==null?void 0:t.querySelector(`#option-${this.activeIndex}`);o==null||o.focus()}selectOption(o){this.value=o.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,url:o.url}})),this.open=!1,this.activeIndex=-1}handleKeydown(o){if(this.disabled){o.preventDefault();return}if(!this.open){(o.key==="ArrowDown"||o.key==="ArrowUp")&&(o.preventDefault(),this.open=!0,this.activeIndex=this.options.findIndex(t=>t.value===this.value),this.updateComplete.then(()=>this._focusActiveOption()));return}switch(o.key){case"ArrowDown":o.preventDefault(),this.activeIndex=(this.activeIndex+1)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"ArrowUp":o.preventDefault(),this.activeIndex=(this.activeIndex-1+this.options.length)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"Home":o.preventDefault(),this.activeIndex=0,this.updateComplete.then(()=>this._focusActiveOption());break;case"End":o.preventDefault(),this.activeIndex=this.options.length-1,this.updateComplete.then(()=>this._focusActiveOption());break;case"Enter":o.preventDefault(),this.activeIndex>=0&&this.selectOption(this.options[this.activeIndex]);break;case"Escape":o.preventDefault(),this.open=!1,this.activeIndex=-1;break}}updated(){this.options.length>0&&(this.options.some(t=>t.value===this.value)||(this.value=this.options[0].value))}render(){const o=Z.checkstroke.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"'),t=this.options.find(e=>e.value===this.value);return l`
1713
1708
  <button
1714
1709
  role="combobox"
1715
1710
  aria-haspopup="listbox"
@@ -1946,7 +1941,7 @@
1946
1941
  input[type="hidden"] {
1947
1942
  display: none;
1948
1943
  }
1949
- `;R([a({type:Array,reflect:!0})],z.prototype,"options",2);R([a({type:String,reflect:!0})],z.prototype,"value",2);R([a({type:String,reflect:!0})],z.prototype,"name",2);R([a({type:String,reflect:!0})],z.prototype,"additionaltext",2);R([a({type:Boolean,reflect:!0})],z.prototype,"disabled",2);R([a({type:String,reflect:!0})],z.prototype,"width",2);R([W()],z.prototype,"open",2);R([W()],z.prototype,"activeIndex",2);R([W()],z.prototype,"menuWidth",2);z=R([g("o-dropdown-variant")],z);/**
1944
+ `;U([a({type:Array,reflect:!0})],z.prototype,"options",2);U([a({type:String,reflect:!0})],z.prototype,"value",2);U([a({type:String,reflect:!0})],z.prototype,"name",2);U([a({type:String,reflect:!0})],z.prototype,"additionaltext",2);U([a({type:Boolean,reflect:!0})],z.prototype,"disabled",2);U([a({type:String,reflect:!0})],z.prototype,"width",2);U([W()],z.prototype,"open",2);U([W()],z.prototype,"activeIndex",2);U([W()],z.prototype,"menuWidth",2);z=U([g("o-dropdown-variant")],z);/**
1950
1945
  * @license
1951
1946
  * Copyright 2018 Google LLC
1952
1947
  * SPDX-License-Identifier: BSD-3-Clause
@@ -2144,7 +2139,7 @@
2144
2139
  flex-wrap: wrap;
2145
2140
  gap: var(--spacing-s);
2146
2141
  }
2147
- `;ie([a({reflect:!0})],_t.prototype,"name",2);ie([a({reflect:!0})],_t.prototype,"value",2);_t=ie([g("o-chipset")],_t);var mi=Object.defineProperty,xi=Object.getOwnPropertyDescriptor,U=(o,t,e,r)=>{for(var i=r>1?void 0:r?xi(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&mi(t,e,i),i};const wi=Xt(p);let I=class extends wi{constructor(){super(...arguments),this.name="",this.value="",this.type="",this.text="",this.selected=!1,this.disabled=!1,this.fullwidth=!1,this.crossIconName="cross",this.strikethroughImgName="strikeDiagonal"}handleClick(o){if(o instanceof KeyboardEvent&&o.key!=="Enter"&&o.key!==" ")return;this.selected=!this.selected;const t={selected:this.selected},e=new CustomEvent("selected",{detail:t,bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(e),e.defaultPrevented&&o.preventDefault(),this.selected=t.selected}crossIcon(){const o=Z[this.crossIconName].replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"').replace(/stroke=[#"'a-z1-9]*/gi,"");return l`<span class="cross-icon">${S(o)}</span>`}strikeThroughImg(){const o=Lo[this.strikethroughImgName].replace("<svg",'<svg aria-hidden="true" focusable="false" part="strikethrough"').replace(/stroke=[#"'a-z1-9]*/gi,"");return S(o)}render(){const o=this.text;return l`${this.type==="link"?l`
2142
+ `;ie([a({reflect:!0})],_t.prototype,"name",2);ie([a({reflect:!0})],_t.prototype,"value",2);_t=ie([g("o-chipset")],_t);var mi=Object.defineProperty,xi=Object.getOwnPropertyDescriptor,N=(o,t,e,r)=>{for(var i=r>1?void 0:r?xi(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&mi(t,e,i),i};const wi=Xt(p);let I=class extends wi{constructor(){super(...arguments),this.name="",this.value="",this.type="",this.text="",this.selected=!1,this.disabled=!1,this.fullwidth=!1,this.crossIconName="cross",this.strikethroughImgName="strikeDiagonal"}handleClick(o){if(o instanceof KeyboardEvent&&o.key!=="Enter"&&o.key!==" ")return;this.selected=!this.selected;const t={selected:this.selected},e=new CustomEvent("selected",{detail:t,bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(e),e.defaultPrevented&&o.preventDefault(),this.selected=t.selected}crossIcon(){const o=Z[this.crossIconName].replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"').replace(/stroke=[#"'a-z1-9]*/gi,"");return l`<span class="cross-icon">${S(o)}</span>`}strikeThroughImg(){const o=Lo[this.strikethroughImgName].replace("<svg",'<svg aria-hidden="true" focusable="false" part="strikethrough"').replace(/stroke=[#"'a-z1-9]*/gi,"");return S(o)}render(){const o=this.text;return l`${this.type==="link"?l`
2148
2143
  <a role="button" tabindex="0" class="button" href=${this.href} ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}
2149
2144
  aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
2150
2145
  ${o?l`
@@ -2289,156 +2284,163 @@
2289
2284
  stroke-linecap: round;
2290
2285
  }
2291
2286
  }
2292
- `;U([a({reflect:!0})],I.prototype,"name",2);U([a({reflect:!0})],I.prototype,"value",2);U([a({type:String,reflect:!0})],I.prototype,"type",2);U([a({type:String,reflect:!0})],I.prototype,"href",2);U([a({type:String,reflect:!0,attribute:"data-href"})],I.prototype,"dataHref",2);U([a({type:String})],I.prototype,"text",2);U([a({type:Boolean,reflect:!0})],I.prototype,"selected",2);U([a({type:Boolean,reflect:!0})],I.prototype,"disabled",2);U([a({type:Boolean,reflect:!0})],I.prototype,"fullwidth",2);I=U([g("o-filter-chip")],I);var $i=Object.defineProperty,N=(o,t,e,r)=>{for(var i=void 0,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=s(t,e,i)||i);return i&&$i(t,e,i),i};const se=class se extends p{constructor(){super(...arguments),this.type="cart | chevron",this.titleProduct="",this.volume="",this.perLiter="",this.mainPrice="",this.imageUrl="https://placehold.co/56x70",this.altImage="",this.fullwidth=!1,this.tagText=""}onClick(){typeof this.onClickTile=="function"&&this.onClickTile()}get icons(){return this.type==="chevron"?l`
2293
- <o-icon-button
2294
- @click=${this.onClick}
2295
- icon="chevronRight"
2296
- size="small"
2297
- bgstyle="background-contrast"
2298
- type="span"
2299
- status="filled"
2300
- strokewidth="0"
2301
- aria-hidden="true"
2302
- tabindex="-1"
2303
- ></o-icon-button>
2304
- `:l`
2305
- <o-icon-button
2306
- icon="cart"
2307
- size="small"
2308
- bgstyle="background-contrast"
2309
- type="span"
2310
- status="empty"
2311
- strokewidth="0"
2312
- ></o-icon-button>
2313
- `}render(){return l`
2314
- <button type="button"
2315
- class="tile ${this.fullwidth?"fullwidth":""} ${this.type==="chevron"?"fullpointer":""}" @click=${this.onClick}>
2316
- ${this.imageUrl?l`<img src="${this.imageUrl}" alt="${this.altImage||""}" />`:""}
2317
- <div class="info">
2318
- ${this.tagText?l`<o-tag bgstyle="background-emphasis">${this.tagText}</o-tag>`:""}
2319
- ${this.titleProduct?l`<div class="title">${this.titleProduct}</div>`:""}
2320
- <div class="details">
2321
- ${this.volume?l`<span class="volume-info">${this.volume}</span>`:""}
2322
- ${this.type==="cart"&&this.mainPrice?l`<span class="main-price">${this.mainPrice}</span>`:""}
2323
- ${this.type==="cart"&&this.perLiter?l`<span class="per-liter">${this.perLiter}</span>`:""}
2324
- </div>
2325
- </div>
2326
- ${this.icons}
2327
- </button>
2287
+ `;N([a({reflect:!0})],I.prototype,"name",2);N([a({reflect:!0})],I.prototype,"value",2);N([a({type:String,reflect:!0})],I.prototype,"type",2);N([a({type:String,reflect:!0})],I.prototype,"href",2);N([a({type:String,reflect:!0,attribute:"data-href"})],I.prototype,"dataHref",2);N([a({type:String})],I.prototype,"text",2);N([a({type:Boolean,reflect:!0})],I.prototype,"selected",2);N([a({type:Boolean,reflect:!0})],I.prototype,"disabled",2);N([a({type:Boolean,reflect:!0})],I.prototype,"fullwidth",2);I=N([g("o-filter-chip")],I);var $i=Object.defineProperty,M=(o,t,e,r)=>{for(var i=void 0,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=s(t,e,i)||i);return i&&$i(t,e,i),i};const se=class se extends p{constructor(){super(...arguments),this.type="cart | chevron",this.titleProduct="",this.volume="",this.perLiter="",this.mainPrice="",this.imageUrl="https://placehold.co/56x70",this.altImage="",this.fullwidth=!1,this.tagText=""}onClick(t){var r,i;const e=t.target;(r=e==null?void 0:e.classList)!=null&&r.contains("add-to-bag")||((i=this.onClickTile)==null||i.call(this),this.dispatchEvent(new CustomEvent("tile-click",{bubbles:!0,composed:!0})))}onClickIcons(){var t;(t=this.onClickIcon)==null||t.call(this),this.dispatchEvent(new CustomEvent("tile-icon-click",{bubbles:!0,composed:!0}))}get icons(){return this.type==="chevron"?l`
2288
+ <o-icon-button
2289
+ @click=${this.onClickIcons}
2290
+ icon="chevronRight"
2291
+ size="small"
2292
+ bgstyle="background-contrast"
2293
+ type="span"
2294
+ status="filled"
2295
+ strokewidth="0"
2296
+ aria-hidden="true"
2297
+ tabindex="-1"
2298
+ class="chevron-icon"
2299
+ ></o-icon-button>
2300
+ `:l`
2301
+ <o-icon-button
2302
+ @click=${this.onClickIcons}
2303
+ icon="cart"
2304
+ size="small"
2305
+ bgstyle="background-contrast"
2306
+ type="span"
2307
+ status="empty"
2308
+ strokewidth="0"
2309
+ class="add-to-bag"
2310
+ ></o-icon-button>
2311
+ `}render(){return l`
2312
+ <button
2313
+ type="button"
2314
+ class="tile fullpointer ${this.fullwidth?"fullwidth":""}"
2315
+ @click=${this.onClick}
2316
+ >
2317
+ ${this.imageUrl?l`<img src="${this.imageUrl}" alt="${this.altImage||""}" />`:""}
2318
+ <div class="info">
2319
+ ${this.tagText?l`<o-tag bgstyle="background-emphasis">${this.tagText}</o-tag>`:""}
2320
+ ${this.titleProduct?l`<div class="title">${this.titleProduct}</div>`:""}
2321
+ <div class="details">
2322
+ ${this.volume?l`<span class="volume-info">${this.volume}</span>`:""}
2323
+ ${this.type==="cart"&&this.mainPrice?l`<span class="main-price">${this.mainPrice}</span>`:""}
2324
+ ${this.type==="cart"&&this.perLiter?l`<span class="per-liter">${this.perLiter}</span>`:""}
2325
+ </div>
2326
+ </div>
2327
+ ${this.icons}
2328
+ </button>
2328
2329
  `}};se.styles=f`
2329
2330
  :host {
2330
- display: block;
2331
- max-width: 100%;
2331
+ display: block;
2332
+ max-width: 100%;
2332
2333
  }
2333
-
2334
+
2334
2335
  .tile {
2335
- display: flex;
2336
- align-items: center;
2337
- justify-content: space-between;
2338
- border-radius: var(--radius-xs);
2339
- background: var(--color-container-bg-white);
2340
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
2341
- font-family: var(--font-family-loccitane-sans);
2342
- height: 70px;
2343
- width: 356px;
2344
- max-width: 356px;
2345
- padding: var(--spacing-2-xs) var(--spacing-s) var(--spacing-2-xs) var(--spacing-2-xs);
2346
- margin: 0;
2347
- border: 0 none;
2348
- box-sizing: content-box;
2349
-
2350
- o-icon-button {
2351
- margin-left: var(--spacing-xl);
2352
- }
2353
- }
2336
+ display: flex;
2337
+ align-items: center;
2338
+ justify-content: space-between;
2339
+ border-radius: var(--radius-xs);
2340
+ background: var(--color-container-bg-white);
2341
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
2342
+ font-family: var(--font-family-loccitane-sans);
2343
+ height: 70px;
2344
+ width: 356px;
2345
+ max-width: 356px;
2346
+ padding: var(--spacing-2-xs) var(--spacing-s) var(--spacing-2-xs)
2347
+ var(--spacing-2-xs);
2348
+ margin: 0;
2349
+ border: 0 none;
2350
+ box-sizing: content-box;
2354
2351
 
2355
- .tile.fullwidth {
2356
- width: 100%;
2357
- max-width: 100%;
2358
- }
2352
+ o-icon-button {
2353
+ margin-left: var(--spacing-xl);
2354
+ }
2355
+ }
2359
2356
 
2360
- .tile img {
2361
- object-fit: cover;
2362
- width: 56px;
2363
- height: 70px;
2364
- background: linear-gradient(to bottom, #F9F5F0, #F7F2EA);
2365
- }
2357
+ .tile.fullwidth {
2358
+ width: 100%;
2359
+ max-width: 100%;
2360
+ }
2366
2361
 
2367
- .info {
2368
- flex-grow: 1;
2369
- margin-left: 10px;
2370
- }
2362
+ .tile img {
2363
+ object-fit: cover;
2364
+ width: 56px;
2365
+ height: 70px;
2366
+ background: linear-gradient(to bottom, #f9f5f0, #f7f2ea);
2367
+ }
2371
2368
 
2372
- .info .title {
2373
- font-family: var(--font-family-loccitane-serif);
2374
- font-size: var(--font-size-150);
2375
- font-weight: var(--font-weight-400);
2376
- color: var(--colors-noir-des-terres-500);
2377
- line-height: var(--line-height-160);
2378
- letter-spacing: var(--letter-spacing-100);
2379
- text-align: left;
2380
- max-height: 32px;
2381
- overflow: hidden;
2382
- text-overflow: ellipsis;
2383
- display: -webkit-box;
2384
- -webkit-line-clamp: 2;
2385
- -webkit-box-orient: vertical;
2386
-
2387
- +.details {
2388
- padding-top: var(--spacing-s);
2389
- overflow: hidden;
2390
- text-overflow: ellipsis;
2391
- display: -webkit-box;
2392
- -webkit-line-clamp: 1;
2393
- -webkit-box-orient: vertical;
2394
- text-align: left;
2395
- }
2396
- }
2369
+ .info {
2370
+ flex-grow: 1;
2371
+ margin-left: 10px;
2372
+ }
2397
2373
 
2398
- .info .details {
2399
- display: flex;
2400
- align-items: center;
2401
- }
2374
+ .info .title {
2375
+ font-family: var(--font-family-loccitane-serif);
2376
+ font-size: var(--font-size-150);
2377
+ font-weight: var(--font-weight-400);
2378
+ color: var(--colors-noir-des-terres-500);
2379
+ line-height: var(--line-height-160);
2380
+ letter-spacing: var(--letter-spacing-100);
2381
+ text-align: left;
2382
+ max-height: 32px;
2383
+ overflow: hidden;
2384
+ text-overflow: ellipsis;
2385
+ display: -webkit-box;
2386
+ -webkit-line-clamp: 2;
2387
+ -webkit-box-orient: vertical;
2402
2388
 
2403
- .info .volume-info {
2404
- font-size: var(--font-size-100);
2405
- color: var(--colors-noir-des-terres-500);
2406
- font-family: var(--font-family-loccitane-sans);
2407
- line-height: var(--line-height-160);
2389
+ + .details {
2390
+ padding-top: var(--spacing-s);
2391
+ overflow: hidden;
2392
+ text-overflow: ellipsis;
2393
+ display: -webkit-box;
2394
+ -webkit-line-clamp: 1;
2395
+ -webkit-box-orient: vertical;
2396
+ text-align: left;
2397
+ }
2398
+ }
2408
2399
 
2409
- + .main-price {
2410
- &::before {
2411
- content: "•";
2412
- padding: 0 var(--spacing-xs) 0 var(--spacing-2-xs);
2413
- color: var(--colors-noir-des-terres-500);
2414
- }
2415
- }
2416
- }
2400
+ .info .details {
2401
+ display: flex;
2402
+ align-items: center;
2403
+ }
2417
2404
 
2418
- .info o-tag {
2419
- margin-bottom: var(--spacing-xs);
2420
- display: flex;
2421
- }
2405
+ .info .volume-info {
2406
+ font-size: var(--font-size-100);
2407
+ color: var(--colors-noir-des-terres-500);
2408
+ font-family: var(--font-family-loccitane-sans);
2409
+ line-height: var(--line-height-160);
2422
2410
 
2423
- .main-price {
2424
- font-family: var(--font-family-loccitane-sans);
2411
+ + .main-price {
2412
+ &::before {
2413
+ content: "•";
2414
+ padding: 0 var(--spacing-xs) 0 var(--spacing-2-xs);
2425
2415
  color: var(--colors-noir-des-terres-500);
2426
- font-size: var(--font-size-100);
2427
- padding: 0 var(--spacing-xs) 0 0;
2428
- font-weight: var(--font-weight-400);
2429
2416
  }
2417
+ }
2418
+ }
2430
2419
 
2431
- .per-liter {
2432
- font-size: var(--font-size-100);
2433
- color: var(--color-content-description);
2434
- letter-spacing: var(--letter-spacing-absolute);
2435
- line-height: var(--line-height-160);
2436
- }
2420
+ .info o-tag {
2421
+ margin-bottom: var(--spacing-xs);
2422
+ display: flex;
2423
+ }
2437
2424
 
2438
- .fullpointer {
2439
- cursor: pointer;
2440
- }
2441
- `;let A=se;N([a({type:String})],A.prototype,"type");N([a({type:String})],A.prototype,"titleProduct");N([a({type:String})],A.prototype,"volume");N([a({type:String})],A.prototype,"perLiter");N([a({type:String})],A.prototype,"mainPrice");N([a({type:String})],A.prototype,"imageUrl");N([a({type:String})],A.prototype,"altImage");N([a({type:Boolean})],A.prototype,"fullwidth");N([a({type:String})],A.prototype,"tagText");N([a({type:Function})],A.prototype,"onClickTile");customElements.define("mini-tile",A);var ki=Object.defineProperty,_i=Object.getOwnPropertyDescriptor,re=(o,t,e,r)=>{for(var i=r>1?void 0:r?_i(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&ki(t,e,i),i};let Ct=class extends p{constructor(){super(...arguments),this.variant="cart",this.text=""}render(){return l`
2425
+ .main-price {
2426
+ font-family: var(--font-family-loccitane-sans);
2427
+ color: var(--colors-noir-des-terres-500);
2428
+ font-size: var(--font-size-100);
2429
+ padding: 0 var(--spacing-xs) 0 0;
2430
+ font-weight: var(--font-weight-400);
2431
+ }
2432
+
2433
+ .per-liter {
2434
+ font-size: var(--font-size-100);
2435
+ color: var(--color-content-description);
2436
+ letter-spacing: var(--letter-spacing-absolute);
2437
+ line-height: var(--line-height-160);
2438
+ }
2439
+
2440
+ .fullpointer {
2441
+ cursor: pointer;
2442
+ }
2443
+ `;let E=se;M([a({type:String})],E.prototype,"type");M([a({type:String})],E.prototype,"titleProduct");M([a({type:String})],E.prototype,"volume");M([a({type:String})],E.prototype,"perLiter");M([a({type:String})],E.prototype,"mainPrice");M([a({type:String})],E.prototype,"imageUrl");M([a({type:String})],E.prototype,"altImage");M([a({type:Boolean})],E.prototype,"fullwidth");M([a({type:String})],E.prototype,"tagText");M([a({attribute:!1})],E.prototype,"onClickTile");M([a({attribute:!1})],E.prototype,"onClickIcon");customElements.define("mini-tile",E);var ki=Object.defineProperty,_i=Object.getOwnPropertyDescriptor,re=(o,t,e,r)=>{for(var i=r>1?void 0:r?_i(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&ki(t,e,i),i};let Ct=class extends p{constructor(){super(...arguments),this.variant="cart",this.text=""}render(){return l`
2442
2444
  <span class="badge">
2443
2445
  ${this.text?this.text:l`<slot></slot>`}
2444
2446
  </span>
@@ -2476,7 +2478,7 @@
2476
2478
  color: var(--text-color);
2477
2479
  }
2478
2480
 
2479
- `;re([a({type:String,reflect:!0})],Ct.prototype,"variant",2);re([a({type:String})],Ct.prototype,"text",2);Ct=re([g("o-badge")],Ct);var Ci=Object.defineProperty,Si=Object.getOwnPropertyDescriptor,H=(o,t,e,r)=>{for(var i=r>1?void 0:r?Si(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&Ci(t,e,i),i};let E=class extends p{constructor(){super(...arguments),this.icon="info",this.text="Sample text",this.verticalanchor="top",this.horizontalanchor="right",this.verticaloffset=24,this.horizontaloffset=24,this.animationduration=500,this.animationaxis="horizontal",this.animated=!0,this.lifeduration=5e3,this.multiline=!1}attributeChangedCallback(o,t,e){super.attributeChangedCallback(o,t,e),o=="verticaloffset"&&this.style.setProperty("--vertical-offset",e+"px"),o=="horizontaloffset"&&this.style.setProperty("--horizontal-offset",e+"px"),o=="animationduration"&&this.style.setProperty("--animation-duration",e+"ms")}selfCloseAfterDelay(){var o=this;setTimeout(function(){o.animated=!0,o.selfClose()},this.lifeduration)}selfClose(){var o=this;setTimeout(function(){o.remove()},this.animationduration+200)}connectedCallback(){var o=this;super.connectedCallback(),setTimeout(()=>{o.animated=!1,this.selfCloseAfterDelay()},600)}firstUpdated(){var r,i;var o=this;const t=(r=this.renderRoot)==null?void 0:r.querySelector("o-icon-button"),e=(i=this.renderRoot)==null?void 0:i.querySelector(".o-toast-text");if(e!=null){const n=window.getComputedStyle(e),s=parseInt(n.getPropertyValue("line-height").replace("px","")),c=parseInt(n.getPropertyValue("height").replace("px",""));!isNaN(s)&&!isNaN(c)&&c>s&&(this.multiline=!0)}t!=null&&t.addEventListener("click",function(){o.remove()})}render(){const t=Po[this.icon].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"');return l`
2481
+ `;re([a({type:String,reflect:!0})],Ct.prototype,"variant",2);re([a({type:String})],Ct.prototype,"text",2);Ct=re([g("o-badge")],Ct);var Ci=Object.defineProperty,Si=Object.getOwnPropertyDescriptor,H=(o,t,e,r)=>{for(var i=r>1?void 0:r?Si(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&Ci(t,e,i),i};let A=class extends p{constructor(){super(...arguments),this.icon="info",this.text="Sample text",this.verticalanchor="top",this.horizontalanchor="right",this.verticaloffset=24,this.horizontaloffset=24,this.animationduration=500,this.animationaxis="horizontal",this.animated=!0,this.lifeduration=5e3,this.multiline=!1}attributeChangedCallback(o,t,e){super.attributeChangedCallback(o,t,e),o=="verticaloffset"&&this.style.setProperty("--vertical-offset",e+"px"),o=="horizontaloffset"&&this.style.setProperty("--horizontal-offset",e+"px"),o=="animationduration"&&this.style.setProperty("--animation-duration",e+"ms")}selfCloseAfterDelay(){var o=this;setTimeout(function(){o.animated=!0,o.selfClose()},this.lifeduration)}selfClose(){var o=this;setTimeout(function(){o.remove()},this.animationduration+200)}connectedCallback(){var o=this;super.connectedCallback(),setTimeout(()=>{o.animated=!1,this.selfCloseAfterDelay()},600)}firstUpdated(){var r,i;var o=this;const t=(r=this.renderRoot)==null?void 0:r.querySelector("o-icon-button"),e=(i=this.renderRoot)==null?void 0:i.querySelector(".o-toast-text");if(e!=null){const n=window.getComputedStyle(e),s=parseInt(n.getPropertyValue("line-height").replace("px","")),c=parseInt(n.getPropertyValue("height").replace("px",""));!isNaN(s)&&!isNaN(c)&&c>s&&(this.multiline=!0)}t!=null&&t.addEventListener("click",function(){o.remove()})}render(){const t=Po[this.icon].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"');return l`
2480
2482
  <div class="o-toast">
2481
2483
  <div class="o-toast-icon">
2482
2484
  ${S(t)}
@@ -2492,7 +2494,7 @@
2492
2494
  </o-icon-button>
2493
2495
  </div>
2494
2496
  </div>
2495
- `}};E.styles=f`
2497
+ `}};A.styles=f`
2496
2498
  :host {
2497
2499
  --vertical-offset: 24px;
2498
2500
  --horizontal-offset: 24px;
@@ -2569,7 +2571,7 @@
2569
2571
  .o-toast-icon {
2570
2572
  height: 16px;
2571
2573
  }
2572
- `;H([a({type:String,reflect:!0})],E.prototype,"icon",2);H([a({type:String,reflect:!0})],E.prototype,"text",2);H([a({type:String,reflect:!0})],E.prototype,"verticalanchor",2);H([a({type:String,reflect:!0})],E.prototype,"horizontalanchor",2);H([a({type:Number,reflect:!0})],E.prototype,"verticaloffset",2);H([a({type:Number,reflect:!0})],E.prototype,"horizontaloffset",2);H([a({type:Number,reflect:!0})],E.prototype,"animationduration",2);H([a({type:String,reflect:!0})],E.prototype,"animationaxis",2);H([a({type:Boolean,reflect:!0})],E.prototype,"animated",2);H([a({type:Number,reflect:!0})],E.prototype,"lifeduration",2);H([a({type:Boolean,reflect:!0})],E.prototype,"multiline",2);E=H([g("o-toast")],E);var Ei=Object.defineProperty,Ai=Object.getOwnPropertyDescriptor,M=(o,t,e,r)=>{for(var i=r>1?void 0:r?Ai(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&Ei(t,e,i),i};let Li=0,L=class extends p{constructor(){super(),this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.size="S",this.showLabel=!0,this.label="Checkbox",this.name="",this.value="on",this.inputId="",this.inputId||(this.inputId=`o-checkbox-${++Li}`)}toggle(){this.disabled||(this.indeterminate?(this.indeterminate=!1,this.checked=!0):this.checked=!this.checked,this.syncInput(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}syncInput(){this.inputEl&&(this.inputEl.checked=this.checked,this.inputEl.indeterminate=this.indeterminate)}updated(o){this.syncInput()}handleKeyDown(o){this.disabled||(o.key===" "||o.key==="Enter")&&(o.preventDefault(),this.toggle())}render(){const o=S(Z.checkbox.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"')),t=S(Z.icoMinus.replace("<svg",'<svg class="indeterminate" aria-hidden="true" focusable="false" part="svg"'));return l`
2574
+ `;H([a({type:String,reflect:!0})],A.prototype,"icon",2);H([a({type:String,reflect:!0})],A.prototype,"text",2);H([a({type:String,reflect:!0})],A.prototype,"verticalanchor",2);H([a({type:String,reflect:!0})],A.prototype,"horizontalanchor",2);H([a({type:Number,reflect:!0})],A.prototype,"verticaloffset",2);H([a({type:Number,reflect:!0})],A.prototype,"horizontaloffset",2);H([a({type:Number,reflect:!0})],A.prototype,"animationduration",2);H([a({type:String,reflect:!0})],A.prototype,"animationaxis",2);H([a({type:Boolean,reflect:!0})],A.prototype,"animated",2);H([a({type:Number,reflect:!0})],A.prototype,"lifeduration",2);H([a({type:Boolean,reflect:!0})],A.prototype,"multiline",2);A=H([g("o-toast")],A);var Ei=Object.defineProperty,Ai=Object.getOwnPropertyDescriptor,j=(o,t,e,r)=>{for(var i=r>1?void 0:r?Ai(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&Ei(t,e,i),i};let Li=0,L=class extends p{constructor(){super(),this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.size="S",this.showLabel=!0,this.label="Checkbox",this.name="",this.value="on",this.inputId="",this.inputId||(this.inputId=`o-checkbox-${++Li}`)}toggle(){this.disabled||(this.indeterminate?(this.indeterminate=!1,this.checked=!0):this.checked=!this.checked,this.syncInput(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}syncInput(){this.inputEl&&(this.inputEl.checked=this.checked,this.inputEl.indeterminate=this.indeterminate)}updated(o){this.syncInput()}handleKeyDown(o){this.disabled||(o.key===" "||o.key==="Enter")&&(o.preventDefault(),this.toggle())}render(){const o=S(Z.checkbox.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"')),t=S(Z.icoMinus.replace("<svg",'<svg class="indeterminate" aria-hidden="true" focusable="false" part="svg"'));return l`
2573
2575
  <input
2574
2576
  type="checkbox"
2575
2577
  id=${this.inputId}
@@ -2688,7 +2690,7 @@
2688
2690
  svg path {
2689
2691
  stroke: var(--color-border-white);
2690
2692
  }
2691
- `;M([a({type:Boolean,reflect:!0})],L.prototype,"checked",2);M([a({type:Boolean,reflect:!0})],L.prototype,"indeterminate",2);M([a({type:Boolean,reflect:!0})],L.prototype,"disabled",2);M([a({type:String,reflect:!0})],L.prototype,"size",2);M([a({type:Boolean})],L.prototype,"showLabel",2);M([a({type:String})],L.prototype,"label",2);M([a({type:String})],L.prototype,"name",2);M([a({type:String})],L.prototype,"value",2);M([a({type:String,reflect:!0})],L.prototype,"inputId",2);M([Ce("input")],L.prototype,"inputEl",2);L=M([g("o-checkbox")],L);var Pi=Object.defineProperty,Bi=Object.getOwnPropertyDescriptor,q=(o,t,e,r)=>{for(var i=r>1?void 0:r?Bi(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&Pi(t,e,i),i};let zi=0,D=class extends p{constructor(){super(),this.checked=!1,this.disabled=!1,this.size="S",this.showLabel=!0,this.label="Radio button",this.name="",this.value="on",this.inputId="",this.inputId||(this.inputId=`o-radio-${++zi}`)}handleClick(){this.disabled||this.checked||(this.checked=!0,this.syncInput(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}syncInput(){this.inputEl&&(this.inputEl.checked=this.checked)}updated(o){if(o.has("checked")&&this.checked){const t=this.parentElement;t&&Array.from(t.querySelectorAll(`o-radio[name="${this.name}"]`)).forEach(r=>{r!==this&&(r.checked=!1)})}this.syncInput()}handleKeyDown(o){this.disabled||(o.key===" "||o.key==="Enter")&&(o.preventDefault(),this.handleClick())}render(){return l`
2693
+ `;j([a({type:Boolean,reflect:!0})],L.prototype,"checked",2);j([a({type:Boolean,reflect:!0})],L.prototype,"indeterminate",2);j([a({type:Boolean,reflect:!0})],L.prototype,"disabled",2);j([a({type:String,reflect:!0})],L.prototype,"size",2);j([a({type:Boolean})],L.prototype,"showLabel",2);j([a({type:String})],L.prototype,"label",2);j([a({type:String})],L.prototype,"name",2);j([a({type:String})],L.prototype,"value",2);j([a({type:String,reflect:!0})],L.prototype,"inputId",2);j([Ce("input")],L.prototype,"inputEl",2);L=j([g("o-checkbox")],L);var Pi=Object.defineProperty,Bi=Object.getOwnPropertyDescriptor,q=(o,t,e,r)=>{for(var i=r>1?void 0:r?Bi(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&Pi(t,e,i),i};let zi=0,D=class extends p{constructor(){super(),this.checked=!1,this.disabled=!1,this.size="S",this.showLabel=!0,this.label="Radio button",this.name="",this.value="on",this.inputId="",this.inputId||(this.inputId=`o-radio-${++zi}`)}handleClick(){this.disabled||this.checked||(this.checked=!0,this.syncInput(),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})))}syncInput(){this.inputEl&&(this.inputEl.checked=this.checked)}updated(o){if(o.has("checked")&&this.checked){const t=this.parentElement;t&&Array.from(t.querySelectorAll(`o-radio[name="${this.name}"]`)).forEach(r=>{r!==this&&(r.checked=!1)})}this.syncInput()}handleKeyDown(o){this.disabled||(o.key===" "||o.key==="Enter")&&(o.preventDefault(),this.handleClick())}render(){return l`
2692
2694
  <input type="radio" id=${this.inputId} ?checked=${this.checked} ?disabled=${this.disabled} name=${this.name} value=${this.value} />
2693
2695
 
2694
2696
  <div class="box" role="radio" tabindex=${this.disabled?-1:0} aria-checked=${String(this.checked)} aria-disabled=${String(this.disabled)} @click=${this.handleClick} @keydown=${this.handleKeyDown}>