@fluid-topics/ft-file-drop 1.0.55 → 1.0.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.
@@ -20,6 +20,30 @@
20
20
  opacity: 0;
21
21
  }
22
22
 
23
+ .ft-ripple .ft-ripple--effect {
24
+ aspect-ratio: 1;
25
+ width: auto;
26
+ height: auto;
27
+ min-width: 170%;
28
+ min-height: 170%;
29
+ }
30
+
31
+ .ft-ripple .ft-ripple--background{
32
+ width: 100%;
33
+ height: 100%;
34
+ }
35
+
36
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
37
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
38
+ aspect-ratio: 1;
39
+ width: auto;
40
+ height: auto;
41
+ max-width: unset;
42
+ max-height: unset;
43
+ min-width: 100%;
44
+ min-height: 100%;
45
+ }
46
+
23
47
  .ft-ripple .ft-ripple--background {
24
48
  background-color: ${l.backgroundColor};
25
49
  }
@@ -47,8 +71,6 @@
47
71
  .ft-ripple .ft-ripple--background {
48
72
  top: 0;
49
73
  left: 0;
50
- height: 100%;
51
- width: 100%;
52
74
  transition: opacity 75ms linear;
53
75
  }
54
76
 
@@ -88,14 +110,8 @@
88
110
  opacity: ${l.opacityContentOnSurfacePressed};
89
111
  transform: translate(-50%, -50%) scale(1);
90
112
  }
91
- `;var g,x=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 v 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),r=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-r.x:r.width/2),this.originY=Math.round(null!=n?n-r.y:r.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.isFocusVisible(null==t?void 0:t.target)&&!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`
113
+ `;var g,x=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 v 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.originX=0,this.originY=0,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),r=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-r.x:r.width/2),this.originY=Math.round(null!=n?n-r.y:r.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.isFocusVisible(null==t?void 0:t.target)&&!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`
92
114
  <style>
93
- .ft-ripple .ft-ripple--effect,
94
- .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
95
- width: ${this.rippleSize}px;
96
- height: ${this.rippleSize}px;
97
- }
98
-
99
115
  .ft-ripple .ft-ripple--effect {
100
116
  left: ${this.originX}px;
101
117
  top: ${this.originY}px;
@@ -105,7 +121,7 @@
105
121
  <div class="ft-ripple--background"></div>
106
122
  <div class="ft-ripple--effect"></div>
107
123
  </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((()=>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"),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}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}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()}}v.elementDefinitions={},v.styles=u,x([o.property({type:Boolean})],v.prototype,"primary",void 0),x([o.property({type:Boolean})],v.prototype,"secondary",void 0),x([o.property({type:Boolean})],v.prototype,"unbounded",void 0),x([o.property({type:Boolean})],v.prototype,"activated",void 0),x([o.property({type:Boolean})],v.prototype,"selected",void 0),x([o.property({type:Boolean})],v.prototype,"disabled",void 0),x([o.state()],v.prototype,"hovered",void 0),x([o.state()],v.prototype,"focused",void 0),x([o.state()],v.prototype,"pressed",void 0),x([o.state()],v.prototype,"rippling",void 0),x([o.state()],v.prototype,"rippleSize",void 0),x([o.state()],v.prototype,"originX",void 0),x([o.state()],v.prototype,"originY",void 0),x([o.query(".ft-ripple")],v.prototype,"ripple",void 0),x([o.query(".ft-ripple--effect")],v.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(v);const b=window,y=b.trustedTypes,m=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,$="$lit$",w=`lit$${(Math.random()+"").slice(9)}$`,k="?"+w,z=`<${k}>`,S=document,C=()=>S.createComment(""),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,O="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,N=/>/g,T=RegExp(`>|${O}(?:([^\\s"'>=/]+)(${O}*=${O}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,A=/"/g,F=/^(?:script|style|textarea|title)$/i,M=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),U=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),D=new WeakMap,R=S.createTreeWalker(S,129,null,!1),W=(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,a,p=-1,h=0;for(;h<e.length&&(s.lastIndex=h,a=s.exec(e),null!==a);)h=s.lastIndex,s===j?"!--"===a[1]?s=B:void 0!==a[1]?s=N:void 0!==a[2]?(F.test(a[2])&&(n=RegExp("</"+a[2],"g")),s=T):void 0!==a[3]&&(s=T):s===T?">"===a[0]?(s=null!=n?n:j,p=-1):void 0===a[1]?p=-2:(p=s.lastIndex-a[2].length,l=a[1],s=void 0===a[3]?T:'"'===a[3]?A:Z):s===A||s===Z?s=T:s===B||s===N?s=j:(s=T,n=void 0);const f=s===T&&t[i+1].startsWith("/>")?" ":"";r+=s===j?e+z:p>=0?(o.push(l),e.slice(0,p)+$+e.slice(p)+w+f):e+w+(-2===p?(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 L{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,r=0;const s=t.length-1,l=this.parts,[a,p]=W(t,i);if(this.el=L.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<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith($)||i.startsWith(w)){const e=p[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+$).split(w),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?V:"?"===i[1]?X:"@"===i[1]?Y:G})}else l.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(F.test(o.tagName)){const t=o.textContent.split(w),i=t.length-1;if(i>0){o.textContent=y?y.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],C()),R.nextNode(),l.push({type:2,index:++n});o.append(t[i],C())}}}else if(8===o.nodeType)if(o.data===k)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(w,t+1));)l.push({type:7,index:n}),t+=w.length-1}n++}}static createElement(t,i){const e=S.createElement("template");return e.innerHTML=t,e}}function H(t,i,e=t,o){var n,r,s,l;if(i===U)return i;let a=void 0!==o?null===(n=e._$Co)||void 0===n?void 0:n[o]:e._$Cl;const p=E(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,e,o)),void 0!==o?(null!==(s=(l=e)._$Co)&&void 0!==s?s:l._$Co=[])[o]=a:e._$Cl=a),void 0!==a&&(i=H(t,a._$AS(t,i.values),a,o)),i}class P{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,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:S).importNode(e,!0);R.currentNode=n;let r=R.nextNode(),s=0,l=0,a=o[0];for(;void 0!==a;){if(s===a.index){let i;2===a.type?i=new K(r,r.nextSibling,this,t):1===a.type?i=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(i=new J(r,this,t)),this._$AV.push(i),a=o[++l]}s!==(null==a?void 0:a.index)&&(r=R.nextNode(),s++)}return n}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 n;this.type=2,this._$AH=_,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=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._$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=H(this,t,i),E(t)?t===_||null==t||""===t?(this._$AH!==_&&this._$AR(),this._$AH=_):t!==this._$AH&&t!==U&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>I(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!==_&&E(this._$AH)?this._$AA.nextSibling.data=t:this.$(S.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=L.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.v(e);else{const t=new P(n,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=D.get(t.strings);return void 0===i&&D.set(t.strings,i=new L(t)),i}T(t){I(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.k(C()),this.k(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._$Cp=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=_,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=_}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=H(this,t,i,0),r=!E(t)||t!==this._$AH&&t!==U,r&&(this._$AH=t);else{const o=t;let s,l;for(t=n[0],s=0;s<n.length-1;s++)l=H(this,o[e+s],i,s),l===U&&(l=this._$AH[s]),r||(r=!E(l)||l!==this._$AH[s]),l===_?t=_:t!==_&&(t+=(null!=l?l:"")+n[s+1]),this._$AH[s]=l}r&&!o&&this.j(t)}j(t){t===_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class V extends G{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===_?void 0:t}}const q=y?y.emptyScript:"";class X extends G{constructor(){super(...arguments),this.type=4}j(t){t&&t!==_?this.element.setAttribute(this.name,q):this.element.removeAttribute(this.name)}}class Y 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=H(this,t,i,0))&&void 0!==e?e:_)===U)return;const o=this._$AH,n=t===_&&o!==_||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==_&&(o===_||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 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){H(this,t)}}const Q=b.litHtmlPolyfillSupport;null==Q||Q(L,K),(null!==(g=b.litHtmlVersions)&&void 0!==g?g:b.litHtmlVersions=[]).push("2.7.3");
124
+ `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var i,e;super.update(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"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}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)}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"),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}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}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.endRipple()}}v.elementDefinitions={},v.styles=u,x([o.property({type:Boolean})],v.prototype,"primary",void 0),x([o.property({type:Boolean})],v.prototype,"secondary",void 0),x([o.property({type:Boolean})],v.prototype,"unbounded",void 0),x([o.property({type:Boolean})],v.prototype,"activated",void 0),x([o.property({type:Boolean})],v.prototype,"selected",void 0),x([o.property({type:Boolean})],v.prototype,"disabled",void 0),x([o.state()],v.prototype,"hovered",void 0),x([o.state()],v.prototype,"focused",void 0),x([o.state()],v.prototype,"pressed",void 0),x([o.state()],v.prototype,"rippling",void 0),x([o.state()],v.prototype,"originX",void 0),x([o.state()],v.prototype,"originY",void 0),x([o.query(".ft-ripple")],v.prototype,"ripple",void 0),x([o.query(".ft-ripple--effect")],v.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(v);const b=window,y=b.trustedTypes,m=y?y.createPolicy("lit-html",{createHTML:t=>t}):void 0,$="$lit$",w=`lit$${(Math.random()+"").slice(9)}$`,k="?"+w,z=`<${k}>`,S=document,C=()=>S.createComment(""),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,O="[ \t\n\f\r]",j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,N=/>/g,T=RegExp(`>|${O}(?:([^\\s"'>=/]+)(${O}*=${O}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,A=/"/g,F=/^(?:script|style|textarea|title)$/i,M=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),U=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),D=new WeakMap,R=S.createTreeWalker(S,129,null,!1),W=(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,a,p=-1,h=0;for(;h<e.length&&(s.lastIndex=h,a=s.exec(e),null!==a);)h=s.lastIndex,s===j?"!--"===a[1]?s=B:void 0!==a[1]?s=N:void 0!==a[2]?(F.test(a[2])&&(n=RegExp("</"+a[2],"g")),s=T):void 0!==a[3]&&(s=T):s===T?">"===a[0]?(s=null!=n?n:j,p=-1):void 0===a[1]?p=-2:(p=s.lastIndex-a[2].length,l=a[1],s=void 0===a[3]?T:'"'===a[3]?A:Z):s===A||s===Z?s=T:s===B||s===N?s=j:(s=T,n=void 0);const f=s===T&&t[i+1].startsWith("/>")?" ":"";r+=s===j?e+z:p>=0?(o.push(l),e.slice(0,p)+$+e.slice(p)+w+f):e+w+(-2===p?(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 L{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let n=0,r=0;const s=t.length-1,l=this.parts,[a,p]=W(t,i);if(this.el=L.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<s;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith($)||i.startsWith(w)){const e=p[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+$).split(w),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:n,name:i[2],strings:t,ctor:"."===i[1]?V:"?"===i[1]?X:"@"===i[1]?Y:G})}else l.push({type:6,index:n})}for(const i of t)o.removeAttribute(i)}if(F.test(o.tagName)){const t=o.textContent.split(w),i=t.length-1;if(i>0){o.textContent=y?y.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],C()),R.nextNode(),l.push({type:2,index:++n});o.append(t[i],C())}}}else if(8===o.nodeType)if(o.data===k)l.push({type:2,index:n});else{let t=-1;for(;-1!==(t=o.data.indexOf(w,t+1));)l.push({type:7,index:n}),t+=w.length-1}n++}}static createElement(t,i){const e=S.createElement("template");return e.innerHTML=t,e}}function H(t,i,e=t,o){var n,r,s,l;if(i===U)return i;let a=void 0!==o?null===(n=e._$Co)||void 0===n?void 0:n[o]:e._$Cl;const p=E(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==p&&(null===(r=null==a?void 0:a._$AO)||void 0===r||r.call(a,!1),void 0===p?a=void 0:(a=new p(t),a._$AT(t,e,o)),void 0!==o?(null!==(s=(l=e)._$Co)&&void 0!==s?s:l._$Co=[])[o]=a:e._$Cl=a),void 0!==a&&(i=H(t,a._$AS(t,i.values),a,o)),i}class P{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,n=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:S).importNode(e,!0);R.currentNode=n;let r=R.nextNode(),s=0,l=0,a=o[0];for(;void 0!==a;){if(s===a.index){let i;2===a.type?i=new K(r,r.nextSibling,this,t):1===a.type?i=new a.ctor(r,a.name,a.strings,this,t):6===a.type&&(i=new J(r,this,t)),this._$AV.push(i),a=o[++l]}s!==(null==a?void 0:a.index)&&(r=R.nextNode(),s++)}return n}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 n;this.type=2,this._$AH=_,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=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._$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=H(this,t,i),E(t)?t===_||null==t||""===t?(this._$AH!==_&&this._$AR(),this._$AH=_):t!==this._$AH&&t!==U&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>I(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!==_&&E(this._$AH)?this._$AA.nextSibling.data=t:this.$(S.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,n="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=L.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===n)this._$AH.v(e);else{const t=new P(n,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=D.get(t.strings);return void 0===i&&D.set(t.strings,i=new L(t)),i}T(t){I(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.k(C()),this.k(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._$Cp=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=_,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=_}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=H(this,t,i,0),r=!E(t)||t!==this._$AH&&t!==U,r&&(this._$AH=t);else{const o=t;let s,l;for(t=n[0],s=0;s<n.length-1;s++)l=H(this,o[e+s],i,s),l===U&&(l=this._$AH[s]),r||(r=!E(l)||l!==this._$AH[s]),l===_?t=_:t!==_&&(t+=(null!=l?l:"")+n[s+1]),this._$AH[s]=l}r&&!o&&this.j(t)}j(t){t===_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class V extends G{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===_?void 0:t}}const q=y?y.emptyScript:"";class X extends G{constructor(){super(...arguments),this.type=4}j(t){t&&t!==_?this.element.setAttribute(this.name,q):this.element.removeAttribute(this.name)}}class Y 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=H(this,t,i,0))&&void 0!==e?e:_)===U)return;const o=this._$AH,n=t===_&&o!==_||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==_&&(o===_||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 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){H(this,t)}}const Q=b.litHtmlPolyfillSupport;null==Q||Q(L,K),(null!==(g=b.litHtmlVersions)&&void 0!==g?g:b.litHtmlVersions=[]).push("2.7.3");
109
125
  /**
110
126
  * @license
111
127
  * Copyright 2020 Google LLC
@@ -126,6 +126,30 @@ var dt,ft;let ut=class extends N{constructor(){super(...arguments),this.renderOp
126
126
  opacity: 0;
127
127
  }
128
128
 
129
+ .ft-ripple .ft-ripple--effect {
130
+ aspect-ratio: 1;
131
+ width: auto;
132
+ height: auto;
133
+ min-width: 170%;
134
+ min-height: 170%;
135
+ }
136
+
137
+ .ft-ripple .ft-ripple--background{
138
+ width: 100%;
139
+ height: 100%;
140
+ }
141
+
142
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
143
+ .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
144
+ aspect-ratio: 1;
145
+ width: auto;
146
+ height: auto;
147
+ max-width: unset;
148
+ max-height: unset;
149
+ min-width: 100%;
150
+ min-height: 100%;
151
+ }
152
+
129
153
  .ft-ripple .ft-ripple--background {
130
154
  background-color: ${Tt.backgroundColor};
131
155
  }
@@ -153,8 +177,6 @@ var dt,ft;let ut=class extends N{constructor(){super(...arguments),this.renderOp
153
177
  .ft-ripple .ft-ripple--background {
154
178
  top: 0;
155
179
  left: 0;
156
- height: 100%;
157
- width: 100%;
158
180
  transition: opacity 75ms linear;
159
181
  }
160
182
 
@@ -194,14 +216,8 @@ var dt,ft;let ut=class extends N{constructor(){super(...arguments),this.renderOp
194
216
  opacity: ${Tt.opacityContentOnSurfacePressed};
195
217
  transform: translate(-50%, -50%) scale(1);
196
218
  }
197
- `;var Kt=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(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 Vt extends St{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(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(10),this.moveRipple=t=>{var i,e;let{x:o,y:n}=this.getCoordinates(t),r=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-r.x:r.width/2),this.originY=Math.round(null!=n?n-r.y:r.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.isFocusVisible(null==t?void 0:t.target)&&!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 q`
219
+ `;var Kt=function(t,i,e,o){for(var n,r=arguments.length,s=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,a=t.length-1;a>=0;a--)(n=t[a])&&(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 Vt extends St{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.originX=0,this.originY=0,this.debouncer=new i(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(10),this.moveRipple=t=>{var i,e;let{x:o,y:n}=this.getCoordinates(t),r=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-r.x:r.width/2),this.originY=Math.round(null!=n?n-r.y:r.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.isFocusVisible(null==t?void 0:t.target)&&!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 q`
198
220
  <style>
199
- .ft-ripple .ft-ripple--effect,
200
- .ft-ripple.ft-ripple--unbounded .ft-ripple--background {
201
- width: ${this.rippleSize}px;
202
- height: ${this.rippleSize}px;
203
- }
204
-
205
221
  .ft-ripple .ft-ripple--effect {
206
222
  left: ${this.originX}px;
207
223
  top: ${this.originY}px;
@@ -211,7 +227,7 @@ var dt,ft;let ut=class extends N{constructor(){super(...arguments),this.renderOp
211
227
  <div class="ft-ripple--background"></div>
212
228
  <div class="ft-ripple--effect"></div>
213
229
  </div>
214
- `}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"),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}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}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()}}Vt.elementDefinitions={},Vt.styles=Zt,Kt([o({type:Boolean})],Vt.prototype,"primary",void 0),Kt([o({type:Boolean})],Vt.prototype,"secondary",void 0),Kt([o({type:Boolean})],Vt.prototype,"unbounded",void 0),Kt([o({type:Boolean})],Vt.prototype,"activated",void 0),Kt([o({type:Boolean})],Vt.prototype,"selected",void 0),Kt([o({type:Boolean})],Vt.prototype,"disabled",void 0),Kt([n()],Vt.prototype,"hovered",void 0),Kt([n()],Vt.prototype,"focused",void 0),Kt([n()],Vt.prototype,"pressed",void 0),Kt([n()],Vt.prototype,"rippling",void 0),Kt([n()],Vt.prototype,"rippleSize",void 0),Kt([n()],Vt.prototype,"originX",void 0),Kt([n()],Vt.prototype,"originY",void 0),Kt([s(".ft-ripple")],Vt.prototype,"ripple",void 0),Kt([s(".ft-ripple--effect")],Vt.prototype,"rippleEffect",void 0),h("ft-ripple")(Vt);
230
+ `}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var i,e;super.update(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"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}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)}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"),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}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}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.endRipple()}}Vt.elementDefinitions={},Vt.styles=Zt,Kt([o({type:Boolean})],Vt.prototype,"primary",void 0),Kt([o({type:Boolean})],Vt.prototype,"secondary",void 0),Kt([o({type:Boolean})],Vt.prototype,"unbounded",void 0),Kt([o({type:Boolean})],Vt.prototype,"activated",void 0),Kt([o({type:Boolean})],Vt.prototype,"selected",void 0),Kt([o({type:Boolean})],Vt.prototype,"disabled",void 0),Kt([n()],Vt.prototype,"hovered",void 0),Kt([n()],Vt.prototype,"focused",void 0),Kt([n()],Vt.prototype,"pressed",void 0),Kt([n()],Vt.prototype,"rippling",void 0),Kt([n()],Vt.prototype,"originX",void 0),Kt([n()],Vt.prototype,"originY",void 0),Kt([s(".ft-ripple")],Vt.prototype,"ripple",void 0),Kt([s(".ft-ripple--effect")],Vt.prototype,"rippleEffect",void 0),h("ft-ripple")(Vt);
215
231
  /**
216
232
  * @license
217
233
  * Copyright 2020 Google LLC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-file-drop",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
4
4
  "description": "Container that accepts dropping files",
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-chip": "1.0.55",
23
- "@fluid-topics/ft-wc-utils": "1.0.55",
22
+ "@fluid-topics/ft-chip": "1.0.56",
23
+ "@fluid-topics/ft-wc-utils": "1.0.56",
24
24
  "lit": "2.7.2"
25
25
  },
26
- "gitHead": "4eca32ed1fec3fd25b6d76b26895a6318cfa8ca2"
26
+ "gitHead": "da00d6ea6bfc74fef8c6687f383355e35a26289b"
27
27
  }