From 14600e1faac0bd585ac51a3b1bc0f1dc136b019c Mon Sep 17 00:00:00 2001 From: Valdrin Koshi Date: Fri, 12 May 2017 18:08:44 -0700 Subject: [PATCH] port to 2.0 (#38) * port to 2.0 * [skip ci] update readme * more specific versions --- .gitignore | 4 ++-- .travis.yml | 11 +++++------ README.md | 27 +++++---------------------- bower.json | 32 +++++++++++++++++++++++--------- demo/index.html | 24 ++++++++++++++++++------ demo/x-key-aware.html | 7 +++---- test/index.html | 3 +-- 7 files changed, 57 insertions(+), 51 deletions(-) diff --git a/.gitignore b/.gitignore index 1eb1fa5..2be39e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -bower_components - +bower_components* +bower-*.json diff --git a/.travis.yml b/.travis.yml index 38c419c..82266b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,15 @@ language: node_js sudo: required before_script: - - npm install -g bower polylint web-component-tester - - bower install - - polylint + - npm install -g bower polymer-cli + - polymer install --variants env: global: - secure: >- R3/vUv1ZGFOaVvKRZFhNBaeGGV7U5J5aob6d9K5R7gwgyehuegVllbk1lauuhygxcNQ85+dyRXSw9+xhVa2cRtlHPbQKBMJuZt+NKsmq1+hpQ2lfyo/UWP6v7VIdjyUpKTowZj0YIohtJseW+vH9TZECfjyh+veW5B711aIQlopqswQzecvZMCigToIyx7kFujm8vTcKN4XOoNyB5FlHEnUR472XgCp4CCe/93VJixg1ccXeSR/YWDdZinHyvao4IRnrrXS2H2V7QupEQUZkcXCKAIxvuCFptpS+9ywLZpg/0YjKOazGB0eJV4p7rP1qBpnR024XA2g7mh563o+5QFZkOcPJCLohuEjBPw/XEvXtHIjlgFVtGOhPtMI6qgOz6CQzEWNEKGE083xZeMVFHxeTTVk+TT4pc4iadjwqLBZ2t7U/X4NSxnLT3olr4QL2iNesnrfE9sqbFA/8sJjZQIvaSUU0kK2xHh+W5hYfJigQvO0j9878VsGXhOTOA/OX6ghK6++qqiK39VN+rfvyLXfiO/bwUVxr8mw50ulU5prImMmxtOofD9yvEJ4TyOZoI10+k2vB+dozLvLps5oCKohJZI8xr42M3PWEFFCh/eva3DxmzsB5xdsS4TlmVccZp1SK7RC5t179RVXavzndKwqiegQC2YmblF+UtIgUn8k= - secure: >- inpQZsxZ8grQHQ8WxE3uKfZgSLzTXUp4YjBd86EXuydVQkJdMH5WWFpC0dSwb19r14b261xrwU9V1kyV6ZxXWqnb1+GORb6SVQeaKBacE85pPUXZ0kj6eSMtmQN3TMuzZZFSRzT12OEEAPQESPLbOebpydUX6IfOkF8BjeQdJ30jR5uXfOVqCobpMqsrRVJ9GGxXgF5jVdRpaqzTIl4Th1iHJUA8j48fEOhLBJKA7qzJ6xk6hAfdXQtMfDL0uwfYCI2Yd7nDZFvHPgX6bMuqui3cyKiuHxZqt/lrxYqT4L+LrRHm1I0WzcBLKBpLEAHcdhCia/GUWniuFD/va4wL3PIVbhCmEFh17IwH3aZSYfSqnIV+Cx85cjdQ4Uw5CFR46Wfu6HZ2otWpLo4uV4/7Ukq67xNzsPISOIXMOgsbnErMrdSBt28FKQxBDIAU3+Yg73h3KfXCxcYh1MQiMyu1SmVrSpHIxE1ys2LdKsPuIljagilpSgS6nOkihkrqgWJ6hxOUstDggOnG02Wgdoa4XusGz+piHyhkJQSzUkbbsGcTwKCWjrp0mIVU3fR3KLwdRzeMStMX2x6GAIBxATz7yUK2DyyoaNEWBXHg7MRZCaXcB063EJA8Qc8Sx3udubJcvXnuIXuiYm4PWw8bZTh1fYvw3ZELFuM8UbNBpvTbr9E= -node_js: '6' +node_js: stable addons: firefox: latest apt: @@ -19,6 +18,6 @@ addons: packages: - google-chrome-stable script: - - xvfb-run wct - - 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then wct -s ''default''; fi' + - xvfb-run polymer test + - 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then polymer test -s ''default''; fi' dist: trusty diff --git a/README.md b/README.md index 0d58a96..ede2254 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,8 @@ - - - [![Build status](https://travis-ci.org/PolymerElements/iron-a11y-keys.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-a11y-keys) _[Demo and API docs](https://elements.polymer-project.org/elements/iron-a11y-keys)_ - -##<iron-a11y-keys> +## <iron-a11y-keys> `iron-a11y-keys` provides a cross-browser interface for processing keyboard commands. The interface adheres to [WAI-ARIA best @@ -56,12 +41,12 @@ properties: { notify: true, }, target: { - type: Object, - value: function() { - return this.$.input; - } + type: Object }, }, +ready: function() { + this.target = this.$.input; +}, onEnter: function() { console.log(this.userInput); } @@ -137,5 +122,3 @@ to methods. The `increment` method should move the slider a set amount toward the maximum value. `decrement` should move the slider a set amount toward the minimum value. `setMin` should move the slider to the minimum value. `setMax` should move the slider to the maximum value. - - diff --git a/bower.json b/bower.json index d0f8f44..9e64a3e 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "iron-a11y-keys", - "version": "1.0.9", + "version": "2.0.0", "description": "A basic element implementation of iron-a11y-keys-behavior, matching the legacy core-a11y-keys.", "keywords": [ "web-components", @@ -19,16 +19,30 @@ "main": "iron-a11y-keys.html", "license": "http://polymer.github.io/LICENSE.txt", "dependencies": { - "polymer": "Polymer/polymer#^1.1.0", - "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0" + "polymer": "Polymer/polymer#^2.0.0-rc.7", + "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#2.0-preview" }, "devDependencies": { - "paper-styles": "PolymerElements/paper-styles#^1.0.2", - "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", - "test-fixture": "PolymerElements/test-fixture#^1.0.0", - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", - "web-component-tester": "^4.0.0", - "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0" + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#2.0-preview", + "iron-component-page": "PolymerElements/iron-component-page#2.0-preview", + "iron-test-helpers": "PolymerElements/iron-test-helpers#2.0-preview", + "web-component-tester": "Polymer/web-component-tester#^6.0.0-prerelease.6", + "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0" + }, + "variants": { + "1.x": { + "dependencies": { + "polymer": "Polymer/polymer#^1.1.0", + "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0" + }, + "devDependencies": { + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", + "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", + "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", + "web-component-tester": "^4.0.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" + } + } }, "ignore": [] } diff --git a/demo/index.html b/demo/index.html index 4fe9af4..3e63601 100644 --- a/demo/index.html +++ b/demo/index.html @@ -9,16 +9,28 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt --> + Iron A11y Keys demo + + + + - + + + + - -
- -
+ + + + + - + + \ No newline at end of file diff --git a/demo/x-key-aware.html b/demo/x-key-aware.html index 954cfbd..9efc93c 100644 --- a/demo/x-key-aware.html +++ b/demo/x-key-aware.html @@ -9,7 +9,6 @@ --> - @@ -21,7 +20,7 @@ } pre { - color: var(--google-blue-700); + color: #3367d6; } .keys { @@ -30,8 +29,8 @@ .keys span { cursor: default; - background-color: var(--google-grey-100); - border: 1px solid var(--google-grey-300); + background-color: #f5f5f5; + border: 1px solid #e0e0e0; padding: 1px 5px; border-radius: 5px; } diff --git a/test/index.html b/test/index.html index d496eb4..a570c94 100755 --- a/test/index.html +++ b/test/index.html @@ -11,7 +11,6 @@ Tests - @@ -19,7 +18,7 @@