@fluid-topics/ft-filter 1.0.5 → 1.0.8

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.
@@ -269,7 +269,7 @@ const V=Symbol.for(""),W=t=>{if((null==t?void 0:t.r)===V)return null==t?void 0:t
269
269
  </div>
270
270
  </div>
271
271
  </div>
272
- `}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&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(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=i.height,s=o;break;case"left":r=e,s=-this.tooltip.clientWidth;break;case"right":r=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${i.width}px, ${Si})`}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())}}Bi.elementDefinitions={"ft-typography":li},Bi.styles=Oi,Ci([o.property()],Bi.prototype,"text",void 0),Ci([o.property({type:Boolean})],Bi.prototype,"manual",void 0),Ci([o.property({type:Boolean})],Bi.prototype,"inline",void 0),Ci([o.property({type:Number})],Bi.prototype,"delay",void 0),Ci([o.property()],Bi.prototype,"position",void 0),Ci([o.queryAssignedNodes("",!0)],Bi.prototype,"slotNodes",void 0),Ci([o.query(".ft-tooltip--container")],Bi.prototype,"container",void 0),Ci([o.query("slot")],Bi.prototype,"target",void 0),Ci([o.query(".ft-tooltip")],Bi.prototype,"tooltip",void 0),Ci([o.query(".ft-tooltip--content")],Bi.prototype,"tooltipContent",void 0),Ci([o.state()],Bi.prototype,"visible",void 0),i.customElement("ft-tooltip")(Bi);const ji={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Ei=e.css`
272
+ `}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&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(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=i.height,s=o;break;case"left":r=e,s=-this.tooltip.clientWidth;break;case"right":r=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=4-i.left);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${i.width}px, ${Si})`}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())}}Bi.elementDefinitions={"ft-typography":li},Bi.styles=Oi,Ci([o.property()],Bi.prototype,"text",void 0),Ci([o.property({type:Boolean})],Bi.prototype,"manual",void 0),Ci([o.property({type:Boolean})],Bi.prototype,"inline",void 0),Ci([o.property({type:Number})],Bi.prototype,"delay",void 0),Ci([o.property()],Bi.prototype,"position",void 0),Ci([o.queryAssignedNodes("",!0)],Bi.prototype,"slotNodes",void 0),Ci([o.query(".ft-tooltip--container")],Bi.prototype,"container",void 0),Ci([o.query("slot")],Bi.prototype,"target",void 0),Ci([o.query(".ft-tooltip")],Bi.prototype,"tooltip",void 0),Ci([o.query(".ft-tooltip--content")],Bi.prototype,"tooltipContent",void 0),Ci([o.state()],Bi.prototype,"visible",void 0),i.customElement("ft-tooltip")(Bi);const ji={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Ei=e.css`
273
273
  :host {
274
274
  line-height: 0;
275
275
  }
@@ -383,7 +383,7 @@ var bt,xt;let yt=class extends z{constructor(){super(...arguments),this.renderOp
383
383
  </div>
384
384
  </div>
385
385
  </div>
386
- `}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&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(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=e.height,s=o;break;case"left":r=i,s=-this.tooltip.clientWidth;break;case"right":r=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=0);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${e.width}px, ${zi})`}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())}}Bi.elementDefinitions={"ft-typography":Qe},Bi.styles=Mi,ji([o()],Bi.prototype,"text",void 0),ji([o({type:Boolean})],Bi.prototype,"manual",void 0),ji([o({type:Boolean})],Bi.prototype,"inline",void 0),ji([o({type:Number})],Bi.prototype,"delay",void 0),ji([o()],Bi.prototype,"position",void 0),ji([function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?h({slot:s,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],Bi.prototype,"slotNodes",void 0),ji([n(".ft-tooltip--container")],Bi.prototype,"container",void 0),ji([n("slot")],Bi.prototype,"target",void 0),ji([n(".ft-tooltip")],Bi.prototype,"tooltip",void 0),ji([n(".ft-tooltip--content")],Bi.prototype,"tooltipContent",void 0),ji([s()],Bi.prototype,"visible",void 0),p("ft-tooltip")(Bi);const Fi={color:mt.extend("--ft-loader-color",wt.colorPrimary),size:mt.create("--ft-loader-size","SIZE","80px")},Ui=g`
386
+ `}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&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(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let s=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,s=o;break;case"bottom":r=e.height,s=o;break;case"left":r=i,s=-this.tooltip.clientWidth;break;case"right":r=i,s=e.width}e.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+s<0&&(s=4-e.left);const n=this.tooltip.style;n.left=s+"px",n.top=r+"px",n.maxWidth=`max(${e.width}px, ${zi})`}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())}}Bi.elementDefinitions={"ft-typography":Qe},Bi.styles=Mi,ji([o()],Bi.prototype,"text",void 0),ji([o({type:Boolean})],Bi.prototype,"manual",void 0),ji([o({type:Boolean})],Bi.prototype,"inline",void 0),ji([o({type:Number})],Bi.prototype,"delay",void 0),ji([o()],Bi.prototype,"position",void 0),ji([function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?h({slot:s,flatten:e,selector:i}):r({descriptor:t=>({get(){var t,e;const i="slot"+(s?`[name=${s}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],Bi.prototype,"slotNodes",void 0),ji([n(".ft-tooltip--container")],Bi.prototype,"container",void 0),ji([n("slot")],Bi.prototype,"target",void 0),ji([n(".ft-tooltip")],Bi.prototype,"tooltip",void 0),ji([n(".ft-tooltip--content")],Bi.prototype,"tooltipContent",void 0),ji([s()],Bi.prototype,"visible",void 0),p("ft-tooltip")(Bi);const Fi={color:mt.extend("--ft-loader-color",wt.colorPrimary),size:mt.create("--ft-loader-size","SIZE","80px")},Ui=g`
387
387
  :host {
388
388
  line-height: 0;
389
389
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-filter",
3
- "version": "1.0.5",
3
+ "version": "1.0.8",
4
4
  "description": "Flat selector for multivalued or monovalued filters",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,15 +19,15 @@
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": "1.0.5",
23
- "@fluid-topics/ft-checkbox": "1.0.5",
24
- "@fluid-topics/ft-icon": "1.0.5",
25
- "@fluid-topics/ft-radio": "1.0.5",
26
- "@fluid-topics/ft-ripple": "1.0.5",
27
- "@fluid-topics/ft-snap-scroll": "1.0.5",
28
- "@fluid-topics/ft-typography": "1.0.5",
29
- "@fluid-topics/ft-wc-utils": "1.0.5",
22
+ "@fluid-topics/ft-button": "1.0.8",
23
+ "@fluid-topics/ft-checkbox": "1.0.8",
24
+ "@fluid-topics/ft-icon": "1.0.8",
25
+ "@fluid-topics/ft-radio": "1.0.8",
26
+ "@fluid-topics/ft-ripple": "1.0.8",
27
+ "@fluid-topics/ft-snap-scroll": "1.0.8",
28
+ "@fluid-topics/ft-typography": "1.0.8",
29
+ "@fluid-topics/ft-wc-utils": "1.0.8",
30
30
  "lit": "2.7.2"
31
31
  },
32
- "gitHead": "a4987091424b3c8b5e36193a8b854eddfe44d439"
32
+ "gitHead": "b55ea6fbe362f72c42f5c26f705fde8e39261001"
33
33
  }