polymer-paper-rails 0.2.6 → 1.0.0.pre.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/assets/components/iron-a11y-announcer/README.md +29 -0
- data/app/assets/components/iron-a11y-announcer/bower.json +28 -0
- data/app/assets/components/iron-a11y-announcer/demo/index.html +40 -0
- data/app/assets/components/iron-a11y-announcer/demo/x-announces.html +50 -0
- data/app/assets/components/iron-a11y-announcer/index.html +28 -0
- data/app/assets/components/iron-a11y-announcer/iron-a11y-announcer.html +125 -0
- data/app/assets/components/iron-a11y-announcer/test/index.html +26 -0
- data/app/assets/components/iron-a11y-announcer/test/iron-a11y-announcer.html +59 -0
- data/app/assets/components/iron-a11y-keys-behavior/README.md +15 -0
- data/app/assets/components/iron-a11y-keys-behavior/bower.json +27 -0
- data/app/assets/components/iron-a11y-keys-behavior/demo/index.html +21 -0
- data/app/assets/components/iron-a11y-keys-behavior/demo/x-key-aware.html +69 -0
- data/app/assets/components/iron-a11y-keys-behavior/index.html +24 -0
- data/app/assets/components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html +418 -0
- data/app/assets/components/iron-a11y-keys-behavior/test/basic-test.html +248 -0
- data/app/assets/components/{paper-icon-button/metadata.html → iron-a11y-keys-behavior/test/index.html} +18 -10
- data/app/assets/components/iron-autogrow-textarea/README.md +24 -0
- data/app/assets/components/iron-autogrow-textarea/bower.json +37 -0
- data/app/assets/components/iron-autogrow-textarea/demo/index.html +81 -0
- data/app/assets/components/iron-autogrow-textarea/hero.svg +33 -0
- data/app/assets/components/iron-autogrow-textarea/index.html +30 -0
- data/app/assets/components/iron-autogrow-textarea/iron-autogrow-textarea.html +263 -0
- data/app/assets/components/iron-autogrow-textarea/test/basic.html +94 -0
- data/app/assets/components/iron-autogrow-textarea/test/index.html +25 -0
- data/app/assets/components/iron-behaviors/README.md +4 -0
- data/app/assets/components/iron-behaviors/bower.json +25 -0
- data/app/assets/components/iron-behaviors/demo/index.html +49 -0
- data/app/assets/components/iron-behaviors/demo/simple-button.html +70 -0
- data/app/assets/components/iron-behaviors/index.html +27 -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-behaviors/test/active-state.html +154 -0
- data/app/assets/components/iron-behaviors/test/disabled-state.html +85 -0
- data/app/assets/components/iron-behaviors/test/focused-state.html +82 -0
- data/app/assets/components/iron-behaviors/test/index.html +25 -0
- data/app/assets/components/iron-behaviors/test/test-elements.html +44 -0
- data/app/assets/components/iron-fit-behavior/README.md +3 -0
- data/app/assets/components/iron-fit-behavior/bower.json +31 -0
- data/app/assets/components/iron-fit-behavior/demo/index.html +42 -0
- data/app/assets/components/iron-fit-behavior/demo/simple-fit.html +42 -0
- data/app/assets/components/iron-fit-behavior/index.html +30 -0
- data/app/assets/components/iron-fit-behavior/iron-fit-behavior.html +230 -0
- data/app/assets/components/iron-fit-behavior/test/index.html +34 -0
- data/app/assets/components/iron-fit-behavior/test/iron-fit-behavior.html +332 -0
- data/app/assets/components/iron-fit-behavior/test/test-fit.html +42 -0
- data/app/assets/components/iron-flex-layout/README.md +4 -0
- data/app/assets/components/iron-flex-layout/bower.json +21 -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/demo/index.html +40 -0
- data/app/assets/components/iron-flex-layout/demo/x-app.html +106 -0
- data/app/assets/components/iron-flex-layout/iron-flex-layout.html +313 -0
- data/app/assets/components/iron-form-element-behavior/README.md +2 -0
- data/app/assets/components/iron-form-element-behavior/bower.json +27 -0
- data/app/assets/components/iron-form-element-behavior/demo/index.html +53 -0
- data/app/assets/components/iron-form-element-behavior/demo/simple-element.html +27 -0
- data/app/assets/components/iron-form-element-behavior/demo/simple-form.html +42 -0
- data/app/assets/components/iron-form-element-behavior/index.html +30 -0
- data/app/assets/components/iron-form-element-behavior/iron-form-element-behavior.html +50 -0
- data/app/assets/components/iron-icon/README.md +56 -0
- data/app/assets/components/iron-icon/bower.json +29 -0
- data/app/assets/components/iron-icon/demo/index.html +28 -0
- data/app/assets/components/iron-icon/demo/location.png +0 -0
- data/app/assets/components/iron-icon/hero.svg +19 -0
- data/app/assets/components/iron-icon/index.html +26 -0
- data/app/assets/components/iron-icon/iron-icon.html +187 -0
- data/app/assets/components/iron-icon/test/index.html +31 -0
- data/app/assets/components/iron-icon/test/iron-icon.html +120 -0
- data/app/assets/components/iron-icons/README.md +8 -0
- data/app/assets/components/{core-icons → iron-icons}/av-icons.html +19 -11
- data/app/assets/components/iron-icons/bower.json +37 -0
- data/app/assets/components/{core-icons → iron-icons}/communication-icons.html +14 -9
- data/app/assets/components/iron-icons/demo/index.html +132 -0
- data/app/assets/components/{core-icons → iron-icons}/device-icons.html +13 -9
- data/app/assets/components/{core-icons → iron-icons}/editor-icons.html +8 -5
- data/app/assets/components/{core-icons → iron-icons}/hardware-icons.html +11 -6
- data/app/assets/components/iron-icons/hero.svg +35 -0
- data/app/assets/components/{core-icons → iron-icons}/image-icons.html +23 -11
- data/app/assets/components/{core-menu/core-submenu.css → iron-icons/index.html} +14 -32
- data/app/assets/components/{core-icons/core-icons.html → iron-icons/iron-icons.html} +60 -35
- data/app/assets/components/{core-icons → iron-icons}/maps-icons.html +13 -12
- data/app/assets/components/{core-icons → iron-icons}/notification-icons.html +20 -7
- data/app/assets/components/{core-icons → iron-icons}/social-icons.html +6 -5
- data/app/assets/components/iron-iconset-svg/README.md +4 -0
- data/app/assets/components/iron-iconset-svg/bower.json +27 -0
- data/app/assets/components/iron-iconset-svg/demo/index.html +65 -0
- data/app/assets/components/{core-iconset-svg → iron-iconset-svg/demo}/svg-sample-icons.html +12 -11
- data/app/assets/components/iron-iconset-svg/index.html +26 -0
- data/app/assets/components/iron-iconset-svg/iron-iconset-svg.html +191 -0
- data/app/assets/components/iron-iconset-svg/test/index.html +30 -0
- data/app/assets/components/iron-iconset-svg/test/iron-iconset-svg.html +107 -0
- data/app/assets/components/iron-input/README.md +16 -0
- data/app/assets/components/iron-input/bower.json +36 -0
- data/app/assets/components/iron-input/demo/index.html +87 -0
- data/app/assets/components/iron-input/hero.svg +19 -0
- data/app/assets/components/iron-input/index.html +30 -0
- data/app/assets/components/iron-input/iron-input.html +235 -0
- data/app/assets/components/iron-input/test/index.html +24 -0
- data/app/assets/components/iron-input/test/iron-input.html +139 -0
- data/app/assets/components/iron-input/test/letters-only.html +30 -0
- data/app/assets/components/iron-media-query/README.md +11 -0
- data/app/assets/components/iron-media-query/bower.json +30 -0
- data/app/assets/components/iron-media-query/demo/index.html +38 -0
- data/app/assets/components/iron-media-query/hero.svg +29 -0
- data/app/assets/components/iron-media-query/index.html +29 -0
- data/app/assets/components/iron-media-query/iron-media-query.html +84 -0
- data/app/assets/components/iron-media-query/test/basic.html +71 -0
- data/app/assets/components/iron-media-query/test/index.html +30 -0
- data/app/assets/components/iron-menu-behavior/README.md +3 -0
- data/app/assets/components/iron-menu-behavior/bower.json +32 -0
- data/app/assets/components/iron-menu-behavior/demo/index.html +100 -0
- data/app/assets/components/iron-menu-behavior/demo/simple-menu.html +50 -0
- data/app/assets/components/iron-menu-behavior/demo/simple-menubar.html +54 -0
- data/app/assets/components/iron-menu-behavior/index.html +30 -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-menu-behavior/test/index.html +35 -0
- data/app/assets/components/iron-menu-behavior/test/iron-menu-behavior.html +108 -0
- data/app/assets/components/iron-menu-behavior/test/iron-menubar-behavior.html +108 -0
- data/app/assets/components/iron-menu-behavior/test/test-menu.html +40 -0
- data/app/assets/components/iron-menu-behavior/test/test-menubar.html +40 -0
- data/app/assets/components/iron-meta/README.md +46 -0
- data/app/assets/components/iron-meta/bower.json +28 -0
- data/app/assets/components/iron-meta/demo/index.html +45 -0
- data/app/assets/components/iron-meta/hero.svg +33 -0
- data/app/assets/components/iron-meta/index.html +27 -0
- data/app/assets/components/iron-meta/iron-meta.html +352 -0
- data/app/assets/components/iron-meta/test/basic.html +48 -0
- data/app/assets/components/iron-meta/test/index.html +30 -0
- data/app/assets/components/iron-meta/test/iron-meta.html +186 -0
- data/app/assets/components/iron-overlay-behavior/README.md +11 -0
- data/app/assets/components/iron-overlay-behavior/bower.json +36 -0
- data/app/assets/components/iron-overlay-behavior/demo/index.html +149 -0
- data/app/assets/components/iron-overlay-behavior/demo/simple-overlay.html +50 -0
- data/app/assets/components/iron-overlay-behavior/index.html +30 -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-overlay-behavior/test/index.html +34 -0
- data/app/assets/components/iron-overlay-behavior/test/iron-overlay-behavior.html +314 -0
- data/app/assets/components/iron-overlay-behavior/test/test-overlay.html +49 -0
- data/app/assets/components/iron-range-behavior/README.md +4 -0
- data/app/assets/components/iron-range-behavior/bower.json +30 -0
- data/app/assets/components/iron-range-behavior/demo/index.html +76 -0
- data/app/assets/components/iron-range-behavior/index.html +24 -0
- data/app/assets/components/iron-range-behavior/iron-range-behavior.html +101 -0
- data/app/assets/components/iron-range-behavior/test/basic.html +119 -0
- data/app/assets/components/iron-range-behavior/test/index.html +25 -0
- data/app/assets/components/iron-resizable-behavior/README.md +16 -0
- data/app/assets/components/iron-resizable-behavior/bower.json +26 -0
- data/app/assets/components/iron-resizable-behavior/demo/index.html +29 -0
- data/app/assets/components/iron-resizable-behavior/demo/src/x-app.html +114 -0
- data/app/assets/components/iron-resizable-behavior/index.html +25 -0
- data/app/assets/components/iron-resizable-behavior/iron-resizable-behavior.html +139 -0
- data/app/assets/components/iron-resizable-behavior/test/basic.html +263 -0
- data/app/assets/components/{core-overlay/core-key-helper.html → iron-resizable-behavior/test/index.html} +20 -11
- data/app/assets/components/iron-resizable-behavior/test/test-elements.html +143 -0
- data/app/assets/components/iron-selector/README.md +50 -0
- data/app/assets/components/iron-selector/bower.json +31 -0
- data/app/assets/components/iron-selector/demo/index.html +66 -0
- data/app/assets/components/iron-selector/index.html +28 -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-selector/test/activate-event.html +138 -0
- data/app/assets/components/iron-selector/test/basic.html +150 -0
- data/app/assets/components/iron-selector/test/content-element.html +43 -0
- data/app/assets/components/iron-selector/test/content.html +168 -0
- data/app/assets/components/iron-selector/test/index.html +36 -0
- data/app/assets/components/iron-selector/test/multi.html +135 -0
- data/app/assets/components/iron-selector/test/next-previous.html +134 -0
- data/app/assets/components/iron-selector/test/selected-attribute.html +72 -0
- data/app/assets/components/iron-selector/test/template-repeat.html +110 -0
- data/app/assets/components/iron-validatable-behavior/README.md +3 -0
- data/app/assets/components/iron-validatable-behavior/bower.json +35 -0
- data/app/assets/components/iron-validatable-behavior/demo/cats-only.html +46 -0
- data/app/assets/components/iron-validatable-behavior/demo/index.html +71 -0
- data/app/assets/components/iron-validatable-behavior/demo/validatable-input.html +46 -0
- data/app/assets/components/iron-validatable-behavior/index.html +30 -0
- data/app/assets/components/iron-validatable-behavior/iron-validatable-behavior.html +101 -0
- data/app/assets/components/iron-validatable-behavior/test/index.html +35 -0
- data/app/assets/components/iron-validatable-behavior/test/iron-validatable-behavior.html +52 -0
- data/app/assets/components/iron-validatable-behavior/test/test-validatable.html +28 -0
- data/app/assets/components/neon-animation/README.md +304 -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/bower.json +51 -0
- data/app/assets/components/neon-animation/demo/declarative/index.html +108 -0
- data/app/assets/components/neon-animation/demo/doc/basic.html +47 -0
- data/app/assets/components/neon-animation/demo/doc/my-animatable.html +73 -0
- data/app/assets/components/neon-animation/demo/doc/my-dialog.html +97 -0
- data/app/assets/components/neon-animation/demo/doc/types.html +53 -0
- data/app/assets/components/neon-animation/demo/dropdown/animated-dropdown.html +97 -0
- data/app/assets/components/neon-animation/demo/dropdown/index.html +54 -0
- data/app/assets/components/neon-animation/demo/grid/animated-grid.html +166 -0
- data/app/assets/components/neon-animation/demo/grid/fullsize-page-with-card.html +124 -0
- data/app/assets/components/neon-animation/demo/grid/index.html +70 -0
- data/app/assets/components/neon-animation/demo/index.html +6 -0
- data/app/assets/components/neon-animation/demo/list/full-view.html +122 -0
- data/app/assets/components/neon-animation/demo/list/index.html +29 -0
- data/app/assets/components/neon-animation/demo/list/list-demo.html +112 -0
- data/app/assets/components/neon-animation/demo/list/list-view.html +127 -0
- data/app/assets/components/neon-animation/demo/load/animated-grid.html +147 -0
- data/app/assets/components/neon-animation/demo/load/full-page.html +86 -0
- data/app/assets/components/neon-animation/demo/load/index.html +45 -0
- data/app/assets/components/neon-animation/demo/reprojection/animated-grid.html +166 -0
- data/app/assets/components/neon-animation/demo/reprojection/fullsize-page-with-card.html +124 -0
- data/app/assets/components/neon-animation/demo/reprojection/index.html +66 -0
- data/app/assets/components/neon-animation/demo/reprojection/reprojected-pages.html +42 -0
- data/app/assets/components/neon-animation/demo/shared.css +40 -0
- data/app/assets/components/neon-animation/demo/tiles/circles-page.html +110 -0
- data/app/assets/components/neon-animation/demo/tiles/index.html +77 -0
- data/app/assets/components/neon-animation/demo/tiles/squares-page.html +104 -0
- data/app/assets/components/neon-animation/guides/neon-animation.md +313 -0
- data/app/assets/components/neon-animation/index.html +30 -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/{core-collapse/core-collapse.css → neon-animation/web-animations.html} +5 -10
- data/app/assets/components/paper-behaviors/README.md +4 -0
- data/app/assets/components/paper-behaviors/bower.json +39 -0
- data/app/assets/components/paper-behaviors/demo/index.html +57 -0
- data/app/assets/components/paper-behaviors/demo/paper-button.html +71 -0
- data/app/assets/components/paper-behaviors/demo/paper-radio-button.html +116 -0
- data/app/assets/components/paper-behaviors/index.html +26 -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-behaviors/test/index.html +26 -0
- data/app/assets/components/paper-behaviors/test/paper-button-behavior.html +82 -0
- data/app/assets/components/paper-behaviors/test/paper-radio-button-behavior.html +62 -0
- data/app/assets/components/paper-behaviors/test/test-button.html +34 -0
- data/app/assets/components/paper-behaviors/test/test-radio-button.html +41 -0
- data/app/assets/components/paper-button/README.md +45 -0
- data/app/assets/components/paper-button/bower.json +39 -0
- data/app/assets/components/paper-button/demo/index.html +158 -0
- data/app/assets/components/paper-button/index.html +26 -0
- data/app/assets/components/paper-button/paper-button.html +113 -133
- data/app/assets/components/paper-button/test/index.html +25 -0
- data/app/assets/components/paper-button/test/paper-button.html +83 -0
- data/app/assets/components/paper-checkbox/README.md +31 -0
- data/app/assets/components/paper-checkbox/bower.json +37 -0
- data/app/assets/components/paper-checkbox/demo/index.html +94 -0
- data/app/assets/components/paper-checkbox/index.html +30 -0
- data/app/assets/components/paper-checkbox/paper-checkbox.css +141 -136
- data/app/assets/components/paper-checkbox/paper-checkbox.html +163 -102
- data/app/assets/components/paper-checkbox/test/basic.html +101 -0
- data/app/assets/components/paper-checkbox/test/index.html +24 -0
- data/app/assets/components/paper-dialog/README.md +3 -0
- data/app/assets/components/paper-dialog/bower.json +35 -0
- data/app/assets/components/paper-dialog/demo/index.html +158 -0
- data/app/assets/components/paper-dialog/hero.svg +58 -0
- data/app/assets/components/paper-dialog/index.html +30 -0
- data/app/assets/components/paper-dialog/paper-dialog.html +87 -66
- data/app/assets/components/paper-dialog/test/index.html +34 -0
- data/app/assets/components/paper-dialog/test/paper-dialog.html +53 -0
- data/app/assets/components/paper-dialog-behavior/README.md +24 -0
- data/app/assets/components/paper-dialog-behavior/bower.json +37 -0
- data/app/assets/components/paper-dialog-behavior/demo/index.html +96 -0
- data/app/assets/components/paper-dialog-behavior/demo/simple-dialog.html +42 -0
- data/app/assets/components/paper-dialog-behavior/hero.svg +51 -0
- data/app/assets/components/paper-dialog-behavior/index.html +30 -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-behavior/test/index.html +34 -0
- data/app/assets/components/paper-dialog-behavior/test/paper-dialog-behavior.html +217 -0
- data/app/assets/components/paper-dialog-behavior/test/test-dialog.html +42 -0
- data/app/assets/components/paper-dialog-scrollable/README.md +8 -0
- data/app/assets/components/paper-dialog-scrollable/bower.json +36 -0
- data/app/assets/components/paper-dialog-scrollable/demo/index.html +290 -0
- data/app/assets/components/paper-dialog-scrollable/hero.svg +69 -0
- data/app/assets/components/paper-dialog-scrollable/index.html +30 -0
- data/app/assets/components/paper-dialog-scrollable/paper-dialog-scrollable.html +150 -0
- data/app/assets/components/paper-dialog-scrollable/test/index.html +34 -0
- data/app/assets/components/paper-dialog-scrollable/test/paper-dialog-scrollable.html +171 -0
- data/app/assets/components/paper-drawer-panel/README.md +71 -0
- data/app/assets/components/paper-drawer-panel/bower.json +33 -0
- data/app/assets/components/paper-drawer-panel/demo/index.html +85 -0
- data/app/assets/components/paper-drawer-panel/hero.svg +21 -0
- data/app/assets/components/paper-drawer-panel/index.html +29 -0
- data/app/assets/components/{core-drawer-panel/core-drawer-panel.css → paper-drawer-panel/paper-drawer-panel.css} +33 -51
- data/app/assets/components/paper-drawer-panel/paper-drawer-panel.html +585 -0
- data/app/assets/components/paper-elements/README.md +21 -0
- data/app/assets/components/paper-elements/bower.json +51 -0
- data/app/assets/components/paper-fab/README.md +44 -0
- data/app/assets/components/paper-fab/bower.json +39 -0
- data/app/assets/components/paper-fab/demo/index.html +93 -0
- data/app/assets/components/paper-fab/index.html +24 -0
- data/app/assets/components/paper-fab/paper-fab.html +119 -140
- data/app/assets/components/paper-fab/test/a11y.html +71 -0
- data/app/assets/components/paper-fab/test/basic.html +76 -0
- data/app/assets/components/paper-fab/test/index.html +26 -0
- data/app/assets/components/paper-header-panel/README.md +105 -0
- data/app/assets/components/paper-header-panel/bower.json +28 -0
- data/app/assets/components/paper-header-panel/demo/index.html +148 -0
- data/app/assets/components/paper-header-panel/hero.svg +38 -0
- data/app/assets/components/paper-header-panel/index.html +36 -0
- data/app/assets/components/paper-header-panel/paper-header-panel.html +496 -0
- data/app/assets/components/paper-header-panel/test/basic.html +156 -0
- data/app/assets/components/paper-header-panel/test/index.html +34 -0
- data/app/assets/components/paper-icon-button/README.md +49 -0
- data/app/assets/components/paper-icon-button/bower.json +33 -0
- data/app/assets/components/paper-icon-button/demo/index.html +154 -0
- data/app/assets/components/paper-icon-button/index.html +23 -0
- data/app/assets/components/paper-icon-button/paper-icon-button.html +86 -99
- data/app/assets/components/paper-icon-button/test/a11y.html +69 -0
- data/app/assets/components/paper-icon-button/test/basic.html +77 -0
- data/app/assets/components/paper-icon-button/test/index.html +26 -0
- data/app/assets/components/paper-input/README.md +5 -0
- data/app/assets/components/{core-menu/core-menu.css → paper-input/all-imports.html} +6 -12
- data/app/assets/components/paper-input/bower.json +44 -0
- data/app/assets/components/paper-input/demo/index.html +96 -0
- data/app/assets/components/paper-input/demo/ssn-input.html +94 -0
- data/app/assets/components/paper-input/demo/ssn-validator.html +31 -0
- data/app/assets/components/paper-input/hero.svg +19 -0
- data/app/assets/components/paper-input/index.html +28 -0
- data/app/assets/components/paper-input/paper-input-addon-behavior.html +47 -0
- data/app/assets/components/paper-input/paper-input-behavior.html +317 -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 +96 -115
- data/app/assets/components/paper-input/paper-textarea.html +106 -0
- data/app/assets/components/paper-input/test/index.html +28 -0
- data/app/assets/components/paper-input/test/letters-only.html +30 -0
- data/app/assets/components/paper-input/test/paper-input-char-counter.html +112 -0
- data/app/assets/components/paper-input/test/paper-input-container.html +237 -0
- data/app/assets/components/paper-input/test/paper-input-error.html +60 -0
- data/app/assets/components/paper-input/test/paper-input.html +213 -0
- data/app/assets/components/paper-input/test/paper-textarea.html +169 -0
- data/app/assets/components/paper-item/README.md +4 -0
- data/app/assets/components/{font-roboto/roboto.html → paper-item/all-imports.html} +6 -2
- data/app/assets/components/paper-item/bower.json +40 -0
- data/app/assets/components/paper-item/demo/index.html +285 -0
- data/app/assets/components/paper-item/index.html +30 -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/{core-animation/web-animations.html → paper-item/paper-item-shared.css} +13 -4
- data/app/assets/components/paper-item/paper-item.html +66 -117
- data/app/assets/components/paper-item/test/index.html +34 -0
- data/app/assets/components/paper-item/test/paper-item.html +66 -0
- data/app/assets/components/paper-material/README.md +13 -0
- data/app/assets/components/paper-material/bower.json +36 -0
- data/app/assets/components/paper-material/demo/index.html +113 -0
- data/app/assets/components/paper-material/index.html +30 -0
- data/app/assets/components/paper-material/paper-material.html +98 -0
- data/app/assets/components/paper-material/test/index.html +25 -0
- data/app/assets/components/paper-material/test/paper-material.html +92 -0
- data/app/assets/components/paper-menu/README.md +3 -0
- data/app/assets/components/paper-menu/bower.json +32 -0
- data/app/assets/components/paper-menu/demo/index.html +81 -0
- data/app/assets/components/paper-menu/hero.svg +35 -0
- data/app/assets/components/paper-menu/index.html +30 -0
- data/app/assets/components/paper-menu/paper-menu.html +133 -0
- data/app/assets/components/paper-menu/test/index.html +34 -0
- data/app/assets/components/paper-menu/test/paper-menu.html +67 -0
- data/app/assets/components/paper-progress/README.md +47 -0
- data/app/assets/components/paper-progress/bower.json +31 -0
- data/app/assets/components/paper-progress/demo/index.html +122 -0
- data/app/assets/components/paper-progress/hero.svg +21 -0
- data/app/assets/components/paper-progress/index.html +28 -0
- data/app/assets/components/paper-progress/paper-progress.html +153 -78
- data/app/assets/components/paper-progress/test/basic.html +121 -0
- data/app/assets/components/paper-progress/test/index.html +25 -0
- data/app/assets/components/paper-radio-button/README.md +29 -0
- data/app/assets/components/paper-radio-button/bower.json +35 -0
- data/app/assets/components/paper-radio-button/demo/index.html +94 -0
- data/app/assets/components/paper-radio-button/hero.svg +22 -0
- data/app/assets/components/paper-radio-button/index.html +29 -0
- data/app/assets/components/paper-radio-button/paper-radio-button.css +26 -25
- data/app/assets/components/paper-radio-button/paper-radio-button.html +123 -141
- data/app/assets/components/paper-radio-button/test/basic.html +101 -0
- data/app/assets/components/paper-radio-button/test/index.html +24 -0
- data/app/assets/components/paper-radio-group/README.md +20 -0
- data/app/assets/components/paper-radio-group/bower.json +36 -0
- data/app/assets/components/paper-radio-group/demo/index.html +108 -0
- data/app/assets/components/paper-radio-group/hero.svg +25 -0
- data/app/assets/components/paper-radio-group/index.html +30 -0
- data/app/assets/components/paper-radio-group/paper-radio-group.html +153 -68
- data/app/assets/components/paper-radio-group/test/basic.html +167 -0
- data/app/assets/components/paper-radio-group/test/index.html +25 -0
- data/app/assets/components/paper-ripple/README.md +65 -0
- data/app/assets/components/paper-ripple/bower.json +29 -0
- data/app/assets/components/paper-ripple/demo/index.html +413 -0
- data/app/assets/components/paper-ripple/hero.svg +30 -0
- data/app/assets/components/paper-ripple/index.html +27 -0
- data/app/assets/components/paper-ripple/paper-ripple.html +552 -315
- data/app/assets/components/paper-ripple/test/index.html +25 -0
- data/app/assets/components/paper-ripple/test/paper-ripple.html +166 -0
- data/app/assets/components/paper-scroll-header-panel/README.md +56 -0
- data/app/assets/components/paper-scroll-header-panel/bower.json +38 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo1.html +81 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo2.html +78 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo3.html +79 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo4.html +108 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo5.html +107 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo6.html +112 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo7.html +114 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo8.html +125 -0
- data/app/assets/components/paper-scroll-header-panel/demo/demo9.html +105 -0
- data/app/assets/components/paper-scroll-header-panel/demo/images/bg2.jpg +0 -0
- data/app/assets/components/paper-scroll-header-panel/demo/images/bg3.jpg +0 -0
- data/app/assets/components/paper-scroll-header-panel/demo/images/bg5.jpg +0 -0
- data/app/assets/components/paper-scroll-header-panel/demo/images/bg6.jpg +0 -0
- data/app/assets/components/paper-scroll-header-panel/demo/images/bg9.jpg +0 -0
- data/app/assets/components/paper-scroll-header-panel/demo/index.html +107 -0
- data/app/assets/components/paper-scroll-header-panel/demo/lorem-ipsum.html +42 -0
- data/app/assets/components/paper-scroll-header-panel/demo/sample-content.html +72 -0
- data/app/assets/components/paper-scroll-header-panel/hero.svg +41 -0
- data/app/assets/components/paper-scroll-header-panel/index.html +28 -0
- data/app/assets/components/paper-scroll-header-panel/paper-scroll-header-panel.html +455 -0
- data/app/assets/components/paper-scroll-header-panel/test/basic.html +112 -0
- data/app/assets/components/paper-scroll-header-panel/test/index.html +25 -0
- data/app/assets/components/paper-slider/README.md +69 -0
- data/app/assets/components/paper-slider/bower.json +34 -0
- data/app/assets/components/paper-slider/demo/index.html +113 -0
- data/app/assets/components/paper-slider/hero.svg +20 -0
- data/app/assets/components/paper-slider/index.html +29 -0
- data/app/assets/components/paper-slider/paper-slider.css +39 -26
- data/app/assets/components/paper-slider/paper-slider.html +305 -228
- data/app/assets/components/paper-slider/test/basic.html +139 -0
- data/app/assets/components/paper-slider/test/index.html +25 -0
- data/app/assets/components/paper-spinner/README.md +45 -0
- data/app/assets/components/paper-spinner/bower.json +33 -0
- data/app/assets/components/paper-spinner/demo/index.html +98 -0
- data/app/assets/components/paper-spinner/hero.svg +27 -0
- data/app/assets/components/paper-spinner/index.html +30 -0
- data/app/assets/components/paper-spinner/paper-spinner.css +42 -40
- data/app/assets/components/paper-spinner/paper-spinner.html +168 -103
- data/app/assets/components/paper-spinner/test/index.html +34 -0
- data/app/assets/components/paper-spinner/test/paper-spinner.html +63 -0
- data/app/assets/components/paper-styles/README.md +3 -0
- data/app/assets/components/paper-styles/bower.json +27 -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/demo-pages.html +72 -0
- data/app/assets/components/paper-styles/demo.css +25 -0
- data/app/assets/components/{paper-dropdown/paper-dropdown-transition.css → paper-styles/paper-styles-classes.html} +8 -9
- 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/README.md +56 -0
- data/app/assets/components/paper-tabs/bower.json +37 -0
- data/app/assets/components/paper-tabs/demo/index.html +177 -0
- data/app/assets/components/paper-tabs/hero.svg +23 -0
- data/app/assets/components/paper-tabs/index.html +25 -0
- data/app/assets/components/paper-tabs/paper-tab.html +122 -46
- data/app/assets/components/paper-tabs/paper-tabs-icons.html +18 -0
- data/app/assets/components/paper-tabs/paper-tabs.html +387 -257
- data/app/assets/components/paper-tabs/test/attr-for-selected.html +82 -0
- data/app/assets/components/paper-tabs/test/basic.html +157 -0
- data/app/assets/components/paper-tabs/test/index.html +32 -0
- data/app/assets/components/paper-toast/README.md +4 -0
- data/app/assets/components/paper-toast/bower.json +28 -0
- data/app/assets/components/paper-toast/demo/index.html +56 -0
- data/app/assets/components/paper-toast/hero.svg +20 -0
- data/app/assets/components/paper-toast/index.html +26 -0
- data/app/assets/components/paper-toast/paper-toast.html +133 -265
- data/app/assets/components/paper-toggle-button/README.md +26 -0
- data/app/assets/components/paper-toggle-button/bower.json +36 -0
- data/app/assets/components/paper-toggle-button/demo/index.html +106 -0
- data/app/assets/components/paper-toggle-button/hero.svg +22 -0
- data/app/assets/components/paper-toggle-button/index.html +26 -0
- data/app/assets/components/paper-toggle-button/paper-toggle-button.css +36 -23
- data/app/assets/components/paper-toggle-button/paper-toggle-button.html +152 -148
- data/app/assets/components/paper-toggle-button/test/basic.html +86 -0
- data/app/assets/components/paper-toggle-button/test/index.html +25 -0
- data/app/assets/components/paper-toolbar/README.md +51 -0
- data/app/assets/components/paper-toolbar/bower.json +35 -0
- data/app/assets/components/paper-toolbar/demo/index.html +81 -0
- data/app/assets/components/paper-toolbar/index.html +38 -0
- data/app/assets/components/paper-toolbar/paper-toolbar.html +375 -0
- data/app/assets/components/paper-toolbar/test/index.html +24 -0
- data/app/assets/components/paper-toolbar/test/paper-toolbar.html +147 -0
- data/app/assets/components/polymer/LICENSE.txt +27 -0
- data/app/assets/components/polymer/bower.json +26 -0
- data/app/assets/components/polymer/build.log +27 -0
- data/app/assets/components/polymer/polymer-micro.html +523 -0
- data/app/assets/components/polymer/polymer-mini.html +1368 -0
- data/app/assets/components/polymer/polymer.html +3768 -0
- data/app/assets/components/web-animations-js/COPYING +202 -0
- data/app/assets/components/web-animations-js/History.md +108 -0
- data/app/assets/components/web-animations-js/README.md +161 -0
- data/app/assets/components/web-animations-js/bower.json +31 -0
- data/app/assets/components/web-animations-js/web-animations-next-lite.min.js +2 -2
- data/app/assets/components/web-animations-js/web-animations-next-lite.min.js.map +1 -0
- data/app/assets/components/web-animations-js/web-animations-next.min.js +2 -2
- data/app/assets/components/web-animations-js/web-animations-next.min.js.map +1 -0
- data/app/assets/components/web-animations-js/web-animations.html +50 -0
- data/app/assets/components/web-animations-js/web-animations.min.js +2 -2
- data/app/assets/components/web-animations-js/web-animations.min.js.gz +0 -0
- data/app/assets/components/web-animations-js/web-animations.min.js.map +1 -0
- data/app/assets/components/webcomponentsjs/CustomElements.js +343 -21
- data/app/assets/components/webcomponentsjs/CustomElements.min.js +2 -2
- data/app/assets/components/webcomponentsjs/HTMLImports.js +348 -34
- data/app/assets/components/webcomponentsjs/HTMLImports.min.js +2 -2
- data/app/assets/components/webcomponentsjs/MutationObserver.js +344 -0
- data/app/assets/components/webcomponentsjs/MutationObserver.min.js +11 -0
- data/app/assets/components/webcomponentsjs/README.md +125 -0
- data/app/assets/components/webcomponentsjs/ShadowDOM.js +230 -93
- data/app/assets/components/webcomponentsjs/ShadowDOM.min.js +6 -4
- data/app/assets/components/webcomponentsjs/bower.json +14 -0
- data/app/assets/components/webcomponentsjs/build.log +33 -0
- data/app/assets/components/webcomponentsjs/package.json +1 -1
- data/app/assets/components/webcomponentsjs/webcomponents-lite.js +671 -99
- data/app/assets/components/webcomponentsjs/webcomponents-lite.min.js +4 -2
- data/app/assets/components/webcomponentsjs/webcomponents.js +1149 -151
- data/app/assets/components/webcomponentsjs/webcomponents.min.js +6 -5
- data/lib/polymer-paper-rails/version.rb +1 -1
- metadata +532 -130
- data/app/assets/components/core-a11y-keys/core-a11y-keys.html +0 -335
- data/app/assets/components/core-animation/core-animation-group.html +0 -169
- data/app/assets/components/core-animation/core-animation.html +0 -525
- data/app/assets/components/core-collapse/core-collapse.html +0 -298
- data/app/assets/components/core-component-page/bowager-logo.png +0 -0
- data/app/assets/components/core-component-page/core-component-page.html +0 -37
- data/app/assets/components/core-drawer-panel/core-drawer-panel.html +0 -418
- data/app/assets/components/core-drawer-panel/metadata.html +0 -37
- data/app/assets/components/core-dropdown/core-dropdown-base.html +0 -117
- data/app/assets/components/core-dropdown/core-dropdown.html +0 -311
- data/app/assets/components/core-field/core-field.css +0 -38
- data/app/assets/components/core-field/core-field.html +0 -35
- data/app/assets/components/core-field/metadata.html +0 -26
- data/app/assets/components/core-focusable/core-focusable.html +0 -4
- data/app/assets/components/core-focusable/core-focusable.js +0 -134
- data/app/assets/components/core-focusable/polymer-mixin.js +0 -35
- data/app/assets/components/core-header-panel/core-header-panel.css +0 -78
- data/app/assets/components/core-header-panel/core-header-panel.html +0 -277
- data/app/assets/components/core-header-panel/metadata.html +0 -37
- data/app/assets/components/core-icon/core-icon.css +0 -16
- data/app/assets/components/core-icon/core-icon.html +0 -201
- data/app/assets/components/core-icon/metadata.html +0 -21
- data/app/assets/components/core-icon-button/core-icon-button.css +0 -75
- data/app/assets/components/core-icon-button/core-icon-button.html +0 -81
- data/app/assets/components/core-icon-button/metadata.html +0 -20
- data/app/assets/components/core-iconset/core-iconset.html +0 -241
- data/app/assets/components/core-iconset/my-icons-big.png +0 -0
- data/app/assets/components/core-iconset/my-icons.png +0 -0
- data/app/assets/components/core-iconset-svg/core-iconset-svg.html +0 -168
- data/app/assets/components/core-input/core-input.css +0 -41
- data/app/assets/components/core-input/core-input.html +0 -148
- data/app/assets/components/core-input/metadata.html +0 -23
- data/app/assets/components/core-item/core-item.css +0 -45
- data/app/assets/components/core-item/core-item.html +0 -73
- data/app/assets/components/core-item/metadata.html +0 -24
- data/app/assets/components/core-media-query/core-media-query.html +0 -87
- data/app/assets/components/core-menu/core-menu.html +0 -73
- data/app/assets/components/core-menu/core-submenu.html +0 -126
- data/app/assets/components/core-menu/metadata.html +0 -62
- data/app/assets/components/core-meta/core-meta.html +0 -145
- data/app/assets/components/core-overlay/core-overlay-layer.html +0 -116
- data/app/assets/components/core-overlay/core-overlay.html +0 -776
- data/app/assets/components/core-overlay/gulpfile.js +0 -2
- data/app/assets/components/core-range/core-range.html +0 -108
- data/app/assets/components/core-resizable/core-resizable.html +0 -248
- data/app/assets/components/core-scroll-header-panel/core-scroll-header-panel.css +0 -58
- data/app/assets/components/core-scroll-header-panel/core-scroll-header-panel.html +0 -360
- data/app/assets/components/core-scroll-header-panel/metadata.html +0 -41
- data/app/assets/components/core-selection/core-selection.html +0 -149
- data/app/assets/components/core-selector/core-selector.html +0 -548
- data/app/assets/components/core-selector/metadata.html +0 -20
- data/app/assets/components/core-style/core-style.html +0 -387
- data/app/assets/components/core-style/elements.html +0 -55
- data/app/assets/components/core-style/my-theme.html +0 -73
- data/app/assets/components/core-toolbar/core-toolbar.css +0 -117
- data/app/assets/components/core-toolbar/core-toolbar.html +0 -155
- data/app/assets/components/core-toolbar/metadata.html +0 -28
- data/app/assets/components/core-transition/core-transition-css.html +0 -220
- data/app/assets/components/core-transition/core-transition-overlay.css +0 -46
- data/app/assets/components/core-transition/core-transition.html +0 -140
- data/app/assets/components/paper-button/metadata.html +0 -17
- data/app/assets/components/paper-button/paper-button-base.html +0 -164
- data/app/assets/components/paper-dialog/paper-action-dialog.html +0 -104
- data/app/assets/components/paper-dialog/paper-dialog-base.html +0 -81
- data/app/assets/components/paper-dialog/paper-dialog-transition.css +0 -59
- data/app/assets/components/paper-dialog/paper-dialog-transition.html +0 -27
- data/app/assets/components/paper-dropdown/paper-dropdown-transition.html +0 -166
- data/app/assets/components/paper-dropdown/paper-dropdown.html +0 -117
- data/app/assets/components/paper-dropdown-menu/paper-dropdown-menu.css +0 -44
- data/app/assets/components/paper-dropdown-menu/paper-dropdown-menu.html +0 -184
- data/app/assets/components/paper-elements/metadata.html +0 -23
- data/app/assets/components/paper-elements/paper-elements.html +0 -40
- data/app/assets/components/paper-fab/metadata.html +0 -36
- data/app/assets/components/paper-input/metadata.html +0 -20
- data/app/assets/components/paper-input/paper-autogrow-textarea.html +0 -162
- data/app/assets/components/paper-input/paper-char-counter.html +0 -121
- data/app/assets/components/paper-input/paper-input-decorator.css +0 -132
- data/app/assets/components/paper-input/paper-input-decorator.html +0 -547
- data/app/assets/components/paper-item/metadata.html +0 -23
- data/app/assets/components/paper-menu-button/metadata.html +0 -21
- data/app/assets/components/paper-menu-button/paper-menu-button.css +0 -101
- data/app/assets/components/paper-menu-button/paper-menu-button.html +0 -79
- data/app/assets/components/paper-progress/metadata.html +0 -17
- data/app/assets/components/paper-progress/paper-progress.css +0 -68
- data/app/assets/components/paper-radio-button/metadata.html +0 -17
- data/app/assets/components/paper-radio-group/metadata.html +0 -22
- data/app/assets/components/paper-ripple/metadata.html +0 -20
- data/app/assets/components/paper-shadow/metadata.html +0 -17
- data/app/assets/components/paper-shadow/paper-shadow.css +0 -66
- data/app/assets/components/paper-shadow/paper-shadow.html +0 -86
- data/app/assets/components/paper-slider/metadata.html +0 -20
- data/app/assets/components/paper-tabs/metadata.html +0 -58
- data/app/assets/components/paper-tabs/paper-tab.css +0 -59
- data/app/assets/components/paper-tabs/paper-tabs.css +0 -80
- data/app/assets/components/paper-toast/metadata.html +0 -20
- data/app/assets/components/paper-toast/paper-toast.css +0 -80
- data/app/assets/components/paper-toggle-button/metadata.html +0 -17
- data/app/assets/components/sampler-scaffold/sampler-scaffold.css +0 -158
- data/app/assets/components/sampler-scaffold/sampler-scaffold.html +0 -224
@@ -1,776 +0,0 @@
|
|
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
|
-
<link rel="import" href="../polymer/polymer.html">
|
11
|
-
<link rel="import" href="../core-transition/core-transition.html">
|
12
|
-
<link rel="import" href="../core-resizable/core-resizable.html">
|
13
|
-
<link rel="import" href="core-key-helper.html">
|
14
|
-
<link rel="import" href="core-overlay-layer.html">
|
15
|
-
|
16
|
-
<!--
|
17
|
-
The `core-overlay` element displays overlayed on top of other content. It starts
|
18
|
-
out hidden and is displayed by setting its `opened` property to true.
|
19
|
-
A `core-overlay's` opened state can be toggled by calling the `toggle`
|
20
|
-
method.
|
21
|
-
|
22
|
-
The `core-overlay` will, by default, show/hide itself when it's opened. The
|
23
|
-
`target` property may be set to another element to cause that element to
|
24
|
-
be shown when the overlay is opened.
|
25
|
-
|
26
|
-
It's common to want a `core-overlay` to animate to its opened
|
27
|
-
position. The `core-overlay` element uses a `core-transition` to handle
|
28
|
-
animation. The default transition is `core-transition-fade` which
|
29
|
-
causes the overlay to fade in when displayed. See
|
30
|
-
<a href="../core-transition/">`core-transition`</a> for more
|
31
|
-
information about customizing a `core-overlay's` opening animation. The
|
32
|
-
`backdrop` property can be set to true to show a backdrop behind the overlay
|
33
|
-
that will darken the rest of the window.
|
34
|
-
|
35
|
-
An element that should close the `core-overlay` will automatically
|
36
|
-
do so if it's given the `core-overlay-toggle` attribute. This attribute
|
37
|
-
can be customized with the `closeAttribute` property. You can also use
|
38
|
-
`closeSelector` if more general matching is needed.
|
39
|
-
|
40
|
-
By default `core-overlay` will close whenever the user taps outside it or
|
41
|
-
presses the escape key. This behavior can be turned off via the
|
42
|
-
`autoCloseDisabled` property.
|
43
|
-
|
44
|
-
<core-overlay>
|
45
|
-
<h2>Dialog</h2>
|
46
|
-
<input placeholder="say something..." autofocus>
|
47
|
-
<div>I agree with this wholeheartedly.</div>
|
48
|
-
<button core-overlay-toggle>OK</button>
|
49
|
-
</core-overlay>
|
50
|
-
|
51
|
-
`core-overlay` will automatically size and position itself according to the
|
52
|
-
following rules. The overlay's size is constrained such that it does not
|
53
|
-
overflow the screen. This is done by setting maxHeight/maxWidth on the
|
54
|
-
`sizingTarget`. If the `sizingTarget` already has a setting for one of these
|
55
|
-
properties, it will not be overridden. The overlay should
|
56
|
-
be positioned via css or imperatively using the `core-overlay-position` event.
|
57
|
-
If the overlay is not positioned vertically via setting `top` or `bottom`, it
|
58
|
-
will be centered vertically. The same is true horizontally via a setting to
|
59
|
-
`left` or `right`. In addition, css `margin` can be used to provide some space
|
60
|
-
around the overlay. This can be used to ensure
|
61
|
-
that, for example, a drop shadow is always visible around the overlay.
|
62
|
-
|
63
|
-
@group Core Elements
|
64
|
-
@element core-overlay
|
65
|
-
@mixins Polymer.CoreResizer https://github.com/polymer/core-resizable
|
66
|
-
@homepage github.io
|
67
|
-
-->
|
68
|
-
<!--
|
69
|
-
Fired when the `core-overlay`'s `opened` property changes.
|
70
|
-
|
71
|
-
@event core-overlay-open
|
72
|
-
@param {Object} detail
|
73
|
-
@param {Object} detail.opened the opened state
|
74
|
-
-->
|
75
|
-
<!--
|
76
|
-
Fired when the `core-overlay` has completely opened.
|
77
|
-
|
78
|
-
@event core-overlay-open-completed
|
79
|
-
-->
|
80
|
-
<!--
|
81
|
-
Fired when the `core-overlay` has completely closed.
|
82
|
-
|
83
|
-
@event core-overlay-close-completed
|
84
|
-
-->
|
85
|
-
<!--
|
86
|
-
Fired when the `core-overlay` needs to position itself. Optionally, implement
|
87
|
-
in order to position an overlay via code. If the overlay was not otherwise
|
88
|
-
positioned, it's important to indicate how the overlay has been positioned by
|
89
|
-
setting the `dimensions.position` object. For example, if the overlay has been
|
90
|
-
positioned via setting `right` and `top`, set dimensions.position to an
|
91
|
-
object like this: `{v: 'top', h: 'right'}`.
|
92
|
-
|
93
|
-
@event core-overlay-position
|
94
|
-
@param {Object} detail
|
95
|
-
@param {Object} detail.target the overlay target
|
96
|
-
@param {Object} detail.sizingTarget the overlay sizing target
|
97
|
-
@param {Object} detail.opened the opened state
|
98
|
-
-->
|
99
|
-
<style>
|
100
|
-
.core-overlay-backdrop {
|
101
|
-
position: fixed;
|
102
|
-
top: 0;
|
103
|
-
left: 0;
|
104
|
-
width: 100vw;
|
105
|
-
height: 100vh;
|
106
|
-
background-color: black;
|
107
|
-
opacity: 0;
|
108
|
-
transition: opacity 0.2s;
|
109
|
-
}
|
110
|
-
|
111
|
-
.core-overlay-backdrop.core-opened {
|
112
|
-
opacity: 0.6;
|
113
|
-
}
|
114
|
-
</style>
|
115
|
-
|
116
|
-
<polymer-element name="core-overlay">
|
117
|
-
<script>
|
118
|
-
(function() {
|
119
|
-
|
120
|
-
Polymer(Polymer.mixin({
|
121
|
-
|
122
|
-
publish: {
|
123
|
-
/**
|
124
|
-
* The target element that will be shown when the overlay is
|
125
|
-
* opened. If unspecified, the core-overlay itself is the target.
|
126
|
-
*
|
127
|
-
* @attribute target
|
128
|
-
* @type Object
|
129
|
-
* @default the overlay element
|
130
|
-
*/
|
131
|
-
target: null,
|
132
|
-
|
133
|
-
|
134
|
-
/**
|
135
|
-
* A `core-overlay`'s size is guaranteed to be
|
136
|
-
* constrained to the window size. To achieve this, the sizingElement
|
137
|
-
* is sized with a max-height/width. By default this element is the
|
138
|
-
* target element, but it can be specifically set to a specific element
|
139
|
-
* inside the target if that is more appropriate. This is useful, for
|
140
|
-
* example, when a region inside the overlay should scroll if needed.
|
141
|
-
*
|
142
|
-
* @attribute sizingTarget
|
143
|
-
* @type Object
|
144
|
-
* @default the target element
|
145
|
-
*/
|
146
|
-
sizingTarget: null,
|
147
|
-
|
148
|
-
/**
|
149
|
-
* Set opened to true to show an overlay and to false to hide it.
|
150
|
-
* A `core-overlay` may be made initially opened by setting its
|
151
|
-
* `opened` attribute.
|
152
|
-
* @attribute opened
|
153
|
-
* @type boolean
|
154
|
-
* @default false
|
155
|
-
*/
|
156
|
-
opened: false,
|
157
|
-
|
158
|
-
/**
|
159
|
-
* If true, the overlay has a backdrop darkening the rest of the screen.
|
160
|
-
* The backdrop element is attached to the document body and may be styled
|
161
|
-
* with the class `core-overlay-backdrop`. When opened the `core-opened`
|
162
|
-
* class is applied.
|
163
|
-
*
|
164
|
-
* @attribute backdrop
|
165
|
-
* @type boolean
|
166
|
-
* @default false
|
167
|
-
*/
|
168
|
-
backdrop: false,
|
169
|
-
|
170
|
-
/**
|
171
|
-
* If true, the overlay is guaranteed to display above page content.
|
172
|
-
*
|
173
|
-
* @attribute layered
|
174
|
-
* @type boolean
|
175
|
-
* @default false
|
176
|
-
*/
|
177
|
-
layered: false,
|
178
|
-
|
179
|
-
/**
|
180
|
-
* By default an overlay will close automatically if the user
|
181
|
-
* taps outside it or presses the escape key. Disable this
|
182
|
-
* behavior by setting the `autoCloseDisabled` property to true.
|
183
|
-
* @attribute autoCloseDisabled
|
184
|
-
* @type boolean
|
185
|
-
* @default false
|
186
|
-
*/
|
187
|
-
autoCloseDisabled: false,
|
188
|
-
|
189
|
-
/**
|
190
|
-
* By default an overlay will focus its target or an element inside
|
191
|
-
* it with the `autoFocus` attribute. Disable this
|
192
|
-
* behavior by setting the `autoFocusDisabled` property to true.
|
193
|
-
* @attribute autoFocusDisabled
|
194
|
-
* @type boolean
|
195
|
-
* @default false
|
196
|
-
*/
|
197
|
-
autoFocusDisabled: false,
|
198
|
-
|
199
|
-
/**
|
200
|
-
* This property specifies an attribute on elements that should
|
201
|
-
* close the overlay on tap. Should not set `closeSelector` if this
|
202
|
-
* is set.
|
203
|
-
*
|
204
|
-
* @attribute closeAttribute
|
205
|
-
* @type string
|
206
|
-
* @default "core-overlay-toggle"
|
207
|
-
*/
|
208
|
-
closeAttribute: 'core-overlay-toggle',
|
209
|
-
|
210
|
-
/**
|
211
|
-
* This property specifies a selector matching elements that should
|
212
|
-
* close the overlay on tap. Should not set `closeAttribute` if this
|
213
|
-
* is set.
|
214
|
-
*
|
215
|
-
* @attribute closeSelector
|
216
|
-
* @type string
|
217
|
-
* @default ""
|
218
|
-
*/
|
219
|
-
closeSelector: '',
|
220
|
-
|
221
|
-
/**
|
222
|
-
* The transition property specifies a string which identifies a
|
223
|
-
* <a href="../core-transition/">`core-transition`</a> element that
|
224
|
-
* will be used to help the overlay open and close. The default
|
225
|
-
* `core-transition-fade` will cause the overlay to fade in and out.
|
226
|
-
*
|
227
|
-
* @attribute transition
|
228
|
-
* @type string
|
229
|
-
* @default 'core-transition-fade'
|
230
|
-
*/
|
231
|
-
transition: 'core-transition-fade'
|
232
|
-
|
233
|
-
},
|
234
|
-
|
235
|
-
captureEventName: 'tap',
|
236
|
-
targetListeners: {
|
237
|
-
'tap': 'tapHandler',
|
238
|
-
'keydown': 'keydownHandler',
|
239
|
-
'core-transitionend': 'transitionend'
|
240
|
-
},
|
241
|
-
|
242
|
-
attached: function() {
|
243
|
-
this.resizerAttachedHandler();
|
244
|
-
},
|
245
|
-
|
246
|
-
detached: function() {
|
247
|
-
this.resizerDetachedHandler();
|
248
|
-
},
|
249
|
-
|
250
|
-
resizerShouldNotify: function() {
|
251
|
-
return this.opened;
|
252
|
-
},
|
253
|
-
|
254
|
-
registerCallback: function(element) {
|
255
|
-
this.layer = document.createElement('core-overlay-layer');
|
256
|
-
this.keyHelper = document.createElement('core-key-helper');
|
257
|
-
this.meta = document.createElement('core-transition');
|
258
|
-
this.scrim = document.createElement('div');
|
259
|
-
this.scrim.className = 'core-overlay-backdrop';
|
260
|
-
},
|
261
|
-
|
262
|
-
ready: function() {
|
263
|
-
this.target = this.target || this;
|
264
|
-
// flush to ensure styles are installed before paint
|
265
|
-
Polymer.flush();
|
266
|
-
},
|
267
|
-
|
268
|
-
/**
|
269
|
-
* Toggle the opened state of the overlay.
|
270
|
-
* @method toggle
|
271
|
-
*/
|
272
|
-
toggle: function() {
|
273
|
-
this.opened = !this.opened;
|
274
|
-
},
|
275
|
-
|
276
|
-
/**
|
277
|
-
* Open the overlay. This is equivalent to setting the `opened`
|
278
|
-
* property to true.
|
279
|
-
* @method open
|
280
|
-
*/
|
281
|
-
open: function() {
|
282
|
-
this.opened = true;
|
283
|
-
},
|
284
|
-
|
285
|
-
/**
|
286
|
-
* Close the overlay. This is equivalent to setting the `opened`
|
287
|
-
* property to false.
|
288
|
-
* @method close
|
289
|
-
*/
|
290
|
-
close: function() {
|
291
|
-
this.opened = false;
|
292
|
-
},
|
293
|
-
|
294
|
-
domReady: function() {
|
295
|
-
this.ensureTargetSetup();
|
296
|
-
},
|
297
|
-
|
298
|
-
targetChanged: function(old) {
|
299
|
-
if (this.target) {
|
300
|
-
// really make sure tabIndex is set
|
301
|
-
if (this.target.tabIndex < 0) {
|
302
|
-
this.target.tabIndex = -1;
|
303
|
-
}
|
304
|
-
this.addElementListenerList(this.target, this.targetListeners);
|
305
|
-
this.target.style.display = 'none';
|
306
|
-
this.target.__overlaySetup = false;
|
307
|
-
}
|
308
|
-
if (old) {
|
309
|
-
this.removeElementListenerList(old, this.targetListeners);
|
310
|
-
var transition = this.getTransition();
|
311
|
-
if (transition) {
|
312
|
-
transition.teardown(old);
|
313
|
-
} else {
|
314
|
-
old.style.position = '';
|
315
|
-
old.style.outline = '';
|
316
|
-
}
|
317
|
-
old.style.display = '';
|
318
|
-
}
|
319
|
-
},
|
320
|
-
|
321
|
-
transitionChanged: function(old) {
|
322
|
-
if (!this.target) {
|
323
|
-
return;
|
324
|
-
}
|
325
|
-
if (old) {
|
326
|
-
this.getTransition(old).teardown(this.target);
|
327
|
-
}
|
328
|
-
this.target.__overlaySetup = false;
|
329
|
-
},
|
330
|
-
|
331
|
-
// NOTE: wait to call this until we're as sure as possible that target
|
332
|
-
// is styled.
|
333
|
-
ensureTargetSetup: function() {
|
334
|
-
if (!this.target || this.target.__overlaySetup) {
|
335
|
-
return;
|
336
|
-
}
|
337
|
-
if (!this.sizingTarget) {
|
338
|
-
this.sizingTarget = this.target;
|
339
|
-
}
|
340
|
-
this.target.__overlaySetup = true;
|
341
|
-
this.target.style.display = '';
|
342
|
-
var transition = this.getTransition();
|
343
|
-
if (transition) {
|
344
|
-
transition.setup(this.target);
|
345
|
-
}
|
346
|
-
var style = this.target.style;
|
347
|
-
var computed = getComputedStyle(this.target);
|
348
|
-
if (computed.position === 'static') {
|
349
|
-
style.position = 'fixed';
|
350
|
-
}
|
351
|
-
style.outline = 'none';
|
352
|
-
style.display = 'none';
|
353
|
-
},
|
354
|
-
|
355
|
-
openedChanged: function() {
|
356
|
-
this.transitioning = true;
|
357
|
-
this.ensureTargetSetup();
|
358
|
-
this.prepareRenderOpened();
|
359
|
-
// async here to allow overlay layer to become visible.
|
360
|
-
this.async(function() {
|
361
|
-
this.target.style.display = '';
|
362
|
-
// force layout to ensure transitions will go
|
363
|
-
this.target.offsetWidth;
|
364
|
-
this.renderOpened();
|
365
|
-
});
|
366
|
-
this.fire('core-overlay-open', this.opened);
|
367
|
-
},
|
368
|
-
|
369
|
-
// tasks which must occur before opening; e.g. making the element visible
|
370
|
-
prepareRenderOpened: function() {
|
371
|
-
if (this.opened) {
|
372
|
-
addOverlay(this);
|
373
|
-
}
|
374
|
-
this.prepareBackdrop();
|
375
|
-
// async so we don't auto-close immediately via a click.
|
376
|
-
this.async(function() {
|
377
|
-
if (!this.autoCloseDisabled) {
|
378
|
-
this.enableElementListener(this.opened, document,
|
379
|
-
this.captureEventName, 'captureHandler', true);
|
380
|
-
}
|
381
|
-
});
|
382
|
-
this.enableElementListener(this.opened, window, 'resize',
|
383
|
-
'resizeHandler');
|
384
|
-
|
385
|
-
if (this.opened) {
|
386
|
-
// force layout so SD Polyfill renders
|
387
|
-
this.target.offsetHeight;
|
388
|
-
this.discoverDimensions();
|
389
|
-
// if we are showing, then take care when positioning
|
390
|
-
this.preparePositioning();
|
391
|
-
this.positionTarget();
|
392
|
-
this.updateTargetDimensions();
|
393
|
-
this.finishPositioning();
|
394
|
-
if (this.layered) {
|
395
|
-
this.layer.addElement(this.target);
|
396
|
-
this.layer.opened = this.opened;
|
397
|
-
}
|
398
|
-
}
|
399
|
-
},
|
400
|
-
|
401
|
-
// tasks which cause the overlay to actually open; typically play an
|
402
|
-
// animation
|
403
|
-
renderOpened: function() {
|
404
|
-
this.notifyResize();
|
405
|
-
var transition = this.getTransition();
|
406
|
-
if (transition) {
|
407
|
-
transition.go(this.target, {opened: this.opened});
|
408
|
-
} else {
|
409
|
-
this.transitionend();
|
410
|
-
}
|
411
|
-
this.renderBackdropOpened();
|
412
|
-
},
|
413
|
-
|
414
|
-
// finishing tasks; typically called via a transition
|
415
|
-
transitionend: function(e) {
|
416
|
-
// make sure this is our transition event.
|
417
|
-
if (e && e.target !== this.target) {
|
418
|
-
return;
|
419
|
-
}
|
420
|
-
this.transitioning = false;
|
421
|
-
if (!this.opened) {
|
422
|
-
this.resetTargetDimensions();
|
423
|
-
this.target.style.display = 'none';
|
424
|
-
this.completeBackdrop();
|
425
|
-
removeOverlay(this);
|
426
|
-
if (this.layered) {
|
427
|
-
if (!currentOverlay()) {
|
428
|
-
this.layer.opened = this.opened;
|
429
|
-
}
|
430
|
-
this.layer.removeElement(this.target);
|
431
|
-
}
|
432
|
-
}
|
433
|
-
this.fire('core-overlay-' + (this.opened ? 'open' : 'close') +
|
434
|
-
'-completed');
|
435
|
-
this.applyFocus();
|
436
|
-
},
|
437
|
-
|
438
|
-
prepareBackdrop: function() {
|
439
|
-
if (this.backdrop && this.opened) {
|
440
|
-
if (!this.scrim.parentNode) {
|
441
|
-
document.body.appendChild(this.scrim);
|
442
|
-
this.scrim.style.zIndex = currentOverlayZ() - 1;
|
443
|
-
}
|
444
|
-
trackBackdrop(this);
|
445
|
-
}
|
446
|
-
},
|
447
|
-
|
448
|
-
renderBackdropOpened: function() {
|
449
|
-
if (this.backdrop && getBackdrops().length < 2) {
|
450
|
-
this.scrim.classList.toggle('core-opened', this.opened);
|
451
|
-
}
|
452
|
-
},
|
453
|
-
|
454
|
-
completeBackdrop: function() {
|
455
|
-
if (this.backdrop) {
|
456
|
-
trackBackdrop(this);
|
457
|
-
if (getBackdrops().length === 0) {
|
458
|
-
this.scrim.parentNode.removeChild(this.scrim);
|
459
|
-
}
|
460
|
-
}
|
461
|
-
},
|
462
|
-
|
463
|
-
preparePositioning: function() {
|
464
|
-
this.target.style.transition = this.target.style.webkitTransition = 'none';
|
465
|
-
this.target.style.transform = this.target.style.webkitTransform = 'none';
|
466
|
-
this.target.style.display = '';
|
467
|
-
},
|
468
|
-
|
469
|
-
discoverDimensions: function() {
|
470
|
-
if (this.dimensions) {
|
471
|
-
return;
|
472
|
-
}
|
473
|
-
var target = getComputedStyle(this.target);
|
474
|
-
var sizer = getComputedStyle(this.sizingTarget);
|
475
|
-
this.dimensions = {
|
476
|
-
position: {
|
477
|
-
v: target.top !== 'auto' ? 'top' : (target.bottom !== 'auto' ?
|
478
|
-
'bottom' : null),
|
479
|
-
h: target.left !== 'auto' ? 'left' : (target.right !== 'auto' ?
|
480
|
-
'right' : null),
|
481
|
-
css: target.position
|
482
|
-
},
|
483
|
-
size: {
|
484
|
-
v: sizer.maxHeight !== 'none',
|
485
|
-
h: sizer.maxWidth !== 'none'
|
486
|
-
},
|
487
|
-
margin: {
|
488
|
-
top: parseInt(target.marginTop) || 0,
|
489
|
-
right: parseInt(target.marginRight) || 0,
|
490
|
-
bottom: parseInt(target.marginBottom) || 0,
|
491
|
-
left: parseInt(target.marginLeft) || 0
|
492
|
-
}
|
493
|
-
};
|
494
|
-
},
|
495
|
-
|
496
|
-
finishPositioning: function(target) {
|
497
|
-
this.target.style.display = 'none';
|
498
|
-
this.target.style.transform = this.target.style.webkitTransform = '';
|
499
|
-
// force layout to avoid application of transform
|
500
|
-
this.target.offsetWidth;
|
501
|
-
this.target.style.transition = this.target.style.webkitTransition = '';
|
502
|
-
},
|
503
|
-
|
504
|
-
getTransition: function(name) {
|
505
|
-
return this.meta.byId(name || this.transition);
|
506
|
-
},
|
507
|
-
|
508
|
-
getFocusNode: function() {
|
509
|
-
return this.target.querySelector('[autofocus]') || this.target;
|
510
|
-
},
|
511
|
-
|
512
|
-
applyFocus: function() {
|
513
|
-
var focusNode = this.getFocusNode();
|
514
|
-
if (this.opened) {
|
515
|
-
if (!this.autoFocusDisabled) {
|
516
|
-
focusNode.focus();
|
517
|
-
}
|
518
|
-
} else {
|
519
|
-
focusNode.blur();
|
520
|
-
if (currentOverlay() == this) {
|
521
|
-
console.warn('Current core-overlay is attempting to focus itself as next! (bug)');
|
522
|
-
} else {
|
523
|
-
focusOverlay();
|
524
|
-
}
|
525
|
-
}
|
526
|
-
},
|
527
|
-
|
528
|
-
positionTarget: function() {
|
529
|
-
// fire positioning event
|
530
|
-
this.fire('core-overlay-position', {target: this.target,
|
531
|
-
sizingTarget: this.sizingTarget, opened: this.opened});
|
532
|
-
if (!this.dimensions.position.v) {
|
533
|
-
this.target.style.top = '0px';
|
534
|
-
}
|
535
|
-
if (!this.dimensions.position.h) {
|
536
|
-
this.target.style.left = '0px';
|
537
|
-
}
|
538
|
-
},
|
539
|
-
|
540
|
-
updateTargetDimensions: function() {
|
541
|
-
this.sizeTarget();
|
542
|
-
this.repositionTarget();
|
543
|
-
},
|
544
|
-
|
545
|
-
sizeTarget: function() {
|
546
|
-
this.sizingTarget.style.boxSizing = 'border-box';
|
547
|
-
var dims = this.dimensions;
|
548
|
-
var rect = this.target.getBoundingClientRect();
|
549
|
-
if (!dims.size.v) {
|
550
|
-
this.sizeDimension(rect, dims.position.v, 'top', 'bottom', 'Height');
|
551
|
-
}
|
552
|
-
if (!dims.size.h) {
|
553
|
-
this.sizeDimension(rect, dims.position.h, 'left', 'right', 'Width');
|
554
|
-
}
|
555
|
-
},
|
556
|
-
|
557
|
-
sizeDimension: function(rect, positionedBy, start, end, extent) {
|
558
|
-
var dims = this.dimensions;
|
559
|
-
var flip = (positionedBy === end);
|
560
|
-
var m = flip ? start : end;
|
561
|
-
var ws = window['inner' + extent];
|
562
|
-
var o = dims.margin[m] + (flip ? ws - rect[end] :
|
563
|
-
rect[start]);
|
564
|
-
var offset = 'offset' + extent;
|
565
|
-
var o2 = this.target[offset] - this.sizingTarget[offset];
|
566
|
-
this.sizingTarget.style['max' + extent] = (ws - o - o2) + 'px';
|
567
|
-
},
|
568
|
-
|
569
|
-
// vertically and horizontally center if not positioned
|
570
|
-
repositionTarget: function() {
|
571
|
-
// only center if position fixed.
|
572
|
-
if (this.dimensions.position.css !== 'fixed') {
|
573
|
-
return;
|
574
|
-
}
|
575
|
-
if (!this.dimensions.position.v) {
|
576
|
-
var t = (window.innerHeight - this.target.offsetHeight) / 2;
|
577
|
-
t -= this.dimensions.margin.top;
|
578
|
-
this.target.style.top = t + 'px';
|
579
|
-
}
|
580
|
-
|
581
|
-
if (!this.dimensions.position.h) {
|
582
|
-
var l = (window.innerWidth - this.target.offsetWidth) / 2;
|
583
|
-
l -= this.dimensions.margin.left;
|
584
|
-
this.target.style.left = l + 'px';
|
585
|
-
}
|
586
|
-
},
|
587
|
-
|
588
|
-
resetTargetDimensions: function() {
|
589
|
-
if (!this.dimensions || !this.dimensions.size.v) {
|
590
|
-
this.sizingTarget.style.maxHeight = '';
|
591
|
-
this.target.style.top = '';
|
592
|
-
}
|
593
|
-
if (!this.dimensions || !this.dimensions.size.h) {
|
594
|
-
this.sizingTarget.style.maxWidth = '';
|
595
|
-
this.target.style.left = '';
|
596
|
-
}
|
597
|
-
this.dimensions = null;
|
598
|
-
},
|
599
|
-
|
600
|
-
tapHandler: function(e) {
|
601
|
-
// closeSelector takes precedence since closeAttribute has a default non-null value.
|
602
|
-
if (e.target &&
|
603
|
-
(this.closeSelector && e.target.matches(this.closeSelector)) ||
|
604
|
-
(this.closeAttribute && e.target.hasAttribute(this.closeAttribute))) {
|
605
|
-
this.toggle();
|
606
|
-
} else {
|
607
|
-
if (this.autoCloseJob) {
|
608
|
-
this.autoCloseJob.stop();
|
609
|
-
this.autoCloseJob = null;
|
610
|
-
}
|
611
|
-
}
|
612
|
-
},
|
613
|
-
|
614
|
-
// We use the traditional approach of capturing events on document
|
615
|
-
// to to determine if the overlay needs to close. However, due to
|
616
|
-
// ShadowDOM event retargeting, the event target is not useful. Instead
|
617
|
-
// of using it, we attempt to close asynchronously and prevent the close
|
618
|
-
// if a tap event is immediately heard on the target.
|
619
|
-
// TODO(sorvell): This approach will not work with modal. For
|
620
|
-
// this we need a scrim.
|
621
|
-
captureHandler: function(e) {
|
622
|
-
if (!this.autoCloseDisabled && (currentOverlay() == this)) {
|
623
|
-
this.autoCloseJob = this.job(this.autoCloseJob, function() {
|
624
|
-
this.close();
|
625
|
-
});
|
626
|
-
}
|
627
|
-
},
|
628
|
-
|
629
|
-
keydownHandler: function(e) {
|
630
|
-
if (!this.autoCloseDisabled && (e.keyCode == this.keyHelper.ESCAPE_KEY)) {
|
631
|
-
this.close();
|
632
|
-
e.stopPropagation();
|
633
|
-
}
|
634
|
-
},
|
635
|
-
|
636
|
-
/**
|
637
|
-
* Extensions of core-overlay should implement the `resizeHandler`
|
638
|
-
* method to adjust the size and position of the overlay when the
|
639
|
-
* browser window resizes.
|
640
|
-
* @method resizeHandler
|
641
|
-
*/
|
642
|
-
resizeHandler: function() {
|
643
|
-
this.updateTargetDimensions();
|
644
|
-
},
|
645
|
-
|
646
|
-
// TODO(sorvell): these utility methods should not be here.
|
647
|
-
addElementListenerList: function(node, events) {
|
648
|
-
for (var i in events) {
|
649
|
-
this.addElementListener(node, i, events[i]);
|
650
|
-
}
|
651
|
-
},
|
652
|
-
|
653
|
-
removeElementListenerList: function(node, events) {
|
654
|
-
for (var i in events) {
|
655
|
-
this.removeElementListener(node, i, events[i]);
|
656
|
-
}
|
657
|
-
},
|
658
|
-
|
659
|
-
enableElementListener: function(enable, node, event, methodName, capture) {
|
660
|
-
if (enable) {
|
661
|
-
this.addElementListener(node, event, methodName, capture);
|
662
|
-
} else {
|
663
|
-
this.removeElementListener(node, event, methodName, capture);
|
664
|
-
}
|
665
|
-
},
|
666
|
-
|
667
|
-
addElementListener: function(node, event, methodName, capture) {
|
668
|
-
var fn = this._makeBoundListener(methodName);
|
669
|
-
if (node && fn) {
|
670
|
-
Polymer.addEventListener(node, event, fn, capture);
|
671
|
-
}
|
672
|
-
},
|
673
|
-
|
674
|
-
removeElementListener: function(node, event, methodName, capture) {
|
675
|
-
var fn = this._makeBoundListener(methodName);
|
676
|
-
if (node && fn) {
|
677
|
-
Polymer.removeEventListener(node, event, fn, capture);
|
678
|
-
}
|
679
|
-
},
|
680
|
-
|
681
|
-
_makeBoundListener: function(methodName) {
|
682
|
-
var self = this, method = this[methodName];
|
683
|
-
if (!method) {
|
684
|
-
return;
|
685
|
-
}
|
686
|
-
var bound = '_bound' + methodName;
|
687
|
-
if (!this[bound]) {
|
688
|
-
this[bound] = function(e) {
|
689
|
-
method.call(self, e);
|
690
|
-
};
|
691
|
-
}
|
692
|
-
return this[bound];
|
693
|
-
}
|
694
|
-
|
695
|
-
}, Polymer.CoreResizer));
|
696
|
-
|
697
|
-
// TODO(sorvell): This should be an element with private state so it can
|
698
|
-
// be independent of overlay.
|
699
|
-
// track overlays for z-index and focus managemant
|
700
|
-
var overlays = [];
|
701
|
-
function addOverlay(overlay) {
|
702
|
-
var z0 = currentOverlayZ();
|
703
|
-
overlays.push(overlay);
|
704
|
-
var z1 = currentOverlayZ();
|
705
|
-
if (z1 <= z0) {
|
706
|
-
applyOverlayZ(overlay, z0);
|
707
|
-
}
|
708
|
-
}
|
709
|
-
|
710
|
-
function removeOverlay(overlay) {
|
711
|
-
var i = overlays.indexOf(overlay);
|
712
|
-
if (i >= 0) {
|
713
|
-
overlays.splice(i, 1);
|
714
|
-
setZ(overlay, '');
|
715
|
-
}
|
716
|
-
}
|
717
|
-
|
718
|
-
function applyOverlayZ(overlay, aboveZ) {
|
719
|
-
setZ(overlay.target, aboveZ + 2);
|
720
|
-
}
|
721
|
-
|
722
|
-
function setZ(element, z) {
|
723
|
-
element.style.zIndex = z;
|
724
|
-
}
|
725
|
-
|
726
|
-
function currentOverlay() {
|
727
|
-
return overlays[overlays.length-1];
|
728
|
-
}
|
729
|
-
|
730
|
-
var DEFAULT_Z = 10;
|
731
|
-
|
732
|
-
function currentOverlayZ() {
|
733
|
-
var z;
|
734
|
-
var current = currentOverlay();
|
735
|
-
if (current) {
|
736
|
-
var z1 = window.getComputedStyle(current.target).zIndex;
|
737
|
-
if (!isNaN(z1)) {
|
738
|
-
z = Number(z1);
|
739
|
-
}
|
740
|
-
}
|
741
|
-
return z || DEFAULT_Z;
|
742
|
-
}
|
743
|
-
|
744
|
-
function focusOverlay() {
|
745
|
-
var current = currentOverlay();
|
746
|
-
// We have to be careful to focus the next overlay _after_ any current
|
747
|
-
// transitions are complete (due to the state being toggled prior to the
|
748
|
-
// transition). Otherwise, we risk infinite recursion when a transitioning
|
749
|
-
// (closed) overlay becomes the current overlay.
|
750
|
-
//
|
751
|
-
// NOTE: We make the assumption that any overlay that completes a transition
|
752
|
-
// will call into focusOverlay to kick the process back off. Currently:
|
753
|
-
// transitionend -> applyFocus -> focusOverlay.
|
754
|
-
if (current && !current.transitioning) {
|
755
|
-
current.applyFocus();
|
756
|
-
}
|
757
|
-
}
|
758
|
-
|
759
|
-
var backdrops = [];
|
760
|
-
function trackBackdrop(element) {
|
761
|
-
if (element.opened) {
|
762
|
-
backdrops.push(element);
|
763
|
-
} else {
|
764
|
-
var i = backdrops.indexOf(element);
|
765
|
-
if (i >= 0) {
|
766
|
-
backdrops.splice(i, 1);
|
767
|
-
}
|
768
|
-
}
|
769
|
-
}
|
770
|
-
|
771
|
-
function getBackdrops() {
|
772
|
-
return backdrops;
|
773
|
-
}
|
774
|
-
})();
|
775
|
-
</script>
|
776
|
-
</polymer-element>
|