Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@polymer/paper-toast

Package Overview
Dependencies
Maintainers
9
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polymer/paper-toast - npm Package Compare versions

Comparing version 3.0.0-pre.21 to 3.0.0-pre.22

paper-toast.d.ts

32

package.json

@@ -16,32 +16,24 @@ {

"devDependencies": {
"@polymer/gen-typescript-declarations": "^1.2.2",
"bower": "^1.8.0",
"webmat": "^0.2.0",
"@polymer/iron-component-page": "^3.0.0-pre.21",
"@polymer/iron-demo-helpers": "^3.0.0-pre.21",
"@polymer/paper-button": "^3.0.0-pre.21",
"@polymer/test-fixture": "^3.0.0-pre.21",
"@polymer/iron-demo-helpers": "^3.0.0-pre.20",
"@polymer/paper-button": "^3.0.0-pre.20",
"@polymer/test-fixture": "^3.0.0-pre.20",
"wct-browser-legacy": "^1.0.1",
"@webcomponents/webcomponentsjs": "^2.0.0"
"@webcomponents/webcomponentsjs": "^2.0.0",
"@polymer/gen-typescript-declarations": "^1.5.0"
},
"scripts": {
"update-types": "bower install && gen-typescript-declarations --deleteExisting --outDir .",
"format": "webmat && npm run update-types"
"format": "webmat",
"generate-types": "gen-typescript-declarations --deleteExisting --outDir .",
"prepack": "npm run generate-types"
},
"version": "3.0.0-pre.21",
"resolutions": {
"inherits": "2.0.3",
"samsam": "1.1.3",
"supports-color": "3.1.2",
"type-detect": "1.0.0",
"@webcomponents/webcomponentsjs": "2.0.0-beta.2"
},
"version": "3.0.0-pre.22",
"main": "paper-toast.js",
"author": "The Polymer Authors",
"dependencies": {
"@polymer/iron-a11y-announcer": "^3.0.0-pre.21",
"@polymer/iron-overlay-behavior": "^3.0.0-pre.21",
"@polymer/iron-fit-behavior": "^3.0.0-pre.21",
"@polymer/iron-a11y-announcer": "^3.0.0-pre.20",
"@polymer/iron-overlay-behavior": "^3.0.0-pre.20",
"@polymer/iron-fit-behavior": "^3.0.0-pre.20",
"@polymer/polymer": "^3.0.0"
}
}
/**
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
import {IronA11yAnnouncer} from '@polymer/iron-a11y-announcer/iron-a11y-announcer.js';
import {IronOverlayBehavior, IronOverlayBehaviorImpl} from '@polymer/iron-overlay-behavior/iron-overlay-behavior.js';
import {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
import {Base} from '@polymer/polymer/polymer-legacy.js';
// Keeps track of the toast currently opened.
var currentToast = null;
/**
Material design: [Snackbars & toasts](https://www.google.com/design/spec/components/snackbars-toasts.html)
Material design: [Snackbars &
toasts](https://www.google.com/design/spec/components/snackbars-toasts.html)

@@ -35,3 +46,4 @@ `paper-toast` provides a subtle notification toast. Only one `paper-toast` will

Set `duration` to 0, a negative number or Infinity to persist the toast on screen:
Set `duration` to 0, a negative number or Infinity to persist the toast on
screen:

@@ -53,4 +65,5 @@ Example:

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`.
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`.

@@ -62,17 +75,2 @@ @group Paper Elements

*/
/*
FIXME(polymer-modulizer): the above comments were extracted
from HTML and may be out of place here. Review them and
then delete this comment!
*/
import { Base } from '@polymer/polymer/polymer-legacy.js';
import { IronA11yAnnouncer } from '@polymer/iron-a11y-announcer/iron-a11y-announcer.js';
import { IronOverlayBehavior, IronOverlayBehaviorImpl } from '@polymer/iron-overlay-behavior/iron-overlay-behavior.js';
import { Polymer } from '@polymer/polymer/lib/legacy/polymer-fn.js';
import { html } from '@polymer/polymer/lib/utils/html-tag.js';
// Keeps track of the toast currently opened.
var currentToast = null;
Polymer({

@@ -79,0 +77,0 @@ _template: html`

@@ -0,8 +1,6 @@

[![Published on NPM](https://img.shields.io/npm/v/@polymer/paper-toast.svg)](https://www.npmjs.com/package/@polymer/paper-toast)
[![Build status](https://travis-ci.org/PolymerElements/paper-toast.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-toast)
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/PolymerElements/paper-toast)
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://webcomponents.org/element/@polymer/paper-toast)
## <paper-toast>
Material design: [Snackbars & toasts](https://www.google.com/design/spec/components/snackbars-toasts.html)
`paper-toast` provides a subtle notification toast. Only one `paper-toast` will

@@ -67,2 +65,61 @@ be visible on screen.

See: [Documentation](https://www.webcomponents.org/element/@polymer/paper-toast),
[Demo](https://www.webcomponents.org/element/@polymer/paper-toast/demo/demo/index.html).
## Usage
### Installation
```
npm install --save @polymer/paper-toast
```
### In an html file
```html
<html>
<head>
<script type="module">
import '@polymer/paper-toast/paper-toast.js';
</script>
</head>
<body>
<paper-toast text="Hello world!" opened></paper-toast>
</body>
</html>
```
### In a Polymer 3 element
```js
import {PolymerElement, html} from '@polymer/polymer';
import '@polymer/paper-toast/paper-toast.js';
class SampleElement extends PolymerElement {
static get template() {
return html`
<paper-toast text="Hello world!" opened></paper-toast>
`;
}
}
customElements.define('sample-element', SampleElement);
```
## Contributing
If you want to send a PR to this element, here are
the instructions for running the tests and demo locally:
### Installation
```sh
git clone https://github.com/PolymerElements/paper-toast
cd paper-toast
npm install
npm install -g polymer-cli
```
### Running the demo locally
```sh
polymer serve --npm
open http://127.0.0.1:<port>/demo/
```
### Running the tests
```sh
polymer test --npm
```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc