@fluid-topics/ft-file-button 0.2.1 → 0.2.4
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 +152 -136
- package/build/ft-file-button.light.js +143 -127
- package/build/ft-file-button.min.js +150 -134
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
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=
|
|
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=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorContent),a={color:l,backgroundColor:i.FtCssVariable.extend("--ft-ripple-background-color",l),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")},p=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),h=p,f=i.FtCssVariable.extend("--ft-ripple-background-color",p),d=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),c=d,u=i.FtCssVariable.extend("--ft-ripple-background-color",d);class x 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.debouncer=new i.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},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
|
|
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){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.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 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
|
|
24
|
+
var g;x.elementDefinitions={},x.styles=e.css`
|
|
25
25
|
:host {
|
|
26
26
|
display: contents;
|
|
27
27
|
}
|
|
@@ -40,17 +40,30 @@ var p;a.elementDefinitions={},a.styles=e.css`
|
|
|
40
40
|
.ft-ripple .ft-ripple--effect {
|
|
41
41
|
position: absolute;
|
|
42
42
|
opacity: 0;
|
|
43
|
-
background-color: ${l.color};
|
|
44
43
|
}
|
|
45
44
|
|
|
46
|
-
.ft-ripple
|
|
45
|
+
.ft-ripple .ft-ripple--background {
|
|
46
|
+
background-color: ${a.backgroundColor};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ft-ripple .ft-ripple--effect {
|
|
50
|
+
background-color: ${a.color};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
54
|
+
background-color: ${u};
|
|
55
|
+
}
|
|
56
|
+
|
|
47
57
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
48
|
-
background-color: ${
|
|
58
|
+
background-color: ${c};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
62
|
+
background-color: ${f};
|
|
49
63
|
}
|
|
50
64
|
|
|
51
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
52
65
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
53
|
-
background-color: ${
|
|
66
|
+
background-color: ${h};
|
|
54
67
|
}
|
|
55
68
|
|
|
56
69
|
.ft-ripple .ft-ripple--background {
|
|
@@ -58,6 +71,7 @@ var p;a.elementDefinitions={},a.styles=e.css`
|
|
|
58
71
|
left: 0;
|
|
59
72
|
height: 100%;
|
|
60
73
|
width: 100%;
|
|
74
|
+
transition: opacity 75ms linear;
|
|
61
75
|
}
|
|
62
76
|
|
|
63
77
|
.ft-ripple .ft-ripple--effect,
|
|
@@ -81,130 +95,130 @@ var p;a.elementDefinitions={},a.styles=e.css`
|
|
|
81
95
|
}
|
|
82
96
|
|
|
83
97
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
84
|
-
opacity: ${
|
|
98
|
+
opacity: ${a.opacityContentOnSurfaceHover};
|
|
85
99
|
}
|
|
86
100
|
|
|
87
101
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
88
|
-
opacity: ${
|
|
102
|
+
opacity: ${a.opacityContentOnSurfaceSelected};
|
|
89
103
|
}
|
|
90
104
|
|
|
91
105
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
92
|
-
opacity: ${
|
|
106
|
+
opacity: ${a.opacityContentOnSurfaceFocused};
|
|
93
107
|
}
|
|
94
108
|
|
|
95
109
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
96
|
-
opacity: ${
|
|
110
|
+
opacity: ${a.opacityContentOnSurfacePressed};
|
|
97
111
|
transform: translate(-50%, -50%) scale(1);
|
|
98
112
|
}
|
|
99
|
-
`,r([o.property({type:Boolean})],
|
|
113
|
+
`,r([o.property({type:Boolean})],x.prototype,"primary",void 0),r([o.property({type:Boolean})],x.prototype,"secondary",void 0),r([o.property({type:Boolean})],x.prototype,"unbounded",void 0),r([o.property({type:Boolean})],x.prototype,"activated",void 0),r([o.property({type:Boolean})],x.prototype,"selected",void 0),r([o.property({type:Boolean})],x.prototype,"disabled",void 0),r([o.state()],x.prototype,"hovered",void 0),r([o.state()],x.prototype,"focused",void 0),r([o.state()],x.prototype,"pressed",void 0),r([o.state()],x.prototype,"rippling",void 0),r([o.state()],x.prototype,"rippleSize",void 0),r([o.state()],x.prototype,"originX",void 0),r([o.state()],x.prototype,"originY",void 0),r([o.query(".ft-ripple")],x.prototype,"ripple",void 0),r([o.query(".ft-ripple--effect")],x.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(x);const y=globalThis.trustedTypes,b=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,v=`lit$${(Math.random()+"").slice(9)}$`,m="?"+v,$=`<${m}>`,w=document,k=(t="")=>w.createComment(t),z=t=>null===t||"object"!=typeof t&&"function"!=typeof t,S=Array.isArray,C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,O=/-->/g,j=/>/g,N=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,A=/'/g,I=/"/g,T=/^(?:script|style|textarea|title)$/i,B=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),F=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),_=new WeakMap,M=w.createTreeWalker(w,129,null,!1),U=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=C;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===C?"!--"===a[1]?r=O:void 0!==a[1]?r=j:void 0!==a[2]?(T.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=N):void 0!==a[3]&&(r=N):r===N?">"===a[0]?(r=null!=n?n:C,p=-1):void 0===a[1]?p=-2:(p=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?N:'"'===a[3]?I:A):r===I||r===A?r=N:r===O||r===j?r=C:(r=N,n=void 0);const f=r===N&&t[i+1].startsWith("/>")?" ":"";s+=r===C?e+$:p>=0?(o.push(l),e.slice(0,p)+"$lit$"+e.slice(p)+v+f):e+v+(-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!==b?b.createHTML(l):l,o]};class R{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]=U(t,i);if(this.el=R.createElement(a,e),M.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=M.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(v)){const e=p[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(v),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?G:"?"===i[1]?L:"@"===i[1]?q:H})}else l.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(T.test(o.tagName)){const t=o.textContent.split(v),i=t.length-1;if(i>0){o.textContent=y?y.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],k()),M.nextNode(),l.push({type:2,index:++n});o.append(t[i],k())}}}else if(8===o.nodeType)if(o.data===m)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(v,t+1));)l.push({type:7,index:n}),t+=v.length-1}n++}}static createElement(t,i){const e=w.createElement("template");return e.innerHTML=t,e}}function Z(t,i,e=t,o){var n,s,r,l;if(i===F)return i;let a=void 0!==o?null===(n=e._$Cl)||void 0===n?void 0:n[o]:e._$Cu;const p=z(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=Z(t,a._$AS(t,i.values),a,o)),i}class D{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:w).importNode(e,!0);M.currentNode=n;let s=M.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new W(s,s.nextSibling,this,t):1===a.type?i=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(i=new P(s,this,t)),this.v.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(s=M.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 W{constructor(t,i,e,o){var n;this.type=2,this._$AH=E,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=Z(this,t,i),z(t)?t===E||null==t||""===t?(this._$AH!==E&&this._$AR(),this._$AH=E):t!==this._$AH&&t!==F&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return S(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!==E&&z(this._$AH)?this._$AA.nextSibling.data=t:this.S(w.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=R.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 D(n,this),i=t.p(this.options);t.m(e),this.S(i),this._$AH=t}}_$AC(t){let i=_.get(t.strings);return void 0===i&&_.set(t.strings,i=new R(t)),i}A(t){S(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 W(this.M(k()),this.M(k()),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 H{constructor(t,i,e,o,n){this.type=1,this._$AH=E,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=E}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=Z(this,t,i,0),s=!z(t)||t!==this._$AH&&t!==F,s&&(this._$AH=t);else{const o=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=Z(this,o[e+r],i,r),l===F&&(l=this._$AH[r]),s||(s=!z(l)||l!==this._$AH[r]),l===E?t=E:t!==E&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.k(t)}k(t){t===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class G extends H{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===E?void 0:t}}const K=y?y.emptyScript:"";class L extends H{constructor(){super(...arguments),this.type=4}k(t){t&&t!==E?this.element.setAttribute(this.name,K):this.element.removeAttribute(this.name)}}class q extends H{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=Z(this,t,i,0))&&void 0!==e?e:E)===F)return;const o=this._$AH,n=t===E&&o!==E||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==E&&(o===E||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 P{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){Z(this,t)}}const X=window.litHtmlPolyfillSupport;null==X||X(R,W),(null!==(g=globalThis.litHtmlVersions)&&void 0!==g?g:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
100
114
|
/**
|
|
101
115
|
* @license
|
|
102
116
|
* Copyright 2020 Google LLC
|
|
103
117
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
104
118
|
*/
|
|
105
|
-
const
|
|
119
|
+
const Y=t=>({_$litStatic$:t}),J=new Map,Q=(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=J.get(t))&&(l.raw=l,J.set(t,i=l)),e=a}return t(i,...e)})(B);var V,tt=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"}(V||(V={}));const it=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),et=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),ot={fontFamily:et,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")},nt=i.FtCssVariable.extend("--ft-typography-title-font-family",it),st=i.FtCssVariable.extend("--ft-typography-title-font-size",ot.fontSize,"20px"),rt=i.FtCssVariable.extend("--ft-typography-title-font-weight",ot.fontWeight,"normal"),lt=i.FtCssVariable.extend("--ft-typography-title-letter-spacing",ot.letterSpacing,"0.15px"),at=i.FtCssVariable.extend("--ft-typography-title-line-height",ot.lineHeight,"24px"),pt=i.FtCssVariable.extend("--ft-typography-title-text-transform",ot.textTransform,"inherit"),ht=i.FtCssVariable.extend("--ft-typography-title-dense-font-family",it),ft=i.FtCssVariable.extend("--ft-typography-title-dense-font-size",ot.fontSize,"14px"),dt=i.FtCssVariable.extend("--ft-typography-title-dense-font-weight",ot.fontWeight,"normal"),ct=i.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",ot.letterSpacing,"0.105px"),ut=i.FtCssVariable.extend("--ft-typography-title-dense-line-height",ot.lineHeight,"24px"),xt=i.FtCssVariable.extend("--ft-typography-title-dense-text-transform",ot.textTransform,"inherit"),gt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-family",et),yt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-size",ot.fontSize,"16px"),bt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",ot.fontWeight,"600"),vt=i.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",ot.letterSpacing,"0.144px"),mt=i.FtCssVariable.extend("--ft-typography-subtitle1-line-height",ot.lineHeight,"24px"),$t=i.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",ot.textTransform,"inherit"),wt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-family",et),kt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-size",ot.fontSize,"14px"),zt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",ot.fontWeight,"normal"),St=i.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",ot.letterSpacing,"0.098px"),Ct=i.FtCssVariable.extend("--ft-typography-subtitle2-line-height",ot.lineHeight,"24px"),Ot=i.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",ot.textTransform,"inherit"),jt=i.FtCssVariable.extend("--ft-typography-body1-font-family",et),Nt=i.FtCssVariable.extend("--ft-typography-body1-font-size",ot.fontSize,"16px"),At=i.FtCssVariable.extend("--ft-typography-body1-font-weight",ot.fontWeight,"normal"),It=i.FtCssVariable.extend("--ft-typography-body1-letter-spacing",ot.letterSpacing,"0.496px"),Tt=i.FtCssVariable.extend("--ft-typography-body1-line-height",ot.lineHeight,"24px"),Bt=i.FtCssVariable.extend("--ft-typography-body1-text-transform",ot.textTransform,"inherit"),Ft=i.FtCssVariable.extend("--ft-typography-body2-font-family",et),Et=i.FtCssVariable.extend("--ft-typography-body2-font-size",ot.fontSize,"14px"),_t=i.FtCssVariable.extend("--ft-typography-body2-font-weight",ot.fontWeight,"normal"),Mt=i.FtCssVariable.extend("--ft-typography-body2-letter-spacing",ot.letterSpacing,"0.252px"),Ut=i.FtCssVariable.extend("--ft-typography-body2-line-height",ot.lineHeight,"20px"),Rt=i.FtCssVariable.extend("--ft-typography-body2-text-transform",ot.textTransform,"inherit"),Zt=i.FtCssVariable.extend("--ft-typography-caption-font-family",et),Dt=i.FtCssVariable.extend("--ft-typography-caption-font-size",ot.fontSize,"12px"),Wt=i.FtCssVariable.extend("--ft-typography-caption-font-weight",ot.fontWeight,"normal"),Ht=i.FtCssVariable.extend("--ft-typography-caption-letter-spacing",ot.letterSpacing,"0.396px"),Gt=i.FtCssVariable.extend("--ft-typography-caption-line-height",ot.lineHeight,"16px"),Kt=i.FtCssVariable.extend("--ft-typography-caption-text-transform",ot.textTransform,"inherit"),Lt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",et),qt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",ot.fontSize,"10px"),Pt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",ot.fontWeight,"normal"),Xt=i.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",ot.letterSpacing,"0.33px"),Yt=i.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",ot.lineHeight,"16px"),Jt=i.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",ot.textTransform,"inherit"),Qt=i.FtCssVariable.extend("--ft-typography-overline-font-family",et),Vt=i.FtCssVariable.extend("--ft-typography-overline-font-size",ot.fontSize,"10px"),ti=i.FtCssVariable.extend("--ft-typography-overline-font-weight",ot.fontWeight,"normal"),ii=i.FtCssVariable.extend("--ft-typography-overline-letter-spacing",ot.letterSpacing,"1.5px"),ei=i.FtCssVariable.extend("--ft-typography-overline-line-height",ot.lineHeight,"16px"),oi=i.FtCssVariable.extend("--ft-typography-overline-text-transform",ot.textTransform,"uppercase"),ni={fontFamily:i.FtCssVariable.extend("--ft-typography-button-font-family",et),fontSize:i.FtCssVariable.extend("--ft-typography-button-font-size",ot.fontSize,"14px"),fontWeight:i.FtCssVariable.extend("--ft-typography-button-font-weight",ot.fontWeight,"600"),letterSpacing:i.FtCssVariable.extend("--ft-typography-button-letter-spacing",ot.letterSpacing,"1.246px"),lineHeight:i.FtCssVariable.extend("--ft-typography-button-line-height",ot.lineHeight,"16px"),textTransform:i.FtCssVariable.extend("--ft-typography-button-text-transform",ot.textTransform,"uppercase")},si=e.css`
|
|
106
120
|
.ft-typography--title {
|
|
107
|
-
font-family: ${
|
|
108
|
-
font-size: ${
|
|
109
|
-
font-weight: ${
|
|
110
|
-
letter-spacing: ${
|
|
111
|
-
line-height: ${
|
|
112
|
-
text-transform: ${
|
|
121
|
+
font-family: ${nt};
|
|
122
|
+
font-size: ${st};
|
|
123
|
+
font-weight: ${rt};
|
|
124
|
+
letter-spacing: ${lt};
|
|
125
|
+
line-height: ${at};
|
|
126
|
+
text-transform: ${pt};
|
|
113
127
|
}
|
|
114
|
-
`,
|
|
128
|
+
`,ri=e.css`
|
|
115
129
|
.ft-typography--title-dense {
|
|
116
|
-
font-family: ${
|
|
117
|
-
font-size: ${
|
|
118
|
-
font-weight: ${
|
|
119
|
-
letter-spacing: ${
|
|
120
|
-
line-height: ${
|
|
121
|
-
text-transform: ${
|
|
130
|
+
font-family: ${ht};
|
|
131
|
+
font-size: ${ft};
|
|
132
|
+
font-weight: ${dt};
|
|
133
|
+
letter-spacing: ${ct};
|
|
134
|
+
line-height: ${ut};
|
|
135
|
+
text-transform: ${xt};
|
|
122
136
|
}
|
|
123
|
-
`,
|
|
137
|
+
`,li=e.css`
|
|
124
138
|
.ft-typography--subtitle1 {
|
|
125
|
-
font-family: ${
|
|
126
|
-
font-size: ${
|
|
127
|
-
font-weight: ${
|
|
128
|
-
letter-spacing: ${
|
|
129
|
-
line-height: ${
|
|
130
|
-
text-transform: ${
|
|
139
|
+
font-family: ${gt};
|
|
140
|
+
font-size: ${yt};
|
|
141
|
+
font-weight: ${bt};
|
|
142
|
+
letter-spacing: ${vt};
|
|
143
|
+
line-height: ${mt};
|
|
144
|
+
text-transform: ${$t};
|
|
131
145
|
}
|
|
132
|
-
`,
|
|
146
|
+
`,ai=e.css`
|
|
133
147
|
.ft-typography--subtitle2 {
|
|
134
|
-
font-family: ${
|
|
135
|
-
font-size: ${
|
|
136
|
-
font-weight: ${
|
|
137
|
-
letter-spacing: ${
|
|
138
|
-
line-height: ${
|
|
139
|
-
text-transform: ${
|
|
148
|
+
font-family: ${wt};
|
|
149
|
+
font-size: ${kt};
|
|
150
|
+
font-weight: ${zt};
|
|
151
|
+
letter-spacing: ${St};
|
|
152
|
+
line-height: ${Ct};
|
|
153
|
+
text-transform: ${Ot};
|
|
140
154
|
}
|
|
141
155
|
|
|
142
|
-
`,
|
|
156
|
+
`,pi=e.css`
|
|
143
157
|
.ft-typography--body1 {
|
|
144
|
-
font-family: ${
|
|
145
|
-
font-size: ${
|
|
146
|
-
font-weight: ${
|
|
147
|
-
letter-spacing: ${
|
|
148
|
-
line-height: ${
|
|
149
|
-
text-transform: ${
|
|
158
|
+
font-family: ${jt};
|
|
159
|
+
font-size: ${Nt};
|
|
160
|
+
font-weight: ${At};
|
|
161
|
+
letter-spacing: ${It};
|
|
162
|
+
line-height: ${Tt};
|
|
163
|
+
text-transform: ${Bt};
|
|
150
164
|
}
|
|
151
|
-
`,
|
|
165
|
+
`,hi=e.css`
|
|
152
166
|
.ft-typography--body2 {
|
|
153
|
-
font-family: ${
|
|
154
|
-
font-size: ${
|
|
155
|
-
font-weight: ${
|
|
156
|
-
letter-spacing: ${
|
|
157
|
-
line-height: ${
|
|
158
|
-
text-transform: ${
|
|
167
|
+
font-family: ${Ft};
|
|
168
|
+
font-size: ${Et};
|
|
169
|
+
font-weight: ${_t};
|
|
170
|
+
letter-spacing: ${Mt};
|
|
171
|
+
line-height: ${Ut};
|
|
172
|
+
text-transform: ${Rt};
|
|
159
173
|
}
|
|
160
|
-
`,
|
|
174
|
+
`,fi=e.css`
|
|
161
175
|
.ft-typography--caption {
|
|
162
|
-
font-family: ${
|
|
163
|
-
font-size: ${
|
|
164
|
-
font-weight: ${
|
|
165
|
-
letter-spacing: ${
|
|
166
|
-
line-height: ${
|
|
167
|
-
text-transform: ${
|
|
176
|
+
font-family: ${Zt};
|
|
177
|
+
font-size: ${Dt};
|
|
178
|
+
font-weight: ${Wt};
|
|
179
|
+
letter-spacing: ${Ht};
|
|
180
|
+
line-height: ${Gt};
|
|
181
|
+
text-transform: ${Kt};
|
|
168
182
|
}
|
|
169
|
-
`,
|
|
183
|
+
`,di=e.css`
|
|
170
184
|
.ft-typography--breadcrumb {
|
|
171
|
-
font-family: ${
|
|
172
|
-
font-size: ${
|
|
173
|
-
font-weight: ${
|
|
174
|
-
letter-spacing: ${
|
|
175
|
-
line-height: ${
|
|
176
|
-
text-transform: ${
|
|
185
|
+
font-family: ${Lt};
|
|
186
|
+
font-size: ${qt};
|
|
187
|
+
font-weight: ${Pt};
|
|
188
|
+
letter-spacing: ${Xt};
|
|
189
|
+
line-height: ${Yt};
|
|
190
|
+
text-transform: ${Jt};
|
|
177
191
|
}
|
|
178
|
-
`,
|
|
192
|
+
`,ci=e.css`
|
|
179
193
|
.ft-typography--overline {
|
|
180
|
-
font-family: ${
|
|
181
|
-
font-size: ${
|
|
182
|
-
font-weight: ${
|
|
183
|
-
letter-spacing: ${
|
|
184
|
-
line-height: ${
|
|
185
|
-
text-transform: ${
|
|
194
|
+
font-family: ${Qt};
|
|
195
|
+
font-size: ${Vt};
|
|
196
|
+
font-weight: ${ti};
|
|
197
|
+
letter-spacing: ${ii};
|
|
198
|
+
line-height: ${ei};
|
|
199
|
+
text-transform: ${oi};
|
|
186
200
|
}
|
|
187
|
-
`,
|
|
201
|
+
`,ui=e.css`
|
|
188
202
|
.ft-typography--button {
|
|
189
|
-
font-family: ${
|
|
190
|
-
font-size: ${
|
|
191
|
-
font-weight: ${
|
|
192
|
-
letter-spacing: ${
|
|
193
|
-
line-height: ${
|
|
194
|
-
text-transform: ${
|
|
203
|
+
font-family: ${ni.fontFamily};
|
|
204
|
+
font-size: ${ni.fontSize};
|
|
205
|
+
font-weight: ${ni.fontWeight};
|
|
206
|
+
letter-spacing: ${ni.letterSpacing};
|
|
207
|
+
line-height: ${ni.lineHeight};
|
|
208
|
+
text-transform: ${ni.textTransform};
|
|
195
209
|
}
|
|
196
|
-
`;class
|
|
197
|
-
<${
|
|
210
|
+
`;class xi extends i.FtLitElement{constructor(){super(...arguments),this.variant=V.body1}render(){return this.element?Q`
|
|
211
|
+
<${Y(this.element)}
|
|
198
212
|
class="ft-typography ft-typography--${this.variant}">
|
|
199
213
|
<slot></slot>
|
|
200
|
-
</${
|
|
201
|
-
`:
|
|
214
|
+
</${Y(this.element)}>
|
|
215
|
+
`:Q`
|
|
202
216
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
203
|
-
`}}
|
|
217
|
+
`}}xi.styles=[si,ri,li,ai,pi,hi,fi,di,ci,ui,e.css`
|
|
204
218
|
.ft-typography {
|
|
205
219
|
vertical-align: inherit;
|
|
206
220
|
}
|
|
207
|
-
`],
|
|
221
|
+
`],tt([o.property()],xi.prototype,"element",void 0),tt([o.property()],xi.prototype,"variant",void 0),i.customElement("ft-typography")(xi);var gi=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 yi=i.FtCssVariable.create("--ft-tooltip-distance","SIZE","4px"),bi=i.FtCssVariable.create("--ft-tooltip-color","COLOR","#FFFFFF"),vi=i.FtCssVariable.create("--ft-tooltip-background-color","COLOR","#666666"),mi=i.FtCssVariable.create("--ft-tooltip-z-index","NUMBER","1"),$i=i.FtCssVariable.external(i.designSystemVariables.borderRadiusS,"Design system");class wi 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`
|
|
208
222
|
<div part="container"
|
|
209
223
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
210
224
|
@mouseenter=${this.onHover}
|
|
@@ -219,7 +233,7 @@ const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
219
233
|
</div>
|
|
220
234
|
<slot></slot>
|
|
221
235
|
</div>
|
|
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())}}
|
|
236
|
+
`}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())}}wi.elementDefinitions={"ft-typography":xi},wi.styles=e.css`
|
|
223
237
|
.ft-tooltip--container {
|
|
224
238
|
display: block;
|
|
225
239
|
position: relative;
|
|
@@ -237,21 +251,21 @@ const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
237
251
|
width: max-content;
|
|
238
252
|
max-width: 150px;
|
|
239
253
|
text-align: center;
|
|
240
|
-
padding: ${
|
|
241
|
-
z-index: ${
|
|
254
|
+
padding: ${yi};
|
|
255
|
+
z-index: ${mi};
|
|
242
256
|
}
|
|
243
257
|
|
|
244
258
|
.ft-tooltip--content {
|
|
245
259
|
padding: 4px 8px;
|
|
246
|
-
border-radius: ${
|
|
247
|
-
background-color: ${
|
|
248
|
-
color: ${
|
|
260
|
+
border-radius: ${$i};
|
|
261
|
+
background-color: ${vi};
|
|
262
|
+
color: ${bi};
|
|
249
263
|
top: -500px;
|
|
250
264
|
left: -500px;
|
|
251
265
|
position: relative;
|
|
252
266
|
word-break: break-word;
|
|
253
267
|
}
|
|
254
|
-
`,
|
|
268
|
+
`,gi([o.property()],wi.prototype,"text",void 0),gi([o.property({type:Boolean})],wi.prototype,"manual",void 0),gi([o.property({type:Boolean})],wi.prototype,"inline",void 0),gi([o.property({type:Number})],wi.prototype,"delay",void 0),gi([o.property()],wi.prototype,"position",void 0),gi([o.queryAssignedNodes("",!0)],wi.prototype,"slotNodes",void 0),gi([o.query(".ft-tooltip--container")],wi.prototype,"container",void 0),gi([o.query("slot")],wi.prototype,"target",void 0),gi([o.query(".ft-tooltip")],wi.prototype,"tooltip",void 0),gi([o.query(".ft-tooltip--content")],wi.prototype,"tooltipContent",void 0),gi([o.state()],wi.prototype,"visible",void 0),i.customElement("ft-tooltip")(wi);const ki={color:i.FtCssVariable.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariable.create("--ft-loader-size","SIZE","80px")};class zi extends i.FtLitElement{static get styles(){return e.css`
|
|
255
269
|
:host {
|
|
256
270
|
line-height: 0;
|
|
257
271
|
}
|
|
@@ -260,8 +274,8 @@ const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
260
274
|
display: inline-block;
|
|
261
275
|
position: relative;
|
|
262
276
|
|
|
263
|
-
width: ${
|
|
264
|
-
height: ${
|
|
277
|
+
width: ${ki.size};
|
|
278
|
+
height: ${ki.size};
|
|
265
279
|
}
|
|
266
280
|
|
|
267
281
|
.ft-loader div {
|
|
@@ -270,7 +284,7 @@ const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
270
284
|
width: 25%;
|
|
271
285
|
height: 25%;
|
|
272
286
|
border-radius: 50%;
|
|
273
|
-
background: ${
|
|
287
|
+
background: ${ki.color};
|
|
274
288
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
275
289
|
}
|
|
276
290
|
|
|
@@ -317,7 +331,7 @@ const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
317
331
|
transform: translate(0, 0);
|
|
318
332
|
}
|
|
319
333
|
100% {
|
|
320
|
-
transform: translate(calc(0.35 * ${
|
|
334
|
+
transform: translate(calc(0.35 * ${ki.size}), 0);
|
|
321
335
|
}
|
|
322
336
|
}
|
|
323
337
|
`}render(){return e.html`
|
|
@@ -327,21 +341,21 @@ const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
327
341
|
<div></div>
|
|
328
342
|
<div></div>
|
|
329
343
|
</div>
|
|
330
|
-
`}}var
|
|
344
|
+
`}}var Si,Ci;i.customElement("ft-loader")(zi),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=""}(Si||(Si={})),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=""}(Ci||(Ci={})),new Map([...["abw"].map((t=>[t,Ci.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,Ci.AUDIO])),...["avi"].map((t=>[t,Ci.AVI])),...["chm","xhs"].map((t=>[t,Ci.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,Ci.CODE])),...["csv"].map((t=>[t,Ci.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ci.DITA])),...["epub"].map((t=>[t,Ci.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ci.EXCEL])),...["flac"].map((t=>[t,Ci.FLAC])),...["gif"].map((t=>[t,Ci.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ci.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ci.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,Ci.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ci.JPEG])),...["json"].map((t=>[t,Ci.JSON])),...["m4a","m4p"].map((t=>[t,Ci.M4A])),...["mov","qt"].map((t=>[t,Ci.MOV])),...["mp3"].map((t=>[t,Ci.MP3])),...["mp4","m4v"].map((t=>[t,Ci.MP4])),...["ogg","oga"].map((t=>[t,Ci.OGG])),...["pdf","ps"].map((t=>[t,Ci.PDF])),...["png"].map((t=>[t,Ci.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ci.POWERPOINT])),...["rar"].map((t=>[t,Ci.RAR])),...["stp"].map((t=>[t,Ci.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ci.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,Ci.VIDEO])),...["wav"].map((t=>[t,Ci.WAV])),...["wma"].map((t=>[t,Ci.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ci.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ci.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ci.YAML])),...["zip"].map((t=>[t,Ci.ZIP]))]);var Oi,ji=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"}(Oi||(Oi={}));const Ni={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 Ai extends i.FtLitElement{constructor(){super(...arguments),this.variant=Oi.fluid_topics}render(){return e.html`
|
|
331
345
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
332
346
|
${s.unsafeHTML(this.getIcon())}
|
|
333
347
|
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
334
348
|
</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===
|
|
349
|
+
`}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===Oi.file_format?null!==(t=Ci[o.toUpperCase()])&&void 0!==t?t:o:this.variant===Oi.fluid_topics?null!==(i=Si[o.toUpperCase()])&&void 0!==i?i:o:e.nothing}}Ai.elementDefinitions={},Ai.styles=e.css`
|
|
336
350
|
:host, i.ft-icon {
|
|
337
351
|
display: inline-block;
|
|
338
|
-
width: ${
|
|
339
|
-
height: ${
|
|
352
|
+
width: ${Ni.size};
|
|
353
|
+
height: ${Ni.size};
|
|
340
354
|
text-align: center;
|
|
341
355
|
}
|
|
342
356
|
|
|
343
357
|
i.ft-icon {
|
|
344
|
-
font-size: ${
|
|
358
|
+
font-size: ${Ni.size};
|
|
345
359
|
line-height: 1;
|
|
346
360
|
font-weight: normal;
|
|
347
361
|
text-transform: none;
|
|
@@ -355,17 +369,17 @@ const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
355
369
|
}
|
|
356
370
|
|
|
357
371
|
.ft-icon--fluid-topics {
|
|
358
|
-
font-family: ${
|
|
372
|
+
font-family: ${Ni.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
359
373
|
}
|
|
360
374
|
|
|
361
375
|
.ft-icon--file-format {
|
|
362
|
-
font-family: ${
|
|
376
|
+
font-family: ${Ni.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
363
377
|
}
|
|
364
378
|
|
|
365
379
|
.ft-icon--material {
|
|
366
|
-
font-family: ${
|
|
380
|
+
font-family: ${Ni.materialFontFamily}, "Material Icons", sans-serif;
|
|
367
381
|
}
|
|
368
|
-
|
|
382
|
+
`,ji([o.property()],Ai.prototype,"variant",void 0),ji([o.query("slot")],Ai.prototype,"slottedContent",void 0),i.customElement("ft-icon")(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};const Ti=i.FtCssVariable.extend("--ft-button-color",i.designSystemVariables.colorPrimary),Bi={backgroundColor:i.FtCssVariable.extend("--ft-button-background-color",i.designSystemVariables.colorSurface),borderRadius:i.FtCssVariable.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusL),color:Ti,fontSize:i.FtCssVariable.extend("--ft-button-font-size",ni.fontSize),iconSize:i.FtCssVariable.create("--ft-button-icon-size","SIZE","24px"),rippleColor:i.FtCssVariable.extend("--ft-button-ripple-color",Ti),opacityDisabled:i.FtCssVariable.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Fi=i.FtCssVariable.extend("--ft-button-primary-color",i.FtCssVariable.extend("--ft-button-color",i.designSystemVariables.colorOnPrimary)),Ei={backgroundColor:i.FtCssVariable.extend("--ft-button-primary-background-color",i.FtCssVariable.extend("--ft-button-background-color",i.designSystemVariables.colorPrimary)),color:Fi,rippleColor:i.FtCssVariable.extend("--ft-button-primary-ripple-color",Fi)},_i=i.FtCssVariable.extend("--ft-button-dense-border-radius",i.FtCssVariable.extend("--ft-button-border-radius",i.designSystemVariables.borderRadiusM));class Mi 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`
|
|
369
383
|
:host {
|
|
370
384
|
display: inline-block;
|
|
371
385
|
max-width: 100%;
|
|
@@ -404,18 +418,18 @@ const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
404
418
|
border: none;
|
|
405
419
|
pointer-events: auto;
|
|
406
420
|
|
|
407
|
-
--ft-button-internal-font-size: ${
|
|
421
|
+
--ft-button-internal-font-size: ${Bi.fontSize};
|
|
408
422
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|
|
409
|
-
--ft-button-internal-color: ${
|
|
410
|
-
${i.setVariable(
|
|
423
|
+
--ft-button-internal-color: ${Bi.color};
|
|
424
|
+
${i.setVariable(Ni.size,Bi.iconSize)};
|
|
411
425
|
--ft-button-internal-vertical-padding: 6px;
|
|
412
426
|
--ft-button-internal-horizontal-padding: 8px;
|
|
413
|
-
${i.setVariable(
|
|
414
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
427
|
+
${i.setVariable(a.color,Bi.rippleColor)};
|
|
428
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${Bi.iconSize});
|
|
415
429
|
|
|
416
|
-
border-radius: ${
|
|
430
|
+
border-radius: ${Bi.borderRadius};
|
|
417
431
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
418
|
-
background-color: ${
|
|
432
|
+
background-color: ${Bi.backgroundColor};
|
|
419
433
|
color: var(--ft-button-internal-color);
|
|
420
434
|
-webkit-mask-image: radial-gradient(white, black);
|
|
421
435
|
}
|
|
@@ -427,7 +441,7 @@ const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
427
441
|
.ft-button--dense {
|
|
428
442
|
--ft-button-internal-vertical-padding: 2px;
|
|
429
443
|
--ft-button-internal-horizontal-padding: 4px;
|
|
430
|
-
border-radius: ${
|
|
444
|
+
border-radius: ${_i};
|
|
431
445
|
}
|
|
432
446
|
|
|
433
447
|
.ft-button--round {
|
|
@@ -436,13 +450,13 @@ const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
436
450
|
|
|
437
451
|
.ft-button[disabled] {
|
|
438
452
|
filter: grayscale(1);
|
|
439
|
-
opacity: ${
|
|
453
|
+
opacity: ${Bi.opacityDisabled};
|
|
440
454
|
}
|
|
441
455
|
|
|
442
456
|
.ft-button.ft-button--primary {
|
|
443
|
-
background-color: ${
|
|
444
|
-
--ft-button-internal-color: ${
|
|
445
|
-
${i.setVariable(
|
|
457
|
+
background-color: ${Ei.backgroundColor};
|
|
458
|
+
--ft-button-internal-color: ${Ei.color};
|
|
459
|
+
${i.setVariable(a.color,Ei.rippleColor)};
|
|
446
460
|
}
|
|
447
461
|
|
|
448
462
|
.ft-button.ft-button--outlined {
|
|
@@ -455,13 +469,14 @@ const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
455
469
|
}
|
|
456
470
|
|
|
457
471
|
.ft-button--label {
|
|
472
|
+
position: relative;
|
|
458
473
|
overflow: hidden;
|
|
459
474
|
white-space: nowrap;
|
|
460
475
|
text-overflow: ellipsis;
|
|
461
476
|
display: block;
|
|
462
477
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
463
|
-
${i.setVariable(
|
|
464
|
-
${i.setVariable(
|
|
478
|
+
${i.setVariable(ni.fontSize,"var(--ft-button-internal-font-size)")};
|
|
479
|
+
${i.setVariable(ni.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
465
480
|
}
|
|
466
481
|
|
|
467
482
|
.ft-button--safari-fix .ft-button--label {
|
|
@@ -480,6 +495,7 @@ const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
480
495
|
|
|
481
496
|
ft-icon {
|
|
482
497
|
flex-shrink: 0;
|
|
498
|
+
position: relative;
|
|
483
499
|
}
|
|
484
500
|
|
|
485
501
|
.ft-button--label[hidden] + ft-icon {
|
|
@@ -493,8 +509,8 @@ const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
493
509
|
}
|
|
494
510
|
|
|
495
511
|
ft-loader {
|
|
496
|
-
${i.setVariable(
|
|
497
|
-
${i.setVariable(
|
|
512
|
+
${i.setVariable(ki.size,Bi.iconSize)};
|
|
513
|
+
${i.setVariable(ki.color,"var(--ft-button-internal-color)")};
|
|
498
514
|
}
|
|
499
515
|
`]}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`
|
|
500
516
|
<button part="button"
|
|
@@ -518,7 +534,7 @@ const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
518
534
|
</ft-tooltip>
|
|
519
535
|
`}resolveIcon(){return this.loading?e.html`
|
|
520
536
|
<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}}
|
|
537
|
+
<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}}Mi.elementDefinitions={"ft-ripple":x,"ft-tooltip":wi,"ft-typography":xi,"ft-icon":Ai,"ft-loader":zi},Ii([o.property({type:Boolean})],Mi.prototype,"primary",void 0),Ii([o.property({type:Boolean})],Mi.prototype,"outlined",void 0),Ii([o.property({type:Boolean})],Mi.prototype,"disabled",void 0),Ii([o.property({type:Boolean})],Mi.prototype,"dense",void 0),Ii([o.property({type:Boolean})],Mi.prototype,"round",void 0),Ii([o.property({type:String})],Mi.prototype,"label",void 0),Ii([o.property({type:String})],Mi.prototype,"icon",void 0),Ii([o.property({type:Boolean})],Mi.prototype,"trailingIcon",void 0),Ii([o.property({type:Boolean})],Mi.prototype,"loading",void 0),Ii([o.property({type:String})],Mi.prototype,"tooltipPosition",void 0),Ii([o.query(".ft-button")],Mi.prototype,"button",void 0),Ii([o.query(".ft-button--label slot")],Mi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Mi);var Ui=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 Ri extends CustomEvent{constructor(t){super("change",{detail:{file:t}})}}class Zi 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`
|
|
522
538
|
.ft-file-button {
|
|
523
539
|
}
|
|
524
540
|
`}render(){return e.html`
|
|
@@ -536,4 +552,4 @@ const H=t=>({_$litStatic$:t}),G=new Map,K=(t=>(i,...e)=>{var o;const n=e.length;
|
|
|
536
552
|
@change=${this.onFileChange}
|
|
537
553
|
hidden/>
|
|
538
554
|
</div>
|
|
539
|
-
`}onFileChange(){var t;(null===(t=this.input.files)||void 0===t?void 0:t.length)>0&&this.dispatchEvent(new
|
|
555
|
+
`}onFileChange(){var t;(null===(t=this.input.files)||void 0===t?void 0:t.length)>0&&this.dispatchEvent(new Ri(this.input.files.item(0)))}focus(){this.button.focus()}clear(){this.input.value=""}}Zi.elementDefinitions={"ft-button":Mi},Ui([o.property({type:Boolean})],Zi.prototype,"disabled",void 0),Ui([o.property({type:String})],Zi.prototype,"label",void 0),Ui([o.property({type:String})],Zi.prototype,"icon",void 0),Ui([o.property({type:Boolean})],Zi.prototype,"trailingIcon",void 0),Ui([o.property({type:String})],Zi.prototype,"accept",void 0),Ui([o.query(".ft-file-button--input")],Zi.prototype,"input",void 0),Ui([o.query("ft-button")],Zi.prototype,"button",void 0),i.customElement("ft-file-button")(Zi),t.FileChangeEvent=Ri,t.FtFileButton=Zi,t.FtFileButtonCssVariables={},Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|