Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mcwv/floating-label

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mcwv/floating-label - npm Package Compare versions

Comparing version 0.2.3 to 0.3.0

2

dist/mcwv.floatingLabel.min.js

@@ -38,3 +38,3 @@ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.floatingLabel=t():(e.mcwv=e.mcwv||{},e.mcwv.floatingLabel=t())}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=33)}({2:function(e,t,n){"use strict";function r(e){return{version:"__VERSION__",install:t=>{Object.values(e).forEach(e=>t.component(e.name,e))},components:e}}n.d(t,"a",function(){return r})},33:function(e,t,n){n(89),e.exports=n(34)},34:function(e,t,n){},89:function(e,t,n){"use strict";n.r(t);var r=n(2),o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};

*/
var i=function(){function e(e){void 0===e&&(e={}),this.adapter_=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),s={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},l=function(e){function t(n){var r=e.call(this,a({},t.defaultAdapter,n))||this;return r.shakeAnimationEndHandler_=function(){return r.handleShakeAnimationEnd_()},r}return function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return s},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.adapter_.registerInteractionHandler("animationend",this.shakeAnimationEndHandler_)},t.prototype.destroy=function(){this.adapter_.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler_)},t.prototype.getWidth=function(){return this.adapter_.getWidth()},t.prototype.shake=function(e){var n=t.cssClasses.LABEL_SHAKE;e?this.adapter_.addClass(n):this.adapter_.removeClass(n)},t.prototype.float=function(e){var n=t.cssClasses,r=n.LABEL_FLOAT_ABOVE,o=n.LABEL_SHAKE;e?this.adapter_.addClass(r):(this.adapter_.removeClass(r),this.adapter_.removeClass(o))},t.prototype.handleShakeAnimationEnd_=function(){var e=t.cssClasses.LABEL_SHAKE;this.adapter_.removeClass(e)},t}(i),u={name:"mdc-floating-label",data:()=>({labelClasses:{"mdc-floating-label":!0}}),render(e){return e("label",{class:this.labelClasses},this.$slots.default)},mounted(){this.foundation=new l({addClass:e=>{this.$set(this.labelClasses,e,!0)},removeClass:e=>{this.$delete(this.labelClasses,e)},getWidth:()=>this.$el.scrollWidth,registerInteractionHandler:(e,t)=>{this.$el.addEventListener(e,t)},deregisterInteractionHandler:(e,t)=>{this.$el.removeEventListener(e,t)}}),this.foundation.init()},beforeDestroy(){const e=this.foundation;this.foundation=null,e.destroy()},methods:{getWidth(){return this.foundation.getWidth()},float(e){this.foundation.float(e)},shake(e){this.foundation.shake(e)}}};n.d(t,"mdcFloatingLabel",function(){return u});t.default=Object(r.a)({mdcFloatingLabel:u})}})});
var i=function(){function e(e){void 0===e&&(e={}),this.adapter_=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),s={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},l=function(e){function t(n){var r=e.call(this,a({},t.defaultAdapter,n))||this;return r.shakeAnimationEndHandler_=function(){return r.handleShakeAnimationEnd_()},r}return function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return s},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},getWidth:function(){return 0},registerInteractionHandler:function(){},deregisterInteractionHandler:function(){}}},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.adapter_.registerInteractionHandler("animationend",this.shakeAnimationEndHandler_)},t.prototype.destroy=function(){this.adapter_.deregisterInteractionHandler("animationend",this.shakeAnimationEndHandler_)},t.prototype.getWidth=function(){return this.adapter_.getWidth()},t.prototype.shake=function(e){var n=t.cssClasses.LABEL_SHAKE;e?this.adapter_.addClass(n):this.adapter_.removeClass(n)},t.prototype.float=function(e){var n=t.cssClasses,r=n.LABEL_FLOAT_ABOVE,o=n.LABEL_SHAKE;e?this.adapter_.addClass(r):(this.adapter_.removeClass(r),this.adapter_.removeClass(o))},t.prototype.handleShakeAnimationEnd_=function(){var e=t.cssClasses.LABEL_SHAKE;this.adapter_.removeClass(e)},t}(i),u={name:"mdc-floating-label",data:()=>({labelClasses:{"mdc-floating-label":!0}}),render(e){return e("label",{class:this.labelClasses},this.$slots.default)},mounted(){this.foundation=new l({addClass:e=>{this.$set(this.labelClasses,e,!0)},removeClass:e=>{this.$delete(this.labelClasses,e)},getWidth:()=>this.$el.scrollWidth,registerInteractionHandler:(e,t)=>{this.$el.addEventListener(e,t)},deregisterInteractionHandler:(e,t)=>{this.$el.removeEventListener(e,t)}}),this.foundation.init()},beforeDestroy(){this.foundation.destroy()},methods:{getWidth(){return this.foundation.getWidth()},float(e){this.foundation.float(e)},shake(e){this.foundation.shake(e)}}};n.d(t,"mdcFloatingLabel",function(){return u});t.default=Object(r.a)({mdcFloatingLabel:u})}})});
//# sourceMappingURL=mcwv.floatingLabel.min.js.map

@@ -36,5 +36,3 @@ import MDCFloatingLabelFoundation from '@material/floating-label/foundation';

beforeDestroy() {
const foundation = this.foundation;
this.foundation = null;
foundation.destroy();
this.foundation.destroy();
},

@@ -41,0 +39,0 @@

{
"name": "@mcwv/floating-label",
"description": "The Vue Material Adapter for the web floating-label component",
"version": "0.2.3",
"version": "0.3.0",
"license": "MIT",

@@ -20,5 +20,5 @@ "main": "dist/mcwv.floatingLabel.min.js",

"@material/floating-label": "^1.1.0",
"@mcwv/base": "^0.2.3"
"@mcwv/base": "^0.3.0"
},
"gitHead": "70feeb1072e6d916dc82825111b0e06e84a59b93"
"gitHead": "e5d6ff92c9c2f8986eca1182382939bdaeabef4d"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc