Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

8/15 master -> stable #15

Merged
merged 21 commits into from
Aug 15, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
bb0ec38
polymer-ui-menu-button: hack to fix z-index
Aug 9, 2013
60e88bd
polymer-ui-menu-button: fix style for valign=top
Aug 9, 2013
4958c54
polymer-ui-menu-button: replace arrow with polymer-ui-arrow
frankiefu Aug 9, 2013
1ad2dc8
add attribution
frankiefu Aug 9, 2013
33c5f60
polymer-ui-breadcrumbs, wip
frankiefu Aug 9, 2013
1d08b9e
cleanups
Aug 12, 2013
1ae5e58
polymer-ui-menu: remove unneeded attributes/properties since they are
frankiefu Aug 12, 2013
03581da
make tab inline-block
frankiefu Aug 14, 2013
1cf4c38
polymer-ui-arrow: set borderWidth in update() along with other style
frankiefu Aug 14, 2013
65af60f
ready -> created; inserted -> enteredDocument
frankiefu Aug 14, 2013
c148313
polymer-ui-submenu-item: remove attribute that is no longer needed
frankiefu Aug 15, 2013
cce6e12
make polymer-ui-icon function on Firefox with minimal expense
sorvell Aug 15, 2013
1a29844
set default value to false to indicate it's a boolean attribute
frankiefu Aug 15, 2013
1eceeed
add example
frankiefu Aug 15, 2013
0063726
polymer-ui-overlay: set boolean props to false
Aug 15, 2013
c46ee9b
remove extra "
frankiefu Aug 15, 2013
4a4e4ab
Merge branch 'master' of github.com:Polymer/polymer-ui-elements
frankiefu Aug 15, 2013
ddc5223
polymer-ui-overlay: remove polymer-ui-overlay-dialog
Aug 15, 2013
8ad9e07
polymer-ui-overlay: update for overriding z-index
Aug 15, 2013
67f4fd6
fixed #12
frankiefu Aug 15, 2013
271940b
Merge branch 'master' of github.com:Polymer/polymer-ui-elements
frankiefu Aug 15, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 1 addition & 32 deletions basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ license that can be found in the LICENSE file.
width: 100%;
height: 100%;
}

.polymer-ui-light-bg {
background: #f2f2f2 -webkit-linear-gradient(left, rgba(197,197,197,0), rgba(197,197,197,0.05));
background: #f2f2f2 -moz-linear-gradient(left, rgba(197,197,197,0), rgba(197,197,197,0.05));
Expand All @@ -37,34 +37,3 @@ license that can be found in the LICENSE file.
font: 16px 'Helvetica Neue', Helvetica, Arial, Roboto;
}

/*
.polymer-ui-light-bg {
background-color: #d9d9d9;
color: #333;
}

.polymer-ui-dark-bg {
background-color: #262626;
color: #eee;
}

.polymer-ui-bg-gray {
background-color: #d9d9d9;
}

.polymer-ui-bg-jl-dark-theme {
background-color: #4d4d4d;
}

.polymer-ui-header-gray {
background-color: #262626;
}

.polymer-ui-header-jl-dark-theme {
background-color: #262626;
}

.polymer-ui-header {
background-color: #f3f3f0;
}
*/
5 changes: 5 additions & 0 deletions polymer-ui-arrow/polymer-ui-arrow.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
*/
@host {
* {
display: inline-block;
Expand Down
8 changes: 5 additions & 3 deletions polymer-ui-arrow/polymer-ui-arrow.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<polymer-element name="polymer-ui-arrow" attributes="direction size color borderColor borderWidth">
<template>
<link rel="stylesheet" href="polymer-ui-arrow.css">
<div id="outer" class="arrow arrow-outer" style="border-width: {{size}}px;"></div>
<div id="inner" class="arrow arrow-inner" style="border-width: {{size}}px;"></div>
<div id="outer" class="arrow arrow-outer"></div>
<div id="inner" class="arrow arrow-inner"></div>
</template>
<script>
Polymer('polymer-ui-arrow', {
Expand All @@ -42,7 +42,7 @@
color: '#fff',
borderColor: '#ccc',
borderWidth: 1,
ready: function() {
created: function() {
this.asyncUpdate();
},
directionChanged: function() {
Expand All @@ -66,6 +66,8 @@
update: function() {
var os = this.$.outer.style;
var is = this.$.inner.style;
os.borderWidth = this.size + 'px';
is.borderWidth = this.size + 'px';
os.borderColor = 'transparent';
is.borderColor = 'transparent';
var bc = 'border' + this.borders[this.direction] + 'Color';
Expand Down
51 changes: 51 additions & 0 deletions polymer-ui-breadcrumbs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@

<!doctype html>
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<html>
<head>
<title>Breadcrumbs</title>
<script src="../../polymer/polymer.js"></script>
<link rel="import" href="polymer-ui-breadcrumbs.html">
<link rel="import" href="../polymer-ui-toolbar/polymer-ui-toolbar.html">
<link rel="stylesheet" href="../basic.css">
<style>
html, body {
margin: 0;
}
</style>
</head>
<body class="polymer-ui-body-text">
<polymer-element name="x-test">
<template>
<style>
polymer-ui-breadcrumbs {
padding-left: 20px;
}
</style>
<polymer-ui-toolbar>
<polymer-ui-breadcrumbs crumbs="{{crumbs}}" selectedCrumb="{{selectedCrumb}}"></polymer-ui-breadcrumbs>
</polymer-ui-toolbar>
<br><br>
<div>{{selectedCrumb.label}}</div>
</template>
<script>
Polymer('x-test', {
created: function() {
this.crumbs = [
{label: 'Overview'},
{label: 'Subitem1'},
{label: 'Subitem2'},
{label: 'Subitem3'}
];
}
});
</script>
</polymer-element>

<x-test></x-test>
</body>
</html>
41 changes: 41 additions & 0 deletions polymer-ui-breadcrumbs/polymer-ui-breadcrumbs.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
*/
@host {
* {
display: inline-block;
}
}

.label {
display: inline-block;
vertical-align: middle;
font-size: 14px;
font-weight: bold;
cursor: pointer;
}

.label > a {
text-decoration: none;
color: #75d0df;
}

.label:last-of-type > a {
color: black;
}

a[disabled] {
pointer-events: none;
}

polymer-ui-icon {
-moz-transform: rotate(270deg);
-webkit-transform: rotate(270deg);
transform: rotate(270deg);
}

polymer-ui-icon:last-of-type {
display: none !important;
}
31 changes: 31 additions & 0 deletions polymer-ui-breadcrumbs/polymer-ui-breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<!--
/**
* @module Polymer UI Elements
*/
/**
* @class polymer-ui-breadcrumbs
*/
-->
<link rel="import" href="../polymer-ui-icon/polymer-ui-icon.html">
<link rel="import" href="../../polymer-elements/polymer-selector/polymer-selector.html">

<polymer-element name="polymer-ui-breadcrumbs" attributes="crumbs selected selectedCrumb">
<template>
<link rel="stylesheet" href="polymer-ui-breadcrumbs.css">
<div id="crumbs">
<template repeat="{{crumbs}}">
<li class="label"><a href="{{href}}" disabled?="{{!href}}">{{label}}</a></li>
<polymer-ui-icon icon="dropdown"></polymer-ui-icon>
</template>
</div>
<polymer-selector target="{{$.crumbs}}" itemsSelector="li" selected="{{selected}}" selectedModel="{{selectedCrumb}}"></polymer-selector>
</template>
<script>
Polymer('polymer-ui-breadcrumbs');
</script>
</polymer-element>
11 changes: 9 additions & 2 deletions polymer-ui-collapsible/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,19 @@
}
</style>
</head>
<body class="polymer-ui-body-text"">
<polymer-ui-collapsible>
<body class="polymer-ui-body-text">
<polymer-ui-collapsible active>
<div class="polymer-ui-collapsible-header">Header 1</div>
<div class="content">
Forma temperiemque cornua sidera dissociata cornua recessit innabilis ligavit: solidumque coeptis nullus caelum sponte phoebe di regat mentisque tanta austro capacius amphitrite sui quin postquam semina fossae liquidum umor galeae coeptis caligine liberioris quin liquidum matutinis invasit posset: flexi glomeravit radiis certis invasit oppida postquam onerosior inclusum dominari opifex terris pace finxit quam aquae nunc sine altae auroram quam habentem homo totidemque scythiam in pondus ensis tegit caecoque poena lapidosos humanas coeperunt poena aetas totidem nec natura aethera locavit caelumque distinxit animalibus phoebe cingebant moderantum porrexerat terrae possedit sua sole diu summaque obliquis melioris orbem
</div>
</polymer-ui-collapsible>
<br>
<polymer-ui-collapsible>
<div class="polymer-ui-collapsible-header">Header 2</div>
<div class="content">
Forma temperiemque cornua sidera dissociata cornua recessit innabilis ligavit: solidumque coeptis nullus caelum sponte phoebe di regat mentisque tanta austro capacius amphitrite sui quin postquam semina fossae liquidum umor galeae coeptis caligine liberioris quin liquidum matutinis invasit posset: flexi glomeravit radiis certis invasit oppida postquam onerosior inclusum dominari opifex terris pace finxit quam aquae nunc sine altae auroram quam habentem homo totidemque scythiam in pondus ensis tegit caecoque poena lapidosos humanas coeperunt poena aetas totidem nec natura aethera locavit caelumque distinxit animalibus phoebe cingebant moderantum porrexerat terrae possedit sua sole diu summaque obliquis melioris orbem
</div>
</polymer-ui-collapsible>
</body>
</html>
5 changes: 5 additions & 0 deletions polymer-ui-collapsible/polymer-ui-collapsible.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<script>
Polymer('polymer-ui-collapsible', {
notap: false,
active: false,
toggle: function() {
this.active = !this.active;
},
Expand All @@ -50,7 +51,11 @@
}
},
bodyTap: function(e) {
// TODO(ffu): cancelBubble is confusing and sometimes need to use
// stopPropagation to actually stop event propagation.
// https://github.com/Polymer/polymer/issues/74
e.cancelBubble = true;
e.stopPropagation();
}
});
</script>
Expand Down
16 changes: 2 additions & 14 deletions polymer-ui-icon/index.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@

<!doctype html>
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<html>
<head>
<title>polymer-ui-icon</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!-- load toolkit -->
<script src="../../polymer/polymer.js"></script>
<!-- import elements-->
<link rel="import" href="polymer-ui-icon.html">
<!-- -->
<link rel="stylesheet" href="../basic.css">
</head>
<body class="polymer-ui-body-text">
<body>
<div>
<template repeat="{{}}">
<polymer-ui-icon icon="{{}}"></polymer-ui-icon>
Expand All @@ -28,7 +16,7 @@
<polymer-ui-icon icon="{{}}"></polymer-ui-icon>
</template>
</div>
<div theme="polymer-ui-dark-theme" class="polymer-ui-dark-bg">
<div theme="polymer-ui-dark-theme" style="background-color: #333;">
<template repeat="{{}}">
<polymer-ui-icon icon="{{}}"></polymer-ui-icon>
</template>
Expand Down
22 changes: 18 additions & 4 deletions polymer-ui-icon/polymer-ui-icon.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
bx: 0,
by: 0,
icons: icons,
ready: function() {
created: function() {
this.sizeChanged();
},
sizeChanged: function() {
Expand All @@ -138,18 +138,32 @@
themeChanged: function(old) {
this.style.backgroundPosition = '';
this.classList.switch(old, this.theme);
this.bx = calcThemeOffset(this.theme, this);
this.asyncMethod('updateIcon');
},
updateIcon: function() {
if (this.src) {
this.style.backgroundPosition = 'center';
} else {
//this.bx = parseFloat(getComputedStyle(this).backgroundPosition.split(' ').shift());
//this.style.backgroundPosition = (this.bx + 'px') + ' ' + (this.by + 'px');
this.style.backgroundPositionY = this.by + 'px';
// TODO(sorvell): FF cannot set Y only so we go to trouble
// to find the x offset and use it here.
this.style.backgroundPosition = (this.bx + 'px') + ' ' + (this.by + 'px');
//this.style.backgroundPositionY = this.by + 'px';
}
}
});

// memoize offset by theme name since getComputedStyle
// is $$
var themes = {};
function calcThemeOffset(theme, node) {
if (themes[theme] === undefined) {
var offset = parseFloat(
getComputedStyle(node).backgroundPosition.split(' ').shift());
themes[theme] = offset;
}
return themes[theme];
}
})();
</script>
</polymer-element>
Loading