@florid-kit/components 0.3.7 → 0.3.10

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.
@@ -25,6 +25,7 @@ export declare class OccitaneButton extends buttonBaseClass implements FormSubmi
25
25
  */
26
26
  get form(): HTMLFormElement | null;
27
27
  variant: ButtonVariant;
28
+ customclass: string;
28
29
  disabled: boolean;
29
30
  /**
30
31
  * The URL that the link button points to.
@@ -36,6 +37,7 @@ export declare class OccitaneButton extends buttonBaseClass implements FormSubmi
36
37
  */
37
38
  target: "_blank" | "_parent" | "_self" | "_top" | "";
38
39
  protected willUpdate(): void;
40
+ protected updated(): void;
39
41
  protected render(): import('lit').TemplateResult<1>;
40
42
  private renderLink;
41
43
  private renderButton;
package/index.js CHANGED
@@ -2,21 +2,21 @@
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const V=globalThis,rt=V.ShadowRoot&&(V.ShadyCSS===void 0||V.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,it=Symbol(),lt=new WeakMap;let mt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==it)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(rt&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=lt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&lt.set(e,t))}return t}toString(){return this.cssText}};const _t=i=>new mt(typeof i=="string"?i:i+"",void 0,it),I=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((s,r,n)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[n+1],i[0]);return new mt(e,i,it)},Ct=(i,t)=>{if(rt)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),r=V.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,i.appendChild(s)}},ht=rt?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return _t(e)})(i):i;/**
5
+ */const V=globalThis,rt=V.ShadowRoot&&(V.ShadyCSS===void 0||V.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,it=Symbol(),lt=new WeakMap;let mt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==it)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(rt&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=lt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&lt.set(e,t))}return t}toString(){return this.cssText}};const _t=i=>new mt(typeof i=="string"?i:i+"",void 0,it),I=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((s,r,n)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[n+1],i[0]);return new mt(e,i,it)},Ct=(i,t)=>{if(rt)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),r=V.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,i.appendChild(s)}},ct=rt?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return _t(e)})(i):i;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:Pt,defineProperty:Ot,getOwnPropertyDescriptor:kt,getOwnPropertyNames:Ut,getOwnPropertySymbols:Mt,getPrototypeOf:Tt}=Object,_=globalThis,ct=_.trustedTypes,It=ct?ct.emptyScript:"",K=_.reactiveElementPolyfillSupport,z=(i,t)=>i,q={toAttribute(i,t){switch(t){case Boolean:i=i?It:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},ot=(i,t)=>!Pt(i,t),dt={attribute:!0,type:String,converter:q,reflect:!1,useDefault:!1,hasChanged:ot};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),_.litPropertyMetadata??(_.litPropertyMetadata=new WeakMap);let U=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=dt){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 s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&Ot(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){const{get:r,set:n}=kt(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:r,set(o){const l=r==null?void 0:r.call(this);n==null||n.call(this,o),this.requestUpdate(t,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??dt}static _$Ei(){if(this.hasOwnProperty(z("elementProperties")))return;const t=Tt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(z("properties"))){const e=this.properties,s=[...Ut(e),...Mt(e)];for(const r of s)this.createProperty(r,e[r])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const r of s)e.unshift(ht(r))}else t!==void 0&&e.push(ht(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s: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 s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ct(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 s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;const s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){const o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:q).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){var n,o;const s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const l=s.getPropertyOptions(r),a=typeof l.converter=="function"?{fromAttribute:l.converter}:((n=l.converter)==null?void 0:n.fromAttribute)!==void 0?l.converter:q;this._$Em=r,this[r]=a.fromAttribute(e,l.type)??((o=this._$Ej)==null?void 0:o.get(r))??null,this._$Em=null}}requestUpdate(t,e,s){var r;if(t!==void 0){const n=this.constructor,o=this[t];if(s??(s=n.getPropertyOptions(t)),!((s.hasChanged??ot)(o,e)||s.useDefault&&s.reflect&&o===((r=this._$Ej)==null?void 0:r.get(t))&&!this.hasAttribute(n._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:n},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,o??e??this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(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 s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[n,o]of r){const{wrapped:l}=o,a=this[n];l!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,o,a)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.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(s=>{var r;return(r=s.hostUpdated)==null?void 0:r.call(s)}),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){}};U.elementStyles=[],U.shadowRootOptions={mode:"open"},U[z("elementProperties")]=new Map,U[z("finalized")]=new Map,K==null||K({ReactiveElement:U}),(_.reactiveElementVersions??(_.reactiveElementVersions=[])).push("2.1.0");/**
9
+ */const{is:Pt,defineProperty:Ot,getOwnPropertyDescriptor:kt,getOwnPropertyNames:Ut,getOwnPropertySymbols:Mt,getPrototypeOf:Tt}=Object,_=globalThis,ht=_.trustedTypes,It=ht?ht.emptyScript:"",K=_.reactiveElementPolyfillSupport,z=(i,t)=>i,q={toAttribute(i,t){switch(t){case Boolean:i=i?It:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},ot=(i,t)=>!Pt(i,t),dt={attribute:!0,type:String,converter:q,reflect:!1,useDefault:!1,hasChanged:ot};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),_.litPropertyMetadata??(_.litPropertyMetadata=new WeakMap);let U=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=dt){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 s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&Ot(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){const{get:r,set:n}=kt(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:r,set(o){const l=r==null?void 0:r.call(this);n==null||n.call(this,o),this.requestUpdate(t,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??dt}static _$Ei(){if(this.hasOwnProperty(z("elementProperties")))return;const t=Tt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(z("properties"))){const e=this.properties,s=[...Ut(e),...Mt(e)];for(const r of s)this.createProperty(r,e[r])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const r of s)e.unshift(ct(r))}else t!==void 0&&e.push(ct(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s: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 s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ct(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 s;return(s=e.hostConnected)==null?void 0:s.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var s;return(s=e.hostDisconnected)==null?void 0:s.call(e)})}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){var n;const s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){const o=(((n=s.converter)==null?void 0:n.toAttribute)!==void 0?s.converter:q).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){var n,o;const s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const l=s.getPropertyOptions(r),a=typeof l.converter=="function"?{fromAttribute:l.converter}:((n=l.converter)==null?void 0:n.fromAttribute)!==void 0?l.converter:q;this._$Em=r,this[r]=a.fromAttribute(e,l.type)??((o=this._$Ej)==null?void 0:o.get(r))??null,this._$Em=null}}requestUpdate(t,e,s){var r;if(t!==void 0){const n=this.constructor,o=this[t];if(s??(s=n.getPropertyOptions(t)),!((s.hasChanged??ot)(o,e)||s.useDefault&&s.reflect&&o===((r=this._$Ej)==null?void 0:r.get(t))&&!this.hasAttribute(n._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:n},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,o??e??this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(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 s;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[n,o]of r){const{wrapped:l}=o,a=this[n];l!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,o,a)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.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(s=>{var r;return(r=s.hostUpdated)==null?void 0:r.call(s)}),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){}};U.elementStyles=[],U.shadowRootOptions={mode:"open"},U[z("elementProperties")]=new Map,U[z("finalized")]=new Map,K==null||K({ReactiveElement:U}),(_.reactiveElementVersions??(_.reactiveElementVersions=[])).push("2.1.0");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const B=globalThis,W=B.trustedTypes,ut=W?W.createPolicy("lit-html",{createHTML:i=>i}):void 0,wt="$lit$",m=`lit$${Math.random().toFixed(9).slice(2)}$`,At="?"+m,Ht=`<${At}>`,C=document,N=()=>C.createComment(""),L=i=>i===null||typeof i!="object"&&typeof i!="function",nt=Array.isArray,zt=i=>nt(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",X=`[
14
- \f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pt=/-->/g,ft=/>/g,x=RegExp(`>|${X}(?:([^\\s"'>=/]+)(${X}*=${X}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),gt=/'/g,bt=/"/g,xt=/^(?:script|style|textarea|title)$/i,Bt=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),g=Bt(1),P=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),vt=new WeakMap,E=C.createTreeWalker(C,129);function Et(i,t){if(!nt(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ut!==void 0?ut.createHTML(t):t}const Nt=(i,t)=>{const e=i.length-1,s=[];let r,n=t===2?"<svg>":t===3?"<math>":"",o=H;for(let l=0;l<e;l++){const a=i[l];let u,p,h=-1,v=0;for(;v<a.length&&(o.lastIndex=v,p=o.exec(a),p!==null);)v=o.lastIndex,o===H?p[1]==="!--"?o=pt:p[1]!==void 0?o=ft:p[2]!==void 0?(xt.test(p[2])&&(r=RegExp("</"+p[2],"g")),o=x):p[3]!==void 0&&(o=x):o===x?p[0]===">"?(o=r??H,h=-1):p[1]===void 0?h=-2:(h=o.lastIndex-p[2].length,u=p[1],o=p[3]===void 0?x:p[3]==='"'?bt:gt):o===bt||o===gt?o=x:o===pt||o===ft?o=H:(o=x,r=void 0);const y=o===x&&i[l+1].startsWith("/>")?" ":"";n+=o===H?a+Ht:h>=0?(s.push(u),a.slice(0,h)+wt+a.slice(h)+m+y):a+m+(h===-2?l:y)}return[Et(i,n+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class D{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let n=0,o=0;const l=t.length-1,a=this.parts,[u,p]=Nt(t,e);if(this.el=D.createElement(u,s),E.currentNode=this.el.content,e===2||e===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=E.nextNode())!==null&&a.length<l;){if(r.nodeType===1){if(r.hasAttributes())for(const h of r.getAttributeNames())if(h.endsWith(wt)){const v=p[o++],y=r.getAttribute(h).split(m),j=/([.?@])?(.*)/.exec(v);a.push({type:1,index:n,name:j[2],strings:y,ctor:j[1]==="."?Dt:j[1]==="?"?Rt:j[1]==="@"?jt:F}),r.removeAttribute(h)}else h.startsWith(m)&&(a.push({type:6,index:n}),r.removeAttribute(h));if(xt.test(r.tagName)){const h=r.textContent.split(m),v=h.length-1;if(v>0){r.textContent=W?W.emptyScript:"";for(let y=0;y<v;y++)r.append(h[y],N()),E.nextNode(),a.push({type:2,index:++n});r.append(h[v],N())}}}else if(r.nodeType===8)if(r.data===At)a.push({type:2,index:n});else{let h=-1;for(;(h=r.data.indexOf(m,h+1))!==-1;)a.push({type:7,index:n}),h+=m.length-1}n++}}static createElement(t,e){const s=C.createElement("template");return s.innerHTML=t,s}}function M(i,t,e=i,s){var o,l;if(t===P)return t;let r=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=L(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((l=r==null?void 0:r._$AO)==null||l.call(r,!1),n===void 0?r=void 0:(r=new n(i),r._$AT(i,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=r:e._$Cl=r),r!==void 0&&(t=M(i,r._$AS(i,t.values),r,s)),t}class Lt{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:s}=this._$AD,r=((t==null?void 0:t.creationScope)??C).importNode(e,!0);E.currentNode=r;let n=E.nextNode(),o=0,l=0,a=s[0];for(;a!==void 0;){if(o===a.index){let u;a.type===2?u=new R(n,n.nextSibling,this,t):a.type===1?u=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(u=new Vt(n,this,t)),this._$AV.push(u),a=s[++l]}o!==(a==null?void 0:a.index)&&(n=E.nextNode(),o++)}return E.currentNode=C,r}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class R{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,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=M(this,t,e),L(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==P&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):zt(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&&L(this._$AH)?this._$AA.nextSibling.data=t:this.T(C.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=D.createElement(Et(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===r)this._$AH.p(e);else{const o=new Lt(r,this),l=o.u(this.options);o.p(e),this.T(l),this._$AH=o}}_$AC(t){let e=vt.get(t.strings);return e===void 0&&vt.set(t.strings,e=new D(t)),e}k(t){nt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,r=0;for(const n of t)r===e.length?e.push(s=new R(this.O(N()),this.O(N()),this,this.options)):s=e[r],s._$AI(n),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.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 F{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,r){const n=this.strings;let o=!1;if(n===void 0)t=M(this,t,e,0),o=!L(t)||t!==this._$AH&&t!==P,o&&(this._$AH=t);else{const l=t;let a,u;for(t=n[0],a=0;a<n.length-1;a++)u=M(this,l[s+a],e,a),u===P&&(u=this._$AH[a]),o||(o=!L(u)||u!==this._$AH[a]),u===d?t=d:t!==d&&(t+=(u??"")+n[a+1]),this._$AH[a]=u}o&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Dt extends F{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class Rt extends F{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class jt extends F{constructor(t,e,s,r,n){super(t,e,s,r,n),this.type=5}_$AI(t,e=this){if((t=M(this,t,e,0)??d)===P)return;const s=this._$AH,r=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==d&&(s===d||r);r&&this.element.removeEventListener(this.name,this,s),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 Vt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const G=B.litHtmlPolyfillSupport;G==null||G(D,R),(B.litHtmlVersions??(B.litHtmlVersions=[])).push("3.3.0");const qt=(i,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let r=s._$litPart$;if(r===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=r=new R(t.insertBefore(N(),n),n,void 0,e??{})}return r._$AI(i),r};/**
13
+ */const B=globalThis,W=B.trustedTypes,ut=W?W.createPolicy("lit-html",{createHTML:i=>i}):void 0,wt="$lit$",m=`lit$${Math.random().toFixed(9).slice(2)}$`,At="?"+m,Ht=`<${At}>`,P=document,L=()=>P.createComment(""),N=i=>i===null||typeof i!="object"&&typeof i!="function",nt=Array.isArray,zt=i=>nt(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",X=`[
14
+ \f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pt=/-->/g,bt=/>/g,E=RegExp(`>|${X}(?:([^\\s"'>=/]+)(${X}*=${X}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),ft=/'/g,gt=/"/g,xt=/^(?:script|style|textarea|title)$/i,Bt=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),f=Bt(1),O=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),vt=new WeakMap,S=P.createTreeWalker(P,129);function Et(i,t){if(!nt(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ut!==void 0?ut.createHTML(t):t}const Lt=(i,t)=>{const e=i.length-1,s=[];let r,n=t===2?"<svg>":t===3?"<math>":"",o=H;for(let l=0;l<e;l++){const a=i[l];let u,p,c=-1,v=0;for(;v<a.length&&(o.lastIndex=v,p=o.exec(a),p!==null);)v=o.lastIndex,o===H?p[1]==="!--"?o=pt:p[1]!==void 0?o=bt:p[2]!==void 0?(xt.test(p[2])&&(r=RegExp("</"+p[2],"g")),o=E):p[3]!==void 0&&(o=E):o===E?p[0]===">"?(o=r??H,c=-1):p[1]===void 0?c=-2:(c=o.lastIndex-p[2].length,u=p[1],o=p[3]===void 0?E:p[3]==='"'?gt:ft):o===gt||o===ft?o=E:o===pt||o===bt?o=H:(o=E,r=void 0);const y=o===E&&i[l+1].startsWith("/>")?" ":"";n+=o===H?a+Ht:c>=0?(s.push(u),a.slice(0,c)+wt+a.slice(c)+m+y):a+m+(c===-2?l:y)}return[Et(i,n+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class D{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let n=0,o=0;const l=t.length-1,a=this.parts,[u,p]=Lt(t,e);if(this.el=D.createElement(u,s),S.currentNode=this.el.content,e===2||e===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(r=S.nextNode())!==null&&a.length<l;){if(r.nodeType===1){if(r.hasAttributes())for(const c of r.getAttributeNames())if(c.endsWith(wt)){const v=p[o++],y=r.getAttribute(c).split(m),j=/([.?@])?(.*)/.exec(v);a.push({type:1,index:n,name:j[2],strings:y,ctor:j[1]==="."?Dt:j[1]==="?"?Rt:j[1]==="@"?jt:F}),r.removeAttribute(c)}else c.startsWith(m)&&(a.push({type:6,index:n}),r.removeAttribute(c));if(xt.test(r.tagName)){const c=r.textContent.split(m),v=c.length-1;if(v>0){r.textContent=W?W.emptyScript:"";for(let y=0;y<v;y++)r.append(c[y],L()),S.nextNode(),a.push({type:2,index:++n});r.append(c[v],L())}}}else if(r.nodeType===8)if(r.data===At)a.push({type:2,index:n});else{let c=-1;for(;(c=r.data.indexOf(m,c+1))!==-1;)a.push({type:7,index:n}),c+=m.length-1}n++}}static createElement(t,e){const s=P.createElement("template");return s.innerHTML=t,s}}function M(i,t,e=i,s){var o,l;if(t===O)return t;let r=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=N(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((l=r==null?void 0:r._$AO)==null||l.call(r,!1),n===void 0?r=void 0:(r=new n(i),r._$AT(i,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=r:e._$Cl=r),r!==void 0&&(t=M(i,r._$AS(i,t.values),r,s)),t}class Nt{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:s}=this._$AD,r=((t==null?void 0:t.creationScope)??P).importNode(e,!0);S.currentNode=r;let n=S.nextNode(),o=0,l=0,a=s[0];for(;a!==void 0;){if(o===a.index){let u;a.type===2?u=new R(n,n.nextSibling,this,t):a.type===1?u=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(u=new Vt(n,this,t)),this._$AV.push(u),a=s[++l]}o!==(a==null?void 0:a.index)&&(n=S.nextNode(),o++)}return S.currentNode=P,r}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class R{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,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=M(this,t,e),N(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==O&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):zt(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&&N(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=D.createElement(Et(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===r)this._$AH.p(e);else{const o=new Nt(r,this),l=o.u(this.options);o.p(e),this.T(l),this._$AH=o}}_$AC(t){let e=vt.get(t.strings);return e===void 0&&vt.set(t.strings,e=new D(t)),e}k(t){nt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,r=0;for(const n of t)r===e.length?e.push(s=new R(this.O(L()),this.O(L()),this,this.options)):s=e[r],s._$AI(n),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.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 F{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,r){const n=this.strings;let o=!1;if(n===void 0)t=M(this,t,e,0),o=!N(t)||t!==this._$AH&&t!==O,o&&(this._$AH=t);else{const l=t;let a,u;for(t=n[0],a=0;a<n.length-1;a++)u=M(this,l[s+a],e,a),u===O&&(u=this._$AH[a]),o||(o=!N(u)||u!==this._$AH[a]),u===d?t=d:t!==d&&(t+=(u??"")+n[a+1]),this._$AH[a]=u}o&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Dt extends F{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class Rt extends F{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class jt extends F{constructor(t,e,s,r,n){super(t,e,s,r,n),this.type=5}_$AI(t,e=this){if((t=M(this,t,e,0)??d)===O)return;const s=this._$AH,r=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==d&&(s===d||r);r&&this.element.removeEventListener(this.name,this,s),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 Vt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const G=B.litHtmlPolyfillSupport;G==null||G(D,R),(B.litHtmlVersions??(B.litHtmlVersions=[])).push("3.3.0");const qt=(i,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let r=s._$litPart$;if(r===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=r=new R(t.insertBefore(L(),n),n,void 0,e??{})}return r._$AI(i),r};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */const S=globalThis;let w=class extends U{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=qt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return P}};var yt;w._$litElement$=!0,w.finalized=!0,(yt=S.litElementHydrateSupport)==null||yt.call(S,{LitElement:w});const Q=S.litElementPolyfillSupport;Q==null||Q({LitElement:w});(S.litElementVersions??(S.litElementVersions=[])).push("4.2.0");/**
19
+ */const C=globalThis;let w=class extends U{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=qt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return O}};var yt;w._$litElement$=!0,w.finalized=!0,(yt=C.litElementHydrateSupport)==null||yt.call(C,{LitElement:w});const Q=C.litElementPolyfillSupport;Q==null||Q({LitElement:w});(C.litElementVersions??(C.litElementVersions=[])).push("4.2.0");/**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * 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 Wt={attribute:!0,type:String,converter:q,reflect:!1,hasChanged:ot},Ft=(i=Wt,t,e)=>{const{kind:s,metadata:r}=e;let n=globalThis.litPropertyMetadata.get(r);if(n===void 0&&globalThis.litPropertyMetadata.set(r,n=new Map),s==="setter"&&((i=Object.create(i)).wrapped=!0),n.set(e.name,i),s==="accessor"){const{name:o}=e;return{set(l){const a=t.get.call(this);t.set.call(this,l),this.requestUpdate(o,a,i)},init(l){return l!==void 0&&this.C(o,void 0,i,l),l}}}if(s==="setter"){const{name:o}=e;return function(l){const a=this[o];t.call(this,l),this.requestUpdate(o,a,i)}}throw Error("Unsupported decorator location: "+s)};function c(i){return(t,e)=>typeof e=="object"?Ft(i,t,e):((s,r,n)=>{const o=r.hasOwnProperty(n);return r.constructor.createProperty(n,s),o?Object.getOwnPropertyDescriptor(r,n):void 0})(i,t,e)}const Zt=I`
27
+ */const Wt={attribute:!0,type:String,converter:q,reflect:!1,hasChanged:ot},Ft=(i=Wt,t,e)=>{const{kind:s,metadata:r}=e;let n=globalThis.litPropertyMetadata.get(r);if(n===void 0&&globalThis.litPropertyMetadata.set(r,n=new Map),s==="setter"&&((i=Object.create(i)).wrapped=!0),n.set(e.name,i),s==="accessor"){const{name:o}=e;return{set(l){const a=t.get.call(this);t.set.call(this,l),this.requestUpdate(o,a,i)},init(l){return l!==void 0&&this.C(o,void 0,i,l),l}}}if(s==="setter"){const{name:o}=e;return function(l){const a=this[o];t.call(this,l),this.requestUpdate(o,a,i)}}throw Error("Unsupported decorator location: "+s)};function h(i){return(t,e)=>typeof e=="object"?Ft(i,t,e):((s,r,n)=>{const o=r.hasOwnProperty(n);return r.constructor.createProperty(n,s),o?Object.getOwnPropertyDescriptor(r,n):void 0})(i,t,e)}const Zt=I`
28
28
  outline: 1px dashed var(--button-border-color);
29
29
  outline-offset: 2px;
30
30
  outline: dashed black;
@@ -40,7 +40,7 @@
40
40
  * @license
41
41
  * Copyright 2023 Google LLC
42
42
  * SPDX-License-Identifier: Apache-2.0
43
- */function Kt(i){i.addInitializer(t=>{const e=t;e.addEventListener("click",async s=>{const{type:r,[at]:n}=e,{form:o}=n;if(!(!o||r==="button")&&(await new Promise(l=>{setTimeout(l)}),!s.defaultPrevented)){if(r==="reset"){o.reset();return}o.addEventListener("submit",l=>{Object.defineProperty(l,"submitter",{configurable:!0,enumerable:!0,get:()=>e})},{capture:!0,once:!0}),n.setFormValue(e.value),o.requestSubmit()}})})}var Xt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,O=(i,t,e,s)=>{for(var r=s>1?void 0:s?Gt(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&Xt(t,e,r),r};const Qt=Jt(w),$t=i=>{const t=`
43
+ */function Kt(i){i.addInitializer(t=>{const e=t;e.addEventListener("click",async s=>{const{type:r,[at]:n}=e,{form:o}=n;if(!(!o||r==="button")&&(await new Promise(l=>{setTimeout(l)}),!s.defaultPrevented)){if(r==="reset"){o.reset();return}o.addEventListener("submit",l=>{Object.defineProperty(l,"submitter",{configurable:!0,enumerable:!0,get:()=>e})},{capture:!0,once:!0}),n.setFormValue(e.value),o.requestSubmit()}})})}var Xt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,A=(i,t,e,s)=>{for(var r=s>1?void 0:s?Gt(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&Xt(t,e,r),r};const Qt=Jt(w),$t=i=>{const t=`
44
44
  --button-bg-disabled: var(--color-container-disabled);
45
45
  --button-bg-pressed: var(--color-container-action-${i}-pressed);
46
46
  --button-bg-hover: var(--color-container-action-${i}-hover);
@@ -53,11 +53,11 @@
53
53
  --button-text-disabled: var(--color-content-disabled);
54
54
  --button-text-hover: var(--color-content-action-${i});
55
55
  --button-text: var(--color-content-action-${i});
56
- `;return _t(t)},Yt=["primary","secondary"];let f=class extends Qt{constructor(){super(...arguments),this.type="submit",this.value="",this.variant="primary",this.disabled=!1,this.href="",this.target=""}get name(){return this.getAttribute("name")??""}set name(i){this.setAttribute("name",i)}get form(){return this[at].form}willUpdate(){const i=getComputedStyle(this).getPropertyValue("--button-variant");i&&Yt.some(t=>t===i)&&(this.variant=i)}render(){const i=this.href?this.renderLink():this.renderButton();return g`${i}`}renderLink(){return g`<a href=${this.href} target=${this.target||d} class="button" ?disabled=${this.disabled}>
56
+ `;return _t(t)},Yt=["primary","secondary"];let b=class extends Qt{constructor(){super(...arguments),this.type="submit",this.value="",this.variant="primary",this.customclass="",this.disabled=!1,this.href="",this.target=""}get name(){return this.getAttribute("name")??""}set name(i){this.setAttribute("name",i)}get form(){return this[at].form}willUpdate(){const i=getComputedStyle(this).getPropertyValue("--button-variant");i&&Yt.some(t=>t===i)&&(this.variant=i)}updated(){if(this.customclass){const i=this.customclass.split(" ").map(t=>t.trim()).filter(Boolean);this.classList.add(...i)}}render(){const i=this.href?this.renderLink():this.renderButton();return f`${i}`}renderLink(){return f`<a href=${this.href} target=${this.target||d} class="button" ?disabled=${this.disabled}>
57
57
  <slot />
58
- </a>`}renderButton(){return g`<button class="button" ?disabled=${this.disabled}>
58
+ </a>`}renderButton(){return f`<button class="button" ?disabled=${this.disabled}>
59
59
  <slot />
60
- </button>`}};Kt(f);f.formAssociated=!0;f.styles=I`
60
+ </button>`}};Kt(b);b.formAssociated=!0;b.styles=I`
61
61
  :host {
62
62
  display: inline-flex;
63
63
  cursor: pointer;
@@ -65,11 +65,15 @@
65
65
  --button-border: transparent;
66
66
  }
67
67
 
68
+ :host(.full) {
69
+ width: 100%;
70
+ }
71
+
68
72
  :host([variant="secondary"]) {
69
73
  ${$t("secondary")};
70
74
  }
71
75
 
72
- :host([disabled]) {
76
+ :host([disabled]), :host([aria-disabled="true"]), :host([aria-disabled="true"]):hover {
73
77
  --button-bg: var(--button-bg-disabled);
74
78
  --button-text: var(--button-text-disabled);
75
79
  --button-border: transparent;
@@ -81,6 +85,12 @@
81
85
  --button-border: var(--button-border);
82
86
  }
83
87
 
88
+ :host([aria-disabled="true"]) button:hover {
89
+ background-color: var(--button-bg-disabled);
90
+ color: var(--button-text-disabled);
91
+ border-color: transparent;
92
+ }
93
+
84
94
  .button {
85
95
  -webkit-appearance: none;
86
96
  align-items: center;
@@ -129,7 +139,7 @@
129
139
  .button:focus-visible {
130
140
  ${Zt};
131
141
  }
132
- `;O([c()],f.prototype,"type",2);O([c({reflect:!0})],f.prototype,"value",2);O([c({reflect:!0})],f.prototype,"variant",2);O([c({converter:{fromAttribute:i=>i===""||i==="true"}})],f.prototype,"disabled",2);O([c()],f.prototype,"href",2);O([c()],f.prototype,"target",2);f=O([Z("o-button")],f);/**
142
+ `;A([h()],b.prototype,"type",2);A([h({reflect:!0})],b.prototype,"value",2);A([h({reflect:!0})],b.prototype,"variant",2);A([h({type:String})],b.prototype,"customclass",2);A([h({converter:{fromAttribute:i=>i===""||i==="true"}})],b.prototype,"disabled",2);A([h()],b.prototype,"href",2);A([h()],b.prototype,"target",2);b=A([Z("o-button")],b);/**
133
143
  * @license
134
144
  * Copyright 2017 Google LLC
135
145
  * SPDX-License-Identifier: BSD-3-Clause
@@ -137,7 +147,7 @@
137
147
  * @license
138
148
  * Copyright 2017 Google LLC
139
149
  * SPDX-License-Identifier: BSD-3-Clause
140
- */class tt extends se{constructor(t){if(super(t),this.it=d,t.type!==te.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===P)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:[]}}}tt.directiveName="unsafeHTML",tt.resultType=1;/**
150
+ */class tt extends se{constructor(t){if(super(t),this.it=d,t.type!==te.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===O)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:[]}}}tt.directiveName="unsafeHTML",tt.resultType=1;/**
141
151
  * @license
142
152
  * Copyright 2017 Google LLC
143
153
  * SPDX-License-Identifier: BSD-3-Clause
@@ -153,7 +163,7 @@
153
163
  `,ne=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
154
164
  <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"/>
155
165
  </svg>
156
- `,St={wishlist:re,playerv:ie,chevronRight:oe,chevronLeft:ne};var ae=Object.defineProperty,le=Object.getOwnPropertyDescriptor,J=(i,t,e,s)=>{for(var r=s>1?void 0:s?le(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&ae(t,e,r),r};let T=class extends w{constructor(){super(...arguments),this.status="empty",this.ariaDescribedBy="a-product-name",this.label="Add to wishlist"}render(){const i=St.wishlist.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return g`
166
+ `,St={wishlist:re,playerv:ie,chevronRight:oe,chevronLeft:ne};var ae=Object.defineProperty,le=Object.getOwnPropertyDescriptor,J=(i,t,e,s)=>{for(var r=s>1?void 0:s?le(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&ae(t,e,r),r};let T=class extends w{constructor(){super(...arguments),this.status="empty",this.ariaDescribedBy="a-product-name",this.label="Add to wishlist"}render(){const i=St.wishlist.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return f`
157
167
  <button
158
168
  type="button"
159
169
  aria-label="${this.label}"
@@ -219,12 +229,12 @@
219
229
  :host([status="filled"]) .wishlist-button:hover svg path {
220
230
  fill: var(--color-alpha-light-strong);
221
231
  }
222
- `;J([c({type:String,reflect:!0})],T.prototype,"status",2);J([c({type:String,reflect:!0})],T.prototype,"ariaDescribedBy",2);J([c({type:String,reflect:!0})],T.prototype,"label",2);T=J([Z("o-wishlist-button")],T);var he=Object.defineProperty,ce=Object.getOwnPropertyDescriptor,A=(i,t,e,s)=>{for(var r=s>1?void 0:s?ce(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&he(t,e,r),r};let b=class extends w{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}updated(i){super.updated(i),this.style.setProperty("--icon-stroke-width",this.strokewidth)}render(){const i=St[this.icon]??"",t=`icon-${this.icon}`,e=i.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return g`
223
- ${this.type==="span"?g`
232
+ `;J([h({type:String,reflect:!0})],T.prototype,"status",2);J([h({type:String,reflect:!0})],T.prototype,"ariaDescribedBy",2);J([h({type:String,reflect:!0})],T.prototype,"label",2);T=J([Z("o-wishlist-button")],T);var ce=Object.defineProperty,he=Object.getOwnPropertyDescriptor,x=(i,t,e,s)=>{for(var r=s>1?void 0:s?he(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&ce(t,e,r),r};let g=class extends w{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}updated(i){super.updated(i),this.style.setProperty("--icon-stroke-width",this.strokewidth)}render(){const i=St[this.icon]??"",t=`icon-${this.icon}`,e=i.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return f`
233
+ ${this.type==="span"?f`
224
234
  <span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
225
235
  ${st(e)}
226
236
  </span>
227
- `:g`
237
+ `:f`
228
238
  <button
229
239
  type="button"
230
240
  aria-label="icon"
@@ -234,7 +244,7 @@
234
244
  ${st(e)}
235
245
  </button>
236
246
  `}
237
- `}};b.styles=I`
247
+ `}};g.styles=I`
238
248
  :host {
239
249
  display: inline-flex;
240
250
  justify-content: center;
@@ -391,9 +401,9 @@
391
401
  }
392
402
 
393
403
  }
394
- `;A([c({type:String,reflect:!0})],b.prototype,"bgstyle",2);A([c({type:String,reflect:!0})],b.prototype,"size",2);A([c({type:String,reflect:!0})],b.prototype,"status",2);A([c({type:String,reflect:!0})],b.prototype,"type",2);A([c({type:String})],b.prototype,"strokewidth",2);A([c({type:String})],b.prototype,"icon",2);A([c({type:Boolean,reflect:!0})],b.prototype,"disabled",2);b=A([Z("o-icon-button")],b);var de=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,k=(i,t,e,s)=>{for(var r=s>1?void 0:s?ue(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&de(t,e,r),r};let $=class extends w{constructor(){super(...arguments),this.href="",this.target="",this.template="standard",this.inverse=!1,this.endIcon=!1,this.reverseEndIcon=!1}render(){return g`
404
+ `;x([h({type:String,reflect:!0})],g.prototype,"bgstyle",2);x([h({type:String,reflect:!0})],g.prototype,"size",2);x([h({type:String,reflect:!0})],g.prototype,"status",2);x([h({type:String,reflect:!0})],g.prototype,"type",2);x([h({type:String})],g.prototype,"strokewidth",2);x([h({type:String})],g.prototype,"icon",2);x([h({type:Boolean,reflect:!0})],g.prototype,"disabled",2);g=x([Z("o-icon-button")],g);var de=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,k=(i,t,e,s)=>{for(var r=s>1?void 0:s?ue(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&de(t,e,r),r};let $=class extends w{constructor(){super(...arguments),this.href="",this.target="",this.template="standard",this.inverse=!1,this.endIcon=!1,this.reverseEndIcon=!1}render(){return f`
395
405
  <a href="${this.href}" target="${this.target}">
396
- ${this.endIcon&&this.reverseEndIcon?g`
406
+ ${this.endIcon&&this.reverseEndIcon?f`
397
407
  <o-icon-button
398
408
  icon="chevronLeft"
399
409
  bgstyle="${this.inverse?"none-light":"none-contrast"}"
@@ -403,7 +413,7 @@
403
413
  ></o-icon-button>
404
414
  `:null}
405
415
  <span class="link-text"><slot></slot></span>
406
- ${this.endIcon&&!this.reverseEndIcon?g`
416
+ ${this.endIcon&&!this.reverseEndIcon?f`
407
417
  <o-icon-button
408
418
  icon="chevronRight"
409
419
  bgstyle="${this.inverse?"none-light":"none-contrast"}"
@@ -510,4 +520,4 @@
510
520
  opacity: 0;
511
521
  }
512
522
  /* End of underline effect */
513
- `;k([c({type:String})],$.prototype,"href",2);k([c({type:String})],$.prototype,"target",2);k([c({type:String,reflect:!0})],$.prototype,"template",2);k([c({type:Boolean,reflect:!0})],$.prototype,"inverse",2);k([c({type:Boolean,reflect:!0})],$.prototype,"endIcon",2);k([c({type:Boolean,reflect:!0})],$.prototype,"reverseEndIcon",2);$=k([Z("o-link")],$);
523
+ `;k([h({type:String})],$.prototype,"href",2);k([h({type:String})],$.prototype,"target",2);k([h({type:String,reflect:!0})],$.prototype,"template",2);k([h({type:Boolean,reflect:!0})],$.prototype,"inverse",2);k([h({type:Boolean,reflect:!0})],$.prototype,"endIcon",2);k([h({type:Boolean,reflect:!0})],$.prototype,"reverseEndIcon",2);$=k([Z("o-link")],$);
package/index.mjs CHANGED
@@ -282,21 +282,21 @@ U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[z("elementProper
282
282
  * Copyright 2017 Google LLC
283
283
  * SPDX-License-Identifier: BSD-3-Clause
284
284
  */
285
- const B = globalThis, W = B.trustedTypes, ut = W ? W.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, wt = "$lit$", m = `lit$${Math.random().toFixed(9).slice(2)}$`, At = "?" + m, Ht = `<${At}>`, C = document, N = () => C.createComment(""), L = (i) => i === null || typeof i != "object" && typeof i != "function", nt = Array.isArray, zt = (i) => nt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", X = `[
286
- \f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, pt = /-->/g, ft = />/g, x = RegExp(`>|${X}(?:([^\\s"'>=/]+)(${X}*=${X}*(?:[^
287
- \f\r"'\`<>=]|("|')|))|$)`, "g"), gt = /'/g, bt = /"/g, xt = /^(?:script|style|textarea|title)$/i, Bt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), g = Bt(1), P = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), vt = /* @__PURE__ */ new WeakMap(), E = C.createTreeWalker(C, 129);
285
+ const B = globalThis, W = B.trustedTypes, ut = W ? W.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, wt = "$lit$", m = `lit$${Math.random().toFixed(9).slice(2)}$`, At = "?" + m, Ht = `<${At}>`, P = document, L = () => P.createComment(""), N = (i) => i === null || typeof i != "object" && typeof i != "function", nt = Array.isArray, zt = (i) => nt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", X = `[
286
+ \f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, pt = /-->/g, bt = />/g, E = RegExp(`>|${X}(?:([^\\s"'>=/]+)(${X}*=${X}*(?:[^
287
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ft = /'/g, gt = /"/g, xt = /^(?:script|style|textarea|title)$/i, Bt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), f = Bt(1), O = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), vt = /* @__PURE__ */ new WeakMap(), S = P.createTreeWalker(P, 129);
288
288
  function Et(i, t) {
289
289
  if (!nt(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
290
290
  return ut !== void 0 ? ut.createHTML(t) : t;
291
291
  }
292
- const Nt = (i, t) => {
292
+ const Lt = (i, t) => {
293
293
  const e = i.length - 1, s = [];
294
294
  let r, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = H;
295
295
  for (let l = 0; l < e; l++) {
296
296
  const a = i[l];
297
297
  let u, p, h = -1, v = 0;
298
- for (; v < a.length && (o.lastIndex = v, p = o.exec(a), p !== null); ) v = o.lastIndex, o === H ? p[1] === "!--" ? o = pt : p[1] !== void 0 ? o = ft : p[2] !== void 0 ? (xt.test(p[2]) && (r = RegExp("</" + p[2], "g")), o = x) : p[3] !== void 0 && (o = x) : o === x ? p[0] === ">" ? (o = r ?? H, h = -1) : p[1] === void 0 ? h = -2 : (h = o.lastIndex - p[2].length, u = p[1], o = p[3] === void 0 ? x : p[3] === '"' ? bt : gt) : o === bt || o === gt ? o = x : o === pt || o === ft ? o = H : (o = x, r = void 0);
299
- const y = o === x && i[l + 1].startsWith("/>") ? " " : "";
298
+ for (; v < a.length && (o.lastIndex = v, p = o.exec(a), p !== null); ) v = o.lastIndex, o === H ? p[1] === "!--" ? o = pt : p[1] !== void 0 ? o = bt : p[2] !== void 0 ? (xt.test(p[2]) && (r = RegExp("</" + p[2], "g")), o = E) : p[3] !== void 0 && (o = E) : o === E ? p[0] === ">" ? (o = r ?? H, h = -1) : p[1] === void 0 ? h = -2 : (h = o.lastIndex - p[2].length, u = p[1], o = p[3] === void 0 ? E : p[3] === '"' ? gt : ft) : o === gt || o === ft ? o = E : o === pt || o === bt ? o = H : (o = E, r = void 0);
299
+ const y = o === E && i[l + 1].startsWith("/>") ? " " : "";
300
300
  n += o === H ? a + Ht : h >= 0 ? (s.push(u), a.slice(0, h) + wt + a.slice(h) + m + y) : a + m + (h === -2 ? l : y);
301
301
  }
302
302
  return [Et(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
@@ -306,12 +306,12 @@ class D {
306
306
  let r;
307
307
  this.parts = [];
308
308
  let n = 0, o = 0;
309
- const l = t.length - 1, a = this.parts, [u, p] = Nt(t, e);
310
- if (this.el = D.createElement(u, s), E.currentNode = this.el.content, e === 2 || e === 3) {
309
+ const l = t.length - 1, a = this.parts, [u, p] = Lt(t, e);
310
+ if (this.el = D.createElement(u, s), S.currentNode = this.el.content, e === 2 || e === 3) {
311
311
  const h = this.el.content.firstChild;
312
312
  h.replaceWith(...h.childNodes);
313
313
  }
314
- for (; (r = E.nextNode()) !== null && a.length < l; ) {
314
+ for (; (r = S.nextNode()) !== null && a.length < l; ) {
315
315
  if (r.nodeType === 1) {
316
316
  if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(wt)) {
317
317
  const v = p[o++], y = r.getAttribute(h).split(m), j = /([.?@])?(.*)/.exec(v);
@@ -321,8 +321,8 @@ class D {
321
321
  const h = r.textContent.split(m), v = h.length - 1;
322
322
  if (v > 0) {
323
323
  r.textContent = W ? W.emptyScript : "";
324
- for (let y = 0; y < v; y++) r.append(h[y], N()), E.nextNode(), a.push({ type: 2, index: ++n });
325
- r.append(h[v], N());
324
+ for (let y = 0; y < v; y++) r.append(h[y], L()), S.nextNode(), a.push({ type: 2, index: ++n });
325
+ r.append(h[v], L());
326
326
  }
327
327
  }
328
328
  } else if (r.nodeType === 8) if (r.data === At) a.push({ type: 2, index: n });
@@ -334,18 +334,18 @@ class D {
334
334
  }
335
335
  }
336
336
  static createElement(t, e) {
337
- const s = C.createElement("template");
337
+ const s = P.createElement("template");
338
338
  return s.innerHTML = t, s;
339
339
  }
340
340
  }
341
341
  function M(i, t, e = i, s) {
342
342
  var o, l;
343
- if (t === P) return t;
343
+ if (t === O) return t;
344
344
  let r = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
345
- const n = L(t) ? void 0 : t._$litDirective$;
345
+ const n = N(t) ? void 0 : t._$litDirective$;
346
346
  return (r == null ? void 0 : r.constructor) !== n && ((l = r == null ? void 0 : r._$AO) == null || l.call(r, !1), n === void 0 ? r = void 0 : (r = new n(i), r._$AT(i, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = r : e._$Cl = r), r !== void 0 && (t = M(i, r._$AS(i, t.values), r, s)), t;
347
347
  }
348
- class Lt {
348
+ class Nt {
349
349
  constructor(t, e) {
350
350
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
351
351
  }
@@ -356,17 +356,17 @@ class Lt {
356
356
  return this._$AM._$AU;
357
357
  }
358
358
  u(t) {
359
- const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? C).importNode(e, !0);
360
- E.currentNode = r;
361
- let n = E.nextNode(), o = 0, l = 0, a = s[0];
359
+ const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? P).importNode(e, !0);
360
+ S.currentNode = r;
361
+ let n = S.nextNode(), o = 0, l = 0, a = s[0];
362
362
  for (; a !== void 0; ) {
363
363
  if (o === a.index) {
364
364
  let u;
365
365
  a.type === 2 ? u = new R(n, n.nextSibling, this, t) : a.type === 1 ? u = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (u = new Vt(n, this, t)), this._$AV.push(u), a = s[++l];
366
366
  }
367
- o !== (a == null ? void 0 : a.index) && (n = E.nextNode(), o++);
367
+ o !== (a == null ? void 0 : a.index) && (n = S.nextNode(), o++);
368
368
  }
369
- return E.currentNode = C, r;
369
+ return S.currentNode = P, r;
370
370
  }
371
371
  p(t) {
372
372
  let e = 0;
@@ -393,7 +393,7 @@ class R {
393
393
  return this._$AB;
394
394
  }
395
395
  _$AI(t, e = this) {
396
- t = M(this, t, e), L(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== P && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : zt(t) ? this.k(t) : this._(t);
396
+ t = M(this, t, e), N(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== O && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : zt(t) ? this.k(t) : this._(t);
397
397
  }
398
398
  O(t) {
399
399
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -402,14 +402,14 @@ class R {
402
402
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
403
403
  }
404
404
  _(t) {
405
- this._$AH !== d && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(C.createTextNode(t)), this._$AH = t;
405
+ this._$AH !== d && N(this._$AH) ? this._$AA.nextSibling.data = t : this.T(P.createTextNode(t)), this._$AH = t;
406
406
  }
407
407
  $(t) {
408
408
  var n;
409
409
  const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = D.createElement(Et(s.h, s.h[0]), this.options)), s);
410
410
  if (((n = this._$AH) == null ? void 0 : n._$AD) === r) this._$AH.p(e);
411
411
  else {
412
- const o = new Lt(r, this), l = o.u(this.options);
412
+ const o = new Nt(r, this), l = o.u(this.options);
413
413
  o.p(e), this.T(l), this._$AH = o;
414
414
  }
415
415
  }
@@ -421,7 +421,7 @@ class R {
421
421
  nt(this._$AH) || (this._$AH = [], this._$AR());
422
422
  const e = this._$AH;
423
423
  let s, r = 0;
424
- for (const n of t) r === e.length ? e.push(s = new R(this.O(N()), this.O(N()), this, this.options)) : s = e[r], s._$AI(n), r++;
424
+ for (const n of t) r === e.length ? e.push(s = new R(this.O(L()), this.O(L()), this, this.options)) : s = e[r], s._$AI(n), r++;
425
425
  r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
426
426
  }
427
427
  _$AR(t = this._$AA.nextSibling, e) {
@@ -449,11 +449,11 @@ class F {
449
449
  _$AI(t, e = this, s, r) {
450
450
  const n = this.strings;
451
451
  let o = !1;
452
- if (n === void 0) t = M(this, t, e, 0), o = !L(t) || t !== this._$AH && t !== P, o && (this._$AH = t);
452
+ if (n === void 0) t = M(this, t, e, 0), o = !N(t) || t !== this._$AH && t !== O, o && (this._$AH = t);
453
453
  else {
454
454
  const l = t;
455
455
  let a, u;
456
- for (t = n[0], a = 0; a < n.length - 1; a++) u = M(this, l[s + a], e, a), u === P && (u = this._$AH[a]), o || (o = !L(u) || u !== this._$AH[a]), u === d ? t = d : t !== d && (t += (u ?? "") + n[a + 1]), this._$AH[a] = u;
456
+ for (t = n[0], a = 0; a < n.length - 1; a++) u = M(this, l[s + a], e, a), u === O && (u = this._$AH[a]), o || (o = !N(u) || u !== this._$AH[a]), u === d ? t = d : t !== d && (t += (u ?? "") + n[a + 1]), this._$AH[a] = u;
457
457
  }
458
458
  o && !r && this.j(t);
459
459
  }
@@ -482,7 +482,7 @@ class jt extends F {
482
482
  super(t, e, s, r, n), this.type = 5;
483
483
  }
484
484
  _$AI(t, e = this) {
485
- if ((t = M(this, t, e, 0) ?? d) === P) return;
485
+ if ((t = M(this, t, e, 0) ?? d) === O) return;
486
486
  const s = this._$AH, r = t === d && s !== d || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== d && (s === d || r);
487
487
  r && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
488
488
  }
@@ -509,7 +509,7 @@ const qt = (i, t, e) => {
509
509
  let r = s._$litPart$;
510
510
  if (r === void 0) {
511
511
  const n = (e == null ? void 0 : e.renderBefore) ?? null;
512
- s._$litPart$ = r = new R(t.insertBefore(N(), n), n, void 0, e ?? {});
512
+ s._$litPart$ = r = new R(t.insertBefore(L(), n), n, void 0, e ?? {});
513
513
  }
514
514
  return r._$AI(i), r;
515
515
  };
@@ -518,7 +518,7 @@ const qt = (i, t, e) => {
518
518
  * Copyright 2017 Google LLC
519
519
  * SPDX-License-Identifier: BSD-3-Clause
520
520
  */
521
- const S = globalThis;
521
+ const C = globalThis;
522
522
  let w = class extends U {
523
523
  constructor() {
524
524
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
@@ -541,14 +541,14 @@ let w = class extends U {
541
541
  super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
542
542
  }
543
543
  render() {
544
- return P;
544
+ return O;
545
545
  }
546
546
  };
547
547
  var yt;
548
- w._$litElement$ = !0, w.finalized = !0, (yt = S.litElementHydrateSupport) == null || yt.call(S, { LitElement: w });
549
- const Q = S.litElementPolyfillSupport;
548
+ w._$litElement$ = !0, w.finalized = !0, (yt = C.litElementHydrateSupport) == null || yt.call(C, { LitElement: w });
549
+ const Q = C.litElementPolyfillSupport;
550
550
  Q == null || Q({ LitElement: w });
551
- (S.litElementVersions ?? (S.litElementVersions = [])).push("4.2.0");
551
+ (C.litElementVersions ?? (C.litElementVersions = [])).push("4.2.0");
552
552
  /**
553
553
  * @license
554
554
  * Copyright 2017 Google LLC
@@ -648,7 +648,7 @@ function Kt(i) {
648
648
  });
649
649
  });
650
650
  }
651
- var Xt = Object.defineProperty, Gt = Object.getOwnPropertyDescriptor, O = (i, t, e, s) => {
651
+ var Xt = Object.defineProperty, Gt = Object.getOwnPropertyDescriptor, A = (i, t, e, s) => {
652
652
  for (var r = s > 1 ? void 0 : s ? Gt(t, e) : t, n = i.length - 1, o; n >= 0; n--)
653
653
  (o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
654
654
  return s && r && Xt(t, e, r), r;
@@ -670,9 +670,9 @@ const Qt = Jt(w), $t = (i) => {
670
670
  `;
671
671
  return _t(t);
672
672
  }, Yt = ["primary", "secondary"];
673
- let f = class extends Qt {
673
+ let b = class extends Qt {
674
674
  constructor() {
675
- super(...arguments), this.type = "submit", this.value = "", this.variant = "primary", this.disabled = !1, this.href = "", this.target = "";
675
+ super(...arguments), this.type = "submit", this.value = "", this.variant = "primary", this.customclass = "", this.disabled = !1, this.href = "", this.target = "";
676
676
  }
677
677
  get name() {
678
678
  return this.getAttribute("name") ?? "";
@@ -692,24 +692,30 @@ let f = class extends Qt {
692
692
  const i = getComputedStyle(this).getPropertyValue("--button-variant");
693
693
  i && Yt.some((t) => t === i) && (this.variant = i);
694
694
  }
695
+ updated() {
696
+ if (this.customclass) {
697
+ const i = this.customclass.split(" ").map((t) => t.trim()).filter(Boolean);
698
+ this.classList.add(...i);
699
+ }
700
+ }
695
701
  render() {
696
702
  const i = this.href ? this.renderLink() : this.renderButton();
697
- return g`${i}`;
703
+ return f`${i}`;
698
704
  }
699
705
  renderLink() {
700
- return g`<a href=${this.href} target=${this.target || d} class="button" ?disabled=${this.disabled}>
706
+ return f`<a href=${this.href} target=${this.target || d} class="button" ?disabled=${this.disabled}>
701
707
  <slot />
702
708
  </a>`;
703
709
  }
704
710
  renderButton() {
705
- return g`<button class="button" ?disabled=${this.disabled}>
711
+ return f`<button class="button" ?disabled=${this.disabled}>
706
712
  <slot />
707
713
  </button>`;
708
714
  }
709
715
  };
710
- Kt(f);
711
- f.formAssociated = !0;
712
- f.styles = I`
716
+ Kt(b);
717
+ b.formAssociated = !0;
718
+ b.styles = I`
713
719
  :host {
714
720
  display: inline-flex;
715
721
  cursor: pointer;
@@ -717,11 +723,15 @@ f.styles = I`
717
723
  --button-border: transparent;
718
724
  }
719
725
 
726
+ :host(.full) {
727
+ width: 100%;
728
+ }
729
+
720
730
  :host([variant="secondary"]) {
721
731
  ${$t("secondary")};
722
732
  }
723
733
 
724
- :host([disabled]) {
734
+ :host([disabled]), :host([aria-disabled="true"]), :host([aria-disabled="true"]):hover {
725
735
  --button-bg: var(--button-bg-disabled);
726
736
  --button-text: var(--button-text-disabled);
727
737
  --button-border: transparent;
@@ -733,6 +743,12 @@ f.styles = I`
733
743
  --button-border: var(--button-border);
734
744
  }
735
745
 
746
+ :host([aria-disabled="true"]) button:hover {
747
+ background-color: var(--button-bg-disabled);
748
+ color: var(--button-text-disabled);
749
+ border-color: transparent;
750
+ }
751
+
736
752
  .button {
737
753
  -webkit-appearance: none;
738
754
  align-items: center;
@@ -782,31 +798,34 @@ f.styles = I`
782
798
  ${Zt};
783
799
  }
784
800
  `;
785
- O([
801
+ A([
786
802
  c()
787
- ], f.prototype, "type", 2);
788
- O([
803
+ ], b.prototype, "type", 2);
804
+ A([
789
805
  c({ reflect: !0 })
790
- ], f.prototype, "value", 2);
791
- O([
806
+ ], b.prototype, "value", 2);
807
+ A([
792
808
  c({ reflect: !0 })
793
- ], f.prototype, "variant", 2);
794
- O([
809
+ ], b.prototype, "variant", 2);
810
+ A([
811
+ c({ type: String })
812
+ ], b.prototype, "customclass", 2);
813
+ A([
795
814
  c({
796
815
  converter: {
797
816
  fromAttribute: (i) => i === "" || i === "true"
798
817
  }
799
818
  })
800
- ], f.prototype, "disabled", 2);
801
- O([
819
+ ], b.prototype, "disabled", 2);
820
+ A([
802
821
  c()
803
- ], f.prototype, "href", 2);
804
- O([
822
+ ], b.prototype, "href", 2);
823
+ A([
805
824
  c()
806
- ], f.prototype, "target", 2);
807
- f = O([
825
+ ], b.prototype, "target", 2);
826
+ b = A([
808
827
  Z("o-button")
809
- ], f);
828
+ ], b);
810
829
  /**
811
830
  * @license
812
831
  * Copyright 2017 Google LLC
@@ -840,7 +859,7 @@ class tt extends se {
840
859
  }
841
860
  render(t) {
842
861
  if (t === d || t == null) return this._t = void 0, this.it = t;
843
- if (t === P) return t;
862
+ if (t === O) return t;
844
863
  if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
845
864
  if (t === this.it) return this._t;
846
865
  this.it = t;
@@ -889,7 +908,7 @@ let T = class extends w {
889
908
  "<svg",
890
909
  '<svg aria-hidden="true" focusable="false" part="svg"'
891
910
  );
892
- return g`
911
+ return f`
893
912
  <button
894
913
  type="button"
895
914
  aria-label="${this.label}"
@@ -983,12 +1002,12 @@ J([
983
1002
  T = J([
984
1003
  Z("o-wishlist-button")
985
1004
  ], T);
986
- var he = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, A = (i, t, e, s) => {
1005
+ var he = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, x = (i, t, e, s) => {
987
1006
  for (var r = s > 1 ? void 0 : s ? ce(t, e) : t, n = i.length - 1, o; n >= 0; n--)
988
1007
  (o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
989
1008
  return s && r && he(t, e, r), r;
990
1009
  };
991
- let b = class extends w {
1010
+ let g = class extends w {
992
1011
  constructor() {
993
1012
  super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "wishlist", this.disabled = !1;
994
1013
  }
@@ -1000,12 +1019,12 @@ let b = class extends w {
1000
1019
  "<svg",
1001
1020
  '<svg aria-hidden="true" focusable="false" part="svg"'
1002
1021
  );
1003
- return g`
1004
- ${this.type === "span" ? g`
1022
+ return f`
1023
+ ${this.type === "span" ? f`
1005
1024
  <span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
1006
1025
  ${st(e)}
1007
1026
  </span>
1008
- ` : g`
1027
+ ` : f`
1009
1028
  <button
1010
1029
  type="button"
1011
1030
  aria-label="icon"
@@ -1018,7 +1037,7 @@ let b = class extends w {
1018
1037
  `;
1019
1038
  }
1020
1039
  };
1021
- b.styles = I`
1040
+ g.styles = I`
1022
1041
  :host {
1023
1042
  display: inline-flex;
1024
1043
  justify-content: center;
@@ -1176,30 +1195,30 @@ b.styles = I`
1176
1195
 
1177
1196
  }
1178
1197
  `;
1179
- A([
1198
+ x([
1180
1199
  c({ type: String, reflect: !0 })
1181
- ], b.prototype, "bgstyle", 2);
1182
- A([
1200
+ ], g.prototype, "bgstyle", 2);
1201
+ x([
1183
1202
  c({ type: String, reflect: !0 })
1184
- ], b.prototype, "size", 2);
1185
- A([
1203
+ ], g.prototype, "size", 2);
1204
+ x([
1186
1205
  c({ type: String, reflect: !0 })
1187
- ], b.prototype, "status", 2);
1188
- A([
1206
+ ], g.prototype, "status", 2);
1207
+ x([
1189
1208
  c({ type: String, reflect: !0 })
1190
- ], b.prototype, "type", 2);
1191
- A([
1209
+ ], g.prototype, "type", 2);
1210
+ x([
1192
1211
  c({ type: String })
1193
- ], b.prototype, "strokewidth", 2);
1194
- A([
1212
+ ], g.prototype, "strokewidth", 2);
1213
+ x([
1195
1214
  c({ type: String })
1196
- ], b.prototype, "icon", 2);
1197
- A([
1215
+ ], g.prototype, "icon", 2);
1216
+ x([
1198
1217
  c({ type: Boolean, reflect: !0 })
1199
- ], b.prototype, "disabled", 2);
1200
- b = A([
1218
+ ], g.prototype, "disabled", 2);
1219
+ g = x([
1201
1220
  Z("o-icon-button")
1202
- ], b);
1221
+ ], g);
1203
1222
  var de = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, k = (i, t, e, s) => {
1204
1223
  for (var r = s > 1 ? void 0 : s ? ue(t, e) : t, n = i.length - 1, o; n >= 0; n--)
1205
1224
  (o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
@@ -1210,9 +1229,9 @@ let $ = class extends w {
1210
1229
  super(...arguments), this.href = "", this.target = "", this.template = "standard", this.inverse = !1, this.endIcon = !1, this.reverseEndIcon = !1;
1211
1230
  }
1212
1231
  render() {
1213
- return g`
1232
+ return f`
1214
1233
  <a href="${this.href}" target="${this.target}">
1215
- ${this.endIcon && this.reverseEndIcon ? g`
1234
+ ${this.endIcon && this.reverseEndIcon ? f`
1216
1235
  <o-icon-button
1217
1236
  icon="chevronLeft"
1218
1237
  bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
@@ -1222,7 +1241,7 @@ let $ = class extends w {
1222
1241
  ></o-icon-button>
1223
1242
  ` : null}
1224
1243
  <span class="link-text"><slot></slot></span>
1225
- ${this.endIcon && !this.reverseEndIcon ? g`
1244
+ ${this.endIcon && !this.reverseEndIcon ? f`
1226
1245
  <o-icon-button
1227
1246
  icon="chevronRight"
1228
1247
  bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@florid-kit/components",
3
- "version": "0.3.7",
3
+ "version": "0.3.10",
4
4
  "main": "index.js",
5
5
  "module": "index.mjs",
6
6
  "typings": "index.d.ts",