1 <polymer-element name=
"polymer-body" extends=
"body" assetpath=
"../polymer/">
7 Copyright 2013 The Polymer Authors. All rights reserved.
8 Use of this source code is governed by a BSD-style
9 license that can be found in the LICENSE file.
12 <!-- <link rel="import" href="../polymer-dev/polymer.html"> -->
15 Copyright 2013 The Polymer Authors. All rights reserved.
16 Use of this source code is governed by a BSD-style
17 license that can be found in the LICENSE file.
21 * @module Polymer Elements
26 * The polymer-selection element is used to manage selection state. It has no
27 * visual appearance and is typically used in conjuneciton with another element.
28 * For example, <a href="polymer-selector.html">polymer-selector</a>
29 * use a polymer-selection to manage selection.
31 * To mark an item as selected, call the select(item) method on
32 * polymer-selection. Notice that the item itself is an argument to this method.
33 * The polymer-selection element manages selection state for any given set of
34 * items. When an item is selected, the `polymer-select` event is fired.
35 * The attribute "multi" indicates if multiple items can be selected at once.
39 * <polymer-element name="selection-example">
42 * ::-webkit-distributed(> .selected) {
47 * <ul on-tap="{{itemTapAction}}">
50 * <polymer-selection id="selection" multi on-polymer-select="{{selectAction}}"></polymer-selection>
53 * Polymer('selection-example', {
54 * itemTapAction: function(e) {
55 * this.$.selection.select(e.target);
57 * selectAction: function(e, detail) {
58 * detail.item.classList.toggle('selected', detail.isSelected);
68 * </selection-example>
70 * @class polymer-selection
73 * Fired when an item's selection state is changed. This event is fired both
74 * when an item is selected or deselected. The `isSelected` detail property
75 * contains the selection state.
77 * @event polymer-select
78 * @param {Object} detail
79 * @param {boolean} detail.isSelected true for selection and false for deselection
80 * @param {Object} detail.item the item element
85 <polymer-element name="polymer-selection" attributes="multi" assetpath="../polymer-selection/">
89 display: none !important;
97 Copyright 2013 The Polymer Authors. All rights reserved.
98 Use of this source code is governed by a BSD-style
99 license that can be found in the LICENSE file.
103 * @module Polymer Elements
106 * polymer-selector is used to manage a list of elements that can be selected.
107 * The attribute "selected" indicates which item element is being selected.
108 * The attribute "multi" indicates if multiple items can be selected at once.
109 * Tapping on the item element would fire "polymer-activate" event. Use
110 * "polymer-select" event to listen for selection changes.
114 * <polymer-selector selected="0">
118 * </polymer-selector>
120 * polymer-selector is not styled. So one needs to use "polymer-selected" CSS
121 * class to style the selected element.
124 * .item.polymer-selected {
130 * <div class="item">Item 1</div>
131 * <div class="item">Item 2</div>
132 * <div class="item">Item 3</div>
133 * </polymer-selector>
135 * @class polymer-selector
139 * Fired when an item's selection state is changed. This event is fired both
140 * when an item is selected or deselected. The `isSelected` detail property
141 * contains the selection state.
143 * @event polymer-select
144 * @param {Object} detail
145 * @param {boolean} detail.isSelected true for selection and false for deselection
146 * @param {Object} detail.item the item element
149 * Fired when an item element is tapped.
151 * @event polymer-activate
152 * @param {Object} detail
153 * @param {Object} detail.item the item element
159 <polymer-element name="polymer-selector" attributes="selected multi valueattr selectedClass selectedProperty selectedAttribute selectedItem selectedModel selectedIndex notap target itemsSelector activateEvent" assetpath="../polymer-selector/">
161 <polymer-selection id="selection" multi="{{multi}}" on-polymer-select="{{selectionSelect}}"></polymer-selection>
162 <content id="items" select="*"></content>
166 <!-- WARNING: DO NOT modify polymer-elements.html/polymer-elements.js. They
167 are automatically generated from polymer-elements.in.html using
170 <!-- Include all library elements here that should be vulcanized down to a
171 single html/js file. -->
174 <script src="polymer-elements.js"></script>