@fluid-topics/ft-filterable-table 0.3.48 → 0.3.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var r;const a=window,p=a.trustedTypes,f=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,d=`lit$${(Math.random()+"").slice(9)}$`,h="?"+d,c=`<${h}>`,u=document,x=(t="")=>u.createComment(t),g=t=>null===t||"object"!=typeof t&&"function"!=typeof t,b=Array.isArray,v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,m=/>/g,$=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),w=/'/g,k=/"/g,S=/^(?:script|style|textarea|title)$/i,z=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),O=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),E=new WeakMap,D=u.createTreeWalker(u,129,null,!1),
|
|
7
|
+
var r;const a=window,p=a.trustedTypes,f=p?p.createPolicy("lit-html",{createHTML:t=>t}):void 0,d=`lit$${(Math.random()+"").slice(9)}$`,h="?"+d,c=`<${h}>`,u=document,x=(t="")=>u.createComment(t),g=t=>null===t||"object"!=typeof t&&"function"!=typeof t,b=Array.isArray,v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,m=/>/g,$=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),w=/'/g,k=/"/g,S=/^(?:script|style|textarea|title)$/i,z=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),O=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),E=new WeakMap,D=u.createTreeWalker(u,129,null,!1),I=(t,e)=>{const i=t.length-1,o=[];let s,n=2===e?"<svg>":"",l=v;for(let e=0;e<i;e++){const i=t[e];let r,a,p=-1,f=0;for(;f<i.length&&(l.lastIndex=f,a=l.exec(i),null!==a);)f=l.lastIndex,l===v?"!--"===a[1]?l=y:void 0!==a[1]?l=m:void 0!==a[2]?(S.test(a[2])&&(s=RegExp("</"+a[2],"g")),l=$):void 0!==a[3]&&(l=$):l===$?">"===a[0]?(l=null!=s?s:v,p=-1):void 0===a[1]?p=-2:(p=l.lastIndex-a[2].length,r=a[1],l=void 0===a[3]?$:'"'===a[3]?k:w):l===k||l===w?l=$:l===y||l===m?l=v:(l=$,s=void 0);const h=l===$&&t[e+1].startsWith("/>")?" ":"";n+=l===v?i+c:p>=0?(o.push(r),i.slice(0,p)+"$lit$"+i.slice(p)+d+h):i+d+(-2===p?(o.push(void 0),e):h)}const r=n+(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 B{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,n=0;const l=t.length-1,r=this.parts,[a,f]=I(t,e);if(this.el=B.createElement(a,i),D.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=D.nextNode())&&r.length<l;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(d)){const i=f[n++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(d),e=/([.?@])?(.*)/.exec(i);r.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?Z:"?"===e[1]?M:"@"===e[1]?R:A})}else r.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(S.test(o.tagName)){const t=o.textContent.split(d),e=t.length-1;if(e>0){o.textContent=p?p.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],x()),D.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(d,t+1));)r.push({type:7,index:s}),t+=d.length-1}s++}}static createElement(t,e){const i=u.createElement("template");return i.innerHTML=t,i}}function j(t,e,i=t,o){var s,n,l,r;if(e===O)return e;let a=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const p=g(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,i,o)),void 0!==o?(null!==(l=(r=i)._$Co)&&void 0!==l?l:r._$Co=[])[o]=a:i._$Cl=a),void 0!==a&&(e=j(t,a._$AS(t,e.values),a,o)),e}class N{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:u).importNode(i,!0);D.currentNode=s;let n=D.nextNode(),l=0,r=0,a=o[0];for(;void 0!==a;){if(l===a.index){let e;2===a.type?e=new F(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new _(n,this,t)),this.u.push(e),a=o[++r]}l!==(null==a?void 0:a.index)&&(n=D.nextNode(),l++)}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 F{constructor(t,e,i,o){var s;this.type=2,this._$AH=C,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=j(this,t,e),g(t)?t===C||null==t||""===t?(this._$AH!==C&&this._$AR(),this._$AH=C):t!==this._$AH&&t!==O&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>b(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!==C&&g(this._$AH)?this._$AA.nextSibling.data=t:this.T(u.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=B.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 N(s,this),e=t.v(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=E.get(t.strings);return void 0===e&&E.set(t.strings,e=new B(t)),e}k(t){b(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 F(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 A{constructor(t,e,i,o,s){this.type=1,this._$AH=C,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=C}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let n=!1;if(void 0===s)t=j(this,t,e,0),n=!g(t)||t!==this._$AH&&t!==O,n&&(this._$AH=t);else{const o=t;let l,r;for(t=s[0],l=0;l<s.length-1;l++)r=j(this,o[i+l],e,l),r===O&&(r=this._$AH[l]),n||(n=!g(r)||r!==this._$AH[l]),r===C?t=C:t!==C&&(t+=(null!=r?r:"")+s[l+1]),this._$AH[l]=r}n&&!o&&this.j(t)}j(t){t===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Z extends A{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===C?void 0:t}}const T=p?p.emptyScript:"";class M extends A{constructor(){super(...arguments),this.type=4}j(t){t&&t!==C?this.element.setAttribute(this.name,T):this.element.removeAttribute(this.name)}}class R extends A{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=j(this,t,e,0))&&void 0!==i?i:C)===O)return;const o=this._$AH,s=t===C&&o!==C||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==C&&(o===C||s);s&&this.element.removeEventListener(this.name,this,o),n&&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 _{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){j(this,t)}}const U=a.litHtmlPolyfillSupport;null==U||U(B,F),(null!==(r=a.litHtmlVersions)&&void 0!==r?r:a.litHtmlVersions=[]).push("2.4.0");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t._$litStatic$},K=t=>({_$litStatic$:t,r:H}),L=new Map,P=(t=>(e,...i)=>{const o=i.length;let s,n;const l=[],r=[];let a,p=0,f=!1;for(;p<o;){for(a=e[p];p<o&&void 0!==(n=i[p],s=W(n));)a+=s+e[++p],f=!0;r.push(n),l.push(a),p++}if(p===o&&l.push(e[o]),f){const t=l.join("$$lit$$");void 0===(e=L.get(t))&&(l.raw=l,L.set(t,e=l)),i=r}return t(e,...i)})(z);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 G=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),X={fontFamily:q,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")},Y=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",G),J=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",X.fontSize,"20px"),Q=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",X.fontWeight,"normal"),tt=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",X.letterSpacing,"0.15px"),et=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",X.lineHeight,"1.2"),it=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",X.textTransform,"inherit"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",G),st=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",X.fontSize,"14px"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",X.fontWeight,"normal"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",X.letterSpacing,"0.105px"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",X.lineHeight,"1.7"),at=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",X.textTransform,"inherit"),pt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",q),ft=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",X.fontSize,"16px"),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",X.fontWeight,"600"),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",X.letterSpacing,"0.144px"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",X.lineHeight,"1.5"),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",X.textTransform,"inherit"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",q),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",X.fontSize,"14px"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",X.fontWeight,"normal"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",X.letterSpacing,"0.098px"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",X.lineHeight,"1.7"),mt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",X.textTransform,"inherit"),$t={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",X.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",X.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",X.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",X.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",X.textTransform,"inherit")},wt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",q),kt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",X.fontSize,"14px"),St=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",X.fontWeight,"normal"),zt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",X.letterSpacing,"0.252px"),Ot=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",X.lineHeight,"1.4"),Ct=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",X.textTransform,"inherit"),Et={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",X.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",X.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",X.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",X.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",X.textTransform,"inherit")},Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",q),
|
|
13
|
+
const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t._$litStatic$},K=t=>({_$litStatic$:t,r:H}),L=new Map,P=(t=>(e,...i)=>{const o=i.length;let s,n;const l=[],r=[];let a,p=0,f=!1;for(;p<o;){for(a=e[p];p<o&&void 0!==(n=i[p],s=W(n));)a+=s+e[++p],f=!0;r.push(n),l.push(a),p++}if(p===o&&l.push(e[o]),f){const t=l.join("$$lit$$");void 0===(e=L.get(t))&&(l.raw=l,L.set(t,e=l)),i=r}return t(e,...i)})(z);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 G=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),q=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),X={fontFamily:q,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")},Y=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",G),J=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",X.fontSize,"20px"),Q=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",X.fontWeight,"normal"),tt=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",X.letterSpacing,"0.15px"),et=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",X.lineHeight,"1.2"),it=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",X.textTransform,"inherit"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",G),st=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",X.fontSize,"14px"),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",X.fontWeight,"normal"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",X.letterSpacing,"0.105px"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",X.lineHeight,"1.7"),at=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",X.textTransform,"inherit"),pt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",q),ft=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",X.fontSize,"16px"),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",X.fontWeight,"600"),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",X.letterSpacing,"0.144px"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",X.lineHeight,"1.5"),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",X.textTransform,"inherit"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",q),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",X.fontSize,"14px"),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",X.fontWeight,"normal"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",X.letterSpacing,"0.098px"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",X.lineHeight,"1.7"),mt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",X.textTransform,"inherit"),$t={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",X.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",X.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",X.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",X.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",X.textTransform,"inherit")},wt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",q),kt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",X.fontSize,"14px"),St=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",X.fontWeight,"normal"),zt=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",X.letterSpacing,"0.252px"),Ot=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",X.lineHeight,"1.4"),Ct=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",X.textTransform,"inherit"),Et={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",X.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",X.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",X.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",X.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",X.textTransform,"inherit")},Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",q),It=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",X.fontSize,"10px"),Bt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",X.fontWeight,"normal"),jt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",X.letterSpacing,"0.33px"),Nt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",X.lineHeight,"1.6"),Ft=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",X.textTransform,"inherit"),At=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",q),Zt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",X.fontSize,"10px"),Tt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",X.fontWeight,"normal"),Mt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",X.letterSpacing,"1.5px"),Rt=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",X.lineHeight,"1.6"),_t=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",X.textTransform,"uppercase"),Ut={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-button-font-family",q),fontSize:e.FtCssVariableFactory.extend("--ft-typography-button-font-size",X.fontSize,"14px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",X.fontWeight,"600"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",X.letterSpacing,"1.246px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-button-line-height",X.lineHeight,"1.15"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",X.textTransform,"uppercase")},Ht=i.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
15
|
font-family: ${Y};
|
|
16
16
|
font-size: ${J};
|
|
@@ -77,8 +77,8 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
77
77
|
`,qt=i.css`
|
|
78
78
|
.ft-typography--breadcrumb {
|
|
79
79
|
font-family: ${Dt};
|
|
80
|
-
font-size: ${
|
|
81
|
-
font-weight: ${
|
|
80
|
+
font-size: ${It};
|
|
81
|
+
font-weight: ${Bt};
|
|
82
82
|
letter-spacing: ${jt};
|
|
83
83
|
line-height: ${Nt};
|
|
84
84
|
text-transform: ${Ft};
|
|
@@ -88,8 +88,8 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
88
88
|
font-family: ${At};
|
|
89
89
|
font-size: ${Zt};
|
|
90
90
|
font-weight: ${Tt};
|
|
91
|
-
letter-spacing: ${
|
|
92
|
-
line-height: ${
|
|
91
|
+
letter-spacing: ${Mt};
|
|
92
|
+
line-height: ${Rt};
|
|
93
93
|
text-transform: ${_t};
|
|
94
94
|
}
|
|
95
95
|
`,Yt=i.css`
|
|
@@ -112,7 +112,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
112
112
|
</${K(this.element)}>
|
|
113
113
|
`:P`
|
|
114
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
|
-
`}}te.styles=[Ht,Wt,Kt,Lt,Pt,Vt,Gt,qt,Xt,Yt,Jt],Qt([o.property()],te.prototype,"element",void 0),Qt([o.property()],te.prototype,"variant",void 0),e.customElement("ft-typography")(te);const ee={fontSize:e.FtCssVariableFactory.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:e.FtCssVariableFactory.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:e.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:e.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","SIZE","12px"),borderColor:e.FtCssVariableFactory.extend("--ft-input-label-border-color",e.designSystemVariables.colorOutline),textColor:e.FtCssVariableFactory.extend("--ft-input-label-text-color",e.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:e.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color",e.designSystemVariables.colorOnSurfaceDisabled),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},ie=i.css`
|
|
115
|
+
`}}te.styles=[Ht,Wt,Kt,Lt,Pt,Vt,Gt,qt,Xt,Yt,Jt],Qt([o.property()],te.prototype,"element",void 0),Qt([o.property()],te.prototype,"variant",void 0),e.customElement("ft-typography")(te);const ee={fontSize:e.FtCssVariableFactory.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:e.FtCssVariableFactory.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:e.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:e.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","SIZE","12px"),labelMaxWidth:e.FtCssVariableFactory.create("--ft-input-label-max-width","SIZE","100%"),borderColor:e.FtCssVariableFactory.extend("--ft-input-label-border-color",e.designSystemVariables.colorOutline),textColor:e.FtCssVariableFactory.extend("--ft-input-label-text-color",e.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:e.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color",e.designSystemVariables.colorOnSurfaceDisabled),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},ie=i.css`
|
|
116
116
|
.ft-input-label {
|
|
117
117
|
position: absolute;
|
|
118
118
|
inset: 0;
|
|
@@ -143,7 +143,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
.ft-input-label:before {
|
|
146
|
-
width: ${ee.horizontalSpacing};
|
|
146
|
+
width: calc(${ee.horizontalSpacing} - 4px);
|
|
147
147
|
flex-shrink: 0;
|
|
148
148
|
}
|
|
149
149
|
|
|
@@ -161,6 +161,8 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
161
161
|
border-color: inherit;
|
|
162
162
|
color: ${ee.textColor};
|
|
163
163
|
transition: font-size 250ms, line-height 250ms, color 250ms;
|
|
164
|
+
max-width: calc(${ee.labelMaxWidth} - 2 * (${ee.horizontalSpacing} - 4px)); /* -2px on spacing for label padding */
|
|
165
|
+
text-overflow: ellipsis;
|
|
164
166
|
${e.setVariable(Et.fontSize,ee.fontSize)};
|
|
165
167
|
${e.setVariable(Et.lineHeight,ee.fontSize)};
|
|
166
168
|
}
|
|
@@ -176,6 +178,8 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
176
178
|
.ft-input-label--hidden-text {
|
|
177
179
|
padding: 0 4px;
|
|
178
180
|
opacity: 0;
|
|
181
|
+
max-width: 100%;
|
|
182
|
+
box-sizing: border-box;
|
|
179
183
|
}
|
|
180
184
|
|
|
181
185
|
.ft-input-label--floating-text {
|
|
@@ -187,6 +191,8 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
187
191
|
text-overflow: ellipsis;
|
|
188
192
|
padding: ${ee.verticalSpacing} 4px;
|
|
189
193
|
margin: calc(${ee.verticalSpacing} * -1) 0;
|
|
194
|
+
max-width: 100%;
|
|
195
|
+
box-sizing: border-box;
|
|
190
196
|
}
|
|
191
197
|
|
|
192
198
|
.ft-input-label--raised .ft-input-label--text {
|
|
@@ -343,18 +349,21 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
343
349
|
<div class="ft-ripple--background"></div>
|
|
344
350
|
<div class="ft-ripple--effect"></div>
|
|
345
351
|
</div>
|
|
346
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}be.elementDefinitions={},be.styles=ce,ge([o.property({type:Boolean})],be.prototype,"primary",void 0),ge([o.property({type:Boolean})],be.prototype,"secondary",void 0),ge([o.property({type:Boolean})],be.prototype,"unbounded",void 0),ge([o.property({type:Boolean})],be.prototype,"activated",void 0),ge([o.property({type:Boolean})],be.prototype,"selected",void 0),ge([o.property({type:Boolean})],be.prototype,"disabled",void 0),ge([o.state()],be.prototype,"hovered",void 0),ge([o.state()],be.prototype,"focused",void 0),ge([o.state()],be.prototype,"pressed",void 0),ge([o.state()],be.prototype,"rippling",void 0),ge([o.state()],be.prototype,"rippleSize",void 0),ge([o.state()],be.prototype,"originX",void 0),ge([o.state()],be.prototype,"originY",void 0),ge([o.query(".ft-ripple")],be.prototype,"ripple",void 0),ge([o.query(".ft-ripple--effect")],be.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(be),function(t){t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(ue||(ue={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(xe||(xe={})),new Map([...["abw"].map((t=>[t,xe.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((t=>[t,xe.AUDIO])),...["avi"].map((t=>[t,xe.AVI])),...["chm","xhs"].map((t=>[t,xe.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((t=>[t,xe.CODE])),...["csv"].map((t=>[t,xe.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,xe.DITA])),...["epub"].map((t=>[t,xe.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,xe.EXCEL])),...["flac"].map((t=>[t,xe.FLAC])),...["gif"].map((t=>[t,xe.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,xe.GZIP])),...["html","htm","xhtml"].map((t=>[t,xe.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,xe.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,xe.JPEG])),...["json"].map((t=>[t,xe.JSON])),...["m4a","m4p"].map((t=>[t,xe.M4A])),...["mov","qt"].map((t=>[t,xe.MOV])),...["mp3"].map((t=>[t,xe.MP3])),...["mp4","m4v"].map((t=>[t,xe.MP4])),...["ogg","oga"].map((t=>[t,xe.OGG])),...["pdf","ps"].map((t=>[t,xe.PDF])),...["png"].map((t=>[t,xe.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,xe.POWERPOINT])),...["rar"].map((t=>[t,xe.RAR])),...["stp"].map((t=>[t,xe.STP])),...["txt","rtf","md","mdown"].map((t=>[t,xe.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((t=>[t,xe.VIDEO])),...["wav"].map((t=>[t,xe.WAV])),...["wma"].map((t=>[t,xe.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,xe.WORD])),...["xml","xsl","rdf"].map((t=>[t,xe.XML])),...["yaml","yml","x-yaml"].map((t=>[t,xe.YAML])),...["zip"].map((t=>[t,xe.ZIP]))]);const ve={size:e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},ye=i.css`
|
|
347
|
-
:host {
|
|
348
|
-
display: inline-
|
|
352
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",s),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",i),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}be.elementDefinitions={},be.styles=ce,ge([o.property({type:Boolean})],be.prototype,"primary",void 0),ge([o.property({type:Boolean})],be.prototype,"secondary",void 0),ge([o.property({type:Boolean})],be.prototype,"unbounded",void 0),ge([o.property({type:Boolean})],be.prototype,"activated",void 0),ge([o.property({type:Boolean})],be.prototype,"selected",void 0),ge([o.property({type:Boolean})],be.prototype,"disabled",void 0),ge([o.state()],be.prototype,"hovered",void 0),ge([o.state()],be.prototype,"focused",void 0),ge([o.state()],be.prototype,"pressed",void 0),ge([o.state()],be.prototype,"rippling",void 0),ge([o.state()],be.prototype,"rippleSize",void 0),ge([o.state()],be.prototype,"originX",void 0),ge([o.state()],be.prototype,"originY",void 0),ge([o.query(".ft-ripple")],be.prototype,"ripple",void 0),ge([o.query(".ft-ripple--effect")],be.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(be),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(ue||(ue={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(xe||(xe={})),new Map([...["abw"].map((t=>[t,xe.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((t=>[t,xe.AUDIO])),...["avi"].map((t=>[t,xe.AVI])),...["chm","xhs"].map((t=>[t,xe.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((t=>[t,xe.CODE])),...["csv"].map((t=>[t,xe.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,xe.DITA])),...["epub"].map((t=>[t,xe.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,xe.EXCEL])),...["flac"].map((t=>[t,xe.FLAC])),...["gif"].map((t=>[t,xe.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,xe.GZIP])),...["html","htm","xhtml"].map((t=>[t,xe.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,xe.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,xe.JPEG])),...["json"].map((t=>[t,xe.JSON])),...["m4a","m4p"].map((t=>[t,xe.M4A])),...["mov","qt"].map((t=>[t,xe.MOV])),...["mp3"].map((t=>[t,xe.MP3])),...["mp4","m4v"].map((t=>[t,xe.MP4])),...["ogg","oga"].map((t=>[t,xe.OGG])),...["pdf","ps"].map((t=>[t,xe.PDF])),...["png"].map((t=>[t,xe.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,xe.POWERPOINT])),...["rar"].map((t=>[t,xe.RAR])),...["stp"].map((t=>[t,xe.STP])),...["txt","rtf","md","mdown"].map((t=>[t,xe.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((t=>[t,xe.VIDEO])),...["wav"].map((t=>[t,xe.WAV])),...["wma"].map((t=>[t,xe.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,xe.WORD])),...["xml","xsl","rdf"].map((t=>[t,xe.XML])),...["yaml","yml","x-yaml"].map((t=>[t,xe.YAML])),...["zip"].map((t=>[t,xe.ZIP]))]);const ve={size:e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},ye=i.css`
|
|
353
|
+
:host, i.ft-icon {
|
|
354
|
+
display: inline-flex;
|
|
355
|
+
align-items: center;
|
|
356
|
+
justify-content: center;
|
|
349
357
|
}
|
|
350
358
|
|
|
351
|
-
:host
|
|
359
|
+
:host {
|
|
352
360
|
width: ${ve.size};
|
|
353
361
|
height: ${ve.size};
|
|
354
|
-
text-align: center;
|
|
355
362
|
}
|
|
356
363
|
|
|
357
364
|
i.ft-icon {
|
|
365
|
+
width: 100%;
|
|
366
|
+
height: 100%;
|
|
358
367
|
font-size: ${ve.size};
|
|
359
368
|
line-height: 1;
|
|
360
369
|
font-weight: normal;
|
|
@@ -369,8 +378,13 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
369
378
|
vertical-align: ${ve.verticalAlign};
|
|
370
379
|
}
|
|
371
380
|
|
|
372
|
-
.ft-icon--fluid-topics {
|
|
381
|
+
i.ft-icon.ft-icon--fluid-topics {
|
|
373
382
|
font-family: ${ve.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
383
|
+
|
|
384
|
+
/* Ugly fix because font is broken */
|
|
385
|
+
font-size: calc(0.9 * ${ve.size});
|
|
386
|
+
position: relative;
|
|
387
|
+
top: -5%;
|
|
374
388
|
}
|
|
375
389
|
|
|
376
390
|
.ft-icon--file-format {
|
|
@@ -385,7 +399,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
385
399
|
${n.unsafeHTML(this.resolvedIcon)}
|
|
386
400
|
<slot ?hidden=${t}></slot>
|
|
387
401
|
</i>
|
|
388
|
-
`}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 me.file_format:this.resolvedIcon=null!==(t=xe[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case me.fluid_topics:this.resolvedIcon=null!==(e=ue[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o;break;default:this.resolvedIcon=this.value||i.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}we.elementDefinitions={},we.styles=ye,$e([o.property()],we.prototype,"variant",void 0),$e([o.property()],we.prototype,"value",void 0),$e([o.state()],we.prototype,"resolvedIcon",void 0),$e([o.query("slot")],we.prototype,"slottedContent",void 0),e.customElement("ft-icon")(we);const ke={labelSize:e.FtCssVariableFactory.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:e.FtCssVariableFactory.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-select-vertical-spacing","SIZE","4px"),optionsHeight:e.FtCssVariableFactory.create("--ft-select-options-height","SIZE","unset"),selectedOptionColor:e.FtCssVariableFactory.extend("--ft-select-selected-option-color",e.designSystemVariables.colorOnSurface),helperColor:e.FtCssVariableFactory.extend("--ft-select-helper-color",e.designSystemVariables.colorOnSurfaceMedium),optionsColor:e.FtCssVariableFactory.extend("--ft-select-options-color",e.designSystemVariables.colorOnSurface),optionsZIndex:e.FtCssVariableFactory.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),elevation02:e.FtCssVariableFactory.external(e.designSystemVariables.elevation02,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},Se=i.css`
|
|
402
|
+
`}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 me.file_format:this.resolvedIcon=null!==(t=xe[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case me.fluid_topics:this.resolvedIcon=null!==(e=ue[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o;break;default:this.resolvedIcon=this.value||i.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}we.elementDefinitions={},we.styles=ye,$e([o.property()],we.prototype,"variant",void 0),$e([o.property()],we.prototype,"value",void 0),$e([o.state()],we.prototype,"resolvedIcon",void 0),$e([o.query("slot")],we.prototype,"slottedContent",void 0),e.customElement("ft-icon")(we);const ke={labelSize:e.FtCssVariableFactory.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:e.FtCssVariableFactory.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-select-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-select-horizontal-spacing","SIZE","16px"),optionsHeight:e.FtCssVariableFactory.create("--ft-select-options-height","SIZE","unset"),selectedOptionColor:e.FtCssVariableFactory.extend("--ft-select-selected-option-color",e.designSystemVariables.colorOnSurface),helperColor:e.FtCssVariableFactory.extend("--ft-select-helper-color",e.designSystemVariables.colorOnSurfaceMedium),optionsColor:e.FtCssVariableFactory.extend("--ft-select-options-color",e.designSystemVariables.colorOnSurface),optionsZIndex:e.FtCssVariableFactory.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),elevation02:e.FtCssVariableFactory.external(e.designSystemVariables.elevation02,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},Se=i.css`
|
|
389
403
|
*:focus {
|
|
390
404
|
outline: none;
|
|
391
405
|
}
|
|
@@ -408,8 +422,8 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
408
422
|
display: flex;
|
|
409
423
|
align-items: center;
|
|
410
424
|
overflow: hidden;
|
|
411
|
-
padding-left:
|
|
412
|
-
padding-right:
|
|
425
|
+
padding-left: ${ke.horizontalSpacing};
|
|
426
|
+
padding-right: ${ke.horizontalSpacing};
|
|
413
427
|
gap: 8px;
|
|
414
428
|
color: ${ke.selectedOptionColor};
|
|
415
429
|
${e.setVariable(le.color,ke.selectedOptionColor)};
|
|
@@ -440,6 +454,8 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
440
454
|
${e.setVariable(ee.fontSize,ke.selectedOptionSize)};
|
|
441
455
|
${e.setVariable(ee.raisedFontSize,ke.labelSize)};
|
|
442
456
|
${e.setVariable(ee.verticalSpacing,ke.verticalSpacing)};
|
|
457
|
+
${e.setVariable(ee.horizontalSpacing,ke.horizontalSpacing)};
|
|
458
|
+
${e.setVariable(ee.labelMaxWidth,`calc(100% - ${ve.size} - 8px)`)};
|
|
443
459
|
}
|
|
444
460
|
|
|
445
461
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
@@ -513,7 +529,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
513
529
|
|
|
514
530
|
.ft-select--option {
|
|
515
531
|
position: relative;
|
|
516
|
-
padding: 4px
|
|
532
|
+
padding: 4px ${ke.horizontalSpacing};
|
|
517
533
|
min-height: 32px;
|
|
518
534
|
display: flex;
|
|
519
535
|
align-items: center;
|
|
@@ -525,7 +541,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
525
541
|
}
|
|
526
542
|
|
|
527
543
|
.ft-select--helper-text {
|
|
528
|
-
padding: 0
|
|
544
|
+
padding: 0 ${ke.horizontalSpacing};
|
|
529
545
|
color: ${ke.helperColor};
|
|
530
546
|
}
|
|
531
547
|
|
|
@@ -580,7 +596,13 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
580
596
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
581
597
|
<span>${t.label}</span>
|
|
582
598
|
</div>
|
|
583
|
-
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,n;let l;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),l=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),l=null!==(n=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstOption}null==l||l.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){var i,o;if(!e.deepEqual(null===(i=this.selectedOption)||void 0===i?void 0:i.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(o=this.selectedOption)||void 0===o?void 0:o.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Ce.elementDefinitions={"ft-input-label":se,"ft-typography":te,"ft-ripple":be,"ft-icon":we},Ce.styles=[Vt,Gt,Se],ze([o.property({type:String})],Ce.prototype,"label",void 0),ze([o.property({type:String})],Ce.prototype,"helper",void 0),ze([o.property({type:Boolean})],Ce.prototype,"outlined",void 0),ze([o.property({type:Boolean})],Ce.prototype,"disabled",void 0),ze([o.property({type:Boolean})],Ce.prototype,"error",void 0),ze([o.property({type:Boolean})],Ce.prototype,"fixedMenuPosition",void 0),ze([o.property({type:Array})],Ce.prototype,"options",void 0),ze([o.state()],Ce.prototype,"selectedOption",void 0),ze([o.state()],Ce.prototype,"optionsDisplayed",void 0),ze([o.state()],Ce.prototype,"focusOptions",void 0),ze([o.query(".ft-select")],Ce.prototype,"container",void 0),ze([o.query(".ft-select--options")],Ce.prototype,"optionsMenu",void 0),ze([o.query(".ft-select--input-panel")],Ce.prototype,"mainPanel",void 0),ze([o.query(".ft-select--option:first-child")],Ce.prototype,"firstOption",void 0),ze([o.query(".ft-select--option:focus")],Ce.prototype,"focusedOption",void 0),ze([o.query(".ft-select--option.ft-select--option-selected")],Ce.prototype,"selectedOptionElement",void 0),ze([o.query(".ft-select--option:last-child")],Ce.prototype,"lastOption",void 0),ze([o.query("slot")],Ce.prototype,"optionsSlot",void 0),e.customElement("ft-select")(Ce),e.customElement("ft-select-option")(Oe);
|
|
599
|
+
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,n;let l;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),l=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),l=null!==(n=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstOption}null==l||l.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){var i,o;if(!e.deepEqual(null===(i=this.selectedOption)||void 0===i?void 0:i.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(o=this.selectedOption)||void 0===o?void 0:o.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Ce.elementDefinitions={"ft-input-label":se,"ft-typography":te,"ft-ripple":be,"ft-icon":we},Ce.styles=[Vt,Gt,Se],ze([o.property({type:String})],Ce.prototype,"label",void 0),ze([o.property({type:String})],Ce.prototype,"helper",void 0),ze([o.property({type:Boolean})],Ce.prototype,"outlined",void 0),ze([o.property({type:Boolean})],Ce.prototype,"disabled",void 0),ze([o.property({type:Boolean})],Ce.prototype,"error",void 0),ze([o.property({type:Boolean})],Ce.prototype,"fixedMenuPosition",void 0),ze([o.property({type:Array})],Ce.prototype,"options",void 0),ze([o.state()],Ce.prototype,"selectedOption",void 0),ze([o.state()],Ce.prototype,"optionsDisplayed",void 0),ze([o.state()],Ce.prototype,"focusOptions",void 0),ze([o.query(".ft-select")],Ce.prototype,"container",void 0),ze([o.query(".ft-select--options")],Ce.prototype,"optionsMenu",void 0),ze([o.query(".ft-select--input-panel")],Ce.prototype,"mainPanel",void 0),ze([o.query(".ft-select--option:first-child")],Ce.prototype,"firstOption",void 0),ze([o.query(".ft-select--option:focus")],Ce.prototype,"focusedOption",void 0),ze([o.query(".ft-select--option.ft-select--option-selected")],Ce.prototype,"selectedOptionElement",void 0),ze([o.query(".ft-select--option:last-child")],Ce.prototype,"lastOption",void 0),ze([o.query("slot")],Ce.prototype,"optionsSlot",void 0),e.customElement("ft-select")(Ce),e.customElement("ft-select-option")(Oe);
|
|
600
|
+
/**
|
|
601
|
+
* @license
|
|
602
|
+
* Copyright 2018 Google LLC
|
|
603
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
604
|
+
*/
|
|
605
|
+
const Ee={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")},De=i.css`
|
|
584
606
|
*:focus {
|
|
585
607
|
outline: none;
|
|
586
608
|
}
|
|
@@ -596,7 +618,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
596
618
|
${e.setVariable(ee.fontSize,Ee.fontSize)};
|
|
597
619
|
${e.setVariable(ee.raisedFontSize,Ee.labelSize)};
|
|
598
620
|
${e.setVariable(ee.verticalSpacing,Ee.verticalSpacing)};
|
|
599
|
-
${e.setVariable(ee.horizontalSpacing,
|
|
621
|
+
${e.setVariable(ee.horizontalSpacing,Ee.horizontalSpacing)};
|
|
600
622
|
}
|
|
601
623
|
|
|
602
624
|
.ft-text-field--main-panel {
|
|
@@ -728,7 +750,11 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
728
750
|
.ft-text-field:not(.ft-text-field--hide-suggestions):focus-within .ft-text-field--suggestions {
|
|
729
751
|
display: flex;
|
|
730
752
|
}
|
|
731
|
-
|
|
753
|
+
|
|
754
|
+
.ft-text-field--with-icon {
|
|
755
|
+
${e.setVariable(ee.labelMaxWidth,`calc(100% - ${ve.size} - ${ee.horizontalSpacing})`)};
|
|
756
|
+
}
|
|
757
|
+
`;var Ie=function(t,e,i,o){for(var s,n=arguments.length,l=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(l=(n<3?s(l):n>3?s(e,i,l):s(e,i))||l);return n>3&&l&&Object.defineProperty(e,i,l),l};class Be extends e.FtLitElement{constructor(){super(...arguments),this.value="",this.outlined=!1,this.disabled=!1,this.error=!1,this.prefix=null,this.filterSuggestions=!1,this.focused=!1,this.suggestionsOnTop=!1,this.hideSuggestions=!1,this.visibleSuggestions=[]}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}render(){const t={"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.error,"ft-text-field--with-prefix":!!this.prefix,"ft-text-field--hide-suggestions":0===this.visibleSuggestions.length||this.hideSuggestions,"ft-text-field--raised-label":this.focused||""!=this.value,"ft-text-field--with-icon":!!this.icon};return i.html`
|
|
732
758
|
<div class="${l.classMap(t)}">
|
|
733
759
|
<div class="ft-text-field--main-panel"
|
|
734
760
|
@keydown=${this.handleKeyboardNavigation}>
|
|
@@ -743,6 +769,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
743
769
|
`}
|
|
744
770
|
<ft-typography class="ft-text-field--prefix" vaiant="body1">${this.prefix}</ft-typography>
|
|
745
771
|
<input type="text"
|
|
772
|
+
maxlength=${(t=>null!=t?t:C)(this.maxLength||void 0)}
|
|
746
773
|
aria-label="${this.label}"
|
|
747
774
|
class="ft-typography--body1 ft-text-field--input"
|
|
748
775
|
?disabled=${this.disabled}
|
|
@@ -770,7 +797,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
770
797
|
</ft-typography>
|
|
771
798
|
`:i.nothing}
|
|
772
799
|
</div>
|
|
773
|
-
`}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}}
|
|
800
|
+
`}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":se,"ft-ripple":be,"ft-typography":te,"ft-icon":we},Be.styles=[Pt,De],Ie([o.property()],Be.prototype,"label",void 0),Ie([o.property()],Be.prototype,"value",void 0),Ie([o.property()],Be.prototype,"helper",void 0),Ie([o.property({type:Boolean})],Be.prototype,"outlined",void 0),Ie([o.property({type:Boolean})],Be.prototype,"disabled",void 0),Ie([o.property({type:Boolean})],Be.prototype,"error",void 0),Ie([o.property()],Be.prototype,"prefix",void 0),Ie([o.property()],Be.prototype,"icon",void 0),Ie([o.property()],Be.prototype,"iconVariant",void 0),Ie([o.property({type:Boolean})],Be.prototype,"filterSuggestions",void 0),Ie([o.property({type:Number})],Be.prototype,"maxLength",void 0),Ie([o.state()],Be.prototype,"focused",void 0),Ie([o.state()],Be.prototype,"suggestionsOnTop",void 0),Ie([o.state()],Be.prototype,"hideSuggestions",void 0),Ie([o.state()],Be.prototype,"visibleSuggestions",void 0),Ie([o.query(".ft-text-field--input")],Be.prototype,"input",void 0),Ie([o.query(".ft-text-field--suggestions")],Be.prototype,"suggestionsContainer",void 0),Ie([o.queryAssignedElements({selector:"ft-text-field-suggestion"})],Be.prototype,"suggestions",void 0);const je=i.css`
|
|
774
801
|
.ft-text-field-suggestion {
|
|
775
802
|
position: relative;
|
|
776
803
|
padding: 8px 16px;
|
|
@@ -807,7 +834,7 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
807
834
|
<slot></slot>
|
|
808
835
|
</ft-typography>
|
|
809
836
|
</div>
|
|
810
|
-
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new Fe(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}Ae.elementDefinitions={"ft-ripple":be,"ft-typography":te,"ft-icon":we},Ae.styles=je,Ne([o.property()],Ae.prototype,"value",void 0),Ne([o.query(".ft-text-field-suggestion")],Ae.prototype,"container",void 0),Ne([o.queryAssignedNodes()],Ae.prototype,"assignedNodes",void 0),e.customElement("ft-text-field")(
|
|
837
|
+
`}focus(t){var e;null===(e=this.container)||void 0===e||e.focus(t)}click(){var t;null===(t=this.container)||void 0===t||t.click()}confirmSuggestion(){this.dispatchEvent(new Fe(this.getValue()))}getValue(){return this.value||this.textContent}get textContent(){return this.assignedNodes.map((t=>t.textContent)).join("").trim()}onKeyDown(t){["Enter"," "].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.confirmSuggestion())}}Ae.elementDefinitions={"ft-ripple":be,"ft-typography":te,"ft-icon":we},Ae.styles=je,Ne([o.property()],Ae.prototype,"value",void 0),Ne([o.query(".ft-text-field-suggestion")],Ae.prototype,"container",void 0),Ne([o.queryAssignedNodes()],Ae.prototype,"assignedNodes",void 0),e.customElement("ft-text-field")(Be),e.customElement("ft-text-field-suggestion")(Ae);const Ze=e.FtCssVariableFactory.create("--ft-tooltip-distance","SIZE","4px"),Te=e.FtCssVariableFactory.create("--ft-tooltip-color","COLOR","#FFFFFF"),Me=e.FtCssVariableFactory.create("--ft-tooltip-background-color","COLOR","#666666"),Re=e.FtCssVariableFactory.create("--ft-tooltip-z-index","NUMBER","1"),_e=e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),Ue=e.FtCssVariableFactory.create("--ft-tooltip-max-width","SIZE","150px"),He=i.css`
|
|
811
838
|
.ft-tooltip--container {
|
|
812
839
|
display: block;
|
|
813
840
|
position: relative;
|
|
@@ -826,13 +853,13 @@ const H=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
826
853
|
max-width: ${Ue};
|
|
827
854
|
text-align: center;
|
|
828
855
|
padding: ${Ze};
|
|
829
|
-
z-index: ${
|
|
856
|
+
z-index: ${Re};
|
|
830
857
|
}
|
|
831
858
|
|
|
832
859
|
.ft-tooltip--content {
|
|
833
860
|
padding: 4px 8px;
|
|
834
861
|
border-radius: ${_e};
|
|
835
|
-
background-color: ${
|
|
862
|
+
background-color: ${Me};
|
|
836
863
|
color: ${Te};
|
|
837
864
|
top: -500px;
|
|
838
865
|
left: -500px;
|