Index: third_party/polymer/components-chromium/paper-dialog/paper-dialog.html |
diff --git a/third_party/polymer/components-chromium/paper-dialog/paper-dialog.html b/third_party/polymer/components-chromium/paper-dialog/paper-dialog.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a79c8da68984ed82da6b038b94bc38e803e759b5 |
--- /dev/null |
+++ b/third_party/polymer/components-chromium/paper-dialog/paper-dialog.html |
@@ -0,0 +1,91 @@ |
+<!-- |
+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 |
+--> |
+ |
+<!-- |
+Provides a dialog overlay. |
+ |
+Child elements that include a `dismissive` attribute are positioned in the lower left corner of the dialog. Elements that use the `affirmative` attribute are positioned in the lower right corner. |
+ |
+Child elements that include the `dismissive` or `affirmative` attribute will automatically toggle the dialog when clicked. |
+ |
+One child element should have the `autofocus` attribute so that the Enter key will automatically take action. This is |
+especially important for screen reader environments. |
+ |
+Example: |
+ |
+ <paper-dialog heading="Title for dialog"> |
+ <p>Lorem ipsum ....</p> |
+ <p>Id qui scripta ...</p> |
+ <paper-button label="More Info..." dismissive></paper-button> |
+ <paper-button label="Decline" affirmative></paper-button> |
+ <paper-button label="Accept" affirmative autofocus></paper-button> |
+ </paper-dialog> |
+ |
+#### Transitions |
+ |
+`<paper-dialog>` can be used with `<paper-transition>` to transition the overlay open and close. |
+ |
+To use a transition, import `paper-dialog-transition.html` alongside paper-dialog: |
+ |
+ <link rel="import" href="paper-dialog/paper-dialog-transition.html"> |
+ |
+Then set the `transition` attribute: |
+ |
+ <paper-dialog heading="Title for dialog" transition="paper-transition-center"> |
+ |
+ <paper-dialog heading="Title for dialog" transition="paper-transition-bottom"> |
+ |
+@group Paper Elements |
+@element paper-dialog |
+@homepage github.io |
+--> |
+<!-- |
+Fired when the dialog's `opened` property changes. |
+ |
+@event core-overlay-open |
+@param {Object} detail |
+@param {Object} detail.opened the opened state |
+--> |
+<link href="../polymer/polymer.html" rel="import"> |
+<link href="../core-overlay/core-overlay.html" rel="import"> |
+<link href="../paper-shadow/paper-shadow.html" rel="import"> |
+ |
+<polymer-element name="paper-dialog" attributes="opened heading transition autoCloseDisabled backdrop layered closeSelector" role="dialog" assetpath=""> |
+ |
+ <template> |
+ |
+ <link href="paper-dialog.css" rel="stylesheet"> |
+ |
+ <div id="shadow"> |
+ <paper-shadow z="3" hasposition=""></paper-shadow> |
+ </div> |
+ |
+ <core-overlay id="overlay" opened="{{opened}}" autoclosedisabled?="{{autoCloseDisabled}}" backdrop?="{{backdrop}}" layered?="{{layered}}" target="{{}}" sizingtarget="{{$.container}}" closeselector="{{closeSelector}}" transition="{{transition}}" margin="20"></core-overlay> |
+ |
+ <div id="container" layout="" vertical=""> |
+ |
+ <div id="actions" layout="" horizontal=""> |
+ <content select="[dismissive]"></content> |
+ <div flex="" auto=""></div> |
+ <content select="[affirmative]"></content> |
+ </div> |
+ |
+ <div id="main" flex="" auto=""> |
+ <h1>{{heading}}</h1> |
+ <content></content> |
+ </div> |
+ |
+ </div> |
+ |
+ </template> |
+ |
+ |
+ |
+</polymer-element> |
+<script src="paper-dialog-extracted.js"></script> |