From ad396e0e28c42c4e01a09e26c0c86800cdc98c8f Mon Sep 17 00:00:00 2001 From: Thaum Date: Tue, 31 Mar 2015 14:58:48 +0000 Subject: [PATCH] Fixed broken polymer components --- rpg-docs/client/views/layout/imports.html | 4 +- .../lib/functions/collectionHooksDefaults.js | 1 - .../paper-dropdown-menu.css | 44 ++ .../paper-dropdown-menu.html | 186 +++++++++ .../paper-slider-diff/paper-slider.css | 239 +++++++++++ .../paper-slider-diff/paper-slider.html | 376 ++++++++++++++++++ 6 files changed, 847 insertions(+), 3 deletions(-) delete mode 100644 rpg-docs/lib/functions/collectionHooksDefaults.js create mode 100644 rpg-docs/public/custom_components/paper-dropdown-menu/paper-dropdown-menu.css create mode 100644 rpg-docs/public/custom_components/paper-dropdown-menu/paper-dropdown-menu.html create mode 100644 rpg-docs/public/custom_components/paper-slider-diff/paper-slider.css create mode 100644 rpg-docs/public/custom_components/paper-slider-diff/paper-slider.html diff --git a/rpg-docs/client/views/layout/imports.html b/rpg-docs/client/views/layout/imports.html index 273f22d5..9f7bff68 100644 --- a/rpg-docs/client/views/layout/imports.html +++ b/rpg-docs/client/views/layout/imports.html @@ -20,7 +20,6 @@ - @@ -30,11 +29,12 @@ - + + diff --git a/rpg-docs/lib/functions/collectionHooksDefaults.js b/rpg-docs/lib/functions/collectionHooksDefaults.js deleted file mode 100644 index 53c9247e..00000000 --- a/rpg-docs/lib/functions/collectionHooksDefaults.js +++ /dev/null @@ -1 +0,0 @@ -CollectionHooks.defaults.all.all = {fetchPrevious: false}; diff --git a/rpg-docs/public/custom_components/paper-dropdown-menu/paper-dropdown-menu.css b/rpg-docs/public/custom_components/paper-dropdown-menu/paper-dropdown-menu.css new file mode 100644 index 00000000..2621f627 --- /dev/null +++ b/rpg-docs/public/custom_components/paper-dropdown-menu/paper-dropdown-menu.css @@ -0,0 +1,44 @@ +/* + * @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 + */ + +:host { + position: relative; + display: inline-block; + background-color: #fff; + -moz-user-select: none; + -ms-user-select: none; + -webkit-user-select: none; + user-select: none; + cursor: pointer; + padding: 0.75em 0; +} + +#control { + box-sizing: border-box; + max-height: 2em; + color: #757575; + border-bottom: 1px solid #757575; +} + +#control[selected] { + color: #000; +} + +#control > div { + padding: 0.5em 0 0.25em; + overflow: hidden; + /* FIXME not working for some reason */ + white-space: nowrap; + text-overflow: ellipsis; +} + +core-icon { + margin: 0.3em 0 0.2em 0.25em; +} \ No newline at end of file diff --git a/rpg-docs/public/custom_components/paper-dropdown-menu/paper-dropdown-menu.html b/rpg-docs/public/custom_components/paper-dropdown-menu/paper-dropdown-menu.html new file mode 100644 index 00000000..c9a64a76 --- /dev/null +++ b/rpg-docs/public/custom_components/paper-dropdown-menu/paper-dropdown-menu.html @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/rpg-docs/public/custom_components/paper-slider-diff/paper-slider.css b/rpg-docs/public/custom_components/paper-slider-diff/paper-slider.css new file mode 100644 index 00000000..4840ee8b --- /dev/null +++ b/rpg-docs/public/custom_components/paper-slider-diff/paper-slider.css @@ -0,0 +1,239 @@ +/* +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: inline-block; + width: 200px; + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + -webkit-tap-highlight-color: rgba(0,0,0,0); +} + +:host(:focus) { + outline: none; +} + +#sliderContainer { + position: relative; + width: calc(100% - 32px); + height: 32px; +} + +#sliderContainer.editable { + float: left; + width: calc(100% - 72px); + margin: 12px 0; +} + +.bar-container { + position: absolute; + top: 0; + left: 16px; + height: 100%; + width: 100%; + overflow: hidden; +} + +.ring > .bar-container { + left: 20px; + width: calc(100% - 4px); + transition: left 0.18s ease, width 0.18s ease; +} + +.ring.expand:not(.pin) > .bar-container { + left: 30px; + width: calc(100% - 14px); +} + +.ring.expand.dragging > .bar-container { + transition: none; +} + +#sliderBar { + position: absolute; + top: 15px; + left: 0; + height: 2px; + width: 100%; + padding: 8px 0; + margin: -8px 0; +} + +.ring #sliderBar { + left: -4px; + width: calc(100% + 4px); +} + +.ring.expand:not(.pin) #sliderBar { + left: -14px; + width: calc(100% + 14px); +} + +.slider-markers { + position: absolute; + top: 15px; + left: 15px; + height: 2px; + width: calc(100% + 2px); + box-sizing: border-box; + pointer-events: none; +} + +.slider-markers::after, .slider-marker::after { + content: ""; + display: block; + width: 2px; + height: 2px; + border-radius: 50%; + background-color: black; +} + +#sliderBar::shadow #activeProgress { + background-color: #3f51b5; +} + +.transiting #sliderBar::shadow #activeProgress { + transition: -webkit-transform 0.08s ease; + transition: transform 0.08s ease; +} + +#sliderKnob { + position: absolute; + left: 0; + top: 0; + width: 32px; + height: 32px; +} + +.transiting > #sliderKnob { + transition: left 0.08s ease; +} + +#sliderKnob:focus { + outline: none; +} + +#sliderKnob.dragging { + transition: none; +} + +.snaps > #sliderKnob.dragging { + transition: -webkit-transform 0.08s ease; + transition: transform 0.08s ease; +} + +#sliderKnobInner { + width: 12px; + height: 12px; + box-sizing: border-box; + -moz-box-sizing: border-box; + border-radius: 50%; + background-color: #3f51b5; + /* FIXME(ffu): can't use the following. https://github.com/Polymer/platform/issues/53 */ + /* transition-property: height, width, background-color, border; + transition-duration: 0.1s; + transition-timing-function: ease; */ + transition: height 0.18s ease, width 0.18s ease; +} + +.expand:not(.pin) > #sliderKnob > #sliderKnobInner { + width: 100%; + height: 100%; + -webkit-transform: translateZ(0); + transform: translateZ(0); +} + +.ring > #sliderKnob > #sliderKnobInner { + background-color: transparent; + border: 2px solid #c8c8c8; +} + +#sliderKnobInner::before { + background-color: #3f51b5; +} + +.pin > #sliderKnob > #sliderKnobInner::before { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 26px; + height: 26px; + margin-left: 3px; + border-radius: 50% 50% 50% 0; + -webkit-transform: rotate(-45deg) scale(0) translate(0); + transform: rotate(-45deg) scale(0) translate(0); +} + +#sliderKnobInner::before, #sliderKnobInner::after { + transition: -webkit-transform .2s ease, background-color .18s ease; + transition: transform .2s ease, background-color .18s ease; +} + +.pin.ring > #sliderKnob > #sliderKnobInner::before { + background-color: #c8c8c8; +} + +.pin.expand > #sliderKnob > #sliderKnobInner::before { + -webkit-transform: rotate(-45deg) scale(1) translate(17px, -17px); + transform: rotate(-45deg) scale(1) translate(17px, -17px); +} + +.pin > #sliderKnob > #sliderKnobInner::after { + content: attr(value); + position: absolute; + top: 0; + left: 0; + width: 32px; + height: 26px; + text-align: center; + color: #fff; + font-size: 10px; + -webkit-transform: scale(0) translate(0); + transform: scale(0) translate(0); +} + +.pin.expand > #sliderKnob > #sliderKnobInner::after { + -webkit-transform: scale(1) translate(0, -17px); + transform: scale(1) translate(0, -17px); +} + +/* editable: paper-input */ +.slider-input { + width: 40px; + float: right; + overflow: hidden; +} + +.slider-input::shadow input { + /* FIXME(ffu): should one be able set text-align directly on paper-input? */ + text-align: center; +} + +/* disabled state */ +#sliderContainer.disabled { + pointer-events: none; +} + +.disabled > #sliderKnob > #sliderKnobInner { + width: 8px; + height: 8px; + background-color: #c8c8c8; +} + +.disabled.ring > #sliderKnob > #sliderKnobInner { + background-color: transparent; +} + +#sliderContainer.disabled #sliderBar::shadow #activeProgress { + background-color: #c8c8c8; +} diff --git a/rpg-docs/public/custom_components/paper-slider-diff/paper-slider.html b/rpg-docs/public/custom_components/paper-slider-diff/paper-slider.html new file mode 100644 index 00000000..fc36933b --- /dev/null +++ b/rpg-docs/public/custom_components/paper-slider-diff/paper-slider.html @@ -0,0 +1,376 @@ + + + + + + + + + + + +