UNPKG

h_ui

Version:

A Vue.js 2.0 UI Components Framework

1 lines 3.59 kB
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("h_ui/dist/lib/util/tools.js"));else if("function"==typeof define&&define.amd)define(["h_ui/dist/lib/util/tools.js"],t);else{var n="object"==typeof exports?t(require("h_ui/dist/lib/util/tools.js")):t(e["h_ui/dist/lib/util/tools.js"]);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,(function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},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=53)}({33:function(t,n){t.exports=e},53:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(33),r="h-waves",i=function(e,t){["transform","-webkit-transform","-moz-transform"].forEach((function(n){e.style[n]=t}))},a=function(e,t,n){var a=document,c=a.createElement("span"),u=a.createElement("span"),s=!!n.value&&n.value.color,l=n.modifiers.light;c.appendChild(u),c.className="".concat(r,"-wrap"),(0,o.arrContains)(t.classList,"relative")&&t.classList.remove("relative"),t.classList.add("relative"),l&&c.classList.add("light"),!l&&s&&c.classList.add("".concat(s,"-text")),u.className="".concat(r,"-animation"),u.style.width="".concat(2*t.clientWidth,"px"),u.style.height=u.style.width,t.appendChild(c);var d=t.getBoundingClientRect(),f=(e.clientX||e.x)-d.left,m=(e.clientY||e.y)-d.top;u.classList.add("".concat(r,"-animation-enter")),u.classList.add("".concat(r,"-animation-visible")),i(u,"translate3d(-50%, -50%, 0) translate3d(".concat(f,"px, ").concat(m,"px, 0) scale3d(.001, .001, 1)")),u.dataset.activated=Date.now(),setTimeout((function(e){u.classList.remove("".concat(r,"-animation-enter")),i(u,"translate3d(-50%, -50%, 0) translate3d(".concat(f,"px, ").concat(m,"px, 0)"))}),0)},c=function(e){var t=e.getElementsByClassName("".concat(r,"-animation"));if(0!==t.length){var n=t[t.length-1],i=500-(Date.now()-Number(n.dataset.activated));i=i<0?0:i,setTimeout((function(e){n.classList.remove("".concat(r,"-animation-visible")),setTimeout((function(e){(0,o.removeDom)(n.parentNode)}),300)}),i)}},u={bind:function(e,t,n){"ontouchtart"in window&&(e.addEventListener("touchend",(function(t){return c(e)}),!1),e.addEventListener("touchcancel",(function(t){return c(e)}),!1)),(0,o.addHandler)(e,"mousedown",(function(n){return a(n,e,t)})),(0,o.addHandler)(e,"mouseup",(function(t){return c(e)})),(0,o.addHandler)(e,"mouseleave",(function(t){return c(e)}))},unbind:function(e,t){(0,o.removeHandler)(e,"mousedown",(function(n){return a(n,e,t)})),(0,o.removeHandler)(e,"touchend",(function(t){return c(e)})),(0,o.removeHandler)(e,"touchcancel",(function(t){return c(e)})),(0,o.removeHandler)(e,"mouseup",(function(t){return c(e)})),(0,o.removeHandler)(e,"mouseleave",(function(t){return c(e)}))}};t.default=u}})}));