@polymer/paper-ripple
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "@polymer/paper-ripple", | ||
"version": "0.0.3", | ||
"flat": true, | ||
"version": "0.0.4", | ||
"description": "Adds a material design ripple to any container", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/PolymerElements/paper-ripple.git" | ||
}, | ||
"contributors": [ | ||
"The Polymer Authors" | ||
], | ||
"keywords": [ | ||
@@ -14,20 +14,13 @@ "web-components", | ||
], | ||
"contributors": [ | ||
"The Polymer Authors" | ||
], | ||
"license": "BSD-3-Clause", | ||
"main": "paper-ripple.html", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/PolymerElements/paper-ripple.git" | ||
}, | ||
"license": "SEE LICENSE IN http://polymer.github.io/LICENSE.txt", | ||
"dependencies": { | ||
"@polymer/polymer": "^1.2.5-npm-test.2", | ||
"@polymer/iron-a11y-keys-behavior": "^0.0.3" | ||
"@polymer/iron-a11y-keys-behavior": "gloo", | ||
"@polymer/polymer": "gloo" | ||
}, | ||
"devDependencies": { | ||
"@polymer/iron-component-page": "^0.0.3", | ||
"@polymer/iron-icon": "^0.0.3", | ||
"@polymer/iron-icons": "^0.0.3", | ||
"@polymer/paper-styles": "^0.0.3", | ||
"@polymer/test-fixture": "^0.0.3", | ||
"web-component-tester": "^4.0.0", | ||
"webcomponents.js": "^0.7.0", | ||
"@polymer/iron-test-helpers": "^0.0.3" | ||
} | ||
} | ||
"devDependencies": {} | ||
} |
@@ -0,20 +1,3 @@ | ||
[![Build status](https://travis-ci.org/PolymerElements/paper-ripple.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-ripple) | ||
<!--- | ||
This README is automatically generated from the comments in these files: | ||
paper-ripple.html | ||
Edit those files, and our readme bot will duplicate them over here! | ||
Edit this file, and the bot will squash your changes :) | ||
The bot does some handling of markdown. Please file a bug if it does the wrong | ||
thing! https://github.com/PolymerLabs/tedium/issues | ||
--> | ||
[![Build Status](https://travis-ci.org/PolymerElements/paper-ripple.svg?branch=master)](https://travis-ci.org/PolymerElements/paper-ripple) | ||
_[Demo and API Docs](https://elements.polymer-project.org/elements/paper-ripple)_ | ||
##<paper-ripple> | ||
@@ -28,64 +11,31 @@ | ||
Example: | ||
```html | ||
<div style="position:relative"> | ||
<paper-ripple></paper-ripple> | ||
</div> | ||
<!--- | ||
``` | ||
Note, it's important that the parent container of the ripple be relative position, otherwise | ||
the ripple will emanate outside of the desired container. | ||
`paper-ripple` listens to "mousedown" and "mouseup" events so it would display ripple | ||
effect when touches on it. You can also defeat the default behavior and | ||
manually route the down and up actions to the ripple element. Note that it is | ||
important if you call `downAction()` you will have to make sure to call | ||
`upAction()` so that `paper-ripple` would end the animation loop. | ||
Example: | ||
```html | ||
<paper-ripple id="ripple" style="pointer-events: none;"></paper-ripple> | ||
... | ||
downAction: function(e) { | ||
this.$.ripple.downAction({detail: {x: e.x, y: e.y}}); | ||
}, | ||
upAction: function(e) { | ||
this.$.ripple.upAction(); | ||
} | ||
<custom-element-demo> | ||
<template> | ||
<script src="../webcomponentsjs/webcomponents-lite.js"></script> | ||
<link rel="import" href="paper-ripple.html"> | ||
<style is="custom-style"> | ||
div { | ||
height: 100px; | ||
width: 100%; | ||
box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24); | ||
} | ||
paper-ripple { | ||
color: #4285f4; | ||
} | ||
</style> | ||
<next-code-block></next-code-block> | ||
</template> | ||
</custom-element-demo> | ||
``` | ||
Styling ripple effect: | ||
Use CSS color property to style the ripple: | ||
```css | ||
paper-ripple { | ||
color: #4285f4; | ||
} | ||
``` | ||
Note that CSS color property is inherited so it is not required to set it on | ||
the `paper-ripple` element directly. | ||
By default, the ripple is centered on the point of contact. Apply the `recenters` | ||
attribute to have the ripple grow toward the center of its container. | ||
--> | ||
```html | ||
<paper-ripple recenters></paper-ripple> | ||
<div style="position: relative"> | ||
<paper-ripple></paper-ripple> | ||
</div | ||
``` | ||
You can also center the ripple inside its container from the start. | ||
```html | ||
<paper-ripple center></paper-ripple> | ||
``` | ||
Apply `circle` class to make the rippling effect within a circle. | ||
```html | ||
<paper-ripple class="circle"></paper-ripple> | ||
``` | ||
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
0
22298
3
1
1
0
41
1
+ Added@polymer/polymer@1.7.1-npm-test.4(transitive)
- Removed@polymer/iron-a11y-keys-behavior@0.0.3(transitive)
- Removed@polymer/polymer@1.2.5-npm-test.2(transitive)
Updated@polymer/polymer@gloo