@fluid-topics/ft-text-field 2.1.12 → 2.1.15
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 +36 -36
- package/build/ft-text-field.min.js +104 -104
- package/package.json +7 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";(()=>{var
|
|
2
|
-
\f\r]`,ce=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),lt=/'/g,at=/"/g,ht=/^(?:script|style|textarea|title)$/i,ke=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),ut=ke(1),ct=ke(2),xt=ke(3),ge=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),pt=new WeakMap,q=Q.createTreeWalker(Q,129);function gt(e,t){if(!Ve(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return rt!==void 0?rt.createHTML(t):t}var Ei=(e,t)=>{let i=e.length-1,o=[],r,n=t===2?"<svg>":t===3?"<math>":"",s=ce;for(let f=0;f<i;f++){let u=e[f],b,$,v=-1,V=0;for(;V<u.length&&(s.lastIndex=V,$=s.exec(u),$!==null);)V=s.lastIndex,s===ce?$[1]==="!--"?s=nt:$[1]!==void 0?s=st:$[2]!==void 0?(ht.test($[2])&&(r=RegExp("</"+$[2],"g")),s=I):$[3]!==void 0&&(s=I):s===I?$[0]===">"?(s=r??ce,v=-1):$[1]===void 0?v=-2:(v=s.lastIndex-$[2].length,b=$[1],s=$[3]===void 0?I:$[3]==='"'?at:lt):s===at||s===lt?s=I:s===nt||s===st?s=ce:(s=I,r=void 0);let K=s===I&&e[f+1].startsWith("/>")?" ":"";n+=s===ce?u+_i:v>=0?(o.push(b),u.slice(0,v)+ft+u.slice(v)+Z+K):u+Z+(v===-2?f:K)}return[gt(e,n+(e[i]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},me=class e{constructor({strings:t,_$litType$:i},o){let r;this.parts=[];let n=0,s=0,f=t.length-1,u=this.parts,[b,$]=Ei(t,i);if(this.el=e.createElement(b,o),q.currentNode=this.el.content,i===2||i===3){let v=this.el.content.firstChild;v.replaceWith(...v.childNodes)}for(;(r=q.nextNode())!==null&&u.length<f;){if(r.nodeType===1){if(r.hasAttributes())for(let v of r.getAttributeNames())if(v.endsWith(ft)){let V=$[s++],K=r.getAttribute(v).split(Z),Ae=/([.?@])?(.*)/.exec(V);u.push({type:1,index:n,name:Ae[2],strings:K,ctor:Ae[1]==="."?Me:Ae[1]==="?"?Be:Ae[1]==="@"?ze:oe}),r.removeAttribute(v)}else v.startsWith(Z)&&(u.push({type:6,index:n}),r.removeAttribute(v));if(ht.test(r.tagName)){let v=r.textContent.split(Z),V=v.length-1;if(V>0){r.textContent=Ee?Ee.emptyScript:"";for(let K=0;K<V;K++)r.append(v[K],$e()),q.nextNode(),u.push({type:2,index:++n});r.append(v[V],$e())}}}else if(r.nodeType===8)if(r.data===dt)u.push({type:2,index:n});else{let v=-1;for(;(v=r.data.indexOf(Z,v+1))!==-1;)u.push({type:7,index:n}),v+=Z.length-1}n++}}static createElement(t,i){let o=Q.createElement("template");return o.innerHTML=t,o}};function ie(e,t,i=e,o){if(t===ge)return t;let r=o!==void 0?i._$Co?.[o]:i._$Cl,n=xe(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),n===void 0?r=void 0:(r=new n(e),r._$AT(e,i,o)),o!==void 0?(i._$Co??=[])[o]=r:i._$Cl=r),r!==void 0&&(t=ie(e,r._$AS(e,t.values),r,o)),t}var De=class{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:i},parts:o}=this._$AD,r=(t?.creationScope??Q).importNode(i,!0);q.currentNode=r;let n=q.nextNode(),s=0,f=0,u=o[0];for(;u!==void 0;){if(s===u.index){let b;u.type===2?b=new Ce(n,n.nextSibling,this,t):u.type===1?b=new u.ctor(n,u.name,u.strings,this,t):u.type===6&&(b=new We(n,this,t)),this._$AV.push(b),u=o[++f]}s!==u?.index&&(n=q.nextNode(),s++)}return q.currentNode=Q,r}p(t){let i=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,i),i+=o.strings.length-2):o._$AI(t[i])),i++}},Ce=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,o,r){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=o,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,i=this._$AM;return i!==void 0&&t?.nodeType===11&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=ie(this,t,i),xe(t)?t===A||t==null||t===""?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==ge&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ai(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&xe(this._$AH)?this._$AA.nextSibling.data=t:this.T(Q.createTextNode(t)),this._$AH=t}$(t){let{values:i,_$litType$:o}=t,r=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=me.createElement(gt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===r)this._$AH.p(i);else{let n=new De(r,this),s=n.u(this.options);n.p(i),this.T(s),this._$AH=n}}_$AC(t){let i=pt.get(t.strings);return i===void 0&&pt.set(t.strings,i=new me(t)),i}k(t){Ve(this._$AH)||(this._$AH=[],this._$AR());let i=this._$AH,o,r=0;for(let n of t)r===i.length?i.push(o=new e(this.O($e()),this.O($e()),this,this.options)):o=i[r],o._$AI(n),r++;r<i.length&&(this._$AR(o&&o._$AB.nextSibling,r),i.length=r)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t&&t!==this._$AB;){let o=t.nextSibling;t.remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},oe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,o,r,n){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=r,this.options=n,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=A}_$AI(t,i=this,o,r){let n=this.strings,s=!1;if(n===void 0)t=ie(this,t,i,0),s=!xe(t)||t!==this._$AH&&t!==ge,s&&(this._$AH=t);else{let f=t,u,b;for(t=n[0],u=0;u<n.length-1;u++)b=ie(this,f[o+u],i,u),b===ge&&(b=this._$AH[u]),s||=!xe(b)||b!==this._$AH[u],b===A?t=A:t!==A&&(t+=(b??"")+n[u+1]),this._$AH[u]=b}s&&!r&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Me=class extends oe{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}},Be=class extends oe{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}},ze=class extends oe{constructor(t,i,o,r,n){super(t,i,o,r,n),this.type=5}_$AI(t,i=this){if((t=ie(this,t,i,0)??A)===ge)return;let o=this._$AH,r=t===A&&o!==A||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==A&&(o===A||r);r&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},We=class{constructor(t,i,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){ie(this,t)}};var $i=Ue.litHtmlPolyfillSupport;$i?.(me,Ce),(Ue.litHtmlVersions??=[]).push("3.3.0");var ye=e=>e??A;var w=c(T());var yt=Symbol.for(""),Ci=e=>{if(e?.r===yt)return e?._$litStatic$},Ge=e=>({_$litStatic$:e,r:yt});var mt=new Map,Ke=e=>(t,...i)=>{let o=i.length,r,n,s=[],f=[],u,b=0,$=!1;for(;b<o;){for(u=t[b];b<o&&(n=i[b],(r=Ci(n))!==void 0);)u+=r+t[++b],$=!0;b!==o&&f.push(n),s.push(u),b++}if(b===o&&s.push(t[o]),$){let v=s.join("$$lit$$");(t=mt.get(v))===void 0&&(s.raw=s,mt.set(v,t=s)),i=f}return e(t,...i)},je=Ke(ut),Wi=Ke(ct),Ui=Ke(xt);var Ze=c(j()),Lt=c(T());var re;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button"})(re||(re={}));var H=c(P()),a=c(T()),bt=a.FtCssVariableFactory.extend("--ft-typography-font-family","",a.designSystemVariables.titleFont),G=a.FtCssVariableFactory.extend("--ft-typography-font-family","",a.designSystemVariables.contentFont),p={fontFamily:G,fontSize:a.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:a.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:a.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:a.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:a.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},ne={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-title-font-family","",bt),fontSize:a.FtCssVariableFactory.extend("--ft-typography-title-font-size","",p.fontSize,"20px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",p.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",p.letterSpacing,"0.15px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-title-line-height","",p.lineHeight,"1.2"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",p.textTransform,"inherit")},se={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",bt),fontSize:a.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",p.fontSize,"14px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",p.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",p.letterSpacing,"0.105px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",p.lineHeight,"1.7"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",p.textTransform,"inherit")},le={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",G),fontSize:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",p.fontSize,"16px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",p.fontWeight,"600"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",p.letterSpacing,"0.144px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",p.lineHeight,"1.5"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",p.textTransform,"inherit")},ae={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",G),fontSize:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",p.fontSize,"14px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",p.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",p.letterSpacing,"0.098px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",p.lineHeight,"1.7"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",p.textTransform,"inherit")},k={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",G),fontSize:a.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",p.fontSize,"16px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",p.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",p.letterSpacing,"0.496px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",p.lineHeight,"1.5"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",p.textTransform,"inherit")},pe={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",G),fontSize:a.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",p.fontSize,"14px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",p.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",p.letterSpacing,"0.252px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",p.lineHeight,"1.4"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",p.textTransform,"inherit")},N={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",G),fontSize:a.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",p.fontSize,"12px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",p.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",p.letterSpacing,"0.396px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",p.lineHeight,"1.33"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",p.textTransform,"inherit")},fe={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",G),fontSize:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",p.fontSize,"10px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",p.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",p.letterSpacing,"0.33px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",p.lineHeight,"1.6"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",p.textTransform,"inherit")},de={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",G),fontSize:a.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",p.fontSize,"10px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",p.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",p.letterSpacing,"1.5px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",p.lineHeight,"1.6"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",p.textTransform,"uppercase")},he={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-button-font-family","",G),fontSize:a.FtCssVariableFactory.extend("--ft-typography-button-font-size","",p.fontSize,"14px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",p.fontWeight,"600"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",p.letterSpacing,"1.246px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-button-line-height","",p.lineHeight,"1.15"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",p.textTransform,"uppercase")},vt=H.css`
|
|
1
|
+
"use strict";(()=>{var mi=Object.create;var Qe=Object.defineProperty;var yi=Object.getOwnPropertyDescriptor;var bi=Object.getOwnPropertyNames;var vi=Object.getPrototypeOf,Si=Object.prototype.hasOwnProperty;var te=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(i){throw t=0,i}};var _i=(e,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of bi(t))!Si.call(e,r)&&r!==i&&Qe(e,r,{get:()=>t[r],enumerable:!(o=yi(t,r))||o.enumerable});return e};var c=(e,t,i)=>(i=e!=null?mi(vi(e)):{},_i(t||!e||!e.__esModule?Qe(i,"default",{value:e,enumerable:!0}):i,e));var T=te((Ri,Je)=>{Je.exports=ftGlobals.wcUtils});var P=te((Li,Fe)=>{Fe.exports=ftGlobals.lit});var j=te((Ni,et)=>{et.exports=ftGlobals.litDecorators});var it=te((wi,tt)=>{tt.exports=ftGlobals.litRepeat});var ue=te((Pi,ot)=>{ot.exports=ftGlobals.litClassMap});var ii=te((zo,ti)=>{ti.exports=ftGlobals.litUnsafeHTML});var gi=c(T());var C=c(P()),g=c(j()),ui=c(it()),ci=c(ue());var Ue=globalThis,rt=e=>e,Ee=Ue.trustedTypes,nt=Ee?Ee.createPolicy("lit-html",{createHTML:e=>e}):void 0,dt="$lit$",Y=`lit$${Math.random().toFixed(9).slice(2)}$`,ht="?"+Y,Ai=`<${ht}>`,Q=document,$e=()=>Q.createComment(""),xe=e=>e===null||typeof e!="object"&&typeof e!="function",Ve=Array.isArray,Ei=e=>Ve(e)||typeof e?.[Symbol.iterator]=="function",De=`[
|
|
2
|
+
\f\r]`,ce=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,st=/-->/g,lt=/>/g,I=RegExp(`>|${De}(?:([^\\s"'>=/]+)(${De}*=${De}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),at=/'/g,pt=/"/g,ut=/^(?:script|style|textarea|title)$/i,ke=e=>(t,...i)=>({_$litType$:e,strings:t,values:i}),ct=ke(1),xt=ke(2),gt=ke(3),ge=Symbol.for("lit-noChange"),A=Symbol.for("lit-nothing"),ft=new WeakMap,q=Q.createTreeWalker(Q,129);function mt(e,t){if(!Ve(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return nt!==void 0?nt.createHTML(t):t}var $i=(e,t)=>{let i=e.length-1,o=[],r,n=t===2?"<svg>":t===3?"<math>":"",s=ce;for(let f=0;f<i;f++){let u=e[f],b,$,v=-1,V=0;for(;V<u.length&&(s.lastIndex=V,$=s.exec(u),$!==null);)V=s.lastIndex,s===ce?$[1]==="!--"?s=st:$[1]!==void 0?s=lt:$[2]!==void 0?(ut.test($[2])&&(r=RegExp("</"+$[2],"g")),s=I):$[3]!==void 0&&(s=I):s===I?$[0]===">"?(s=r??ce,v=-1):$[1]===void 0?v=-2:(v=s.lastIndex-$[2].length,b=$[1],s=$[3]===void 0?I:$[3]==='"'?pt:at):s===pt||s===at?s=I:s===st||s===lt?s=ce:(s=I,r=void 0);let K=s===I&&e[f+1].startsWith("/>")?" ":"";n+=s===ce?u+Ai:v>=0?(o.push(b),u.slice(0,v)+dt+u.slice(v)+Y+K):u+Y+(v===-2?f:K)}return[mt(e,n+(e[i]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},me=class e{constructor({strings:t,_$litType$:i},o){let r;this.parts=[];let n=0,s=0,f=t.length-1,u=this.parts,[b,$]=$i(t,i);if(this.el=e.createElement(b,o),q.currentNode=this.el.content,i===2||i===3){let v=this.el.content.firstChild;v.replaceWith(...v.childNodes)}for(;(r=q.nextNode())!==null&&u.length<f;){if(r.nodeType===1){if(r.hasAttributes())for(let v of r.getAttributeNames())if(v.endsWith(dt)){let V=$[s++],K=r.getAttribute(v).split(Y),Ae=/([.?@])?(.*)/.exec(V);u.push({type:1,index:n,name:Ae[2],strings:K,ctor:Ae[1]==="."?Me:Ae[1]==="?"?Be:Ae[1]==="@"?ze:oe}),r.removeAttribute(v)}else v.startsWith(Y)&&(u.push({type:6,index:n}),r.removeAttribute(v));if(ut.test(r.tagName)){let v=r.textContent.split(Y),V=v.length-1;if(V>0){r.textContent=Ee?Ee.emptyScript:"";for(let K=0;K<V;K++)r.append(v[K],$e()),q.nextNode(),u.push({type:2,index:++n});r.append(v[V],$e())}}}else if(r.nodeType===8)if(r.data===ht)u.push({type:2,index:n});else{let v=-1;for(;(v=r.data.indexOf(Y,v+1))!==-1;)u.push({type:7,index:n}),v+=Y.length-1}n++}}static createElement(t,i){let o=Q.createElement("template");return o.innerHTML=t,o}};function ie(e,t,i=e,o){if(t===ge)return t;let r=o!==void 0?i._$Co?.[o]:i._$Cl,n=xe(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),n===void 0?r=void 0:(r=new n(e),r._$AT(e,i,o)),o!==void 0?(i._$Co??=[])[o]=r:i._$Cl=r),r!==void 0&&(t=ie(e,r._$AS(e,t.values),r,o)),t}var He=class{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:i},parts:o}=this._$AD,r=(t?.creationScope??Q).importNode(i,!0);q.currentNode=r;let n=q.nextNode(),s=0,f=0,u=o[0];for(;u!==void 0;){if(s===u.index){let b;u.type===2?b=new Ce(n,n.nextSibling,this,t):u.type===1?b=new u.ctor(n,u.name,u.strings,this,t):u.type===6&&(b=new We(n,this,t)),this._$AV.push(b),u=o[++f]}s!==u?.index&&(n=q.nextNode(),s++)}return q.currentNode=Q,r}p(t){let i=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,i),i+=o.strings.length-2):o._$AI(t[i])),i++}},Ce=class e{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,i,o,r){this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=o,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,i=this._$AM;return i!==void 0&&t?.nodeType===11&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=ie(this,t,i),xe(t)?t===A||t==null||t===""?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==ge&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ei(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==A&&xe(this._$AH)?this._$AA.nextSibling.data=t:this.T(Q.createTextNode(t)),this._$AH=t}$(t){let{values:i,_$litType$:o}=t,r=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=me.createElement(mt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===r)this._$AH.p(i);else{let n=new He(r,this),s=n.u(this.options);n.p(i),this.T(s),this._$AH=n}}_$AC(t){let i=ft.get(t.strings);return i===void 0&&ft.set(t.strings,i=new me(t)),i}k(t){Ve(this._$AH)||(this._$AH=[],this._$AR());let i=this._$AH,o,r=0;for(let n of t)r===i.length?i.push(o=new e(this.O($e()),this.O($e()),this,this.options)):o=i[r],o._$AI(n),r++;r<i.length&&(this._$AR(o&&o._$AB.nextSibling,r),i.length=r)}_$AR(t=this._$AA.nextSibling,i){for(this._$AP?.(!1,!0,i);t!==this._$AB;){let o=rt(t).nextSibling;rt(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},oe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,i,o,r,n){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=r,this.options=n,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=A}_$AI(t,i=this,o,r){let n=this.strings,s=!1;if(n===void 0)t=ie(this,t,i,0),s=!xe(t)||t!==this._$AH&&t!==ge,s&&(this._$AH=t);else{let f=t,u,b;for(t=n[0],u=0;u<n.length-1;u++)b=ie(this,f[o+u],i,u),b===ge&&(b=this._$AH[u]),s||=!xe(b)||b!==this._$AH[u],b===A?t=A:t!==A&&(t+=(b??"")+n[u+1]),this._$AH[u]=b}s&&!r&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Me=class extends oe{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}},Be=class extends oe{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==A)}},ze=class extends oe{constructor(t,i,o,r,n){super(t,i,o,r,n),this.type=5}_$AI(t,i=this){if((t=ie(this,t,i,0)??A)===ge)return;let o=this._$AH,r=t===A&&o!==A||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==A&&(o===A||r);r&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},We=class{constructor(t,i,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){ie(this,t)}};var Ci=Ue.litHtmlPolyfillSupport;Ci?.(me,Ce),(Ue.litHtmlVersions??=[]).push("3.3.3");var ye=e=>e??A;var w=c(T());var bt=Symbol.for(""),Ti=e=>{if(e?.r===bt)return e?._$litStatic$},Ge=e=>({_$litStatic$:e,r:bt});var yt=new Map,Ke=e=>(t,...i)=>{let o=i.length,r,n,s=[],f=[],u,b=0,$=!1;for(;b<o;){for(u=t[b];b<o&&(n=i[b],(r=Ti(n))!==void 0);)u+=r+t[++b],$=!0;b!==o&&f.push(n),s.push(u),b++}if(b===o&&s.push(t[o]),$){let v=s.join("$$lit$$");(t=yt.get(v))===void 0&&(s.raw=s,yt.set(v,t=s)),i=f}return e(t,...i)},je=Ke(ct),Ui=Ke(xt),Vi=Ke(gt);var Ye=c(j()),Nt=c(T());var re;(function(e){e.title="title",e.title_dense="title-dense",e.subtitle1="subtitle1",e.subtitle2="subtitle2",e.body1="body1",e.body2="body2",e.caption="caption",e.breadcrumb="breadcrumb",e.overline="overline",e.button="button"})(re||(re={}));var D=c(P()),a=c(T()),vt=a.FtCssVariableFactory.extend("--ft-typography-font-family","",a.designSystemVariables.titleFont),G=a.FtCssVariableFactory.extend("--ft-typography-font-family","",a.designSystemVariables.contentFont),p={fontFamily:G,fontSize:a.FtCssVariableFactory.create("--ft-typography-font-size","","SIZE","16px"),fontWeight:a.FtCssVariableFactory.create("--ft-typography-font-weight","","UNKNOWN","normal"),letterSpacing:a.FtCssVariableFactory.create("--ft-typography-letter-spacing","","SIZE","0.496px"),lineHeight:a.FtCssVariableFactory.create("--ft-typography-line-height","","NUMBER","1.5"),textTransform:a.FtCssVariableFactory.create("--ft-typography-text-transform","","UNKNOWN","inherit")},ne={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-title-font-family","",vt),fontSize:a.FtCssVariableFactory.extend("--ft-typography-title-font-size","",p.fontSize,"20px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-title-font-weight","",p.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing","",p.letterSpacing,"0.15px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-title-line-height","",p.lineHeight,"1.2"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-title-text-transform","",p.textTransform,"inherit")},se={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family","",vt),fontSize:a.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size","",p.fontSize,"14px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight","",p.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing","",p.letterSpacing,"0.105px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height","",p.lineHeight,"1.7"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform","",p.textTransform,"inherit")},le={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family","",G),fontSize:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size","",p.fontSize,"16px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight","",p.fontWeight,"600"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing","",p.letterSpacing,"0.144px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height","",p.lineHeight,"1.5"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform","",p.textTransform,"inherit")},ae={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family","",G),fontSize:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size","",p.fontSize,"14px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight","",p.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing","",p.letterSpacing,"0.098px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height","",p.lineHeight,"1.7"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform","",p.textTransform,"inherit")},k={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-body1-font-family","",G),fontSize:a.FtCssVariableFactory.extend("--ft-typography-body1-font-size","",p.fontSize,"16px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-body1-font-weight","",p.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing","",p.letterSpacing,"0.496px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-body1-line-height","",p.lineHeight,"1.5"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-body1-text-transform","",p.textTransform,"inherit")},pe={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-body2-font-family","",G),fontSize:a.FtCssVariableFactory.extend("--ft-typography-body2-font-size","",p.fontSize,"14px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-body2-font-weight","",p.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing","",p.letterSpacing,"0.252px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-body2-line-height","",p.lineHeight,"1.4"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-body2-text-transform","",p.textTransform,"inherit")},N={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-caption-font-family","",G),fontSize:a.FtCssVariableFactory.extend("--ft-typography-caption-font-size","",p.fontSize,"12px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-caption-font-weight","",p.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing","",p.letterSpacing,"0.396px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-caption-line-height","",p.lineHeight,"1.33"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-caption-text-transform","",p.textTransform,"inherit")},fe={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family","",G),fontSize:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size","",p.fontSize,"10px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight","",p.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing","",p.letterSpacing,"0.33px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height","",p.lineHeight,"1.6"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform","",p.textTransform,"inherit")},de={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-overline-font-family","",G),fontSize:a.FtCssVariableFactory.extend("--ft-typography-overline-font-size","",p.fontSize,"10px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-overline-font-weight","",p.fontWeight,"normal"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing","",p.letterSpacing,"1.5px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-overline-line-height","",p.lineHeight,"1.6"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-overline-text-transform","",p.textTransform,"uppercase")},he={fontFamily:a.FtCssVariableFactory.extend("--ft-typography-button-font-family","",G),fontSize:a.FtCssVariableFactory.extend("--ft-typography-button-font-size","",p.fontSize,"14px"),fontWeight:a.FtCssVariableFactory.extend("--ft-typography-button-font-weight","",p.fontWeight,"600"),letterSpacing:a.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing","",p.letterSpacing,"1.246px"),lineHeight:a.FtCssVariableFactory.extend("--ft-typography-button-line-height","",p.lineHeight,"1.15"),textTransform:a.FtCssVariableFactory.extend("--ft-typography-button-text-transform","",p.textTransform,"uppercase")},St=D.css`
|
|
4
4
|
.ft-typography--title {
|
|
5
5
|
font-family: ${ne.fontFamily};
|
|
6
6
|
font-size: ${ne.fontSize};
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
line-height: ${ne.lineHeight};
|
|
10
10
|
text-transform: ${ne.textTransform};
|
|
11
11
|
}
|
|
12
|
-
`,
|
|
12
|
+
`,_t=D.css`
|
|
13
13
|
.ft-typography--title-dense {
|
|
14
14
|
font-family: ${se.fontFamily};
|
|
15
15
|
font-size: ${se.fontSize};
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
line-height: ${se.lineHeight};
|
|
19
19
|
text-transform: ${se.textTransform};
|
|
20
20
|
}
|
|
21
|
-
`,
|
|
21
|
+
`,At=D.css`
|
|
22
22
|
.ft-typography--subtitle1 {
|
|
23
23
|
font-family: ${le.fontFamily};
|
|
24
24
|
font-size: ${le.fontSize};
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
line-height: ${le.lineHeight};
|
|
28
28
|
text-transform: ${le.textTransform};
|
|
29
29
|
}
|
|
30
|
-
`,
|
|
30
|
+
`,Et=D.css`
|
|
31
31
|
.ft-typography--subtitle2 {
|
|
32
32
|
font-family: ${ae.fontFamily};
|
|
33
33
|
font-size: ${ae.fontSize};
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
text-transform: ${ae.textTransform};
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
`,Te=
|
|
40
|
+
`,Te=D.css`
|
|
41
41
|
.ft-typography--body1 {
|
|
42
42
|
font-family: ${k.fontFamily};
|
|
43
43
|
font-size: ${k.fontSize};
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
line-height: ${k.lineHeight};
|
|
47
47
|
text-transform: ${k.textTransform};
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
`,$t=D.css`
|
|
50
50
|
.ft-typography--body2 {
|
|
51
51
|
font-family: ${pe.fontFamily};
|
|
52
52
|
font-size: ${pe.fontSize};
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
line-height: ${pe.lineHeight};
|
|
56
56
|
text-transform: ${pe.textTransform};
|
|
57
57
|
}
|
|
58
|
-
`,Oe=
|
|
58
|
+
`,Oe=D.css`
|
|
59
59
|
.ft-typography--caption {
|
|
60
60
|
font-family: ${N.fontFamily};
|
|
61
61
|
font-size: ${N.fontSize};
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
line-height: ${N.lineHeight};
|
|
65
65
|
text-transform: ${N.textTransform};
|
|
66
66
|
}
|
|
67
|
-
|
|
67
|
+
`,Ct=D.css`
|
|
68
68
|
.ft-typography--breadcrumb {
|
|
69
69
|
font-family: ${fe.fontFamily};
|
|
70
70
|
font-size: ${fe.fontSize};
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
line-height: ${fe.lineHeight};
|
|
74
74
|
text-transform: ${fe.textTransform};
|
|
75
75
|
}
|
|
76
|
-
`,
|
|
76
|
+
`,Tt=D.css`
|
|
77
77
|
.ft-typography--overline {
|
|
78
78
|
font-family: ${de.fontFamily};
|
|
79
79
|
font-size: ${de.fontSize};
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
line-height: ${de.lineHeight};
|
|
83
83
|
text-transform: ${de.textTransform};
|
|
84
84
|
}
|
|
85
|
-
`,
|
|
85
|
+
`,Ot=D.css`
|
|
86
86
|
.ft-typography--button {
|
|
87
87
|
font-family: ${he.fontFamily};
|
|
88
88
|
font-size: ${he.fontSize};
|
|
@@ -91,11 +91,11 @@
|
|
|
91
91
|
line-height: ${he.lineHeight};
|
|
92
92
|
text-transform: ${he.textTransform};
|
|
93
93
|
}
|
|
94
|
-
`,
|
|
94
|
+
`,Rt=D.css`
|
|
95
95
|
.ft-typography {
|
|
96
96
|
vertical-align: inherit;
|
|
97
97
|
}
|
|
98
|
-
`;var
|
|
98
|
+
`;var Lt=function(e,t,i,o){var r=arguments.length,n=r<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,i):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,o);else for(var f=e.length-1;f>=0;f--)(s=e[f])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n},M=class extends Nt.FtLitElement{constructor(){super(...arguments),this.variant=re.body1}render(){return this.element?je`
|
|
99
99
|
<${Ge(this.element)}
|
|
100
100
|
part="text"
|
|
101
101
|
class="ft-typography ft-typography--${this.variant}">
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
</${Ge(this.element)}>
|
|
104
104
|
`:je`
|
|
105
105
|
<slot part="text" class="ft-typography ft-typography--${this.variant}"></slot>
|
|
106
|
-
`}};M.styles=[
|
|
106
|
+
`}};M.styles=[St,_t,At,Et,Te,$t,Oe,Ct,Tt,Ot,Rt];Lt([(0,Ye.property)()],M.prototype,"element",void 0);Lt([(0,Ye.property)()],M.prototype,"variant",void 0);var Pt=c(T());var wt={"ft-typography":M};(0,Pt.customElements)(wt);var Re=c(j());var Dt=c(P()),S=c(T());var m={fontSize:S.FtCssVariableFactory.create("--ft-input-label-font-size","","SIZE","14px"),raisedFontSize:S.FtCssVariableFactory.create("--ft-input-label-raised-font-size","","SIZE","11px"),raisedZIndex:S.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","","NUMBER","2"),verticalSpacing:S.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","","SIZE","4px"),horizontalSpacing:S.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","","SIZE","12px"),labelMaxWidth:S.FtCssVariableFactory.create("--ft-input-label-max-width","","SIZE","100%"),borderColor:S.FtCssVariableFactory.extend("--ft-input-label-border-color","",S.designSystemVariables.colorOutline),textColor:S.FtCssVariableFactory.extend("--ft-input-label-text-color","",S.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:S.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color","",S.designSystemVariables.colorOnSurfaceDisabled),backgroundColor:S.FtCssVariableFactory.extend("--ft-input-label-background-color","",S.designSystemVariables.colorSurface),borderRadius:S.FtCssVariableFactory.extend("--ft-input-label-border-radius","",S.designSystemVariables.borderRadiusS),colorError:S.FtCssVariableFactory.external(S.designSystemVariables.colorError,"Design system")},Ht=Dt.css`
|
|
107
107
|
.ft-input-label {
|
|
108
108
|
position: absolute;
|
|
109
109
|
inset: 0;
|
|
@@ -225,16 +225,16 @@
|
|
|
225
225
|
.ft-input-label--outlined.ft-input-label--raised .ft-input-label--text {
|
|
226
226
|
border-top: none;
|
|
227
227
|
}
|
|
228
|
-
`;var
|
|
229
|
-
<div class="${(0,
|
|
230
|
-
${
|
|
228
|
+
`;var Ze=c(P()),Xe=c(j());function Mt(e,t,i){return e?t(e):i?.(e)}var zt=c(ue()),Wt=c(T()),Bt=function(e,t,i,o){var r=arguments.length,n=r<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,i):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,o);else for(var f=e.length-1;f>=0;f--)(s=e[f])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n},J=class extends Wt.FtLitElement{constructor(){super(...arguments),this.text="",this.raised=!1}get inputLabelClasses(){return{}}render(){return Ze.html`
|
|
229
|
+
<div class="${(0,zt.classMap)(this.inputLabelClasses)}">
|
|
230
|
+
${Mt(this.text,()=>Ze.html`
|
|
231
231
|
<div class="ft-input-label--text ft-typography--caption">
|
|
232
232
|
<label class="ft-input-label--floating-text">${this.text}</label>
|
|
233
233
|
<span class="ft-input-label--hidden-text" aria-hidden="true">${this.text}</span>
|
|
234
234
|
</div>
|
|
235
235
|
`)}
|
|
236
236
|
</div>
|
|
237
|
-
`}};J.elementDefinitions={};
|
|
237
|
+
`}};J.elementDefinitions={};Bt([(0,Xe.property)({type:String})],J.prototype,"text",void 0);Bt([(0,Xe.property)({type:Boolean})],J.prototype,"raised",void 0);var Ie=function(e,t,i,o){var r=arguments.length,n=r<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,i):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,o);else for(var f=e.length-1;f>=0;f--)(s=e[f])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n},B=class extends J{constructor(){super(...arguments),this.outlined=!1,this.error=!1,this.disabled=!1}get inputLabelClasses(){return{"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}}};B.elementDefinitions={};B.styles=[Oe,Ht];Ie([(0,Re.property)({type:Boolean})],B.prototype,"outlined",void 0);Ie([(0,Re.property)({type:Boolean})],B.prototype,"error",void 0);Ie([(0,Re.property)({type:Boolean})],B.prototype,"disabled",void 0);var Vt=c(T());var Ut={"ft-input-label":B};(0,Vt.customElements)(Ut);var It=c(P()),O=c(j()),qt=c(ue()),be=c(T());var Zt=c(P()),E=c(T()),kt=E.FtCssVariableFactory.extend("--ft-ripple-color","",E.designSystemVariables.colorContent),U={color:kt,backgroundColor:E.FtCssVariableFactory.extend("--ft-ripple-background-color","",kt),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"),borderRadius:E.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},Gt=E.FtCssVariableFactory.extend("--ft-ripple-color","",E.designSystemVariables.colorPrimary),Kt={color:Gt,backgroundColor:E.FtCssVariableFactory.extend("--ft-ripple-background-color","",Gt)},jt=E.FtCssVariableFactory.extend("--ft-ripple-color","",E.designSystemVariables.colorSecondary),Yt={color:jt,backgroundColor:E.FtCssVariableFactory.extend("--ft-ripple-background-color","",jt)},Xt=Zt.css`
|
|
238
238
|
:host {
|
|
239
239
|
display: contents;
|
|
240
240
|
}
|
|
@@ -289,19 +289,19 @@
|
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
292
|
-
background-color: ${
|
|
292
|
+
background-color: ${Yt.backgroundColor};
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
296
|
-
background-color: ${
|
|
296
|
+
background-color: ${Yt.color};
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
300
|
-
background-color: ${
|
|
300
|
+
background-color: ${Kt.backgroundColor};
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
304
|
-
background-color: ${
|
|
304
|
+
background-color: ${Kt.color};
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
.ft-ripple .ft-ripple--background {
|
|
@@ -346,18 +346,18 @@
|
|
|
346
346
|
opacity: ${U.opacityContentOnSurfacePressed};
|
|
347
347
|
transform: translate(-50%, -50%) scale(1);
|
|
348
348
|
}
|
|
349
|
-
`;var L=function(e,t,i,o){var r=arguments.length,n=r<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,i):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,o);else for(var f=e.length-1;f>=0;f--)(s=e[f])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n},_=class extends be.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new be.Debouncer(1e3),this.onTransitionStart=t=>{t.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=t=>{t.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new be.Debouncer(10),this.moveRipple=t=>{var i,o;let{x:r,y:n}=this.getCoordinates(t),s=(o=(i=this.ripple)===null||i===void 0?void 0:i.getBoundingClientRect())!==null&&o!==void 0?o:{x:0,y:0,width:0,height:0};this.originX=Math.round(r!=null?r-s.x:s.width/2),this.originY=Math.round(n!=null?n-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(t?.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return
|
|
349
|
+
`;var L=function(e,t,i,o){var r=arguments.length,n=r<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,i):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,o);else for(var f=e.length-1;f>=0;f--)(s=e[f])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n},_=class extends be.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.originX=0,this.originY=0,this.debouncer=new be.Debouncer(1e3),this.onTransitionStart=t=>{t.propertyName==="transform"&&(this.rippling=this.pressed,this.debouncer.run(()=>this.rippling=!1))},this.onTransitionEnd=t=>{t.propertyName==="transform"&&(this.rippling=!1)},this.setupDebouncer=new be.Debouncer(10),this.moveRipple=t=>{var i,o;let{x:r,y:n}=this.getCoordinates(t),s=(o=(i=this.ripple)===null||i===void 0?void 0:i.getBoundingClientRect())!==null&&o!==void 0?o:{x:0,y:0,width:0,height:0};this.originX=Math.round(r!=null?r-s.x:s.width/2),this.originY=Math.round(n!=null?n-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=this.isFocusVisible(t?.target)&&!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return It.html`
|
|
350
350
|
<style>
|
|
351
351
|
.ft-ripple .ft-ripple--effect {
|
|
352
352
|
left: ${this.originX}px;
|
|
353
353
|
top: ${this.originY}px;
|
|
354
354
|
}
|
|
355
355
|
</style>
|
|
356
|
-
<div class="${(0,
|
|
356
|
+
<div class="${(0,qt.classMap)(t)}">
|
|
357
357
|
<div class="ft-ripple--background"></div>
|
|
358
358
|
<div class="ft-ripple--effect"></div>
|
|
359
359
|
</div>
|
|
360
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var i,o;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(i=this.target)===null||i===void 0||i.removeAttribute("data-is-ft-ripple-target")):(o=this.target)===null||o===void 0||o.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var t,i;let o=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;o&&this.setupFor((i=this.target)!==null&&i!==void 0?i:o)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");let i=(...f)=>u=>{f.forEach(b=>window.addEventListener(b,this.endPress,{once:!0})),this.startPress(u)},o=i("mouseup","contextmenu"),r=i("touchend","touchcancel"),n=f=>{["Enter"," "].includes(f.key)&&i("keyup")(f)},s={passive:!0};t.addEventListener("mouseover",this.startHover,s),t.addEventListener("mousemove",this.moveRipple,s),t.addEventListener("mouseleave",this.endHover,s),t.addEventListener("mousedown",o,s),t.addEventListener("touchstart",r,s),t.addEventListener("touchmove",this.moveRipple,s),t.addEventListener("keydown",n,s),t.addEventListener("focus",this.startFocus,s),t.addEventListener("blur",this.endFocus,s),t.addEventListener("focusin",this.startFocus,s),t.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,s),t.removeEventListener("mousemove",this.moveRipple,s),t.removeEventListener("mouseleave",this.endHover,s),t.removeEventListener("mousedown",o,s),t.removeEventListener("touchstart",r,s),t.removeEventListener("touchmove",this.moveRipple,s),t.removeEventListener("keydown",n,s),t.removeEventListener("focus",this.startFocus,s),t.removeEventListener("blur",this.endFocus,s),t.removeEventListener("focusin",this.startFocus,s),t.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let i=t,o=t,r,n;return i.x!=null?{x:r,y:n}=i:o.touches!=null&&(r=o.touches[0].clientX,n=o.touches[0].clientY),{x:r,y:n}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};_.elementDefinitions={};_.styles=
|
|
360
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var i,o;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),(i=this.target)===null||i===void 0||i.removeAttribute("data-is-ft-ripple-target")):(o=this.target)===null||o===void 0||o.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run(()=>this.defaultSetup())}defaultSetup(){var t,i;let o=(t=this.shadowRoot)===null||t===void 0?void 0:t.host.parentElement;o&&this.setupFor((i=this.target)!==null&&i!==void 0?i:o)}forceFocusUpdate(){var t;!((t=this.target)===null||t===void 0)&&t.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");let i=(...f)=>u=>{f.forEach(b=>window.addEventListener(b,this.endPress,{once:!0})),this.startPress(u)},o=i("mouseup","contextmenu"),r=i("touchend","touchcancel"),n=f=>{["Enter"," "].includes(f.key)&&i("keyup")(f)},s={passive:!0};t.addEventListener("mouseover",this.startHover,s),t.addEventListener("mousemove",this.moveRipple,s),t.addEventListener("mouseleave",this.endHover,s),t.addEventListener("mousedown",o,s),t.addEventListener("touchstart",r,s),t.addEventListener("touchmove",this.moveRipple,s),t.addEventListener("keydown",n,s),t.addEventListener("focus",this.startFocus,s),t.addEventListener("blur",this.endFocus,s),t.addEventListener("focusin",this.startFocus,s),t.addEventListener("focusout",this.endFocus,s),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,s),t.removeEventListener("mousemove",this.moveRipple,s),t.removeEventListener("mouseleave",this.endHover,s),t.removeEventListener("mousedown",o,s),t.removeEventListener("touchstart",r,s),t.removeEventListener("touchmove",this.moveRipple,s),t.removeEventListener("keydown",n,s),t.removeEventListener("focus",this.startFocus,s),t.removeEventListener("blur",this.endFocus,s),t.removeEventListener("focusin",this.startFocus,s),t.removeEventListener("focusout",this.endFocus,s),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){let i=t,o=t,r,n;return i.x!=null?{x:r,y:n}=i:o.touches!=null&&(r=o.touches[0].clientX,n=o.touches[0].clientY),{x:r,y:n}}isFocusVisible(t){return t instanceof HTMLElement?t.matches(":focus-visible"):!0}isIgnored(t){if(this.disabled)return!0;if(t!=null)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};_.elementDefinitions={};_.styles=Xt;L([(0,O.property)({type:Boolean})],_.prototype,"primary",void 0);L([(0,O.property)({type:Boolean})],_.prototype,"secondary",void 0);L([(0,O.property)({type:Boolean})],_.prototype,"unbounded",void 0);L([(0,O.property)({type:Boolean})],_.prototype,"activated",void 0);L([(0,O.property)({type:Boolean})],_.prototype,"selected",void 0);L([(0,O.property)({type:Boolean})],_.prototype,"disabled",void 0);L([(0,O.state)()],_.prototype,"hovered",void 0);L([(0,O.state)()],_.prototype,"focused",void 0);L([(0,O.state)()],_.prototype,"pressed",void 0);L([(0,O.state)()],_.prototype,"rippling",void 0);L([(0,O.state)()],_.prototype,"originX",void 0);L([(0,O.state)()],_.prototype,"originY",void 0);L([(0,O.query)(".ft-ripple")],_.prototype,"ripple",void 0);L([(0,O.query)(".ft-ripple--effect")],_.prototype,"rippleEffect",void 0);var Jt=c(T());var Qt={"ft-ripple":_};(0,Jt.customElements)(Qt);var Ft=c(P()),W=c(T()),z={size:W.FtCssVariableFactory.create("--ft-icon-font-size","","SIZE","24px"),fluidTopicsFontFamily:W.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family","",W.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-icons")),fileFormatFontFamily:W.FtCssVariableFactory.extend("--ft-icon-file-format-font-family","",W.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","ft-mime")),materialFontFamily:W.FtCssVariableFactory.extend("--ft-icon-material-font-family","",W.FtCssVariableFactory.create("--ft-icon-font-family","","UNKNOWN","Material Icons")),verticalAlign:W.FtCssVariableFactory.create("--ft-icon-vertical-align","","UNKNOWN","unset")},ei=[Ft.css`
|
|
361
361
|
:host, i.ft-icon {
|
|
362
362
|
display: inline-flex;
|
|
363
363
|
align-items: center;
|
|
@@ -405,12 +405,12 @@
|
|
|
405
405
|
.ft-icon--material {
|
|
406
406
|
font-family: ${z.materialFontFamily}, "Material Icons", sans-serif;
|
|
407
407
|
}
|
|
408
|
-
`,W.noTextSelect];var
|
|
408
|
+
`,W.noTextSelect];var Z;(function(e){e.fluid_topics="fluid-topics",e.file_format="file-format",e.material="material"})(Z||(Z={}));var ve=c(P()),X=c(j()),oi=c(T()),ri=c(ii());var F;(function(e){e.ADD_TO_PBK="",e.ALERT="",e.ADD_ALERT="",e.BACK_TO_SEARCH="",e.ADD_BOOKMARK="",e.BOOKMARK="",e.BOOKS="",e.MENU="",e.DOWNLOAD="",e.EDIT="",e.FEEDBACK="",e.HOME="",e.MODIFY_PBK="",e.SCHEDULED="",e.SEARCH="",e.EXPORT="",e.TOC="",e.WRITE_UGC="",e.TRASH="",e.USER="",e.EXTLINK="",e.CALENDAR="",e.OFFLINE="",e.BOOK="",e.DOWNLOAD_PLAIN="",e.CHECK="",e.STAR_PLAIN="",e.TOPICS="",e.DISC="",e.CIRCLE="",e.SHARED="",e.SORT_UNSORTED="",e.SORT_UP="",e.SORT_DOWN="",e.WORKING="",e.CLOSE="",e.ZOOM_OUT="",e.ZOOM_IN="",e.ZOOM_REALSIZE="",e.ZOOM_FULLSCREEN="",e.ADMIN_RESTRICTED="",e.ADMIN="",e.ADMIN_KHUB="",e.ADMIN_THEME="",e.ADMIN_USERS="",e.WARNING="",e.CONTEXT="",e.SEARCH_HOME="",e.STEPS="",e.ICON_EXPAND="",e.ICON_COLLAPSE="",e.INFO="",e.MINUS_PLAIN="",e.PLUS_PLAIN="",e.FACET_HAS_DESCENDANT="",e.TRIANGLE_BOTTOM="",e.TRIANGLE_LEFT="",e.TRIANGLE_RIGHT="",e.TRIANGLE_TOP="",e.THIN_ARROW="",e.SIGN_IN="",e.LOGOUT="",e.TRANSLATE="",e.CLOSE_PLAIN="",e.CHECK_PLAIN="",e.ARTICLE="",e.COLUMNS="",e.ANALYTICS="",e.COLLECTIONS="",e.ARROW_DOWN="",e.ARROW_LEFT="",e.ARROW_RIGHT="",e.ARROW_UP="",e.SEARCH_IN_PUBLICATION="",e.COPY_TO_CLIPBOARD="",e.SHARED_PBK="",e.ATTACHMENTS="",e.STRIPE_ARROW_LEFT="",e.STRIPE_ARROW_RIGHT="",e.FILTERS="",e.DOT="",e.MINUS="",e.PLUS="",e.MAILS_AND_NOTIFICATIONS="",e.SAVE="",e.LOCKER="",e.ADMIN_INTEGRATION="",e.SYNC="",e.TAG="",e.BOOK_PLAIN="",e.UPLOAD="",e.ONLINE="",e.TAG_PLAIN="",e.ACCOUNT_SETTINGS="",e.PRINT="",e.DEFAULT_ROLES="",e.SHORTCUT_MENU="",e.RELATIVES_PLAIN="",e.RELATIVES="",e.PAUSE="",e.PLAY="",e.ADMIN_PORTAL="",e.STAR="",e.THUMBS_DOWN="",e.THUMBS_DOWN_PLAIN="",e.THUMBS_UP="",e.THUMBS_UP_PLAIN="",e.FEEDBACK_PLAIN="",e.RATE_PLAIN="",e.RATE="",e.OFFLINE_SETTINGS="",e.MY_COLLECTIONS="",e.THIN_ARROW_LEFT="",e.THIN_ARROW_RIGHT="",e.RESET="",e.MY_LIBRARY="",e.UNSTRUCTURED_DOC="",e.CONTEXTUAL="",e.THIN_ARROW_UP="",e.ARROW_RIGHT_TO_LINE="",e.DESKTOP="",e.TABLET_LANDSCAPE="",e.TABLET_PORTRAIT="",e.MOBILE_LANDSCAPE="",e.MOBILE_PORTRAIT="",e.DIAGRAM_SUNBURST="",e.DIAGRAM_SANKEY="",e.COMMENT_QUESTION="",e.COMMENT_QUESTION_PLAIN="",e.MESSAGE_BOT="",e.CHART_SIMPLE="",e.BARS_PROGRESS="",e.BOOK_OPEN_GEAR="",e.BOOK_OPEN_GEAR_SLASH="",e.LINE_CHART="",e.STACKED_CHART="",e.CHART_BAR_STACKED="",e.CHART_BAR_GROUPED="",e.EYE_SLASH="",e.X_MARK="",e.EXPAND_WIDE="",e.PIP="",e.PIP_WIDE="",e.LIFE_RING="",e.GLOBE="",e.PIGGY_BANK="",e.EXTLINK_LIGHT="",e.CLONE="",e.CLONE_LINK_SIMPLE="",e.CHART_BAR_NORMALIZED="",e.CONSUMER="",e.OCTAGON_XMARK="",e.HOURGLASS_HALF="",e.CLOCK="",e.CLOCK_THREE="",e.CALENDAR_DAY="",e.COMPUTER_MOUSE_MAGNIFYING_GLASS="",e.WAND_MAGIC_SPARKLES="",e.PAPER_PLANE="",e.CIRCLE_STOP="",e.ARROW_ROTATE_RIGHT="",e.ARROWS_ROTATE="",e.ALIGN_RIGHT="",e.FORMAT_CLEAR="",e.ALIGN_CENTER="",e.ALIGN_LEFT="",e.PALETTE="",e.BOLD="",e.ITALIC="",e.UNDERLINE="",e.STRIKETHROUGH="",e.LINK_SIMPLE_SLASH="",e.LINK_SIMPLE="",e.ROUTE="",e.CIRCLE_USER_SLASH="",e.CIRCLE_USER_CHECK="",e.LIST_MAGNIFYING_GLASS="",e.MEDAL="",e.THUMBS_UP_THUMBS_DOWN_SOLID="",e.ARROW_TURN_DOWN_RIGHT="",e.FLASK="",e.LOCK_KEYHOLE_OPEN_SOLID="",e.HOURGLASS_END="",e.CIRCLE_QUESTION="",e.GRIP_LINES_SOLID="",e.TRANSLATE_SPARKLE_SOLID="",e.CODE="",e.ARROW_UP_RIGHT_AND_ARROW_DOWN_LEFT_FROM_CENTER="",e.PAPER_PLANE_SLASH="",e.COMPRESS="",e.EXPAND="",e.ARROW_ROTATE_LEFT="",e.MOBILE_SMALL="",e.SPARKLES="",e.HAND_SOLID="",e.CLOCK_SOLID="",e.CONTEXT_MENU_CURSOR="",e.LANGUAGE_SLASH="",e.MAGNIFYING_GLASS_FLOPPY_DISK="",e.CABINET_FILING_FLOPPY_DISK="",e.BOOKMARK_SLASH="",e.CIRCLE_PAUSE="",e.CIRCLE_PLAY="",e.CIRCLE_STOP_PLAIN="",e.CIRCLE_ARROW_DOWN="",e.SHARE_NODES="",e.BELL="",e.BELL_SLASH="",e.FILE="",e.HAND="",e.SQUARE_INFO_SOLID="",e.FILE_CODE="",e.BOX_CODE="",e.TOPICS_SOLID="",e.PHOTO_FILM="",e.HYPHEN_SOLID="",e.CROSSHAIRS="",e.PERSON_CHALKBOARD="",e.CIRCLE_ARROW_DOWN_SLASH="",e.BOOK_OPEN_COVER="",e.LIGHTBULB="",e.MESSAGE_BOT_AGENTIC_SOLID="",e.CHART_LINE_USER="",e.SERVER_CIRCLE_ARROW_DOWN="",e.EYE="",e.SHARE="󨃱"})(F||(F={}));var l;(function(e){e.UNKNOWN="",e.ABW="",e.AUDIO="",e.AVI="",e.CHM="",e.CODE="",e.CSV="",e.DITA="",e.EPUB="",e.EXCEL="",e.FLAC="",e.GIF="",e.GZIP="",e.HTML="",e.IMAGE="",e.JPEG="",e.JSON="",e.M4A="",e.MOV="",e.MP3="",e.MP4="",e.OGG="",e.PDF="",e.PNG="",e.POWERPOINT="",e.RAR="",e.STP="",e.TEXT="",e.VIDEO="",e.WAV="",e.WMA="",e.WORD="",e.XML="",e.YAML="",e.ZIP=""})(l||(l={}));var Wo=new Map([...["abw"].map(e=>[e,l.ABW]),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map(e=>[e,l.AUDIO]),...["avi"].map(e=>[e,l.AVI]),...["chm","xhs"].map(e=>[e,l.CHM]),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map(e=>[e,l.CODE]),...["csv"].map(e=>[e,l.CSV]),...["dita","ditamap","ditaval"].map(e=>[e,l.DITA]),...["epub"].map(e=>[e,l.EPUB]),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map(e=>[e,l.EXCEL]),...["flac"].map(e=>[e,l.FLAC]),...["gif"].map(e=>[e,l.GIF]),...["gzip","x-gzip","giz","gz","tgz"].map(e=>[e,l.GZIP]),...["html","htm","xhtml"].map(e=>[e,l.HTML]),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf","ico"].map(e=>[e,l.IMAGE]),...["jpeg","jpg","jpe"].map(e=>[e,l.JPEG]),...["json"].map(e=>[e,l.JSON]),...["m4a","m4p"].map(e=>[e,l.M4A]),...["mov","qt"].map(e=>[e,l.MOV]),...["mp3"].map(e=>[e,l.MP3]),...["mp4","m4v"].map(e=>[e,l.MP4]),...["ogg","oga"].map(e=>[e,l.OGG]),...["pdf","ps"].map(e=>[e,l.PDF]),...["png"].map(e=>[e,l.PNG]),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map(e=>[e,l.POWERPOINT]),...["rar"].map(e=>[e,l.RAR]),...["stp"].map(e=>[e,l.STP]),...["txt","rtf","md","mdown"].map(e=>[e,l.TEXT]),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map(e=>[e,l.VIDEO]),...["wav"].map(e=>[e,l.WAV]),...["wma"].map(e=>[e,l.WMA]),...["doc","dot","docx","docm","dotx","dotm","docb"].map(e=>[e,l.WORD]),...["xml","xsl","rdf"].map(e=>[e,l.XML]),...["yaml","yml","x-yaml"].map(e=>[e,l.YAML]),...["zip"].map(e=>[e,l.ZIP])]);var Uo={[l.ABW]:"#91ABC6",[l.AUDIO]:"#1795E3",[l.AVI]:"#E63324",[l.CHM]:"#71C3EB",[l.CODE]:"#71C3EB",[l.CSV]:"#1F7345",[l.DITA]:"#71C3EB",[l.EPUB]:"#85B926",[l.EXCEL]:"#1F7345",[l.FLAC]:"#1795E3",[l.GIF]:"#59B031",[l.GZIP]:"#F8AB36",[l.HTML]:"#71C3EB",[l.IMAGE]:"#59B031",[l.JPEG]:"#59B031",[l.JSON]:"#71C3EB",[l.M4A]:"#1795E3",[l.MOV]:"#E63324",[l.MP3]:"#1795E3",[l.MP4]:"#E63324",[l.OGG]:"#1795E3",[l.PDF]:"#E44948",[l.PNG]:"#59B031",[l.POWERPOINT]:"#B54A2B",[l.RAR]:"#F8AB36",[l.STP]:"#3764B1",[l.TEXT]:"#3162AB",[l.UNKNOWN]:"#999999",[l.VIDEO]:"#E63324",[l.WAV]:"#1795E3",[l.WMA]:"#1795E3",[l.WORD]:"#3162AB",[l.XML]:"#71C3EB",[l.YAML]:"#71C3EB",[l.ZIP]:"#F8AB36"};var Se=function(e,t,i,o){var r=arguments.length,n=r<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,i):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,o);else for(var f=e.length-1;f>=0;f--)(s=e[f])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n},R=class extends oi.FtLitElement{constructor(){super(...arguments),this.ariaHidden="true",this.resolvedIcon=ve.nothing}render(){let t=this.variant&&Object.values(Z).includes(this.variant)?this.variant:Z.fluid_topics,i=t!==Z.material||!!this.value;return ve.html`
|
|
409
409
|
<i class="ft-icon ft-icon--${t} ft-no-text-select" part="icon icon-${t}">
|
|
410
|
-
${(0,
|
|
410
|
+
${(0,ri.unsafeHTML)(this.resolvedIcon)}
|
|
411
411
|
<slot ?hidden=${i}></slot>
|
|
412
412
|
</i>
|
|
413
|
-
`}getTextContent(){var t,i;return(i=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(o=>o.textContent).join("").trim())!==null&&i!==void 0?i:""}update(t){super.update(t),["value","variant"].some(i=>t.has(i))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.getTextContent();switch(this.variant){case
|
|
413
|
+
`}getTextContent(){var t,i;return(i=(t=this.slottedContent)===null||t===void 0?void 0:t.assignedNodes().map(o=>o.textContent).join("").trim())!==null&&i!==void 0?i:""}update(t){super.update(t),["value","variant"].some(i=>t.has(i))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.getTextContent();switch(this.variant){case Z.file_format:this.resolvedIcon=(t=l[o.replace("-","_").toUpperCase()])!==null&&t!==void 0?t:o;break;case Z.material:this.resolvedIcon=this.value||ve.nothing;break;default:this.resolvedIcon=(i=F[o.replace("-","_").toUpperCase()])!==null&&i!==void 0?i:o;break}}firstUpdated(t){super.firstUpdated(t),setTimeout(()=>this.resolveIcon())}};R.elementDefinitions={};R.styles=ei;Se([(0,X.property)()],R.prototype,"variant",void 0);Se([(0,X.property)()],R.prototype,"value",void 0);Se([(0,X.property)({reflect:!0,attribute:"aria-hidden"})],R.prototype,"ariaHidden",void 0);Se([(0,X.state)()],R.prototype,"resolvedIcon",void 0);Se([(0,X.query)("slot")],R.prototype,"slottedContent",void 0);var si=c(T());var ni={"ft-icon":R};(0,si.customElements)(ni);var li=c(P()),d=c(T());var x={fontSize:d.FtCssVariableFactory.create("--ft-text-field-font-size","","SIZE","14px"),labelSize:d.FtCssVariableFactory.create("--ft-text-field-label-size","","SIZE","11px"),verticalSpacing:d.FtCssVariableFactory.create("--ft-text-field-vertical-spacing","","SIZE","4px"),horizontalSpacing:d.FtCssVariableFactory.create("--ft-text-field-horizontal-spacing","","SIZE","16px"),helperColor:d.FtCssVariableFactory.extend("--ft-text-field-helper-color","",d.designSystemVariables.colorOnSurfaceMedium),colorPrimary:d.FtCssVariableFactory.external(d.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:d.FtCssVariableFactory.external(d.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:d.FtCssVariableFactory.external(d.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:d.FtCssVariableFactory.external(d.designSystemVariables.borderRadiusS,"Design system"),colorError:d.FtCssVariableFactory.external(d.designSystemVariables.colorError,"Design system"),prefixColor:d.FtCssVariableFactory.extend("--ft-text-field-prefix-color","",d.designSystemVariables.colorOnSurfaceMedium),iconColor:d.FtCssVariableFactory.extend("--ft-text-field-icon-color","",d.designSystemVariables.colorOnSurfaceMedium),floatingZIndex:d.FtCssVariableFactory.create("--ft-text-field-floating-components-z-index","","NUMBER","3"),backgroundColor:d.FtCssVariableFactory.extend("--ft-text-field-background-color","",d.designSystemVariables.colorSurface),colorOutline:d.FtCssVariableFactory.external(d.designSystemVariables.colorOutline,"Design system"),elevation02:d.FtCssVariableFactory.external(d.designSystemVariables.elevation02,"Design system"),suggestSize:d.FtCssVariableFactory.create("--ft-text-field-suggest-size","","SIZE","300px")},ai=li.css`
|
|
414
414
|
*:focus {
|
|
415
415
|
outline: none;
|
|
416
416
|
}
|
|
@@ -569,7 +569,7 @@
|
|
|
569
569
|
.ft-text-field--with-password ft-icon:hover {
|
|
570
570
|
cursor: pointer;
|
|
571
571
|
}
|
|
572
|
-
`;var
|
|
572
|
+
`;var di=c(T()),_e=c(P()),ee=c(j());var pi=c(P());var fi=pi.css`
|
|
573
573
|
.ft-text-field-suggestion {
|
|
574
574
|
position: relative;
|
|
575
575
|
padding: 8px 16px;
|
|
@@ -605,8 +605,8 @@
|
|
|
605
605
|
slot {
|
|
606
606
|
pointer-events: none;
|
|
607
607
|
}
|
|
608
|
-
`;var
|
|
609
|
-
<div class="${(0,
|
|
608
|
+
`;var hi=c(ue()),Le=function(e,t,i,o){var r=arguments.length,n=r<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,i):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,o);else for(var f=e.length-1;f>=0;f--)(s=e[f])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n},qe=class extends CustomEvent{constructor(t){super("suggestion-selected",{detail:t,bubbles:!0,composed:!0})}},H=class extends di.FtLitElement{render(){let t={"ft-text-field-suggestion":!0,"ft-text-field-suggestion--with-helper":!!this.helper};return _e.html`
|
|
609
|
+
<div class="${(0,hi.classMap)(t)}"
|
|
610
610
|
tabindex="-1"
|
|
611
611
|
@keydown=${this.onKeyDown}
|
|
612
612
|
@click=${this.confirmSuggestion}>
|
|
@@ -621,8 +621,8 @@
|
|
|
621
621
|
<slot></slot>
|
|
622
622
|
</ft-typography>
|
|
623
623
|
</div>
|
|
624
|
-
`}focus(t){var i;(i=this.container)===null||i===void 0||i.focus(t)}click(){var t;(t=this.container)===null||t===void 0||t.click()}confirmSuggestion(){this.dispatchEvent(new qe(this.getValue()))}getValue(){return this.value||this.getTextContent()}getTextContent(){return this.assignedNodes.map(t=>t.textContent).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}};
|
|
625
|
-
<div class="${(0,
|
|
624
|
+
`}focus(t){var i;(i=this.container)===null||i===void 0||i.focus(t)}click(){var t;(t=this.container)===null||t===void 0||t.click()}confirmSuggestion(){this.dispatchEvent(new qe(this.getValue()))}getValue(){return this.value||this.getTextContent()}getTextContent(){return this.assignedNodes.map(t=>t.textContent).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}};H.elementDefinitions={"ft-ripple":_,"ft-typography":M,"ft-icon":R};H.styles=fi;Le([(0,ee.property)()],H.prototype,"value",void 0);Le([(0,ee.property)()],H.prototype,"helper",void 0);Le([(0,ee.query)(".ft-text-field-suggestion")],H.prototype,"container",void 0);Le([(0,ee.queryAssignedNodes)()],H.prototype,"assignedNodes",void 0);var Ne=class extends CustomEvent{constructor(t){super("live-change",{detail:t})}},we=class extends CustomEvent{constructor(t){super("change",{detail:t})}},Pe=class extends CustomEvent{constructor(t){super("invalid",{detail:t})}};var y=function(e,t,i,o){var r=arguments.length,n=r<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,i):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(e,t,i,o);else for(var f=e.length-1;f>=0;f--)(s=e[f])&&(n=(r<3?s(n):r>3?s(t,i,n):s(t,i))||n);return r>3&&n&&Object.defineProperty(t,i,n),n},h=class extends(0,w.toFtFormComponent)(w.FtLitElement){constructor(){super(...arguments),this._value="",this.dispatchedValue="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.prefix=null,this.passwordHiddenIcon=F.EYE_SLASH,this.passwordRevealedIcon=F.EYE,this.filterSuggestions=!1,this.password=!1,this.focused=!1,this.inputValid=!0,this.hidePassword=!0,this.hideSuggestions=!1,this.visibleSuggestions=[],this.providedSuggestions=[]}get value(){return this._value||""}set value(t){this.setInternalValue(t||""),this.dispatchedValue=t||""}setInternalValue(t){let i=this._value;this._value=t||"",this.setFormValue(this._value),this.requestUpdate("value",i)}focus(){var t;(t=this.input)===null||t===void 0||t.focus()}blur(){var t;(t=this.input)===null||t===void 0||t.blur()}render(){var t;let i={"ft-text-field":!0,"ft-text-field--filled":!this.outlined,"ft-text-field--outlined":this.outlined,"ft-text-field--disabled":this.disabled,"ft-text-field--has-value":!!this.value,"ft-text-field--with-label":!!this.label,"ft-text-field--in-error":!this.inputValid||this.error,"ft-text-field--fixed":this.fixedMenuPosition,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":!this.suggestionsShouldBeDisplayed(),"ft-text-field--raised-label":this.focused||this.value!="","ft-text-field--with-icon":!!this.icon,"ft-text-field--with-password":this.isPasswordField()},o=this.suggestionsProvider&&this.value&&this.value!=""&&!this.providedSuggestions.map(f=>f.label).includes(this.value),n=!this.suggestionsProvider&&this.filterSuggestions&&this.value&&this.value!=""||o,s=this.inputValid?this.helper:(t=this.input)===null||t===void 0?void 0:t.validationMessage;return C.html`
|
|
625
|
+
<div class="${(0,ci.classMap)(i)}">
|
|
626
626
|
<div class="ft-text-field--main-panel"
|
|
627
627
|
@keydown=${this.handleKeyboardNavigation}
|
|
628
628
|
@focusout=${this.onMainPanelBlur}>
|
|
@@ -675,7 +675,7 @@
|
|
|
675
675
|
`:C.nothing}
|
|
676
676
|
</div>
|
|
677
677
|
`}resolveInputType(){var t;return this.isPasswordField()?this.hidePassword?"password":"text":(t=this.type)!==null&&t!==void 0?t:"text"}renderSuggestions(){return this.suggestionsProvider?C.html`
|
|
678
|
-
${(0,
|
|
678
|
+
${(0,ui.repeat)(this.providedSuggestions,t=>C.html`
|
|
679
679
|
<ft-text-field-suggestion value="${t.value}" @click=${i=>this.onSuggestionClick(i,t.clickHandler)}>
|
|
680
680
|
${t.icon?C.html`
|
|
681
681
|
<ft-icon .value=${t.icon}></ft-icon>
|
|
@@ -695,7 +695,7 @@
|
|
|
695
695
|
.variant=${this.iconVariant}
|
|
696
696
|
.value=${this.icon}
|
|
697
697
|
@click=${()=>{var t;return(t=this.input)===null||t===void 0?void 0:t.focus()}}></ft-icon>
|
|
698
|
-
`:C.nothing}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions")||t.has("suggestionsProvider"))&&this.updateSuggestions(),t.has("value")&&t.get("value")!=null&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&t.get("dispatchedValue")!=null&&(this.hideSuggestions=!0)}async updateSuggestions(){this.suggestionsProvider?this.providedSuggestions=await this.suggestionsProvider(this.value):this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.slottedSuggestions.forEach(t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase())),this.visibleSuggestions=this.slottedSuggestions.filter(t=>!t.hidden)):this.visibleSuggestions=this.slottedSuggestions,this.newValueSuggestion&&(this.visibleSuggestions=[...this.visibleSuggestions,this.newValueSuggestion]),this.hideSuggestions=this.visibleSuggestions.length<=0}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0&&this.setSuggestionPosition(),t.has("value")&&this.suggestionsProvider&&(this.visibleSuggestions=[...this.providedSuggestionsInDom]),t.has("autocomplete")&&this.setupWatchAutofill(),this.suggestionsShouldBeDisplayed()&&this.setSuggestionPosition()}setupWatchAutofill(){var t;this.clearWatchAutofill(),((t=this.autocomplete)!==null&&t!==void 0?t:"off")!=="off"&&(this.watchAutofillInterval=setInterval(()=>{var i,o,r;!((i=this.input)===null||i===void 0)&&i.matches(":autofill")&&this.dispatchedValue!==((o=this.input)===null||o===void 0?void 0:o.value)&&this.setValue((r=this.input)===null||r===void 0?void 0:r.value,!0)},200))}clearWatchAutofill(){this.watchAutofillInterval&&clearInterval(this.watchAutofillInterval)}connectedCallback(){super.connectedCallback(),this.setupWatchAutofill()}disconnectedCallback(){super.disconnectedCallback(),this.clearWatchAutofill()}setValue(t,i=!1){var o,r;this.value!==t&&(this.inputValid=!0,this.setInternalValue(t),this.dispatchEvent(new Ne(t))),i&&this.dispatchedValue!==t&&(this.inputValid=(r=(o=this.input)===null||o===void 0?void 0:o.checkValidity())!==null&&r!==void 0?r:!0,this.inputValid?(this.dispatchedValue=t,this.dispatchEvent(new we(t))):this.dispatchEvent(new Pe(this.input.validationMessage)))}handleInput(t){var i;let o=((i=this.input)===null||i===void 0?void 0:i.value)||"";this.setValue(o,t.key=="Escape"||t.key=="Enter")}catchComposingEvents(t){}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var i;if(t.key==="ArrowDown"||t.key==="ArrowUp"){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;let o=this.visibleSuggestions.findIndex(n=>n.matches(":focus-within")),r;t.key==="ArrowDown"?r=o<this.visibleSuggestions.length-1?o+1:0:r=o>0?o-1:this.visibleSuggestions.length-1,(i=this.visibleSuggestions[r])===null||i===void 0||i.focus()}(t.key=="Escape"||t.key=="Enter")&&(this.hideSuggestions=!0)}onSuggestionSelected(t){var i;this.setValue(t.detail,!0),(i=this.input)===null||i===void 0||i.focus(),setTimeout(()=>this.hideSuggestions=!0,0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,i;!((t=this.mainPanel)===null||t===void 0)&&t.matches(":focus-within")||(this.focused=!1,this.setValue(((i=this.input)===null||i===void 0?void 0:i.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}isPasswordField(){return this.password||this.type==="password"}setSuggestionPosition(){this.suggestionsContainer.style.width=this.mainPanel.getBoundingClientRect().width+"px";let t=["bottom","top"];(0,w.computeOffsetAutoPosition)(this.mainPanel,this.suggestionsContainer,"bottom",t,"fixed","--text-field-internal-suggest-size",0).then(({x:i,y:o})=>{this.suggestionsContainer.style.left=`${i}px`,this.suggestionsContainer.style.top=`${o}px`})}suggestionsShouldBeDisplayed(){return!this.hideSuggestions&&(this.visibleSuggestions.length||this.providedSuggestions.length)}};h.elementDefinitions={"ft-input-label":B,"ft-ripple":_,"ft-typography":M,"ft-icon":R,"ft-text-field-suggestion":
|
|
698
|
+
`:C.nothing}update(t){super.update(t),(t.has("value")||t.has("filterSuggestions")||t.has("suggestionsProvider"))&&this.updateSuggestions(),t.has("value")&&t.get("value")!=null&&(this.hideSuggestions=!1),t.has("dispatchedValue")&&t.get("dispatchedValue")!=null&&(this.hideSuggestions=!0)}async updateSuggestions(){this.suggestionsProvider?this.providedSuggestions=await this.suggestionsProvider(this.value):this.filterSuggestionsIfNeeded()}filterSuggestionsIfNeeded(){this.filterSuggestions?(this.slottedSuggestions.forEach(t=>t.hidden=!t.getValue().toLowerCase().includes(this.value.toLowerCase())),this.visibleSuggestions=this.slottedSuggestions.filter(t=>!t.hidden)):this.visibleSuggestions=this.slottedSuggestions,this.newValueSuggestion&&(this.visibleSuggestions=[...this.visibleSuggestions,this.newValueSuggestion]),this.hideSuggestions=this.visibleSuggestions.length<=0}contentAvailableCallback(t){super.contentAvailableCallback(t),t.has("focused")&&!this.hideSuggestions&&this.visibleSuggestions.length>0&&this.setSuggestionPosition(),t.has("value")&&this.suggestionsProvider&&(this.visibleSuggestions=[...this.providedSuggestionsInDom]),t.has("autocomplete")&&this.setupWatchAutofill(),this.suggestionsShouldBeDisplayed()&&this.setSuggestionPosition()}setupWatchAutofill(){var t;this.clearWatchAutofill(),((t=this.autocomplete)!==null&&t!==void 0?t:"off")!=="off"&&(this.watchAutofillInterval=setInterval(()=>{var i,o,r;!((i=this.input)===null||i===void 0)&&i.matches(":autofill")&&this.dispatchedValue!==((o=this.input)===null||o===void 0?void 0:o.value)&&this.setValue((r=this.input)===null||r===void 0?void 0:r.value,!0)},200))}clearWatchAutofill(){this.watchAutofillInterval&&clearInterval(this.watchAutofillInterval)}connectedCallback(){super.connectedCallback(),this.setupWatchAutofill()}disconnectedCallback(){super.disconnectedCallback(),this.clearWatchAutofill()}setValue(t,i=!1){var o,r;this.value!==t&&(this.inputValid=!0,this.setInternalValue(t),this.dispatchEvent(new Ne(t))),i&&this.dispatchedValue!==t&&(this.inputValid=(r=(o=this.input)===null||o===void 0?void 0:o.checkValidity())!==null&&r!==void 0?r:!0,this.inputValid?(this.dispatchedValue=t,this.dispatchEvent(new we(t))):this.dispatchEvent(new Pe(this.input.validationMessage)))}handleInput(t){var i;let o=((i=this.input)===null||i===void 0?void 0:i.value)||"";this.setValue(o,t.key=="Escape"||t.key=="Enter")}catchComposingEvents(t){}handleClick(){this.hideSuggestions=!1}handleKeyboardNavigation(t){var i;if(t.key==="ArrowDown"||t.key==="ArrowUp"){t.preventDefault(),t.stopPropagation(),this.hideSuggestions=!1;let o=this.visibleSuggestions.findIndex(n=>n.matches(":focus-within")),r;t.key==="ArrowDown"?r=o<this.visibleSuggestions.length-1?o+1:0:r=o>0?o-1:this.visibleSuggestions.length-1,(i=this.visibleSuggestions[r])===null||i===void 0||i.focus()}(t.key=="Escape"||t.key=="Enter")&&(this.hideSuggestions=!0)}onSuggestionSelected(t){var i;this.setValue(t.detail,!0),(i=this.input)===null||i===void 0||i.focus(),setTimeout(()=>this.hideSuggestions=!0,0)}onFocus(){this.focused=!0,this.hideSuggestions=!1}onMainPanelBlur(){var t,i;!((t=this.mainPanel)===null||t===void 0)&&t.matches(":focus-within")||(this.focused=!1,this.setValue(((i=this.input)===null||i===void 0?void 0:i.value)||"",!0))}togglePasswordVisibility(){this.hidePassword=!this.hidePassword}isPasswordField(){return this.password||this.type==="password"}setSuggestionPosition(){this.suggestionsContainer.style.width=this.mainPanel.getBoundingClientRect().width+"px";let t=["bottom","top"];(0,w.computeOffsetAutoPosition)(this.mainPanel,this.suggestionsContainer,"bottom",t,"fixed","--text-field-internal-suggest-size",0).then(({x:i,y:o})=>{this.suggestionsContainer.style.left=`${i}px`,this.suggestionsContainer.style.top=`${o}px`})}suggestionsShouldBeDisplayed(){return!this.hideSuggestions&&(this.visibleSuggestions.length||this.providedSuggestions.length)}};h.elementDefinitions={"ft-input-label":B,"ft-ripple":_,"ft-typography":M,"ft-icon":R,"ft-text-field-suggestion":H};h.styles=[Te,w.noTextInputDefaultClearButton,ai];y([(0,g.property)()],h.prototype,"label",void 0);y([(0,g.property)({noAccessor:!0})],h.prototype,"value",null);y([(0,g.state)()],h.prototype,"dispatchedValue",void 0);y([(0,g.property)()],h.prototype,"helper",void 0);y([(0,g.property)()],h.prototype,"suggestionsHelper",void 0);y([(0,g.property)({type:Boolean})],h.prototype,"outlined",void 0);y([(0,g.property)({type:Boolean})],h.prototype,"disabled",void 0);y([(0,g.property)({type:Boolean})],h.prototype,"error",void 0);y([(0,g.property)({type:Boolean})],h.prototype,"fixedMenuPosition",void 0);y([(0,g.property)()],h.prototype,"prefix",void 0);y([(0,g.property)()],h.prototype,"icon",void 0);y([(0,g.property)()],h.prototype,"name",void 0);y([(0,g.property)()],h.prototype,"type",void 0);y([(0,g.property)()],h.prototype,"passwordHiddenIcon",void 0);y([(0,g.property)()],h.prototype,"passwordRevealedIcon",void 0);y([(0,g.property)()],h.prototype,"iconVariant",void 0);y([(0,g.property)({type:Boolean})],h.prototype,"filterSuggestions",void 0);y([(0,w.numberProperty)()],h.prototype,"maxLength",void 0);y([(0,g.property)({type:Boolean})],h.prototype,"password",void 0);y([(0,g.property)({type:String})],h.prototype,"autocomplete",void 0);y([(0,g.property)({attribute:!1})],h.prototype,"suggestionsProvider",void 0);y([(0,g.state)()],h.prototype,"focused",void 0);y([(0,g.state)()],h.prototype,"inputValid",void 0);y([(0,g.state)()],h.prototype,"hidePassword",void 0);y([(0,g.state)()],h.prototype,"hideSuggestions",void 0);y([(0,g.state)()],h.prototype,"visibleSuggestions",void 0);y([(0,g.state)()],h.prototype,"providedSuggestions",void 0);y([(0,g.query)(".ft-text-field--main-panel")],h.prototype,"mainPanel",void 0);y([(0,g.query)(".ft-text-field--input")],h.prototype,"input",void 0);y([(0,g.query)(".ft-text-field-suggestion--new-value")],h.prototype,"newValueSuggestion",void 0);y([(0,g.query)(".ft-text-field--suggestions")],h.prototype,"suggestionsContainer",void 0);y([(0,g.queryAll)("ft-text-field-suggestion")],h.prototype,"providedSuggestionsInDom",void 0);y([(0,g.queryAssignedElements)({selector:"ft-text-field-suggestion"})],h.prototype,"slottedSuggestions",void 0);y([(0,w.ignoreComposingEvents)()],h.prototype,"handleInput",null);y([(0,w.ignoreComposingEvents)()],h.prototype,"catchComposingEvents",null);var xi={"ft-text-field":h,"ft-text-field-suggestion":H};(0,gi.customElements)(xi);})();
|
|
699
699
|
/*! Bundled license information:
|
|
700
700
|
|
|
701
701
|
lit-html/lit-html.js:
|