| Index: third_party/polymer/v0_8/components-chromium/paper-drawer-panel/paper-drawer-panel.html
|
| diff --git a/third_party/polymer/v0_8/components-chromium/paper-drawer-panel/paper-drawer-panel.html b/third_party/polymer/v0_8/components-chromium/paper-drawer-panel/paper-drawer-panel.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..107006cc68851aab6625d79b3321b324428334f5
|
| --- /dev/null
|
| +++ b/third_party/polymer/v0_8/components-chromium/paper-drawer-panel/paper-drawer-panel.html
|
| @@ -0,0 +1,253 @@
|
| +<!--
|
| +Copyright (c) 2015 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
|
| +--><html><head><link rel="import" href="../polymer/polymer.html">
|
| +<link rel="import" href="../iron-media-query/iron-media-query.html">
|
| +<link rel="import" href="../iron-selector/iron-selector.html">
|
| +
|
| +<!--
|
| +`paper-drawer-panel` contains a drawer panel and a main panel. The drawer
|
| +and the main panel are side-by-side with drawer on the left. When the browser
|
| +window size is smaller than the `responsiveWidth`, `paper-drawer-panel`
|
| +changes to narrow layout. In narrow layout, the drawer will be stacked on top
|
| +of the main panel. The drawer will slide in/out to hide/reveal the main
|
| +panel.
|
| +
|
| +Use the attribute `drawer` to indicate that the element is the drawer panel and
|
| +`main` to indicate that the element is the main panel.
|
| +
|
| +Example:
|
| +
|
| + <paper-drawer-panel>
|
| + <div drawer> Drawer panel... </div>
|
| + <div main> Main panel... </div>
|
| + </paper-drawer-panel>
|
| +
|
| +The drawer and the main panels are not scrollable. You can set CSS overflow
|
| +property on the elements to make them scrollable or use `paper-header-panel`.
|
| +
|
| +Example:
|
| +
|
| + <paper-drawer-panel>
|
| + <paper-header-panel drawer>
|
| + <paper-toolbar></paper-toolbar>
|
| + <div> Drawer content... </div>
|
| + </paper-header-panel>
|
| + <paper-header-panel main>
|
| + <paper-toolbar></paper-toolbar>
|
| + <div> Main content... </div>
|
| + </paper-header-panel>
|
| + </paper-drawer-panel>
|
| +
|
| +An element that should toggle the drawer will automatically do so if it's
|
| +given the `paper-drawer-toggle` attribute. Also this element will automatically
|
| +be hidden in wide layout.
|
| +
|
| +Example:
|
| +
|
| + <paper-drawer-panel>
|
| + <paper-header-panel drawer>
|
| + <paper-toolbar>
|
| + <div>Application</div>
|
| + </paper-toolbar>
|
| + <div> Drawer content... </div>
|
| + </paper-header-panel>
|
| + <paper-header-panel main>
|
| + <paper-toolbar>
|
| + <paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button>
|
| + <div>Title</div>
|
| + </paper-toolbar>
|
| + <div> Main content... </div>
|
| + </paper-header-panel>
|
| + </paper-drawer-panel>
|
| +
|
| +To position the drawer to the right, add `rightDrawer` attribute.
|
| +
|
| + <paper-drawer-panel rightDrawer>
|
| + <div drawer> Drawer panel... </div>
|
| + <div main> Main panel... </div>
|
| + </paper-drawer-panel>
|
| +
|
| +@group Polymer Elements
|
| +@element paper-drawer-panel
|
| +@homepage github.io
|
| +-->
|
| +
|
| +</head><body><dom-module id="paper-drawer-panel">
|
| +
|
| + <style>
|
| + :host {
|
| + display: block;
|
| + position: absolute;
|
| + top: 0;
|
| + left: 0;
|
| + width: 100%;
|
| + height: 100%;
|
| + overflow: hidden;
|
| + }
|
| +
|
| + iron-selector > #drawer {
|
| + position: absolute;
|
| + top: 0;
|
| + left: 0;
|
| + height: 100%;
|
| + will-change: transform;
|
| + box-sizing: border-box;
|
| + -moz-box-sizing: border-box;
|
| + }
|
| +
|
| + .transition > #drawer {
|
| + transition: -webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s;
|
| + transition: transform ease-in-out 0.3s, width ease-in-out 0.3s;
|
| + }
|
| +
|
| + /*
|
| + right-drawer: make drawer on the right side
|
| + */
|
| + .right-drawer > #drawer {
|
| + left: auto;
|
| + right: 0;
|
| + }
|
| +
|
| + paper-drawer-panel #drawer > * {
|
| + position: absolute;
|
| + top: 0;
|
| + left: 0;
|
| + width: 100%;
|
| + height: 100%;
|
| + box-sizing: border-box;
|
| + -moz-box-sizing: border-box;
|
| + }
|
| +
|
| + iron-selector > #main {
|
| + position: absolute;
|
| + top: 0;
|
| + right: 0;
|
| + bottom: 0;
|
| + }
|
| +
|
| + .transition > #main {
|
| + transition: left ease-in-out 0.3s, padding ease-in-out 0.3s;
|
| + }
|
| +
|
| + .right-drawer > #main {
|
| + left: 0;
|
| + }
|
| +
|
| + .right-drawer.transition > #main {
|
| + transition: right ease-in-out 0.3s, padding ease-in-out 0.3s;
|
| + }
|
| +
|
| + #main > [main] {
|
| + height: 100%;
|
| + }
|
| +
|
| + #scrim {
|
| + position: absolute;
|
| + top: 0;
|
| + right: 0;
|
| + bottom: 0;
|
| + left: 0;
|
| + background-color: rgba(0, 0, 0, 0.3);
|
| + visibility: hidden;
|
| + opacity: 0;
|
| + transition: opacity ease-in-out 0.38s, visibility ease-in-out 0.38s;
|
| + }
|
| +
|
| + #edgeSwipeOverlay {
|
| + position: absolute;
|
| + top: 0;
|
| + bottom: 0;
|
| + left: 0;
|
| + width: 20px;
|
| + }
|
| +
|
| + .right-drawer > #main > #edgeSwipeOverlay {
|
| + right: 0;
|
| + left: auto;
|
| + }
|
| +
|
| + /*
|
| + narrow layout
|
| + */
|
| + .narrow-layout > #drawer.iron-selected {
|
| + box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
|
| + }
|
| +
|
| + .right-drawer.narrow-layout > #drawer.iron-selected {
|
| + box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15);
|
| + }
|
| +
|
| + .narrow-layout > #drawer > ::content[select="[drawer]"] > * {
|
| + border: 0;
|
| + }
|
| +
|
| + .narrow-layout > #drawer:not(.iron-selected) {
|
| + -webkit-transform: translateX(-100%);
|
| + transform: translateX(-100%);
|
| + }
|
| +
|
| + .right-drawer.narrow-layout > #drawer:not(.iron-selected) {
|
| + left: auto;
|
| + -webkit-transform: translateX(100%);
|
| + transform: translateX(100%);
|
| + }
|
| +
|
| + .narrow-layout > #main {
|
| + left: 0 !important;
|
| + padding: 0;
|
| + }
|
| +
|
| + .right-drawer.narrow-layout > #main {
|
| + left: 0;
|
| + right: 0;
|
| + padding: 0;
|
| + }
|
| +
|
| + .narrow-layout > #main:not(.iron-selected) > #scrim,
|
| + .dragging #scrim {
|
| + visibility: visible;
|
| + opacity: 1;
|
| + }
|
| +
|
| + .narrow-layout > #main > * {
|
| + margin: 0;
|
| + min-height: 100%;
|
| + left: 0;
|
| + right: 0;
|
| + box-sizing: border-box;
|
| + -moz-box-sizing: border-box;
|
| + }
|
| +
|
| + iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] {
|
| + display: none;
|
| + }
|
| + </style>
|
| +
|
| + <template>
|
| + <iron-media-query on-query-matches-changed="onQueryMatchesChanged" query="[[_computeMediaQuery(forceNarrow, responsiveWidth)]]">
|
| + </iron-media-query>
|
| +
|
| + <iron-selector attr-for-selected="id" class$="[[_computeIronSelectorClass(narrow, transition, dragging, rightDrawer)]]" on-iron-activate="onSelect" selected="[[selected]]">
|
| +
|
| + <div id="main" style$="[[_computeMainStyle(narrow, rightDrawer, drawerWidth)]]">
|
| + <content select="[main]"></content>
|
| + <div id="scrim"></div>
|
| + <div id="edgeSwipeOverlay" hidden$="[[_computeSwipeOverlayHidden(narrow, disableEdgeSwipe)]]">
|
| + </div>
|
| + </div>
|
| +
|
| + <div id="drawer" style$="[[_computeDrawerStyle(drawerWidth)]]">
|
| + <content select="[drawer]"></content>
|
| + </div>
|
| +
|
| + </iron-selector>
|
| + </template>
|
| +
|
| +</dom-module>
|
| +
|
| +<script src="paper-drawer-panel-extracted.js"></script></body></html>
|
|
|