├── .bowerrc ├── .gitignore ├── .status ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── bower.json ├── codereview.settings ├── lib ├── paper_action_dialog.dart ├── paper_action_dialog.html ├── paper_action_dialog_nodart.html ├── paper_autogrow_textarea.dart ├── paper_autogrow_textarea.html ├── paper_autogrow_textarea_nodart.html ├── paper_button.dart ├── paper_button.html ├── paper_button_base.dart ├── paper_button_base.html ├── paper_button_base_nodart.html ├── paper_button_nodart.html ├── paper_char_counter.dart ├── paper_char_counter.html ├── paper_char_counter_nodart.html ├── paper_checkbox.dart ├── paper_checkbox.html ├── paper_checkbox_nodart.html ├── paper_dialog.dart ├── paper_dialog.html ├── paper_dialog_base.dart ├── paper_dialog_base.html ├── paper_dialog_base_nodart.html ├── paper_dialog_nodart.html ├── paper_dialog_transition.dart ├── paper_dialog_transition.html ├── paper_dialog_transition_nodart.html ├── paper_dropdown.dart ├── paper_dropdown.html ├── paper_dropdown_menu.dart ├── paper_dropdown_menu.html ├── paper_dropdown_menu_nodart.html ├── paper_dropdown_nodart.html ├── paper_dropdown_transition.dart ├── paper_dropdown_transition.html ├── paper_dropdown_transition_nodart.html ├── paper_fab.dart ├── paper_fab.html ├── paper_fab_nodart.html ├── paper_icon_button.dart ├── paper_icon_button.html ├── paper_icon_button_nodart.html ├── paper_input.dart ├── paper_input.html ├── paper_input_decorator.dart ├── paper_input_decorator.html ├── paper_input_decorator_nodart.html ├── paper_input_nodart.html ├── paper_item.dart ├── paper_item.html ├── paper_item_nodart.html ├── paper_menu_button.dart ├── paper_menu_button.html ├── paper_menu_button_nodart.html ├── paper_progress.dart ├── paper_progress.html ├── paper_progress_nodart.html ├── paper_radio_button.dart ├── paper_radio_button.html ├── paper_radio_button_nodart.html ├── paper_radio_group.dart ├── paper_radio_group.html ├── paper_radio_group_nodart.html ├── paper_ripple.dart ├── paper_ripple.html ├── paper_ripple_nodart.html ├── paper_shadow.dart ├── paper_shadow.html ├── paper_shadow_nodart.html ├── paper_slider.dart ├── paper_slider.html ├── paper_slider_nodart.html ├── paper_spinner.dart ├── paper_spinner.html ├── paper_spinner_nodart.html ├── paper_tab.dart ├── paper_tab.html ├── paper_tab_nodart.html ├── paper_tabs.dart ├── paper_tabs.html ├── paper_tabs_nodart.html ├── paper_toast.dart ├── paper_toast.html ├── paper_toast_nodart.html ├── paper_toggle_button.dart ├── paper_toggle_button.html ├── paper_toggle_button_nodart.html ├── roboto.dart ├── roboto.html ├── roboto_nodart.html ├── sampler_scaffold.dart ├── sampler_scaffold.html ├── sampler_scaffold_nodart.html └── src │ ├── core-a11y-keys │ └── core-a11y-keys.html │ ├── core-animation │ ├── core-animation-group.html │ ├── core-animation.html │ └── web-animations.html │ ├── core-collapse │ └── core-collapse.html │ ├── core-component-page │ └── core-component-page.html │ ├── core-drawer-panel │ └── core-drawer-panel.html │ ├── core-dropdown │ ├── core-dropdown-base.html │ └── core-dropdown.html │ ├── core-field │ └── core-field.html │ ├── core-focusable │ └── core-focusable.html │ ├── core-header-panel │ └── core-header-panel.html │ ├── core-icon-button │ └── core-icon-button.html │ ├── core-icon │ └── core-icon.html │ ├── core-icons │ └── core-icons.html │ ├── core-iconset-svg │ └── core-iconset-svg.html │ ├── core-iconset │ └── core-iconset.html │ ├── core-input │ └── core-input.html │ ├── core-item │ └── core-item.html │ ├── core-media-query │ └── core-media-query.html │ ├── core-menu │ ├── core-menu.html │ └── core-submenu.html │ ├── core-meta │ └── core-meta.html │ ├── core-overlay │ ├── core-key-helper.html │ ├── core-overlay-layer.html │ └── core-overlay.html │ ├── core-range │ └── core-range.html │ ├── core-resizable │ └── core-resizable.html │ ├── core-scroll-header-panel │ └── core-scroll-header-panel.html │ ├── core-selection │ └── core-selection.html │ ├── core-selector │ └── core-selector.html │ ├── core-style │ └── core-style.html │ ├── core-toolbar │ └── core-toolbar.html │ ├── core-transition │ ├── core-transition-css.html │ └── core-transition.html │ ├── font-roboto │ └── roboto.html │ ├── paper-button │ ├── paper-button-base.html │ ├── paper-button.html │ └── test │ │ └── paper-button.html │ ├── paper-checkbox │ ├── paper-checkbox.css │ └── paper-checkbox.html │ ├── paper-dialog │ ├── .gitignore │ ├── paper-action-dialog.html │ ├── paper-dialog-base.html │ ├── paper-dialog-transition.css │ ├── paper-dialog-transition.html │ ├── paper-dialog.html │ └── test │ │ └── basic.html │ ├── paper-dropdown-menu │ ├── paper-dropdown-menu.css │ ├── paper-dropdown-menu.html │ └── test │ │ └── basic.html │ ├── paper-dropdown │ ├── paper-dropdown-transition.css │ ├── paper-dropdown-transition.html │ └── paper-dropdown.html │ ├── paper-elements │ └── paper-elements.html │ ├── paper-fab │ ├── paper-fab.html │ └── test │ │ ├── a11y.html │ │ └── basic.html │ ├── paper-icon-button │ ├── paper-icon-button.html │ └── test │ │ ├── a11y.html │ │ └── basic.html │ ├── paper-input │ ├── .gitignore │ ├── paper-autogrow-textarea.html │ ├── paper-char-counter.html │ ├── paper-input-decorator.css │ ├── paper-input-decorator.html │ ├── paper-input.html │ └── test │ │ ├── paper-autogrow-textarea.html │ │ ├── paper-input-decorator.html │ │ ├── paper-input.html │ │ └── util.js │ ├── paper-item │ └── paper-item.html │ ├── paper-menu-button │ ├── paper-menu-button.css │ └── paper-menu-button.html │ ├── paper-progress │ ├── paper-progress.css │ └── paper-progress.html │ ├── paper-radio-button │ ├── paper-radio-button.css │ └── paper-radio-button.html │ ├── paper-radio-group │ └── paper-radio-group.html │ ├── paper-ripple │ ├── paper-ripple.html │ └── test │ │ └── position.html │ ├── paper-shadow │ ├── paper-shadow.css │ ├── paper-shadow.html │ └── test │ │ └── basic.html │ ├── paper-slider │ ├── paper-slider.css │ └── paper-slider.html │ ├── paper-spinner │ ├── paper-spinner.css │ └── paper-spinner.html │ ├── paper-tabs │ ├── paper-tab.css │ ├── paper-tab.html │ ├── paper-tabs.css │ └── paper-tabs.html │ ├── paper-toast │ ├── paper-toast.css │ └── paper-toast.html │ ├── paper-toggle-button │ ├── paper-toggle-button.css │ └── paper-toggle-button.html │ ├── polymer │ └── polymer.html │ ├── sampler-scaffold │ ├── sampler-scaffold.css │ └── sampler-scaffold.html │ └── web-animations-next │ ├── .gitignore │ ├── .travis-setup.sh │ ├── .travis.yml │ ├── COPYING │ ├── Gruntfile.js │ ├── History.md │ ├── package.json │ ├── src │ ├── animation-constructor.js │ ├── animation-node.js │ ├── animation.js │ ├── apply-preserving-inline-style.js │ ├── apply.js │ ├── box-handler.js │ ├── color-handler.js │ ├── deprecation.js │ ├── dev.js │ ├── dimension-handler.js │ ├── effect-callback.js │ ├── effect.js │ ├── element-animatable.js │ ├── font-weight-handler.js │ ├── group-constructors.js │ ├── handler-utils.js │ ├── interpolation.js │ ├── matrix-decomposition.js │ ├── matrix-interpolation.js │ ├── maxifill-player.js │ ├── normalize-keyframes.js │ ├── number-handler.js │ ├── player.js │ ├── position-handler.js │ ├── property-interpolation.js │ ├── property-names.js │ ├── scope.js │ ├── shadow-handler.js │ ├── shape-handler.js │ ├── tick.js │ ├── timeline.js │ ├── timing-utilities.js │ ├── transform-handler.js │ └── visibility-handler.js │ ├── target-config.js │ ├── target-loader.js │ ├── templates │ ├── boilerplate │ ├── runner.html │ ├── web-animations.html │ └── web-animations.js │ ├── test │ ├── blink │ │ ├── 2-keyframes-with-offsets.html │ │ ├── 3-keyframes-with-offsets.html │ │ ├── add-keyframes.html │ │ ├── eased-keyframes.html │ │ ├── get-animation-players.html │ │ ├── get-css-players.html │ │ ├── insufficient-keyframes.html │ │ ├── interpolation │ │ │ ├── background-color-interpolation.html │ │ │ ├── background-image-interpolation.html │ │ │ ├── background-position-interpolation.html │ │ │ ├── background-position-origin-interpolation.html │ │ │ ├── background-size-interpolation.html │ │ │ ├── border-color-interpolation.html │ │ │ ├── border-image-outset-interpolation.html │ │ │ ├── border-image-slice-interpolation.html │ │ │ ├── border-image-source-interpolation.html │ │ │ ├── border-image-width-interpolation.html │ │ │ ├── border-radius-interpolation.html │ │ │ ├── border-spacing-interpolation.html │ │ │ ├── border-width-interpolation.html │ │ │ ├── bottom-interpolation.html │ │ │ ├── box-shadow-interpolation.html │ │ │ ├── calc-interpolation.html │ │ │ ├── clip-interpolation.html │ │ │ ├── color-interpolation.html │ │ │ ├── filter-interpolation.html │ │ │ ├── flex-interpolation.html │ │ │ ├── font-size-interpolation.html │ │ │ ├── font-weight-interpolation.html │ │ │ ├── height-interpolation.html │ │ │ ├── left-interpolation.html │ │ │ ├── letter-spacing-interpolation.html │ │ │ ├── line-height-interpolation.html │ │ │ ├── list-style-image-interpolation.html │ │ │ ├── margin-interpolation.html │ │ │ ├── max-height-interpolation.html │ │ │ ├── max-width-interpolation.html │ │ │ ├── min-height-interpolation.html │ │ │ ├── min-width-interpolation.html │ │ │ ├── object-position-interpolation.html │ │ │ ├── opacity-interpolation.html │ │ │ ├── orphans-interpolation.html │ │ │ ├── outline-color-interpolation.html │ │ │ ├── outline-offset-interpolation.html │ │ │ ├── outline-width-interpolation.html │ │ │ ├── padding-interpolation.html │ │ │ ├── perspective-interpolation.html │ │ │ ├── perspective-origin-interpolation.html │ │ │ ├── resources │ │ │ │ └── interpolation-test.js │ │ │ ├── right-interpolation.html │ │ │ ├── shape-image-threshold.html │ │ │ ├── shape-margin.html │ │ │ ├── shape-outside.html │ │ │ ├── text-decoration-color-interpolation.html │ │ │ ├── text-indent-interpolation.html │ │ │ ├── text-shadow-interpolation.html │ │ │ ├── top-interpolation.html │ │ │ ├── transform-matrix-interpolation.html │ │ │ ├── transform-none-interpolation.html │ │ │ ├── transform-origin-interpolation.html │ │ │ ├── transform-perspective-interpolation.html │ │ │ ├── transform-rotate-interpolation.html │ │ │ ├── transform-scale-interpolation.html │ │ │ ├── transform-skew-interpolation.html │ │ │ ├── transform-translate-interpolation.html │ │ │ ├── vertical-align-interpolation.html │ │ │ ├── viewport-unit-interpolation.html │ │ │ ├── visibility-interpolation.html │ │ │ ├── widows-interpolation.html │ │ │ ├── width-interpolation.html │ │ │ ├── word-spacing-interpolation.html │ │ │ ├── z-index-interpolation.html │ │ │ └── zoom-iterpolation.html │ │ ├── keyframe-properties.html │ │ ├── keyframes-with-null-offsets.html │ │ ├── out-of-order-keyframes.html │ │ ├── resources │ │ │ ├── blue-100.png │ │ │ ├── green-100.png │ │ │ ├── green-20.png │ │ │ ├── keyframes-test.js │ │ │ ├── stripes-100.png │ │ │ └── stripes-20.png │ │ ├── same-offset-keyframes.html │ │ ├── simple-keyframes.html │ │ └── testharness │ │ │ ├── testharness.css │ │ │ ├── testharness.js │ │ │ └── testharnessreport.js │ ├── js │ │ ├── animation-constructor.js │ │ ├── animation-node.js │ │ ├── apply-preserving-inline-style.js │ │ ├── box-handler.js │ │ ├── color-handler.js │ │ ├── dimension-handler.js │ │ ├── effect-callback.js │ │ ├── effect.js │ │ ├── group-constructors.js │ │ ├── group-player-finish-event.js │ │ ├── group-player.js │ │ ├── interpolation.js │ │ ├── matrix-interpolation.js │ │ ├── number-handler.js │ │ ├── player-finish-event.js │ │ ├── player.js │ │ ├── property-interpolation.js │ │ ├── tick.js │ │ ├── timeline.js │ │ ├── timing.js │ │ └── transform-handler.js │ ├── karma-config-ci.js │ ├── karma-config.js │ ├── resources │ │ ├── WebKitWeightWatcher100.ttf │ │ ├── WebKitWeightWatcher200.ttf │ │ ├── WebKitWeightWatcher300.ttf │ │ ├── WebKitWeightWatcher400.ttf │ │ ├── WebKitWeightWatcher500.ttf │ │ ├── WebKitWeightWatcher600.ttf │ │ ├── WebKitWeightWatcher700.ttf │ │ ├── WebKitWeightWatcher800.ttf │ │ └── WebKitWeightWatcher900.ttf │ ├── runner-web-animations-next-lite.html │ ├── runner-web-animations-next.html │ ├── runner-web-animations.html │ ├── runner.js │ ├── testharness-runner.html │ ├── testharness-runner.js │ └── testharness-tests.js │ ├── web-animations-next-lite.dev.html │ ├── web-animations-next-lite.dev.js │ ├── web-animations-next.dev.html │ ├── web-animations-next.dev.js │ ├── web-animations.dev.html │ ├── web-animations.dev.js │ └── web-animations.html ├── paper_elements_config.yaml ├── pubspec.yaml └── test ├── common.dart ├── paper_button_test.dart ├── paper_button_test.html ├── paper_dropdown_basic_test.dart ├── paper_dropdown_basic_test.html ├── paper_fab_a11y_test.dart ├── paper_fab_a11y_test.html ├── paper_fab_basic_test.dart ├── paper_fab_basic_test.html ├── paper_icon_button_a11y_test.dart ├── paper_icon_button_a11y_test.html ├── paper_icon_button_basic_test.dart ├── paper_icon_button_basic_test.html ├── paper_input_autogrow_test.dart ├── paper_input_autogrow_test.html ├── paper_input_decorator_test.dart ├── paper_input_decorator_test.html ├── paper_input_test.dart ├── paper_input_test.html ├── paper_ripple_position_test.dart ├── paper_ripple_position_test.html ├── paper_shadow_basic_test.dart └── paper_shadow_basic_test.html /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "lib/src" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Don’t commit the following directories created by pub. 2 | .pub/ 3 | build/ 4 | packages 5 | 6 | # Or the files created by dart2js. 7 | *.dart.js 8 | *.dart.precompiled.js 9 | *.js_ 10 | *.js.deps 11 | *.js.map 12 | 13 | # Bower checks this out but we don't want it in the repo or package because 14 | # packages/core_elements already has it. 15 | lib/src/web-animations-js 16 | 17 | # More things we don't need from Bower 18 | lib/src/core-*/demo.html 19 | lib/src/core-*/index.html 20 | 21 | # Include when developing application packages. 22 | pubspec.lock 23 | 24 | # Files created by editors 25 | .idea/ 26 | *.iml 27 | *.sw? 28 | -------------------------------------------------------------------------------- /.status: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 2 | # for details. All rights reserved. Use of this source code is governed by a 3 | # BSD-style license that can be found in the LICENSE file. 4 | 5 | # Don't run any test-like files that show up in packages directories. It 6 | # shouldn't be necessary to run "pub install" in these packages, but if you do 7 | # it shouldn't break the tests. 8 | */packages/*/*: Skip 9 | */*/packages/*/*: Skip 10 | */*/*/packages/*/*: Skip 11 | */*/*/*/packages/*/*: Skip 12 | */*/*/*/*/packages/*/*: Skip 13 | 14 | [ $runtime == dartium || $runtime == drt ] 15 | test/paper_dropdown_basic_test: Pass, RuntimeError # Issue 78 16 | build/test/paper_dropdown_basic_test: Pass, RuntimeError # Issue 78 17 | 18 | [ $compiler == dart2js ] 19 | test/*: Skip # raw tests only meant to be run in dartium. Other browsers run 20 | # the output of pub-build 21 | 22 | [ $runtime == vm || $runtime == jsshell || $runtime == d8 ] 23 | build/test/*: Skip # All tests are meant to run in a browser 24 | test/*: Skip # All tests are meant to run in a browser 25 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | ### Sign our Contributor License Agreement (CLA) 4 | 5 | Even for small changes, we ask that you please sign the CLA electronically 6 | [here](https://developers.google.com/open-source/cla/individual). 7 | The CLA is necessary because you own the copyright to your changes, even 8 | after your contribution becomes part of our codebase, so we need your permission 9 | to use and distribute your code. You can find more details 10 | [here](https://code.google.com/p/dart/wiki/Contributing). 11 | 12 | ### Find the right place to change the code 13 | 14 | A lot of the code in this repo is either generated automatically, or developed 15 | elsewhere. For example, all elements definitions under `lib/src/paper-*` and 16 | `lib/src/core-*` are downloaded automatically from other repositories using 17 | `bower`. 18 | 19 | If you would like to update HTML or Javascript code on a specific element, you 20 | probably need to send a pull request in a different repository. The code for a 21 | specific element lives under a repo of the same name under the [Polymer 22 | organization](https://github.com/Polymer/). For example, 23 | `lib/src/paper-input/paper-input.html` is actually developed on the [paper-input 24 | repo](https://github.com/Polymer/paper-input), if you send the fix there, we 25 | will get it automatically next time we run our update scripts. 26 | 27 | In addition, the Dart libraries for each element are generated automatically by 28 | running `tools/update.dart`. Most of the sources of this tool live in our 29 | [core-elements repo](https://github.com/dart-lang/core-elements). 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Paper elements 2 | 3 | **Note:** This package is for polymer.dart < 0.17 4 | 5 | This package wraps the Polymer project's paper elements, enabling Dart 6 | developers to easily use the Polymer implementation of Google's material 7 | design UI widgets. 8 | 9 | You can find out more about paper elements here: 10 | http://www.polymer-project.org/docs/elements/material.html 11 | 12 | The paper_elements package bundles all the paper elements into a single pub 13 | package, so that you can add `paper_elements` as a dependency in your pubspec. 14 | Installing npm and bower is not required. 15 | 16 | 17 | ## Status 18 | 19 | This is an early access version of the paper elements. The elements are still 20 | changing on both the JavaScript and Dart sides. 21 | 22 | 23 | ## Using elements 24 | 25 | All elements live at the top level of the `lib/` folder. 26 | 27 | Import into HTML: 28 | 29 | 30 | 31 | Import into Dart: 32 | 33 | import 'package:paper_elements/paper_input.dart'; 34 | 35 | 36 | ## Examples 37 | 38 | All examples are located in a separate repo, 39 | https://github.com/dart-lang/polymer-core-and-paper-examples. 40 | 41 | 42 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-elements-dart", 3 | "version": "0.0.0", 4 | "homepage": "https://github.com/dart-lang/paper-elements", 5 | "authors": [ 6 | "Justin Fagnani " 7 | ], 8 | "license": "MIT", 9 | "private": true, 10 | "ignore": [ 11 | "**/.*", 12 | "node_modules", 13 | "bower_components", 14 | "test", 15 | "tests" 16 | ], 17 | "dependencies": { 18 | "polymer": "Polymer/polymer#0.5.5", 19 | "paper-elements": "Polymer/paper-elements#0.5.5" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /codereview.settings: -------------------------------------------------------------------------------- 1 | CODE_REVIEW_SERVER: http://codereview.chromium.org/ 2 | VIEW_VC: https://github.com/dart-lang/paper-elements/commit/ 3 | CC_LIST: reviews@dartlang.org 4 | -------------------------------------------------------------------------------- /lib/paper_action_dialog.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` 2 | 3 | /// Dart API for the polymer element `paper_action_dialog`. 4 | @HtmlImport('paper_action_dialog_nodart.html') 5 | library paper_elements.paper_action_dialog; 6 | 7 | import 'dart:html'; 8 | import 'dart:js' show JsArray, JsObject; 9 | import 'package:web_components/web_components.dart'; 10 | import 'package:polymer_interop/polymer_interop.dart'; 11 | import 'paper_dialog_base.dart'; 12 | import 'paper_shadow.dart'; 13 | 14 | /// Material Design: Dialogs 15 | /// 16 | /// `paper-action-dialog` is a `paper-dialog` with a row of buttons at the bottom that 17 | /// indicate user action. The action buttons do not scroll with the dialog body. 18 | /// 19 | /// The buttons should have either the `affirmative` or `dismissive` attribute. See 20 | /// the Material Design spec for more info. 21 | /// 22 | /// Example: 23 | /// 24 | /// 25 | ///

Some content

26 | /// More Info 27 | /// Decline 28 | /// Accept 29 | ///
30 | @CustomElementProxy('paper-action-dialog') 31 | class PaperActionDialog extends PaperDialogBase { 32 | PaperActionDialog.created() : super.created(); 33 | factory PaperActionDialog() => new Element.tag('paper-action-dialog'); 34 | 35 | String get closeSelector => jsElement[r'closeSelector']; 36 | set closeSelector(String value) { jsElement[r'closeSelector'] = value; } 37 | } 38 | -------------------------------------------------------------------------------- /lib/paper_action_dialog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/paper_action_dialog_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/paper_autogrow_textarea.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/paper_autogrow_textarea_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /lib/paper_button.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/paper_button_base.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` 2 | 3 | /// Dart API for the polymer element `paper_button_base`. 4 | @HtmlImport('paper_button_base_nodart.html') 5 | library paper_elements.paper_button_base; 6 | 7 | import 'dart:html'; 8 | import 'dart:js' show JsArray, JsObject; 9 | import 'package:web_components/web_components.dart'; 10 | import 'package:polymer_interop/polymer_interop.dart'; 11 | import 'package:core_elements/core_focusable.dart'; 12 | import 'paper_ripple.dart'; 13 | 14 | /// `paper-button-base` is the base class for button-like elements with ripple and optional shadow. 15 | @CustomElementProxy('paper-button-base') 16 | class PaperButtonBase extends HtmlElement with CustomElementProxyMixin, PolymerProxyMixin, CoreFocusable { 17 | PaperButtonBase.created() : super.created(); 18 | factory PaperButtonBase() => new Element.tag('paper-button-base'); 19 | } 20 | -------------------------------------------------------------------------------- /lib/paper_button_base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/paper_button_base_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/paper_button_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/paper_char_counter.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` 2 | 3 | /// Dart API for the polymer element `paper_char_counter`. 4 | @HtmlImport('paper_char_counter_nodart.html') 5 | library paper_elements.paper_char_counter; 6 | 7 | import 'dart:html'; 8 | import 'dart:js' show JsArray, JsObject; 9 | import 'package:web_components/web_components.dart'; 10 | import 'package:polymer_interop/polymer_interop.dart'; 11 | import 'package:core_elements/core_style.dart'; 12 | 13 | /// Material Design: Character counter 14 | /// 15 | /// `paper-char-counter` adds a character counter for paper input fields with a character restriction in place. 16 | /// 17 | /// Example: 18 | /// 19 | /// 20 | /// 21 | /// 22 | /// 23 | /// 24 | /// Theming 25 | /// ------- 26 | /// 27 | /// `paper-char-counter` uses `paper-input-decorator`'s error `core-style` for global theming. 28 | @CustomElementProxy('paper-char-counter') 29 | class PaperCharCounter extends HtmlElement with CustomElementProxyMixin, PolymerProxyMixin { 30 | PaperCharCounter.created() : super.created(); 31 | factory PaperCharCounter() => new Element.tag('paper-char-counter'); 32 | 33 | /// The id of the textinput or textarea that should be monitored. 34 | String get target => jsElement[r'target']; 35 | set target(String value) { jsElement[r'target'] = value; } 36 | 37 | /// If false, don't show the character counter. Used in conjunction with 38 | /// `paper-input-decorator's` `error` field. 39 | bool get showCounter => jsElement[r'showCounter']; 40 | set showCounter(bool value) { jsElement[r'showCounter'] = value; } 41 | } 42 | -------------------------------------------------------------------------------- /lib/paper_char_counter.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/paper_char_counter_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/paper_checkbox.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` 2 | 3 | /// Dart API for the polymer element `paper_checkbox`. 4 | @HtmlImport('paper_checkbox_nodart.html') 5 | library paper_elements.paper_checkbox; 6 | 7 | import 'dart:html'; 8 | import 'dart:js' show JsArray, JsObject; 9 | import 'package:web_components/web_components.dart'; 10 | import 'package:polymer_interop/polymer_interop.dart'; 11 | import 'paper_radio_button.dart'; 12 | 13 | /// `paper-checkbox` is a button that can be either checked or unchecked. User 14 | /// can tap the checkbox to check or uncheck it. Usually you use checkboxes 15 | /// to allow user to select multiple options from a set. If you have a single 16 | /// ON/OFF option, avoid using a single checkbox and use `paper-toggle-button` 17 | /// instead. 18 | /// 19 | /// Example: 20 | /// 21 | /// 22 | /// 23 | /// 24 | /// 25 | /// Styling checkbox: 26 | /// 27 | /// To change the ink color for checked state: 28 | /// 29 | /// paper-checkbox::shadow #ink[checked] { 30 | /// color: #4285f4; 31 | /// } 32 | /// 33 | /// To change the checkbox checked color: 34 | /// 35 | /// paper-checkbox::shadow #checkbox.checked { 36 | /// background-color: #4285f4; 37 | /// border-color: #4285f4; 38 | /// } 39 | /// 40 | /// To change the ink color for unchecked state: 41 | /// 42 | /// paper-checkbox::shadow #ink { 43 | /// color: #b5b5b5; 44 | /// } 45 | /// 46 | /// To change the checkbox unchecked color: 47 | /// 48 | /// paper-checkbox::shadow #checkbox { 49 | /// border-color: #b5b5b5; 50 | /// } 51 | @CustomElementProxy('paper-checkbox') 52 | class PaperCheckbox extends PaperRadioButton { 53 | PaperCheckbox.created() : super.created(); 54 | factory PaperCheckbox() => new Element.tag('paper-checkbox'); 55 | } 56 | -------------------------------------------------------------------------------- /lib/paper_checkbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/paper_checkbox_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/paper_dialog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/paper_dialog_base.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` 2 | 3 | /// Dart API for the polymer element `paper_dialog_base`. 4 | @HtmlImport('paper_dialog_base_nodart.html') 5 | library paper_elements.paper_dialog_base; 6 | 7 | import 'dart:html'; 8 | import 'dart:js' show JsArray, JsObject; 9 | import 'package:web_components/web_components.dart'; 10 | import 'package:polymer_interop/polymer_interop.dart'; 11 | import 'package:core_elements/core_overlay.dart'; 12 | import 'package:core_elements/core_transition_css.dart'; 13 | 14 | /// Material Design: Dialogs 15 | /// 16 | /// `paper-dialog-base` is a base class used to implement Material Design styled 17 | /// dialogs. 18 | @CustomElementProxy('paper-dialog-base') 19 | class PaperDialogBase extends CoreOverlay { 20 | PaperDialogBase.created() : super.created(); 21 | factory PaperDialogBase() => new Element.tag('paper-dialog-base'); 22 | 23 | /// The title of the dialog. 24 | String get heading => jsElement[r'heading']; 25 | set heading(String value) { jsElement[r'heading'] = value; } 26 | 27 | String get transition => jsElement[r'transition']; 28 | set transition(String value) { jsElement[r'transition'] = value; } 29 | 30 | bool get layered => jsElement[r'layered']; 31 | set layered(bool value) { jsElement[r'layered'] = value; } 32 | } 33 | -------------------------------------------------------------------------------- /lib/paper_dialog_base.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/paper_dialog_base_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/paper_dialog_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/paper_dialog_transition.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` 2 | 3 | /// Dart API for the polymer element `paper_dialog_transition`. 4 | @HtmlImport('paper_dialog_transition_nodart.html') 5 | library paper_elements.paper_dialog_transition; 6 | 7 | import 'dart:html'; 8 | import 'dart:js' show JsArray, JsObject; 9 | import 'package:web_components/web_components.dart'; 10 | import 'package:polymer_interop/polymer_interop.dart'; 11 | import 'package:core_elements/core_transition_css.dart'; 12 | 13 | 14 | @CustomElementProxy('paper-dialog-transition') 15 | class PaperDialogTransition extends CoreTransitionCss { 16 | PaperDialogTransition.created() : super.created(); 17 | factory PaperDialogTransition() => new Element.tag('paper-dialog-transition'); 18 | } 19 | -------------------------------------------------------------------------------- /lib/paper_dialog_transition.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/paper_dialog_transition_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/paper_dropdown.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` 2 | 3 | /// Dart API for the polymer element `paper_dropdown`. 4 | @HtmlImport('paper_dropdown_nodart.html') 5 | library paper_elements.paper_dropdown; 6 | 7 | import 'dart:html'; 8 | import 'dart:js' show JsArray, JsObject; 9 | import 'package:web_components/web_components.dart'; 10 | import 'package:polymer_interop/polymer_interop.dart'; 11 | import 'package:core_elements/core_dropdown.dart'; 12 | import 'paper_shadow.dart'; 13 | import 'paper_dropdown_transition.dart'; 14 | 15 | /// `paper-dropdown` is a `core-dropdown` with a `paper-shadow`. By default, it 16 | /// is animated on open with `paper-dropdown-transition`. Use this element with 17 | /// `paper-dropdown-menu` or `paper-menu-button` to implement UI controls that 18 | /// open a drop-down. 19 | /// 20 | /// Example: 21 | /// 22 | /// 23 | /// Hi! 24 | /// 25 | /// 26 | /// Theming 27 | /// ------- 28 | /// 29 | /// Style the background color of the dropdown with these selectors: 30 | /// 31 | /// paper-dropdown::shadow #ripple, 32 | /// paper-dropdown::shadow #background { 33 | /// background-color: green; 34 | /// } 35 | @CustomElementProxy('paper-dropdown') 36 | class PaperDropdown extends CoreDropdown { 37 | PaperDropdown.created() : super.created(); 38 | factory PaperDropdown() => new Element.tag('paper-dropdown'); 39 | } 40 | -------------------------------------------------------------------------------- /lib/paper_dropdown.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/paper_dropdown_menu.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /lib/paper_dropdown_menu_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/paper_dropdown_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/paper_dropdown_transition.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` 2 | 3 | /// Dart API for the polymer element `paper_dropdown_transition`. 4 | @HtmlImport('paper_dropdown_transition_nodart.html') 5 | library paper_elements.paper_dropdown_transition; 6 | 7 | import 'dart:html'; 8 | import 'dart:js' show JsArray, JsObject; 9 | import 'package:web_components/web_components.dart'; 10 | import 'package:polymer_interop/polymer_interop.dart'; 11 | import 'package:core_elements/core_transition_css.dart'; 12 | import 'package:core_elements/web_animations.dart'; 13 | 14 | /// `paper-dropdown-transition` is a transition for `paper-dropdown`. 15 | /// 16 | /// Add the class `menu` to a `core-selector` child of the `paper-dropdown` to 17 | /// enable the optional list cascade transition. 18 | @CustomElementProxy('paper-dropdown-transition') 19 | class PaperDropdownTransition extends CoreTransitionCss { 20 | PaperDropdownTransition.created() : super.created(); 21 | factory PaperDropdownTransition() => new Element.tag('paper-dropdown-transition'); 22 | 23 | /// The duration of the transition in ms. You can also set the duration by 24 | /// setting a `duration` attribute on the target: 25 | /// 26 | /// 27 | num get duration => jsElement[r'duration']; 28 | set duration(num value) { jsElement[r'duration'] = value; } 29 | } 30 | -------------------------------------------------------------------------------- /lib/paper_dropdown_transition.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/paper_dropdown_transition_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/paper_fab.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/paper_fab_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/paper_icon_button.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/paper_icon_button_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/paper_input.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/paper_input_decorator.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/paper_input_decorator_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/paper_input_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/paper_item.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/paper_item_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/paper_menu_button.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` 2 | 3 | /// Dart API for the polymer element `paper_menu_button`. 4 | @HtmlImport('paper_menu_button_nodart.html') 5 | library paper_elements.paper_menu_button; 6 | 7 | import 'dart:html'; 8 | import 'dart:js' show JsArray, JsObject; 9 | import 'package:web_components/web_components.dart'; 10 | import 'package:polymer_interop/polymer_interop.dart'; 11 | import 'package:core_elements/core_dropdown_base.dart'; 12 | import 'package:core_elements/core_a11y_keys.dart'; 13 | 14 | /// `paper-menu-button` works together with a button and a `paper-dropdown` to 15 | /// implement a button that displays a drop-down when tapped on. 16 | /// 17 | /// The child element with the class `dropdown` will be used as the drop-down 18 | /// menu. It should be a `paper-dropdown` or other overlay element. 19 | /// 20 | /// Example: 21 | /// 22 | /// 23 | /// 24 | /// 25 | /// 26 | /// Share 27 | /// Settings 28 | /// Help 29 | /// 30 | /// 31 | /// 32 | @CustomElementProxy('paper-menu-button') 33 | class PaperMenuButton extends CoreDropdownBase { 34 | PaperMenuButton.created() : super.created(); 35 | factory PaperMenuButton() => new Element.tag('paper-menu-button'); 36 | } 37 | -------------------------------------------------------------------------------- /lib/paper_menu_button.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/paper_menu_button_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/paper_progress.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/paper_progress_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/paper_radio_button.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/paper_radio_button_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/paper_radio_group.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` 2 | 3 | /// Dart API for the polymer element `paper_radio_group`. 4 | @HtmlImport('paper_radio_group_nodart.html') 5 | library paper_elements.paper_radio_group; 6 | 7 | import 'dart:html'; 8 | import 'dart:js' show JsArray, JsObject; 9 | import 'package:web_components/web_components.dart'; 10 | import 'package:polymer_interop/polymer_interop.dart'; 11 | import 'package:core_elements/core_selector.dart'; 12 | import 'package:core_elements/core_a11y_keys.dart'; 13 | import 'paper_radio_button.dart'; 14 | 15 | /// `paper-radio-group` allows user to select only one radio button from a set. 16 | /// Checking one radio button that belongs to a radio group unchecks any 17 | /// previously checked radio button within the same group. Use 18 | /// `selected` to get or set the selected radio button. 19 | /// 20 | /// Example: 21 | /// 22 | /// 23 | /// 24 | /// 25 | /// 26 | /// 27 | /// 28 | /// See paper-radio-button for more 29 | /// information about `paper-radio-button`. 30 | @CustomElementProxy('paper-radio-group') 31 | class PaperRadioGroup extends CoreSelector { 32 | PaperRadioGroup.created() : super.created(); 33 | factory PaperRadioGroup() => new Element.tag('paper-radio-group'); 34 | } 35 | -------------------------------------------------------------------------------- /lib/paper_radio_group.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/paper_radio_group_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/paper_ripple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/paper_ripple_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /lib/paper_shadow.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` 2 | 3 | /// Dart API for the polymer element `paper_shadow`. 4 | @HtmlImport('paper_shadow_nodart.html') 5 | library paper_elements.paper_shadow; 6 | 7 | import 'dart:html'; 8 | import 'dart:js' show JsArray, JsObject; 9 | import 'package:web_components/web_components.dart'; 10 | import 'package:polymer_interop/polymer_interop.dart'; 11 | 12 | /// `paper-shadow` is a container that renders two shadows on top of each other to 13 | /// create the effect of a lifted piece of paper. 14 | /// 15 | /// Example: 16 | /// 17 | /// 18 | /// ... card content ... 19 | /// 20 | @CustomElementProxy('paper-shadow') 21 | class PaperShadow extends HtmlElement with CustomElementProxyMixin, PolymerProxyMixin { 22 | PaperShadow.created() : super.created(); 23 | factory PaperShadow() => new Element.tag('paper-shadow'); 24 | 25 | /// The z-depth of this shadow, from 0-5. Setting this property 26 | /// after element creation has no effect. Use `setZ()` instead. 27 | num get z => jsElement[r'z']; 28 | set z(num value) { jsElement[r'z'] = value; } 29 | 30 | /// Set this to true to animate the shadow when setting a new 31 | /// `z` value. 32 | bool get animated => jsElement[r'animated']; 33 | set animated(bool value) { jsElement[r'animated'] = value; } 34 | 35 | /// Set the z-depth of the shadow. This should be used after element 36 | /// creation instead of setting the z property directly. 37 | void setZ(num newZ) => 38 | jsElement.callMethod('setZ', [newZ]); 39 | } 40 | -------------------------------------------------------------------------------- /lib/paper_shadow.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/paper_shadow_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /lib/paper_slider.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/paper_slider_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/paper_spinner.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/paper_spinner_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /lib/paper_tab.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` 2 | 3 | /// Dart API for the polymer element `paper_tab`. 4 | @HtmlImport('paper_tab_nodart.html') 5 | library paper_elements.paper_tab; 6 | 7 | import 'dart:html'; 8 | import 'dart:js' show JsArray, JsObject; 9 | import 'package:web_components/web_components.dart'; 10 | import 'package:polymer_interop/polymer_interop.dart'; 11 | import 'paper_ripple.dart'; 12 | 13 | /// `paper-tab` is styled to look like a tab. It should be used in conjunction with 14 | /// `paper-tabs`. 15 | /// 16 | /// Example: 17 | /// 18 | /// 19 | /// TAB 1 20 | /// TAB 2 21 | /// TAB 3 22 | /// 23 | /// 24 | /// Styling tab: 25 | /// 26 | /// To change the ink color: 27 | /// 28 | /// .pink paper-tab::shadow #ink { 29 | /// color: #ff4081; 30 | /// } 31 | @CustomElementProxy('paper-tab') 32 | class PaperTab extends HtmlElement with CustomElementProxyMixin, PolymerProxyMixin { 33 | PaperTab.created() : super.created(); 34 | factory PaperTab() => new Element.tag('paper-tab'); 35 | 36 | /// If true, ink ripple effect is disabled. 37 | bool get noink => jsElement[r'noink']; 38 | set noink(bool value) { jsElement[r'noink'] = value; } 39 | } 40 | -------------------------------------------------------------------------------- /lib/paper_tab.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/paper_tab_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /lib/paper_tabs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/paper_tabs_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/paper_toast.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/paper_toast_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /lib/paper_toggle_button.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lib/paper_toggle_button_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/roboto.dart: -------------------------------------------------------------------------------- 1 | // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` 2 | 3 | /// Dart API for the polymer element `roboto`. 4 | @HtmlImport('roboto_nodart.html') 5 | library paper_elements.roboto; 6 | 7 | import 'dart:html'; 8 | import 'dart:js' show JsArray, JsObject; 9 | import 'package:web_components/web_components.dart'; 10 | import 'package:polymer_interop/polymer_interop.dart'; 11 | -------------------------------------------------------------------------------- /lib/roboto.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /lib/roboto_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /lib/sampler_scaffold.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /lib/sampler_scaffold_nodart.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /lib/src/core-a11y-keys/core-a11y-keys.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-animation/core-animation-group.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-animation/core-animation.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-animation/web-animations.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-collapse/core-collapse.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-component-page/core-component-page.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-drawer-panel/core-drawer-panel.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-dropdown/core-dropdown-base.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-dropdown/core-dropdown.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-field/core-field.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-focusable/core-focusable.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-header-panel/core-header-panel.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-icon-button/core-icon-button.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-icon/core-icon.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-icons/core-icons.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-iconset-svg/core-iconset-svg.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-iconset/core-iconset.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-input/core-input.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-item/core-item.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-media-query/core-media-query.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-menu/core-menu.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-menu/core-submenu.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-meta/core-meta.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-overlay/core-key-helper.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-overlay/core-overlay-layer.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-overlay/core-overlay.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-range/core-range.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-resizable/core-resizable.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-scroll-header-panel/core-scroll-header-panel.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-selection/core-selection.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-selector/core-selector.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-style/core-style.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-toolbar/core-toolbar.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-transition/core-transition-css.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/core-transition/core-transition.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/src/font-roboto/roboto.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | -------------------------------------------------------------------------------- /lib/src/paper-dialog/.gitignore: -------------------------------------------------------------------------------- 1 | vulcanized.html 2 | -------------------------------------------------------------------------------- /lib/src/paper-dialog/paper-dialog-transition.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /lib/src/paper-dropdown-menu/paper-dropdown-menu.css: -------------------------------------------------------------------------------- 1 | /* 2 | * @license 3 | * Copyright (c) 2014 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 | position: relative; 13 | display: inline-block; 14 | background-color: #fff; 15 | -moz-user-select: none; 16 | -ms-user-select: none; 17 | -webkit-user-select: none; 18 | user-select: none; 19 | cursor: pointer; 20 | padding: 0.75em 0; 21 | } 22 | 23 | #control { 24 | box-sizing: border-box; 25 | max-height: 2em; 26 | color: #757575; 27 | border-bottom: 1px solid #757575; 28 | } 29 | 30 | #control[selected] { 31 | color: #000; 32 | } 33 | 34 | #control > div { 35 | padding: 0.5em 0 0.25em; 36 | overflow: hidden; 37 | /* FIXME not working for some reason */ 38 | white-space: nowrap; 39 | text-overflow: ellipsis; 40 | } 41 | 42 | core-icon { 43 | margin: 0.3em 0 0.2em 0.25em; 44 | } -------------------------------------------------------------------------------- /lib/src/paper-dropdown/paper-dropdown-transition.css: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 2 | This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 3 | The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 4 | The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 5 | Code distributed by Google as part of the polymer project is also 6 | subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ 7 | 8 | :host(.core-transition) #ripple, 9 | :host(.core-transition) #background { 10 | opacity: 0; 11 | } 12 | 13 | :host(.core-transition) #scroller { 14 | opacity: 0; 15 | } -------------------------------------------------------------------------------- /lib/src/paper-fab/test/basic.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | paper-fab basic tests 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 |
28 | 29 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /lib/src/paper-icon-button/test/basic.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | paper-icon-button basic tests 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | Toolbar 27 | 28 |
29 | 30 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /lib/src/paper-input/.gitignore: -------------------------------------------------------------------------------- 1 | vulcanized.html 2 | -------------------------------------------------------------------------------- /lib/src/paper-input/test/util.js: -------------------------------------------------------------------------------- 1 | function activeElement() { 2 | return window.ShadowDOMPolyfill ? wrap(document.activeElement) : document.activeElement; 3 | } 4 | 5 | function assertNodeHasFocus(node) { 6 | assert.strictEqual(activeElement(), node); 7 | } 8 | 9 | function ensureFocus(node, callback) { 10 | fake.downOnNode(node); 11 | fake.upOnNode(node); 12 | waitFor(function() { 13 | assertNodeHasFocus(node); 14 | }, callback); 15 | } -------------------------------------------------------------------------------- /lib/src/paper-progress/paper-progress.css: -------------------------------------------------------------------------------- 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 | :host { 11 | display: inline-block; 12 | width: 200px; 13 | height: 4px; 14 | } 15 | 16 | #progressContainer { 17 | position: relative; 18 | height: 100%; 19 | background-color: #c8c8c8; 20 | overflow: hidden; 21 | } 22 | 23 | #activeProgress, 24 | #secondaryProgress { 25 | -webkit-transform-origin: left center; 26 | transform-origin: left center; 27 | -webkit-transform: scaleX(0); 28 | transform: scaleX(0); 29 | } 30 | 31 | #activeProgress { 32 | background-color: #0f9d58; 33 | } 34 | 35 | #secondaryProgress { 36 | background-color: #87ceac; 37 | } 38 | 39 | #activeProgress.indeterminate { 40 | -webkit-transform-origin: center center; 41 | transform-origin: center center; 42 | -webkit-animation: indeterminate-bar 1s linear infinite; 43 | animation: indeterminate-bar 1s linear infinite; 44 | } 45 | 46 | @-webkit-keyframes indeterminate-bar { 47 | 0% { 48 | -webkit-transform: translate(-50%) scaleX(0); 49 | } 50 | 50% { 51 | -webkit-transform: translate(0%) scaleX(0.3); 52 | } 53 | 100% { 54 | -webkit-transform: translate(50%) scaleX(0); 55 | } 56 | } 57 | 58 | @keyframes indeterminate-bar { 59 | 0% { 60 | transform: translate(-50%) scaleX(0); 61 | } 62 | 50% { 63 | transform: translate(0%) scaleX(0.3); 64 | } 65 | 100% { 66 | transform: translate(50%) scaleX(0); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/src/paper-shadow/test/basic.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | paper-shadow basic tests 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
hi!
36 |
37 | 38 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /lib/src/paper-tabs/paper-tab.css: -------------------------------------------------------------------------------- 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 | :host { 11 | position: relative; 12 | overflow: hidden; 13 | cursor: default; 14 | } 15 | 16 | .tab-content { 17 | transition: opacity .1s cubic-bezier(0.4, 0.0, 1, 1), color .1s cubic-bezier(0.4, 0.0, 1, 1); 18 | height: 100%; 19 | margin: 0 12px; 20 | } 21 | 22 | :host-context(#tabsContainer.scrollable) .tab-content { 23 | margin: 0 24px; 24 | } 25 | 26 | :host-context(paper-tabs[link]) .tab-content { 27 | margin: 0 !important; 28 | } 29 | 30 | polyfill-next-selector { content: '.core-narrow #tabsContainer.scrollable :host .tab-content'; } 31 | :host-context(.core-narrow):host-context(#tabsContainer.scrollable) .tab-content { 32 | margin: 0 12px; 33 | } 34 | 35 | :host(:not(.core-selected)) .tab-content { 36 | opacity: 0.6; 37 | } 38 | 39 | #ink { 40 | position: absolute; 41 | top: 0; 42 | right: 0; 43 | bottom: 0; 44 | left: 0; 45 | color: #ffff8d; 46 | pointer-events: none; 47 | } 48 | 49 | polyfill-next-selector { content: '.tab-content > a'; } 50 | ::content > a { 51 | height: 100%; 52 | padding: 0 12px; 53 | /* flex */ 54 | -ms-flex: 1 1 0.000000001px; 55 | -webkit-flex: 1; 56 | flex: 1; 57 | -webkit-flex-basis: 0.000000001px; 58 | flex-basis: 0.000000001px; 59 | } 60 | -------------------------------------------------------------------------------- /lib/src/paper-tabs/paper-tabs.css: -------------------------------------------------------------------------------- 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 | :host { 11 | display: block; 12 | font-size: 14px; 13 | font-weight: 500; 14 | height: 48px; 15 | overflow: hidden; 16 | -webkit-user-select: none; 17 | -moz-user-select: none; 18 | -ms-user-select: none; 19 | user-select: none; 20 | -webkit-tap-highlight-color: rgba(0,0,0,0); 21 | } 22 | 23 | #tabsContainer { 24 | position: relative; 25 | height: 100%; 26 | white-space: nowrap; 27 | overflow: hidden; 28 | } 29 | 30 | #tabsContent { 31 | height: 100%; 32 | } 33 | 34 | #tabsContainer.scrollable > #tabsContent { 35 | position: absolute; 36 | white-space: nowrap; 37 | } 38 | 39 | .scroll-button { 40 | width: 40px; 41 | padding: 0 12px; 42 | } 43 | 44 | .scroll-button > paper-icon-button { 45 | transition: opacity 0.18s; 46 | } 47 | 48 | .scroll-button > .hidden { 49 | opacity: 0; 50 | } 51 | 52 | #selectionBar { 53 | position: absolute; 54 | height: 2px; 55 | bottom: 0; 56 | left: 0; 57 | width: 0; 58 | background-color: #ffff8d; 59 | transition: width, left; 60 | } 61 | 62 | #selectionBar.alignBottom { 63 | top: 0; 64 | bottom: auto; 65 | } 66 | 67 | #selectionBar.expand { 68 | transition-duration: 0.15s; 69 | transition-timing-function: cubic-bezier(0.4, 0.0, 1, 1); 70 | } 71 | 72 | #selectionBar.contract { 73 | transition-duration: 0.18s; 74 | transition-timing-function: cubic-bezier(0.0, 0.0, 0.2, 1); 75 | } 76 | 77 | polyfill-next-selector { content: '#tabsContent > *:not(#selectionBar)'; } 78 | ::content > * { 79 | height: 100%; 80 | } 81 | -------------------------------------------------------------------------------- /lib/src/polymer/polymer.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 17 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | !node_modules/mocha/mocha.css 3 | !node_modules/mocha/mocha.js 4 | !node_modules/mocha/LICENCE 5 | !node_modules/chai/chai.js 6 | !node_modules/chai-LICENCE 7 | web-animations-*.min.js 8 | web-animations-*.min.js.map 9 | web-animations.min.js 10 | web-animations.min.js.map 11 | inter-* 12 | *~ 13 | sauce_connect.log 14 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - "0.10" 5 | 6 | install: 7 | - BROWSER="Firefox-aurora" ./.travis-setup.sh 8 | 9 | before_script: 10 | - export DISPLAY=:99.0 11 | - sh -e /etc/init.d/xvfb start 12 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-animations-js", 3 | "private": true, 4 | "repository": { 5 | "type": "git", 6 | "url": "https://github.com/web-animations/web-animations-js.git" 7 | }, 8 | "devDependencies": { 9 | "mocha": "1.21.4", 10 | "chai": "^1.9.1", 11 | "grunt": "~0.4.5", 12 | "grunt-contrib-uglify": "^0.4.0", 13 | "grunt-gjslint": "^0.1.4", 14 | "grunt-karma": "^0.8.2", 15 | "karma": "^0.12.14", 16 | "karma-mocha": "^0.1.3", 17 | "karma-chai": "^0.1.0", 18 | "karma-chrome-launcher": "~0.1.4", 19 | "karma-firefox-launcher": "~0.1.3", 20 | "karma-ie-launcher": "~0.1.5", 21 | "karma-safari-launcher": "~0.1.1", 22 | "karma-sauce-launcher": "~0.2.3", 23 | "grunt-checkrepo": "~0.1.0", 24 | "grunt-saucelabs": "~4.0.2", 25 | "grunt-checkrepo": "~0.1.0", 26 | "grunt-git-status": "~1.0.0", 27 | "grunt-template": "~0.2.3", 28 | "source-map": "~0.1.40" 29 | }, 30 | "scripts": { 31 | "test": "grunt test gjslint git-status checkrepo" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/src/animation-node.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | (function(shared, scope) { 16 | 17 | scope.AnimationNode = function(timing) { 18 | var timeFraction = 0; 19 | var activeDuration = shared.calculateActiveDuration(timing); 20 | var animationNode = function(localTime) { 21 | return shared.calculateTimeFraction(activeDuration, localTime, timing); 22 | }; 23 | animationNode._totalDuration = timing.delay + activeDuration + timing.endDelay; 24 | animationNode._isCurrent = function(localTime) { 25 | var phase = shared.calculatePhase(activeDuration, localTime, timing); 26 | return phase === PhaseActive || phase === PhaseBefore; 27 | }; 28 | return animationNode; 29 | }; 30 | 31 | })(webAnimationsShared, webAnimationsMinifill); 32 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/src/apply.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | (function(scope, testing) { 16 | 17 | scope.apply = function(element, property, value) { 18 | element.style[scope.propertyName(property)] = value; 19 | }; 20 | 21 | scope.clear = function(element, property) { 22 | element.style[scope.propertyName(property)] = ''; 23 | }; 24 | 25 | })(webAnimationsMinifill, webAnimationsTesting); 26 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/src/deprecation.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | (function(shared) { 16 | 17 | var silenced = {}; 18 | 19 | shared.deprecated = function(feature, date, advice, plural) { 20 | if (feature in silenced) { 21 | return; 22 | } 23 | var auxVerb = plural ? 'are' : 'is'; 24 | var today = new Date(); 25 | var expiry = new Date(date); 26 | expiry.setMonth(expiry.getMonth() + 3); // 3 months grace period 27 | 28 | if (today < expiry) { 29 | console.warn('Web Animations: ' + feature + ' ' + auxVerb + ' deprecated and will stop working on ' + expiry.toDateString() + '. ' + advice); 30 | silenced[feature] = true; 31 | } else { 32 | throw new Error(feature + ' ' + auxVerb + ' no longer supported. ' + advice); 33 | } 34 | }; 35 | 36 | })(webAnimationsShared); 37 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/src/dev.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | var WEB_ANIMATIONS_TESTING = false; 16 | var webAnimationsTesting = null; 17 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/src/element-animatable.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | (function(scope) { 16 | window.Element.prototype.animate = function(effectInput, timingInput) { 17 | return scope.timeline._play(scope.Animation(this, effectInput, timingInput)); 18 | }; 19 | })(webAnimationsMinifill); 20 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/src/font-weight-handler.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | (function(scope) { 16 | function parse(string) { 17 | var out = Number(string); 18 | if (isNaN(out) || out < 100 || out > 900 || out % 100 !== 0) { 19 | return; 20 | } 21 | return out; 22 | } 23 | 24 | function toCss(value) { 25 | value = Math.round(value / 100) * 100; 26 | value = scope.clamp(100, 900, value); 27 | if (value === 400) { 28 | return 'normal'; 29 | } 30 | if (value === 700) { 31 | return 'bold'; 32 | } 33 | return String(value); 34 | } 35 | 36 | function merge(left, right) { 37 | return [left, right, toCss]; 38 | } 39 | 40 | scope.addPropertiesHandler(parse, merge, ['font-weight']); 41 | 42 | })(webAnimationsMinifill); 43 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/src/interpolation.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | (function(scope, testing) { 16 | 17 | function interpolate(from, to, f) { 18 | if ((typeof from == 'number') && (typeof to == 'number')) { 19 | return from * (1 - f) + to * f; 20 | } 21 | if ((typeof from == 'boolean') && (typeof to == 'boolean')) { 22 | return f < 0.5 ? from : to; 23 | } 24 | 25 | WEB_ANIMATIONS_TESTING && console.assert( 26 | Array.isArray(from) && Array.isArray(to), 27 | 'If interpolation arguments are not numbers or bools they must be arrays'); 28 | 29 | if (from.length == to.length) { 30 | var r = []; 31 | for (var i = 0; i < from.length; i++) { 32 | r.push(interpolate(from[i], to[i], f)); 33 | } 34 | return r; 35 | } 36 | throw 'Mismatched interpolation arguments ' + from + ':' + to; 37 | } 38 | 39 | scope.Interpolation = function(from, to, convertToString) { 40 | return function(f) { 41 | return convertToString(interpolate(from, to, f)); 42 | } 43 | }; 44 | 45 | if (WEB_ANIMATIONS_TESTING) { 46 | testing.interpolate = interpolate; 47 | } 48 | 49 | })(webAnimationsMinifill, webAnimationsTesting); 50 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/src/property-names.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | (function(scope, testing) { 16 | 17 | var aliased = {}; 18 | 19 | function alias(name, aliases) { 20 | aliases.concat([name]).forEach(function(candidate) { 21 | if (candidate in document.documentElement.style) { 22 | aliased[name] = candidate; 23 | } 24 | }); 25 | } 26 | alias('transform', ['webkitTransform', 'msTransform']); 27 | alias('transformOrigin', ['webkitTransformOrigin']); 28 | alias('perspective', ['webkitPerspective']); 29 | alias('perspectiveOrigin', ['webkitPerspectiveOrigin']); 30 | 31 | scope.propertyName = function(property) { 32 | return aliased[property] || property; 33 | }; 34 | 35 | })(webAnimationsMinifill, webAnimationsTesting); 36 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/src/scope.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | var webAnimationsShared = {}; 16 | var webAnimationsMinifill = {}; 17 | var webAnimationsMaxifill = {}; 18 | 19 | if (!WEB_ANIMATIONS_TESTING) 20 | var webAnimationsTesting = null; 21 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/src/visibility-handler.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | (function(scope, testing) { 16 | 17 | function merge(left, right) { 18 | if (left != 'visible' && right != 'visible') return; 19 | return [0, 1, function(x) { 20 | if (x <= 0) return left; 21 | if (x >= 1) return right; 22 | return 'visible'; 23 | }]; 24 | } 25 | 26 | scope.addPropertiesHandler(String, merge, ['visibility']); 27 | 28 | })(webAnimationsMinifill); 29 | 30 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/target-loader.js: -------------------------------------------------------------------------------- 1 | (function() { 2 | var target = webAnimationsTargetConfig.defaultTarget; 3 | if (typeof webAnimationsSourceTarget != 'undefined') 4 | target = webAnimationsSourceTarget; 5 | 6 | // Native implementation detection. 7 | 8 | var scripts = document.getElementsByTagName('script'); 9 | var location = scripts[scripts.length - 1].src.replace(/[^\/]+$/, ''); 10 | webAnimationsTargetConfig[target].src.forEach(function(sourceFile) { 11 | document.write(''); 12 | }); 13 | })(); 14 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/templates/boilerplate: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/templates/runner.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 |
27 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/templates/web-animations.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | <% _.forEach(src, function(src) { %> 18 | <% }); %> 19 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/templates/web-animations.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | var webAnimationsSourceTarget = '<%= target %>'; 15 | var WEB_ANIMATIONS_TESTING = false; 16 | (function() { 17 | var scripts = document.getElementsByTagName('script'); 18 | var location = scripts[scripts.length - 1].src.replace(/[^\/]+$/, ''); 19 | document.write(''); 20 | document.write(''); 21 | })(); 22 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/2-keyframes-with-offsets.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 57 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/add-keyframes.html: -------------------------------------------------------------------------------- 1 | 2 | Web Animations API: Add Keyframe tests 3 | 4 | 5 |
6 |
7 | 34 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/get-css-players.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 |
14 |
15 |
16 | 17 | 41 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/insufficient-keyframes.html: -------------------------------------------------------------------------------- 1 | 2 | Web Animations API: Insufficient Keyframe tests 3 | 4 | 5 |
6 |
7 | 40 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/background-color-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 20 | 46 | 47 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/border-color-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 20 | 34 | 35 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/border-image-outset-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 21 | 22 | 23 | 65 | 66 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/border-image-slice-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 19 | 20 | 21 | 43 | 44 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/border-radius-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 20 | 48 | 49 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/border-spacing-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 22 | 23 | 33 | 34 | 35 | 36 | 74 | 75 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/border-width-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 20 | 34 | 35 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/bottom-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 20 | 33 | 34 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/color-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | 15 | 16 | 17 | 31 | 32 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/flex-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 26 | 27 | 28 | 29 | 56 | 57 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/font-size-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 22 | 23 | 24 | 25 | 55 | 56 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/height-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 | 17 | 18 | 19 | 33 | 34 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/left-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 19 | 20 | 21 | 34 | 35 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/letter-spacing-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 15 | 16 | 17 | 18 | 32 | 33 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/margin-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | 32 | 33 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/max-height-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | 32 | 33 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/max-width-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | 32 | 33 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/min-height-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | 32 | 33 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/min-width-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | 32 | 33 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/opacity-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | 32 | 33 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/orphans-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | 29 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/outline-color-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 20 | 34 | 35 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/outline-offset-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 19 | 20 | 21 | 35 | 36 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/outline-width-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 20 | 47 | 48 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/padding-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/perspective-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 25 | 28 | 29 | 30 | 31 | 48 | 49 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/perspective-origin-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 26 | 27 | 30 | 31 | 32 | 33 | 48 | 49 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/right-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 17 | 18 | 19 | 20 | 21 | 34 | 35 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/shape-image-threshold.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 21 | 22 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/shape-margin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 21 | 22 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/text-decoration-color-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 16 | 17 | 18 | 19 | 34 | 35 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/text-indent-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | 15 | 16 | 30 | 31 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/text-shadow-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | 19 | 33 | 34 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/top-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | 19 | 20 | 33 | 34 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/transform-origin-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 21 | 22 | 23 | 38 | 39 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/transform-skew-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 26 | 27 | 30 | 31 | 32 | 33 | 62 | 63 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/vertical-align-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 | 17 | 18 | 19 | 56 | 57 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/viewport-unit-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 45 | 46 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/visibility-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 58 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/widows-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | 30 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/width-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 27 | 28 | 29 | 30 | 56 | 57 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/word-spacing-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | 15 | 16 | 30 | 31 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/z-index-interpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 29 | 30 | 31 |
32 | 33 | 34 | 35 | 36 | 68 | 69 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/interpolation/zoom-iterpolation.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 14 | 15 | 16 | 17 | 18 | 35 | 36 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/keyframes-with-null-offsets.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 42 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/out-of-order-keyframes.html: -------------------------------------------------------------------------------- 1 | 2 | Web Animations API: Out of order Keyframe tests 3 | 4 | 5 |
6 |
7 | 27 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/resources/blue-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dart-archive/paper-elements/331bb789eb5799955e982a76046b0b4a77d2f785/lib/src/web-animations-next/test/blink/resources/blue-100.png -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/resources/green-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dart-archive/paper-elements/331bb789eb5799955e982a76046b0b4a77d2f785/lib/src/web-animations-next/test/blink/resources/green-100.png -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/resources/green-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dart-archive/paper-elements/331bb789eb5799955e982a76046b0b4a77d2f785/lib/src/web-animations-next/test/blink/resources/green-20.png -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/resources/keyframes-test.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | 'use strict' 3 | 4 | function createElement() { 5 | var element = document.createElement('div'); 6 | element.style.position = 'absolute'; 7 | document.documentElement.appendChild(element); 8 | return element; 9 | } 10 | 11 | function heldTiming(progress) { 12 | return { 13 | duration: 1000, 14 | fill: 'forwards', 15 | delay: -progress * 1000, 16 | }; 17 | } 18 | 19 | function assertAnimationStyles(keyframes, expectations, description) { 20 | for (var progress in expectations) { 21 | var element = createElement(); 22 | element.animate(keyframes, heldTiming(progress)); 23 | 24 | var computedStyle = getComputedStyle(element); 25 | for (var property in expectations[progress]) { 26 | assert_equals(computedStyle[property], expectations[progress][property], 27 | property + ' at ' + (progress * 100) + '%' + (description ? ' ' + description : '')); 28 | } 29 | } 30 | } 31 | 32 | window.assertAnimationStyles = assertAnimationStyles; 33 | })(); 34 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/resources/stripes-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dart-archive/paper-elements/331bb789eb5799955e982a76046b0b4a77d2f785/lib/src/web-animations-next/test/blink/resources/stripes-100.png -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/resources/stripes-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dart-archive/paper-elements/331bb789eb5799955e982a76046b0b4a77d2f785/lib/src/web-animations-next/test/blink/resources/stripes-20.png -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/blink/simple-keyframes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 46 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/js/color-handler.js: -------------------------------------------------------------------------------- 1 | suite('color-handler', function() { 2 | test('parse colors', function() { 3 | assert.deepEqual(parseColor(' ReD '), [255, 0, 0, 1]); 4 | assert.deepEqual(parseColor(' magenta'), [255, 0, 255, 1]); 5 | assert.deepEqual(parseColor('transparent'), [0, 0, 0, 0]); 6 | assert.deepEqual(parseColor('#0f0'), [0, 255, 0, 1]); 7 | assert.deepEqual(parseColor('rgb(0,10,20)'), [0, 10, 20, 1]); 8 | assert.deepEqual(parseColor('rgba(65,40,20,0.2)'), [13, 8, 4, 0.2]); 9 | assert.deepEqual(parseColor('hsl(120, 100%, 50%)'), [0, 255, 0, 1]); 10 | }); 11 | test('invalid colors fail to parse', function() { 12 | assert.isUndefined(parseColor('')); 13 | assert.isUndefined(parseColor('bananayellow')); 14 | assert.isUndefined(parseColor('rgb(10, 20, 30, 40)')); 15 | }); 16 | test('color interpolation', function() { 17 | assert.equal(webAnimationsMinifill.propertyInterpolation('color', '#00aa11', '#aa00bb')(0.2), 'rgba(34,136,51,1)'); 18 | assert.equal(webAnimationsMinifill.propertyInterpolation('color', 'transparent', '#004488')(0), 'transparent'); 19 | assert.equal(webAnimationsMinifill.propertyInterpolation('color', 'transparent', '#004488')(0.5), 'rgba(0,68,136,0.500)'); 20 | assert.equal(webAnimationsMinifill.propertyInterpolation('color', 'red', 'green')(2), 'rgba(0,255,0,1)'); 21 | assert.equal(webAnimationsMinifill.propertyInterpolation('color', 'red', 'green')(-1), 'rgba(255,0,0,1)'); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/js/group-constructors.js: -------------------------------------------------------------------------------- 1 | suite('group-constructors', function() { 2 | setup(function() { 3 | document.timeline._players = []; 4 | }); 5 | 6 | function simpleAnimationGroup() { 7 | return new AnimationSequence([ 8 | new Animation(document.body, [], 2000), 9 | new AnimationGroup([ 10 | new Animation(document.body, [], 2000), 11 | new Animation(document.body, [], 1000) 12 | ]) 13 | ]); 14 | } 15 | 16 | test('player getter for children in groups, and __internalPlayer, work as expected', function() { 17 | var p = document.timeline.play(simpleAnimationGroup()); 18 | tick(0); 19 | assert.equal(p.source.player, p); 20 | assert.equal(p._childPlayers[0].source.player, p); 21 | assert.equal(p._childPlayers[1].source.player, p); 22 | tick(2100); 23 | assert.equal(p._childPlayers[1]._childPlayers[0].source.player, p); 24 | assert.equal(p._childPlayers[1]._childPlayers[1].source.player, p); 25 | }); 26 | }); 27 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/js/interpolation.js: -------------------------------------------------------------------------------- 1 | suite('interpolation', function() { 2 | test('interpolate numbers', function() { 3 | assert.equal(interpolate(4, 2, 0.2), 3.6); 4 | }); 5 | test('interpolate bools', function() { 6 | assert.equal(interpolate(false, true, 0.4), false); 7 | assert.equal(interpolate(false, true, 0.5), true); 8 | assert.equal(interpolate(false, true, 0.5), true); 9 | }); 10 | test('interpolate lists', function() { 11 | assert.deepEqual(interpolate([1, 2, 3], [4, 5, 6], 0.5), [2.5, 3.5, 4.5]); 12 | assert.deepEqual(interpolate([1], [4], 0.6), [2.8]); 13 | assert.deepEqual(interpolate([false], [true], 0.6), [true]); 14 | assert.deepEqual(interpolate([1, false, [3, 6]], [4, true, [6, 8]], 0.6), [2.8, true, [4.8, 7.2]]); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/js/number-handler.js: -------------------------------------------------------------------------------- 1 | suite('number-handler', function() { 2 | test('parse numbers', function() { 3 | var tests = { 4 | '0': 0, 5 | '1234': 1234, 6 | '-40': -40, 7 | '+40': 40, 8 | ' -40 ': -40, 9 | '4.0': 4, 10 | '0.4': 0.4, 11 | '.1234': 0.1234, 12 | '12.34': 12.34, 13 | '+.1234': 0.1234, 14 | '+12.34': 12.34, 15 | '-.1234': -0.1234, 16 | '-12.34': -12.34, 17 | }; 18 | for (var string in tests) { 19 | assert.equal(webAnimationsMinifill.parseNumber(string), tests[string], 'Parsing "' + string + '"'); 20 | } 21 | }); 22 | test('invalid numbers fail to parse', function() { 23 | assert.isUndefined(webAnimationsMinifill.parseNumber('')); 24 | assert.isUndefined(webAnimationsMinifill.parseNumber('nine')); 25 | assert.isUndefined(webAnimationsMinifill.parseNumber('1 2')); 26 | assert.isUndefined(webAnimationsMinifill.parseNumber('+-0')); 27 | assert.isUndefined(webAnimationsMinifill.parseNumber('50px')); 28 | assert.isUndefined(webAnimationsMinifill.parseNumber('1.2.3')); 29 | }); 30 | test('opacity clamping', function() { 31 | var interpolation = webAnimationsMinifill.propertyInterpolation('opacity', '0', '1'); 32 | assert.equal(interpolation(-1), '0'); 33 | assert.equal(interpolation(2), '1'); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/js/property-interpolation.js: -------------------------------------------------------------------------------- 1 | suite('property-interpolation', function() { 2 | test('unmatched inputs return step interpolation', function() { 3 | tests = [['unknown', 'input', 'tuple'], 4 | ['unknown', '10px', '50px'], 5 | ['width', '100px', 'auto'], 6 | ['width', 'auto', '100px']]; 7 | for (var i = 0; i < tests.length; i++) { 8 | var property = tests[i][0]; 9 | var left = tests[i][1]; 10 | var right = tests[i][2]; 11 | interpolation = webAnimationsMinifill.propertyInterpolation(property, left, right); 12 | assert.equal(interpolation(-1), left); 13 | assert.equal(interpolation(0), left); 14 | assert.equal(interpolation(0.45), left); 15 | assert.equal(interpolation(0.5), right); 16 | assert.equal(interpolation(0.55), right); 17 | assert.equal(interpolation(1), right); 18 | assert.equal(interpolation(2), right); 19 | } 20 | }); 21 | 22 | test('registers camel cased property names', function() { 23 | function merge(a, b) { 24 | return [a, b, function(x) { return a + b; }]; 25 | }; 26 | webAnimationsMinifill.addPropertiesHandler(Number, merge, ['dummy-property']); 27 | assert.equal(webAnimationsMinifill.propertyInterpolation('dummy-property', 1, 2)(0.5), 3); 28 | assert.equal(webAnimationsMinifill.propertyInterpolation('dummyProperty', 5, 3)(0.5), 8); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/js/tick.js: -------------------------------------------------------------------------------- 1 | suite('tick-tests', function() { 2 | setup(function() { webAnimationsMinifill.timeline._players = []; }); 3 | 4 | test('players are in effect but ticking stops once forward fill is reached', function() { 5 | tick(90); 6 | var player = document.body.animate([], {duration: 1000, fill: 'forwards'}); 7 | tick(100); 8 | tick(600); 9 | assert.equal(webAnimationsMinifill.timeline._players.length, 1); 10 | assert.equal(isTicking(), true); 11 | tick(1100); 12 | assert.equal(player.finished, true); 13 | assert.equal(webAnimationsMinifill.timeline._players.length, 1); 14 | assert.equal(isTicking(), false); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/js/timeline.js: -------------------------------------------------------------------------------- 1 | suite('timeline-tests', function() { 2 | setup(function() { 3 | document.timeline._players = []; 4 | webAnimationsMinifill.timeline._players = []; 5 | }); 6 | 7 | test('no current players', function() { 8 | assert.equal(document.timeline.getAnimationPlayers().length, 0); 9 | }); 10 | 11 | test('getAnimationPlayers', function() { 12 | tick(90); 13 | assert.equal(document.timeline.getAnimationPlayers().length, 0); 14 | var player = document.body.animate([], {duration: 500, iterations: 1}); 15 | tick(300); 16 | assert.equal(document.timeline.getAnimationPlayers().length, 1); 17 | 18 | var player2 = document.body.animate([], {duration: 1000}); 19 | assert.equal(document.timeline.getAnimationPlayers().length, 2); 20 | tick(800); 21 | assert.equal(player.finished, true); 22 | assert.equal(document.timeline.getAnimationPlayers().length, 1); 23 | tick(2000); 24 | assert.equal(document.timeline.getAnimationPlayers().length, 0); 25 | }); 26 | 27 | test('getAnimationPlayers checks cancelled animation', function() { 28 | tick(90); 29 | assert.equal(document.timeline.getAnimationPlayers().length, 0); 30 | var player = document.body.animate([], {duration: 500, iterations: 1}); 31 | tick(300); 32 | assert.equal(document.timeline.getAnimationPlayers().length, 1); 33 | player.cancel(); 34 | assert.equal(document.timeline.getAnimationPlayers().length, 0); 35 | }); 36 | }); 37 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/js/timing.js: -------------------------------------------------------------------------------- 1 | suite('timing', function() { 2 | setup(function() { 3 | webAnimationsMinifill.timeline._players = []; 4 | }); 5 | 6 | test('pause and scrub', function() { 7 | var player = document.body.animate([], { duration: 1000 }); 8 | player.pause(); 9 | 10 | player.currentTime = 500; 11 | assert.equal(player.currentTime, 500); 12 | }); 13 | 14 | test('pause, scrub and play', function() { 15 | var target = document.createElement('div'); 16 | document.body.appendChild(target); 17 | 18 | var player = target.animate([ 19 | { background: 'blue' }, 20 | { background: 'red' } 21 | ], { duration: 1000 }); 22 | tick(100); 23 | player.pause(); 24 | 25 | player.currentTime = 200; 26 | // http://www.w3.org/TR/web-animations/#the-current-time-of-a-player 27 | // currentTime should now mean 'hold time' - this allows scrubbing. 28 | assert.equal(player.currentTime, 200); 29 | player.play(); 30 | 31 | tick(200); 32 | tick(300); 33 | assert.equal(player.currentTime, 300); 34 | assert.equal(player.startTime, 0); 35 | }); 36 | 37 | test('sanity-check NaN timing', function() { 38 | // This has no actual tests, but will infinite loop without fix. 39 | 40 | var player = document.body.animate([], { 41 | duration: 2000, 42 | easing: 'ease-in' // fails only with cubic easing, not linear 43 | }); 44 | tick(100); 45 | player.currentTime = NaN; 46 | tick(200); 47 | 48 | player = document.body.animate([], { duration: NaN, easing: 'ease-out' }); 49 | tick(300); 50 | }); 51 | }); 52 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/karma-config-ci.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | var customLaunchers = { 3 | sl_chrome: { 4 | base: 'SauceLabs', 5 | browserName: 'chrome', 6 | platform: 'Windows 7' 7 | }, 8 | sl_firefox: { 9 | base: 'SauceLabs', 10 | browserName: 'firefox', 11 | version: '27' 12 | }, 13 | sl_ios_safari: { 14 | base: 'SauceLabs', 15 | browserName: 'iphone', 16 | platform: 'OS X 10.9', 17 | version: '7.1' 18 | }, 19 | sl_ie_11: { 20 | base: 'SauceLabs', 21 | browserName: 'internet explorer', 22 | platform: 'Windows 8.1', 23 | version: '11' 24 | } 25 | }; 26 | 27 | config.set({ 28 | frameworks: ['mocha', 'chai'], 29 | plugins: [ 30 | 'karma-mocha', 31 | 'karma-chai', 32 | 'karma-sauce-launcher', 33 | ], 34 | sauceLabs: { 35 | testName: 'Web App Unit Tests' 36 | }, 37 | customLaunchers: customLaunchers, 38 | browsers: Object.keys(customLaunchers), 39 | basePath: '..', 40 | files: [ 41 | // Populated in `grunt test` task. 42 | ], 43 | singleRun: true, 44 | port: 9876, 45 | reporters: ['dots', 'saucelabs'], 46 | colors: true, 47 | autoWatch: false, 48 | captureTimeout: 300000, 49 | }); 50 | }; 51 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/karma-config.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | config.set({ 3 | frameworks: ['mocha', 'chai'], 4 | plugins: [ 5 | 'karma-mocha', 6 | 'karma-chai', 7 | 'karma-chrome-launcher', 8 | 'karma-firefox-launcher' 9 | ], 10 | browsers: ['Firefox'], 11 | // browsers: ['Safari', 'Chrome', 'ChromeCanary', 'Firefox', 'IE'], 12 | basePath: '..', 13 | files: [ 14 | // Populated in `grunt test` task. 15 | ], 16 | singleRun: true, 17 | port: 9876, 18 | reporters: ['dots'], 19 | colors: true, 20 | autoWatch: false, 21 | }); 22 | }; 23 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/resources/WebKitWeightWatcher100.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dart-archive/paper-elements/331bb789eb5799955e982a76046b0b4a77d2f785/lib/src/web-animations-next/test/resources/WebKitWeightWatcher100.ttf -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/resources/WebKitWeightWatcher200.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dart-archive/paper-elements/331bb789eb5799955e982a76046b0b4a77d2f785/lib/src/web-animations-next/test/resources/WebKitWeightWatcher200.ttf -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/resources/WebKitWeightWatcher300.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dart-archive/paper-elements/331bb789eb5799955e982a76046b0b4a77d2f785/lib/src/web-animations-next/test/resources/WebKitWeightWatcher300.ttf -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/resources/WebKitWeightWatcher400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dart-archive/paper-elements/331bb789eb5799955e982a76046b0b4a77d2f785/lib/src/web-animations-next/test/resources/WebKitWeightWatcher400.ttf -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/resources/WebKitWeightWatcher500.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dart-archive/paper-elements/331bb789eb5799955e982a76046b0b4a77d2f785/lib/src/web-animations-next/test/resources/WebKitWeightWatcher500.ttf -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/resources/WebKitWeightWatcher600.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dart-archive/paper-elements/331bb789eb5799955e982a76046b0b4a77d2f785/lib/src/web-animations-next/test/resources/WebKitWeightWatcher600.ttf -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/resources/WebKitWeightWatcher700.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dart-archive/paper-elements/331bb789eb5799955e982a76046b0b4a77d2f785/lib/src/web-animations-next/test/resources/WebKitWeightWatcher700.ttf -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/resources/WebKitWeightWatcher800.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dart-archive/paper-elements/331bb789eb5799955e982a76046b0b4a77d2f785/lib/src/web-animations-next/test/resources/WebKitWeightWatcher800.ttf -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/resources/WebKitWeightWatcher900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dart-archive/paper-elements/331bb789eb5799955e982a76046b0b4a77d2f785/lib/src/web-animations-next/test/resources/WebKitWeightWatcher900.ttf -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/runner-web-animations-next-lite.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 |
27 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/runner-web-animations-next.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 |
27 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/runner-web-animations.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 |
27 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/runner.js: -------------------------------------------------------------------------------- 1 | var WEB_ANIMATIONS_TESTING = true; 2 | var webAnimationsTesting = window; 3 | var assert = chai.assert; 4 | mocha.setup({ ui: 'tdd' }); 5 | 6 | function loadWebAnimationsBuildTarget(target) { 7 | var config = webAnimationsTargetConfig[target]; 8 | config.src.concat(config.test).forEach(function(file) { 9 | document.write('\n'); 10 | }); 11 | } 12 | 13 | (function() { 14 | 15 | var pageError = null; 16 | 17 | addEventListener('error', function(event) { 18 | pageError = event.filename + ':' + event.lineno + ' ' + event.message; 19 | }); 20 | 21 | addEventListener('load', function() { 22 | 23 | // Inject test suite for page errors if any encountered. 24 | if (pageError) { 25 | suite('page-script-errors', function() { 26 | test('no script errors on page', function() { 27 | assert.fail(null, null, pageError); 28 | }); 29 | }); 30 | } 31 | 32 | mocha.run(); 33 | }); 34 | 35 | })(); 36 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/test/testharness-runner.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/web-animations-next-lite.dev.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/web-animations-next-lite.dev.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | var webAnimationsSourceTarget = 'web-animations-next-lite'; 15 | var WEB_ANIMATIONS_TESTING = false; 16 | (function() { 17 | var scripts = document.getElementsByTagName('script'); 18 | var location = scripts[scripts.length - 1].src.replace(/[^\/]+$/, ''); 19 | document.write(''); 20 | document.write(''); 21 | })(); 22 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/web-animations-next.dev.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | var webAnimationsSourceTarget = 'web-animations-next'; 15 | var WEB_ANIMATIONS_TESTING = false; 16 | (function() { 17 | var scripts = document.getElementsByTagName('script'); 18 | var location = scripts[scripts.length - 1].src.replace(/[^\/]+$/, ''); 19 | document.write(''); 20 | document.write(''); 21 | })(); 22 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/web-animations.dev.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /lib/src/web-animations-next/web-animations.dev.js: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Google Inc. All rights reserved. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | var webAnimationsSourceTarget = 'web-animations'; 15 | var WEB_ANIMATIONS_TESTING = false; 16 | (function() { 17 | var scripts = document.getElementsByTagName('script'); 18 | var location = scripts[scripts.length - 1].src.replace(/[^\/]+$/, ''); 19 | document.write(''); 20 | document.write(''); 21 | })(); 22 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: paper_elements 2 | version: 0.7.1+2 3 | author: Polymer.dart Authors 4 | description: Paper elements for Dart 5 | homepage: https://www.dartlang.org/polymer-dart/ 6 | dependencies: 7 | core_elements: '>=0.7.1 <0.8.0' 8 | polymer_interop: ">=0.1.0+2 <0.2.0" 9 | web_components: ">=0.9.0 <0.13.0" 10 | dev_dependencies: 11 | custom_element_apigen: ">= 0.1.7 <0.2.0" 12 | path: ">=1.0.0 <2.0.0" 13 | polymer: ">=0.16.1+4 <0.17.0" 14 | unittest: ">=0.11.0+2 <0.12.0" 15 | matcher: ">=0.10.1+1 <0.12.0" 16 | transformers: 17 | - polymer: 18 | entry_points: 19 | - test/paper_button_test.html 20 | - test/paper_dropdown_basic_test.html 21 | - test/paper_fab_a11y_test.html 22 | - test/paper_fab_basic_test.html 23 | - test/paper_icon_button_a11y_test.html 24 | - test/paper_icon_button_basic_test.html 25 | - test/paper_input_test.html 26 | - test/paper_input_autogrow_test.html 27 | - test/paper_input_decorator_test.html 28 | - test/paper_ripple_position_test.html 29 | - test/paper_shadow_basic_test.html 30 | lint: 31 | exclude: lib/src/ 32 | inline_stylesheets: 33 | lib/src/paper-shadow/paper-shadow.css: true 34 | - $dart2js: 35 | $include: "**/*.polymer.bootstrap.dart" 36 | -------------------------------------------------------------------------------- /test/common.dart: -------------------------------------------------------------------------------- 1 | library paper_elements.common; 2 | 3 | import 'dart:async'; 4 | import 'dart:html'; 5 | import 'dart:js'; 6 | import 'package:unittest/unittest.dart'; 7 | 8 | Future flushLayoutAndRender() { 9 | context['Polymer'].callMethod('flush', []); 10 | document.body.offsetTop; 11 | return window.animationFrame; 12 | } 13 | 14 | Element activeElement() => document.activeElement; 15 | 16 | void assertNodeHasFocus(Element node) { 17 | expect(activeElement().id, node.id); 18 | } 19 | 20 | Future ensureFocus(Element node) { 21 | node.focus(); 22 | return flushLayoutAndRender().then((_) { 23 | assertNodeHasFocus(node); 24 | }); 25 | } 26 | -------------------------------------------------------------------------------- /test/paper_button_test.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | paper-button basic tests 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | button 22 | 23 | button 24 | 25 | disabled 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/paper_dropdown_basic_test.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | paper-dropdown basic test 13 | 14 | 15 | 16 | 17 |
18 | tap 19 | Hello World! 20 |
21 | 22 |
23 | tap 24 | Hello World! 25 |
26 | 27 |
28 | tap 29 | Hello World! 30 |
31 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /test/paper_fab_a11y_test.dart: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 2 | //This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 3 | //The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 4 | //The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 5 | //Code distributed by Google as part of the polymer project is also 6 | //subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 7 | 8 | library paper_fab.a11y_test; 9 | 10 | import 'dart:html'; 11 | import 'package:paper_elements/paper_fab.dart'; 12 | import 'package:polymer/polymer.dart'; 13 | import 'package:unittest/unittest.dart'; 14 | import 'package:unittest/html_config.dart' show useHtmlConfiguration; 15 | import 'common.dart'; 16 | 17 | void main() { 18 | useHtmlConfiguration(); 19 | 20 | initPolymer().then((zone) => zone.run(() { 21 | Polymer.onReady.then((_) { 22 | var f1 = document.getElementById('fab1') as PaperFab; 23 | var f2 = document.getElementById('fab2') as PaperFab; 24 | var f3 = document.getElementById('fab3') as PaperFab; 25 | 26 | test('aria role is a button', () { 27 | expect(f1.attributes['role'], 'button'); 28 | }); 29 | 30 | test('aria-disabled is set', () { 31 | expect(f2.attributes['aria-disabled'], isNotNull); 32 | f2.attributes.remove('disabled'); 33 | return flushLayoutAndRender().then((_) { 34 | expect(f2.attributes['aria-disabled'], isNull); 35 | }); 36 | }); 37 | 38 | test('aria-label is set', () { 39 | expect(f1.attributes['aria-label'], 'add'); 40 | }); 41 | 42 | test('user-defined aria-label is preserved', () { 43 | expect(f3.attributes['aria-label'], 'custom'); 44 | f3.icon = 'arrow-forward'; 45 | return flushLayoutAndRender().then((_) { 46 | expect(f3.attributes['aria-label'], 'custom'); 47 | }); 48 | }); 49 | 50 | }); 51 | })); 52 | } 53 | -------------------------------------------------------------------------------- /test/paper_fab_a11y_test.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | paper-fab a11y test 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/paper_fab_basic_test.dart: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 2 | //This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 3 | //The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 4 | //The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 5 | //Code distributed by Google as part of the polymer project is also 6 | //subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 7 | 8 | library paper_fab.basic_test; 9 | 10 | import 'dart:html'; 11 | import 'package:paper_elements/paper_fab.dart'; 12 | import 'package:polymer/polymer.dart'; 13 | import 'package:unittest/unittest.dart'; 14 | import 'package:unittest/html_config.dart' show useHtmlConfiguration; 15 | 16 | void main() { 17 | useHtmlConfiguration(); 18 | 19 | initPolymer().then((zone) => zone.run(() { 20 | Polymer.onReady.then((_) { 21 | var f1 = document.getElementById('fab1') as PaperFab; 22 | 23 | test('renders correctly independent of line height', () { 24 | expect(centerOf(f1.jsElement['\$']['icon']), centerOf(f1)); 25 | }); 26 | 27 | }); 28 | })); 29 | } 30 | 31 | centerOf(Element element) { 32 | var rect = element.getBoundingClientRect(); 33 | return 34 | {'left': rect.left + rect.width / 2, 'top': rect.top + rect.height / 2}; 35 | } 36 | -------------------------------------------------------------------------------- /test/paper_fab_basic_test.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | paper-fab basic test 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/paper_icon_button_a11y_test.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | paper-icon-button a11y test 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /test/paper_icon_button_basic_test.dart: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 2 | //This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 3 | //The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 4 | //The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 5 | //Code distributed by Google as part of the polymer project is also 6 | //subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 7 | 8 | library paper_icon_button.basic_test; 9 | 10 | import 'dart:html'; 11 | import 'package:paper_elements/paper_icon_button.dart'; 12 | import 'package:polymer/polymer.dart'; 13 | import 'package:unittest/unittest.dart'; 14 | import 'package:unittest/html_config.dart' show useHtmlConfiguration; 15 | 16 | void main() { 17 | useHtmlConfiguration(); 18 | 19 | initPolymer().then((zone) => zone.run(() { 20 | Polymer.onReady.then((_) { 21 | var b1 = document.getElementById('button1') as PaperIconButton; 22 | 23 | test('renders correctly independent of font size', () { 24 | expect(centerOf(b1.$['icon']), centerOf(b1)); 25 | }); 26 | 27 | }); 28 | })); 29 | } 30 | 31 | centerOf(Element element) { 32 | var rect = element.getBoundingClientRect(); 33 | return { 34 | 'left': (rect.left + rect.width / 2).floor(), 35 | 'top': (rect.top + rect.height / 2).floor() 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /test/paper_icon_button_basic_test.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | paper-icon-button basic test 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | Toolbar 21 | 22 |
23 | 24 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/paper_input_autogrow_test.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | paper-input autogrow test 13 | 14 | 15 | 16 | 17 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /test/paper_input_test.dart: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 2 | //This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 3 | //The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 4 | //The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 5 | //Code distributed by Google as part of the polymer project is also 6 | //subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 7 | library paper_elements.test.paper_input_test; 8 | 9 | import 'dart:async'; 10 | import 'dart:html'; 11 | import 'dart:js'; 12 | import 'package:core_elements/core_input.dart'; 13 | import 'package:core_elements/core_style.dart'; 14 | import 'package:paper_elements/paper_input_decorator.dart'; 15 | import 'package:paper_elements/paper_char_counter.dart'; 16 | import 'package:polymer/polymer.dart'; 17 | import 'package:unittest/unittest.dart'; 18 | import 'package:unittest/html_config.dart' show useHtmlConfiguration; 19 | import 'common.dart'; 20 | 21 | void main() { 22 | useHtmlConfiguration(); 23 | 24 | initPolymer().then((zone) => zone.run(() { 25 | return Polymer.onReady.then((_) { 26 | test('change event bubbles', () { 27 | var node = document.getElementById('default'); 28 | var listener; 29 | listener = node.on['change'].listen((_) => listener.cancel()); 30 | 31 | var input = node.shadowRoot.querySelector('input'); 32 | input.dispatchEvent(new Event('change', canBubble: true)); 33 | }); 34 | 35 | test('cannot tap on disabled input', () { 36 | var node = document.getElementById('disabled'); 37 | node.dispatchEvent(new MouseEvent('Down')); 38 | node.dispatchEvent(new MouseEvent('Up')); 39 | return flushLayoutAndRender().then((_) { 40 | expect(activeElement(), isNot(node.shadowRoot.querySelector('input'))); 41 | }); 42 | }); 43 | }); 44 | })); 45 | } 46 | -------------------------------------------------------------------------------- /test/paper_input_test.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | paper-input tests 14 | 15 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /test/paper_ripple_position_test.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | paper-ripple position test 13 | 14 | 15 | 16 | 17 | 51 | 52 | 53 |
54 | 55 | tap here 56 |
57 | 58 |
59 | 60 | tap here 61 |
62 | 63 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /test/paper_shadow_basic_test.dart: -------------------------------------------------------------------------------- 1 | //Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 2 | //This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 3 | //The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 4 | //The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 5 | //Code distributed by Google as part of the polymer project is also 6 | //subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 7 | 8 | library paper_shadow.basic_test; 9 | 10 | import 'dart:async'; 11 | import 'dart:html'; 12 | import 'package:paper_elements/paper_shadow.dart'; 13 | import 'package:polymer/polymer.dart'; 14 | import 'package:unittest/unittest.dart'; 15 | import 'package:unittest/html_config.dart' show useHtmlConfiguration; 16 | 17 | void main() { 18 | useHtmlConfiguration(); 19 | 20 | initPolymer().then((zone) => zone.run(() { 21 | Polymer.onReady.then((_) { 22 | var s1 = querySelector('#s1') as PaperShadow; 23 | 24 | test('default', () { 25 | expect(s1.$['shadow-bottom'].getComputedStyle().boxShadow, 26 | isNot('none')); 27 | }); 28 | 29 | test('shadows are pointer-events: none', () { 30 | var done = new Completer(); 31 | var foo = querySelector('#foo'); 32 | document.onClick.take(1).listen((e) { 33 | expect(e.target, foo); 34 | done.complete(); 35 | }); 36 | foo.click(); 37 | return done.future; 38 | }); 39 | 40 | }); 41 | })); 42 | } 43 | -------------------------------------------------------------------------------- /test/paper_shadow_basic_test.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | paper-shadow basic test 13 | 14 | 15 | 16 | 22 | 23 | 24 | 25 | 26 | 27 |
hi!
28 |
29 | 30 | 32 | 33 | 34 | --------------------------------------------------------------------------------