@fluid-topics/ft-file-button 0.1.18 → 0.2.0
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-file-button.inline-styles.js +183 -172
- package/build/ft-file-button.light.js +148 -137
- package/build/ft-file-button.min.js +179 -168
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,i,o,
|
|
1
|
+
!function(t,i,e,o,n,s){var r=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};const l={color:i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorContent),primaryColor:i.FtCssVariable.extend("--ft-ripple-primary-color",i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary)),secondaryColor:i.FtCssVariable.extend("--ft-ripple-secondary-color",i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary)),opacityContentOnSurfacePressed:i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system")};class a extends i.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.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed)},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var i,e;let{x:o,y:n}=this.getCoordinates(t),s=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-s.x:s.width/2),this.originY=Math.round(null!=n?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.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 e.html`
|
|
2
2
|
<style>
|
|
3
3
|
.ft-ripple .ft-ripple--effect,
|
|
4
4
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
<div class="ft-ripple--background"></div>
|
|
16
16
|
<div class="ft-ripple--effect"></div>
|
|
17
17
|
</div>
|
|
18
|
-
`}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){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),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 i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},
|
|
18
|
+
`}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){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),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 i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),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 i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",n),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",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",n),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 i=t,e=t;let o,n;return null!=i.x?({x:o,y:n}=i):null!=e.touches&&(o=e.touches[0].clientX,n=e.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)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.resizeObserver.disconnect(),this.endRipple()}}
|
|
19
19
|
/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
23
|
*/
|
|
24
|
-
var a
|
|
24
|
+
var p;a.elementDefinitions={},a.styles=e.css`
|
|
25
25
|
:host {
|
|
26
26
|
display: contents;
|
|
27
27
|
}
|
|
@@ -40,17 +40,17 @@ var a;l.elementDefinitions={},l.styles=o.css`
|
|
|
40
40
|
.ft-ripple .ft-ripple--effect {
|
|
41
41
|
position: absolute;
|
|
42
42
|
opacity: 0;
|
|
43
|
-
background-color: ${
|
|
43
|
+
background-color: ${l.color};
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background,
|
|
47
47
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
48
|
-
background-color: ${
|
|
48
|
+
background-color: ${l.secondaryColor};
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
52
52
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
53
|
-
background-color: ${
|
|
53
|
+
background-color: ${l.primaryColor};
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
.ft-ripple .ft-ripple--background {
|
|
@@ -81,57 +81,57 @@ var a;l.elementDefinitions={},l.styles=o.css`
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
84
|
-
opacity: ${
|
|
84
|
+
opacity: ${l.opacityContentOnSurfaceHover};
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
88
|
-
opacity: ${
|
|
88
|
+
opacity: ${l.opacityContentOnSurfaceSelected};
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
92
|
-
opacity: ${
|
|
92
|
+
opacity: ${l.opacityContentOnSurfaceFocused};
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
96
|
-
opacity: ${
|
|
96
|
+
opacity: ${l.opacityContentOnSurfacePressed};
|
|
97
97
|
transform: translate(-50%, -50%) scale(1);
|
|
98
98
|
}
|
|
99
|
-
`,r([
|
|
99
|
+
`,r([o.property({type:Boolean})],a.prototype,"primary",void 0),r([o.property({type:Boolean})],a.prototype,"secondary",void 0),r([o.property({type:Boolean})],a.prototype,"unbounded",void 0),r([o.property({type:Boolean})],a.prototype,"activated",void 0),r([o.property({type:Boolean})],a.prototype,"selected",void 0),r([o.property({type:Boolean})],a.prototype,"disabled",void 0),r([o.state()],a.prototype,"hovered",void 0),r([o.state()],a.prototype,"focused",void 0),r([o.state()],a.prototype,"pressed",void 0),r([o.state()],a.prototype,"rippling",void 0),r([o.state()],a.prototype,"rippleSize",void 0),r([o.state()],a.prototype,"originX",void 0),r([o.state()],a.prototype,"originY",void 0),r([o.query(".ft-ripple")],a.prototype,"ripple",void 0),r([o.query(".ft-ripple--effect")],a.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(a);const h=globalThis.trustedTypes,f=h?h.createPolicy("lit-html",{createHTML:t=>t}):void 0,d=`lit$${(Math.random()+"").slice(9)}$`,c="?"+d,u=`<${c}>`,x=document,y=(t="")=>x.createComment(t),g=t=>null===t||"object"!=typeof t&&"function"!=typeof t,b=Array.isArray,v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,m=/-->/g,$=/>/g,w=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,k=/'/g,z=/"/g,S=/^(?:script|style|textarea|title)$/i,C=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),O=Symbol.for("lit-noChange"),j=Symbol.for("lit-nothing"),N=new WeakMap,A=x.createTreeWalker(x,129,null,!1),I=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=v;for(let i=0;i<e;i++){const e=t[i];let l,a,p=-1,h=0;for(;h<e.length&&(r.lastIndex=h,a=r.exec(e),null!==a);)h=r.lastIndex,r===v?"!--"===a[1]?r=m:void 0!==a[1]?r=$:void 0!==a[2]?(S.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=w):void 0!==a[3]&&(r=w):r===w?">"===a[0]?(r=null!=n?n:v,p=-1):void 0===a[1]?p=-2:(p=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?w:'"'===a[3]?z:k):r===z||r===k?r=w:r===m||r===$?r=v:(r=w,n=void 0);const f=r===w&&t[i+1].startsWith("/>")?" ":"";s+=r===v?e+u:p>=0?(o.push(l),e.slice(0,p)+"$lit$"+e.slice(p)+d+f):e+d+(-2===p?(o.push(void 0),i):f)}const l=s+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==f?f.createHTML(l):l,o]};class T{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,s=0;const r=t.length-1,l=this.parts,[a,p]=I(t,i);if(this.el=T.createElement(a,e),A.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=A.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(d)){const e=p[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(d),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?M:"?"===i[1]?R:"@"===i[1]?Z:_})}else l.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(S.test(o.tagName)){const t=o.textContent.split(d),i=t.length-1;if(i>0){o.textContent=h?h.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],y()),A.nextNode(),l.push({type:2,index:++n});o.append(t[i],y())}}}else if(8===o.nodeType)if(o.data===c)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(d,t+1));)l.push({type:7,index:n}),t+=d.length-1}n++}}static createElement(t,i){const e=x.createElement("template");return e.innerHTML=t,e}}function B(t,i,e=t,o){var n,s,r,l;if(i===O)return i;let a=void 0!==o?null===(n=e._$Cl)||void 0===n?void 0:n[o]:e._$Cu;const p=g(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(s=null==a?void 0:a._$AO)||void 0===s||s.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,e,o)),void 0!==o?(null!==(r=(l=e)._$Cl)&&void 0!==r?r:l._$Cl=[])[o]=a:e._$Cu=a),void 0!==a&&(i=B(t,a._$AS(t,i.values),a,o)),i}class F{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:x).importNode(e,!0);A.currentNode=n;let s=A.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new E(s,s.nextSibling,this,t):1===a.type?i=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(i=new D(s,this,t)),this.v.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(s=A.nextNode(),r++)}return n}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class E{constructor(t,i,e,o){var n;this.type=2,this._$AH=j,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cg=null===(n=null==o?void 0:o.isConnected)||void 0===n||n}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=B(this,t,i),g(t)?t===j||null==t||""===t?(this._$AH!==j&&this._$AR(),this._$AH=j):t!==this._$AH&&t!==O&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return b(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==j&&g(this._$AH)?this._$AA.nextSibling.data=t:this.S(x.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=T.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.m(e);else{const t=new F(n,this),i=t.p(this.options);t.m(e),this.S(i),this._$AH=t}}_$AC(t){let i=N.get(t.strings);return void 0===i&&N.set(t.strings,i=new T(t)),i}A(t){b(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const n of t)o===i.length?i.push(e=new E(this.M(y()),this.M(y()),this,this.options)):e=i[o],e._$AI(n),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class _{constructor(t,i,e,o,n){this.type=1,this._$AH=j,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=n,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=j}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let s=!1;if(void 0===n)t=B(this,t,i,0),s=!g(t)||t!==this._$AH&&t!==O,s&&(this._$AH=t);else{const o=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=B(this,o[e+r],i,r),l===O&&(l=this._$AH[r]),s||(s=!g(l)||l!==this._$AH[r]),l===j?t=j:t!==j&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.k(t)}k(t){t===j?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class M extends _{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===j?void 0:t}}const U=h?h.emptyScript:"";class R extends _{constructor(){super(...arguments),this.type=4}k(t){t&&t!==j?this.element.setAttribute(this.name,U):this.element.removeAttribute(this.name)}}class Z extends _{constructor(t,i,e,o,n){super(t,i,e,o,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=B(this,t,i,0))&&void 0!==e?e:j)===O)return;const o=this._$AH,n=t===j&&o!==j||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==j&&(o===j||n);n&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class D{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){B(this,t)}}const W=window.litHtmlPolyfillSupport;null==W||W(T,E),(null!==(p=globalThis.litHtmlVersions)&&void 0!==p?p:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
100
100
|
/**
|
|
101
101
|
* @license
|
|
102
102
|
* Copyright 2020 Google LLC
|
|
103
103
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
104
104
|
*/
|
|
105
|
-
const H=t=>({_$litStatic$:t}),
|
|
105
|
+
const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;let s,r;const l=[],a=[];let p,h=0,f=!1;for(;h<n;){for(p=i[h];h<n&&void 0!==(r=e[h],s=null===(o=r)||void 0===o?void 0:o._$litStatic$);)p+=s+i[++h],f=!0;a.push(r),l.push(p),h++}if(h===n&&l.push(i[n]),f){const t=l.join("$$lit$$");void 0===(i=G.get(t))&&(l.raw=l,G.set(t,i=l)),e=a}return t(i,...e)})(C);var L,q=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};!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"}(L||(L={}));const P=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),X=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),Y={fontFamily:X,fontSize:i.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:i.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},J=i.FtCssVariable.extend("--ft-typography-title-font-family",P),Q=i.FtCssVariable.extend("--ft-typography-title-font-size",Y.fontSize,"20px"),V=i.FtCssVariable.extend("--ft-typography-title-font-weight",Y.fontWeight,"normal"),tt=i.FtCssVariable.extend("--ft-typography-title-letter-spacing",Y.letterSpacing,"0.15px"),it=i.FtCssVariable.extend("--ft-typography-title-line-height",Y.lineHeight,"24px"),et=i.FtCssVariable.extend("--ft-typography-title-text-transform",Y.textTransform,"inherit"),ot=i.FtCssVariable.extend("--ft-typography-title-dense-font-family",P),nt=i.FtCssVariable.extend("--ft-typography-title-dense-font-size",Y.fontSize,"14px"),st=i.FtCssVariable.extend("--ft-typography-title-dense-font-weight",Y.fontWeight,"normal"),rt=i.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",Y.letterSpacing,"0.105px"),lt=i.FtCssVariable.extend("--ft-typography-title-dense-line-height",Y.lineHeight,"24px"),at=i.FtCssVariable.extend("--ft-typography-title-dense-text-transform",Y.textTransform,"inherit"),pt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-family",X),ht=i.FtCssVariable.extend("--ft-typography-subtitle1-font-size",Y.fontSize,"16px"),ft=i.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",Y.fontWeight,"600"),dt=i.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",Y.letterSpacing,"0.144px"),ct=i.FtCssVariable.extend("--ft-typography-subtitle1-line-height",Y.lineHeight,"24px"),ut=i.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",Y.textTransform,"inherit"),xt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-family",X),yt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-size",Y.fontSize,"14px"),gt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",Y.fontWeight,"normal"),bt=i.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",Y.letterSpacing,"0.098px"),vt=i.FtCssVariable.extend("--ft-typography-subtitle2-line-height",Y.lineHeight,"24px"),mt=i.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",Y.textTransform,"inherit"),$t=i.FtCssVariable.extend("--ft-typography-body1-font-family",X),wt=i.FtCssVariable.extend("--ft-typography-body1-font-size",Y.fontSize,"16px"),kt=i.FtCssVariable.extend("--ft-typography-body1-font-weight",Y.fontWeight,"normal"),zt=i.FtCssVariable.extend("--ft-typography-body1-letter-spacing",Y.letterSpacing,"0.496px"),St=i.FtCssVariable.extend("--ft-typography-body1-line-height",Y.lineHeight,"24px"),Ct=i.FtCssVariable.extend("--ft-typography-body1-text-transform",Y.textTransform,"inherit"),Ot=i.FtCssVariable.extend("--ft-typography-body2-font-family",X),jt=i.FtCssVariable.extend("--ft-typography-body2-font-size",Y.fontSize,"14px"),Nt=i.FtCssVariable.extend("--ft-typography-body2-font-weight",Y.fontWeight,"normal"),At=i.FtCssVariable.extend("--ft-typography-body2-letter-spacing",Y.letterSpacing,"0.252px"),It=i.FtCssVariable.extend("--ft-typography-body2-line-height",Y.lineHeight,"20px"),Tt=i.FtCssVariable.extend("--ft-typography-body2-text-transform",Y.textTransform,"inherit"),Bt=i.FtCssVariable.extend("--ft-typography-caption-font-family",X),Ft=i.FtCssVariable.extend("--ft-typography-caption-font-size",Y.fontSize,"12px"),Et=i.FtCssVariable.extend("--ft-typography-caption-font-weight",Y.fontWeight,"normal"),_t=i.FtCssVariable.extend("--ft-typography-caption-letter-spacing",Y.letterSpacing,"0.396px"),Mt=i.FtCssVariable.extend("--ft-typography-caption-line-height",Y.lineHeight,"16px"),Ut=i.FtCssVariable.extend("--ft-typography-caption-text-transform",Y.textTransform,"inherit"),Rt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",X),Zt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",Y.fontSize,"10px"),Dt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",Y.fontWeight,"normal"),Wt=i.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",Y.letterSpacing,"0.33px"),Ht=i.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",Y.lineHeight,"16px"),Gt=i.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",Y.textTransform,"inherit"),Kt=i.FtCssVariable.extend("--ft-typography-overline-font-family",X),Lt=i.FtCssVariable.extend("--ft-typography-overline-font-size",Y.fontSize,"10px"),qt=i.FtCssVariable.extend("--ft-typography-overline-font-weight",Y.fontWeight,"normal"),Pt=i.FtCssVariable.extend("--ft-typography-overline-letter-spacing",Y.letterSpacing,"1.5px"),Xt=i.FtCssVariable.extend("--ft-typography-overline-line-height",Y.lineHeight,"16px"),Yt=i.FtCssVariable.extend("--ft-typography-overline-text-transform",Y.textTransform,"uppercase"),Jt={fontFamily:i.FtCssVariable.extend("--ft-typography-button-font-family",X),fontSize:i.FtCssVariable.extend("--ft-typography-button-font-size",Y.fontSize,"14px"),fontWeight:i.FtCssVariable.extend("--ft-typography-button-font-weight",Y.fontWeight,"600"),letterSpacing:i.FtCssVariable.extend("--ft-typography-button-letter-spacing",Y.letterSpacing,"1.246px"),lineHeight:i.FtCssVariable.extend("--ft-typography-button-line-height",Y.lineHeight,"16px"),textTransform:i.FtCssVariable.extend("--ft-typography-button-text-transform",Y.textTransform,"uppercase")},Qt=e.css`
|
|
106
106
|
.ft-typography--title {
|
|
107
|
-
font-family: ${
|
|
108
|
-
font-size: ${
|
|
109
|
-
font-weight: ${
|
|
110
|
-
letter-spacing: ${
|
|
111
|
-
line-height: ${
|
|
112
|
-
text-transform: ${
|
|
107
|
+
font-family: ${J};
|
|
108
|
+
font-size: ${Q};
|
|
109
|
+
font-weight: ${V};
|
|
110
|
+
letter-spacing: ${tt};
|
|
111
|
+
line-height: ${it};
|
|
112
|
+
text-transform: ${et};
|
|
113
113
|
}
|
|
114
|
-
`,
|
|
114
|
+
`,Vt=e.css`
|
|
115
115
|
.ft-typography--title-dense {
|
|
116
116
|
font-family: ${ot};
|
|
117
|
-
font-size: ${
|
|
118
|
-
font-weight: ${
|
|
117
|
+
font-size: ${nt};
|
|
118
|
+
font-weight: ${st};
|
|
119
119
|
letter-spacing: ${rt};
|
|
120
|
-
line-height: ${
|
|
121
|
-
text-transform: ${
|
|
120
|
+
line-height: ${lt};
|
|
121
|
+
text-transform: ${at};
|
|
122
122
|
}
|
|
123
|
-
`,
|
|
123
|
+
`,ti=e.css`
|
|
124
124
|
.ft-typography--subtitle1 {
|
|
125
|
-
font-family: ${
|
|
126
|
-
font-size: ${
|
|
127
|
-
font-weight: ${
|
|
128
|
-
letter-spacing: ${
|
|
129
|
-
line-height: ${
|
|
130
|
-
text-transform: ${
|
|
125
|
+
font-family: ${pt};
|
|
126
|
+
font-size: ${ht};
|
|
127
|
+
font-weight: ${ft};
|
|
128
|
+
letter-spacing: ${dt};
|
|
129
|
+
line-height: ${ct};
|
|
130
|
+
text-transform: ${ut};
|
|
131
131
|
}
|
|
132
|
-
`,
|
|
132
|
+
`,ii=e.css`
|
|
133
133
|
.ft-typography--subtitle2 {
|
|
134
|
-
font-family: ${
|
|
134
|
+
font-family: ${xt};
|
|
135
135
|
font-size: ${yt};
|
|
136
136
|
font-weight: ${gt};
|
|
137
137
|
letter-spacing: ${bt};
|
|
@@ -139,98 +139,72 @@ const H=t=>({_$litStatic$:t}),L=new Map,W=(t=>(i,...o)=>{var e;const n=o.length;
|
|
|
139
139
|
text-transform: ${mt};
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
`,
|
|
142
|
+
`,ei=e.css`
|
|
143
143
|
.ft-typography--body1 {
|
|
144
144
|
font-family: ${$t};
|
|
145
|
-
font-size: ${
|
|
146
|
-
font-weight: ${
|
|
147
|
-
letter-spacing: ${
|
|
148
|
-
line-height: ${
|
|
149
|
-
text-transform: ${
|
|
145
|
+
font-size: ${wt};
|
|
146
|
+
font-weight: ${kt};
|
|
147
|
+
letter-spacing: ${zt};
|
|
148
|
+
line-height: ${St};
|
|
149
|
+
text-transform: ${Ct};
|
|
150
150
|
}
|
|
151
|
-
`,oi=
|
|
151
|
+
`,oi=e.css`
|
|
152
152
|
.ft-typography--body2 {
|
|
153
|
-
font-family: ${
|
|
154
|
-
font-size: ${
|
|
155
|
-
font-weight: ${
|
|
156
|
-
letter-spacing: ${
|
|
157
|
-
line-height: ${
|
|
158
|
-
text-transform: ${
|
|
153
|
+
font-family: ${Ot};
|
|
154
|
+
font-size: ${jt};
|
|
155
|
+
font-weight: ${Nt};
|
|
156
|
+
letter-spacing: ${At};
|
|
157
|
+
line-height: ${It};
|
|
158
|
+
text-transform: ${Tt};
|
|
159
159
|
}
|
|
160
|
-
`,
|
|
160
|
+
`,ni=e.css`
|
|
161
161
|
.ft-typography--caption {
|
|
162
|
-
font-family: ${
|
|
163
|
-
font-size: ${
|
|
164
|
-
font-weight: ${
|
|
165
|
-
letter-spacing: ${
|
|
162
|
+
font-family: ${Bt};
|
|
163
|
+
font-size: ${Ft};
|
|
164
|
+
font-weight: ${Et};
|
|
165
|
+
letter-spacing: ${_t};
|
|
166
166
|
line-height: ${Mt};
|
|
167
|
-
text-transform: ${
|
|
167
|
+
text-transform: ${Ut};
|
|
168
168
|
}
|
|
169
|
-
`,
|
|
169
|
+
`,si=e.css`
|
|
170
170
|
.ft-typography--breadcrumb {
|
|
171
171
|
font-family: ${Rt};
|
|
172
|
-
font-size: ${
|
|
173
|
-
font-weight: ${
|
|
174
|
-
letter-spacing: ${
|
|
172
|
+
font-size: ${Zt};
|
|
173
|
+
font-weight: ${Dt};
|
|
174
|
+
letter-spacing: ${Wt};
|
|
175
175
|
line-height: ${Ht};
|
|
176
|
-
text-transform: ${
|
|
176
|
+
text-transform: ${Gt};
|
|
177
177
|
}
|
|
178
|
-
`,ri=
|
|
178
|
+
`,ri=e.css`
|
|
179
179
|
.ft-typography--overline {
|
|
180
|
-
font-family: ${
|
|
181
|
-
font-size: ${
|
|
182
|
-
font-weight: ${
|
|
180
|
+
font-family: ${Kt};
|
|
181
|
+
font-size: ${Lt};
|
|
182
|
+
font-weight: ${qt};
|
|
183
183
|
letter-spacing: ${Pt};
|
|
184
184
|
line-height: ${Xt};
|
|
185
185
|
text-transform: ${Yt};
|
|
186
186
|
}
|
|
187
|
-
`,
|
|
187
|
+
`,li=e.css`
|
|
188
188
|
.ft-typography--button {
|
|
189
|
-
font-family: ${
|
|
190
|
-
font-size: ${
|
|
191
|
-
font-weight: ${
|
|
192
|
-
letter-spacing: ${
|
|
193
|
-
line-height: ${
|
|
194
|
-
text-transform: ${
|
|
189
|
+
font-family: ${Jt.fontFamily};
|
|
190
|
+
font-size: ${Jt.fontSize};
|
|
191
|
+
font-weight: ${Jt.fontWeight};
|
|
192
|
+
letter-spacing: ${Jt.letterSpacing};
|
|
193
|
+
line-height: ${Jt.lineHeight};
|
|
194
|
+
text-transform: ${Jt.textTransform};
|
|
195
195
|
}
|
|
196
|
-
`;class
|
|
196
|
+
`;class ai extends i.FtLitElement{constructor(){super(...arguments),this.variant=L.body1}render(){return this.element?K`
|
|
197
197
|
<${H(this.element)}
|
|
198
198
|
class="ft-typography ft-typography--${this.variant}">
|
|
199
199
|
<slot></slot>
|
|
200
200
|
</${H(this.element)}>
|
|
201
|
-
`:
|
|
201
|
+
`:K`
|
|
202
202
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
203
|
-
`}}
|
|
203
|
+
`}}ai.styles=[Qt,Vt,ti,ii,ei,oi,ni,si,ri,li,e.css`
|
|
204
204
|
.ft-typography {
|
|
205
205
|
vertical-align: inherit;
|
|
206
206
|
}
|
|
207
|
-
`],
|
|
208
|
-
/**
|
|
209
|
-
* @license
|
|
210
|
-
* Copyright 2021 Google LLC
|
|
211
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
|
212
|
-
*/
|
|
213
|
-
const ai=o.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`
|
|
214
|
-
/**
|
|
215
|
-
* @license
|
|
216
|
-
* Copyright 2018 Google LLC
|
|
217
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
218
|
-
*/;let pi=class extends o.LitElement{render(){return o.html`<span><slot></slot></span>`}};pi.styles=[ai],pi=
|
|
219
|
-
/*! *****************************************************************************
|
|
220
|
-
Copyright (c) Microsoft Corporation.
|
|
221
|
-
|
|
222
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
223
|
-
purpose with or without fee is hereby granted.
|
|
224
|
-
|
|
225
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
226
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
227
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
228
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
229
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
230
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
231
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
232
|
-
***************************************************************************** */
|
|
233
|
-
function(t,i,o,e){for(var n,r=arguments.length,s=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,o):e,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(i,o,s):n(i,o))||s);return r>3&&s&&Object.defineProperty(i,o,s),s}([e.customElement("mwc-icon")],pi);var hi=function(t,i,o,e){for(var n,r=arguments.length,s=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,o):e,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(i,o,s):n(i,o))||s);return r>3&&s&&Object.defineProperty(i,o,s),s};const fi=i.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),di=i.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),ci=i.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),ui=i.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),yi=i.FtCssVariable.external(i.designSystemVariables.borderRadiusS,"Design system");class gi extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}render(){return o.html`
|
|
207
|
+
`],q([o.property()],ai.prototype,"element",void 0),q([o.property()],ai.prototype,"variant",void 0),i.customElement("ft-typography")(ai);var pi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};const hi=i.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),fi=i.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),di=i.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),ci=i.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),ui=i.FtCssVariable.external(i.designSystemVariables.borderRadiusS,"Design system");class xi extends i.FtLitElement{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.hideDebounce=new i.Debouncer,this.revealDebouncer=new i.Debouncer}render(){return e.html`
|
|
234
208
|
<div part="container"
|
|
235
209
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
236
210
|
@mouseenter=${this.onHover}
|
|
@@ -245,7 +219,7 @@ function(t,i,o,e){for(var n,r=arguments.length,s=r<3?i:null===e?e=Object.getOwnP
|
|
|
245
219
|
</div>
|
|
246
220
|
<slot></slot>
|
|
247
221
|
</div>
|
|
248
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),
|
|
222
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){t.has("visible")&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.position){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2,n=this.tooltip.style;switch(this.position){case"top":n.top=-this.tooltip.clientHeight+"px",n.left=o+"px";break;case"bottom":n.top=i.height+"px",n.left=o+"px";break;case"left":n.top=e+"px",n.left=-this.tooltip.clientWidth+"px";break;case"right":n.top=e+"px",n.left=i.width+"px"}n.maxWidth=Math.max(i.width,150)+"px"}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}xi.elementDefinitions={"ft-typography":ai},xi.styles=e.css`
|
|
249
223
|
.ft-tooltip--container {
|
|
250
224
|
display: block;
|
|
251
225
|
position: relative;
|
|
@@ -263,21 +237,21 @@ function(t,i,o,e){for(var n,r=arguments.length,s=r<3?i:null===e?e=Object.getOwnP
|
|
|
263
237
|
width: max-content;
|
|
264
238
|
max-width: 150px;
|
|
265
239
|
text-align: center;
|
|
266
|
-
padding: ${
|
|
267
|
-
z-index: ${
|
|
240
|
+
padding: ${hi};
|
|
241
|
+
z-index: ${ci};
|
|
268
242
|
}
|
|
269
243
|
|
|
270
244
|
.ft-tooltip--content {
|
|
271
245
|
padding: 4px 8px;
|
|
272
|
-
border-radius: ${
|
|
273
|
-
background-color: ${
|
|
274
|
-
color: ${
|
|
246
|
+
border-radius: ${ui};
|
|
247
|
+
background-color: ${di};
|
|
248
|
+
color: ${fi};
|
|
275
249
|
top: -500px;
|
|
276
250
|
left: -500px;
|
|
277
251
|
position: relative;
|
|
278
252
|
word-break: break-word;
|
|
279
253
|
}
|
|
280
|
-
`,
|
|
254
|
+
`,pi([o.property()],xi.prototype,"text",void 0),pi([o.property({type:Boolean})],xi.prototype,"manual",void 0),pi([o.property({type:Boolean})],xi.prototype,"inline",void 0),pi([o.property({type:Number})],xi.prototype,"delay",void 0),pi([o.property()],xi.prototype,"position",void 0),pi([o.queryAssignedNodes("",!0)],xi.prototype,"slotNodes",void 0),pi([o.query(".ft-tooltip--container")],xi.prototype,"container",void 0),pi([o.query("slot")],xi.prototype,"target",void 0),pi([o.query(".ft-tooltip")],xi.prototype,"tooltip",void 0),pi([o.query(".ft-tooltip--content")],xi.prototype,"tooltipContent",void 0),pi([o.state()],xi.prototype,"visible",void 0),i.customElement("ft-tooltip")(xi);const yi={color:i.FtCssVariable.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariable.create("--ft-loader-size","SIZE","80px")};class gi extends i.FtLitElement{static get styles(){return e.css`
|
|
281
255
|
:host {
|
|
282
256
|
line-height: 0;
|
|
283
257
|
}
|
|
@@ -286,8 +260,8 @@ function(t,i,o,e){for(var n,r=arguments.length,s=r<3?i:null===e?e=Object.getOwnP
|
|
|
286
260
|
display: inline-block;
|
|
287
261
|
position: relative;
|
|
288
262
|
|
|
289
|
-
width: ${
|
|
290
|
-
height: ${
|
|
263
|
+
width: ${yi.size};
|
|
264
|
+
height: ${yi.size};
|
|
291
265
|
}
|
|
292
266
|
|
|
293
267
|
.ft-loader div {
|
|
@@ -296,7 +270,7 @@ function(t,i,o,e){for(var n,r=arguments.length,s=r<3?i:null===e?e=Object.getOwnP
|
|
|
296
270
|
width: 25%;
|
|
297
271
|
height: 25%;
|
|
298
272
|
border-radius: 50%;
|
|
299
|
-
background: ${
|
|
273
|
+
background: ${yi.color};
|
|
300
274
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
301
275
|
}
|
|
302
276
|
|
|
@@ -343,17 +317,55 @@ function(t,i,o,e){for(var n,r=arguments.length,s=r<3?i:null===e?e=Object.getOwnP
|
|
|
343
317
|
transform: translate(0, 0);
|
|
344
318
|
}
|
|
345
319
|
100% {
|
|
346
|
-
transform: translate(calc(0.35 * ${
|
|
320
|
+
transform: translate(calc(0.35 * ${yi.size}), 0);
|
|
347
321
|
}
|
|
348
322
|
}
|
|
349
|
-
`}render(){return
|
|
323
|
+
`}render(){return e.html`
|
|
350
324
|
<div class="ft-loader">
|
|
351
325
|
<div></div>
|
|
352
326
|
<div></div>
|
|
353
327
|
<div></div>
|
|
354
328
|
<div></div>
|
|
355
329
|
</div>
|
|
356
|
-
`}}i.customElement("ft-loader")(vi);var mi=function(t,i,o
|
|
330
|
+
`}}var bi,vi;i.customElement("ft-loader")(gi),function(t){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="\f06e",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=""}(bi||(bi={})),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=""}(vi||(vi={})),new Map([...["abw"].map((t=>[t,vi.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,vi.AUDIO])),...["avi"].map((t=>[t,vi.AVI])),...["chm","xhs"].map((t=>[t,vi.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,vi.CODE])),...["csv"].map((t=>[t,vi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,vi.DITA])),...["epub"].map((t=>[t,vi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,vi.EXCEL])),...["flac"].map((t=>[t,vi.FLAC])),...["gif"].map((t=>[t,vi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,vi.GZIP])),...["html","htm","xhtml"].map((t=>[t,vi.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,vi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,vi.JPEG])),...["json"].map((t=>[t,vi.JSON])),...["m4a","m4p"].map((t=>[t,vi.M4A])),...["mov","qt"].map((t=>[t,vi.MOV])),...["mp3"].map((t=>[t,vi.MP3])),...["mp4","m4v"].map((t=>[t,vi.MP4])),...["ogg","oga"].map((t=>[t,vi.OGG])),...["pdf","ps"].map((t=>[t,vi.PDF])),...["png"].map((t=>[t,vi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,vi.POWERPOINT])),...["rar"].map((t=>[t,vi.RAR])),...["stp"].map((t=>[t,vi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,vi.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,vi.VIDEO])),...["wav"].map((t=>[t,vi.WAV])),...["wma"].map((t=>[t,vi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,vi.WORD])),...["xml","xsl","rdf"].map((t=>[t,vi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,vi.YAML])),...["zip"].map((t=>[t,vi.ZIP]))]);var mi,$i=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(mi||(mi={}));const wi={size:i.FtCssVariable.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariable.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariable.extend("--ft-icon-file-format-font-family",i.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariable.extend("--ft-icon-material-font-family",i.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","Material Icons"))};class ki extends i.FtLitElement{constructor(){super(...arguments),this.variant=mi.fluid_topics}render(){return e.html`
|
|
331
|
+
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
332
|
+
${s.unsafeHTML(this.getIcon())}
|
|
333
|
+
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
334
|
+
</i>
|
|
335
|
+
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}getIcon(){var t,i;let o=this.textContent;return this.variant===mi.file_format?null!==(t=vi[o.toUpperCase()])&&void 0!==t?t:o:this.variant===mi.fluid_topics?null!==(i=bi[o.toUpperCase()])&&void 0!==i?i:o:e.nothing}}ki.elementDefinitions={},ki.styles=e.css`
|
|
336
|
+
:host, i.ft-icon {
|
|
337
|
+
display: inline-block;
|
|
338
|
+
width: ${wi.size};
|
|
339
|
+
height: ${wi.size};
|
|
340
|
+
text-align: center;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
i.ft-icon {
|
|
344
|
+
font-size: ${wi.size};
|
|
345
|
+
line-height: 1;
|
|
346
|
+
font-weight: normal;
|
|
347
|
+
text-transform: none;
|
|
348
|
+
font-style: normal;
|
|
349
|
+
font-variant: normal;
|
|
350
|
+
speak: none;
|
|
351
|
+
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.004);
|
|
352
|
+
text-rendering: auto;
|
|
353
|
+
-webkit-font-smoothing: antialiased;
|
|
354
|
+
-moz-osx-font-smoothing: grayscale;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.ft-icon--fluid-topics {
|
|
358
|
+
font-family: ${wi.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.ft-icon--file-format {
|
|
362
|
+
font-family: ${wi.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.ft-icon--material {
|
|
366
|
+
font-family: ${wi.materialFontFamily}, "Material Icons", sans-serif;
|
|
367
|
+
}
|
|
368
|
+
`,$i([o.property()],ki.prototype,"variant",void 0),$i([o.query("slot")],ki.prototype,"slottedContent",void 0),i.customElement("ft-icon")(ki);var zi=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};const Si=i.FtCssVariable.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Ci={backgroundColor:i.FtCssVariable.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariable.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Si,fontSize:i.FtCssVariable.extend("--ft-button-font-size",Jt.fontSize),iconSize:i.FtCssVariable.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariable.extend("--ft-button-ripple-color",Si),opacityDisabled:i.FtCssVariable.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Oi=i.FtCssVariable.extend("--ft-button-primary-color",i.FtCssVariable.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),ji={backgroundColor:i.FtCssVariable.extend("--ft-button-primary-background-color",i.FtCssVariable.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:Oi,rippleColor:i.FtCssVariable.extend("--ft-button-primary-ripple-color",Oi)},Ni=i.FtCssVariable.extend("--ft-button-dense-border-radius",i.FtCssVariable.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM));class Ai extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.outlined=!1,this.disabled=!1,this.dense=!1,this.round=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}static get styles(){return[i.noTextSelect,e.css`
|
|
357
369
|
:host {
|
|
358
370
|
display: inline-block;
|
|
359
371
|
max-width: 100%;
|
|
@@ -392,18 +404,18 @@ function(t,i,o,e){for(var n,r=arguments.length,s=r<3?i:null===e?e=Object.getOwnP
|
|
|
392
404
|
border: none;
|
|
393
405
|
pointer-events: auto;
|
|
394
406
|
|
|
395
|
-
--ft-button-internal-font-size: ${
|
|
407
|
+
--ft-button-internal-font-size: ${Ci.fontSize};
|
|
396
408
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
397
|
-
--ft-button-internal-color: ${
|
|
398
|
-
|
|
409
|
+
--ft-button-internal-color: ${Ci.color};
|
|
410
|
+
${i.setVariable(wi.size,Ci.iconSize)};
|
|
399
411
|
--ft-button-internal-vertical-padding: 6px;
|
|
400
412
|
--ft-button-internal-horizontal-padding: 8px;
|
|
401
|
-
${i.setVariable(
|
|
402
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height),
|
|
413
|
+
${i.setVariable(l.color,Ci.rippleColor)};
|
|
414
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Ci.iconSize});
|
|
403
415
|
|
|
404
|
-
border-radius: ${
|
|
416
|
+
border-radius: ${Ci.borderRadius};
|
|
405
417
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
406
|
-
background-color: ${
|
|
418
|
+
background-color: ${Ci.backgroundColor};
|
|
407
419
|
color: var(--ft-button-internal-color);
|
|
408
420
|
-webkit-mask-image: radial-gradient(white, black);
|
|
409
421
|
}
|
|
@@ -415,7 +427,7 @@ function(t,i,o,e){for(var n,r=arguments.length,s=r<3?i:null===e?e=Object.getOwnP
|
|
|
415
427
|
.ft-button--dense {
|
|
416
428
|
--ft-button-internal-vertical-padding: 2px;
|
|
417
429
|
--ft-button-internal-horizontal-padding: 4px;
|
|
418
|
-
border-radius: ${
|
|
430
|
+
border-radius: ${Ni};
|
|
419
431
|
}
|
|
420
432
|
|
|
421
433
|
.ft-button--round {
|
|
@@ -424,13 +436,13 @@ function(t,i,o,e){for(var n,r=arguments.length,s=r<3?i:null===e?e=Object.getOwnP
|
|
|
424
436
|
|
|
425
437
|
.ft-button[disabled] {
|
|
426
438
|
filter: grayscale(1);
|
|
427
|
-
opacity: ${
|
|
439
|
+
opacity: ${Ci.opacityDisabled};
|
|
428
440
|
}
|
|
429
441
|
|
|
430
442
|
.ft-button.ft-button--primary {
|
|
431
|
-
background-color: ${
|
|
432
|
-
--ft-button-internal-color: ${
|
|
433
|
-
${i.setVariable(
|
|
443
|
+
background-color: ${ji.backgroundColor};
|
|
444
|
+
--ft-button-internal-color: ${ji.color};
|
|
445
|
+
${i.setVariable(l.color,ji.rippleColor)};
|
|
434
446
|
}
|
|
435
447
|
|
|
436
448
|
.ft-button.ft-button--outlined {
|
|
@@ -448,8 +460,8 @@ function(t,i,o,e){for(var n,r=arguments.length,s=r<3?i:null===e?e=Object.getOwnP
|
|
|
448
460
|
text-overflow: ellipsis;
|
|
449
461
|
display: block;
|
|
450
462
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
451
|
-
${i.setVariable(
|
|
452
|
-
${i.setVariable(
|
|
463
|
+
${i.setVariable(Jt.fontSize,"var(--ft-button-internal-font-size)")};
|
|
464
|
+
${i.setVariable(Jt.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
453
465
|
}
|
|
454
466
|
|
|
455
467
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -466,26 +478,25 @@ function(t,i,o,e){for(var n,r=arguments.length,s=r<3?i:null===e?e=Object.getOwnP
|
|
|
466
478
|
display: none;
|
|
467
479
|
}
|
|
468
480
|
|
|
469
|
-
|
|
481
|
+
ft-icon {
|
|
470
482
|
flex-shrink: 0;
|
|
471
|
-
width: var(--mdc-icon-size);
|
|
472
483
|
}
|
|
473
484
|
|
|
474
|
-
.ft-button--label[hidden] +
|
|
485
|
+
.ft-button--label[hidden] + ft-icon {
|
|
475
486
|
margin: 0 calc(var(--ft-button-internal-horizontal-padding) * -1);
|
|
476
487
|
padding: 0 var(--ft-button-internal-vertical-padding);
|
|
477
488
|
}
|
|
478
489
|
|
|
479
|
-
.ft-button:not(.ft-button--trailing-icon)
|
|
490
|
+
.ft-button:not(.ft-button--trailing-icon) ft-icon,
|
|
480
491
|
.ft-button:not(.ft-button--trailing-icon) ft-loader {
|
|
481
492
|
order: -1;
|
|
482
493
|
}
|
|
483
494
|
|
|
484
495
|
ft-loader {
|
|
485
|
-
${i.setVariable(
|
|
486
|
-
${i.setVariable(
|
|
496
|
+
${i.setVariable(yi.size,Ci.iconSize)};
|
|
497
|
+
${i.setVariable(yi.color,"var(--ft-button-internal-color)")};
|
|
487
498
|
}
|
|
488
|
-
`]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":i.isSafari,"ft-no-text-select":!0};return this.addTooltip(
|
|
499
|
+
`]}render(){const t={"ft-button":!0,"ft-button--primary":this.primary,"ft-button--outlined":this.outlined,"ft-button--dense":this.dense,"ft-button--round":this.round,"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-button--safari-fix":i.isSafari,"ft-no-text-select":!0};return this.addTooltip(e.html`
|
|
489
500
|
<button part="button"
|
|
490
501
|
class="${n.classMap(t)}"
|
|
491
502
|
aria-label="${this.getLabel()}"
|
|
@@ -499,18 +510,18 @@ function(t,i,o,e){for(var n,r=arguments.length,s=r<3?i:null===e?e=Object.getOwnP
|
|
|
499
510
|
</ft-typography>
|
|
500
511
|
${this.resolveIcon()}
|
|
501
512
|
</button>
|
|
502
|
-
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:
|
|
513
|
+
`)}addTooltip(t){return this.hasTextContent()||0===this.getLabel().trim().length?t:e.html`
|
|
503
514
|
<ft-tooltip part="tooltip"
|
|
504
515
|
text="${this.getLabel()}"
|
|
505
516
|
position="${this.tooltipPosition}">
|
|
506
517
|
${t}
|
|
507
518
|
</ft-tooltip>
|
|
508
|
-
`}resolveIcon(){return this.loading?
|
|
509
|
-
<ft-loader></ft-loader> `:this.icon?
|
|
510
|
-
<
|
|
519
|
+
`}resolveIcon(){return this.loading?e.html`
|
|
520
|
+
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
521
|
+
<ft-icon variant="material">${this.icon}</ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}Ai.elementDefinitions={"ft-ripple":a,"ft-tooltip":xi,"ft-typography":ai,"ft-icon":ki,"ft-loader":gi},zi([o.property({type:Boolean})],Ai.prototype,"primary",void 0),zi([o.property({type:Boolean})],Ai.prototype,"outlined",void 0),zi([o.property({type:Boolean})],Ai.prototype,"disabled",void 0),zi([o.property({type:Boolean})],Ai.prototype,"dense",void 0),zi([o.property({type:Boolean})],Ai.prototype,"round",void 0),zi([o.property({type:String})],Ai.prototype,"label",void 0),zi([o.property({type:String})],Ai.prototype,"icon",void 0),zi([o.property({type:Boolean})],Ai.prototype,"trailingIcon",void 0),zi([o.property({type:Boolean})],Ai.prototype,"loading",void 0),zi([o.property({type:String})],Ai.prototype,"tooltipPosition",void 0),zi([o.query(".ft-button")],Ai.prototype,"button",void 0),zi([o.query(".ft-button--label slot")],Ai.prototype,"slottedContent",void 0),i.customElement("ft-button")(Ai);var Ii=function(t,i,e,o){for(var n,s=arguments.length,r=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(r=(s<3?n(r):s>3?n(i,e,r):n(i,e))||r);return s>3&&r&&Object.defineProperty(i,e,r),r};class Ti extends CustomEvent{constructor(t){super("change",{detail:{file:t}})}}class Bi extends i.FtLitElement{constructor(){super(...arguments),this.disabled=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.accept=""}static get styles(){return e.css`
|
|
511
522
|
.ft-file-button {
|
|
512
523
|
}
|
|
513
|
-
`}render(){return
|
|
524
|
+
`}render(){return e.html`
|
|
514
525
|
<div class="ft-file-button">
|
|
515
526
|
<ft-button ?disabled=${this.disabled}
|
|
516
527
|
label="${this.label}"
|
|
@@ -525,4 +536,4 @@ function(t,i,o,e){for(var n,r=arguments.length,s=r<3?i:null===e?e=Object.getOwnP
|
|
|
525
536
|
@change=${this.onFileChange}
|
|
526
537
|
hidden/>
|
|
527
538
|
</div>
|
|
528
|
-
`}onFileChange(){var t;(null===(t=this.input.files)||void 0===t?void 0:t.length)>0&&this.dispatchEvent(new
|
|
539
|
+
`}onFileChange(){var t;(null===(t=this.input.files)||void 0===t?void 0:t.length)>0&&this.dispatchEvent(new Ti(this.input.files.item(0)))}clear(){this.input.value=""}}Bi.elementDefinitions={"ft-button":Ai},Ii([o.property({type:Boolean})],Bi.prototype,"disabled",void 0),Ii([o.property({type:String})],Bi.prototype,"label",void 0),Ii([o.property({type:String})],Bi.prototype,"icon",void 0),Ii([o.property({type:Boolean})],Bi.prototype,"trailingIcon",void 0),Ii([o.property({type:String})],Bi.prototype,"accept",void 0),Ii([o.query(".ft-file-button--input")],Bi.prototype,"input",void 0),i.customElement("ft-file-button")(Bi),t.FileChangeEvent=Ti,t.FtFileButton=Bi,t.FtFileButtonCssVariables={},Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|