@fluid-topics/ft-file-button 0.3.54 → 0.3.56
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.light.js +6 -16
- package/build/ft-file-button.min.js +157 -156
- package/package.json +4 -4
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
opacity: ${l.opacityContentOnSurfacePressed};
|
|
88
88
|
transform: translate(-50%, -50%) scale(1);
|
|
89
89
|
}
|
|
90
|
-
`;var x,g=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 y 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`
|
|
90
|
+
`;var x,g=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 y 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.setupDebouncer=new i.Debouncer(10),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`
|
|
91
91
|
<style>
|
|
92
92
|
.ft-ripple .ft-ripple--effect,
|
|
93
93
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
<div class="ft-ripple--background"></div>
|
|
105
105
|
<div class="ft-ripple--effect"></div>
|
|
106
106
|
</div>
|
|
107
|
-
`}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()}}y.elementDefinitions={},y.styles=u,g([o.property({type:Boolean})],y.prototype,"primary",void 0),g([o.property({type:Boolean})],y.prototype,"secondary",void 0),g([o.property({type:Boolean})],y.prototype,"unbounded",void 0),g([o.property({type:Boolean})],y.prototype,"activated",void 0),g([o.property({type:Boolean})],y.prototype,"selected",void 0),g([o.property({type:Boolean})],y.prototype,"disabled",void 0),g([o.state()],y.prototype,"hovered",void 0),g([o.state()],y.prototype,"focused",void 0),g([o.state()],y.prototype,"pressed",void 0),g([o.state()],y.prototype,"rippling",void 0),g([o.state()],y.prototype,"rippleSize",void 0),g([o.state()],y.prototype,"originX",void 0),g([o.state()],y.prototype,"originY",void 0),g([o.query(".ft-ripple")],y.prototype,"ripple",void 0),g([o.query(".ft-ripple--effect")],y.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(y);const b=window,v=b.trustedTypes,m=v?v.createPolicy("lit-html",{createHTML:t=>t}):void 0,$=`lit$${(Math.random()+"").slice(9)}$`,w="?"+$,k=`<${w}>`,z=document,S=(t="")=>z.createComment(t),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,C=/-->/g,B=/>/g,I=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),A=/'/g,E=/"/g,T=/^(?:script|style|textarea|title)$/i,F=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),_=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),U=new WeakMap,R=z.createTreeWalker(z,129,null,!1),W=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=N;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===N?"!--"===a[1]?r=C:void 0!==a[1]?r=B:void 0!==a[2]?(T.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=I):void 0!==a[3]&&(r=I):r===I?">"===a[0]?(r=null!=n?n:N,p=-1):void 0===a[1]?p=-2:(p=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?I:'"'===a[3]?E:A):r===E||r===A?r=I:r===C||r===B?r=N:(r=I,n=void 0);const f=r===I&&t[i+1].startsWith("/>")?" ":"";s+=r===N?e+k:p>=0?(o.push(l),e.slice(0,p)+"$lit$"+e.slice(p)+$+f):e+$+(-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!==m?m.createHTML(l):l,o]};class Z{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]=W(t,i);if(this.el=Z.createElement(a,e),R.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=R.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($)){const e=p[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split($),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?L:"?"===i[1]?q:"@"===i[1]?V:G})}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($),i=t.length-1;if(i>0){o.textContent=v?v.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],S()),R.nextNode(),l.push({type:2,index:++n});o.append(t[i],S())}}}else if(8===o.nodeType)if(o.data===w)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf($,t+1));)l.push({type:7,index:n}),t+=$.length-1}n++}}static createElement(t,i){const e=z.createElement("template");return e.innerHTML=t,e}}function D(t,i,e=t,o){var n,s,r,l;if(i===_)return i;let a=void 0!==o?null===(n=e._$Co)||void 0===n?void 0:n[o]:e._$Cl;const p=O(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)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:e._$Cl=a),void 0!==a&&(i=D(t,a._$AS(t,i.values),a,o)),i}class H{constructor(t,i){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:z).importNode(e,!0);R.currentNode=n;let s=R.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new K(s,s.nextSibling,this,t):1===a.type?i=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(i=new X(s,this,t)),this.u.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(s=R.nextNode(),r++)}return n}p(t){let i=0;for(const e of this.u)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class K{constructor(t,i,e,o){var n;this.type=2,this._$AH=M,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cm=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._$Cm}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=D(this,t,i),O(t)?t===M||null==t||""===t?(this._$AH!==M&&this._$AR(),this._$AH=M):t!==this._$AH&&t!==_&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>j(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==M&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Z.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.p(e);else{const t=new H(n,this),i=t.v(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let i=U.get(t.strings);return void 0===i&&U.set(t.strings,i=new Z(t)),i}k(t){j(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 K(this.O(S()),this.O(S()),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._$Cm=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class G{constructor(t,i,e,o,n){this.type=1,this._$AH=M,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=M}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=D(this,t,i,0),s=!O(t)||t!==this._$AH&&t!==_,s&&(this._$AH=t);else{const o=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=D(this,o[e+r],i,r),l===_&&(l=this._$AH[r]),s||(s=!O(l)||l!==this._$AH[r]),l===M?t=M:t!==M&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.j(t)}j(t){t===M?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class L extends G{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===M?void 0:t}}const P=v?v.emptyScript:"";class q extends G{constructor(){super(...arguments),this.type=4}j(t){t&&t!==M?this.element.setAttribute(this.name,P):this.element.removeAttribute(this.name)}}class V extends G{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=D(this,t,i,0))&&void 0!==e?e:M)===_)return;const o=this._$AH,n=t===M&&o!==M||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==M&&(o===M||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 X{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){D(this,t)}}const Y=b.litHtmlPolyfillSupport;null==Y||Y(Z,K),(null!==(x=b.litHtmlVersions)&&void 0!==x?x:b.litHtmlVersions=[]).push("2.4.0");
|
|
107
|
+
`}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(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;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,this.target=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()}}y.elementDefinitions={},y.styles=u,g([o.property({type:Boolean})],y.prototype,"primary",void 0),g([o.property({type:Boolean})],y.prototype,"secondary",void 0),g([o.property({type:Boolean})],y.prototype,"unbounded",void 0),g([o.property({type:Boolean})],y.prototype,"activated",void 0),g([o.property({type:Boolean})],y.prototype,"selected",void 0),g([o.property({type:Boolean})],y.prototype,"disabled",void 0),g([o.state()],y.prototype,"hovered",void 0),g([o.state()],y.prototype,"focused",void 0),g([o.state()],y.prototype,"pressed",void 0),g([o.state()],y.prototype,"rippling",void 0),g([o.state()],y.prototype,"rippleSize",void 0),g([o.state()],y.prototype,"originX",void 0),g([o.state()],y.prototype,"originY",void 0),g([o.query(".ft-ripple")],y.prototype,"ripple",void 0),g([o.query(".ft-ripple--effect")],y.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(y);const b=window,v=b.trustedTypes,m=v?v.createPolicy("lit-html",{createHTML:t=>t}):void 0,$=`lit$${(Math.random()+"").slice(9)}$`,w="?"+$,k=`<${w}>`,z=document,S=(t="")=>z.createComment(t),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,C=/-->/g,B=/>/g,I=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),A=/'/g,E=/"/g,T=/^(?:script|style|textarea|title)$/i,F=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),_=Symbol.for("lit-noChange"),M=Symbol.for("lit-nothing"),U=new WeakMap,R=z.createTreeWalker(z,129,null,!1),W=(t,i)=>{const e=t.length-1,o=[];let n,s=2===i?"<svg>":"",r=N;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===N?"!--"===a[1]?r=C:void 0!==a[1]?r=B:void 0!==a[2]?(T.test(a[2])&&(n=RegExp("</"+a[2],"g")),r=I):void 0!==a[3]&&(r=I):r===I?">"===a[0]?(r=null!=n?n:N,p=-1):void 0===a[1]?p=-2:(p=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?I:'"'===a[3]?E:A):r===E||r===A?r=I:r===C||r===B?r=N:(r=I,n=void 0);const f=r===I&&t[i+1].startsWith("/>")?" ":"";s+=r===N?e+k:p>=0?(o.push(l),e.slice(0,p)+"$lit$"+e.slice(p)+$+f):e+$+(-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!==m?m.createHTML(l):l,o]};class Z{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]=W(t,i);if(this.el=Z.createElement(a,e),R.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=R.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($)){const e=p[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split($),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?L:"?"===i[1]?q:"@"===i[1]?V:G})}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($),i=t.length-1;if(i>0){o.textContent=v?v.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],S()),R.nextNode(),l.push({type:2,index:++n});o.append(t[i],S())}}}else if(8===o.nodeType)if(o.data===w)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf($,t+1));)l.push({type:7,index:n}),t+=$.length-1}n++}}static createElement(t,i){const e=z.createElement("template");return e.innerHTML=t,e}}function D(t,i,e=t,o){var n,s,r,l;if(i===_)return i;let a=void 0!==o?null===(n=e._$Co)||void 0===n?void 0:n[o]:e._$Cl;const p=O(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)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:e._$Cl=a),void 0!==a&&(i=D(t,a._$AS(t,i.values),a,o)),i}class H{constructor(t,i){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:z).importNode(e,!0);R.currentNode=n;let s=R.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new K(s,s.nextSibling,this,t):1===a.type?i=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(i=new X(s,this,t)),this.u.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(s=R.nextNode(),r++)}return n}p(t){let i=0;for(const e of this.u)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class K{constructor(t,i,e,o){var n;this.type=2,this._$AH=M,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cm=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._$Cm}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=D(this,t,i),O(t)?t===M||null==t||""===t?(this._$AH!==M&&this._$AR(),this._$AH=M):t!==this._$AH&&t!==_&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>j(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==M&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(z.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=Z.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.p(e);else{const t=new H(n,this),i=t.v(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let i=U.get(t.strings);return void 0===i&&U.set(t.strings,i=new Z(t)),i}k(t){j(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 K(this.O(S()),this.O(S()),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._$Cm=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class G{constructor(t,i,e,o,n){this.type=1,this._$AH=M,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=M}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=D(this,t,i,0),s=!O(t)||t!==this._$AH&&t!==_,s&&(this._$AH=t);else{const o=t;let r,l;for(t=n[0],r=0;r<n.length-1;r++)l=D(this,o[e+r],i,r),l===_&&(l=this._$AH[r]),s||(s=!O(l)||l!==this._$AH[r]),l===M?t=M:t!==M&&(t+=(null!=l?l:"")+n[r+1]),this._$AH[r]=l}s&&!o&&this.j(t)}j(t){t===M?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class L extends G{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===M?void 0:t}}const P=v?v.emptyScript:"";class q extends G{constructor(){super(...arguments),this.type=4}j(t){t&&t!==M?this.element.setAttribute(this.name,P):this.element.removeAttribute(this.name)}}class V extends G{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=D(this,t,i,0))&&void 0!==e?e:M)===_)return;const o=this._$AH,n=t===M&&o!==M||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==M&&(o===M||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 X{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){D(this,t)}}const Y=b.litHtmlPolyfillSupport;null==Y||Y(Z,K),(null!==(x=b.litHtmlVersions)&&void 0!==x?x:b.litHtmlVersions=[]).push("2.4.0");
|
|
108
108
|
/**
|
|
109
109
|
* @license
|
|
110
110
|
* Copyright 2020 Google LLC
|
|
@@ -489,17 +489,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
489
489
|
${i.setVariable(li.fontSize,"1em")};
|
|
490
490
|
${i.setVariable(li.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
491
491
|
}
|
|
492
|
-
|
|
493
|
-
.ft-button--safari-fix .ft-button--label {
|
|
494
|
-
margin-right: 0;
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
.ft-button--safari-fix .ft-button--label:after {
|
|
498
|
-
content: "\\0000a0";
|
|
499
|
-
display: inline-block;
|
|
500
|
-
width: 0;
|
|
501
|
-
}
|
|
502
|
-
|
|
492
|
+
|
|
503
493
|
.ft-button--label[hidden] {
|
|
504
494
|
display: none;
|
|
505
495
|
}
|
|
@@ -523,7 +513,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
523
513
|
${i.setVariable(Bi.size,Zi.iconSize)};
|
|
524
514
|
${i.setVariable(Bi.color,"var(--ft-button-internal-color)")};
|
|
525
515
|
}
|
|
526
|
-
`];var Li=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 Pi 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.iconVariant=Mi.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}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-
|
|
516
|
+
`];var Li=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 Pi 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.iconVariant=Mi.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}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-no-text-select":!0};return this.addTooltipIfNeeded(e.html`
|
|
527
517
|
<button part="button"
|
|
528
518
|
class="${n.classMap(t)}"
|
|
529
519
|
aria-label="${this.getLabel()}"
|
|
@@ -532,7 +522,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
532
522
|
<ft-typography part="label"
|
|
533
523
|
variant="button"
|
|
534
524
|
element="span"
|
|
535
|
-
class="ft-button--label"
|
|
525
|
+
class="ft-button--label ${i.isSafari?"ft-safari-ellipsis-fix":""}"
|
|
536
526
|
?hidden=${!this.hasTextContent()}>
|
|
537
527
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
538
528
|
</ft-typography>
|
|
@@ -546,7 +536,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
546
536
|
</ft-tooltip>
|
|
547
537
|
`:t}resolveIcon(){return this.loading?e.html`
|
|
548
538
|
<ft-loader></ft-loader> `:this.icon?e.html`
|
|
549
|
-
<ft-icon variant="${this.iconVariant}" value="${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}}Pi.elementDefinitions={"ft-ripple":y,"ft-tooltip":Ci,"ft-typography":mi,"ft-icon":Ri,"ft-loader":Ai},Pi.styles=Gi,Li([o.property({type:Boolean})],Pi.prototype,"primary",void 0),Li([o.property({type:Boolean})],Pi.prototype,"outlined",void 0),Li([o.property({type:Boolean})],Pi.prototype,"disabled",void 0),Li([o.property({type:Boolean})],Pi.prototype,"dense",void 0),Li([o.property({type:Boolean})],Pi.prototype,"round",void 0),Li([o.property({type:String})],Pi.prototype,"label",void 0),Li([o.property({type:String})],Pi.prototype,"icon",void 0),Li([o.property({type:String})],Pi.prototype,"iconVariant",void 0),Li([o.property({type:Boolean})],Pi.prototype,"trailingIcon",void 0),Li([o.property({type:Boolean})],Pi.prototype,"loading",void 0),Li([o.property({type:String})],Pi.prototype,"tooltipPosition",void 0),Li([o.property({type:Boolean})],Pi.prototype,"hideTooltip",void 0),Li([o.property({type:Boolean})],Pi.prototype,"forceTooltip",void 0),Li([o.query(".ft-button")],Pi.prototype,"button",void 0),Li([o.query(".ft-button--label slot")],Pi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Pi);const qi=e.css``;var Vi=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 Xi extends CustomEvent{constructor(t){super("change",{detail:{file:t}})}}class Yi extends i.FtLitElement{constructor(){super(...arguments),this.disabled=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.accept=""}render(){return e.html`
|
|
539
|
+
<ft-icon variant="${this.iconVariant}" value="${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}}Pi.elementDefinitions={"ft-ripple":y,"ft-tooltip":Ci,"ft-typography":mi,"ft-icon":Ri,"ft-loader":Ai},Pi.styles=[i.safariEllipsisFix,Gi],Li([o.property({type:Boolean})],Pi.prototype,"primary",void 0),Li([o.property({type:Boolean})],Pi.prototype,"outlined",void 0),Li([o.property({type:Boolean})],Pi.prototype,"disabled",void 0),Li([o.property({type:Boolean})],Pi.prototype,"dense",void 0),Li([o.property({type:Boolean})],Pi.prototype,"round",void 0),Li([o.property({type:String})],Pi.prototype,"label",void 0),Li([o.property({type:String})],Pi.prototype,"icon",void 0),Li([o.property({type:String})],Pi.prototype,"iconVariant",void 0),Li([o.property({type:Boolean})],Pi.prototype,"trailingIcon",void 0),Li([o.property({type:Boolean})],Pi.prototype,"loading",void 0),Li([o.property({type:String})],Pi.prototype,"tooltipPosition",void 0),Li([o.property({type:Boolean})],Pi.prototype,"hideTooltip",void 0),Li([o.property({type:Boolean})],Pi.prototype,"forceTooltip",void 0),Li([o.query(".ft-button")],Pi.prototype,"button",void 0),Li([o.query(".ft-button--label slot")],Pi.prototype,"slottedContent",void 0),i.customElement("ft-button")(Pi);const qi=e.css``;var Vi=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 Xi extends CustomEvent{constructor(t){super("change",{detail:{file:t}})}}class Yi extends i.FtLitElement{constructor(){super(...arguments),this.disabled=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.accept=""}render(){return e.html`
|
|
550
540
|
<div class="ft-file-button">
|
|
551
541
|
<ft-button ?disabled=${this.disabled}
|
|
552
542
|
label="${this.label}"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @see https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry
|
|
16
16
|
*/
|
|
17
|
-
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,n=new WeakMap,s=new WeakMap,r=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=n.prototype.attributeChangedCallback,l=new Set(n.observedAttributes||[]);f(n,l,a);const h={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(n,h);let p=i.call(o,t);p||(p=c(t),e.call(o,t,p)),this===window.customElements&&(r.set(n,h),h.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)s.delete(t),u(t,h,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){y.push(this),o.upgrade.apply(o,arguments),y.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=r.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),n.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,p=t=>{let e=t.getRootNode();if(!h(e)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},c=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=p(i)||window.customElements,n=o._getDefinition(e);return n?u(i,n):s.set(i,o),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){n.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);o.call(this,s,n),i.call(this,s,t,n)}else o.call(this,s,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o),i.call(this,o,t,null)}else n.call(this,o)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),n.set(t,e),l=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const b=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const x=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){y.push(this),i.set.call(this,t),y.pop()}})};if(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==n.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class s{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),n=e.get(o)||[];this[+i]=t,n.push(t),e.set(o,n)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new s(e)}})}}try{window.customElements.define("custom-element",null)}catch(
|
|
17
|
+
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,e=window.customElements.define,i=window.customElements.get,o=window.customElements,n=new WeakMap,s=new WeakMap,r=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,n){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(n))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=n.prototype.attributeChangedCallback,l=new Set(n.observedAttributes||[]);f(n,l,a);const h={elementClass:n,connectedCallback:n.prototype.connectedCallback,disconnectedCallback:n.prototype.disconnectedCallback,adoptedCallback:n.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:n.formAssociated,formAssociatedCallback:n.prototype.formAssociatedCallback,formDisabledCallback:n.prototype.formDisabledCallback,formResetCallback:n.prototype.formResetCallback,formStateRestoreCallback:n.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,h),this._definitionsByClass.set(n,h);let p=i.call(o,t);p||(p=c(t),e.call(o,t,p)),this===window.customElements&&(r.set(n,h),h.standInClass=p);const d=this._awaitingUpgrade.get(t);if(d){this._awaitingUpgrade.delete(t);for(const t of d)s.delete(t),u(t,h,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(n),this._whenDefinedPromises.delete(t)),n}upgrade(){y.push(this),o.upgrade.apply(o,arguments),y.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const e=this._getDefinition(t);if(void 0!==e)return Promise.resolve(e.elementClass);let i=this._whenDefinedPromises.get(t);return void 0===i&&(i={},i.promise=new Promise((t=>i.resolve=t)),this._whenDefinedPromises.set(t,i)),i.promise}_upgradeWhenDefined(t,e,i){let o=this._awaitingUpgrade.get(e);o||this._awaitingUpgrade.set(e,o=new Set),i?o.add(t):o.delete(t)}},window.HTMLElement=function(){let e=l;if(e)return l=void 0,e;const i=r.get(this.constructor);if(!i)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return e=Reflect.construct(t,[],i.standInClass),Object.setPrototypeOf(e,this.constructor.prototype),n.set(e,i),e},window.HTMLElement.prototype=t.prototype;const h=t=>t===document||t instanceof ShadowRoot,p=t=>{let e=t.getRootNode();if(!h(e)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;e=t.getRootNode(),h(e)||(e=a.get(e)?.getRootNode()||document)}return e.customElements},c=e=>class{static get formAssociated(){return!0}constructor(){const i=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(i,HTMLElement.prototype);const o=p(i)||window.customElements,n=o._getDefinition(e);return n?u(i,n):s.set(i,o),i}connectedCallback(){const t=n.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!0)}disconnectedCallback(){const t=n.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):s.get(this)._upgradeWhenDefined(this,e,!1)}adoptedCallback(){n.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=n.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=n.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=n.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=n.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},f=(t,e,i)=>{if(0===e.size||void 0===i)return;const o=t.prototype.setAttribute;o&&(t.prototype.setAttribute=function(t,n){const s=t.toLowerCase();if(e.has(s)){const t=this.getAttribute(s);o.call(this,s,n),i.call(this,s,t,n)}else o.call(this,s,n)});const n=t.prototype.removeAttribute;n&&(t.prototype.removeAttribute=function(t){const o=t.toLowerCase();if(e.has(o)){const t=this.getAttribute(o);n.call(this,o),i.call(this,o,t,null)}else n.call(this,o)})},d=e=>{const i=Object.getPrototypeOf(e);if(i!==window.HTMLElement)return i===t||"HTMLElement"===i?.prototype?.constructor?.name?Object.setPrototypeOf(e,window.HTMLElement):d(i)},u=(t,e,i=!1)=>{Object.setPrototypeOf(t,e.elementClass.prototype),n.set(t,e),l=t;try{new e.elementClass}catch(t){d(e.elementClass),new e.elementClass}e.observedAttributes.forEach((i=>{t.hasAttribute(i)&&e.attributeChangedCallback.call(t,i,null,t.getAttribute(i))})),i&&e.connectedCallback&&t.isConnected&&e.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const e=v.apply(this,arguments);return t.customElements&&(e.customElements=t.customElements),e};let y=[document];const b=(t,e,i)=>{const o=(i?Object.getPrototypeOf(i):t.prototype)[e];t.prototype[e]=function(){y.push(this);const t=o.apply(i||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};b(ShadowRoot,"createElement",document),b(ShadowRoot,"importNode",document),b(Element,"insertAdjacentHTML");const x=(t,e)=>{const i=Object.getOwnPropertyDescriptor(t.prototype,e);Object.defineProperty(t.prototype,e,{...i,set(t){y.push(this),i.set.call(this,t),y.pop()}})};if(x(Element,"innerHTML"),x(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,e=HTMLElement.prototype.attachInternals,i=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...i){const o=e.call(this,...i);return t.set(o,this),o},i.forEach((e=>{const i=window.ElementInternals.prototype,o=i[e];i[e]=function(...e){const i=t.get(this);if(!0!==n.get(i).formAssociated)throw new DOMException(`Failed to execute ${o} on 'ElementInternals': The target element is not a form-associated custom element.`);o?.call(this,...e)}}));class o extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class s{constructor(t){const e=new Map;t.forEach(((t,i)=>{const o=t.getAttribute("name"),n=e.get(o)||[];this[+i]=t,n.push(t),e.set(o,n)})),this.length=t.length,e.forEach(((t,e)=>{t&&(1===t.length?this[e]=t[0]:this[e]=new o(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),e=[];for(const i of t){const t=n.get(i);t&&!0!==t.formAssociated||e.push(i)}return new s(e)}})}}try{window.customElements.define("custom-element",null)}catch(wi){const t=window.customElements.define;window.customElements.define=(e,i,o)=>{try{t.bind(window.customElements)(e,i,o)}catch(t){console.info(e,i,o,t)}}}class e{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){return this.callbacks=[t],this.debounce(e)}queue(t,e){return this.callbacks.push(t),this.debounce(e)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,e)=>{this.resolvePromise=t,this.rejectPromise=e}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,e;const i=[...this.callbacks];this.callbacks=[];const o=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,n=null!==(e=this.resolvePromise)&&void 0!==e?e:()=>null;this.clearPromise();for(let t of i)try{await t()}catch(t){return void o(t)}n(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2017 Google LLC
|
|
@@ -81,7 +81,7 @@ var ht,pt;class ct extends C{constructor(){super(...arguments),this.renderOption
|
|
|
81
81
|
-ms-user-select: none;
|
|
82
82
|
user-select: none;
|
|
83
83
|
}
|
|
84
|
-
`;
|
|
84
|
+
`;y`
|
|
85
85
|
.ft-word-wrap {
|
|
86
86
|
white-space: normal;
|
|
87
87
|
word-wrap: break-word;
|
|
@@ -93,17 +93,28 @@ var ht,pt;class ct extends C{constructor(){super(...arguments),this.renderOption
|
|
|
93
93
|
-webkit-hyphens: auto;
|
|
94
94
|
hyphens: auto
|
|
95
95
|
}
|
|
96
|
-
`;const
|
|
96
|
+
`;const gt=y`
|
|
97
|
+
.ft-safari-ellipsis-fix {
|
|
98
|
+
margin-right: 0;
|
|
99
|
+
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.ft-safari-ellipsis-fix:after {
|
|
103
|
+
content: "\\0000a0";
|
|
104
|
+
display: inline-block;
|
|
105
|
+
width: 0;
|
|
106
|
+
}
|
|
107
|
+
`;var mt,wt,$t;const Ot=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==($t=null===(wt=null===(mt=window.safari)||void 0===mt?void 0:mt.pushNotification)||void 0===wt?void 0:wt.toString())&&void 0!==$t?$t:""),St=1,kt=2,Nt=t=>(...e)=>({_$litDirective$:t,values:e});
|
|
97
108
|
/**
|
|
98
109
|
* @license
|
|
99
110
|
* Copyright 2017 Google LLC
|
|
100
111
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
101
|
-
*/class
|
|
112
|
+
*/class Ct{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}
|
|
102
113
|
/**
|
|
103
114
|
* @license
|
|
104
115
|
* Copyright 2018 Google LLC
|
|
105
116
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
106
|
-
*/const
|
|
117
|
+
*/const Et=Nt(class extends Ct{constructor(t){var e;if(super(t),t.type!==St||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var i,o;if(void 0===this.nt){this.nt=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(i=this.st)||void 0===i?void 0:i.has(t))&&this.nt.add(t);return this.render(e)}const n=t.element.classList;this.nt.forEach((t=>{t in e||(n.remove(t),this.nt.delete(t))}));for(const t in e){const i=!!e[t];i===this.nt.has(t)||(null===(o=this.st)||void 0===o?void 0:o.has(t))||(i?(n.add(t),this.nt.add(t)):(n.remove(t),this.nt.delete(t)))}return V}}),Rt=dt.extend("--ft-ripple-color",vt.colorContent),Mt={color:Rt,backgroundColor:dt.extend("--ft-ripple-background-color",Rt),opacityContentOnSurfacePressed:dt.external(vt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:dt.external(vt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:dt.external(vt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:dt.external(vt.opacityContentOnSurfaceSelected,"Design system")},zt=dt.extend("--ft-ripple-color",vt.colorPrimary),Ut=zt,Ft=dt.extend("--ft-ripple-background-color",zt),jt=dt.extend("--ft-ripple-color",vt.colorSecondary),Bt=jt,At=dt.extend("--ft-ripple-background-color",jt),Tt=y`
|
|
107
118
|
:host {
|
|
108
119
|
display: contents;
|
|
109
120
|
}
|
|
@@ -125,27 +136,27 @@ var ht,pt;class ct extends C{constructor(){super(...arguments),this.renderOption
|
|
|
125
136
|
}
|
|
126
137
|
|
|
127
138
|
.ft-ripple .ft-ripple--background {
|
|
128
|
-
background-color: ${
|
|
139
|
+
background-color: ${Mt.backgroundColor};
|
|
129
140
|
}
|
|
130
141
|
|
|
131
142
|
.ft-ripple .ft-ripple--effect {
|
|
132
|
-
background-color: ${
|
|
143
|
+
background-color: ${Mt.color};
|
|
133
144
|
}
|
|
134
145
|
|
|
135
146
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
136
|
-
background-color: ${
|
|
147
|
+
background-color: ${At};
|
|
137
148
|
}
|
|
138
149
|
|
|
139
150
|
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
140
|
-
background-color: ${
|
|
151
|
+
background-color: ${Bt};
|
|
141
152
|
}
|
|
142
153
|
|
|
143
154
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
144
|
-
background-color: ${
|
|
155
|
+
background-color: ${Ft};
|
|
145
156
|
}
|
|
146
157
|
|
|
147
158
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
148
|
-
background-color: ${
|
|
159
|
+
background-color: ${Ut};
|
|
149
160
|
}
|
|
150
161
|
|
|
151
162
|
.ft-ripple .ft-ripple--background {
|
|
@@ -177,22 +188,22 @@ var ht,pt;class ct extends C{constructor(){super(...arguments),this.renderOption
|
|
|
177
188
|
}
|
|
178
189
|
|
|
179
190
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
180
|
-
opacity: ${
|
|
191
|
+
opacity: ${Mt.opacityContentOnSurfaceHover};
|
|
181
192
|
}
|
|
182
193
|
|
|
183
194
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
184
|
-
opacity: ${
|
|
195
|
+
opacity: ${Mt.opacityContentOnSurfaceSelected};
|
|
185
196
|
}
|
|
186
197
|
|
|
187
198
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
188
|
-
opacity: ${
|
|
199
|
+
opacity: ${Mt.opacityContentOnSurfaceFocused};
|
|
189
200
|
}
|
|
190
201
|
|
|
191
202
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
192
|
-
opacity: ${
|
|
203
|
+
opacity: ${Mt.opacityContentOnSurfacePressed};
|
|
193
204
|
transform: translate(-50%, -50%) scale(1);
|
|
194
205
|
}
|
|
195
|
-
`;var
|
|
206
|
+
`;var Lt=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Pt extends bt{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 e(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.setupDebouncer=new e(10),this.moveRipple=t=>{var e,i;let{x:o,y:n}=this.getCoordinates(t),s=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{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 Z`
|
|
196
207
|
<style>
|
|
197
208
|
.ft-ripple .ft-ripple--effect,
|
|
198
209
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -205,119 +216,119 @@ var ht,pt;class ct extends C{constructor(){super(...arguments),this.renderOption
|
|
|
205
216
|
top: ${this.originY}px;
|
|
206
217
|
}
|
|
207
218
|
</style>
|
|
208
|
-
<div class="${
|
|
219
|
+
<div class="${Et(t)}">
|
|
209
220
|
<div class="ft-ripple--background"></div>
|
|
210
221
|
<div class="ft-ripple--effect"></div>
|
|
211
222
|
</div>
|
|
212
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){
|
|
223
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){var e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.setAttribute("data-is-ft-ripple-target","true")),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),this.setRippleSize()}))}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",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",i),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,this.target=void 0}}getCoordinates(t){const e=t,i=t;let o,n;return null!=e.x?({x:o,y:n}=e):null!=i.touches&&(o=i.touches[0].clientX,n=i.touches[0].clientY),{x:o,y:n}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}Pt.elementDefinitions={},Pt.styles=Tt,Lt([o({type:Boolean})],Pt.prototype,"primary",void 0),Lt([o({type:Boolean})],Pt.prototype,"secondary",void 0),Lt([o({type:Boolean})],Pt.prototype,"unbounded",void 0),Lt([o({type:Boolean})],Pt.prototype,"activated",void 0),Lt([o({type:Boolean})],Pt.prototype,"selected",void 0),Lt([o({type:Boolean})],Pt.prototype,"disabled",void 0),Lt([n()],Pt.prototype,"hovered",void 0),Lt([n()],Pt.prototype,"focused",void 0),Lt([n()],Pt.prototype,"pressed",void 0),Lt([n()],Pt.prototype,"rippling",void 0),Lt([n()],Pt.prototype,"rippleSize",void 0),Lt([n()],Pt.prototype,"originX",void 0),Lt([n()],Pt.prototype,"originY",void 0),Lt([r(".ft-ripple")],Pt.prototype,"ripple",void 0),Lt([r(".ft-ripple--effect")],Pt.prototype,"rippleEffect",void 0),h("ft-ripple")(Pt);
|
|
213
224
|
/**
|
|
214
225
|
* @license
|
|
215
226
|
* Copyright 2020 Google LLC
|
|
216
227
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
217
228
|
*/
|
|
218
|
-
const
|
|
229
|
+
const _t=Symbol.for(""),Dt=t=>{if((null==t?void 0:t.r)===_t)return null==t?void 0:t._$litStatic$},Wt=t=>({_$litStatic$:t,r:_t}),It=new Map,Ht=(t=>(e,...i)=>{const o=i.length;let n,s;const r=[],a=[];let l,h=0,p=!1;for(;h<o;){for(l=e[h];h<o&&void 0!==(s=i[h],n=Dt(s));)l+=n+e[++h],p=!0;a.push(s),r.push(l),h++}if(h===o&&r.push(e[o]),p){const t=r.join("$$lit$$");void 0===(e=It.get(t))&&(r.raw=r,It.set(t,e=r)),i=a}return t(e,...i)})(Z);var Kt;!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"}(Kt||(Kt={}));const Zt=dt.extend("--ft-typography-font-family",vt.titleFont),Vt=dt.extend("--ft-typography-font-family",vt.contentFont),Jt={fontFamily:Vt,fontSize:dt.create("--ft-typography-font-size","SIZE","16px"),fontWeight:dt.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:dt.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:dt.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:dt.create("--ft-typography-text-transform","UNKNOWN","inherit")},qt=dt.extend("--ft-typography-title-font-family",Zt),Xt=dt.extend("--ft-typography-title-font-size",Jt.fontSize,"20px"),Yt=dt.extend("--ft-typography-title-font-weight",Jt.fontWeight,"normal"),Gt=dt.extend("--ft-typography-title-letter-spacing",Jt.letterSpacing,"0.15px"),Qt=dt.extend("--ft-typography-title-line-height",Jt.lineHeight,"1.2"),te=dt.extend("--ft-typography-title-text-transform",Jt.textTransform,"inherit"),ee=dt.extend("--ft-typography-title-dense-font-family",Zt),ie=dt.extend("--ft-typography-title-dense-font-size",Jt.fontSize,"14px"),oe=dt.extend("--ft-typography-title-dense-font-weight",Jt.fontWeight,"normal"),ne=dt.extend("--ft-typography-title-dense-letter-spacing",Jt.letterSpacing,"0.105px"),se=dt.extend("--ft-typography-title-dense-line-height",Jt.lineHeight,"1.7"),re=dt.extend("--ft-typography-title-dense-text-transform",Jt.textTransform,"inherit"),ae=dt.extend("--ft-typography-subtitle1-font-family",Vt),le=dt.extend("--ft-typography-subtitle1-font-size",Jt.fontSize,"16px"),he=dt.extend("--ft-typography-subtitle1-font-weight",Jt.fontWeight,"600"),pe=dt.extend("--ft-typography-subtitle1-letter-spacing",Jt.letterSpacing,"0.144px"),ce=dt.extend("--ft-typography-subtitle1-line-height",Jt.lineHeight,"1.5"),fe=dt.extend("--ft-typography-subtitle1-text-transform",Jt.textTransform,"inherit"),de=dt.extend("--ft-typography-subtitle2-font-family",Vt),ue=dt.extend("--ft-typography-subtitle2-font-size",Jt.fontSize,"14px"),ve=dt.extend("--ft-typography-subtitle2-font-weight",Jt.fontWeight,"normal"),ye=dt.extend("--ft-typography-subtitle2-letter-spacing",Jt.letterSpacing,"0.098px"),be=dt.extend("--ft-typography-subtitle2-line-height",Jt.lineHeight,"1.7"),xe=dt.extend("--ft-typography-subtitle2-text-transform",Jt.textTransform,"inherit"),ge=dt.extend("--ft-typography-body1-font-family",Vt),me=dt.extend("--ft-typography-body1-font-size",Jt.fontSize,"16px"),we=dt.extend("--ft-typography-body1-font-weight",Jt.fontWeight,"normal"),$e=dt.extend("--ft-typography-body1-letter-spacing",Jt.letterSpacing,"0.496px"),Oe=dt.extend("--ft-typography-body1-line-height",Jt.lineHeight,"1.5"),Se=dt.extend("--ft-typography-body1-text-transform",Jt.textTransform,"inherit"),ke=dt.extend("--ft-typography-body2-font-family",Vt),Ne=dt.extend("--ft-typography-body2-font-size",Jt.fontSize,"14px"),Ce=dt.extend("--ft-typography-body2-font-weight",Jt.fontWeight,"normal"),Ee=dt.extend("--ft-typography-body2-letter-spacing",Jt.letterSpacing,"0.252px"),Re=dt.extend("--ft-typography-body2-line-height",Jt.lineHeight,"1.4"),Me=dt.extend("--ft-typography-body2-text-transform",Jt.textTransform,"inherit"),ze=dt.extend("--ft-typography-caption-font-family",Vt),Ue=dt.extend("--ft-typography-caption-font-size",Jt.fontSize,"12px"),Fe=dt.extend("--ft-typography-caption-font-weight",Jt.fontWeight,"normal"),je=dt.extend("--ft-typography-caption-letter-spacing",Jt.letterSpacing,"0.396px"),Be=dt.extend("--ft-typography-caption-line-height",Jt.lineHeight,"1.33"),Ae=dt.extend("--ft-typography-caption-text-transform",Jt.textTransform,"inherit"),Te=dt.extend("--ft-typography-breadcrumb-font-family",Vt),Le=dt.extend("--ft-typography-breadcrumb-font-size",Jt.fontSize,"10px"),Pe=dt.extend("--ft-typography-breadcrumb-font-weight",Jt.fontWeight,"normal"),_e=dt.extend("--ft-typography-breadcrumb-letter-spacing",Jt.letterSpacing,"0.33px"),De=dt.extend("--ft-typography-breadcrumb-line-height",Jt.lineHeight,"1.6"),We=dt.extend("--ft-typography-breadcrumb-text-transform",Jt.textTransform,"inherit"),Ie=dt.extend("--ft-typography-overline-font-family",Vt),He=dt.extend("--ft-typography-overline-font-size",Jt.fontSize,"10px"),Ke=dt.extend("--ft-typography-overline-font-weight",Jt.fontWeight,"normal"),Ze=dt.extend("--ft-typography-overline-letter-spacing",Jt.letterSpacing,"1.5px"),Ve=dt.extend("--ft-typography-overline-line-height",Jt.lineHeight,"1.6"),Je=dt.extend("--ft-typography-overline-text-transform",Jt.textTransform,"uppercase"),qe={fontFamily:dt.extend("--ft-typography-button-font-family",Vt),fontSize:dt.extend("--ft-typography-button-font-size",Jt.fontSize,"14px"),fontWeight:dt.extend("--ft-typography-button-font-weight",Jt.fontWeight,"600"),letterSpacing:dt.extend("--ft-typography-button-letter-spacing",Jt.letterSpacing,"1.246px"),lineHeight:dt.extend("--ft-typography-button-line-height",Jt.lineHeight,"1.15"),textTransform:dt.extend("--ft-typography-button-text-transform",Jt.textTransform,"uppercase")},Xe=y`
|
|
219
230
|
.ft-typography--title {
|
|
220
|
-
font-family: ${
|
|
221
|
-
font-size: ${
|
|
222
|
-
font-weight: ${
|
|
223
|
-
letter-spacing: ${
|
|
224
|
-
line-height: ${
|
|
225
|
-
text-transform: ${
|
|
226
|
-
}
|
|
227
|
-
`,Xe=y`
|
|
228
|
-
.ft-typography--title-dense {
|
|
229
|
-
font-family: ${te};
|
|
230
|
-
font-size: ${ee};
|
|
231
|
-
font-weight: ${ie};
|
|
232
|
-
letter-spacing: ${oe};
|
|
233
|
-
line-height: ${ne};
|
|
234
|
-
text-transform: ${se};
|
|
231
|
+
font-family: ${qt};
|
|
232
|
+
font-size: ${Xt};
|
|
233
|
+
font-weight: ${Yt};
|
|
234
|
+
letter-spacing: ${Gt};
|
|
235
|
+
line-height: ${Qt};
|
|
236
|
+
text-transform: ${te};
|
|
235
237
|
}
|
|
236
238
|
`,Ye=y`
|
|
237
|
-
.ft-typography--
|
|
238
|
-
font-family: ${
|
|
239
|
-
font-size: ${
|
|
240
|
-
font-weight: ${
|
|
241
|
-
letter-spacing: ${
|
|
242
|
-
line-height: ${
|
|
243
|
-
text-transform: ${
|
|
239
|
+
.ft-typography--title-dense {
|
|
240
|
+
font-family: ${ee};
|
|
241
|
+
font-size: ${ie};
|
|
242
|
+
font-weight: ${oe};
|
|
243
|
+
letter-spacing: ${ne};
|
|
244
|
+
line-height: ${se};
|
|
245
|
+
text-transform: ${re};
|
|
244
246
|
}
|
|
245
247
|
`,Ge=y`
|
|
246
|
-
.ft-typography--
|
|
247
|
-
font-family: ${
|
|
248
|
-
font-size: ${
|
|
249
|
-
font-weight: ${
|
|
250
|
-
letter-spacing: ${
|
|
251
|
-
line-height: ${
|
|
252
|
-
text-transform: ${
|
|
248
|
+
.ft-typography--subtitle1 {
|
|
249
|
+
font-family: ${ae};
|
|
250
|
+
font-size: ${le};
|
|
251
|
+
font-weight: ${he};
|
|
252
|
+
letter-spacing: ${pe};
|
|
253
|
+
line-height: ${ce};
|
|
254
|
+
text-transform: ${fe};
|
|
253
255
|
}
|
|
254
|
-
|
|
255
256
|
`,Qe=y`
|
|
256
|
-
.ft-typography--
|
|
257
|
-
font-family: ${
|
|
258
|
-
font-size: ${
|
|
259
|
-
font-weight: ${
|
|
260
|
-
letter-spacing: ${
|
|
261
|
-
line-height: ${
|
|
262
|
-
text-transform: ${
|
|
257
|
+
.ft-typography--subtitle2 {
|
|
258
|
+
font-family: ${de};
|
|
259
|
+
font-size: ${ue};
|
|
260
|
+
font-weight: ${ve};
|
|
261
|
+
letter-spacing: ${ye};
|
|
262
|
+
line-height: ${be};
|
|
263
|
+
text-transform: ${xe};
|
|
263
264
|
}
|
|
265
|
+
|
|
264
266
|
`,ti=y`
|
|
265
|
-
.ft-typography--
|
|
266
|
-
font-family: ${
|
|
267
|
-
font-size: ${
|
|
268
|
-
font-weight: ${
|
|
269
|
-
letter-spacing: ${
|
|
270
|
-
line-height: ${
|
|
271
|
-
text-transform: ${
|
|
267
|
+
.ft-typography--body1 {
|
|
268
|
+
font-family: ${ge};
|
|
269
|
+
font-size: ${me};
|
|
270
|
+
font-weight: ${we};
|
|
271
|
+
letter-spacing: ${$e};
|
|
272
|
+
line-height: ${Oe};
|
|
273
|
+
text-transform: ${Se};
|
|
272
274
|
}
|
|
273
275
|
`,ei=y`
|
|
274
|
-
.ft-typography--
|
|
275
|
-
font-family: ${
|
|
276
|
-
font-size: ${
|
|
277
|
-
font-weight: ${
|
|
278
|
-
letter-spacing: ${
|
|
279
|
-
line-height: ${
|
|
280
|
-
text-transform: ${
|
|
276
|
+
.ft-typography--body2 {
|
|
277
|
+
font-family: ${ke};
|
|
278
|
+
font-size: ${Ne};
|
|
279
|
+
font-weight: ${Ce};
|
|
280
|
+
letter-spacing: ${Ee};
|
|
281
|
+
line-height: ${Re};
|
|
282
|
+
text-transform: ${Me};
|
|
281
283
|
}
|
|
282
284
|
`,ii=y`
|
|
283
|
-
.ft-typography--
|
|
284
|
-
font-family: ${
|
|
285
|
-
font-size: ${
|
|
286
|
-
font-weight: ${
|
|
287
|
-
letter-spacing: ${
|
|
288
|
-
line-height: ${
|
|
289
|
-
text-transform: ${
|
|
285
|
+
.ft-typography--caption {
|
|
286
|
+
font-family: ${ze};
|
|
287
|
+
font-size: ${Ue};
|
|
288
|
+
font-weight: ${Fe};
|
|
289
|
+
letter-spacing: ${je};
|
|
290
|
+
line-height: ${Be};
|
|
291
|
+
text-transform: ${Ae};
|
|
290
292
|
}
|
|
291
293
|
`,oi=y`
|
|
292
|
-
.ft-typography--
|
|
293
|
-
font-family: ${
|
|
294
|
-
font-size: ${
|
|
295
|
-
font-weight: ${
|
|
296
|
-
letter-spacing: ${
|
|
297
|
-
line-height: ${
|
|
298
|
-
text-transform: ${
|
|
294
|
+
.ft-typography--breadcrumb {
|
|
295
|
+
font-family: ${Te};
|
|
296
|
+
font-size: ${Le};
|
|
297
|
+
font-weight: ${Pe};
|
|
298
|
+
letter-spacing: ${_e};
|
|
299
|
+
line-height: ${De};
|
|
300
|
+
text-transform: ${We};
|
|
299
301
|
}
|
|
300
302
|
`,ni=y`
|
|
301
|
-
.ft-typography--
|
|
302
|
-
font-family: ${
|
|
303
|
-
font-size: ${
|
|
304
|
-
font-weight: ${
|
|
305
|
-
letter-spacing: ${
|
|
306
|
-
line-height: ${
|
|
307
|
-
text-transform: ${Je
|
|
303
|
+
.ft-typography--overline {
|
|
304
|
+
font-family: ${Ie};
|
|
305
|
+
font-size: ${He};
|
|
306
|
+
font-weight: ${Ke};
|
|
307
|
+
letter-spacing: ${Ze};
|
|
308
|
+
line-height: ${Ve};
|
|
309
|
+
text-transform: ${Je};
|
|
308
310
|
}
|
|
309
311
|
`,si=y`
|
|
312
|
+
.ft-typography--button {
|
|
313
|
+
font-family: ${qe.fontFamily};
|
|
314
|
+
font-size: ${qe.fontSize};
|
|
315
|
+
font-weight: ${qe.fontWeight};
|
|
316
|
+
letter-spacing: ${qe.letterSpacing};
|
|
317
|
+
line-height: ${qe.lineHeight};
|
|
318
|
+
text-transform: ${qe.textTransform};
|
|
319
|
+
}
|
|
320
|
+
`,ri=y`
|
|
310
321
|
.ft-typography {
|
|
311
322
|
vertical-align: inherit;
|
|
312
323
|
}
|
|
313
|
-
`;var
|
|
314
|
-
<${
|
|
324
|
+
`;var ai=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class li extends bt{constructor(){super(...arguments),this.variant=Kt.body1}render(){return this.element?Ht`
|
|
325
|
+
<${Wt(this.element)}
|
|
315
326
|
class="ft-typography ft-typography--${this.variant}">
|
|
316
327
|
<slot></slot>
|
|
317
|
-
</${
|
|
318
|
-
`:
|
|
328
|
+
</${Wt(this.element)}>
|
|
329
|
+
`:Ht`
|
|
319
330
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
320
|
-
`}}
|
|
331
|
+
`}}li.styles=[Xe,Ye,Ge,Qe,ti,ei,ii,oi,ni,si,ri],ai([o()],li.prototype,"element",void 0),ai([o()],li.prototype,"variant",void 0),h("ft-typography")(li);const hi=dt.create("--ft-tooltip-distance","SIZE","4px"),pi=dt.create("--ft-tooltip-color","COLOR","#FFFFFF"),ci=dt.create("--ft-tooltip-background-color","COLOR","#666666"),fi=dt.create("--ft-tooltip-z-index","NUMBER","1"),di=dt.external(vt.borderRadiusS,"Design system"),ui=dt.create("--ft-tooltip-max-width","SIZE","150px"),vi=y`
|
|
321
332
|
.ft-tooltip--container {
|
|
322
333
|
display: block;
|
|
323
334
|
position: relative;
|
|
@@ -333,23 +344,23 @@ const Pt=Symbol.for(""),_t=t=>{if((null==t?void 0:t.r)===Pt)return null==t?void
|
|
|
333
344
|
box-sizing: border-box;
|
|
334
345
|
overflow: hidden;
|
|
335
346
|
width: max-content;
|
|
336
|
-
max-width: ${
|
|
347
|
+
max-width: ${ui};
|
|
337
348
|
text-align: center;
|
|
338
|
-
padding: ${
|
|
339
|
-
z-index: ${
|
|
349
|
+
padding: ${hi};
|
|
350
|
+
z-index: ${fi};
|
|
340
351
|
}
|
|
341
352
|
|
|
342
353
|
.ft-tooltip--content {
|
|
343
354
|
padding: 4px 8px;
|
|
344
|
-
border-radius: ${
|
|
345
|
-
background-color: ${
|
|
346
|
-
color: ${
|
|
355
|
+
border-radius: ${di};
|
|
356
|
+
background-color: ${ci};
|
|
357
|
+
color: ${pi};
|
|
347
358
|
top: -500px;
|
|
348
359
|
left: -500px;
|
|
349
360
|
position: relative;
|
|
350
361
|
word-break: break-word;
|
|
351
362
|
}
|
|
352
|
-
`;var
|
|
363
|
+
`;var yi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class bi extends bt{constructor(){super(...arguments),this.text="",this.manual=!1,this.inline=!1,this.delay=500,this.position="bottom",this.visible=!1,this.validPositions=new Set(["top","bottom","left","right"]),this.hideDebounce=new e,this.revealDebouncer=new e}get validPosition(){return this.validPositions.has(this.position)?this.position:"bottom"}render(){return Z`
|
|
353
364
|
<div part="container"
|
|
354
365
|
class="ft-tooltip--container ${this.inline?"ft-tooltip--inline":""}"
|
|
355
366
|
@mouseenter=${this.onHover}
|
|
@@ -367,13 +378,13 @@ const Pt=Symbol.for(""),_t=t=>{if((null==t?void 0:t.r)===Pt)return null==t?void
|
|
|
367
378
|
</div>
|
|
368
379
|
</div>
|
|
369
380
|
</div>
|
|
370
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&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.validPosition){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 e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let n=0,s=0;switch(this.validPosition){case"top":s=-this.tooltip.clientHeight,n=o;break;case"bottom":s=e.height,n=o;break;case"left":s=i,n=-this.tooltip.clientWidth;break;case"right":s=i,n=e.width}e.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+n<0&&(n=0);const r=this.tooltip.style;r.left=n+"px",r.top=s+"px",r.maxWidth=`max(${e.width}px, ${
|
|
381
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){["visible","text"].some((e=>t.has(e)))&&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.validPosition){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 e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let n=0,s=0;switch(this.validPosition){case"top":s=-this.tooltip.clientHeight,n=o;break;case"bottom":s=e.height,n=o;break;case"left":s=i,n=-this.tooltip.clientWidth;break;case"right":s=i,n=e.width}e.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+n<0&&(n=0);const r=this.tooltip.style;r.left=n+"px",r.top=s+"px",r.maxWidth=`max(${e.width}px, ${ui})`}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())}}bi.elementDefinitions={"ft-typography":li},bi.styles=vi,yi([o()],bi.prototype,"text",void 0),yi([o({type:Boolean})],bi.prototype,"manual",void 0),yi([o({type:Boolean})],bi.prototype,"inline",void 0),yi([o({type:Number})],bi.prototype,"delay",void 0),yi([o()],bi.prototype,"position",void 0),yi([
|
|
371
382
|
/**
|
|
372
383
|
* @license
|
|
373
384
|
* Copyright 2017 Google LLC
|
|
374
385
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
375
386
|
*/
|
|
376
|
-
function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return s({descriptor:o=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),s=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),r=null!=s?l(s,t):[];return i?r.filter((t=>t.matches(i))):r},enumerable:!0,configurable:!0})})}({slot:n,flatten:e,selector:i}):s({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),s=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==s?void 0:s.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],
|
|
387
|
+
function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?function(t){const{slot:e,selector:i}=null!=t?t:{};return s({descriptor:o=>({get(){var o;const n="slot"+(e?`[name=${e}]`:":not([name])"),s=null===(o=this.renderRoot)||void 0===o?void 0:o.querySelector(n),r=null!=s?l(s,t):[];return i?r.filter((t=>t.matches(i))):r},enumerable:!0,configurable:!0})})}({slot:n,flatten:e,selector:i}):s({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),s=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==s?void 0:s.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],bi.prototype,"slotNodes",void 0),yi([r(".ft-tooltip--container")],bi.prototype,"container",void 0),yi([r("slot")],bi.prototype,"target",void 0),yi([r(".ft-tooltip")],bi.prototype,"tooltip",void 0),yi([r(".ft-tooltip--content")],bi.prototype,"tooltipContent",void 0),yi([n()],bi.prototype,"visible",void 0),h("ft-tooltip")(bi);const xi={color:dt.extend("--ft-loader-color",vt.colorPrimary),size:dt.create("--ft-loader-size","SIZE","80px")},gi=y`
|
|
377
388
|
:host {
|
|
378
389
|
line-height: 0;
|
|
379
390
|
}
|
|
@@ -382,8 +393,8 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
382
393
|
display: inline-block;
|
|
383
394
|
position: relative;
|
|
384
395
|
|
|
385
|
-
width: ${
|
|
386
|
-
height: ${
|
|
396
|
+
width: ${xi.size};
|
|
397
|
+
height: ${xi.size};
|
|
387
398
|
}
|
|
388
399
|
|
|
389
400
|
.ft-loader div {
|
|
@@ -392,7 +403,7 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
392
403
|
width: 25%;
|
|
393
404
|
height: 25%;
|
|
394
405
|
border-radius: 50%;
|
|
395
|
-
background: ${
|
|
406
|
+
background: ${xi.color};
|
|
396
407
|
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
|
397
408
|
}
|
|
398
409
|
|
|
@@ -439,23 +450,23 @@ function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},
|
|
|
439
450
|
transform: translate(0, 0);
|
|
440
451
|
}
|
|
441
452
|
100% {
|
|
442
|
-
transform: translate(calc(0.35 * ${
|
|
453
|
+
transform: translate(calc(0.35 * ${xi.size}), 0);
|
|
443
454
|
}
|
|
444
455
|
}
|
|
445
|
-
`;class
|
|
456
|
+
`;class mi extends bt{render(){return Z`
|
|
446
457
|
<div class="ft-loader">
|
|
447
458
|
<div></div>
|
|
448
459
|
<div></div>
|
|
449
460
|
<div></div>
|
|
450
461
|
<div></div>
|
|
451
462
|
</div>
|
|
452
|
-
`}}
|
|
463
|
+
`}}mi.styles=gi,h("ft-loader")(mi);
|
|
453
464
|
/**
|
|
454
465
|
* @license
|
|
455
466
|
* Copyright 2017 Google LLC
|
|
456
467
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
457
468
|
*/
|
|
458
|
-
class
|
|
469
|
+
class wi extends Ct{constructor(t){if(super(t),this.it=J,t.type!==kt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===J||null==t)return this._t=void 0,this.it=t;if(t===V)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}wi.directiveName="unsafeHTML",wi.resultType=1;const $i=Nt(wi);var Oi,Si;!function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(Oi||(Oi={})),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=""}(Si||(Si={})),new Map([...["abw"].map((t=>[t,Si.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,Si.AUDIO])),...["avi"].map((t=>[t,Si.AVI])),...["chm","xhs"].map((t=>[t,Si.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,Si.CODE])),...["csv"].map((t=>[t,Si.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Si.DITA])),...["epub"].map((t=>[t,Si.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Si.EXCEL])),...["flac"].map((t=>[t,Si.FLAC])),...["gif"].map((t=>[t,Si.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Si.GZIP])),...["html","htm","xhtml"].map((t=>[t,Si.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,Si.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Si.JPEG])),...["json"].map((t=>[t,Si.JSON])),...["m4a","m4p"].map((t=>[t,Si.M4A])),...["mov","qt"].map((t=>[t,Si.MOV])),...["mp3"].map((t=>[t,Si.MP3])),...["mp4","m4v"].map((t=>[t,Si.MP4])),...["ogg","oga"].map((t=>[t,Si.OGG])),...["pdf","ps"].map((t=>[t,Si.PDF])),...["png"].map((t=>[t,Si.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Si.POWERPOINT])),...["rar"].map((t=>[t,Si.RAR])),...["stp"].map((t=>[t,Si.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Si.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,Si.VIDEO])),...["wav"].map((t=>[t,Si.WAV])),...["wma"].map((t=>[t,Si.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Si.WORD])),...["xml","xsl","rdf"].map((t=>[t,Si.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Si.YAML])),...["zip"].map((t=>[t,Si.ZIP]))]);const ki={size:dt.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:dt.extend("--ft-icon-fluid-topics-font-family",dt.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:dt.extend("--ft-icon-file-format-font-family",dt.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:dt.extend("--ft-icon-material-font-family",dt.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:dt.create("--ft-icon-vertical-align","UNKNOWN","unset")},Ni=y`
|
|
459
470
|
:host, i.ft-icon {
|
|
460
471
|
display: inline-flex;
|
|
461
472
|
align-items: center;
|
|
@@ -464,14 +475,14 @@ class mi extends Nt{constructor(t){if(super(t),this.it=J,t.type!==St)throw Error
|
|
|
464
475
|
}
|
|
465
476
|
|
|
466
477
|
:host {
|
|
467
|
-
width: ${
|
|
468
|
-
height: ${
|
|
478
|
+
width: ${ki.size};
|
|
479
|
+
height: ${ki.size};
|
|
469
480
|
}
|
|
470
481
|
|
|
471
482
|
i.ft-icon {
|
|
472
483
|
width: 100%;
|
|
473
484
|
height: 100%;
|
|
474
|
-
font-size: ${
|
|
485
|
+
font-size: ${ki.size};
|
|
475
486
|
line-height: 1;
|
|
476
487
|
font-weight: normal;
|
|
477
488
|
text-transform: none;
|
|
@@ -482,32 +493,32 @@ class mi extends Nt{constructor(t){if(super(t),this.it=J,t.type!==St)throw Error
|
|
|
482
493
|
text-rendering: auto;
|
|
483
494
|
-webkit-font-smoothing: antialiased;
|
|
484
495
|
-moz-osx-font-smoothing: grayscale;
|
|
485
|
-
vertical-align: ${
|
|
496
|
+
vertical-align: ${ki.verticalAlign};
|
|
486
497
|
}
|
|
487
498
|
|
|
488
499
|
i.ft-icon.ft-icon--fluid-topics {
|
|
489
|
-
font-family: ${
|
|
500
|
+
font-family: ${ki.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
490
501
|
|
|
491
502
|
/* Ugly fix because font is broken */
|
|
492
|
-
font-size: calc(0.9 * ${
|
|
503
|
+
font-size: calc(0.9 * ${ki.size});
|
|
493
504
|
position: relative;
|
|
494
505
|
top: -5%;
|
|
495
506
|
justify-content: center;
|
|
496
507
|
}
|
|
497
508
|
|
|
498
509
|
.ft-icon--file-format {
|
|
499
|
-
font-family: ${
|
|
510
|
+
font-family: ${ki.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
500
511
|
}
|
|
501
512
|
|
|
502
513
|
.ft-icon--material {
|
|
503
|
-
font-family: ${
|
|
514
|
+
font-family: ${ki.materialFontFamily}, "Material Icons", sans-serif;
|
|
504
515
|
}
|
|
505
|
-
`;var
|
|
516
|
+
`;var Ci;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ci||(Ci={}));var Ei=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Ri extends bt{constructor(){super(...arguments),this.variant=Ci.fluid_topics,this.resolvedIcon=J}render(){const t="material"!==this.variant||this.value;return Z`
|
|
506
517
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
507
|
-
${
|
|
518
|
+
${$i(this.resolvedIcon)}
|
|
508
519
|
<slot ?hidden=${t}></slot>
|
|
509
520
|
</i>
|
|
510
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case
|
|
521
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let i=this.value||this.textContent;switch(this.variant){case Ci.file_format:this.resolvedIcon=null!==(t=Si[i.replace("-","_").toUpperCase()])&&void 0!==t?t:i;break;case Ci.fluid_topics:this.resolvedIcon=null!==(e=Oi[i.replace("-","_").toUpperCase()])&&void 0!==e?e:i;break;default:this.resolvedIcon=this.value||J}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}Ri.elementDefinitions={},Ri.styles=Ni,Ei([o()],Ri.prototype,"variant",void 0),Ei([o()],Ri.prototype,"value",void 0),Ei([n()],Ri.prototype,"resolvedIcon",void 0),Ei([r("slot")],Ri.prototype,"slottedContent",void 0),h("ft-icon")(Ri);const Mi=dt.extend("--ft-button-color",vt.colorPrimary),zi={backgroundColor:dt.extend("--ft-button-background-color",vt.colorSurface),borderRadius:dt.extend("--ft-button-border-radius",vt.borderRadiusL),color:Mi,fontSize:dt.extend("--ft-button-font-size",qe.fontSize),iconSize:dt.create("--ft-button-icon-size","SIZE","24px"),rippleColor:dt.extend("--ft-button-ripple-color",Mi),opacityDisabled:dt.external(vt.colorOpacityDisabled,"Design system")},Ui=dt.extend("--ft-button-primary-color",dt.extend("--ft-button-color",vt.colorOnPrimary)),Fi={backgroundColor:dt.extend("--ft-button-primary-background-color",dt.extend("--ft-button-background-color",vt.colorPrimary)),color:Ui,rippleColor:dt.extend("--ft-button-primary-ripple-color",Ui)},ji=dt.extend("--ft-button-dense-border-radius",dt.extend("--ft-button-border-radius",vt.borderRadiusM)),Bi=[xt,y`
|
|
511
522
|
:host {
|
|
512
523
|
display: inline-block;
|
|
513
524
|
max-width: 100%;
|
|
@@ -518,7 +529,7 @@ class mi extends Nt{constructor(t){if(super(t),this.it=J,t.type!==St)throw Error
|
|
|
518
529
|
box-shadow: 0px 0px 0px transparent;
|
|
519
530
|
border: 0px solid transparent;
|
|
520
531
|
text-shadow: 0px 0px 0px transparent;
|
|
521
|
-
font-size: ${
|
|
532
|
+
font-size: ${zi.fontSize};
|
|
522
533
|
}
|
|
523
534
|
|
|
524
535
|
button:hover {
|
|
@@ -547,17 +558,17 @@ class mi extends Nt{constructor(t){if(super(t),this.it=J,t.type!==St)throw Error
|
|
|
547
558
|
border: none;
|
|
548
559
|
pointer-events: auto;
|
|
549
560
|
|
|
550
|
-
--ft-button-internal-line-height: calc(${
|
|
551
|
-
--ft-button-internal-color: ${
|
|
552
|
-
${ut(
|
|
561
|
+
--ft-button-internal-line-height: calc(${zi.fontSize} + 2px);
|
|
562
|
+
--ft-button-internal-color: ${zi.color};
|
|
563
|
+
${ut(ki.size,zi.iconSize)};
|
|
553
564
|
--ft-button-internal-vertical-padding: 6px;
|
|
554
565
|
--ft-button-internal-horizontal-padding: 8px;
|
|
555
|
-
${ut(
|
|
556
|
-
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${
|
|
566
|
+
${ut(Mt.color,zi.rippleColor)};
|
|
567
|
+
--ft-button-internal-content-height: max(var(--ft-button-internal-line-height), ${zi.iconSize});
|
|
557
568
|
|
|
558
|
-
border-radius: ${
|
|
569
|
+
border-radius: ${zi.borderRadius};
|
|
559
570
|
padding: var(--ft-button-internal-vertical-padding) var(--ft-button-internal-horizontal-padding);
|
|
560
|
-
background-color: ${
|
|
571
|
+
background-color: ${zi.backgroundColor};
|
|
561
572
|
color: var(--ft-button-internal-color);
|
|
562
573
|
-webkit-mask-image: radial-gradient(white, black);
|
|
563
574
|
}
|
|
@@ -569,7 +580,7 @@ class mi extends Nt{constructor(t){if(super(t),this.it=J,t.type!==St)throw Error
|
|
|
569
580
|
.ft-button--dense {
|
|
570
581
|
--ft-button-internal-vertical-padding: 2px;
|
|
571
582
|
--ft-button-internal-horizontal-padding: 4px;
|
|
572
|
-
border-radius: ${
|
|
583
|
+
border-radius: ${ji};
|
|
573
584
|
}
|
|
574
585
|
|
|
575
586
|
.ft-button--round {
|
|
@@ -578,13 +589,13 @@ class mi extends Nt{constructor(t){if(super(t),this.it=J,t.type!==St)throw Error
|
|
|
578
589
|
|
|
579
590
|
.ft-button[disabled] {
|
|
580
591
|
filter: grayscale(1);
|
|
581
|
-
opacity: ${
|
|
592
|
+
opacity: ${zi.opacityDisabled};
|
|
582
593
|
}
|
|
583
594
|
|
|
584
595
|
.ft-button.ft-button--primary {
|
|
585
|
-
background-color: ${
|
|
586
|
-
--ft-button-internal-color: ${
|
|
587
|
-
${ut(
|
|
596
|
+
background-color: ${Fi.backgroundColor};
|
|
597
|
+
--ft-button-internal-color: ${Fi.color};
|
|
598
|
+
${ut(Mt.color,Fi.rippleColor)};
|
|
588
599
|
}
|
|
589
600
|
|
|
590
601
|
.ft-button.ft-button--outlined {
|
|
@@ -603,20 +614,10 @@ class mi extends Nt{constructor(t){if(super(t),this.it=J,t.type!==St)throw Error
|
|
|
603
614
|
text-overflow: ellipsis;
|
|
604
615
|
display: block;
|
|
605
616
|
margin: 0 var(--ft-button-internal-horizontal-padding);
|
|
606
|
-
${ut(
|
|
607
|
-
${ut(
|
|
617
|
+
${ut(qe.fontSize,"1em")};
|
|
618
|
+
${ut(qe.lineHeight,"var(--ft-button-internal-content-height)")};
|
|
608
619
|
}
|
|
609
|
-
|
|
610
|
-
.ft-button--safari-fix .ft-button--label {
|
|
611
|
-
margin-right: 0;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
.ft-button--safari-fix .ft-button--label:after {
|
|
615
|
-
content: "\\0000a0";
|
|
616
|
-
display: inline-block;
|
|
617
|
-
width: 0;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
+
|
|
620
621
|
.ft-button--label[hidden] {
|
|
621
622
|
display: none;
|
|
622
623
|
}
|
|
@@ -637,19 +638,19 @@ class mi extends Nt{constructor(t){if(super(t),this.it=J,t.type!==St)throw Error
|
|
|
637
638
|
}
|
|
638
639
|
|
|
639
640
|
ft-loader {
|
|
640
|
-
${ut(
|
|
641
|
-
${ut(
|
|
641
|
+
${ut(xi.size,zi.iconSize)};
|
|
642
|
+
${ut(xi.color,"var(--ft-button-internal-color)")};
|
|
642
643
|
}
|
|
643
|
-
`];var
|
|
644
|
+
`];var Ai=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class Ti extends bt{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.iconVariant=Ci.material,this.trailingIcon=!1,this.loading=!1,this.tooltipPosition="bottom",this.hideTooltip=!1,this.forceTooltip=!1,this.onclick=t=>{this.isDisabled()&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}}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-no-text-select":!0};return this.addTooltipIfNeeded(Z`
|
|
644
645
|
<button part="button"
|
|
645
|
-
class="${
|
|
646
|
+
class="${Et(t)}"
|
|
646
647
|
aria-label="${this.getLabel()}"
|
|
647
648
|
?disabled=${this.isDisabled()}>
|
|
648
649
|
<ft-ripple part="ripple" ?disabled=${this.isDisabled()}></ft-ripple>
|
|
649
650
|
<ft-typography part="label"
|
|
650
651
|
variant="button"
|
|
651
652
|
element="span"
|
|
652
|
-
class="ft-button--label"
|
|
653
|
+
class="ft-button--label ${Ot?"ft-safari-ellipsis-fix":""}"
|
|
653
654
|
?hidden=${!this.hasTextContent()}>
|
|
654
655
|
<slot @slotchange=${this.onSlotchange}></slot>
|
|
655
656
|
</ft-typography>
|
|
@@ -663,7 +664,7 @@ class mi extends Nt{constructor(t){if(super(t),this.it=J,t.type!==St)throw Error
|
|
|
663
664
|
</ft-tooltip>
|
|
664
665
|
`:t}resolveIcon(){return this.loading?Z`
|
|
665
666
|
<ft-loader></ft-loader> `:this.icon?Z`
|
|
666
|
-
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:J}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}}
|
|
667
|
+
<ft-icon variant="${this.iconVariant}" value="${this.icon}"></ft-icon> `:J}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}}Ti.elementDefinitions={"ft-ripple":Pt,"ft-tooltip":bi,"ft-typography":li,"ft-icon":Ri,"ft-loader":mi},Ti.styles=[gt,Bi],Ai([o({type:Boolean})],Ti.prototype,"primary",void 0),Ai([o({type:Boolean})],Ti.prototype,"outlined",void 0),Ai([o({type:Boolean})],Ti.prototype,"disabled",void 0),Ai([o({type:Boolean})],Ti.prototype,"dense",void 0),Ai([o({type:Boolean})],Ti.prototype,"round",void 0),Ai([o({type:String})],Ti.prototype,"label",void 0),Ai([o({type:String})],Ti.prototype,"icon",void 0),Ai([o({type:String})],Ti.prototype,"iconVariant",void 0),Ai([o({type:Boolean})],Ti.prototype,"trailingIcon",void 0),Ai([o({type:Boolean})],Ti.prototype,"loading",void 0),Ai([o({type:String})],Ti.prototype,"tooltipPosition",void 0),Ai([o({type:Boolean})],Ti.prototype,"hideTooltip",void 0),Ai([o({type:Boolean})],Ti.prototype,"forceTooltip",void 0),Ai([r(".ft-button")],Ti.prototype,"button",void 0),Ai([r(".ft-button--label slot")],Ti.prototype,"slottedContent",void 0),h("ft-button")(Ti);const Li=y``;var Pi=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class _i extends CustomEvent{constructor(t){super("change",{detail:{file:t}})}}class Di extends bt{constructor(){super(...arguments),this.disabled=!1,this.label="",this.icon=void 0,this.trailingIcon=!1,this.accept=""}render(){return Z`
|
|
667
668
|
<div class="ft-file-button">
|
|
668
669
|
<ft-button ?disabled=${this.disabled}
|
|
669
670
|
label="${this.label}"
|
|
@@ -678,4 +679,4 @@ class mi extends Nt{constructor(t){if(super(t),this.it=J,t.type!==St)throw Error
|
|
|
678
679
|
@change=${this.onFileChange}
|
|
679
680
|
hidden/>
|
|
680
681
|
</div>
|
|
681
|
-
`}onFileChange(){var t;(null===(t=this.input.files)||void 0===t?void 0:t.length)>0&&this.dispatchEvent(new
|
|
682
|
+
`}onFileChange(){var t;(null===(t=this.input.files)||void 0===t?void 0:t.length)>0&&this.dispatchEvent(new _i(this.input.files.item(0)))}focus(){this.button.focus()}clear(){this.input.value=""}}Di.elementDefinitions={"ft-button":Ti},Di.styles=Li,Pi([o({type:Boolean})],Di.prototype,"disabled",void 0),Pi([o({type:String})],Di.prototype,"label",void 0),Pi([o({type:String})],Di.prototype,"icon",void 0),Pi([o({type:Boolean})],Di.prototype,"trailingIcon",void 0),Pi([o({type:String})],Di.prototype,"accept",void 0),Pi([r(".ft-file-button--input")],Di.prototype,"input",void 0),Pi([r("ft-button")],Di.prototype,"button",void 0),h("ft-file-button")(Di),t.FileChangeEvent=_i,t.FtFileButton=Di,t.FtFileButtonCssVariables={},t.styles=Li,Object.defineProperty(t,"i",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-file-button",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.56",
|
|
4
4
|
"description": "File",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-button": "0.3.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "0.3.
|
|
22
|
+
"@fluid-topics/ft-button": "0.3.56",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "0.3.56",
|
|
24
24
|
"lit": "2.2.8"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "e86edee2b2660d806320bacca5c5156bb94ca2d6"
|
|
27
27
|
}
|