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 --> |
| 10 |
| 11 <link rel="import" href="../polymer/polymer.html"> |
| 12 <link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> |
| 13 <link rel="import" href="../paper-styles/color.html"> |
| 14 <link rel="import" href="paper-spinner-behavior.html"> |
| 15 <link rel="import" href="paper-spinner-styles.html"> |
| 16 |
| 17 <!-- |
| 18 Material design: [Progress & activity](https://www.google.com/design/spec/compon
ents/progress-activity.html) |
| 19 |
| 20 Element providing a single color material design circular spinner. |
| 21 |
| 22 <paper-spinner-lite active></paper-spinner-lite> |
| 23 |
| 24 The default spinner is blue. It can be customized to be a different color. |
| 25 |
| 26 ### Accessibility |
| 27 |
| 28 Alt attribute should be set to provide adequate context for accessibility. If no
t provided, |
| 29 it defaults to 'loading'. |
| 30 Empty alt can be provided to mark the element as decorative if alternative conte
nt is provided |
| 31 in another form (e.g. a text block following the spinner). |
| 32 |
| 33 <paper-spinner-lite alt="Loading contacts list" active></paper-spinner-lite> |
| 34 |
| 35 ### Styling |
| 36 |
| 37 The following custom properties and mixins are available for styling: |
| 38 |
| 39 Custom property | Description | Default |
| 40 ----------------|-------------|---------- |
| 41 `--paper-spinner-color` | Color of the spinner | `--google-blue-500` |
| 42 |
| 43 @group Paper Elements |
| 44 @element paper-spinner-lite |
| 45 @hero hero.svg |
| 46 @demo demo/index.html |
| 47 --> |
| 48 |
| 49 <dom-module id="paper-spinner-lite"> |
| 50 <template> |
| 51 <style include="paper-spinner-styles"></style> |
| 52 |
| 53 <div id="spinnerContainer" class-name="[[__computeContainerClasses(active, _
_coolingDown)]]"> |
| 54 <div class="spinner-layer"> |
| 55 <div class="circle-clipper left"> |
| 56 <div class="circle"></div> |
| 57 </div><div class="gap-patch"> |
| 58 <div class="circle"></div> |
| 59 </div><div class="circle-clipper right"> |
| 60 <div class="circle"></div> |
| 61 </div> |
| 62 </div> |
| 63 </div> |
| 64 </template> |
| 65 |
| 66 <script> |
| 67 Polymer({ |
| 68 is: 'paper-spinner-lite', |
| 69 |
| 70 behaviors: [ |
| 71 Polymer.PaperSpinnerBehavior |
| 72 ] |
| 73 }); |
| 74 </script> |
| 75 </dom-module> |
OLD | NEW |