@fluid-topics/ft-search-breadcrumbs 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.
|
@@ -177,7 +177,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
|
|
|
177
177
|
</div>
|
|
178
178
|
</div>
|
|
179
179
|
</div>
|
|
180
|
-
`}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("
|
|
180
|
+
`}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,n;t.has("visible")&&(this.visible?(this.resetTooltipContent(),(r=this.tooltip)===null||r===void 0||r.showPopover()):(n=this.tooltip)===null||n===void 0||n.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 n=this.manual;this.manual=!0;let a=this.text;this.text={message:t},await this.show(r),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(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&&$c(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 ${Ue.designSystemVariables.transitionDuration}, left ${Ue.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(t){return this.manual||(0,Ue.eventPathContainsMatchingElement)(t,this.ignoreMatchingElements,this.eventsTarget)}};fe.elementDefinitions={"ft-typography":Le};fe.styles=hc;je([M1()],fe.prototype,"text",void 0);je([(0,Be.property)({type:Boolean})],fe.prototype,"manual",void 0);je([(0,Be.property)({type:Boolean})],fe.prototype,"inline",void 0);je([(0,Ue.numberProperty)()],fe.prototype,"delay",void 0);je([(0,Be.property)()],fe.prototype,"position",void 0);je([(0,Ue.jsonProperty)([])],fe.prototype,"ignoreMatchingElements",void 0);je([(0,Be.queryAssignedNodes)()],fe.prototype,"slotNodes",void 0);je([(0,Be.query)(".ft-tooltip--container")],fe.prototype,"container",void 0);je([(0,Be.query)(".ft-tooltip")],fe.prototype,"tooltip",void 0);je([(0,Be.query)(".ft-tooltip--content")],fe.prototype,"tooltipContent",void 0);je([(0,Be.state)()],fe.prototype,"visible",void 0);var I1=S(k());(0,I1.customElement)("ft-tooltip")(fe);var D1=ee.FtCssVariableFactory.extend("--ft-search-breadcrumbs-item-color","",ee.designSystemVariables.colorOnSurface),U1=ee.FtCssVariableFactory.create("--ft-search-breadcrumbs-item-font-weight","","UNKNOWN","normal"),dt={itemColor:D1,itemFontSize:ee.FtCssVariableFactory.create("--ft-search-breadcrumbs-item-font-size","","SIZE","14px"),itemFontWeight:U1,currentItemColor:ee.FtCssVariableFactory.extend("--ft-search-breadcrumbs-current-item-color","",D1),currentItemFontWeight:ee.FtCssVariableFactory.extend("--ft-search-breadcrumbs-current-item-font-weight","",U1),separatorColor:ee.FtCssVariableFactory.extend("--ft-search-breadcrumbs-separator-color","",ee.designSystemVariables.colorOnSurface),separatorFontSize:ee.FtCssVariableFactory.create("--ft-search-breadcrumbs-separator-font-size","","SIZE","14px"),separatorFontWeight:ee.FtCssVariableFactory.create("--ft-search-breadcrumbs-separator-font-weight","","UNKNOWN","normal"),separatorSpacing:ee.FtCssVariableFactory.create("--ft-search-breadcrumbs-separator-spacing","","SIZE","8px")},H1=B1.css`
|
|
181
181
|
:host {
|
|
182
182
|
${(0,ee.setVariable)(Wt.maxWidth,"100%")};
|
|
183
183
|
}
|
|
@@ -257,7 +257,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
|
|
|
257
257
|
</div>
|
|
258
258
|
</div>
|
|
259
259
|
</div>
|
|
260
|
-
`}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("
|
|
260
|
+
`}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&&Ii(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 ${j.transitionDuration}, left ${j.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(t){return this.manual||Ga(t,this.ignoreMatchingElements,this.eventsTarget)}};me.elementDefinitions={"ft-typography":Me};me.styles=$2;Xe([Q2()],me.prototype,"text",void 0);Xe([L({type:Boolean})],me.prototype,"manual",void 0);Xe([L({type:Boolean})],me.prototype,"inline",void 0);Xe([ot()],me.prototype,"delay",void 0);Xe([L()],me.prototype,"position",void 0);Xe([ze([])],me.prototype,"ignoreMatchingElements",void 0);Xe([za()],me.prototype,"slotNodes",void 0);Xe([fe(".ft-tooltip--container")],me.prototype,"container",void 0);Xe([fe(".ft-tooltip")],me.prototype,"tooltip",void 0);Xe([fe(".ft-tooltip--content")],me.prototype,"tooltipContent",void 0);Xe([K()],me.prototype,"visible",void 0);ie("ft-tooltip")(me);var ed=n.extend("--ft-search-breadcrumbs-item-color","",j.colorOnSurface),td=n.create("--ft-search-breadcrumbs-item-font-weight","","UNKNOWN","normal"),xt={itemColor:ed,itemFontSize:n.create("--ft-search-breadcrumbs-item-font-size","","SIZE","14px"),itemFontWeight:td,currentItemColor:n.extend("--ft-search-breadcrumbs-current-item-color","",ed),currentItemFontWeight:n.extend("--ft-search-breadcrumbs-current-item-font-weight","",td),separatorColor:n.extend("--ft-search-breadcrumbs-separator-color","",j.colorOnSurface),separatorFontSize:n.create("--ft-search-breadcrumbs-separator-font-size","","SIZE","14px"),separatorFontWeight:n.create("--ft-search-breadcrumbs-separator-font-weight","","UNKNOWN","normal"),separatorSpacing:n.create("--ft-search-breadcrumbs-separator-spacing","","SIZE","8px")},rd=D`
|
|
261
261
|
:host {
|
|
262
262
|
${F(hr.maxWidth,"100%")};
|
|
263
263
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-breadcrumbs",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "search breadcrumbs 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-wc-utils": "2.0.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "2.0.4",
|
|
23
23
|
"lit": "3.1.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@fluid-topics/ft-wc-test-utils": "2.0.
|
|
26
|
+
"@fluid-topics/ft-wc-test-utils": "2.0.4"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "bc275bc44bc77b2e5802f2da9e92a0aca4479155"
|
|
29
29
|
}
|