| Index: third_party/polymer/components-chromium/core-dropdown/core-dropdown.html
|
| diff --git a/third_party/polymer/components-chromium/core-dropdown/core-dropdown.html b/third_party/polymer/components-chromium/core-dropdown/core-dropdown.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3d0920a2d55ce1c22abce2515933d3f0a53762ee
|
| --- /dev/null
|
| +++ b/third_party/polymer/components-chromium/core-dropdown/core-dropdown.html
|
| @@ -0,0 +1,79 @@
|
| +<!--
|
| +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
|
| +-->
|
| +
|
| +<!--
|
| +
|
| +`core-dropdown` is a control where the user can choose from an array of options in a drop-down
|
| +menu. The currently selected option is displayed in the control.
|
| +
|
| +Example:
|
| +
|
| + <core-dropdown selected="Financier" valueattr="label">
|
| + <core-item label="Croissant"></core-item>
|
| + <core-item label="Donut"></core-item>
|
| + <core-item label="Financier"></core-item>
|
| + <core-item label="Madeleine"></core-item>
|
| + </core-dropdown>
|
| +
|
| +This example renders a drop-down menu with 4 options, with the option `Financier` pre-selected.
|
| +
|
| +Theming
|
| +-------
|
| +
|
| +Style the drop-down menu with the `core-dropdown::shadow #menu` selector.
|
| +
|
| +Example:
|
| +
|
| + core-dropdown::shadow #menu {
|
| + background-color: #eee;
|
| + border: 1px solid #ccc;
|
| + }
|
| +
|
| +@group Polymer Core Elements
|
| +@element core-dropdown
|
| +@status beta
|
| +@homepage github.io
|
| +-->
|
| +
|
| +<!--
|
| +Fired when an item's selection state is changed. This event is fired both
|
| +when an item is selected or deselected. The `isSelected` detail property
|
| +contains the selection state.
|
| +
|
| +@event core-select
|
| +@param {Object} detail
|
| + @param {boolean} detail.isSelected true for selection and false for deselection
|
| + @param {Object} detail.item the item element
|
| +-->
|
| +<link href="../polymer/polymer.html" rel="import">
|
| +<link href="../core-icon/core-icon.html" rel="import">
|
| +<link href="../core-icons/core-icons.html" rel="import">
|
| +<link href="../core-item/core-item.html" rel="import">
|
| +<link href="../core-menu/core-menu.html" rel="import">
|
| +<link href="../core-overlay/core-overlay.html" rel="import">
|
| +
|
| +<polymer-element name="core-dropdown" assetpath="">
|
| +<template>
|
| +
|
| + <link href="core-dropdown.css" rel="stylesheet">
|
| +
|
| + <div id="control" layout="" horizontal="" center="" on-tap="{{toggle}}">
|
| + <core-item flex="" src="{{selectedItem.src}}" icon="{{selectedItem.icon}}" label="{{selectedItem ? selectedItem.label : label}}"></core-item>
|
| + <core-icon id="arrow" icon="{{opened ? 'arrow-drop-up' : 'arrow-drop-down'}}"></core-icon>
|
| + </div>
|
| +
|
| + <core-overlay target="{{$.menu}}" opened="{{opened}}" on-core-overlay-open="{{openAction}}"></core-overlay>
|
| +
|
| + <core-menu id="menu" selected="{{selected}}" selecteditem="{{selectedItem}}" selectedclass="{{selectedClass}}" valueattr="{{valueattr}}" selectedproperty="{{selectedProperty}}" selectedattribute="{{selectedAttribute}}" on-core-select="{{selectAction}}">
|
| + <content select="*"></content>
|
| + </core-menu>
|
| +
|
| +</template>
|
| +
|
| +</polymer-element><script src="core-dropdown-extracted.js"></script>
|
|
|