| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 2 @license | |
| 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 | |
| 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 | |
| 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 | |
| 9 --><html><head><link rel="import" href="../polymer/polymer.html"> | |
| 10 <link rel="import" href="../paper-styles/color.html"> | |
| 11 <link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> | |
| 12 | |
| 13 <!-- | |
| 14 Element providing material design circular spinner. | |
| 15 | |
| 16 <paper-spinner active></paper-spinner> | |
| 17 | |
| 18 The default spinner cycles between four layers of colors; by default they are | |
| 19 blue, red, yellow and green. It can be customized so that it uses one color only | |
| 20 by setting all the layer colors to the same value. | |
| 21 | |
| 22 ### Accessibility | |
| 23 | |
| 24 Alt attribute should be set to provide adequate context for accessibility. If no
t provided, | |
| 25 it defaults to 'loading'. | |
| 26 Empty alt can be provided to mark the element as decorative if alternative conte
nt is provided | |
| 27 in another form (e.g. a text block following the spinner). | |
| 28 | |
| 29 <paper-spinner alt="Loading contacts list" active></paper-spinner> | |
| 30 | |
| 31 ### Styling | |
| 32 | |
| 33 The following custom properties and mixins are available for styling: | |
| 34 | |
| 35 Custom property | Description | Default | |
| 36 ----------------|-------------|---------- | |
| 37 `--paper-spinner-layer-1-color` | Color of the first spinner rotation | `--googl
e-blue-500` | |
| 38 `--paper-spinner-layer-2-color` | Color of the second spinner rotation | `--goog
le-red-500` | |
| 39 `--paper-spinner-layer-3-color` | Color of the third spinner rotation | `--googl
e-yellow-500` | |
| 40 `--paper-spinner-layer-4-color` | Color of the fourth spinner rotation | `--goog
le-green-500` | |
| 41 | |
| 42 @group Paper Elements | |
| 43 @element paper-spinner | |
| 44 @hero hero.svg | |
| 45 @demo demo/index.html | |
| 46 --> | |
| 47 | |
| 48 </head><body><dom-module id="paper-spinner"> | |
| 49 | |
| 50 <link rel="import" type="css" href="paper-spinner.css"> | |
| 51 | |
| 52 <template> | |
| 53 | |
| 54 <div id="spinnerContainer" class-name="[[_spinnerContainerClassName]]"> | |
| 55 <div class="spinner-layer layer-1"> | |
| 56 <div class="circle-clipper left"> | |
| 57 <div class="circle"></div> | |
| 58 </div><div class="gap-patch"> | |
| 59 <div class="circle"></div> | |
| 60 </div><div class="circle-clipper right"> | |
| 61 <div class="circle"></div> | |
| 62 </div> | |
| 63 </div> | |
| 64 | |
| 65 <div class="spinner-layer layer-2"> | |
| 66 <div class="circle-clipper left"> | |
| 67 <div class="circle"></div> | |
| 68 </div><div class="gap-patch"> | |
| 69 <div class="circle"></div> | |
| 70 </div><div class="circle-clipper right"> | |
| 71 <div class="circle"></div> | |
| 72 </div> | |
| 73 </div> | |
| 74 | |
| 75 <div class="spinner-layer layer-3"> | |
| 76 <div class="circle-clipper left"> | |
| 77 <div class="circle"></div> | |
| 78 </div><div class="gap-patch"> | |
| 79 <div class="circle"></div> | |
| 80 </div><div class="circle-clipper right"> | |
| 81 <div class="circle"></div> | |
| 82 </div> | |
| 83 </div> | |
| 84 | |
| 85 <div class="spinner-layer layer-4"> | |
| 86 <div class="circle-clipper left"> | |
| 87 <div class="circle"></div> | |
| 88 </div><div class="gap-patch"> | |
| 89 <div class="circle"></div> | |
| 90 </div><div class="circle-clipper right"> | |
| 91 <div class="circle"></div> | |
| 92 </div> | |
| 93 </div> | |
| 94 </div> | |
| 95 | |
| 96 </template> | |
| 97 | |
| 98 </dom-module> | |
| 99 <script src="paper-spinner-extracted.js"></script></body></html> | |
| OLD | NEW |