@fluid-topics/ft-text-input 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.
|
@@ -1136,7 +1136,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
|
|
1136
1136
|
</div>
|
|
1137
1137
|
</div>
|
|
1138
1138
|
</div>
|
|
1139
|
-
`}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("
|
|
1139
|
+
`}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&&M0(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 ${Fe.designSystemVariables.transitionDuration}, left ${Fe.designSystemVariables.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(t){return this.manual||(0,Fe.eventPathContainsMatchingElement)(t,this.ignoreMatchingElements,this.eventsTarget)}};oe.elementDefinitions={"ft-typography":Ke};oe.styles=o0;ot([I0()],oe.prototype,"text",void 0);ot([(0,We.property)({type:Boolean})],oe.prototype,"manual",void 0);ot([(0,We.property)({type:Boolean})],oe.prototype,"inline",void 0);ot([(0,Fe.numberProperty)()],oe.prototype,"delay",void 0);ot([(0,We.property)()],oe.prototype,"position",void 0);ot([(0,Fe.jsonProperty)([])],oe.prototype,"ignoreMatchingElements",void 0);ot([(0,We.queryAssignedNodes)()],oe.prototype,"slotNodes",void 0);ot([(0,We.query)(".ft-tooltip--container")],oe.prototype,"container",void 0);ot([(0,We.query)(".ft-tooltip")],oe.prototype,"tooltip",void 0);ot([(0,We.query)(".ft-tooltip--content")],oe.prototype,"tooltipContent",void 0);ot([(0,We.state)()],oe.prototype,"visible",void 0);var k0=S(D());(0,k0.customElement)("ft-tooltip")(oe);var Lr=S(V()),ie=S(ne()),i4=S(zt());var je=S(D());var ia=S(V()),R=S(D());var ta=S(ne());var ps=function(e,t,o,n){var a=arguments.length,i=a<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,o):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,o,n);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(a<3?s(i):a>3?s(t,o,i):s(t,o))||i);return a>3&&i&&Object.defineProperty(t,o,i),i},Nt=class extends St{constructor(){super(...arguments),this.outlined=!1,this.error=!1,this.disabled=!1}get inputLabelClasses(){return{"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error}}};Nt.elementDefinitions={};Nt.styles=[Pr,yc];ps([(0,ta.property)({type:Boolean})],Nt.prototype,"outlined",void 0);ps([(0,ta.property)({type:Boolean})],Nt.prototype,"error",void 0);ps([(0,ta.property)({type:Boolean})],Nt.prototype,"disabled",void 0);var hs=S(D());(0,hs.customElement)("ft-input-label")(Nt);(0,hs.customElement)("ftds-input-label")(Lt);var Ho=S(ne()),r4=S(D());var Z0=S(V()),G=S(D());var G0=S(V()),fe=S(D()),D0=fe.FtCssVariableFactory.extend("--ft-ripple-color","",fe.designSystemVariables.colorContent),w={color:D0,backgroundColor:fe.FtCssVariableFactory.extend("--ft-ripple-background-color","",D0),opacityContentOnSurfacePressed:fe.FtCssVariableFactory.external(fe.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:fe.FtCssVariableFactory.external(fe.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:fe.FtCssVariableFactory.external(fe.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:fe.FtCssVariableFactory.external(fe.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:fe.FtCssVariableFactory.create("--ft-ripple-border-radius","","SIZE","0px")},B0=fe.FtCssVariableFactory.extend("--ft-ripple-color","",fe.designSystemVariables.colorPrimary),U0={color:B0,backgroundColor:fe.FtCssVariableFactory.extend("--ft-ripple-background-color","",B0)},H0=fe.FtCssVariableFactory.extend("--ft-ripple-color","",fe.designSystemVariables.colorSecondary),$0={color:H0,backgroundColor:fe.FtCssVariableFactory.extend("--ft-ripple-background-color","",H0)},F0=G0.css`
|
|
1140
1140
|
:host {
|
|
1141
1141
|
display: contents;
|
|
1142
1142
|
}
|
|
@@ -1216,7 +1216,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
|
|
|
1216
1216
|
</div>
|
|
1217
1217
|
</div>
|
|
1218
1218
|
</div>
|
|
1219
|
-
`}setupFor(t){this.eventsTarget!==t&&(this.removeHandlers(),this.eventsTarget=t,this.eventsTarget.addEventListener("
|
|
1219
|
+
`}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&&Ui(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 ${X.transitionDuration}, left ${X.transitionDuration}`,this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")},this.manual?0:this.delay)}isIgnored(t){return this.manual||Za(t,this.ignoreMatchingElements,this.eventsTarget)}};fe.elementDefinitions={"ft-typography":ot};fe.styles=Nf;ct([Tf()],fe.prototype,"text",void 0);ct([E({type:Boolean})],fe.prototype,"manual",void 0);ct([E({type:Boolean})],fe.prototype,"inline",void 0);ct([wn()],fe.prototype,"delay",void 0);ct([E()],fe.prototype,"position",void 0);ct([je([])],fe.prototype,"ignoreMatchingElements",void 0);ct([$a()],fe.prototype,"slotNodes",void 0);ct([he(".ft-tooltip--container")],fe.prototype,"container",void 0);ct([he(".ft-tooltip")],fe.prototype,"tooltip",void 0);ct([he(".ft-tooltip--content")],fe.prototype,"tooltipContent",void 0);ct([ee()],fe.prototype,"visible",void 0);oe("ft-tooltip")(fe);var Zc=function(e,t,r,o){var a=arguments.length,i=a<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,o);else for(var c=e.length-1;c>=0;c--)(s=e[c])&&(i=(a<3?s(i):a>3?s(t,r,i):s(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i},$t=class extends It{constructor(){super(...arguments),this.outlined=!1,this.error=!1,this.disabled=!1}get inputLabelClasses(){return{"ft-input-label":!0,"ft-input-label--raised":this.raised,"ft-input-label--outlined":this.outlined,"ft-input-label--disabled":this.disabled,"ft-input-label--in-error":this.error}}};$t.elementDefinitions={};$t.styles=[po,V2];Zc([E({type:Boolean})],$t.prototype,"outlined",void 0);Zc([E({type:Boolean})],$t.prototype,"error",void 0);Zc([E({type:Boolean})],$t.prototype,"disabled",void 0);oe("ft-input-label")($t);oe("ftds-input-label")(kt);var Mf=n.extend("--ft-ripple-color","",X.colorContent),P={color:Mf,backgroundColor:n.extend("--ft-ripple-background-color","",Mf),opacityContentOnSurfacePressed:n.external(X.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:n.external(X.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:n.external(X.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:n.external(X.opacityContentOnSurfaceSelected,"Design system"),borderRadius:n.create("--ft-ripple-border-radius","","SIZE","0px")},Pf=n.extend("--ft-ripple-color","",X.colorPrimary),If={color:Pf,backgroundColor:n.extend("--ft-ripple-background-color","",Pf)},zf=n.extend("--ft-ripple-color","",X.colorSecondary),kf={color:zf,backgroundColor:n.extend("--ft-ripple-background-color","",zf)},Df=k`
|
|
1220
1220
|
:host {
|
|
1221
1221
|
display: contents;
|
|
1222
1222
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-text-input",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Text Input",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-base-input": "2.0.
|
|
23
|
-
"@fluid-topics/ft-i18n": "2.0.
|
|
24
|
-
"@fluid-topics/ft-icon": "2.0.
|
|
25
|
-
"@fluid-topics/ft-input-helper-text": "2.0.
|
|
26
|
-
"@fluid-topics/ft-input-label": "2.0.
|
|
27
|
-
"@fluid-topics/ft-tooltip": "2.0.
|
|
28
|
-
"@fluid-topics/ft-wc-utils": "2.0.
|
|
22
|
+
"@fluid-topics/ft-base-input": "2.0.4",
|
|
23
|
+
"@fluid-topics/ft-i18n": "2.0.4",
|
|
24
|
+
"@fluid-topics/ft-icon": "2.0.4",
|
|
25
|
+
"@fluid-topics/ft-input-helper-text": "2.0.4",
|
|
26
|
+
"@fluid-topics/ft-input-label": "2.0.4",
|
|
27
|
+
"@fluid-topics/ft-tooltip": "2.0.4",
|
|
28
|
+
"@fluid-topics/ft-wc-utils": "2.0.4",
|
|
29
29
|
"lit": "3.1.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@fluid-topics/ft-wc-test-utils": "2.0.
|
|
32
|
+
"@fluid-topics/ft-wc-test-utils": "2.0.4"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "bc275bc44bc77b2e5802f2da9e92a0aca4479155"
|
|
35
35
|
}
|