@fluid-topics/ft-search-bar 1.0.5 → 1.0.7

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.
@@ -286,7 +286,7 @@ const G=Symbol.for(""),X=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
286
286
  </div>
287
287
  </div>
288
288
  </div>
289
- `}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,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=e.height,s=o;break;case"left":n=i,s=-this.tooltip.clientWidth;break;case"right":n=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 r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${e.width}px, ${xe.maxWidth})`}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())}}$e.elementDefinitions={"ft-typography":ie},$e.styles=ye,me([o.property()],$e.prototype,"text",void 0),me([o.property({type:Boolean})],$e.prototype,"manual",void 0),me([o.property({type:Boolean})],$e.prototype,"inline",void 0),me([o.property({type:Number})],$e.prototype,"delay",void 0),me([o.property()],$e.prototype,"position",void 0),me([o.queryAssignedNodes("",!0)],$e.prototype,"slotNodes",void 0),me([o.query(".ft-tooltip--container")],$e.prototype,"container",void 0),me([o.query("slot")],$e.prototype,"target",void 0),me([o.query(".ft-tooltip")],$e.prototype,"tooltip",void 0),me([o.query(".ft-tooltip--content")],$e.prototype,"tooltipContent",void 0),me([o.state()],$e.prototype,"visible",void 0),e.customElement("ft-tooltip")($e);const we={color:e.FtCssVariableFactory.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},ke=i.css`
289
+ `}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,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=e.height,s=o;break;case"left":n=i,s=-this.tooltip.clientWidth;break;case"right":n=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 r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${e.width}px, ${xe.maxWidth})`}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())}}$e.elementDefinitions={"ft-typography":ie},$e.styles=ye,me([o.property()],$e.prototype,"text",void 0),me([o.property({type:Boolean})],$e.prototype,"manual",void 0),me([o.property({type:Boolean})],$e.prototype,"inline",void 0),me([o.property({type:Number})],$e.prototype,"delay",void 0),me([o.property()],$e.prototype,"position",void 0),me([o.queryAssignedNodes("",!0)],$e.prototype,"slotNodes",void 0),me([o.query(".ft-tooltip--container")],$e.prototype,"container",void 0),me([o.query("slot")],$e.prototype,"target",void 0),me([o.query(".ft-tooltip")],$e.prototype,"tooltip",void 0),me([o.query(".ft-tooltip--content")],$e.prototype,"tooltipContent",void 0),me([o.state()],$e.prototype,"visible",void 0),e.customElement("ft-tooltip")($e);const we={color:e.FtCssVariableFactory.extend("--ft-loader-color",e.designSystemVariables.colorPrimary),size:e.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},ke=i.css`
290
290
  :host {
291
291
  line-height: 0;
292
292
  }
@@ -413,7 +413,7 @@ const fi=At(class extends Tt{constructor(t){var e;if(super(t),t.type!==Pt||"clas
413
413
  </div>
414
414
  </div>
415
415
  </div>
416
- `}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, ${Oi.maxWidth})`}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())}}zi.elementDefinitions={"ft-typography":ai},zi.styles=Ei,Ci([o()],zi.prototype,"text",void 0),Ci([o({type:Boolean})],zi.prototype,"manual",void 0),Ci([o({type:Boolean})],zi.prototype,"inline",void 0),Ci([o({type:Number})],zi.prototype,"delay",void 0),Ci([o()],zi.prototype,"position",void 0),Ci([function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?c({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)],zi.prototype,"slotNodes",void 0),Ci([n(".ft-tooltip--container")],zi.prototype,"container",void 0),Ci([n("slot")],zi.prototype,"target",void 0),Ci([n(".ft-tooltip")],zi.prototype,"tooltip",void 0),Ci([n(".ft-tooltip--content")],zi.prototype,"tooltipContent",void 0),Ci([s()],zi.prototype,"visible",void 0),p("ft-tooltip")(zi);const Bi={color:mt.extend("--ft-loader-color",wt.colorPrimary),size:mt.create("--ft-loader-size","SIZE","80px")},Ri=y`
416
+ `}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, ${Oi.maxWidth})`}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())}}zi.elementDefinitions={"ft-typography":ai},zi.styles=Ei,Ci([o()],zi.prototype,"text",void 0),Ci([o({type:Boolean})],zi.prototype,"manual",void 0),Ci([o({type:Boolean})],zi.prototype,"inline",void 0),Ci([o({type:Number})],zi.prototype,"delay",void 0),Ci([o()],zi.prototype,"position",void 0),Ci([function(t,e,i){let o,s=t;return"object"==typeof t?(s=t.slot,o=t):o={flatten:e},i?c({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)],zi.prototype,"slotNodes",void 0),Ci([n(".ft-tooltip--container")],zi.prototype,"container",void 0),Ci([n("slot")],zi.prototype,"target",void 0),Ci([n(".ft-tooltip")],zi.prototype,"tooltip",void 0),Ci([n(".ft-tooltip--content")],zi.prototype,"tooltipContent",void 0),Ci([s()],zi.prototype,"visible",void 0),p("ft-tooltip")(zi);const Bi={color:mt.extend("--ft-loader-color",wt.colorPrimary),size:mt.create("--ft-loader-size","SIZE","80px")},Ri=y`
417
417
  :host {
418
418
  line-height: 0;
419
419
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-search-bar",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Search bar component using Fluid Topics public API",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,18 +19,18 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-accordion": "1.0.5",
23
- "@fluid-topics/ft-button": "1.0.5",
24
- "@fluid-topics/ft-chip": "1.0.5",
25
- "@fluid-topics/ft-filter": "1.0.5",
26
- "@fluid-topics/ft-icon": "1.0.5",
27
- "@fluid-topics/ft-select": "1.0.5",
28
- "@fluid-topics/ft-size-watcher": "1.0.5",
29
- "@fluid-topics/ft-skeleton": "1.0.5",
30
- "@fluid-topics/ft-snap-scroll": "1.0.5",
31
- "@fluid-topics/ft-tooltip": "1.0.5",
32
- "@fluid-topics/ft-typography": "1.0.5",
33
- "@fluid-topics/ft-wc-utils": "1.0.5",
22
+ "@fluid-topics/ft-accordion": "1.0.7",
23
+ "@fluid-topics/ft-button": "1.0.7",
24
+ "@fluid-topics/ft-chip": "1.0.7",
25
+ "@fluid-topics/ft-filter": "1.0.7",
26
+ "@fluid-topics/ft-icon": "1.0.7",
27
+ "@fluid-topics/ft-select": "1.0.7",
28
+ "@fluid-topics/ft-size-watcher": "1.0.7",
29
+ "@fluid-topics/ft-skeleton": "1.0.7",
30
+ "@fluid-topics/ft-snap-scroll": "1.0.7",
31
+ "@fluid-topics/ft-tooltip": "1.0.7",
32
+ "@fluid-topics/ft-typography": "1.0.7",
33
+ "@fluid-topics/ft-wc-utils": "1.0.7",
34
34
  "lit": "2.7.2"
35
35
  },
36
36
  "devDependencies": {
@@ -39,5 +39,5 @@
39
39
  "peerDependencies": {
40
40
  "@fluid-topics/public-api": "1.0.34"
41
41
  },
42
- "gitHead": "a4987091424b3c8b5e36193a8b854eddfe44d439"
42
+ "gitHead": "4f7f68b0b32e1a397650061e8baee05e5aaa3526"
43
43
  }