vue-material/dist/components/mdCard/index.js
2016-11-21 01:39:30 -02:00

1 line
No EOL
9.4 KiB
JavaScript

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueMaterial=e():t.VueMaterial=e()}(this,function(){return function(t){function e(d){if(n[d])return n[d].exports;var r=n[d]={exports:{},id:d,loaded:!1};return t[d].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="/",e(0)}({0:function(t,e,n){t.exports=n(11)},11:function(t,e,n){"use strict";function d(t){return t&&t.__esModule?t:{default:t}}function r(t){t.component("md-card",t.extend(a.default)),t.component("md-card-media",t.extend(s.default)),t.component("md-card-media-cover",t.extend(u.default)),t.component("md-card-media-actions",t.extend(l.default)),t.component("md-card-header",t.extend(p.default)),t.component("md-card-header-text",t.extend(v.default)),t.component("md-card-content",t.extend(y.default)),t.component("md-card-actions",t.extend(g.default)),t.component("md-card-area",t.extend(b.default)),t.component("md-card-expand",t.extend(E.default)),t.material.styles.push(F.default)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var o=n(119),a=d(o),i=n(126),s=d(i),c=n(128),u=d(c),f=n(127),l=d(f),m=n(124),p=d(m),h=n(125),v=d(h),x=n(122),y=d(x),R=n(120),g=d(R),_=n(121),b=d(_),M=n(123),E=d(M),C=n(98),F=d(C);t.exports=e.default},37:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{mdWithHover:Boolean},computed:{classes:function(){return{"md-with-hover":this.mdWithHover}}}},t.exports=e.default},38:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{mdInset:Boolean},computed:{classes:function(){return{"md-inset":this.mdInset}}}},t.exports=e.default},39:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={methods:{setContentMargin:function(){this.content.style.marginTop=-this.content.offsetHeight+"px"},toggle:function(){this.$refs.expand.classList.toggle("md-active")},onWindowResize:function(){window.requestAnimationFrame(this.setContentMargin)}},mounted:function(){this.trigger=this.$el.querySelector("[md-expand-trigger]"),this.content=this.$el.querySelector(".md-card-content"),this.content&&(this.setContentMargin(),this.trigger.addEventListener("click",this.toggle),window.addEventListener("resize",this.onWindowResize))},destroyed:function(){this.content&&(this.trigger.removeEventListener("click",this.toggle),window.removeEventListener("resize",this.onWindowResize))}},t.exports=e.default},40:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={mounted:function(){this.parentClasses=this.$parent.$el.classList,this.parentClasses.contains("md-card-header")&&(this.insideParent=!0,this.parentClasses.add("md-card-header-flex"))},destroyed:function(){this.parentClasses.remove("md-card-header-flex")}},t.exports=e.default},41:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:{mdRatio:String,mdMedium:Boolean,mdBig:Boolean},computed:{classes:function t(){var t={"md-16-9":"16:9"===this.mdRatio||"16/9"===this.mdRatio,"md-4-3":"4:3"===this.mdRatio||"4/3"===this.mdRatio,"md-1-1":"1:1"===this.mdRatio||"1/1"===this.mdRatio};return(this.mdMedium||this.mdBig)&&(t={"md-medium":this.mdMedium,"md-big":this.mdBig}),t}}},t.exports=e.default},42:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t,e){var n=document.createElement("canvas");t.onload=function(){var t=0,d=void 0,r=void 0,o=void 0,a=void 0,i=void 0,s=void 0,c=void 0;n.width=this.width,n.height=this.height,d=n.getContext("2d"),d.drawImage(this,0,0),r=d.getImageData(0,0,n.width,n.height),o=r.data;for(var u=0,f=o.length;u<f;u+=4)a=o[u],i=o[u+1],s=o[u+2],c=Math.floor((a+i+s)/3),t+=c;e(Math.floor(t/(this.width*this.height)))}};e.default={props:{mdTextScrim:Boolean,mdSolid:Boolean},data:function(){return{backdropBg:{}}},computed:{classes:function(){return{"md-text-scrim":this.mdTextScrim,"md-solid":this.mdSolid}},styles:function(){return{background:this.backdropBg}}},methods:{applyScrimColor:function(t){this.$refs.backdrop&&(this.backdropBg="linear-gradient(to bottom, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, "+t/2+") 66%, rgba(0, 0, 0, "+t+") 100%)")},applySolidColor:function(t){var e=this.$el.querySelector(".md-card-area");e&&(e.style.background="rgba(0, 0, 0, "+t+")")}},mounted:function(){var t=this,e=this.$el.querySelector("img");e&&(this.mdTextScrim||this.mdSolid)&&n(e,function(e){var n=256,d=(100*Math.abs(n-e)/n+15)/100;d>=.7&&(d=.7),t.mdTextScrim?t.applyScrimColor(d):t.mdSolid&&t.applySolidColor(d)})}},t.exports=e.default},84:function(t,e){},98:function(t,e){t.exports=".THEME_NAME .md-card,.THEME_NAME.md-card{background-color:BACKGROUND-COLOR-A100}.THEME_NAME .md-card .md-icon-button .md-icon,.THEME_NAME.md-card .md-icon-button .md-icon{color:BACKGROUND-CONTRAST-0.54}.THEME_NAME .md-card>.md-card-area:after,.THEME_NAME.md-card>.md-card-area:after{background-color:BACKGROUND-CONTRAST-0.12}.THEME_NAME .md-card .md-card-media-cover.md-text-scrim .md-backdrop,.THEME_NAME.md-card .md-card-media-cover.md-text-scrim .md-backdrop{background:linear-gradient(to bottom, BACKGROUND-CONTRAST-0.0 20%, BACKGROUND-CONTRAST-0.275 66%, BACKGROUND-CONTRAST-0.55 100%)}.THEME_NAME .md-card .md-card-media-cover.md-solid .md-card-area,.THEME_NAME.md-card .md-card-media-cover.md-solid .md-card-area{background-color:BACKGROUND-CONTRAST-0.4}.THEME_NAME .md-card .md-card-expand .md-card-actions,.THEME_NAME.md-card .md-card-expand .md-card-actions{background-color:BACKGROUND-COLOR-A100}\n"},119:function(t,e,n){var d,r;n(84),d=n(37);var o=n(182);r=d=d||{},"object"!=typeof d.default&&"function"!=typeof d.default||(r=d=d.default),"function"==typeof r&&(r=r.options),r.render=o.render,r.staticRenderFns=o.staticRenderFns,t.exports=d},120:function(t,e,n){var d,r,o=n(190);r=d=d||{},"object"!=typeof d.default&&"function"!=typeof d.default||(r=d=d.default),"function"==typeof r&&(r=r.options),r.render=o.render,r.staticRenderFns=o.staticRenderFns,t.exports=d},121:function(t,e,n){var d,r;d=n(38);var o=n(176);r=d=d||{},"object"!=typeof d.default&&"function"!=typeof d.default||(r=d=d.default),"function"==typeof r&&(r=r.options),r.render=o.render,r.staticRenderFns=o.staticRenderFns,t.exports=d},122:function(t,e,n){var d,r,o=n(162);r=d=d||{},"object"!=typeof d.default&&"function"!=typeof d.default||(r=d=d.default),"function"==typeof r&&(r=r.options),r.render=o.render,r.staticRenderFns=o.staticRenderFns,t.exports=d},123:function(t,e,n){var d,r;d=n(39);var o=n(199);r=d=d||{},"object"!=typeof d.default&&"function"!=typeof d.default||(r=d=d.default),"function"==typeof r&&(r=r.options),r.render=o.render,r.staticRenderFns=o.staticRenderFns,t.exports=d},124:function(t,e,n){var d,r,o=n(173);r=d=d||{},"object"!=typeof d.default&&"function"!=typeof d.default||(r=d=d.default),"function"==typeof r&&(r=r.options),r.render=o.render,r.staticRenderFns=o.staticRenderFns,t.exports=d},125:function(t,e,n){var d,r;d=n(40);var o=n(177);r=d=d||{},"object"!=typeof d.default&&"function"!=typeof d.default||(r=d=d.default),"function"==typeof r&&(r=r.options),r.render=o.render,r.staticRenderFns=o.staticRenderFns,t.exports=d},126:function(t,e,n){var d,r;d=n(41);var o=n(187);r=d=d||{},"object"!=typeof d.default&&"function"!=typeof d.default||(r=d=d.default),"function"==typeof r&&(r=r.options),r.render=o.render,r.staticRenderFns=o.staticRenderFns,t.exports=d},127:function(t,e,n){var d,r,o=n(194);r=d=d||{},"object"!=typeof d.default&&"function"!=typeof d.default||(r=d=d.default),"function"==typeof r&&(r=r.options),r.render=o.render,r.staticRenderFns=o.staticRenderFns,t.exports=d},128:function(t,e,n){var d,r;d=n(42);var o=n(167);r=d=d||{},"object"!=typeof d.default&&"function"!=typeof d.default||(r=d=d.default),"function"==typeof r&&(r=r.options),r.render=o.render,r.staticRenderFns=o.staticRenderFns,t.exports=d},162:function(t,e){t.exports={render:function(){var t=this;return t._h("div",{staticClass:"md-card-content"},[t._t("default")])},staticRenderFns:[]}},167:function(t,e){t.exports={render:function(){var t=this;return t._h("div",{staticClass:"md-card-media-cover",class:t.classes},[t._t("default")," ",t.mdTextScrim?t._h("div",{ref:"backdrop",staticClass:"md-backdrop",style:t.styles}):t._e()])},staticRenderFns:[]}},173:function(t,e){t.exports={render:function(){var t=this;return t._h("div",{staticClass:"md-card-header"},[t._t("default")])},staticRenderFns:[]}},176:function(t,e){t.exports={render:function(){var t=this;return t._h("div",{staticClass:"md-card-area",class:t.classes},[t._t("default")])},staticRenderFns:[]}},177:function(t,e){t.exports={render:function(){var t=this;return t._h("div",{staticClass:"md-card-header-text"},[t._t("default")])},staticRenderFns:[]}},182:function(t,e){t.exports={render:function(){var t=this;return t._h("div",{staticClass:"md-card",class:t.classes},[t._t("default")])},staticRenderFns:[]}},187:function(t,e){t.exports={render:function(){var t=this;return t._h("div",{staticClass:"md-card-media",class:t.classes},[t._t("default")])},staticRenderFns:[]}},190:function(t,e){t.exports={render:function(){var t=this;return t._h("div",{staticClass:"md-card-actions"},[t._t("default")])},staticRenderFns:[]}},194:function(t,e){t.exports={render:function(){var t=this;return t._h("div",{staticClass:"md-card-media-actions"},[t._t("default")])},staticRenderFns:[]}},199:function(t,e){t.exports={render:function(){var t=this;return t._h("div",{ref:"expand",staticClass:"md-card-expand"},[t._t("default")])},staticRenderFns:[]}}})});