@fluid-topics/ft-dialog 1.2.46 → 1.2.49

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.
@@ -495,7 +495,7 @@ Also for action icons.`,r.colorGray200),contentGlobalSubtle:t.extend("--ft-conte
495
495
  <div class="ft-ripple--background"></div>
496
496
  <div class="ft-ripple--effect"></div>
497
497
  </div>
498
- `}contentAvailableCallback(o){super.contentAvailableCallback(o),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(o){var a,i;super.update(o),o.has("disabled")&&(this.disabled?(this.endRipple(),(a=this.target)===null||a===void 0||a.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.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 o,a;let i=(o=this.shadowRoot)===null||o===void 0?void 0:o.host.parentElement;i&&this.setupFor((a=this.target)!==null&&a!==void 0?a:i)}setupFor(o){if(this.setupDebouncer.cancel(),this.target===o)return;this.onDisconnect&&this.onDisconnect(),this.target=o,o.setAttribute("data-is-ft-ripple-target","true");let a=(...p)=>y=>{p.forEach(h=>window.addEventListener(h,this.endPress,{once:!0})),this.startPress(y)},i=a("mouseup","contextmenu"),c=a("touchend","touchcancel"),l=p=>{["Enter"," "].includes(p.key)&&a("keyup")(p)},d={passive:!0};o.addEventListener("mouseover",this.startHover,d),o.addEventListener("mousemove",this.moveRipple,d),o.addEventListener("mouseleave",this.endHover,d),o.addEventListener("mousedown",i,d),o.addEventListener("touchstart",c,d),o.addEventListener("touchmove",this.moveRipple,d),o.addEventListener("keydown",l,d),o.addEventListener("focus",this.startFocus,d),o.addEventListener("blur",this.endFocus,d),o.addEventListener("focusin",this.startFocus,d),o.addEventListener("focusout",this.endFocus,d),this.onDisconnect=()=>{o.removeAttribute("data-is-ft-ripple-target"),o.removeEventListener("mouseover",this.startHover,d),o.removeEventListener("mousemove",this.moveRipple,d),o.removeEventListener("mouseleave",this.endHover,d),o.removeEventListener("mousedown",i,d),o.removeEventListener("touchstart",c,d),o.removeEventListener("touchmove",this.moveRipple,d),o.removeEventListener("keydown",l,d),o.removeEventListener("focus",this.startFocus,d),o.removeEventListener("blur",this.endFocus,d),o.removeEventListener("focusin",this.startFocus,d),o.removeEventListener("focusout",this.endFocus,d),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(o){let a=o,i=o,c,l;return a.x!=null?{x:c,y:l}=a:i.touches!=null&&(c=i.touches[0].clientX,l=i.touches[0].clientY),{x:c,y:l}}isFocusVisible(o){return o instanceof HTMLElement?o.matches(":focus-visible"):!0}isIgnored(o){if(this.disabled)return!0;if(o!=null)for(let a of o.composedPath()){if(a===this.target)break;if("hasAttribute"in a&&a.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};A.elementDefinitions={};A.styles=Ar;X([(0,G.property)({type:Boolean})],A.prototype,"primary",void 0);X([(0,G.property)({type:Boolean})],A.prototype,"secondary",void 0);X([(0,G.property)({type:Boolean})],A.prototype,"unbounded",void 0);X([(0,G.property)({type:Boolean})],A.prototype,"activated",void 0);X([(0,G.property)({type:Boolean})],A.prototype,"selected",void 0);X([(0,G.property)({type:Boolean})],A.prototype,"disabled",void 0);X([(0,G.state)()],A.prototype,"hovered",void 0);X([(0,G.state)()],A.prototype,"focused",void 0);X([(0,G.state)()],A.prototype,"pressed",void 0);X([(0,G.state)()],A.prototype,"rippling",void 0);X([(0,G.state)()],A.prototype,"originX",void 0);X([(0,G.state)()],A.prototype,"originY",void 0);X([(0,G.query)(".ft-ripple")],A.prototype,"ripple",void 0);X([(0,G.query)(".ft-ripple--effect")],A.prototype,"rippleEffect",void 0);(0,_r.customElement)("ft-ripple")(A);var ua=x(E());var ya=x(U()),H=x(pt()),pe=x(E());var Dr=x(U()),ut=x(E()),Ft={distance:ut.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),color:ut.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:ut.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),zIndex:ut.FtCssVariableFactory.create("--ft-tooltip-z-index","","NUMBER","100"),borderRadiusS:ut.FtCssVariableFactory.external(ut.designSystemVariables.borderRadiusS,"Design system"),maxWidth:ut.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px")},Ur=Dr.css`
498
+ `}contentAvailableCallback(o){super.contentAvailableCallback(o),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(o){var a,i;super.update(o),o.has("disabled")&&(this.disabled?(this.endRipple(),(a=this.target)===null||a===void 0||a.removeAttribute("data-is-ft-ripple-target")):(i=this.target)===null||i===void 0||i.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 o,a;let i=(o=this.shadowRoot)===null||o===void 0?void 0:o.host.parentElement;i&&this.setupFor((a=this.target)!==null&&a!==void 0?a:i)}forceFocusUpdate(){var o;!((o=this.target)===null||o===void 0)&&o.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(o){if(this.setupDebouncer.cancel(),this.target===o)return;this.onDisconnect&&this.onDisconnect(),this.target=o,o.setAttribute("data-is-ft-ripple-target","true");let a=(...p)=>y=>{p.forEach(h=>window.addEventListener(h,this.endPress,{once:!0})),this.startPress(y)},i=a("mouseup","contextmenu"),c=a("touchend","touchcancel"),l=p=>{["Enter"," "].includes(p.key)&&a("keyup")(p)},d={passive:!0};o.addEventListener("mouseover",this.startHover,d),o.addEventListener("mousemove",this.moveRipple,d),o.addEventListener("mouseleave",this.endHover,d),o.addEventListener("mousedown",i,d),o.addEventListener("touchstart",c,d),o.addEventListener("touchmove",this.moveRipple,d),o.addEventListener("keydown",l,d),o.addEventListener("focus",this.startFocus,d),o.addEventListener("blur",this.endFocus,d),o.addEventListener("focusin",this.startFocus,d),o.addEventListener("focusout",this.endFocus,d),this.onDisconnect=()=>{o.removeAttribute("data-is-ft-ripple-target"),o.removeEventListener("mouseover",this.startHover,d),o.removeEventListener("mousemove",this.moveRipple,d),o.removeEventListener("mouseleave",this.endHover,d),o.removeEventListener("mousedown",i,d),o.removeEventListener("touchstart",c,d),o.removeEventListener("touchmove",this.moveRipple,d),o.removeEventListener("keydown",l,d),o.removeEventListener("focus",this.startFocus,d),o.removeEventListener("blur",this.endFocus,d),o.removeEventListener("focusin",this.startFocus,d),o.removeEventListener("focusout",this.endFocus,d),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(o){let a=o,i=o,c,l;return a.x!=null?{x:c,y:l}=a:i.touches!=null&&(c=i.touches[0].clientX,l=i.touches[0].clientY),{x:c,y:l}}isFocusVisible(o){return o instanceof HTMLElement?o.matches(":focus-visible"):!0}isIgnored(o){if(this.disabled)return!0;if(o!=null)for(let a of o.composedPath()){if(a===this.target)break;if("hasAttribute"in a&&a.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};A.elementDefinitions={};A.styles=Ar;X([(0,G.property)({type:Boolean})],A.prototype,"primary",void 0);X([(0,G.property)({type:Boolean})],A.prototype,"secondary",void 0);X([(0,G.property)({type:Boolean})],A.prototype,"unbounded",void 0);X([(0,G.property)({type:Boolean})],A.prototype,"activated",void 0);X([(0,G.property)({type:Boolean})],A.prototype,"selected",void 0);X([(0,G.property)({type:Boolean})],A.prototype,"disabled",void 0);X([(0,G.state)()],A.prototype,"hovered",void 0);X([(0,G.state)()],A.prototype,"focused",void 0);X([(0,G.state)()],A.prototype,"pressed",void 0);X([(0,G.state)()],A.prototype,"rippling",void 0);X([(0,G.state)()],A.prototype,"originX",void 0);X([(0,G.state)()],A.prototype,"originY",void 0);X([(0,G.query)(".ft-ripple")],A.prototype,"ripple",void 0);X([(0,G.query)(".ft-ripple--effect")],A.prototype,"rippleEffect",void 0);(0,_r.customElement)("ft-ripple")(A);var ua=x(E());var ya=x(U()),H=x(pt()),pe=x(E());var Dr=x(U()),ut=x(E()),Ft={distance:ut.FtCssVariableFactory.create("--ft-tooltip-distance","","SIZE","4px"),color:ut.FtCssVariableFactory.create("--ft-tooltip-color","","COLOR","#FFFFFF"),backgroundColor:ut.FtCssVariableFactory.create("--ft-tooltip-background-color","","COLOR","#666666"),zIndex:ut.FtCssVariableFactory.create("--ft-tooltip-z-index","","NUMBER","100"),borderRadiusS:ut.FtCssVariableFactory.external(ut.designSystemVariables.borderRadiusS,"Design system"),maxWidth:ut.FtCssVariableFactory.create("--ft-tooltip-max-width","","SIZE","150px")},Ur=Dr.css`
499
499
  .ft-tooltip--container {
500
500
  display: block;
501
501
  }