From d004e0cb411e893857079fba9b6084a2e6b918d9 Mon Sep 17 00:00:00 2001 From: Luigi Serra Date: Wed, 23 Mar 2016 11:02:21 +0100 Subject: [PATCH] paper-toast --- bower.json | 3 ++- bower_components/paper-toast/.bower.json | 53 ++++++----------------------------------------------- bower_components/paper-toast/.gitignore | 2 +- bower_components/paper-toast/README.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---- bower_components/paper-toast/bower.json | 62 ++++++++++++++++++++++++++++++++++---------------------------- bower_components/paper-toast/demo/index.html | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------- bower_components/paper-toast/hero.svg | 23 ----------------------- bower_components/paper-toast/index.html | 52 ++++++++++++++++++++++++++-------------------------- bower_components/paper-toast/paper-toast.html | 479 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------------------------------------------------------------------------------------------- bower_components/paper-toast/test/basic.html | 10 ++++++++++ 10 files changed, 562 insertions(+), 350 deletions(-) diff --git a/bower.json b/bower.json index 030f66b..02d083c 100755 --- a/bower.json +++ b/bower.json @@ -18,6 +18,7 @@ "paper-fab-transitions": "~0.1.0", "paper-scroll-header-panel": "PolymerElements/paper-scroll-header-panel#~1.0.14", "iron-icon": "PolymerElements/iron-icon#~1.0.7", - "iron-icons": "PolymerElements/iron-icons#~1.1.2" + "iron-icons": "PolymerElements/iron-icons#~1.1.2", + "paper-toast": "PolymerElements/paper-toast#~1.2.1" } } diff --git a/bower_components/paper-toast/.bower.json b/bower_components/paper-toast/.bower.json index 2abc869..07806e0 100755 --- a/bower_components/paper-toast/.bower.json +++ b/bower_components/paper-toast/.bower.json @@ -1,7 +1,6 @@ -<<<<<<< HEAD { "name": "paper-toast", - "version": "1.2.0", + "version": "1.2.1", "description": "A material design notification toast", "private": true, "license": "http://polymer.github.io/LICENSE.txt", @@ -33,53 +32,13 @@ }, "ignore": [], "homepage": "https://github.com/PolymerElements/paper-toast", - "_release": "1.2.0", + "_release": "1.2.1", "_resolution": { "type": "version", - "tag": "v1.2.0", - "commit": "b365f5b9709757c02bd6a2b113f6df1a76f94a77" + "tag": "v1.2.1", + "commit": "c1ff94b116dcd95444b57e55020543658fc77de1" }, "_source": "git://github.com/PolymerElements/paper-toast.git", - "_target": "~1.2.0", - "_originalSource": "PolymerElements/paper-toast", - "_direct": true -======= -{ - "name": "paper-toast", - "version": "1.0.0", - "description": "A material design notification toast", - "private": true, - "license": "http://polymer.github.io/LICENSE.txt", - "authors": [ - "The Polymer Authors" - ], - "keywords": [ - "web-components", - "polymer", - "toast", - "notification" - ], - "main": "paper-toast.html", - "dependencies": { - "paper-styles": "PolymerElements/paper-styles#^1.0.0", - "polymer": "Polymer/polymer#^1.0.0", - "iron-a11y-announcer": "polymerelements/iron-a11y-announcer#^1.0.0" - }, - "devDependencies": { - "iron-component-page": "polymerelements/iron-component-page#^1.0.0", - "paper-button": "polymerelements/paper-button#^1.0.0", - "web-component-tester": "*", - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" - }, - "homepage": "https://github.com/PolymerElements/paper-toast", - "_release": "1.0.0", - "_resolution": { - "type": "version", - "tag": "v1.0.0", - "commit": "71e6c327f7aafe9c71010c83d4c4571f63990072" - }, - "_source": "git://github.com/PolymerElements/paper-toast.git", - "_target": "^1.0.0", - "_originalSource": "PolymerElements/paper-toast" ->>>>>>> 8de1b08de87fafc78c8aa175c27a1aa837631903 + "_target": "^1.0.0", + "_originalSource": "PolymerElements/paper-toast" } \ No newline at end of file diff --git a/bower_components/paper-toast/.gitignore b/bower_components/paper-toast/.gitignore index 0a2e3ba..8d4ae25 100755 --- a/bower_components/paper-toast/.gitignore +++ b/bower_components/paper-toast/.gitignore @@ -1 +1 @@ -bower_components +bower_components diff --git a/bower_components/paper-toast/README.md b/bower_components/paper-toast/README.md index efa30cc..1a639d1 100755 --- a/bower_components/paper-toast/README.md +++ b/bower_components/paper-toast/README.md @@ -1,4 +1,72 @@ -paper-toast -============ - -A material design notification toast. + + + +[![Build status](https://travis-ci.org/PolymerElements/paper-toast.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-toast) + +_[Demo and API docs](https://elements.polymer-project.org/elements/paper-toast)_ + + +##<paper-toast> + +Material design: [Snackbards & toasts](https://www.google.com/design/spec/components/snackbars-toasts.html) + +`paper-toast` provides a subtle notification toast. Only one `paper-toast` will +be visible on screen. + +Use `opened` to show the toast: + +Example: + +```html + +``` + +Also `open()` or `show()` can be used to show the toast: + +Example: + +```html +Open Toast + + +... + +openToast: function() { + this.$.toast.open(); +} +``` + +Set `duration` to 0, a negative number or Infinity to persist the toast on screen: + +Example: + +```html + + Show more + +``` + +### Styling + +The following custom properties and mixins are available for styling: + +| Custom property | Description | Default | +| --- | --- | --- | +| `--paper-toast-background-color` | The paper-toast background-color | `#323232` | +| `--paper-toast-color` | The paper-toast color | `#f1f1f1` | + +This element applies the mixin `--paper-font-common-base` but does not import `paper-styles/typography.html`. +In order to apply the `Roboto` font to this element, make sure you've imported `paper-styles/typography.html`. + + diff --git a/bower_components/paper-toast/bower.json b/bower_components/paper-toast/bower.json index 7e557c2..3b30e00 100755 --- a/bower_components/paper-toast/bower.json +++ b/bower_components/paper-toast/bower.json @@ -1,28 +1,34 @@ -{ - "name": "paper-toast", - "version": "1.0.0", - "description": "A material design notification toast", - "private": true, - "license": "http://polymer.github.io/LICENSE.txt", - "authors": [ - "The Polymer Authors" - ], - "keywords": [ - "web-components", - "polymer", - "toast", - "notification" - ], - "main": "paper-toast.html", - "dependencies": { - "paper-styles": "PolymerElements/paper-styles#^1.0.0", - "polymer": "Polymer/polymer#^1.0.0", - "iron-a11y-announcer": "polymerelements/iron-a11y-announcer#^1.0.0" - }, - "devDependencies": { - "iron-component-page": "polymerelements/iron-component-page#^1.0.0", - "paper-button": "polymerelements/paper-button#^1.0.0", - "web-component-tester": "*", - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" - } -} +{ + "name": "paper-toast", + "version": "1.2.1", + "description": "A material design notification toast", + "private": true, + "license": "http://polymer.github.io/LICENSE.txt", + "authors": [ + "The Polymer Authors" + ], + "keywords": [ + "web-components", + "polymer", + "toast", + "notification" + ], + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-toast.git" + }, + "main": "paper-toast.html", + "dependencies": { + "iron-a11y-announcer": "PolymerElements/iron-a11y-announcer#^1.0.0", + "iron-overlay-behavior": "PolymerElements/iron-overlay-behavior#^1.0.9", + "polymer": "Polymer/polymer#^1.1.0" + }, + "devDependencies": { + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", + "paper-button": "PolymerElements/paper-button#^1.0.0", + "web-component-tester": "^4.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + }, + "ignore": [] +} diff --git a/bower_components/paper-toast/demo/index.html b/bower_components/paper-toast/demo/index.html index 846e4a6..1263883 100755 --- a/bower_components/paper-toast/demo/index.html +++ b/bower_components/paper-toast/demo/index.html @@ -1,56 +1,96 @@ - - - - - paper-toast - - - - - - - - - - - - - - - - Discard Draft - - Get Messages - - - - - Retry - - - - + + + + + + paper-toast + + + + + + + + + + + + + + + + + +

Toast auto-closes after 3 seconds. Only one toast per time will be visible

+ + + + +

Toast does not auto-close when duration is negative, 0, or Infinity

+ + + + +

Toast can be styled

+ + + + +

Toast can fit into any element

+ + + + + + diff --git a/bower_components/paper-toast/hero.svg b/bower_components/paper-toast/hero.svg index fb86755..c82a707 100755 --- a/bower_components/paper-toast/hero.svg +++ b/bower_components/paper-toast/hero.svg @@ -1,25 +1,3 @@ -<<<<<<< HEAD - - - - - - - - - - - - - - - - - - - -======= @@ -40,4 +18,3 @@ ->>>>>>> 8de1b08de87fafc78c8aa175c27a1aa837631903 diff --git a/bower_components/paper-toast/index.html b/bower_components/paper-toast/index.html index f6fa4cf..487bb5c 100755 --- a/bower_components/paper-toast/index.html +++ b/bower_components/paper-toast/index.html @@ -1,26 +1,26 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/bower_components/paper-toast/paper-toast.html b/bower_components/paper-toast/paper-toast.html index 55db9ec..adac5f1 100755 --- a/bower_components/paper-toast/paper-toast.html +++ b/bower_components/paper-toast/paper-toast.html @@ -1,164 +1,315 @@ - - - - - - - - - - - - + + + + + + + + + + + + + diff --git a/bower_components/paper-toast/test/basic.html b/bower_components/paper-toast/test/basic.html index 38d3ce1..e95556d 100644 --- a/bower_components/paper-toast/test/basic.html +++ b/bower_components/paper-toast/test/basic.html @@ -95,6 +95,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }); }); + test('toast does not get focused', function(done) { + toast = fixture('show'); + var spy = sinon.spy(toast, 'focus'); + assert.isTrue(toast.noAutoFocus, 'no-auto-focus is true'); + toast.addEventListener('iron-overlay-opened', function() { + assert.isFalse(spy.called, 'toast is not focused'); + done(); + }); + }); + test('toast fires closed event', function(done) { toast = fixture('basic'); toast.show({duration: 350}); -- libgit2 0.21.4