@florid-kit/components 0.0.1 → 0.2.0
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/index.js +89 -88
- package/index.mjs +214 -213
- package/package.json +2 -2
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 R=globalThis,q=R.ShadowRoot&&(R.ShadyCSS===void 0||R.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,F=Symbol(),Q=new WeakMap;let lt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==F)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(q&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=Q.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Q.set(e,t))}return t}toString(){return this.cssText}};const ct=
|
|
5
|
+
*/const R=globalThis,q=R.ShadowRoot&&(R.ShadyCSS===void 0||R.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,F=Symbol(),Q=new WeakMap;let lt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==F)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(q&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=Q.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Q.set(e,t))}return t}toString(){return this.cssText}};const ct=i=>new lt(typeof i=="string"?i:i+"",void 0,F),J=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((s,r,o)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[o+1],i[0]);return new lt(e,i,F)},ft=(i,t)=>{if(q)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),r=R.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,i.appendChild(s)}},X=q?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return ct(e)})(i):i;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:bt,defineProperty:_t,getOwnPropertyDescriptor:mt,getOwnPropertyNames:gt,getOwnPropertySymbols:vt,getPrototypeOf:yt}=Object,_=globalThis,Y=_.trustedTypes,At=Y?Y.emptyScript:"",L=_.reactiveElementPolyfillSupport,P=(
|
|
9
|
+
*/const{is:bt,defineProperty:_t,getOwnPropertyDescriptor:mt,getOwnPropertyNames:gt,getOwnPropertySymbols:vt,getPrototypeOf:yt}=Object,_=globalThis,Y=_.trustedTypes,At=Y?Y.emptyScript:"",L=_.reactiveElementPolyfillSupport,P=(i,t)=>i,k={toAttribute(i,t){switch(t){case Boolean:i=i?At: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}},K=(i,t)=>!bt(i,t),tt={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:K};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),_.litPropertyMetadata??(_.litPropertyMetadata=new WeakMap);class A 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=tt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&_t(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){const{get:r,set:o}=mt(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get(){return r==null?void 0:r.call(this)},set(n){const h=r==null?void 0:r.call(this);o.call(this,n),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??tt}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;const t=yt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){const e=this.properties,s=[...gt(e),...vt(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(X(r))}else t!==void 0&&e.push(X(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 ft(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)}_$EC(t,e){var o;const s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){const n=(((o=s.converter)==null?void 0:o.toAttribute)!==void 0?s.converter:k).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(t,e){var o;const s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const n=s.getPropertyOptions(r),h=typeof n.converter=="function"?{fromAttribute:n.converter}:((o=n.converter)==null?void 0:o.fromAttribute)!==void 0?n.converter:k;this._$Em=r,this[r]=h.fromAttribute(e,n.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??K)(this[t],e))return;this.P(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,s){this._$AL.has(t)||this._$AL.set(t,e),s.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){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[o,n]of this._$Ep)this[o]=n;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[o,n]of r)n.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],n)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(s=this._$EO)==null||s.forEach(r=>{var o;return(o=r.hostUpdate)==null?void 0:o.call(r)}),this.update(e)):this._$EU()}catch(r){throw t=!1,this._$EU(),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)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[P("elementProperties")]=new Map,A[P("finalized")]=new Map,L==null||L({ReactiveElement:A}),(_.reactiveElementVersions??(_.reactiveElementVersions=[])).push("2.0.4");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const C=globalThis,z=C.trustedTypes,et=z?z.createPolicy("lit-html",{createHTML:
|
|
14
|
-
\f\r]`,x=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,st=/-->/g,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/const C=globalThis,z=C.trustedTypes,et=z?z.createPolicy("lit-html",{createHTML:i=>i}):void 0,dt="$lit$",b=`lit$${Math.random().toFixed(9).slice(2)}$`,ut="?"+b,Et=`<${ut}>`,v=document,O=()=>v.createComment(""),T=i=>i===null||typeof i!="object"&&typeof i!="function",Z=Array.isArray,St=i=>Z(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",j=`[
|
|
14
|
+
\f\r]`,x=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,st=/-->/g,rt=/>/g,m=RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),it=/'/g,nt=/"/g,pt=/^(?:script|style|textarea|title)$/i,wt=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),B=wt(1),E=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),ot=new WeakMap,g=v.createTreeWalker(v,129);function $t(i,t){if(!Z(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return et!==void 0?et.createHTML(t):t}const xt=(i,t)=>{const e=i.length-1,s=[];let r,o=t===2?"<svg>":t===3?"<math>":"",n=x;for(let h=0;h<e;h++){const a=i[h];let d,u,l=-1,$=0;for(;$<a.length&&(n.lastIndex=$,u=n.exec(a),u!==null);)$=n.lastIndex,n===x?u[1]==="!--"?n=st:u[1]!==void 0?n=rt:u[2]!==void 0?(pt.test(u[2])&&(r=RegExp("</"+u[2],"g")),n=m):u[3]!==void 0&&(n=m):n===m?u[0]===">"?(n=r??x,l=-1):u[1]===void 0?l=-2:(l=n.lastIndex-u[2].length,d=u[1],n=u[3]===void 0?m:u[3]==='"'?nt:it):n===nt||n===it?n=m:n===st||n===rt?n=x:(n=m,r=void 0);const f=n===m&&i[h+1].startsWith("/>")?" ":"";o+=n===x?a+Et:l>=0?(s.push(d),a.slice(0,l)+dt+a.slice(l)+b+f):a+b+(l===-2?h:f)}return[$t(i,o+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class H{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let o=0,n=0;const h=t.length-1,a=this.parts,[d,u]=xt(t,e);if(this.el=H.createElement(d,s),g.currentNode=this.el.content,e===2||e===3){const l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(r=g.nextNode())!==null&&a.length<h;){if(r.nodeType===1){if(r.hasAttributes())for(const l of r.getAttributeNames())if(l.endsWith(dt)){const $=u[n++],f=r.getAttribute(l).split(b),N=/([.?@])?(.*)/.exec($);a.push({type:1,index:o,name:N[2],strings:f,ctor:N[1]==="."?Ct:N[1]==="?"?Ut:N[1]==="@"?Ot:I}),r.removeAttribute(l)}else l.startsWith(b)&&(a.push({type:6,index:o}),r.removeAttribute(l));if(pt.test(r.tagName)){const l=r.textContent.split(b),$=l.length-1;if($>0){r.textContent=z?z.emptyScript:"";for(let f=0;f<$;f++)r.append(l[f],O()),g.nextNode(),a.push({type:2,index:++o});r.append(l[$],O())}}}else if(r.nodeType===8)if(r.data===ut)a.push({type:2,index:o});else{let l=-1;for(;(l=r.data.indexOf(b,l+1))!==-1;)a.push({type:7,index:o}),l+=b.length-1}o++}}static createElement(t,e){const s=v.createElement("template");return s.innerHTML=t,s}}function S(i,t,e=i,s){var n,h;if(t===E)return t;let r=s!==void 0?(n=e._$Co)==null?void 0:n[s]:e._$Cl;const o=T(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==o&&((h=r==null?void 0:r._$AO)==null||h.call(r,!1),o===void 0?r=void 0:(r=new o(i),r._$AT(i,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=r:e._$Cl=r),r!==void 0&&(t=S(i,r._$AS(i,t.values),r,s)),t}class Pt{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)??v).importNode(e,!0);g.currentNode=r;let o=g.nextNode(),n=0,h=0,a=s[0];for(;a!==void 0;){if(n===a.index){let d;a.type===2?d=new M(o,o.nextSibling,this,t):a.type===1?d=new a.ctor(o,a.name,a.strings,this,t):a.type===6&&(d=new Tt(o,this,t)),this._$AV.push(d),a=s[++h]}n!==(a==null?void 0:a.index)&&(o=g.nextNode(),n++)}return g.currentNode=v,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 M{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=c,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=S(this,t,e),T(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==E&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):St(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!==c&&T(this._$AH)?this._$AA.nextSibling.data=t:this.T(v.createTextNode(t)),this._$AH=t}$(t){var o;const{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=H.createElement($t(s.h,s.h[0]),this.options)),s);if(((o=this._$AH)==null?void 0:o._$AD)===r)this._$AH.p(e);else{const n=new Pt(r,this),h=n.u(this.options);n.p(e),this.T(h),this._$AH=n}}_$AC(t){let e=ot.get(t.strings);return e===void 0&&ot.set(t.strings,e=new H(t)),e}k(t){Z(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,r=0;for(const o of t)r===e.length?e.push(s=new M(this.O(O()),this.O(O()),this,this.options)):s=e[r],s._$AI(o),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 I{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,o){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=c}_$AI(t,e=this,s,r){const o=this.strings;let n=!1;if(o===void 0)t=S(this,t,e,0),n=!T(t)||t!==this._$AH&&t!==E,n&&(this._$AH=t);else{const h=t;let a,d;for(t=o[0],a=0;a<o.length-1;a++)d=S(this,h[s+a],e,a),d===E&&(d=this._$AH[a]),n||(n=!T(d)||d!==this._$AH[a]),d===c?t=c:t!==c&&(t+=(d??"")+o[a+1]),this._$AH[a]=d}n&&!r&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ct extends I{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}}class Ut extends I{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}}class Ot extends I{constructor(t,e,s,r,o){super(t,e,s,r,o),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??c)===E)return;const s=this._$AH,r=t===c&&s!==c||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==c&&(s===c||r);r&&this.element.removeEventListener(this.name,this,s),o&&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 Tt{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){S(this,t)}}const D=C.litHtmlPolyfillSupport;D==null||D(H,M),(C.litHtmlVersions??(C.litHtmlVersions=[])).push("3.2.1");const Ht=(i,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let r=s._$litPart$;if(r===void 0){const o=(e==null?void 0:e.renderBefore)??null;s._$litPart$=r=new M(t.insertBefore(O(),o),o,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
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const Mt=
|
|
23
|
+
*/const Mt=i=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(i,t)}):customElements.define(i,t)};/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const Nt={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:K},Rt=(
|
|
27
|
+
*/const Nt={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:K},Rt=(i=Nt,t,e)=>{const{kind:s,metadata:r}=e;let o=globalThis.litPropertyMetadata.get(r);if(o===void 0&&globalThis.litPropertyMetadata.set(r,o=new Map),o.set(e.name,i),s==="accessor"){const{name:n}=e;return{set(h){const a=t.get.call(this);t.set.call(this,h),this.requestUpdate(n,a,i)},init(h){return h!==void 0&&this.P(n,void 0,i),h}}}if(s==="setter"){const{name:n}=e;return function(h){const a=this[n];t.call(this,h),this.requestUpdate(n,a,i)}}throw Error("Unsupported decorator location: "+s)};function w(i){return(t,e)=>typeof e=="object"?Rt(i,t,e):((s,r,o)=>{const n=r.hasOwnProperty(o);return r.constructor.createProperty(o,n?{...s,wrapped:!0}:s),n?Object.getOwnPropertyDescriptor(r,o):void 0})(i,t,e)}const kt=J`
|
|
28
28
|
outline: 1px dashed var(--button-border-color);
|
|
29
29
|
outline-offset: 2px;
|
|
30
30
|
outline: dashed black;
|
|
@@ -36,95 +36,96 @@
|
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2023 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: Apache-2.0
|
|
39
|
-
*/const G=Symbol("internals"),W=Symbol("privateInternals");function zt(
|
|
39
|
+
*/const G=Symbol("internals"),W=Symbol("privateInternals");function zt(i){var t;class e extends i{get[(t=G,t)](){return this[W]||(this[W]=this.attachInternals()),this[W]}}return e}/**
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright 2023 Google LLC
|
|
42
42
|
* SPDX-License-Identifier: Apache-2.0
|
|
43
|
-
*/function It(
|
|
44
|
-
--button-bg-disabled: var(--color-
|
|
45
|
-
|
|
46
|
-
--button-bg: var(--color-container-action-${
|
|
47
|
-
--button-
|
|
48
|
-
--button-border-
|
|
49
|
-
--button-border-
|
|
50
|
-
--button-border-width: var(--
|
|
51
|
-
--button-border: var(--
|
|
52
|
-
--button-
|
|
53
|
-
--button-text-
|
|
54
|
-
--button-text: var(--color-content-action-${
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
display: inline-flex;
|
|
67
|
-
cursor: pointer;
|
|
68
|
-
${at("primary")}
|
|
69
|
-
}
|
|
43
|
+
*/function It(i){i.addInitializer(t=>{const e=t;e.addEventListener("click",async s=>{const{type:r,[G]:o}=e,{form:n}=o;if(!(!n||r==="button")&&(await new Promise(h=>{setTimeout(h)}),!s.defaultPrevented)){if(r==="reset"){n.reset();return}n.addEventListener("submit",h=>{Object.defineProperty(h,"submitter",{configurable:!0,enumerable:!0,get:()=>e})},{capture:!0,once:!0}),o.setFormValue(e.value),n.requestSubmit()}})})}var Lt=Object.defineProperty,jt=Object.getOwnPropertyDescriptor,y=(i,t,e,s)=>{for(var r=s>1?void 0:s?jt(t,e):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(r=(s?n(t,e,r):n(r))||r);return s&&r&&Lt(t,e,r),r};const Bt=zt(U),at=i=>{const t=`
|
|
44
|
+
--button-bg-disabled: var(--color-container-disabled);
|
|
45
|
+
--button-bg-pressed: var(--color-container-action-${i}-pressed);
|
|
46
|
+
--button-bg-hover: var(--color-container-action-${i}-hover);
|
|
47
|
+
--button-bg: var(--color-container-action-${i}-default);
|
|
48
|
+
--button-border-disabled: var(--color-border-${i});
|
|
49
|
+
--button-border-hover: var(--color-border-${i});
|
|
50
|
+
--button-border-width-disabled: var(--border-m);
|
|
51
|
+
--button-border-width: var(--border-m);
|
|
52
|
+
--button-border: var(--color-border-${i});
|
|
53
|
+
--button-text-disabled: var(--color-content-disabled);
|
|
54
|
+
--button-text-hover: var(--color-content-action-${i});
|
|
55
|
+
--button-text: var(--color-content-action-${i});
|
|
56
|
+
`;return ct(t)},Dt=["primary","secondary"];let p=class extends Bt{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[G].form}willUpdate(){const i=getComputedStyle(this).getPropertyValue("--button-variant");i&&Dt.some(t=>t===i)&&(this.variant=i)}render(){const i=this.href?this.renderLink():this.renderButton();return B`${i}`}renderLink(){return B`<a href=${this.href} target=${this.target||c} class="button" ?disabled=${this.disabled}>
|
|
57
|
+
<slot />
|
|
58
|
+
</a>`}renderButton(){return B`<button class="button" ?disabled=${this.disabled}>
|
|
59
|
+
<slot />
|
|
60
|
+
</button>`}};It(p);p.formAssociated=!0;p.styles=J`
|
|
61
|
+
:host {
|
|
62
|
+
display: inline-flex;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
${at("primary")}
|
|
65
|
+
}
|
|
70
66
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
:host([variant="secondary"]) {
|
|
68
|
+
${at("secondary")}
|
|
69
|
+
}
|
|
74
70
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
71
|
+
:host([disabled]) {
|
|
72
|
+
--button-bg: var(--button-bg-disabled);
|
|
73
|
+
--button-text: var(--button-text-disabled);
|
|
74
|
+
--button-border: transparent;
|
|
75
|
+
}
|
|
80
76
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
border-radius: var(--radius-full);
|
|
87
|
-
border-width: var(--button-border-width);
|
|
88
|
-
border-style: solid;
|
|
89
|
-
box-sizing: border-box;
|
|
90
|
-
color: var(--button-text);
|
|
91
|
-
cursor: inherit;
|
|
92
|
-
display: inline-flex;
|
|
93
|
-
font-family: var(--font-family-sans);
|
|
94
|
-
font-size: var(--font-size-ui);
|
|
95
|
-
font-weight: var(--font-weight-ui);
|
|
96
|
-
gap: inherit;
|
|
97
|
-
height: 100%;
|
|
98
|
-
justify-content: center;
|
|
99
|
-
line-height: var(--font-line-height-ui);
|
|
100
|
-
min-width: 64px;
|
|
101
|
-
outline: none;
|
|
102
|
-
padding: 0;
|
|
103
|
-
padding: var(--button-padding-block) var(--button-padding-inline);
|
|
104
|
-
text-decoration: none;
|
|
105
|
-
vertical-align: middle;
|
|
106
|
-
width: 100%;
|
|
77
|
+
:host([disabled][variant="secondary"]) {
|
|
78
|
+
--button-bg: var(--button-bg-disabled);
|
|
79
|
+
--button-text: var(--button-text-disabled);
|
|
80
|
+
--button-border: var(--button-border);
|
|
81
|
+
}
|
|
107
82
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
83
|
+
.button {
|
|
84
|
+
-webkit-appearance: none;
|
|
85
|
+
align-items: center;
|
|
86
|
+
background-color: var(--button-bg);
|
|
87
|
+
border-color: var(--button-border);
|
|
88
|
+
border-radius: var(--radius-m);
|
|
89
|
+
border-width: var(--border-m);
|
|
90
|
+
border-style: solid;
|
|
91
|
+
box-sizing: border-box;
|
|
92
|
+
color: var(--button-text);
|
|
93
|
+
cursor: inherit;
|
|
94
|
+
display: inline-flex;
|
|
95
|
+
font-family: var(--font-family-loccitane-sans);
|
|
96
|
+
font-size: var(--font-size-150);
|
|
97
|
+
font-weight: var(--font-weight-400);
|
|
98
|
+
gap: var(--spacing-s, 8px);
|
|
99
|
+
height: 100%;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
line-height: var(--line-height-140);
|
|
102
|
+
min-width: 64px;
|
|
103
|
+
outline: none;
|
|
104
|
+
padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
|
|
105
|
+
text-decoration: none;
|
|
106
|
+
vertical-align: middle;
|
|
107
|
+
width: 100%;
|
|
113
108
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
109
|
+
&::-moz-focus-inner {
|
|
110
|
+
padding: 0;
|
|
111
|
+
border: 0;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
117
114
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
115
|
+
.button:disabled {
|
|
116
|
+
cursor: initial;
|
|
117
|
+
}
|
|
122
118
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
119
|
+
.button:hover:not([disabled]) {
|
|
120
|
+
background-color: var(--button-bg-hover);
|
|
121
|
+
color: var(--button-text-hover);
|
|
122
|
+
}
|
|
126
123
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
124
|
+
.button:active:not([disabled]) {
|
|
125
|
+
background-color: var(--button-bg-pressed);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.button:focus-visible {
|
|
129
|
+
${kt}
|
|
130
|
+
}
|
|
131
|
+
`;y([w()],p.prototype,"type",2);y([w({reflect:!0})],p.prototype,"value",2);y([w({reflect:!0})],p.prototype,"variant",2);y([w({converter:{fromAttribute:i=>i===""||i==="true"}})],p.prototype,"disabled",2);y([w()],p.prototype,"href",2);y([w()],p.prototype,"target",2);p=y([Mt("o-button")],p);
|
package/index.mjs
CHANGED
|
@@ -22,58 +22,58 @@ let lt = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const ct = (
|
|
26
|
-
const e =
|
|
25
|
+
const ct = (i) => new lt(typeof i == "string" ? i : i + "", void 0, F), J = (i, ...t) => {
|
|
26
|
+
const e = i.length === 1 ? i[0] : t.reduce((s, r, o) => s + ((n) => {
|
|
27
27
|
if (n._$cssResult$ === !0) return n.cssText;
|
|
28
28
|
if (typeof n == "number") return n;
|
|
29
29
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
|
-
})(
|
|
31
|
-
return new lt(e,
|
|
32
|
-
}, ft = (
|
|
33
|
-
if (q)
|
|
30
|
+
})(r) + i[o + 1], i[0]);
|
|
31
|
+
return new lt(e, i, F);
|
|
32
|
+
}, ft = (i, t) => {
|
|
33
|
+
if (q) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
34
|
else for (const e of t) {
|
|
35
|
-
const s = document.createElement("style"),
|
|
36
|
-
|
|
35
|
+
const s = document.createElement("style"), r = R.litNonce;
|
|
36
|
+
r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
|
|
37
37
|
}
|
|
38
|
-
}, X = q ? (
|
|
38
|
+
}, X = q ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let e = "";
|
|
40
40
|
for (const s of t.cssRules) e += s.cssText;
|
|
41
41
|
return ct(e);
|
|
42
|
-
})(
|
|
42
|
+
})(i) : i;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is: bt, defineProperty: _t, getOwnPropertyDescriptor: mt, getOwnPropertyNames: gt, getOwnPropertySymbols: vt, getPrototypeOf: yt } = Object, _ = globalThis, Y = _.trustedTypes, At = Y ? Y.emptyScript : "", L = _.reactiveElementPolyfillSupport, P = (
|
|
48
|
+
const { is: bt, defineProperty: _t, getOwnPropertyDescriptor: mt, getOwnPropertyNames: gt, getOwnPropertySymbols: vt, getPrototypeOf: yt } = Object, _ = globalThis, Y = _.trustedTypes, At = Y ? Y.emptyScript : "", L = _.reactiveElementPolyfillSupport, P = (i, t) => i, k = { toAttribute(i, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
|
|
51
|
+
i = i ? At : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
55
|
-
|
|
55
|
+
i = i == null ? i : JSON.stringify(i);
|
|
56
56
|
}
|
|
57
|
-
return
|
|
58
|
-
}, fromAttribute(
|
|
59
|
-
let e =
|
|
57
|
+
return i;
|
|
58
|
+
}, fromAttribute(i, t) {
|
|
59
|
+
let e = i;
|
|
60
60
|
switch (t) {
|
|
61
61
|
case Boolean:
|
|
62
|
-
e =
|
|
62
|
+
e = i !== null;
|
|
63
63
|
break;
|
|
64
64
|
case Number:
|
|
65
|
-
e =
|
|
65
|
+
e = i === null ? null : Number(i);
|
|
66
66
|
break;
|
|
67
67
|
case Object:
|
|
68
68
|
case Array:
|
|
69
69
|
try {
|
|
70
|
-
e = JSON.parse(
|
|
70
|
+
e = JSON.parse(i);
|
|
71
71
|
} catch {
|
|
72
72
|
e = null;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return e;
|
|
76
|
-
} }, K = (
|
|
76
|
+
} }, K = (i, t) => !bt(i, t), tt = { attribute: !0, type: String, converter: k, reflect: !1, hasChanged: K };
|
|
77
77
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), _.litPropertyMetadata ?? (_.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
class A extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
@@ -84,20 +84,20 @@ class A extends HTMLElement {
|
|
|
84
84
|
}
|
|
85
85
|
static createProperty(t, e = tt) {
|
|
86
86
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
87
|
-
const s = Symbol(),
|
|
88
|
-
|
|
87
|
+
const s = Symbol(), r = this.getPropertyDescriptor(t, s, e);
|
|
88
|
+
r !== void 0 && _t(this.prototype, t, r);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(t, e, s) {
|
|
92
|
-
const { get:
|
|
92
|
+
const { get: r, set: o } = mt(this.prototype, t) ?? { get() {
|
|
93
93
|
return this[e];
|
|
94
94
|
}, set(n) {
|
|
95
95
|
this[e] = n;
|
|
96
96
|
} };
|
|
97
97
|
return { get() {
|
|
98
|
-
return
|
|
98
|
+
return r == null ? void 0 : r.call(this);
|
|
99
99
|
}, set(n) {
|
|
100
|
-
const h =
|
|
100
|
+
const h = r == null ? void 0 : r.call(this);
|
|
101
101
|
o.call(this, n), this.requestUpdate(t, h, s);
|
|
102
102
|
}, configurable: !0, enumerable: !0 };
|
|
103
103
|
}
|
|
@@ -113,17 +113,17 @@ class A extends HTMLElement {
|
|
|
113
113
|
if (this.hasOwnProperty(P("finalized"))) return;
|
|
114
114
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) {
|
|
115
115
|
const e = this.properties, s = [...gt(e), ...vt(e)];
|
|
116
|
-
for (const
|
|
116
|
+
for (const r of s) this.createProperty(r, e[r]);
|
|
117
117
|
}
|
|
118
118
|
const t = this[Symbol.metadata];
|
|
119
119
|
if (t !== null) {
|
|
120
120
|
const e = litPropertyMetadata.get(t);
|
|
121
|
-
if (e !== void 0) for (const [s,
|
|
121
|
+
if (e !== void 0) for (const [s, r] of e) this.elementProperties.set(s, r);
|
|
122
122
|
}
|
|
123
123
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
124
124
|
for (const [e, s] of this.elementProperties) {
|
|
125
|
-
const
|
|
126
|
-
|
|
125
|
+
const r = this._$Eu(e, s);
|
|
126
|
+
r !== void 0 && this._$Eh.set(r, e);
|
|
127
127
|
}
|
|
128
128
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
129
129
|
}
|
|
@@ -131,7 +131,7 @@ class A extends HTMLElement {
|
|
|
131
131
|
const e = [];
|
|
132
132
|
if (Array.isArray(t)) {
|
|
133
133
|
const s = new Set(t.flat(1 / 0).reverse());
|
|
134
|
-
for (const
|
|
134
|
+
for (const r of s) e.unshift(X(r));
|
|
135
135
|
} else t !== void 0 && e.push(X(t));
|
|
136
136
|
return e;
|
|
137
137
|
}
|
|
@@ -184,18 +184,18 @@ class A extends HTMLElement {
|
|
|
184
184
|
}
|
|
185
185
|
_$EC(t, e) {
|
|
186
186
|
var o;
|
|
187
|
-
const s = this.constructor.elementProperties.get(t),
|
|
188
|
-
if (
|
|
187
|
+
const s = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, s);
|
|
188
|
+
if (r !== void 0 && s.reflect === !0) {
|
|
189
189
|
const n = (((o = s.converter) == null ? void 0 : o.toAttribute) !== void 0 ? s.converter : k).toAttribute(e, s.type);
|
|
190
|
-
this._$Em = t, n == null ? this.removeAttribute(
|
|
190
|
+
this._$Em = t, n == null ? this.removeAttribute(r) : this.setAttribute(r, n), this._$Em = null;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
_$AK(t, e) {
|
|
194
194
|
var o;
|
|
195
|
-
const s = this.constructor,
|
|
196
|
-
if (
|
|
197
|
-
const n = s.getPropertyOptions(
|
|
198
|
-
this._$Em =
|
|
195
|
+
const s = this.constructor, r = s._$Eh.get(t);
|
|
196
|
+
if (r !== void 0 && this._$Em !== r) {
|
|
197
|
+
const n = s.getPropertyOptions(r), h = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((o = n.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? n.converter : k;
|
|
198
|
+
this._$Em = r, this[r] = h.fromAttribute(e, n.type), this._$Em = null;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
requestUpdate(t, e, s) {
|
|
@@ -229,18 +229,18 @@ class A extends HTMLElement {
|
|
|
229
229
|
for (const [o, n] of this._$Ep) this[o] = n;
|
|
230
230
|
this._$Ep = void 0;
|
|
231
231
|
}
|
|
232
|
-
const
|
|
233
|
-
if (
|
|
232
|
+
const r = this.constructor.elementProperties;
|
|
233
|
+
if (r.size > 0) for (const [o, n] of r) n.wrapped !== !0 || this._$AL.has(o) || this[o] === void 0 || this.P(o, this[o], n);
|
|
234
234
|
}
|
|
235
235
|
let t = !1;
|
|
236
236
|
const e = this._$AL;
|
|
237
237
|
try {
|
|
238
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((
|
|
238
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((r) => {
|
|
239
239
|
var o;
|
|
240
|
-
return (o =
|
|
240
|
+
return (o = r.hostUpdate) == null ? void 0 : o.call(r);
|
|
241
241
|
}), this.update(e)) : this._$EU();
|
|
242
|
-
} catch (
|
|
243
|
-
throw t = !1, this._$EU(),
|
|
242
|
+
} catch (r) {
|
|
243
|
+
throw t = !1, this._$EU(), r;
|
|
244
244
|
}
|
|
245
245
|
t && this._$AE(e);
|
|
246
246
|
}
|
|
@@ -249,8 +249,8 @@ class A extends HTMLElement {
|
|
|
249
249
|
_$AE(t) {
|
|
250
250
|
var e;
|
|
251
251
|
(e = this._$EO) == null || e.forEach((s) => {
|
|
252
|
-
var
|
|
253
|
-
return (
|
|
252
|
+
var r;
|
|
253
|
+
return (r = s.hostUpdated) == null ? void 0 : r.call(s);
|
|
254
254
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
255
255
|
}
|
|
256
256
|
_$EU() {
|
|
@@ -279,28 +279,28 @@ A.elementStyles = [], A.shadowRootOptions = { mode: "open" }, A[P("elementProper
|
|
|
279
279
|
* Copyright 2017 Google LLC
|
|
280
280
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
281
|
*/
|
|
282
|
-
const C = globalThis, z = C.trustedTypes, et = z ? z.createPolicy("lit-html", { createHTML: (
|
|
283
|
-
\f\r]`, x = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, st = /-->/g,
|
|
284
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
285
|
-
function $t(
|
|
286
|
-
if (!Z(
|
|
282
|
+
const C = globalThis, z = C.trustedTypes, et = z ? z.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, dt = "$lit$", b = `lit$${Math.random().toFixed(9).slice(2)}$`, ut = "?" + b, Et = `<${ut}>`, v = document, O = () => v.createComment(""), T = (i) => i === null || typeof i != "object" && typeof i != "function", Z = Array.isArray, St = (i) => Z(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", j = `[
|
|
283
|
+
\f\r]`, x = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, st = /-->/g, rt = />/g, m = RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^
|
|
284
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), it = /'/g, nt = /"/g, pt = /^(?:script|style|textarea|title)$/i, wt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), B = wt(1), E = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), ot = /* @__PURE__ */ new WeakMap(), g = v.createTreeWalker(v, 129);
|
|
285
|
+
function $t(i, t) {
|
|
286
|
+
if (!Z(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
287
287
|
return et !== void 0 ? et.createHTML(t) : t;
|
|
288
288
|
}
|
|
289
|
-
const xt = (
|
|
290
|
-
const e =
|
|
291
|
-
let
|
|
289
|
+
const xt = (i, t) => {
|
|
290
|
+
const e = i.length - 1, s = [];
|
|
291
|
+
let r, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = x;
|
|
292
292
|
for (let h = 0; h < e; h++) {
|
|
293
|
-
const a =
|
|
293
|
+
const a = i[h];
|
|
294
294
|
let d, u, l = -1, $ = 0;
|
|
295
|
-
for (; $ < a.length && (n.lastIndex = $, u = n.exec(a), u !== null); ) $ = n.lastIndex, n === x ? u[1] === "!--" ? n = st : u[1] !== void 0 ? n =
|
|
296
|
-
const f = n === m &&
|
|
295
|
+
for (; $ < a.length && (n.lastIndex = $, u = n.exec(a), u !== null); ) $ = n.lastIndex, n === x ? u[1] === "!--" ? n = st : u[1] !== void 0 ? n = rt : u[2] !== void 0 ? (pt.test(u[2]) && (r = RegExp("</" + u[2], "g")), n = m) : u[3] !== void 0 && (n = m) : n === m ? u[0] === ">" ? (n = r ?? x, l = -1) : u[1] === void 0 ? l = -2 : (l = n.lastIndex - u[2].length, d = u[1], n = u[3] === void 0 ? m : u[3] === '"' ? nt : it) : n === nt || n === it ? n = m : n === st || n === rt ? n = x : (n = m, r = void 0);
|
|
296
|
+
const f = n === m && i[h + 1].startsWith("/>") ? " " : "";
|
|
297
297
|
o += n === x ? a + Et : l >= 0 ? (s.push(d), a.slice(0, l) + dt + a.slice(l) + b + f) : a + b + (l === -2 ? h : f);
|
|
298
298
|
}
|
|
299
|
-
return [$t(
|
|
299
|
+
return [$t(i, o + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
300
300
|
};
|
|
301
301
|
class H {
|
|
302
302
|
constructor({ strings: t, _$litType$: e }, s) {
|
|
303
|
-
let
|
|
303
|
+
let r;
|
|
304
304
|
this.parts = [];
|
|
305
305
|
let o = 0, n = 0;
|
|
306
306
|
const h = t.length - 1, a = this.parts, [d, u] = xt(t, e);
|
|
@@ -308,24 +308,24 @@ class H {
|
|
|
308
308
|
const l = this.el.content.firstChild;
|
|
309
309
|
l.replaceWith(...l.childNodes);
|
|
310
310
|
}
|
|
311
|
-
for (; (
|
|
312
|
-
if (
|
|
313
|
-
if (
|
|
314
|
-
const $ = u[n++], f =
|
|
315
|
-
a.push({ type: 1, index: o, name: N[2], strings: f, ctor: N[1] === "." ? Ct : N[1] === "?" ? Ut : N[1] === "@" ? Ot : I }),
|
|
316
|
-
} else l.startsWith(b) && (a.push({ type: 6, index: o }),
|
|
317
|
-
if (pt.test(
|
|
318
|
-
const l =
|
|
311
|
+
for (; (r = g.nextNode()) !== null && a.length < h; ) {
|
|
312
|
+
if (r.nodeType === 1) {
|
|
313
|
+
if (r.hasAttributes()) for (const l of r.getAttributeNames()) if (l.endsWith(dt)) {
|
|
314
|
+
const $ = u[n++], f = r.getAttribute(l).split(b), N = /([.?@])?(.*)/.exec($);
|
|
315
|
+
a.push({ type: 1, index: o, name: N[2], strings: f, ctor: N[1] === "." ? Ct : N[1] === "?" ? Ut : N[1] === "@" ? Ot : I }), r.removeAttribute(l);
|
|
316
|
+
} else l.startsWith(b) && (a.push({ type: 6, index: o }), r.removeAttribute(l));
|
|
317
|
+
if (pt.test(r.tagName)) {
|
|
318
|
+
const l = r.textContent.split(b), $ = l.length - 1;
|
|
319
319
|
if ($ > 0) {
|
|
320
|
-
|
|
321
|
-
for (let f = 0; f < $; f++)
|
|
322
|
-
|
|
320
|
+
r.textContent = z ? z.emptyScript : "";
|
|
321
|
+
for (let f = 0; f < $; f++) r.append(l[f], O()), g.nextNode(), a.push({ type: 2, index: ++o });
|
|
322
|
+
r.append(l[$], O());
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
} else if (
|
|
325
|
+
} else if (r.nodeType === 8) if (r.data === ut) a.push({ type: 2, index: o });
|
|
326
326
|
else {
|
|
327
327
|
let l = -1;
|
|
328
|
-
for (; (l =
|
|
328
|
+
for (; (l = r.data.indexOf(b, l + 1)) !== -1; ) a.push({ type: 7, index: o }), l += b.length - 1;
|
|
329
329
|
}
|
|
330
330
|
o++;
|
|
331
331
|
}
|
|
@@ -335,12 +335,12 @@ class H {
|
|
|
335
335
|
return s.innerHTML = t, s;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
function S(
|
|
338
|
+
function S(i, t, e = i, s) {
|
|
339
339
|
var n, h;
|
|
340
340
|
if (t === E) return t;
|
|
341
|
-
let
|
|
341
|
+
let r = s !== void 0 ? (n = e._$Co) == null ? void 0 : n[s] : e._$Cl;
|
|
342
342
|
const o = T(t) ? void 0 : t._$litDirective$;
|
|
343
|
-
return (
|
|
343
|
+
return (r == null ? void 0 : r.constructor) !== o && ((h = r == null ? void 0 : r._$AO) == null || h.call(r, !1), o === void 0 ? r = void 0 : (r = new o(i), r._$AT(i, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = r : e._$Cl = r), r !== void 0 && (t = S(i, r._$AS(i, t.values), r, s)), t;
|
|
344
344
|
}
|
|
345
345
|
class Pt {
|
|
346
346
|
constructor(t, e) {
|
|
@@ -353,8 +353,8 @@ class Pt {
|
|
|
353
353
|
return this._$AM._$AU;
|
|
354
354
|
}
|
|
355
355
|
u(t) {
|
|
356
|
-
const { el: { content: e }, parts: s } = this._$AD,
|
|
357
|
-
g.currentNode =
|
|
356
|
+
const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? v).importNode(e, !0);
|
|
357
|
+
g.currentNode = r;
|
|
358
358
|
let o = g.nextNode(), n = 0, h = 0, a = s[0];
|
|
359
359
|
for (; a !== void 0; ) {
|
|
360
360
|
if (n === a.index) {
|
|
@@ -363,7 +363,7 @@ class Pt {
|
|
|
363
363
|
}
|
|
364
364
|
n !== (a == null ? void 0 : a.index) && (o = g.nextNode(), n++);
|
|
365
365
|
}
|
|
366
|
-
return g.currentNode = v,
|
|
366
|
+
return g.currentNode = v, r;
|
|
367
367
|
}
|
|
368
368
|
p(t) {
|
|
369
369
|
let e = 0;
|
|
@@ -375,8 +375,8 @@ class M {
|
|
|
375
375
|
var t;
|
|
376
376
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
377
377
|
}
|
|
378
|
-
constructor(t, e, s,
|
|
379
|
-
this.type = 2, this._$AH = c, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options =
|
|
378
|
+
constructor(t, e, s, r) {
|
|
379
|
+
this.type = 2, this._$AH = c, 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;
|
|
380
380
|
}
|
|
381
381
|
get parentNode() {
|
|
382
382
|
let t = this._$AA.parentNode;
|
|
@@ -403,10 +403,10 @@ class M {
|
|
|
403
403
|
}
|
|
404
404
|
$(t) {
|
|
405
405
|
var o;
|
|
406
|
-
const { values: e, _$litType$: s } = t,
|
|
407
|
-
if (((o = this._$AH) == null ? void 0 : o._$AD) ===
|
|
406
|
+
const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = H.createElement($t(s.h, s.h[0]), this.options)), s);
|
|
407
|
+
if (((o = this._$AH) == null ? void 0 : o._$AD) === r) this._$AH.p(e);
|
|
408
408
|
else {
|
|
409
|
-
const n = new Pt(
|
|
409
|
+
const n = new Pt(r, this), h = n.u(this.options);
|
|
410
410
|
n.p(e), this.T(h), this._$AH = n;
|
|
411
411
|
}
|
|
412
412
|
}
|
|
@@ -417,15 +417,15 @@ class M {
|
|
|
417
417
|
k(t) {
|
|
418
418
|
Z(this._$AH) || (this._$AH = [], this._$AR());
|
|
419
419
|
const e = this._$AH;
|
|
420
|
-
let s,
|
|
421
|
-
for (const o of t)
|
|
422
|
-
|
|
420
|
+
let s, r = 0;
|
|
421
|
+
for (const o of t) r === e.length ? e.push(s = new M(this.O(O()), this.O(O()), this, this.options)) : s = e[r], s._$AI(o), r++;
|
|
422
|
+
r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
|
|
423
423
|
}
|
|
424
424
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
425
425
|
var s;
|
|
426
426
|
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
|
427
|
-
const
|
|
428
|
-
t.remove(), t =
|
|
427
|
+
const r = t.nextSibling;
|
|
428
|
+
t.remove(), t = r;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
setConnected(t) {
|
|
@@ -440,10 +440,10 @@ class I {
|
|
|
440
440
|
get _$AU() {
|
|
441
441
|
return this._$AM._$AU;
|
|
442
442
|
}
|
|
443
|
-
constructor(t, e, s,
|
|
444
|
-
this.type = 1, this._$AH = c, this._$AN = void 0, this.element = t, this.name = e, this._$AM =
|
|
443
|
+
constructor(t, e, s, r, o) {
|
|
444
|
+
this.type = 1, this._$AH = c, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = c;
|
|
445
445
|
}
|
|
446
|
-
_$AI(t, e = this, s,
|
|
446
|
+
_$AI(t, e = this, s, r) {
|
|
447
447
|
const o = this.strings;
|
|
448
448
|
let n = !1;
|
|
449
449
|
if (o === void 0) t = S(this, t, e, 0), n = !T(t) || t !== this._$AH && t !== E, n && (this._$AH = t);
|
|
@@ -452,7 +452,7 @@ class I {
|
|
|
452
452
|
let a, d;
|
|
453
453
|
for (t = o[0], a = 0; a < o.length - 1; a++) d = S(this, h[s + a], e, a), d === E && (d = this._$AH[a]), n || (n = !T(d) || d !== this._$AH[a]), d === c ? t = c : t !== c && (t += (d ?? "") + o[a + 1]), this._$AH[a] = d;
|
|
454
454
|
}
|
|
455
|
-
n && !
|
|
455
|
+
n && !r && this.j(t);
|
|
456
456
|
}
|
|
457
457
|
j(t) {
|
|
458
458
|
t === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
@@ -475,13 +475,13 @@ class Ut extends I {
|
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
477
|
class Ot extends I {
|
|
478
|
-
constructor(t, e, s,
|
|
479
|
-
super(t, e, s,
|
|
478
|
+
constructor(t, e, s, r, o) {
|
|
479
|
+
super(t, e, s, r, o), this.type = 5;
|
|
480
480
|
}
|
|
481
481
|
_$AI(t, e = this) {
|
|
482
482
|
if ((t = S(this, t, e, 0) ?? c) === E) return;
|
|
483
|
-
const s = this._$AH,
|
|
484
|
-
|
|
483
|
+
const s = this._$AH, r = t === c && s !== c || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== c && (s === c || r);
|
|
484
|
+
r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
485
485
|
}
|
|
486
486
|
handleEvent(t) {
|
|
487
487
|
var e;
|
|
@@ -501,14 +501,14 @@ class Tt {
|
|
|
501
501
|
}
|
|
502
502
|
const D = C.litHtmlPolyfillSupport;
|
|
503
503
|
D == null || D(H, M), (C.litHtmlVersions ?? (C.litHtmlVersions = [])).push("3.2.1");
|
|
504
|
-
const Ht = (
|
|
504
|
+
const Ht = (i, t, e) => {
|
|
505
505
|
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
506
|
-
let
|
|
507
|
-
if (
|
|
506
|
+
let r = s._$litPart$;
|
|
507
|
+
if (r === void 0) {
|
|
508
508
|
const o = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
509
|
-
s._$litPart$ =
|
|
509
|
+
s._$litPart$ = r = new M(t.insertBefore(O(), o), o, void 0, e ?? {});
|
|
510
510
|
}
|
|
511
|
-
return
|
|
511
|
+
return r._$AI(i), r;
|
|
512
512
|
};
|
|
513
513
|
/**
|
|
514
514
|
* @license
|
|
@@ -550,42 +550,42 @@ V == null || V({ LitElement: U });
|
|
|
550
550
|
* Copyright 2017 Google LLC
|
|
551
551
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
552
552
|
*/
|
|
553
|
-
const Mt = (
|
|
553
|
+
const Mt = (i) => (t, e) => {
|
|
554
554
|
e !== void 0 ? e.addInitializer(() => {
|
|
555
|
-
customElements.define(
|
|
556
|
-
}) : customElements.define(
|
|
555
|
+
customElements.define(i, t);
|
|
556
|
+
}) : customElements.define(i, t);
|
|
557
557
|
};
|
|
558
558
|
/**
|
|
559
559
|
* @license
|
|
560
560
|
* Copyright 2017 Google LLC
|
|
561
561
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
562
562
|
*/
|
|
563
|
-
const Nt = { attribute: !0, type: String, converter: k, reflect: !1, hasChanged: K }, Rt = (
|
|
564
|
-
const { kind: s, metadata:
|
|
565
|
-
let o = globalThis.litPropertyMetadata.get(
|
|
566
|
-
if (o === void 0 && globalThis.litPropertyMetadata.set(
|
|
563
|
+
const Nt = { attribute: !0, type: String, converter: k, reflect: !1, hasChanged: K }, Rt = (i = Nt, t, e) => {
|
|
564
|
+
const { kind: s, metadata: r } = e;
|
|
565
|
+
let o = globalThis.litPropertyMetadata.get(r);
|
|
566
|
+
if (o === void 0 && globalThis.litPropertyMetadata.set(r, o = /* @__PURE__ */ new Map()), o.set(e.name, i), s === "accessor") {
|
|
567
567
|
const { name: n } = e;
|
|
568
568
|
return { set(h) {
|
|
569
569
|
const a = t.get.call(this);
|
|
570
|
-
t.set.call(this, h), this.requestUpdate(n, a,
|
|
570
|
+
t.set.call(this, h), this.requestUpdate(n, a, i);
|
|
571
571
|
}, init(h) {
|
|
572
|
-
return h !== void 0 && this.P(n, void 0,
|
|
572
|
+
return h !== void 0 && this.P(n, void 0, i), h;
|
|
573
573
|
} };
|
|
574
574
|
}
|
|
575
575
|
if (s === "setter") {
|
|
576
576
|
const { name: n } = e;
|
|
577
577
|
return function(h) {
|
|
578
578
|
const a = this[n];
|
|
579
|
-
t.call(this, h), this.requestUpdate(n, a,
|
|
579
|
+
t.call(this, h), this.requestUpdate(n, a, i);
|
|
580
580
|
};
|
|
581
581
|
}
|
|
582
582
|
throw Error("Unsupported decorator location: " + s);
|
|
583
583
|
};
|
|
584
|
-
function w(
|
|
585
|
-
return (t, e) => typeof e == "object" ? Rt(
|
|
586
|
-
const n =
|
|
587
|
-
return
|
|
588
|
-
})(
|
|
584
|
+
function w(i) {
|
|
585
|
+
return (t, e) => typeof e == "object" ? Rt(i, t, e) : ((s, r, o) => {
|
|
586
|
+
const n = r.hasOwnProperty(o);
|
|
587
|
+
return r.constructor.createProperty(o, n ? { ...s, wrapped: !0 } : s), n ? Object.getOwnPropertyDescriptor(r, o) : void 0;
|
|
588
|
+
})(i, t, e);
|
|
589
589
|
}
|
|
590
590
|
const kt = J`
|
|
591
591
|
outline: 1px dashed var(--button-border-color);
|
|
@@ -603,9 +603,9 @@ J`
|
|
|
603
603
|
* SPDX-License-Identifier: Apache-2.0
|
|
604
604
|
*/
|
|
605
605
|
const G = Symbol("internals"), W = Symbol("privateInternals");
|
|
606
|
-
function zt(
|
|
606
|
+
function zt(i) {
|
|
607
607
|
var t;
|
|
608
|
-
class e extends
|
|
608
|
+
class e extends i {
|
|
609
609
|
get [(t = G, t)]() {
|
|
610
610
|
return this[W] || (this[W] = this.attachInternals()), this[W];
|
|
611
611
|
}
|
|
@@ -617,15 +617,15 @@ function zt(r) {
|
|
|
617
617
|
* Copyright 2023 Google LLC
|
|
618
618
|
* SPDX-License-Identifier: Apache-2.0
|
|
619
619
|
*/
|
|
620
|
-
function It(
|
|
621
|
-
|
|
620
|
+
function It(i) {
|
|
621
|
+
i.addInitializer((t) => {
|
|
622
622
|
const e = t;
|
|
623
623
|
e.addEventListener("click", async (s) => {
|
|
624
|
-
const { type:
|
|
625
|
-
if (!(!n ||
|
|
624
|
+
const { type: r, [G]: o } = e, { form: n } = o;
|
|
625
|
+
if (!(!n || r === "button") && (await new Promise((h) => {
|
|
626
626
|
setTimeout(h);
|
|
627
627
|
}), !s.defaultPrevented)) {
|
|
628
|
-
if (
|
|
628
|
+
if (r === "reset") {
|
|
629
629
|
n.reset();
|
|
630
630
|
return;
|
|
631
631
|
}
|
|
@@ -644,24 +644,25 @@ function It(r) {
|
|
|
644
644
|
});
|
|
645
645
|
});
|
|
646
646
|
}
|
|
647
|
-
var Lt = Object.defineProperty, jt = Object.getOwnPropertyDescriptor, y = (
|
|
648
|
-
for (var
|
|
649
|
-
(n =
|
|
650
|
-
return s &&
|
|
647
|
+
var Lt = Object.defineProperty, jt = Object.getOwnPropertyDescriptor, y = (i, t, e, s) => {
|
|
648
|
+
for (var r = s > 1 ? void 0 : s ? jt(t, e) : t, o = i.length - 1, n; o >= 0; o--)
|
|
649
|
+
(n = i[o]) && (r = (s ? n(t, e, r) : n(r)) || r);
|
|
650
|
+
return s && r && Lt(t, e, r), r;
|
|
651
651
|
};
|
|
652
|
-
const Bt = zt(U), at = (
|
|
652
|
+
const Bt = zt(U), at = (i) => {
|
|
653
653
|
const t = `
|
|
654
|
-
--button-bg-disabled: var(--color-
|
|
655
|
-
|
|
656
|
-
--button-bg: var(--color-container-action-${
|
|
657
|
-
--button-
|
|
658
|
-
--button-border-
|
|
659
|
-
--button-border-
|
|
660
|
-
--button-border-width: var(--
|
|
661
|
-
--button-border: var(--
|
|
662
|
-
--button-
|
|
663
|
-
--button-text-
|
|
664
|
-
--button-text: var(--color-content-action-${
|
|
654
|
+
--button-bg-disabled: var(--color-container-disabled);
|
|
655
|
+
--button-bg-pressed: var(--color-container-action-${i}-pressed);
|
|
656
|
+
--button-bg-hover: var(--color-container-action-${i}-hover);
|
|
657
|
+
--button-bg: var(--color-container-action-${i}-default);
|
|
658
|
+
--button-border-disabled: var(--color-border-${i});
|
|
659
|
+
--button-border-hover: var(--color-border-${i});
|
|
660
|
+
--button-border-width-disabled: var(--border-m);
|
|
661
|
+
--button-border-width: var(--border-m);
|
|
662
|
+
--button-border: var(--color-border-${i});
|
|
663
|
+
--button-text-disabled: var(--color-content-disabled);
|
|
664
|
+
--button-text-hover: var(--color-content-action-${i});
|
|
665
|
+
--button-text: var(--color-content-action-${i});
|
|
665
666
|
`;
|
|
666
667
|
return ct(t);
|
|
667
668
|
}, Dt = ["primary", "secondary"];
|
|
@@ -672,8 +673,8 @@ let p = class extends Bt {
|
|
|
672
673
|
get name() {
|
|
673
674
|
return this.getAttribute("name") ?? "";
|
|
674
675
|
}
|
|
675
|
-
set name(
|
|
676
|
-
this.setAttribute("name",
|
|
676
|
+
set name(i) {
|
|
677
|
+
this.setAttribute("name", i);
|
|
677
678
|
}
|
|
678
679
|
/**
|
|
679
680
|
* The associated form element with which this element's value will submit.
|
|
@@ -684,98 +685,98 @@ let p = class extends Bt {
|
|
|
684
685
|
// TODO: Add aria attributes support
|
|
685
686
|
// Adapt from: https://github.dev/material-components/material-web
|
|
686
687
|
willUpdate() {
|
|
687
|
-
const
|
|
688
|
-
|
|
688
|
+
const i = getComputedStyle(this).getPropertyValue("--button-variant");
|
|
689
|
+
i && Dt.some((t) => t === i) && (this.variant = i);
|
|
689
690
|
}
|
|
690
691
|
render() {
|
|
691
|
-
const
|
|
692
|
-
return B`${
|
|
692
|
+
const i = this.href ? this.renderLink() : this.renderButton();
|
|
693
|
+
return B`${i}`;
|
|
693
694
|
}
|
|
694
695
|
renderLink() {
|
|
695
|
-
return B`<a
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
class="button"
|
|
699
|
-
?disabled=${this.disabled}
|
|
700
|
-
>
|
|
701
|
-
<slot />
|
|
702
|
-
</a>`;
|
|
696
|
+
return B`<a href=${this.href} target=${this.target || c} class="button" ?disabled=${this.disabled}>
|
|
697
|
+
<slot />
|
|
698
|
+
</a>`;
|
|
703
699
|
}
|
|
704
700
|
renderButton() {
|
|
705
701
|
return B`<button class="button" ?disabled=${this.disabled}>
|
|
706
|
-
|
|
707
|
-
|
|
702
|
+
<slot />
|
|
703
|
+
</button>`;
|
|
708
704
|
}
|
|
709
705
|
};
|
|
710
706
|
It(p);
|
|
711
707
|
p.formAssociated = !0;
|
|
712
708
|
p.styles = J`
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
709
|
+
:host {
|
|
710
|
+
display: inline-flex;
|
|
711
|
+
cursor: pointer;
|
|
712
|
+
${at("primary")}
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
:host([variant="secondary"]) {
|
|
716
|
+
${at("secondary")}
|
|
717
|
+
}
|
|
718
718
|
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
719
|
+
:host([disabled]) {
|
|
720
|
+
--button-bg: var(--button-bg-disabled);
|
|
721
|
+
--button-text: var(--button-text-disabled);
|
|
722
|
+
--button-border: transparent;
|
|
723
|
+
}
|
|
722
724
|
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
725
|
+
:host([disabled][variant="secondary"]) {
|
|
726
|
+
--button-bg: var(--button-bg-disabled);
|
|
727
|
+
--button-text: var(--button-text-disabled);
|
|
728
|
+
--button-border: var(--button-border);
|
|
729
|
+
}
|
|
728
730
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
width: 100%;
|
|
731
|
+
.button {
|
|
732
|
+
-webkit-appearance: none;
|
|
733
|
+
align-items: center;
|
|
734
|
+
background-color: var(--button-bg);
|
|
735
|
+
border-color: var(--button-border);
|
|
736
|
+
border-radius: var(--radius-m);
|
|
737
|
+
border-width: var(--border-m);
|
|
738
|
+
border-style: solid;
|
|
739
|
+
box-sizing: border-box;
|
|
740
|
+
color: var(--button-text);
|
|
741
|
+
cursor: inherit;
|
|
742
|
+
display: inline-flex;
|
|
743
|
+
font-family: var(--font-family-loccitane-sans);
|
|
744
|
+
font-size: var(--font-size-150);
|
|
745
|
+
font-weight: var(--font-weight-400);
|
|
746
|
+
gap: var(--spacing-s, 8px);
|
|
747
|
+
height: 100%;
|
|
748
|
+
justify-content: center;
|
|
749
|
+
line-height: var(--line-height-140);
|
|
750
|
+
min-width: 64px;
|
|
751
|
+
outline: none;
|
|
752
|
+
padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
|
|
753
|
+
text-decoration: none;
|
|
754
|
+
vertical-align: middle;
|
|
755
|
+
width: 100%;
|
|
755
756
|
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
757
|
+
&::-moz-focus-inner {
|
|
758
|
+
padding: 0;
|
|
759
|
+
border: 0;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
761
762
|
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
763
|
+
.button:disabled {
|
|
764
|
+
cursor: initial;
|
|
765
|
+
}
|
|
765
766
|
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
767
|
+
.button:hover:not([disabled]) {
|
|
768
|
+
background-color: var(--button-bg-hover);
|
|
769
|
+
color: var(--button-text-hover);
|
|
770
|
+
}
|
|
770
771
|
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
772
|
+
.button:active:not([disabled]) {
|
|
773
|
+
background-color: var(--button-bg-pressed);
|
|
774
|
+
}
|
|
774
775
|
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
776
|
+
.button:focus-visible {
|
|
777
|
+
${kt}
|
|
778
|
+
}
|
|
779
|
+
`;
|
|
779
780
|
y([
|
|
780
781
|
w()
|
|
781
782
|
], p.prototype, "type", 2);
|
|
@@ -788,7 +789,7 @@ y([
|
|
|
788
789
|
y([
|
|
789
790
|
w({
|
|
790
791
|
converter: {
|
|
791
|
-
fromAttribute: (
|
|
792
|
+
fromAttribute: (i) => i === "" || i === "true"
|
|
792
793
|
}
|
|
793
794
|
})
|
|
794
795
|
], p.prototype, "disabled", 2);
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@florid-kit/components",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"module": "index.mjs",
|
|
6
6
|
"typings": "index.d.ts",
|
|
7
7
|
"description": "This library was generated with [Nx](https://nx.dev).",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@florid-kit/tokens": "^0.
|
|
9
|
+
"@florid-kit/tokens": "^0.1.0"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@storybook/addon-essentials": "^8.1.5",
|