| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 @license | 2 @license |
| 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
| 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt | 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
| 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
| 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt | 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
| 7 Code distributed by Google as part of the polymer project is also | 7 Code distributed by Google as part of the polymer project is also |
| 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt | 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
| 9 --><html><head><link rel="import" href="../polymer/polymer.html"> | 9 --><html><head><link rel="import" href="../polymer/polymer.html"> |
| 10 <link rel="import" href="../paper-styles/default-theme.html"> | 10 <link rel="import" href="../paper-styles/default-theme.html"> |
| 11 <link rel="import" href="../paper-input/paper-input.html"> | 11 <link rel="import" href="../paper-input/paper-input.html"> |
| 12 <link rel="import" href="../paper-menu-button/paper-menu-button.html"> | 12 <link rel="import" href="../paper-menu-button/paper-menu-button.html"> |
| 13 <link rel="import" href="../paper-ripple/paper-ripple.html"> | 13 <link rel="import" href="../paper-ripple/paper-ripple.html"> |
| 14 <link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html
"> | 14 <link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html
"> |
| 15 <link rel="import" href="../iron-behaviors/iron-control-state.html"> | 15 <link rel="import" href="../iron-behaviors/iron-control-state.html"> |
| 16 <link rel="import" href="../iron-behaviors/iron-button-state.html"> | 16 <link rel="import" href="../iron-behaviors/iron-button-state.html"> |
| 17 <link rel="import" href="../iron-icons/iron-icons.html"> | 17 <link rel="import" href="../iron-icons/iron-icons.html"> |
| 18 <link rel="import" href="../iron-icon/iron-icon.html"> | 18 <link rel="import" href="../iron-icon/iron-icon.html"> |
| 19 <link rel="import" href="../iron-selector/iron-selectable.html"> | 19 <link rel="import" href="../iron-selector/iron-selectable.html"> |
| 20 | 20 |
| 21 <!-- | 21 <!-- |
| 22 `paper-dropdown-menu` is similar to a native browser select element. | 22 `paper-dropdown-menu` is similar to a native browser select element. |
| 23 `paper-dropdown-menu` works with selectable content. The currently selected | 23 `paper-dropdown-menu` works with selectable content. The currently selected |
| 24 item is displayed in the control. If no item is selected, the `label` is | 24 item is displayed in the control. If no item is selected, the `label` is |
| 25 displayed instead. | 25 displayed instead. |
| 26 | 26 |
| 27 The child element with the class `dropdown-content` will be used as the dropdown | 27 The child element with the class `dropdown-content` will be used as the dropdown |
| 28 menu. It could be a `paper-menu` or element that triggers `iron-activate` when | 28 menu. It could be a `paper-menu` or element that triggers `iron-select` when |
| 29 selecting its children. | 29 selecting its children. |
| 30 | 30 |
| 31 Example: | 31 Example: |
| 32 | 32 |
| 33 <paper-dropdown-menu label="Your favourite pastry"> | 33 <paper-dropdown-menu label="Your favourite pastry"> |
| 34 <paper-menu class="dropdown-content"> | 34 <paper-menu class="dropdown-content"> |
| 35 <paper-item>Croissant</paper-item> | 35 <paper-item>Croissant</paper-item> |
| 36 <paper-item>Donut</paper-item> | 36 <paper-item>Donut</paper-item> |
| 37 <paper-item>Financier</paper-item> | 37 <paper-item>Financier</paper-item> |
| 38 <paper-item>Madeleine</paper-item> | 38 <paper-item>Madeleine</paper-item> |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 } | 114 } |
| 115 | 115 |
| 116 iron-icon { | 116 iron-icon { |
| 117 color: var(--disabled-text-color); | 117 color: var(--disabled-text-color); |
| 118 | 118 |
| 119 @apply(--paper-dropdown-menu-icon); | 119 @apply(--paper-dropdown-menu-icon); |
| 120 } | 120 } |
| 121 | 121 |
| 122 </style> | 122 </style> |
| 123 <template> | 123 <template> |
| 124 <paper-menu-button id="menuButton" vertical-align="top" horizontal-align="ri
ght" vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat)]]" disabled="[[
disabled]]" no-animations="[[noAnimations]]" on-iron-activate="_onIronActivate"
opened="{{opened}}"> | 124 <paper-menu-button id="menuButton" vertical-align="top" horizontal-align="ri
ght" vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat)]]" disabled="[[
disabled]]" no-animations="[[noAnimations]]" on-iron-select="_onIronSelect" open
ed="{{opened}}"> |
| 125 <div class="dropdown-trigger"> | 125 <div class="dropdown-trigger"> |
| 126 <paper-ripple></paper-ripple> | 126 <paper-ripple></paper-ripple> |
| 127 <paper-input readonly="" disabled="[[disabled]]" value="[[selectedItemLa
bel]]" placeholder="[[placeholder]]" always-float-label="[[alwaysFloatLabel]]" n
o-label-float="[[noLabelFloat]]" label="[[label]]"> | 127 <paper-input readonly="" disabled="[[disabled]]" value="[[selectedItemLa
bel]]" placeholder="[[placeholder]]" always-float-label="[[alwaysFloatLabel]]" n
o-label-float="[[noLabelFloat]]" label="[[label]]"> |
| 128 <iron-icon icon="arrow-drop-down" suffix=""></iron-icon> | 128 <iron-icon icon="arrow-drop-down" suffix=""></iron-icon> |
| 129 </paper-input> | 129 </paper-input> |
| 130 </div> | 130 </div> |
| 131 <div class="dropdown-content"> | 131 <content id="content" select=".dropdown-content"></content> |
| 132 <content select=".dropdown-content"></content> | |
| 133 </div> | |
| 134 </paper-menu-button> | 132 </paper-menu-button> |
| 135 </template> | 133 </template> |
| 136 </dom-module> | 134 </dom-module> |
| 137 <script src="paper-dropdown-menu-extracted.js"></script></body></html> | 135 <script src="paper-dropdown-menu-extracted.js"></script></body></html> |
| OLD | NEW |