@florid-kit/components 0.2.2 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/icon-button.d.ts +3 -1
- package/index.js +77 -32
- package/index.mjs +171 -123
- package/package.json +1 -1
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
|
|
3
|
-
type bgstyle = "background-light" | "background-contrast" | "ghost-light" | "ghost-contrast";
|
|
3
|
+
type bgstyle = "background-light" | "background-contrast" | "ghost-light" | "ghost-contrast" | "none";
|
|
4
4
|
type size = "small" | "medium" | "large";
|
|
5
5
|
type status = "empty" | "filled";
|
|
6
|
+
type type = "button" | "span";
|
|
6
7
|
export declare class OccitaneIconButton extends LitElement {
|
|
7
8
|
static styles: import('lit').CSSResult;
|
|
8
9
|
bgstyle: bgstyle;
|
|
9
10
|
size: size;
|
|
10
11
|
status: status;
|
|
12
|
+
type: type;
|
|
11
13
|
icon: string;
|
|
12
14
|
disabled: boolean;
|
|
13
15
|
protected render(): import('lit').TemplateResult<1>;
|
package/index.js
CHANGED
|
@@ -2,29 +2,29 @@
|
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const I=globalThis,
|
|
5
|
+
*/const I=globalThis,X=I.ShadowRoot&&(I.ShadyCSS===void 0||I.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Y=Symbol(),it=new WeakMap;let $t=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Y)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(X&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=it.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&it.set(e,t))}return t}toString(){return this.cssText}};const ft=i=>new $t(typeof i=="string"?i:i+"",void 0,Y),R=(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 $t(e,i,Y)},St=(i,t)=>{if(X)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),r=I.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,i.appendChild(s)}},ot=X?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return ft(e)})(i):i;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:xt,defineProperty:Et,getOwnPropertyDescriptor:Pt,getOwnPropertyNames:Ct,getOwnPropertySymbols:Ot,getPrototypeOf:Ut}=Object,y=globalThis,nt=y.trustedTypes,Tt=nt?nt.emptyScript:"",W=y.reactiveElementPolyfillSupport,T=(i,t)=>i,L={toAttribute(i,t){switch(t){case Boolean:i=i?Tt: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}},tt=(i,t)=>!xt(i,t),at={attribute:!0,type:String,converter:L,reflect:!1,hasChanged:tt};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),y.litPropertyMetadata??(y.litPropertyMetadata=new WeakMap);class C 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=at){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&&Et(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){const{get:r,set:n}=Pt(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return r==null?void 0:r.call(this)},set(o){const l=r==null?void 0:r.call(this);n.call(this,o),this.requestUpdate(t,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??at}static _$Ei(){if(this.hasOwnProperty(T("elementProperties")))return;const t=Ut(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(T("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(T("properties"))){const e=this.properties,s=[...Ct(e),...Ot(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(ot(r))}else t!==void 0&&e.push(ot(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 St(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 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:L).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){var n;const s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const o=s.getPropertyOptions(r),l=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)==null?void 0:n.fromAttribute)!==void 0?o.converter:L;this._$Em=r,this[r]=l.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){if(s??(s=this.constructor.getPropertyOptions(t)),!(s.hasChanged??tt)(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[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)o.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],o)}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._$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){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[T("elementProperties")]=new Map,C[T("finalized")]=new Map,W==null||W({ReactiveElement:C}),(y.reactiveElementVersions??(y.reactiveElementVersions=[])).push("2.0.4");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/const k=globalThis,D=k.trustedTypes,lt=D?D.createPolicy("lit-html",{createHTML:i=>i}):void 0,vt="$lit$",v=`lit$${Math.random().toFixed(9).slice(2)}$`,yt="?"+v,kt=`<${yt}>`,S=document,H=()=>S.createComment(""),M=i=>i===null||typeof i!="object"&&typeof i!="function",et=Array.isArray,Ht=i=>et(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",q=`[
|
|
14
|
+
\f\r]`,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ht=/-->/g,ct=/>/g,_=RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),dt=/'/g,ut=/"/g,_t=/^(?:script|style|textarea|title)$/i,Mt=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),A=Mt(1),x=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),pt=new WeakMap,m=S.createTreeWalker(S,129);function mt(i,t){if(!et(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return lt!==void 0?lt.createHTML(t):t}const Nt=(i,t)=>{const e=i.length-1,s=[];let r,n=t===2?"<svg>":t===3?"<math>":"",o=U;for(let l=0;l<e;l++){const a=i[l];let d,u,h=-1,g=0;for(;g<a.length&&(o.lastIndex=g,u=o.exec(a),u!==null);)g=o.lastIndex,o===U?u[1]==="!--"?o=ht:u[1]!==void 0?o=ct:u[2]!==void 0?(_t.test(u[2])&&(r=RegExp("</"+u[2],"g")),o=_):u[3]!==void 0&&(o=_):o===_?u[0]===">"?(o=r??U,h=-1):u[1]===void 0?h=-2:(h=o.lastIndex-u[2].length,d=u[1],o=u[3]===void 0?_:u[3]==='"'?ut:dt):o===ut||o===dt?o=_:o===ht||o===ct?o=U:(o=_,r=void 0);const f=o===_&&i[l+1].startsWith("/>")?" ":"";n+=o===U?a+kt:h>=0?(s.push(d),a.slice(0,h)+vt+a.slice(h)+v+f):a+v+(h===-2?l:f)}return[mt(i,n+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class N{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let n=0,o=0;const l=t.length-1,a=this.parts,[d,u]=Nt(t,e);if(this.el=N.createElement(d,s),m.currentNode=this.el.content,e===2||e===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=m.nextNode())!==null&&a.length<l;){if(r.nodeType===1){if(r.hasAttributes())for(const h of r.getAttributeNames())if(h.endsWith(vt)){const g=u[o++],f=r.getAttribute(h).split(v),j=/([.?@])?(.*)/.exec(g);a.push({type:1,index:n,name:j[2],strings:f,ctor:j[1]==="."?zt:j[1]==="?"?jt:j[1]==="@"?It:V}),r.removeAttribute(h)}else h.startsWith(v)&&(a.push({type:6,index:n}),r.removeAttribute(h));if(_t.test(r.tagName)){const h=r.textContent.split(v),g=h.length-1;if(g>0){r.textContent=D?D.emptyScript:"";for(let f=0;f<g;f++)r.append(h[f],H()),m.nextNode(),a.push({type:2,index:++n});r.append(h[g],H())}}}else if(r.nodeType===8)if(r.data===yt)a.push({type:2,index:n});else{let h=-1;for(;(h=r.data.indexOf(v,h+1))!==-1;)a.push({type:7,index:n}),h+=v.length-1}n++}}static createElement(t,e){const s=S.createElement("template");return s.innerHTML=t,s}}function O(i,t,e=i,s){var o,l;if(t===x)return t;let r=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=M(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=O(i,r._$AS(i,t.values),r,s)),t}class Rt{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)??S).importNode(e,!0);m.currentNode=r;let n=m.nextNode(),o=0,l=0,a=s[0];for(;a!==void 0;){if(o===a.index){let d;a.type===2?d=new z(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new Lt(n,this,t)),this._$AV.push(d),a=s[++l]}o!==(a==null?void 0:a.index)&&(n=m.nextNode(),o++)}return m.currentNode=S,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 z{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=O(this,t,e),M(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==x&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ht(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&&M(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.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=N.createElement(mt(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 Rt(r,this),l=o.u(this.options);o.p(e),this.T(l),this._$AH=o}}_$AC(t){let e=pt.get(t.strings);return e===void 0&&pt.set(t.strings,e=new N(t)),e}k(t){et(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 z(this.O(H()),this.O(H()),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 V{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,n){this.type=1,this._$AH=c,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=c}_$AI(t,e=this,s,r){const n=this.strings;let o=!1;if(n===void 0)t=O(this,t,e,0),o=!M(t)||t!==this._$AH&&t!==x,o&&(this._$AH=t);else{const l=t;let a,d;for(t=n[0],a=0;a<n.length-1;a++)d=O(this,l[s+a],e,a),d===x&&(d=this._$AH[a]),o||(o=!M(d)||d!==this._$AH[a]),d===c?t=c:t!==c&&(t+=(d??"")+n[a+1]),this._$AH[a]=d}o&&!r&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class zt extends V{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}}class jt extends V{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}}class It extends V{constructor(t,e,s,r,n){super(t,e,s,r,n),this.type=5}_$AI(t,e=this){if((t=O(this,t,e,0)??c)===x)return;const s=this._$AH,r=t===c&&s!==c||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==c&&(s===c||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 Lt{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){O(this,t)}}const F=k.litHtmlPolyfillSupport;F==null||F(N,z),(k.litHtmlVersions??(k.litHtmlVersions=[])).push("3.2.1");const Dt=(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 z(t.insertBefore(H(),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
|
-
*/let
|
|
19
|
+
*/let w=class extends C{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=Dt(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 x}};var gt;w._$litElement$=!0,w.finalized=!0,(gt=globalThis.litElementHydrateSupport)==null||gt.call(globalThis,{LitElement:w});const Z=globalThis.litElementPolyfillSupport;Z==null||Z({LitElement:w});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const
|
|
23
|
+
*/const st=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 Bt={attribute:!0,type:String,converter:L,reflect:!1,hasChanged:
|
|
27
|
+
*/const Bt={attribute:!0,type:String,converter:L,reflect:!1,hasChanged:tt},Vt=(i=Bt,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),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.P(o,void 0,i),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 p(i){return(t,e)=>typeof e=="object"?Vt(i,t,e):((s,r,n)=>{const o=r.hasOwnProperty(n);return r.constructor.createProperty(n,o?{...s,wrapped:!0}:s),o?Object.getOwnPropertyDescriptor(r,n):void 0})(i,t,e)}const Wt=R`
|
|
28
28
|
outline: 1px dashed var(--button-border-color);
|
|
29
29
|
outline-offset: 2px;
|
|
30
30
|
outline: dashed black;
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2023 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: Apache-2.0
|
|
39
|
-
*/const
|
|
39
|
+
*/const rt=Symbol("internals"),J=Symbol("privateInternals");function qt(i){var t;class e extends i{get[(t=rt,t)](){return this[J]||(this[J]=this.attachInternals()),this[J]}}return e}/**
|
|
40
40
|
* @license
|
|
41
41
|
* Copyright 2023 Google LLC
|
|
42
42
|
* SPDX-License-Identifier: Apache-2.0
|
|
43
|
-
*/function Ft(i){i.addInitializer(t=>{const e=t;e.addEventListener("click",async s=>{const{type:r,[
|
|
43
|
+
*/function Ft(i){i.addInitializer(t=>{const e=t;e.addEventListener("click",async s=>{const{type:r,[rt]: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 Zt=Object.defineProperty,Jt=Object.getOwnPropertyDescriptor,E=(i,t,e,s)=>{for(var r=s>1?void 0:s?Jt(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&&Zt(t,e,r),r};const Kt=qt(w),bt=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,20 +53,20 @@
|
|
|
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
|
|
56
|
+
`;return ft(t)},Gt=["primary","secondary"];let b=class extends Kt{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[rt].form}willUpdate(){const i=getComputedStyle(this).getPropertyValue("--button-variant");i&&Gt.some(t=>t===i)&&(this.variant=i)}render(){const i=this.href?this.renderLink():this.renderButton();return A`${i}`}renderLink(){return A`<a href=${this.href} target=${this.target||c} class="button" ?disabled=${this.disabled}>
|
|
57
57
|
<slot />
|
|
58
|
-
</a>`}renderButton(){return
|
|
58
|
+
</a>`}renderButton(){return A`<button class="button" ?disabled=${this.disabled}>
|
|
59
59
|
<slot />
|
|
60
60
|
</button>`}};Ft(b);b.formAssociated=!0;b.styles=R`
|
|
61
61
|
:host {
|
|
62
62
|
display: inline-flex;
|
|
63
63
|
cursor: pointer;
|
|
64
|
-
${
|
|
64
|
+
${bt("primary")};
|
|
65
65
|
--button-border: transparent;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
:host([variant="secondary"]) {
|
|
69
|
-
${
|
|
69
|
+
${bt("secondary")};
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
:host([disabled]) {
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
.button:focus-visible {
|
|
130
130
|
${Wt};
|
|
131
131
|
}
|
|
132
|
-
`;E([p()],b.prototype,"type",2);E([p({reflect:!0})],b.prototype,"value",2);E([p({reflect:!0})],b.prototype,"variant",2);E([p({converter:{fromAttribute:i=>i===""||i==="true"}})],b.prototype,"disabled",2);E([p()],b.prototype,"href",2);E([p()],b.prototype,"target",2);b=E([
|
|
132
|
+
`;E([p()],b.prototype,"type",2);E([p({reflect:!0})],b.prototype,"value",2);E([p({reflect:!0})],b.prototype,"variant",2);E([p({converter:{fromAttribute:i=>i===""||i==="true"}})],b.prototype,"disabled",2);E([p()],b.prototype,"href",2);E([p()],b.prototype,"target",2);b=E([st("o-button")],b);/**
|
|
133
133
|
* @license
|
|
134
134
|
* Copyright 2017 Google LLC
|
|
135
135
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -137,14 +137,14 @@
|
|
|
137
137
|
* @license
|
|
138
138
|
* Copyright 2017 Google LLC
|
|
139
139
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
140
|
-
*/class K extends Yt{constructor(t){if(super(t),this.it=c,t.type!==Qt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===c||t==null)return this._t=void 0,this.it=t;if(t===
|
|
140
|
+
*/class K extends Yt{constructor(t){if(super(t),this.it=c,t.type!==Qt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===c||t==null)return this._t=void 0,this.it=t;if(t===x)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:[]}}}K.directiveName="unsafeHTML",K.resultType=1;/**
|
|
141
141
|
* @license
|
|
142
142
|
* Copyright 2017 Google LLC
|
|
143
143
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
144
|
-
*/class G extends K{}G.directiveName="unsafeSVG",G.resultType=2;const
|
|
144
|
+
*/class G extends K{}G.directiveName="unsafeSVG",G.resultType=2;const Q=Xt(G),te=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
145
145
|
<path d="M8 3.6275C7.06799 0.971489 3.25399 -0.0226278 1.67414 2.30983C0.0877404 4.65197 1.67414 6.99412 2.62598 8.33249C3.0147 8.87905 8 14 8 14C8 14 12.9853 8.87905 13.374 8.33249C14.3259 6.99412 15.9123 4.65197 14.3259 2.30983C12.746 -0.0226277 8.97167 0.971489 8 3.6275Z" stroke="#3F2B2E" stroke-linecap="round"/>
|
|
146
146
|
</svg>
|
|
147
|
-
`,At={wishlist:te};var ee=Object.defineProperty,se=Object.getOwnPropertyDescriptor,wt=(i,t,e,s)=>{for(var r=s>1?void 0:s?se(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&&ee(t,e,r),r};let B=class extends
|
|
147
|
+
`,At={wishlist:te};var ee=Object.defineProperty,se=Object.getOwnPropertyDescriptor,wt=(i,t,e,s)=>{for(var r=s>1?void 0:s?se(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&&ee(t,e,r),r};let B=class extends w{constructor(){super(...arguments),this.status="empty"}render(){const i=At.wishlist.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return A`
|
|
148
148
|
<button
|
|
149
149
|
type="button"
|
|
150
150
|
aria-label="Add to wishlist"
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
class="wishlist-button"
|
|
153
153
|
@click="${this.toggleStatus}"
|
|
154
154
|
>
|
|
155
|
-
${
|
|
155
|
+
${Q(i)}
|
|
156
156
|
</button>
|
|
157
157
|
`}toggleStatus(){this.status=this.status=="empty"?"filled":"empty"}setStatus(i){this.status=i,this.requestUpdate()}};B.styles=R`
|
|
158
158
|
:host {
|
|
@@ -193,16 +193,22 @@
|
|
|
193
193
|
:host([status="filled"]) .wishlist-button:hover svg path {
|
|
194
194
|
fill: var(--color-alpha-light-strong);
|
|
195
195
|
}
|
|
196
|
-
`;wt([p({type:String,reflect:!0})],B.prototype,"status",2);B=wt([
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
196
|
+
`;wt([p({type:String,reflect:!0})],B.prototype,"status",2);B=wt([st("o-wishlist-button")],B);var re=Object.defineProperty,ie=Object.getOwnPropertyDescriptor,P=(i,t,e,s)=>{for(var r=s>1?void 0:s?ie(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&&re(t,e,r),r};let $=class extends w{constructor(){super(...arguments),this.bgstyle="background-light",this.size="medium",this.status="empty",this.type="button",this.icon="wishlist",this.disabled=!1}render(){const t=(At[this.icon]??"").replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return A`
|
|
197
|
+
${this.type==="span"?A`
|
|
198
|
+
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status}" ?disabled="${this.disabled}">
|
|
199
|
+
${Q(t)}
|
|
200
|
+
</span>
|
|
201
|
+
`:A`
|
|
202
|
+
<button
|
|
203
|
+
type="button"
|
|
204
|
+
aria-label="icon"
|
|
205
|
+
class="icon-button ${this.size} ${this.bgstyle} ${this.status}"
|
|
206
|
+
?disabled="${this.disabled}"
|
|
207
|
+
>
|
|
208
|
+
${Q(t)}
|
|
209
|
+
</button>
|
|
210
|
+
`}
|
|
211
|
+
`}};$.styles=R`
|
|
206
212
|
:host {
|
|
207
213
|
display: inline-flex;
|
|
208
214
|
justify-content: center;
|
|
@@ -246,6 +252,45 @@
|
|
|
246
252
|
height: 40px;
|
|
247
253
|
}
|
|
248
254
|
|
|
255
|
+
.icon-button.none-light, .icon-button.none-contrast {
|
|
256
|
+
background-color: transparent;
|
|
257
|
+
width: auto;
|
|
258
|
+
height: auto;
|
|
259
|
+
|
|
260
|
+
&.small {
|
|
261
|
+
svg {
|
|
262
|
+
width: 8px;
|
|
263
|
+
height: 8px;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
&.medium {
|
|
268
|
+
svg {
|
|
269
|
+
width: 16px;
|
|
270
|
+
height: 16px;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
&.large {
|
|
275
|
+
svg {
|
|
276
|
+
width: 24px;
|
|
277
|
+
height: 24px;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
&:disabled {
|
|
282
|
+
background-color: transparent;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.icon-button.none-light {
|
|
287
|
+
svg {
|
|
288
|
+
path {
|
|
289
|
+
stroke: var(--color-content-action-primary);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
249
294
|
.icon-button.background-light {
|
|
250
295
|
background-color: var(--color-alpha-light-strong);
|
|
251
296
|
|
|
@@ -272,11 +317,11 @@
|
|
|
272
317
|
|
|
273
318
|
.icon-button.ghost-light {
|
|
274
319
|
background-color: transparent;
|
|
275
|
-
&.filled {
|
|
320
|
+
/* &.filled {
|
|
276
321
|
svg {
|
|
277
322
|
fill: var(--color-content-action-primary);
|
|
278
323
|
}
|
|
279
|
-
}
|
|
324
|
+
} */
|
|
280
325
|
|
|
281
326
|
svg {
|
|
282
327
|
path {
|
|
@@ -317,4 +362,4 @@
|
|
|
317
362
|
}
|
|
318
363
|
|
|
319
364
|
}
|
|
320
|
-
`;
|
|
365
|
+
`;P([p({type:String,reflect:!0})],$.prototype,"bgstyle",2);P([p({type:String,reflect:!0})],$.prototype,"size",2);P([p({type:String,reflect:!0})],$.prototype,"status",2);P([p({type:String,reflect:!0})],$.prototype,"type",2);P([p({type:String})],$.prototype,"icon",2);P([p({type:Boolean,reflect:!0})],$.prototype,"disabled",2);$=P([st("o-icon-button")],$);
|
package/index.mjs
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const I = globalThis,
|
|
7
|
-
let
|
|
6
|
+
const I = globalThis, X = I.ShadowRoot && (I.ShadyCSS === void 0 || I.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Y = Symbol(), it = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let $t = class {
|
|
8
8
|
constructor(t, e, s) {
|
|
9
|
-
if (this._$cssResult$ = !0, s !==
|
|
9
|
+
if (this._$cssResult$ = !0, s !== Y) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = t, this.t = e;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
13
13
|
let t = this.o;
|
|
14
14
|
const e = this.t;
|
|
15
|
-
if (
|
|
15
|
+
if (X && t === void 0) {
|
|
16
16
|
const s = e !== void 0 && e.length === 1;
|
|
17
|
-
s && (t =
|
|
17
|
+
s && (t = it.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && it.set(e, t));
|
|
18
18
|
}
|
|
19
19
|
return t;
|
|
20
20
|
}
|
|
@@ -22,30 +22,30 @@ let ft = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
25
|
+
const ft = (i) => new $t(typeof i == "string" ? i : i + "", void 0, Y), R = (i, ...t) => {
|
|
26
26
|
const e = i.length === 1 ? i[0] : t.reduce((s, r, n) => s + ((o) => {
|
|
27
27
|
if (o._$cssResult$ === !0) return o.cssText;
|
|
28
28
|
if (typeof o == "number") return o;
|
|
29
29
|
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.");
|
|
30
30
|
})(r) + i[n + 1], i[0]);
|
|
31
|
-
return new
|
|
31
|
+
return new $t(e, i, Y);
|
|
32
32
|
}, St = (i, t) => {
|
|
33
|
-
if (
|
|
33
|
+
if (X) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
34
34
|
else for (const e of t) {
|
|
35
35
|
const s = document.createElement("style"), r = I.litNonce;
|
|
36
36
|
r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, ot = X ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
39
39
|
let e = "";
|
|
40
40
|
for (const s of t.cssRules) e += s.cssText;
|
|
41
|
-
return
|
|
41
|
+
return ft(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:
|
|
48
|
+
const { is: xt, defineProperty: Et, getOwnPropertyDescriptor: Pt, getOwnPropertyNames: Ct, getOwnPropertySymbols: Ot, getPrototypeOf: Ut } = Object, y = globalThis, nt = y.trustedTypes, Tt = nt ? nt.emptyScript : "", W = y.reactiveElementPolyfillSupport, T = (i, t) => i, L = { toAttribute(i, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
51
|
i = i ? Tt : null;
|
|
@@ -73,19 +73,19 @@ const { is: Et, defineProperty: xt, getOwnPropertyDescriptor: Pt, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return e;
|
|
76
|
-
} },
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
78
|
-
class
|
|
76
|
+
} }, tt = (i, t) => !xt(i, t), at = { attribute: !0, type: String, converter: L, reflect: !1, hasChanged: tt };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), y.litPropertyMetadata ?? (y.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
|
+
class C extends HTMLElement {
|
|
79
79
|
static addInitializer(t) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
81
81
|
}
|
|
82
82
|
static get observedAttributes() {
|
|
83
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
84
|
}
|
|
85
|
-
static createProperty(t, e =
|
|
85
|
+
static createProperty(t, e = at) {
|
|
86
86
|
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
87
87
|
const s = Symbol(), r = this.getPropertyDescriptor(t, s, e);
|
|
88
|
-
r !== void 0 &&
|
|
88
|
+
r !== void 0 && Et(this.prototype, t, r);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(t, e, s) {
|
|
@@ -102,16 +102,16 @@ class x extends HTMLElement {
|
|
|
102
102
|
}, configurable: !0, enumerable: !0 };
|
|
103
103
|
}
|
|
104
104
|
static getPropertyOptions(t) {
|
|
105
|
-
return this.elementProperties.get(t) ??
|
|
105
|
+
return this.elementProperties.get(t) ?? at;
|
|
106
106
|
}
|
|
107
107
|
static _$Ei() {
|
|
108
|
-
if (this.hasOwnProperty(
|
|
108
|
+
if (this.hasOwnProperty(T("elementProperties"))) return;
|
|
109
109
|
const t = Ut(this);
|
|
110
110
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
111
111
|
}
|
|
112
112
|
static finalize() {
|
|
113
|
-
if (this.hasOwnProperty(
|
|
114
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
113
|
+
if (this.hasOwnProperty(T("finalized"))) return;
|
|
114
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(T("properties"))) {
|
|
115
115
|
const e = this.properties, s = [...Ct(e), ...Ot(e)];
|
|
116
116
|
for (const r of s) this.createProperty(r, e[r]);
|
|
117
117
|
}
|
|
@@ -131,8 +131,8 @@ class x 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 r of s) e.unshift(
|
|
135
|
-
} else t !== void 0 && e.push(
|
|
134
|
+
for (const r of s) e.unshift(ot(r));
|
|
135
|
+
} else t !== void 0 && e.push(ot(t));
|
|
136
136
|
return e;
|
|
137
137
|
}
|
|
138
138
|
static _$Eu(t, e) {
|
|
@@ -200,7 +200,7 @@ class x extends HTMLElement {
|
|
|
200
200
|
}
|
|
201
201
|
requestUpdate(t, e, s) {
|
|
202
202
|
if (t !== void 0) {
|
|
203
|
-
if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ??
|
|
203
|
+
if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? tt)(this[t], e)) return;
|
|
204
204
|
this.P(t, e, s);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
@@ -273,30 +273,30 @@ class x extends HTMLElement {
|
|
|
273
273
|
firstUpdated(t) {
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
|
|
276
|
+
C.elementStyles = [], C.shadowRootOptions = { mode: "open" }, C[T("elementProperties")] = /* @__PURE__ */ new Map(), C[T("finalized")] = /* @__PURE__ */ new Map(), W == null || W({ ReactiveElement: C }), (y.reactiveElementVersions ?? (y.reactiveElementVersions = [])).push("2.0.4");
|
|
277
277
|
/**
|
|
278
278
|
* @license
|
|
279
279
|
* Copyright 2017 Google LLC
|
|
280
280
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
281
|
*/
|
|
282
|
-
const
|
|
283
|
-
\f\r]`,
|
|
284
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
285
|
-
function
|
|
286
|
-
if (!
|
|
287
|
-
return
|
|
282
|
+
const k = globalThis, D = k.trustedTypes, lt = D ? D.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, vt = "$lit$", v = `lit$${Math.random().toFixed(9).slice(2)}$`, yt = "?" + v, kt = `<${yt}>`, S = document, H = () => S.createComment(""), M = (i) => i === null || typeof i != "object" && typeof i != "function", et = Array.isArray, Ht = (i) => et(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", q = `[
|
|
283
|
+
\f\r]`, U = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ht = /-->/g, ct = />/g, _ = RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^
|
|
284
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), dt = /'/g, ut = /"/g, _t = /^(?:script|style|textarea|title)$/i, Mt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), A = Mt(1), x = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), pt = /* @__PURE__ */ new WeakMap(), m = S.createTreeWalker(S, 129);
|
|
285
|
+
function mt(i, t) {
|
|
286
|
+
if (!et(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
287
|
+
return lt !== void 0 ? lt.createHTML(t) : t;
|
|
288
288
|
}
|
|
289
289
|
const Nt = (i, t) => {
|
|
290
290
|
const e = i.length - 1, s = [];
|
|
291
|
-
let r, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o =
|
|
291
|
+
let r, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = U;
|
|
292
292
|
for (let l = 0; l < e; l++) {
|
|
293
293
|
const a = i[l];
|
|
294
|
-
let d, u, h = -1,
|
|
295
|
-
for (;
|
|
296
|
-
const
|
|
297
|
-
n += o ===
|
|
294
|
+
let d, u, h = -1, g = 0;
|
|
295
|
+
for (; g < a.length && (o.lastIndex = g, u = o.exec(a), u !== null); ) g = o.lastIndex, o === U ? u[1] === "!--" ? o = ht : u[1] !== void 0 ? o = ct : u[2] !== void 0 ? (_t.test(u[2]) && (r = RegExp("</" + u[2], "g")), o = _) : u[3] !== void 0 && (o = _) : o === _ ? u[0] === ">" ? (o = r ?? U, h = -1) : u[1] === void 0 ? h = -2 : (h = o.lastIndex - u[2].length, d = u[1], o = u[3] === void 0 ? _ : u[3] === '"' ? ut : dt) : o === ut || o === dt ? o = _ : o === ht || o === ct ? o = U : (o = _, r = void 0);
|
|
296
|
+
const f = o === _ && i[l + 1].startsWith("/>") ? " " : "";
|
|
297
|
+
n += o === U ? a + kt : h >= 0 ? (s.push(d), a.slice(0, h) + vt + a.slice(h) + v + f) : a + v + (h === -2 ? l : f);
|
|
298
298
|
}
|
|
299
|
-
return [
|
|
299
|
+
return [mt(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
300
300
|
};
|
|
301
301
|
class N {
|
|
302
302
|
constructor({ strings: t, _$litType$: e }, s) {
|
|
@@ -310,37 +310,37 @@ class N {
|
|
|
310
310
|
}
|
|
311
311
|
for (; (r = m.nextNode()) !== null && a.length < l; ) {
|
|
312
312
|
if (r.nodeType === 1) {
|
|
313
|
-
if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(
|
|
314
|
-
const
|
|
315
|
-
a.push({ type: 1, index: n, name:
|
|
316
|
-
} else h.startsWith(
|
|
313
|
+
if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(vt)) {
|
|
314
|
+
const g = u[o++], f = r.getAttribute(h).split(v), j = /([.?@])?(.*)/.exec(g);
|
|
315
|
+
a.push({ type: 1, index: n, name: j[2], strings: f, ctor: j[1] === "." ? zt : j[1] === "?" ? jt : j[1] === "@" ? It : V }), r.removeAttribute(h);
|
|
316
|
+
} else h.startsWith(v) && (a.push({ type: 6, index: n }), r.removeAttribute(h));
|
|
317
317
|
if (_t.test(r.tagName)) {
|
|
318
|
-
const h = r.textContent.split(
|
|
319
|
-
if (
|
|
318
|
+
const h = r.textContent.split(v), g = h.length - 1;
|
|
319
|
+
if (g > 0) {
|
|
320
320
|
r.textContent = D ? D.emptyScript : "";
|
|
321
|
-
for (let
|
|
322
|
-
r.append(h[
|
|
321
|
+
for (let f = 0; f < g; f++) r.append(h[f], H()), m.nextNode(), a.push({ type: 2, index: ++n });
|
|
322
|
+
r.append(h[g], H());
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
} else if (r.nodeType === 8) if (r.data ===
|
|
325
|
+
} else if (r.nodeType === 8) if (r.data === yt) a.push({ type: 2, index: n });
|
|
326
326
|
else {
|
|
327
327
|
let h = -1;
|
|
328
|
-
for (; (h = r.data.indexOf(
|
|
328
|
+
for (; (h = r.data.indexOf(v, h + 1)) !== -1; ) a.push({ type: 7, index: n }), h += v.length - 1;
|
|
329
329
|
}
|
|
330
330
|
n++;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
static createElement(t, e) {
|
|
334
|
-
const s =
|
|
334
|
+
const s = S.createElement("template");
|
|
335
335
|
return s.innerHTML = t, s;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function O(i, t, e = i, s) {
|
|
339
339
|
var o, l;
|
|
340
|
-
if (t ===
|
|
340
|
+
if (t === x) return t;
|
|
341
341
|
let r = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
|
|
342
342
|
const n = M(t) ? void 0 : t._$litDirective$;
|
|
343
|
-
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 =
|
|
343
|
+
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 = O(i, r._$AS(i, t.values), r, s)), t;
|
|
344
344
|
}
|
|
345
345
|
class Rt {
|
|
346
346
|
constructor(t, e) {
|
|
@@ -353,24 +353,24 @@ class Rt {
|
|
|
353
353
|
return this._$AM._$AU;
|
|
354
354
|
}
|
|
355
355
|
u(t) {
|
|
356
|
-
const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ??
|
|
356
|
+
const { el: { content: e }, parts: s } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? S).importNode(e, !0);
|
|
357
357
|
m.currentNode = r;
|
|
358
358
|
let n = m.nextNode(), o = 0, l = 0, a = s[0];
|
|
359
359
|
for (; a !== void 0; ) {
|
|
360
360
|
if (o === a.index) {
|
|
361
361
|
let d;
|
|
362
|
-
a.type === 2 ? d = new
|
|
362
|
+
a.type === 2 ? d = new z(n, n.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (d = new Lt(n, this, t)), this._$AV.push(d), a = s[++l];
|
|
363
363
|
}
|
|
364
364
|
o !== (a == null ? void 0 : a.index) && (n = m.nextNode(), o++);
|
|
365
365
|
}
|
|
366
|
-
return m.currentNode =
|
|
366
|
+
return m.currentNode = S, r;
|
|
367
367
|
}
|
|
368
368
|
p(t) {
|
|
369
369
|
let e = 0;
|
|
370
370
|
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++;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
class
|
|
373
|
+
class z {
|
|
374
374
|
get _$AU() {
|
|
375
375
|
var t;
|
|
376
376
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
@@ -390,7 +390,7 @@ class j {
|
|
|
390
390
|
return this._$AB;
|
|
391
391
|
}
|
|
392
392
|
_$AI(t, e = this) {
|
|
393
|
-
t =
|
|
393
|
+
t = O(this, t, e), M(t) ? t === c || t == null || t === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : t !== this._$AH && t !== x && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ht(t) ? this.k(t) : this._(t);
|
|
394
394
|
}
|
|
395
395
|
O(t) {
|
|
396
396
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -399,11 +399,11 @@ class j {
|
|
|
399
399
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
400
400
|
}
|
|
401
401
|
_(t) {
|
|
402
|
-
this._$AH !== c && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(
|
|
402
|
+
this._$AH !== c && M(this._$AH) ? this._$AA.nextSibling.data = t : this.T(S.createTextNode(t)), this._$AH = t;
|
|
403
403
|
}
|
|
404
404
|
$(t) {
|
|
405
405
|
var n;
|
|
406
|
-
const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = N.createElement(
|
|
406
|
+
const { values: e, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = N.createElement(mt(s.h, s.h[0]), this.options)), s);
|
|
407
407
|
if (((n = this._$AH) == null ? void 0 : n._$AD) === r) this._$AH.p(e);
|
|
408
408
|
else {
|
|
409
409
|
const o = new Rt(r, this), l = o.u(this.options);
|
|
@@ -411,14 +411,14 @@ class j {
|
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
_$AC(t) {
|
|
414
|
-
let e =
|
|
415
|
-
return e === void 0 &&
|
|
414
|
+
let e = pt.get(t.strings);
|
|
415
|
+
return e === void 0 && pt.set(t.strings, e = new N(t)), e;
|
|
416
416
|
}
|
|
417
417
|
k(t) {
|
|
418
|
-
|
|
418
|
+
et(this._$AH) || (this._$AH = [], this._$AR());
|
|
419
419
|
const e = this._$AH;
|
|
420
420
|
let s, r = 0;
|
|
421
|
-
for (const n of t) r === e.length ? e.push(s = new
|
|
421
|
+
for (const n of t) r === e.length ? e.push(s = new z(this.O(H()), this.O(H()), this, this.options)) : s = e[r], s._$AI(n), r++;
|
|
422
422
|
r < e.length && (this._$AR(s && s._$AB.nextSibling, r), e.length = r);
|
|
423
423
|
}
|
|
424
424
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -446,11 +446,11 @@ class V {
|
|
|
446
446
|
_$AI(t, e = this, s, r) {
|
|
447
447
|
const n = this.strings;
|
|
448
448
|
let o = !1;
|
|
449
|
-
if (n === void 0) t =
|
|
449
|
+
if (n === void 0) t = O(this, t, e, 0), o = !M(t) || t !== this._$AH && t !== x, o && (this._$AH = t);
|
|
450
450
|
else {
|
|
451
451
|
const l = t;
|
|
452
452
|
let a, d;
|
|
453
|
-
for (t = n[0], a = 0; a < n.length - 1; a++) d =
|
|
453
|
+
for (t = n[0], a = 0; a < n.length - 1; a++) d = O(this, l[s + a], e, a), d === x && (d = this._$AH[a]), o || (o = !M(d) || d !== this._$AH[a]), d === c ? t = c : t !== c && (t += (d ?? "") + n[a + 1]), this._$AH[a] = d;
|
|
454
454
|
}
|
|
455
455
|
o && !r && this.j(t);
|
|
456
456
|
}
|
|
@@ -458,7 +458,7 @@ class V {
|
|
|
458
458
|
t === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
class
|
|
461
|
+
class zt extends V {
|
|
462
462
|
constructor() {
|
|
463
463
|
super(...arguments), this.type = 3;
|
|
464
464
|
}
|
|
@@ -466,7 +466,7 @@ class jt extends V {
|
|
|
466
466
|
this.element[this.name] = t === c ? void 0 : t;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
class
|
|
469
|
+
class jt extends V {
|
|
470
470
|
constructor() {
|
|
471
471
|
super(...arguments), this.type = 4;
|
|
472
472
|
}
|
|
@@ -479,7 +479,7 @@ class It extends V {
|
|
|
479
479
|
super(t, e, s, r, n), this.type = 5;
|
|
480
480
|
}
|
|
481
481
|
_$AI(t, e = this) {
|
|
482
|
-
if ((t =
|
|
482
|
+
if ((t = O(this, t, e, 0) ?? c) === x) return;
|
|
483
483
|
const s = this._$AH, r = t === c && s !== c || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== c && (s === c || r);
|
|
484
484
|
r && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
485
485
|
}
|
|
@@ -496,17 +496,17 @@ class Lt {
|
|
|
496
496
|
return this._$AM._$AU;
|
|
497
497
|
}
|
|
498
498
|
_$AI(t) {
|
|
499
|
-
|
|
499
|
+
O(this, t);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
const F =
|
|
503
|
-
F == null || F(N,
|
|
502
|
+
const F = k.litHtmlPolyfillSupport;
|
|
503
|
+
F == null || F(N, z), (k.litHtmlVersions ?? (k.litHtmlVersions = [])).push("3.2.1");
|
|
504
504
|
const Dt = (i, t, e) => {
|
|
505
505
|
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
506
506
|
let r = s._$litPart$;
|
|
507
507
|
if (r === void 0) {
|
|
508
508
|
const n = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
509
|
-
s._$litPart$ = r = new
|
|
509
|
+
s._$litPart$ = r = new z(t.insertBefore(H(), n), n, void 0, e ?? {});
|
|
510
510
|
}
|
|
511
511
|
return r._$AI(i), r;
|
|
512
512
|
};
|
|
@@ -515,7 +515,7 @@ const Dt = (i, t, e) => {
|
|
|
515
515
|
* Copyright 2017 Google LLC
|
|
516
516
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
517
517
|
*/
|
|
518
|
-
let
|
|
518
|
+
let w = class extends C {
|
|
519
519
|
constructor() {
|
|
520
520
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
521
521
|
}
|
|
@@ -537,20 +537,20 @@ let A = class extends x {
|
|
|
537
537
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
538
538
|
}
|
|
539
539
|
render() {
|
|
540
|
-
return
|
|
540
|
+
return x;
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
|
-
var
|
|
544
|
-
|
|
543
|
+
var gt;
|
|
544
|
+
w._$litElement$ = !0, w.finalized = !0, (gt = globalThis.litElementHydrateSupport) == null || gt.call(globalThis, { LitElement: w });
|
|
545
545
|
const Z = globalThis.litElementPolyfillSupport;
|
|
546
|
-
Z == null || Z({ LitElement:
|
|
546
|
+
Z == null || Z({ LitElement: w });
|
|
547
547
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
|
|
548
548
|
/**
|
|
549
549
|
* @license
|
|
550
550
|
* Copyright 2017 Google LLC
|
|
551
551
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
552
552
|
*/
|
|
553
|
-
const
|
|
553
|
+
const st = (i) => (t, e) => {
|
|
554
554
|
e !== void 0 ? e.addInitializer(() => {
|
|
555
555
|
customElements.define(i, t);
|
|
556
556
|
}) : customElements.define(i, t);
|
|
@@ -560,7 +560,7 @@ const et = (i) => (t, e) => {
|
|
|
560
560
|
* Copyright 2017 Google LLC
|
|
561
561
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
562
562
|
*/
|
|
563
|
-
const Bt = { attribute: !0, type: String, converter: L, reflect: !1, hasChanged:
|
|
563
|
+
const Bt = { attribute: !0, type: String, converter: L, reflect: !1, hasChanged: tt }, Vt = (i = Bt, t, e) => {
|
|
564
564
|
const { kind: s, metadata: r } = e;
|
|
565
565
|
let n = globalThis.litPropertyMetadata.get(r);
|
|
566
566
|
if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), n.set(e.name, i), s === "accessor") {
|
|
@@ -602,11 +602,11 @@ R`
|
|
|
602
602
|
* Copyright 2023 Google LLC
|
|
603
603
|
* SPDX-License-Identifier: Apache-2.0
|
|
604
604
|
*/
|
|
605
|
-
const
|
|
605
|
+
const rt = Symbol("internals"), J = Symbol("privateInternals");
|
|
606
606
|
function qt(i) {
|
|
607
607
|
var t;
|
|
608
608
|
class e extends i {
|
|
609
|
-
get [(t =
|
|
609
|
+
get [(t = rt, t)]() {
|
|
610
610
|
return this[J] || (this[J] = this.attachInternals()), this[J];
|
|
611
611
|
}
|
|
612
612
|
}
|
|
@@ -621,7 +621,7 @@ function Ft(i) {
|
|
|
621
621
|
i.addInitializer((t) => {
|
|
622
622
|
const e = t;
|
|
623
623
|
e.addEventListener("click", async (s) => {
|
|
624
|
-
const { type: r, [
|
|
624
|
+
const { type: r, [rt]: n } = e, { form: o } = n;
|
|
625
625
|
if (!(!o || r === "button") && (await new Promise((l) => {
|
|
626
626
|
setTimeout(l);
|
|
627
627
|
}), !s.defaultPrevented)) {
|
|
@@ -649,7 +649,7 @@ var Zt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, E = (i, t,
|
|
|
649
649
|
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
650
650
|
return s && r && Zt(t, e, r), r;
|
|
651
651
|
};
|
|
652
|
-
const Kt = qt(
|
|
652
|
+
const Kt = qt(w), bt = (i) => {
|
|
653
653
|
const t = `
|
|
654
654
|
--button-bg-disabled: var(--color-container-disabled);
|
|
655
655
|
--button-bg-pressed: var(--color-container-action-${i}-pressed);
|
|
@@ -664,7 +664,7 @@ const Kt = qt(A), pt = (i) => {
|
|
|
664
664
|
--button-text-hover: var(--color-content-action-${i});
|
|
665
665
|
--button-text: var(--color-content-action-${i});
|
|
666
666
|
`;
|
|
667
|
-
return
|
|
667
|
+
return ft(t);
|
|
668
668
|
}, Gt = ["primary", "secondary"];
|
|
669
669
|
let b = class extends Kt {
|
|
670
670
|
constructor() {
|
|
@@ -680,7 +680,7 @@ let b = class extends Kt {
|
|
|
680
680
|
* The associated form element with which this element's value will submit.
|
|
681
681
|
*/
|
|
682
682
|
get form() {
|
|
683
|
-
return this[
|
|
683
|
+
return this[rt].form;
|
|
684
684
|
}
|
|
685
685
|
// TODO: Add aria attributes support
|
|
686
686
|
// Adapt from: https://github.dev/material-components/material-web
|
|
@@ -690,15 +690,15 @@ let b = class extends Kt {
|
|
|
690
690
|
}
|
|
691
691
|
render() {
|
|
692
692
|
const i = this.href ? this.renderLink() : this.renderButton();
|
|
693
|
-
return
|
|
693
|
+
return A`${i}`;
|
|
694
694
|
}
|
|
695
695
|
renderLink() {
|
|
696
|
-
return
|
|
696
|
+
return A`<a href=${this.href} target=${this.target || c} class="button" ?disabled=${this.disabled}>
|
|
697
697
|
<slot />
|
|
698
698
|
</a>`;
|
|
699
699
|
}
|
|
700
700
|
renderButton() {
|
|
701
|
-
return
|
|
701
|
+
return A`<button class="button" ?disabled=${this.disabled}>
|
|
702
702
|
<slot />
|
|
703
703
|
</button>`;
|
|
704
704
|
}
|
|
@@ -709,12 +709,12 @@ b.styles = R`
|
|
|
709
709
|
:host {
|
|
710
710
|
display: inline-flex;
|
|
711
711
|
cursor: pointer;
|
|
712
|
-
${
|
|
712
|
+
${bt("primary")};
|
|
713
713
|
--button-border: transparent;
|
|
714
714
|
}
|
|
715
715
|
|
|
716
716
|
:host([variant="secondary"]) {
|
|
717
|
-
${
|
|
717
|
+
${bt("secondary")};
|
|
718
718
|
}
|
|
719
719
|
|
|
720
720
|
:host([disabled]) {
|
|
@@ -801,7 +801,7 @@ E([
|
|
|
801
801
|
p()
|
|
802
802
|
], b.prototype, "target", 2);
|
|
803
803
|
b = E([
|
|
804
|
-
|
|
804
|
+
st("o-button")
|
|
805
805
|
], b);
|
|
806
806
|
/**
|
|
807
807
|
* @license
|
|
@@ -836,7 +836,7 @@ class K extends Yt {
|
|
|
836
836
|
}
|
|
837
837
|
render(t) {
|
|
838
838
|
if (t === c || t == null) return this._t = void 0, this.it = t;
|
|
839
|
-
if (t ===
|
|
839
|
+
if (t === x) return t;
|
|
840
840
|
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
841
841
|
if (t === this.it) return this._t;
|
|
842
842
|
this.it = t;
|
|
@@ -853,7 +853,7 @@ K.directiveName = "unsafeHTML", K.resultType = 1;
|
|
|
853
853
|
class G extends K {
|
|
854
854
|
}
|
|
855
855
|
G.directiveName = "unsafeSVG", G.resultType = 2;
|
|
856
|
-
const
|
|
856
|
+
const Q = Xt(G), te = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
857
857
|
<path d="M8 3.6275C7.06799 0.971489 3.25399 -0.0226278 1.67414 2.30983C0.0877404 4.65197 1.67414 6.99412 2.62598 8.33249C3.0147 8.87905 8 14 8 14C8 14 12.9853 8.87905 13.374 8.33249C14.3259 6.99412 15.9123 4.65197 14.3259 2.30983C12.746 -0.0226277 8.97167 0.971489 8 3.6275Z" stroke="#3F2B2E" stroke-linecap="round"/>
|
|
858
858
|
</svg>
|
|
859
859
|
`, At = {
|
|
@@ -864,7 +864,7 @@ var ee = Object.defineProperty, se = Object.getOwnPropertyDescriptor, wt = (i, t
|
|
|
864
864
|
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
865
865
|
return s && r && ee(t, e, r), r;
|
|
866
866
|
};
|
|
867
|
-
let B = class extends
|
|
867
|
+
let B = class extends w {
|
|
868
868
|
constructor() {
|
|
869
869
|
super(...arguments), this.status = "empty";
|
|
870
870
|
}
|
|
@@ -873,7 +873,7 @@ let B = class extends A {
|
|
|
873
873
|
"<svg",
|
|
874
874
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
875
875
|
);
|
|
876
|
-
return
|
|
876
|
+
return A`
|
|
877
877
|
<button
|
|
878
878
|
type="button"
|
|
879
879
|
aria-label="Add to wishlist"
|
|
@@ -881,7 +881,7 @@ let B = class extends A {
|
|
|
881
881
|
class="wishlist-button"
|
|
882
882
|
@click="${this.toggleStatus}"
|
|
883
883
|
>
|
|
884
|
-
${
|
|
884
|
+
${Q(i)}
|
|
885
885
|
</button>
|
|
886
886
|
`;
|
|
887
887
|
}
|
|
@@ -936,35 +936,41 @@ wt([
|
|
|
936
936
|
p({ type: String, reflect: !0 })
|
|
937
937
|
], B.prototype, "status", 2);
|
|
938
938
|
B = wt([
|
|
939
|
-
|
|
939
|
+
st("o-wishlist-button")
|
|
940
940
|
], B);
|
|
941
|
-
var re = Object.defineProperty, ie = Object.getOwnPropertyDescriptor,
|
|
941
|
+
var re = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, P = (i, t, e, s) => {
|
|
942
942
|
for (var r = s > 1 ? void 0 : s ? ie(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
943
943
|
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
944
944
|
return s && r && re(t, e, r), r;
|
|
945
945
|
};
|
|
946
|
-
let
|
|
946
|
+
let $ = class extends w {
|
|
947
947
|
constructor() {
|
|
948
|
-
super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.icon = "wishlist", this.disabled = !1;
|
|
948
|
+
super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.icon = "wishlist", this.disabled = !1;
|
|
949
949
|
}
|
|
950
950
|
render() {
|
|
951
951
|
const t = (At[this.icon] ?? "").replace(
|
|
952
952
|
"<svg",
|
|
953
953
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
954
954
|
);
|
|
955
|
-
return
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
955
|
+
return A`
|
|
956
|
+
${this.type === "span" ? A`
|
|
957
|
+
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status}" ?disabled="${this.disabled}">
|
|
958
|
+
${Q(t)}
|
|
959
|
+
</span>
|
|
960
|
+
` : A`
|
|
961
|
+
<button
|
|
962
|
+
type="button"
|
|
963
|
+
aria-label="icon"
|
|
964
|
+
class="icon-button ${this.size} ${this.bgstyle} ${this.status}"
|
|
965
|
+
?disabled="${this.disabled}"
|
|
966
|
+
>
|
|
967
|
+
${Q(t)}
|
|
968
|
+
</button>
|
|
969
|
+
`}
|
|
964
970
|
`;
|
|
965
971
|
}
|
|
966
972
|
};
|
|
967
|
-
|
|
973
|
+
$.styles = R`
|
|
968
974
|
:host {
|
|
969
975
|
display: inline-flex;
|
|
970
976
|
justify-content: center;
|
|
@@ -1008,6 +1014,45 @@ _.styles = R`
|
|
|
1008
1014
|
height: 40px;
|
|
1009
1015
|
}
|
|
1010
1016
|
|
|
1017
|
+
.icon-button.none-light, .icon-button.none-contrast {
|
|
1018
|
+
background-color: transparent;
|
|
1019
|
+
width: auto;
|
|
1020
|
+
height: auto;
|
|
1021
|
+
|
|
1022
|
+
&.small {
|
|
1023
|
+
svg {
|
|
1024
|
+
width: 8px;
|
|
1025
|
+
height: 8px;
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
&.medium {
|
|
1030
|
+
svg {
|
|
1031
|
+
width: 16px;
|
|
1032
|
+
height: 16px;
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
&.large {
|
|
1037
|
+
svg {
|
|
1038
|
+
width: 24px;
|
|
1039
|
+
height: 24px;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
&:disabled {
|
|
1044
|
+
background-color: transparent;
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
.icon-button.none-light {
|
|
1049
|
+
svg {
|
|
1050
|
+
path {
|
|
1051
|
+
stroke: var(--color-content-action-primary);
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1011
1056
|
.icon-button.background-light {
|
|
1012
1057
|
background-color: var(--color-alpha-light-strong);
|
|
1013
1058
|
|
|
@@ -1034,11 +1079,11 @@ _.styles = R`
|
|
|
1034
1079
|
|
|
1035
1080
|
.icon-button.ghost-light {
|
|
1036
1081
|
background-color: transparent;
|
|
1037
|
-
&.filled {
|
|
1082
|
+
/* &.filled {
|
|
1038
1083
|
svg {
|
|
1039
1084
|
fill: var(--color-content-action-primary);
|
|
1040
1085
|
}
|
|
1041
|
-
}
|
|
1086
|
+
} */
|
|
1042
1087
|
|
|
1043
1088
|
svg {
|
|
1044
1089
|
path {
|
|
@@ -1080,21 +1125,24 @@ _.styles = R`
|
|
|
1080
1125
|
|
|
1081
1126
|
}
|
|
1082
1127
|
`;
|
|
1083
|
-
|
|
1128
|
+
P([
|
|
1129
|
+
p({ type: String, reflect: !0 })
|
|
1130
|
+
], $.prototype, "bgstyle", 2);
|
|
1131
|
+
P([
|
|
1084
1132
|
p({ type: String, reflect: !0 })
|
|
1085
|
-
],
|
|
1086
|
-
|
|
1133
|
+
], $.prototype, "size", 2);
|
|
1134
|
+
P([
|
|
1087
1135
|
p({ type: String, reflect: !0 })
|
|
1088
|
-
],
|
|
1089
|
-
|
|
1136
|
+
], $.prototype, "status", 2);
|
|
1137
|
+
P([
|
|
1090
1138
|
p({ type: String, reflect: !0 })
|
|
1091
|
-
],
|
|
1092
|
-
|
|
1139
|
+
], $.prototype, "type", 2);
|
|
1140
|
+
P([
|
|
1093
1141
|
p({ type: String })
|
|
1094
|
-
],
|
|
1095
|
-
|
|
1142
|
+
], $.prototype, "icon", 2);
|
|
1143
|
+
P([
|
|
1096
1144
|
p({ type: Boolean, reflect: !0 })
|
|
1097
|
-
],
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
],
|
|
1145
|
+
], $.prototype, "disabled", 2);
|
|
1146
|
+
$ = P([
|
|
1147
|
+
st("o-icon-button")
|
|
1148
|
+
], $);
|