@mcwv/floating-label
Advanced tools
Comparing version 0.14.0-alpha.1 to 0.14.0-alpha.2
@@ -39,3 +39,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=48)}({2:function(e,t,n){"use strict";n.r(t); | ||
*/ | ||
var a=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}(),i={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},s=function(e){function t(n){var r=e.call(this,o({},t.defaultAdapter,n))||this;return r.shakeAnimationEndHandler_=function(){return r.handleShakeAnimationEnd_()},r}return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return i},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}(a),l={name:"mcw-floating-label",data:()=>({labelClasses:{"mdc-floating-label":!0}}),mounted(){this.foundation=new s({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)}},render(e){const{$scopedSlots:t}=this;return e("label",{class:this.labelClasses},t.default&&t.default())}};n.d(t,"mcwFloatingLabel",(function(){return l}));var u;t.default={version:"__VERSION__",install:e=>{Object.entries(u).forEach(([t,n])=>{const r=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),[o,...a]=r.split("-"),i=["mdc",...a].join("-"),s=["mcw",...a].join("-"),l=e.extend(n);e.component(s,l),e.component(i,l)})},components:u={mcwFloatingLabel:l}}},48:function(e,t,n){n(2),e.exports=n(49)},49:function(e,t,n){}})})); | ||
var a=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}(),i={LABEL_FLOAT_ABOVE:"mdc-floating-label--float-above",LABEL_SHAKE:"mdc-floating-label--shake",ROOT:"mdc-floating-label"},s=function(e){function t(n){var r=e.call(this,o({},t.defaultAdapter,n))||this;return r.shakeAnimationEndHandler_=function(){return r.handleShakeAnimationEnd_()},r}return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return i},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}(a),l={name:"mcw-floating-label",data:()=>({labelClasses:{"mdc-floating-label":!0}}),mounted(){this.foundation=new s({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)}},render(e){const{$scopedSlots:t}=this;return e("label",{class:this.labelClasses},t.default&&t.default())}};n.d(t,"mcwFloatingLabel",(function(){return l}));var u;t.default={version:"__VERSION__",install:e=>{Object.entries(u).forEach(([t,n])=>{const r=t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),[o,...a]=r.split("-"),i=["mdc",...a].join("-"),s=["mcw",...a].join("-"),l=e.extend(n);e.component(s,l),e.component(i,l)})},components:u={mcwFloatingLabel:l}}},48:function(e,t,n){n(49),e.exports=n(2)},49:function(e,t,n){}})})); | ||
//# sourceMappingURL=mcwv.floatingLabel.min.js.map |
{ | ||
"name": "@mcwv/floating-label", | ||
"description": "The Vue Material Adapter for the web floating-label component", | ||
"version": "0.14.0-alpha.1", | ||
"version": "0.14.0-alpha.2", | ||
"license": "MIT", | ||
@@ -20,5 +20,5 @@ "main": "dist/mcwv.floatingLabel.min.js", | ||
"@material/floating-label": "^4.0.0", | ||
"@mcwv/base": "^0.14.0-alpha.1" | ||
"@mcwv/base": "^0.14.0-alpha.2" | ||
}, | ||
"gitHead": "c9caef4b2854d34ded429a1ec4210d955e9732d3" | ||
"gitHead": "b7aac5aaadf2e4e090710ea12c502e20bff8b1f1" | ||
} |
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
Updated@mcwv/base@^0.14.0-alpha.2