UNPKG

material-components-vue

Version:
1 lines 4.26 kB
!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 o in n)("object"==typeof exports?exports:t)[o]=n[o]}}(window,function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=71)}({4:function(t,e,n){"use strict";function o(t,e,n,o,r,i,s,a){var u,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),s?(u=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__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},l._ssrRegister=u):r&&(u=a?function(){r.call(this,this.$root.$options.shadowRoot)}:r),u)if(l.functional){l._injectStyles=u;var c=l.render;l.render=function(t,e){return u.call(e),c(t,e)}}else{var f=l.beforeCreate;l.beforeCreate=f?[].concat(f,u):[u]}return{exports:t,options:l}}n.d(e,"a",function(){return o})},7:function(t,e,n){"use strict";function o(t){"undefined"!=typeof window&&window.Vue&&window.Vue.use(t)}n.d(e,"a",function(){return o})},71:function(t,e,n){"use strict";n.r(e);var o={props:{column:{type:Number,validator:function(t){return 0<=t&&t<=12},default:0},masonry:{type:Boolean,default:!1},textProtection:{type:Boolean,default:!1}},computed:{classes:function(){var t={};0<this.column&&!this.masonry&&(t["image-list-standard-"+this.column]=!0);var e={};0<this.column&&this.masonry&&(e["image-list-masonry-"+this.column]=!0,e["mdc-image-list--masonry"]=!0);var n={};return n["mdc-image-list--with-text-protection"]=this.textProtection,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),o.forEach(function(e){var o,r,i;o=t,i=n[r=e],r in o?Object.defineProperty(o,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[r]=i})}return t}({},t,e,n)}}},r=n(4),i=Object(r.a)(o,function(){var t=this.$createElement;return(this._self._c||t)("ul",{staticClass:"mdc-image-list",class:this.classes},[this._t("default")],2)},[],!1,null,null,null).exports,s={props:{adjustAspectRatio:{type:Boolean,default:!0}},data:function(){return{slotObserver:void 0}},mounted:function(){var t=this;this.updateSlot(),this.slotObserver=new MutationObserver(function(){return t.updateSlot()}),this.slotObserver.observe(this.$el,{childList:!0,subtree:!0})},beforeDestroy:function(){this.slotObserver.disconnect()},methods:{updateSlot:function(){this.$slots.image&&this.$slots.image.map(function(t){t.elm.classList.add("mdc-image-list__image")})}}},a=Object(r.a)(s,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("li",{staticClass:"mdc-image-list__item"},[t.adjustAspectRatio?n("div",{staticClass:"mdc-image-list__image-aspect-container"},[t._t("image")],2):t._t("image"),t._v(" "),t.$slots.default?n("div",{staticClass:"mdc-image-list__supporting"},[n("span",{staticClass:"mdc-image-list__label"},[t._t("default")],2)]):t._e()],2)},[],!1,null,null,null).exports,u=n(7),l={install:function(t){t.component("m-image-list",i),t.component("m-image-list-item",a)}};e.default=l,Object(u.a)(l)}})});