@fluid-topics/ft-text-field 0.3.57 → 0.3.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-text-field.light.js +12 -12
- package/build/ft-text-field.min.js +191 -191
- package/package.json +7 -7
|
@@ -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,a=r.trustedTypes,f=a?a.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,a,f=-1,h=0;for(;h<i.length&&(n.lastIndex=h,a=n.exec(i),null!==a);)h=n.lastIndex,n===y?"!--"===a[1]?n=b:void 0!==a[1]?n=v:void 0!==a[2]?(k.test(a[2])&&(s=RegExp("</"+a[2],"g")),n=m):void 0!==a[3]&&(n=m):n===m?">"===a[0]?(n=null!=s?s:y,f=-1):void 0===a[1]?f=-2:(f=n.lastIndex-a[2].length,r=a[1],n=void 0===a[3]?m:'"'===a[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:f>=0?(o.push(r),i.slice(0,f)+"$lit$"+i.slice(f)+p+c):i+p+(-2===f?(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!==f?f.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,[f,d]=j(t,e);if(this.el=I.createElement(f,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=a?a.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 a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const f=u(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==f&&(null===(l=null==a?void 0:a._$AO)||void 0===l||l.call(a,!1),void 0===f?a=void 0:(a=new f(t),a._$AT(t,i,o)),void 0!==o?(null!==(n=(r=i)._$Co)&&void 0!==n?n:r._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=C(t,a._$AS(t,e.values),a,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,a=o[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new D(l,l.nextSibling,this,t):1===a.type?e=new a.ctor(l,a.name,a.strings,this,t):6===a.type&&(e=new T(l,this,t)),this.u.push(e),a=o[++r]}n!==(null==a?void 0:a.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=a?a.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 f
|
|
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,f=0,p=!1;for(;f<o;){for(a=e[f];f<o&&void 0!==(l=i[f],s=F(l));)a+=s+e[++f],p=!0;r.push(l),n.push(a),f++}if(f===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"),at=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",L),ft=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: ${at};
|
|
39
|
+
font-size: ${ft};
|
|
40
40
|
font-weight: ${pt};
|
|
41
41
|
letter-spacing: ${ht};
|
|
42
42
|
line-height: ${dt};
|
|
@@ -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 ae 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
|
+
`}}ae.elementDefinitions={},ae.styles=[Jt,ne],re([o.property({type:String})],ae.prototype,"text",void 0),re([o.property({type:Boolean})],ae.prototype,"raised",void 0),re([o.property({type:Boolean})],ae.prototype,"outlined",void 0),re([o.property({type:Boolean})],ae.prototype,"disabled",void 0),re([o.property({type:Boolean})],ae.prototype,"error",void 0),e.customElement("ft-input-label")(ae);const fe=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),pe={color:fe,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",fe),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
|
}
|
|
@@ -401,12 +401,12 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
401
401
|
.ft-icon--material {
|
|
402
402
|
font-family: ${Se}, "Material Icons", sans-serif;
|
|
403
403
|
}
|
|
404
|
-
`;var Oe;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Oe||(Oe={}));var je=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 Ie extends e.FtLitElement{constructor(){super(...arguments),this.
|
|
405
|
-
<i class="ft-icon ${"ft-icon--"+
|
|
404
|
+
`;var Oe;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Oe||(Oe={}));var je=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 Ie extends e.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=i.nothing}render(){var t;const e=null!==(t=this.variant)&&void 0!==t?t:Oe.fluid_topics,o="material"!==e||this.value;return i.html`
|
|
405
|
+
<i class="ft-icon ${"ft-icon--"+e}">
|
|
406
406
|
${l.unsafeHTML(this.resolvedIcon)}
|
|
407
|
-
<slot ?hidden=${
|
|
407
|
+
<slot ?hidden=${o}></slot>
|
|
408
408
|
</i>
|
|
409
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case Oe.file_format:this.resolvedIcon=null!==(t=ve[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Oe.
|
|
409
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case Oe.file_format:this.resolvedIcon=null!==(t=ve[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Oe.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=be[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ie.elementDefinitions={},Ie.styles=Ne,je([o.property()],Ie.prototype,"variant",void 0),je([o.property()],Ie.prototype,"value",void 0),je([o.state()],Ie.prototype,"resolvedIcon",void 0),je([o.query("slot")],Ie.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Ie);const Ce={fontSize:e.FtCssVariableFactory.create("--ft-text-field-font-size","SIZE","14px"),labelSize:e.FtCssVariableFactory.create("--ft-text-field-label-size","SIZE","11px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","SIZE","16px"),helperColor:e.FtCssVariableFactory.extend("--ft-text-field-helper-color",e.designSystemVariables.colorOnSurfaceMedium),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system"),prefixColor:e.FtCssVariableFactory.extend("--ft-text-field-prefix-color",e.designSystemVariables.colorOnSurfaceMedium),iconColor:e.FtCssVariableFactory.extend("--ft-text-field-icon-color",e.designSystemVariables.colorOnSurfaceMedium),floatingZIndex:e.FtCssVariableFactory.create("--ft-text-field-floating-components-z-index","NUMBER","3"),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),colorOutline:e.FtCssVariableFactory.external(e.designSystemVariables.colorOutline,"Design system"),elevation02:e.FtCssVariableFactory.external(e.designSystemVariables.elevation02,"Design system"),suggestSize:e.FtCssVariableFactory.create("--ft-text-field-suggest-size","SIZE","300px")},Ae=i.css`
|
|
410
410
|
*:focus {
|
|
411
411
|
outline: none;
|
|
412
412
|
}
|
|
@@ -601,7 +601,7 @@ const W=Symbol.for(""),F=t=>{if((null==t?void 0:t.r)===W)return null==t?void 0:t
|
|
|
601
601
|
</ft-typography>
|
|
602
602
|
`:i.nothing}
|
|
603
603
|
</div>
|
|
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":
|
|
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":ae,"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`
|
|
605
605
|
.ft-text-field-suggestion {
|
|
606
606
|
position: relative;
|
|
607
607
|
padding: 8px 16px;
|