@fluid-topics/ft-dialog 2.0.3 → 2.0.4

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.
@@ -1132,7 +1132,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
1132
1132
  </div>
1133
1133
  </div>
1134
1134
  </div>
1135
- `}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("mouseenter",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseenter",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(t){var o,n;t.has("visible")&&(this.visible?(this.resetTooltipContent(),(o=this.tooltip)===null||o===void 0||o.showPopover()):(n=this.tooltip)===null||n===void 0||n.hidePopover()),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(o=>t.has(o))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(t){this.visible=!0,t!=null&&await this.hideDebounce.run(()=>{this.hide()},t)}async showTemporaryText(t,o){let n=this.manual;this.manual=!0;let a=this.text;this.text={message:t},await this.show(o),this.text=a,this.manual=n}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var t;return((t=this.slotNodes)!==null&&t!==void 0?t:[]).filter(o=>o.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let 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";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&t2(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${t}px,${o}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${ze.designSystemVariables.transitionDuration}, left ${ze.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(t){return this.manual||(0,ze.eventPathContainsMatchingElement)(t,this.ignoreMatchingElements,this.eventsTarget)}};ie.elementDefinitions={"ft-typography":Ee};ie.styles=O1;We([Z4()],ie.prototype,"text",void 0);We([(0,ke.property)({type:Boolean})],ie.prototype,"manual",void 0);We([(0,ke.property)({type:Boolean})],ie.prototype,"inline",void 0);We([(0,ze.numberProperty)()],ie.prototype,"delay",void 0);We([(0,ke.property)()],ie.prototype,"position",void 0);We([(0,ze.jsonProperty)([])],ie.prototype,"ignoreMatchingElements",void 0);We([(0,ke.queryAssignedNodes)()],ie.prototype,"slotNodes",void 0);We([(0,ke.query)(".ft-tooltip--container")],ie.prototype,"container",void 0);We([(0,ke.query)(".ft-tooltip")],ie.prototype,"tooltip",void 0);We([(0,ke.query)(".ft-tooltip--content")],ie.prototype,"tooltipContent",void 0);We([(0,ke.state)()],ie.prototype,"visible",void 0);var J4=O(U());(0,J4.customElement)("ft-tooltip")(ie);var e0=O(Z()),t0=O(U());var qt=class extends t0.FtLitElement{render(){return e0.html`
1135
+ `}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(t){var o,n;t.has("visible")&&(this.visible?(this.resetTooltipContent(),(o=this.tooltip)===null||o===void 0||o.showPopover()):(n=this.tooltip)===null||n===void 0||n.hidePopover()),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(o=>t.has(o))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(t){this.visible=!0,t!=null&&await this.hideDebounce.run(()=>{this.hide()},t)}async showTemporaryText(t,o){let n=this.manual;this.manual=!0;let a=this.text;this.text={message:t},await this.show(o),this.text=a,this.manual=n}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var t;return((t=this.slotNodes)!==null&&t!==void 0?t:[]).filter(o=>o.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let 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";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&t2(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${t}px,${o}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${ze.designSystemVariables.transitionDuration}, left ${ze.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(t){return this.manual||(0,ze.eventPathContainsMatchingElement)(t,this.ignoreMatchingElements,this.eventsTarget)}};ie.elementDefinitions={"ft-typography":Ee};ie.styles=O1;We([Z4()],ie.prototype,"text",void 0);We([(0,ke.property)({type:Boolean})],ie.prototype,"manual",void 0);We([(0,ke.property)({type:Boolean})],ie.prototype,"inline",void 0);We([(0,ze.numberProperty)()],ie.prototype,"delay",void 0);We([(0,ke.property)()],ie.prototype,"position",void 0);We([(0,ze.jsonProperty)([])],ie.prototype,"ignoreMatchingElements",void 0);We([(0,ke.queryAssignedNodes)()],ie.prototype,"slotNodes",void 0);We([(0,ke.query)(".ft-tooltip--container")],ie.prototype,"container",void 0);We([(0,ke.query)(".ft-tooltip")],ie.prototype,"tooltip",void 0);We([(0,ke.query)(".ft-tooltip--content")],ie.prototype,"tooltipContent",void 0);We([(0,ke.state)()],ie.prototype,"visible",void 0);var J4=O(U());(0,J4.customElement)("ft-tooltip")(ie);var e0=O(Z()),t0=O(U());var qt=class extends t0.FtLitElement{render(){return e0.html`
1136
1136
  <div class="ft-loader">
1137
1137
  <div></div>
1138
1138
  <div></div>
@@ -1212,7 +1212,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
1212
1212
  </div>
1213
1213
  </div>
1214
1214
  </div>
1215
- `}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("mouseenter",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseenter",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(t){var r,o;t.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(o=this.tooltip)===null||o===void 0||o.hidePopover()),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(r=>t.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(t){this.visible=!0,t!=null&&await this.hideDebounce.run(()=>{this.hide()},t)}async showTemporaryText(t,r){let o=this.manual;this.manual=!0;let a=this.text;this.text={message:t},await this.show(r),this.text=a,this.manual=o}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var t;return((t=this.slotNodes)!==null&&t!==void 0?t:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let 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";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&bi(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:t,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${t}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${Y.transitionDuration}, left ${Y.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(t){return this.manual||La(t,this.ignoreMatchingElements,this.eventsTarget)}};fe.elementDefinitions={"ft-typography":Ne};fe.styles=t4;Ke([u4()],fe.prototype,"text",void 0);Ke([L({type:Boolean})],fe.prototype,"manual",void 0);Ke([L({type:Boolean})],fe.prototype,"inline",void 0);Ke([cn()],fe.prototype,"delay",void 0);Ke([L()],fe.prototype,"position",void 0);Ke([Ie([])],fe.prototype,"ignoreMatchingElements",void 0);Ke([ba()],fe.prototype,"slotNodes",void 0);Ke([Ee(".ft-tooltip--container")],fe.prototype,"container",void 0);Ke([Ee(".ft-tooltip")],fe.prototype,"tooltip",void 0);Ke([Ee(".ft-tooltip--content")],fe.prototype,"tooltipContent",void 0);Ke([oe()],fe.prototype,"visible",void 0);ie("ft-tooltip")(fe);var hr=class extends Z{render(){return j`
1215
+ `}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("mouseover",this.onHover,{passive:!0}),this.eventsTarget.addEventListener("mouseleave",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("focusin",this.onFocusIn,{passive:!0}),this.eventsTarget.addEventListener("focusout",this.onOut,{passive:!0}),this.eventsTarget.addEventListener("touchstart",this.onTouch,{passive:!0}),this.eventsTarget.addEventListener("click",this.onClick,{passive:!0}))}removeHandlers(){this.eventsTarget&&(this.eventsTarget.removeEventListener("mouseover",this.onHover),this.eventsTarget.removeEventListener("mouseleave",this.onOut),this.eventsTarget.removeEventListener("focusin",this.onFocusIn),this.eventsTarget.removeEventListener("focusout",this.onOut),this.eventsTarget.removeEventListener("touchstart",this.onTouch),this.eventsTarget.removeEventListener("click",this.onClick),this.eventsTarget=void 0)}defaultSetup(){this.container&&this.setupFor(this.container)}updated(t){var r,o;t.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(o=this.tooltip)===null||o===void 0||o.hidePopover()),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some(r=>t.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(t){this.visible=!0,t!=null&&await this.hideDebounce.run(()=>{this.hide()},t)}async showTemporaryText(t,r){let o=this.manual;this.manual=!0;let a=this.text;this.text={message:t},await this.show(r),this.text=a,this.manual=o}hide(){this.visible=!1}toggle(){this.visible=!this.visible}isVisible(){return this.visible}get slottedElement(){var t;return((t=this.slotNodes)!==null&&t!==void 0?t:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let 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";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&bi(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:t,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${t}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${Y.transitionDuration}, left ${Y.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(t){return this.manual||La(t,this.ignoreMatchingElements,this.eventsTarget)}};fe.elementDefinitions={"ft-typography":Ne};fe.styles=t4;Ke([u4()],fe.prototype,"text",void 0);Ke([L({type:Boolean})],fe.prototype,"manual",void 0);Ke([L({type:Boolean})],fe.prototype,"inline",void 0);Ke([cn()],fe.prototype,"delay",void 0);Ke([L()],fe.prototype,"position",void 0);Ke([Ie([])],fe.prototype,"ignoreMatchingElements",void 0);Ke([ba()],fe.prototype,"slotNodes",void 0);Ke([Ee(".ft-tooltip--container")],fe.prototype,"container",void 0);Ke([Ee(".ft-tooltip")],fe.prototype,"tooltip",void 0);Ke([Ee(".ft-tooltip--content")],fe.prototype,"tooltipContent",void 0);Ke([oe()],fe.prototype,"visible",void 0);ie("ft-tooltip")(fe);var hr=class extends Z{render(){return j`
1216
1216
  <div class="ft-loader">
1217
1217
  <div></div>
1218
1218
  <div></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-dialog",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "A simple dialog component",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,11 +19,11 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-button": "2.0.3",
23
- "@fluid-topics/ft-icon": "2.0.3",
24
- "@fluid-topics/ft-typography": "2.0.3",
25
- "@fluid-topics/ft-wc-utils": "2.0.3",
22
+ "@fluid-topics/ft-button": "2.0.4",
23
+ "@fluid-topics/ft-icon": "2.0.4",
24
+ "@fluid-topics/ft-typography": "2.0.4",
25
+ "@fluid-topics/ft-wc-utils": "2.0.4",
26
26
  "lit": "3.1.0"
27
27
  },
28
- "gitHead": "0f2fb13480a71c2957ef7c69492140ea685ba87e"
28
+ "gitHead": "bc275bc44bc77b2e5802f2da9e92a0aca4479155"
29
29
  }