@fluid-topics/ft-text-area 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.
@@ -453,7 +453,7 @@ Also for action icons.`,t.colorGray200),contentGlobalSubtle:e.extend("--ft-conte
453
453
  <div class="ft-ripple--background"></div>
454
454
  <div class="ft-ripple--effect"></div>
455
455
  </div>
456
- `}contentAvailableCallback(r){super.contentAvailableCallback(r),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(r){var n,i;super.update(r),r.has("disabled")&&(this.disabled?(this.endRipple(),(n=this.target)===null||n===void 0||n.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 r,n;let i=(r=this.shadowRoot)===null||r===void 0?void 0:r.host.parentElement;i&&this.setupFor((n=this.target)!==null&&n!==void 0?n:i)}setupFor(r){if(this.setupDebouncer.cancel(),this.target===r)return;this.onDisconnect&&this.onDisconnect(),this.target=r,r.setAttribute("data-is-ft-ripple-target","true");let n=(...f)=>u=>{f.forEach(b=>window.addEventListener(b,this.endPress,{once:!0})),this.startPress(u)},i=n("mouseup","contextmenu"),l=n("touchend","touchcancel"),c=f=>{["Enter"," "].includes(f.key)&&n("keyup")(f)},d={passive:!0};r.addEventListener("mouseover",this.startHover,d),r.addEventListener("mousemove",this.moveRipple,d),r.addEventListener("mouseleave",this.endHover,d),r.addEventListener("mousedown",i,d),r.addEventListener("touchstart",l,d),r.addEventListener("touchmove",this.moveRipple,d),r.addEventListener("keydown",c,d),r.addEventListener("focus",this.startFocus,d),r.addEventListener("blur",this.endFocus,d),r.addEventListener("focusin",this.startFocus,d),r.addEventListener("focusout",this.endFocus,d),this.onDisconnect=()=>{r.removeAttribute("data-is-ft-ripple-target"),r.removeEventListener("mouseover",this.startHover,d),r.removeEventListener("mousemove",this.moveRipple,d),r.removeEventListener("mouseleave",this.endHover,d),r.removeEventListener("mousedown",i,d),r.removeEventListener("touchstart",l,d),r.removeEventListener("touchmove",this.moveRipple,d),r.removeEventListener("keydown",c,d),r.removeEventListener("focus",this.startFocus,d),r.removeEventListener("blur",this.endFocus,d),r.removeEventListener("focusin",this.startFocus,d),r.removeEventListener("focusout",this.endFocus,d),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(r){let n=r,i=r,l,c;return n.x!=null?{x:l,y:c}=n:i.touches!=null&&(l=i.touches[0].clientX,c=i.touches[0].clientY),{x:l,y:c}}isFocusVisible(r){return r instanceof HTMLElement?r.matches(":focus-visible"):!0}isIgnored(r){if(this.disabled)return!0;if(r!=null)for(let n of r.composedPath()){if(n===this.target)break;if("hasAttribute"in n&&n.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};C.elementDefinitions={};C.styles=Io;I([(0,w.property)({type:Boolean})],C.prototype,"primary",void 0);I([(0,w.property)({type:Boolean})],C.prototype,"secondary",void 0);I([(0,w.property)({type:Boolean})],C.prototype,"unbounded",void 0);I([(0,w.property)({type:Boolean})],C.prototype,"activated",void 0);I([(0,w.property)({type:Boolean})],C.prototype,"selected",void 0);I([(0,w.property)({type:Boolean})],C.prototype,"disabled",void 0);I([(0,w.state)()],C.prototype,"hovered",void 0);I([(0,w.state)()],C.prototype,"focused",void 0);I([(0,w.state)()],C.prototype,"pressed",void 0);I([(0,w.state)()],C.prototype,"rippling",void 0);I([(0,w.state)()],C.prototype,"originX",void 0);I([(0,w.state)()],C.prototype,"originY",void 0);I([(0,w.query)(".ft-ripple")],C.prototype,"ripple",void 0);I([(0,w.query)(".ft-ripple--effect")],C.prototype,"rippleEffect",void 0);(0,Po.customElement)("ft-ripple")(C);var ko=y(W()),m=y(E());var S={fontSize:m.FtCssVariableFactory.create("--ft-text-area-font-size","","SIZE","14px"),labelSize:m.FtCssVariableFactory.create("--ft-text-area-label-size","","SIZE","11px"),verticalSpacing:m.FtCssVariableFactory.create("--ft-text-area-vertical-spacing","","SIZE","4px"),horizontalSpacing:m.FtCssVariableFactory.create("--ft-text-area-horizontal-spacing","","SIZE","16px"),helperColor:m.FtCssVariableFactory.extend("--ft-text-area-helper-color","",m.designSystemVariables.colorOnSurfaceMedium),colorPrimary:m.FtCssVariableFactory.external(m.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:m.FtCssVariableFactory.external(m.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:m.FtCssVariableFactory.external(m.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:m.FtCssVariableFactory.external(m.designSystemVariables.borderRadiusS,"Design system"),colorError:m.FtCssVariableFactory.external(m.designSystemVariables.colorError,"Design system")},Ho=ko.css`
456
+ `}contentAvailableCallback(r){super.contentAvailableCallback(r),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(r){var n,i;super.update(r),r.has("disabled")&&(this.disabled?(this.endRipple(),(n=this.target)===null||n===void 0||n.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 r,n;let i=(r=this.shadowRoot)===null||r===void 0?void 0:r.host.parentElement;i&&this.setupFor((n=this.target)!==null&&n!==void 0?n:i)}forceFocusUpdate(){var r;!((r=this.target)===null||r===void 0)&&r.matches(":focus-within")?this.startFocus():this.endFocus()}setupFor(r){if(this.setupDebouncer.cancel(),this.target===r)return;this.onDisconnect&&this.onDisconnect(),this.target=r,r.setAttribute("data-is-ft-ripple-target","true");let n=(...f)=>u=>{f.forEach(b=>window.addEventListener(b,this.endPress,{once:!0})),this.startPress(u)},i=n("mouseup","contextmenu"),l=n("touchend","touchcancel"),c=f=>{["Enter"," "].includes(f.key)&&n("keyup")(f)},d={passive:!0};r.addEventListener("mouseover",this.startHover,d),r.addEventListener("mousemove",this.moveRipple,d),r.addEventListener("mouseleave",this.endHover,d),r.addEventListener("mousedown",i,d),r.addEventListener("touchstart",l,d),r.addEventListener("touchmove",this.moveRipple,d),r.addEventListener("keydown",c,d),r.addEventListener("focus",this.startFocus,d),r.addEventListener("blur",this.endFocus,d),r.addEventListener("focusin",this.startFocus,d),r.addEventListener("focusout",this.endFocus,d),this.onDisconnect=()=>{r.removeAttribute("data-is-ft-ripple-target"),r.removeEventListener("mouseover",this.startHover,d),r.removeEventListener("mousemove",this.moveRipple,d),r.removeEventListener("mouseleave",this.endHover,d),r.removeEventListener("mousedown",i,d),r.removeEventListener("touchstart",l,d),r.removeEventListener("touchmove",this.moveRipple,d),r.removeEventListener("keydown",c,d),r.removeEventListener("focus",this.startFocus,d),r.removeEventListener("blur",this.endFocus,d),r.removeEventListener("focusin",this.startFocus,d),r.removeEventListener("focusout",this.endFocus,d),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(r){let n=r,i=r,l,c;return n.x!=null?{x:l,y:c}=n:i.touches!=null&&(l=i.touches[0].clientX,c=i.touches[0].clientY),{x:l,y:c}}isFocusVisible(r){return r instanceof HTMLElement?r.matches(":focus-visible"):!0}isIgnored(r){if(this.disabled)return!0;if(r!=null)for(let n of r.composedPath()){if(n===this.target)break;if("hasAttribute"in n&&n.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};C.elementDefinitions={};C.styles=Io;I([(0,w.property)({type:Boolean})],C.prototype,"primary",void 0);I([(0,w.property)({type:Boolean})],C.prototype,"secondary",void 0);I([(0,w.property)({type:Boolean})],C.prototype,"unbounded",void 0);I([(0,w.property)({type:Boolean})],C.prototype,"activated",void 0);I([(0,w.property)({type:Boolean})],C.prototype,"selected",void 0);I([(0,w.property)({type:Boolean})],C.prototype,"disabled",void 0);I([(0,w.state)()],C.prototype,"hovered",void 0);I([(0,w.state)()],C.prototype,"focused",void 0);I([(0,w.state)()],C.prototype,"pressed",void 0);I([(0,w.state)()],C.prototype,"rippling",void 0);I([(0,w.state)()],C.prototype,"originX",void 0);I([(0,w.state)()],C.prototype,"originY",void 0);I([(0,w.query)(".ft-ripple")],C.prototype,"ripple",void 0);I([(0,w.query)(".ft-ripple--effect")],C.prototype,"rippleEffect",void 0);(0,Po.customElement)("ft-ripple")(C);var ko=y(W()),m=y(E());var S={fontSize:m.FtCssVariableFactory.create("--ft-text-area-font-size","","SIZE","14px"),labelSize:m.FtCssVariableFactory.create("--ft-text-area-label-size","","SIZE","11px"),verticalSpacing:m.FtCssVariableFactory.create("--ft-text-area-vertical-spacing","","SIZE","4px"),horizontalSpacing:m.FtCssVariableFactory.create("--ft-text-area-horizontal-spacing","","SIZE","16px"),helperColor:m.FtCssVariableFactory.extend("--ft-text-area-helper-color","",m.designSystemVariables.colorOnSurfaceMedium),colorPrimary:m.FtCssVariableFactory.external(m.designSystemVariables.colorPrimary,"Design system"),colorOnSurface:m.FtCssVariableFactory.external(m.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceDisabled:m.FtCssVariableFactory.external(m.designSystemVariables.colorOnSurfaceDisabled,"Design system"),borderRadiusS:m.FtCssVariableFactory.external(m.designSystemVariables.borderRadiusS,"Design system"),colorError:m.FtCssVariableFactory.external(m.designSystemVariables.colorError,"Design system")},Ho=ko.css`
457
457
  *:focus {
458
458
  outline: none;
459
459
  }