2017-06-19 16:25:45 +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 ] = {
/******/ i : moduleId ,
/******/ l : false ,
/******/ exports : { }
/******/ } ;
/******/ // Execute the module function
/******/ modules [ moduleId ] . call ( module . exports , module , module . exports , _ _webpack _require _ _ ) ;
/******/ // Flag the module as loaded
/******/ module . l = 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 ;
/******/ // identity function for calling harmony imports with the correct context
/******/ _ _webpack _require _ _ . i = function ( value ) { return value ; } ;
/******/ // define getter function for harmony exports
/******/ _ _webpack _require _ _ . d = function ( exports , name , getter ) {
/******/ if ( ! _ _webpack _require _ _ . o ( exports , name ) ) {
/******/ Object . defineProperty ( exports , name , {
/******/ configurable : false ,
/******/ enumerable : true ,
/******/ get : getter
/******/ } ) ;
/******/ }
/******/ } ;
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ _ _webpack _require _ _ . n = function ( module ) {
/******/ var getter = module && module . _ _esModule ?
/******/ function getDefault ( ) { return module [ 'default' ] ; } :
/******/ function getModuleExports ( ) { return module ; } ;
/******/ _ _webpack _require _ _ . d ( getter , 'a' , getter ) ;
/******/ return getter ;
/******/ } ;
/******/ // Object.prototype.hasOwnProperty.call
/******/ _ _webpack _require _ _ . o = function ( object , property ) { return Object . prototype . hasOwnProperty . call ( object , property ) ; } ;
/******/ // __webpack_public_path__
/******/ _ _webpack _require _ _ . p = "/" ;
/******/ // Load entry module and return exports
2017-06-19 16:27:45 +00:00
/******/ return _ _webpack _require _ _ ( _ _webpack _require _ _ . s = 451 ) ;
2017-06-19 16:25:45 +00:00
/******/ } )
/************************************************************************/
/******/ ( {
/***/ 0 :
/***/ ( function ( module , exports ) {
2017-06-19 16:27:45 +00:00
/* globals __VUE_SSR_CONTEXT__ */
// this module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle
2017-06-19 16:25:45 +00:00
module . exports = function normalizeComponent (
rawScriptExports ,
compiledTemplate ,
2017-06-19 16:27:45 +00:00
injectStyles ,
2017-06-19 16:25:45 +00:00
scopeId ,
2017-06-19 16:27:45 +00:00
moduleIdentifier /* server only */
2017-06-19 16:25:45 +00:00
) {
var esModule
var scriptExports = rawScriptExports = rawScriptExports || { }
// ES6 modules interop
var type = typeof rawScriptExports . default
if ( type === 'object' || type === 'function' ) {
esModule = rawScriptExports
scriptExports = rawScriptExports . default
}
// Vue.extend constructor export interop
var options = typeof scriptExports === 'function'
? scriptExports . options
: scriptExports
// render functions
if ( compiledTemplate ) {
options . render = compiledTemplate . render
options . staticRenderFns = compiledTemplate . staticRenderFns
}
// scopedId
if ( scopeId ) {
options . _scopeId = scopeId
}
2017-06-19 16:27:45 +00:00
var hook
if ( moduleIdentifier ) { // server build
hook = function ( context ) {
// 2.3 injection
context =
context || // cached call
( this . $vnode && this . $vnode . ssrContext ) || // stateful
( this . parent && this . parent . $vnode && this . parent . $vnode . ssrContext ) // functional
// 2.2 with runInNewContext: true
if ( ! context && typeof _ _VUE _SSR _CONTEXT _ _ !== 'undefined' ) {
context = _ _VUE _SSR _CONTEXT _ _
}
// inject component styles
if ( injectStyles ) {
injectStyles . call ( this , context )
}
// register component module identifier for async chunk inferrence
if ( context && context . _registeredComponents ) {
context . _registeredComponents . add ( moduleIdentifier )
}
}
// used by ssr in case component is cached and beforeCreate
// never gets called
options . _ssrRegister = hook
} else if ( injectStyles ) {
hook = injectStyles
}
if ( hook ) {
var functional = options . functional
var existing = functional
? options . render
: options . beforeCreate
if ( ! functional ) {
// inject component registration as beforeCreate hook
options . beforeCreate = existing
? [ ] . concat ( existing , hook )
: [ hook ]
} else {
// register for functioal component in vue file
options . render = function renderWithStyleInjection ( h , context ) {
hook . call ( context )
return existing ( h , context )
}
}
2017-06-19 16:25:45 +00:00
}
return {
esModule : esModule ,
exports : scriptExports ,
options : options
}
}
/***/ } ) ,
/***/ 1 :
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
2017-06-19 16:27:45 +00:00
// Theme mixin
// Grab the closest ancestor component's `md-theme` attribute OR grab the
// `md-name` attribute from an `<md-theme>` component.
function getAncestorThemeName ( component ) {
if ( ! component ) {
return null ;
}
var name = component . mdTheme ;
if ( ! name && component . $options . _componentTag === 'md-theme' ) {
name = component . mdName ;
}
return name || getAncestorThemeName ( component . $parent ) ;
}
2017-06-19 16:25:45 +00:00
exports . default = {
props : {
mdTheme : String
} ,
computed : {
2017-06-19 16:27:45 +00:00
mdEffectiveTheme : function mdEffectiveTheme ( ) {
return getAncestorThemeName ( this ) || this . $material . currentTheme ;
} ,
2017-06-19 16:25:45 +00:00
themeClass : function themeClass ( ) {
2017-06-19 16:27:45 +00:00
return this . $material . prefix + this . mdEffectiveTheme ;
2017-06-19 16:25:45 +00:00
}
} ,
2017-06-19 16:27:45 +00:00
watch : {
mdTheme : function mdTheme ( value ) {
this . $material . useTheme ( value ) ;
2017-06-19 16:25:45 +00:00
}
2017-06-19 16:27:45 +00:00
} ,
beforeMount : function beforeMount ( ) {
var localTheme = this . mdTheme ;
this . $material . useTheme ( localTheme ? localTheme : 'default' ) ;
2017-06-19 16:25:45 +00:00
}
} ;
module . exports = exports [ 'default' ] ;
/***/ } ) ,
2017-06-19 16:27:45 +00:00
/***/ 131 :
2017-06-19 16:25:45 +00:00
/***/ ( 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 } ; }
var onClickButton = void 0 ; //
//
//
//
//
//
//
//
exports . default = {
2017-06-19 16:27:45 +00:00
name : 'md-button-toggle' ,
2017-06-19 16:25:45 +00:00
props : {
mdSingle : Boolean
} ,
mixins : [ _mixin2 . default ] ,
mounted : function mounted ( ) {
var _this = this ;
this . $children . forEach ( ( function ( child ) {
var element = child . $el ;
var toggleClass = 'md-toggle' ;
onClickButton = function onClickButton ( ) {
if ( _this . mdSingle ) {
_this . $children . forEach ( ( function ( child ) {
child . $el . classList . remove ( toggleClass ) ;
} ) ) ;
element . classList . add ( toggleClass ) ;
} else {
element . classList . toggle ( toggleClass ) ;
}
} ;
if ( element && element . classList . contains ( 'md-button' ) ) {
element . addEventListener ( 'click' , onClickButton ) ;
}
} ) ) ;
} ,
beforeDestroy : function beforeDestroy ( ) {
this . $children . forEach ( ( function ( child ) {
var element = child . $el ;
if ( element && element . classList . contains ( 'md-button' ) ) {
element . removeEventListener ( 'click' , onClickButton ) ;
}
} ) ) ;
}
} ;
module . exports = exports [ 'default' ] ;
/***/ } ) ,
2017-06-19 16:27:45 +00:00
/***/ 231 :
2017-06-19 16:25:45 +00:00
/***/ ( function ( module , exports ) {
// removed by extract-text-webpack-plugin
/***/ } ) ,
2017-06-19 16:27:45 +00:00
/***/ 269 :
2017-06-19 16:25:45 +00:00
/***/ ( function ( module , exports ) {
module . exports = ".THEME_NAME.md-button-toggle .md-button:after {\n width: 1px;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n content: \" \"; }\n\n.THEME_NAME.md-button-toggle .md-toggle {\n color: BACKGROUND-CONTRAST-0.54;\n background-color: BACKGROUND-CONTRAST-0.26; }\n .THEME_NAME.md-button-toggle .md-toggle:hover:not([disabled]) {\n background-color: BACKGROUND-CONTRAST-0.38; }\n .THEME_NAME.md-button-toggle .md-toggle + .md-toggle:after {\n background-color: BACKGROUND-CONTRAST-0.12; }\n\n.THEME_NAME.md-button-toggle.md-primary .md-toggle {\n color: PRIMARY-CONTRAST;\n background-color: PRIMARY-COLOR; }\n .THEME_NAME.md-button-toggle.md-primary .md-toggle:hover:not([disabled]) {\n background-color: PRIMARY-COLOR; }\n .THEME_NAME.md-button-toggle.md-primary .md-toggle + .md-toggle:after {\n background-color: PRIMARY-COLOR-600; }\n\n.THEME_NAME.md-button-toggle.md-accent .md-toggle {\n color: ACCENT-CONTRAST;\n background-color: ACCENT-COLOR; }\n .THEME_NAME.md-button-toggle.md-accent .md-toggle:hover:not([disabled]) {\n background-color: ACCENT-COLOR; }\n .THEME_NAME.md-button-toggle.md-accent .md-toggle + .md-toggle:after {\n background-color: ACCENT-COLOR-600; }\n\n.THEME_NAME.md-button-toggle.md-warn .md-toggle {\n color: WARN-CONTRAST;\n background-color: WARN-COLOR; }\n .THEME_NAME.md-button-toggle.md-warn .md-toggle:hover:not([disabled]) {\n background-color: WARN-COLOR; }\n .THEME_NAME.md-button-toggle.md-warn .md-toggle + .md-toggle:after {\n background-color: WARN-COLOR-600; }\n\n.THEME_NAME.md-button-toggle [disabled] {\n color: rgba(0, 0, 0, 0.26); }\n .THEME_NAME.md-button-toggle [disabled].md-toggle {\n color: BACKGROUND-CONTRAST-0.2;\n background-color: rgba(0, 0, 0, 0.26); }\n"
/***/ } ) ,
2017-06-19 16:27:45 +00:00
/***/ 301 :
2017-06-19 16:25:45 +00:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
2017-06-19 16:27:45 +00:00
var disposed = false
function injectStyle ( ssrContext ) {
if ( disposed ) return
_ _webpack _require _ _ ( 231 )
}
2017-06-19 16:25:45 +00:00
var Component = _ _webpack _require _ _ ( 0 ) (
/* script */
2017-06-19 16:27:45 +00:00
_ _webpack _require _ _ ( 131 ) ,
2017-06-19 16:25:45 +00:00
/* template */
2017-06-19 16:27:45 +00:00
_ _webpack _require _ _ ( 378 ) ,
/* styles */
injectStyle ,
2017-06-19 16:25:45 +00:00
/* scopeId */
null ,
2017-06-19 16:27:45 +00:00
/* moduleIdentifier (server only) */
2017-06-19 16:25:45 +00:00
null
)
2017-06-19 16:27:45 +00:00
Component . options . _ _file = "/Users/pablohpsilva/Code/vue-material/src/components/mdButtonToggle/mdButtonToggle.vue"
if ( Component . esModule && Object . keys ( Component . esModule ) . some ( ( function ( key ) { return key !== "default" && key . substr ( 0 , 2 ) !== "__" } ) ) ) { console . error ( "named exports are not supported in *.vue files." ) }
2017-06-19 16:25:45 +00:00
if ( Component . options . functional ) { console . error ( "[vue-loader] mdButtonToggle.vue: functional components are not supported with templates, they should use render functions." ) }
/* 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-0c5891b8" , Component . options )
} else {
hotAPI . reload ( "data-v-0c5891b8" , Component . options )
}
2017-06-19 16:27:45 +00:00
module . hot . dispose ( ( function ( data ) {
disposed = true
} ) )
2017-06-19 16:25:45 +00:00
} ) ( ) }
module . exports = Component . exports
/***/ } ) ,
2017-06-19 16:27:45 +00:00
/***/ 378 :
2017-06-19 16:25:45 +00:00
/***/ ( 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-button-toggle" ,
class : [ _vm . themeClass ]
} , [ _vm . _t ( "default" ) ] , 2 )
} , staticRenderFns : [ ] }
module . exports . render . _withStripped = true
if ( false ) {
module . hot . accept ( )
if ( module . hot . data ) {
require ( "vue-hot-reload-api" ) . rerender ( "data-v-0c5891b8" , module . exports )
}
}
/***/ } ) ,
2017-06-19 16:27:45 +00:00
/***/ 451 :
2017-06-19 16:25:45 +00:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
2017-06-19 16:27:45 +00:00
module . exports = _ _webpack _require _ _ ( 84 ) ;
2017-06-19 16:25:45 +00:00
/***/ } ) ,
2017-06-19 16:27:45 +00:00
/***/ 84 :
2017-06-19 16:25:45 +00:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
exports . default = install ;
2017-06-19 16:27:45 +00:00
var _mdButtonToggle = _ _webpack _require _ _ ( 301 ) ;
2017-06-19 16:25:45 +00:00
var _mdButtonToggle2 = _interopRequireDefault ( _mdButtonToggle ) ;
2017-06-19 16:27:45 +00:00
var _mdButtonToggle3 = _ _webpack _require _ _ ( 269 ) ;
2017-06-19 16:25:45 +00:00
var _mdButtonToggle4 = _interopRequireDefault ( _mdButtonToggle3 ) ;
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { default : obj } ; }
function install ( Vue ) {
Vue . component ( 'md-button-toggle' , _mdButtonToggle2 . default ) ;
Vue . material . styles . push ( _mdButtonToggle4 . default ) ;
}
module . exports = exports [ 'default' ] ;
/***/ } )
/******/ } ) ;
} ) ) ;