2017-01-10 04:04:09 +00:00
( function webpackUniversalModuleDefinition ( root , factory ) {
if ( typeof exports === 'object' && typeof module === 'object' )
module . exports = factory ( ) ;
else if ( typeof define === 'function' && define . amd )
define ( [ ] , factory ) ;
else if ( typeof exports === 'object' )
exports [ "VueMaterial" ] = factory ( ) ;
else
root [ "VueMaterial" ] = factory ( ) ;
} ) ( this , ( function ( ) {
return /******/ ( function ( modules ) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = { } ;
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/ // Check if module is in cache
/******/ if ( installedModules [ moduleId ] )
/******/ return installedModules [ moduleId ] . exports ;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules [ moduleId ] = {
/******/ exports : { } ,
/******/ id : moduleId ,
/******/ loaded : false
/******/ } ;
/******/ // Execute the module function
/******/ modules [ moduleId ] . call ( module . exports , module , module . exports , _ _webpack _require _ _ ) ;
/******/ // Flag the module as loaded
/******/ module . loaded = true ;
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ _ _webpack _require _ _ . m = modules ;
/******/ // expose the module cache
/******/ _ _webpack _require _ _ . c = installedModules ;
/******/ // __webpack_public_path__
/******/ _ _webpack _require _ _ . p = "/" ;
/******/ // Load entry module and return exports
/******/ return _ _webpack _require _ _ ( 0 ) ;
/******/ } )
/************************************************************************/
/******/ ( {
/***/ 0 :
/***/ function ( module , exports , _ _webpack _require _ _ ) {
module . exports = _ _webpack _require _ _ ( 78 ) ;
/***/ } ,
/***/ 1 :
/***/ function ( module , exports ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
exports . default = {
props : {
mdTheme : String
} ,
data : function data ( ) {
return {
closestThemedParent : false
} ;
} ,
methods : {
getClosestThemedParent : function getClosestThemedParent ( $parent ) {
if ( ! $parent || ! $parent . $el || $parent . _uid === 0 ) {
return false ;
}
if ( $parent . mdTheme || $parent . mdName ) {
return $parent ;
}
return this . getClosestThemedParent ( $parent . $parent ) ;
}
} ,
computed : {
themeClass : function themeClass ( ) {
if ( this . mdTheme ) {
return 'md-theme-' + this . mdTheme ;
}
var theme = this . closestThemedParent . mdTheme ;
if ( ! theme ) {
if ( this . closestThemedParent ) {
theme = this . closestThemedParent . mdName ;
} else {
theme = this . $material . currentTheme ;
}
}
return 'md-theme-' + theme ;
}
} ,
mounted : function mounted ( ) {
this . closestThemedParent = this . getClosestThemedParent ( this . $parent ) ;
if ( ! this . $material . currentTheme ) {
this . $material . setCurrentTheme ( 'default' ) ;
}
}
} ;
module . exports = exports [ 'default' ] ;
/***/ } ,
/***/ 78 :
/***/ function ( module , exports , _ _webpack _require _ _ ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
exports . default = install ;
var _mdCheckbox = _ _webpack _require _ _ ( 264 ) ;
var _mdCheckbox2 = _interopRequireDefault ( _mdCheckbox ) ;
var _mdCheckbox3 = _ _webpack _require _ _ ( 227 ) ;
var _mdCheckbox4 = _interopRequireDefault ( _mdCheckbox3 ) ;
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { default : obj } ; }
function install ( Vue ) {
Vue . component ( 'md-checkbox' , Vue . extend ( _mdCheckbox2 . default ) ) ;
Vue . material . styles . push ( _mdCheckbox4 . default ) ;
}
module . exports = exports [ 'default' ] ;
/***/ } ,
/***/ 122 :
/***/ function ( module , exports , _ _webpack _require _ _ ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
var _mixin = _ _webpack _require _ _ ( 1 ) ;
var _mixin2 = _interopRequireDefault ( _mixin ) ;
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { default : obj } ; }
exports . default = {
props : {
name : String ,
value : [ String , Boolean ] ,
id : String ,
disabled : Boolean
} ,
mixins : [ _mixin2 . default ] ,
data : function data ( ) {
return {
checked : this . value
} ;
} ,
computed : {
classes : function classes ( ) {
return {
'md-checked' : Boolean ( this . checked ) ,
'md-disabled' : this . disabled
} ;
}
} ,
watch : {
value : function value ( ) {
this . checked = this . value ;
}
} ,
methods : {
toggleCheck : function toggleCheck ( $event ) {
if ( ! this . disabled ) {
this . checked = ! this . checked ;
this . $emit ( 'change' , this . checked , $event ) ;
this . $emit ( 'input' , this . checked , $event ) ;
}
}
}
} ; //
//
//
//
//
//
//
//
//
//
//
//
//
//
//
module . exports = exports [ 'default' ] ;
/***/ } ,
/***/ 214 :
/***/ function ( module , exports ) {
// removed by extract-text-webpack-plugin
/***/ } ,
/***/ 227 :
/***/ function ( module , exports ) {
module . exports = ".THEME_NAME.md-checkbox.md-checked .md-checkbox-container {\n background-color: ACCENT-COLOR;\n border-color: ACCENT-COLOR; }\n .THEME_NAME.md-checkbox.md-checked .md-checkbox-container:after {\n border-color: ACCENT-CONTRAST; }\n\n.THEME_NAME.md-checkbox .md-ink-ripple {\n color: ACCENT-COLOR; }\n\n.THEME_NAME.md-checkbox .md-ripple {\n opacity: .26; }\n\n.THEME_NAME.md-checkbox.md-primary.md-checked .md-checkbox-container {\n background-color: PRIMARY-COLOR;\n border-color: PRIMARY-COLOR; }\n .THEME_NAME.md-checkbox.md-primary.md-checked .md-checkbox-container:after {\n border-color: PRIMARY-CONTRAST; }\n\n.THEME_NAME.md-checkbox.md-primary .md-ink-ripple {\n color: PRIMARY-COLOR; }\n\n.THEME_NAME.md-checkbox.md-warn.md-checked .md-checkbox-container {\n background-color: WARN-COLOR;\n border-color: WARN-COLOR; }\n .THEME_NAME.md-checkbox.md-warn.md-checked .md-checkbox-container:after {\n border-color: WARN-CONTRAST; }\n\n.THEME_NAME.md-checkbox.md-warn .md-ink-ripple {\n color: WARN-COLOR; }\n\n.THEME_NAME.md-checkbox.md-disabled.md-checked .md-checkbox-container {\n background-color: rgba(0, 0, 0, 0.26);\n border-color: transparent; }\n\n.THEME_NAME.md-checkbox.md-disabled:not(.md-checked) .md-checkbox-container {\n border-color: rgba(0, 0, 0, 0.26); }\n"
/***/ } ,
/***/ 264 :
/***/ function ( module , exports , _ _webpack _require _ _ ) {
var _ _vue _exports _ _ , _ _vue _options _ _
var _ _vue _styles _ _ = { }
/* styles */
_ _webpack _require _ _ ( 214 )
/* script */
_ _vue _exports _ _ = _ _webpack _require _ _ ( 122 )
/* template */
var _ _vue _template _ _ = _ _webpack _require _ _ ( 359 )
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ || { }
if (
typeof _ _vue _exports _ _ . default === "object" ||
typeof _ _vue _exports _ _ . default === "function"
) {
if ( Object . keys ( _ _vue _exports _ _ ) . some ( ( function ( key ) { return key !== "default" && key !== "__esModule" } ) ) ) { console . error ( "named exports are not supported in *.vue files." ) }
_ _vue _options _ _ = _ _vue _exports _ _ = _ _vue _exports _ _ . default
}
if ( typeof _ _vue _options _ _ === "function" ) {
_ _vue _options _ _ = _ _vue _options _ _ . options
}
_ _vue _options _ _ . _ _file = "/Users/marcosmoura/Projects/github/vue-material/src/components/mdCheckbox/mdCheckbox.vue"
_ _vue _options _ _ . render = _ _vue _template _ _ . render
_ _vue _options _ _ . staticRenderFns = _ _vue _template _ _ . staticRenderFns
/* hot reload */
if ( false ) { ( function ( ) {
var hotAPI = require ( "vue-hot-reload-api" )
hotAPI . install ( require ( "vue" ) , false )
if ( ! hotAPI . compatible ) return
module . hot . accept ( )
if ( ! module . hot . data ) {
hotAPI . createRecord ( "data-v-9db725e6" , _ _vue _options _ _ )
} else {
hotAPI . reload ( "data-v-9db725e6" , _ _vue _options _ _ )
}
} ) ( ) }
if ( _ _vue _options _ _ . functional ) { console . error ( "[vue-loader] mdCheckbox.vue: functional components are not supported and should be defined in plain js files using render functions." ) }
module . exports = _ _vue _exports _ _
/***/ } ,
/***/ 359 :
/***/ function ( module , exports , _ _webpack _require _ _ ) {
module . exports = { render : function ( ) { var _vm = this ; var _h = _vm . $createElement ; var _c = _vm . _self . _c || _h ;
return _c ( 'div' , {
staticClass : "md-checkbox" ,
class : [ _vm . themeClass , _vm . classes ]
} , [ _c ( 'div' , {
staticClass : "md-checkbox-container" ,
attrs : {
"tabindex" : "0"
} ,
on : {
"click" : function ( $event ) {
$event . stopPropagation ( ) ;
_vm . toggleCheck ( $event )
}
}
} , [ _c ( 'input' , {
attrs : {
"type" : "checkbox" ,
"name" : _vm . name ,
"id" : _vm . id ,
"disabled" : _vm . disabled ,
"tabindex" : "-1"
} ,
domProps : {
"value" : _vm . value
}
} ) , _vm . _v ( " " ) , _c ( 'md-ink-ripple' , {
attrs : {
"md-disabled" : _vm . disabled
}
} ) ] , 1 ) , _vm . _v ( " " ) , ( _vm . $slots . default ) ? _c ( 'label' , {
staticClass : "md-checkbox-label" ,
attrs : {
"for" : _vm . id || _vm . name
}
} , [ _vm . _t ( "default" ) ] , 2 ) : _vm . _e ( ) ] )
} , staticRenderFns : [ ] }
module . exports . render . _withStripped = true
if ( false ) {
module . hot . accept ( )
if ( module . hot . data ) {
require ( "vue-hot-reload-api" ) . rerender ( "data-v-9db725e6" , module . exports )
}
}
/***/ }
/******/ } )
} ) ) ;
;