polymer-paper-rails 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +69 -0
- data/Rakefile +1 -0
- data/app/assets/components/core/animation/web-animations.html.erb +1 -0
- data/app/assets/components/core/animation/web-animations.js +5666 -0
- data/app/assets/components/core/icon/core-icon.css +25 -0
- data/app/assets/components/core/icon/core-icon.html.erb +126 -0
- data/app/assets/components/core/iconset/core-iconset.html.erb +236 -0
- data/app/assets/components/core/input/core-input.css +35 -0
- data/app/assets/components/core/input/core-input.html.erb +385 -0
- data/app/assets/components/core/list/core-list.css +20 -0
- data/app/assets/components/core/list/core-list.html.erb +403 -0
- data/app/assets/components/core/media-query/core-media-query.html +86 -0
- data/app/assets/components/core/menu/core-menu.css +18 -0
- data/app/assets/components/core/menu/core-menu.html.erb +62 -0
- data/app/assets/components/core/menu/core-submenu.css +29 -0
- data/app/assets/components/core/menu/core-submenu.html.erb +106 -0
- data/app/assets/components/core/meta/core-meta.html +143 -0
- data/app/assets/components/core/overlay/core-key-helper.html +17 -0
- data/app/assets/components/core/overlay/core-overlay-layer.html +112 -0
- data/app/assets/components/core/overlay/core-overlay.html.erb +661 -0
- data/app/assets/components/core/range/core-range.html +106 -0
- data/app/assets/components/core/selection/core-selection.html +148 -0
- data/app/assets/components/core/selector/core-selector.html.erb +423 -0
- data/app/assets/components/core/style/core-style.html +386 -0
- data/app/assets/components/core/transition/core-transition-css.html.erb +76 -0
- data/app/assets/components/core/transition/core-transition-overlay.css +46 -0
- data/app/assets/components/core/transition/core-transition.html.erb +44 -0
- data/app/assets/components/paper-button/paper-button.css +115 -0
- data/app/assets/components/paper-button/paper-button.html.erb +210 -0
- data/app/assets/components/paper-checkbox/paper-checkbox.css +262 -0
- data/app/assets/components/paper-checkbox/paper-checkbox.html.erb +104 -0
- data/app/assets/components/paper-dialog/paper-dialog-transition.css +59 -0
- data/app/assets/components/paper-dialog/paper-dialog-transition.html.erb +27 -0
- data/app/assets/components/paper-dialog/paper-dialog.css +0 -0
- data/app/assets/components/paper-dialog/paper-dialog.html.erb +176 -0
- data/app/assets/components/paper-fab/paper-fab.css +27 -0
- data/app/assets/components/paper-fab/paper-fab.html.erb +55 -0
- data/app/assets/components/paper-focusable/paper-focusable.html +144 -0
- data/app/assets/components/paper-icon-button/paper-icon-button.css +17 -0
- data/app/assets/components/paper-icon-button/paper-icon-button.html.erb +87 -0
- data/app/assets/components/paper-input/error-100.png +0 -0
- data/app/assets/components/paper-input/error-200.png +0 -0
- data/app/assets/components/paper-input/paper-input.html.erb +398 -0
- data/app/assets/components/paper-input/paper-input.scss +203 -0
- data/app/assets/components/paper-item/paper-item.css +30 -0
- data/app/assets/components/paper-item/paper-item.html.erb +103 -0
- data/app/assets/components/paper-menu-button/paper-menu-button-overlay.html.erb +86 -0
- data/app/assets/components/paper-menu-button/paper-menu-button-transition.css +19 -0
- data/app/assets/components/paper-menu-button/paper-menu-button-transition.html.erb +118 -0
- data/app/assets/components/paper-menu-button/paper-menu-button.css +86 -0
- data/app/assets/components/paper-menu-button/paper-menu-button.html.erb +128 -0
- data/app/assets/components/paper-progress/paper-progress.css +35 -0
- data/app/assets/components/paper-progress/paper-progress.html.erb +98 -0
- data/app/assets/components/paper-radio-button/paper-radio-button.css +98 -0
- data/app/assets/components/paper-radio-button/paper-radio-button.html.erb +148 -0
- data/app/assets/components/paper-radio-group/paper-radio-group.html.erb +68 -0
- data/app/assets/components/paper-ripple/paper-ripple.html +426 -0
- data/app/assets/components/paper-shadow/paper-shadow.css +81 -0
- data/app/assets/components/paper-shadow/paper-shadow.html.erb +212 -0
- data/app/assets/components/paper-slider/paper-slider.css +193 -0
- data/app/assets/components/paper-slider/paper-slider.html.erb +310 -0
- data/app/assets/components/paper-tabs/paper-tab.css +49 -0
- data/app/assets/components/paper-tabs/paper-tab.html.erb +66 -0
- data/app/assets/components/paper-tabs/paper-tabs.css +57 -0
- data/app/assets/components/paper-tabs/paper-tabs.html.erb +127 -0
- data/app/assets/components/paper-toast/paper-toast.css +0 -0
- data/app/assets/components/paper-toast/paper-toast.html.erb +258 -0
- data/app/assets/components/paper-toggle-button/paper-toggle-button.css +61 -0
- data/app/assets/components/paper-toggle-button/paper-toggle-button.html.erb +125 -0
- data/lib/polymer-paper-rails/engine.rb +4 -0
- data/lib/polymer-paper-rails/version.rb +3 -0
- data/lib/polymer-paper-rails.rb +2 -0
- metadata +158 -0
@@ -0,0 +1,104 @@
|
|
1
|
+
<!--
|
2
|
+
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
3
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
4
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
5
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
6
|
+
Code distributed by Google as part of the polymer project is also
|
7
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
8
|
+
-->
|
9
|
+
|
10
|
+
<!--
|
11
|
+
`paper-checkbox` is a button that can be either checked or unchecked. User
|
12
|
+
can tap the checkbox to check or uncheck it. Usually you use checkboxes
|
13
|
+
to allow user to select multiple options from a set. If you have a single
|
14
|
+
ON/OFF option, avoid using a single checkbox and use `paper-toggle-button`
|
15
|
+
instead.
|
16
|
+
|
17
|
+
Example:
|
18
|
+
|
19
|
+
<paper-checkbox></paper-checkbox>
|
20
|
+
|
21
|
+
<paper-checkbox checked></paper-checkbox>
|
22
|
+
|
23
|
+
Styling checkbox:
|
24
|
+
|
25
|
+
To change the ink color for checked state:
|
26
|
+
|
27
|
+
paper-checkbox::shadow #ink[checked] {
|
28
|
+
color: #4285f4;
|
29
|
+
}
|
30
|
+
|
31
|
+
To change the checkbox checked color:
|
32
|
+
|
33
|
+
paper-checkbox::shadow #checkbox.checked {
|
34
|
+
border-color: #4285f4;
|
35
|
+
}
|
36
|
+
|
37
|
+
To change the ink color for unchecked state:
|
38
|
+
|
39
|
+
paper-checkbox::shadow #ink {
|
40
|
+
color: #b5b5b5;
|
41
|
+
}
|
42
|
+
|
43
|
+
To change the checbox unchecked color:
|
44
|
+
|
45
|
+
paper-checkbox::shadow #checkbox {
|
46
|
+
border-color: #b5b5b5;
|
47
|
+
}
|
48
|
+
|
49
|
+
@group Paper Elements
|
50
|
+
@element paper-checkbox
|
51
|
+
@extends paper-radio-button
|
52
|
+
@homepage github.io
|
53
|
+
-->
|
54
|
+
|
55
|
+
<%= html_import_tag "paper-radio-button/paper-radio-button" %>
|
56
|
+
|
57
|
+
<polymer-element name="paper-checkbox" extends="paper-radio-button" role="checkbox">
|
58
|
+
<template>
|
59
|
+
|
60
|
+
<%= stylesheet_link_tag "paper-checkbox/paper-checkbox" %>
|
61
|
+
|
62
|
+
<div id="checkboxContainer" class="{{ {labeled: label} | tokenList }}" >
|
63
|
+
|
64
|
+
<paper-ripple id="ink" class="circle recenteringTouch" checked?="{{!checked}}"></paper-ripple>
|
65
|
+
|
66
|
+
<div id="checkbox" on-animationend="{{checkboxAnimationEnd}}" on-webkitAnimationEnd="{{checkboxAnimationEnd}}"></div>
|
67
|
+
|
68
|
+
</div>
|
69
|
+
|
70
|
+
<div id="checkboxLabel" hidden?="{{!label}}">{{label}}<content></content></div>
|
71
|
+
|
72
|
+
</template>
|
73
|
+
<script>
|
74
|
+
|
75
|
+
Polymer('paper-checkbox', {
|
76
|
+
|
77
|
+
/**
|
78
|
+
* Fired when the checked state changes.
|
79
|
+
*
|
80
|
+
* @event change
|
81
|
+
*/
|
82
|
+
|
83
|
+
toggles: true,
|
84
|
+
|
85
|
+
checkedChanged: function() {
|
86
|
+
var cl = this.$.checkbox.classList;
|
87
|
+
cl.toggle('checked', this.checked);
|
88
|
+
cl.toggle('unchecked', !this.checked);
|
89
|
+
cl.toggle('checkmark', !this.checked);
|
90
|
+
cl.toggle('box', this.checked);
|
91
|
+
this.setAttribute('aria-checked', this.checked ? 'true': 'false');
|
92
|
+
this.fire('change');
|
93
|
+
},
|
94
|
+
|
95
|
+
checkboxAnimationEnd: function() {
|
96
|
+
var cl = this.$.checkbox.classList;
|
97
|
+
cl.toggle('checkmark', this.checked && !cl.contains('checkmark'));
|
98
|
+
cl.toggle('box', !this.checked && !cl.contains('box'));
|
99
|
+
}
|
100
|
+
|
101
|
+
});
|
102
|
+
|
103
|
+
</script>
|
104
|
+
</polymer-element>
|
@@ -0,0 +1,59 @@
|
|
1
|
+
/* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
2
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
3
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
4
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
5
|
+
Code distributed by Google as part of the polymer project is also
|
6
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */
|
7
|
+
|
8
|
+
:host(.paper-dialog-transition) {
|
9
|
+
outline: none;
|
10
|
+
opacity: 0;
|
11
|
+
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
12
|
+
-webkit-transition: -webkit-transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
13
|
+
}
|
14
|
+
|
15
|
+
:host(.paper-dialog-transition.core-opened) {
|
16
|
+
opacity: 1;
|
17
|
+
transform: none;
|
18
|
+
-webkit-transform: none;
|
19
|
+
}
|
20
|
+
|
21
|
+
:host(.paper-dialog-transition-bottom) {
|
22
|
+
transform: scale(0.9) translateY(200%);
|
23
|
+
-webkit-transform: scale(0.9) translateY(200%);
|
24
|
+
}
|
25
|
+
|
26
|
+
:host(.paper-dialog-transition-center.core-opened) {
|
27
|
+
animation: paper-dialog-transition-center-keyframes 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
28
|
+
-webkit-animation: paper-dialog-transition-center-keyframes 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
29
|
+
}
|
30
|
+
|
31
|
+
@keyframes paper-dialog-transition-center-keyframes {
|
32
|
+
0% {
|
33
|
+
transform: scale(0.5) translateY(0);
|
34
|
+
-webkit-transform: scale(0.5) translateY(0);
|
35
|
+
}
|
36
|
+
90% {
|
37
|
+
transform: scale(1) translateY(-10px);
|
38
|
+
-webkit-transform: scale(1) translateY(-10px);
|
39
|
+
}
|
40
|
+
100% {
|
41
|
+
transform: scale(1) translateY(0);
|
42
|
+
-webkit-transform: scale(1) translateY(0);
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
@-webkit-keyframes paper-dialog-transition-center-keyframes {
|
47
|
+
0% {
|
48
|
+
transform: scale(0.5) translateY(0);
|
49
|
+
-webkit-transform: scale(0.5) translateY(0);
|
50
|
+
}
|
51
|
+
90% {
|
52
|
+
transform: scale(1) translateY(-10px);
|
53
|
+
-webkit-transform: scale(1) translateY(-10px);
|
54
|
+
}
|
55
|
+
100% {
|
56
|
+
transform: scale(1) translateY(0);
|
57
|
+
-webkit-transform: scale(1) translateY(0);
|
58
|
+
}
|
59
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<!--
|
2
|
+
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
3
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
4
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
5
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
6
|
+
Code distributed by Google as part of the polymer project is also
|
7
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
8
|
+
-->
|
9
|
+
|
10
|
+
<%= html_import_tag "core/transition/core-transition-css" %>
|
11
|
+
|
12
|
+
<polymer-element name="paper-dialog-transition" extends="core-transition-css">
|
13
|
+
|
14
|
+
<template>
|
15
|
+
<%= stylesheet_link_tag "paper-dialog/paper-dialog-transition",'no-shim' => true %>
|
16
|
+
</template>
|
17
|
+
|
18
|
+
<script>
|
19
|
+
Polymer({
|
20
|
+
baseClass: 'paper-dialog-transition'
|
21
|
+
});
|
22
|
+
</script>
|
23
|
+
|
24
|
+
</polymer-element>
|
25
|
+
|
26
|
+
<paper-dialog-transition id="paper-dialog-transition-bottom" transitionType="bottom"></paper-dialog-transition>
|
27
|
+
<paper-dialog-transition id="paper-dialog-transition-center" transitionType="center"></paper-dialog-transition>
|
File without changes
|
@@ -0,0 +1,176 @@
|
|
1
|
+
<!--
|
2
|
+
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
3
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
4
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
5
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
6
|
+
Code distributed by Google as part of the polymer project is also
|
7
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
8
|
+
-->
|
9
|
+
|
10
|
+
<!--
|
11
|
+
Provides a dialog overlay.
|
12
|
+
|
13
|
+
Child elements that include a `dismissive` attribute are positioned in the lower left corner of the dialog. Elements that use the `affirmative` attribute are positioned in the lower right corner.
|
14
|
+
|
15
|
+
Child elements that include the `dismissive` or `affirmative` attribute will automatically toggle the dialog when clicked.
|
16
|
+
|
17
|
+
One child element should have the `autofocus` attribute so that the Enter key will automatically take action. This is
|
18
|
+
especially important for screen reader environments.
|
19
|
+
|
20
|
+
Example:
|
21
|
+
|
22
|
+
<paper-dialog heading="Title for dialog">
|
23
|
+
<p>Lorem ipsum ....</p>
|
24
|
+
<p>Id qui scripta ...</p>
|
25
|
+
<paper-button label="More Info..." dismissive></paper-button>
|
26
|
+
<paper-button label="Decline" affirmative></paper-button>
|
27
|
+
<paper-button label="Accept" affirmative autofocus></paper-button>
|
28
|
+
</paper-dialog>
|
29
|
+
|
30
|
+
#### Transitions
|
31
|
+
|
32
|
+
`<paper-dialog>` can be used with `<paper-transition>` to transition the overlay open and close.
|
33
|
+
|
34
|
+
To use a transition, import `paper-dialog-transition.html` alongside paper-dialog:
|
35
|
+
|
36
|
+
<link rel="import" href="paper-dialog/paper-dialog-transition.html">
|
37
|
+
|
38
|
+
Then set the `transition` attribute:
|
39
|
+
|
40
|
+
<paper-dialog heading="Title for dialog" transition="paper-transition-center">
|
41
|
+
|
42
|
+
<paper-dialog heading="Title for dialog" transition="paper-transition-bottom">
|
43
|
+
|
44
|
+
@group Paper Elements
|
45
|
+
@element paper-dialog
|
46
|
+
@homepage github.io
|
47
|
+
-->
|
48
|
+
<!--
|
49
|
+
Fired when the dialog's `opened` property changes.
|
50
|
+
|
51
|
+
@event core-overlay-open
|
52
|
+
@param {Object} detail
|
53
|
+
@param {Object} detail.opened the opened state
|
54
|
+
-->
|
55
|
+
|
56
|
+
<%= html_import_tag "core/overlay/core-overlay" %>
|
57
|
+
<%= html_import_tag "paper-shadow/paper-shadow" %>
|
58
|
+
|
59
|
+
<polymer-element name="paper-dialog" attributes="opened heading transition autoCloseDisabled backdrop layered closeSelector" role="dialog">
|
60
|
+
|
61
|
+
<template>
|
62
|
+
|
63
|
+
<%= stylesheet_link_tag "paper-dialog/paper-dialog" %>
|
64
|
+
|
65
|
+
<div id="shadow">
|
66
|
+
<paper-shadow z="3" hasPosition></paper-shadow>
|
67
|
+
</div>
|
68
|
+
|
69
|
+
<core-overlay id="overlay" opened="{{opened}}" autoCloseDisabled?="{{autoCloseDisabled}}" backdrop?="{{backdrop}}" layered?="{{layered}}" target="{{}}" sizingTarget="{{$.container}}" closeSelector="{{closeSelector}}" transition="{{transition}}" margin="20"></core-overlay>
|
70
|
+
|
71
|
+
<div id="container" layout vertical>
|
72
|
+
|
73
|
+
<div id="actions" layout horizontal>
|
74
|
+
<content select="[dismissive]"></content>
|
75
|
+
<div flex auto></div>
|
76
|
+
<content select="[affirmative]"></content>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<div id="main" flex auto>
|
80
|
+
<h1>{{heading}}</h1>
|
81
|
+
<content></content>
|
82
|
+
</div>
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
</template>
|
87
|
+
|
88
|
+
<script>
|
89
|
+
|
90
|
+
Polymer('paper-dialog', {
|
91
|
+
|
92
|
+
/**
|
93
|
+
* Set opened to true to show the dialog and to false to hide it.
|
94
|
+
* A dialog may be made intially opened by setting its opened attribute.
|
95
|
+
|
96
|
+
* @attribute opened
|
97
|
+
* @type boolean
|
98
|
+
* @default false
|
99
|
+
*/
|
100
|
+
opened: false,
|
101
|
+
|
102
|
+
/**
|
103
|
+
* If true, the dialog has a backdrop darkening the rest of the screen.
|
104
|
+
* The backdrop element is attached to the document body and may be styled
|
105
|
+
* with the class `core-overlay-backdrop`. When opened the `core-opened`
|
106
|
+
* class is applied.
|
107
|
+
*
|
108
|
+
* @attribute backdrop
|
109
|
+
* @type boolean
|
110
|
+
* @default false
|
111
|
+
*/
|
112
|
+
backdrop: false,
|
113
|
+
|
114
|
+
/**
|
115
|
+
* If true, the dialog is guaranteed to display above page content.
|
116
|
+
*
|
117
|
+
* @attribute layered
|
118
|
+
* @type boolean
|
119
|
+
* @default false
|
120
|
+
*/
|
121
|
+
layered: false,
|
122
|
+
|
123
|
+
/**
|
124
|
+
* By default a dialog will close automatically if the user
|
125
|
+
* taps outside it or presses the escape key. Disable this
|
126
|
+
* behavior by setting the `autoCloseDisabled` property to true.
|
127
|
+
* @attribute autoCloseDisabled
|
128
|
+
* @type boolean
|
129
|
+
* @default false
|
130
|
+
*/
|
131
|
+
autoCloseDisabled: false,
|
132
|
+
|
133
|
+
/**
|
134
|
+
* This property specifies a selector matching elements that should
|
135
|
+
* close the dialog on tap.
|
136
|
+
*
|
137
|
+
* @attribute closeSelector
|
138
|
+
* @type string
|
139
|
+
* @default ""
|
140
|
+
*/
|
141
|
+
closeSelector: '[dismissive],[affirmative]',
|
142
|
+
|
143
|
+
/**
|
144
|
+
* @attribute heading
|
145
|
+
* @type string
|
146
|
+
* @default ''
|
147
|
+
*/
|
148
|
+
heading: '',
|
149
|
+
|
150
|
+
/**
|
151
|
+
* Set this property to the id of a <core-transition> element to specify
|
152
|
+
* the transition to use when opening/closing this dialog.
|
153
|
+
*
|
154
|
+
* @attribute transition
|
155
|
+
* @type string
|
156
|
+
* @default ''
|
157
|
+
*/
|
158
|
+
transition: '',
|
159
|
+
|
160
|
+
/**
|
161
|
+
* Toggle the dialog's opened state.
|
162
|
+
* @method toggle
|
163
|
+
*/
|
164
|
+
toggle: function() {
|
165
|
+
this.$.overlay.toggle();
|
166
|
+
},
|
167
|
+
|
168
|
+
headingChanged: function() {
|
169
|
+
this.setAttribute('aria-label', this.heading);
|
170
|
+
}
|
171
|
+
|
172
|
+
});
|
173
|
+
|
174
|
+
</script>
|
175
|
+
|
176
|
+
</polymer-element>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
:host {
|
2
|
+
box-sizing: border-box;
|
3
|
+
width: 56px;
|
4
|
+
height: 56px;
|
5
|
+
background: #d23f31;
|
6
|
+
border-radius: 28px;
|
7
|
+
fill: #fff;
|
8
|
+
}
|
9
|
+
|
10
|
+
:host(.mini) {
|
11
|
+
width: 40px;
|
12
|
+
height: 40px;
|
13
|
+
border-radius: 20px;
|
14
|
+
}
|
15
|
+
|
16
|
+
:host /deep/ #focusBg {
|
17
|
+
display: none;
|
18
|
+
}
|
19
|
+
|
20
|
+
:host /deep/ #icon {
|
21
|
+
display: block;
|
22
|
+
margin: 16px;
|
23
|
+
}
|
24
|
+
|
25
|
+
:host(.mini) /deep/ #icon {
|
26
|
+
margin: 8px;
|
27
|
+
}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<!--
|
2
|
+
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
3
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
4
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
5
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
6
|
+
Code distributed by Google as part of the polymer project is also
|
7
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
8
|
+
-->
|
9
|
+
|
10
|
+
<!--
|
11
|
+
`<paper-fab>` is a floating action button with an icon. It comes in two sizes: regular
|
12
|
+
size and a smaller size by applying the class `mini`.
|
13
|
+
|
14
|
+
Example:
|
15
|
+
|
16
|
+
<paper-fab icon="favorite"></paper-fab>
|
17
|
+
<paper-fab class="mini"></paper-fab>
|
18
|
+
|
19
|
+
@group Paper Elements
|
20
|
+
@element paper-fab
|
21
|
+
@homepage github.io
|
22
|
+
@extends paper-icon-button
|
23
|
+
-->
|
24
|
+
|
25
|
+
<%= html_import_tag "paper-icon-button/paper-icon-button" %>
|
26
|
+
|
27
|
+
<polymer-element name="paper-fab" extends="paper-icon-button">
|
28
|
+
|
29
|
+
<template>
|
30
|
+
|
31
|
+
<%= stylesheet_link_tag "paper-fab/paper-fab" %>
|
32
|
+
|
33
|
+
<shadow></shadow>
|
34
|
+
|
35
|
+
</template>
|
36
|
+
|
37
|
+
<script>
|
38
|
+
Polymer('paper-fab', {
|
39
|
+
|
40
|
+
publish: {
|
41
|
+
|
42
|
+
/**
|
43
|
+
* See [`<paper-button>`](../paper-button).
|
44
|
+
*
|
45
|
+
* @attribute raisedButton
|
46
|
+
* @type boolean
|
47
|
+
* @default true
|
48
|
+
*/
|
49
|
+
raisedButton: {value: true, reflect: true}
|
50
|
+
|
51
|
+
}
|
52
|
+
|
53
|
+
});
|
54
|
+
</script>
|
55
|
+
</polymer-element>
|