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 _ _ ( 110 ) ;
2016-11-21 03:39:30 +00:00
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 110 :
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 _mdInputContainer = _ _webpack _require _ _ ( 111 ) ;
2016-11-21 03:39:30 +00:00
var _mdInputContainer2 = _interopRequireDefault ( _mdInputContainer ) ;
2016-12-05 03:53:41 +00:00
var _mdInput = _ _webpack _require _ _ ( 116 ) ;
2016-11-21 03:39:30 +00:00
var _mdInput2 = _interopRequireDefault ( _mdInput ) ;
2016-12-05 03:53:41 +00:00
var _mdTextarea = _ _webpack _require _ _ ( 121 ) ;
2016-11-21 03:39:30 +00:00
var _mdTextarea2 = _interopRequireDefault ( _mdTextarea ) ;
2016-12-05 03:53:41 +00:00
var _mdInputContainer3 = _ _webpack _require _ _ ( 125 ) ;
2016-11-21 03:39:30 +00:00
var _mdInputContainer4 = _interopRequireDefault ( _mdInputContainer3 ) ;
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { default : obj } ; }
function install ( Vue ) {
Vue . component ( 'md-input-container' , _mdInputContainer2 . default ) ;
Vue . component ( 'md-input' , _mdInput2 . default ) ;
Vue . component ( 'md-textarea' , _mdTextarea2 . default ) ;
Vue . material . styles . push ( _mdInputContainer4 . default ) ;
}
module . exports = exports [ 'default' ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 111 :
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 _ _ ( 112 )
2016-11-21 03:39:30 +00:00
/* script */
2016-12-05 03:53:41 +00:00
_ _vue _exports _ _ = _ _webpack _require _ _ ( 113 )
2016-11-21 03:39:30 +00:00
/* template */
2016-12-05 03:53:41 +00:00
var _ _vue _template _ _ = _ _webpack _require _ _ ( 115 )
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
}
2016-12-09 15:59:35 +00:00
_ _vue _options _ _ . _ _file = "/Users/mrufino/Projects/personal/github/vue-material/src/components/mdInputContainer/mdInputContainer.vue"
2016-11-21 03:39:30 +00:00
_ _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 ) {
2016-12-09 15:59:35 +00:00
hotAPI . createRecord ( "data-v-c3baaf7a" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
} else {
2016-12-09 15:59:35 +00:00
hotAPI . reload ( "data-v-c3baaf7a" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
}
} ) ( ) }
if ( _ _vue _options _ _ . functional ) { console . error ( "[vue-loader] mdInputContainer.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
/***/ 112 :
/***/ function ( module , exports ) {
// removed by extract-text-webpack-plugin
/***/ } ,
/***/ 113 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
2016-12-05 03:53:41 +00:00
var _isArray = _ _webpack _require _ _ ( 114 ) ;
2016-11-21 03:39:30 +00:00
var _isArray2 = _interopRequireDefault ( _isArray ) ;
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { default : obj } ; }
exports . default = {
props : {
mdInline : Boolean ,
mdHasPassword : Boolean
} ,
data : function data ( ) {
return {
value : '' ,
input : false ,
showPassword : false ,
enableCounter : false ,
hasSelect : false ,
hasPlaceholder : 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-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' ) [ 0 ] ;
if ( ! this . input ) {
this . $destroy ( ) ;
throw new Error ( 'Missing input/select/textarea inside md-input-container' ) ;
}
}
} ; //
//
//
//
//
//
//
//
//
//
//
//
//
//
module . exports = exports [ 'default' ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 114 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports ) {
"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" ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 115 :
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-input-container" ,
class : _vm . classes
2016-12-05 03:53:41 +00:00
} , [ _vm . _t ( "default" ) , " " , ( _vm . enableCounter ) ? _h ( 'span' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-count"
2016-12-05 03:53:41 +00:00
} , [ _vm . _s ( _vm . inputLength ) + " / " + _vm . _s ( _vm . counterLength ) ] ) : _vm . _e ( ) , " " , ( _vm . mdHasPassword ) ? _h ( 'md-button' , {
2016-11-21 03:39:30 +00:00
staticClass : "md-icon-button md-toggle-password" ,
on : {
"click" : _vm . togglePasswordType
}
2016-12-05 03:53:41 +00:00
} , [ _h ( 'md-icon' , [ _vm . _s ( _vm . showPassword ? 'visibility_off' : 'visibility' ) ] ) ] ) : _vm . _e ( ) ] )
2016-11-21 03:39:30 +00:00
} , 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 ) {
2016-12-09 15:59:35 +00:00
require ( "vue-hot-reload-api" ) . rerender ( "data-v-c3baaf7a" , module . exports )
2016-11-21 03:39:30 +00:00
}
}
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 116 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
var _ _vue _exports _ _ , _ _vue _options _ _
var _ _vue _styles _ _ = { }
/* script */
2016-12-05 03:53:41 +00:00
_ _vue _exports _ _ = _ _webpack _require _ _ ( 117 )
2016-11-21 03:39:30 +00:00
/* template */
2016-12-05 03:53:41 +00:00
var _ _vue _template _ _ = _ _webpack _require _ _ ( 120 )
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
}
2016-12-09 15:59:35 +00:00
_ _vue _options _ _ . _ _file = "/Users/mrufino/Projects/personal/github/vue-material/src/components/mdInputContainer/mdInput.vue"
2016-11-21 03:39:30 +00:00
_ _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 ) {
2016-12-09 15:59:35 +00:00
hotAPI . createRecord ( "data-v-5d6e058e" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
} else {
2016-12-09 15:59:35 +00:00
hotAPI . reload ( "data-v-5d6e058e" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
}
} ) ( ) }
if ( _ _vue _options _ _ . functional ) { console . error ( "[vue-loader] mdInput.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
/***/ 117 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
2016-12-05 03:53:41 +00:00
var _common = _ _webpack _require _ _ ( 118 ) ;
2016-11-21 03:39:30 +00:00
var _common2 = _interopRequireDefault ( _common ) ;
2016-12-05 03:53:41 +00:00
var _getClosestVueParent = _ _webpack _require _ _ ( 119 ) ;
2016-11-21 03:39:30 +00:00
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 ( ) {
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 . setParentValue ( ) ;
this . handleMaxLength ( ) ;
}
} ;
module . exports = exports [ 'default' ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 118 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
exports . default = {
props : {
value : [ String , Number ] ,
disabled : Boolean ,
required : Boolean ,
maxlength : [ Number , String ] ,
placeholder : String
} ,
watch : {
2016-11-21 05:32:28 +00:00
value : function value ( _value ) {
this . setParentValue ( _value ) ;
2016-11-21 03:39:30 +00:00
} ,
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 ;
} ,
2016-11-21 05:32:28 +00:00
setParentValue : function setParentValue ( value ) {
this . parentContainer . setValue ( value || this . $el . value ) ;
2016-11-21 03:39:30 +00:00
} ,
setParentDisabled : function setParentDisabled ( ) {
this . parentContainer . isDisabled = this . disabled ;
} ,
setParentRequired : function setParentRequired ( ) {
this . parentContainer . isRequired = this . required ;
} ,
setParentPlaceholder : function setParentPlaceholder ( ) {
this . parentContainer . hasPlaceholder = ! ! this . placeholder ;
} ,
onFocus : function onFocus ( ) {
this . parentContainer . isFocused = true ;
} ,
onBlur : function onBlur ( ) {
this . parentContainer . isFocused = false ;
this . setParentValue ( ) ;
} ,
onInput : function onInput ( ) {
2016-11-21 05:32:28 +00:00
var value = this . $el . value ;
2016-11-21 03:39:30 +00:00
this . setParentValue ( ) ;
2016-11-21 05:32:28 +00:00
this . parentContainer . inputLength = value ? value . length : 0 ;
this . $emit ( 'change' , value ) ;
this . $emit ( 'input' , value ) ;
2016-11-21 03:39:30 +00:00
}
}
} ;
module . exports = exports [ 'default' ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 119 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports ) {
"use strict" ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
var getClosestVueParent = function getClosestVueParent ( $parent , cssClass ) {
2016-12-05 03:53:41 +00:00
if ( ! $parent || ! $parent . $el ) {
2016-11-21 03:39:30 +00:00
return false ;
}
if ( $parent . _uid === 0 ) {
return false ;
}
if ( $parent . $el . classList . contains ( cssClass ) ) {
return $parent ;
}
return getClosestVueParent ( $parent . $parent , cssClass ) ;
} ;
exports . default = getClosestVueParent ;
module . exports = exports [ "default" ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 120 :
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 ( 'input' , {
2016-11-21 03:39:30 +00:00
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 ) {
2016-12-05 03:53:41 +00:00
if ( _vm . _k ( $event . keyCode , "up" , 38 ) ) { return ; }
2016-11-21 03:39:30 +00:00
_vm . onInput ( $event )
} , function ( $event ) {
2016-12-05 03:53:41 +00:00
if ( _vm . _k ( $event . keyCode , "down" , 40 ) ) { return ; }
2016-11-21 03:39:30 +00:00
_vm . onInput ( $event )
} ]
}
} )
} , 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 ) {
2016-12-09 15:59:35 +00:00
require ( "vue-hot-reload-api" ) . rerender ( "data-v-5d6e058e" , module . exports )
2016-11-21 03:39:30 +00:00
}
}
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 121 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
var _ _vue _exports _ _ , _ _vue _options _ _
var _ _vue _styles _ _ = { }
/* script */
2016-12-05 03:53:41 +00:00
_ _vue _exports _ _ = _ _webpack _require _ _ ( 122 )
2016-11-21 03:39:30 +00:00
/* template */
2016-12-05 03:53:41 +00:00
var _ _vue _template _ _ = _ _webpack _require _ _ ( 124 )
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
}
2016-12-09 15:59:35 +00:00
_ _vue _options _ _ . _ _file = "/Users/mrufino/Projects/personal/github/vue-material/src/components/mdInputContainer/mdTextarea.vue"
2016-11-21 03:39:30 +00:00
_ _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 ) {
2016-12-09 15:59:35 +00:00
hotAPI . createRecord ( "data-v-339565b4" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
} else {
2016-12-09 15:59:35 +00:00
hotAPI . reload ( "data-v-339565b4" , _ _vue _options _ _ )
2016-11-21 03:39:30 +00:00
}
} ) ( ) }
if ( _ _vue _options _ _ . functional ) { console . error ( "[vue-loader] mdTextarea.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
/***/ 122 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
'use strict' ;
Object . defineProperty ( exports , "__esModule" , {
value : true
} ) ;
2016-12-05 03:53:41 +00:00
var _autosize = _ _webpack _require _ _ ( 123 ) ;
2016-11-21 03:39:30 +00:00
var _autosize2 = _interopRequireDefault ( _autosize ) ;
2016-12-05 03:53:41 +00:00
var _common = _ _webpack _require _ _ ( 118 ) ;
2016-11-21 03:39:30 +00:00
var _common2 = _interopRequireDefault ( _common ) ;
2016-12-05 03:53:41 +00:00
var _getClosestVueParent = _ _webpack _require _ _ ( 119 ) ;
2016-11-21 03:39:30 +00:00
var _getClosestVueParent2 = _interopRequireDefault ( _getClosestVueParent ) ;
function _interopRequireDefault ( obj ) { return obj && obj . _ _esModule ? obj : { default : obj } ; }
exports . default = {
mixins : [ _common2 . default ] ,
2016-12-09 15:59:35 +00:00
watch : {
value : function value ( ) {
var _this = this ;
this . $nextTick ( function ( ) {
_autosize2 . default . update ( _this . $el ) ;
} ) ;
}
} ,
2016-11-21 03:39:30 +00:00
mounted : function mounted ( ) {
this . parentContainer = ( 0 , _getClosestVueParent2 . default ) ( this . $parent , 'md-input-container' ) ;
if ( ! this . parentContainer ) {
this . $destroy ( ) ;
throw new Error ( 'You should wrap the md-textarea in a md-input-container' ) ;
}
this . setParentDisabled ( ) ;
this . setParentRequired ( ) ;
this . setParentPlaceholder ( ) ;
this . setParentValue ( ) ;
this . handleMaxLength ( ) ;
if ( ! this . $el . getAttribute ( 'rows' ) ) {
this . $el . setAttribute ( 'rows' , '1' ) ;
}
( 0 , _autosize2 . default ) ( this . $el ) ;
} ,
beforeDestroy : function beforeDestroy ( ) {
_autosize2 . default . destroy ( this . $el ) ;
}
} ; //
//
//
//
//
//
//
//
//
//
//
//
//
module . exports = exports [ 'default' ] ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 123 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports , _ _webpack _require _ _ ) {
var _ _WEBPACK _AMD _DEFINE _FACTORY _ _ , _ _WEBPACK _AMD _DEFINE _ARRAY _ _ , _ _WEBPACK _AMD _DEFINE _RESULT _ _ ; / * !
2016-12-05 03:53:41 +00:00
Autosize 3.0 . 20
2016-11-21 03:39:30 +00:00
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' ;
2016-12-05 03:53:41 +00:00
var map = typeof Map === "function" ? new Map ( ) : ( function ( ) {
2016-11-21 03:39:30 +00:00
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 ) ;
}
} ,
'delete' : function _delete ( key ) {
var index = keys . indexOf ( key ) ;
if ( index > - 1 ) {
keys . splice ( index , 1 ) ;
values . splice ( index , 1 ) ;
}
2016-12-05 03:53:41 +00:00
}
} ;
2016-11-21 03:39:30 +00:00
} ) ( ) ;
var createEvent = function createEvent ( name ) {
2016-12-05 03:53:41 +00:00
return new Event ( name , { bubbles : true } ) ;
2016-11-21 03:39:30 +00:00
} ;
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 ;
} ;
}
function assign ( ta ) {
if ( ! ta || ! ta . nodeName || ta . nodeName !== 'TEXTAREA' || map . has ( ta ) ) return ;
var heightOffset = null ;
var clientWidth = ta . clientWidth ;
var cachedHeight = null ;
function init ( ) {
var style = window . getComputedStyle ( ta , null ) ;
if ( style . resize === 'vertical' ) {
ta . style . resize = 'none' ;
} else if ( style . resize === 'both' ) {
ta . style . resize = 'horizontal' ;
}
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 ;
}
update ( ) ;
}
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 ;
}
ta . style . overflowY = value ;
}
function getParentOverflows ( el ) {
var arr = [ ] ;
while ( el && el . parentNode && el . parentNode instanceof Element ) {
if ( el . parentNode . scrollTop ) {
arr . push ( {
node : el . parentNode ,
2016-12-05 03:53:41 +00:00
scrollTop : el . parentNode . scrollTop
} ) ;
2016-11-21 03:39:30 +00:00
}
el = el . parentNode ;
}
return arr ;
}
function resize ( ) {
var originalHeight = ta . style . height ;
var overflows = getParentOverflows ( ta ) ;
var docTop = document . documentElement && document . documentElement . scrollTop ; // Needed for Mobile IE (ticket #240)
ta . style . height = 'auto' ;
var endHeight = ta . scrollHeight + heightOffset ;
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 ;
}
ta . style . height = endHeight + 'px' ;
// used to check if an update is actually necessary on window.resize
clientWidth = ta . clientWidth ;
// prevents scroll-position jumping
overflows . forEach ( function ( el ) {
el . node . scrollTop = el . scrollTop ;
} ) ;
if ( docTop ) {
document . documentElement . scrollTop = docTop ;
}
}
function update ( ) {
resize ( ) ;
var styleHeight = Math . round ( parseFloat ( ta . style . height ) ) ;
2016-12-05 03:53:41 +00:00
var computed = window . getComputedStyle ( ta , null ) ;
var actualHeight = Math . round ( parseFloat ( computed . height ) ) ;
2016-11-21 03:39:30 +00:00
2016-12-05 03:53:41 +00:00
// The actual height not matching the style height (set via the resize method) indicates that
2016-11-21 03:39:30 +00:00
// the max-height has been exceeded, in which case the overflow should be set to visible.
2016-12-05 03:53:41 +00:00
if ( actualHeight !== styleHeight ) {
2016-11-21 03:39:30 +00:00
if ( computed . overflowY !== 'visible' ) {
changeOverflow ( 'visible' ) ;
2016-12-05 03:53:41 +00:00
resize ( ) ;
actualHeight = Math . round ( parseFloat ( window . getComputedStyle ( ta , null ) . height ) ) ;
2016-11-21 03:39:30 +00:00
}
} else {
// Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.
if ( computed . overflowY !== 'hidden' ) {
changeOverflow ( 'hidden' ) ;
2016-12-05 03:53:41 +00:00
resize ( ) ;
actualHeight = Math . round ( parseFloat ( window . getComputedStyle ( ta , null ) . height ) ) ;
2016-11-21 03:39:30 +00:00
}
}
2016-12-05 03:53:41 +00:00
if ( cachedHeight !== actualHeight ) {
cachedHeight = actualHeight ;
2016-11-21 03:39:30 +00:00
var evt = createEvent ( 'autosize:resized' ) ;
try {
ta . dispatchEvent ( evt ) ;
2016-12-05 03:53:41 +00:00
} catch ( err ) {
// Firefox will throw an error on dispatchEvent for a detached element
// https://bugzilla.mozilla.org/show_bug.cgi?id=889376
}
2016-11-21 03:39:30 +00:00
}
}
var pageResize = function pageResize ( ) {
if ( ta . clientWidth !== clientWidth ) {
update ( ) ;
}
} ;
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 ,
2016-12-05 03:53:41 +00:00
wordWrap : ta . style . wordWrap
} ) ;
2016-11-21 03:39:30 +00:00
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 ) ;
}
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' ;
map . set ( ta , {
destroy : destroy ,
2016-12-05 03:53:41 +00:00
update : update
} ) ;
2016-11-21 03:39:30 +00:00
init ( ) ;
}
function destroy ( ta ) {
var methods = map . get ( ta ) ;
if ( methods ) {
methods . destroy ( ) ;
}
}
function update ( ta ) {
var methods = map . get ( ta ) ;
if ( methods ) {
methods . update ( ) ;
}
}
var autosize = null ;
// 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 ;
} ;
}
module . exports = autosize ;
} ) ;
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 124 :
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 ( 'textarea' , {
2016-11-21 03:39:30 +00:00
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 : [ ] }
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 ) {
2016-12-09 15:59:35 +00:00
require ( "vue-hot-reload-api" ) . rerender ( "data-v-339565b4" , module . exports )
2016-11-21 03:39:30 +00:00
}
}
/***/ } ,
2016-12-05 03:53:41 +00:00
/***/ 125 :
2016-11-21 03:39:30 +00:00
/***/ function ( module , exports ) {
module . exports = ".THEME_NAME .md-input-container.md-input-invalid:after, .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 .md-error,\n.THEME_NAME .md-input-container.md-input-invalid .md-count,\n.THEME_NAME .md-input-container.md-input-invalid input,\n.THEME_NAME .md-input-container.md-input-invalid textarea, .THEME_NAME.md-input-container.md-input-invalid label,\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 input,\n.THEME_NAME.md-input-container.md-input-invalid textarea {\n color: WARN-COLOR; }\n\n.THEME_NAME .md-input-container.md-input-focused.md-input-inline label, .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, .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, .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, .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, .THEME_NAME.md-input-container.md-input-focused label {\n color: PRIMARY-COLOR; }\n"
/***/ }
/******/ } )
} ) ;
;
//# sourceMappingURL=index.debug.js.map