@florid-kit/components 0.3.8 → 0.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +21 -15
- package/index.mjs +88 -82
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
13
|
*/const B=globalThis,W=B.trustedTypes,ut=W?W.createPolicy("lit-html",{createHTML:i=>i}):void 0,wt="$lit$",m=`lit$${Math.random().toFixed(9).slice(2)}$`,At="?"+m,Ht=`<${At}>`,P=document,L=()=>P.createComment(""),N=i=>i===null||typeof i!="object"&&typeof i!="function",nt=Array.isArray,zt=i=>nt(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",X=`[
|
|
14
|
-
\f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pt=/-->/g,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
14
|
+
\f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pt=/-->/g,bt=/>/g,E=RegExp(`>|${X}(?:([^\\s"'>=/]+)(${X}*=${X}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ft=/'/g,gt=/"/g,xt=/^(?:script|style|textarea|title)$/i,Bt=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),f=Bt(1),O=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),vt=new WeakMap,S=P.createTreeWalker(P,129);function Et(i,t){if(!nt(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ut!==void 0?ut.createHTML(t):t}const Lt=(i,t)=>{const e=i.length-1,s=[];let r,n=t===2?"<svg>":t===3?"<math>":"",o=H;for(let l=0;l<e;l++){const a=i[l];let u,p,c=-1,v=0;for(;v<a.length&&(o.lastIndex=v,p=o.exec(a),p!==null);)v=o.lastIndex,o===H?p[1]==="!--"?o=pt:p[1]!==void 0?o=bt:p[2]!==void 0?(xt.test(p[2])&&(r=RegExp("</"+p[2],"g")),o=E):p[3]!==void 0&&(o=E):o===E?p[0]===">"?(o=r??H,c=-1):p[1]===void 0?c=-2:(c=o.lastIndex-p[2].length,u=p[1],o=p[3]===void 0?E:p[3]==='"'?gt:ft):o===gt||o===ft?o=E:o===pt||o===bt?o=H:(o=E,r=void 0);const y=o===E&&i[l+1].startsWith("/>")?" ":"";n+=o===H?a+Ht:c>=0?(s.push(u),a.slice(0,c)+wt+a.slice(c)+m+y):a+m+(c===-2?l:y)}return[Et(i,n+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class D{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let n=0,o=0;const l=t.length-1,a=this.parts,[u,p]=Lt(t,e);if(this.el=D.createElement(u,s),S.currentNode=this.el.content,e===2||e===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(r=S.nextNode())!==null&&a.length<l;){if(r.nodeType===1){if(r.hasAttributes())for(const c of r.getAttributeNames())if(c.endsWith(wt)){const v=p[o++],y=r.getAttribute(c).split(m),j=/([.?@])?(.*)/.exec(v);a.push({type:1,index:n,name:j[2],strings:y,ctor:j[1]==="."?Dt:j[1]==="?"?Rt:j[1]==="@"?jt:F}),r.removeAttribute(c)}else c.startsWith(m)&&(a.push({type:6,index:n}),r.removeAttribute(c));if(xt.test(r.tagName)){const c=r.textContent.split(m),v=c.length-1;if(v>0){r.textContent=W?W.emptyScript:"";for(let y=0;y<v;y++)r.append(c[y],L()),S.nextNode(),a.push({type:2,index:++n});r.append(c[v],L())}}}else if(r.nodeType===8)if(r.data===At)a.push({type:2,index:n});else{let c=-1;for(;(c=r.data.indexOf(m,c+1))!==-1;)a.push({type:7,index:n}),c+=m.length-1}n++}}static createElement(t,e){const s=P.createElement("template");return s.innerHTML=t,s}}function M(i,t,e=i,s){var o,l;if(t===O)return t;let r=s!==void 0?(o=e._$Co)==null?void 0:o[s]:e._$Cl;const n=N(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==n&&((l=r==null?void 0:r._$AO)==null||l.call(r,!1),n===void 0?r=void 0:(r=new n(i),r._$AT(i,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=r:e._$Cl=r),r!==void 0&&(t=M(i,r._$AS(i,t.values),r,s)),t}class Nt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,r=((t==null?void 0:t.creationScope)??P).importNode(e,!0);S.currentNode=r;let n=S.nextNode(),o=0,l=0,a=s[0];for(;a!==void 0;){if(o===a.index){let u;a.type===2?u=new R(n,n.nextSibling,this,t):a.type===1?u=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(u=new Vt(n,this,t)),this._$AV.push(u),a=s[++l]}o!==(a==null?void 0:a.index)&&(n=S.nextNode(),o++)}return S.currentNode=P,r}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class R{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=(r==null?void 0:r.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=M(this,t,e),N(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==O&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):zt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&N(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){var n;const{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=D.createElement(Et(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)==null?void 0:n._$AD)===r)this._$AH.p(e);else{const o=new Nt(r,this),l=o.u(this.options);o.p(e),this.T(l),this._$AH=o}}_$AC(t){let e=vt.get(t.strings);return e===void 0&&vt.set(t.strings,e=new D(t)),e}k(t){nt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,r=0;for(const n of t)r===e.length?e.push(s=new R(this.O(L()),this.O(L()),this,this.options)):s=e[r],s._$AI(n),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var s;for((s=this._$AP)==null?void 0:s.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class F{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,r){const n=this.strings;let o=!1;if(n===void 0)t=M(this,t,e,0),o=!N(t)||t!==this._$AH&&t!==O,o&&(this._$AH=t);else{const l=t;let a,u;for(t=n[0],a=0;a<n.length-1;a++)u=M(this,l[s+a],e,a),u===O&&(u=this._$AH[a]),o||(o=!N(u)||u!==this._$AH[a]),u===d?t=d:t!==d&&(t+=(u??"")+n[a+1]),this._$AH[a]=u}o&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Dt extends F{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}}class Rt extends F{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}}class jt extends F{constructor(t,e,s,r,n){super(t,e,s,r,n),this.type=5}_$AI(t,e=this){if((t=M(this,t,e,0)??d)===O)return;const s=this._$AH,r=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==d&&(s===d||r);r&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Vt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){M(this,t)}}const G=B.litHtmlPolyfillSupport;G==null||G(D,R),(B.litHtmlVersions??(B.litHtmlVersions=[])).push("3.3.0");const qt=(i,t,e)=>{const s=(e==null?void 0:e.renderBefore)??t;let r=s._$litPart$;if(r===void 0){const n=(e==null?void 0:e.renderBefore)??null;s._$litPart$=r=new R(t.insertBefore(L(),n),n,void 0,e??{})}return r._$AI(i),r};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
--button-text-disabled: var(--color-content-disabled);
|
|
54
54
|
--button-text-hover: var(--color-content-action-${i});
|
|
55
55
|
--button-text: var(--color-content-action-${i});
|
|
56
|
-
`;return _t(t)},Yt=["primary","secondary"];let
|
|
56
|
+
`;return _t(t)},Yt=["primary","secondary"];let b=class extends Qt{constructor(){super(...arguments),this.type="submit",this.value="",this.variant="primary",this.customclass="",this.disabled=!1,this.href="",this.target=""}get name(){return this.getAttribute("name")??""}set name(i){this.setAttribute("name",i)}get form(){return this[at].form}willUpdate(){const i=getComputedStyle(this).getPropertyValue("--button-variant");i&&Yt.some(t=>t===i)&&(this.variant=i)}updated(){if(this.customclass){const i=this.customclass.split(" ").map(t=>t.trim()).filter(Boolean);this.classList.add(...i)}}render(){const i=this.href?this.renderLink():this.renderButton();return f`${i}`}renderLink(){return f`<a href=${this.href} target=${this.target||d} class="button" ?disabled=${this.disabled}>
|
|
57
57
|
<slot />
|
|
58
|
-
</a>`}renderButton(){return
|
|
58
|
+
</a>`}renderButton(){return f`<button class="button" ?disabled=${this.disabled}>
|
|
59
59
|
<slot />
|
|
60
|
-
</button>`}};Kt(
|
|
60
|
+
</button>`}};Kt(b);b.formAssociated=!0;b.styles=I`
|
|
61
61
|
:host {
|
|
62
62
|
display: inline-flex;
|
|
63
63
|
cursor: pointer;
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
${$t("secondary")};
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
:host([disabled]) {
|
|
76
|
+
:host([disabled]), :host([aria-disabled="true"]), :host([aria-disabled="true"]):hover {
|
|
77
77
|
--button-bg: var(--button-bg-disabled);
|
|
78
78
|
--button-text: var(--button-text-disabled);
|
|
79
79
|
--button-border: transparent;
|
|
@@ -85,6 +85,12 @@
|
|
|
85
85
|
--button-border: var(--button-border);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
:host([aria-disabled="true"]) button:hover {
|
|
89
|
+
background-color: var(--button-bg-disabled);
|
|
90
|
+
color: var(--button-text-disabled);
|
|
91
|
+
border-color: transparent;
|
|
92
|
+
}
|
|
93
|
+
|
|
88
94
|
.button {
|
|
89
95
|
-webkit-appearance: none;
|
|
90
96
|
align-items: center;
|
|
@@ -133,7 +139,7 @@
|
|
|
133
139
|
.button:focus-visible {
|
|
134
140
|
${Zt};
|
|
135
141
|
}
|
|
136
|
-
`;A([h()],
|
|
142
|
+
`;A([h()],b.prototype,"type",2);A([h({reflect:!0})],b.prototype,"value",2);A([h({reflect:!0})],b.prototype,"variant",2);A([h({type:String})],b.prototype,"customclass",2);A([h({converter:{fromAttribute:i=>i===""||i==="true"}})],b.prototype,"disabled",2);A([h()],b.prototype,"href",2);A([h()],b.prototype,"target",2);b=A([Z("o-button")],b);/**
|
|
137
143
|
* @license
|
|
138
144
|
* Copyright 2017 Google LLC
|
|
139
145
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -157,7 +163,7 @@
|
|
|
157
163
|
`,ne=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
158
164
|
<path d="M5 7.83838C6.02128 6.73401 8.16109 4.12121 11.4195 0L11.8571 0.282829C10.8116 2.59933 9.55927 5.17172 8.1003 8C9.55927 10.8283 10.8115 13.4007 11.8571 15.7172L11.4195 16C8.16109 11.8788 6.02128 9.266 5 8.16162L5 7.83838Z" fill="#3F2B2E"/>
|
|
159
165
|
</svg>
|
|
160
|
-
`,St={wishlist:re,playerv:ie,chevronRight:oe,chevronLeft:ne};var ae=Object.defineProperty,le=Object.getOwnPropertyDescriptor,J=(i,t,e,s)=>{for(var r=s>1?void 0:s?le(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&ae(t,e,r),r};let T=class extends w{constructor(){super(...arguments),this.status="empty",this.ariaDescribedBy="a-product-name",this.label="Add to wishlist"}render(){const i=St.wishlist.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return
|
|
166
|
+
`,St={wishlist:re,playerv:ie,chevronRight:oe,chevronLeft:ne};var ae=Object.defineProperty,le=Object.getOwnPropertyDescriptor,J=(i,t,e,s)=>{for(var r=s>1?void 0:s?le(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&ae(t,e,r),r};let T=class extends w{constructor(){super(...arguments),this.status="empty",this.ariaDescribedBy="a-product-name",this.label="Add to wishlist"}render(){const i=St.wishlist.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return f`
|
|
161
167
|
<button
|
|
162
168
|
type="button"
|
|
163
169
|
aria-label="${this.label}"
|
|
@@ -223,12 +229,12 @@
|
|
|
223
229
|
:host([status="filled"]) .wishlist-button:hover svg path {
|
|
224
230
|
fill: var(--color-alpha-light-strong);
|
|
225
231
|
}
|
|
226
|
-
`;J([h({type:String,reflect:!0})],T.prototype,"status",2);J([h({type:String,reflect:!0})],T.prototype,"ariaDescribedBy",2);J([h({type:String,reflect:!0})],T.prototype,"label",2);T=J([Z("o-wishlist-button")],T);var ce=Object.defineProperty,he=Object.getOwnPropertyDescriptor,x=(i,t,e,s)=>{for(var r=s>1?void 0:s?he(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&ce(t,e,r),r};let
|
|
227
|
-
${this.type==="span"?
|
|
232
|
+
`;J([h({type:String,reflect:!0})],T.prototype,"status",2);J([h({type:String,reflect:!0})],T.prototype,"ariaDescribedBy",2);J([h({type:String,reflect:!0})],T.prototype,"label",2);T=J([Z("o-wishlist-button")],T);var ce=Object.defineProperty,he=Object.getOwnPropertyDescriptor,x=(i,t,e,s)=>{for(var r=s>1?void 0:s?he(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&ce(t,e,r),r};let g=class extends w{constructor(){super(...arguments),this.bgstyle="background-light",this.size="medium",this.status="empty",this.type="button",this.strokewidth="1",this.icon="wishlist",this.disabled=!1}updated(i){super.updated(i),this.style.setProperty("--icon-stroke-width",this.strokewidth)}render(){const i=St[this.icon]??"",t=`icon-${this.icon}`,e=i.replace("<svg",'<svg aria-hidden="true" focusable="false" part="svg"');return f`
|
|
233
|
+
${this.type==="span"?f`
|
|
228
234
|
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
229
235
|
${st(e)}
|
|
230
236
|
</span>
|
|
231
|
-
`:
|
|
237
|
+
`:f`
|
|
232
238
|
<button
|
|
233
239
|
type="button"
|
|
234
240
|
aria-label="icon"
|
|
@@ -238,7 +244,7 @@
|
|
|
238
244
|
${st(e)}
|
|
239
245
|
</button>
|
|
240
246
|
`}
|
|
241
|
-
`}};
|
|
247
|
+
`}};g.styles=I`
|
|
242
248
|
:host {
|
|
243
249
|
display: inline-flex;
|
|
244
250
|
justify-content: center;
|
|
@@ -395,9 +401,9 @@
|
|
|
395
401
|
}
|
|
396
402
|
|
|
397
403
|
}
|
|
398
|
-
`;x([h({type:String,reflect:!0})],
|
|
404
|
+
`;x([h({type:String,reflect:!0})],g.prototype,"bgstyle",2);x([h({type:String,reflect:!0})],g.prototype,"size",2);x([h({type:String,reflect:!0})],g.prototype,"status",2);x([h({type:String,reflect:!0})],g.prototype,"type",2);x([h({type:String})],g.prototype,"strokewidth",2);x([h({type:String})],g.prototype,"icon",2);x([h({type:Boolean,reflect:!0})],g.prototype,"disabled",2);g=x([Z("o-icon-button")],g);var de=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,k=(i,t,e,s)=>{for(var r=s>1?void 0:s?ue(t,e):t,n=i.length-1,o;n>=0;n--)(o=i[n])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&de(t,e,r),r};let $=class extends w{constructor(){super(...arguments),this.href="",this.target="",this.template="standard",this.inverse=!1,this.endIcon=!1,this.reverseEndIcon=!1}render(){return f`
|
|
399
405
|
<a href="${this.href}" target="${this.target}">
|
|
400
|
-
${this.endIcon&&this.reverseEndIcon?
|
|
406
|
+
${this.endIcon&&this.reverseEndIcon?f`
|
|
401
407
|
<o-icon-button
|
|
402
408
|
icon="chevronLeft"
|
|
403
409
|
bgstyle="${this.inverse?"none-light":"none-contrast"}"
|
|
@@ -407,7 +413,7 @@
|
|
|
407
413
|
></o-icon-button>
|
|
408
414
|
`:null}
|
|
409
415
|
<span class="link-text"><slot></slot></span>
|
|
410
|
-
${this.endIcon&&!this.reverseEndIcon?
|
|
416
|
+
${this.endIcon&&!this.reverseEndIcon?f`
|
|
411
417
|
<o-icon-button
|
|
412
418
|
icon="chevronRight"
|
|
413
419
|
bgstyle="${this.inverse?"none-light":"none-contrast"}"
|
package/index.mjs
CHANGED
|
@@ -35,7 +35,7 @@ const _t = (i) => new mt(typeof i == "string" ? i : i + "", void 0, it), I = (i,
|
|
|
35
35
|
const s = document.createElement("style"), r = V.litNonce;
|
|
36
36
|
r !== void 0 && s.setAttribute("nonce", r), s.textContent = e.cssText, i.appendChild(s);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, ht = rt ? (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 _t(e);
|
|
@@ -45,7 +45,7 @@ const _t = (i) => new mt(typeof i == "string" ? i : i + "", void 0, it), I = (i,
|
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is: Pt, defineProperty: Ot, getOwnPropertyDescriptor: kt, getOwnPropertyNames: Ut, getOwnPropertySymbols: Mt, getPrototypeOf: Tt } = Object, _ = globalThis,
|
|
48
|
+
const { is: Pt, defineProperty: Ot, getOwnPropertyDescriptor: kt, getOwnPropertyNames: Ut, getOwnPropertySymbols: Mt, getPrototypeOf: Tt } = Object, _ = globalThis, ct = _.trustedTypes, It = ct ? ct.emptyScript : "", K = _.reactiveElementPolyfillSupport, z = (i, t) => i, q = { toAttribute(i, t) {
|
|
49
49
|
switch (t) {
|
|
50
50
|
case Boolean:
|
|
51
51
|
i = i ? It : null;
|
|
@@ -129,8 +129,8 @@ let U = class extends HTMLElement {
|
|
|
129
129
|
const e = [];
|
|
130
130
|
if (Array.isArray(t)) {
|
|
131
131
|
const s = new Set(t.flat(1 / 0).reverse());
|
|
132
|
-
for (const r of s) e.unshift(
|
|
133
|
-
} else t !== void 0 && e.push(
|
|
132
|
+
for (const r of s) e.unshift(ht(r));
|
|
133
|
+
} else t !== void 0 && e.push(ht(t));
|
|
134
134
|
return e;
|
|
135
135
|
}
|
|
136
136
|
static _$Eu(t, e) {
|
|
@@ -283,8 +283,8 @@ U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[z("elementProper
|
|
|
283
283
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
284
284
|
*/
|
|
285
285
|
const B = globalThis, W = B.trustedTypes, ut = W ? W.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, wt = "$lit$", m = `lit$${Math.random().toFixed(9).slice(2)}$`, At = "?" + m, Ht = `<${At}>`, P = document, L = () => P.createComment(""), N = (i) => i === null || typeof i != "object" && typeof i != "function", nt = Array.isArray, zt = (i) => nt(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", X = `[
|
|
286
|
-
\f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, pt = /-->/g,
|
|
287
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
286
|
+
\f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, pt = /-->/g, bt = />/g, E = RegExp(`>|${X}(?:([^\\s"'>=/]+)(${X}*=${X}*(?:[^
|
|
287
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), ft = /'/g, gt = /"/g, xt = /^(?:script|style|textarea|title)$/i, Bt = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), f = Bt(1), O = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), vt = /* @__PURE__ */ new WeakMap(), S = P.createTreeWalker(P, 129);
|
|
288
288
|
function Et(i, t) {
|
|
289
289
|
if (!nt(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
290
290
|
return ut !== void 0 ? ut.createHTML(t) : t;
|
|
@@ -294,10 +294,10 @@ const Lt = (i, t) => {
|
|
|
294
294
|
let r, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = H;
|
|
295
295
|
for (let l = 0; l < e; l++) {
|
|
296
296
|
const a = i[l];
|
|
297
|
-
let u, p,
|
|
298
|
-
for (; v < a.length && (o.lastIndex = v, p = o.exec(a), p !== null); ) v = o.lastIndex, o === H ? p[1] === "!--" ? o = pt : p[1] !== void 0 ? o =
|
|
297
|
+
let u, p, h = -1, v = 0;
|
|
298
|
+
for (; v < a.length && (o.lastIndex = v, p = o.exec(a), p !== null); ) v = o.lastIndex, o === H ? p[1] === "!--" ? o = pt : p[1] !== void 0 ? o = bt : p[2] !== void 0 ? (xt.test(p[2]) && (r = RegExp("</" + p[2], "g")), o = E) : p[3] !== void 0 && (o = E) : o === E ? p[0] === ">" ? (o = r ?? H, h = -1) : p[1] === void 0 ? h = -2 : (h = o.lastIndex - p[2].length, u = p[1], o = p[3] === void 0 ? E : p[3] === '"' ? gt : ft) : o === gt || o === ft ? o = E : o === pt || o === bt ? o = H : (o = E, r = void 0);
|
|
299
299
|
const y = o === E && i[l + 1].startsWith("/>") ? " " : "";
|
|
300
|
-
n += o === H ? a + Ht :
|
|
300
|
+
n += o === H ? a + Ht : h >= 0 ? (s.push(u), a.slice(0, h) + wt + a.slice(h) + m + y) : a + m + (h === -2 ? l : y);
|
|
301
301
|
}
|
|
302
302
|
return [Et(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
303
303
|
};
|
|
@@ -308,27 +308,27 @@ class D {
|
|
|
308
308
|
let n = 0, o = 0;
|
|
309
309
|
const l = t.length - 1, a = this.parts, [u, p] = Lt(t, e);
|
|
310
310
|
if (this.el = D.createElement(u, s), S.currentNode = this.el.content, e === 2 || e === 3) {
|
|
311
|
-
const
|
|
312
|
-
|
|
311
|
+
const h = this.el.content.firstChild;
|
|
312
|
+
h.replaceWith(...h.childNodes);
|
|
313
313
|
}
|
|
314
314
|
for (; (r = S.nextNode()) !== null && a.length < l; ) {
|
|
315
315
|
if (r.nodeType === 1) {
|
|
316
|
-
if (r.hasAttributes()) for (const
|
|
317
|
-
const v = p[o++], y = r.getAttribute(
|
|
318
|
-
a.push({ type: 1, index: n, name: j[2], strings: y, ctor: j[1] === "." ? Dt : j[1] === "?" ? Rt : j[1] === "@" ? jt : F }), r.removeAttribute(
|
|
319
|
-
} else
|
|
316
|
+
if (r.hasAttributes()) for (const h of r.getAttributeNames()) if (h.endsWith(wt)) {
|
|
317
|
+
const v = p[o++], y = r.getAttribute(h).split(m), j = /([.?@])?(.*)/.exec(v);
|
|
318
|
+
a.push({ type: 1, index: n, name: j[2], strings: y, ctor: j[1] === "." ? Dt : j[1] === "?" ? Rt : j[1] === "@" ? jt : F }), r.removeAttribute(h);
|
|
319
|
+
} else h.startsWith(m) && (a.push({ type: 6, index: n }), r.removeAttribute(h));
|
|
320
320
|
if (xt.test(r.tagName)) {
|
|
321
|
-
const
|
|
321
|
+
const h = r.textContent.split(m), v = h.length - 1;
|
|
322
322
|
if (v > 0) {
|
|
323
323
|
r.textContent = W ? W.emptyScript : "";
|
|
324
|
-
for (let y = 0; y < v; y++) r.append(
|
|
325
|
-
r.append(
|
|
324
|
+
for (let y = 0; y < v; y++) r.append(h[y], L()), S.nextNode(), a.push({ type: 2, index: ++n });
|
|
325
|
+
r.append(h[v], L());
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
} else if (r.nodeType === 8) if (r.data === At) a.push({ type: 2, index: n });
|
|
329
329
|
else {
|
|
330
|
-
let
|
|
331
|
-
for (; (
|
|
330
|
+
let h = -1;
|
|
331
|
+
for (; (h = r.data.indexOf(m, h + 1)) !== -1; ) a.push({ type: 7, index: n }), h += m.length - 1;
|
|
332
332
|
}
|
|
333
333
|
n++;
|
|
334
334
|
}
|
|
@@ -585,7 +585,7 @@ const Wt = { attribute: !0, type: String, converter: q, reflect: !1, hasChanged:
|
|
|
585
585
|
}
|
|
586
586
|
throw Error("Unsupported decorator location: " + s);
|
|
587
587
|
};
|
|
588
|
-
function
|
|
588
|
+
function c(i) {
|
|
589
589
|
return (t, e) => typeof e == "object" ? Ft(i, t, e) : ((s, r, n) => {
|
|
590
590
|
const o = r.hasOwnProperty(n);
|
|
591
591
|
return r.constructor.createProperty(n, s), o ? Object.getOwnPropertyDescriptor(r, n) : void 0;
|
|
@@ -670,7 +670,7 @@ const Qt = Jt(w), $t = (i) => {
|
|
|
670
670
|
`;
|
|
671
671
|
return _t(t);
|
|
672
672
|
}, Yt = ["primary", "secondary"];
|
|
673
|
-
let
|
|
673
|
+
let b = class extends Qt {
|
|
674
674
|
constructor() {
|
|
675
675
|
super(...arguments), this.type = "submit", this.value = "", this.variant = "primary", this.customclass = "", this.disabled = !1, this.href = "", this.target = "";
|
|
676
676
|
}
|
|
@@ -700,22 +700,22 @@ let f = class extends Qt {
|
|
|
700
700
|
}
|
|
701
701
|
render() {
|
|
702
702
|
const i = this.href ? this.renderLink() : this.renderButton();
|
|
703
|
-
return
|
|
703
|
+
return f`${i}`;
|
|
704
704
|
}
|
|
705
705
|
renderLink() {
|
|
706
|
-
return
|
|
706
|
+
return f`<a href=${this.href} target=${this.target || d} class="button" ?disabled=${this.disabled}>
|
|
707
707
|
<slot />
|
|
708
708
|
</a>`;
|
|
709
709
|
}
|
|
710
710
|
renderButton() {
|
|
711
|
-
return
|
|
711
|
+
return f`<button class="button" ?disabled=${this.disabled}>
|
|
712
712
|
<slot />
|
|
713
713
|
</button>`;
|
|
714
714
|
}
|
|
715
715
|
};
|
|
716
|
-
Kt(
|
|
717
|
-
|
|
718
|
-
|
|
716
|
+
Kt(b);
|
|
717
|
+
b.formAssociated = !0;
|
|
718
|
+
b.styles = I`
|
|
719
719
|
:host {
|
|
720
720
|
display: inline-flex;
|
|
721
721
|
cursor: pointer;
|
|
@@ -731,7 +731,7 @@ f.styles = I`
|
|
|
731
731
|
${$t("secondary")};
|
|
732
732
|
}
|
|
733
733
|
|
|
734
|
-
:host([disabled]) {
|
|
734
|
+
:host([disabled]), :host([aria-disabled="true"]), :host([aria-disabled="true"]):hover {
|
|
735
735
|
--button-bg: var(--button-bg-disabled);
|
|
736
736
|
--button-text: var(--button-text-disabled);
|
|
737
737
|
--button-border: transparent;
|
|
@@ -743,6 +743,12 @@ f.styles = I`
|
|
|
743
743
|
--button-border: var(--button-border);
|
|
744
744
|
}
|
|
745
745
|
|
|
746
|
+
:host([aria-disabled="true"]) button:hover {
|
|
747
|
+
background-color: var(--button-bg-disabled);
|
|
748
|
+
color: var(--button-text-disabled);
|
|
749
|
+
border-color: transparent;
|
|
750
|
+
}
|
|
751
|
+
|
|
746
752
|
.button {
|
|
747
753
|
-webkit-appearance: none;
|
|
748
754
|
align-items: center;
|
|
@@ -793,33 +799,33 @@ f.styles = I`
|
|
|
793
799
|
}
|
|
794
800
|
`;
|
|
795
801
|
A([
|
|
796
|
-
|
|
797
|
-
],
|
|
802
|
+
c()
|
|
803
|
+
], b.prototype, "type", 2);
|
|
798
804
|
A([
|
|
799
|
-
|
|
800
|
-
],
|
|
805
|
+
c({ reflect: !0 })
|
|
806
|
+
], b.prototype, "value", 2);
|
|
801
807
|
A([
|
|
802
|
-
|
|
803
|
-
],
|
|
808
|
+
c({ reflect: !0 })
|
|
809
|
+
], b.prototype, "variant", 2);
|
|
804
810
|
A([
|
|
805
|
-
|
|
806
|
-
],
|
|
811
|
+
c({ type: String })
|
|
812
|
+
], b.prototype, "customclass", 2);
|
|
807
813
|
A([
|
|
808
|
-
|
|
814
|
+
c({
|
|
809
815
|
converter: {
|
|
810
816
|
fromAttribute: (i) => i === "" || i === "true"
|
|
811
817
|
}
|
|
812
818
|
})
|
|
813
|
-
],
|
|
819
|
+
], b.prototype, "disabled", 2);
|
|
814
820
|
A([
|
|
815
|
-
|
|
816
|
-
],
|
|
821
|
+
c()
|
|
822
|
+
], b.prototype, "href", 2);
|
|
817
823
|
A([
|
|
818
|
-
|
|
819
|
-
],
|
|
820
|
-
|
|
824
|
+
c()
|
|
825
|
+
], b.prototype, "target", 2);
|
|
826
|
+
b = A([
|
|
821
827
|
Z("o-button")
|
|
822
|
-
],
|
|
828
|
+
], b);
|
|
823
829
|
/**
|
|
824
830
|
* @license
|
|
825
831
|
* Copyright 2017 Google LLC
|
|
@@ -902,7 +908,7 @@ let T = class extends w {
|
|
|
902
908
|
"<svg",
|
|
903
909
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
904
910
|
);
|
|
905
|
-
return
|
|
911
|
+
return f`
|
|
906
912
|
<button
|
|
907
913
|
type="button"
|
|
908
914
|
aria-label="${this.label}"
|
|
@@ -985,23 +991,23 @@ T.styles = I`
|
|
|
985
991
|
}
|
|
986
992
|
`;
|
|
987
993
|
J([
|
|
988
|
-
|
|
994
|
+
c({ type: String, reflect: !0 })
|
|
989
995
|
], T.prototype, "status", 2);
|
|
990
996
|
J([
|
|
991
|
-
|
|
997
|
+
c({ type: String, reflect: !0 })
|
|
992
998
|
], T.prototype, "ariaDescribedBy", 2);
|
|
993
999
|
J([
|
|
994
|
-
|
|
1000
|
+
c({ type: String, reflect: !0 })
|
|
995
1001
|
], T.prototype, "label", 2);
|
|
996
1002
|
T = J([
|
|
997
1003
|
Z("o-wishlist-button")
|
|
998
1004
|
], T);
|
|
999
|
-
var
|
|
1000
|
-
for (var r = s > 1 ? void 0 : s ?
|
|
1005
|
+
var he = Object.defineProperty, ce = Object.getOwnPropertyDescriptor, x = (i, t, e, s) => {
|
|
1006
|
+
for (var r = s > 1 ? void 0 : s ? ce(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
1001
1007
|
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
1002
|
-
return s && r &&
|
|
1008
|
+
return s && r && he(t, e, r), r;
|
|
1003
1009
|
};
|
|
1004
|
-
let
|
|
1010
|
+
let g = class extends w {
|
|
1005
1011
|
constructor() {
|
|
1006
1012
|
super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "wishlist", this.disabled = !1;
|
|
1007
1013
|
}
|
|
@@ -1013,12 +1019,12 @@ let b = class extends w {
|
|
|
1013
1019
|
"<svg",
|
|
1014
1020
|
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
1015
1021
|
);
|
|
1016
|
-
return
|
|
1017
|
-
${this.type === "span" ?
|
|
1022
|
+
return f`
|
|
1023
|
+
${this.type === "span" ? f`
|
|
1018
1024
|
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
1019
1025
|
${st(e)}
|
|
1020
1026
|
</span>
|
|
1021
|
-
` :
|
|
1027
|
+
` : f`
|
|
1022
1028
|
<button
|
|
1023
1029
|
type="button"
|
|
1024
1030
|
aria-label="icon"
|
|
@@ -1031,7 +1037,7 @@ let b = class extends w {
|
|
|
1031
1037
|
`;
|
|
1032
1038
|
}
|
|
1033
1039
|
};
|
|
1034
|
-
|
|
1040
|
+
g.styles = I`
|
|
1035
1041
|
:host {
|
|
1036
1042
|
display: inline-flex;
|
|
1037
1043
|
justify-content: center;
|
|
@@ -1190,29 +1196,29 @@ b.styles = I`
|
|
|
1190
1196
|
}
|
|
1191
1197
|
`;
|
|
1192
1198
|
x([
|
|
1193
|
-
|
|
1194
|
-
],
|
|
1199
|
+
c({ type: String, reflect: !0 })
|
|
1200
|
+
], g.prototype, "bgstyle", 2);
|
|
1195
1201
|
x([
|
|
1196
|
-
|
|
1197
|
-
],
|
|
1202
|
+
c({ type: String, reflect: !0 })
|
|
1203
|
+
], g.prototype, "size", 2);
|
|
1198
1204
|
x([
|
|
1199
|
-
|
|
1200
|
-
],
|
|
1205
|
+
c({ type: String, reflect: !0 })
|
|
1206
|
+
], g.prototype, "status", 2);
|
|
1201
1207
|
x([
|
|
1202
|
-
|
|
1203
|
-
],
|
|
1208
|
+
c({ type: String, reflect: !0 })
|
|
1209
|
+
], g.prototype, "type", 2);
|
|
1204
1210
|
x([
|
|
1205
|
-
|
|
1206
|
-
],
|
|
1211
|
+
c({ type: String })
|
|
1212
|
+
], g.prototype, "strokewidth", 2);
|
|
1207
1213
|
x([
|
|
1208
|
-
|
|
1209
|
-
],
|
|
1214
|
+
c({ type: String })
|
|
1215
|
+
], g.prototype, "icon", 2);
|
|
1210
1216
|
x([
|
|
1211
|
-
|
|
1212
|
-
],
|
|
1213
|
-
|
|
1217
|
+
c({ type: Boolean, reflect: !0 })
|
|
1218
|
+
], g.prototype, "disabled", 2);
|
|
1219
|
+
g = x([
|
|
1214
1220
|
Z("o-icon-button")
|
|
1215
|
-
],
|
|
1221
|
+
], g);
|
|
1216
1222
|
var de = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, k = (i, t, e, s) => {
|
|
1217
1223
|
for (var r = s > 1 ? void 0 : s ? ue(t, e) : t, n = i.length - 1, o; n >= 0; n--)
|
|
1218
1224
|
(o = i[n]) && (r = (s ? o(t, e, r) : o(r)) || r);
|
|
@@ -1223,9 +1229,9 @@ let $ = class extends w {
|
|
|
1223
1229
|
super(...arguments), this.href = "", this.target = "", this.template = "standard", this.inverse = !1, this.endIcon = !1, this.reverseEndIcon = !1;
|
|
1224
1230
|
}
|
|
1225
1231
|
render() {
|
|
1226
|
-
return
|
|
1232
|
+
return f`
|
|
1227
1233
|
<a href="${this.href}" target="${this.target}">
|
|
1228
|
-
${this.endIcon && this.reverseEndIcon ?
|
|
1234
|
+
${this.endIcon && this.reverseEndIcon ? f`
|
|
1229
1235
|
<o-icon-button
|
|
1230
1236
|
icon="chevronLeft"
|
|
1231
1237
|
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
@@ -1235,7 +1241,7 @@ let $ = class extends w {
|
|
|
1235
1241
|
></o-icon-button>
|
|
1236
1242
|
` : null}
|
|
1237
1243
|
<span class="link-text"><slot></slot></span>
|
|
1238
|
-
${this.endIcon && !this.reverseEndIcon ?
|
|
1244
|
+
${this.endIcon && !this.reverseEndIcon ? f`
|
|
1239
1245
|
<o-icon-button
|
|
1240
1246
|
icon="chevronRight"
|
|
1241
1247
|
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
@@ -1347,22 +1353,22 @@ $.styles = I`
|
|
|
1347
1353
|
/* End of underline effect */
|
|
1348
1354
|
`;
|
|
1349
1355
|
k([
|
|
1350
|
-
|
|
1356
|
+
c({ type: String })
|
|
1351
1357
|
], $.prototype, "href", 2);
|
|
1352
1358
|
k([
|
|
1353
|
-
|
|
1359
|
+
c({ type: String })
|
|
1354
1360
|
], $.prototype, "target", 2);
|
|
1355
1361
|
k([
|
|
1356
|
-
|
|
1362
|
+
c({ type: String, reflect: !0 })
|
|
1357
1363
|
], $.prototype, "template", 2);
|
|
1358
1364
|
k([
|
|
1359
|
-
|
|
1365
|
+
c({ type: Boolean, reflect: !0 })
|
|
1360
1366
|
], $.prototype, "inverse", 2);
|
|
1361
1367
|
k([
|
|
1362
|
-
|
|
1368
|
+
c({ type: Boolean, reflect: !0 })
|
|
1363
1369
|
], $.prototype, "endIcon", 2);
|
|
1364
1370
|
k([
|
|
1365
|
-
|
|
1371
|
+
c({ type: Boolean, reflect: !0 })
|
|
1366
1372
|
], $.prototype, "reverseEndIcon", 2);
|
|
1367
1373
|
$ = k([
|
|
1368
1374
|
Z("o-link")
|