@florid-kit/components 0.9.8 → 0.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/aria.d.ts +1 -1
- package/components/side-panel.d.ts +1 -0
- package/index.js +119 -111
- package/index.mjs +501 -478
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -6,25 +6,25 @@
|
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:xe,defineProperty:we,getOwnPropertyDescriptor:$e,getOwnPropertyNames:Ce,getOwnPropertySymbols:_e,getPrototypeOf:ke}=Object,W=globalThis,te=W.trustedTypes,Se=te?te.emptyScript:"",Lt=W.reactiveElementPolyfillSupport,lt=(o,t)=>o,Ct={toAttribute(o,t){switch(t){case Boolean:o=o?Se:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},jt=(o,t)=>!xe(o,t),ee={attribute:!0,type:String,converter:Ct,reflect:!1,useDefault:!1,hasChanged:jt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),W.litPropertyMetadata??(W.litPropertyMetadata=new WeakMap);let it=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ee){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(t,r,e);i!==void 0&&we(this.prototype,t,i)}}static getPropertyDescriptor(t,e,r){const{get:i,set:n}=$e(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get:i,set(s){const
|
|
9
|
+
*/const{is:xe,defineProperty:we,getOwnPropertyDescriptor:$e,getOwnPropertyNames:Ce,getOwnPropertySymbols:_e,getPrototypeOf:ke}=Object,W=globalThis,te=W.trustedTypes,Se=te?te.emptyScript:"",Lt=W.reactiveElementPolyfillSupport,lt=(o,t)=>o,Ct={toAttribute(o,t){switch(t){case Boolean:o=o?Se:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},jt=(o,t)=>!xe(o,t),ee={attribute:!0,type:String,converter:Ct,reflect:!1,useDefault:!1,hasChanged:jt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),W.litPropertyMetadata??(W.litPropertyMetadata=new WeakMap);let it=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ee){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(t,r,e);i!==void 0&&we(this.prototype,t,i)}}static getPropertyDescriptor(t,e,r){const{get:i,set:n}=$e(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get:i,set(s){const h=i==null?void 0:i.call(this);n==null||n.call(this,s),this.requestUpdate(t,h,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ee}static _$Ei(){if(this.hasOwnProperty(lt("elementProperties")))return;const t=ke(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(lt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(lt("properties"))){const e=this.properties,r=[...Ce(e),..._e(e)];for(const i of r)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[r,i]of e)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[e,r]of this.elementProperties){const i=this._$Eu(e,r);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const i of r)e.unshift(Yt(i))}else t!==void 0&&e.push(Yt(t));return e}static _$Eu(t,e){const r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return me(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var r;return(r=e.hostConnected)==null?void 0:r.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var r;return(r=e.hostDisconnected)==null?void 0:r.call(e)})}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){var n;const r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===!0){const s=(((n=r.converter)==null?void 0:n.toAttribute)!==void 0?r.converter:Ct).toAttribute(e,r.type);this._$Em=t,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,e){var n,s;const r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const h=r.getPropertyOptions(i),c=typeof h.converter=="function"?{fromAttribute:h.converter}:((n=h.converter)==null?void 0:n.fromAttribute)!==void 0?h.converter:Ct;this._$Em=i,this[i]=c.fromAttribute(e,h.type)??((s=this._$Ej)==null?void 0:s.get(i))??null,this._$Em=null}}requestUpdate(t,e,r){var i;if(t!==void 0){const n=this.constructor,s=this[t];if(r??(r=n.getPropertyOptions(t)),!((r.hasChanged??jt)(s,e)||r.useDefault&&r.reflect&&s===((i=this._$Ej)==null?void 0:i.get(t))&&!this.hasAttribute(n._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:i,wrapped:n},s){r&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,s??e??this[t]),n!==!0||s!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,s]of this._$Ep)this[n]=s;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[n,s]of i){const{wrapped:h}=s,c=this[n];h!==!0||this._$AL.has(n)||c===void 0||this.C(n,void 0,s,c)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(r=this._$EO)==null||r.forEach(i=>{var n;return(n=i.hostUpdate)==null?void 0:n.call(i)}),this.update(e)):this._$EM()}catch(i){throw t=!1,this._$EM(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(r=>{var i;return(i=r.hostUpdated)==null?void 0:i.call(r)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};it.elementStyles=[],it.shadowRootOptions={mode:"open"},it[lt("elementProperties")]=new Map,it[lt("finalized")]=new Map,Lt==null||Lt({ReactiveElement:it}),(W.reactiveElementVersions??(W.reactiveElementVersions=[])).push("2.1.0");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
13
|
*/const ct=globalThis,_t=ct.trustedTypes,oe=_t?_t.createPolicy("lit-html",{createHTML:o=>o}):void 0,de="$lit$",K=`lit$${Math.random().toFixed(9).slice(2)}$`,pe="?"+K,Ee=`<${pe}>`,tt=document,dt=()=>tt.createComment(""),pt=o=>o===null||typeof o!="object"&&typeof o!="function",Rt=Array.isArray,Ae=o=>Rt(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",It=`[
|
|
14
14
|
\f\r]`,at=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ie=/-->/g,re=/>/g,J=RegExp(`>|${It}(?:([^\\s"'>=/]+)(${It}*=${It}*(?:[^
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),ne=/'/g,se=/"/g,ue=/^(?:script|style|textarea|title)$/i,Le=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=Le(1),G=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),ae=new WeakMap,Q=tt.createTreeWalker(tt,129);function ve(o,t){if(!Rt(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return oe!==void 0?oe.createHTML(t):t}const Ie=(o,t)=>{const e=o.length-1,r=[];let i,n=t===2?"<svg>":t===3?"<math>":"",s=at;for(let
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ne=/'/g,se=/"/g,ue=/^(?:script|style|textarea|title)$/i,Le=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=Le(1),G=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),ae=new WeakMap,Q=tt.createTreeWalker(tt,129);function ve(o,t){if(!Rt(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return oe!==void 0?oe.createHTML(t):t}const Ie=(o,t)=>{const e=o.length-1,r=[];let i,n=t===2?"<svg>":t===3?"<math>":"",s=at;for(let h=0;h<e;h++){const c=o[h];let m,w,v=-1,R=0;for(;R<c.length&&(s.lastIndex=R,w=s.exec(c),w!==null);)R=s.lastIndex,s===at?w[1]==="!--"?s=ie:w[1]!==void 0?s=re:w[2]!==void 0?(ue.test(w[2])&&(i=RegExp("</"+w[2],"g")),s=J):w[3]!==void 0&&(s=J):s===J?w[0]===">"?(s=i??at,v=-1):w[1]===void 0?v=-2:(v=s.lastIndex-w[2].length,m=w[1],s=w[3]===void 0?J:w[3]==='"'?se:ne):s===se||s===ne?s=J:s===ie||s===re?s=at:(s=J,i=void 0);const q=s===J&&o[h+1].startsWith("/>")?" ":"";n+=s===at?c+Ee:v>=0?(r.push(m),c.slice(0,v)+de+c.slice(v)+K+q):c+K+(v===-2?h:q)}return[ve(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]};class ut{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let n=0,s=0;const h=t.length-1,c=this.parts,[m,w]=Ie(t,e);if(this.el=ut.createElement(m,r),Q.currentNode=this.el.content,e===2||e===3){const v=this.el.content.firstChild;v.replaceWith(...v.childNodes)}for(;(i=Q.nextNode())!==null&&c.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(const v of i.getAttributeNames())if(v.endsWith(de)){const R=w[s++],q=i.getAttribute(v).split(K),wt=/([.?@])?(.*)/.exec(R);c.push({type:1,index:n,name:wt[2],strings:q,ctor:wt[1]==="."?Oe:wt[1]==="?"?ze:wt[1]==="@"?Be:St}),i.removeAttribute(v)}else v.startsWith(K)&&(c.push({type:6,index:n}),i.removeAttribute(v));if(ue.test(i.tagName)){const v=i.textContent.split(K),R=v.length-1;if(R>0){i.textContent=_t?_t.emptyScript:"";for(let q=0;q<R;q++)i.append(v[q],dt()),Q.nextNode(),c.push({type:2,index:++n});i.append(v[R],dt())}}}else if(i.nodeType===8)if(i.data===pe)c.push({type:2,index:n});else{let v=-1;for(;(v=i.data.indexOf(K,v+1))!==-1;)c.push({type:7,index:n}),v+=K.length-1}n++}}static createElement(t,e){const r=tt.createElement("template");return r.innerHTML=t,r}}function rt(o,t,e=o,r){var s,h;if(t===G)return t;let i=r!==void 0?(s=e._$Co)==null?void 0:s[r]:e._$Cl;const n=pt(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==n&&((h=i==null?void 0:i._$AO)==null||h.call(i,!1),n===void 0?i=void 0:(i=new n(o),i._$AT(o,e,r)),r!==void 0?(e._$Co??(e._$Co=[]))[r]=i:e._$Cl=i),i!==void 0&&(t=rt(o,i._$AS(o,t.values),i,r)),t}class Pe{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:r}=this._$AD,i=((t==null?void 0:t.creationScope)??tt).importNode(e,!0);Q.currentNode=i;let n=Q.nextNode(),s=0,h=0,c=r[0];for(;c!==void 0;){if(s===c.index){let m;c.type===2?m=new mt(n,n.nextSibling,this,t):c.type===1?m=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(m=new De(n,this,t)),this._$AV.push(m),c=r[++h]}s!==(c==null?void 0:c.index)&&(n=Q.nextNode(),s++)}return Q.currentNode=tt,i}p(t){let e=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}}class mt{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,r,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=rt(this,t,e),pt(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==G&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ae(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&pt(this._$AH)?this._$AA.nextSibling.data=t:this.T(tt.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=ut.createElement(ve(r.h,r.h[0]),this.options)),r);if(((n=this._$AH)==null?void 0:n._$AD)===i)this._$AH.p(e);else{const s=new Pe(i,this),h=s.u(this.options);s.p(e),this.T(h),this._$AH=s}}_$AC(t){let e=ae.get(t.strings);return e===void 0&&ae.set(t.strings,e=new ut(t)),e}k(t){Rt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,i=0;for(const n of t)i===e.length?e.push(r=new mt(this.O(dt()),this.O(dt()),this,this.options)):r=e[i],r._$AI(n),i++;i<e.length&&(this._$AR(r&&r._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var r;for((r=this._$AP)==null?void 0:r.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class St{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,i,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=d}_$AI(t,e=this,r,i){const n=this.strings;let s=!1;if(n===void 0)t=rt(this,t,e,0),s=!pt(t)||t!==this._$AH&&t!==G,s&&(this._$AH=t);else{const h=t;let c,m;for(t=n[0],c=0;c<n.length-1;c++)m=rt(this,h[r+c],e,c),m===G&&(m=this._$AH[c]),s||(s=!pt(m)||m!==this._$AH[c]),m===d?t=d:t!==d&&(t+=(m??"")+n[c+1]),this._$AH[c]=m}s&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Oe extends St{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class ze extends St{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class Be extends St{constructor(t,e,r,i,n){super(t,e,r,i,n),this.type=5}_$AI(t,e=this){if((t=rt(this,t,e,0)??d)===G)return;const r=this._$AH,i=t===d&&r!==d||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,n=t!==d&&(r===d||i);i&&this.element.removeEventListener(this.name,this,r),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class De{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){rt(this,t)}}const Pt=ct.litHtmlPolyfillSupport;Pt==null||Pt(ut,mt),(ct.litHtmlVersions??(ct.litHtmlVersions=[])).push("3.3.0");const He=(o,t,e)=>{const r=(e==null?void 0:e.renderBefore)??t;let i=r._$litPart$;if(i===void 0){const n=(e==null?void 0:e.renderBefore)??null;r._$litPart$=i=new mt(t.insertBefore(dt(),n),n,void 0,e??{})}return i._$AI(o),i};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const Y=globalThis;let
|
|
19
|
+
*/const Y=globalThis;let u=class extends it{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=He(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return G}};var ce;u._$litElement$=!0,u.finalized=!0,(ce=Y.litElementHydrateSupport)==null||ce.call(Y,{LitElement:u});const Ot=Y.litElementPolyfillSupport;Ot==null||Ot({LitElement:u});(Y.litElementVersions??(Y.litElementVersions=[])).push("4.2.0");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const
|
|
23
|
+
*/const y=o=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(o,t)}):customElements.define(o,t)};/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const Me={attribute:!0,type:String,converter:Ct,reflect:!1,hasChanged:jt},Te=(o=Me,t,e)=>{const{kind:r,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),n.set(e.name,o),r==="accessor"){const{name:s}=e;return{set(
|
|
27
|
+
*/const Me={attribute:!0,type:String,converter:Ct,reflect:!1,hasChanged:jt},Te=(o=Me,t,e)=>{const{kind:r,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),r==="setter"&&((o=Object.create(o)).wrapped=!0),n.set(e.name,o),r==="accessor"){const{name:s}=e;return{set(h){const c=t.get.call(this);t.set.call(this,h),this.requestUpdate(s,c,o)},init(h){return h!==void 0&&this.C(s,void 0,o,h),h}}}if(r==="setter"){const{name:s}=e;return function(h){const c=this[s];t.call(this,h),this.requestUpdate(s,c,o)}}throw Error("Unsupported decorator location: "+r)};function a(o){return(t,e)=>typeof e=="object"?Te(o,t,e):((r,i,n)=>{const s=i.hasOwnProperty(n);return i.constructor.createProperty(n,r),s?Object.getOwnPropertyDescriptor(i,n):void 0})(o,t,e)}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2017 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
-
*/function fe(o,t){return(e,r,i)=>{const n=s=>{var
|
|
39
|
+
*/function fe(o,t){return(e,r,i)=>{const n=s=>{var h;return((h=s.renderRoot)==null?void 0:h.querySelector(o))??null};return je(e,r,{get(){return n(this)}})}}const xt=f`
|
|
40
40
|
outline: 1px dashed var(--color-border-primary);
|
|
41
41
|
outline-offset: 2px;
|
|
42
42
|
`;f`
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
* @license
|
|
48
48
|
* Copyright 2023 Google LLC
|
|
49
49
|
* SPDX-License-Identifier: Apache-2.0
|
|
50
|
-
*/const Nt=Symbol("internals"),zt=Symbol("privateInternals");function
|
|
50
|
+
*/const Nt=Symbol("internals"),zt=Symbol("privateInternals");function Ut(o){var t;class e extends o{get[(t=Nt,t)](){return this[zt]||(this[zt]=this.attachInternals()),this[zt]}}return e}/**
|
|
51
51
|
* @license
|
|
52
52
|
* Copyright 2023 Google LLC
|
|
53
53
|
* SPDX-License-Identifier: Apache-2.0
|
|
54
|
-
*/function Re(o){o.addInitializer(t=>{const e=t;e.addEventListener("click",async r=>{const{type:i,[Nt]:n}=e,{form:s}=n;if(!(!s||i==="button")&&(await new Promise(
|
|
54
|
+
*/function Re(o){o.addInitializer(t=>{const e=t;e.addEventListener("click",async r=>{const{type:i,[Nt]:n}=e,{form:s}=n;if(!(!s||i==="button")&&(await new Promise(h=>{setTimeout(h)}),!r.defaultPrevented)){if(i==="reset"){s.reset();return}s.addEventListener("submit",h=>{Object.defineProperty(h,"submitter",{configurable:!0,enumerable:!0,get:()=>e})},{capture:!0,once:!0}),n.setFormValue(e.value),s.requestSubmit()}})})}const Ne=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
55
55
|
<path d="M8 3.6275C7.06799 0.971489 3.25399 -0.0226278 1.67414 2.30983C0.0877404 4.65197 1.67414 6.99412 2.62598 8.33249C3.0147 8.87905 8 14 8 14C8 14 12.9853 8.87905 13.374 8.33249C14.3259 6.99412 15.9123 4.65197 14.3259 2.30983C12.746 -0.0226277 8.97167 0.971489 8 3.6275Z" stroke="#3F2B2E" stroke-linecap="round"/>
|
|
56
56
|
</svg>
|
|
57
|
-
`,
|
|
57
|
+
`,Ue=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
58
58
|
<path d="M16 8L4 0V16L16 8Z" fill="#3F2B2E"/>
|
|
59
59
|
</svg>
|
|
60
|
-
`,
|
|
60
|
+
`,Fe=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
61
61
|
<path d="M12.2266 8.16162C11.0953 9.26599 8.72489 11.8788 5.11546 16L4.63062 15.7172C5.78886 13.4007 7.17607 10.8283 8.79223 8C7.17607 5.17172 5.78886 2.59933 4.63062 0.282827L5.11546 0C8.72489 4.12121 11.0953 6.73401 12.2266 7.83838V8.16162Z" fill="#3F2B2E"/>
|
|
62
62
|
</svg>
|
|
63
63
|
`,Ve=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -146,19 +146,19 @@
|
|
|
146
146
|
</svg>
|
|
147
147
|
`,bo=`<svg xmlns="http://www.w3.org/2000/svg" width="10" height="8" viewBox="0 0 10 8" fill="none">
|
|
148
148
|
<path d="M1 4.5415L3 6.5415L9 0.541504" stroke="#FBF9F6" stroke-linecap="round" stroke-linejoin="round"/>
|
|
149
|
-
</svg>`,
|
|
149
|
+
</svg>`,N={wishlist:Ne,playerv:Ue,chevronRight:Fe,chevronLeft:Ve,icoPlus:Qe,icoMinus:Ye,"star-0":Ze,"star-25":qe,"star-50":Ke,"star-75":We,"star-100":Ge,cross:Xe,search:Je,arrowLeft:to,arrowTop:eo,cart:oo,notifyme:io,triangledown:ro,triangleup:no,checkstroke:so,pause:ao,mapDualArrow:lo,swipeDualArrow:ho,backToBag:fo,checkbox:bo},go={strikeDiagonal:co},yo={success:po,error:uo,info:vo};/**
|
|
150
150
|
* @license
|
|
151
151
|
* Copyright 2017 Google LLC
|
|
152
152
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
153
|
-
*/const
|
|
153
|
+
*/const Ft={ATTRIBUTE:1,CHILD:2},Vt=o=>(...t)=>({_$litDirective$:o,values:t});let Zt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};/**
|
|
154
154
|
* @license
|
|
155
155
|
* Copyright 2017 Google LLC
|
|
156
156
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
157
|
-
*/class Bt extends Zt{constructor(t){if(super(t),this.it=d,t.type!==
|
|
157
|
+
*/class Bt extends Zt{constructor(t){if(super(t),this.it=d,t.type!==Ft.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===d||t==null)return this._t=void 0,this.it=t;if(t===G)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Bt.directiveName="unsafeHTML",Bt.resultType=1;/**
|
|
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,
|
|
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,r)=>{for(var i=r>1?void 0:r?xo(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&&mo(t,e,i),i};const wo=Ut(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
162
|
<button type=${this.type} class="button" ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}>
|
|
163
163
|
${this.startIcon?this.renderIcon("start"):d}
|
|
164
164
|
${o?l`
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
`:l`<slot></slot>`}
|
|
183
183
|
${this.endIcon?this.renderIcon("end"):d}
|
|
184
184
|
</a>
|
|
185
|
-
`}};Re(
|
|
185
|
+
`}};Re(b);b.formAssociated=!0;b.styles=f`
|
|
186
186
|
:host {
|
|
187
187
|
--button-border: transparent;
|
|
188
188
|
--badge-outer-width: 19px;
|
|
@@ -383,7 +383,7 @@
|
|
|
383
383
|
transform: translateX(4px);
|
|
384
384
|
}
|
|
385
385
|
//End icon movment on hover
|
|
386
|
-
`;
|
|
386
|
+
`;x([a()],b.prototype,"type",2);x([a({reflect:!0})],b.prototype,"value",2);x([a({type:String,reflect:!0})],b.prototype,"variant",2);x([a({type:String})],b.prototype,"text",2);x([a({type:String})],b.prototype,"textsecond",2);x([a({type:Boolean,reflect:!0})],b.prototype,"fullwidth",2);x([a({type:Boolean,reflect:!0})],b.prototype,"disabled",2);x([a({type:String,reflect:!0})],b.prototype,"startIconModel",2);x([a({type:String,reflect:!0})],b.prototype,"endIconModel",2);x([a({type:Boolean,reflect:!0,attribute:"starticon"})],b.prototype,"startIcon",2);x([a({type:Boolean,reflect:!0,attribute:"endicon"})],b.prototype,"endIcon",2);x([a({type:String,attribute:"paneltarget",reflect:!0})],b.prototype,"panelTarget",2);x([a({type:String})],b.prototype,"href",2);x([a({type:String})],b.prototype,"target",2);x([a({type:Boolean,reflect:!0})],b.prototype,"underlined",2);x([a({type:Boolean,reflect:!0})],b.prototype,"withbadge",2);b=x([y("o-button")],b);var $o=Object.defineProperty,Co=Object.getOwnPropertyDescriptor,Et=(o,t,e,r)=>{for(var i=r>1?void 0:r?Co(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&&$o(t,e,i),i};let nt=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("tabindex","0"),this.setAttribute("role","button"),this.setAttribute("aria-pressed",String(this.status==="filled"))}firstUpdated(){this.addEventListener("click",this.toggleStatus),this.addEventListener("keydown",this.handleKeydown)}handleKeydown(o){(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),this.toggleStatus())}render(){const o=N.wishlist.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return l`
|
|
387
387
|
<button type="button" aria-describedby="${this.ariaDescribedBy}" class="wishlist-button">
|
|
388
388
|
<span class="sr-only">${this.label}</span>
|
|
389
389
|
${C(o)}
|
|
@@ -453,11 +453,11 @@
|
|
|
453
453
|
width: 0.1rem !important;
|
|
454
454
|
white-space: nowrap !important;
|
|
455
455
|
}
|
|
456
|
-
`;Et([a({type:String,reflect:!0})],nt.prototype,"status",2);Et([a({type:String,reflect:!0})],nt.prototype,"ariaDescribedBy",2);Et([a({type:String,reflect:!0})],nt.prototype,"label",2);nt=Et([
|
|
456
|
+
`;Et([a({type:String,reflect:!0})],nt.prototype,"status",2);Et([a({type:String,reflect:!0})],nt.prototype,"ariaDescribedBy",2);Et([a({type:String,reflect:!0})],nt.prototype,"label",2);nt=Et([y("o-wishlist-button")],nt);/**
|
|
457
457
|
* @license
|
|
458
458
|
* Copyright 2018 Google LLC
|
|
459
459
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
460
|
-
*/const
|
|
460
|
+
*/const k=o=>o??d;var _o=Object.defineProperty,ko=Object.getOwnPropertyDescriptor,H=(o,t,e,r)=>{for(var i=r>1?void 0:r?ko(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&&_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"'),r=this.showSrLabel?l`<span class="sr-only">${this.srLabel}</span>`:null,i=this.showSrLabel?null:"icon";return l`
|
|
461
461
|
${this.type==="span"?l`
|
|
462
462
|
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
463
463
|
${C(e)}
|
|
@@ -465,7 +465,7 @@
|
|
|
465
465
|
`:l`
|
|
466
466
|
<button
|
|
467
467
|
type="button"
|
|
468
|
-
aria-label=${
|
|
468
|
+
aria-label=${k(i)}
|
|
469
469
|
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
|
|
470
470
|
?disabled="${this.disabled}"
|
|
471
471
|
>
|
|
@@ -473,7 +473,7 @@
|
|
|
473
473
|
${r}
|
|
474
474
|
</button>
|
|
475
475
|
`}
|
|
476
|
-
`}};
|
|
476
|
+
`}};S.styles=f`
|
|
477
477
|
:host {
|
|
478
478
|
display: inline-flex;
|
|
479
479
|
justify-content: center;
|
|
@@ -684,10 +684,10 @@
|
|
|
684
684
|
.sr-only {
|
|
685
685
|
display: none;
|
|
686
686
|
}
|
|
687
|
-
`;
|
|
687
|
+
`;H([a({type:String,reflect:!0})],S.prototype,"bgstyle",2);H([a({type:String,reflect:!0})],S.prototype,"size",2);H([a({type:String,reflect:!0})],S.prototype,"status",2);H([a({type:String,reflect:!0})],S.prototype,"type",2);H([a({type:String})],S.prototype,"strokewidth",2);H([a({type:String})],S.prototype,"icon",2);H([a({type:Boolean,reflect:!0})],S.prototype,"disabled",2);H([a({type:Boolean})],S.prototype,"showSrLabel",2);H([a({type:String})],S.prototype,"srLabel",2);S=H([y("o-icon-button")],S);var So=Object.defineProperty,Eo=Object.getOwnPropertyDescriptor,ot=(o,t,e,r)=>{for(var i=r>1?void 0:r?Eo(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&&So(t,e,i),i};let U=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`
|
|
688
688
|
<a
|
|
689
689
|
href="${o}"
|
|
690
|
-
target="${
|
|
690
|
+
target="${k(this.target||void 0)}"
|
|
691
691
|
@click="${this._handleClick}"
|
|
692
692
|
>
|
|
693
693
|
${this.endIcon&&this.reverseEndIcon?l`
|
|
@@ -797,10 +797,10 @@
|
|
|
797
797
|
height: 1px;
|
|
798
798
|
}
|
|
799
799
|
/* End of underline effect */
|
|
800
|
-
`;ot([a({type:String})],U.prototype,"href",2);ot([a({type:String})],U.prototype,"target",2);ot([a({type:String,reflect:!0})],U.prototype,"template",2);ot([a({type:Boolean,reflect:!0})],U.prototype,"inverse",2);ot([a({type:Boolean,reflect:!0})],U.prototype,"endIcon",2);ot([a({type:Boolean,reflect:!0})],U.prototype,"reverseEndIcon",2);U=ot([
|
|
800
|
+
`;ot([a({type:String})],U.prototype,"href",2);ot([a({type:String})],U.prototype,"target",2);ot([a({type:String,reflect:!0})],U.prototype,"template",2);ot([a({type:Boolean,reflect:!0})],U.prototype,"inverse",2);ot([a({type:Boolean,reflect:!0})],U.prototype,"endIcon",2);ot([a({type:Boolean,reflect:!0})],U.prototype,"reverseEndIcon",2);U=ot([y("o-link")],U);var Ao=Object.defineProperty,Lo=Object.getOwnPropertyDescriptor,At=(o,t,e,r)=>{for(var i=r>1?void 0:r?Lo(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&&Ao(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 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`
|
|
801
801
|
<div class="rating">
|
|
802
802
|
<div class="stars">
|
|
803
|
-
${o.map(t=>l`<span class="star">${C(
|
|
803
|
+
${o.map(t=>l`<span class="star">${C(N[t]??"")}</span>`)}
|
|
804
804
|
</div>
|
|
805
805
|
${this.reviewCount!=null&&this.href!=null?l`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>`:null}
|
|
806
806
|
</div>
|
|
@@ -837,7 +837,7 @@
|
|
|
837
837
|
text-decoration: underline;
|
|
838
838
|
cursor: pointer;
|
|
839
839
|
}
|
|
840
|
-
`;At([a({type:Number})],st.prototype,"rating",2);At([a({type:String})],st.prototype,"reviewCount",2);At([a({type:String})],st.prototype,"href",2);st=At([
|
|
840
|
+
`;At([a({type:Number})],st.prototype,"rating",2);At([a({type:String})],st.prototype,"reviewCount",2);At([a({type:String})],st.prototype,"href",2);st=At([y("o-rating")],st);/**
|
|
841
841
|
* @license
|
|
842
842
|
* Copyright 2020 Google LLC
|
|
843
843
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -845,7 +845,7 @@
|
|
|
845
845
|
* @license
|
|
846
846
|
* Copyright 2017 Google LLC
|
|
847
847
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
848
|
-
*/const ht=(o,t)=>{var r;const e=o._$AN;if(e===void 0)return!1;for(const i of e)(r=i._$AO)==null||r.call(i,t,!1),ht(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 Po(o){this._$AN!==void 0?(kt(this),this._$AM=o,be(this)):this._$AM=o}function Oo(o,t=!1,e=0){const r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(r))for(let n=e;n<r.length;n++)ht(r[n],!1),kt(r[n]);else r!=null&&(ht(r,!1),kt(r));else ht(this,o)}const zo=o=>{o.type==
|
|
848
|
+
*/const ht=(o,t)=>{var r;const e=o._$AN;if(e===void 0)return!1;for(const i of e)(r=i._$AO)==null||r.call(i,t,!1),ht(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 Po(o){this._$AN!==void 0?(kt(this),this._$AM=o,be(this)):this._$AM=o}function Oo(o,t=!1,e=0){const r=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(r))for(let n=e;n<r.length;n++)ht(r[n],!1),kt(r[n]);else r!=null&&(ht(r,!1),kt(r));else ht(this,o)}const zo=o=>{o.type==Ft.CHILD&&(o._$AP??(o._$AP=Oo),o._$AQ??(o._$AQ=Po))};class Bo extends Zt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),be(this),this.isConnected=t._$AU}_$AO(t,e=!0){var r,i;t!==this.isConnected&&(this.isConnected=t,t?(r=this.reconnected)==null||r.call(this):(i=this.disconnected)==null||i.call(this)),e&&(ht(this,t),kt(this))}setValue(t){if(Io(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 r;this.element!==t.element&&(this.element=t.element),this.host=((r=t.options)===null||r===void 0?void 0:r.host)||this.element,this.apply(e),this.groom(e),this.prevData={...e}}apply(t){if(!t)return;const{prevData:e,element:r}=this;for(const i in t){const n=t[i];n!==e[i]&&(r[i]=n)}}groom(t){const{prevData:e,element:r}=this;if(e)for(const i in e)(!t||!(i in t)&&r[i]===e[i])&&(r[i]=void 0)}}class Ho extends Do{constructor(){super(...arguments),this.eventData={}}apply(t){if(t)for(const e in t){const r=t[e];r!==this.eventData[e]&&this.applyEvent(e,r)}}applyEvent(t,e){const{prevData:r,element:i}=this;this.eventData[t]=e,r[t]&&i.removeEventListener(t,this,e),i.addEventListener(t,this,e)}groom(t){const{prevData:e,element:r}=this;if(e)for(const i in e)(!t||!(i in t)&&r[i]===e[i])&&this.groomEvent(i,e[i])}groomEvent(t,e){const{element:r}=this;delete this.eventData[t],r.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 r in t){const i=r.slice(1),n=t[r];e.removeEventListener(i,this,n)}}reconnected(){const{eventData:t,element:e}=this;for(const r in t){const i=r.slice(1),n=t[r];e.addEventListener(i,this,n)}}}class Mo extends Ho{apply(t){if(!t)return;const{prevData:e,element:r}=this;for(const i in t){const n=t[i];if(n===e[i])continue;const s=i.slice(1);switch(i[0]){case"@":this.eventData[s]=n,this.applyEvent(s,n);break;case".":r[s]=n;break;case"?":n?r.setAttribute(s,""):r.removeAttribute(s);break;default:n!=null?r.setAttribute(i,String(n)):r.removeAttribute(i);break}}}groom(t){const{prevData:e,element:r}=this;if(e)for(const i in e){const n=i.slice(1);if(!t||!(i in t)&&r[n]===e[i])switch(i[0]){case"@":this.groomEvent(n,e[i]);break;case".":r[n]=void 0;break;case"?":r.removeAttribute(n);break;default:r.removeAttribute(i);break}}}}const le=Vt(Mo);var To=Object.defineProperty,jo=Object.getOwnPropertyDescriptor,g=(o,t,e,r)=>{for(var i=r>1?void 0:r?jo(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&&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.innerFocusedElement=null,this._onOpenDetail=()=>{this.showDetail=!0,this.showHeaderStartIcon=!0},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");if(r){this.showHeaderStartIcon=!1;const i=()=>{this.showDetail=!1,this.isHidingDetail=!1,r.removeEventListener("animationend",i)};r.addEventListener("animationend",i)}else this.showDetail=!1,this.isHidingDetail=!1,this.showHeaderStartIcon=!1;return}this.closePanel()}}connectedCallback(){super.connectedCallback(),!this.disablePortal&&this.parentElement!==document.body&&document.body.appendChild(this),this.addEventListener("keydown",this.handleKeyDown),this.updateComplete.then(()=>{this.initialized=!0}),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)}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(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);n.push(...h,...c)}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,r,i;if(this.showHeader){const n=((t=this.shadowRoot)==null?void 0:t.querySelector(".panel .close-btn"))||null,s=((e=n==null?void 0:n.shadowRoot)==null?void 0:e.querySelector("button"))||null;s&&((r=s.focus)==null||r.call(s))}else{const n=this.getFocusableElements()[0];(i=n==null?void 0:n.focus)==null||i.call(n)}}),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`
|
|
849
849
|
<div class="header">
|
|
850
850
|
${this.showHeaderStartIcon?l`
|
|
851
851
|
<o-icon-button
|
|
@@ -859,9 +859,9 @@
|
|
|
859
859
|
aria-label="${this.closeButtonLabel}"
|
|
860
860
|
></o-icon-button>
|
|
861
861
|
`:null}
|
|
862
|
-
<
|
|
862
|
+
<p role="heading" aria-level="1" id="panel-title" class="${this.headerTitleClassName}">
|
|
863
863
|
${this.headerTitle}
|
|
864
|
-
</
|
|
864
|
+
</p>
|
|
865
865
|
<o-icon-button
|
|
866
866
|
icon="cross"
|
|
867
867
|
size="small"
|
|
@@ -871,6 +871,8 @@
|
|
|
871
871
|
@keydown=${this.handleClosePanel}
|
|
872
872
|
aria-label="${this.closeButtonLabel}"
|
|
873
873
|
aria-describedby="panel-title"
|
|
874
|
+
srlabel="${this.closeButtonLabel}"
|
|
875
|
+
showsrlabel="true"
|
|
874
876
|
></o-icon-button>
|
|
875
877
|
</div>
|
|
876
878
|
`:null;return l`
|
|
@@ -883,48 +885,49 @@
|
|
|
883
885
|
style="z-index: ${this.zIndex+1}"
|
|
884
886
|
tabindex="-1"
|
|
885
887
|
>
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
888
|
+
<div role="document">
|
|
889
|
+
${o}
|
|
890
|
+
|
|
891
|
+
<div class="content ${this.isHidingDetail?"slide-out-right":""} ${this.showDetail?"with-detail":""}">
|
|
892
|
+
|
|
893
|
+
${this.showDetail?l`
|
|
894
|
+
<div class="detail-view">
|
|
895
|
+
${o}
|
|
896
|
+
<div class="detail-content">
|
|
897
|
+
<slot name="detail"></slot>
|
|
898
|
+
</div>
|
|
896
899
|
</div>
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
900
|
+
`:l`<slot></slot>`}
|
|
901
|
+
</div>
|
|
902
|
+
|
|
903
|
+
${this.showFooter?l`
|
|
904
|
+
<div class="footer">
|
|
905
|
+
${this.firstButtonVariant&&this.firstButtonLabel?l`
|
|
906
|
+
<o-button
|
|
907
|
+
variant="${this.firstButtonVariant}"
|
|
908
|
+
@click=${this.handleFirstClick}
|
|
909
|
+
@keydown=${this.handleFirstClick}
|
|
910
|
+
${le(this.firstButtonProps)}
|
|
911
|
+
>
|
|
912
|
+
${this.firstButtonLabel}
|
|
913
|
+
</o-button>
|
|
914
|
+
`:null}
|
|
915
|
+
|
|
916
|
+
${this.secondButtonVariant&&this.secondButtonLabel?l`
|
|
917
|
+
<o-button
|
|
918
|
+
variant="${this.secondButtonVariant}"
|
|
919
|
+
@click=${this.handleSecondClick}
|
|
920
|
+
@keydown=${this.handleSecondClick}
|
|
921
|
+
${le(this.secondButtonProps)}
|
|
922
|
+
>
|
|
923
|
+
${this.secondButtonLabel}
|
|
924
|
+
</o-button>
|
|
925
|
+
`:null}
|
|
926
|
+
</div>
|
|
923
927
|
`:null}
|
|
924
|
-
|
|
925
|
-
`:null}
|
|
928
|
+
</div>
|
|
926
929
|
</div>
|
|
927
|
-
`}};
|
|
930
|
+
`}};p.styles=f`
|
|
928
931
|
:host {
|
|
929
932
|
--z-overlay: 99;
|
|
930
933
|
--z-panel: 100;
|
|
@@ -1024,9 +1027,7 @@
|
|
|
1024
1027
|
}
|
|
1025
1028
|
}
|
|
1026
1029
|
|
|
1027
|
-
.panel:focus,
|
|
1028
1030
|
.panel:focus-visible,
|
|
1029
|
-
.close-btn:focus,
|
|
1030
1031
|
.close-btn:focus-visible {
|
|
1031
1032
|
${xt}
|
|
1032
1033
|
}
|
|
@@ -1112,7 +1113,7 @@
|
|
|
1112
1113
|
.detail-content {
|
|
1113
1114
|
padding: var(--spacing-xl);
|
|
1114
1115
|
}
|
|
1115
|
-
`;
|
|
1116
|
+
`;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,r)=>{for(var i=r>1?void 0:r?No(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 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`
|
|
1116
1117
|
<o-icon-button
|
|
1117
1118
|
icon="playerv"
|
|
1118
1119
|
size="xsmall"
|
|
@@ -1141,7 +1142,7 @@
|
|
|
1141
1142
|
</li>
|
|
1142
1143
|
`})}
|
|
1143
1144
|
</ul>
|
|
1144
|
-
`}};
|
|
1145
|
+
`}};D.styles=f`
|
|
1145
1146
|
:host {
|
|
1146
1147
|
display: flex;
|
|
1147
1148
|
gap: 5px;
|
|
@@ -1246,7 +1247,7 @@
|
|
|
1246
1247
|
height: 0;
|
|
1247
1248
|
width: 0;
|
|
1248
1249
|
}
|
|
1249
|
-
`;X([a({type:Array})],
|
|
1250
|
+
`;X([a({type:Array})],D.prototype,"thumbnails",2);X([a({type:Number})],D.prototype,"activeIndex",2);X([a({type:Array})],D.prototype,"disabledIndexes",2);X([a({type:String})],D.prototype,"maxWidth",2);X([a({type:String})],D.prototype,"altressource",2);X([a({type:Object})],D.prototype,"swiperInstance",2);X([et()],D.prototype,"focusedIndex",2);D=X([y("thumbnail-navigation")],D);var Uo=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,qt=(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&&Uo(t,e,i),i};let vt=class extends u{constructor(){super(...arguments),this.type="",this.bgstyle="background-white"}render(){return l`
|
|
1250
1251
|
<span class="tag ${this.bgstyle}"><slot></slot></span>
|
|
1251
1252
|
`}};vt.styles=f`
|
|
1252
1253
|
.tag {
|
|
@@ -1305,7 +1306,7 @@
|
|
|
1305
1306
|
}
|
|
1306
1307
|
}
|
|
1307
1308
|
|
|
1308
|
-
`;qt([a({type:String,reflect:!0})],vt.prototype,"type",2);qt([a({type:String,reflect:!0})],vt.prototype,"bgstyle",2);vt=qt([
|
|
1309
|
+
`;qt([a({type:String,reflect:!0})],vt.prototype,"type",2);qt([a({type:String,reflect:!0})],vt.prototype,"bgstyle",2);vt=qt([y("o-tag")],vt);var Vo=Object.defineProperty,Zo=Object.getOwnPropertyDescriptor,Kt=(o,t,e,r)=>{for(var i=r>1?void 0:r?Zo(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&&Vo(t,e,i),i};let ft=class extends u{constructor(){super(...arguments),this.type="top",this.text=""}render(){return l`
|
|
1309
1310
|
<div class="tooltip">
|
|
1310
1311
|
<span class="tooltiptext">${this.text}</span>
|
|
1311
1312
|
<slot></slot>
|
|
@@ -1402,7 +1403,7 @@
|
|
|
1402
1403
|
border-color: transparent var(--color-alpha-dark-strongest) transparent transparent;
|
|
1403
1404
|
}
|
|
1404
1405
|
|
|
1405
|
-
`;Kt([a({type:String,reflect:!0})],ft.prototype,"type",2);Kt([a({type:String,reflect:!0})],ft.prototype,"text",2);ft=Kt([
|
|
1406
|
+
`;Kt([a({type:String,reflect:!0})],ft.prototype,"type",2);Kt([a({type:String,reflect:!0})],ft.prototype,"text",2);ft=Kt([y("o-tooltip")],ft);var qo=Object.defineProperty,Ko=Object.getOwnPropertyDescriptor,F=(o,t,e,r)=>{for(var i=r>1?void 0:r?Ko(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&&qo(t,e,i),i};let z=class extends u{constructor(){super(...arguments),this.options=[],this.value="",this.name="",this.disabled=!1,this.width="100%",this.open=!1,this.activeIndex=-1,this.menuWidth="",this._handleOutsideClick=o=>{this.contains(o.target)||(this.open=!1,this.activeIndex=-1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this._handleOutsideClick),super.disconnectedCallback()}toggle(){var o;if(!this.disabled){if(this.open=!this.open,this.activeIndex=this.open?this.options.findIndex(t=>t.value===this.value):-1,this.open&&this.width==="auto"){const t=(o=this.renderRoot)==null?void 0:o.querySelector("button");t&&(this.menuWidth=`${t.getBoundingClientRect().width}px`)}this.open&&this.updateComplete.then(()=>{this._focusActiveOption()})}}_focusActiveOption(){var t;const o=(t=this.renderRoot)==null?void 0:t.querySelector(`#option-${this.activeIndex}`);o==null||o.focus()}selectOption(o){this.value=o.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,url:o.url}})),this.open=!1,this.activeIndex=-1}handleKeydown(o){if(this.disabled){o.preventDefault();return}if(!this.open){(o.key==="ArrowDown"||o.key==="ArrowUp")&&(o.preventDefault(),this.open=!0,this.activeIndex=this.options.findIndex(t=>t.value===this.value),this.updateComplete.then(()=>this._focusActiveOption()));return}switch(o.key){case"ArrowDown":o.preventDefault(),this.activeIndex=(this.activeIndex+1)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"ArrowUp":o.preventDefault(),this.activeIndex=(this.activeIndex-1+this.options.length)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"Home":o.preventDefault(),this.activeIndex=0,this.updateComplete.then(()=>this._focusActiveOption());break;case"End":o.preventDefault(),this.activeIndex=this.options.length-1,this.updateComplete.then(()=>this._focusActiveOption());break;case"Enter":o.preventDefault(),this.activeIndex>=0&&this.selectOption(this.options[this.activeIndex]);break;case"Escape":o.preventDefault(),this.open=!1,this.activeIndex=-1;break}}updated(o){this.options.length>0&&(this.options.some(e=>e.value===this.value)||(this.value=this.options[0].value))}render(){const o=N.checkstroke.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"'),t=this.options.find(e=>e.value===this.value);return l`
|
|
1406
1407
|
<button
|
|
1407
1408
|
role="combobox"
|
|
1408
1409
|
aria-haspopup="listbox"
|
|
@@ -1450,7 +1451,7 @@
|
|
|
1450
1451
|
</ul>`:null}
|
|
1451
1452
|
|
|
1452
1453
|
<input type="hidden" name="${this.name}" .value="${this.value}" />
|
|
1453
|
-
`}};
|
|
1454
|
+
`}};z.styles=f`
|
|
1454
1455
|
:host {
|
|
1455
1456
|
display: inline-block;
|
|
1456
1457
|
position: relative;
|
|
@@ -1589,7 +1590,7 @@
|
|
|
1589
1590
|
input[type="hidden"] {
|
|
1590
1591
|
display: none;
|
|
1591
1592
|
}
|
|
1592
|
-
`;
|
|
1593
|
+
`;F([a({type:Array,reflect:!0})],z.prototype,"options",2);F([a({type:String,reflect:!0})],z.prototype,"value",2);F([a({type:String,reflect:!0})],z.prototype,"name",2);F([a({type:Boolean,reflect:!0})],z.prototype,"disabled",2);F([a({type:String,reflect:!0})],z.prototype,"width",2);F([et()],z.prototype,"open",2);F([et()],z.prototype,"activeIndex",2);F([et()],z.prototype,"menuWidth",2);z=F([y("o-dropdown")],z);var Wo=Object.getOwnPropertyDescriptor,Go=(o,t,e,r)=>{for(var i=r>1?void 0:r?Wo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(i=s(i)||i);return i};let Ht=class extends u{render(){return l` <span class="dots"></span> `}};Ht.styles=f`
|
|
1593
1594
|
:host {
|
|
1594
1595
|
display: flex;
|
|
1595
1596
|
align-items: center;
|
|
@@ -1640,7 +1641,7 @@
|
|
|
1640
1641
|
background-color: var(--color-container-action-primary-pressed);
|
|
1641
1642
|
}
|
|
1642
1643
|
}
|
|
1643
|
-
`;Ht=Go([
|
|
1644
|
+
`;Ht=Go([y("o-dots")],Ht);var Xo=Object.defineProperty,Jo=Object.getOwnPropertyDescriptor,M=(o,t,e,r)=>{for(var i=r>1?void 0:r?Jo(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 E=class extends u{constructor(){super(...arguments),this.options=[],this.value="",this.name="",this.additionaltext="+X variant(s)",this.disabled=!1,this.width="100%",this.open=!1,this.activeIndex=-1,this.menuWidth="",this._handleOutsideClick=o=>{this.contains(o.target)||(this.open=!1,this.activeIndex=-1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._handleOutsideClick)}disconnectedCallback(){document.removeEventListener("click",this._handleOutsideClick),super.disconnectedCallback()}toggle(){var o;if(!this.disabled){if(this.open=!this.open,this.activeIndex=this.open?this.options.findIndex(t=>t.value===this.value):-1,this.open&&this.width==="auto"){const t=(o=this.renderRoot)==null?void 0:o.querySelector("button");t&&(this.menuWidth=`${t.getBoundingClientRect().width}px`)}this.open&&this.updateComplete.then(()=>this._focusActiveOption())}}_focusActiveOption(){var t;const o=(t=this.renderRoot)==null?void 0:t.querySelector(`#option-${this.activeIndex}`);o==null||o.focus()}selectOption(o){this.value=o.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value,url:o.url}})),this.open=!1,this.activeIndex=-1}handleKeydown(o){if(this.disabled){o.preventDefault();return}if(!this.open){(o.key==="ArrowDown"||o.key==="ArrowUp")&&(o.preventDefault(),this.open=!0,this.activeIndex=this.options.findIndex(t=>t.value===this.value),this.updateComplete.then(()=>this._focusActiveOption()));return}switch(o.key){case"ArrowDown":o.preventDefault(),this.activeIndex=(this.activeIndex+1)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"ArrowUp":o.preventDefault(),this.activeIndex=(this.activeIndex-1+this.options.length)%this.options.length,this.updateComplete.then(()=>this._focusActiveOption());break;case"Home":o.preventDefault(),this.activeIndex=0,this.updateComplete.then(()=>this._focusActiveOption());break;case"End":o.preventDefault(),this.activeIndex=this.options.length-1,this.updateComplete.then(()=>this._focusActiveOption());break;case"Enter":o.preventDefault(),this.activeIndex>=0&&this.selectOption(this.options[this.activeIndex]);break;case"Escape":o.preventDefault(),this.open=!1,this.activeIndex=-1;break}}updated(){this.options.length>0&&(this.options.some(t=>t.value===this.value)||(this.value=this.options[0].value))}render(){const o=N.checkstroke.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"'),t=this.options.find(e=>e.value===this.value);return l`
|
|
1644
1645
|
<button
|
|
1645
1646
|
role="combobox"
|
|
1646
1647
|
aria-haspopup="listbox"
|
|
@@ -1654,7 +1655,7 @@
|
|
|
1654
1655
|
?disabled=${this.disabled}
|
|
1655
1656
|
class="btn-dropdown"
|
|
1656
1657
|
>
|
|
1657
|
-
<img alt="${
|
|
1658
|
+
<img alt="${k(t==null?void 0:t.label)}" src="${k(t==null?void 0:t.imgurl)}" />
|
|
1658
1659
|
<span id="dropdown-label" class="label">
|
|
1659
1660
|
${t?t.label:"Select an option"}
|
|
1660
1661
|
</span>
|
|
@@ -1688,11 +1689,11 @@
|
|
|
1688
1689
|
class="${r===this.activeIndex?"active":""} ${e.disabled?"disabled":""}"
|
|
1689
1690
|
@click=${()=>this.selectOption(e)}
|
|
1690
1691
|
>
|
|
1691
|
-
<a href="${
|
|
1692
|
-
<img alt="${
|
|
1692
|
+
<a href="${k(e.url)}">
|
|
1693
|
+
<img alt="${k(e.label)}" src="${k(e.imgurl)}" />
|
|
1693
1694
|
<span class="label">${e.label}</span>
|
|
1694
1695
|
<div class="right">
|
|
1695
|
-
<span class="additional-text">${
|
|
1696
|
+
<span class="additional-text">${k(e.additionaltext)}</span>
|
|
1696
1697
|
${e.value===this.value&&!e.additionaltext?l`
|
|
1697
1698
|
<span class="check">${C(o)}</span>`:null}
|
|
1698
1699
|
</div>
|
|
@@ -1702,7 +1703,7 @@
|
|
|
1702
1703
|
</ul>`:null}
|
|
1703
1704
|
|
|
1704
1705
|
<input type="hidden" name="${this.name}" .value="${this.value}" />
|
|
1705
|
-
`}};
|
|
1706
|
+
`}};E.styles=f`
|
|
1706
1707
|
:host {
|
|
1707
1708
|
display: inline-block;
|
|
1708
1709
|
position: relative;
|
|
@@ -1877,17 +1878,17 @@
|
|
|
1877
1878
|
input[type="hidden"] {
|
|
1878
1879
|
display: none;
|
|
1879
1880
|
}
|
|
1880
|
-
`;
|
|
1881
|
+
`;M([a({type:Array,reflect:!0})],E.prototype,"options",2);M([a({type:String,reflect:!0})],E.prototype,"value",2);M([a({type:String,reflect:!0})],E.prototype,"name",2);M([a({type:String,reflect:!0})],E.prototype,"additionaltext",2);M([a({type:Boolean,reflect:!0})],E.prototype,"disabled",2);M([a({type:String,reflect:!0})],E.prototype,"width",2);M([et()],E.prototype,"open",2);M([et()],E.prototype,"activeIndex",2);M([et()],E.prototype,"menuWidth",2);E=M([y("o-dropdown-variant")],E);/**
|
|
1881
1882
|
* @license
|
|
1882
1883
|
* Copyright 2018 Google LLC
|
|
1883
1884
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1884
|
-
*/const ge="important",Qo=" !"+ge,Yo=Vt(class extends Zt{constructor(o){var t;if(super(o),o.type!==
|
|
1885
|
-
${this.option.imgurl?l`<img src="${this.option.imgurl}" alt="${
|
|
1885
|
+
*/const ge="important",Qo=" !"+ge,Yo=Vt(class extends Zt{constructor(o){var t;if(super(o),o.type!==Ft.ATTRIBUTE||o.name!=="style"||((t=o.strings)==null?void 0:t.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((t,e)=>{const r=o[e];return r==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(o,[t]){const{style:e}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(const r of this.ft)t[r]==null&&(this.ft.delete(r),r.includes("-")?e.removeProperty(r):e[r]=null);for(const r in t){const i=t[r];if(i!=null){this.ft.add(r);const n=typeof i=="string"&&i.endsWith(Qo);r.includes("-")||n?e.setProperty(r,n?i.slice(0,-11):i,n?ge:""):e[r]=i}}return G}});var ti=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,Wt=(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 bt=class extends u{constructor(){super(...arguments),this.option={},this.imageSize=64}render(){const o=this.option.clickable,t={width:`${this.imageSize}px`,height:`${this.imageSize}px`},e=l`
|
|
1886
|
+
${this.option.imgurl?l`<img src="${this.option.imgurl}" alt="${k(this.option.title)}" aria-hidden="true" style=${Yo(t)} />`:""}
|
|
1886
1887
|
<div class="m-reassurance-content">
|
|
1887
|
-
<h3 class="a-reassurance-text">${
|
|
1888
|
-
<p class="a-reassurance-description">${
|
|
1888
|
+
<h3 class="a-reassurance-text">${k(this.option.title)}</h3>
|
|
1889
|
+
<p class="a-reassurance-description">${k(this.option.description)}</p>
|
|
1889
1890
|
</div>
|
|
1890
|
-
`;return o?l`<a href="${
|
|
1891
|
+
`;return o?l`<a href="${k(this.option.url)}" class="reassurance-item clickable">${e}</a>`:l`<div class="reassurance-item">${e}</div>`}};bt.styles=f`
|
|
1891
1892
|
:host {
|
|
1892
1893
|
display: inline-block;
|
|
1893
1894
|
position: relative;
|
|
@@ -1968,7 +1969,7 @@
|
|
|
1968
1969
|
overflow: hidden;
|
|
1969
1970
|
}
|
|
1970
1971
|
}
|
|
1971
|
-
`;Wt([a({type:Object,reflect:!0})],bt.prototype,"option",2);Wt([a({type:Number,reflect:!0})],bt.prototype,"imageSize",2);bt=Wt([
|
|
1972
|
+
`;Wt([a({type:Object,reflect:!0})],bt.prototype,"option",2);Wt([a({type:Number,reflect:!0})],bt.prototype,"imageSize",2);bt=Wt([y("o-reassurance")],bt);var oi=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,V=(o,t,e,r)=>{for(var i=r>1?void 0:r?ii(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&&oi(t,e,i),i};const ri=Ut(u);let A=class extends ri{constructor(){super(...arguments),this.link="",this.name="",this.value="",this.text="",this.size="standard",this.selected=!1,this.fullwidth=!1,this.inactive=!1}handleClick(o){this.selected||(this.selected=!0);const t={selected:this.selected},e=new CustomEvent("selected",{detail:t,bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(e),e.defaultPrevented&&o.preventDefault(),this.selected=t.selected}render(){const o=this.text;return this.link?l`
|
|
1972
1973
|
<a href="${this.link}" class="o-chip" tabindex="${this.inactive?"-1":"0"}" aria-hidden="${this.inactive?"true":"false"}">
|
|
1973
1974
|
${o?this.text:l`<slot></slot>`}
|
|
1974
1975
|
</a>
|
|
@@ -1977,7 +1978,7 @@
|
|
|
1977
1978
|
aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
|
|
1978
1979
|
${o?this.text:l`<slot></slot>`}
|
|
1979
1980
|
</button>
|
|
1980
|
-
`}};
|
|
1981
|
+
`}};A.styles=f`
|
|
1981
1982
|
:host {
|
|
1982
1983
|
cursor: pointer;
|
|
1983
1984
|
display: inline-flex;
|
|
@@ -2066,7 +2067,7 @@
|
|
|
2066
2067
|
display: inline-flex;
|
|
2067
2068
|
align-items: center;
|
|
2068
2069
|
}
|
|
2069
|
-
`;
|
|
2070
|
+
`;V([a({type:String,reflect:!0})],A.prototype,"link",2);V([a({reflect:!0})],A.prototype,"name",2);V([a({reflect:!0})],A.prototype,"value",2);V([a({type:String})],A.prototype,"text",2);V([a({type:String,reflect:!0})],A.prototype,"size",2);V([a({type:Boolean,reflect:!0})],A.prototype,"selected",2);V([a({type:Boolean,reflect:!0})],A.prototype,"fullwidth",2);V([a({type:Boolean,reflect:!0})],A.prototype,"inactive",2);A=V([y("o-chip")],A);var ni=Object.defineProperty,si=Object.getOwnPropertyDescriptor,Gt=(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&&ni(t,e,i),i};let gt=class extends u{constructor(){super(),this.name="",this.value="",this.addEventListener("selected",this.onChipSelected)}onChipSelected(o){const t=o.target instanceof A?o.target:null;t!=null&&t.link||(this.name=(t==null?void 0:t.name)||"",this.value=(t==null?void 0:t.value)||"",this.querySelectorAll("o-chip").forEach(e=>{e!==t&&(e.selected=!1)}))}render(){return l`
|
|
2070
2071
|
<slot></slot>
|
|
2071
2072
|
`}};gt.styles=f`
|
|
2072
2073
|
:host {
|
|
@@ -2075,7 +2076,7 @@
|
|
|
2075
2076
|
flex-wrap: wrap;
|
|
2076
2077
|
gap: var(--spacing-s);
|
|
2077
2078
|
}
|
|
2078
|
-
`;Gt([a({reflect:!0})],gt.prototype,"name",2);Gt([a({reflect:!0})],gt.prototype,"value",2);gt=Gt([
|
|
2079
|
+
`;Gt([a({reflect:!0})],gt.prototype,"name",2);Gt([a({reflect:!0})],gt.prototype,"value",2);gt=Gt([y("o-chipset")],gt);var ai=Object.defineProperty,li=Object.getOwnPropertyDescriptor,T=(o,t,e,r)=>{for(var i=r>1?void 0:r?li(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&&ai(t,e,i),i};const ci=Ut(u);let L=class extends ci{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=N[this.crossIconName].replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"').replace(/stroke=[#"'a-z1-9]*/gi,"");return l`<span class="cross-icon">${C(o)}</span>`}strikeThroughImg(){const o=go[this.strikethroughImgName].replace("<svg",'<svg aria-hidden="true" focusable="false" part="strikethrough"').replace(/stroke=[#"'a-z1-9]*/gi,"");return C(o)}render(){const o=this.text;return l`${this.type==="link"?l`
|
|
2079
2080
|
<a role="button" tabindex="0" class="button" href=${this.href} ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}
|
|
2080
2081
|
aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
|
|
2081
2082
|
${o?l`
|
|
@@ -2095,7 +2096,7 @@
|
|
|
2095
2096
|
</button>
|
|
2096
2097
|
`}
|
|
2097
2098
|
${this.disabled?this.strikeThroughImg():d}
|
|
2098
|
-
`}};
|
|
2099
|
+
`}};L.styles=f`
|
|
2099
2100
|
:host {
|
|
2100
2101
|
cursor: pointer;
|
|
2101
2102
|
display: inline-flex;
|
|
@@ -2220,7 +2221,7 @@
|
|
|
2220
2221
|
stroke-linecap: round;
|
|
2221
2222
|
}
|
|
2222
2223
|
}
|
|
2223
|
-
`;
|
|
2224
|
+
`;T([a({reflect:!0})],L.prototype,"name",2);T([a({reflect:!0})],L.prototype,"value",2);T([a({type:String,reflect:!0})],L.prototype,"type",2);T([a({type:String,reflect:!0})],L.prototype,"href",2);T([a({type:String,reflect:!0,attribute:"data-href"})],L.prototype,"dataHref",2);T([a({type:String})],L.prototype,"text",2);T([a({type:Boolean,reflect:!0})],L.prototype,"selected",2);T([a({type:Boolean,reflect:!0})],L.prototype,"disabled",2);T([a({type:Boolean,reflect:!0})],L.prototype,"fullwidth",2);L=T([y("o-filter-chip")],L);var hi=Object.defineProperty,Z=(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&&hi(t,e,i),i};const Jt=class Jt extends u{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}onClick(){typeof this.onClickTile=="function"&&this.onClickTile()}get icons(){return this.type==="chevron"?l`
|
|
2224
2225
|
<o-icon-button
|
|
2225
2226
|
@click=${this.onClick}
|
|
2226
2227
|
icon="chevronRight"
|
|
@@ -2229,6 +2230,8 @@
|
|
|
2229
2230
|
type="span"
|
|
2230
2231
|
status="filled"
|
|
2231
2232
|
strokewidth="0"
|
|
2233
|
+
aria-hidden="true"
|
|
2234
|
+
tabindex="-1"
|
|
2232
2235
|
></o-icon-button>
|
|
2233
2236
|
`:l`
|
|
2234
2237
|
<o-icon-button
|
|
@@ -2240,18 +2243,19 @@
|
|
|
2240
2243
|
strokewidth="0"
|
|
2241
2244
|
></o-icon-button>
|
|
2242
2245
|
`}render(){return l`
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2246
|
+
<button type="button"
|
|
2247
|
+
class="tile ${this.fullwidth?"fullwidth":""} ${this.type==="chevron"?"fullpointer":""}" @click=${this.onClick}>
|
|
2248
|
+
${this.imageUrl?l`<img src="${this.imageUrl}" alt="${this.altImage||""}" />`:""}
|
|
2249
|
+
<div class="info">
|
|
2250
|
+
${this.titleProduct?l`<div class="title">${this.titleProduct}</div>`:""}
|
|
2251
|
+
<div class="details">
|
|
2252
|
+
${this.volume?l`<span class="volume-info">${this.volume}</span>`:""}
|
|
2253
|
+
${this.type==="cart"&&this.mainPrice?l`<span class="main-price">${this.mainPrice}</span>`:""}
|
|
2254
|
+
${this.type==="cart"&&this.perLiter?l`<span class="per-liter">${this.perLiter}</span>`:""}
|
|
2255
|
+
</div>
|
|
2251
2256
|
</div>
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
</div>
|
|
2257
|
+
${this.icons}
|
|
2258
|
+
</button>
|
|
2255
2259
|
`}};Jt.styles=f`
|
|
2256
2260
|
:host {
|
|
2257
2261
|
display: block;
|
|
@@ -2270,6 +2274,9 @@
|
|
|
2270
2274
|
width: 356px;
|
|
2271
2275
|
max-width: 356px;
|
|
2272
2276
|
padding: var(--spacing-2-xs) var(--spacing-s) var(--spacing-2-xs) var(--spacing-2-xs);
|
|
2277
|
+
margin: 0;
|
|
2278
|
+
border: 0 none;
|
|
2279
|
+
box-sizing: content-box;
|
|
2273
2280
|
}
|
|
2274
2281
|
|
|
2275
2282
|
.tile.fullwidth {
|
|
@@ -2296,6 +2303,7 @@
|
|
|
2296
2303
|
color: var(--colors-noir-des-terres-500);
|
|
2297
2304
|
line-height: var(--line-height-160);
|
|
2298
2305
|
letter-spacing: var(--letter-spacing-100);
|
|
2306
|
+
text-align: left;
|
|
2299
2307
|
|
|
2300
2308
|
+.details {
|
|
2301
2309
|
padding-top: var(--spacing-s);}
|
|
@@ -2339,7 +2347,7 @@
|
|
|
2339
2347
|
.fullpointer {
|
|
2340
2348
|
cursor: pointer;
|
|
2341
2349
|
}
|
|
2342
|
-
`;let
|
|
2350
|
+
`;let I=Jt;Z([a({type:String})],I.prototype,"type");Z([a({type:String})],I.prototype,"titleProduct");Z([a({type:String})],I.prototype,"volume");Z([a({type:String})],I.prototype,"perLiter");Z([a({type:String})],I.prototype,"mainPrice");Z([a({type:String})],I.prototype,"imageUrl");Z([a({type:String})],I.prototype,"altImage");Z([a({type:Boolean})],I.prototype,"fullwidth");Z([a({type:Function})],I.prototype,"onClickTile");customElements.define("mini-tile",I);var di=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,Xt=(o,t,e,r)=>{for(var i=r>1?void 0:r?pi(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&&di(t,e,i),i};let yt=class extends u{constructor(){super(...arguments),this.variant="cart",this.text=""}render(){return l`
|
|
2343
2351
|
<span class="badge">
|
|
2344
2352
|
${this.text?this.text:l`<slot></slot>`}
|
|
2345
2353
|
</span>
|
|
@@ -2377,7 +2385,7 @@
|
|
|
2377
2385
|
color: var(--text-color);
|
|
2378
2386
|
}
|
|
2379
2387
|
|
|
2380
|
-
`;Xt([a({type:String,reflect:!0})],yt.prototype,"variant",2);Xt([a({type:String})],yt.prototype,"text",2);yt=Xt([
|
|
2388
|
+
`;Xt([a({type:String,reflect:!0})],yt.prototype,"variant",2);Xt([a({type:String})],yt.prototype,"text",2);yt=Xt([y("o-badge")],yt);var ui=Object.defineProperty,vi=Object.getOwnPropertyDescriptor,O=(o,t,e,r)=>{for(var i=r>1?void 0:r?vi(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&&ui(t,e,i),i};let $=class extends u{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","")),h=parseInt(n.getPropertyValue("height").replace("px",""));!isNaN(s)&&!isNaN(h)&&h>s&&(this.multiline=!0)}t!=null&&t.addEventListener("click",function(){o.remove()})}render(){const t=yo[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`
|
|
2381
2389
|
<div class="o-toast">
|
|
2382
2390
|
<div class="o-toast-icon">
|
|
2383
2391
|
${C(t)}
|
|
@@ -2470,7 +2478,7 @@
|
|
|
2470
2478
|
.o-toast-icon {
|
|
2471
2479
|
height: 16px;
|
|
2472
2480
|
}
|
|
2473
|
-
`;
|
|
2481
|
+
`;O([a({type:String,reflect:!0})],$.prototype,"icon",2);O([a({type:String,reflect:!0})],$.prototype,"text",2);O([a({type:String,reflect:!0})],$.prototype,"verticalanchor",2);O([a({type:String,reflect:!0})],$.prototype,"horizontalanchor",2);O([a({type:Number,reflect:!0})],$.prototype,"verticaloffset",2);O([a({type:Number,reflect:!0})],$.prototype,"horizontaloffset",2);O([a({type:Number,reflect:!0})],$.prototype,"animationduration",2);O([a({type:String,reflect:!0})],$.prototype,"animationaxis",2);O([a({type:Boolean,reflect:!0})],$.prototype,"animated",2);O([a({type:Number,reflect:!0})],$.prototype,"lifeduration",2);O([a({type:Boolean,reflect:!0})],$.prototype,"multiline",2);$=O([y("o-toast")],$);var fi=Object.defineProperty,bi=Object.getOwnPropertyDescriptor,B=(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&&fi(t,e,i),i};let gi=0,_=class extends u{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-${++gi}`)}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=C(N.checkbox.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"')),t=C(N.icoMinus.replace("<svg",'<svg class="indeterminate" aria-hidden="true" focusable="false" part="svg"'));return l`
|
|
2474
2482
|
<input
|
|
2475
2483
|
type="checkbox"
|
|
2476
2484
|
id=${this.inputId}
|
|
@@ -2582,7 +2590,7 @@
|
|
|
2582
2590
|
svg path {
|
|
2583
2591
|
stroke: var(--color-border-white);
|
|
2584
2592
|
}
|
|
2585
|
-
`;
|
|
2593
|
+
`;B([a({type:Boolean,reflect:!0})],_.prototype,"checked",2);B([a({type:Boolean,reflect:!0})],_.prototype,"indeterminate",2);B([a({type:Boolean,reflect:!0})],_.prototype,"disabled",2);B([a({type:String,reflect:!0})],_.prototype,"size",2);B([a({type:Boolean})],_.prototype,"showLabel",2);B([a({type:String})],_.prototype,"label",2);B([a({type:String})],_.prototype,"name",2);B([a({type:String})],_.prototype,"value",2);B([a({type:String,reflect:!0})],_.prototype,"inputId",2);B([fe("input")],_.prototype,"inputEl",2);_=B([y("o-checkbox")],_);var yi=Object.defineProperty,mi=Object.getOwnPropertyDescriptor,j=(o,t,e,r)=>{for(var i=r>1?void 0:r?mi(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&&yi(t,e,i),i};let xi=0,P=class extends u{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-${++xi}`)}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`
|
|
2586
2594
|
<input type="radio" id=${this.inputId} ?checked=${this.checked} ?disabled=${this.disabled} name=${this.name} value=${this.value} />
|
|
2587
2595
|
|
|
2588
2596
|
<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}>
|
|
@@ -2590,7 +2598,7 @@
|
|
|
2590
2598
|
</div>
|
|
2591
2599
|
|
|
2592
2600
|
${this.showLabel?l`<label class="label" for=${this.inputId}>${this.label}</label>`:""}
|
|
2593
|
-
`}};
|
|
2601
|
+
`}};P.styles=f`
|
|
2594
2602
|
:host {
|
|
2595
2603
|
display: inline-flex;
|
|
2596
2604
|
align-items: center;
|
|
@@ -2672,4 +2680,4 @@
|
|
|
2672
2680
|
width: 0;
|
|
2673
2681
|
height: 0;
|
|
2674
2682
|
}
|
|
2675
|
-
`;
|
|
2683
|
+
`;j([a({type:Boolean,reflect:!0})],P.prototype,"checked",2);j([a({type:Boolean,reflect:!0})],P.prototype,"disabled",2);j([a({type:String,reflect:!0})],P.prototype,"size",2);j([a({type:Boolean})],P.prototype,"showLabel",2);j([a({type:String})],P.prototype,"label",2);j([a({type:String})],P.prototype,"name",2);j([a({type:String})],P.prototype,"value",2);j([a({type:String,reflect:!0})],P.prototype,"inputId",2);j([fe("input")],P.prototype,"inputEl",2);P=j([y("o-radio")],P);
|