@fluid-topics/ft-reader-metadata 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.
|
@@ -197,7 +197,7 @@ Also for action icons.`,c.colorGray200),contentGlobalSubtle:o.extend("--ftds-con
|
|
|
197
197
|
</div>
|
|
198
198
|
</div>
|
|
199
199
|
</div>
|
|
200
|
-
`}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("
|
|
200
|
+
`}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&&yn(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 ${Je.designSystemVariables.transitionDuration}, left ${Je.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(t){return this.manual||(0,Je.eventPathContainsMatchingElement)(t,this.ignoreMatchingElements,this.eventsTarget)}};ce.elementDefinitions={"ft-typography":Ce};ce.styles=sl;lt([A2()],ce.prototype,"text",void 0);lt([(0,et.property)({type:Boolean})],ce.prototype,"manual",void 0);lt([(0,et.property)({type:Boolean})],ce.prototype,"inline",void 0);lt([(0,Je.numberProperty)()],ce.prototype,"delay",void 0);lt([(0,et.property)()],ce.prototype,"position",void 0);lt([(0,Je.jsonProperty)([])],ce.prototype,"ignoreMatchingElements",void 0);lt([(0,et.queryAssignedNodes)()],ce.prototype,"slotNodes",void 0);lt([(0,et.query)(".ft-tooltip--container")],ce.prototype,"container",void 0);lt([(0,et.query)(".ft-tooltip")],ce.prototype,"tooltip",void 0);lt([(0,et.query)(".ft-tooltip--content")],ce.prototype,"tooltipContent",void 0);lt([(0,et.state)()],ce.prototype,"visible",void 0);var N2=x(P());(0,N2.customElement)("ft-tooltip")(ce);var ba=x(F()),Ae=x(ee()),I4=x(xr()),ao=x(P());var H2=x(F()),Le=x(ee()),$2=x(xr()),_o=x(P());var B2=x(F()),ue=x(P()),I2=ue.FtCssVariableFactory.extend("--ft-ripple-color","",ue.designSystemVariables.colorContent),R={color:I2,backgroundColor:ue.FtCssVariableFactory.extend("--ft-ripple-background-color","",I2),opacityContentOnSurfacePressed:ue.FtCssVariableFactory.external(ue.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ue.FtCssVariableFactory.external(ue.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ue.FtCssVariableFactory.external(ue.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ue.FtCssVariableFactory.external(ue.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:ue.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},P2=ue.FtCssVariableFactory.extend("--ft-ripple-color","",ue.designSystemVariables.colorPrimary),k2={color:P2,backgroundColor:ue.FtCssVariableFactory.extend("--ft-ripple-background-color","",P2)},z2=ue.FtCssVariableFactory.extend("--ft-ripple-color","",ue.designSystemVariables.colorSecondary),D2={color:z2,backgroundColor:ue.FtCssVariableFactory.extend("--ft-ripple-background-color","",z2)},U2=B2.css`
|
|
201
201
|
:host {
|
|
202
202
|
display: contents;
|
|
203
203
|
}
|
|
@@ -277,7 +277,7 @@ Also for action icons.`,l.colorGray200),contentGlobalSubtle:n.extend("--ftds-con
|
|
|
277
277
|
</div>
|
|
278
278
|
</div>
|
|
279
279
|
</div>
|
|
280
|
-
`}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,this.eventsTarget.addEventListener("
|
|
280
|
+
`}setupFor(e){this.eventsTarget!==e&&(this.removeHandlers(),this.eventsTarget=e,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(e){var r,o;e.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(e)}contentAvailableCallback(e){super.contentAvailableCallback(e),["visible","text"].some(r=>e.has(r))&&this.visible&&this.positionTooltip()}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.eventsTarget==null&&this.defaultSetup()})}disconnectedCallback(){super.disconnectedCallback(),this.removeHandlers()}async show(e){this.visible=!0,e!=null&&await this.hideDebounce.run(()=>{this.hide()},e)}async showTemporaryText(e,r){let o=this.manual;this.manual=!0;let a=this.text;this.text={message:e},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 e;return((e=this.slotNodes)!==null&&e!==void 0?e:[]).filter(r=>r.nodeType==Node.ELEMENT_NODE)[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){let e=this.tooltipContent.style;switch(e.transition="none",this.validPosition){case"top":e.top=this.tooltip.clientHeight+"px",e.left="0";break;case"bottom":e.top=-this.tooltip.clientHeight+"px",e.left="0";break;case"left":e.top="0",e.left=this.tooltip.clientWidth+"px";break;case"right":e.top="0",e.left=-this.tooltip.clientWidth+"px";break}}}positionTooltip(){this.resetTooltipContent(),this.tooltip&&this.slottedElement&&Wo(this.slottedElement,this.tooltip,{placement:this.position,strategy:"fixed"}).then(({x:e,y:r})=>{this.tooltip&&(this.tooltip.style.transform=`translate(${e}px,${r}px)`)}),this.revealDebouncer.run(()=>{this.tooltipContent&&(this.tooltipContent.style.transition=`top ${V.transitionDuration}, left ${V.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(e){return this.manual||Do(e,this.ignoreMatchingElements,this.eventsTarget)}};me.elementDefinitions={"ft-typography":Re};me.styles=w2;ft([U2()],me.prototype,"text",void 0);ft([C({type:Boolean})],me.prototype,"manual",void 0);ft([C({type:Boolean})],me.prototype,"inline",void 0);ft([Gt()],me.prototype,"delay",void 0);ft([C()],me.prototype,"position",void 0);ft([ke([])],me.prototype,"ignoreMatchingElements",void 0);ft([hi()],me.prototype,"slotNodes",void 0);ft([ue(".ft-tooltip--container")],me.prototype,"container",void 0);ft([ue(".ft-tooltip")],me.prototype,"tooltip",void 0);ft([ue(".ft-tooltip--content")],me.prototype,"tooltipContent",void 0);ft([Q()],me.prototype,"visible",void 0);J("ft-tooltip")(me);var H2=n.extend("--ft-ripple-color","",V.colorContent),P={color:H2,backgroundColor:n.extend("--ft-ripple-background-color","",H2),opacityContentOnSurfacePressed:n.external(V.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:n.external(V.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:n.external(V.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:n.external(V.opacityContentOnSurfaceSelected,"Design system"),borderRadius:n.create("--ft-ripple-border-radius","","SIZE","0px")},F2=n.extend("--ft-ripple-color","",V.colorPrimary),G2={color:F2,backgroundColor:n.extend("--ft-ripple-background-color","",F2)},W2=n.extend("--ft-ripple-color","",V.colorSecondary),V2={color:W2,backgroundColor:n.extend("--ft-ripple-background-color","",W2)},j2=k`
|
|
281
281
|
:host {
|
|
282
282
|
display: contents;
|
|
283
283
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-reader-metadata",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Metadata for integrated reader",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,16 +19,16 @@
|
|
|
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": "2.0.
|
|
23
|
-
"@fluid-topics/ft-floating-menu": "2.0.
|
|
24
|
-
"@fluid-topics/ft-reader-context": "2.0.
|
|
25
|
-
"@fluid-topics/ft-ripple": "2.0.
|
|
26
|
-
"@fluid-topics/ft-tooltip": "2.0.
|
|
27
|
-
"@fluid-topics/ft-wc-utils": "2.0.
|
|
22
|
+
"@fluid-topics/ft-chip": "2.0.4",
|
|
23
|
+
"@fluid-topics/ft-floating-menu": "2.0.4",
|
|
24
|
+
"@fluid-topics/ft-reader-context": "2.0.4",
|
|
25
|
+
"@fluid-topics/ft-ripple": "2.0.4",
|
|
26
|
+
"@fluid-topics/ft-tooltip": "2.0.4",
|
|
27
|
+
"@fluid-topics/ft-wc-utils": "2.0.4",
|
|
28
28
|
"lit": "3.1.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@fluid-topics/ft-wc-test-utils": "2.0.
|
|
31
|
+
"@fluid-topics/ft-wc-test-utils": "2.0.4"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "bc275bc44bc77b2e5802f2da9e92a0aca4479155"
|
|
34
34
|
}
|