@fluid-topics/ft-input-label 0.2.3 → 0.2.4
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.
|
@@ -4,6 +4,7 @@ export interface FtInputLabelProperties {
|
|
|
4
4
|
raised?: boolean;
|
|
5
5
|
outlined?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
7
|
+
error?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const FtInputLabelCssVariables: {
|
|
9
10
|
fontSize: FtCssVariable;
|
|
@@ -16,6 +17,7 @@ export declare const FtInputLabelCssVariables: {
|
|
|
16
17
|
disabledTextColor: FtCssVariable;
|
|
17
18
|
colorSurface: FtCssVariable;
|
|
18
19
|
borderRadiusS: FtCssVariable;
|
|
20
|
+
colorError: FtCssVariable;
|
|
19
21
|
};
|
|
20
22
|
export declare class FtInputLabel extends FtLitElement implements FtInputLabelProperties {
|
|
21
23
|
static elementDefinitions: ElementDefinitionsMap;
|
|
@@ -24,6 +26,7 @@ export declare class FtInputLabel extends FtLitElement implements FtInputLabelPr
|
|
|
24
26
|
raised: boolean;
|
|
25
27
|
outlined: boolean;
|
|
26
28
|
disabled: boolean;
|
|
29
|
+
error: boolean;
|
|
27
30
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
28
31
|
}
|
|
29
32
|
//# sourceMappingURL=ft-input-label.d.ts.map
|
|
@@ -40,7 +40,7 @@ if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.cust
|
|
|
40
40
|
* Copyright 2017 Google LLC
|
|
41
41
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
42
42
|
*/
|
|
43
|
-
var m;x.finalized=!0,x.elementProperties=new Map,x.elementStyles=[],x.shadowRootOptions={mode:"open"},null==y||y({ReactiveElement:x}),(null!==(f=globalThis.reactiveElementVersions)&&void 0!==f?f:globalThis.reactiveElementVersions=[]).push("1.2.2");const w=globalThis.trustedTypes,$=w?w.createPolicy("lit-html",{createHTML:t=>t}):void 0,O=`lit$${(Math.random()+"").slice(9)}$`,S="?"+O,N=`<${S}>`,E=document,C=(t="")=>E.createComment(t),R=t=>null===t||"object"!=typeof t&&"function"!=typeof t,M=Array.isArray,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,k=/>/g,z=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,A=/'/g,L=/"/g,T=/^(?:script|style|textarea|title)$/i,B=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),P=Symbol.for("lit-noChange"),
|
|
43
|
+
var m;x.finalized=!0,x.elementProperties=new Map,x.elementStyles=[],x.shadowRootOptions={mode:"open"},null==y||y({ReactiveElement:x}),(null!==(f=globalThis.reactiveElementVersions)&&void 0!==f?f:globalThis.reactiveElementVersions=[]).push("1.2.2");const w=globalThis.trustedTypes,$=w?w.createPolicy("lit-html",{createHTML:t=>t}):void 0,O=`lit$${(Math.random()+"").slice(9)}$`,S="?"+O,N=`<${S}>`,E=document,C=(t="")=>E.createComment(t),R=t=>null===t||"object"!=typeof t&&"function"!=typeof t,M=Array.isArray,U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,k=/>/g,z=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,A=/'/g,L=/"/g,T=/^(?:script|style|textarea|title)$/i,B=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),P=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),_=new WeakMap,j=E.createTreeWalker(E,129,null,!1),W=(t,e)=>{const i=t.length-1,o=[];let n,r=2===e?"<svg>":"",s=U;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(s.lastIndex=c,l=s.exec(i),null!==l);)c=s.lastIndex,s===U?"!--"===l[1]?s=F:void 0!==l[1]?s=k:void 0!==l[2]?(T.test(l[2])&&(n=RegExp("</"+l[2],"g")),s=z):void 0!==l[3]&&(s=z):s===z?">"===l[0]?(s=null!=n?n:U,h=-1):void 0===l[1]?h=-2:(h=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?z:'"'===l[3]?L:A):s===L||s===A?s=z:s===F||s===k?s=U:(s=z,n=void 0);const p=s===z&&t[e+1].startsWith("/>")?" ":"";r+=s===U?i+N:h>=0?(o.push(a),i.slice(0,h)+"$lit$"+i.slice(h)+O+p):i+O+(-2===h?(o.push(void 0),e):p)}const a=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==$?$.createHTML(a):a,o]};class H{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let n=0,r=0;const s=t.length-1,a=this.parts,[l,h]=W(t,e);if(this.el=H.createElement(l,i),j.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=j.nextNode())&&a.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(O)){const i=h[r++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(O),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?J:"?"===e[1]?q:"@"===e[1]?G:V})}else a.push({type:6,index:n})}for(const e of t)o.removeAttribute(e)}if(T.test(o.tagName)){const t=o.textContent.split(O),e=t.length-1;if(e>0){o.textContent=w?w.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],C()),j.nextNode(),a.push({type:2,index:++n});o.append(t[e],C())}}}else if(8===o.nodeType)if(o.data===S)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(O,t+1));)a.push({type:7,index:n}),t+=O.length-1}n++}}static createElement(t,e){const i=E.createElement("template");return i.innerHTML=t,i}}function I(t,e,i=t,o){var n,r,s,a;if(e===P)return e;let l=void 0!==o?null===(n=i._$Cl)||void 0===n?void 0:n[o]:i._$Cu;const h=R(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,o)),void 0!==o?(null!==(s=(a=i)._$Cl)&&void 0!==s?s:a._$Cl=[])[o]=l:i._$Cu=l),void 0!==l&&(e=I(t,l._$AS(t,e.values),l,o)),e}class K{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:o}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:E).importNode(i,!0);j.currentNode=n;let r=j.nextNode(),s=0,a=0,l=o[0];for(;void 0!==l;){if(s===l.index){let e;2===l.type?e=new Z(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new Q(r,this,t)),this.v.push(e),l=o[++a]}s!==(null==l?void 0:l.index)&&(r=j.nextNode(),s++)}return n}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Z{constructor(t,e,i,o){var n;this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cg=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=I(this,t,e),R(t)?t===D||null==t||""===t?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==P&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var e;return M(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==D&&R(this._$AH)?this._$AA.nextSibling.data=t:this.S(E.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=H.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.m(i);else{const t=new K(n,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=_.get(t.strings);return void 0===e&&_.set(t.strings,e=new H(t)),e}A(t){M(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const n of t)o===e.length?e.push(i=new Z(this.M(C()),this.M(C()),this,this.options)):i=e[o],i._$AI(n),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class V{constructor(t,e,i,o,n){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=D}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const n=this.strings;let r=!1;if(void 0===n)t=I(this,t,e,0),r=!R(t)||t!==this._$AH&&t!==P,r&&(this._$AH=t);else{const o=t;let s,a;for(t=n[0],s=0;s<n.length-1;s++)a=I(this,o[i+s],e,s),a===P&&(a=this._$AH[s]),r||(r=!R(a)||a!==this._$AH[s]),a===D?t=D:t!==D&&(t+=(null!=a?a:"")+n[s+1]),this._$AH[s]=a}r&&!o&&this.k(t)}k(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class J extends V{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===D?void 0:t}}const X=w?w.emptyScript:"";class q extends V{constructor(){super(...arguments),this.type=4}k(t){t&&t!==D?this.element.setAttribute(this.name,X):this.element.removeAttribute(this.name)}}class G extends V{constructor(t,e,i,o,n){super(t,e,i,o,n),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=I(this,t,e,0))&&void 0!==i?i:D)===P)return;const o=this._$AH,n=t===D&&o!==D||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==D&&(o===D||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class Q{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){I(this,t)}}const Y=window.litHtmlPolyfillSupport;
|
|
44
44
|
/**
|
|
45
45
|
* @license
|
|
46
46
|
* Copyright 2017 Google LLC
|
|
@@ -82,7 +82,7 @@ const pt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
82
82
|
* @license
|
|
83
83
|
* Copyright 2020 Google LLC
|
|
84
84
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
85
|
-
*/var yt,gt=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(yt||(yt={}));const bt=nt.extend("--ft-typography-font-family",st.titleFont),vt=nt.extend("--ft-typography-font-family",st.contentFont),xt={fontFamily:vt,fontSize:nt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:nt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:nt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:nt.create("--ft-typography-line-height","SIZE","24px"),textTransform:nt.create("--ft-typography-text-transform","UNKNOWN","inherit")},mt=nt.extend("--ft-typography-title-font-family",bt),wt=nt.extend("--ft-typography-title-font-size",xt.fontSize,"20px"),$t=nt.extend("--ft-typography-title-font-weight",xt.fontWeight,"normal"),Ot=nt.extend("--ft-typography-title-letter-spacing",xt.letterSpacing,"0.15px"),St=nt.extend("--ft-typography-title-line-height",xt.lineHeight,"24px"),Nt=nt.extend("--ft-typography-title-text-transform",xt.textTransform,"inherit"),Et=nt.extend("--ft-typography-title-dense-font-family",bt),Ct=nt.extend("--ft-typography-title-dense-font-size",xt.fontSize,"14px"),Rt=nt.extend("--ft-typography-title-dense-font-weight",xt.fontWeight,"normal"),Mt=nt.extend("--ft-typography-title-dense-letter-spacing",xt.letterSpacing,"0.105px"),Ut=nt.extend("--ft-typography-title-dense-line-height",xt.lineHeight,"24px"),Ft=nt.extend("--ft-typography-title-dense-text-transform",xt.textTransform,"inherit"),kt=nt.extend("--ft-typography-subtitle1-font-family",vt),zt=nt.extend("--ft-typography-subtitle1-font-size",xt.fontSize,"16px"),At=nt.extend("--ft-typography-subtitle1-font-weight",xt.fontWeight,"600"),Lt=nt.extend("--ft-typography-subtitle1-letter-spacing",xt.letterSpacing,"0.144px"),Tt=nt.extend("--ft-typography-subtitle1-line-height",xt.lineHeight,"24px"),Bt=nt.extend("--ft-typography-subtitle1-text-transform",xt.textTransform,"inherit"),Pt=nt.extend("--ft-typography-subtitle2-font-family",vt),
|
|
85
|
+
*/var yt,gt=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(yt||(yt={}));const bt=nt.extend("--ft-typography-font-family",st.titleFont),vt=nt.extend("--ft-typography-font-family",st.contentFont),xt={fontFamily:vt,fontSize:nt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:nt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:nt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:nt.create("--ft-typography-line-height","SIZE","24px"),textTransform:nt.create("--ft-typography-text-transform","UNKNOWN","inherit")},mt=nt.extend("--ft-typography-title-font-family",bt),wt=nt.extend("--ft-typography-title-font-size",xt.fontSize,"20px"),$t=nt.extend("--ft-typography-title-font-weight",xt.fontWeight,"normal"),Ot=nt.extend("--ft-typography-title-letter-spacing",xt.letterSpacing,"0.15px"),St=nt.extend("--ft-typography-title-line-height",xt.lineHeight,"24px"),Nt=nt.extend("--ft-typography-title-text-transform",xt.textTransform,"inherit"),Et=nt.extend("--ft-typography-title-dense-font-family",bt),Ct=nt.extend("--ft-typography-title-dense-font-size",xt.fontSize,"14px"),Rt=nt.extend("--ft-typography-title-dense-font-weight",xt.fontWeight,"normal"),Mt=nt.extend("--ft-typography-title-dense-letter-spacing",xt.letterSpacing,"0.105px"),Ut=nt.extend("--ft-typography-title-dense-line-height",xt.lineHeight,"24px"),Ft=nt.extend("--ft-typography-title-dense-text-transform",xt.textTransform,"inherit"),kt=nt.extend("--ft-typography-subtitle1-font-family",vt),zt=nt.extend("--ft-typography-subtitle1-font-size",xt.fontSize,"16px"),At=nt.extend("--ft-typography-subtitle1-font-weight",xt.fontWeight,"600"),Lt=nt.extend("--ft-typography-subtitle1-letter-spacing",xt.letterSpacing,"0.144px"),Tt=nt.extend("--ft-typography-subtitle1-line-height",xt.lineHeight,"24px"),Bt=nt.extend("--ft-typography-subtitle1-text-transform",xt.textTransform,"inherit"),Pt=nt.extend("--ft-typography-subtitle2-font-family",vt),Dt=nt.extend("--ft-typography-subtitle2-font-size",xt.fontSize,"14px"),_t=nt.extend("--ft-typography-subtitle2-font-weight",xt.fontWeight,"normal"),jt=nt.extend("--ft-typography-subtitle2-letter-spacing",xt.letterSpacing,"0.098px"),Wt=nt.extend("--ft-typography-subtitle2-line-height",xt.lineHeight,"24px"),Ht=nt.extend("--ft-typography-subtitle2-text-transform",xt.textTransform,"inherit"),It=nt.extend("--ft-typography-body1-font-family",vt),Kt=nt.extend("--ft-typography-body1-font-size",xt.fontSize,"16px"),Zt=nt.extend("--ft-typography-body1-font-weight",xt.fontWeight,"normal"),Vt=nt.extend("--ft-typography-body1-letter-spacing",xt.letterSpacing,"0.496px"),Jt=nt.extend("--ft-typography-body1-line-height",xt.lineHeight,"24px"),Xt=nt.extend("--ft-typography-body1-text-transform",xt.textTransform,"inherit"),qt=nt.extend("--ft-typography-body2-font-family",vt),Gt=nt.extend("--ft-typography-body2-font-size",xt.fontSize,"14px"),Qt=nt.extend("--ft-typography-body2-font-weight",xt.fontWeight,"normal"),Yt=nt.extend("--ft-typography-body2-letter-spacing",xt.letterSpacing,"0.252px"),te=nt.extend("--ft-typography-body2-line-height",xt.lineHeight,"20px"),ee=nt.extend("--ft-typography-body2-text-transform",xt.textTransform,"inherit"),ie={fontFamily:nt.extend("--ft-typography-caption-font-family",vt),fontSize:nt.extend("--ft-typography-caption-font-size",xt.fontSize,"12px"),fontWeight:nt.extend("--ft-typography-caption-font-weight",xt.fontWeight,"normal"),letterSpacing:nt.extend("--ft-typography-caption-letter-spacing",xt.letterSpacing,"0.396px"),lineHeight:nt.extend("--ft-typography-caption-line-height",xt.lineHeight,"16px"),textTransform:nt.extend("--ft-typography-caption-text-transform",xt.textTransform,"inherit")},oe=nt.extend("--ft-typography-breadcrumb-font-family",vt),ne=nt.extend("--ft-typography-breadcrumb-font-size",xt.fontSize,"10px"),re=nt.extend("--ft-typography-breadcrumb-font-weight",xt.fontWeight,"normal"),se=nt.extend("--ft-typography-breadcrumb-letter-spacing",xt.letterSpacing,"0.33px"),ae=nt.extend("--ft-typography-breadcrumb-line-height",xt.lineHeight,"16px"),le=nt.extend("--ft-typography-breadcrumb-text-transform",xt.textTransform,"inherit"),he=nt.extend("--ft-typography-overline-font-family",vt),ce=nt.extend("--ft-typography-overline-font-size",xt.fontSize,"10px"),pe=nt.extend("--ft-typography-overline-font-weight",xt.fontWeight,"normal"),fe=nt.extend("--ft-typography-overline-letter-spacing",xt.letterSpacing,"1.5px"),de=nt.extend("--ft-typography-overline-line-height",xt.lineHeight,"16px"),ue=nt.extend("--ft-typography-overline-text-transform",xt.textTransform,"uppercase"),ye=nt.extend("--ft-typography-button-font-family",vt),ge=nt.extend("--ft-typography-button-font-size",xt.fontSize,"14px"),be=nt.extend("--ft-typography-button-font-weight",xt.fontWeight,"600"),ve=nt.extend("--ft-typography-button-letter-spacing",xt.letterSpacing,"1.246px"),xe=nt.extend("--ft-typography-button-line-height",xt.lineHeight,"16px"),me=nt.extend("--ft-typography-button-text-transform",xt.textTransform,"uppercase"),we=h`
|
|
86
86
|
.ft-typography--title {
|
|
87
87
|
font-family: ${mt};
|
|
88
88
|
font-size: ${wt};
|
|
@@ -112,8 +112,8 @@ const pt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
112
112
|
`,Se=h`
|
|
113
113
|
.ft-typography--subtitle2 {
|
|
114
114
|
font-family: ${Pt};
|
|
115
|
-
font-size: ${
|
|
116
|
-
font-weight: ${
|
|
115
|
+
font-size: ${Dt};
|
|
116
|
+
font-weight: ${_t};
|
|
117
117
|
letter-spacing: ${jt};
|
|
118
118
|
line-height: ${Wt};
|
|
119
119
|
text-transform: ${Ht};
|
|
@@ -184,7 +184,7 @@ const pt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
184
184
|
.ft-typography {
|
|
185
185
|
vertical-align: inherit;
|
|
186
186
|
}
|
|
187
|
-
`],gt([e()],Fe.prototype,"element",void 0),gt([e()],Fe.prototype,"variant",void 0),o("ft-typography")(Fe);var ke=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};const ze={fontSize:nt.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:nt.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:nt.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:nt.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:nt.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:nt.extend("--ft-input-label-border-color",st.colorOutline),textColor:nt.extend("--ft-input-label-text-color",st.colorOnSurfaceMedium),disabledTextColor:nt.extend("--ft-input-label-disabled-text-color",st.colorOnSurfaceDisabled),colorSurface:nt.external(st.colorSurface,"Design system"),borderRadiusS:nt.external(st.borderRadiusS,"Design system")};class Ae extends at{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled};return B`
|
|
187
|
+
`],gt([e()],Fe.prototype,"element",void 0),gt([e()],Fe.prototype,"variant",void 0),o("ft-typography")(Fe);var ke=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};const ze={fontSize:nt.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:nt.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:nt.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:nt.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:nt.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:nt.extend("--ft-input-label-border-color",st.colorOutline),textColor:nt.extend("--ft-input-label-text-color",st.colorOnSurfaceMedium),disabledTextColor:nt.extend("--ft-input-label-disabled-text-color",st.colorOnSurfaceDisabled),colorSurface:nt.external(st.colorSurface,"Design system"),borderRadiusS:nt.external(st.borderRadiusS,"Design system"),colorError:nt.external(st.colorError,"Design system")};class Ae extends at{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return B`
|
|
188
188
|
<div class="${pt(t)}">
|
|
189
189
|
${this.text?B`
|
|
190
190
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -204,6 +204,10 @@ const pt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
204
204
|
border-color: ${ze.borderColor};
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
+
.ft-input-label.ft-input-label--in-error {
|
|
208
|
+
border-color: ${ze.colorError}
|
|
209
|
+
}
|
|
210
|
+
|
|
207
211
|
.ft-input-label:before,
|
|
208
212
|
.ft-input-label:after {
|
|
209
213
|
content: "";
|
|
@@ -236,6 +240,10 @@ const pt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
236
240
|
${rt(ie.lineHeight,ze.fontSize)};
|
|
237
241
|
}
|
|
238
242
|
|
|
243
|
+
.ft-input-label--in-error .ft-input-label--text {
|
|
244
|
+
color: ${ze.colorError}
|
|
245
|
+
}
|
|
246
|
+
|
|
239
247
|
.ft-input-label--disabled .ft-input-label--text {
|
|
240
248
|
color: ${ze.disabledTextColor};
|
|
241
249
|
}
|
|
@@ -296,7 +304,7 @@ const pt=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
296
304
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
297
305
|
border-top: none;
|
|
298
306
|
}
|
|
299
|
-
`],ke([e({type:String})],Ae.prototype,"text",void 0),ke([e({type:Boolean})],Ae.prototype,"raised",void 0),ke([e({type:Boolean})],Ae.prototype,"outlined",void 0),ke([e({type:Boolean})],Ae.prototype,"disabled",void 0),o("ft-input-label")(function t(e){var i;let o;if("elementDefinitions"in e){o={};const i=e.elementDefinitions;for(let e in i)o[e]=t(i[e])}return i=class extends e{
|
|
307
|
+
`],ke([e({type:String})],Ae.prototype,"text",void 0),ke([e({type:Boolean})],Ae.prototype,"raised",void 0),ke([e({type:Boolean})],Ae.prototype,"outlined",void 0),ke([e({type:Boolean})],Ae.prototype,"disabled",void 0),ke([e({type:Boolean})],Ae.prototype,"error",void 0),o("ft-input-label")(function t(e){var i;let o;if("elementDefinitions"in e){o={};const i=e.elementDefinitions;for(let e in i)o[e]=t(i[e])}return i=class extends e{render(){var t;let i=null!==(t=e.styles)&&void 0!==t?t:[];return Array.isArray(i)||(i=[i]),B`
|
|
300
308
|
${i.map((t=>B`
|
|
301
309
|
<style>${t}</style>
|
|
302
310
|
`))}
|
package/build/ft-input-label.js
CHANGED
|
@@ -20,6 +20,7 @@ export const FtInputLabelCssVariables = {
|
|
|
20
20
|
disabledTextColor: FtCssVariable.extend("--ft-input-label-disabled-text-color", designSystemVariables.colorOnSurfaceDisabled),
|
|
21
21
|
colorSurface: FtCssVariable.external(designSystemVariables.colorSurface, "Design system"),
|
|
22
22
|
borderRadiusS: FtCssVariable.external(designSystemVariables.borderRadiusS, "Design system"),
|
|
23
|
+
colorError: FtCssVariable.external(designSystemVariables.colorError, "Design system"),
|
|
23
24
|
};
|
|
24
25
|
export class FtInputLabel extends FtLitElement {
|
|
25
26
|
constructor() {
|
|
@@ -28,13 +29,15 @@ export class FtInputLabel extends FtLitElement {
|
|
|
28
29
|
this.raised = false;
|
|
29
30
|
this.outlined = false;
|
|
30
31
|
this.disabled = false;
|
|
32
|
+
this.error = false;
|
|
31
33
|
}
|
|
32
34
|
render() {
|
|
33
35
|
const classes = {
|
|
34
36
|
"ft-input-label": true,
|
|
35
37
|
"ft-input-label--raised": this.raised,
|
|
36
38
|
"ft-input-label--outlined": this.outlined,
|
|
37
|
-
"ft-input-label--disabled": this.disabled
|
|
39
|
+
"ft-input-label--disabled": this.disabled,
|
|
40
|
+
"ft-input-label--in-error": this.error,
|
|
38
41
|
};
|
|
39
42
|
return html `
|
|
40
43
|
<div class="${classMap(classes)}">
|
|
@@ -63,6 +66,10 @@ FtInputLabel.styles = [
|
|
|
63
66
|
border-color: ${FtInputLabelCssVariables.borderColor};
|
|
64
67
|
}
|
|
65
68
|
|
|
69
|
+
.ft-input-label.ft-input-label--in-error {
|
|
70
|
+
border-color: ${FtInputLabelCssVariables.colorError}
|
|
71
|
+
}
|
|
72
|
+
|
|
66
73
|
.ft-input-label:before,
|
|
67
74
|
.ft-input-label:after {
|
|
68
75
|
content: "";
|
|
@@ -95,6 +102,10 @@ FtInputLabel.styles = [
|
|
|
95
102
|
${setVariable(FtTypographyCaptionCssVariables.lineHeight, FtInputLabelCssVariables.fontSize)};
|
|
96
103
|
}
|
|
97
104
|
|
|
105
|
+
.ft-input-label--in-error .ft-input-label--text {
|
|
106
|
+
color: ${FtInputLabelCssVariables.colorError}
|
|
107
|
+
}
|
|
108
|
+
|
|
98
109
|
.ft-input-label--disabled .ft-input-label--text {
|
|
99
110
|
color: ${FtInputLabelCssVariables.disabledTextColor};
|
|
100
111
|
}
|
|
@@ -169,4 +180,7 @@ __decorate([
|
|
|
169
180
|
__decorate([
|
|
170
181
|
property({ type: Boolean })
|
|
171
182
|
], FtInputLabel.prototype, "disabled", void 0);
|
|
183
|
+
__decorate([
|
|
184
|
+
property({ type: Boolean })
|
|
185
|
+
], FtInputLabel.prototype, "error", void 0);
|
|
172
186
|
//# sourceMappingURL=ft-input-label.js.map
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var r;const l=globalThis.trustedTypes,s=l?l.createPolicy("lit-html",{createHTML:t=>t}):void 0,a=`lit$${(Math.random()+"").slice(9)}$`,p="?"+a,h=`<${p}>`,f=document,y=(t="")=>f.createComment(t),d=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,u=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,c=/-->/g,b=/>/g,$=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,x=/'/g,v=/"/g,m=/^(?:script|style|textarea|title)$/i,w=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),z=Symbol.for("lit-noChange"),S=Symbol.for("lit-nothing"),A=new WeakMap,_=f.createTreeWalker(f,129,null,!1),E=(t,i)=>{const e=t.length-1,o=[];let n,r=2===i?"<svg>":"",l=u;for(let i=0;i<e;i++){const e=t[i];let s,p,f=-1,y=0;for(;y<e.length&&(l.lastIndex=y,p=l.exec(e),null!==p);)y=l.lastIndex,l===u?"!--"===p[1]?l=c:void 0!==p[1]?l=b:void 0!==p[2]?(m.test(p[2])&&(n=RegExp("</"+p[2],"g")),l=$):void 0!==p[3]&&(l=$):l===$?">"===p[0]?(l=null!=n?n:u,f=-1):void 0===p[1]?f=-2:(f=l.lastIndex-p[2].length,s=p[1],l=void 0===p[3]?$:'"'===p[3]?v:x):l===v||l===x?l=$:l===c||l===b?l=u:(l=$,n=void 0);const d=l===$&&t[i+1].startsWith("/>")?" ":"";r+=l===u?e+h:f>=0?(o.push(s),e.slice(0,f)+"$lit$"+e.slice(f)+a+d):e+a+(-2===f?(o.push(void 0),i):d)}const p=r+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==s?s.createHTML(p):p,o]};class I{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,r=0;const s=t.length-1,h=this.parts,[f,d]=E(t,i);if(this.el=I.createElement(f,e),_.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=_.nextNode())&&h.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(a)){const e=d[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(a),i=/([.?@])?(.*)/.exec(e);h.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?M:"?"===i[1]?U:"@"===i[1]?j:k})}else h.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(m.test(o.tagName)){const t=o.textContent.split(a),i=t.length-1;if(i>0){o.textContent=l?l.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],y()),_.nextNode(),h.push({type:2,index:++n});o.append(t[i],y())}}}else if(8===o.nodeType)if(o.data===p)h.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(a,t+1));)h.push({type:7,index:n}),t+=a.length-1}n++}}static createElement(t,i){const e=f.createElement("template");return e.innerHTML=t,e}}function N(t,i,e=t,o){var n,r,l,s;if(i===z)return i;let a=void 0!==o?null===(n=e._$Cl)||void 0===n?void 0:n[o]:e._$Cu;const p=d(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,e,o)),void 0!==o?(null!==(l=(s=e)._$Cl)&&void 0!==l?l:s._$Cl=[])[o]=a:e._$Cu=a),void 0!==a&&(i=N(t,a._$AS(t,i.values),a,o)),i}class T{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:f).importNode(e,!0);_.currentNode=n;let r=_.nextNode(),l=0,s=0,a=o[0];for(;void 0!==a;){if(l===a.index){let i;2===a.type?i=new Z(r,r.nextSibling,this,t):1===a.type?i=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(i=new C(r,this,t)),this.v.push(i),a=o[++s]}l!==(null==a?void 0:a.index)&&(r=_.nextNode(),l++)}return n}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class Z{constructor(t,i,e,o){var n;this.type=2,this._$AH=S,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cg=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=N(this,t,i),d(t)?t===S||null==t||""===t?(this._$AH!==S&&this._$AR(),this._$AH=S):t!==this._$AH&&t!==z&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return g(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==S&&d(this._$AH)?this._$AA.nextSibling.data=t:this.S(f.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=I.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.m(e);else{const t=new T(n,this),i=t.p(this.options);t.m(e),this.S(i),this._$AH=t}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new I(t)),i}A(t){g(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const n of t)o===i.length?i.push(e=new Z(this.M(y()),this.M(y()),this,this.options)):e=i[o],e._$AI(n),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class k{constructor(t,i,e,o,n){this.type=1,this._$AH=S,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=S}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let r=!1;if(void 0===n)t=N(this,t,i,0),r=!d(t)||t!==this._$AH&&t!==z,r&&(this._$AH=t);else{const o=t;let l,s;for(t=n[0],l=0;l<n.length-1;l++)s=N(this,o[e+l],i,l),s===z&&(s=this._$AH[l]),r||(r=!d(s)||s!==this._$AH[l]),s===S?t=S:t!==S&&(t+=(null!=s?s:"")+n[l+1]),this._$AH[l]=s}r&&!o&&this.k(t)}k(t){t===S?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class M extends k{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===S?void 0:t}}const O=l?l.emptyScript:"";class U extends k{constructor(){super(...arguments),this.type=4}k(t){t&&t!==S?this.element.setAttribute(this.name,O):this.element.removeAttribute(this.name)}}class j extends k{constructor(t,i,e,o,n){super(t,i,e,o,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=N(this,t,i,0))&&void 0!==e?e:S)===z)return;const o=this._$AH,n=t===S&&o!==S||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==S&&(o===S||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class C{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){N(this,t)}}const
|
|
7
|
+
var r;const l=globalThis.trustedTypes,s=l?l.createPolicy("lit-html",{createHTML:t=>t}):void 0,a=`lit$${(Math.random()+"").slice(9)}$`,p="?"+a,h=`<${p}>`,f=document,y=(t="")=>f.createComment(t),d=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,u=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,c=/-->/g,b=/>/g,$=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,x=/'/g,v=/"/g,m=/^(?:script|style|textarea|title)$/i,w=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),z=Symbol.for("lit-noChange"),S=Symbol.for("lit-nothing"),A=new WeakMap,_=f.createTreeWalker(f,129,null,!1),E=(t,i)=>{const e=t.length-1,o=[];let n,r=2===i?"<svg>":"",l=u;for(let i=0;i<e;i++){const e=t[i];let s,p,f=-1,y=0;for(;y<e.length&&(l.lastIndex=y,p=l.exec(e),null!==p);)y=l.lastIndex,l===u?"!--"===p[1]?l=c:void 0!==p[1]?l=b:void 0!==p[2]?(m.test(p[2])&&(n=RegExp("</"+p[2],"g")),l=$):void 0!==p[3]&&(l=$):l===$?">"===p[0]?(l=null!=n?n:u,f=-1):void 0===p[1]?f=-2:(f=l.lastIndex-p[2].length,s=p[1],l=void 0===p[3]?$:'"'===p[3]?v:x):l===v||l===x?l=$:l===c||l===b?l=u:(l=$,n=void 0);const d=l===$&&t[i+1].startsWith("/>")?" ":"";r+=l===u?e+h:f>=0?(o.push(s),e.slice(0,f)+"$lit$"+e.slice(f)+a+d):e+a+(-2===f?(o.push(void 0),i):d)}const p=r+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==s?s.createHTML(p):p,o]};class I{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,r=0;const s=t.length-1,h=this.parts,[f,d]=E(t,i);if(this.el=I.createElement(f,e),_.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=_.nextNode())&&h.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(a)){const e=d[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(a),i=/([.?@])?(.*)/.exec(e);h.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?M:"?"===i[1]?U:"@"===i[1]?j:k})}else h.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(m.test(o.tagName)){const t=o.textContent.split(a),i=t.length-1;if(i>0){o.textContent=l?l.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],y()),_.nextNode(),h.push({type:2,index:++n});o.append(t[i],y())}}}else if(8===o.nodeType)if(o.data===p)h.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(a,t+1));)h.push({type:7,index:n}),t+=a.length-1}n++}}static createElement(t,i){const e=f.createElement("template");return e.innerHTML=t,e}}function N(t,i,e=t,o){var n,r,l,s;if(i===z)return i;let a=void 0!==o?null===(n=e._$Cl)||void 0===n?void 0:n[o]:e._$Cu;const p=d(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,e,o)),void 0!==o?(null!==(l=(s=e)._$Cl)&&void 0!==l?l:s._$Cl=[])[o]=a:e._$Cu=a),void 0!==a&&(i=N(t,a._$AS(t,i.values),a,o)),i}class T{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:f).importNode(e,!0);_.currentNode=n;let r=_.nextNode(),l=0,s=0,a=o[0];for(;void 0!==a;){if(l===a.index){let i;2===a.type?i=new Z(r,r.nextSibling,this,t):1===a.type?i=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(i=new C(r,this,t)),this.v.push(i),a=o[++s]}l!==(null==a?void 0:a.index)&&(r=_.nextNode(),l++)}return n}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class Z{constructor(t,i,e,o){var n;this.type=2,this._$AH=S,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cg=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=N(this,t,i),d(t)?t===S||null==t||""===t?(this._$AH!==S&&this._$AR(),this._$AH=S):t!==this._$AH&&t!==z&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return g(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==S&&d(this._$AH)?this._$AA.nextSibling.data=t:this.S(f.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=I.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.m(e);else{const t=new T(n,this),i=t.p(this.options);t.m(e),this.S(i),this._$AH=t}}_$AC(t){let i=A.get(t.strings);return void 0===i&&A.set(t.strings,i=new I(t)),i}A(t){g(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const n of t)o===i.length?i.push(e=new Z(this.M(y()),this.M(y()),this,this.options)):e=i[o],e._$AI(n),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class k{constructor(t,i,e,o,n){this.type=1,this._$AH=S,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=S}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let r=!1;if(void 0===n)t=N(this,t,i,0),r=!d(t)||t!==this._$AH&&t!==z,r&&(this._$AH=t);else{const o=t;let l,s;for(t=n[0],l=0;l<n.length-1;l++)s=N(this,o[e+l],i,l),s===z&&(s=this._$AH[l]),r||(r=!d(s)||s!==this._$AH[l]),s===S?t=S:t!==S&&(t+=(null!=s?s:"")+n[l+1]),this._$AH[l]=s}r&&!o&&this.k(t)}k(t){t===S?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class M extends k{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===S?void 0:t}}const O=l?l.emptyScript:"";class U extends k{constructor(){super(...arguments),this.type=4}k(t){t&&t!==S?this.element.setAttribute(this.name,O):this.element.removeAttribute(this.name)}}class j extends k{constructor(t,i,e,o,n){super(t,i,e,o,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=N(this,t,i,0))&&void 0!==e?e:S)===z)return;const o=this._$AH,n=t===S&&o!==S||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==S&&(o===S||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class C{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){N(this,t)}}const B=window.litHtmlPolyfillSupport;null==B||B(I,Z),(null!==(r=globalThis.litHtmlVersions)&&void 0!==r?r:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const W=t=>({_$litStatic$:t}),G=new Map,R=(t=>(i,...e)=>{var o;const n=e.length;let r,l;const s=[],a=[];let p,h=0,f=!1;for(;h<n;){for(p=i[h];h<n&&void 0!==(l=e[h],r=null===(o=l)||void 0===o?void 0:o._$litStatic$);)p+=r+i[++h],f=!0;a.push(l),s.push(p),h++}if(h===n&&s.push(i[n]),f){const t=s.join("$$lit$$");void 0===(i=G.get(t))&&(s.raw=s,G.set(t,i=s)),e=a}return t(i,...e)})(w);var D,F=function(t,i,e,o){for(var n,r=arguments.length,l=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,s=t.length-1;s>=0;s--)(n=t[s])&&(l=(r<3?n(l):r>3?n(i,e,l):n(i,e))||l);return r>3&&l&&Object.defineProperty(i,e,l),l};!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(D||(D={}));const H=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),K=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),L={fontFamily:K,fontSize:i.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:i.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},q=i.FtCssVariable.extend("--ft-typography-title-font-family",H),J=i.FtCssVariable.extend("--ft-typography-title-font-size",L.fontSize,"20px"),P=i.FtCssVariable.extend("--ft-typography-title-font-weight",L.fontWeight,"normal"),Q=i.FtCssVariable.extend("--ft-typography-title-letter-spacing",L.letterSpacing,"0.15px"),V=i.FtCssVariable.extend("--ft-typography-title-line-height",L.lineHeight,"24px"),X=i.FtCssVariable.extend("--ft-typography-title-text-transform",L.textTransform,"inherit"),Y=i.FtCssVariable.extend("--ft-typography-title-dense-font-family",H),tt=i.FtCssVariable.extend("--ft-typography-title-dense-font-size",L.fontSize,"14px"),it=i.FtCssVariable.extend("--ft-typography-title-dense-font-weight",L.fontWeight,"normal"),et=i.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",L.letterSpacing,"0.105px"),ot=i.FtCssVariable.extend("--ft-typography-title-dense-line-height",L.lineHeight,"24px"),nt=i.FtCssVariable.extend("--ft-typography-title-dense-text-transform",L.textTransform,"inherit"),rt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-family",K),lt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-size",L.fontSize,"16px"),st=i.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",L.fontWeight,"600"),at=i.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",L.letterSpacing,"0.144px"),pt=i.FtCssVariable.extend("--ft-typography-subtitle1-line-height",L.lineHeight,"24px"),ht=i.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",L.textTransform,"inherit"),ft=i.FtCssVariable.extend("--ft-typography-subtitle2-font-family",K),yt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-size",L.fontSize,"14px"),dt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",L.fontWeight,"normal"),gt=i.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",L.letterSpacing,"0.098px"),ut=i.FtCssVariable.extend("--ft-typography-subtitle2-line-height",L.lineHeight,"24px"),ct=i.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",L.textTransform,"inherit"),bt=i.FtCssVariable.extend("--ft-typography-body1-font-family",K),$t=i.FtCssVariable.extend("--ft-typography-body1-font-size",L.fontSize,"16px"),xt=i.FtCssVariable.extend("--ft-typography-body1-font-weight",L.fontWeight,"normal"),vt=i.FtCssVariable.extend("--ft-typography-body1-letter-spacing",L.letterSpacing,"0.496px"),mt=i.FtCssVariable.extend("--ft-typography-body1-line-height",L.lineHeight,"24px"),wt=i.FtCssVariable.extend("--ft-typography-body1-text-transform",L.textTransform,"inherit"),zt=i.FtCssVariable.extend("--ft-typography-body2-font-family",K),St=i.FtCssVariable.extend("--ft-typography-body2-font-size",L.fontSize,"14px"),At=i.FtCssVariable.extend("--ft-typography-body2-font-weight",L.fontWeight,"normal"),_t=i.FtCssVariable.extend("--ft-typography-body2-letter-spacing",L.letterSpacing,"0.252px"),Et=i.FtCssVariable.extend("--ft-typography-body2-line-height",L.lineHeight,"20px"),It=i.FtCssVariable.extend("--ft-typography-body2-text-transform",L.textTransform,"inherit"),Nt={fontFamily:i.FtCssVariable.extend("--ft-typography-caption-font-family",K),fontSize:i.FtCssVariable.extend("--ft-typography-caption-font-size",L.fontSize,"12px"),fontWeight:i.FtCssVariable.extend("--ft-typography-caption-font-weight",L.fontWeight,"normal"),letterSpacing:i.FtCssVariable.extend("--ft-typography-caption-letter-spacing",L.letterSpacing,"0.396px"),lineHeight:i.FtCssVariable.extend("--ft-typography-caption-line-height",L.lineHeight,"16px"),textTransform:i.FtCssVariable.extend("--ft-typography-caption-text-transform",L.textTransform,"inherit")},Tt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",K),Zt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",L.fontSize,"10px"),kt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",L.fontWeight,"normal"),Mt=i.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",L.letterSpacing,"0.33px"),Ot=i.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",L.lineHeight,"16px"),Ut=i.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",L.textTransform,"inherit"),jt=i.FtCssVariable.extend("--ft-typography-overline-font-family",K),Ct=i.FtCssVariable.extend("--ft-typography-overline-font-size",L.fontSize,"10px"),Bt=i.FtCssVariable.extend("--ft-typography-overline-font-weight",L.fontWeight,"normal"),Wt=i.FtCssVariable.extend("--ft-typography-overline-letter-spacing",L.letterSpacing,"1.5px"),Gt=i.FtCssVariable.extend("--ft-typography-overline-line-height",L.lineHeight,"16px"),Rt=i.FtCssVariable.extend("--ft-typography-overline-text-transform",L.textTransform,"uppercase"),Dt=i.FtCssVariable.extend("--ft-typography-button-font-family",K),Ft=i.FtCssVariable.extend("--ft-typography-button-font-size",L.fontSize,"14px"),Ht=i.FtCssVariable.extend("--ft-typography-button-font-weight",L.fontWeight,"600"),Kt=i.FtCssVariable.extend("--ft-typography-button-letter-spacing",L.letterSpacing,"1.246px"),Lt=i.FtCssVariable.extend("--ft-typography-button-line-height",L.lineHeight,"16px"),qt=i.FtCssVariable.extend("--ft-typography-button-text-transform",L.textTransform,"uppercase"),Jt=e.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
15
|
font-family: ${q};
|
|
16
16
|
font-size: ${J};
|
|
@@ -87,32 +87,32 @@ const B=t=>({_$litStatic$:t}),G=new Map,R=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
87
87
|
.ft-typography--overline {
|
|
88
88
|
font-family: ${jt};
|
|
89
89
|
font-size: ${Ct};
|
|
90
|
-
font-weight: ${
|
|
91
|
-
letter-spacing: ${
|
|
90
|
+
font-weight: ${Bt};
|
|
91
|
+
letter-spacing: ${Wt};
|
|
92
92
|
line-height: ${Gt};
|
|
93
93
|
text-transform: ${Rt};
|
|
94
94
|
}
|
|
95
95
|
`,oi=e.css`
|
|
96
96
|
.ft-typography--button {
|
|
97
|
-
font-family: ${
|
|
98
|
-
font-size: ${
|
|
99
|
-
font-weight: ${
|
|
97
|
+
font-family: ${Dt};
|
|
98
|
+
font-size: ${Ft};
|
|
99
|
+
font-weight: ${Ht};
|
|
100
100
|
letter-spacing: ${Kt};
|
|
101
101
|
line-height: ${Lt};
|
|
102
102
|
text-transform: ${qt};
|
|
103
103
|
}
|
|
104
|
-
`;class ni extends i.FtLitElement{constructor(){super(...arguments),this.variant=
|
|
105
|
-
<${
|
|
104
|
+
`;class ni extends i.FtLitElement{constructor(){super(...arguments),this.variant=D.body1}render(){return this.element?R`
|
|
105
|
+
<${W(this.element)}
|
|
106
106
|
class="ft-typography ft-typography--${this.variant}">
|
|
107
107
|
<slot></slot>
|
|
108
|
-
</${
|
|
108
|
+
</${W(this.element)}>
|
|
109
109
|
`:R`
|
|
110
110
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
111
111
|
`}}ni.styles=[Jt,Pt,Qt,Vt,Xt,Yt,ti,ii,ei,oi,e.css`
|
|
112
112
|
.ft-typography {
|
|
113
113
|
vertical-align: inherit;
|
|
114
114
|
}
|
|
115
|
-
`],
|
|
115
|
+
`],F([o.property()],ni.prototype,"element",void 0),F([o.property()],ni.prototype,"variant",void 0),i.customElement("ft-typography")(ni);var ri=function(t,i,e,o){for(var n,r=arguments.length,l=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,s=t.length-1;s>=0;s--)(n=t[s])&&(l=(r<3?n(l):r>3?n(i,e,l):n(i,e))||l);return r>3&&l&&Object.defineProperty(i,e,l),l};const li={fontSize:i.FtCssVariable.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:i.FtCssVariable.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:i.FtCssVariable.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:i.FtCssVariable.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:i.FtCssVariable.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:i.FtCssVariable.extend("--ft-input-label-border-color",i.designSystemVariables.colorOutline),textColor:i.FtCssVariable.extend("--ft-input-label-text-color",i.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:i.FtCssVariable.extend("--ft-input-label-disabled-text-color",i.designSystemVariables.colorOnSurfaceDisabled),colorSurface:i.FtCssVariable.external(i.designSystemVariables.colorSurface,"Design system"),borderRadiusS:i.FtCssVariable.external(i.designSystemVariables.borderRadiusS,"Design system"),colorError:i.FtCssVariable.external(i.designSystemVariables.colorError,"Design system")};class si extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return e.html`
|
|
116
116
|
<div class="${n.classMap(t)}">
|
|
117
117
|
${this.text?e.html`
|
|
118
118
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -132,6 +132,10 @@ const B=t=>({_$litStatic$:t}),G=new Map,R=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
132
132
|
border-color: ${li.borderColor};
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
+
.ft-input-label.ft-input-label--in-error {
|
|
136
|
+
border-color: ${li.colorError}
|
|
137
|
+
}
|
|
138
|
+
|
|
135
139
|
.ft-input-label:before,
|
|
136
140
|
.ft-input-label:after {
|
|
137
141
|
content: "";
|
|
@@ -164,6 +168,10 @@ const B=t=>({_$litStatic$:t}),G=new Map,R=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
164
168
|
${i.setVariable(Nt.lineHeight,li.fontSize)};
|
|
165
169
|
}
|
|
166
170
|
|
|
171
|
+
.ft-input-label--in-error .ft-input-label--text {
|
|
172
|
+
color: ${li.colorError}
|
|
173
|
+
}
|
|
174
|
+
|
|
167
175
|
.ft-input-label--disabled .ft-input-label--text {
|
|
168
176
|
color: ${li.disabledTextColor};
|
|
169
177
|
}
|
|
@@ -224,4 +232,4 @@ const B=t=>({_$litStatic$:t}),G=new Map,R=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
224
232
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
225
233
|
border-top: none;
|
|
226
234
|
}
|
|
227
|
-
`],ri([o.property({type:String})],si.prototype,"text",void 0),ri([o.property({type:Boolean})],si.prototype,"raised",void 0),ri([o.property({type:Boolean})],si.prototype,"outlined",void 0),ri([o.property({type:Boolean})],si.prototype,"disabled",void 0),i.customElement("ft-input-label")(si),t.FtInputLabel=si,t.FtInputLabelCssVariables=li,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
|
|
235
|
+
`],ri([o.property({type:String})],si.prototype,"text",void 0),ri([o.property({type:Boolean})],si.prototype,"raised",void 0),ri([o.property({type:Boolean})],si.prototype,"outlined",void 0),ri([o.property({type:Boolean})],si.prototype,"disabled",void 0),ri([o.property({type:Boolean})],si.prototype,"error",void 0),i.customElement("ft-input-label")(si),t.FtInputLabel=si,t.FtInputLabelCssVariables=li,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
|
|
@@ -184,7 +184,7 @@ const ft=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
184
184
|
.ft-typography {
|
|
185
185
|
vertical-align: inherit;
|
|
186
186
|
}
|
|
187
|
-
`],bt([i()],ke.prototype,"element",void 0),bt([i()],ke.prototype,"variant",void 0),n("ft-typography")(ke);var ze=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};const Le={fontSize:rt.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:rt.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:rt.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:rt.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:rt.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:rt.extend("--ft-input-label-border-color",at.colorOutline),textColor:rt.extend("--ft-input-label-text-color",at.colorOnSurfaceMedium),disabledTextColor:rt.extend("--ft-input-label-disabled-text-color",at.colorOnSurfaceDisabled),colorSurface:rt.external(at.colorSurface,"Design system"),borderRadiusS:rt.external(at.borderRadiusS,"Design system")};class Ae extends lt{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled};return _`
|
|
187
|
+
`],bt([i()],ke.prototype,"element",void 0),bt([i()],ke.prototype,"variant",void 0),n("ft-typography")(ke);var ze=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};const Le={fontSize:rt.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:rt.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:rt.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:rt.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:rt.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:rt.extend("--ft-input-label-border-color",at.colorOutline),textColor:rt.extend("--ft-input-label-text-color",at.colorOnSurfaceMedium),disabledTextColor:rt.extend("--ft-input-label-disabled-text-color",at.colorOnSurfaceDisabled),colorSurface:rt.external(at.colorSurface,"Design system"),borderRadiusS:rt.external(at.borderRadiusS,"Design system"),colorError:rt.external(at.colorError,"Design system")};class Ae extends lt{constructor(){super(...arguments),this.text="",this.raised=!1,this.outlined=!1,this.disabled=!1,this.error=!1}render(){const t={"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error};return _`
|
|
188
188
|
<div class="${ft(t)}">
|
|
189
189
|
${this.text?_`
|
|
190
190
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -204,6 +204,10 @@ const ft=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
204
204
|
border-color: ${Le.borderColor};
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
+
.ft-input-label.ft-input-label--in-error {
|
|
208
|
+
border-color: ${Le.colorError}
|
|
209
|
+
}
|
|
210
|
+
|
|
207
211
|
.ft-input-label:before,
|
|
208
212
|
.ft-input-label:after {
|
|
209
213
|
content: "";
|
|
@@ -236,6 +240,10 @@ const ft=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
236
240
|
${st(oe.lineHeight,Le.fontSize)};
|
|
237
241
|
}
|
|
238
242
|
|
|
243
|
+
.ft-input-label--in-error .ft-input-label--text {
|
|
244
|
+
color: ${Le.colorError}
|
|
245
|
+
}
|
|
246
|
+
|
|
239
247
|
.ft-input-label--disabled .ft-input-label--text {
|
|
240
248
|
color: ${Le.disabledTextColor};
|
|
241
249
|
}
|
|
@@ -296,4 +304,4 @@ const ft=(t=>(...e)=>({_$litDirective$:t,values:e}))(class extends class{constru
|
|
|
296
304
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
297
305
|
border-top: none;
|
|
298
306
|
}
|
|
299
|
-
`],ze([i({type:String})],Ae.prototype,"text",void 0),ze([i({type:Boolean})],Ae.prototype,"raised",void 0),ze([i({type:Boolean})],Ae.prototype,"outlined",void 0),ze([i({type:Boolean})],Ae.prototype,"disabled",void 0),n("ft-input-label")(Ae),t.FtInputLabel=Ae,t.FtInputLabelCssVariables=Le,Object.defineProperty(t,"t",{value:!0})}({});
|
|
307
|
+
`],ze([i({type:String})],Ae.prototype,"text",void 0),ze([i({type:Boolean})],Ae.prototype,"raised",void 0),ze([i({type:Boolean})],Ae.prototype,"outlined",void 0),ze([i({type:Boolean})],Ae.prototype,"disabled",void 0),ze([i({type:Boolean})],Ae.prototype,"error",void 0),n("ft-input-label")(Ae),t.FtInputLabel=Ae,t.FtInputLabelCssVariables=Le,Object.defineProperty(t,"t",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-input-label",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Dynamic label with outline",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-typography": "^0.2.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "^0.2.
|
|
22
|
+
"@fluid-topics/ft-typography": "^0.2.4",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "^0.2.4",
|
|
24
24
|
"lit": "2.1.3"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "dd34b0ce95457dbe65b23250e49804ee883096d9"
|
|
27
27
|
}
|