Added Polymer

This commit is contained in:
Thaum
2014-11-26 10:18:35 +00:00
parent 5eea4714b2
commit 3408ba9e8d
1210 changed files with 394645 additions and 47 deletions

View File

@@ -0,0 +1,19 @@
{
"name": "core-item",
"private": true,
"dependencies": {
"core-icon": "Polymer/core-icon#^0.5.0",
"core-icons": "Polymer/core-icons#^0.5.0"
},
"version": "0.5.1",
"homepage": "https://github.com/Polymer/core-item",
"_release": "0.5.1",
"_resolution": {
"type": "version",
"tag": "0.5.1",
"commit": "7f556492c2af60acab43abc606de34be63f3ca31"
},
"_source": "git://github.com/Polymer/core-item.git",
"_target": "^0.5.0",
"_originalSource": "Polymer/core-item"
}

View File

@@ -0,0 +1,4 @@
core-item
=========
See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-item) for more information.

View File

@@ -0,0 +1,9 @@
{
"name": "core-item",
"private": true,
"dependencies": {
"core-icon": "Polymer/core-icon#^0.5.0",
"core-icons": "Polymer/core-icons#^0.5.0"
},
"version": "0.5.1"
}

View File

@@ -0,0 +1,45 @@
/*
Copyright (c) 2014 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
*/
:host {
display: block;
position: relative;
min-height: 40px;
white-space: nowrap;
}
:host(.font-scalable) {
min-height: 2.5em;
}
:host(.core-selected) {
font-weight: bold;
}
#icon {
margin: 0 16px 0 4px;
}
:host(.font-scalable) #icon {
margin: 0 1em 0 0.25em;
height: 1.5em;
width: 1.5em;
}
polyfill-next-selector { content: ':host > a'; }
::content > a {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
/* IE10 styling to ensure link is clickable. Cannot be completely
transparent or minifiers change it to `transparent` which does not work. */
background-color: rgba(0, 0, 0, 0.000001);
}

View File

@@ -0,0 +1,73 @@
<!--
Copyright (c) 2014 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
-->
<!--
`core-item` is a simple line-item object: a label and/or an icon that can also
act as a link.
Example:
<core-item icon="settings" label="Settings"></core-item>
To use as a link, put &lt;a&gt; element in the item.
Example:
<core-item icon="settings" label="Settings">
<a href="#settings" target="_self"></a>
</core-item>
@group Polymer Core Elements
@element core-item
@homepage github.io
-->
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="core-item" attributes="label icon src" horizontal center layout>
<template>
<link rel="stylesheet" href="core-item.css">
<template if="{{icon || src}}">
<core-icon src="{{src}}" id="icon" icon="{{icon}}" hidden?="{{!src && !icon}}"></core-icon>
</template>
<div id="label">{{label}}</div>
<content></content>
</template>
<script>
Polymer('core-item', {
/**
* The URL of an image for the icon.
*
* @attribute src
* @type string
* @default ''
*/
/**
* Specifies the icon from the Polymer icon set.
*
* @attribute icon
* @type string
* @default ''
*/
/**
* Specifies the label for the menu item.
*
* @attribute label
* @type string
* @default ''
*/
});
</script>
</polymer-element>

View File

@@ -0,0 +1,92 @@
<!--
@license
Copyright (c) 2014 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
-->
<!doctype html>
<html>
<head>
<title>core-item</title>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="core-item.html">
<style>
body {
font-family: sans-serif;
font-size: 16px;
margin: 20px;
}
core-item {
width: 300px;
}
core-item.big {
font-size: 24px;
}
core-item.small {
font-size: 12px;
}
core-item.contact-item {
height: 50px;
background-color: #efefef;
border: 1px solid #ddd;
}
core-item.contact-item .name {
font-size: 1.125em;
}
core-item.contact-item .address {
font-size: 0.75em;
}
</style>
</head>
<body unresolved>
<h2>items with icon and label:</h2>
<core-item icon="settings" label="Settings"></core-item>
<core-item icon="account-box" label="Account"></core-item>
<h2>items with label only:</h2>
<core-item label="Settings"></core-item>
<core-item label="Account"></core-item>
<h2>links (via &lt;a&gt;):</h2>
<core-item icon="settings" label="Settings"><a href="#settings" target="_self"></a></core-item>
<core-item icon="account-box" label="Account"><a href="#account" target="_self"></a></core-item>
<h2>items sized with CSS:</h2>
<core-item icon="settings" label="Settings" class="font-scalable big"></core-item>
<core-item icon="account-box" label="Account" class="font-scalable big"></core-item>
<core-item icon="settings" label="Settings" class="font-scalable small"></core-item>
<core-item icon="account-box" label="Account" class="font-scalable small"></core-item>
<h2>custom item:</h2>
<core-item icon="account-circle" class="contact-item">
<div flex>
<div class="name">John Doe</div>
<div class="address">123 A Street, San Francisco, CA</div>
</div>
<core-icon icon="more-vert"></core-icon>
</core-item>
</body>
</html>

View File

@@ -0,0 +1,22 @@
<!doctype html>
<!--
Copyright (c) 2014 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
The complete set of authors may be found at http://polymer.github.io/AUTHORS
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
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
-->
<html>
<head>
<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="../core-component-page/core-component-page.html">
</head>
<body unresolved>
<core-component-page></core-component-page>
</body>
</html>

View File

@@ -0,0 +1,24 @@
<!--
@license
Copyright (c) 2014 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
-->
<x-meta id="core-item" label="Item" group="Core">
<template>
<core-item icon="settings" label="Item"></core-item>
</template>
<template id="imports">
<link rel="import" href="core-item.html">
</template>
</x-meta>