merge from dev
This commit is contained in:
parent
8436c7ff3c
commit
db793b9d25
46 changed files with 646 additions and 356 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-material",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"description": "A material design container that looks like a lifted sheet of paper",
|
||||
"private": true,
|
||||
"authors": [
|
||||
|
@ -27,15 +27,16 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
|
||||
"web-component-tester": "polymer/web-component-tester#^3.4.0",
|
||||
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
|
||||
"web-component-tester": "^4.0.0",
|
||||
"test-fixture": "polymerelements/test-fixture#^1.0.0",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0"
|
||||
},
|
||||
"_release": "1.0.5",
|
||||
"_release": "1.0.6",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.5",
|
||||
"commit": "8a906004d8d0071004aafcd4bc4536ed2cf14bde"
|
||||
"tag": "v1.0.6",
|
||||
"commit": "6aef0896fcbc25f9f5bd1dd55f7679e6ab7f92ad"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/paper-material.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,22 +1,25 @@
|
|||
language: node_js
|
||||
sudo: false
|
||||
before_script:
|
||||
- npm install web-component-tester
|
||||
- npm install bower
|
||||
- 'export PATH=$PWD/node_modules/.bin:$PATH'
|
||||
- npm install -g bower polylint web-component-tester
|
||||
- bower install
|
||||
- polylint
|
||||
env:
|
||||
global:
|
||||
- secure: PEaqY+YpV0ZhnQbJlNQbmfIFLqy7UvvCtii0sPoGKT5/P7ulMqMOPQV9l/zLAtYi14HEz63FKLqDrpnGaVe7Cz7jtt2WRWrWqTBdarqwSHs73Z2XqztD1+2wW6vgz/lfK00B8UplAk28B7d5dbWzwUF6Kg02zOfQMsawMpulFjo=
|
||||
- secure: f/3XYrYjM8aXLe9kqM/MjHQ6IEsDRuoxDqM+l2JiR3v2Nw7lP6ZyXSNvKm8bN+VNU7ubSzAmRbUGnRU7e61BhnGzuLXjOqxYeJLWZaqoSm9TDz3re3rd7wB2ddAhRokeSSPO2KeAgr6C02P9M3Au1DiO1G66fuWVH62WtzW4+qY=
|
||||
node_js: 4
|
||||
- CXX=g++-4.8
|
||||
node_js: stable
|
||||
addons:
|
||||
firefox: latest
|
||||
apt:
|
||||
sources:
|
||||
- google-chrome
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- google-chrome-stable
|
||||
- g++-4.8
|
||||
sauce_connect: true
|
||||
script:
|
||||
- xvfb-run wct
|
||||
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-material",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"description": "A material design container that looks like a lifted sheet of paper",
|
||||
"private": true,
|
||||
"authors": [
|
||||
|
@ -27,7 +27,8 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
|
||||
"web-component-tester": "polymer/web-component-tester#^3.4.0",
|
||||
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
|
||||
"web-component-tester": "^4.0.0",
|
||||
"test-fixture": "polymerelements/test-fixture#^1.0.0",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0"
|
||||
}
|
||||
|
|
|
@ -17,97 +17,68 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<link rel="import" href="../../iron-flex-layout/iron-flex-layout.html">
|
||||
<link rel="import" href="../../paper-styles/typography.html">
|
||||
<link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
|
||||
<link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
|
||||
<link rel="import" href="../paper-material.html">
|
||||
<link rel="stylesheet" href="../../paper-styles/demo.css">
|
||||
|
||||
<style is="custom-style" include="demo-pages-shared-styles">
|
||||
paper-material {
|
||||
display: inline-block;
|
||||
background: white;
|
||||
box-sizing: border-box;
|
||||
margin: 8px;
|
||||
padding: 16px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body unresolved>
|
||||
<template is="dom-bind" id="demo">
|
||||
<style is="custom-style">
|
||||
paper-material {
|
||||
display: inline-block;
|
||||
background: white;
|
||||
box-sizing: border-box;
|
||||
margin: 16px;
|
||||
padding: 16px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.fab {
|
||||
display: inline-block;
|
||||
background: white;
|
||||
box-sizing: border-box;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
margin: 16px;
|
||||
padding: 16px;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
@apply(--layout-center-center);
|
||||
}
|
||||
</style>
|
||||
<section>
|
||||
<div>Paper Elevations</div>
|
||||
|
||||
<paper-material elevation="0">
|
||||
elevation = 0
|
||||
</paper-material>
|
||||
|
||||
<paper-material elevation="1">
|
||||
elevation = 1
|
||||
</paper-material>
|
||||
|
||||
<paper-material elevation="2">
|
||||
elevation = 2
|
||||
</paper-material>
|
||||
|
||||
<paper-material elevation="3">
|
||||
elevation = 3
|
||||
</paper-material>
|
||||
|
||||
<paper-material elevation="4">
|
||||
elevation = 4
|
||||
</paper-material>
|
||||
|
||||
<paper-material elevation="5">
|
||||
elevation = 5
|
||||
</paper-material>
|
||||
</section>
|
||||
|
||||
<section on-click="tapAction">
|
||||
<div>Animated</div>
|
||||
|
||||
<paper-material elevation="0" animated>
|
||||
tap
|
||||
</paper-material>
|
||||
|
||||
<paper-material class="fab" elevation="0" animated>
|
||||
tap
|
||||
</paper-material>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
demo.tapAction = function(e) {
|
||||
var target = e.target;
|
||||
if (!target.down) {
|
||||
target.elevation += 1;
|
||||
if (target.elevation === 5) {
|
||||
target.down = true;
|
||||
}
|
||||
} else {
|
||||
target.elevation -= 1;
|
||||
if (target.elevation === 0) {
|
||||
target.down = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<div class="vertical-section-container centered">
|
||||
<h3>Paper-materials can have different elevations</h3>
|
||||
<demo-snippet class="centered-demo">
|
||||
<template>
|
||||
<paper-material elevation="0">0</paper-material>
|
||||
<paper-material elevation="1">1</paper-material>
|
||||
<paper-material elevation="2">2</paper-material>
|
||||
<paper-material elevation="3">3</paper-material>
|
||||
<paper-material elevation="4">4</paper-material>
|
||||
<paper-material elevation="5">5</paper-material>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h3>Changes in elevation can be animated</h3>
|
||||
<demo-snippet class="centered-demo">
|
||||
<template>
|
||||
<style>
|
||||
#a1, #a2 { cursor: pointer; }
|
||||
</style>
|
||||
Tap each of these boxes!
|
||||
<div>
|
||||
<paper-material elevation="0" animated id="a1">animated</paper-material>
|
||||
<paper-material elevation="3" id="a2">not animated</paper-material>
|
||||
</div>
|
||||
<script>
|
||||
document.addEventListener('WebComponentsReady', function() {
|
||||
a1.addEventListener('click', _onTap);
|
||||
a2.addEventListener('click', _onTap);
|
||||
});
|
||||
function _onTap(e) {
|
||||
var target = e.target;
|
||||
if (!target.down) {
|
||||
target.elevation += 1;
|
||||
if (target.elevation === 5) {
|
||||
target.down = true;
|
||||
}
|
||||
} else {
|
||||
target.elevation -= 1;
|
||||
if (target.elevation === 0) {
|
||||
target.down = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -8,6 +8,8 @@ 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
|
||||
-->
|
||||
|
||||
<link rel="import" href="../paper-styles/shadow.html">
|
||||
|
||||
<dom-module id="paper-material-shared-styles">
|
||||
<template>
|
||||
<style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue