Skip to content

Commit

Permalink
merge with dev
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Mar 14, 2017
2 parents 57d4f71 + 320d76b commit 71ca46b
Show file tree
Hide file tree
Showing 100 changed files with 8,852 additions and 5,521 deletions.
8,381 changes: 4,624 additions & 3,757 deletions dist/vuetify.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vuetify.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vuetify.min.css

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dist/vuetify.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vuetify",
"version": "0.8.10",
"version": "0.9.0",
"author": {
"name": "John Leider",
"email": "[email protected]"
Expand Down
12 changes: 11 additions & 1 deletion src/components/_index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Alerts from './alerts/index'
import App from './app/index'
import Avatars from './avatars/index'
import Breadcrumbs from './breadcrumbs/index'
import Buttons from './buttons/index'
import Cards from './cards/index'
Expand All @@ -20,13 +21,18 @@ import Pagination from './pagination/index'
import Parallax from './parallax/index'
import Progress from './progress/index'
import Sidebar from './sidebar/index'
import Slider from './sliders/index'
import Subheader from './subheaders/index'
import Stepper from './steppers/index'
import Tables from './tables/index'
import Tabs from './tabs/index'
import Transitions from './transitions/_index'
import Snackbar from './snackbars/index'

export default Object.assign({},
Alerts,
App,
Avatars,
Breadcrumbs,
Buttons,
Cards,
Expand All @@ -47,7 +53,11 @@ export default Object.assign({},
Parallax,
Progress,
Sidebar,
Slider,
Subheader,
Stepper,
Tables,
Tabs,
Transitions
Transitions,
Snackbar
)
16 changes: 16 additions & 0 deletions src/components/avatars/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const Avatar = {
functional: true,

render (h, context) {
const children = context.children
const data = {
'class': `avatar ${context.data.staticClass || ''}`
}

return h('div', data, children)
}
}

export default {
Avatar
}
112 changes: 112 additions & 0 deletions src/components/buttons/Button.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
import Contextualable from '../../mixins/contextualable'
import GenerateRouteLink from '../../mixins/route-link'

export default {
name: 'button',

mixins: [Contextualable, GenerateRouteLink],

data () {
return {
activeClass: 'btn--active'
}
},

props: {
block: Boolean,
dark: Boolean,
default: Boolean,
flat: Boolean,
floating: Boolean,
icon: Boolean,
large: Boolean,
light: Boolean,
loading: Boolean,
outline: Boolean,
progress: Boolean,
raised: {
type: Boolean,
default: true
},
ripple: {
type: [Boolean, Object],
default: true
},
round: Boolean,
small: Boolean,
type: {
type: String,
default: 'button'
}
},

computed: {
classes () {
return {
'btn': true,
'btn--block': this.block,
'btn--dark': this.dark,
'btn--default': this.default,
'btn--disabled': this.disabled,
'btn--flat': this.flat,
'btn--floating': this.floating,
'btn--icon': this.icon,
'btn--large': this.large,
'btn--light': this.light && !this.dark,
'btn--loader': this.loading,
'btn--outline': this.outline,
'btn--raised': this.raised,
'btn--round': this.round,
'btn--small': this.small,
'primary': this.primary && !this.outline,
'secondary': this.secondary && !this.outline,
'success': this.success && !this.outline,
'info': this.info && !this.outline,
'warning': this.warning && !this.outline,
'error': this.error && !this.outline,
'primary--text': this.primary && this.outline,
'secondary--text': this.secondary && this.outline,
'success--text': this.success && this.outline,
'info--text': this.info && this.outline,
'warning--text': this.warning && this.outline,
'error--text': this.error && this.outline
}
}
},

methods: {
genContent (h) {
return h('span', { 'class': 'btn__content' }, [this.$slots.default])
},
genLoader (h) {
const children = []

if (!this.$slots.loader) {
children.push(h('v-progress-circular', {
props: {
indeterminate: true,
size: 26
}
}))
} else {
children.push(this.$slots.loader)
}

return h('span', { 'class': 'btn__loading' }, children)
}
},

render (h) {
const { tag, data } = this.generateRouteLink()
const children = []
data.type = this.type

children.push(this.genContent(h))

if (this.loading) {
children.push(this.genLoader(h))
}

return h(tag, data, children)
}
}
91 changes: 0 additions & 91 deletions src/components/buttons/Button.vue

This file was deleted.

Loading

0 comments on commit 71ca46b

Please sign in to comment.