From 64a6385c9d4d1fb414d666ec3aa90ec8426c220d Mon Sep 17 00:00:00 2001 From: Razvan Stoenescu Date: Sat, 17 Sep 2016 11:35:37 +0300 Subject: [PATCH] chore: Final v0.7.0 build --- package.json | 1 + src/components/action-sheet/action-sheet.js | 3 +- src/components/modal/modal.js | 2 +- src/components/toast/toast.js | 1 - src/css-components/list/list.ios.styl | 39 ++++++++++++------- src/css-components/list/list.mat.styl | 39 ++++++++++++------- src/install.js | 2 +- src/themes/core/visibility.styl | 11 ++++++ .../collapsible/collapsible.ios.styl | 14 ------- .../collapsible/collapsible.mat.styl | 14 ------- .../context-menu/context-menu-desktop.vue | 4 +- .../datetime/mat-inline-datetime.vue | 2 +- src/vue-components/drawer/drawer.vue | 11 +++++- src/vue-components/grid/grid.ios.styl | 1 + src/vue-components/grid/grid.mat.styl | 1 + src/vue-components/grid/grid.vue | 2 - src/vue-components/knob/knob.vue | 4 +- src/vue-components/layout/layout.ios.styl | 5 +++ src/vue-components/layout/layout.mat.styl | 5 +++ .../pull-to-refresh/pull-to-refresh.vue | 12 ++++++ src/vue-components/select/dialog-select.vue | 3 +- src/vue-components/select/select.vue | 13 +------ src/vue-components/stepper/step.vue | 17 ++++---- src/vue-components/stepper/stepper.vue | 23 ++++++++--- src/vue-components/tab/tab.vue | 8 ++-- 25 files changed, 138 insertions(+), 99 deletions(-) diff --git a/package.json b/package.json index 4108a285594..8c39aec94be 100644 --- a/package.json +++ b/package.json @@ -100,6 +100,7 @@ "raw-loader": "^0.5.1", "roboto-fontface": "^0.6.0", "rollup": "^0.34.1", + "rollup-plugin-babel": "^2.6.1", "rollup-plugin-string": "^2.0.2", "rollup-plugin-vue": "^2.0.1", "stylint": "^1.5.6", diff --git a/src/components/action-sheet/action-sheet.js b/src/components/action-sheet/action-sheet.js index 7d6bdf49a24..efdcc780f33 100644 --- a/src/components/action-sheet/action-sheet.js +++ b/src/components/action-sheet/action-sheet.js @@ -58,7 +58,8 @@ export default { .set({ transitionIn: {translateY: [0, '101%']}, transitionOut: {translateY: ['101%', 0]}, - onBackButton: data.dismissButton.handler + onBackButton: data.dismissButton.handler, + onEscapeKey: data.dismissButton.handler }) modal.$el.classList.remove('items-center') diff --git a/src/components/modal/modal.js b/src/components/modal/modal.js index 523cc672663..771d03e08d7 100644 --- a/src/components/modal/modal.js +++ b/src/components/modal/modal.js @@ -94,7 +94,7 @@ class Modal { options = { duration, complete: () => { - EscapeKey.register(() => { this.close() }) + EscapeKey.register(() => { this.close(this.onEscapeKey) }) this.__onShowHandlers.forEach( handler => { handler() } ) diff --git a/src/components/toast/toast.js b/src/components/toast/toast.js index 0eed537a3c2..81a10b421a1 100644 --- a/src/components/toast/toast.js +++ b/src/components/toast/toast.js @@ -42,7 +42,6 @@ function create (opts, defaults) { } toast.create(opts) - return toast } types.forEach(type => { diff --git a/src/css-components/list/list.ios.styl b/src/css-components/list/list.ios.styl index f9299790186..b3e79b3546d 100644 --- a/src/css-components/list/list.ios.styl +++ b/src/css-components/list/list.ios.styl @@ -12,19 +12,6 @@ &.active, &.v-link-active background rgba(0, 0, 0, .2) - & + & - &.item-delimiter - border-top 1px solid rgb(224, 224, 224) - &.item-inset-delimiter - &:after - content '' - position absolute - top 0 - left 72px - right 0 - height 1px - background rgb(224, 224, 224) - &.item-link cursor pointer &:active @@ -191,6 +178,22 @@ .item-smaller font-size 14px +.item + .item, +.item + .quasar-collapsible, +.quasar-collapsible + .item, +.quasar-collapsible + .quasar-collapsible + &.item-delimiter + border-top 1px solid rgb(224, 224, 224) + &.item-inset-delimiter + &:after + content '' + position absolute + top 0 + left 72px + right 0 + height 1px + background rgb(224, 224, 224) + body.desktop .item.item-link:hover background rgba(0, 0, 0, .2) @@ -234,10 +237,16 @@ body.desktop .item.item-link:hover background-color rgba(0, 0, 0, .1) &.item-delimiter - .item + .item + .item + .item, + .item + .quasar-collapsible, + .quasar-collapsible + .item, + .quasar-collapsible + .quasar-collapsible border-top 1px solid rgb(224, 224, 224) &.item-inset-delimiter - .item + .item + .item + .item, + .item + .quasar-collapsible, + .quasar-collapsible + .item, + .quasar-collapsible + .quasar-collapsible &:after content '' position absolute diff --git a/src/css-components/list/list.mat.styl b/src/css-components/list/list.mat.styl index f9299790186..b3e79b3546d 100644 --- a/src/css-components/list/list.mat.styl +++ b/src/css-components/list/list.mat.styl @@ -12,19 +12,6 @@ &.active, &.v-link-active background rgba(0, 0, 0, .2) - & + & - &.item-delimiter - border-top 1px solid rgb(224, 224, 224) - &.item-inset-delimiter - &:after - content '' - position absolute - top 0 - left 72px - right 0 - height 1px - background rgb(224, 224, 224) - &.item-link cursor pointer &:active @@ -191,6 +178,22 @@ .item-smaller font-size 14px +.item + .item, +.item + .quasar-collapsible, +.quasar-collapsible + .item, +.quasar-collapsible + .quasar-collapsible + &.item-delimiter + border-top 1px solid rgb(224, 224, 224) + &.item-inset-delimiter + &:after + content '' + position absolute + top 0 + left 72px + right 0 + height 1px + background rgb(224, 224, 224) + body.desktop .item.item-link:hover background rgba(0, 0, 0, .2) @@ -234,10 +237,16 @@ body.desktop .item.item-link:hover background-color rgba(0, 0, 0, .1) &.item-delimiter - .item + .item + .item + .item, + .item + .quasar-collapsible, + .quasar-collapsible + .item, + .quasar-collapsible + .quasar-collapsible border-top 1px solid rgb(224, 224, 224) &.item-inset-delimiter - .item + .item + .item + .item, + .item + .quasar-collapsible, + .quasar-collapsible + .item, + .quasar-collapsible + .quasar-collapsible &:after content '' position absolute diff --git a/src/install.js b/src/install.js index feccc5c38b2..bcd04dc2362 100644 --- a/src/install.js +++ b/src/install.js @@ -83,7 +83,7 @@ function registerComponents (_Vue) { _Vue.component('quasar-collapsible', Collapsible) _Vue.component('quasar-context-menu', Platform.is.desktop ? ContextMenuDesktop : ContextMenuMobile) _Vue.component('quasar-inline-datetime', theme === 'ios' ? iOSInlineDatetime : MaterialInlineDatetime) - _Vue.component('quasar-datetime', Platform.is.desktop ? InputDatetimeDesktop : InputDatetimeMobile) + _Vue.component('quasar-datetime', Platform.is.desktop && !Platform.within.iframe ? InputDatetimeDesktop : InputDatetimeMobile) _Vue.component('quasar-drawer', Drawer) _Vue.component('quasar-drawer-link', DrawerLink) _Vue.component('quasar-fab', Fab) diff --git a/src/themes/core/visibility.styl b/src/themes/core/visibility.styl index cd0d22faf9b..b4601ef62f7 100644 --- a/src/themes/core/visibility.styl +++ b/src/themes/core/visibility.styl @@ -43,6 +43,17 @@ body .highlight-and-fade animation quasar-highlight 2s +@keyframes quasar-rotate + 0% + transform rotate(0) + 25% + transform rotate(90deg) + 50% + transform rotate(180deg) + 75% + transform rotate(270deg) + 100% + transform rotate(360deg) for type in desktop mobile cordova ios mat touch no-touch within-iframe body:not(.{type}) .{type}-only, diff --git a/src/vue-components/collapsible/collapsible.ios.styl b/src/vue-components/collapsible/collapsible.ios.styl index bcc2e9cacc7..00256156831 100644 --- a/src/vue-components/collapsible/collapsible.ios.styl +++ b/src/vue-components/collapsible/collapsible.ios.styl @@ -1,17 +1,3 @@ -.quasar-collapsible - & + & - &.item-delimiter - border-top 1px solid rgb(224, 224, 224) - &.item-inset-delimiter - &:after - content '' - position absolute - top 0 - left 72px - right 0 - height 1px - background rgb(224, 224, 224) - .quasar-collapsible-sub-item padding 8px 8px 8px 18px diff --git a/src/vue-components/collapsible/collapsible.mat.styl b/src/vue-components/collapsible/collapsible.mat.styl index bcc2e9cacc7..00256156831 100644 --- a/src/vue-components/collapsible/collapsible.mat.styl +++ b/src/vue-components/collapsible/collapsible.mat.styl @@ -1,17 +1,3 @@ -.quasar-collapsible - & + & - &.item-delimiter - border-top 1px solid rgb(224, 224, 224) - &.item-inset-delimiter - &:after - content '' - position absolute - top 0 - left 72px - right 0 - height 1px - background rgb(224, 224, 224) - .quasar-collapsible-sub-item padding 8px 8px 8px 18px diff --git a/src/vue-components/context-menu/context-menu-desktop.vue b/src/vue-components/context-menu/context-menu-desktop.vue index c292d649ffc..382bc0937a1 100644 --- a/src/vue-components/context-menu/context-menu-desktop.vue +++ b/src/vue-components/context-menu/context-menu-desktop.vue @@ -11,7 +11,7 @@ import Utils from '../../utils' export default { props: { - disabled: { + disable: { type: Boolean, default: false, coerce: Boolean @@ -32,7 +32,7 @@ export default { this.target = this.$el.parentNode this.handler = event => { - if (this.disabled) { + if (this.disable) { return } event.preventDefault() diff --git a/src/vue-components/datetime/mat-inline-datetime.vue b/src/vue-components/datetime/mat-inline-datetime.vue index 245329df49b..39c07ae3109 100644 --- a/src/vue-components/datetime/mat-inline-datetime.vue +++ b/src/vue-components/datetime/mat-inline-datetime.vue @@ -29,7 +29,7 @@
600) || + (typeof state === 'boolean' && this.opened === state) + ) { if (typeof done === 'function') { done() } @@ -316,6 +319,12 @@ export default { this.setState(false) } } + }, + open (done) { + this.setState(true, done) + }, + close (done) { + this.setState(false, done) } }, ready () { diff --git a/src/vue-components/grid/grid.ios.styl b/src/vue-components/grid/grid.ios.styl index fed42b6aa5b..ad2e760b7d8 100644 --- a/src/vue-components/grid/grid.ios.styl +++ b/src/vue-components/grid/grid.ios.styl @@ -26,6 +26,7 @@ tbody td display block + height auto !important text-align left !important width 100% !important padding 7px 10px diff --git a/src/vue-components/grid/grid.mat.styl b/src/vue-components/grid/grid.mat.styl index fed42b6aa5b..ad2e760b7d8 100644 --- a/src/vue-components/grid/grid.mat.styl +++ b/src/vue-components/grid/grid.mat.styl @@ -26,6 +26,7 @@ tbody td display block + height auto !important text-align left !important width 100% !important padding 7px 10px diff --git a/src/vue-components/grid/grid.vue b/src/vue-components/grid/grid.vue index 2d00576f7c7..f8519c49998 100644 --- a/src/vue-components/grid/grid.vue +++ b/src/vue-components/grid/grid.vue @@ -2,7 +2,6 @@ export default { props: { - title: String, columns: { type: Array, required: true diff --git a/src/vue-components/knob/knob.vue b/src/vue-components/knob/knob.vue index 8f93c357331..e1587f89841 100644 --- a/src/vue-components/knob/knob.vue +++ b/src/vue-components/knob/knob.vue @@ -35,7 +35,7 @@ class="quasar-knob-label row items-center justify-center content-center" :style="{color: color}" > - {{{ label || model }}} + {{{ placeholder || model }}}
@@ -83,7 +83,7 @@ export default { type: Number, default: 1 }, - label: String + placeholder: String }, computed: { svgStyle () { diff --git a/src/vue-components/layout/layout.ios.styl b/src/vue-components/layout/layout.ios.styl index fe756299252..028f899156c 100644 --- a/src/vue-components/layout/layout.ios.styl +++ b/src/vue-components/layout/layout.ios.styl @@ -30,6 +30,11 @@ $toolbar-title-font-size ?= 1.2rem .toolbar border-top $layout-border +body.desktop + .layout-header, .layout-footer + button:hover i + animation quasar-rotate .25s ease-out + .layout-content display flex flex 1 1 auto diff --git a/src/vue-components/layout/layout.mat.styl b/src/vue-components/layout/layout.mat.styl index e95633d113b..e2327690e61 100644 --- a/src/vue-components/layout/layout.mat.styl +++ b/src/vue-components/layout/layout.mat.styl @@ -31,6 +31,11 @@ $toolbar-title-font-size ?= 1.25rem order 10 box-shadow $layout-footer-shadow +body.desktop + .layout-header, .layout-footer + button:hover i + animation quasar-rotate .25s ease-out + .layout-content display flex flex 1 1 auto diff --git a/src/vue-components/pull-to-refresh/pull-to-refresh.vue b/src/vue-components/pull-to-refresh/pull-to-refresh.vue index 2ce3ed3fbbc..1fb3c4eaff3 100644 --- a/src/vue-components/pull-to-refresh/pull-to-refresh.vue +++ b/src/vue-components/pull-to-refresh/pull-to-refresh.vue @@ -56,6 +56,11 @@ export default { refreshIcon: { type: String, default: 'refresh' + }, + disable: { + type: Boolean, + default: false, + coerce: Boolean } }, data () { @@ -81,6 +86,13 @@ export default { if (this.animating) { return } + if (this.disable) { + this.scrolling = false + this.pulling = false + this.animating = false + this.state = 'pull' + return + } if (!this.pulling) { if (this.state === 'refreshing') { diff --git a/src/vue-components/select/dialog-select.vue b/src/vue-components/select/dialog-select.vue index 9e40cded9a6..2d5fa680b4f 100644 --- a/src/vue-components/select/dialog-select.vue +++ b/src/vue-components/select/dialog-select.vue @@ -17,7 +17,8 @@ let mapTypeConfig = { export default { props: { model: { - required: true + required: true, + twoWay: true }, options: { type: Array, diff --git a/src/vue-components/select/select.vue b/src/vue-components/select/select.vue index c1595cbeb52..076458bb718 100644 --- a/src/vue-components/select/select.vue +++ b/src/vue-components/select/select.vue @@ -56,6 +56,7 @@ export default { }, props: { model: { + required: true, twoWay: true }, options: { @@ -74,18 +75,6 @@ export default { return ['radio', 'checkbox', 'toggle'].includes(value) } }, - classes: { - type: Array, - default () { - return ['primary', 'clear'] - }, - coerce (value) { - if (typeof value === 'string') { - return value.split(' ') - } - return value - } - }, placeholder: String, disable: { type: Boolean, diff --git a/src/vue-components/stepper/step.vue b/src/vue-components/stepper/step.vue index 8d15b54a4c1..c4657b1bdee 100644 --- a/src/vue-components/stepper/step.vue +++ b/src/vue-components/stepper/step.vue @@ -60,30 +60,33 @@ export default { }, watch: { visible () { - this.notify('reset') + this.__notify('reset') }, disabled () { - this.notify('reset') + this.__notify('reset') } }, methods: { nextStep () { if (this.ready) { - this.notify('nextStep') + this.__notify('nextStep') } }, previousStep () { - this.notify('previousStep') + this.__notify('previousStep') }, - notify (event) { + finish () { + this.__notify('finish') + }, + __notify (event) { this.$dispatch('stepper::' + event) } }, ready () { - this.notify('reset') + this.__notify('reset') }, destroyed () { - this.notify('reset') + this.__notify('reset') } } diff --git a/src/vue-components/stepper/stepper.vue b/src/vue-components/stepper/stepper.vue index 126cf2169ee..fb92434a6e0 100644 --- a/src/vue-components/stepper/stepper.vue +++ b/src/vue-components/stepper/stepper.vue @@ -13,13 +13,13 @@ export default { this.redraw() }, 'stepper::nextStep' () { - this.config.currentStep++ - if (this.config.currentStep > this.config.steps) { - this.$emit('finish') - } + this.nextStep() }, 'stepper::previousStep' () { - this.config.currentStep-- + this.previousStep() + }, + 'stepper::finish' () { + this.finish() } }, data () { @@ -35,6 +35,19 @@ export default { this.redraw() this.config.currentStep = 1 }, + nextStep () { + this.config.currentStep++ + if (this.config.currentStep > this.config.steps) { + this.$emit('finish') + } + }, + previousStep () { + this.config.currentStep-- + }, + finish () { + this.config.currentStep = this.config.steps + 1 + this.$emit('finish') + }, redraw () { let step = 1 diff --git a/src/vue-components/tab/tab.vue b/src/vue-components/tab/tab.vue index d573d29c0ee..6625a6037e7 100644 --- a/src/vue-components/tab/tab.vue +++ b/src/vue-components/tab/tab.vue @@ -1,7 +1,7 @@