2016-11-21 03:39:30 +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 _ _ ) {
2016-12-05 03:53:41 +00:00
module . exports = _ _webpack _require _ _ ( 176 ) ;
2016-11-21 03:39:30 +00:00
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 176 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
exports . default = install ;
2016-12-05 03:53:41 +00:00
var _mdSwitch = _ _webpack _require _ _ ( 177 ) ;
2016-11-21 03:39:30 +00:00
var _mdSwitch2 = _interopRequireDefault ( _mdSwitch ) ;
2016-12-05 03:53:41 +00:00
var _mdSwitch3 = _ _webpack _require _ _ ( 181 ) ;
2016-11-21 03:39:30 +00:00
var _mdSwitch4 = _interopRequireDefault ( _mdSwitch3 ) ;
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { default : obj } ; }
function install ( Vue ) {
Vue . component ( 'md-switch' , Vue . extend ( _mdSwitch2 . default ) ) ;
Vue . material . styles . push ( _mdSwitch4 . default ) ;
}
module . exports = exports [ 'default' ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 177 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
var _ _vue _exports _ _ , _ _vue _options _ _
var _ _vue _styles _ _ = { }
/* styles */
2016-12-05 03:53:41 +00:00
_ _webpack _require _ _ ( 178 )
2016-11-21 03:39:30 +00:00
/* script */
2016-12-05 03:53:41 +00:00
_ _vue _exports _ _ = _ _webpack _require _ _ ( 179 )
2016-11-21 03:39:30 +00:00
/* template */
2016-12-05 03:53:41 +00:00
var _ _vue _template _ _ = _ _webpack _require _ _ ( 180 )
2016-11-21 03:39:30 +00:00
_ _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/mdSwitch/mdSwitch.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-7e05ff26" , _ _vue _options _ _ )
} else {
hotAPI . reload ( "data-v-7e05ff26" , _ _vue _options _ _ )
}
} ) ( ) }
if ( _ _vue _options _ _ . functional ) { console . error ( "[vue-loader] mdSwitch.vue: functional components are not supported and should be defined in plain js files using render functions." ) }
module . exports = _ _vue _exports _ _
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 178 :
/***/ function ( module , exports ) {
// removed by extract-text-webpack-plugin
/***/ } ,
/***/ 179 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var fullThreshold = 75 ;
var initialThreshold = '-1px' ;
exports . default = {
props : {
name : String ,
value : Boolean ,
id : String ,
disabled : Boolean ,
type : {
type : String ,
default : 'button'
}
} ,
data : function data ( ) {
return {
leftPos : initialThreshold ,
checked : this . value
} ;
} ,
computed : {
classes : function classes ( ) {
return {
'md-checked' : Boolean ( this . value ) ,
'md-disabled' : this . disabled
} ;
} ,
styles : function styles ( ) {
return {
transform : 'translate3D(' + this . leftPos + ', -50%, 0)'
} ;
}
} ,
watch : {
checked : function checked ( ) {
this . leftPos = this . value ? fullThreshold + '%' : initialThreshold ;
}
} ,
methods : {
toggleSwitch : function toggleSwitch ( ) {
if ( ! this . disabled ) {
this . checked = ! this . checked ;
this . $emit ( 'change' , this . checked ) ;
this . $emit ( 'input' , this . checked ) ;
}
}
} ,
mounted : function mounted ( ) {
this . leftPos = this . value ? fullThreshold + '%' : initialThreshold ;
}
} ;
module . exports = exports [ 'default' ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 180 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
2016-12-05 03:53:41 +00:00
module . exports = { render : function ( ) { var _vm = this ; var _h = _vm . $createElement ;
return _h ( 'div' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-switch" ,
class : _vm . classes
2016-12-05 03:53:41 +00:00
} , [ _h ( 'div' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-switch-container" ,
on : {
"click" : _vm . toggleSwitch
}
2016-12-05 03:53:41 +00:00
} , [ _h ( 'div' , {
2016-11-21 03:39:30 +00:00
directives : [ {
name : "md-ink-ripple" ,
rawName : "v-md-ink-ripple" ,
value : ( _vm . disabled ) ,
expression : "disabled"
} ] ,
staticClass : "md-switch-thumb" ,
style : ( _vm . styles )
2016-12-05 03:53:41 +00:00
} , [ _h ( 'input' , {
2016-11-21 03:39:30 +00:00
attrs : {
"type" : "checkbox" ,
"name" : _vm . name ,
"id" : _vm . id ,
"disabled" : _vm . disabled
} ,
domProps : {
"value" : _vm . value
}
2016-12-05 03:53:41 +00:00
} ) , " " , _h ( 'button' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-switch-holder" ,
attrs : {
"type" : _vm . type
}
2016-12-05 03:53:41 +00:00
} ) ] ) ] ) , " " , ( _vm . $slots . default ) ? _h ( 'label' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-switch-label" ,
attrs : {
"for" : _vm . id || _vm . name
}
} , [ _vm . _t ( "default" ) ] ) : _vm . _e ( ) ] )
} , staticRenderFns : [ ] }
2016-12-05 03:53:41 +00:00
module . exports . render . _withStripped = true
2016-11-21 03:39:30 +00:00
if ( false ) {
module . hot . accept ( )
if ( module . hot . data ) {
require ( "vue-hot-reload-api" ) . rerender ( "data-v-7e05ff26" , module . exports )
}
}
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 181 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports ) {
module . exports = ".THEME_NAME .md-switch.md-checked .md-switch-container, .THEME_NAME.md-switch.md-checked .md-switch-container {\n background-color: ACCENT-COLOR-500-0.5; }\n\n.THEME_NAME .md-switch.md-checked .md-switch-thumb, .THEME_NAME.md-switch.md-checked .md-switch-thumb {\n background-color: ACCENT-COLOR; }\n\n.THEME_NAME .md-switch.md-checked .md-ink-ripple, .THEME_NAME.md-switch.md-checked .md-ink-ripple {\n color: ACCENT-COLOR; }\n\n.THEME_NAME .md-switch.md-checked .md-ripple, .THEME_NAME.md-switch.md-checked .md-ripple {\n opacity: .38; }\n\n.THEME_NAME .md-switch.md-checked.md-primary .md-switch-container, .THEME_NAME.md-switch.md-checked.md-primary .md-switch-container {\n background-color: PRIMARY-COLOR-500-0.5; }\n\n.THEME_NAME .md-switch.md-checked.md-primary .md-switch-thumb, .THEME_NAME.md-switch.md-checked.md-primary .md-switch-thumb {\n background-color: PRIMARY-COLOR; }\n\n.THEME_NAME .md-switch.md-checked.md-primary .md-ink-ripple, .THEME_NAME.md-switch.md-checked.md-primary .md-ink-ripple {\n color: PRIMARY-COLOR; }\n\n.THEME_NAME .md-switch.md-checked.md-warn .md-switch-container, .THEME_NAME.md-switch.md-checked.md-warn .md-switch-container {\n background-color: WARN-COLOR-500-0.5; }\n\n.THEME_NAME .md-switch.md-checked.md-warn .md-switch-thumb, .THEME_NAME.md-switch.md-checked.md-warn .md-switch-thumb {\n background-color: WARN-COLOR; }\n\n.THEME_NAME .md-switch.md-checked.md-warn .md-ink-ripple, .THEME_NAME.md-switch.md-checked.md-warn .md-ink-ripple {\n color: WARN-COLOR; }\n\n.THEME_NAME .md-switch.md-disabled .md-switch-container, .THEME_NAME .md-switch.md-disabled.md-checked .md-switch-container, .THEME_NAME.md-switch.md-disabled .md-switch-container, .THEME_NAME.md-switch.md-disabled.md-checked .md-switch-container {\n background-color: rgba(0, 0, 0, 0.12); }\n\n.THEME_NAME .md-switch.md-disabled .md-switch-thumb, .THEME_NAME .md-switch.md-disabled.md-checked .md-switch-thumb, .THEME_NAME.md-switch.md-disabled .md-switch-thumb, .THEME_NAME.md-switch.md-disabled.md-checked .md-switch-thumb {\n background-color: #bdbdbd; }\n"
/***/ }
/******/ } )
} ) ;
;
//# sourceMappingURL=index.debug.js.map