vue-material/dist/components/mdSelect/index.js
Marcos Moura 627639b9dc 0.4.0
* Improve sidenav performance and expansion list performance

* Init dialog

* Add initial transition

* Add backdrop to md-menu

* Create dialog opening from and closing to

* Add example os basic and opening from and to

* Add todo

* Create alias for root element

* Fix dialog position

* Improve transitions

* Fix rules

* Fix dialog position on open

* Improve docs transitions

* Create styles for actions and content

* Create confirm dialog preset

* Create alert dialog preset

* Create prompt dialog preset

* Add example with HTML

* Improve close transition

* Create new documentation template for components

* Improve template for mobile

* Improve toolbar behaviour

* Format code-block and apply clipboard.js

* Move clipboard to devDependencies

* Show toast after copy

* Add function to toggle sidenav and add page title

* create avatar documentation with the new template

* Improve themes and codes

* Remove hover

* fix copied toast position

* add classes tab

* create bottom-bar documentation with the new template

* improve bottom bar docs

* create button documentation with the new template

* create button toggle documentation with the new template

* Fix backdrop styles

* Fix image color names

* create card documentation with the new template

* Update debug-lib.js (#106)

Fixes webpack missing module error when loading scss

* create checkboxes documentation with the new template

* Add more alignment options (#109)

* Create offset options
  - md-offset-y and md-offset-x

* Add option to align the menu to the trigger

* Create better examples

* fix bottom-right position

* create dialog documentation with the new template

* create icon documentation with the new template

* fix typo

* create input documentation with the new template

* create tooltip documentation with the new template

* create whiteframe documentation with the new template

* Fix unregisterMouseEvent not accepting the element as parameter (#118)

* create radio documentation with the new template

* create ripple documentation with the new template

* create switch documentation with the new template

* create subheader documentation with the new template

* fix text

* improvements over menu

* create menu documentation with the new template

* create sidenav documentation with the new template

* create toolbar documentation with the new template

* improve visibility of some code-blocks

* create select documentation with the new template

* create typography documentation with the new template

* create changelog page with the new template

* create about page with the new template

* create error page with the new template

* create introduction page with the new template

* create getting started page with the new template

* create getting started page with the new template

* add codepen examples

* create list documentation with the new template

* improve docs

* add old releases in a folder

* optimize build time

* remove unused code and rename components

* generate old versions

* redirect to old documentation versions

* [build] 0.4.0

* [build] 0.4.0

* restore dist

* get current version from url

* [build] 0.4.0

* restore old docs

* add correct branch to release script

* create table documentation with the new template

* add a better explanation of list classes

* improve docs

* create table documentation with the new template

* add code example for tabs

* remove directive example of ripple

* fix code example of typograph items

* general fixes and code cleanup

* create themes documentation

* start the creation of button "edit on codepen"

* group theme text and fix height of codepen example

* start creation of tabs

* recreate tabs

* fix shadow transition inside menus (#141 #129)

* add href support for mdBottomBar (#142 #121)

* fix table row not watching item #116 #113 (#143)

* Improvement/md tooltip (#144)

* fix stucked tooltips #103

* remove example

* update website url

* update libs

* fix vue version reference

* [build] 0.4.0
2016-12-05 01:57:58 -02:00

1 line
No EOL
6.9 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VueMaterial=t():e.VueMaterial=t()}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var s=n[i]={exports:{},id:i,loaded:!1};return e[i].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var n={};return t.m=e,t.c=n,t.p="/",t(0)}({0:function(e,t,n){e.exports=n(20)},1:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function e(t,n){return!(!t||!t.$el)&&(0!==t._uid&&(t.$el.classList.contains(n)?t:e(t.$parent,n)))};t.default=n,e.exports=t.default},3:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&e.constructor===Array};t.default=n,e.exports=t.default},20:function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){e.component("md-select",e.extend(o.default)),e.component("md-option",e.extend(r.default)),e.material.styles.push(c.default)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var l=n(162),o=i(l),u=n(161),r=i(u),a=n(116),c=i(a);e.exports=t.default},61:function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var s=n(1),l=i(s);t.default={props:{value:[String,Boolean,Number]},data:function(){return{parentSelect:{},check:!1,index:0}},computed:{isSelected:function(){if(this.value&&this.parentSelect.value){var e=this.value.toString();return this.parentSelect.multiple?this.parentSelect.value.indexOf(e)>=0:this.value&&this.parentSelect.value&&e===this.parentSelect.value.toString()}return!1},classes:function(){return{"md-selected":this.isSelected,"md-checked":this.check}}},methods:{selectOption:function(e){this.parentSelect.multiple?this.check=!this.check:this.parentSelect.selectOption(this.value,this.$refs.item.textContent),this.$emit("selected",e)}},watch:{isSelected:function(e){this.parentSelect.multiple&&(this.check=e)},check:function(e){e?this.parentSelect.selectMultiple(this.index,this.value,this.$refs.item.textContent):this.parentSelect.selectMultiple(this.index)}},mounted:function(){if(this.parentSelect=(0,l.default)(this.$parent,"md-select"),this.parentContent=(0,l.default)(this.$parent,"md-menu-content"),!this.parentSelect)throw new Error("You must wrap the md-option in a md-select");this.parentSelect.optionsAmount++,this.index=this.parentSelect.optionsAmount,this.parentSelect.multipleOptions[this.index]={},this.parentSelect.options[this.index]=this},beforeDestroy:function(){this.parentSelect&&(delete this.parentSelect.options[this.index],delete this.parentSelect.multipleOptions[this.index])}},e.exports=t.default},62:function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l=n(1),o=i(l),u=n(3),r=i(u);t.default={props:{name:String,id:String,required:Boolean,multiple:Boolean,value:[String,Number,Array],disabled:Boolean,placeholder:String,mdMenuClass:String},data:function(){return{selectedValue:null,selectedText:null,multipleText:null,multipleOptions:{},options:{},optionsAmount:0}},computed:{classes:function(){return{"md-disabled":this.disabled}},contentClasses:function(){return this.multiple?"md-multiple "+this.mdMenuClass:this.mdMenuClass}},watch:{value:function(e){this.setTextAndValue(e)}},methods:{getSingleValue:function(e){var t=this,n={};return Object.keys(this.options).forEach(function(i){var s=t.options[i];s.value===e&&(n.value=e,n.text=s.$refs.item.textContent)}),n},getMultipleValue:function(e){var t=this;if((0,r.default)(this.value)){var n=function(){var n=[];return e.forEach(function(e){Object.keys(t.options).forEach(function(i){var s=t.options[i];if(s.value===e){var l=s.$refs.item.textContent;t.multipleOptions[i]={value:e,text:l},n.push(l)}})}),{v:{value:e,text:n.join(", ")}}}();if("object"===("undefined"==typeof n?"undefined":s(n)))return n.v}return{}},setTextAndValue:function(e){var t=this.multiple?this.getMultipleValue(e):this.getSingleValue(e);this.selectedValue=t.value,this.selectedText=t.text,this.parentContainer&&this.$parent.setValue(t.text)},changeValue:function(e){this.$emit("input",e),this.$emit("change",e)},selectMultiple:function(e,t,n){var i=[];this.multipleOptions[e]={value:t,text:n};for(var s in this.multipleOptions)this.multipleOptions.hasOwnProperty(s)&&this.multipleOptions[s].value&&i.push(this.multipleOptions[s].value);this.changeValue(i)},selectOption:function(e,t){this.selectedText=t,this.changeValue(e)}},mounted:function(){this.parentContainer=(0,o.default)(this.$parent,"md-input-container"),this.setTextAndValue(this.value),this.parentContainer&&(this.parentContainer.setValue(this.value),this.parentContainer.hasSelect=!0)},beforeDestroy:function(){this.parentContainer&&(this.parentContainer.setValue(""),this.parentContainer.hasSelect=!1)}},e.exports=t.default},85:function(e,t){},116:function(e,t){e.exports=".THEME_NAME .md-select-content .md-menu-item.md-selected,.THEME_NAME .md-select-content .md-menu-item.md-checked,.THEME_NAME.md-select-content .md-menu-item.md-selected,.THEME_NAME.md-select-content .md-menu-item.md-checked{color:PRIMARY-COLOR}\n"},161:function(e,t,n){var i,s;i=n(61);var l=n(221);s=i=i||{},"object"!=typeof i.default&&"function"!=typeof i.default||(s=i=i.default),"function"==typeof s&&(s=s.options),s.render=l.render,s.staticRenderFns=l.staticRenderFns,e.exports=i},162:function(e,t,n){var i,s;n(85),i=n(62);var l=n(192);s=i=i||{},"object"!=typeof i.default&&"function"!=typeof i.default||(s=i=i.default),"function"==typeof s&&(s=s.options),s.render=l.render,s.staticRenderFns=l.staticRenderFns,e.exports=i},192:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return t("div",{staticClass:"md-select",class:e.classes},[t("md-menu",{attrs:{"md-close-on-select":!e.multiple}},[t("span",{ref:"value",staticClass:"md-select-value",attrs:{"md-menu-trigger":""}},[e._s(e.selectedText||e.multipleText||e.placeholder)])," ",t("md-menu-content",{staticClass:"md-select-content",class:e.contentClasses},[e._t("default")])])," ",t("select",{attrs:{name:e.name,id:e.id,required:e.required,tabindex:"-1"}},[t("option",{domProps:{value:e.value}},[e._s(e.value)])])])},staticRenderFns:[]}},221:function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return t("md-menu-item",{staticClass:"md-option",class:e.classes,attrs:{tabindex:"-1"},on:{click:e.selectOption}},[e.parentSelect.multiple?t("md-checkbox",{directives:[{name:"model",rawName:"v-model",value:e.check,expression:"check"}],staticClass:"md-primary",domProps:{value:e.check},on:{input:function(t){e.check=t}}},[t("span",{ref:"item"},[e._t("default")])]):t("span",{ref:"item"},[e._t("default")])," "])},staticRenderFns:[]}}})});