@fluid-topics/ft-text-field 0.3.51 → 0.3.53
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,18 +4,18 @@
|
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var n;const r=window,
|
|
7
|
+
var n;const r=window,f=r.trustedTypes,a=f?f.createPolicy("lit-html",{createHTML:t=>t}):void 0,p=`lit$${(Math.random()+"").slice(9)}$`,h="?"+p,d=`<${h}>`,c=document,x=(t="")=>c.createComment(t),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,g=Array.isArray,y=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,b=/-->/g,v=/>/g,m=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),$=/'/g,w=/"/g,k=/^(?:script|style|textarea|title)$/i,z=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),S=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),N=new WeakMap,O=c.createTreeWalker(c,129,null,!1),j=(t,e)=>{const i=t.length-1,o=[];let s,l=2===e?"<svg>":"",n=y;for(let e=0;e<i;e++){const i=t[e];let r,f,a=-1,h=0;for(;h<i.length&&(n.lastIndex=h,f=n.exec(i),null!==f);)h=n.lastIndex,n===y?"!--"===f[1]?n=b:void 0!==f[1]?n=v:void 0!==f[2]?(k.test(f[2])&&(s=RegExp("</"+f[2],"g")),n=m):void 0!==f[3]&&(n=m):n===m?">"===f[0]?(n=null!=s?s:y,a=-1):void 0===f[1]?a=-2:(a=n.lastIndex-f[2].length,r=f[1],n=void 0===f[3]?m:'"'===f[3]?w:$):n===w||n===$?n=m:n===b||n===v?n=y:(n=m,s=void 0);const c=n===m&&t[e+1].startsWith("/>")?" ":"";l+=n===y?i+d:a>=0?(o.push(r),i.slice(0,a)+"$lit$"+i.slice(a)+p+c):i+p+(-2===a?(o.push(void 0),e):c)}const r=l+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==a?a.createHTML(r):r,o]};class I{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,l=0;const n=t.length-1,r=this.parts,[a,d]=j(t,e);if(this.el=I.createElement(a,i),O.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=O.nextNode())&&r.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(p)){const i=d[l++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(p),e=/([.?@])?(.*)/.exec(i);r.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?_:"?"===e[1]?U:"@"===e[1]?M:B})}else r.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(k.test(o.tagName)){const t=o.textContent.split(p),e=t.length-1;if(e>0){o.textContent=f?f.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],x()),O.nextNode(),r.push({type:2,index:++s});o.append(t[e],x())}}}else if(8===o.nodeType)if(o.data===h)r.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(p,t+1));)r.push({type:7,index:s}),t+=p.length-1}s++}}static createElement(t,e){const i=c.createElement("template");return i.innerHTML=t,i}}function C(t,e,i=t,o){var s,l,n,r;if(e===S)return e;let f=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const a=u(e)?void 0:e._$litDirective$;return(null==f?void 0:f.constructor)!==a&&(null===(l=null==f?void 0:f._$AO)||void 0===l||l.call(f,!1),void 0===a?f=void 0:(f=new a(t),f._$AT(t,i,o)),void 0!==o?(null!==(n=(r=i)._$Co)&&void 0!==n?n:r._$Co=[])[o]=f:i._$Cl=f),void 0!==f&&(e=C(t,f._$AS(t,e.values),f,o)),e}class A{constructor(t,e){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:c).importNode(i,!0);O.currentNode=s;let l=O.nextNode(),n=0,r=0,f=o[0];for(;void 0!==f;){if(n===f.index){let e;2===f.type?e=new D(l,l.nextSibling,this,t):1===f.type?e=new f.ctor(l,f.name,f.strings,this,t):6===f.type&&(e=new T(l,this,t)),this.u.push(e),f=o[++r]}n!==(null==f?void 0:f.index)&&(l=O.nextNode(),n++)}return s}p(t){let e=0;for(const i of this.u)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class D{constructor(t,e,i,o){var s;this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cm}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=C(this,t,e),u(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==S&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>g(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==E&&u(this._$AH)?this._$AA.nextSibling.data=t:this.T(c.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=I.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.p(i);else{const t=new A(s,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=N.get(t.strings);return void 0===e&&N.set(t.strings,e=new I(t)),e}k(t){g(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new D(this.O(x()),this.O(x()),this,this.options)):i=e[o],i._$AI(s),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._$Cm=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class B{constructor(t,e,i,o,s){this.type=1,this._$AH=E,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=E}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let l=!1;if(void 0===s)t=C(this,t,e,0),l=!u(t)||t!==this._$AH&&t!==S,l&&(this._$AH=t);else{const o=t;let n,r;for(t=s[0],n=0;n<s.length-1;n++)r=C(this,o[i+n],e,n),r===S&&(r=this._$AH[n]),l||(l=!u(r)||r!==this._$AH[n]),r===E?t=E:t!==E&&(t+=(null!=r?r:"")+s[n+1]),this._$AH[n]=r}l&&!o&&this.j(t)}j(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class _ extends B{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===E?void 0:t}}const Z=f?f.emptyScript:"";class U extends B{constructor(){super(...arguments),this.type=4}j(t){t&&t!==E?this.element.setAttribute(this.name,Z):this.element.removeAttribute(this.name)}}class M extends B{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=C(this,t,e,0))&&void 0!==i?i:E)===S)return;const o=this._$AH,s=t===E&&o!==E||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,l=t!==E&&(o===E||s);s&&this.element.removeEventListener(this.name,this,o),l&&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 T{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){C(this,t)}}const R=r.litHtmlPolyfillSupport;null==R||R(I,D),(null!==(n=r.litHtmlVersions)&&void 0!==n?n:r.litHtmlVersions=[]).push("2.4.0");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2018 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t._$litStatic$},K=t=>({_$litStatic$:t,r:W}),G=new Map,H=(t=>(e,...i)=>{const o=i.length;let s,l;const n=[],r=[];let a
|
|
13
|
+
const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t._$litStatic$},K=t=>({_$litStatic$:t,r:W}),G=new Map,H=(t=>(e,...i)=>{const o=i.length;let s,l;const n=[],r=[];let f,a=0,p=!1;for(;a<o;){for(f=e[a];a<o&&void 0!==(l=i[a],s=F(l));)f+=s+e[++a],p=!0;r.push(l),n.push(f),a++}if(a===o&&n.push(e[o]),p){const t=n.join("$$lit$$");void 0===(e=G.get(t))&&(n.raw=n,G.set(t,e=n)),i=r}return t(e,...i)})(z);
|
|
14
14
|
/**
|
|
15
15
|
* @license
|
|
16
16
|
* Copyright 2020 Google LLC
|
|
17
17
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
|
-
*/var V;!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"}(V||(V={}));const q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),L=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),P={fontFamily:L,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},X=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",q),Y=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",P.fontSize,"20px"),J=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",P.fontWeight,"normal"),Q=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",P.letterSpacing,"0.15px"),tt=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",P.lineHeight,"1.2"),et=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",P.textTransform,"inherit"),it=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",q),ot=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",P.fontSize,"14px"),st=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",P.fontWeight,"normal"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",P.letterSpacing,"0.105px"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",P.lineHeight,"1.7"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",P.textTransform,"inherit"),
|
|
18
|
+
*/var V;!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"}(V||(V={}));const q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),L=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),P={fontFamily:L,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},X=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",q),Y=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",P.fontSize,"20px"),J=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",P.fontWeight,"normal"),Q=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",P.letterSpacing,"0.15px"),tt=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",P.lineHeight,"1.2"),et=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",P.textTransform,"inherit"),it=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",q),ot=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",P.fontSize,"14px"),st=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",P.fontWeight,"normal"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",P.letterSpacing,"0.105px"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",P.lineHeight,"1.7"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",P.textTransform,"inherit"),ft=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",L),at=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",P.fontSize,"16px"),pt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",P.fontWeight,"600"),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",P.letterSpacing,"0.144px"),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",P.lineHeight,"1.5"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",P.textTransform,"inherit"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",L),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",P.fontSize,"14px"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",P.fontWeight,"normal"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",P.letterSpacing,"0.098px"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",P.lineHeight,"1.7"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",P.textTransform,"inherit"),mt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",L),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",P.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",P.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",P.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",P.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",P.textTransform,"inherit")},$t=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",L),wt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",P.fontSize,"14px"),kt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",P.fontWeight,"normal"),zt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",P.letterSpacing,"0.252px"),St=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",P.lineHeight,"1.4"),Et=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",P.textTransform,"inherit"),Nt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",L),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",P.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",P.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",P.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",P.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",P.textTransform,"inherit")},Ot=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",L),jt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",P.fontSize,"10px"),It=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",P.fontWeight,"normal"),Ct=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",P.letterSpacing,"0.33px"),At=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",P.lineHeight,"1.6"),Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",P.textTransform,"inherit"),Bt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",L),_t=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",P.fontSize,"10px"),Zt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",P.fontWeight,"normal"),Ut=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",P.letterSpacing,"1.5px"),Mt=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",P.lineHeight,"1.6"),Tt=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",P.textTransform,"uppercase"),Rt=e.FtCssVariableFactory.extend("--ft-typography-button-font-family",L),Wt=e.FtCssVariableFactory.extend("--ft-typography-button-font-size",P.fontSize,"14px"),Ft=e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",P.fontWeight,"600"),Kt=e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",P.letterSpacing,"1.246px"),Gt=e.FtCssVariableFactory.extend("--ft-typography-button-line-height",P.lineHeight,"1.15"),Ht=e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",P.textTransform,"uppercase"),Vt=i.css`
|
|
19
19
|
.ft-typography--title {
|
|
20
20
|
font-family: ${X};
|
|
21
21
|
font-size: ${Y};
|
|
@@ -35,8 +35,8 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
35
35
|
}
|
|
36
36
|
`,Lt=i.css`
|
|
37
37
|
.ft-typography--subtitle1 {
|
|
38
|
-
font-family: ${
|
|
39
|
-
font-size: ${
|
|
38
|
+
font-family: ${ft};
|
|
39
|
+
font-size: ${at};
|
|
40
40
|
font-weight: ${pt};
|
|
41
41
|
letter-spacing: ${ht};
|
|
42
42
|
line-height: ${dt};
|
|
@@ -44,8 +44,8 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
44
44
|
}
|
|
45
45
|
`,Pt=i.css`
|
|
46
46
|
.ft-typography--subtitle2 {
|
|
47
|
-
font-family: ${
|
|
48
|
-
font-size: ${
|
|
47
|
+
font-family: ${xt};
|
|
48
|
+
font-size: ${ut};
|
|
49
49
|
font-weight: ${gt};
|
|
50
50
|
letter-spacing: ${yt};
|
|
51
51
|
line-height: ${bt};
|
|
@@ -239,7 +239,7 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
239
239
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
240
240
|
border-top: none;
|
|
241
241
|
}
|
|
242
|
-
`;var re=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class
|
|
242
|
+
`;var re=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class fe extends e.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 i.html`
|
|
243
243
|
<div class="${s.classMap(t)}">
|
|
244
244
|
${this.text?i.html`
|
|
245
245
|
<div class="ft-input-label--text ft-typography--caption">
|
|
@@ -248,7 +248,7 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
248
248
|
</div>
|
|
249
249
|
`:null}
|
|
250
250
|
</div>
|
|
251
|
-
`}}
|
|
251
|
+
`}}fe.elementDefinitions={},fe.styles=[Jt,ne],re([o.property({type:String})],fe.prototype,"text",void 0),re([o.property({type:Boolean})],fe.prototype,"raised",void 0),re([o.property({type:Boolean})],fe.prototype,"outlined",void 0),re([o.property({type:Boolean})],fe.prototype,"disabled",void 0),re([o.property({type:Boolean})],fe.prototype,"error",void 0),e.customElement("ft-input-label")(fe);const ae=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),pe={color:ae,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",ae),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")},he=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),de=he,ce=e.FtCssVariableFactory.extend("--ft-ripple-background-color",he),xe=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),ue=xe,ge=e.FtCssVariableFactory.extend("--ft-ripple-background-color",xe),ye=i.css`
|
|
252
252
|
:host {
|
|
253
253
|
display: contents;
|
|
254
254
|
}
|
|
@@ -282,7 +282,7 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
285
|
-
background-color: ${
|
|
285
|
+
background-color: ${ue};
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
@@ -358,7 +358,8 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
358
358
|
:host, i.ft-icon {
|
|
359
359
|
display: inline-flex;
|
|
360
360
|
align-items: center;
|
|
361
|
-
|
|
361
|
+
flex-shrink: 0;
|
|
362
|
+
flex-grow: 0;
|
|
362
363
|
}
|
|
363
364
|
|
|
364
365
|
:host {
|
|
@@ -390,6 +391,7 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
390
391
|
font-size: calc(0.9 * ${we});
|
|
391
392
|
position: relative;
|
|
392
393
|
top: -5%;
|
|
394
|
+
justify-content: center;
|
|
393
395
|
}
|
|
394
396
|
|
|
395
397
|
.ft-icon--file-format {
|
|
@@ -599,7 +601,7 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
599
601
|
</ft-typography>
|
|
600
602
|
`:i.nothing}
|
|
601
603
|
</div>
|
|
602
|
-
`}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}updateValueFromInputField(){var t;this.setValue((null===(t=this.input)||void 0===t?void 0:t.value)||"",!0)}handleInput(){var t;const e=(null===(t=this.input)||void 0===t?void 0:t.value)||"";this.value!==e&&(this.hideSuggestions=!1,this.value=e,this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})))}handleClick(){this.hideSuggestions=!1}setValue(t,e){this.value=t,e&&this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onInputBlur(){this.focused=!1}}Be.elementDefinitions={"ft-input-label":
|
|
604
|
+
`}updated(t){super.updated(t),(t.has("value")||t.has("filterSuggestions"))&&this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.suggestions.forEach((t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase()))),this.visibleSuggestions=this.suggestions.filter((t=>!t.hidden))):this.visibleSuggestions=this.suggestions}contentAvailableCallback(t){var e,i;if(super.contentAvailableCallback(t),!this.hideSuggestions&&this.visibleSuggestions.length>0){const t=null===(e=this.input)||void 0===e?void 0:e.getBoundingClientRect(),o=null===(i=this.suggestionsContainer)||void 0===i?void 0:i.getBoundingClientRect();t&&o&&(this.suggestionsOnTop=t.bottom+o.height>window.innerHeight&&t.top-o.height>0)}}updateValueFromInputField(){var t;this.setValue((null===(t=this.input)||void 0===t?void 0:t.value)||"",!0)}handleInput(){var t;const e=(null===(t=this.input)||void 0===t?void 0:t.value)||"";this.value!==e&&(this.hideSuggestions=!1,this.value=e,this.dispatchEvent(new CustomEvent("live-change",{detail:this.value})))}handleClick(){this.hideSuggestions=!1}setValue(t,e){this.value=t,e&&this.dispatchEvent(new CustomEvent("change",{detail:this.value}))}handleKeyboardNavigation(t){var e;if("ArrowDown"===t.key||"ArrowUp"===t.key){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;const i=this.visibleSuggestions.findIndex((t=>t.matches(":focus-within")));let o;o="ArrowDown"===t.key?i<this.visibleSuggestions.length-1?i+1:0:i>0?i-1:this.visibleSuggestions.length-1,null===(e=this.visibleSuggestions[o])||void 0===e||e.focus()}"Escape"!=t.key&&"Enter"!=t.key||(this.hideSuggestions=!0)}onSuggestionSelected(t){var e;this.setValue(t.detail,!0),null===(e=this.input)||void 0===e||e.focus(),setTimeout((()=>this.hideSuggestions=!0),0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onInputBlur(){this.focused=!1}}Be.elementDefinitions={"ft-input-label":fe,"ft-ripple":$e,"ft-typography":se,"ft-icon":Ie},Be.styles=[Xt,Ae],De([o.property()],Be.prototype,"label",void 0),De([o.property()],Be.prototype,"value",void 0),De([o.property()],Be.prototype,"helper",void 0),De([o.property({type:Boolean})],Be.prototype,"outlined",void 0),De([o.property({type:Boolean})],Be.prototype,"disabled",void 0),De([o.property({type:Boolean})],Be.prototype,"error",void 0),De([o.property()],Be.prototype,"prefix",void 0),De([o.property()],Be.prototype,"icon",void 0),De([o.property()],Be.prototype,"iconVariant",void 0),De([o.property({type:Boolean})],Be.prototype,"filterSuggestions",void 0),De([o.property({type:Number})],Be.prototype,"maxLength",void 0),De([o.state()],Be.prototype,"focused",void 0),De([o.state()],Be.prototype,"suggestionsOnTop",void 0),De([o.state()],Be.prototype,"hideSuggestions",void 0),De([o.state()],Be.prototype,"visibleSuggestions",void 0),De([o.query(".ft-text-field--input")],Be.prototype,"input",void 0),De([o.query(".ft-text-field--suggestions")],Be.prototype,"suggestionsContainer",void 0),De([o.queryAssignedElements({selector:"ft-text-field-suggestion"})],Be.prototype,"suggestions",void 0);const _e=i.css`
|
|
603
605
|
.ft-text-field-suggestion {
|
|
604
606
|
position: relative;
|
|
605
607
|
padding: 8px 16px;
|
|
@@ -77,7 +77,7 @@ var ht,ft;class ct extends C{constructor(){super(...arguments),this.renderOption
|
|
|
77
77
|
<style>${t}</style>
|
|
78
78
|
`))}
|
|
79
79
|
${this.getTemplate()}
|
|
80
|
-
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,o,s,n,r;const l=t=>null!=t&&t.trim().length>0,a=t.filter(l).map((t=>t.trim()));if(0===a.length)return void this.removeAttribute("exportparts");const p=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(s=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==s?s:[],i=null!==(r=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==r?r:[];new Array(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>p.add(t)))}if(0===p.size)return void this.removeAttribute("exportparts");const h=[...p.values()].flatMap((t=>a.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...h].join(", "))}}bt([o()],mt.prototype,"exportpartsPrefix",void 0),bt([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}([])],mt.prototype,"exportpartsPrefixes",void 0),y`
|
|
80
|
+
`}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this.exportpartsDebouncer.run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,o,s,n,r;const l=t=>null!=t&&t.trim().length>0,a=t.filter(l).map((t=>t.trim()));if(0===a.length)return void this.removeAttribute("exportparts");const p=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(s=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==s?s:[],i=null!==(r=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==r?r:[];new Array(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>p.add(t)))}if(0===p.size)return void this.removeAttribute("exportparts");const h=[...p.values()].flatMap((t=>a.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...h].join(", "))}}bt([o()],mt.prototype,"exportpartsPrefix",void 0),bt([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},...null!=e?e:{}})}([])],mt.prototype,"exportpartsPrefixes",void 0),bt([o()],mt.prototype,"customStylesheet",void 0),y`
|
|
81
81
|
.ft-no-text-select {
|
|
82
82
|
-webkit-touch-callout: none;
|
|
83
83
|
-webkit-user-select: none;
|
|
@@ -463,7 +463,8 @@ class ni extends St{constructor(t){if(super(t),this.it=q,t.type!==wt)throw Error
|
|
|
463
463
|
:host, i.ft-icon {
|
|
464
464
|
display: inline-flex;
|
|
465
465
|
align-items: center;
|
|
466
|
-
|
|
466
|
+
flex-shrink: 0;
|
|
467
|
+
flex-grow: 0;
|
|
467
468
|
}
|
|
468
469
|
|
|
469
470
|
:host {
|
|
@@ -495,6 +496,7 @@ class ni extends St{constructor(t){if(super(t),this.it=q,t.type!==wt)throw Error
|
|
|
495
496
|
font-size: calc(0.9 * ${pi});
|
|
496
497
|
position: relative;
|
|
497
498
|
top: -5%;
|
|
499
|
+
justify-content: center;
|
|
498
500
|
}
|
|
499
501
|
|
|
500
502
|
.ft-icon--file-format {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-text-field",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.53",
|
|
4
4
|
"description": "A fluidtopics text field",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-icon": "0.3.
|
|
23
|
-
"@fluid-topics/ft-input-label": "0.3.
|
|
24
|
-
"@fluid-topics/ft-ripple": "0.3.
|
|
25
|
-
"@fluid-topics/ft-typography": "0.3.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-icon": "0.3.53",
|
|
23
|
+
"@fluid-topics/ft-input-label": "0.3.53",
|
|
24
|
+
"@fluid-topics/ft-ripple": "0.3.53",
|
|
25
|
+
"@fluid-topics/ft-typography": "0.3.53",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "0.3.53",
|
|
27
27
|
"lit": "2.2.8"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "cf1f6c836c7bcacfd0a9abbd39a185077341036e"
|
|
30
30
|
}
|