Skip to content
This repository has been archived by the owner on Feb 7, 2019. It is now read-only.

Commit

Permalink
building brick and commented nested imports
Browse files Browse the repository at this point in the history
  • Loading branch information
nicola committed Aug 4, 2014
1 parent 7805d1e commit 07c9461
Show file tree
Hide file tree
Showing 44 changed files with 3,609 additions and 915 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
bower_components
node_modules
.DS_Store
4 changes: 4 additions & 0 deletions dist/brick-action/dist/brick-action.html
@@ -0,0 +1,4 @@
<link rel="import" href="../../brick-common/brick-common.html">


<script src="brick-action.js"></script>
Expand Up @@ -60,10 +60,6 @@
setupHandler(this);
};

BrickActionElementPrototype.foo = function () {

};

window.BrickActionElement = document.registerElement('brick-action', {
prototype: BrickActionElementPrototype
});
Expand Down
1 change: 0 additions & 1 deletion dist/brick-action/src/brick-action.html

This file was deleted.

90 changes: 90 additions & 0 deletions dist/brick-appbar/dist/brick-appbar.html
@@ -0,0 +1,90 @@
<link rel="import" href="../../brick-common/brick-common.html">

<template>
<style>:host {
padding: 0;
width: 100%;
display: block;
}
::content h1,
h2,
h3,
h4,
h5,
h6 {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
margin: 0;
}
</style>
<style>:host {
background: #fff;
display: flex;
min-height: 50px;
}
::content h1,
::content h2,
::content h3,
::content h4,
::content h5,
::content h6 {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
min-width: auto;
min-height: auto;
-webkit-box-flex: 1;
-moz-box-flex: 1;
-webkit-flex: 1;
-ms-flex: 1;
box-flex: 1;
flex: 1;
-webkit-align-items: center;
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
align-items: center;
margin-right: 0px;
margin-left: 0px;
-webkit-justify-content: center;
-moz-justify-content: center;
-ms-justify-content: center;
justify-content: center;
padding: 0 16px;
font-weight: 300;
font-style: italic;
font-size: 24px;
line-height: 26px;
color: #333;
}
::content button {
color: #333;
display: block;
border: none;
width: auto;
height: auto;
margin: 0;
padding: 0;
font-size: 14px;
min-width: 50px;
text-decoration: none;
text-align: center;
background: none;
border-radius: 0;
transition: all 0s;
transition-delay: 300ms;
}
::content button:active {
color: #333;
background: rgba(0,0,0,0.1);
}
</style>
<content></content>
</template>

<script src="brick-appbar.js"></script>
35 changes: 35 additions & 0 deletions dist/brick-appbar/dist/brick-appbar.js
@@ -0,0 +1,35 @@
/* global Platform */

(function () {

var currentScript = document._currentScript || document.currentScript;

var BrickAppbarElementPrototype = Object.create(HTMLElement.prototype);

// Lifecycle methods
BrickAppbarElementPrototype.attachedCallback = function () {

var importDoc = currentScript.ownerDocument;
var template = importDoc.querySelector('template');

// fix styling for polyfill
if (Platform.ShadowCSS) {
var styles = template.content.querySelectorAll('style');
for (var i = 0; i < styles.length; i++) {
var style = styles[i];
var cssText = Platform.ShadowCSS.shimStyle(style, 'brick-appbar');
Platform.ShadowCSS.addCssToDocument(cssText);
style.remove();
}
}

// create shadowRoot and append template to it.
var shadowRoot = this.createShadowRoot();
shadowRoot.appendChild(template.content.cloneNode(true));
};

window.BrickAppbarElement = document.registerElement('brick-appbar', {
prototype: BrickAppbarElementPrototype
});

})();
54 changes: 0 additions & 54 deletions dist/brick-appbar/src/brick-appbar.css

This file was deleted.

2 changes: 0 additions & 2 deletions dist/brick-appbar/src/brick-appbar.html

This file was deleted.

42 changes: 0 additions & 42 deletions dist/brick-appbar/src/brick-appbar.js

This file was deleted.

143 changes: 143 additions & 0 deletions dist/brick-calendar/dist/brick-calendar.html
@@ -0,0 +1,143 @@
<link rel="import" href="../../brick-common/brick-common.html">

<template>
<style>:host {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-tap-highlight-color: transparent;
-moz-tap-highlight-color: transparent;
tap-highlight-color: transparent;
position: relative;
display: inline-block;
margin: 0;
padding: 0;
max-width: 100%;
font-size: 1em;
text-align: center;
overflow: hidden;
}
:host(:not([controls])) ::content .controls {
display: none !important;
}
:host([controls]) ::content .controls {
display: block;
}
:host(:not([active])) ::content .day:hover,
:host(:not([active])) ::content .prev:hover,
:host(:not([active])) ::content .next:hover {
cursor: pointer;
}
:host ::content {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
:host ::content .calendar {
position: relative;
display: inline-block;
overflow: hidden;
width: 100%;
height: 100%;
}
:host ::content .month {
display: inline-block;
margin: 0;
padding: 0;
vertical-align: top;
white-space: nowrap;
width: 224px;
max-width: 100%;
}
:host ::content .week,
:host ::content .weekday-labels {
margin: 1px 0;
overflow: visible;
width: 100%;
white-space: nowrap;
}
:host ::content .day,
:host ::content .prev,
:host ::content .next,
:host ::content .weekday-label {
display: inline-block;
width: 32px;
}
:host ::content .month-label,
:host ::content .weekday-labels,
:host ::content .week,
:host ::content .prev,
:host ::content .next {
height: 2em;
line-height: 2em;
}
:host ::content .weekday-label {
opacity: 0.8;
font-size: 0.8em;
}
:host ::content .weekday-label,
:host ::content .day {
height: 100%;
line-height: inherit;
margin: 0 auto;
}
:host ::content .month-label {
width: 100%;
}
:host ::content .day {
position: relative;
white-space: nowrap;
}
:host ::content .badmonth {
opacity: 0.5;
}
:host ::content .prev,
:host ::content .next {
position: absolute;
top: 0px;
max-width: 3em;
}
:host ::content .prev {
left: 0px;
}
:host ::content .next {
right: 0px;
}
</style>
<style>:host {
border: 1px solid #cecece;
}
:host:not([active]) ::content .prev:hover,
:host:not([active]) ::content .next:hover {
background-color: #f9f9f9;
opacity: 0.7;
}
:host:not([active]) ::content .day:not(.chosen):hover {
background: #ccc;
}
:host ::content .month-label {
border-bottom: 1px solid #cecece;
}
:host ::content .day[active] {
border-color: #ffa500;
}
:host ::content .day.chosen {
background: #0095dd;
color: #fff;
}
:host ::content .day.today {
font-weight: bold;
}
</style>
<content></content>
</template>



<script src="brick-calendar.js"></script>

0 comments on commit 07c9461

Please sign in to comment.