repo_description: A lightweight Vue.js UI library with a simple API, inspired by Google's Material Design.
repo_topics: components javascript material-design ui vue vue3
code: /*!
   * Keen UI v1.4.0 (https://github.com/JosephusPaye/keen-ui)
   * (c) 2022 Josephus Paye II
   * Released under the MIT License.
   */
  !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.UiCloseButton=t():(e.KeenUI=e.KeenUI||{},e.KeenUI.UiCloseButton=t())}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return e[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},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(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=235)}({0:function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(i[r]=!0)}for(o=0;o<t.length;o++){var s=t[o];"number"==typeof s[0]&&i[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),e.push(s))}},e}},1:function(e,t){e.exports=function(e,t,n,i,o){var r,s=e=e||{},a=typeof e.default;"object"!==a&&"function"!==a||(r=e,s=e.default);var u="function"==typeof s?s.options:s;t&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns),i&&(u._scopeId=i);var l;if(o?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=l):n&&(l=n),l){var c=u.functional,d=c?u.render:u.beforeCreate;c?u.render=function(e,t){return l.call(t),d(e,t)}:u.beforeCreate=d?[].concat(d,l):[l]}return{esModule:r,exports:s,options:u}}},10:function(e,t,n){var i=n(8);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);n(2)("2dd10f28",i,!0)},11:function(e,t,n){"use strict";function i(e){n(15)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(12),r=n(14),s=n(1),a=i,u=null,l=null,c=s(o.a,r.a,a,u,l);t.default=c.exports},12:function(e,t,n){"use strict";var i=n(5),o=n(4),r=function(e,t){var n=t.currentTarget||t.target;if(n&&!i.a.has(n,"ui-ripple-ink")&&(n=n.querySelector(".ui-ripple-ink")),n){var o=n.getAttribute("data-ui-event");if(!o||o===e){n.setAttribute("data-ui-event",e);var r=n.getBoundingClientRect(),s=t.clientX-r.left,a=t.clientY-r.top,u=document.createElement("div"),l=void 0;l=r.width===r.height?1.412*r.width:Math.sqrt(r.width*r.width+r.height*r.height);var c=2*l+"px";u.style.width=c,u.style.height=c,u.style.marginLeft=-l+s+"px",u.style.marginTop=-l+a+"px",u.className="ui-ripple-ink__ink",n.appendChild(u),setTimeout(function(){i.a.add(u,"is-held")},0);var d="mousedown"===e?"mouseup":"touchend",f=function e(){document.removeEventListener(d,e),i.a.add(u,"is-done");var t=650;setTimeout(function(){n.removeChild(u),0===n.children.length&&n.removeAttribute("data-ui-event")},t)};document.addEventListener(d,f)}}},s=function(e){0===e.button&&r(e.type,e)},a=function(e){if(e.changedTouches)for(var t=0;t<e.changedTouches.length;++t)r(e.type,e.changedTouches[t])};t.a={name:"ui-ripple-ink",props:{trigger:{validator:function(e){return o.a.validate(e,'[UiRippleInk]: Invalid prop: "trigger". Expected Element, VueComponent or CSS selector string.')}}},watch:{trigger:function(){this.setupRipple()}},created:function(){this.triggerEl=null},mounted:function(){this.setupRipple()},beforeDestroy:function(){this.destroyRipple()},methods:{setupRipple:function(){return this.triggerEl=o.a.resolve(this.trigger,this.$el.parentElement),this.triggerEl?(this.triggerEl.addEventListener("touchstart",a),void this.triggerEl.addEventListener("mousedown",s)):void console.error("[UiRippleInk]: Trigger element not found.")},destroyRipple:function(){this.triggerEl&&(this.triggerEl.removeEventListener("mousedown",s),this.triggerEl.removeEventListener("touchstart",a))}}}},13:function(e,t,n){t=e.exports=n(0)(),t.push([e.i,".ui-ripple-ink{border-radius:inherit;bottom:0;display:block;left:0;overflow:hidden;position:absolute;right:0;top:0;-webkit-mask-image:-webkit-radial-gradient(circle,#fff,#000)}.ui-ripple-ink__ink{background-clip:padding-box;background-color:currentColor;border-radius:50%;height:0;opacity:.2;pointer-events:none;position:absolute;-webkit-transform:scale(0);transform:scale(0);-webkit-transition:opacity .6s ease-out,-webkit-transform .6s ease-out;transition:opacity .6s ease-out,-webkit-transform .6s ease-out;transition:transform .6s ease-out,opacity .6s ease-out;transition:transform .6s ease-out,opacity .6s ease-out,-webkit-transform .6s ease-out;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:0}.ui-ripple-ink__ink.is-held{opacity:.4;-webkit-transform:scale(1);transform:scale(1)}.ui-ripple-ink__ink.is-done{opacity:0!important}",""])},14:function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"ui-ripple-ink"})},o=[],r={render:i,staticRenderFns:o};t.a=r},15:function(e,t,n){var i=n(13);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);n(2)("24865d2e",i,!0)},2:function(e,t,n){function i(e){for(var t=0;t<e.length;t++){var n=e[t],i=c[n.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](n.parts[o]);for(;o<n.parts.length;o++)i.parts.push(r(n.parts[o]));i.parts.length>n.parts.length&&(i.parts.length=n.parts.length)}else{for(var s=[],o=0;o<n.parts.length;o++)s.push(r(n.parts[o]));c[n.id]={id:n.id,refs:1,parts:s}}}}function o(){var e=document.createElement("style");return e.type="text/css",d.appendChild(e),e}function r(e){var t,n,i=document.querySelector('style[data-vue-ssr-id~="'+e.id+'"]');if(i){if(b)return m;i.parentNode.removeChild(i)}if(h){var r=p++;i=f||(f=o()),t=s.bind(null,i,r,!1),n=s.bind(null,i,r,!0)}else i=o(),t=a.bind(null,i),n=function(){i.parentNode.removeChild(i)};return t(e),function(i){if(i){if(i.css===e.css&&i.media===e.media&&i.sourceMap===e.sourceMap)return;t(e=i)}else n()}}function s(e,t,n,i){var o=n?"":i.css;if(e.styleSheet)e.styleSheet.cssText=g(t,o);else{var r=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(r,s[t]):e.appendChild(r)}}function a(e,t){var n=t.css,i=t.media,o=t.sourceMap;if(i&&e.setAttribute("media",i),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var u="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!u)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var l=n(3),c={},d=u&&(document.head||document.getElementsByTagName("head")[0]),f=null,p=0,b=!1,m=function(){},h="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,n){b=n;var o=l(e,t);return i(o),function(t){for(var n=[],r=0;r<o.length;r++){var s=o[r],a=c[s.id];a.refs--,n.push(a)}t?(o=l(e,t),i(o)):o=[];for(var r=0;r<n.length;r++){var a=n[r];if(0===a.refs){for(var u=0;u<a.parts.length;u++)a.parts[u]();delete c[a.id]}}}};var g=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},235:function(e,t,n){e.exports=n(42)},3:function(e,t){e.exports=function(e,t){for(var n=[],i={},o=0;o<t.length;o++){var r=t[o],s=r[0],a=r[1],u=r[2],l=r[3],c={id:e+":"+o,css:a,media:u,sourceMap:l};i[s]?i[s].parts.push(c):n.push(i[s]={id:s,parts:[c]})}return n}},4:function(e,t,n){"use strict";function i(e,t){var n=e instanceof Element||e&&e._isVue||"string"==typeof e;return!n&&t&&console.warn(t),n}function o(e,t){return e instanceof Element?e:e&&e._isVue?e.$el:"string"==typeof e?document.querySelector(e):t}t.a={validate:i,resolve:o}},42:function(e,t,n){"use strict";function i(e){n(54)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(45),r=n(51),s=n(1),a=i,u=null,l=null,c=s(o.a,r.a,a,u,l);t.default=c.exports},45:function(e,t,n){"use strict";var i=n(6),o=n(11);t.a={name:"ui-close-button",props:{size:{type:String,default:"normal"},color:{type:String,default:"black"},disableRipple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},computed:{classes:function(){return["ui-close-button--size-"+this.size,"ui-close-button--color-"+this.color,{"is-disabled":this.disabled||this.loading}]}},methods:{onClick:function(e){this.$emit("click",e)}},components:{UiIcon:i.default,UiRippleInk:o.default}}},48:function(e,t,n){t=e.exports=n(0)(),t.push([e.i,".ui-close-button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:transparent;background:none;border-radius:50%;border:none;cursor:default;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:0;outline:none;overflow:hidden;padding:0;position:relative;-webkit-mask-image:-webkit-radial-gradient(circle,#fff,#000)}.ui-close-button::-moz-focus-inner{border:0}.ui-close-button:hover:not(.is-disabled){background-color:rgba(0,0,0,.1)}body[modality=keyboard] .ui-close-button:focus .ui-close-button__focus-ring{opacity:1;-webkit-transform:scale(1);transform:scale(1)}.ui-close-button.is-disabled{opacity:.6}.ui-close-button__icon{color:currentColor;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:relative;width:100%;z-index:1}.ui-close-button__focus-ring{background-color:rgba(0,0,0,.15);border-radius:50%;left:0;opacity:0;position:absolute;top:0;-webkit-transform-origin:center;transform-origin:center;-webkit-transform:scale(0);transform:scale(0);-webkit-transition:opacity .3s ease,-webkit-transform .3s ease;transition:opacity .3s ease,-webkit-transform .3s ease;transition:transform .3s ease,opacity .3s ease;transition:transform .3s ease,opacity .3s ease,-webkit-transform .3s ease}.ui-close-button--size-mini,.ui-close-button--size-mini .ui-close-button__focus-ring{height:1.5rem;width:1.5rem}.ui-close-button--size-mini .ui-icon{font-size:1.125rem}.ui-close-button--size-small,.ui-close-button--size-small .ui-close-button__focus-ring{height:2rem;width:2rem}.ui-close-button--size-small .ui-icon{font-size:1.125rem}.ui-close-button--size-normal,.ui-close-button--size-normal .ui-close-button__focus-ring{height:2.25rem;width:2.25rem}.ui-close-button--size-normal .ui-icon{font-size:1.25rem}.ui-close-button--size-large,.ui-close-button--size-large .ui-close-button__focus-ring{height:3rem;width:3rem}.ui-close-button--size-large .ui-icon{font-size:1.5rem}.ui-close-button--color-black{color:rgba(0,0,0,.38)}.ui-close-button--color-black:hover:not(.is-disabled) .ui-close-button__icon,body[modality=keyboard] .ui-close-button--color-black:focus .ui-close-button__icon{color:rgba(0,0,0,.87)}.ui-close-button--color-white{color:#fff}",""])},5:function(e,t,n){"use strict";function i(e){return"string"==typeof e?e.replace(f,"").split(p):e}function o(e){return l(e)?(e.getAttribute("class")||"").replace(f,"").split(p):[]}function r(e,t){l(e)&&e.setAttribute("class",i(t).join(" "))}function s(e,t){var n=a(e,t),o=i(t);return n.push.apply(n,o),r(e,n),n}function a(e,t){var n=o(e),s=i(t);return s.forEach(function(e){var t=n.indexOf(e);t!==-1&&n.splice(t,1)}),r(e,n),n}function u(e,t){var n=o(e),r=i(t);return r.every(function(e){return n.indexOf(e)!==-1})}function l(e){var t="object"===("undefined"==typeof HTMLElement?"undefined":d(HTMLElement));return t?e instanceof HTMLElement:c(e)}function c(e){return e&&"object"===("undefined"==typeof e?"undefined":d(e))&&"string"==typeof e.nodeName&&1===e.nodeType}var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=/^\s+|\s+$/g,p=/\s+/g;t.a={add:s,remove:a,contains:u,has:u,set:r,get:o}},51:function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",{staticClass:"ui-close-button",class:e.classes,attrs:{"aria-label":"Close",type:"button",disabled:e.disabled},on:{click:e.onClick}},[n("div",{staticClass:"ui-close-button__icon"},[n("ui-icon",[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M18.984 6.422L13.406 12l5.578 5.578-1.406 1.406L12 13.406l-5.578 5.578-1.406-1.406L10.594 12 5.016 6.422l1.406-1.406L12 10.594l5.578-5.578z"}})])])],1),e._v(" "),n("span",{staticClass:"ui-close-button__focus-ring"}),e._v(" "),e.disableRipple||e.disabled?e._e():n("ui-ripple-ink")],1)},o=[],r={render:i,staticRenderFns:o};t.a=r},54:function(e,t,n){var i=n(48);"string"==typeof i&&(i=[[e.i,i,""]]),i.locals&&(e.exports=i.locals);n(2)("96be6b2c",i,!0)},6:function(e,t,n){"use strict";function i(e){n(10)}Object.defineProperty(t,"__esModule",{value:!0});var o=n(7),r=n(9),s=n(1),a=i,u=null,l=null,c=s(o.a,r.a,a,u,l);t.default=c.exports},7:function(e,t,n){"use strict";t.a={name:"ui-icon",props:{icon:String,iconSet:{type:String,default:"material-icons"},ariaLabel:String,removeText:{type:Boolean,default:!1},useSvg:{type:Boolean,default:!1}}}},8:function(e,t,n){t=e.exports=n(0)(),t.push([e.i,".ui-icon{cursor:inherit;display:inline-block;font-size:1.5rem;height:1em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;width:1em}.ui-icon svg{display:block;fill:currentColor;height:1em;margin:0;padding:0;width:1em}",""])},9:function(e,t,n){"use strict";var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"ui-icon",class:[e.iconSet,e.icon],attrs:{"aria-label":e.ariaLabel}},[e.useSvg?n("svg",{staticClass:"ui-icon__svg"},[n("use",{attrs:{"xmlns:xlink":"http://www.w3.org/1999/xlink","xlink:href":"#"+e.icon}})]):e._t("default",[e._v(e._s(e.removeText?null:e.icon))])],2)},o=[],r={render:i,staticRenderFns:o};t.a=r}})});