@fluid-topics/ft-in-product-help 1.1.4 → 1.1.5
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.
|
@@ -542,7 +542,7 @@
|
|
|
542
542
|
<div class="ft-ripple--background"></div>
|
|
543
543
|
<div class="ft-ripple--effect"></div>
|
|
544
544
|
</div>
|
|
545
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var o,e;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(o=this.target)||void 0===o||o.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,o;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(o=this.target)&&void 0!==o?o:e)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const o=(...t)=>o=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(o)},e=o("mouseup","contextmenu"),r=o("touchend","touchcancel"),i=t=>{["Enter"," "].includes(t.key)&&o("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",r),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",i),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",r),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",i),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const o=t,e=t;let r,i;return null!=o.x?({x:r,y:i}=o):null!=e.touches&&(r=e.touches[0].clientX,i=e.touches[0].clientY),{x:r,y:i}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let o of t.composedPath()){if(o===this.target)break;if("hasAttribute"in o&&o.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}ao.elementDefinitions={},ao.styles=$,no([r.property({type:Boolean})],ao.prototype,"primary",void 0),no([r.property({type:Boolean})],ao.prototype,"secondary",void 0),no([r.property({type:Boolean})],ao.prototype,"unbounded",void 0),no([r.property({type:Boolean})],ao.prototype,"activated",void 0),no([r.property({type:Boolean})],ao.prototype,"selected",void 0),no([r.property({type:Boolean})],ao.prototype,"disabled",void 0),no([r.state()],ao.prototype,"hovered",void 0),no([r.state()],ao.prototype,"focused",void 0),no([r.state()],ao.prototype,"pressed",void 0),no([r.state()],ao.prototype,"rippling",void 0),no([r.state()],ao.prototype,"originX",void 0),no([r.state()],ao.prototype,"originY",void 0),no([r.query(".ft-ripple")],ao.prototype,"ripple",void 0),no([r.query(".ft-ripple--effect")],ao.prototype,"rippleEffect",void 0),o.customElement("ft-ripple")(ao);
|
|
545
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var o,e;super.update(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(o=this.target)||void 0===o||o.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}connectedCallback(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,o;const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(null!==(o=this.target)&&void 0!==o?o:e)}setupFor(t){if(this.setupDebouncer.cancel(),this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const o=(...t)=>o=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(o)},e=o("mouseup","contextmenu"),r=o("touchend","touchcancel"),i=t=>{["Enter"," "].includes(t.key)&&o("keyup")(t)},n={passive:!0};t.addEventListener("mouseover",this.startHover,n),t.addEventListener("mousemove",this.moveRipple,n),t.addEventListener("mouseleave",this.endHover,n),t.addEventListener("mousedown",e,n),t.addEventListener("touchstart",r,n),t.addEventListener("touchmove",this.moveRipple,n),t.addEventListener("keydown",i,n),t.addEventListener("focus",this.startFocus,n),t.addEventListener("blur",this.endFocus,n),t.addEventListener("focusin",this.startFocus,n),t.addEventListener("focusout",this.endFocus,n),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover,n),t.removeEventListener("mousemove",this.moveRipple,n),t.removeEventListener("mouseleave",this.endHover,n),t.removeEventListener("mousedown",e,n),t.removeEventListener("touchstart",r,n),t.removeEventListener("touchmove",this.moveRipple,n),t.removeEventListener("keydown",i,n),t.removeEventListener("focus",this.startFocus,n),t.removeEventListener("blur",this.endFocus,n),t.removeEventListener("focusin",this.startFocus,n),t.removeEventListener("focusout",this.endFocus,n),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const o=t,e=t;let r,i;return null!=o.x?({x:r,y:i}=o):null!=e.touches&&(r=e.touches[0].clientX,i=e.touches[0].clientY),{x:r,y:i}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let o of t.composedPath()){if(o===this.target)break;if("hasAttribute"in o&&o.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}}ao.elementDefinitions={},ao.styles=$,no([r.property({type:Boolean})],ao.prototype,"primary",void 0),no([r.property({type:Boolean})],ao.prototype,"secondary",void 0),no([r.property({type:Boolean})],ao.prototype,"unbounded",void 0),no([r.property({type:Boolean})],ao.prototype,"activated",void 0),no([r.property({type:Boolean})],ao.prototype,"selected",void 0),no([r.property({type:Boolean})],ao.prototype,"disabled",void 0),no([r.state()],ao.prototype,"hovered",void 0),no([r.state()],ao.prototype,"focused",void 0),no([r.state()],ao.prototype,"pressed",void 0),no([r.state()],ao.prototype,"rippling",void 0),no([r.state()],ao.prototype,"originX",void 0),no([r.state()],ao.prototype,"originY",void 0),no([r.query(".ft-ripple")],ao.prototype,"ripple",void 0),no([r.query(".ft-ripple--effect")],ao.prototype,"rippleEffect",void 0),o.customElement("ft-ripple")(ao);
|
|
546
546
|
/**
|
|
547
547
|
* @license
|
|
548
548
|
* Copyright 2017 Google LLC
|
|
@@ -608,7 +608,7 @@ const Mo=Symbol.for(""),To=t=>{if(t?.r===Mo)return t?._$litStatic$},jo=t=>({_$li
|
|
|
608
608
|
</div>
|
|
609
609
|
</div>
|
|
610
610
|
</div>
|
|
611
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&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(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",rr(this.slottedElement,this.tooltip,{middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(o){const{x:e,y:r,placement:i}=o,{mainAxis:n=!0,crossAxis:a=!1,limiter:l={fn:t=>{let{x:o,y:e}=t;return{x:o,y:e}}},...c}=ye(t,o),s={x:e,y:r},p=await we(o,c),f=xe(ge(i)),d=be(f);let h=s[d],y=s[f];if(n){const t="y"===d?"bottom":"right";h=he(h+p["y"===d?"top":"left"],h,h-p[t])}if(a){const t="y"===f?"bottom":"right";y=he(y+p["y"===f?"top":"left"],y,y-p[t])}const g=l.fn({...o,[d]:h,[f]:y});return{...g,data:{x:g.x-e,y:g.y-r}}}}),Ce({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),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())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}nr.elementDefinitions={"ft-typography":qo},nr.styles=ie,ir([r.property()],nr.prototype,"text",void 0),ir([r.property({type:Boolean})],nr.prototype,"manual",void 0),ir([r.property({type:Boolean})],nr.prototype,"inline",void 0),ir([r.property({type:Number})],nr.prototype,"delay",void 0),ir([r.property()],nr.prototype,"position",void 0),ir([r.queryAssignedNodes()],nr.prototype,"slotNodes",void 0),ir([r.query(".ft-tooltip--container")],nr.prototype,"container",void 0),ir([r.query(".ft-tooltip")],nr.prototype,"tooltip",void 0),ir([r.query(".ft-tooltip--content")],nr.prototype,"tooltipContent",void 0),ir([r.state()],nr.prototype,"visible",void 0),o.customElement("ft-tooltip")(nr);class ar extends o.FtLitElement{render(){return e.html`
|
|
611
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&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(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",rr(this.slottedElement,this.tooltip,{middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(o){const{x:e,y:r,placement:i}=o,{mainAxis:n=!0,crossAxis:a=!1,limiter:l={fn:t=>{let{x:o,y:e}=t;return{x:o,y:e}}},...c}=ye(t,o),s={x:e,y:r},p=await we(o,c),f=xe(ge(i)),d=be(f);let h=s[d],y=s[f];if(n){const t="y"===d?"bottom":"right";h=he(h+p["y"===d?"top":"left"],h,h-p[t])}if(a){const t="y"===f?"bottom":"right";y=he(y+p["y"===f?"top":"left"],y,y-p[t])}const g=l.fn({...o,[d]:h,[f]:y});return{...g,data:{x:g.x-e,y:g.y-r}}}}),Ce({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),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())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}nr.elementDefinitions={"ft-typography":qo},nr.styles=ie,ir([r.property()],nr.prototype,"text",void 0),ir([r.property({type:Boolean})],nr.prototype,"manual",void 0),ir([r.property({type:Boolean})],nr.prototype,"inline",void 0),ir([r.property({type:Number})],nr.prototype,"delay",void 0),ir([r.property()],nr.prototype,"position",void 0),ir([r.queryAssignedNodes()],nr.prototype,"slotNodes",void 0),ir([r.query(".ft-tooltip--container")],nr.prototype,"container",void 0),ir([r.query(".ft-tooltip")],nr.prototype,"tooltip",void 0),ir([r.query(".ft-tooltip--content")],nr.prototype,"tooltipContent",void 0),ir([r.state()],nr.prototype,"visible",void 0),ir([r.eventOptions({passive:!0})],nr.prototype,"onTouch",null),ir([r.eventOptions({passive:!0})],nr.prototype,"onHover",null),ir([r.eventOptions({passive:!0})],nr.prototype,"onOut",null),o.customElement("ft-tooltip")(nr);class ar extends o.FtLitElement{render(){return e.html`
|
|
612
612
|
<div class="ft-loader">
|
|
613
613
|
<div></div>
|
|
614
614
|
<div></div>
|