@florid-kit/components 0.9.9 → 0.9.11
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/components/side-panel.d.ts +13 -1
- package/index.js +79 -73
- package/index.mjs +468 -427
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const $t=globalThis,Mt=$t.ShadowRoot&&($t.ShadyCSS===void 0||$t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Tt=Symbol(),Qt=new WeakMap;let he=class{constructor(t,e,
|
|
5
|
+
*/const $t=globalThis,Mt=$t.ShadowRoot&&($t.ShadyCSS===void 0||$t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Tt=Symbol(),Qt=new WeakMap;let he=class{constructor(t,e,n){if(this._$cssResult$=!0,n!==Tt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Mt&&t===void 0){const n=e!==void 0&&e.length===1;n&&(t=Qt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&Qt.set(e,t))}return t}toString(){return this.cssText}};const ye=o=>new he(typeof o=="string"?o:o+"",void 0,Tt),f=(o,...t)=>{const e=o.length===1?o[0]:t.reduce((n,i,r)=>n+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+o[r+1],o[0]);return new he(e,o,Tt)},me=(o,t)=>{if(Mt)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const n=document.createElement("style"),i=$t.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=e.cssText,o.appendChild(n)}},Yt=Mt?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return ye(e)})(o):o;/**
|
|
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,
|
|
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,ct=(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 n=Symbol(),i=this.getPropertyDescriptor(t,n,e);i!==void 0&&we(this.prototype,t,i)}}static getPropertyDescriptor(t,e,n){const{get:i,set:r}=$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);r==null||r.call(this,s),this.requestUpdate(t,h,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ee}static _$Ei(){if(this.hasOwnProperty(ct("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(ct("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ct("properties"))){const e=this.properties,n=[...Ce(e),..._e(e)];for(const i of n)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[n,i]of e)this.elementProperties.set(n,i)}this._$Eh=new Map;for(const[e,n]of this.elementProperties){const i=this._$Eu(e,n);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const i of n)e.unshift(Yt(i))}else t!==void 0&&e.push(Yt(t));return e}static _$Eu(t,e){const n=e.attribute;return n===!1?void 0:typeof n=="string"?n: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 n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);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 n;return(n=e.hostConnected)==null?void 0:n.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var n;return(n=e.hostDisconnected)==null?void 0:n.call(e)})}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){var r;const n=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,n);if(i!==void 0&&n.reflect===!0){const s=(((r=n.converter)==null?void 0:r.toAttribute)!==void 0?n.converter:Ct).toAttribute(e,n.type);this._$Em=t,s==null?this.removeAttribute(i):this.setAttribute(i,s),this._$Em=null}}_$AK(t,e){var r,s;const n=this.constructor,i=n._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const h=n.getPropertyOptions(i),c=typeof h.converter=="function"?{fromAttribute:h.converter}:((r=h.converter)==null?void 0:r.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,n){var i;if(t!==void 0){const r=this.constructor,s=this[t];if(n??(n=r.getPropertyOptions(t)),!((n.hasChanged??jt)(s,e)||n.useDefault&&n.reflect&&s===((i=this._$Ej)==null?void 0:i.get(t))&&!this.hasAttribute(r._$Eu(t,n))))return;this.C(t,e,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:i,wrapped:r},s){n&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,s??e??this[t]),r!==!0||s!==void 0)||(this._$AL.has(t)||(this.hasUpdated||n||(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 n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,s]of i){const{wrapped:h}=s,c=this[r];h!==!0||this._$AL.has(r)||c===void 0||this.C(r,void 0,s,c)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(n=this._$EO)==null||n.forEach(i=>{var r;return(r=i.hostUpdate)==null?void 0:r.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(n=>{var i;return(i=n.hostUpdated)==null?void 0:i.call(n)}),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[ct("elementProperties")]=new Map,it[ct("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
|
-
*/const
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/const ht=globalThis,_t=ht.trustedTypes,oe=_t?_t.createPolicy("lit-html",{createHTML:o=>o}):void 0,de="$lit$",K=`lit$${Math.random().toFixed(9).slice(2)}$`,pe="?"+K,Ee=`<${pe}>`,tt=document,pt=()=>tt.createComment(""),ut=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
|
+
\f\r]`,lt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ie=/-->/g,ne=/>/g,J=RegExp(`>|${It}(?:([^\\s"'>=/]+)(${It}*=${It}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),re=/'/g,se=/"/g,ue=/^(?:script|style|textarea|title)$/i,Le=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=Le(1),G=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),ae=new WeakMap,Q=tt.createTreeWalker(tt,129);function ve(o,t){if(!Rt(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return oe!==void 0?oe.createHTML(t):t}const Ie=(o,t)=>{const e=o.length-1,n=[];let i,r=t===2?"<svg>":t===3?"<math>":"",s=lt;for(let h=0;h<e;h++){const c=o[h];let m,w,v=-1,R=0;for(;R<c.length&&(s.lastIndex=R,w=s.exec(c),w!==null);)R=s.lastIndex,s===lt?w[1]==="!--"?s=ie:w[1]!==void 0?s=ne:w[2]!==void 0?(ue.test(w[2])&&(i=RegExp("</"+w[2],"g")),s=J):w[3]!==void 0&&(s=J):s===J?w[0]===">"?(s=i??lt,v=-1):w[1]===void 0?v=-2:(v=s.lastIndex-w[2].length,m=w[1],s=w[3]===void 0?J:w[3]==='"'?se:re):s===se||s===re?s=J:s===ie||s===ne?s=lt:(s=J,i=void 0);const Z=s===J&&o[h+1].startsWith("/>")?" ":"";r+=s===lt?c+Ee:v>=0?(n.push(m),c.slice(0,v)+de+c.slice(v)+K+Z):c+K+(v===-2?h:Z)}return[ve(o,r+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]};class vt{constructor({strings:t,_$litType$:e},n){let i;this.parts=[];let r=0,s=0;const h=t.length-1,c=this.parts,[m,w]=Ie(t,e);if(this.el=vt.createElement(m,n),Q.currentNode=this.el.content,e===2||e===3){const v=this.el.content.firstChild;v.replaceWith(...v.childNodes)}for(;(i=Q.nextNode())!==null&&c.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(const v of i.getAttributeNames())if(v.endsWith(de)){const R=w[s++],Z=i.getAttribute(v).split(K),wt=/([.?@])?(.*)/.exec(R);c.push({type:1,index:r,name:wt[2],strings:Z,ctor:wt[1]==="."?Oe:wt[1]==="?"?ze:wt[1]==="@"?Be:St}),i.removeAttribute(v)}else v.startsWith(K)&&(c.push({type:6,index:r}),i.removeAttribute(v));if(ue.test(i.tagName)){const v=i.textContent.split(K),R=v.length-1;if(R>0){i.textContent=_t?_t.emptyScript:"";for(let Z=0;Z<R;Z++)i.append(v[Z],pt()),Q.nextNode(),c.push({type:2,index:++r});i.append(v[R],pt())}}}else if(i.nodeType===8)if(i.data===pe)c.push({type:2,index:r});else{let v=-1;for(;(v=i.data.indexOf(K,v+1))!==-1;)c.push({type:7,index:r}),v+=K.length-1}r++}}static createElement(t,e){const n=tt.createElement("template");return n.innerHTML=t,n}}function nt(o,t,e=o,n){var s,h;if(t===G)return t;let i=n!==void 0?(s=e._$Co)==null?void 0:s[n]:e._$Cl;const r=ut(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==r&&((h=i==null?void 0:i._$AO)==null||h.call(i,!1),r===void 0?i=void 0:(i=new r(o),i._$AT(o,e,n)),n!==void 0?(e._$Co??(e._$Co=[]))[n]=i:e._$Cl=i),i!==void 0&&(t=nt(o,i._$AS(o,t.values),i,n)),t}class 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:n}=this._$AD,i=((t==null?void 0:t.creationScope)??tt).importNode(e,!0);Q.currentNode=i;let r=Q.nextNode(),s=0,h=0,c=n[0];for(;c!==void 0;){if(s===c.index){let m;c.type===2?m=new xt(r,r.nextSibling,this,t):c.type===1?m=new c.ctor(r,c.name,c.strings,this,t):c.type===6&&(m=new De(r,this,t)),this._$AV.push(m),c=n[++h]}s!==(c==null?void 0:c.index)&&(r=Q.nextNode(),s++)}return Q.currentNode=tt,i}p(t){let e=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class xt{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,n,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=i,this._$Cv=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=nt(this,t,e),ut(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==G&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):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&&ut(this._$AH)?this._$AA.nextSibling.data=t:this.T(tt.createTextNode(t)),this._$AH=t}$(t){var r;const{values:e,_$litType$:n}=t,i=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=vt.createElement(ve(n.h,n.h[0]),this.options)),n);if(((r=this._$AH)==null?void 0:r._$AD)===i)this._$AH.p(e);else{const s=new 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 vt(t)),e}k(t){Rt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,i=0;for(const r of t)i===e.length?e.push(n=new xt(this.O(pt()),this.O(pt()),this,this.options)):n=e[i],n._$AI(r),i++;i<e.length&&(this._$AR(n&&n._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var n;for((n=this._$AP)==null?void 0:n.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class St{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,i,r){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=d}_$AI(t,e=this,n,i){const r=this.strings;let s=!1;if(r===void 0)t=nt(this,t,e,0),s=!ut(t)||t!==this._$AH&&t!==G,s&&(this._$AH=t);else{const h=t;let c,m;for(t=r[0],c=0;c<r.length-1;c++)m=nt(this,h[n+c],e,c),m===G&&(m=this._$AH[c]),s||(s=!ut(m)||m!==this._$AH[c]),m===d?t=d:t!==d&&(t+=(m??"")+r[c+1]),this._$AH[c]=m}s&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Oe extends St{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class ze extends St{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class Be extends St{constructor(t,e,n,i,r){super(t,e,n,i,r),this.type=5}_$AI(t,e=this){if((t=nt(this,t,e,0)??d)===G)return;const n=this._$AH,i=t===d&&n!==d||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,r=t!==d&&(n===d||i);i&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class De{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){nt(this,t)}}const Pt=ht.litHtmlPolyfillSupport;Pt==null||Pt(vt,xt),(ht.litHtmlVersions??(ht.litHtmlVersions=[])).push("3.3.0");const He=(o,t,e)=>{const n=(e==null?void 0:e.renderBefore)??t;let i=n._$litPart$;if(i===void 0){const r=(e==null?void 0:e.renderBefore)??null;n._$litPart$=i=new xt(t.insertBefore(pt(),r),r,void 0,e??{})}return i._$AI(o),i};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -24,7 +24,7 @@
|
|
|
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:
|
|
27
|
+
*/const Me={attribute:!0,type:String,converter:Ct,reflect:!1,hasChanged:jt},Te=(o=Me,t,e)=>{const{kind:n,metadata:i}=e;let r=globalThis.litPropertyMetadata.get(i);if(r===void 0&&globalThis.litPropertyMetadata.set(i,r=new Map),n==="setter"&&((o=Object.create(o)).wrapped=!0),r.set(e.name,o),n==="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(n==="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: "+n)};function a(o){return(t,e)=>typeof e=="object"?Te(o,t,e):((n,i,r)=>{const s=i.hasOwnProperty(r);return i.constructor.createProperty(r,n),s?Object.getOwnPropertyDescriptor(i,r):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,
|
|
39
|
+
*/function fe(o,t){return(e,n,i)=>{const r=s=>{var h;return((h=s.renderRoot)==null?void 0:h.querySelector(o))??null};return je(e,n,{get(){return r(this)}})}}const at=f`
|
|
40
40
|
outline: 1px dashed var(--color-border-primary);
|
|
41
41
|
outline-offset: 2px;
|
|
42
42
|
`;f`
|
|
@@ -47,26 +47,26 @@
|
|
|
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 Ft(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
|
|
54
|
+
*/function Re(o){o.addInitializer(t=>{const e=t;e.addEventListener("click",async n=>{const{type:i,[Nt]:r}=e,{form:s}=r;if(!(!s||i==="button")&&(await new Promise(h=>{setTimeout(h)}),!n.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}),r.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
|
+
`,Fe=`<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
|
+
`,Ue=`<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">
|
|
64
64
|
<path d="M5 7.83838C6.02128 6.73401 8.16109 4.12121 11.4195 0L11.8571 0.282829C10.8116 2.59933 9.55927 5.17172 8.1003 8C9.55927 10.8283 10.8115 13.4007 11.8571 15.7172L11.4195 16C8.16109 11.8788 6.02128 9.266 5 8.16162L5 7.83838Z" fill="#3F2B2E"/>
|
|
65
65
|
</svg>
|
|
66
|
-
`,
|
|
66
|
+
`,qe=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
67
67
|
<path d="M12.2834 14.4585L7.98873 11.3928L3.69404 14.4585L5.33977 9.4972L1 6.39639H6.36554L8 1.4585L9.63446 6.39639H15L10.6602 9.4972L12.306 14.4585H12.2834ZM7.98873 10.328L10.6602 12.2353L9.64573 9.15787L12.2721 7.28568H9.02576L8 4.17317L6.97424 7.28568H3.72786L6.35427 9.15787L5.33977 12.2353L8.01127 10.328H7.98873Z" fill="#3F2B2E"/>
|
|
68
68
|
</svg>
|
|
69
|
-
`,
|
|
69
|
+
`,Ze=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
70
70
|
<path d="M15 6.43789H9.63446L8 1.5L6.36554 6.43789H1L5.33977 9.5387L3.69404 14.5L7.98873 11.4343L12.2834 14.5H12.306L10.6602 9.5387L15 6.43789ZM6.36554 11.5396V7.32718H6.97424L8 4.21467L9.02576 7.32718H12.2721L9.64573 9.19937L10.6602 12.2768L8 10.3812L6.36554 11.5513V11.5396Z" fill="#3F2B2E"/>
|
|
71
71
|
</svg>
|
|
72
72
|
`,Ke=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -110,10 +110,10 @@
|
|
|
110
110
|
`,io=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
111
111
|
<path d="M7.99376 14.4486C7.46684 14.4486 6.93991 14.251 6.54472 13.8558C6.14953 13.4606 5.8202 12.9995 5.68847 12.4067H3.77837C2.98798 12.4067 2.59279 12.4067 2.32933 12.1433C2.13173 12.0116 2 11.7481 2 11.5505C2 11.2212 2.13173 10.826 2.52692 10.1673L2.92212 9.4428C3.31731 8.78415 3.51491 8.05963 3.64664 7.3351L3.84423 5.68847C3.97596 4.63462 4.43702 3.7125 5.22741 3.05385C6.01779 2.39519 7.00578 2 7.99376 2C8.98174 2 10.0356 2.39519 10.7601 3.05385C11.5505 3.7125 12.0116 4.70049 12.1433 5.68847L12.3409 7.26924C12.4067 8.05963 12.6702 8.78415 13.0654 9.37693L13.4606 10.1015C13.8558 10.7601 14.0534 11.0894 13.9875 11.4846C13.9875 11.7481 13.8558 11.9457 13.6582 12.0774C13.3947 12.3409 12.9995 12.3409 12.2092 12.3409H10.2991C10.1673 12.9337 9.83799 13.4606 9.4428 13.7899C9.04761 14.1851 8.52068 14.3827 7.99376 14.3827V14.4486ZM6.28126 12.4067C6.41299 12.8019 6.61058 13.1971 6.93991 13.4606C7.5327 13.9875 8.45482 13.9875 9.11347 13.4606C9.4428 13.1971 9.6404 12.8019 9.77213 12.4067H6.28126ZM7.99376 2.65865C7.13751 2.65865 6.28126 2.98798 5.6226 3.58077C4.96395 4.17356 4.56875 4.96395 4.43702 5.88606L4.23943 7.46684C4.1077 8.32309 3.84423 9.11347 3.44904 9.83799L3.05385 10.5625C2.72452 11.0894 2.59279 11.3529 2.59279 11.5505C2.59279 11.6164 2.59279 11.7481 2.72452 11.814C2.85625 11.8798 3.25144 11.8798 3.77837 11.8798H12.2092C12.7361 11.8798 13.1971 11.8798 13.263 11.814C13.3289 11.814 13.3947 11.6822 13.3947 11.5505C13.3947 11.4188 13.1971 11.0894 12.9337 10.5625L12.5385 9.83799C12.0774 9.11347 11.814 8.32309 11.7481 7.5327L11.5505 5.88606C11.4846 5.02981 11.0236 4.17356 10.3649 3.58077C9.70626 2.98798 8.85001 2.65865 7.99376 2.65865Z" fill="#3F2B2E"/>
|
|
112
112
|
</svg>
|
|
113
|
-
`,
|
|
113
|
+
`,no=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
114
114
|
<path d="M12 17.4585L4 6.4585L20 6.4585L12 17.4585Z" fill="#3F2B2E"/>
|
|
115
115
|
</svg>
|
|
116
|
-
`,
|
|
116
|
+
`,ro=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
117
117
|
<path d="M12 6.4585L20 17.4585H4L12 6.4585Z" fill="#3F2B2E"/>
|
|
118
118
|
</svg>
|
|
119
119
|
`,so=`<svg width="12" height="12" viewBox="0 0 12 12" 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>`,N={wishlist:Ne,playerv:
|
|
149
|
+
</svg>`,N={wishlist:Ne,playerv:Fe,chevronRight:Ue,chevronLeft:Ve,icoPlus:Qe,icoMinus:Ye,"star-0":qe,"star-25":Ze,"star-50":Ke,"star-75":We,"star-100":Ge,cross:Xe,search:Je,arrowLeft:to,arrowTop:eo,cart:oo,notifyme:io,triangledown:no,triangleup:ro,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 Ut={ATTRIBUTE:1,CHILD:2},Vt=o=>(...t)=>({_$litDirective$:o,values:t});let qt=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$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
|
|
157
|
+
*/class Bt extends qt{constructor(t){if(super(t),this.it=d,t.type!==Ut.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,x=(o,t,e,
|
|
161
|
+
*/class Dt extends Bt{}Dt.directiveName="unsafeSVG",Dt.resultType=2;const C=Vt(Dt);var mo=Object.defineProperty,xo=Object.getOwnPropertyDescriptor,x=(o,t,e,n)=>{for(var i=n>1?void 0:n?xo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&mo(t,e,i),i};const wo=Ft(u);let b=class extends wo{constructor(){super(...arguments),this.type="submit",this.value="",this.variant="primary",this.text="",this.textsecond="",this.fullwidth=!1,this.disabled=!1,this.startIconModel="",this.endIconModel="",this.startIcon=!1,this.endIcon=!1,this.panelTarget="",this.href="",this.target="",this.underlined=!1,this.withbadge=!1}get name(){return this.getAttribute("name")??""}set name(o){this.setAttribute("name",o)}get form(){return this[Nt].form}handleClick(o){if(!(o instanceof KeyboardEvent&&!["Enter"," "].includes(o.key))&&this.panelTarget){const t=document.getElementById(this.panelTarget);t!=null&&t.openPanel&&typeof t.openPanel=="function"?(o.preventDefault(),t.openPanel()):console.warn(`[o-button] No side panel with id="${this.panelTarget}" found or it does not have an openPanel method.`)}}render(){return this.href?this.renderLink():this.renderButton()}renderIcon(o){const t=o==="start"?this.startIconModel:this.endIconModel;if(!t)return d;const e=N[t].replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return l`<span class="${o==="start"?"icon-start":"icon-end"}">${C(e)}</span>`}renderButton(){const o=this.text||this.textsecond;return l`
|
|
162
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`
|
|
@@ -299,7 +299,7 @@
|
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
.button:focus-visible {
|
|
302
|
-
${
|
|
302
|
+
${at};
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
span.text + span.text::before {
|
|
@@ -383,12 +383,12 @@
|
|
|
383
383
|
transform: translateX(4px);
|
|
384
384
|
}
|
|
385
385
|
//End icon movment on hover
|
|
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,
|
|
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,n)=>{for(var i=n>1?void 0:n?Co(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&$o(t,e,i),i};let rt=class extends u{constructor(){super(...arguments),this.status="empty",this.ariaDescribedBy="a-product-name",this.label="Add to wishlist",this.toggleStatus=()=>{this.status=this.status==="empty"?"filled":"empty",this.setAttribute("aria-pressed",String(this.status==="filled")),this.dispatchEvent(new CustomEvent("wishlist-toggle",{detail:{status:this.status},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.setAttribute("aria-pressed",String(this.status==="filled"))}firstUpdated(){this.addEventListener("click",this.toggleStatus),this.addEventListener("keydown",this.handleKeydown)}handleKeydown(o){(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),this.toggleStatus())}render(){const o=N.wishlist.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return l`
|
|
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)}
|
|
390
390
|
</button>
|
|
391
|
-
`}setStatus(o){this.status=o,this.setAttribute("aria-pressed",String(this.status==="filled")),this.requestUpdate()}setAriaDescribedBy(o){this.ariaDescribedBy=o,this.requestUpdate()}setLabel(o){this.label=o,this.requestUpdate()}};
|
|
391
|
+
`}setStatus(o){this.status=o,this.setAttribute("aria-pressed",String(this.status==="filled")),this.requestUpdate()}setAriaDescribedBy(o){this.ariaDescribedBy=o,this.requestUpdate()}setLabel(o){this.label=o,this.requestUpdate()}};rt.styles=f`
|
|
392
392
|
:host {
|
|
393
393
|
display: inline-flex;
|
|
394
394
|
justify-content: center;
|
|
@@ -396,11 +396,6 @@
|
|
|
396
396
|
outline: none;
|
|
397
397
|
}
|
|
398
398
|
|
|
399
|
-
:host(:focus-visible) {
|
|
400
|
-
outline: 1px dashed var(--color-content-action-secondary);
|
|
401
|
-
outline-offset: 1px;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
399
|
.wishlist-button {
|
|
405
400
|
display: flex;
|
|
406
401
|
justify-content: center;
|
|
@@ -422,6 +417,10 @@
|
|
|
422
417
|
background-color: var(--color-alpha-light-strongest);
|
|
423
418
|
}
|
|
424
419
|
|
|
420
|
+
.wishlist-button:focus-visible {
|
|
421
|
+
${at};
|
|
422
|
+
}
|
|
423
|
+
|
|
425
424
|
.wishlist-button:hover svg path {
|
|
426
425
|
fill: var(--color-content-action-secondary);
|
|
427
426
|
}
|
|
@@ -453,11 +452,11 @@
|
|
|
453
452
|
width: 0.1rem !important;
|
|
454
453
|
white-space: nowrap !important;
|
|
455
454
|
}
|
|
456
|
-
`;Et([a({type:String,reflect:!0})],
|
|
455
|
+
`;Et([a({type:String,reflect:!0})],rt.prototype,"status",2);Et([a({type:String,reflect:!0})],rt.prototype,"ariaDescribedBy",2);Et([a({type:String,reflect:!0})],rt.prototype,"label",2);rt=Et([y("o-wishlist-button")],rt);/**
|
|
457
456
|
* @license
|
|
458
457
|
* Copyright 2018 Google LLC
|
|
459
458
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
460
|
-
*/const k=o=>o??d;var _o=Object.defineProperty,ko=Object.getOwnPropertyDescriptor,H=(o,t,e,
|
|
459
|
+
*/const k=o=>o??d;var _o=Object.defineProperty,ko=Object.getOwnPropertyDescriptor,H=(o,t,e,n)=>{for(var i=n>1?void 0:n?ko(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&_o(t,e,i),i};let S=class extends u{constructor(){super(...arguments),this.bgstyle="background-light",this.size="medium",this.status="empty",this.type="button",this.strokewidth="1",this.icon="wishlist",this.disabled=!1,this.showSrLabel=!1,this.srLabel=""}updated(o){super.updated(o),this.style.setProperty("--icon-stroke-width",this.strokewidth)}render(){const o=N[this.icon]??"",t=`icon-${this.icon}`,e=o.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"').replace(/<path\b/g,'<path part="icon-path"').replace(/<g\b/g,'<g part="icon-group"').replace(/<circle\b/g,'<circle part="icon-circle"'),n=this.showSrLabel?l`<span class="sr-only">${this.srLabel}</span>`:null,i=this.showSrLabel?null:"icon";return l`
|
|
461
460
|
${this.type==="span"?l`
|
|
462
461
|
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
463
462
|
${C(e)}
|
|
@@ -470,7 +469,7 @@
|
|
|
470
469
|
?disabled="${this.disabled}"
|
|
471
470
|
>
|
|
472
471
|
${C(e)}
|
|
473
|
-
${
|
|
472
|
+
${n}
|
|
474
473
|
</button>
|
|
475
474
|
`}
|
|
476
475
|
`}};S.styles=f`
|
|
@@ -678,13 +677,13 @@
|
|
|
678
677
|
}
|
|
679
678
|
|
|
680
679
|
.icon-button:focus-visible {
|
|
681
|
-
${
|
|
680
|
+
${at}
|
|
682
681
|
}
|
|
683
682
|
|
|
684
683
|
.sr-only {
|
|
685
684
|
display: none;
|
|
686
685
|
}
|
|
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,
|
|
686
|
+
`;H([a({type:String,reflect:!0})],S.prototype,"bgstyle",2);H([a({type:String,reflect:!0})],S.prototype,"size",2);H([a({type:String,reflect:!0})],S.prototype,"status",2);H([a({type:String,reflect:!0})],S.prototype,"type",2);H([a({type:String})],S.prototype,"strokewidth",2);H([a({type:String})],S.prototype,"icon",2);H([a({type:Boolean,reflect:!0})],S.prototype,"disabled",2);H([a({type:Boolean})],S.prototype,"showSrLabel",2);H([a({type:String})],S.prototype,"srLabel",2);S=H([y("o-icon-button")],S);var So=Object.defineProperty,Eo=Object.getOwnPropertyDescriptor,ot=(o,t,e,n)=>{for(var i=n>1?void 0:n?Eo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&So(t,e,i),i};let F=class extends u{constructor(){super(...arguments),this.href="",this.target="",this.template="standard",this.inverse=!1,this.endIcon=!1,this.reverseEndIcon=!1}_handleClick(o){(!this.href||this.href==="#")&&o.preventDefault()}render(){const o=this.href||"#";return l`
|
|
688
687
|
<a
|
|
689
688
|
href="${o}"
|
|
690
689
|
target="${k(this.target||void 0)}"
|
|
@@ -710,7 +709,7 @@
|
|
|
710
709
|
></o-icon-button>
|
|
711
710
|
`:null}
|
|
712
711
|
</a>
|
|
713
|
-
`}};
|
|
712
|
+
`}};F.styles=f`
|
|
714
713
|
:host([template="standard"]) a {
|
|
715
714
|
color: var(--color-content-action-secondary);
|
|
716
715
|
font-size: var(--font-size-200);
|
|
@@ -797,7 +796,7 @@
|
|
|
797
796
|
height: 1px;
|
|
798
797
|
}
|
|
799
798
|
/* End of underline effect */
|
|
800
|
-
`;ot([a({type:String})],
|
|
799
|
+
`;ot([a({type:String})],F.prototype,"href",2);ot([a({type:String})],F.prototype,"target",2);ot([a({type:String,reflect:!0})],F.prototype,"template",2);ot([a({type:Boolean,reflect:!0})],F.prototype,"inverse",2);ot([a({type:Boolean,reflect:!0})],F.prototype,"endIcon",2);ot([a({type:Boolean,reflect:!0})],F.prototype,"reverseEndIcon",2);F=ot([y("o-link")],F);var Ao=Object.defineProperty,Lo=Object.getOwnPropertyDescriptor,At=(o,t,e,n)=>{for(var i=n>1?void 0:n?Lo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&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 n;e>=1?n=100:e<=0?n=0:n=Math.round(e*100/25)*25,o.push(`star-${n}`)}return o}render(){const o=this.getStarKeys();return l`
|
|
801
800
|
<div class="rating">
|
|
802
801
|
<div class="stars">
|
|
803
802
|
${o.map(t=>l`<span class="star">${C(N[t]??"")}</span>`)}
|
|
@@ -845,8 +844,8 @@
|
|
|
845
844
|
* @license
|
|
846
845
|
* Copyright 2017 Google LLC
|
|
847
846
|
* 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==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
|
-
<div class="header">
|
|
847
|
+
*/const dt=(o,t)=>{var n;const e=o._$AN;if(e===void 0)return!1;for(const i of e)(n=i._$AO)==null||n.call(i,t,!1),dt(i,t);return!0},kt=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while((e==null?void 0:e.size)===0)},be=o=>{for(let t;t=o._$AM;o=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(o))break;e.add(o),zo(t)}};function Po(o){this._$AN!==void 0?(kt(this),this._$AM=o,be(this)):this._$AM=o}function Oo(o,t=!1,e=0){const n=this._$AH,i=this._$AN;if(i!==void 0&&i.size!==0)if(t)if(Array.isArray(n))for(let r=e;r<n.length;r++)dt(n[r],!1),kt(n[r]);else n!=null&&(dt(n,!1),kt(n));else dt(this,o)}const zo=o=>{o.type==Ut.CHILD&&(o._$AP??(o._$AP=Oo),o._$AQ??(o._$AQ=Po))};class Bo extends qt{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,n){super._$AT(t,e,n),be(this),this.isConnected=t._$AU}_$AO(t,e=!0){var n,i;t!==this.isConnected&&(this.isConnected=t,t?(n=this.reconnected)==null||n.call(this):(i=this.disconnected)==null||i.call(this)),e&&(dt(this,t),kt(this))}setValue(t){if(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 n;this.element!==t.element&&(this.element=t.element),this.host=((n=t.options)===null||n===void 0?void 0:n.host)||this.element,this.apply(e),this.groom(e),this.prevData={...e}}apply(t){if(!t)return;const{prevData:e,element:n}=this;for(const i in t){const r=t[i];r!==e[i]&&(n[i]=r)}}groom(t){const{prevData:e,element:n}=this;if(e)for(const i in e)(!t||!(i in t)&&n[i]===e[i])&&(n[i]=void 0)}}class Ho extends Do{constructor(){super(...arguments),this.eventData={}}apply(t){if(t)for(const e in t){const n=t[e];n!==this.eventData[e]&&this.applyEvent(e,n)}}applyEvent(t,e){const{prevData:n,element:i}=this;this.eventData[t]=e,n[t]&&i.removeEventListener(t,this,e),i.addEventListener(t,this,e)}groom(t){const{prevData:e,element:n}=this;if(e)for(const i in e)(!t||!(i in t)&&n[i]===e[i])&&this.groomEvent(i,e[i])}groomEvent(t,e){const{element:n}=this;delete this.eventData[t],n.removeEventListener(t,this,e)}handleEvent(t){const e=this.eventData[t.type];typeof e=="function"?e.call(this.host,t):e.handleEvent(t)}disconnected(){const{eventData:t,element:e}=this;for(const n in t){const i=n.slice(1),r=t[n];e.removeEventListener(i,this,r)}}reconnected(){const{eventData:t,element:e}=this;for(const n in t){const i=n.slice(1),r=t[n];e.addEventListener(i,this,r)}}}class Mo extends Ho{apply(t){if(!t)return;const{prevData:e,element:n}=this;for(const i in t){const r=t[i];if(r===e[i])continue;const s=i.slice(1);switch(i[0]){case"@":this.eventData[s]=r,this.applyEvent(s,r);break;case".":n[s]=r;break;case"?":r?n.setAttribute(s,""):n.removeAttribute(s);break;default:r!=null?n.setAttribute(i,String(r)):n.removeAttribute(i);break}}}groom(t){const{prevData:e,element:n}=this;if(e)for(const i in e){const r=i.slice(1);if(!t||!(i in t)&&n[r]===e[i])switch(i[0]){case"@":this.groomEvent(r,e[i]);break;case".":n[r]=void 0;break;case"?":n.removeAttribute(r);break;default:n.removeAttribute(i);break}}}}const le=Vt(Mo);var To=Object.defineProperty,jo=Object.getOwnPropertyDescriptor,g=(o,t,e,n)=>{for(var i=n>1?void 0:n?jo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&To(t,e,i),i};let p=class extends u{constructor(){super(...arguments),this.open=!1,this.showHeader=!0,this.showFooter=!1,this.showHeaderStartIcon=!1,this.headerTitle="",this.headerTitleClassName="panel-title",this.closeButtonLabel="Close the modal",this.firstButtonLabel="Close",this.firstButtonVariant="primary",this.firstButtonProps={},this.onFirstButtonClickClose=!1,this.secondButtonLabel="",this.secondButtonVariant="secondary",this.secondButtonProps={},this.onSecondButtonClickClose=!1,this.disablePortal=!1,this.zIndex=99,this.initialized=!1,this.showDetail=!1,this.isHidingDetail=!1,this.previousFocusedElement=null,this._onOpenDetail=async o=>{var e,n;const t=((e=o.detail)==null?void 0:e.origin)??document.activeElement;if(this._detailOriginEl=t,this._detailOriginClass=(t==null?void 0:t.className)??"",this.showDetail=!0,this.showHeaderStartIcon=!0,await this.updateComplete,this._detailOriginClass){const i=(n=this.shadowRoot)==null?void 0:n.querySelector(".detail-view");i&&i.setAttribute("fromelement",this._detailOriginClass)}setTimeout(async()=>{await this.focusDetailReturnBtn()},800)},this._detailOriginEl=null,this._detailOriginClass="",this.handleKeyDown=o=>{this.open&&(o.key==="Escape"?this.closePanel():o.key==="Tab"&&this.trapFocus(o))},this.handleClosePanel=o=>{if(o instanceof KeyboardEvent&&o.key!=="Enter"&&o.key!==" ")return;o.preventDefault(),o.stopPropagation();const t=o.currentTarget,e=(t==null?void 0:t.getAttribute("data-role"))==="back";if(this.showDetail&&e){this.isHidingDetail=!0;const n=this.renderRoot.querySelector(".content"),i=async()=>{this.showDetail=!1,this.isHidingDetail=!1,this.showHeaderStartIcon=!1,await this.updateComplete,this._restoreFocusToOrigin()};if(n){this.showHeaderStartIcon=!1;const r=()=>{this.showDetail=!1,this.isHidingDetail=!1,n.removeEventListener("animationend",r),i()};n.addEventListener("animationend",r)}else this.showDetail=!1,this.isHidingDetail=!1,this.showHeaderStartIcon=!1;return}this.closePanel()},this._onDetailSlotChange=o=>{const n=o.target.assignedElements({flatten:!0}).flatMap(i=>Array.from(i.querySelectorAll("img")))[0];n==null||n.setAttribute("tabindex","0")}}connectedCallback(){super.connectedCallback(),!this.disablePortal&&this.parentElement!==document.body&&document.body.appendChild(this),this.addEventListener("keydown",this.handleKeyDown),this.updateComplete.then(()=>{this.initialized=!0}),this.addEventListener("open-detail",this._onOpenDetail)}disconnectedCallback(){document.body.style.overflow="",document.body.removeAttribute("data-side-panel"),this.removeEventListener("keydown",this.handleKeyDown),super.disconnectedCallback(),this.removeEventListener("open-detail",this._onOpenDetail)}async focusDetailReturnBtn(){var n,i,r,s;await this.updateComplete;const o=this.getDeepActiveElement(document);if(o&&o!==document.body)try{o.blur()}catch{}await new Promise(requestAnimationFrame);const t=(n=this.shadowRoot)==null?void 0:n.querySelector(".detail-view .return-btn");if(!t)return;t.updateComplete&&await t.updateComplete,(s=(r=((i=t.shadowRoot)==null?void 0:i.querySelector("button"))??t)==null?void 0:r.focus)==null||s.call(r,{preventScroll:!0})}_restoreFocusToOrigin(){var t,e;const o=this._detailOriginEl;!o||!document.contains(o)||((e=(t=document.activeElement)==null?void 0:t.blur)==null||e.call(t),requestAnimationFrame(()=>{var i;o.classList.add("a--tabfocus"),(((i=o.shadowRoot)==null?void 0:i.querySelector('button, .button, [tabindex]:not([tabindex="-1"])'))??null??o).focus({preventScroll:!0})}))}getDeepActiveElement(o=this.shadowRoot){let t=o.activeElement;for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}trapFocus(o){if(o.key!=="Tab")return;const t=this.getDeepActiveElement(),e=this.renderRoot.querySelector(".close-btn");if(!o.shiftKey&&e&&e.contains(t)){o.preventDefault();const n=this.renderRoot.querySelector(".o-whats-inside--content p");n==null||n.focus()}}getFocusableElements(){const o=this.renderRoot.querySelector(".panel");if(!o)return[];function t(i){return!(i.disabled||i.hasAttribute("disabled")||i.hasAttribute("tabindex")&&i.getAttribute("tabindex")==="-1")}function e(i){var s;const r=[i.matches(p.focusablesSelector)?i:[]];if(!["o-icon-button","o-button"].includes(i.tagName.toLowerCase())){const h=Array.from(i instanceof HTMLSlotElement?i.assignedElements({flatten:!0}):[]).filter(t).flatMap(e),c=Array.from(((s=i.shadowRoot)==null?void 0:s.querySelectorAll("*"))||[]).filter(t).flatMap(e);r.push(...h,...c)}return r.flat()}return Array.from(o.querySelectorAll("*")).filter(t).flatMap(e)}openPanel(){this.removeAttribute("hidden"),this.getBoundingClientRect(),this.previousFocusedElement=document.activeElement,this.open=!0,document.body.style.overflow="hidden",document.body.setAttribute("data-side-panel","open");const o=this.renderRoot.querySelector(".panel");o&&o.setAttribute("aria-modal","true"),this.updateComplete.then(()=>{var t,e,n,i;if(this.showHeader){const r=((t=this.shadowRoot)==null?void 0:t.querySelector(".panel .close-btn"))||null,s=((e=r==null?void 0:r.shadowRoot)==null?void 0:e.querySelector("button"))||null;s&&((n=s.focus)==null||n.call(s))}else{const r=this.getFocusableElements()[0];(i=r==null?void 0:r.focus)==null||i.call(r)}}),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0}))}closePanel(){var t,e,n,i,r;this.open=!1,this.showDetail=!1,document.body.style.overflow="",document.body.removeAttribute("data-side-panel"),((t=this.previousFocusedElement)==null?void 0:t.tagName.toLowerCase())==="o-button"?(i=(n=(e=this.previousFocusedElement.shadowRoot)==null?void 0:e.querySelector(".button"))==null?void 0:n.focus)==null||i.call(n):(r=this.previousFocusedElement)==null||r.focus();const o=this.renderRoot.querySelector(".panel");o&&o.removeAttribute("aria-modal"),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}handleFirstClick(o){o instanceof KeyboardEvent&&o.key!=="Enter"&&o.key!==" "||(o.preventDefault(),o.stopPropagation(),this.onFirstButtonClickClose&&this.closePanel(),this.dispatchEvent(new CustomEvent("firstbuttonclick",{bubbles:!0,composed:!0,cancelable:!0,detail:{button:"first",target:o.target}})))}handleSecondClick(o){o instanceof KeyboardEvent&&o.key!=="Enter"&&o.key!==" "||(o.preventDefault(),o.stopPropagation(),this.onSecondButtonClickClose&&this.closePanel(),this.dispatchEvent(new CustomEvent("secondbuttonclick",{bubbles:!0,composed:!0,cancelable:!0,detail:{button:"second",target:o.target}})))}updated(){this.style.setProperty("--z-overlay",`${this.zIndex||99}`),this.style.setProperty("--z-panel",`${this.zIndex?this.zIndex+1:99}`),this.open||setTimeout(()=>{this.setAttribute("hidden","hidden")},500)}render(){const o=this.showHeader?l`
|
|
848
|
+
<div tabindex="-1" class="header">
|
|
850
849
|
${this.showHeaderStartIcon?l`
|
|
851
850
|
<o-icon-button
|
|
852
851
|
icon="arrowLeft"
|
|
@@ -857,6 +856,8 @@
|
|
|
857
856
|
@click=${this.handleClosePanel}
|
|
858
857
|
@keydown=${this.handleClosePanel}
|
|
859
858
|
aria-label="${this.closeButtonLabel}"
|
|
859
|
+
srlabel="${this.closeButtonLabel}"
|
|
860
|
+
showsrlabel="true"
|
|
860
861
|
></o-icon-button>
|
|
861
862
|
`:null}
|
|
862
863
|
<p role="heading" aria-level="1" id="panel-title" class="${this.headerTitleClassName}">
|
|
@@ -894,7 +895,7 @@
|
|
|
894
895
|
<div class="detail-view">
|
|
895
896
|
${o}
|
|
896
897
|
<div class="detail-content">
|
|
897
|
-
<slot name="detail"></slot>
|
|
898
|
+
<slot name="detail" @slotchange=${this._onDetailSlotChange}></slot>
|
|
898
899
|
</div>
|
|
899
900
|
</div>
|
|
900
901
|
`:l`<slot></slot>`}
|
|
@@ -1025,11 +1026,16 @@
|
|
|
1025
1026
|
.return-btn {
|
|
1026
1027
|
margin-right: 8px;
|
|
1027
1028
|
}
|
|
1029
|
+
|
|
1030
|
+
.return-btn.a--tabfocus {
|
|
1031
|
+
border: 2px solid #000;
|
|
1032
|
+
box-sizing: border-box;
|
|
1033
|
+
}
|
|
1028
1034
|
}
|
|
1029
1035
|
|
|
1030
1036
|
.panel:focus-visible,
|
|
1031
1037
|
.close-btn:focus-visible {
|
|
1032
|
-
${
|
|
1038
|
+
${at}
|
|
1033
1039
|
}
|
|
1034
1040
|
|
|
1035
1041
|
.content {
|
|
@@ -1113,7 +1119,7 @@
|
|
|
1113
1119
|
.detail-content {
|
|
1114
1120
|
padding: var(--spacing-xl);
|
|
1115
1121
|
}
|
|
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,
|
|
1122
|
+
`;p.focusablesSelector='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), o-icon-button, o-button';p.focusablesCustomElementsSelector="o-icon-button, o-button";g([a({type:Boolean,reflect:!0})],p.prototype,"open",2);g([a({type:Boolean,reflect:!0})],p.prototype,"showHeader",2);g([a({type:Boolean,reflect:!0})],p.prototype,"showFooter",2);g([a({type:Boolean,reflect:!0})],p.prototype,"showHeaderStartIcon",2);g([a({type:String,reflect:!0})],p.prototype,"headerTitle",2);g([a({type:String,reflect:!0})],p.prototype,"headerTitleClassName",2);g([a({type:String,reflect:!0})],p.prototype,"closeButtonLabel",2);g([a({type:String,reflect:!0})],p.prototype,"firstButtonLabel",2);g([a({type:String,reflect:!0})],p.prototype,"firstButtonVariant",2);g([a({type:Object,reflect:!0})],p.prototype,"firstButtonProps",2);g([a({type:Boolean,reflect:!0})],p.prototype,"onFirstButtonClickClose",2);g([a({type:String,reflect:!0})],p.prototype,"secondButtonLabel",2);g([a({type:String,reflect:!0})],p.prototype,"secondButtonVariant",2);g([a({type:Object,reflect:!0})],p.prototype,"secondButtonProps",2);g([a({type:Boolean,reflect:!0})],p.prototype,"onSecondButtonClickClose",2);g([a({type:Boolean,reflect:!0})],p.prototype,"disablePortal",2);g([a({type:Number,reflect:!0})],p.prototype,"zIndex",2);g([a({type:Boolean,reflect:!0})],p.prototype,"initialized",2);g([a({type:Boolean})],p.prototype,"showDetail",2);g([a({type:Boolean})],p.prototype,"isHidingDetail",2);p=g([y("o-side-panel")],p);var Ro=Object.defineProperty,No=Object.getOwnPropertyDescriptor,X=(o,t,e,n)=>{for(var i=n>1?void 0:n?No(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&Ro(t,e,i),i};let D=class extends u{constructor(){super(...arguments),this.thumbnails=[],this.activeIndex=0,this.disabledIndexes=[],this.maxWidth="100%",this.altressource="visual",this.focusedIndex=0,this.playerIconTemplate=l`
|
|
1117
1123
|
<o-icon-button
|
|
1118
1124
|
icon="playerv"
|
|
1119
1125
|
size="xsmall"
|
|
@@ -1122,21 +1128,21 @@
|
|
|
1122
1128
|
status="filled"
|
|
1123
1129
|
strokewidth="0"
|
|
1124
1130
|
></o-icon-button>
|
|
1125
|
-
`}get lastIndex(){return Math.max(0,this.thumbnails.length-1)}handleKeyDown(o){o.key==="ArrowRight"?(o.preventDefault(),this.focusNext()):o.key==="ArrowLeft"?(o.preventDefault(),this.focusPrevious()):o.key==="Enter"||o.key===" "?(o.preventDefault(),this.selectThumbnail(this.focusedIndex)):o.key==="Tab"&&(!o.shiftKey&&this.focusedIndex===this.lastIndex&&this.dispatchEvent(new CustomEvent("thumb-exit",{detail:{from:"last",direction:"forward"},bubbles:!0,composed:!0})),o.shiftKey&&this.focusedIndex===0&&this.dispatchEvent(new CustomEvent("thumb-exit",{detail:{from:"first",direction:"backward"},bubbles:!0,composed:!0})))}focusNext(){let o=this.focusedIndex+1;for(;this.disabledIndexes.includes(o)&&o<this.thumbnails.length;)o++;o<this.thumbnails.length&&(this.focusedIndex=o,this.focusThumbnail(o))}focusPrevious(){let o=this.focusedIndex-1;for(;this.disabledIndexes.includes(o)&&o>=0;)o--;o>=0&&(this.focusedIndex=o,this.focusThumbnail(o))}focusThumbnail(o){const t=this.renderRoot.querySelector(`[data-index="${o}"]`);t==null||t.focus()}selectThumbnail(o){this.disabledIndexes.includes(o)||(this.activeIndex=o,this.swiperInstance&&typeof this.swiperInstance.slideTo=="function"&&this.swiperInstance.slideTo(o),this.dispatchEvent(new CustomEvent("thumbnail-select",{detail:{index:o}})))}onFocus(o){const t=o.currentTarget,e=Number(t.dataset.index);this.focusedIndex=e,this.renderRoot.querySelectorAll(".thumb").forEach(i=>{i.classList.remove("a--tabfocus")}),t.classList.add("a--tabfocus"),this.requestUpdate()}onFocusOut(o){const t=o.currentTarget,e=Number(t.dataset.index),
|
|
1131
|
+
`}get lastIndex(){return Math.max(0,this.thumbnails.length-1)}handleKeyDown(o){o.key==="ArrowRight"?(o.preventDefault(),this.focusNext()):o.key==="ArrowLeft"?(o.preventDefault(),this.focusPrevious()):o.key==="Enter"||o.key===" "?(o.preventDefault(),this.selectThumbnail(this.focusedIndex)):o.key==="Tab"&&(!o.shiftKey&&this.focusedIndex===this.lastIndex&&this.dispatchEvent(new CustomEvent("thumb-exit",{detail:{from:"last",direction:"forward"},bubbles:!0,composed:!0})),o.shiftKey&&this.focusedIndex===0&&this.dispatchEvent(new CustomEvent("thumb-exit",{detail:{from:"first",direction:"backward"},bubbles:!0,composed:!0})))}focusNext(){let o=this.focusedIndex+1;for(;this.disabledIndexes.includes(o)&&o<this.thumbnails.length;)o++;o<this.thumbnails.length&&(this.focusedIndex=o,this.focusThumbnail(o))}focusPrevious(){let o=this.focusedIndex-1;for(;this.disabledIndexes.includes(o)&&o>=0;)o--;o>=0&&(this.focusedIndex=o,this.focusThumbnail(o))}focusThumbnail(o){const t=this.renderRoot.querySelector(`[data-index="${o}"]`);t==null||t.focus()}selectThumbnail(o){this.disabledIndexes.includes(o)||(this.activeIndex=o,this.swiperInstance&&typeof this.swiperInstance.slideTo=="function"&&this.swiperInstance.slideTo(o),this.dispatchEvent(new CustomEvent("thumbnail-select",{detail:{index:o}})))}onFocus(o){const t=o.currentTarget,e=Number(t.dataset.index);this.focusedIndex=e,this.renderRoot.querySelectorAll(".thumb").forEach(i=>{i.classList.remove("a--tabfocus")}),t.classList.add("a--tabfocus"),this.requestUpdate()}onFocusOut(o){const t=o.currentTarget,e=Number(t.dataset.index),n=o.relatedTarget;(!n||this.shadowRoot&&!this.shadowRoot.contains(n))&&(this.renderRoot.querySelectorAll(".thumb").forEach(s=>s.classList.remove("a--tabfocus")),e===this.lastIndex?this.dispatchEvent(new CustomEvent("thumb-exit",{detail:{from:"last",direction:"unspecified"},bubbles:!0,composed:!0})):e===0&&this.dispatchEvent(new CustomEvent("thumb-exit",{detail:{from:"first",direction:"unspecified"},bubbles:!0,composed:!0})))}render(){return l`
|
|
1126
1132
|
<ul class="scroll-container" style="max-width: ${this.maxWidth};">
|
|
1127
|
-
${this.thumbnails.map((o,t)=>{const e=this.disabledIndexes.includes(t),
|
|
1133
|
+
${this.thumbnails.map((o,t)=>{const e=this.disabledIndexes.includes(t),n=this.activeIndex===t,i=o.type==="video",r=i?`video ${t}`:`${this.altressource} ${t+1}`;return l`
|
|
1128
1134
|
<li class="thumb-wrapper">
|
|
1129
1135
|
<button
|
|
1130
1136
|
class="thumb"
|
|
1131
1137
|
data-index="${t}"
|
|
1132
1138
|
?disabled=${e}
|
|
1133
|
-
aria-current=${
|
|
1139
|
+
aria-current=${n?"true":"false"}
|
|
1134
1140
|
@click=${()=>this.selectThumbnail(t)}
|
|
1135
1141
|
@keydown=${this.handleKeyDown}
|
|
1136
1142
|
@focus=${s=>this.onFocus(s)}
|
|
1137
1143
|
@focusout=${s=>this.onFocusOut(s)}
|
|
1138
1144
|
>
|
|
1139
|
-
<img alt="${
|
|
1145
|
+
<img alt="${r}" src="${o.src}" />
|
|
1140
1146
|
</button>
|
|
1141
1147
|
${i?l`<div class="play-icon-wrapper">${this.playerIconTemplate}</div>`:null}
|
|
1142
1148
|
</li>
|
|
@@ -1247,9 +1253,9 @@
|
|
|
1247
1253
|
height: 0;
|
|
1248
1254
|
width: 0;
|
|
1249
1255
|
}
|
|
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
|
|
1256
|
+
`;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 Fo=Object.defineProperty,Uo=Object.getOwnPropertyDescriptor,Zt=(o,t,e,n)=>{for(var i=n>1?void 0:n?Uo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&Fo(t,e,i),i};let ft=class extends u{constructor(){super(...arguments),this.type="",this.bgstyle="background-white"}render(){return l`
|
|
1251
1257
|
<span class="tag ${this.bgstyle}"><slot></slot></span>
|
|
1252
|
-
`}};
|
|
1258
|
+
`}};ft.styles=f`
|
|
1253
1259
|
.tag {
|
|
1254
1260
|
display: inline-block;
|
|
1255
1261
|
padding: var(--spacing-2-xs) var(--spacing-s);
|
|
@@ -1306,12 +1312,12 @@
|
|
|
1306
1312
|
}
|
|
1307
1313
|
}
|
|
1308
1314
|
|
|
1309
|
-
`;
|
|
1315
|
+
`;Zt([a({type:String,reflect:!0})],ft.prototype,"type",2);Zt([a({type:String,reflect:!0})],ft.prototype,"bgstyle",2);ft=Zt([y("o-tag")],ft);var Vo=Object.defineProperty,qo=Object.getOwnPropertyDescriptor,Kt=(o,t,e,n)=>{for(var i=n>1?void 0:n?qo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&Vo(t,e,i),i};let bt=class extends u{constructor(){super(...arguments),this.type="top",this.text=""}render(){return l`
|
|
1310
1316
|
<div class="tooltip">
|
|
1311
1317
|
<span class="tooltiptext">${this.text}</span>
|
|
1312
1318
|
<slot></slot>
|
|
1313
1319
|
</div>
|
|
1314
|
-
`}};
|
|
1320
|
+
`}};bt.styles=f`
|
|
1315
1321
|
.tooltip {
|
|
1316
1322
|
position: relative;
|
|
1317
1323
|
display: inline-block;
|
|
@@ -1403,7 +1409,7 @@
|
|
|
1403
1409
|
border-color: transparent var(--color-alpha-dark-strongest) transparent transparent;
|
|
1404
1410
|
}
|
|
1405
1411
|
|
|
1406
|
-
`;Kt([a({type:String,reflect:!0})],
|
|
1412
|
+
`;Kt([a({type:String,reflect:!0})],bt.prototype,"type",2);Kt([a({type:String,reflect:!0})],bt.prototype,"text",2);bt=Kt([y("o-tooltip")],bt);var Zo=Object.defineProperty,Ko=Object.getOwnPropertyDescriptor,U=(o,t,e,n)=>{for(var i=n>1?void 0:n?Ko(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&Zo(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`
|
|
1407
1413
|
<button
|
|
1408
1414
|
role="combobox"
|
|
1409
1415
|
aria-haspopup="listbox"
|
|
@@ -1431,13 +1437,13 @@
|
|
|
1431
1437
|
aria-activedescendant="${this.activeIndex>=0?"option-"+this.activeIndex:""}"
|
|
1432
1438
|
style=${`width: ${this.width};`}
|
|
1433
1439
|
>
|
|
1434
|
-
${this.options.map((e,
|
|
1440
|
+
${this.options.map((e,n)=>l`
|
|
1435
1441
|
<li
|
|
1436
|
-
id="option-${
|
|
1442
|
+
id="option-${n}"
|
|
1437
1443
|
role="option"
|
|
1438
1444
|
aria-selected="${e.value===this.value}"
|
|
1439
|
-
tabindex="${
|
|
1440
|
-
class="${
|
|
1445
|
+
tabindex="${n===this.activeIndex?"0":"-1"}"
|
|
1446
|
+
class="${n===this.activeIndex?"active":""} ${e.disabled?"disabled":""}"
|
|
1441
1447
|
@click=${()=>this.selectOption(e)}
|
|
1442
1448
|
>
|
|
1443
1449
|
${e.url?l`
|
|
@@ -1590,7 +1596,7 @@
|
|
|
1590
1596
|
input[type="hidden"] {
|
|
1591
1597
|
display: none;
|
|
1592
1598
|
}
|
|
1593
|
-
`;
|
|
1599
|
+
`;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:Boolean,reflect:!0})],z.prototype,"disabled",2);U([a({type:String,reflect:!0})],z.prototype,"width",2);U([et()],z.prototype,"open",2);U([et()],z.prototype,"activeIndex",2);U([et()],z.prototype,"menuWidth",2);z=U([y("o-dropdown")],z);var Wo=Object.getOwnPropertyDescriptor,Go=(o,t,e,n)=>{for(var i=n>1?void 0:n?Wo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=s(i)||i);return i};let Ht=class extends u{render(){return l` <span class="dots"></span> `}};Ht.styles=f`
|
|
1594
1600
|
:host {
|
|
1595
1601
|
display: flex;
|
|
1596
1602
|
align-items: center;
|
|
@@ -1641,7 +1647,7 @@
|
|
|
1641
1647
|
background-color: var(--color-container-action-primary-pressed);
|
|
1642
1648
|
}
|
|
1643
1649
|
}
|
|
1644
|
-
`;Ht=Go([y("o-dots")],Ht);var Xo=Object.defineProperty,Jo=Object.getOwnPropertyDescriptor,M=(o,t,e,
|
|
1650
|
+
`;Ht=Go([y("o-dots")],Ht);var Xo=Object.defineProperty,Jo=Object.getOwnPropertyDescriptor,M=(o,t,e,n)=>{for(var i=n>1?void 0:n?Jo(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&Xo(t,e,i),i};let 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`
|
|
1645
1651
|
<button
|
|
1646
1652
|
role="combobox"
|
|
1647
1653
|
aria-haspopup="listbox"
|
|
@@ -1679,14 +1685,14 @@
|
|
|
1679
1685
|
aria-activedescendant="${this.activeIndex>=0?"option-"+this.activeIndex:""}"
|
|
1680
1686
|
style=${`width: ${this.width};`}
|
|
1681
1687
|
>
|
|
1682
|
-
${this.options.map((e,
|
|
1688
|
+
${this.options.map((e,n)=>l`
|
|
1683
1689
|
<li
|
|
1684
|
-
id="option-${
|
|
1690
|
+
id="option-${n}"
|
|
1685
1691
|
role="option"
|
|
1686
1692
|
aria-selected="${e.value===this.value}"
|
|
1687
1693
|
aria-disabled="${e.disabled?"true":"false"}"
|
|
1688
|
-
tabindex="${
|
|
1689
|
-
class="${
|
|
1694
|
+
tabindex="${n===this.activeIndex?"0":"-1"}"
|
|
1695
|
+
class="${n===this.activeIndex?"active":""} ${e.disabled?"disabled":""}"
|
|
1690
1696
|
@click=${()=>this.selectOption(e)}
|
|
1691
1697
|
>
|
|
1692
1698
|
<a href="${k(e.url)}">
|
|
@@ -1882,13 +1888,13 @@
|
|
|
1882
1888
|
* @license
|
|
1883
1889
|
* Copyright 2018 Google LLC
|
|
1884
1890
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1885
|
-
*/const ge="important",Qo=" !"+ge,Yo=Vt(class extends
|
|
1891
|
+
*/const ge="important",Qo=" !"+ge,Yo=Vt(class extends qt{constructor(o){var t;if(super(o),o.type!==Ut.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 n=o[e];return n==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`},"")}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 n of this.ft)t[n]==null&&(this.ft.delete(n),n.includes("-")?e.removeProperty(n):e[n]=null);for(const n in t){const i=t[n];if(i!=null){this.ft.add(n);const r=typeof i=="string"&&i.endsWith(Qo);n.includes("-")||r?e.setProperty(n,r?i.slice(0,-11):i,r?ge:""):e[n]=i}}return G}});var ti=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,Wt=(o,t,e,n)=>{for(var i=n>1?void 0:n?ei(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&ti(t,e,i),i};let gt=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
1892
|
${this.option.imgurl?l`<img src="${this.option.imgurl}" alt="${k(this.option.title)}" aria-hidden="true" style=${Yo(t)} />`:""}
|
|
1887
1893
|
<div class="m-reassurance-content">
|
|
1888
1894
|
<h3 class="a-reassurance-text">${k(this.option.title)}</h3>
|
|
1889
1895
|
<p class="a-reassurance-description">${k(this.option.description)}</p>
|
|
1890
1896
|
</div>
|
|
1891
|
-
`;return o?l`<a href="${k(this.option.url)}" class="reassurance-item clickable">${e}</a>`:l`<div class="reassurance-item">${e}</div>`}};
|
|
1897
|
+
`;return o?l`<a href="${k(this.option.url)}" class="reassurance-item clickable">${e}</a>`:l`<div class="reassurance-item">${e}</div>`}};gt.styles=f`
|
|
1892
1898
|
:host {
|
|
1893
1899
|
display: inline-block;
|
|
1894
1900
|
position: relative;
|
|
@@ -1969,7 +1975,7 @@
|
|
|
1969
1975
|
overflow: hidden;
|
|
1970
1976
|
}
|
|
1971
1977
|
}
|
|
1972
|
-
`;Wt([a({type:Object,reflect:!0})],
|
|
1978
|
+
`;Wt([a({type:Object,reflect:!0})],gt.prototype,"option",2);Wt([a({type:Number,reflect:!0})],gt.prototype,"imageSize",2);gt=Wt([y("o-reassurance")],gt);var oi=Object.defineProperty,ii=Object.getOwnPropertyDescriptor,V=(o,t,e,n)=>{for(var i=n>1?void 0:n?ii(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&oi(t,e,i),i};const ni=Ft(u);let A=class extends ni{constructor(){super(...arguments),this.link="",this.name="",this.value="",this.text="",this.size="standard",this.selected=!1,this.fullwidth=!1,this.inactive=!1}handleClick(o){this.selected||(this.selected=!0);const t={selected:this.selected},e=new CustomEvent("selected",{detail:t,bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(e),e.defaultPrevented&&o.preventDefault(),this.selected=t.selected}render(){const o=this.text;return this.link?l`
|
|
1973
1979
|
<a href="${this.link}" class="o-chip" tabindex="${this.inactive?"-1":"0"}" aria-hidden="${this.inactive?"true":"false"}">
|
|
1974
1980
|
${o?this.text:l`<slot></slot>`}
|
|
1975
1981
|
</a>
|
|
@@ -2054,7 +2060,7 @@
|
|
|
2054
2060
|
}
|
|
2055
2061
|
|
|
2056
2062
|
&:focus-visible {
|
|
2057
|
-
${
|
|
2063
|
+
${at};
|
|
2058
2064
|
}
|
|
2059
2065
|
}
|
|
2060
2066
|
|
|
@@ -2067,16 +2073,16 @@
|
|
|
2067
2073
|
display: inline-flex;
|
|
2068
2074
|
align-items: center;
|
|
2069
2075
|
}
|
|
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
|
|
2076
|
+
`;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 ri=Object.defineProperty,si=Object.getOwnPropertyDescriptor,Gt=(o,t,e,n)=>{for(var i=n>1?void 0:n?si(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&ri(t,e,i),i};let yt=class extends u{constructor(){super(),this.name="",this.value="",this.addEventListener("selected",this.onChipSelected)}onChipSelected(o){const t=o.target instanceof 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`
|
|
2071
2077
|
<slot></slot>
|
|
2072
|
-
`}};
|
|
2078
|
+
`}};yt.styles=f`
|
|
2073
2079
|
:host {
|
|
2074
2080
|
display: flex;
|
|
2075
2081
|
flex-direction: row;
|
|
2076
2082
|
flex-wrap: wrap;
|
|
2077
2083
|
gap: var(--spacing-s);
|
|
2078
2084
|
}
|
|
2079
|
-
`;Gt([a({reflect:!0})],
|
|
2085
|
+
`;Gt([a({reflect:!0})],yt.prototype,"name",2);Gt([a({reflect:!0})],yt.prototype,"value",2);yt=Gt([y("o-chipset")],yt);var ai=Object.defineProperty,li=Object.getOwnPropertyDescriptor,T=(o,t,e,n)=>{for(var i=n>1?void 0:n?li(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&ai(t,e,i),i};const ci=Ft(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`
|
|
2080
2086
|
<a role="button" tabindex="0" class="button" href=${this.href} ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}
|
|
2081
2087
|
aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
|
|
2082
2088
|
${o?l`
|
|
@@ -2176,7 +2182,7 @@
|
|
|
2176
2182
|
}
|
|
2177
2183
|
|
|
2178
2184
|
.button:focus-visible {
|
|
2179
|
-
${
|
|
2185
|
+
${at};
|
|
2180
2186
|
}
|
|
2181
2187
|
|
|
2182
2188
|
span.text + span.text::before {
|
|
@@ -2221,7 +2227,7 @@
|
|
|
2221
2227
|
stroke-linecap: round;
|
|
2222
2228
|
}
|
|
2223
2229
|
}
|
|
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,
|
|
2230
|
+
`;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,q=(o,t,e,n)=>{for(var i=void 0,r=o.length-1,s;r>=0;r--)(s=o[r])&&(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`
|
|
2225
2231
|
<o-icon-button
|
|
2226
2232
|
@click=${this.onClick}
|
|
2227
2233
|
icon="chevronRight"
|
|
@@ -2347,11 +2353,11 @@
|
|
|
2347
2353
|
.fullpointer {
|
|
2348
2354
|
cursor: pointer;
|
|
2349
2355
|
}
|
|
2350
|
-
`;let I=Jt;
|
|
2356
|
+
`;let I=Jt;q([a({type:String})],I.prototype,"type");q([a({type:String})],I.prototype,"titleProduct");q([a({type:String})],I.prototype,"volume");q([a({type:String})],I.prototype,"perLiter");q([a({type:String})],I.prototype,"mainPrice");q([a({type:String})],I.prototype,"imageUrl");q([a({type:String})],I.prototype,"altImage");q([a({type:Boolean})],I.prototype,"fullwidth");q([a({type:Function})],I.prototype,"onClickTile");customElements.define("mini-tile",I);var di=Object.defineProperty,pi=Object.getOwnPropertyDescriptor,Xt=(o,t,e,n)=>{for(var i=n>1?void 0:n?pi(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&di(t,e,i),i};let mt=class extends u{constructor(){super(...arguments),this.variant="cart",this.text=""}render(){return l`
|
|
2351
2357
|
<span class="badge">
|
|
2352
2358
|
${this.text?this.text:l`<slot></slot>`}
|
|
2353
2359
|
</span>
|
|
2354
|
-
`}};
|
|
2360
|
+
`}};mt.styles=f`
|
|
2355
2361
|
:host([variant]) {
|
|
2356
2362
|
--badge-width: 19px;
|
|
2357
2363
|
display: inline-block;
|
|
@@ -2385,7 +2391,7 @@
|
|
|
2385
2391
|
color: var(--text-color);
|
|
2386
2392
|
}
|
|
2387
2393
|
|
|
2388
|
-
`;Xt([a({type:String,reflect:!0})],
|
|
2394
|
+
`;Xt([a({type:String,reflect:!0})],mt.prototype,"variant",2);Xt([a({type:String})],mt.prototype,"text",2);mt=Xt([y("o-badge")],mt);var ui=Object.defineProperty,vi=Object.getOwnPropertyDescriptor,O=(o,t,e,n)=>{for(var i=n>1?void 0:n?vi(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&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 n,i;var o=this;const t=(n=this.renderRoot)==null?void 0:n.querySelector("o-icon-button"),e=(i=this.renderRoot)==null?void 0:i.querySelector(".o-toast-text");if(e!=null){const r=window.getComputedStyle(e),s=parseInt(r.getPropertyValue("line-height").replace("px","")),h=parseInt(r.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`
|
|
2389
2395
|
<div class="o-toast">
|
|
2390
2396
|
<div class="o-toast-icon">
|
|
2391
2397
|
${C(t)}
|
|
@@ -2478,7 +2484,7 @@
|
|
|
2478
2484
|
.o-toast-icon {
|
|
2479
2485
|
height: 16px;
|
|
2480
2486
|
}
|
|
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,
|
|
2487
|
+
`;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,n)=>{for(var i=n>1?void 0:n?bi(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&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`
|
|
2482
2488
|
<input
|
|
2483
2489
|
type="checkbox"
|
|
2484
2490
|
id=${this.inputId}
|
|
@@ -2486,7 +2492,7 @@
|
|
|
2486
2492
|
?disabled=${this.disabled}
|
|
2487
2493
|
name=${this.name}
|
|
2488
2494
|
value=${this.value}
|
|
2489
|
-
@change=${e=>{const
|
|
2495
|
+
@change=${e=>{const n=e.target;this.checked=n.checked,this.indeterminate=n.indeterminate,this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}}
|
|
2490
2496
|
/>
|
|
2491
2497
|
|
|
2492
2498
|
<div class="box" role="checkbox" tabindex=${this.disabled?-1:0} aria-checked=${this.indeterminate?"mixed":String(this.checked)} aria-disabled=${String(this.disabled)} @click=${this.toggle} @keydown=${this.handleKeyDown}>
|
|
@@ -2590,7 +2596,7 @@
|
|
|
2590
2596
|
svg path {
|
|
2591
2597
|
stroke: var(--color-border-white);
|
|
2592
2598
|
}
|
|
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,
|
|
2599
|
+
`;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,n)=>{for(var i=n>1?void 0:n?mi(t,e):t,r=o.length-1,s;r>=0;r--)(s=o[r])&&(i=(n?s(t,e,i):s(i))||i);return n&&i&&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(n=>{n!==this&&(n.checked=!1)})}this.syncInput()}handleKeyDown(o){this.disabled||(o.key===" "||o.key==="Enter")&&(o.preventDefault(),this.handleClick())}render(){return l`
|
|
2594
2600
|
<input type="radio" id=${this.inputId} ?checked=${this.checked} ?disabled=${this.disabled} name=${this.name} value=${this.value} />
|
|
2595
2601
|
|
|
2596
2602
|
<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}>
|