@rmwc/floating-label
Advanced tools
Comparing version 14.0.12 to 14.1.0
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),i=require("@rmwc/base"),d=require("@material/floating-label"),o=require("react"),c=a=>{const{foundation:n,...s}=i.useFoundation({props:a,elements:{rootEl:!0},api:({foundation:t})=>({getWidth(){return t.getWidth()},setRequired(e){return t.setRequired(e)}}),foundation:({rootEl:t})=>new d.MDCFloatingLabelFoundation({addClass:e=>t.addClass(e),removeClass:e=>t.removeClass(e),getWidth:()=>{var e;return((e=t.ref)==null?void 0:e.scrollWidth)||0},registerInteractionHandler:(e,r)=>t.addEventListener(e,r),deregisterInteractionHandler:(e,r)=>t.removeEventListener(e,r)})});return o.useEffect(()=>{n.shake(!!a.shake)},[a.shake,n]),o.useEffect(()=>{n.float(!!a.float)},[a.float,n]),{foundation:n,...s}},f=i.createComponent(function(n,s){const{rootEl:t}=c(n),{shake:e,float:r,apiRef:g,...l}=n;return u.jsx("label",{...t.props({...l,className:"mdc-floating-label"}),ref:i.mergeRefs(t.reactRef,s)})});exports.FloatingLabel=f; | ||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),i=require("@rmwc/base"),d=require("@material/floating-label"),o=require("react"),c=a=>{const{foundation:n,...s}=i.useFoundation({props:a,elements:{rootEl:!0},api:({foundation:t})=>({getWidth(){return t.getWidth()},setRequired(e){return t.setRequired(e)}}),foundation:({rootEl:t})=>new d.MDCFloatingLabelFoundation({addClass:e=>t.addClass(e),removeClass:e=>t.removeClass(e),getWidth:()=>{var e;return((e=t.ref)==null?void 0:e.scrollWidth)||0},registerInteractionHandler:(e,r)=>t.addEventListener(e,r),deregisterInteractionHandler:(e,r)=>t.removeEventListener(e,r)})});return o.useEffect(()=>{n.shake(!!a.shake)},[a.shake,n]),o.useEffect(()=>{n.float(!!a.float)},[a.float,n]),{foundation:n,...s}},f=i.createComponent(function(n,s){const{rootEl:t}=c(n),{shake:e,float:r,apiRef:g,...l}=n;return u.jsx("span",{...t.props({...l,className:"mdc-floating-label"}),ref:i.mergeRefs(t.reactRef,s)})});exports.FloatingLabel=f; |
{ | ||
"name": "@rmwc/floating-label", | ||
"version": "14.0.12", | ||
"version": "14.1.0", | ||
"description": "RMWC FloatingLabel component", | ||
@@ -42,5 +42,5 @@ "main": "./index.js", | ||
"@material/floating-label": "^14.0.0", | ||
"@rmwc/base": "14.0.12", | ||
"@rmwc/types": "14.0.12" | ||
"@rmwc/base": "14.1.0", | ||
"@rmwc/types": "14.1.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4529
+ Added@rmwc/base@14.1.0(transitive)
+ Added@rmwc/types@14.1.0(transitive)
- Removed@rmwc/base@14.0.12(transitive)
- Removed@rmwc/types@14.0.12(transitive)
Updated@rmwc/base@14.1.0
Updated@rmwc/types@14.1.0