@florid-kit/components 0.8.15 → 0.8.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/chipset.d.ts +1 -0
- package/index.js +60 -53
- package/index.mjs +341 -333
- package/package.json +1 -1
package/components/chipset.d.ts
CHANGED
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
|
|
5
|
+
*/const pt=globalThis,St=pt.ShadowRoot&&(pt.ShadyCSS===void 0||pt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Et=Symbol(),Nt=new WeakMap;let Yt=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==Et)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(St&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=Nt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Nt.set(e,t))}return t}toString(){return this.cssText}};const se=o=>new Yt(typeof o=="string"?o:o+"",void 0,Et),g=(o,...t)=>{const e=o.length===1?o[0]:t.reduce((i,r,n)=>i+(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.")})(r)+o[n+1],o[0]);return new Yt(e,o,Et)},ae=(o,t)=>{if(St)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),r=pt.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=e.cssText,o.appendChild(i)}},Ft=St?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return se(e)})(o):o;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:le,defineProperty:ce,getOwnPropertyDescriptor:he,getOwnPropertyNames:de,getOwnPropertySymbols:pe,getPrototypeOf:ue}=Object,M=globalThis,Rt=M.trustedTypes,ve=Rt?Rt.emptyScript:"",mt=M.reactiveElementPolyfillSupport,tt=(o,t)=>o,
|
|
9
|
+
*/const{is:le,defineProperty:ce,getOwnPropertyDescriptor:he,getOwnPropertyNames:de,getOwnPropertySymbols:pe,getPrototypeOf:ue}=Object,M=globalThis,Rt=M.trustedTypes,ve=Rt?Rt.emptyScript:"",mt=M.reactiveElementPolyfillSupport,tt=(o,t)=>o,ut={toAttribute(o,t){switch(t){case Boolean:o=o?ve: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}},Lt=(o,t)=>!le(o,t),Vt={attribute:!0,type:String,converter:ut,reflect:!1,useDefault:!1,hasChanged:Lt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),M.litPropertyMetadata??(M.litPropertyMetadata=new WeakMap);let G=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=Vt){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 i=Symbol(),r=this.getPropertyDescriptor(t,i,e);r!==void 0&&ce(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:n}=he(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get:r,set(s){const h=r==null?void 0:r.call(this);n==null||n.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Vt}static _$Ei(){if(this.hasOwnProperty(tt("elementProperties")))return;const t=ue(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(tt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(tt("properties"))){const e=this.properties,i=[...de(e),...pe(e)];for(const r of i)this.createProperty(r,e[r])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,r]of e)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const r=this._$Eu(e,i);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const r of i)e.unshift(Ft(r))}else t!==void 0&&e.push(Ft(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i: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 i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ae(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 i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){var n;const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(r!==void 0&&i.reflect===!0){const s=(((n=i.converter)==null?void 0:n.toAttribute)!==void 0?i.converter:ut).toAttribute(e,i.type);this._$Em=t,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(t,e){var n,s;const i=this.constructor,r=i._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const h=i.getPropertyOptions(r),c=typeof h.converter=="function"?{fromAttribute:h.converter}:((n=h.converter)==null?void 0:n.fromAttribute)!==void 0?h.converter:ut;this._$Em=r,this[r]=c.fromAttribute(e,h.type)??((s=this._$Ej)==null?void 0:s.get(r))??null,this._$Em=null}}requestUpdate(t,e,i){var r;if(t!==void 0){const n=this.constructor,s=this[t];if(i??(i=n.getPropertyOptions(t)),!((i.hasChanged??Lt)(s,e)||i.useDefault&&i.reflect&&s===((r=this._$Ej)==null?void 0:r.get(t))&&!this.hasAttribute(n._$Eu(t,i))))return;this.C(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:r,wrapped:n},s){i&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,s??e??this[t]),n!==!0||s!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),r===!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 i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,s]of this._$Ep)this[n]=s;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[n,s]of r){const{wrapped:h}=s,c=this[n];h!==!0||this._$AL.has(n)||c===void 0||this.C(n,void 0,s,c)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(r=>{var n;return(n=r.hostUpdate)==null?void 0:n.call(r)}),this.update(e)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var r;return(r=i.hostUpdated)==null?void 0:r.call(i)}),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){}};G.elementStyles=[],G.shadowRootOptions={mode:"open"},G[tt("elementProperties")]=new Map,G[tt("finalized")]=new Map,mt==null||mt({ReactiveElement:G}),(M.reactiveElementVersions??(M.reactiveElementVersions=[])).push("2.1.0");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const et=globalThis,
|
|
13
|
+
*/const et=globalThis,vt=et.trustedTypes,Zt=vt?vt.createPolicy("lit-html",{createHTML:o=>o}):void 0,te="$lit$",H=`lit$${Math.random().toFixed(9).slice(2)}$`,ee="?"+H,be=`<${ee}>`,V=document,rt=()=>V.createComment(""),it=o=>o===null||typeof o!="object"&&typeof o!="function",It=Array.isArray,fe=o=>It(o)||typeof(o==null?void 0:o[Symbol.iterator])=="function",xt=`[
|
|
14
14
|
\f\r]`,Y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,qt=/-->/g,Wt=/>/g,N=RegExp(`>|${xt}(?:([^\\s"'>=/]+)(${xt}*=${xt}*(?:[^
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Kt=/'/g,Gt=/"/g,oe=/^(?:script|style|textarea|title)$/i,ge=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=ge(1),T=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Xt=new WeakMap,F=V.createTreeWalker(V,129);function
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Kt=/'/g,Gt=/"/g,oe=/^(?:script|style|textarea|title)$/i,ge=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),l=ge(1),T=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Xt=new WeakMap,F=V.createTreeWalker(V,129);function re(o,t){if(!It(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Zt!==void 0?Zt.createHTML(t):t}const ye=(o,t)=>{const e=o.length-1,i=[];let r,n=t===2?"<svg>":t===3?"<math>":"",s=Y;for(let h=0;h<e;h++){const c=o[h];let f,m,p=-1,P=0;for(;P<c.length&&(s.lastIndex=P,m=s.exec(c),m!==null);)P=s.lastIndex,s===Y?m[1]==="!--"?s=qt:m[1]!==void 0?s=Wt:m[2]!==void 0?(oe.test(m[2])&&(r=RegExp("</"+m[2],"g")),s=N):m[3]!==void 0&&(s=N):s===N?m[0]===">"?(s=r??Y,p=-1):m[1]===void 0?p=-2:(p=s.lastIndex-m[2].length,f=m[1],s=m[3]===void 0?N:m[3]==='"'?Gt:Kt):s===Gt||s===Kt?s=N:s===qt||s===Wt?s=Y:(s=N,r=void 0);const D=s===N&&o[h+1].startsWith("/>")?" ":"";n+=s===Y?c+be:p>=0?(i.push(f),c.slice(0,p)+te+c.slice(p)+H+D):c+H+(p===-2?h:D)}return[re(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class nt{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let n=0,s=0;const h=t.length-1,c=this.parts,[f,m]=ye(t,e);if(this.el=nt.createElement(f,i),F.currentNode=this.el.content,e===2||e===3){const p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(r=F.nextNode())!==null&&c.length<h;){if(r.nodeType===1){if(r.hasAttributes())for(const p of r.getAttributeNames())if(p.endsWith(te)){const P=m[s++],D=r.getAttribute(p).split(H),dt=/([.?@])?(.*)/.exec(P);c.push({type:1,index:n,name:dt[2],strings:D,ctor:dt[1]==="."?xe:dt[1]==="?"?we:dt[1]==="@"?$e:ft}),r.removeAttribute(p)}else p.startsWith(H)&&(c.push({type:6,index:n}),r.removeAttribute(p));if(oe.test(r.tagName)){const p=r.textContent.split(H),P=p.length-1;if(P>0){r.textContent=vt?vt.emptyScript:"";for(let D=0;D<P;D++)r.append(p[D],rt()),F.nextNode(),c.push({type:2,index:++n});r.append(p[P],rt())}}}else if(r.nodeType===8)if(r.data===ee)c.push({type:2,index:n});else{let p=-1;for(;(p=r.data.indexOf(H,p+1))!==-1;)c.push({type:7,index:n}),p+=H.length-1}n++}}static createElement(t,e){const i=V.createElement("template");return i.innerHTML=t,i}}function X(o,t,e=o,i){var s,h;if(t===T)return t;let r=i!==void 0?(s=e._$Co)==null?void 0:s[i]:e._$Cl;const n=it(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((h=r==null?void 0:r._$AO)==null||h.call(r,!1),n===void 0?r=void 0:(r=new n(o),r._$AT(o,e,i)),i!==void 0?(e._$Co??(e._$Co=[]))[i]=r:e._$Cl=r),r!==void 0&&(t=X(o,r._$AS(o,t.values),r,i)),t}class me{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:i}=this._$AD,r=((t==null?void 0:t.creationScope)??V).importNode(e,!0);F.currentNode=r;let n=F.nextNode(),s=0,h=0,c=i[0];for(;c!==void 0;){if(s===c.index){let f;c.type===2?f=new ht(n,n.nextSibling,this,t):c.type===1?f=new c.ctor(n,c.name,c.strings,this,t):c.type===6&&(f=new _e(n,this,t)),this._$AV.push(f),c=i[++h]}s!==(c==null?void 0:c.index)&&(n=F.nextNode(),s++)}return F.currentNode=V,r}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class ht{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=(r==null?void 0:r.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=X(this,t,e),it(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==T&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):fe(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&&it(this._$AH)?this._$AA.nextSibling.data=t:this.T(V.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:i}=t,r=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=nt.createElement(re(i.h,i.h[0]),this.options)),i);if(((n=this._$AH)==null?void 0:n._$AD)===r)this._$AH.p(e);else{const s=new me(r,this),h=s.u(this.options);s.p(e),this.T(h),this._$AH=s}}_$AC(t){let e=Xt.get(t.strings);return e===void 0&&Xt.set(t.strings,e=new nt(t)),e}k(t){It(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const n of t)r===e.length?e.push(i=new ht(this.O(rt()),this.O(rt()),this,this.options)):i=e[r],i._$AI(n),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class ft{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=d}_$AI(t,e=this,i,r){const n=this.strings;let s=!1;if(n===void 0)t=X(this,t,e,0),s=!it(t)||t!==this._$AH&&t!==T,s&&(this._$AH=t);else{const h=t;let c,f;for(t=n[0],c=0;c<n.length-1;c++)f=X(this,h[i+c],e,c),f===T&&(f=this._$AH[c]),s||(s=!it(f)||f!==this._$AH[c]),f===d?t=d:t!==d&&(t+=(f??"")+n[c+1]),this._$AH[c]=f}s&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class xe extends ft{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class we extends ft{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class $e extends ft{constructor(t,e,i,r,n){super(t,e,i,r,n),this.type=5}_$AI(t,e=this){if((t=X(this,t,e,0)??d)===T)return;const i=this._$AH,r=t===d&&i!==d||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==d&&(i===d||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class _e{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){X(this,t)}}const wt=et.litHtmlPolyfillSupport;wt==null||wt(nt,ht),(et.litHtmlVersions??(et.litHtmlVersions=[])).push("3.3.0");const ke=(o,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let r=i._$litPart$;if(r===void 0){const n=(e==null?void 0:e.renderBefore)??null;i._$litPart$=r=new ht(t.insertBefore(rt(),n),n,void 0,e??{})}return r._$AI(o),r};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const Ce={attribute:!0,type:String,converter:
|
|
27
|
+
*/const Ce={attribute:!0,type:String,converter:ut,reflect:!1,hasChanged:Lt},Ae=(o=Ce,t,e)=>{const{kind:i,metadata:r}=e;let n=globalThis.litPropertyMetadata.get(r);if(n===void 0&&globalThis.litPropertyMetadata.set(r,n=new Map),i==="setter"&&((o=Object.create(o)).wrapped=!0),n.set(e.name,o),i==="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(i==="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: "+i)};function a(o){return(t,e)=>typeof e=="object"?Ae(o,t,e):((i,r,n)=>{const s=r.hasOwnProperty(n);return r.constructor.createProperty(n,i),s?Object.getOwnPropertyDescriptor(r,n):void 0})(o,t,e)}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/function Z(o){return a({...o,state:!0,attribute:!1})}const Pt=
|
|
31
|
+
*/function Z(o){return a({...o,state:!0,attribute:!1})}const Pt=g`
|
|
32
32
|
outline: 1px dashed var(--button-border-color);
|
|
33
33
|
outline-offset: 2px;
|
|
34
34
|
outline: dashed black;
|
|
35
|
-
`;
|
|
35
|
+
`;g`
|
|
36
36
|
:host * {
|
|
37
37
|
box-sizing: border-box;
|
|
38
38
|
}
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2023 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: Apache-2.0
|
|
47
|
-
*/function Se(o){o.addInitializer(t=>{const e=t;e.addEventListener("click",async
|
|
47
|
+
*/function Se(o){o.addInitializer(t=>{const e=t;e.addEventListener("click",async i=>{const{type:r,[Ot]:n}=e,{form:s}=n;if(!(!s||r==="button")&&(await new Promise(h=>{setTimeout(h)}),!i.defaultPrevented)){if(r==="reset"){s.reset();return}s.addEventListener("submit",h=>{Object.defineProperty(h,"submitter",{configurable:!0,enumerable:!0,get:()=>e})},{capture:!0,once:!0}),n.setFormValue(e.value),s.requestSubmit()}})})}const Ee=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
48
48
|
<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"/>
|
|
49
49
|
</svg>
|
|
50
50
|
`,Le=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
* @license
|
|
132
132
|
* Copyright 2017 Google LLC
|
|
133
133
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
134
|
-
*/const zt={ATTRIBUTE:1,CHILD:2},Dt=o=>(...t)=>({_$litDirective$:o,values:t});let Ht=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,
|
|
134
|
+
*/const zt={ATTRIBUTE:1,CHILD:2},Dt=o=>(...t)=>({_$litDirective$:o,values:t});let Ht=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};/**
|
|
135
135
|
* @license
|
|
136
136
|
* Copyright 2017 Google LLC
|
|
137
137
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
* @license
|
|
140
140
|
* Copyright 2017 Google LLC
|
|
141
141
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
142
|
-
*/class Ct extends kt{}Ct.directiveName="unsafeSVG",Ct.resultType=2;const S=Dt(Ct);var Qe=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,w=(o,t,e,
|
|
142
|
+
*/class Ct extends kt{}Ct.directiveName="unsafeSVG",Ct.resultType=2;const S=Dt(Ct);var Qe=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,w=(o,t,e,i)=>{for(var r=i>1?void 0:i?Ye(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&Qe(t,e,r),r};const to=Bt(u);let v=class extends to{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}get name(){return this.getAttribute("name")??""}set name(o){this.setAttribute("name",o)}get form(){return this[Ot].form}handleClick(){if(this.panelTarget){const o=document.getElementById(this.panelTarget);o!=null&&o.openPanel&&typeof o.openPanel=="function"?o.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=q[t].replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return l`<span class="${o==="start"?"icon-start":"icon-end"}">${S(e)}</span>`}renderButton(){const o=this.text||this.textsecond;return l`
|
|
143
143
|
<button type=${this.type} class="button" ?disabled=${this.disabled} @click=${this.handleClick}>
|
|
144
144
|
${this.startIcon?this.renderIcon("start"):d}
|
|
145
145
|
${o?l`
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
`:l`<slot></slot>`}
|
|
163
163
|
${this.endIcon?this.renderIcon("end"):d}
|
|
164
164
|
</a>
|
|
165
|
-
`}};Se(v);v.formAssociated=!0;v.styles=
|
|
165
|
+
`}};Se(v);v.formAssociated=!0;v.styles=g`
|
|
166
166
|
:host {
|
|
167
167
|
--button-border: transparent;
|
|
168
168
|
cursor: pointer;
|
|
@@ -346,12 +346,12 @@
|
|
|
346
346
|
transform: translateX(4px);
|
|
347
347
|
}
|
|
348
348
|
//End icon movment on hover
|
|
349
|
-
`;w([a()],v.prototype,"type",2);w([a({reflect:!0})],v.prototype,"value",2);w([a({type:String,reflect:!0})],v.prototype,"variant",2);w([a({type:String})],v.prototype,"text",2);w([a({type:String})],v.prototype,"textsecond",2);w([a({type:Boolean,reflect:!0})],v.prototype,"fullwidth",2);w([a({type:Boolean,reflect:!0})],v.prototype,"disabled",2);w([a({type:String,reflect:!0})],v.prototype,"startIconModel",2);w([a({type:String,reflect:!0})],v.prototype,"endIconModel",2);w([a({type:Boolean,reflect:!0,attribute:"starticon"})],v.prototype,"startIcon",2);w([a({type:Boolean,reflect:!0,attribute:"endicon"})],v.prototype,"endIcon",2);w([a({type:String,attribute:"paneltarget",reflect:!0})],v.prototype,"panelTarget",2);w([a({type:String})],v.prototype,"href",2);w([a({type:String})],v.prototype,"target",2);w([a({type:Boolean,reflect:!0})],v.prototype,"underlined",2);v=w([x("o-button")],v);var eo=Object.defineProperty,oo=Object.getOwnPropertyDescriptor,gt=(o,t,e,
|
|
349
|
+
`;w([a()],v.prototype,"type",2);w([a({reflect:!0})],v.prototype,"value",2);w([a({type:String,reflect:!0})],v.prototype,"variant",2);w([a({type:String})],v.prototype,"text",2);w([a({type:String})],v.prototype,"textsecond",2);w([a({type:Boolean,reflect:!0})],v.prototype,"fullwidth",2);w([a({type:Boolean,reflect:!0})],v.prototype,"disabled",2);w([a({type:String,reflect:!0})],v.prototype,"startIconModel",2);w([a({type:String,reflect:!0})],v.prototype,"endIconModel",2);w([a({type:Boolean,reflect:!0,attribute:"starticon"})],v.prototype,"startIcon",2);w([a({type:Boolean,reflect:!0,attribute:"endicon"})],v.prototype,"endIcon",2);w([a({type:String,attribute:"paneltarget",reflect:!0})],v.prototype,"panelTarget",2);w([a({type:String})],v.prototype,"href",2);w([a({type:String})],v.prototype,"target",2);w([a({type:Boolean,reflect:!0})],v.prototype,"underlined",2);v=w([x("o-button")],v);var eo=Object.defineProperty,oo=Object.getOwnPropertyDescriptor,gt=(o,t,e,i)=>{for(var r=i>1?void 0:i?oo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&eo(t,e,r),r};let J=class extends u{constructor(){super(...arguments),this.status="empty",this.ariaDescribedBy="a-product-name",this.label="Add to wishlist",this.toggleStatus=()=>{this.status=this.status==="empty"?"filled":"empty",this.setAttribute("aria-pressed",String(this.status==="filled")),this.dispatchEvent(new CustomEvent("wishlist-toggle",{detail:{status:this.status},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute("tabindex","0"),this.setAttribute("role","button"),this.setAttribute("aria-pressed",String(this.status==="filled"))}firstUpdated(){this.addEventListener("click",this.toggleStatus),this.addEventListener("keydown",this.handleKeydown)}handleKeydown(o){(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),this.toggleStatus())}render(){const o=q.wishlist.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return l`
|
|
350
350
|
<button type="button" aria-describedby="${this.ariaDescribedBy}" class="wishlist-button">
|
|
351
351
|
<span class="sr-only">${this.label}</span>
|
|
352
352
|
${S(o)}
|
|
353
353
|
</button>
|
|
354
|
-
`}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()}};J.styles=
|
|
354
|
+
`}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()}};J.styles=g`
|
|
355
355
|
:host {
|
|
356
356
|
display: inline-flex;
|
|
357
357
|
justify-content: center;
|
|
@@ -418,7 +418,7 @@
|
|
|
418
418
|
* @license
|
|
419
419
|
* Copyright 2018 Google LLC
|
|
420
420
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
421
|
-
*/const $=o=>o??d;var
|
|
421
|
+
*/const $=o=>o??d;var ro=Object.defineProperty,io=Object.getOwnPropertyDescriptor,L=(o,t,e,i)=>{for(var r=i>1?void 0:i?io(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&ro(t,e,r),r};let _=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=q[this.icon]??"",t=`icon-${this.icon}`,e=o.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"'),i=this.showSrLabel?l`<span class="sr-only">${this.srLabel}</span>`:null,r=this.showSrLabel?null:"icon";return l`
|
|
422
422
|
${this.type==="span"?l`
|
|
423
423
|
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
424
424
|
${S(e)}
|
|
@@ -426,15 +426,15 @@
|
|
|
426
426
|
`:l`
|
|
427
427
|
<button
|
|
428
428
|
type="button"
|
|
429
|
-
aria-label=${$(
|
|
429
|
+
aria-label=${$(r)}
|
|
430
430
|
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
|
|
431
431
|
?disabled="${this.disabled}"
|
|
432
432
|
>
|
|
433
433
|
${S(e)}
|
|
434
|
-
${
|
|
434
|
+
${i}
|
|
435
435
|
</button>
|
|
436
436
|
`}
|
|
437
|
-
`}};_.styles=
|
|
437
|
+
`}};_.styles=g`
|
|
438
438
|
:host {
|
|
439
439
|
display: inline-flex;
|
|
440
440
|
justify-content: center;
|
|
@@ -640,7 +640,7 @@
|
|
|
640
640
|
.sr-only {
|
|
641
641
|
display: none;
|
|
642
642
|
}
|
|
643
|
-
`;L([a({type:String,reflect:!0})],_.prototype,"bgstyle",2);L([a({type:String,reflect:!0})],_.prototype,"size",2);L([a({type:String,reflect:!0})],_.prototype,"status",2);L([a({type:String,reflect:!0})],_.prototype,"type",2);L([a({type:String})],_.prototype,"strokewidth",2);L([a({type:String})],_.prototype,"icon",2);L([a({type:Boolean,reflect:!0})],_.prototype,"disabled",2);L([a({type:Boolean})],_.prototype,"showSrLabel",2);L([a({type:String})],_.prototype,"srLabel",2);_=L([x("o-icon-button")],_);var no=Object.defineProperty,so=Object.getOwnPropertyDescriptor,W=(o,t,e,
|
|
643
|
+
`;L([a({type:String,reflect:!0})],_.prototype,"bgstyle",2);L([a({type:String,reflect:!0})],_.prototype,"size",2);L([a({type:String,reflect:!0})],_.prototype,"status",2);L([a({type:String,reflect:!0})],_.prototype,"type",2);L([a({type:String})],_.prototype,"strokewidth",2);L([a({type:String})],_.prototype,"icon",2);L([a({type:Boolean,reflect:!0})],_.prototype,"disabled",2);L([a({type:Boolean})],_.prototype,"showSrLabel",2);L([a({type:String})],_.prototype,"srLabel",2);_=L([x("o-icon-button")],_);var no=Object.defineProperty,so=Object.getOwnPropertyDescriptor,W=(o,t,e,i)=>{for(var r=i>1?void 0:i?so(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&no(t,e,r),r};let O=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`
|
|
644
644
|
<a
|
|
645
645
|
href="${o}"
|
|
646
646
|
target="${$(this.target||void 0)}"
|
|
@@ -666,7 +666,7 @@
|
|
|
666
666
|
></o-icon-button>
|
|
667
667
|
`:null}
|
|
668
668
|
</a>
|
|
669
|
-
`}};O.styles=
|
|
669
|
+
`}};O.styles=g`
|
|
670
670
|
:host([template="standard"]) a {
|
|
671
671
|
color: var(--color-content-action-secondary);
|
|
672
672
|
font-size: var(--font-size-200);
|
|
@@ -753,14 +753,14 @@
|
|
|
753
753
|
height: 1px;
|
|
754
754
|
}
|
|
755
755
|
/* End of underline effect */
|
|
756
|
-
`;W([a({type:String})],O.prototype,"href",2);W([a({type:String})],O.prototype,"target",2);W([a({type:String,reflect:!0})],O.prototype,"template",2);W([a({type:Boolean,reflect:!0})],O.prototype,"inverse",2);W([a({type:Boolean,reflect:!0})],O.prototype,"endIcon",2);W([a({type:Boolean,reflect:!0})],O.prototype,"reverseEndIcon",2);O=W([x("o-link")],O);var ao=Object.defineProperty,lo=Object.getOwnPropertyDescriptor,yt=(o,t,e,
|
|
756
|
+
`;W([a({type:String})],O.prototype,"href",2);W([a({type:String})],O.prototype,"target",2);W([a({type:String,reflect:!0})],O.prototype,"template",2);W([a({type:Boolean,reflect:!0})],O.prototype,"inverse",2);W([a({type:Boolean,reflect:!0})],O.prototype,"endIcon",2);W([a({type:Boolean,reflect:!0})],O.prototype,"reverseEndIcon",2);O=W([x("o-link")],O);var ao=Object.defineProperty,lo=Object.getOwnPropertyDescriptor,yt=(o,t,e,i)=>{for(var r=i>1?void 0:i?lo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&ao(t,e,r),r};let Q=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 i;e>=1?i=100:e<=0?i=0:i=Math.round(e*100/25)*25,o.push(`star-${i}`)}return o}render(){const o=this.getStarKeys();return l`
|
|
757
757
|
<div class="rating">
|
|
758
758
|
<div class="stars">
|
|
759
759
|
${o.map(t=>l`<span class="star">${S(q[t]??"")}</span>`)}
|
|
760
760
|
</div>
|
|
761
761
|
${this.reviewCount!=null&&this.href!=null?l`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>`:null}
|
|
762
762
|
</div>
|
|
763
|
-
`}};Q.styles=
|
|
763
|
+
`}};Q.styles=g`
|
|
764
764
|
svg {
|
|
765
765
|
width: 12px;
|
|
766
766
|
height: 12px;
|
|
@@ -801,7 +801,7 @@
|
|
|
801
801
|
* @license
|
|
802
802
|
* Copyright 2017 Google LLC
|
|
803
803
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
804
|
-
*/const ot=(o,t)=>{var
|
|
804
|
+
*/const ot=(o,t)=>{var i;const e=o._$AN;if(e===void 0)return!1;for(const r of e)(i=r._$AO)==null||i.call(r,t,!1),ot(r,t);return!0},bt=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)},ie=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),uo(t)}};function ho(o){this._$AN!==void 0?(bt(this),this._$AM=o,ie(this)):this._$AM=o}function po(o,t=!1,e=0){const i=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(i))for(let n=e;n<i.length;n++)ot(i[n],!1),bt(i[n]);else i!=null&&(ot(i,!1),bt(i));else ot(this,o)}const uo=o=>{o.type==zt.CHILD&&(o._$AP??(o._$AP=po),o._$AQ??(o._$AQ=ho))};class vo extends Ht{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,i){super._$AT(t,e,i),ie(this),this.isConnected=t._$AU}_$AO(t,e=!0){var i,r;t!==this.isConnected&&(this.isConnected=t,t?(i=this.reconnected)==null||i.call(this):(r=this.disconnected)==null||r.call(this)),e&&(ot(this,t),bt(this))}setValue(t){if(co(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 bo extends vo{constructor(){super(...arguments),this.prevData={}}render(t){return d}update(t,[e]){var i;this.element!==t.element&&(this.element=t.element),this.host=((i=t.options)===null||i===void 0?void 0:i.host)||this.element,this.apply(e),this.groom(e),this.prevData={...e}}apply(t){if(!t)return;const{prevData:e,element:i}=this;for(const r in t){const n=t[r];n!==e[r]&&(i[r]=n)}}groom(t){const{prevData:e,element:i}=this;if(e)for(const r in e)(!t||!(r in t)&&i[r]===e[r])&&(i[r]=void 0)}}class fo extends bo{constructor(){super(...arguments),this.eventData={}}apply(t){if(t)for(const e in t){const i=t[e];i!==this.eventData[e]&&this.applyEvent(e,i)}}applyEvent(t,e){const{prevData:i,element:r}=this;this.eventData[t]=e,i[t]&&r.removeEventListener(t,this,e),r.addEventListener(t,this,e)}groom(t){const{prevData:e,element:i}=this;if(e)for(const r in e)(!t||!(r in t)&&i[r]===e[r])&&this.groomEvent(r,e[r])}groomEvent(t,e){const{element:i}=this;delete this.eventData[t],i.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 i in t){const r=i.slice(1),n=t[i];e.removeEventListener(r,this,n)}}reconnected(){const{eventData:t,element:e}=this;for(const i in t){const r=i.slice(1),n=t[i];e.addEventListener(r,this,n)}}}class go extends fo{apply(t){if(!t)return;const{prevData:e,element:i}=this;for(const r in t){const n=t[r];if(n===e[r])continue;const s=r.slice(1);switch(r[0]){case"@":this.eventData[s]=n,this.applyEvent(s,n);break;case".":i[s]=n;break;case"?":n?i.setAttribute(s,""):i.removeAttribute(s);break;default:n!=null?i.setAttribute(r,String(n)):i.removeAttribute(r);break}}}groom(t){const{prevData:e,element:i}=this;if(e)for(const r in e){const n=r.slice(1);if(!t||!(r in t)&&i[n]===e[r])switch(r[0]){case"@":this.groomEvent(n,e[r]);break;case".":i[n]=void 0;break;case"?":i.removeAttribute(n);break;default:i.removeAttribute(r);break}}}}const Jt=Dt(go);var yo=Object.defineProperty,mo=Object.getOwnPropertyDescriptor,y=(o,t,e,i)=>{for(var r=i>1?void 0:i?mo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&yo(t,e,r),r};let b=class extends u{constructor(){super(...arguments),this.open=!1,this.showHeader=!0,this.showFooter=!1,this.showHeaderStartIcon=!1,this.headerTitle="",this.closeButtonLabel="Close the modal",this.firstButtonLabel="Close",this.firstButtonVariant="primary",this.firstButtonProps={},this.secondaryButtonLabel="",this.secondaryButtonVariant="secondary",this.secondaryButtonProps={},this.disablePortal=!1,this.zIndex=99,this.initialized=!1,this.previousFocusedElement=null,this.handleKeyDown=o=>{this.open&&(o.key==="Escape"?this.closePanel():o.key==="Tab"&&this.trapFocus(o))}}connectedCallback(){super.connectedCallback(),!this.disablePortal&&this.parentElement!==document.body&&document.body.appendChild(this),window.addEventListener("keydown",this.handleKeyDown),this.updateComplete.then(()=>{this.initialized=!0})}disconnectedCallback(){document.body.style.overflow="",document.body.removeAttribute("data-side-panel"),window.removeEventListener("keydown",this.handleKeyDown),super.disconnectedCallback()}trapFocus(o){const t=this.getFocusableElements();if(t.length===0)return;const e=t[0],i=t[t.length-1];o.shiftKey&&document.activeElement===e?(o.preventDefault(),i.focus()):!o.shiftKey&&document.activeElement===i&&(o.preventDefault(),e.focus())}getFocusableElements(){const o=this.renderRoot.querySelector(".panel");return o?Array.from(o.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(t=>!t.hasAttribute("disabled")):[]}openPanel(){this.previousFocusedElement=document.activeElement,this.open=!0,document.body.style.overflow="hidden",document.body.setAttribute("data-side-panel","open"),this.updateComplete.then(()=>{const o=this.getFocusableElements()[0];o==null||o.focus()})}closePanel(){var o;this.open=!1,document.body.style.overflow="",document.body.removeAttribute("data-side-panel"),(o=this.previousFocusedElement)==null||o.focus(),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}handleFirstClick(){typeof this.onFirstButtonClick=="function"&&this.onFirstButtonClick(),this.closePanel()}handleSecondaryClick(){typeof this.onSecondaryButtonClick=="function"&&this.onSecondaryButtonClick(),this.closePanel()}updated(){this.style.setProperty("--z-overlay",`${this.zIndex}`),this.style.setProperty("--z-panel",`${this.zIndex+1}`)}render(){return l`
|
|
805
805
|
<div class="overlay" style="z-index: ${this.zIndex}" @click=${this.closePanel}></div>
|
|
806
806
|
<div
|
|
807
807
|
class="panel"
|
|
@@ -849,7 +849,7 @@
|
|
|
849
849
|
</div>
|
|
850
850
|
`:null}
|
|
851
851
|
</div>
|
|
852
|
-
`}};b.styles=
|
|
852
|
+
`}};b.styles=g`
|
|
853
853
|
:host {
|
|
854
854
|
--z-overlay: 99;
|
|
855
855
|
--z-panel: 100;
|
|
@@ -990,7 +990,7 @@
|
|
|
990
990
|
--line-height: var(--line-height-280);
|
|
991
991
|
}
|
|
992
992
|
}
|
|
993
|
-
`;
|
|
993
|
+
`;y([a({type:Boolean,reflect:!0})],b.prototype,"open",2);y([a({type:Boolean,reflect:!0})],b.prototype,"showHeader",2);y([a({type:Boolean,reflect:!0})],b.prototype,"showFooter",2);y([a({type:Boolean,reflect:!0})],b.prototype,"showHeaderStartIcon",2);y([a({type:String,reflect:!0})],b.prototype,"headerTitle",2);y([a({type:String,reflect:!0})],b.prototype,"closeButtonLabel",2);y([a({type:String,reflect:!0})],b.prototype,"firstButtonLabel",2);y([a({type:String,reflect:!0})],b.prototype,"firstButtonVariant",2);y([a({type:Object,reflect:!0})],b.prototype,"firstButtonProps",2);y([a({type:Function})],b.prototype,"onFirstButtonClick",2);y([a({type:String,reflect:!0})],b.prototype,"secondaryButtonLabel",2);y([a({type:String,reflect:!0})],b.prototype,"secondaryButtonVariant",2);y([a({type:Object,reflect:!0})],b.prototype,"secondaryButtonProps",2);y([a({type:Function})],b.prototype,"onSecondaryButtonClick",2);y([a({type:Boolean,reflect:!0})],b.prototype,"disablePortal",2);y([a({type:Number,reflect:!0})],b.prototype,"zIndex",2);y([a({type:Boolean,reflect:!0})],b.prototype,"initialized",2);b=y([x("o-side-panel")],b);var xo=Object.defineProperty,wo=Object.getOwnPropertyDescriptor,j=(o,t,e,i)=>{for(var r=i>1?void 0:i?wo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&xo(t,e,r),r};let E=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`
|
|
994
994
|
<o-icon-button
|
|
995
995
|
icon="playerv"
|
|
996
996
|
size="xsmall"
|
|
@@ -999,16 +999,16 @@
|
|
|
999
999
|
status="filled"
|
|
1000
1000
|
strokewidth="0"
|
|
1001
1001
|
></o-icon-button>
|
|
1002
|
-
`}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))}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(
|
|
1002
|
+
`}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))}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(r=>{r.classList.remove("a--tabfocus")}),t.classList.add("a--tabfocus"),this.requestUpdate()}onBlur(o){setTimeout(()=>{var e;const t=(e=this.shadowRoot)==null?void 0:e.activeElement;(!t||!t.classList.contains("thumb"))&&this.renderRoot.querySelectorAll(".thumb").forEach(r=>r.classList.remove("a--tabfocus"))},0)}render(){return l`
|
|
1003
1003
|
<ul class="scroll-container" style="max-width: ${this.maxWidth};">
|
|
1004
|
-
${this.thumbnails.map((o,t)=>{const e=this.disabledIndexes.includes(t),
|
|
1004
|
+
${this.thumbnails.map((o,t)=>{const e=this.disabledIndexes.includes(t),i=this.activeIndex===t,r=o.type==="video",n=r?`video ${t}`:`${this.altressource} ${t+1}`;return l`
|
|
1005
1005
|
<li class="thumb-wrapper">
|
|
1006
1006
|
<button
|
|
1007
1007
|
class="thumb"
|
|
1008
1008
|
data-index="${t}"
|
|
1009
1009
|
?disabled=${e}
|
|
1010
1010
|
aria-selected="${this.focusedIndex===t}"
|
|
1011
|
-
aria-current=${
|
|
1011
|
+
aria-current=${i?"true":"false"}
|
|
1012
1012
|
tabindex="${this.disabledIndexes.includes(t)?-1:0}"
|
|
1013
1013
|
@click=${()=>this.selectThumbnail(t)}
|
|
1014
1014
|
@keydown=${this.handleKeyDown}
|
|
@@ -1017,11 +1017,11 @@
|
|
|
1017
1017
|
>
|
|
1018
1018
|
<img alt="${n}" src="${o.src}" />
|
|
1019
1019
|
</button>
|
|
1020
|
-
${
|
|
1020
|
+
${r?l`<div class="play-icon-wrapper">${this.playerIconTemplate}</div>`:null}
|
|
1021
1021
|
</li>
|
|
1022
1022
|
`})}
|
|
1023
1023
|
</ul>
|
|
1024
|
-
`}};E.styles=
|
|
1024
|
+
`}};E.styles=g`
|
|
1025
1025
|
:host {
|
|
1026
1026
|
display: flex;
|
|
1027
1027
|
gap: 5px;
|
|
@@ -1126,9 +1126,9 @@
|
|
|
1126
1126
|
height: 0;
|
|
1127
1127
|
width: 0;
|
|
1128
1128
|
}
|
|
1129
|
-
`;j([a({type:Array})],E.prototype,"thumbnails",2);j([a({type:Number})],E.prototype,"activeIndex",2);j([a({type:Array})],E.prototype,"disabledIndexes",2);j([a({type:String})],E.prototype,"maxWidth",2);j([a({type:String})],E.prototype,"altressource",2);j([a({type:Object})],E.prototype,"swiperInstance",2);j([Z()],E.prototype,"focusedIndex",2);E=j([x("thumbnail-navigation")],E);var $o=Object.defineProperty,_o=Object.getOwnPropertyDescriptor,Mt=(o,t,e,
|
|
1129
|
+
`;j([a({type:Array})],E.prototype,"thumbnails",2);j([a({type:Number})],E.prototype,"activeIndex",2);j([a({type:Array})],E.prototype,"disabledIndexes",2);j([a({type:String})],E.prototype,"maxWidth",2);j([a({type:String})],E.prototype,"altressource",2);j([a({type:Object})],E.prototype,"swiperInstance",2);j([Z()],E.prototype,"focusedIndex",2);E=j([x("thumbnail-navigation")],E);var $o=Object.defineProperty,_o=Object.getOwnPropertyDescriptor,Mt=(o,t,e,i)=>{for(var r=i>1?void 0:i?_o(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&$o(t,e,r),r};let st=class extends u{constructor(){super(...arguments),this.type="",this.bgstyle="background-white"}render(){return l`
|
|
1130
1130
|
<span class="tag ${this.bgstyle}"><slot></slot></span>
|
|
1131
|
-
`}};st.styles=
|
|
1131
|
+
`}};st.styles=g`
|
|
1132
1132
|
.tag {
|
|
1133
1133
|
display: inline-block;
|
|
1134
1134
|
padding: var(--spacing-2-xs) var(--spacing-s);
|
|
@@ -1183,12 +1183,12 @@
|
|
|
1183
1183
|
background-color: var(--color-content-success);
|
|
1184
1184
|
}
|
|
1185
1185
|
|
|
1186
|
-
`;Mt([a({type:String,reflect:!0})],st.prototype,"type",2);Mt([a({type:String,reflect:!0})],st.prototype,"bgstyle",2);st=Mt([x("o-tag")],st);var ko=Object.defineProperty,Co=Object.getOwnPropertyDescriptor,Tt=(o,t,e,
|
|
1186
|
+
`;Mt([a({type:String,reflect:!0})],st.prototype,"type",2);Mt([a({type:String,reflect:!0})],st.prototype,"bgstyle",2);st=Mt([x("o-tag")],st);var ko=Object.defineProperty,Co=Object.getOwnPropertyDescriptor,Tt=(o,t,e,i)=>{for(var r=i>1?void 0:i?Co(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&ko(t,e,r),r};let at=class extends u{constructor(){super(...arguments),this.type="top",this.text=""}render(){return l`
|
|
1187
1187
|
<div class="tooltip">
|
|
1188
1188
|
<span class="tooltiptext">${this.text}</span>
|
|
1189
1189
|
<slot></slot>
|
|
1190
1190
|
</div>
|
|
1191
|
-
`}};at.styles=
|
|
1191
|
+
`}};at.styles=g`
|
|
1192
1192
|
.tooltip {
|
|
1193
1193
|
position: relative;
|
|
1194
1194
|
display: inline-block;
|
|
@@ -1280,7 +1280,7 @@
|
|
|
1280
1280
|
border-color: transparent var(--color-alpha-dark-strongest) transparent transparent;
|
|
1281
1281
|
}
|
|
1282
1282
|
|
|
1283
|
-
`;Tt([a({type:String,reflect:!0})],at.prototype,"type",2);Tt([a({type:String,reflect:!0})],at.prototype,"text",2);at=Tt([x("o-tooltip")],at);var Ao=Object.defineProperty,So=Object.getOwnPropertyDescriptor,z=(o,t,e,
|
|
1283
|
+
`;Tt([a({type:String,reflect:!0})],at.prototype,"type",2);Tt([a({type:String,reflect:!0})],at.prototype,"text",2);at=Tt([x("o-tooltip")],at);var Ao=Object.defineProperty,So=Object.getOwnPropertyDescriptor,z=(o,t,e,i)=>{for(var r=i>1?void 0:i?So(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&Ao(t,e,r),r};let C=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=q.checkstroke.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"'),t=this.options.find(e=>e.value===this.value);return l`
|
|
1284
1284
|
<button
|
|
1285
1285
|
role="combobox"
|
|
1286
1286
|
aria-haspopup="listbox"
|
|
@@ -1308,13 +1308,13 @@
|
|
|
1308
1308
|
aria-activedescendant="${this.activeIndex>=0?"option-"+this.activeIndex:""}"
|
|
1309
1309
|
style=${`width: ${this.width};`}
|
|
1310
1310
|
>
|
|
1311
|
-
${this.options.map((e,
|
|
1311
|
+
${this.options.map((e,i)=>l`
|
|
1312
1312
|
<li
|
|
1313
|
-
id="option-${
|
|
1313
|
+
id="option-${i}"
|
|
1314
1314
|
role="option"
|
|
1315
1315
|
aria-selected="${e.value===this.value}"
|
|
1316
|
-
tabindex="${
|
|
1317
|
-
class="${
|
|
1316
|
+
tabindex="${i===this.activeIndex?"0":"-1"}"
|
|
1317
|
+
class="${i===this.activeIndex?"active":""} ${e.disabled?"disabled":""}"
|
|
1318
1318
|
@click=${()=>this.selectOption(e)}
|
|
1319
1319
|
>
|
|
1320
1320
|
${e.url?l`
|
|
@@ -1328,7 +1328,7 @@
|
|
|
1328
1328
|
</ul>`:null}
|
|
1329
1329
|
|
|
1330
1330
|
<input type="hidden" name="${this.name}" .value="${this.value}" />
|
|
1331
|
-
`}};C.styles=
|
|
1331
|
+
`}};C.styles=g`
|
|
1332
1332
|
:host {
|
|
1333
1333
|
display: inline-block;
|
|
1334
1334
|
position: relative;
|
|
@@ -1467,7 +1467,7 @@
|
|
|
1467
1467
|
input[type="hidden"] {
|
|
1468
1468
|
display: none;
|
|
1469
1469
|
}
|
|
1470
|
-
`;z([a({type:Array,reflect:!0})],C.prototype,"options",2);z([a({type:String,reflect:!0})],C.prototype,"value",2);z([a({type:String,reflect:!0})],C.prototype,"name",2);z([a({type:Boolean,reflect:!0})],C.prototype,"disabled",2);z([a({type:String,reflect:!0})],C.prototype,"width",2);z([Z()],C.prototype,"open",2);z([Z()],C.prototype,"activeIndex",2);z([Z()],C.prototype,"menuWidth",2);C=z([x("o-dropdown")],C);var Eo=Object.getOwnPropertyDescriptor,Lo=(o,t,e,
|
|
1470
|
+
`;z([a({type:Array,reflect:!0})],C.prototype,"options",2);z([a({type:String,reflect:!0})],C.prototype,"value",2);z([a({type:String,reflect:!0})],C.prototype,"name",2);z([a({type:Boolean,reflect:!0})],C.prototype,"disabled",2);z([a({type:String,reflect:!0})],C.prototype,"width",2);z([Z()],C.prototype,"open",2);z([Z()],C.prototype,"activeIndex",2);z([Z()],C.prototype,"menuWidth",2);C=z([x("o-dropdown")],C);var Eo=Object.getOwnPropertyDescriptor,Lo=(o,t,e,i)=>{for(var r=i>1?void 0:i?Eo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=s(r)||r);return r};let At=class extends u{render(){return l` <span class="dots"></span> `}};At.styles=g`
|
|
1471
1471
|
:host {
|
|
1472
1472
|
display: flex;
|
|
1473
1473
|
align-items: center;
|
|
@@ -1518,7 +1518,7 @@
|
|
|
1518
1518
|
background-color: var(--color-container-action-primary-pressed);
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
|
-
`;At=Lo([x("o-dots")],At);var Io=Object.defineProperty,Po=Object.getOwnPropertyDescriptor,I=(o,t,e,
|
|
1521
|
+
`;At=Lo([x("o-dots")],At);var Io=Object.defineProperty,Po=Object.getOwnPropertyDescriptor,I=(o,t,e,i)=>{for(var r=i>1?void 0:i?Po(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&Io(t,e,r),r};let k=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=q.checkstroke.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"'),t=this.options.find(e=>e.value===this.value);return l`
|
|
1522
1522
|
<button
|
|
1523
1523
|
role="combobox"
|
|
1524
1524
|
aria-haspopup="listbox"
|
|
@@ -1556,14 +1556,14 @@
|
|
|
1556
1556
|
aria-activedescendant="${this.activeIndex>=0?"option-"+this.activeIndex:""}"
|
|
1557
1557
|
style=${`width: ${this.width};`}
|
|
1558
1558
|
>
|
|
1559
|
-
${this.options.map((e,
|
|
1559
|
+
${this.options.map((e,i)=>l`
|
|
1560
1560
|
<li
|
|
1561
|
-
id="option-${
|
|
1561
|
+
id="option-${i}"
|
|
1562
1562
|
role="option"
|
|
1563
1563
|
aria-selected="${e.value===this.value}"
|
|
1564
1564
|
aria-disabled="${e.disabled?"true":"false"}"
|
|
1565
|
-
tabindex="${
|
|
1566
|
-
class="${
|
|
1565
|
+
tabindex="${i===this.activeIndex?"0":"-1"}"
|
|
1566
|
+
class="${i===this.activeIndex?"active":""} ${e.disabled?"disabled":""}"
|
|
1567
1567
|
@click=${()=>this.selectOption(e)}
|
|
1568
1568
|
>
|
|
1569
1569
|
<a href="${$(e.url)}">
|
|
@@ -1580,7 +1580,7 @@
|
|
|
1580
1580
|
</ul>`:null}
|
|
1581
1581
|
|
|
1582
1582
|
<input type="hidden" name="${this.name}" .value="${this.value}" />
|
|
1583
|
-
`}};k.styles=
|
|
1583
|
+
`}};k.styles=g`
|
|
1584
1584
|
:host {
|
|
1585
1585
|
display: inline-block;
|
|
1586
1586
|
position: relative;
|
|
@@ -1759,13 +1759,13 @@
|
|
|
1759
1759
|
* @license
|
|
1760
1760
|
* Copyright 2018 Google LLC
|
|
1761
1761
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1762
|
-
*/const ne="important",Oo=" !"+ne,Bo=Dt(class extends Ht{constructor(o){var t;if(super(o),o.type!==zt.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
|
|
1762
|
+
*/const ne="important",Oo=" !"+ne,Bo=Dt(class extends Ht{constructor(o){var t;if(super(o),o.type!==zt.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 i=o[e];return i==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`},"")}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 i of this.ft)t[i]==null&&(this.ft.delete(i),i.includes("-")?e.removeProperty(i):e[i]=null);for(const i in t){const r=t[i];if(r!=null){this.ft.add(i);const n=typeof r=="string"&&r.endsWith(Oo);i.includes("-")||n?e.setProperty(i,n?r.slice(0,-11):r,n?ne:""):e[i]=r}}return T}});var zo=Object.defineProperty,Do=Object.getOwnPropertyDescriptor,jt=(o,t,e,i)=>{for(var r=i>1?void 0:i?Do(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&zo(t,e,r),r};let lt=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`
|
|
1763
1763
|
${this.option.imgurl?l`<img src="${this.option.imgurl}" alt="${$(this.option.title)}" aria-hidden="true" style=${Bo(t)} />`:""}
|
|
1764
1764
|
<div class="m-reassurance-content">
|
|
1765
1765
|
<h3 class="a-reassurance-text">${$(this.option.title)}</h3>
|
|
1766
1766
|
<p class="a-reassurance-description">${$(this.option.description)}</p>
|
|
1767
1767
|
</div>
|
|
1768
|
-
`;return o?l`<a href="${$(this.option.url)}" class="reassurance-item clickable">${e}</a>`:l`<div class="reassurance-item">${e}</div>`}};lt.styles=
|
|
1768
|
+
`;return o?l`<a href="${$(this.option.url)}" class="reassurance-item clickable">${e}</a>`:l`<div class="reassurance-item">${e}</div>`}};lt.styles=g`
|
|
1769
1769
|
:host {
|
|
1770
1770
|
display: inline-block;
|
|
1771
1771
|
position: relative;
|
|
@@ -1846,7 +1846,7 @@
|
|
|
1846
1846
|
overflow: hidden;
|
|
1847
1847
|
}
|
|
1848
1848
|
}
|
|
1849
|
-
`;jt([a({type:Object,reflect:!0})],lt.prototype,"option",2);jt([a({type:Number,reflect:!0})],lt.prototype,"imageSize",2);lt=jt([x("o-reassurance")],lt);var Ho=Object.defineProperty,Mo=Object.getOwnPropertyDescriptor,U=(o,t,e,
|
|
1849
|
+
`;jt([a({type:Object,reflect:!0})],lt.prototype,"option",2);jt([a({type:Number,reflect:!0})],lt.prototype,"imageSize",2);lt=jt([x("o-reassurance")],lt);var Ho=Object.defineProperty,Mo=Object.getOwnPropertyDescriptor,U=(o,t,e,i)=>{for(var r=i>1?void 0:i?Mo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&Ho(t,e,r),r};const To=Bt(u);let A=class extends To{constructor(){super(...arguments),this.link="",this.name="",this.value="",this.text="",this.size="standard",this.selected=!1,this.fullwidth=!1}handleClick(o){this.selected||(this.selected=!0)}render(){const o=this.text;return this.link?l`
|
|
1850
1850
|
<a href="${this.link}" class="o-chip">
|
|
1851
1851
|
${o?this.text:l`<slot></slot>`}
|
|
1852
1852
|
</a>
|
|
@@ -1855,7 +1855,7 @@
|
|
|
1855
1855
|
aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
|
|
1856
1856
|
${o?this.text:l`<slot></slot>`}
|
|
1857
1857
|
</button>
|
|
1858
|
-
`}};A.styles=
|
|
1858
|
+
`}};A.styles=g`
|
|
1859
1859
|
:host {
|
|
1860
1860
|
cursor: pointer;
|
|
1861
1861
|
display: inline-flex;
|
|
@@ -1940,9 +1940,16 @@
|
|
|
1940
1940
|
display: inline-flex;
|
|
1941
1941
|
align-items: center;
|
|
1942
1942
|
}
|
|
1943
|
-
`;U([a({type:String,reflect:!0})],A.prototype,"link",2);U([a({reflect:!0})],A.prototype,"name",2);U([a({reflect:!0})],A.prototype,"value",2);U([a({type:String})],A.prototype,"text",2);U([a({type:String,reflect:!0})],A.prototype,"size",2);U([a({type:Boolean,reflect:!0})],A.prototype,"selected",2);U([a({type:Boolean,reflect:!0})],A.prototype,"fullwidth",2);A=U([x("o-chip")],A);var jo=Object.defineProperty,Uo=Object.getOwnPropertyDescriptor,Ut=(o,t,e,
|
|
1943
|
+
`;U([a({type:String,reflect:!0})],A.prototype,"link",2);U([a({reflect:!0})],A.prototype,"name",2);U([a({reflect:!0})],A.prototype,"value",2);U([a({type:String})],A.prototype,"text",2);U([a({type:String,reflect:!0})],A.prototype,"size",2);U([a({type:Boolean,reflect:!0})],A.prototype,"selected",2);U([a({type:Boolean,reflect:!0})],A.prototype,"fullwidth",2);A=U([x("o-chip")],A);var jo=Object.defineProperty,Uo=Object.getOwnPropertyDescriptor,Ut=(o,t,e,i)=>{for(var r=i>1?void 0:i?Uo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&jo(t,e,r),r};let ct=class extends u{constructor(){super(),this.name="",this.value="",this.addEventListener("click",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`
|
|
1944
1944
|
<slot></slot>
|
|
1945
|
-
`}};
|
|
1945
|
+
`}};ct.styles=g`
|
|
1946
|
+
:host {
|
|
1947
|
+
display: flex;
|
|
1948
|
+
flex-direction: row;
|
|
1949
|
+
flex-wrap: wrap;
|
|
1950
|
+
gap: var(--spacing-s);
|
|
1951
|
+
}
|
|
1952
|
+
`;Ut([a({reflect:!0})],ct.prototype,"name",2);Ut([a({reflect:!0})],ct.prototype,"value",2);ct=Ut([x("o-chipset")],ct);var No=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,K=(o,t,e,i)=>{for(var r=i>1?void 0:i?Fo(t,e):t,n=o.length-1,s;n>=0;n--)(s=o[n])&&(r=(i?s(t,e,r):s(r))||r);return i&&r&&No(t,e,r),r};const Ro=Bt(u);let B=class extends Ro{constructor(){super(...arguments),this.name="",this.value="",this.text="",this.selected=!1,this.disabled=!1,this.fullwidth=!1,this.crossIconName="cross",this.strikethroughImgName="strikeDiagonal"}handleClick(){this.selected=!this.selected}crossIcon(){const o=q[this.crossIconName].replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"').replace(/stroke=[#"'a-z1-9]*/gi,"");return l`<span class="cross-icon">${S(o)}</span>`}strikeThroughImg(){const o=Je[this.strikethroughImgName].replace("<svg",'<svg aria-hidden="true" focusable="false" part="strikethrough"').replace(/stroke=[#"'a-z1-9]*/gi,"");return S(o)}render(){const o=this.text;return l`
|
|
1946
1953
|
<button type="button" class="button" ?disabled=${this.disabled} @click=${this.handleClick}
|
|
1947
1954
|
aria-label=${this.ariaLabel} aria-pressed=${this.selected}>
|
|
1948
1955
|
${o?l`
|
|
@@ -1952,7 +1959,7 @@
|
|
|
1952
1959
|
${this.selected?this.crossIcon():d}
|
|
1953
1960
|
</button>
|
|
1954
1961
|
${this.disabled?this.strikeThroughImg():d}
|
|
1955
|
-
`}};B.styles=
|
|
1962
|
+
`}};B.styles=g`
|
|
1956
1963
|
:host {
|
|
1957
1964
|
cursor: pointer;
|
|
1958
1965
|
display: inline-flex;
|