material-components-vue
Version:
Material Design components for Vue.js
2 lines • 8.88 kB
JavaScript
/*! For license information please see line-ripple.min.js.LICENSE */
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,(function(){return n={},t.m=e={0:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"e",(function(){return a})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return s}));var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function a(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function u(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function s(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(u(arguments[e]));return t}},2:function(t,e,n){"use strict";var r={inheritAttrs:!1},i=["primary","secondary","background","surface","on-primary","on-secondary","on-surface","primary-bg","secondary-bg","text-primary-on-light","text-secondary-on-light","text-hint-on-light","text-disabled-on-light","text-icon-on-light","text-primary-on-dark","text-secondary-on-dark","text-hint-on-dark","text-disabled-on-dark","text-icon-on-dark"],o={props:{theming:{type:String,default:""}},mounted:function(){-1<i.indexOf(this.theming)&&this.$el.classList.add("mdc-theme--"+this.theming)}};n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o}))},23:function(t,e,n){"use strict";var r,i=n(0),o=n(5),a=n(3),u={LINE_RIPPLE_ACTIVE:"mdc-line-ripple--active",LINE_RIPPLE_DEACTIVATING:"mdc-line-ripple--deactivating"},s=(r=a.a,i.b(c,r),Object.defineProperty(c,"cssClasses",{get:function(){return u},enumerable:!0,configurable:!0}),Object.defineProperty(c,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){}}},enumerable:!0,configurable:!0}),c.prototype.init=function(){this.adapter_.registerEventHandler("transitionend",this.transitionEndHandler_)},c.prototype.destroy=function(){this.adapter_.deregisterEventHandler("transitionend",this.transitionEndHandler_)},c.prototype.activate=function(){this.adapter_.removeClass(u.LINE_RIPPLE_DEACTIVATING),this.adapter_.addClass(u.LINE_RIPPLE_ACTIVE)},c.prototype.setRippleCenter=function(t){this.adapter_.setStyle("transform-origin",t+"px center")},c.prototype.deactivate=function(){this.adapter_.addClass(u.LINE_RIPPLE_DEACTIVATING)},c.prototype.handleTransitionEnd=function(t){var e=this.adapter_.hasClass(u.LINE_RIPPLE_DEACTIVATING);"opacity"===t.propertyName&&e&&(this.adapter_.removeClass(u.LINE_RIPPLE_ACTIVE),this.adapter_.removeClass(u.LINE_RIPPLE_DEACTIVATING))},c);function c(t){var e=r.call(this,i.a({},c.defaultAdapter,t))||this;return e.transitionEndHandler_=function(t){return e.handleTransitionEnd(t)},e}n.d(e,"a",(function(){return l}));var f,l=(f=o.a,i.b(d,f),d.attachTo=function(t){return new d(t)},d.prototype.activate=function(){this.foundation_.activate()},d.prototype.deactivate=function(){this.foundation_.deactivate()},d.prototype.setRippleCenter=function(t){this.foundation_.setRippleCenter(t)},d.prototype.getDefaultFoundation=function(){var t=this;return new s({addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},hasClass:function(e){return t.root_.classList.contains(e)},setStyle:function(e,n){return t.root_.style.setProperty(e,n)},registerEventHandler:function(e,n){return t.listen(e,n)},deregisterEventHandler:function(e,n){return t.unlisten(e,n)}})},d);function d(){return null!==f&&f.apply(this,arguments)||this}},3:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=(Object.defineProperty(i,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(i,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(i,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),i.prototype.init=function(){},i.prototype.destroy=function(){},i);function i(t){void 0===t&&(t={}),this.adapter_=t}},4:function(t,e,n){"use strict";function r(t,e,n,r,i,o,a,u){var s,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),a?(s=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=s):i&&(s=u?function(){i.call(this,this.$root.$options.shadowRoot)}:i),s)if(c.functional){c._injectStyles=s;var f=c.render;c.render=function(t,e){return s.call(e),f(t,e)}}else{var l=c.beforeCreate;c.beforeCreate=l?[].concat(l,s):[s]}return{exports:t,options:c}}n.d(e,"a",(function(){return r}))},42:function(t,e,n){},5:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(0),i=n(3),o=(a.attachTo=function(t){return new a(t,new i.a({}))},a.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},a.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},a.prototype.initialSyncWithDOM=function(){},a.prototype.destroy=function(){this.foundation_.destroy()},a.prototype.listen=function(t,e,n){this.root_.addEventListener(t,e,n)},a.prototype.unlisten=function(t,e,n){this.root_.removeEventListener(t,e,n)},a.prototype.emit=function(t,e,n){var r;void 0===n&&(n=!1),"function"==typeof CustomEvent?r=new CustomEvent(t,{bubbles:n,detail:e}):(r=document.createEvent("CustomEvent")).initCustomEvent(t,n,!1,e),this.root_.dispatchEvent(r)},a);function a(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root_=t,this.initialize.apply(this,r.d(n)),this.foundation_=void 0===e?this.getDefaultFoundation():e,this.foundation_.init(),this.initialSyncWithDOM()}},7:function(t,e,n){"use strict";function r(t){"undefined"!=typeof window&&window.Vue&&window.Vue.use(t)}n.d(e,"a",(function(){return r}))},87:function(t,e,n){"use strict";n.r(e);var r=n(23),i=n(2),o={mixins:[i.a,i.b],props:{activate:{type:Boolean,default:!0},rippleCenter:{type:Number,default:null}},data:function(){return{mdcLineRipple:void 0}},watch:{activate:function(){this.activate?this.mdcLineRipple.activate():this.mdcLineRipple.deactivate()},rippleCenter:function(){this.setRippleCenter(this.rippleCenter)}},mounted:function(){this.mdcLineRipple=r.a.attachTo(this.$el),this.rippleCenter&&this.setRippleCenter(this.rippleCenter)},beforeDestroy:function(){void 0!==this.mdcLineRipple&&this.mdcLineRipple.destroy()},methods:{setRippleCenter:function(t){this.mdcLineRipple.setRippleCenter(t)}}},a=n(4),u=Object(a.a)(o,(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"mdc-line-ripple"})}),[],!1,null,null,null).exports,s=(n(42),n(7)),c={install:function(t){t.component("m-line-ripple",u)}};e.default=c,Object(s.a)(c)}},t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(t){return e[t]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=87);function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var e,n}));