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 ] = {
2017-02-08 03:16:24 +00:00
/******/ i : moduleId ,
/******/ l : false ,
/******/ exports : { }
2017-01-10 04:04:09 +00:00
/******/ } ;
/******/ // Execute the module function
/******/ modules [ moduleId ] . call ( module . exports , module , module . exports , _ _webpack _require _ _ ) ;
/******/ // Flag the module as loaded
2017-02-08 03:16:24 +00:00
/******/ module . l = true ;
2017-01-10 04:04:09 +00:00
/******/ // 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 ;
2017-02-08 03:16:24 +00:00
/******/ // 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 ) ; } ;
2017-01-10 04:04:09 +00:00
/******/ // __webpack_public_path__
/******/ _ _webpack _require _ _ . p = "/" ;
/******/ // Load entry module and return exports
2017-02-09 00:05:12 +00:00
/******/ return _ _webpack _require _ _ ( _ _webpack _require _ _ . s = 410 ) ;
2017-01-10 04:04:09 +00:00
/******/ } )
/************************************************************************/
/******/ ( {
/***/ 0 :
2017-02-08 03:16:24 +00:00
/***/ ( function ( module , exports ) {
module . exports = function normalizeComponent (
rawScriptExports ,
compiledTemplate ,
scopeId ,
cssModules
) {
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
}
// inject cssModules
if ( cssModules ) {
var computed = options . computed || ( options . computed = { } )
Object . keys ( cssModules ) . forEach ( ( function ( key ) {
var module = cssModules [ key ]
computed [ key ] = function ( ) { return module }
} ) )
}
return {
esModule : esModule ,
exports : scriptExports ,
options : options
}
}
/***/ } ) ,
2017-01-10 04:04:09 +00:00
/***/ 1 :
2017-02-08 03:16:24 +00:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
"use strict" ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
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 ;
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
if ( $parent . mdTheme || $parent . mdName ) {
return $parent ;
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
return this . getClosestThemedParent ( $parent . $parent ) ;
}
} ,
computed : {
themeClass : function themeClass ( ) {
if ( this . mdTheme ) {
return 'md-theme-' + this . mdTheme ;
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var theme = this . closestThemedParent . mdTheme ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
if ( ! theme ) {
if ( this . closestThemedParent ) {
theme = this . closestThemedParent . mdName ;
} else {
theme = this . $material . currentTheme ;
}
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
return 'md-theme-' + theme ;
}
} ,
mounted : function mounted ( ) {
this . closestThemedParent = this . getClosestThemedParent ( this . $parent ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
if ( ! this . $material . currentTheme ) {
this . $material . setCurrentTheme ( 'default' ) ;
}
}
} ;
module . exports = exports [ 'default' ] ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
/***/ } ) ,
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
/***/ 103 :
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
"use strict" ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
exports . default = install ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var _mdInputContainer = _ _webpack _require _ _ ( 291 ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var _mdInputContainer2 = _interopRequireDefault ( _mdInputContainer ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var _mdInput = _ _webpack _require _ _ ( 290 ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var _mdInput2 = _interopRequireDefault ( _mdInput ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var _mdTextarea = _ _webpack _require _ _ ( 292 ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var _mdTextarea2 = _interopRequireDefault ( _mdTextarea ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var _mdInputContainer3 = _ _webpack _require _ _ ( 244 ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var _mdInputContainer4 = _interopRequireDefault ( _mdInputContainer3 ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { default : obj } ; }
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
function install ( Vue ) {
Vue . component ( 'md-input-container' , _mdInputContainer2 . default ) ;
Vue . component ( 'md-input' , _mdInput2 . default ) ;
Vue . component ( 'md-textarea' , _mdTextarea2 . default ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
Vue . material . styles . push ( _mdInputContainer4 . default ) ;
}
module . exports = exports [ 'default' ] ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
/***/ } ) ,
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
/***/ 12 :
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
"use strict" ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
var getClosestVueParent = function getClosestVueParent ( $parent , cssClass ) {
if ( ! $parent || ! $parent . $el ) {
return false ;
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
if ( $parent . _uid === 0 ) {
return false ;
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
if ( $parent . $el . classList . contains ( cssClass ) ) {
return $parent ;
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
return getClosestVueParent ( $parent . $parent , cssClass ) ;
} ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
exports . default = getClosestVueParent ;
module . exports = exports [ "default" ] ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
/***/ } ) ,
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
/***/ 122 :
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var _ _WEBPACK _AMD _DEFINE _FACTORY _ _ , _ _WEBPACK _AMD _DEFINE _ARRAY _ _ , _ _WEBPACK _AMD _DEFINE _RESULT _ _ ; / * !
Autosize 3.0 . 20
license : MIT
http : //www.jacklmoore.com/autosize
* /
( function ( global , factory ) {
if ( true ) {
! ( _ _WEBPACK _AMD _DEFINE _ARRAY _ _ = [ exports , module ] , _ _WEBPACK _AMD _DEFINE _FACTORY _ _ = ( factory ) ,
_ _WEBPACK _AMD _DEFINE _RESULT _ _ = ( typeof _ _WEBPACK _AMD _DEFINE _FACTORY _ _ === 'function' ?
( _ _WEBPACK _AMD _DEFINE _FACTORY _ _ . apply ( exports , _ _WEBPACK _AMD _DEFINE _ARRAY _ _ ) ) : _ _WEBPACK _AMD _DEFINE _FACTORY _ _ ) ,
_ _WEBPACK _AMD _DEFINE _RESULT _ _ !== undefined && ( module . exports = _ _WEBPACK _AMD _DEFINE _RESULT _ _ ) ) ;
} else if ( typeof exports !== 'undefined' && typeof module !== 'undefined' ) {
factory ( exports , module ) ;
} else {
var mod = {
exports : { }
} ;
factory ( mod . exports , mod ) ;
global . autosize = mod . exports ;
}
} ) ( this , ( function ( exports , module ) {
'use strict' ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var map = typeof Map === "function" ? new Map ( ) : ( function ( ) {
var keys = [ ] ;
var values = [ ] ;
return {
has : function has ( key ) {
return keys . indexOf ( key ) > - 1 ;
} ,
get : function get ( key ) {
return values [ keys . indexOf ( key ) ] ;
} ,
set : function set ( key , value ) {
if ( keys . indexOf ( key ) === - 1 ) {
keys . push ( key ) ;
values . push ( value ) ;
2017-01-10 04:04:09 +00:00
}
2017-02-08 03:16:24 +00:00
} ,
'delete' : function _delete ( key ) {
var index = keys . indexOf ( key ) ;
if ( index > - 1 ) {
keys . splice ( index , 1 ) ;
values . splice ( index , 1 ) ;
2017-01-10 04:04:09 +00:00
}
}
2017-02-08 03:16:24 +00:00
} ;
} ) ( ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var createEvent = function createEvent ( name ) {
return new Event ( name , { bubbles : true } ) ;
} ;
try {
new Event ( 'test' ) ;
} catch ( e ) {
// IE does not support `new Event()`
createEvent = function ( name ) {
var evt = document . createEvent ( 'Event' ) ;
evt . initEvent ( name , true , false ) ;
return evt ;
} ;
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
function assign ( ta ) {
if ( ! ta || ! ta . nodeName || ta . nodeName !== 'TEXTAREA' || map . has ( ta ) ) return ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var heightOffset = null ;
var clientWidth = ta . clientWidth ;
var cachedHeight = null ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
function init ( ) {
var style = window . getComputedStyle ( ta , null ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
if ( style . resize === 'vertical' ) {
ta . style . resize = 'none' ;
} else if ( style . resize === 'both' ) {
ta . style . resize = 'horizontal' ;
2017-01-10 04:04:09 +00:00
}
2017-02-08 03:16:24 +00:00
if ( style . boxSizing === 'content-box' ) {
heightOffset = - ( parseFloat ( style . paddingTop ) + parseFloat ( style . paddingBottom ) ) ;
} else {
heightOffset = parseFloat ( style . borderTopWidth ) + parseFloat ( style . borderBottomWidth ) ;
}
// Fix when a textarea is not on document body and heightOffset is Not a Number
if ( isNaN ( heightOffset ) ) {
heightOffset = 0 ;
2017-01-10 04:04:09 +00:00
}
2017-02-08 03:16:24 +00:00
update ( ) ;
2017-01-10 04:04:09 +00:00
}
2017-02-08 03:16:24 +00:00
function changeOverflow ( value ) {
{
// Chrome/Safari-specific fix:
// When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space
// made available by removing the scrollbar. The following forces the necessary text reflow.
var width = ta . style . width ;
ta . style . width = '0px' ;
// Force reflow:
/* jshint ignore:start */
ta . offsetWidth ;
/* jshint ignore:end */
ta . style . width = width ;
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
ta . style . overflowY = value ;
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
function getParentOverflows ( el ) {
var arr = [ ] ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
while ( el && el . parentNode && el . parentNode instanceof Element ) {
if ( el . parentNode . scrollTop ) {
arr . push ( {
node : el . parentNode ,
scrollTop : el . parentNode . scrollTop
} ) ;
}
el = el . parentNode ;
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
return arr ;
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
function resize ( ) {
var originalHeight = ta . style . height ;
var overflows = getParentOverflows ( ta ) ;
var docTop = document . documentElement && document . documentElement . scrollTop ; // Needed for Mobile IE (ticket #240)
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
ta . style . height = 'auto' ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var endHeight = ta . scrollHeight + heightOffset ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
if ( ta . scrollHeight === 0 ) {
// If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.
ta . style . height = originalHeight ;
return ;
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
ta . style . height = endHeight + 'px' ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
// used to check if an update is actually necessary on window.resize
clientWidth = ta . clientWidth ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
// prevents scroll-position jumping
overflows . forEach ( ( function ( el ) {
el . node . scrollTop = el . scrollTop ;
} ) ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
if ( docTop ) {
document . documentElement . scrollTop = docTop ;
}
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
function update ( ) {
resize ( ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var styleHeight = Math . round ( parseFloat ( ta . style . height ) ) ;
var computed = window . getComputedStyle ( ta , null ) ;
var actualHeight = Math . round ( parseFloat ( computed . height ) ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
// The actual height not matching the style height (set via the resize method) indicates that
// the max-height has been exceeded, in which case the overflow should be set to visible.
if ( actualHeight !== styleHeight ) {
if ( computed . overflowY !== 'visible' ) {
changeOverflow ( 'visible' ) ;
resize ( ) ;
actualHeight = Math . round ( parseFloat ( window . getComputedStyle ( ta , null ) . height ) ) ;
}
} else {
// Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.
if ( computed . overflowY !== 'hidden' ) {
changeOverflow ( 'hidden' ) ;
resize ( ) ;
actualHeight = Math . round ( parseFloat ( window . getComputedStyle ( ta , null ) . height ) ) ;
}
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
if ( cachedHeight !== actualHeight ) {
cachedHeight = actualHeight ;
var evt = createEvent ( 'autosize:resized' ) ;
try {
ta . dispatchEvent ( evt ) ;
} catch ( err ) {
// Firefox will throw an error on dispatchEvent for a detached element
// https://bugzilla.mozilla.org/show_bug.cgi?id=889376
}
}
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var pageResize = function pageResize ( ) {
if ( ta . clientWidth !== clientWidth ) {
update ( ) ;
}
} ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var destroy = ( function ( style ) {
window . removeEventListener ( 'resize' , pageResize , false ) ;
ta . removeEventListener ( 'input' , update , false ) ;
ta . removeEventListener ( 'keyup' , update , false ) ;
ta . removeEventListener ( 'autosize:destroy' , destroy , false ) ;
ta . removeEventListener ( 'autosize:update' , update , false ) ;
Object . keys ( style ) . forEach ( ( function ( key ) {
ta . style [ key ] = style [ key ] ;
} ) ) ;
map [ 'delete' ] ( ta ) ;
} ) . bind ( ta , {
height : ta . style . height ,
resize : ta . style . resize ,
overflowY : ta . style . overflowY ,
overflowX : ta . style . overflowX ,
wordWrap : ta . style . wordWrap
} ) ;
ta . addEventListener ( 'autosize:destroy' , destroy , false ) ;
// IE9 does not fire onpropertychange or oninput for deletions,
// so binding to onkeyup to catch most of those events.
// There is no way that I know of to detect something like 'cut' in IE9.
if ( 'onpropertychange' in ta && 'oninput' in ta ) {
ta . addEventListener ( 'keyup' , update , false ) ;
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
window . addEventListener ( 'resize' , pageResize , false ) ;
ta . addEventListener ( 'input' , update , false ) ;
ta . addEventListener ( 'autosize:update' , update , false ) ;
ta . style . overflowX = 'hidden' ;
ta . style . wordWrap = 'break-word' ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
map . set ( ta , {
destroy : destroy ,
update : update
} ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
init ( ) ;
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
function destroy ( ta ) {
var methods = map . get ( ta ) ;
if ( methods ) {
methods . destroy ( ) ;
}
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
function update ( ta ) {
var methods = map . get ( ta ) ;
if ( methods ) {
methods . update ( ) ;
}
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var autosize = null ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
// Do nothing in Node.js environment and IE8 (or lower)
if ( typeof window === 'undefined' || typeof window . getComputedStyle !== 'function' ) {
autosize = function ( el ) {
return el ;
} ;
autosize . destroy = function ( el ) {
return el ;
} ;
autosize . update = function ( el ) {
return el ;
} ;
} else {
autosize = function ( el , options ) {
if ( el ) {
Array . prototype . forEach . call ( el . length ? el : [ el ] , ( function ( x ) {
return assign ( x , options ) ;
} ) ) ;
}
return el ;
} ;
autosize . destroy = function ( el ) {
if ( el ) {
Array . prototype . forEach . call ( el . length ? el : [ el ] , destroy ) ;
}
return el ;
} ;
autosize . update = function ( el ) {
if ( el ) {
Array . prototype . forEach . call ( el . length ? el : [ el ] , update ) ;
}
return el ;
} ;
}
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
module . exports = autosize ;
} ) ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
/***/ } ) ,
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
/***/ 153 :
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
"use strict" ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var _common = _ _webpack _require _ _ ( 62 ) ;
2017-01-10 04:04:09 +00:00
2017-02-08 03:16:24 +00:00
var _common2 = _interopRequireDefault ( _common ) ;
var _getClosestVueParent = _ _webpack _require _ _ ( 12 ) ;
var _getClosestVueParent2 = _interopRequireDefault ( _getClosestVueParent ) ;
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { default : obj } ; }
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
exports . default = {
mixins : [ _common2 . default ] ,
props : {
type : {
type : String ,
default : 'text'
}
} ,
mounted : function mounted ( ) {
var _this = this ;
this . $nextTick ( ( function ( ) {
_this . parentContainer = ( 0 , _getClosestVueParent2 . default ) ( _this . $parent , 'md-input-container' ) ;
if ( ! _this . parentContainer ) {
_this . $destroy ( ) ;
throw new Error ( 'You should wrap the md-input in a md-input-container' ) ;
}
_this . setParentDisabled ( ) ;
_this . setParentRequired ( ) ;
_this . setParentPlaceholder ( ) ;
_this . handleMaxLength ( ) ;
_this . updateValues ( ) ;
} ) ) ;
}
} ;
module . exports = exports [ 'default' ] ;
/***/ } ) ,
/***/ 154 :
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
var _mixin = _ _webpack _require _ _ ( 1 ) ;
var _mixin2 = _interopRequireDefault ( _mixin ) ;
var _isArray = _ _webpack _require _ _ ( 59 ) ;
var _isArray2 = _interopRequireDefault ( _isArray ) ;
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { default : obj } ; }
//
//
//
//
//
//
//
//
//
//
//
//
//
//
exports . default = {
props : {
mdInline : Boolean ,
mdHasPassword : Boolean
} ,
mixins : [ _mixin2 . default ] ,
data : function data ( ) {
return {
value : '' ,
input : false ,
showPassword : false ,
enableCounter : false ,
hasSelect : false ,
hasPlaceholder : false ,
hasFile : false ,
isDisabled : false ,
isRequired : false ,
isFocused : false ,
counterLength : 0 ,
inputLength : 0
} ;
} ,
computed : {
hasValue : function hasValue ( ) {
if ( ( 0 , _isArray2 . default ) ( this . value ) ) {
return this . value . length > 0 ;
}
return Boolean ( this . value ) ;
} ,
classes : function classes ( ) {
return {
'md-input-inline' : this . mdInline ,
'md-has-password' : this . mdHasPassword ,
'md-has-select' : this . hasSelect ,
'md-has-file' : this . hasFile ,
'md-has-value' : this . hasValue ,
'md-input-placeholder' : this . hasPlaceholder ,
'md-input-disabled' : this . isDisabled ,
'md-input-required' : this . isRequired ,
'md-input-focused' : this . isFocused
} ;
}
} ,
methods : {
isInput : function isInput ( ) {
return this . input && this . input . tagName . toLowerCase ( ) === 'input' ;
} ,
togglePasswordType : function togglePasswordType ( ) {
if ( this . isInput ( ) ) {
if ( this . input . type === 'password' ) {
this . input . type = 'text' ;
this . showPassword = true ;
} else {
this . input . type = 'password' ;
this . showPassword = false ;
}
this . input . focus ( ) ;
}
} ,
setValue : function setValue ( value ) {
this . value = value ;
}
} ,
mounted : function mounted ( ) {
this . input = this . $el . querySelectorAll ( 'input, textarea, select, .md-file' ) [ 0 ] ;
if ( ! this . input ) {
this . $destroy ( ) ;
throw new Error ( 'Missing input/select/textarea inside md-input-container' ) ;
}
}
} ;
module . exports = exports [ 'default' ] ;
/***/ } ) ,
/***/ 155 :
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
var _autosize = _ _webpack _require _ _ ( 122 ) ;
var _autosize2 = _interopRequireDefault ( _autosize ) ;
var _common = _ _webpack _require _ _ ( 62 ) ;
var _common2 = _interopRequireDefault ( _common ) ;
var _getClosestVueParent = _ _webpack _require _ _ ( 12 ) ;
var _getClosestVueParent2 = _interopRequireDefault ( _getClosestVueParent ) ;
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { default : obj } ; }
exports . default = {
mixins : [ _common2 . default ] ,
watch : {
value : function value ( ) {
var _this = this ;
this . $nextTick ( ( function ( ) {
_autosize2 . default . update ( _this . $el ) ;
} ) ) ;
}
} ,
mounted : function mounted ( ) {
var _this2 = this ;
this . $nextTick ( ( function ( ) {
_this2 . parentContainer = ( 0 , _getClosestVueParent2 . default ) ( _this2 . $parent , 'md-input-container' ) ;
if ( ! _this2 . parentContainer ) {
_this2 . $destroy ( ) ;
throw new Error ( 'You should wrap the md-textarea in a md-input-container' ) ;
}
_this2 . setParentDisabled ( ) ;
_this2 . setParentRequired ( ) ;
_this2 . setParentPlaceholder ( ) ;
_this2 . handleMaxLength ( ) ;
_this2 . updateValues ( ) ;
if ( ! _this2 . $el . getAttribute ( 'rows' ) ) {
_this2 . $el . setAttribute ( 'rows' , '1' ) ;
}
( 0 , _autosize2 . default ) ( _this2 . $el ) ;
} ) ) ;
} ,
beforeDestroy : function beforeDestroy ( ) {
_autosize2 . default . destroy ( this . $el ) ;
}
} ; //
//
//
//
//
//
//
//
//
//
//
//
//
module . exports = exports [ 'default' ] ;
/***/ } ) ,
/***/ 208 :
/***/ ( function ( module , exports ) {
// removed by extract-text-webpack-plugin
/***/ } ) ,
/***/ 244 :
/***/ ( function ( module , exports ) {
module . exports = ".THEME_NAME.md-input-container.md-input-invalid:after {\n background-color: WARN-COLOR; }\n\n.THEME_NAME.md-input-container.md-input-invalid label,\n.THEME_NAME.md-input-container.md-input-invalid input,\n.THEME_NAME.md-input-container.md-input-invalid textarea,\n.THEME_NAME.md-input-container.md-input-invalid .md-error,\n.THEME_NAME.md-input-container.md-input-invalid .md-count,\n.THEME_NAME.md-input-container.md-input-invalid .md-icon:not(.md-icon-delete) {\n color: WARN-COLOR; }\n\n.THEME_NAME.md-input-container.md-input-focused.md-input-inline label {\n color: rgba(0, 0, 0, 0.54); }\n\n.THEME_NAME.md-input-container.md-input-focused.md-input-required label:after {\n color: WARN-COLOR; }\n\n.THEME_NAME.md-input-container.md-input-focused:after {\n height: 2px;\n background-color: PRIMARY-COLOR; }\n\n.THEME_NAME.md-input-container.md-input-focused input,\n.THEME_NAME.md-input-container.md-input-focused textarea {\n color: PRIMARY-COLOR;\n text-shadow: 0 0 0 BACKGROUND-CONTRAST;\n -webkit-text-fill-color: transparent; }\n\n.THEME_NAME.md-input-container.md-input-focused label,\n.THEME_NAME.md-input-container.md-input-focused .md-icon:not(.md-icon-delete) {\n color: PRIMARY-COLOR; }\n\n.THEME_NAME.md-input-container.md-input-disabled label,\n.THEME_NAME.md-input-container.md-input-disabled input,\n.THEME_NAME.md-input-container.md-input-disabled textarea,\n.THEME_NAME.md-input-container.md-input-disabled .md-error,\n.THEME_NAME.md-input-container.md-input-disabled .md-count,\n.THEME_NAME.md-input-container.md-input-disabled .md-icon:not(.md-icon-delete),\n.THEME_NAME.md-input-container.md-input-disabled ::-webkit-input-placeholder {\n color: BACKGROUND-CONTRAST-0.38; }\n\n.THEME_NAME.md-input-container .md-icon:not(.md-icon-delete):after {\n background: BACKGROUND-COLOR; }\n"
/***/ } ) ,
/***/ 290 :
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
var Component = _ _webpack _require _ _ ( 0 ) (
/* script */
_ _webpack _require _ _ ( 153 ) ,
/* template */
_ _webpack _require _ _ ( 347 ) ,
/* scopeId */
null ,
/* cssModules */
null
)
2017-02-09 00:05:12 +00:00
Component . options . _ _file = "/Users/mrufino/Projects/personal/github/vue-material/src/components/mdInputContainer/mdInput.vue"
2017-02-08 03:16:24 +00:00
if ( Component . esModule && Object . keys ( Component . esModule ) . some ( ( function ( key ) { return key !== "default" && key !== "__esModule" } ) ) ) { console . error ( "named exports are not supported in *.vue files." ) }
if ( Component . options . functional ) { console . error ( "[vue-loader] mdInput.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-22df0c6d" , Component . options )
} else {
hotAPI . reload ( "data-v-22df0c6d" , Component . options )
}
} ) ( ) }
module . exports = Component . exports
/***/ } ) ,
/***/ 291 :
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
/* styles */
_ _webpack _require _ _ ( 208 )
var Component = _ _webpack _require _ _ ( 0 ) (
/* script */
_ _webpack _require _ _ ( 154 ) ,
/* template */
_ _webpack _require _ _ ( 349 ) ,
/* scopeId */
null ,
/* cssModules */
null
)
2017-02-09 00:05:12 +00:00
Component . options . _ _file = "/Users/mrufino/Projects/personal/github/vue-material/src/components/mdInputContainer/mdInputContainer.vue"
2017-02-08 03:16:24 +00:00
if ( Component . esModule && Object . keys ( Component . esModule ) . some ( ( function ( key ) { return key !== "default" && key !== "__esModule" } ) ) ) { console . error ( "named exports are not supported in *.vue files." ) }
if ( Component . options . functional ) { console . error ( "[vue-loader] mdInputContainer.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-271c2778" , Component . options )
} else {
hotAPI . reload ( "data-v-271c2778" , Component . options )
}
} ) ( ) }
module . exports = Component . exports
/***/ } ) ,
/***/ 292 :
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
var Component = _ _webpack _require _ _ ( 0 ) (
/* script */
_ _webpack _require _ _ ( 155 ) ,
/* template */
_ _webpack _require _ _ ( 376 ) ,
/* scopeId */
null ,
/* cssModules */
null
)
2017-02-09 00:05:12 +00:00
Component . options . _ _file = "/Users/mrufino/Projects/personal/github/vue-material/src/components/mdInputContainer/mdTextarea.vue"
2017-02-08 03:16:24 +00:00
if ( Component . esModule && Object . keys ( Component . esModule ) . some ( ( function ( key ) { return key !== "default" && key !== "__esModule" } ) ) ) { console . error ( "named exports are not supported in *.vue files." ) }
if ( Component . options . functional ) { console . error ( "[vue-loader] mdTextarea.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-6243e5e7" , Component . options )
} else {
hotAPI . reload ( "data-v-6243e5e7" , Component . options )
}
} ) ( ) }
module . exports = Component . exports
/***/ } ) ,
/***/ 347 :
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
module . exports = { render : function ( ) { var _vm = this ; var _h = _vm . $createElement ; var _c = _vm . _self . _c || _h ;
return _c ( 'input' , {
staticClass : "md-input" ,
attrs : {
"type" : _vm . type ,
"disabled" : _vm . disabled ,
"required" : _vm . required ,
"placeholder" : _vm . placeholder ,
"maxlength" : _vm . maxlength
} ,
domProps : {
"value" : _vm . value
} ,
on : {
"focus" : _vm . onFocus ,
"blur" : _vm . onBlur ,
"input" : _vm . onInput ,
"keydown" : [ function ( $event ) {
if ( _vm . _k ( $event . keyCode , "up" , 38 ) ) { return ; }
_vm . onInput ( $event )
} , function ( $event ) {
if ( _vm . _k ( $event . keyCode , "down" , 40 ) ) { return ; }
_vm . onInput ( $event )
} ]
}
} )
} , staticRenderFns : [ ] }
module . exports . render . _withStripped = true
if ( false ) {
module . hot . accept ( )
if ( module . hot . data ) {
require ( "vue-hot-reload-api" ) . rerender ( "data-v-22df0c6d" , module . exports )
}
}
/***/ } ) ,
/***/ 349 :
/***/ ( 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-input-container" ,
class : [ _vm . themeClass , _vm . classes ]
} , [ _vm . _t ( "default" ) , _vm . _v ( " " ) , ( _vm . enableCounter ) ? _c ( 'span' , {
staticClass : "md-count"
} , [ _vm . _v ( _vm . _s ( _vm . inputLength ) + " / " + _vm . _s ( _vm . counterLength ) ) ] ) : _vm . _e ( ) , _vm . _v ( " " ) , ( _vm . mdHasPassword ) ? _c ( 'md-button' , {
staticClass : "md-icon-button md-toggle-password" ,
2017-02-09 00:05:12 +00:00
nativeOn : {
"click" : function ( $event ) {
_vm . togglePasswordType ( $event )
}
2017-02-08 03:16:24 +00:00
}
} , [ _c ( 'md-icon' , [ _vm . _v ( _vm . _s ( _vm . showPassword ? 'visibility_off' : 'visibility' ) ) ] ) ] , 1 ) : _vm . _e ( ) ] , 2 )
} , staticRenderFns : [ ] }
module . exports . render . _withStripped = true
if ( false ) {
module . hot . accept ( )
if ( module . hot . data ) {
require ( "vue-hot-reload-api" ) . rerender ( "data-v-271c2778" , module . exports )
}
}
/***/ } ) ,
/***/ 376 :
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
module . exports = { render : function ( ) { var _vm = this ; var _h = _vm . $createElement ; var _c = _vm . _self . _c || _h ;
return _c ( 'textarea' , {
staticClass : "md-input" ,
attrs : {
"disabled" : _vm . disabled ,
"required" : _vm . required ,
"placeholder" : _vm . placeholder ,
"maxlength" : _vm . maxlength
} ,
domProps : {
"value" : _vm . value
} ,
on : {
"focus" : _vm . onFocus ,
"blur" : _vm . onBlur ,
"input" : _vm . onInput
}
} )
} , staticRenderFns : [ ] }
module . exports . render . _withStripped = true
if ( false ) {
module . hot . accept ( )
if ( module . hot . data ) {
require ( "vue-hot-reload-api" ) . rerender ( "data-v-6243e5e7" , module . exports )
}
}
/***/ } ) ,
2017-02-09 00:05:12 +00:00
/***/ 410 :
2017-02-08 03:16:24 +00:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
module . exports = _ _webpack _require _ _ ( 103 ) ;
/***/ } ) ,
/***/ 59 :
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
var isArray = function isArray ( value ) {
return value && value . constructor === Array ;
} ;
exports . default = isArray ;
module . exports = exports [ "default" ] ;
/***/ } ) ,
/***/ 62 :
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
exports . default = {
props : {
value : [ String , Number ] ,
disabled : Boolean ,
required : Boolean ,
maxlength : [ Number , String ] ,
placeholder : String
} ,
watch : {
value : function value ( _value ) {
this . setParentValue ( _value ) ;
this . updateValues ( _value ) ;
} ,
disabled : function disabled ( ) {
this . setParentDisabled ( ) ;
} ,
required : function required ( ) {
this . setParentRequired ( ) ;
} ,
placeholder : function placeholder ( ) {
this . setParentPlaceholder ( ) ;
} ,
maxlength : function maxlength ( ) {
this . handleMaxLength ( ) ;
}
} ,
methods : {
handleMaxLength : function handleMaxLength ( ) {
this . parentContainer . enableCounter = this . maxlength > 0 ;
this . parentContainer . counterLength = this . maxlength ;
} ,
setParentValue : function setParentValue ( value ) {
this . parentContainer . setValue ( value || this . $el . value ) ;
} ,
setParentDisabled : function setParentDisabled ( ) {
this . parentContainer . isDisabled = this . disabled ;
} ,
setParentRequired : function setParentRequired ( ) {
this . parentContainer . isRequired = this . required ;
} ,
setParentPlaceholder : function setParentPlaceholder ( ) {
this . parentContainer . hasPlaceholder = ! ! this . placeholder ;
} ,
updateValues : function updateValues ( value ) {
var newValue = value || this . $el . value || this . value ;
this . setParentValue ( newValue ) ;
this . parentContainer . inputLength = newValue ? newValue . length : 0 ;
} ,
onFocus : function onFocus ( ) {
if ( this . parentContainer ) {
this . parentContainer . isFocused = true ;
}
} ,
onBlur : function onBlur ( ) {
this . parentContainer . isFocused = false ;
this . setParentValue ( ) ;
} ,
onInput : function onInput ( ) {
this . updateValues ( ) ;
this . $emit ( 'change' , this . $el . value ) ;
this . $emit ( 'input' , this . $el . value ) ;
}
}
} ;
module . exports = exports [ 'default' ] ;
/***/ } )
/******/ } ) ;
} ) ) ;