@fluid-topics/ft-card 1.0.3 → 1.0.5
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-card.light.js +1 -1
- package/build/ft-card.min.js +1 -1
- package/package.json +5 -5
package/build/ft-card.light.js
CHANGED
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
<div class="ft-ripple--background"></div>
|
|
106
106
|
<div class="ft-ripple--effect"></div>
|
|
107
107
|
</div>
|
|
108
|
-
`}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"),r=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",r),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",r),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,r;return null!=i.x?({x:o,y:r}=i):null!=e.touches&&(o=e.touches[0].clientX,r=e.touches[0].clientY),{x:o,y:r}}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()}}u.elementDefinitions={},u.styles=c,g([o.property({type:Boolean})],u.prototype,"primary",void 0),g([o.property({type:Boolean})],u.prototype,"secondary",void 0),g([o.property({type:Boolean})],u.prototype,"unbounded",void 0),g([o.property({type:Boolean})],u.prototype,"activated",void 0),g([o.property({type:Boolean})],u.prototype,"selected",void 0),g([o.property({type:Boolean})],u.prototype,"disabled",void 0),g([o.state()],u.prototype,"hovered",void 0),g([o.state()],u.prototype,"focused",void 0),g([o.state()],u.prototype,"pressed",void 0),g([o.state()],u.prototype,"rippling",void 0),g([o.state()],u.prototype,"rippleSize",void 0),g([o.state()],u.prototype,"originX",void 0),g([o.state()],u.prototype,"originY",void 0),g([o.query(".ft-ripple")],u.prototype,"ripple",void 0),g([o.query(".ft-ripple--effect")],u.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(u);const v=window,b=v.trustedTypes,m=b?b.createPolicy("lit-html",{createHTML:t=>t}):void 0,$="$lit$",x=`lit$${(Math.random()+"").slice(9)}$`,w="?"+x,k=`<${w}>`,z=document,S=()=>z.createComment(""),A=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,_="[ \t\n\f\r]",C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,E=/-->/g,N=/>/g,D=RegExp(`>|${_}(?:([^\\s"'>=/]+)(${_}*=${_}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),j=/'/g,B=/"/g,M=/^(?:script|style|textarea|title)$/i,I=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),R=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),T=new WeakMap,Z=z.createTreeWalker(z,129,null,!1),H=(t,i)=>{const e=t.length-1,o=[];let r,s=2===i?"<svg>":"",n=C;for(let i=0;i<e;i++){const e=t[i];let p,l,h=-1,a=0;for(;a<e.length&&(n.lastIndex=a,l=n.exec(e),null!==l);)a=n.lastIndex,n===C?"!--"===l[1]?n=E:void 0!==l[1]?n=N:void 0!==l[2]?(M.test(l[2])&&(r=RegExp("</"+l[2],"g")),n=D):void 0!==l[3]&&(n=D):n===D?">"===l[0]?(n=null!=r?r:C,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,p=l[1],n=void 0===l[3]?D:'"'===l[3]?B:j):n===B||n===j?n=D:n===E||n===N?n=C:(n=D,r=void 0);const f=n===D&&t[i+1].startsWith("/>")?" ":"";s+=n===C?e+k:h>=0?(o.push(p),e.slice(0,h)+$+e.slice(h)+x+f):e+x+(-2===h?(o.push(void 0),i):f)}const p=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(p):p,o]};class G{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let r=0,s=0;const n=t.length-1,p=this.parts,[l,h]=H(t,i);if(this.el=G.createElement(l,e),Z.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=Z.nextNode())&&p.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith($)||i.startsWith(x)){const e=h[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+$).split(x),i=/([.?@])?(.*)/.exec(e);p.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?L:"?"===i[1]?Y:"@"===i[1]?q:P})}else p.push({type:6,index:r})}for(const i of t)o.removeAttribute(i)}if(M.test(o.tagName)){const t=o.textContent.split(x),i=t.length-1;if(i>0){o.textContent=b?b.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],S()),Z.nextNode(),p.push({type:2,index:++r});o.append(t[i],S())}}}else if(8===o.nodeType)if(o.data===w)p.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(x,t+1));)p.push({type:7,index:r}),t+=x.length-1}r++}}static createElement(t,i){const e=z.createElement("template");return e.innerHTML=t,e}}function W(t,i,e=t,o){var r,s,n,p;if(i===R)return i;let l=void 0!==o?null===(r=e._$Co)||void 0===r?void 0:r[o]:e._$Cl;const h=A(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,e,o)),void 0!==o?(null!==(n=(p=e)._$Co)&&void 0!==n?n:p._$Co=[])[o]=l:e._$Cl=l),void 0!==l&&(i=W(t,l._$AS(t,i.values),l,o)),i}class F{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,r=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:z).importNode(e,!0);Z.currentNode=r;let s=Z.nextNode(),n=0,p=0,l=o[0];for(;void 0!==l;){if(n===l.index){let i;2===l.type?i=new K(s,s.nextSibling,this,t):1===l.type?i=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(i=new J(s,this,t)),this._$AV.push(i),l=o[++p]}n!==(null==l?void 0:l.index)&&(s=Z.nextNode(),n++)}return r}v(t){let i=0;for(const e of this._$AV)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 r;this.type=2,this._$AH=U,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0: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),A(t)?t===U||null==t||""===t?(this._$AH!==U&&this._$AR(),this._$AH=U):t!==this._$AH&&t!==R&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>O(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==U&&A(this._$AH)?this._$AA.nextSibling.data=t:this.$(z.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=G.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===r)this._$AH.v(e);else{const t=new F(r,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=T.get(t.strings);return void 0===i&&T.set(t.strings,i=new G(t)),i}T(t){O(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const r of t)o===i.length?i.push(e=new K(this.k(S()),this.k(S()),this,this.options)):e=i[o],e._$AI(r),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._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class P{constructor(t,i,e,o,r){this.type=1,this._$AH=U,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=r,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=U}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const r=this.strings;let s=!1;if(void 0===r)t=W(this,t,i,0),s=!A(t)||t!==this._$AH&&t!==R,s&&(this._$AH=t);else{const o=t;let n,p;for(t=r[0],n=0;n<r.length-1;n++)p=W(this,o[e+n],i,n),p===R&&(p=this._$AH[n]),s||(s=!A(p)||p!==this._$AH[n]),p===U?t=U:t!==U&&(t+=(null!=p?p:"")+r[n+1]),this._$AH[n]=p}s&&!o&&this.j(t)}j(t){t===U?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class L extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===U?void 0:t}}const X=b?b.emptyScript:"";class Y extends P{constructor(){super(...arguments),this.type=4}j(t){t&&t!==U?this.element.setAttribute(this.name,X):this.element.removeAttribute(this.name)}}class q extends P{constructor(t,i,e,o,r){super(t,i,e,o,r),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=W(this,t,i,0))&&void 0!==e?e:U)===R)return;const o=this._$AH,r=t===U&&o!==U||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==U&&(o===U||r);r&&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 J{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 Q=v.litHtmlPolyfillSupport;null==Q||Q(G,K),(null!==(y=v.litHtmlVersions)&&void 0!==y?y:v.litHtmlVersions=[]).push("2.7.3");
|
|
108
|
+
`}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((()=>this.defaultSetup()))}defaultSetup(){var t,i;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(i=this.target)&&void 0!==i?i:e),this.setRippleSize()}setupFor(t){if(this.setupDebouncer.cancel(),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"),r=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",r),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",r),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,r;return null!=i.x?({x:o,y:r}=i):null!=e.touches&&(o=e.touches[0].clientX,r=e.touches[0].clientY),{x:o,y:r}}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()}}u.elementDefinitions={},u.styles=c,g([o.property({type:Boolean})],u.prototype,"primary",void 0),g([o.property({type:Boolean})],u.prototype,"secondary",void 0),g([o.property({type:Boolean})],u.prototype,"unbounded",void 0),g([o.property({type:Boolean})],u.prototype,"activated",void 0),g([o.property({type:Boolean})],u.prototype,"selected",void 0),g([o.property({type:Boolean})],u.prototype,"disabled",void 0),g([o.state()],u.prototype,"hovered",void 0),g([o.state()],u.prototype,"focused",void 0),g([o.state()],u.prototype,"pressed",void 0),g([o.state()],u.prototype,"rippling",void 0),g([o.state()],u.prototype,"rippleSize",void 0),g([o.state()],u.prototype,"originX",void 0),g([o.state()],u.prototype,"originY",void 0),g([o.query(".ft-ripple")],u.prototype,"ripple",void 0),g([o.query(".ft-ripple--effect")],u.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(u);const v=window,b=v.trustedTypes,m=b?b.createPolicy("lit-html",{createHTML:t=>t}):void 0,$="$lit$",x=`lit$${(Math.random()+"").slice(9)}$`,w="?"+x,k=`<${w}>`,z=document,S=()=>z.createComment(""),A=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,_="[ \t\n\f\r]",C=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,E=/-->/g,N=/>/g,D=RegExp(`>|${_}(?:([^\\s"'>=/]+)(${_}*=${_}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),j=/'/g,B=/"/g,M=/^(?:script|style|textarea|title)$/i,I=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),R=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),T=new WeakMap,Z=z.createTreeWalker(z,129,null,!1),H=(t,i)=>{const e=t.length-1,o=[];let r,s=2===i?"<svg>":"",n=C;for(let i=0;i<e;i++){const e=t[i];let p,l,h=-1,a=0;for(;a<e.length&&(n.lastIndex=a,l=n.exec(e),null!==l);)a=n.lastIndex,n===C?"!--"===l[1]?n=E:void 0!==l[1]?n=N:void 0!==l[2]?(M.test(l[2])&&(r=RegExp("</"+l[2],"g")),n=D):void 0!==l[3]&&(n=D):n===D?">"===l[0]?(n=null!=r?r:C,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,p=l[1],n=void 0===l[3]?D:'"'===l[3]?B:j):n===B||n===j?n=D:n===E||n===N?n=C:(n=D,r=void 0);const f=n===D&&t[i+1].startsWith("/>")?" ":"";s+=n===C?e+k:h>=0?(o.push(p),e.slice(0,h)+$+e.slice(h)+x+f):e+x+(-2===h?(o.push(void 0),i):f)}const p=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(p):p,o]};class G{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let r=0,s=0;const n=t.length-1,p=this.parts,[l,h]=H(t,i);if(this.el=G.createElement(l,e),Z.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=Z.nextNode())&&p.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith($)||i.startsWith(x)){const e=h[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+$).split(x),i=/([.?@])?(.*)/.exec(e);p.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?L:"?"===i[1]?Y:"@"===i[1]?q:P})}else p.push({type:6,index:r})}for(const i of t)o.removeAttribute(i)}if(M.test(o.tagName)){const t=o.textContent.split(x),i=t.length-1;if(i>0){o.textContent=b?b.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],S()),Z.nextNode(),p.push({type:2,index:++r});o.append(t[i],S())}}}else if(8===o.nodeType)if(o.data===w)p.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(x,t+1));)p.push({type:7,index:r}),t+=x.length-1}r++}}static createElement(t,i){const e=z.createElement("template");return e.innerHTML=t,e}}function W(t,i,e=t,o){var r,s,n,p;if(i===R)return i;let l=void 0!==o?null===(r=e._$Co)||void 0===r?void 0:r[o]:e._$Cl;const h=A(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,e,o)),void 0!==o?(null!==(n=(p=e)._$Co)&&void 0!==n?n:p._$Co=[])[o]=l:e._$Cl=l),void 0!==l&&(i=W(t,l._$AS(t,i.values),l,o)),i}class F{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,r=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:z).importNode(e,!0);Z.currentNode=r;let s=Z.nextNode(),n=0,p=0,l=o[0];for(;void 0!==l;){if(n===l.index){let i;2===l.type?i=new K(s,s.nextSibling,this,t):1===l.type?i=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(i=new J(s,this,t)),this._$AV.push(i),l=o[++p]}n!==(null==l?void 0:l.index)&&(s=Z.nextNode(),n++)}return r}v(t){let i=0;for(const e of this._$AV)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 r;this.type=2,this._$AH=U,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0: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),A(t)?t===U||null==t||""===t?(this._$AH!==U&&this._$AR(),this._$AH=U):t!==this._$AH&&t!==R&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>O(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==U&&A(this._$AH)?this._$AA.nextSibling.data=t:this.$(z.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=G.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===r)this._$AH.v(e);else{const t=new F(r,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=T.get(t.strings);return void 0===i&&T.set(t.strings,i=new G(t)),i}T(t){O(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const r of t)o===i.length?i.push(e=new K(this.k(S()),this.k(S()),this,this.options)):e=i[o],e._$AI(r),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._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class P{constructor(t,i,e,o,r){this.type=1,this._$AH=U,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=r,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=U}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const r=this.strings;let s=!1;if(void 0===r)t=W(this,t,i,0),s=!A(t)||t!==this._$AH&&t!==R,s&&(this._$AH=t);else{const o=t;let n,p;for(t=r[0],n=0;n<r.length-1;n++)p=W(this,o[e+n],i,n),p===R&&(p=this._$AH[n]),s||(s=!A(p)||p!==this._$AH[n]),p===U?t=U:t!==U&&(t+=(null!=p?p:"")+r[n+1]),this._$AH[n]=p}s&&!o&&this.j(t)}j(t){t===U?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class L extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===U?void 0:t}}const X=b?b.emptyScript:"";class Y extends P{constructor(){super(...arguments),this.type=4}j(t){t&&t!==U?this.element.setAttribute(this.name,X):this.element.removeAttribute(this.name)}}class q extends P{constructor(t,i,e,o,r){super(t,i,e,o,r),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=W(this,t,i,0))&&void 0!==e?e:U)===R)return;const o=this._$AH,r=t===U&&o!==U||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==U&&(o===U||r);r&&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 J{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 Q=v.litHtmlPolyfillSupport;null==Q||Q(G,K),(null!==(y=v.litHtmlVersions)&&void 0!==y?y:v.litHtmlVersions=[]).push("2.7.3");
|
|
109
109
|
/**
|
|
110
110
|
* @license
|
|
111
111
|
* Copyright 2020 Google LLC
|
package/build/ft-card.min.js
CHANGED
|
@@ -213,7 +213,7 @@ const kt=1;class Nt{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i)
|
|
|
213
213
|
<div class="ft-ripple--background"></div>
|
|
214
214
|
<div class="ft-ripple--effect"></div>
|
|
215
215
|
</div>
|
|
216
|
-
`}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
|
|
216
|
+
`}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((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i),this.setRippleSize()}setupFor(t){if(this.setupDebouncer.cancel(),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"),r=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",r),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",r),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,r;return null!=e.x?({x:o,y:r}=e):null!=i.touches&&(o=i.touches[0].clientX,r=i.touches[0].clientY),{x:o,y:r}}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()}}zt.elementDefinitions={},zt.styles=Lt,Pt([o({type:Boolean})],zt.prototype,"primary",void 0),Pt([o({type:Boolean})],zt.prototype,"secondary",void 0),Pt([o({type:Boolean})],zt.prototype,"unbounded",void 0),Pt([o({type:Boolean})],zt.prototype,"activated",void 0),Pt([o({type:Boolean})],zt.prototype,"selected",void 0),Pt([o({type:Boolean})],zt.prototype,"disabled",void 0),Pt([r()],zt.prototype,"hovered",void 0),Pt([r()],zt.prototype,"focused",void 0),Pt([r()],zt.prototype,"pressed",void 0),Pt([r()],zt.prototype,"rippling",void 0),Pt([r()],zt.prototype,"rippleSize",void 0),Pt([r()],zt.prototype,"originX",void 0),Pt([r()],zt.prototype,"originY",void 0),Pt([s(".ft-ripple")],zt.prototype,"ripple",void 0),Pt([s(".ft-ripple--effect")],zt.prototype,"rippleEffect",void 0),l("ft-ripple")(zt);
|
|
217
217
|
/**
|
|
218
218
|
* @license
|
|
219
219
|
* Copyright 2020 Google LLC
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-card",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "A file uploader with drag and drop",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-ripple": "1.0.
|
|
23
|
-
"@fluid-topics/ft-typography": "1.0.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-ripple": "1.0.5",
|
|
23
|
+
"@fluid-topics/ft-typography": "1.0.5",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "1.0.5",
|
|
25
25
|
"lit": "2.7.2"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "a4987091424b3c8b5e36193a8b854eddfe44d439"
|
|
28
28
|
}
|