@fluid-topics/ft-file-drop 1.1.12 → 1.1.14
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.
|
@@ -540,7 +540,7 @@ const Q=Symbol.for(""),tt=t=>{if(t?.r===Q)return t?._$litStatic$},ot=t=>({_$litS
|
|
|
540
540
|
@focusin=${this.onHover}
|
|
541
541
|
@focusout=${this.onOut}
|
|
542
542
|
@touchstart=${this.onTouch}>
|
|
543
|
-
<slot part="slot"></slot>
|
|
543
|
+
<slot part="slot" @click=${this.onClick}></slot>
|
|
544
544
|
<div part="tooltip" role="tooltip" inert
|
|
545
545
|
class="ft-tooltip ft-tooltip--${this.validPosition}"
|
|
546
546
|
?hidden=${!this.visible}>
|
|
@@ -550,7 +550,7 @@ const Q=Symbol.for(""),tt=t=>{if(t?.r===Q)return t?._$litStatic$},ot=t=>({_$litS
|
|
|
550
550
|
</div>
|
|
551
551
|
</div>
|
|
552
552
|
</div>
|
|
553
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",_e(this.slottedElement,this.tooltip,{platform:{...Ye,getOffsetParent:t=>Ye.getOffsetParent(t,Ve)},middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(o){const{x:e,y:r,placement:i}=o,{mainAxis:n=!0,crossAxis:a=!1,limiter:l={fn:t=>{let{x:o,y:e}=t;return{x:o,y:e}}},...c}=ne(t,o),p={x:e,y:r},s=await ye(o,c),f=se(ae(i)),d=ce(f);let h=p[d],g=p[f];if(n){const t="y"===d?"bottom":"right";h=ie(h+s["y"===d?"top":"left"],h,h-s[t])}if(a){const t="y"===f?"bottom":"right";g=ie(g+s["y"===f?"top":"left"],g,g-s[t])}const y=l.fn({...o,[d]:h,[f]:g});return{...y,data:{x:y.x-e,y:y.y-r}}}}),be({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}Je.elementDefinitions={"ft-typography":wo},Je.styles=Vo,qe([r.property()],Je.prototype,"text",void 0),qe([r.property({type:Boolean})],Je.prototype,"manual",void 0),qe([r.property({type:Boolean})],Je.prototype,"inline",void 0),qe([r.property({type:Number})],Je.prototype,"delay",void 0),qe([r.property()],Je.prototype,"position",void 0),qe([r.queryAssignedNodes()],Je.prototype,"slotNodes",void 0),qe([r.query(".ft-tooltip--container")],Je.prototype,"container",void 0),qe([r.query(".ft-tooltip")],Je.prototype,"tooltip",void 0),qe([r.query(".ft-tooltip--content")],Je.prototype,"tooltipContent",void 0),qe([r.state()],Je.prototype,"visible",void 0),qe([r.eventOptions({passive:!0})],Je.prototype,"onTouch",null),qe([r.eventOptions({passive:!0})],Je.prototype,"onHover",null),qe([r.eventOptions({passive:!0})],Je.prototype,"onOut",null),o.customElement("ft-tooltip")(Je);class Qe extends o.FtLitElement{render(){return e.html`
|
|
553
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",_e(this.slottedElement,this.tooltip,{platform:{...Ye,getOffsetParent:t=>Ye.getOffsetParent(t,Ve)},middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(o){const{x:e,y:r,placement:i}=o,{mainAxis:n=!0,crossAxis:a=!1,limiter:l={fn:t=>{let{x:o,y:e}=t;return{x:o,y:e}}},...c}=ne(t,o),p={x:e,y:r},s=await ye(o,c),f=se(ae(i)),d=ce(f);let h=p[d],g=p[f];if(n){const t="y"===d?"bottom":"right";h=ie(h+s["y"===d?"top":"left"],h,h-s[t])}if(a){const t="y"===f?"bottom":"right";g=ie(g+s["y"===f?"top":"left"],g,g-s[t])}const y=l.fn({...o,[d]:h,[f]:g});return{...y,data:{x:y.x-e,y:y.y-r}}}}),be({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}Je.elementDefinitions={"ft-typography":wo},Je.styles=Vo,qe([r.property()],Je.prototype,"text",void 0),qe([r.property({type:Boolean})],Je.prototype,"manual",void 0),qe([r.property({type:Boolean})],Je.prototype,"inline",void 0),qe([r.property({type:Number})],Je.prototype,"delay",void 0),qe([r.property()],Je.prototype,"position",void 0),qe([r.queryAssignedNodes()],Je.prototype,"slotNodes",void 0),qe([r.query(".ft-tooltip--container")],Je.prototype,"container",void 0),qe([r.query(".ft-tooltip")],Je.prototype,"tooltip",void 0),qe([r.query(".ft-tooltip--content")],Je.prototype,"tooltipContent",void 0),qe([r.state()],Je.prototype,"visible",void 0),qe([r.eventOptions({passive:!0})],Je.prototype,"onTouch",null),qe([r.eventOptions({passive:!0})],Je.prototype,"onHover",null),qe([r.eventOptions({passive:!0})],Je.prototype,"onOut",null),qe([r.eventOptions({passive:!0})],Je.prototype,"onClick",null),o.customElement("ft-tooltip")(Je);class Qe extends o.FtLitElement{render(){return e.html`
|
|
554
554
|
<div class="ft-loader">
|
|
555
555
|
<div></div>
|
|
556
556
|
<div></div>
|
|
@@ -675,7 +675,7 @@ class Wi extends oe{constructor(t){if(super(t),this.et=Q,t.type!==Qo)throw Error
|
|
|
675
675
|
@focusin=${this.onHover}
|
|
676
676
|
@focusout=${this.onOut}
|
|
677
677
|
@touchstart=${this.onTouch}>
|
|
678
|
-
<slot part="slot"></slot>
|
|
678
|
+
<slot part="slot" @click=${this.onClick}></slot>
|
|
679
679
|
<div part="tooltip" role="tooltip" inert
|
|
680
680
|
class="ft-tooltip ft-tooltip--${this.validPosition}"
|
|
681
681
|
?hidden=${!this.visible}>
|
|
@@ -685,7 +685,7 @@ class Wi extends oe{constructor(t){if(super(t),this.et=Q,t.type!==Qo)throw Error
|
|
|
685
685
|
</div>
|
|
686
686
|
</div>
|
|
687
687
|
</div>
|
|
688
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",nn(this.slottedElement,this.tooltip,{platform:{...rn,getOffsetParent:t=>rn.getOffsetParent(t,an)},middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(o){const{x:e,y:i,placement:r}=o,{mainAxis:n=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:o,y:e}=t;return{x:o,y:e}}},...l}=yr(t,o),c={x:e,y:i},p=await Cr(o,l),f=vr(gr(r)),h=mr(f);let d=c[h],u=c[f];if(n){const t="y"===h?"bottom":"right";d=ur(d+p["y"===h?"top":"left"],d,d-p[t])}if(a){const t="y"===f?"bottom":"right";u=ur(u+p["y"===f?"top":"left"],u,u-p[t])}const y=s.fn({...o,[h]:d,[f]:u});return{...y,data:{x:y.x-e,y:y.y-i}}}}),Er({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}cn.elementDefinitions={"ft-typography":Li},cn.styles=nr,ln([C()],cn.prototype,"text",void 0),ln([C({type:Boolean})],cn.prototype,"manual",void 0),ln([C({type:Boolean})],cn.prototype,"inline",void 0),ln([C({type:Number})],cn.prototype,"delay",void 0),ln([C()],cn.prototype,"position",void 0),ln([function(t){return(o,e)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return R(0,0,{get(){const o=this.renderRoot?.querySelector(r);return o?.assignedNodes(t)??[]}})}}()],cn.prototype,"slotNodes",void 0),ln([k(".ft-tooltip--container")],cn.prototype,"container",void 0),ln([k(".ft-tooltip")],cn.prototype,"tooltip",void 0),ln([k(".ft-tooltip--content")],cn.prototype,"tooltipContent",void 0),ln([$()],cn.prototype,"visible",void 0),ln([E({passive:!0})],cn.prototype,"onTouch",null),ln([E({passive:!0})],cn.prototype,"onHover",null),ln([E({passive:!0})],cn.prototype,"onOut",null),I("ft-tooltip")(cn);class pn extends Ko{render(){return to`
|
|
688
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",nn(this.slottedElement,this.tooltip,{platform:{...rn,getOffsetParent:t=>rn.getOffsetParent(t,an)},middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(o){const{x:e,y:i,placement:r}=o,{mainAxis:n=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:o,y:e}=t;return{x:o,y:e}}},...l}=yr(t,o),c={x:e,y:i},p=await Cr(o,l),f=vr(gr(r)),h=mr(f);let d=c[h],u=c[f];if(n){const t="y"===h?"bottom":"right";d=ur(d+p["y"===h?"top":"left"],d,d-p[t])}if(a){const t="y"===f?"bottom":"right";u=ur(u+p["y"===f?"top":"left"],u,u-p[t])}const y=s.fn({...o,[h]:d,[f]:u});return{...y,data:{x:y.x-e,y:y.y-i}}}}),Er({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}cn.elementDefinitions={"ft-typography":Li},cn.styles=nr,ln([C()],cn.prototype,"text",void 0),ln([C({type:Boolean})],cn.prototype,"manual",void 0),ln([C({type:Boolean})],cn.prototype,"inline",void 0),ln([C({type:Number})],cn.prototype,"delay",void 0),ln([C()],cn.prototype,"position",void 0),ln([function(t){return(o,e)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return R(0,0,{get(){const o=this.renderRoot?.querySelector(r);return o?.assignedNodes(t)??[]}})}}()],cn.prototype,"slotNodes",void 0),ln([k(".ft-tooltip--container")],cn.prototype,"container",void 0),ln([k(".ft-tooltip")],cn.prototype,"tooltip",void 0),ln([k(".ft-tooltip--content")],cn.prototype,"tooltipContent",void 0),ln([$()],cn.prototype,"visible",void 0),ln([E({passive:!0})],cn.prototype,"onTouch",null),ln([E({passive:!0})],cn.prototype,"onHover",null),ln([E({passive:!0})],cn.prototype,"onOut",null),ln([E({passive:!0})],cn.prototype,"onClick",null),I("ft-tooltip")(cn);class pn extends Ko{render(){return to`
|
|
689
689
|
<div class="ft-loader">
|
|
690
690
|
<div></div>
|
|
691
691
|
<div></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-file-drop",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.14",
|
|
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.1.
|
|
23
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-chip": "1.1.14",
|
|
23
|
+
"@fluid-topics/ft-wc-utils": "1.1.14",
|
|
24
24
|
"lit": "3.1.0"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "f58494852acf5409f0881678c76cd0af9a203482"
|
|
27
27
|
}
|