diff --git a/index.styl b/index.styl index 4ef625e..be40922 100644 --- a/index.styl +++ b/index.styl @@ -15,6 +15,8 @@ // @import './src/core/d-core-submenu/index.styl' @import './src/core/d-core-toolbar/index.styl' +@import './src/paper/d-paper-ripple/index.styl' +@import './src/paper/d-paper-shadow/index.styl' @import './src/paper/d-paper-button/index.styl' @import './src/paper/d-paper-checkbox/index.styl' @import './src/paper/d-paper-dialog/index.styl' @@ -26,8 +28,6 @@ @import './src/paper/d-paper-progress/index.styl' @import './src/paper/d-paper-radio-button/index.styl' @import './src/paper/d-paper-radio-group/index.styl' -@import './src/paper/d-paper-ripple/index.styl' -@import './src/paper/d-paper-shadow/index.styl' @import './src/paper/d-paper-slider/index.styl' @import './src/paper/d-paper-tab/index.styl' @import './src/paper/d-paper-tabs/index.styl' diff --git a/src/paper/d-paper-button/index.html b/src/paper/d-paper-button/index.html index 3ce577f..a2c518d 100755 --- a/src/paper/d-paper-button/index.html +++ b/src/paper/d-paper-button/index.html @@ -38,7 +38,7 @@ --> -
+
{{if raised}}
diff --git a/src/paper/d-paper-button/index.js b/src/paper/d-paper-button/index.js index e4d7748..6f12ab2 100644 --- a/src/paper/d-paper-button/index.js +++ b/src/paper/d-paper-button/index.js @@ -168,18 +168,7 @@ PaperButton.prototype.downAction = function(event) { } else { this.model.set('active', true); } -} - -// Pulling up the context menu for an item should focus it; but we need to -// be careful about how we deal with down/up events surrounding context -// menus. The up event typically does not fire until the context menu -// closes: so we focus immediately. -// -// This fires _after_ downAction. -PaperButton.prototype.contextMenuAction = function(e) { - // Note that upAction may fire _again_ on the actual up event. - this.upAction(e); - this.focusAction(); + this.emit('mousedown', event); } PaperButton.prototype.upAction = function() { @@ -188,6 +177,7 @@ PaperButton.prototype.upAction = function() { if (!this.model.get('isToggle')) { this.model.set('active', false); } + this.emit('mouseup', event); } PaperButton.prototype.focusAction = function() { @@ -201,3 +191,21 @@ PaperButton.prototype.focusAction = function() { PaperButton.prototype.blurAction = function() { this.model.set('focused', false); } +PaperButton.prototype.clickAction = function(event) { + this.emit('click', event); +} +PaperButton.prototype.dblClickAction = function(event) { + this.emit('dblclick', event); +} + +// Pulling up the context menu for an item should focus it; but we need to +// be careful about how we deal with down/up events surrounding context +// menus. The up event typically does not fire until the context menu +// closes: so we focus immediately. +// +// This fires _after_ downAction. +PaperButton.prototype.contextMenuAction = function(e) { + // Note that upAction may fire _again_ on the actual up event. + this.upAction(e); + this.focusAction(); +} diff --git a/src/paper/d-paper-radio-button/index.styl b/src/paper/d-paper-radio-button/index.styl index 7d1bced..ba0bd16 100755 --- a/src/paper/d-paper-radio-button/index.styl +++ b/src/paper/d-paper-radio-button/index.styl @@ -6,27 +6,18 @@ /* disabled state */ &.disabled pointer-events none - - &.disabled .off-radio border-color #eaeaea !important - - &.disabled .on-radio background-color #eaeaea !important - .radio-container position relative width 16px height 16px cursor pointer - - .radio-container.labeled display inline-block vertical-align middle - - .d-paper-ripple position absolute top -17px @@ -34,12 +25,8 @@ width 50px height 50px color #5a5a5a - - .d-paper-ripple.checked color #0f9d58 - - .off-radio position absolute top 0px @@ -49,8 +36,6 @@ border-radius 50% border solid 2px border-color #5a5a5a - - .on-radio position absolute top 0 @@ -63,13 +48,9 @@ transform scale(0) transition -webkit-transform ease 0.28s transition transform ease 0.28s - - .on-radio.fill -webkit-transform scale(1.1) transform scale(1.1) - - .radio-label position relative display inline-block @@ -77,8 +58,6 @@ margin-left 10px white-space normal pointer-events none - - .radio-label.hidden display none diff --git a/src/paper/d-paper-ripple/index.styl b/src/paper/d-paper-ripple/index.styl index 59fc39e..8a370ce 100644 --- a/src/paper/d-paper-ripple/index.styl +++ b/src/paper/d-paper-ripple/index.styl @@ -4,7 +4,7 @@ width 100% height 100% overflow hidden - .canvas + & .canvas pointer-events none position absolute top 0