@fluid-topics/ft-file-drop 0.3.18 → 0.3.20
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-drop.light.js +121 -121
- package/build/ft-file-drop.min.js +157 -157
- package/package.json +4 -4
|
@@ -104,127 +104,127 @@
|
|
|
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()}}x.elementDefinitions={},x.styles=g,u([o.property({type:Boolean})],x.prototype,"primary",void 0),u([o.property({type:Boolean})],x.prototype,"secondary",void 0),u([o.property({type:Boolean})],x.prototype,"unbounded",void 0),u([o.property({type:Boolean})],x.prototype,"activated",void 0),u([o.property({type:Boolean})],x.prototype,"selected",void 0),u([o.property({type:Boolean})],x.prototype,"disabled",void 0),u([o.state()],x.prototype,"hovered",void 0),u([o.state()],x.prototype,"focused",void 0),u([o.state()],x.prototype,"pressed",void 0),u([o.state()],x.prototype,"rippling",void 0),u([o.state()],x.prototype,"rippleSize",void 0),u([o.state()],x.prototype,"originX",void 0),u([o.state()],x.prototype,"originY",void 0),u([o.query(".ft-ripple")],x.prototype,"ripple",void 0),u([o.query(".ft-ripple--effect")],x.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(x);const v=globalThis.trustedTypes,b=v?v.createPolicy("lit-html",{createHTML:t=>t}):void 0,m=`lit$${(Math.random()+"").slice(9)}$`,$="?"+m,w=`<${$}>`,k=document,z=(t="")=>k.createComment(t),C=t=>null===t||"object"!=typeof t&&"function"!=typeof t,S=Array.isArray,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,j=/-->/g,E=/>/g,I=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),N=/'/g,B=/"/g,A=/^(?:script|style|textarea|title)$/i,U=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),_=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),M=new WeakMap,D=k.createTreeWalker(k,129,null,!1),F=(t,i)=>{const e=t.length-1,o=[];let n,r=2===i?"<svg>":"",s=O;for(let i=0;i<e;i++){const e=t[i];let l,p,a=-1,h=0;for(;h<e.length&&(s.lastIndex=h,p=s.exec(e),null!==p);)h=s.lastIndex,s===O?"!--"===p[1]?s=j:void 0!==p[1]?s=E:void 0!==p[2]?(A.test(p[2])&&(n=RegExp("</"+p[2],"g")),s=I):void 0!==p[3]&&(s=I):s===I?">"===p[0]?(s=null!=n?n:O,a=-1):void 0===p[1]?a=-2:(a=s.lastIndex-p[2].length,l=p[1],s=void 0===p[3]?I:'"'===p[3]?B:N):s===B||s===N?s=I:s===j||s===E?s=O:(s=I,n=void 0);const f=s===I&&t[i+1].startsWith("/>")?" ":"";r+=s===O?e+w:a>=0?(o.push(l),e.slice(0,a)+"$lit$"+e.slice(a)+m+f):e+m+(-2===a?(o.push(void 0),i):f)}const l=r+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==b?b.createHTML(l):l,o]};class R{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,r=0;const s=t.length-1,l=this.parts,[p,a]=F(t,i);if(this.el=R.createElement(p,e),D.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=D.nextNode())&&l.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(m)){const e=a[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(m),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?G:"?"===i[1]?L:"@"===i[1]?q:P})}else l.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(A.test(o.tagName)){const t=o.textContent.split(m),i=t.length-1;if(i>0){o.textContent=v?v.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],z()),D.nextNode(),l.push({type:2,index:++n});o.append(t[i],z())}}}else if(8===o.nodeType)if(o.data===$)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(m,t+1));)l.push({type:7,index:n}),t+=m.length-1}n++}}static createElement(t,i){const e=k.createElement("template");return e.innerHTML=t,e}}function Z(t,i,e=t,o){var n,r,s,l;if(i===_)return i;let p=void 0!==o?null===(n=e._$Cl)||void 0===n?void 0:n[o]:e._$Cu;const a=C(i)?void 0:i._$litDirective$;return(null==p?void 0:p.constructor)!==a&&(null===(r=null==p?void 0:p._$AO)||void 0===r||r.call(p,!1),void 0===a?p=void 0:(p=new a(t),p._$AT(t,e,o)),void 0!==o?(null!==(s=(l=e)._$Cl)&&void 0!==s?s:l._$Cl=[])[o]=p:e._$Cu=p),void 0!==p&&(i=Z(t,p._$AS(t,i.values),p,o)),i}class W{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:o}=this._$AD,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:k).importNode(e,!0);D.currentNode=n;let r=D.nextNode(),s=0,l=0,p=o[0];for(;void 0!==p;){if(s===p.index){let i;2===p.type?i=new K(r,r.nextSibling,this,t):1===p.type?i=new p.ctor(r,p.name,p.strings,this,t):6===p.type&&(i=new X(r,this,t)),this.v.push(i),p=o[++l]}s!==(null==p?void 0:p.index)&&(r=D.nextNode(),s++)}return n}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class K{constructor(t,i,e,o){var n;this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$C_=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._$C_}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=Z(this,t,i),C(t)?t===T||null==t||""===t?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==_&&this.T(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.k(t):(t=>S(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.S(t):this.T(t)}j(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}k(t){this._$AH!==t&&(this._$AR(),this._$AH=this.j(t))}T(t){this._$AH!==T&&C(this._$AH)?this._$AA.nextSibling.data=t:this.k(k.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=R.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.m(e);else{const t=new W(n,this),i=t.p(this.options);t.m(e),this.k(i),this._$AH=t}}_$AC(t){let i=M.get(t.strings);return void 0===i&&M.set(t.strings,i=new R(t)),i}S(t){S(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const n of t)o===i.length?i.push(e=new K(this.j(z()),this.j(z()),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._$C_=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class P{constructor(t,i,e,o,n){this.type=1,this._$AH=T,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=T}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let r=!1;if(void 0===n)t=Z(this,t,i,0),r=!C(t)||t!==this._$AH&&t!==_,r&&(this._$AH=t);else{const o=t;let s,l;for(t=n[0],s=0;s<n.length-1;s++)l=Z(this,o[e+s],i,s),l===_&&(l=this._$AH[s]),r||(r=!C(l)||l!==this._$AH[s]),l===T?t=T:t!==T&&(t+=(null!=l?l:"")+n[s+1]),this._$AH[s]=l}r&&!o&&this.P(t)}P(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class G extends P{constructor(){super(...arguments),this.type=3}P(t){this.element[this.name]=t===T?void 0:t}}const H=v?v.emptyScript:"";class L extends P{constructor(){super(...arguments),this.type=4}P(t){t&&t!==T?this.element.setAttribute(this.name,H):this.element.removeAttribute(this.name)}}class q extends P{constructor(t,i,e,o,n){super(t,i,e,o,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=Z(this,t,i,0))&&void 0!==e?e:T)===_)return;const o=this._$AH,n=t===T&&o!==T||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==T&&(o===T||n);n&&this.element.removeEventListener(this.name,this,o),r&&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){Z(this,t)}}const Y=window.litHtmlPolyfillSupport;null==Y||Y(R,K),(null!==(y=globalThis.litHtmlVersions)&&void 0!==y?y:globalThis.litHtmlVersions=[]).push("2.2.7");
|
|
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()}}x.elementDefinitions={},x.styles=g,u([o.property({type:Boolean})],x.prototype,"primary",void 0),u([o.property({type:Boolean})],x.prototype,"secondary",void 0),u([o.property({type:Boolean})],x.prototype,"unbounded",void 0),u([o.property({type:Boolean})],x.prototype,"activated",void 0),u([o.property({type:Boolean})],x.prototype,"selected",void 0),u([o.property({type:Boolean})],x.prototype,"disabled",void 0),u([o.state()],x.prototype,"hovered",void 0),u([o.state()],x.prototype,"focused",void 0),u([o.state()],x.prototype,"pressed",void 0),u([o.state()],x.prototype,"rippling",void 0),u([o.state()],x.prototype,"rippleSize",void 0),u([o.state()],x.prototype,"originX",void 0),u([o.state()],x.prototype,"originY",void 0),u([o.query(".ft-ripple")],x.prototype,"ripple",void 0),u([o.query(".ft-ripple--effect")],x.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(x);const v=window,b=v.trustedTypes,m=b?b.createPolicy("lit-html",{createHTML:t=>t}):void 0,$=`lit$${(Math.random()+"").slice(9)}$`,w="?"+$,k=`<${w}>`,z=document,C=(t="")=>z.createComment(t),S=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,E=/-->/g,I=/>/g,N=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),B=/'/g,A=/"/g,U=/^(?:script|style|textarea|title)$/i,_=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),M=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),T=new WeakMap,F=z.createTreeWalker(z,129,null,!1),R=(t,i)=>{const e=t.length-1,o=[];let n,r=2===i?"<svg>":"",s=j;for(let i=0;i<e;i++){const e=t[i];let l,p,a=-1,h=0;for(;h<e.length&&(s.lastIndex=h,p=s.exec(e),null!==p);)h=s.lastIndex,s===j?"!--"===p[1]?s=E:void 0!==p[1]?s=I:void 0!==p[2]?(U.test(p[2])&&(n=RegExp("</"+p[2],"g")),s=N):void 0!==p[3]&&(s=N):s===N?">"===p[0]?(s=null!=n?n:j,a=-1):void 0===p[1]?a=-2:(a=s.lastIndex-p[2].length,l=p[1],s=void 0===p[3]?N:'"'===p[3]?A:B):s===A||s===B?s=N:s===E||s===I?s=j:(s=N,n=void 0);const f=s===N&&t[i+1].startsWith("/>")?" ":"";r+=s===j?e+k:a>=0?(o.push(l),e.slice(0,a)+"$lit$"+e.slice(a)+$+f):e+$+(-2===a?(o.push(void 0),i):f)}const l=r+(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,r=0;const s=t.length-1,l=this.parts,[p,a]=R(t,i);if(this.el=Z.createElement(p,e),F.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=F.nextNode())&&l.length<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith($)){const e=a[r++];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]?X:H})}else l.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(U.test(o.tagName)){const t=o.textContent.split($),i=t.length-1;if(i>0){o.textContent=b?b.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],C()),F.nextNode(),l.push({type:2,index:++n});o.append(t[i],C())}}}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 W(t,i,e=t,o){var n,r,s,l;if(i===M)return i;let p=void 0!==o?null===(n=e._$Co)||void 0===n?void 0:n[o]:e._$Cl;const a=S(i)?void 0:i._$litDirective$;return(null==p?void 0:p.constructor)!==a&&(null===(r=null==p?void 0:p._$AO)||void 0===r||r.call(p,!1),void 0===a?p=void 0:(p=new a(t),p._$AT(t,e,o)),void 0!==o?(null!==(s=(l=e)._$Co)&&void 0!==s?s:l._$Co=[])[o]=p:e._$Cl=p),void 0!==p&&(i=W(t,p._$AS(t,i.values),p,o)),i}class K{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);F.currentNode=n;let r=F.nextNode(),s=0,l=0,p=o[0];for(;void 0!==p;){if(s===p.index){let i;2===p.type?i=new G(r,r.nextSibling,this,t):1===p.type?i=new p.ctor(r,p.name,p.strings,this,t):6===p.type&&(i=new Y(r,this,t)),this.u.push(i),p=o[++l]}s!==(null==p?void 0:p.index)&&(r=F.nextNode(),s++)}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 G{constructor(t,i,e,o){var n;this.type=2,this._$AH=D,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=W(this,t,i),S(t)?t===D||null==t||""===t?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==M&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>O(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!==D&&S(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 K(n,this),i=t.v(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let i=T.get(t.strings);return void 0===i&&T.set(t.strings,i=new Z(t)),i}k(t){O(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 G(this.O(C()),this.O(C()),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 H{constructor(t,i,e,o,n){this.type=1,this._$AH=D,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=D}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const n=this.strings;let r=!1;if(void 0===n)t=W(this,t,i,0),r=!S(t)||t!==this._$AH&&t!==M,r&&(this._$AH=t);else{const o=t;let s,l;for(t=n[0],s=0;s<n.length-1;s++)l=W(this,o[e+s],i,s),l===M&&(l=this._$AH[s]),r||(r=!S(l)||l!==this._$AH[s]),l===D?t=D:t!==D&&(t+=(null!=l?l:"")+n[s+1]),this._$AH[s]=l}r&&!o&&this.j(t)}j(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class L extends H{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===D?void 0:t}}const P=b?b.emptyScript:"";class q extends H{constructor(){super(...arguments),this.type=4}j(t){t&&t!==D?this.element.setAttribute(this.name,P):this.element.removeAttribute(this.name)}}class X extends H{constructor(t,i,e,o,n){super(t,i,e,o,n),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=W(this,t,i,0))&&void 0!==e?e:D)===M)return;const o=this._$AH,n=t===D&&o!==D||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==D&&(o===D||n);n&&this.element.removeEventListener(this.name,this,o),r&&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 Y{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){W(this,t)}}const J=v.litHtmlPolyfillSupport;null==J||J(Z,G),(null!==(y=v.litHtmlVersions)&&void 0!==y?y:v.litHtmlVersions=[]).push("2.4.0");
|
|
108
108
|
/**
|
|
109
109
|
* @license
|
|
110
110
|
* Copyright 2020 Google LLC
|
|
111
111
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
112
112
|
*/
|
|
113
|
-
const
|
|
113
|
+
const Q=Symbol.for(""),V=t=>{if((null==t?void 0:t.r)===Q)return null==t?void 0:t._$litStatic$},tt=t=>({_$litStatic$:t,r:Q}),it=new Map,et=(t=>(i,...e)=>{const o=e.length;let n,r;const s=[],l=[];let p,a=0,h=!1;for(;a<o;){for(p=i[a];a<o&&void 0!==(r=e[a],n=V(r));)p+=n+i[++a],h=!0;l.push(r),s.push(p),a++}if(a===o&&s.push(i[o]),h){const t=s.join("$$lit$$");void 0===(i=it.get(t))&&(s.raw=s,it.set(t,i=s)),e=l}return t(i,...e)})(_);var ot;!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"}(ot||(ot={}));const nt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),rt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),st={fontFamily:rt,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},lt=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",nt),pt=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",st.fontSize,"20px"),at=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",st.fontWeight,"normal"),ht=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",st.letterSpacing,"0.15px"),ft=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",st.lineHeight,"1.2"),ct=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",st.textTransform,"inherit"),dt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",nt),gt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",st.fontSize,"14px"),yt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",st.fontWeight,"normal"),ut=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",st.letterSpacing,"0.105px"),xt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",st.lineHeight,"1.7"),vt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",st.textTransform,"inherit"),bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",rt),mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",st.fontSize,"16px"),$t=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",st.fontWeight,"600"),wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",st.letterSpacing,"0.144px"),kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",st.lineHeight,"1.5"),zt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",st.textTransform,"inherit"),Ct=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",rt),St=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",st.fontSize,"14px"),Ot=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",st.fontWeight,"normal"),jt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",st.letterSpacing,"0.098px"),Et=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",st.lineHeight,"1.7"),It=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",st.textTransform,"inherit"),Nt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",rt),Bt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",st.fontSize,"16px"),At=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",st.fontWeight,"normal"),Ut=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",st.letterSpacing,"0.496px"),_t=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",st.lineHeight,"1.5"),Mt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",st.textTransform,"inherit"),Dt={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",rt),fontSize:i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",st.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",st.fontWeight,"normal"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",st.letterSpacing,"0.252px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",st.lineHeight,"1.4"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",st.textTransform,"inherit")},Tt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",rt),Ft=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",st.fontSize,"12px"),Rt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",st.fontWeight,"normal"),Zt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",st.letterSpacing,"0.396px"),Wt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",st.lineHeight,"1.33"),Kt=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",st.textTransform,"inherit"),Gt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",rt),Ht=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",st.fontSize,"10px"),Lt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",st.fontWeight,"normal"),Pt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",st.letterSpacing,"0.33px"),qt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",st.lineHeight,"1.6"),Xt=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",st.textTransform,"inherit"),Yt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",rt),Jt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",st.fontSize,"10px"),Qt=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",st.fontWeight,"normal"),Vt=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",st.letterSpacing,"1.5px"),ti=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",st.lineHeight,"1.6"),ii=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",st.textTransform,"uppercase"),ei=i.FtCssVariableFactory.extend("--ft-typography-button-font-family",rt),oi=i.FtCssVariableFactory.extend("--ft-typography-button-font-size",st.fontSize,"14px"),ni=i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",st.fontWeight,"600"),ri=i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",st.letterSpacing,"1.246px"),si=i.FtCssVariableFactory.extend("--ft-typography-button-line-height",st.lineHeight,"1.15"),li=i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",st.textTransform,"uppercase"),pi=e.css`
|
|
114
114
|
.ft-typography--title {
|
|
115
|
-
font-family: ${
|
|
116
|
-
font-size: ${
|
|
117
|
-
font-weight: ${
|
|
118
|
-
letter-spacing: ${
|
|
119
|
-
line-height: ${
|
|
120
|
-
text-transform: ${
|
|
121
|
-
}
|
|
122
|
-
`,pi=e.css`
|
|
123
|
-
.ft-typography--title-dense {
|
|
124
|
-
font-family: ${ct};
|
|
125
|
-
font-size: ${dt};
|
|
126
|
-
font-weight: ${gt};
|
|
127
|
-
letter-spacing: ${yt};
|
|
128
|
-
line-height: ${ut};
|
|
129
|
-
text-transform: ${xt};
|
|
115
|
+
font-family: ${lt};
|
|
116
|
+
font-size: ${pt};
|
|
117
|
+
font-weight: ${at};
|
|
118
|
+
letter-spacing: ${ht};
|
|
119
|
+
line-height: ${ft};
|
|
120
|
+
text-transform: ${ct};
|
|
130
121
|
}
|
|
131
122
|
`,ai=e.css`
|
|
132
|
-
.ft-typography--
|
|
133
|
-
font-family: ${
|
|
134
|
-
font-size: ${
|
|
135
|
-
font-weight: ${
|
|
136
|
-
letter-spacing: ${
|
|
137
|
-
line-height: ${
|
|
138
|
-
text-transform: ${
|
|
123
|
+
.ft-typography--title-dense {
|
|
124
|
+
font-family: ${dt};
|
|
125
|
+
font-size: ${gt};
|
|
126
|
+
font-weight: ${yt};
|
|
127
|
+
letter-spacing: ${ut};
|
|
128
|
+
line-height: ${xt};
|
|
129
|
+
text-transform: ${vt};
|
|
139
130
|
}
|
|
140
131
|
`,hi=e.css`
|
|
141
|
-
.ft-typography--
|
|
142
|
-
font-family: ${
|
|
143
|
-
font-size: ${
|
|
144
|
-
font-weight: ${
|
|
145
|
-
letter-spacing: ${
|
|
146
|
-
line-height: ${
|
|
147
|
-
text-transform: ${
|
|
132
|
+
.ft-typography--subtitle1 {
|
|
133
|
+
font-family: ${bt};
|
|
134
|
+
font-size: ${mt};
|
|
135
|
+
font-weight: ${$t};
|
|
136
|
+
letter-spacing: ${wt};
|
|
137
|
+
line-height: ${kt};
|
|
138
|
+
text-transform: ${zt};
|
|
148
139
|
}
|
|
149
|
-
|
|
150
140
|
`,fi=e.css`
|
|
151
|
-
.ft-typography--
|
|
152
|
-
font-family: ${
|
|
153
|
-
font-size: ${
|
|
154
|
-
font-weight: ${
|
|
155
|
-
letter-spacing: ${
|
|
156
|
-
line-height: ${
|
|
157
|
-
text-transform: ${
|
|
141
|
+
.ft-typography--subtitle2 {
|
|
142
|
+
font-family: ${Ct};
|
|
143
|
+
font-size: ${St};
|
|
144
|
+
font-weight: ${Ot};
|
|
145
|
+
letter-spacing: ${jt};
|
|
146
|
+
line-height: ${Et};
|
|
147
|
+
text-transform: ${It};
|
|
158
148
|
}
|
|
149
|
+
|
|
159
150
|
`,ci=e.css`
|
|
160
|
-
.ft-typography--
|
|
161
|
-
font-family: ${
|
|
162
|
-
font-size: ${
|
|
163
|
-
font-weight: ${
|
|
164
|
-
letter-spacing: ${
|
|
165
|
-
line-height: ${
|
|
166
|
-
text-transform: ${
|
|
151
|
+
.ft-typography--body1 {
|
|
152
|
+
font-family: ${Nt};
|
|
153
|
+
font-size: ${Bt};
|
|
154
|
+
font-weight: ${At};
|
|
155
|
+
letter-spacing: ${Ut};
|
|
156
|
+
line-height: ${_t};
|
|
157
|
+
text-transform: ${Mt};
|
|
167
158
|
}
|
|
168
159
|
`,di=e.css`
|
|
169
|
-
.ft-typography--
|
|
170
|
-
font-family: ${
|
|
171
|
-
font-size: ${Dt};
|
|
172
|
-
font-weight: ${
|
|
173
|
-
letter-spacing: ${
|
|
174
|
-
line-height: ${
|
|
175
|
-
text-transform: ${
|
|
160
|
+
.ft-typography--body2 {
|
|
161
|
+
font-family: ${Dt.fontFamily};
|
|
162
|
+
font-size: ${Dt.fontSize};
|
|
163
|
+
font-weight: ${Dt.fontWeight};
|
|
164
|
+
letter-spacing: ${Dt.letterSpacing};
|
|
165
|
+
line-height: ${Dt.lineHeight};
|
|
166
|
+
text-transform: ${Dt.textTransform};
|
|
176
167
|
}
|
|
177
168
|
`,gi=e.css`
|
|
178
|
-
.ft-typography--
|
|
179
|
-
font-family: ${
|
|
180
|
-
font-size: ${
|
|
181
|
-
font-weight: ${
|
|
182
|
-
letter-spacing: ${
|
|
183
|
-
line-height: ${
|
|
184
|
-
text-transform: ${
|
|
169
|
+
.ft-typography--caption {
|
|
170
|
+
font-family: ${Tt};
|
|
171
|
+
font-size: ${Ft};
|
|
172
|
+
font-weight: ${Rt};
|
|
173
|
+
letter-spacing: ${Zt};
|
|
174
|
+
line-height: ${Wt};
|
|
175
|
+
text-transform: ${Kt};
|
|
185
176
|
}
|
|
186
177
|
`,yi=e.css`
|
|
187
|
-
.ft-typography--
|
|
188
|
-
font-family: ${
|
|
189
|
-
font-size: ${
|
|
190
|
-
font-weight: ${
|
|
191
|
-
letter-spacing: ${
|
|
192
|
-
line-height: ${
|
|
193
|
-
text-transform: ${
|
|
178
|
+
.ft-typography--breadcrumb {
|
|
179
|
+
font-family: ${Gt};
|
|
180
|
+
font-size: ${Ht};
|
|
181
|
+
font-weight: ${Lt};
|
|
182
|
+
letter-spacing: ${Pt};
|
|
183
|
+
line-height: ${qt};
|
|
184
|
+
text-transform: ${Xt};
|
|
194
185
|
}
|
|
195
186
|
`,ui=e.css`
|
|
196
|
-
.ft-typography--
|
|
197
|
-
font-family: ${
|
|
198
|
-
font-size: ${
|
|
199
|
-
font-weight: ${
|
|
200
|
-
letter-spacing: ${
|
|
201
|
-
line-height: ${
|
|
202
|
-
text-transform: ${
|
|
187
|
+
.ft-typography--overline {
|
|
188
|
+
font-family: ${Yt};
|
|
189
|
+
font-size: ${Jt};
|
|
190
|
+
font-weight: ${Qt};
|
|
191
|
+
letter-spacing: ${Vt};
|
|
192
|
+
line-height: ${ti};
|
|
193
|
+
text-transform: ${ii};
|
|
203
194
|
}
|
|
204
195
|
`,xi=e.css`
|
|
196
|
+
.ft-typography--button {
|
|
197
|
+
font-family: ${ei};
|
|
198
|
+
font-size: ${oi};
|
|
199
|
+
font-weight: ${ni};
|
|
200
|
+
letter-spacing: ${ri};
|
|
201
|
+
line-height: ${si};
|
|
202
|
+
text-transform: ${li};
|
|
203
|
+
}
|
|
204
|
+
`,vi=e.css`
|
|
205
205
|
.ft-typography {
|
|
206
206
|
vertical-align: inherit;
|
|
207
207
|
}
|
|
208
|
-
`;var
|
|
209
|
-
<${
|
|
208
|
+
`;var bi,mi,$i=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class wi extends i.FtLitElement{constructor(){super(...arguments),this.variant=ot.body1}render(){return this.element?et`
|
|
209
|
+
<${tt(this.element)}
|
|
210
210
|
class="ft-typography ft-typography--${this.variant}">
|
|
211
211
|
<slot></slot>
|
|
212
|
-
</${
|
|
213
|
-
`:
|
|
212
|
+
</${tt(this.element)}>
|
|
213
|
+
`:et`
|
|
214
214
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
215
|
-
`}}
|
|
215
|
+
`}}wi.styles=[pi,ai,hi,fi,ci,di,gi,yi,ui,xi,vi],$i([o.property()],wi.prototype,"element",void 0),$i([o.property()],wi.prototype,"variant",void 0),i.customElement("ft-typography")(wi),function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(bi||(bi={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(mi||(mi={})),new Map([...["abw"].map((t=>[t,mi.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,mi.AUDIO])),...["avi"].map((t=>[t,mi.AVI])),...["chm","xhs"].map((t=>[t,mi.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,mi.CODE])),...["csv"].map((t=>[t,mi.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,mi.DITA])),...["epub"].map((t=>[t,mi.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,mi.EXCEL])),...["flac"].map((t=>[t,mi.FLAC])),...["gif"].map((t=>[t,mi.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,mi.GZIP])),...["html","htm","xhtml"].map((t=>[t,mi.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,mi.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,mi.JPEG])),...["json"].map((t=>[t,mi.JSON])),...["m4a","m4p"].map((t=>[t,mi.M4A])),...["mov","qt"].map((t=>[t,mi.MOV])),...["mp3"].map((t=>[t,mi.MP3])),...["mp4","m4v"].map((t=>[t,mi.MP4])),...["ogg","oga"].map((t=>[t,mi.OGG])),...["pdf","ps"].map((t=>[t,mi.PDF])),...["png"].map((t=>[t,mi.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,mi.POWERPOINT])),...["rar"].map((t=>[t,mi.RAR])),...["stp"].map((t=>[t,mi.STP])),...["txt","rtf","md","mdown"].map((t=>[t,mi.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,mi.VIDEO])),...["wav"].map((t=>[t,mi.WAV])),...["wma"].map((t=>[t,mi.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,mi.WORD])),...["xml","xsl","rdf"].map((t=>[t,mi.XML])),...["yaml","yml","x-yaml"].map((t=>[t,mi.YAML])),...["zip"].map((t=>[t,mi.ZIP]))]);const ki={size:i.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),fluidTopicsFontFamily:i.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),fileFormatFontFamily:i.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),materialFontFamily:i.FtCssVariableFactory.extend("--ft-icon-material-font-family",i.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),verticalAlign:i.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset")},zi=e.css`
|
|
216
216
|
:host {
|
|
217
217
|
display: inline-block;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
220
|
:host, i.ft-icon {
|
|
221
|
-
width: ${
|
|
222
|
-
height: ${
|
|
221
|
+
width: ${ki.size};
|
|
222
|
+
height: ${ki.size};
|
|
223
223
|
text-align: center;
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
i.ft-icon {
|
|
227
|
-
font-size: ${
|
|
227
|
+
font-size: ${ki.size};
|
|
228
228
|
line-height: 1;
|
|
229
229
|
font-weight: normal;
|
|
230
230
|
text-transform: none;
|
|
@@ -235,26 +235,26 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
235
235
|
text-rendering: auto;
|
|
236
236
|
-webkit-font-smoothing: antialiased;
|
|
237
237
|
-moz-osx-font-smoothing: grayscale;
|
|
238
|
-
vertical-align: ${
|
|
238
|
+
vertical-align: ${ki.verticalAlign};
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
.ft-icon--fluid-topics {
|
|
242
|
-
font-family: ${
|
|
242
|
+
font-family: ${ki.fluidTopicsFontFamily}, ft-icons, fticons, sans-serif;
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
.ft-icon--file-format {
|
|
246
|
-
font-family: ${
|
|
246
|
+
font-family: ${ki.fileFormatFontFamily}, ft-mime, sans-serif;
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
.ft-icon--material {
|
|
250
|
-
font-family: ${
|
|
250
|
+
font-family: ${ki.materialFontFamily}, "Material Icons", sans-serif;
|
|
251
251
|
}
|
|
252
|
-
`;var
|
|
252
|
+
`;var Ci;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ci||(Ci={}));var Si=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class Oi extends i.FtLitElement{constructor(){super(...arguments),this.variant=Ci.fluid_topics,this.resolvedIcon=e.nothing}render(){const t="material"!==this.variant||this.value;return e.html`
|
|
253
253
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
254
254
|
${r.unsafeHTML(this.resolvedIcon)}
|
|
255
255
|
<slot ?hidden=${t}></slot>
|
|
256
256
|
</i>
|
|
257
|
-
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case
|
|
257
|
+
`}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}update(t){super.update(t),["value","variant"].some((i=>t.has(i)))&&this.resolveIcon()}resolveIcon(){var t,i;let o=this.value||this.textContent;switch(this.variant){case Ci.file_format:this.resolvedIcon=null!==(t=mi[o.toUpperCase()])&&void 0!==t?t:o;break;case Ci.fluid_topics:this.resolvedIcon=null!==(i=bi[o.toUpperCase()])&&void 0!==i?i:o;break;default:this.resolvedIcon=this.value||e.nothing}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>{this.resolveIcon()}))}}Oi.elementDefinitions={},Oi.styles=zi,Si([o.property()],Oi.prototype,"variant",void 0),Si([o.property()],Oi.prototype,"value",void 0),Si([o.state()],Oi.prototype,"resolvedIcon",void 0),Si([o.query("slot")],Oi.prototype,"slottedContent",void 0),i.customElement("ft-icon")(Oi);const ji=i.FtCssVariableFactory.extend("--ft-chip-color",i.designSystemVariables.colorOnSurface),Ei={backgroundColor:i.FtCssVariableFactory.extend("--ft-chip-background-color",i.designSystemVariables.colorSurface),color:ji,fontSize:i.FtCssVariableFactory.extend("--ft-chip-font-size",Dt.fontSize),iconSize:i.FtCssVariableFactory.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:i.FtCssVariableFactory.extend("--ft-chip-ripple-color",ji),horizontalPadding:i.FtCssVariableFactory.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:i.FtCssVariableFactory.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),opacityDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOpacityDisabled,"Design system")},Ii=i.FtCssVariableFactory.extend("--ft-chip-highlighted-color",i.FtCssVariableFactory.extend("--ft-chip-color",i.designSystemVariables.colorOnPrimary)),Ni={backgroundColor:i.FtCssVariableFactory.extend("--ft-chip-highlighted-background-color",i.FtCssVariableFactory.extend("--ft-chip-background-color",i.designSystemVariables.colorPrimary)),color:Ii,rippleColor:i.FtCssVariableFactory.extend("--ft-chip-highlighted-ripple-color",Ii)},Bi=i.FtCssVariableFactory.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),Ai=i.FtCssVariableFactory.create("--ft-chip-dense-vertical-padding","SIZE","4px"),Ui=[i.noTextSelect,e.css`
|
|
258
258
|
:host {
|
|
259
259
|
display: inline-block;
|
|
260
260
|
max-width: 100%;
|
|
@@ -271,20 +271,20 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
271
271
|
box-sizing: border-box;
|
|
272
272
|
pointer-events: auto;
|
|
273
273
|
|
|
274
|
-
--ft-chip-internal-font-size: ${
|
|
274
|
+
--ft-chip-internal-font-size: ${Ei.fontSize};
|
|
275
275
|
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
276
|
-
${i.setVariable(
|
|
277
|
-
--ft-chip-internal-vertical-padding: ${
|
|
278
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
276
|
+
${i.setVariable(ki.size,Ei.iconSize)};
|
|
277
|
+
--ft-chip-internal-vertical-padding: ${Ei.verticalPadding};
|
|
278
|
+
--ft-chip-internal-horizontal-padding: ${Ei.horizontalPadding};
|
|
279
279
|
--ft-chip-internal-icon-padding: 3px;
|
|
280
|
-
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${
|
|
280
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), ${Ei.iconSize});
|
|
281
281
|
|
|
282
|
-
border: 1px solid ${
|
|
283
|
-
color: ${
|
|
284
|
-
${i.setVariable(l.color,
|
|
282
|
+
border: 1px solid ${Ei.colorOutline};
|
|
283
|
+
color: ${Ei.color};
|
|
284
|
+
${i.setVariable(l.color,Ei.rippleColor)};
|
|
285
285
|
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
286
286
|
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
287
|
-
background-color: ${
|
|
287
|
+
background-color: ${Ei.backgroundColor};
|
|
288
288
|
line-height: var(--ft-chip-internal-content-height);
|
|
289
289
|
}
|
|
290
290
|
|
|
@@ -294,8 +294,8 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
294
294
|
|
|
295
295
|
.ft-chip--dense {
|
|
296
296
|
--ft-chip-internal-icon-padding: 3px;
|
|
297
|
-
--ft-chip-internal-vertical-padding: ${
|
|
298
|
-
--ft-chip-internal-horizontal-padding: ${
|
|
297
|
+
--ft-chip-internal-vertical-padding: ${Ai};
|
|
298
|
+
--ft-chip-internal-horizontal-padding: ${Bi};
|
|
299
299
|
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
300
300
|
}
|
|
301
301
|
|
|
@@ -307,15 +307,15 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
307
307
|
cursor: default;
|
|
308
308
|
pointer-events: none;
|
|
309
309
|
filter: grayscale(1);
|
|
310
|
-
opacity: ${
|
|
310
|
+
opacity: ${Ei.opacityDisabled};
|
|
311
311
|
}
|
|
312
312
|
|
|
313
313
|
.ft-chip--highlighted {
|
|
314
314
|
border: none;
|
|
315
315
|
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
316
|
-
background-color: ${
|
|
317
|
-
${i.setVariable(l.color,
|
|
318
|
-
color: ${
|
|
316
|
+
background-color: ${Ni.backgroundColor};
|
|
317
|
+
${i.setVariable(l.color,Ni.rippleColor)};
|
|
318
|
+
color: ${Ni.color};
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
.ft-chip--clickable {
|
|
@@ -348,8 +348,8 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
348
348
|
vertical-align: bottom;
|
|
349
349
|
display: block;
|
|
350
350
|
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
351
|
-
${i.setVariable(
|
|
352
|
-
${i.setVariable(
|
|
351
|
+
${i.setVariable(Dt.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
352
|
+
${i.setVariable(Dt.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
.ft-chip--safari-fix .ft-chip--label {
|
|
@@ -384,7 +384,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
384
384
|
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container {
|
|
385
385
|
order: -1;
|
|
386
386
|
}
|
|
387
|
-
`];var
|
|
387
|
+
`];var _i=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class Mi extends CustomEvent{constructor(){super("icon-click")}}class Di extends i.FtLitElement{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}render(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":i.isSafari};return e.html`
|
|
388
388
|
<div class="${n.classMap(t)}"
|
|
389
389
|
aria-label="${this.getLabel()}"
|
|
390
390
|
tabindex="${this.interactionsOnChip?0:-1}"
|
|
@@ -403,7 +403,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
403
403
|
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
404
404
|
<ft-icon variant="material">${this.internalIcon}</ft-icon>
|
|
405
405
|
</div>
|
|
406
|
-
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new
|
|
406
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Mi))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Mi))}getLabel(){return this.label||this.textContent}get textContent(){var t,i;return null!==(i=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==i?i:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}}Di.elementDefinitions={"ft-ripple":x,"ft-typography":wi,"ft-icon":Oi},Di.styles=Ui,_i([o.property({type:Boolean})],Di.prototype,"highlighted",void 0),_i([o.property({type:Boolean})],Di.prototype,"removable",void 0),_i([o.property({type:Boolean})],Di.prototype,"disabled",void 0),_i([o.property({type:Boolean})],Di.prototype,"clickable",void 0),_i([o.property({type:Boolean})],Di.prototype,"iconClickable",void 0),_i([o.property({type:Boolean})],Di.prototype,"dense",void 0),_i([o.property({type:Boolean})],Di.prototype,"multiLine",void 0),_i([o.property({type:String})],Di.prototype,"label",void 0),_i([o.property({type:String})],Di.prototype,"icon",void 0),_i([o.property({type:Boolean})],Di.prototype,"trailingIcon",void 0),_i([o.query("ft-typography slot")],Di.prototype,"slottedContent",void 0),i.customElement("ft-chip")(Di);const Ti={zIndex:i.FtCssVariableFactory.create("--ft-file-drop-z-index","NUMBER","10"),hintBackgroundColor:i.FtCssVariableFactory.extend("--ft-file-drop-hint-background-color",i.designSystemVariables.colorSurface),hintColor:i.FtCssVariableFactory.extend("--ft-file-drop-hint-color",i.designSystemVariables.colorPrimary),errorColor:i.FtCssVariableFactory.extend("--ft-file-drop-error-color",i.designSystemVariables.colorError),borderRadius:i.FtCssVariableFactory.extend("--ft-file-drop-border-radius",i.designSystemVariables.borderRadiusL),borderWidth:i.FtCssVariableFactory.create("--ft-file-drop-border-width","SIZE","4px"),borderColor:i.FtCssVariableFactory.create("--ft-file-drop-border-color","COLOR","transparent"),visibleBorderColor:i.FtCssVariableFactory.extend("--ft-file-drop-visible-border-color",i.designSystemVariables.colorOutline),activeBorderColor:i.FtCssVariableFactory.extend("--ft-file-drop-active-border-color",i.designSystemVariables.colorPrimary)},Fi=e.css`
|
|
407
407
|
:host {
|
|
408
408
|
display: block;
|
|
409
409
|
position: relative;
|
|
@@ -412,16 +412,16 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
412
412
|
#container {
|
|
413
413
|
position: absolute;
|
|
414
414
|
inset: 0;
|
|
415
|
-
border: dashed ${
|
|
416
|
-
border-radius: ${
|
|
415
|
+
border: dashed ${Ti.borderWidth} ${Ti.borderColor};
|
|
416
|
+
border-radius: ${Ti.borderRadius};
|
|
417
417
|
}
|
|
418
418
|
|
|
419
419
|
#container.visible {
|
|
420
|
-
border-color: ${
|
|
420
|
+
border-color: ${Ti.visibleBorderColor}
|
|
421
421
|
}
|
|
422
422
|
|
|
423
423
|
#container.dragging {
|
|
424
|
-
border-color: ${
|
|
424
|
+
border-color: ${Ti.activeBorderColor}
|
|
425
425
|
}
|
|
426
426
|
|
|
427
427
|
slot {
|
|
@@ -435,7 +435,7 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
435
435
|
display: none;
|
|
436
436
|
position: absolute;
|
|
437
437
|
inset: 0;
|
|
438
|
-
z-index: ${
|
|
438
|
+
z-index: ${Ti.zIndex};
|
|
439
439
|
}
|
|
440
440
|
|
|
441
441
|
#container.dragging #overlay {
|
|
@@ -446,9 +446,9 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
446
446
|
z-index: 1;
|
|
447
447
|
position: absolute;
|
|
448
448
|
inset: 0;
|
|
449
|
-
background-color: ${
|
|
449
|
+
background-color: ${Ti.activeBorderColor};
|
|
450
450
|
opacity: 0.20;
|
|
451
|
-
border-radius: ${
|
|
451
|
+
border-radius: ${Ti.borderRadius};
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
#overlay-drop {
|
|
@@ -468,20 +468,20 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
468
468
|
|
|
469
469
|
#overlay-content ft-chip {
|
|
470
470
|
margin-bottom: 10%;
|
|
471
|
-
${i.setVariable(
|
|
472
|
-
${i.setVariable(
|
|
473
|
-
${i.setVariable(
|
|
471
|
+
${i.setVariable(Ei.color,Ti.hintColor)};
|
|
472
|
+
${i.setVariable(Ei.iconSize,"32px")};
|
|
473
|
+
${i.setVariable(Ei.colorOutline,"transparent")};
|
|
474
474
|
}
|
|
475
475
|
|
|
476
476
|
#overlay-content xft-chip[icon=error] {
|
|
477
|
-
${i.setVariable(
|
|
478
|
-
${i.setVariable(
|
|
477
|
+
${i.setVariable(Ei.color,Ti.errorColor)};
|
|
478
|
+
${i.setVariable(Ei.backgroundColor,Ti.hintBackgroundColor)};
|
|
479
479
|
}
|
|
480
480
|
|
|
481
481
|
[hidden] {
|
|
482
482
|
display: none;
|
|
483
483
|
}
|
|
484
|
-
`;var
|
|
484
|
+
`;var Ri=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(i,e,s):n(i,e))||s);return r>3&&s&&Object.defineProperty(i,e,s),s};class Zi extends CustomEvent{constructor(t){super("file-drop",{detail:{file:t}})}}class Wi extends i.FtLitElement{constructor(){super(...arguments),this.dropHint="Drop your file here",this.accept="",this.fileTypeError="Unsupported file type",this.visible=!1,this.dragging=!1,this.fileError=!1}render(){let t={dragging:this.dragging,visible:this.visible};return e.html`
|
|
485
485
|
<div id="container"
|
|
486
486
|
class="${n.classMap(t)}"
|
|
487
487
|
@dragenter=${this.onDragEnter}
|
|
@@ -499,4 +499,4 @@ const J=Symbol.for(""),Q=t=>{if((null==t?void 0:t.r)===J)return null==t?void 0:t
|
|
|
499
499
|
</div>
|
|
500
500
|
<slot></slot>
|
|
501
501
|
</div>
|
|
502
|
-
`}onDragEnter(t){this.dragging=!0,t.preventDefault()}onDragOver(t){t.preventDefault()}onDragLeave(t){this.dragging=!1,t.preventDefault()}async onDrop(t){if(t.preventDefault(),t.dataTransfer&&t.dataTransfer.files){let i=t.dataTransfer.files[0];!function(t,i,e){if(0==t.length)return!0;let o=t.replace(/\*/g,".*").replace(/,/g,"|").replace(/\./g,"\\."),n=new RegExp(o),r=i.includes(".")?"."+i.split(".").pop():void 0;return!(!r||!n.test(r))||n.test(e)}(this.accept,i.name,i.type)?(this.fileError=!0,setTimeout((()=>{this.dragging=!1,this.fileError=!1}),2e3)):(this.dragging=!1,this.dispatchEvent(new
|
|
502
|
+
`}onDragEnter(t){this.dragging=!0,t.preventDefault()}onDragOver(t){t.preventDefault()}onDragLeave(t){this.dragging=!1,t.preventDefault()}async onDrop(t){if(t.preventDefault(),t.dataTransfer&&t.dataTransfer.files){let i=t.dataTransfer.files[0];!function(t,i,e){if(0==t.length)return!0;let o=t.replace(/\*/g,".*").replace(/,/g,"|").replace(/\./g,"\\."),n=new RegExp(o),r=i.includes(".")?"."+i.split(".").pop():void 0;return!(!r||!n.test(r))||n.test(e)}(this.accept,i.name,i.type)?(this.fileError=!0,setTimeout((()=>{this.dragging=!1,this.fileError=!1}),2e3)):(this.dragging=!1,this.dispatchEvent(new Zi(i)))}}}Wi.elementDefinitions={"ft-chip":Di},Wi.styles=Fi,Ri([o.property()],Wi.prototype,"dropHint",void 0),Ri([o.property()],Wi.prototype,"accept",void 0),Ri([o.property()],Wi.prototype,"fileTypeError",void 0),Ri([o.property({type:Boolean})],Wi.prototype,"visible",void 0),Ri([o.state()],Wi.prototype,"dragging",void 0),Ri([o.state()],Wi.prototype,"fileError",void 0),i.customElement("ft-file-drop")(Wi),t.FileDropEvent=Zi,t.FtFileDrop=Wi,t.FtFileDropCssVariables=Ti,t.styles=Fi,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|