polymer-paper-elements-rails 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +51 -0
- data/Rakefile +1 -0
- data/app/assets/components/iron-a11y-announcer/iron-a11y-announcer.html +125 -0
- data/app/assets/components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html +418 -0
- data/app/assets/components/iron-autogrow-textarea/hero.svg +33 -0
- data/app/assets/components/iron-autogrow-textarea/iron-autogrow-textarea.html +263 -0
- data/app/assets/components/iron-behaviors/iron-button-state.html +195 -0
- data/app/assets/components/iron-behaviors/iron-control-state.html +102 -0
- data/app/assets/components/iron-fit-behavior/iron-fit-behavior.html +230 -0
- data/app/assets/components/iron-flex-layout/classes/iron-flex-layout.html +307 -0
- data/app/assets/components/iron-flex-layout/classes/iron-shadow-flex-layout.html +302 -0
- data/app/assets/components/iron-flex-layout/iron-flex-layout.html +313 -0
- data/app/assets/components/iron-form-element-behavior/iron-form-element-behavior.html +50 -0
- data/app/assets/components/iron-icon/hero.svg +19 -0
- data/app/assets/components/iron-icon/iron-icon.html +187 -0
- data/app/assets/components/iron-icons/av-icons.html +73 -0
- data/app/assets/components/iron-icons/communication-icons.html +59 -0
- data/app/assets/components/iron-icons/device-icons.html +94 -0
- data/app/assets/components/iron-icons/editor-icons.html +70 -0
- data/app/assets/components/iron-icons/hardware-icons.html +61 -0
- data/app/assets/components/iron-icons/hero.svg +35 -0
- data/app/assets/components/iron-icons/image-icons.html +164 -0
- data/app/assets/components/iron-icons/iron-icons.html +303 -0
- data/app/assets/components/iron-icons/maps-icons.html +71 -0
- data/app/assets/components/iron-icons/notification-icons.html +62 -0
- data/app/assets/components/iron-icons/social-icons.html +40 -0
- data/app/assets/components/iron-iconset-svg/iron-iconset-svg.html +191 -0
- data/app/assets/components/iron-input/hero.svg +19 -0
- data/app/assets/components/iron-input/iron-input.html +235 -0
- data/app/assets/components/iron-media-query/hero.svg +29 -0
- data/app/assets/components/iron-media-query/iron-media-query.html +84 -0
- data/app/assets/components/iron-menu-behavior/iron-menu-behavior.html +214 -0
- data/app/assets/components/iron-menu-behavior/iron-menubar-behavior.html +65 -0
- data/app/assets/components/iron-meta/hero.svg +33 -0
- data/app/assets/components/iron-meta/iron-meta.html +352 -0
- data/app/assets/components/iron-overlay-behavior/iron-overlay-backdrop.html +132 -0
- data/app/assets/components/iron-overlay-behavior/iron-overlay-behavior.html +432 -0
- data/app/assets/components/iron-overlay-behavior/iron-overlay-manager.html +107 -0
- data/app/assets/components/iron-range-behavior/iron-range-behavior.html +101 -0
- data/app/assets/components/iron-resizable-behavior/iron-resizable-behavior.html +139 -0
- data/app/assets/components/iron-selector/iron-multi-selectable.html +120 -0
- data/app/assets/components/iron-selector/iron-selectable.html +307 -0
- data/app/assets/components/iron-selector/iron-selection.html +115 -0
- data/app/assets/components/iron-selector/iron-selector.html +71 -0
- data/app/assets/components/iron-validatable-behavior/iron-validatable-behavior.html +100 -0
- data/app/assets/components/neon-animation/animations/cascaded-animation.html +84 -0
- data/app/assets/components/neon-animation/animations/fade-in-animation.html +49 -0
- data/app/assets/components/neon-animation/animations/fade-out-animation.html +49 -0
- data/app/assets/components/neon-animation/animations/hero-animation.html +83 -0
- data/app/assets/components/neon-animation/animations/opaque-animation.html +46 -0
- data/app/assets/components/neon-animation/animations/ripple-animation.html +92 -0
- data/app/assets/components/neon-animation/animations/scale-down-animation.html +65 -0
- data/app/assets/components/neon-animation/animations/scale-up-animation.html +58 -0
- data/app/assets/components/neon-animation/animations/slide-down-animation.html +59 -0
- data/app/assets/components/neon-animation/animations/slide-from-left-animation.html +60 -0
- data/app/assets/components/neon-animation/animations/slide-from-right-animation.html +60 -0
- data/app/assets/components/neon-animation/animations/slide-left-animation.html +59 -0
- data/app/assets/components/neon-animation/animations/slide-right-animation.html +59 -0
- data/app/assets/components/neon-animation/animations/slide-up-animation.html +59 -0
- data/app/assets/components/neon-animation/animations/transform-animation.html +61 -0
- data/app/assets/components/neon-animation/guides/neon-animation.md +313 -0
- data/app/assets/components/neon-animation/neon-animatable-behavior.html +156 -0
- data/app/assets/components/neon-animation/neon-animatable.html +54 -0
- data/app/assets/components/neon-animation/neon-animated-pages.html +208 -0
- data/app/assets/components/neon-animation/neon-animation-behavior.html +88 -0
- data/app/assets/components/neon-animation/neon-animation-runner-behavior.html +110 -0
- data/app/assets/components/neon-animation/neon-animation.html +17 -0
- data/app/assets/components/neon-animation/neon-animations.html +25 -0
- data/app/assets/components/neon-animation/neon-shared-element-animatable-behavior.html +37 -0
- data/app/assets/components/neon-animation/neon-shared-element-animation-behavior.html +66 -0
- data/app/assets/components/neon-animation/web-animations.html +11 -0
- data/app/assets/components/paper-behaviors/paper-button-behavior.html +55 -0
- data/app/assets/components/paper-behaviors/paper-inky-focus-behavior.html +44 -0
- data/app/assets/components/paper-button/paper-button.html +177 -0
- data/app/assets/components/paper-checkbox/metadata.html +17 -0
- data/app/assets/components/paper-checkbox/paper-checkbox.css +149 -0
- data/app/assets/components/paper-checkbox/paper-checkbox.html +163 -0
- data/app/assets/components/paper-dialog-behavior/hero.svg +51 -0
- data/app/assets/components/paper-dialog-behavior/paper-dialog-behavior.html +236 -0
- data/app/assets/components/paper-dialog-behavior/paper-dialog-common.css +58 -0
- data/app/assets/components/paper-dialog-scrollable/hero.svg +69 -0
- data/app/assets/components/paper-dialog-scrollable/paper-dialog-scrollable.html +150 -0
- data/app/assets/components/paper-dialog/hero.svg +58 -0
- data/app/assets/components/paper-dialog/paper-dialog.html +122 -0
- data/app/assets/components/paper-drawer-panel/hero.svg +21 -0
- data/app/assets/components/paper-drawer-panel/paper-drawer-panel.css +142 -0
- data/app/assets/components/paper-drawer-panel/paper-drawer-panel.html +585 -0
- data/app/assets/components/paper-fab/paper-fab.html +159 -0
- data/app/assets/components/paper-header-panel/hero.svg +38 -0
- data/app/assets/components/paper-header-panel/paper-header-panel.html +496 -0
- data/app/assets/components/paper-icon-button/paper-icon-button.html +141 -0
- data/app/assets/components/paper-input/all-imports.html +12 -0
- data/app/assets/components/paper-input/hero.svg +19 -0
- data/app/assets/components/paper-input/paper-input-addon-behavior.html +43 -0
- data/app/assets/components/paper-input/paper-input-behavior.html +293 -0
- data/app/assets/components/paper-input/paper-input-char-counter.html +95 -0
- data/app/assets/components/paper-input/paper-input-container.html +495 -0
- data/app/assets/components/paper-input/paper-input-error.html +99 -0
- data/app/assets/components/paper-input/paper-input.html +126 -0
- data/app/assets/components/paper-input/paper-textarea.html +100 -0
- data/app/assets/components/paper-item/all-imports.html +13 -0
- data/app/assets/components/paper-item/paper-icon-item.html +86 -0
- data/app/assets/components/paper-item/paper-item-body.html +93 -0
- data/app/assets/components/paper-item/paper-item-shared.css +19 -0
- data/app/assets/components/paper-item/paper-item.html +95 -0
- data/app/assets/components/paper-material/paper-material.html +98 -0
- data/app/assets/components/paper-menu/hero.svg +35 -0
- data/app/assets/components/paper-menu/paper-menu.html +133 -0
- data/app/assets/components/paper-progress/hero.svg +21 -0
- data/app/assets/components/paper-progress/paper-progress.html +199 -0
- data/app/assets/components/paper-radio-button/hero.svg +22 -0
- data/app/assets/components/paper-radio-button/paper-radio-button.css +109 -0
- data/app/assets/components/paper-radio-button/paper-radio-button.html +148 -0
- data/app/assets/components/paper-radio-group/hero.svg +25 -0
- data/app/assets/components/paper-radio-group/paper-radio-group.html +186 -0
- data/app/assets/components/paper-ripple/hero.svg +30 -0
- data/app/assets/components/paper-ripple/paper-ripple.html +714 -0
- data/app/assets/components/paper-scroll-header-panel/hero.svg +41 -0
- data/app/assets/components/paper-scroll-header-panel/paper-scroll-header-panel.html +455 -0
- data/app/assets/components/paper-slider/hero.svg +20 -0
- data/app/assets/components/paper-slider/paper-slider.css +252 -0
- data/app/assets/components/paper-slider/paper-slider.html +449 -0
- data/app/assets/components/paper-spinner/hero.svg +27 -0
- data/app/assets/components/paper-spinner/paper-spinner.css +325 -0
- data/app/assets/components/paper-spinner/paper-spinner.html +222 -0
- data/app/assets/components/paper-styles/classes/global.html +96 -0
- data/app/assets/components/paper-styles/classes/shadow-layout.html +302 -0
- data/app/assets/components/paper-styles/classes/shadow.html +39 -0
- data/app/assets/components/paper-styles/classes/typography.html +171 -0
- data/app/assets/components/paper-styles/color.html +333 -0
- data/app/assets/components/paper-styles/default-theme.html +39 -0
- data/app/assets/components/paper-styles/paper-styles-classes.html +14 -0
- data/app/assets/components/paper-styles/paper-styles.html +17 -0
- data/app/assets/components/paper-styles/shadow.html +61 -0
- data/app/assets/components/paper-styles/typography.html +240 -0
- data/app/assets/components/paper-tabs/hero.svg +23 -0
- data/app/assets/components/paper-tabs/paper-tab.html +158 -0
- data/app/assets/components/paper-tabs/paper-tabs-icons.html +18 -0
- data/app/assets/components/paper-tabs/paper-tabs.html +483 -0
- data/app/assets/components/paper-toast/hero.svg +20 -0
- data/app/assets/components/paper-toast/paper-toast.html +164 -0
- data/app/assets/components/paper-toggle-button/hero.svg +22 -0
- data/app/assets/components/paper-toggle-button/paper-toggle-button.css +108 -0
- data/app/assets/components/paper-toggle-button/paper-toggle-button.html +183 -0
- data/app/assets/components/paper-toolbar/paper-toolbar.html +375 -0
- data/app/assets/components/polymer-gestures/Gruntfile.js +60 -0
- data/app/assets/components/polymer-gestures/banner.txt +9 -0
- data/app/assets/components/polymer-gestures/build.json +17 -0
- data/app/assets/components/polymer-gestures/conf/karma.conf.js +39 -0
- data/app/assets/components/polymer-gestures/package.json +20 -0
- data/app/assets/components/polymer-gestures/polymer-gestures.html +21 -0
- data/app/assets/components/polymer-gestures/polymer-gestures.js +46 -0
- data/app/assets/components/polymer-gestures/src/dispatcher.js +474 -0
- data/app/assets/components/polymer-gestures/src/eventFactory.js +127 -0
- data/app/assets/components/polymer-gestures/src/hold.js +129 -0
- data/app/assets/components/polymer-gestures/src/mouse.js +135 -0
- data/app/assets/components/polymer-gestures/src/ms.js +80 -0
- data/app/assets/components/polymer-gestures/src/pinch.js +186 -0
- data/app/assets/components/polymer-gestures/src/platform-events.js +39 -0
- data/app/assets/components/polymer-gestures/src/pointer.js +68 -0
- data/app/assets/components/polymer-gestures/src/pointermap.js +67 -0
- data/app/assets/components/polymer-gestures/src/scope.js +10 -0
- data/app/assets/components/polymer-gestures/src/tap.js +103 -0
- data/app/assets/components/polymer-gestures/src/targetfind.js +244 -0
- data/app/assets/components/polymer-gestures/src/touch-action.js +60 -0
- data/app/assets/components/polymer-gestures/src/touch.js +341 -0
- data/app/assets/components/polymer-gestures/src/track.js +230 -0
- data/app/assets/components/web-animations-js/web-animations-next-lite.min.js +17 -0
- data/app/assets/components/web-animations-js/web-animations-next.min.js +17 -0
- data/app/assets/components/web-animations-js/web-animations.min.js +17 -0
- data/app/assets/components/webcomponentsjs/CustomElements.js +956 -0
- data/app/assets/components/webcomponentsjs/CustomElements.min.js +11 -0
- data/app/assets/components/webcomponentsjs/HTMLImports.js +1078 -0
- data/app/assets/components/webcomponentsjs/HTMLImports.min.js +11 -0
- data/app/assets/components/webcomponentsjs/MutationObserver.js +344 -0
- data/app/assets/components/webcomponentsjs/MutationObserver.min.js +11 -0
- data/app/assets/components/webcomponentsjs/ShadowDOM.js +4414 -0
- data/app/assets/components/webcomponentsjs/ShadowDOM.min.js +15 -0
- data/app/assets/components/webcomponentsjs/package.json +31 -0
- data/app/assets/components/webcomponentsjs/webcomponents-lite.js +2300 -0
- data/app/assets/components/webcomponentsjs/webcomponents-lite.min.js +13 -0
- data/app/assets/components/webcomponentsjs/webcomponents.js +7112 -0
- data/app/assets/components/webcomponentsjs/webcomponents.min.js +15 -0
- data/lib/polymer-paper-elements-rails.rb +2 -0
- data/lib/polymer-paper-elements-rails/engine.rb +4 -0
- data/lib/polymer-paper-elements-rails/version.rb +3 -0
- metadata +272 -0
@@ -0,0 +1,19 @@
|
|
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
|
+
:host {
|
12
|
+
display: block;
|
13
|
+
min-height: var(--paper-item-min-height, 48px);
|
14
|
+
padding: 0px 16px;
|
15
|
+
}
|
16
|
+
|
17
|
+
:host > ::content > *:not(:first-child):not(:last-child) {
|
18
|
+
margin-right: 16px;
|
19
|
+
}
|
@@ -0,0 +1,95 @@
|
|
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="../iron-flex-layout/iron-flex-layout.html">
|
13
|
+
<link rel="import" href="../paper-styles/paper-styles.html">
|
14
|
+
|
15
|
+
<!--
|
16
|
+
`<paper-item>` is a non-interactive list item. By default, it is a horizontal flexbox.
|
17
|
+
|
18
|
+
<paper-item>Item</paper-item>
|
19
|
+
|
20
|
+
Use this element with `<paper-item-body>` to make Material Design styled two-line and three-line
|
21
|
+
items.
|
22
|
+
|
23
|
+
<paper-item>
|
24
|
+
<paper-item-body two-line>
|
25
|
+
<div>Show your status</div>
|
26
|
+
<div secondary>Your status is visible to everyone</div>
|
27
|
+
</paper-item-body>
|
28
|
+
<iron-icon icon="warning"></iron-icon>
|
29
|
+
</paper-item>
|
30
|
+
|
31
|
+
### Styling
|
32
|
+
|
33
|
+
The following custom properties and mixins are available for styling:
|
34
|
+
|
35
|
+
Custom property | Description | Default
|
36
|
+
----------------|-------------|----------
|
37
|
+
`--paper-item-min-height` | Minimum height of the item | `48px`
|
38
|
+
`--paper-item` | Mixin applied to the item | `{}`
|
39
|
+
|
40
|
+
### Accessibility
|
41
|
+
|
42
|
+
This element has `role="listitem"` by default. Depending on usage, it may be more appropriate to set
|
43
|
+
`role="menuitem"`, `role="menuitemcheckbox"` or `role="menuitemradio"`.
|
44
|
+
|
45
|
+
<paper-item role="menuitemcheckbox">
|
46
|
+
<paper-item-body>
|
47
|
+
Show your status
|
48
|
+
</paper-item-body>
|
49
|
+
<paper-checkbox></paper-checkbox>
|
50
|
+
</paper-item>
|
51
|
+
|
52
|
+
@group Paper Elements
|
53
|
+
@element paper-item
|
54
|
+
@demo demo/index.html
|
55
|
+
-->
|
56
|
+
|
57
|
+
<dom-module id="paper-item">
|
58
|
+
|
59
|
+
<link rel="import" type="css" href="paper-item-shared.css">
|
60
|
+
|
61
|
+
<style>
|
62
|
+
|
63
|
+
:host {
|
64
|
+
@apply(--layout-horizontal);
|
65
|
+
@apply(--layout-center);
|
66
|
+
@apply(--paper-font-subhead);
|
67
|
+
|
68
|
+
@apply(--paper-item);
|
69
|
+
}
|
70
|
+
|
71
|
+
</style>
|
72
|
+
|
73
|
+
<template>
|
74
|
+
<content></content>
|
75
|
+
</template>
|
76
|
+
|
77
|
+
</dom-module>
|
78
|
+
|
79
|
+
<script>
|
80
|
+
|
81
|
+
(function() {
|
82
|
+
|
83
|
+
Polymer({
|
84
|
+
|
85
|
+
is: 'paper-item',
|
86
|
+
|
87
|
+
hostAttributes: {
|
88
|
+
role: 'listitem'
|
89
|
+
}
|
90
|
+
|
91
|
+
});
|
92
|
+
|
93
|
+
})();
|
94
|
+
|
95
|
+
</script>
|
@@ -0,0 +1,98 @@
|
|
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/shadow.html">
|
13
|
+
|
14
|
+
<!--
|
15
|
+
|
16
|
+
`paper-material` is a container that renders two shadows on top of each other to
|
17
|
+
create the effect of a lifted piece of paper.
|
18
|
+
|
19
|
+
Example:
|
20
|
+
|
21
|
+
<paper-material elevation="1">
|
22
|
+
... content ...
|
23
|
+
</paper-material>
|
24
|
+
|
25
|
+
@group Paper Elements
|
26
|
+
@class paper-material
|
27
|
+
@demo demo/index.html
|
28
|
+
-->
|
29
|
+
|
30
|
+
<dom-module id="paper-material">
|
31
|
+
<style>
|
32
|
+
:host {
|
33
|
+
display: block;
|
34
|
+
position: relative;
|
35
|
+
@apply(--shadow-transition);
|
36
|
+
}
|
37
|
+
|
38
|
+
:host([elevation="1"]) {
|
39
|
+
@apply(--shadow-elevation-2dp);
|
40
|
+
}
|
41
|
+
|
42
|
+
:host([elevation="2"]) {
|
43
|
+
@apply(--shadow-elevation-4dp);
|
44
|
+
}
|
45
|
+
|
46
|
+
:host([elevation="3"]) {
|
47
|
+
@apply(--shadow-elevation-6dp);
|
48
|
+
}
|
49
|
+
|
50
|
+
:host([elevation="4"]) {
|
51
|
+
@apply(--shadow-elevation-8dp);
|
52
|
+
}
|
53
|
+
|
54
|
+
:host([elevation="5"]) {
|
55
|
+
@apply(--shadow-elevation-16dp);
|
56
|
+
}
|
57
|
+
</style>
|
58
|
+
<template>
|
59
|
+
<content></content>
|
60
|
+
</template>
|
61
|
+
</dom-module>
|
62
|
+
<script>
|
63
|
+
Polymer({
|
64
|
+
is: 'paper-material',
|
65
|
+
|
66
|
+
properties: {
|
67
|
+
|
68
|
+
/**
|
69
|
+
* The z-depth of this element, from 0-5. Setting to 0 will remove the
|
70
|
+
* shadow, and each increasing number greater than 0 will be "deeper"
|
71
|
+
* than the last.
|
72
|
+
*
|
73
|
+
* @attribute elevation
|
74
|
+
* @type number
|
75
|
+
* @default 1
|
76
|
+
*/
|
77
|
+
elevation: {
|
78
|
+
type: Number,
|
79
|
+
reflectToAttribute: true,
|
80
|
+
value: 1
|
81
|
+
},
|
82
|
+
|
83
|
+
/**
|
84
|
+
* Set this to true to animate the shadow when setting a new
|
85
|
+
* `elevation` value.
|
86
|
+
*
|
87
|
+
* @attribute animated
|
88
|
+
* @type boolean
|
89
|
+
* @default false
|
90
|
+
*/
|
91
|
+
animated: {
|
92
|
+
type: Boolean,
|
93
|
+
reflectToAttribute: true,
|
94
|
+
value: false
|
95
|
+
}
|
96
|
+
}
|
97
|
+
});
|
98
|
+
</script>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5
|
+
viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
|
6
|
+
<g id="background" display="none">
|
7
|
+
<rect display="inline" fill="#B0BEC5" width="225" height="126"/>
|
8
|
+
</g>
|
9
|
+
<g id="label">
|
10
|
+
</g>
|
11
|
+
<g id="art">
|
12
|
+
<g>
|
13
|
+
<circle cx="86.5" cy="39" r="4"/>
|
14
|
+
<path d="M138,44c-2,0-3.6-2.4-4.6-4.6c-1.1-2.1-1.7-3.4-3-3.4s-2,1.3-3,3.4c-1.1,2.1-2.2,4.6-4.9,4.6c-2.6,0-3.8-2.4-4.9-4.6
|
15
|
+
c-1.1-2.1-1.8-3.4-3.1-3.4c-1.3,0-2,1.3-3.1,3.4c-1.1,2.1-2.3,4.6-4.9,4.6c-2.6,0-4.1-2.4-5.1-4.6C100.3,37.3,100,36,98,36v-2
|
16
|
+
c3,0,4.1,2.4,5.1,4.6c1.1,2.1,1.9,3.4,3.2,3.4c1.3,0,2.1-1.3,3.2-3.4c1.1-2.1,2.3-4.6,4.9-4.6c2.6,0,3.8,2.4,4.9,4.6
|
17
|
+
c1.1,2.1,1.8,3.4,3.1,3.4c1.3,0,2-1.3,3.1-3.4c1.1-2.1,2.3-4.6,4.9-4.6s3.6,2.4,4.6,4.6c1.1,2.1,1.9,3.4,2.9,3.4V44z"/>
|
18
|
+
<circle cx="86.5" cy="63" r="4"/>
|
19
|
+
<path d="M138,68c-2,0-3.6-2.4-4.6-4.6c-1.1-2.1-1.7-3.4-3-3.4s-2,1.3-3,3.4c-1.1,2.1-2.2,4.6-4.9,4.6c-2.6,0-3.8-2.4-4.9-4.6
|
20
|
+
c-1.1-2.1-1.8-3.4-3.1-3.4c-1.3,0-2,1.3-3.1,3.4c-1.1,2.1-2.3,4.6-4.9,4.6c-2.6,0-4.1-2.4-5.1-4.6C100.3,61.3,100,60,98,60v-2
|
21
|
+
c3,0,4.1,2.4,5.1,4.6c1.1,2.1,1.9,3.4,3.2,3.4c1.3,0,2.1-1.3,3.2-3.4c1.1-2.1,2.3-4.6,4.9-4.6c2.6,0,3.8,2.4,4.9,4.6
|
22
|
+
c1.1,2.1,1.8,3.4,3.1,3.4c1.3,0,2-1.3,3.1-3.4c1.1-2.1,2.3-4.6,4.9-4.6s3.6,2.4,4.6,4.6c1.1,2.1,1.9,3.4,2.9,3.4V68z"/>
|
23
|
+
<circle cx="86.5" cy="88" r="4"/>
|
24
|
+
<path d="M138,93c-2,0-3.6-2.4-4.6-4.6c-1.1-2.1-1.7-3.4-3-3.4s-2,1.3-3,3.4c-1.1,2.1-2.2,4.6-4.9,4.6c-2.6,0-3.8-2.4-4.9-4.6
|
25
|
+
c-1.1-2.1-1.8-3.4-3.1-3.4c-1.3,0-2,1.3-3.1,3.4c-1.1,2.1-2.3,4.6-4.9,4.6c-2.6,0-4.1-2.4-5.1-4.6C100.3,86.3,100,85,98,85v-2
|
26
|
+
c3,0,4.1,2.4,5.1,4.6c1.1,2.1,1.9,3.4,3.2,3.4c1.3,0,2.1-1.3,3.2-3.4c1.1-2.1,2.3-4.6,4.9-4.6c2.6,0,3.8,2.4,4.9,4.6
|
27
|
+
c1.1,2.1,1.8,3.4,3.1,3.4c1.3,0,2-1.3,3.1-3.4c1.1-2.1,2.3-4.6,4.9-4.6s3.6,2.4,4.6,4.6c1.1,2.1,1.9,3.4,2.9,3.4V93z"/>
|
28
|
+
<path d="M151,102H73V24h78V102z M75,100h74V26H75V100z"/>
|
29
|
+
</g>
|
30
|
+
<g id="ic_x5F_add_x0D_">
|
31
|
+
</g>
|
32
|
+
</g>
|
33
|
+
<g id="Guides">
|
34
|
+
</g>
|
35
|
+
</svg>
|
@@ -0,0 +1,133 @@
|
|
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="../iron-menu-behavior/iron-menu-behavior.html">
|
13
|
+
<link rel="import" href="../paper-styles/paper-styles.html">
|
14
|
+
|
15
|
+
<!--
|
16
|
+
`<paper-menu>` implements an accessible menu control with Material Design styling. The focused item
|
17
|
+
is highlighted, and the selected item has bolded text.
|
18
|
+
|
19
|
+
<paper-menu>
|
20
|
+
<paper-item>Item 1</paper-item>
|
21
|
+
<paper-item>Item 2</paper-item>
|
22
|
+
</paper-menu>
|
23
|
+
|
24
|
+
Make a multi-select menu with the `multi` attribute. Items in a multi-select menu can be deselected,
|
25
|
+
and multiple item can be selected.
|
26
|
+
|
27
|
+
<paper-menu multi>
|
28
|
+
<paper-item>Item 1</paper-item>
|
29
|
+
<paper-item>Item 2</paper-item>
|
30
|
+
</paper-menu>
|
31
|
+
|
32
|
+
### Styling
|
33
|
+
|
34
|
+
The following custom properties and mixins are available for styling:
|
35
|
+
|
36
|
+
Custom property | Description | Default
|
37
|
+
----------------|-------------|----------
|
38
|
+
`--paper-menu-background-color` | Menu background color | `--primary-background-color`
|
39
|
+
`-paper-menu-color` | Menu foreground color | `--primary-text-color`
|
40
|
+
`--paper-menu-disabled-color` | Foreground color for a disabled item | `--disabled-text-color`
|
41
|
+
`--paper-menu` | Mixin applied to the menu | `{}`
|
42
|
+
`--paper-menu-selected-item` | Mixin applied to the selected item | `{}`
|
43
|
+
`--paper-menu-focused-item` | Mixin applied to the focused item | `{}`
|
44
|
+
`--paper-menu-focused-item-after` | Mixin applied to the ::after pseudo-element for the focused item | `{}`
|
45
|
+
|
46
|
+
### Accessibility
|
47
|
+
|
48
|
+
`<paper-menu>` has `role="menu"` by default. A multi-select menu will also have
|
49
|
+
`aria-multiselectable` set. It implements key bindings to navigate through the menu with the up and
|
50
|
+
down arrow keys, esc to exit the menu, and enter to activate a menu item. Typing the first letter
|
51
|
+
of a menu item will also focus it.
|
52
|
+
|
53
|
+
@group Paper Elements
|
54
|
+
@element paper-menu
|
55
|
+
@hero hero.svg
|
56
|
+
@demo demo/index.html
|
57
|
+
-->
|
58
|
+
|
59
|
+
<dom-module id="paper-menu">
|
60
|
+
|
61
|
+
<style>
|
62
|
+
|
63
|
+
:host {
|
64
|
+
display: block;
|
65
|
+
padding: 8px 0;
|
66
|
+
|
67
|
+
background: var(--paper-menu-background-color, --primary-background-color);
|
68
|
+
color: var(--paper-menu-color, --primary-text-color);
|
69
|
+
|
70
|
+
@apply(--paper-menu);
|
71
|
+
}
|
72
|
+
|
73
|
+
/* need a wrapper element to make this higher specificity than the :host rule in paper-item */
|
74
|
+
.content > ::content > .iron-selected {
|
75
|
+
font-weight: bold;
|
76
|
+
|
77
|
+
@apply(--paper-menu-selected-item);
|
78
|
+
}
|
79
|
+
|
80
|
+
.content > ::content > [disabled] {
|
81
|
+
color: var(--paper-menu-disabled-color, --disabled-text-color);
|
82
|
+
}
|
83
|
+
|
84
|
+
.content > ::content > *:focus {
|
85
|
+
position: relative;
|
86
|
+
outline: 0;
|
87
|
+
|
88
|
+
@apply(--paper-menu-colored-focused-item);
|
89
|
+
}
|
90
|
+
|
91
|
+
.content > ::content > *:focus:after {
|
92
|
+
@apply(--layout-fit);
|
93
|
+
background: currentColor;
|
94
|
+
/* FIXME move to paper-styles for next widget */
|
95
|
+
opacity: 0.12;
|
96
|
+
content: '';
|
97
|
+
|
98
|
+
@apply(--paper-menu-colored-focused-item-after);
|
99
|
+
}
|
100
|
+
|
101
|
+
.content > ::content > *[colored]:focus:after {
|
102
|
+
opacity: 0.26;
|
103
|
+
}
|
104
|
+
|
105
|
+
</style>
|
106
|
+
|
107
|
+
<template>
|
108
|
+
|
109
|
+
<div class="content">
|
110
|
+
<content></content>
|
111
|
+
</div>
|
112
|
+
|
113
|
+
</template>
|
114
|
+
|
115
|
+
</dom-module>
|
116
|
+
|
117
|
+
<script>
|
118
|
+
|
119
|
+
(function() {
|
120
|
+
|
121
|
+
Polymer({
|
122
|
+
|
123
|
+
is: 'paper-menu',
|
124
|
+
|
125
|
+
behaviors: [
|
126
|
+
Polymer.IronMenuBehavior
|
127
|
+
]
|
128
|
+
|
129
|
+
});
|
130
|
+
|
131
|
+
})();
|
132
|
+
|
133
|
+
</script>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5
|
+
viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
|
6
|
+
<g id="background" display="none">
|
7
|
+
<rect display="inline" fill="#B0BEC5" width="225" height="126"/>
|
8
|
+
</g>
|
9
|
+
<g id="label">
|
10
|
+
</g>
|
11
|
+
<g id="art">
|
12
|
+
<rect x="57" y="59" width="20" height="2"/>
|
13
|
+
<rect x="38" y="59" width="11" height="2"/>
|
14
|
+
<rect x="84" y="59" width="40" height="2"/>
|
15
|
+
<rect x="133" y="59" width="54" height="2"/>
|
16
|
+
<g id="ic_x5F_add_x0D_">
|
17
|
+
</g>
|
18
|
+
</g>
|
19
|
+
<g id="Guides">
|
20
|
+
</g>
|
21
|
+
</svg>
|
@@ -0,0 +1,199 @@
|
|
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
|
5
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS
|
6
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
|
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
|
9
|
+
-->
|
10
|
+
|
11
|
+
<link rel="import" href="../paper-styles/paper-styles.html">
|
12
|
+
<link rel="import" href="../iron-range-behavior/iron-range-behavior.html">
|
13
|
+
<link rel="import" href="../iron-flex-layout/classes/iron-flex-layout.html">
|
14
|
+
|
15
|
+
<!--
|
16
|
+
The progress bars are for situations where the percentage completed can be
|
17
|
+
determined. They give users a quick sense of how much longer an operation
|
18
|
+
will take.
|
19
|
+
|
20
|
+
Example:
|
21
|
+
|
22
|
+
<paper-progress value="10"></paper-progress>
|
23
|
+
|
24
|
+
There is also a secondary progress which is useful for displaying intermediate
|
25
|
+
progress, such as the buffer level during a streaming playback progress bar.
|
26
|
+
|
27
|
+
Example:
|
28
|
+
|
29
|
+
<paper-progress value="10" secondary-progress="30"></paper-progress>
|
30
|
+
|
31
|
+
Styling progress bar:
|
32
|
+
|
33
|
+
To change the active progress bar color:
|
34
|
+
|
35
|
+
paper-progress {
|
36
|
+
--paper-progress-active-color: #e91e63;
|
37
|
+
}
|
38
|
+
|
39
|
+
To change the secondary progress bar color:
|
40
|
+
|
41
|
+
paper-progress {
|
42
|
+
--paper-progress-secondary-color: #f8bbd0;
|
43
|
+
}
|
44
|
+
|
45
|
+
To change the progress bar background color:
|
46
|
+
|
47
|
+
paper-progress {
|
48
|
+
--paper-progress-container-color: #64ffda;
|
49
|
+
}
|
50
|
+
|
51
|
+
@group Paper Elements
|
52
|
+
@element paper-progress
|
53
|
+
@hero hero.svg
|
54
|
+
@demo demo/index.html
|
55
|
+
-->
|
56
|
+
|
57
|
+
<dom-module id="paper-progress">
|
58
|
+
<style>
|
59
|
+
:host {
|
60
|
+
display: inline-block;
|
61
|
+
width: 200px;
|
62
|
+
height: 4px;
|
63
|
+
}
|
64
|
+
|
65
|
+
#progressContainer {
|
66
|
+
position: relative;
|
67
|
+
height: 100%;
|
68
|
+
background-color: var(--paper-progress-container-color, --google-grey-300);
|
69
|
+
overflow: hidden;
|
70
|
+
}
|
71
|
+
|
72
|
+
#activeProgress,
|
73
|
+
#secondaryProgress {
|
74
|
+
-webkit-transform-origin: left center;
|
75
|
+
transform-origin: left center;
|
76
|
+
-webkit-transform: scaleX(0);
|
77
|
+
transform: scaleX(0);
|
78
|
+
}
|
79
|
+
|
80
|
+
#activeProgress {
|
81
|
+
background-color: var(--paper-progress-active-color, --google-green-500);
|
82
|
+
}
|
83
|
+
|
84
|
+
#secondaryProgress {
|
85
|
+
background-color: var(--paper-progress-secondary-color, --google-green-100);
|
86
|
+
}
|
87
|
+
|
88
|
+
#activeProgress.indeterminate {
|
89
|
+
-webkit-transform-origin: center center;
|
90
|
+
transform-origin: center center;
|
91
|
+
-webkit-animation: indeterminate-bar 1s linear infinite;
|
92
|
+
animation: indeterminate-bar 1s linear infinite;
|
93
|
+
}
|
94
|
+
|
95
|
+
@-webkit-keyframes indeterminate-bar {
|
96
|
+
0% {
|
97
|
+
-webkit-transform: translate(-50%) scaleX(0);
|
98
|
+
}
|
99
|
+
50% {
|
100
|
+
-webkit-transform: translate(0%) scaleX(0.3);
|
101
|
+
}
|
102
|
+
100% {
|
103
|
+
-webkit-transform: translate(50%) scaleX(0);
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
@keyframes indeterminate-bar {
|
108
|
+
0% {
|
109
|
+
transform: translate(-50%) scaleX(0);
|
110
|
+
}
|
111
|
+
50% {
|
112
|
+
transform: translate(0%) scaleX(0.3);
|
113
|
+
}
|
114
|
+
100% {
|
115
|
+
transform: translate(50%) scaleX(0);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
</style>
|
119
|
+
<template>
|
120
|
+
<div id="progressContainer" role="progressbar" aria-valuenow$="{{value}}" aria-valuemin$="{{min}}" aria-valuemax$="{{max}}">
|
121
|
+
<div id="secondaryProgress" class="fit"></div>
|
122
|
+
<div id="activeProgress" class="fit"></div>
|
123
|
+
</div>
|
124
|
+
</template>
|
125
|
+
</dom-module>
|
126
|
+
|
127
|
+
<script>
|
128
|
+
Polymer({
|
129
|
+
|
130
|
+
is: 'paper-progress',
|
131
|
+
|
132
|
+
behaviors: [
|
133
|
+
Polymer.IronRangeBehavior
|
134
|
+
],
|
135
|
+
|
136
|
+
properties: {
|
137
|
+
|
138
|
+
/**
|
139
|
+
* The number that represents the current secondary progress.
|
140
|
+
*/
|
141
|
+
secondaryProgress: {
|
142
|
+
type: Number,
|
143
|
+
value: 0,
|
144
|
+
notify: true
|
145
|
+
},
|
146
|
+
|
147
|
+
/**
|
148
|
+
* The secondary ratio
|
149
|
+
*/
|
150
|
+
secondaryRatio: {
|
151
|
+
type: Number,
|
152
|
+
value: 0,
|
153
|
+
readOnly: true,
|
154
|
+
observer: '_secondaryRatioChanged'
|
155
|
+
},
|
156
|
+
|
157
|
+
/**
|
158
|
+
* Use an indeterminate progress indicator.
|
159
|
+
*/
|
160
|
+
indeterminate: {
|
161
|
+
type: Boolean,
|
162
|
+
value: false,
|
163
|
+
notify: true,
|
164
|
+
observer: '_toggleIndeterminate'
|
165
|
+
}
|
166
|
+
},
|
167
|
+
|
168
|
+
observers: [
|
169
|
+
'_ratioChanged(ratio)',
|
170
|
+
'_secondaryProgressChanged(secondaryProgress, min, max)'
|
171
|
+
],
|
172
|
+
|
173
|
+
_toggleIndeterminate: function() {
|
174
|
+
// If we use attribute/class binding, the animation sometimes doesn't translate properly
|
175
|
+
// on Safari 7.1. So instead, we toggle the class here in the update method.
|
176
|
+
this.toggleClass('indeterminate', this.indeterminate, this.$.activeProgress);
|
177
|
+
},
|
178
|
+
|
179
|
+
_transformProgress: function(progress, ratio) {
|
180
|
+
var transform = 'scaleX(' + (ratio / 100) + ')';
|
181
|
+
progress.style.transform = progress.style.webkitTransform = transform;
|
182
|
+
},
|
183
|
+
|
184
|
+
_ratioChanged: function(ratio) {
|
185
|
+
this._transformProgress(this.$.activeProgress, ratio);
|
186
|
+
},
|
187
|
+
|
188
|
+
_secondaryRatioChanged: function(secondaryRatio) {
|
189
|
+
this._transformProgress(this.$.secondaryProgress, secondaryRatio);
|
190
|
+
},
|
191
|
+
|
192
|
+
_secondaryProgressChanged: function() {
|
193
|
+
this.secondaryProgress = this._clampValue(this.secondaryProgress);
|
194
|
+
this._setSecondaryRatio(this._calcRatio(this.secondaryProgress) * 100);
|
195
|
+
}
|
196
|
+
|
197
|
+
});
|
198
|
+
|
199
|
+
</script>
|