polymer-paper-elements-rails 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +51 -0
  3. data/Rakefile +1 -0
  4. data/app/assets/components/iron-a11y-announcer/iron-a11y-announcer.html +125 -0
  5. data/app/assets/components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html +418 -0
  6. data/app/assets/components/iron-autogrow-textarea/hero.svg +33 -0
  7. data/app/assets/components/iron-autogrow-textarea/iron-autogrow-textarea.html +263 -0
  8. data/app/assets/components/iron-behaviors/iron-button-state.html +195 -0
  9. data/app/assets/components/iron-behaviors/iron-control-state.html +102 -0
  10. data/app/assets/components/iron-fit-behavior/iron-fit-behavior.html +230 -0
  11. data/app/assets/components/iron-flex-layout/classes/iron-flex-layout.html +307 -0
  12. data/app/assets/components/iron-flex-layout/classes/iron-shadow-flex-layout.html +302 -0
  13. data/app/assets/components/iron-flex-layout/iron-flex-layout.html +313 -0
  14. data/app/assets/components/iron-form-element-behavior/iron-form-element-behavior.html +50 -0
  15. data/app/assets/components/iron-icon/hero.svg +19 -0
  16. data/app/assets/components/iron-icon/iron-icon.html +187 -0
  17. data/app/assets/components/iron-icons/av-icons.html +73 -0
  18. data/app/assets/components/iron-icons/communication-icons.html +59 -0
  19. data/app/assets/components/iron-icons/device-icons.html +94 -0
  20. data/app/assets/components/iron-icons/editor-icons.html +70 -0
  21. data/app/assets/components/iron-icons/hardware-icons.html +61 -0
  22. data/app/assets/components/iron-icons/hero.svg +35 -0
  23. data/app/assets/components/iron-icons/image-icons.html +164 -0
  24. data/app/assets/components/iron-icons/iron-icons.html +303 -0
  25. data/app/assets/components/iron-icons/maps-icons.html +71 -0
  26. data/app/assets/components/iron-icons/notification-icons.html +62 -0
  27. data/app/assets/components/iron-icons/social-icons.html +40 -0
  28. data/app/assets/components/iron-iconset-svg/iron-iconset-svg.html +191 -0
  29. data/app/assets/components/iron-input/hero.svg +19 -0
  30. data/app/assets/components/iron-input/iron-input.html +235 -0
  31. data/app/assets/components/iron-media-query/hero.svg +29 -0
  32. data/app/assets/components/iron-media-query/iron-media-query.html +84 -0
  33. data/app/assets/components/iron-menu-behavior/iron-menu-behavior.html +214 -0
  34. data/app/assets/components/iron-menu-behavior/iron-menubar-behavior.html +65 -0
  35. data/app/assets/components/iron-meta/hero.svg +33 -0
  36. data/app/assets/components/iron-meta/iron-meta.html +352 -0
  37. data/app/assets/components/iron-overlay-behavior/iron-overlay-backdrop.html +132 -0
  38. data/app/assets/components/iron-overlay-behavior/iron-overlay-behavior.html +432 -0
  39. data/app/assets/components/iron-overlay-behavior/iron-overlay-manager.html +107 -0
  40. data/app/assets/components/iron-range-behavior/iron-range-behavior.html +101 -0
  41. data/app/assets/components/iron-resizable-behavior/iron-resizable-behavior.html +139 -0
  42. data/app/assets/components/iron-selector/iron-multi-selectable.html +120 -0
  43. data/app/assets/components/iron-selector/iron-selectable.html +307 -0
  44. data/app/assets/components/iron-selector/iron-selection.html +115 -0
  45. data/app/assets/components/iron-selector/iron-selector.html +71 -0
  46. data/app/assets/components/iron-validatable-behavior/iron-validatable-behavior.html +100 -0
  47. data/app/assets/components/neon-animation/animations/cascaded-animation.html +84 -0
  48. data/app/assets/components/neon-animation/animations/fade-in-animation.html +49 -0
  49. data/app/assets/components/neon-animation/animations/fade-out-animation.html +49 -0
  50. data/app/assets/components/neon-animation/animations/hero-animation.html +83 -0
  51. data/app/assets/components/neon-animation/animations/opaque-animation.html +46 -0
  52. data/app/assets/components/neon-animation/animations/ripple-animation.html +92 -0
  53. data/app/assets/components/neon-animation/animations/scale-down-animation.html +65 -0
  54. data/app/assets/components/neon-animation/animations/scale-up-animation.html +58 -0
  55. data/app/assets/components/neon-animation/animations/slide-down-animation.html +59 -0
  56. data/app/assets/components/neon-animation/animations/slide-from-left-animation.html +60 -0
  57. data/app/assets/components/neon-animation/animations/slide-from-right-animation.html +60 -0
  58. data/app/assets/components/neon-animation/animations/slide-left-animation.html +59 -0
  59. data/app/assets/components/neon-animation/animations/slide-right-animation.html +59 -0
  60. data/app/assets/components/neon-animation/animations/slide-up-animation.html +59 -0
  61. data/app/assets/components/neon-animation/animations/transform-animation.html +61 -0
  62. data/app/assets/components/neon-animation/guides/neon-animation.md +313 -0
  63. data/app/assets/components/neon-animation/neon-animatable-behavior.html +156 -0
  64. data/app/assets/components/neon-animation/neon-animatable.html +54 -0
  65. data/app/assets/components/neon-animation/neon-animated-pages.html +208 -0
  66. data/app/assets/components/neon-animation/neon-animation-behavior.html +88 -0
  67. data/app/assets/components/neon-animation/neon-animation-runner-behavior.html +110 -0
  68. data/app/assets/components/neon-animation/neon-animation.html +17 -0
  69. data/app/assets/components/neon-animation/neon-animations.html +25 -0
  70. data/app/assets/components/neon-animation/neon-shared-element-animatable-behavior.html +37 -0
  71. data/app/assets/components/neon-animation/neon-shared-element-animation-behavior.html +66 -0
  72. data/app/assets/components/neon-animation/web-animations.html +11 -0
  73. data/app/assets/components/paper-behaviors/paper-button-behavior.html +55 -0
  74. data/app/assets/components/paper-behaviors/paper-inky-focus-behavior.html +44 -0
  75. data/app/assets/components/paper-button/paper-button.html +177 -0
  76. data/app/assets/components/paper-checkbox/metadata.html +17 -0
  77. data/app/assets/components/paper-checkbox/paper-checkbox.css +149 -0
  78. data/app/assets/components/paper-checkbox/paper-checkbox.html +163 -0
  79. data/app/assets/components/paper-dialog-behavior/hero.svg +51 -0
  80. data/app/assets/components/paper-dialog-behavior/paper-dialog-behavior.html +236 -0
  81. data/app/assets/components/paper-dialog-behavior/paper-dialog-common.css +58 -0
  82. data/app/assets/components/paper-dialog-scrollable/hero.svg +69 -0
  83. data/app/assets/components/paper-dialog-scrollable/paper-dialog-scrollable.html +150 -0
  84. data/app/assets/components/paper-dialog/hero.svg +58 -0
  85. data/app/assets/components/paper-dialog/paper-dialog.html +122 -0
  86. data/app/assets/components/paper-drawer-panel/hero.svg +21 -0
  87. data/app/assets/components/paper-drawer-panel/paper-drawer-panel.css +142 -0
  88. data/app/assets/components/paper-drawer-panel/paper-drawer-panel.html +585 -0
  89. data/app/assets/components/paper-fab/paper-fab.html +159 -0
  90. data/app/assets/components/paper-header-panel/hero.svg +38 -0
  91. data/app/assets/components/paper-header-panel/paper-header-panel.html +496 -0
  92. data/app/assets/components/paper-icon-button/paper-icon-button.html +141 -0
  93. data/app/assets/components/paper-input/all-imports.html +12 -0
  94. data/app/assets/components/paper-input/hero.svg +19 -0
  95. data/app/assets/components/paper-input/paper-input-addon-behavior.html +43 -0
  96. data/app/assets/components/paper-input/paper-input-behavior.html +293 -0
  97. data/app/assets/components/paper-input/paper-input-char-counter.html +95 -0
  98. data/app/assets/components/paper-input/paper-input-container.html +495 -0
  99. data/app/assets/components/paper-input/paper-input-error.html +99 -0
  100. data/app/assets/components/paper-input/paper-input.html +126 -0
  101. data/app/assets/components/paper-input/paper-textarea.html +100 -0
  102. data/app/assets/components/paper-item/all-imports.html +13 -0
  103. data/app/assets/components/paper-item/paper-icon-item.html +86 -0
  104. data/app/assets/components/paper-item/paper-item-body.html +93 -0
  105. data/app/assets/components/paper-item/paper-item-shared.css +19 -0
  106. data/app/assets/components/paper-item/paper-item.html +95 -0
  107. data/app/assets/components/paper-material/paper-material.html +98 -0
  108. data/app/assets/components/paper-menu/hero.svg +35 -0
  109. data/app/assets/components/paper-menu/paper-menu.html +133 -0
  110. data/app/assets/components/paper-progress/hero.svg +21 -0
  111. data/app/assets/components/paper-progress/paper-progress.html +199 -0
  112. data/app/assets/components/paper-radio-button/hero.svg +22 -0
  113. data/app/assets/components/paper-radio-button/paper-radio-button.css +109 -0
  114. data/app/assets/components/paper-radio-button/paper-radio-button.html +148 -0
  115. data/app/assets/components/paper-radio-group/hero.svg +25 -0
  116. data/app/assets/components/paper-radio-group/paper-radio-group.html +186 -0
  117. data/app/assets/components/paper-ripple/hero.svg +30 -0
  118. data/app/assets/components/paper-ripple/paper-ripple.html +714 -0
  119. data/app/assets/components/paper-scroll-header-panel/hero.svg +41 -0
  120. data/app/assets/components/paper-scroll-header-panel/paper-scroll-header-panel.html +455 -0
  121. data/app/assets/components/paper-slider/hero.svg +20 -0
  122. data/app/assets/components/paper-slider/paper-slider.css +252 -0
  123. data/app/assets/components/paper-slider/paper-slider.html +449 -0
  124. data/app/assets/components/paper-spinner/hero.svg +27 -0
  125. data/app/assets/components/paper-spinner/paper-spinner.css +325 -0
  126. data/app/assets/components/paper-spinner/paper-spinner.html +222 -0
  127. data/app/assets/components/paper-styles/classes/global.html +96 -0
  128. data/app/assets/components/paper-styles/classes/shadow-layout.html +302 -0
  129. data/app/assets/components/paper-styles/classes/shadow.html +39 -0
  130. data/app/assets/components/paper-styles/classes/typography.html +171 -0
  131. data/app/assets/components/paper-styles/color.html +333 -0
  132. data/app/assets/components/paper-styles/default-theme.html +39 -0
  133. data/app/assets/components/paper-styles/paper-styles-classes.html +14 -0
  134. data/app/assets/components/paper-styles/paper-styles.html +17 -0
  135. data/app/assets/components/paper-styles/shadow.html +61 -0
  136. data/app/assets/components/paper-styles/typography.html +240 -0
  137. data/app/assets/components/paper-tabs/hero.svg +23 -0
  138. data/app/assets/components/paper-tabs/paper-tab.html +158 -0
  139. data/app/assets/components/paper-tabs/paper-tabs-icons.html +18 -0
  140. data/app/assets/components/paper-tabs/paper-tabs.html +483 -0
  141. data/app/assets/components/paper-toast/hero.svg +20 -0
  142. data/app/assets/components/paper-toast/paper-toast.html +164 -0
  143. data/app/assets/components/paper-toggle-button/hero.svg +22 -0
  144. data/app/assets/components/paper-toggle-button/paper-toggle-button.css +108 -0
  145. data/app/assets/components/paper-toggle-button/paper-toggle-button.html +183 -0
  146. data/app/assets/components/paper-toolbar/paper-toolbar.html +375 -0
  147. data/app/assets/components/polymer-gestures/Gruntfile.js +60 -0
  148. data/app/assets/components/polymer-gestures/banner.txt +9 -0
  149. data/app/assets/components/polymer-gestures/build.json +17 -0
  150. data/app/assets/components/polymer-gestures/conf/karma.conf.js +39 -0
  151. data/app/assets/components/polymer-gestures/package.json +20 -0
  152. data/app/assets/components/polymer-gestures/polymer-gestures.html +21 -0
  153. data/app/assets/components/polymer-gestures/polymer-gestures.js +46 -0
  154. data/app/assets/components/polymer-gestures/src/dispatcher.js +474 -0
  155. data/app/assets/components/polymer-gestures/src/eventFactory.js +127 -0
  156. data/app/assets/components/polymer-gestures/src/hold.js +129 -0
  157. data/app/assets/components/polymer-gestures/src/mouse.js +135 -0
  158. data/app/assets/components/polymer-gestures/src/ms.js +80 -0
  159. data/app/assets/components/polymer-gestures/src/pinch.js +186 -0
  160. data/app/assets/components/polymer-gestures/src/platform-events.js +39 -0
  161. data/app/assets/components/polymer-gestures/src/pointer.js +68 -0
  162. data/app/assets/components/polymer-gestures/src/pointermap.js +67 -0
  163. data/app/assets/components/polymer-gestures/src/scope.js +10 -0
  164. data/app/assets/components/polymer-gestures/src/tap.js +103 -0
  165. data/app/assets/components/polymer-gestures/src/targetfind.js +244 -0
  166. data/app/assets/components/polymer-gestures/src/touch-action.js +60 -0
  167. data/app/assets/components/polymer-gestures/src/touch.js +341 -0
  168. data/app/assets/components/polymer-gestures/src/track.js +230 -0
  169. data/app/assets/components/web-animations-js/web-animations-next-lite.min.js +17 -0
  170. data/app/assets/components/web-animations-js/web-animations-next.min.js +17 -0
  171. data/app/assets/components/web-animations-js/web-animations.min.js +17 -0
  172. data/app/assets/components/webcomponentsjs/CustomElements.js +956 -0
  173. data/app/assets/components/webcomponentsjs/CustomElements.min.js +11 -0
  174. data/app/assets/components/webcomponentsjs/HTMLImports.js +1078 -0
  175. data/app/assets/components/webcomponentsjs/HTMLImports.min.js +11 -0
  176. data/app/assets/components/webcomponentsjs/MutationObserver.js +344 -0
  177. data/app/assets/components/webcomponentsjs/MutationObserver.min.js +11 -0
  178. data/app/assets/components/webcomponentsjs/ShadowDOM.js +4414 -0
  179. data/app/assets/components/webcomponentsjs/ShadowDOM.min.js +15 -0
  180. data/app/assets/components/webcomponentsjs/package.json +31 -0
  181. data/app/assets/components/webcomponentsjs/webcomponents-lite.js +2300 -0
  182. data/app/assets/components/webcomponentsjs/webcomponents-lite.min.js +13 -0
  183. data/app/assets/components/webcomponentsjs/webcomponents.js +7112 -0
  184. data/app/assets/components/webcomponentsjs/webcomponents.min.js +15 -0
  185. data/lib/polymer-paper-elements-rails.rb +2 -0
  186. data/lib/polymer-paper-elements-rails/engine.rb +4 -0
  187. data/lib/polymer-paper-elements-rails/version.rb +3 -0
  188. metadata +272 -0
@@ -0,0 +1,99 @@
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.github.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/CONTRIBUTORS.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/PATENTS.txt
9
+ -->
10
+
11
+ <link rel="import" href="../polymer/polymer.html">
12
+ <link rel="import" href="../paper-styles/paper-styles.html">
13
+ <link rel="import" href="paper-input-addon-behavior.html">
14
+
15
+ <!--
16
+ `<paper-input-error>` is an error message for use with `<paper-input-container>`. The error is
17
+ displayed when the `<paper-input-container>` is `invalid`.
18
+
19
+ <paper-input-container>
20
+ <input is="iron-input" pattern="[0-9]*">
21
+ <paper-input-error>Only numbers are allowed!</paper-input-error>
22
+ </paper-input-container>
23
+
24
+ ### Styling
25
+
26
+ The following custom properties and mixins are available for styling:
27
+
28
+ Custom property | Description | Default
29
+ ----------------|-------------|----------
30
+ `--paper-input-container-invalid-color` | The foreground color of the error | `--google-red-500`
31
+ `--paper-input-error` | Mixin applied to the error | `{}`
32
+ -->
33
+ <dom-module id="paper-input-error">
34
+
35
+ <style>
36
+
37
+ :host {
38
+ /* need to use display: none for role="alert" */
39
+ display: none;
40
+ float: left;
41
+
42
+ color: var(--paper-input-container-invalid-color, --google-red-500);
43
+
44
+ @apply(--paper-font-caption);
45
+ @apply(--paper-input-error);
46
+ }
47
+
48
+ :host([invalid]) {
49
+ display: inline-block;
50
+ };
51
+
52
+ </style>
53
+
54
+ <template>
55
+
56
+ <content></content>
57
+
58
+ </template>
59
+
60
+ </dom-module>
61
+
62
+ <script>
63
+
64
+ (function() {
65
+
66
+ Polymer({
67
+
68
+ is: 'paper-input-error',
69
+
70
+ behaviors: [
71
+ Polymer.PaperInputAddonBehavior
72
+ ],
73
+
74
+ hostAttributes: {
75
+ 'role': 'alert'
76
+ },
77
+
78
+ properties: {
79
+
80
+ /**
81
+ * True if the error is showing.
82
+ */
83
+ invalid: {
84
+ readOnly: true,
85
+ reflectToAttribute: true,
86
+ type: Boolean
87
+ }
88
+
89
+ },
90
+
91
+ update: function(state) {
92
+ this._setInvalid(state.invalid);
93
+ }
94
+
95
+ })
96
+
97
+ })();
98
+
99
+ </script>
@@ -0,0 +1,126 @@
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.github.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/CONTRIBUTORS.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/PATENTS.txt
9
+ -->
10
+ <link rel="import" href="../polymer/polymer.html">
11
+ <link rel="import" href="../iron-input/iron-input.html">
12
+ <link rel="import" href="../iron-form-element-behavior/iron-form-element-behavior.html">
13
+ <link rel="import" href="paper-input-behavior.html">
14
+ <link rel="import" href="paper-input-container.html">
15
+ <link rel="import" href="paper-input-error.html">
16
+ <link rel="import" href="paper-input-char-counter.html">
17
+
18
+ <!--
19
+ `<paper-input>` is a single-line text field with Material Design styling.
20
+
21
+ <paper-input label="Input label"></paper-input>
22
+
23
+ It may include an optional error message or character counter.
24
+
25
+ <paper-input error-message="Invalid input!" label="Input label"></paper-input>
26
+ <paper-input char-counter label="Input label"></paper-input>
27
+
28
+ See `Polymer.PaperInputBehavior` for more API docs.
29
+
30
+ ### Styling
31
+
32
+ See `Polymer.PaperInputContainer` for a list of custom properties used to
33
+ style this element.
34
+
35
+ @group Paper Elements
36
+ @element paper-input
37
+ @hero hero.svg
38
+ @demo demo/index.html
39
+ -->
40
+
41
+ <dom-module id="paper-input">
42
+
43
+ <style>
44
+
45
+ :host {
46
+ display: block;
47
+ }
48
+
49
+ input::-webkit-input-placeholder {
50
+ color: var(--paper-input-container-color, --secondary-text-color);
51
+ }
52
+
53
+ input:-moz-placeholder {
54
+ color: var(--paper-input-container-color, --secondary-text-color);
55
+ }
56
+
57
+ input::-moz-placeholder {
58
+ color: var(--paper-input-container-color, --secondary-text-color);
59
+ }
60
+
61
+ input:-ms-input-placeholder {
62
+ color: var(--paper-input-container-color, --secondary-text-color);
63
+ }
64
+
65
+ </style>
66
+
67
+ <template>
68
+
69
+ <paper-input-container no-label-float="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]">
70
+
71
+ <label hidden$="[[!label]]">[[label]]</label>
72
+
73
+ <input is="iron-input" id="input"
74
+ aria-labelledby$="[[_ariaLabelledBy]]"
75
+ aria-describedby$="[[_ariaDescribedBy]]"
76
+ disabled$="[[disabled]]"
77
+ bind-value="{{value}}"
78
+ invalid="{{invalid}}"
79
+ prevent-invalid-input="[[preventInvalidInput]]"
80
+ allowedPattern="[[allowedPattern]]"
81
+ validator="[[validator]]"
82
+ type$="[[type]]"
83
+ pattern$="[[pattern]]"
84
+ maxlength$="[[maxlength]]"
85
+ required$="[[required]]"
86
+ autocomplete$="[[autocomplete]]"
87
+ autofocus$="[[autofocus]]"
88
+ inputmode$="[[inputmode]]"
89
+ minlength$="[[minlength]]"
90
+ name$="[[name]]"
91
+ placeholder$="[[placeholder]]"
92
+ readonly$="[[readonly]]"
93
+ size$="[[size]]">
94
+
95
+ <template is="dom-if" if="[[errorMessage]]">
96
+ <paper-input-error>[[errorMessage]]</paper-input-error>
97
+ </template>
98
+
99
+ <template is="dom-if" if="[[charCounter]]">
100
+ <paper-input-char-counter></paper-input-char-counter>
101
+ </template>
102
+
103
+ </paper-input-container>
104
+
105
+ </template>
106
+
107
+ </dom-module>
108
+
109
+ <script>
110
+
111
+ (function() {
112
+
113
+ Polymer({
114
+
115
+ is: 'paper-input',
116
+
117
+ behaviors: [
118
+ Polymer.PaperInputBehavior,
119
+ Polymer.IronFormElementBehavior
120
+ ]
121
+
122
+ })
123
+
124
+ })();
125
+
126
+ </script>
@@ -0,0 +1,100 @@
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.github.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/CONTRIBUTORS.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/PATENTS.txt
9
+ -->
10
+ <link rel="import" href="../polymer/polymer.html">
11
+ <link rel="import" href="../iron-autogrow-textarea/iron-autogrow-textarea.html">
12
+ <link rel="import" href="../iron-form-element-behavior/iron-form-element-behavior.html">
13
+ <link rel="import" href="paper-input-behavior.html">
14
+ <link rel="import" href="paper-input-container.html">
15
+ <link rel="import" href="paper-input-error.html">
16
+ <link rel="import" href="paper-input-char-counter.html">
17
+
18
+ <!--
19
+ `<paper-textarea>` is a multi-line text field with Material Design styling.
20
+
21
+ <paper-textarea label="Textarea label"></paper-textarea>
22
+
23
+ See `Polymer.PaperInputBehavior` for more API docs.
24
+
25
+ ### Validation
26
+
27
+ Currently only `required` and `maxlength` validation is supported.
28
+
29
+ ### Styling
30
+
31
+ See `Polymer.PaperInputContainer` for a list of custom properties used to
32
+ style this element.
33
+ -->
34
+
35
+ <dom-module id="paper-textarea">
36
+ <template>
37
+
38
+ <paper-input-container no-label-float$="[[noLabelFloat]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]">
39
+
40
+ <label hidden$="[[!label]]">[[label]]</label>
41
+
42
+ <iron-autogrow-textarea id="input" class="paper-input-input"
43
+ bind-value="{{value}}"
44
+ required$="[[required]]"
45
+ maxlength$="[[maxlength]]"></iron-autogrow-textarea>
46
+
47
+ <template is="dom-if" if="[[errorMessage]]">
48
+ <paper-input-error>[[errorMessage]]</paper-input-error>
49
+ </template>
50
+
51
+ <template is="dom-if" if="[[charCounter]]">
52
+ <paper-input-char-counter></paper-input-char-counter>
53
+ </template>
54
+
55
+ </paper-input-container>
56
+
57
+ </template>
58
+
59
+ </dom-module>
60
+
61
+ <script>
62
+
63
+ (function() {
64
+
65
+ Polymer({
66
+
67
+ is: 'paper-textarea',
68
+
69
+ behaviors: [
70
+ Polymer.PaperInputBehavior,
71
+ Polymer.IronFormElementBehavior
72
+ ],
73
+
74
+ properties: {
75
+
76
+ _ariaLabelledBy: {
77
+ observer: '_ariaLabelledByChanged',
78
+ type: String
79
+ },
80
+
81
+ _ariaDescribedBy: {
82
+ observer: '_ariaDescribedByChanged',
83
+ type: String
84
+ }
85
+
86
+ },
87
+
88
+ _ariaLabelledByChanged: function(ariaLabelledBy) {
89
+ this.$.input.textarea.setAttribute('aria-labelledby', ariaLabelledBy);
90
+ },
91
+
92
+ _ariaDescribedByChanged: function(ariaDescribedBy) {
93
+ this.$.input.textarea.setAttribute('aria-describedby', ariaDescribedBy);
94
+ }
95
+
96
+ });
97
+
98
+ })();
99
+
100
+ </script>
@@ -0,0 +1,13 @@
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.github.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/CONTRIBUTORS.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/PATENTS.txt
9
+ -->
10
+
11
+ <link rel="import" href="paper-item.html">
12
+ <link rel="import" href="paper-item-body.html">
13
+ <link rel="import" href="paper-icon-item.html">
@@ -0,0 +1,86 @@
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.github.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/CONTRIBUTORS.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/PATENTS.txt
9
+ -->
10
+
11
+ <link rel="import" href="../polymer/polymer.html">
12
+ <link rel="import" href="../paper-styles/paper-styles.html">
13
+
14
+ <!--
15
+ `<paper-icon-item>` is a convenience element to make an item with icon. It is a non interactive list
16
+ item with a fixed-width icon area, according to Material Design. This is useful if the icons are of
17
+ varying widths, but you want the item bodies to line up. Use this like a `<paper-item>`. The child
18
+ node with the attribute `item-icon` is placed in the icon area.
19
+
20
+ <paper-icon-item>
21
+ <iron-icon icon="favorite" item-icon></iron-icon>
22
+ Favorite
23
+ </paper-icon-item>
24
+ <paper-icon-item>
25
+ <div class="avatar" item-icon></div>
26
+ Avatar
27
+ </paper-icon-item>
28
+
29
+ ### Styling
30
+
31
+ The following custom properties and mixins are available for styling:
32
+
33
+ Custom property | Description | Default
34
+ ----------------|-------------|----------
35
+ `--paper-item-icon-width` | Width of the icon area | `56px`
36
+ `--paper-icon-item` | Mixin applied to the item | `{}`
37
+
38
+ -->
39
+
40
+ <dom-module id="paper-icon-item">
41
+
42
+ <link rel="import" type="css" href="paper-item-shared.css">
43
+
44
+ <style>
45
+
46
+ :host {
47
+ @apply(--layout-horizontal);
48
+ @apply(--layout-center);
49
+ @apply(--paper-font-subhead);
50
+
51
+ @apply(--paper-item);
52
+ @apply(--paper-icon-item);
53
+ }
54
+
55
+ .content-icon {
56
+ width: var(--paper-item-icon-width, 56px);
57
+ }
58
+
59
+ </style>
60
+
61
+ <template>
62
+ <div id="contentIcon" class="content-icon layout horizontal center">
63
+ <content select="[item-icon]"></content>
64
+ </div>
65
+ <content></content>
66
+ </template>
67
+
68
+ </dom-module>
69
+
70
+ <script>
71
+
72
+ (function() {
73
+
74
+ Polymer({
75
+
76
+ is: 'paper-icon-item',
77
+
78
+ hostAttributes: {
79
+ 'role': 'listitem'
80
+ }
81
+
82
+ });
83
+
84
+ })();
85
+
86
+ </script>
@@ -0,0 +1,93 @@
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.github.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/CONTRIBUTORS.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/PATENTS.txt
9
+ -->
10
+
11
+ <link rel="import" href="../polymer/polymer.html">
12
+ <link rel="import" href="../paper-styles/paper-styles.html">
13
+
14
+ <!--
15
+ Use `<paper-item-body>` in a `<paper-item>` or `<paper-icon-item>` to make two- or
16
+ three- line items. It is a flex item that is a vertical flexbox.
17
+
18
+ <paper-item>
19
+ <paper-item-body two-line>
20
+ <div>Show your status</div>
21
+ <div secondary>Your status is visible to everyone</div>
22
+ </paper-item-body>
23
+ </paper-item>
24
+
25
+ The child elements with the `secondary` attribute is given secondary text styling.
26
+
27
+ ### Styling
28
+
29
+ The following custom properties and mixins are available for styling:
30
+
31
+ Custom property | Description | Default
32
+ ----------------|-------------|----------
33
+ `--paper-item-body-two-line-min-height` | Minimum height of a two-line item | `72px`
34
+ `--paper-item-body-three-line-min-height` | Minimum height of a three-line item | `88px`
35
+ `--paper-item-body-secondary-color` | Foreground color for the `secondary` area | `--secondary-text-color`
36
+ `--paper-item-body-secondary` | Mixin applied to the `secondary` area | `{}`
37
+
38
+ -->
39
+
40
+ <dom-module id="paper-item-body">
41
+
42
+ <style>
43
+
44
+ :host {
45
+ overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */
46
+ @apply(--layout-vertical);
47
+ @apply(--layout-center-justified);
48
+ @apply(--layout-flex);
49
+ }
50
+
51
+ :host([two-line]) {
52
+ min-height: var(--paper-item-body-two-line-min-height, 72px);
53
+ }
54
+
55
+ :host([three-line]) {
56
+ min-height: var(--paper-item-body-three-line-min-height, 88px);
57
+ }
58
+
59
+ :host > ::content > * {
60
+ white-space: nowrap;
61
+ overflow: hidden;
62
+ text-overflow: ellipsis;
63
+ }
64
+
65
+ :host > ::content [secondary] {
66
+ color: var(--paper-item-body-secondary-color, --secondary-text-color);
67
+ @apply(--paper-font-body1);
68
+
69
+ @apply(--paper-item-body-secondary);
70
+ }
71
+
72
+
73
+ </style>
74
+
75
+ <template>
76
+ <content></content>
77
+ </template>
78
+
79
+ </dom-module>
80
+
81
+ <script>
82
+
83
+ (function() {
84
+
85
+ Polymer({
86
+
87
+ is: 'paper-item-body'
88
+
89
+ });
90
+
91
+ })();
92
+
93
+ </script>