{"action":"created","comment":{"url":"https://api.github.com/repos/PolymerElements/paper-input/pulls/comments/28807789","id":28807789,"diff_hunk":"@@ -0,0 +1,275 @@\n+<!--\n+    @license\n+    Copyright (c) 2015 The Polymer Project Authors. All rights reserved.\n+    This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n+    The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n+    The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n+    Code distributed by Google as part of the polymer project is also\n+    subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n+-->\n+\n+<link rel=\"import\" href=\"../polymer/polymer.html\">\n+<link rel=\"import\" href=\"../paper-styles/paper-styles.html\">\n+\n+<style is=\"x-style\">\n+\n+  * {\n+\n+    --paper-input-container-focus-color: var(--default-primary-color);\n+    --paper-input-container-color: var(--secondary-text-color);\n+    --paper-input-container-invalid-color: var(--google-red-500);\n+    --paper-input-container-input-color: var(--primary-text-color);\n+\n+  }\n+\n+</style>\n+\n+<dom-module id=\"paper-input-container\">\n+\n+  <style>\n+\n+    .floated-label-placeholder {\n+      mixin(--paper-font-caption);\n+    }\n+\n+    .focused-line {\n+      height: 2px;\n+\n+      -webkit-transform-origin: center center;\n+      transform-origin: center center;\n+      -webkit-transform: scale3d(0,1,1);\n+      transform: scale3d(0,1,1);\n+\n+      background: var(--paper-input-container-focus-color);\n+    }\n+\n+    .is-highlighted .focused-line {\n+      -webkit-transform: none;\n+      transform: none;\n+      -webkit-transition: -webkit-transform 0.25s;\n+      transition: transform 0.25s;\n+\n+      mixin(--paper-transition-easing);\n+    }\n+\n+    .is-invalid .focused-line {\n+      background: var(--paper-input-container-invalid-color);\n+\n+      -webkit-transform: none;\n+      transform: none;\n+      -webkit-transition: -webkit-transform 0.25s;\n+      transition: transform 0.25s;\n+\n+      mixin(--paper-transition-easing);\n+    }\n+\n+    .unfocused-line {\n+      height: 1px;\n+      background: var(--paper-input-container-color);\n+    }\n+\n+    .input-content ::content label,\n+    .input-content ::content .paper-input-label {\n+      color: var(--paper-input-container-color);\n+\n+      mixin(--fit);\n+      mixin(--paper-font-subhead);\n+\n+      mixin(--paper-input-container-label);\n+    }\n+\n+    .input-content.label-is-floating ::content label,\n+    .input-content.label-is-floating ::content .paper-input-label {\n+      -webkit-transform: translate3d(0, -75%, 0) scale(0.75);\n+      transform: translate3d(0, -75%, 0) scale(0.75);\n+      -webkit-transform-origin: left top;\n+      transform-origin: left top;\n+      -webkit-transition: -webkit-transform 0.25s;\n+      transition: transform 0.25s;\n+\n+      mixin(--paper-transition-easing);\n+    }\n+\n+    .input-content.label-is-highlighted ::content label,\n+    .input-content.label-is-highlighted ::content .paper-input-label {\n+      color: var(--paper-input-container-focus-color);\n+    }\n+\n+    .input-content.is-invalid ::content label,\n+    .input-content.is-invalid ::content .paper-input-label {\n+      color: var(--paper-input-container-invalid-color);\n+    }\n+\n+    .input-content.label-is-hidden ::content label,\n+    .input-content.label-is-hidden ::content .paper-input-label {\n+      visibility: hidden;\n+    }\n+\n+    .input-content ::content input,\n+    .input-content ::content .paper-input-input {\n+      position: relative; /* to make a stacking context */\n+      outline: none;\n+      color: var(--paper-input-container-input-color);\n+\n+      mixin(--paper-font-subhead);\n+    }\n+\n+    .input-content ::content input {\n+      font: inherit;\n+      padding: 0;\n+      width: 100%;\n+      background: transparent;\n+      border: none;\n+\n+      mixin(--paper-input-container-input);\n+    }\n+\n+  </style>\n+\n+  <template>\n+\n+    <!-- <template is=\"x-if\" if=\"[[!noLabelFloat]]\"> -->\n+      <div class=\"floated-label-placeholder\">&nbsp;</div>\n+    <!-- </template> -->\n+\n+    <div class$=\"[[_computeInputContentClass(noLabelFloat,focused,_inputHasContent,_inputIsInvalid)]]\">\n+      <content select=\":not(.add-on)\"></content>\n+    </div>\n+\n+    <div class$=\"[[_computeUnderlineClass(focused,_inputIsInvalid)]]\">\n+      <div class=\"unfocused-line fit\"></div>\n+      <div class=\"focused-line fit\"></div>\n+    </div>\n+\n+    <div class=\"add-on-content\">\n+      <content select=\".add-on\"></content>\n+    </div>\n+\n+  </template>\n+\n+</dom-module>\n+\n+<script>\n+(function() {\n+\n+  Polymer({\n+\n+    is: 'paper-input-container',\n+\n+    enableCustomStyleProperties: true,\n+\n+    properties: {\n+\n+      /**\n+       * Set to true to disable the floating label.\n+       */\n+      noLabelFloat: {\n+        type: Boolean,\n+        value: false\n+      },\n+\n+      /**\n+       * Set to true to auto-validate the input value.\n+       */\n+      autoValidate: {\n+        type: Boolean,\n+        value: false\n+      },\n+\n+      /**\n+       * True if the input has focus.\n+       */\n+      focused: {\n+        readOnly: true,\n+        type: Boolean,\n+        value: false\n+      },\n+\n+      _inputHasContent: {\n+        type: Boolean,\n+        value: false\n+      },\n+\n+      _inputIsInvalid: {\n+        type: Boolean,\n+        value: false\n+      }\n+\n+    },\n+\n+    listeners: {\n+      'input': 'onInput'\n+    },\n+\n+    attached: function() {\n+      var input = Polymer.dom(this).querySelector('input,.paper-input-input');\n+      this._inputHasContent = !!input.value;\n+      this._inputIsInvalid = !input.validity.valid;","path":"paper-input-container.html","position":221,"original_position":207,"commit_id":"369185f4aff05a1aef7366dd065f54894da272a6","original_commit_id":"6c83255ceb1d1bf8bc824dff82c9f347a34f67c5","user":{"login":"morethanreal","id":1202776,"avatar_url":"https://avatars.githubusercontent.com/u/1202776?v=3","gravatar_id":"","url":"https://api.github.com/users/morethanreal","html_url":"https://github.com/morethanreal","followers_url":"https://api.github.com/users/morethanreal/followers","following_url":"https://api.github.com/users/morethanreal/following{/other_user}","gists_url":"https://api.github.com/users/morethanreal/gists{/gist_id}","starred_url":"https://api.github.com/users/morethanreal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morethanreal/subscriptions","organizations_url":"https://api.github.com/users/morethanreal/orgs","repos_url":"https://api.github.com/users/morethanreal/repos","events_url":"https://api.github.com/users/morethanreal/events{/privacy}","received_events_url":"https://api.github.com/users/morethanreal/received_events","type":"User","site_admin":false},"body":"I also need to observe them for computed functions though, and not sure if implementing them as accessors will still let me do that?","created_at":"2015-04-21T18:29:05Z","updated_at":"2015-04-21T18:29:05Z","html_url":"https://github.com/PolymerElements/paper-input/pull/1#discussion_r28807789","pull_request_url":"https://api.github.com/repos/PolymerElements/paper-input/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/PolymerElements/paper-input/pulls/comments/28807789"},"html":{"href":"https://github.com/PolymerElements/paper-input/pull/1#discussion_r28807789"},"pull_request":{"href":"https://api.github.com/repos/PolymerElements/paper-input/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/PolymerElements/paper-input/pulls/1","id":33720001,"html_url":"https://github.com/PolymerElements/paper-input/pull/1","diff_url":"https://github.com/PolymerElements/paper-input/pull/1.diff","patch_url":"https://github.com/PolymerElements/paper-input/pull/1.patch","issue_url":"https://api.github.com/repos/PolymerElements/paper-input/issues/1","number":1,"state":"open","locked":false,"title":"basic implementation","user":{"login":"morethanreal","id":1202776,"avatar_url":"https://avatars.githubusercontent.com/u/1202776?v=3","gravatar_id":"","url":"https://api.github.com/users/morethanreal","html_url":"https://github.com/morethanreal","followers_url":"https://api.github.com/users/morethanreal/followers","following_url":"https://api.github.com/users/morethanreal/following{/other_user}","gists_url":"https://api.github.com/users/morethanreal/gists{/gist_id}","starred_url":"https://api.github.com/users/morethanreal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morethanreal/subscriptions","organizations_url":"https://api.github.com/users/morethanreal/orgs","repos_url":"https://api.github.com/users/morethanreal/repos","events_url":"https://api.github.com/users/morethanreal/events{/privacy}","received_events_url":"https://api.github.com/users/morethanreal/received_events","type":"User","site_admin":false},"body":"@cdata @notwaldorf PTAL. Enough for the boot camp code lab, hopefully.\r\n\r\nTODO:\r\n\r\n- [ ] prevent invalid input\r\n- [ ] more/fix tests\r\n- [ ] error message\r\n- [ ] character counter\r\n- [ ] ARIA attributes\r\n- [ ] more demos","created_at":"2015-04-21T00:43:47Z","updated_at":"2015-04-21T18:29:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1fe23d01523bc74e979fb4db3118cfae64074704","assignee":{"login":"cdata","id":240083,"avatar_url":"https://avatars.githubusercontent.com/u/240083?v=3","gravatar_id":"","url":"https://api.github.com/users/cdata","html_url":"https://github.com/cdata","followers_url":"https://api.github.com/users/cdata/followers","following_url":"https://api.github.com/users/cdata/following{/other_user}","gists_url":"https://api.github.com/users/cdata/gists{/gist_id}","starred_url":"https://api.github.com/users/cdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdata/subscriptions","organizations_url":"https://api.github.com/users/cdata/orgs","repos_url":"https://api.github.com/users/cdata/repos","events_url":"https://api.github.com/users/cdata/events{/privacy}","received_events_url":"https://api.github.com/users/cdata/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/PolymerElements/paper-input/pulls/1/commits","review_comments_url":"https://api.github.com/repos/PolymerElements/paper-input/pulls/1/comments","review_comment_url":"https://api.github.com/repos/PolymerElements/paper-input/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PolymerElements/paper-input/issues/1/comments","statuses_url":"https://api.github.com/repos/PolymerElements/paper-input/statuses/369185f4aff05a1aef7366dd065f54894da272a6","head":{"label":"PolymerElements:initial-impl","ref":"initial-impl","sha":"369185f4aff05a1aef7366dd065f54894da272a6","user":{"login":"PolymerElements","id":11639138,"avatar_url":"https://avatars.githubusercontent.com/u/11639138?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerElements","html_url":"https://github.com/PolymerElements","followers_url":"https://api.github.com/users/PolymerElements/followers","following_url":"https://api.github.com/users/PolymerElements/following{/other_user}","gists_url":"https://api.github.com/users/PolymerElements/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerElements/subscriptions","organizations_url":"https://api.github.com/users/PolymerElements/orgs","repos_url":"https://api.github.com/users/PolymerElements/repos","events_url":"https://api.github.com/users/PolymerElements/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerElements/received_events","type":"Organization","site_admin":false},"repo":{"id":34294743,"name":"paper-input","full_name":"PolymerElements/paper-input","owner":{"login":"PolymerElements","id":11639138,"avatar_url":"https://avatars.githubusercontent.com/u/11639138?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerElements","html_url":"https://github.com/PolymerElements","followers_url":"https://api.github.com/users/PolymerElements/followers","following_url":"https://api.github.com/users/PolymerElements/following{/other_user}","gists_url":"https://api.github.com/users/PolymerElements/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerElements/subscriptions","organizations_url":"https://api.github.com/users/PolymerElements/orgs","repos_url":"https://api.github.com/users/PolymerElements/repos","events_url":"https://api.github.com/users/PolymerElements/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerElements/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PolymerElements/paper-input","description":"A Material Design text field","fork":false,"url":"https://api.github.com/repos/PolymerElements/paper-input","forks_url":"https://api.github.com/repos/PolymerElements/paper-input/forks","keys_url":"https://api.github.com/repos/PolymerElements/paper-input/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PolymerElements/paper-input/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PolymerElements/paper-input/teams","hooks_url":"https://api.github.com/repos/PolymerElements/paper-input/hooks","issue_events_url":"https://api.github.com/repos/PolymerElements/paper-input/issues/events{/number}","events_url":"https://api.github.com/repos/PolymerElements/paper-input/events","assignees_url":"https://api.github.com/repos/PolymerElements/paper-input/assignees{/user}","branches_url":"https://api.github.com/repos/PolymerElements/paper-input/branches{/branch}","tags_url":"https://api.github.com/repos/PolymerElements/paper-input/tags","blobs_url":"https://api.github.com/repos/PolymerElements/paper-input/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PolymerElements/paper-input/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PolymerElements/paper-input/git/refs{/sha}","trees_url":"https://api.github.com/repos/PolymerElements/paper-input/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PolymerElements/paper-input/statuses/{sha}","languages_url":"https://api.github.com/repos/PolymerElements/paper-input/languages","stargazers_url":"https://api.github.com/repos/PolymerElements/paper-input/stargazers","contributors_url":"https://api.github.com/repos/PolymerElements/paper-input/contributors","subscribers_url":"https://api.github.com/repos/PolymerElements/paper-input/subscribers","subscription_url":"https://api.github.com/repos/PolymerElements/paper-input/subscription","commits_url":"https://api.github.com/repos/PolymerElements/paper-input/commits{/sha}","git_commits_url":"https://api.github.com/repos/PolymerElements/paper-input/git/commits{/sha}","comments_url":"https://api.github.com/repos/PolymerElements/paper-input/comments{/number}","issue_comment_url":"https://api.github.com/repos/PolymerElements/paper-input/issues/comments{/number}","contents_url":"https://api.github.com/repos/PolymerElements/paper-input/contents/{+path}","compare_url":"https://api.github.com/repos/PolymerElements/paper-input/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PolymerElements/paper-input/merges","archive_url":"https://api.github.com/repos/PolymerElements/paper-input/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PolymerElements/paper-input/downloads","issues_url":"https://api.github.com/repos/PolymerElements/paper-input/issues{/number}","pulls_url":"https://api.github.com/repos/PolymerElements/paper-input/pulls{/number}","milestones_url":"https://api.github.com/repos/PolymerElements/paper-input/milestones{/number}","notifications_url":"https://api.github.com/repos/PolymerElements/paper-input/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PolymerElements/paper-input/labels{/name}","releases_url":"https://api.github.com/repos/PolymerElements/paper-input/releases{/id}","created_at":"2015-04-21T00:40:05Z","updated_at":"2015-04-21T00:40:51Z","pushed_at":"2015-04-21T18:17:45Z","git_url":"git://github.com/PolymerElements/paper-input.git","ssh_url":"git@github.com:PolymerElements/paper-input.git","clone_url":"https://github.com/PolymerElements/paper-input.git","svn_url":"https://github.com/PolymerElements/paper-input","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"PolymerElements:master","ref":"master","sha":"9ba08be327c11542f09b7baae8e6427ba1cb9388","user":{"login":"PolymerElements","id":11639138,"avatar_url":"https://avatars.githubusercontent.com/u/11639138?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerElements","html_url":"https://github.com/PolymerElements","followers_url":"https://api.github.com/users/PolymerElements/followers","following_url":"https://api.github.com/users/PolymerElements/following{/other_user}","gists_url":"https://api.github.com/users/PolymerElements/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerElements/subscriptions","organizations_url":"https://api.github.com/users/PolymerElements/orgs","repos_url":"https://api.github.com/users/PolymerElements/repos","events_url":"https://api.github.com/users/PolymerElements/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerElements/received_events","type":"Organization","site_admin":false},"repo":{"id":34294743,"name":"paper-input","full_name":"PolymerElements/paper-input","owner":{"login":"PolymerElements","id":11639138,"avatar_url":"https://avatars.githubusercontent.com/u/11639138?v=3","gravatar_id":"","url":"https://api.github.com/users/PolymerElements","html_url":"https://github.com/PolymerElements","followers_url":"https://api.github.com/users/PolymerElements/followers","following_url":"https://api.github.com/users/PolymerElements/following{/other_user}","gists_url":"https://api.github.com/users/PolymerElements/gists{/gist_id}","starred_url":"https://api.github.com/users/PolymerElements/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolymerElements/subscriptions","organizations_url":"https://api.github.com/users/PolymerElements/orgs","repos_url":"https://api.github.com/users/PolymerElements/repos","events_url":"https://api.github.com/users/PolymerElements/events{/privacy}","received_events_url":"https://api.github.com/users/PolymerElements/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PolymerElements/paper-input","description":"A Material Design text field","fork":false,"url":"https://api.github.com/repos/PolymerElements/paper-input","forks_url":"https://api.github.com/repos/PolymerElements/paper-input/forks","keys_url":"https://api.github.com/repos/PolymerElements/paper-input/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PolymerElements/paper-input/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PolymerElements/paper-input/teams","hooks_url":"https://api.github.com/repos/PolymerElements/paper-input/hooks","issue_events_url":"https://api.github.com/repos/PolymerElements/paper-input/issues/events{/number}","events_url":"https://api.github.com/repos/PolymerElements/paper-input/events","assignees_url":"https://api.github.com/repos/PolymerElements/paper-input/assignees{/user}","branches_url":"https://api.github.com/repos/PolymerElements/paper-input/branches{/branch}","tags_url":"https://api.github.com/repos/PolymerElements/paper-input/tags","blobs_url":"https://api.github.com/repos/PolymerElements/paper-input/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PolymerElements/paper-input/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PolymerElements/paper-input/git/refs{/sha}","trees_url":"https://api.github.com/repos/PolymerElements/paper-input/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PolymerElements/paper-input/statuses/{sha}","languages_url":"https://api.github.com/repos/PolymerElements/paper-input/languages","stargazers_url":"https://api.github.com/repos/PolymerElements/paper-input/stargazers","contributors_url":"https://api.github.com/repos/PolymerElements/paper-input/contributors","subscribers_url":"https://api.github.com/repos/PolymerElements/paper-input/subscribers","subscription_url":"https://api.github.com/repos/PolymerElements/paper-input/subscription","commits_url":"https://api.github.com/repos/PolymerElements/paper-input/commits{/sha}","git_commits_url":"https://api.github.com/repos/PolymerElements/paper-input/git/commits{/sha}","comments_url":"https://api.github.com/repos/PolymerElements/paper-input/comments{/number}","issue_comment_url":"https://api.github.com/repos/PolymerElements/paper-input/issues/comments{/number}","contents_url":"https://api.github.com/repos/PolymerElements/paper-input/contents/{+path}","compare_url":"https://api.github.com/repos/PolymerElements/paper-input/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PolymerElements/paper-input/merges","archive_url":"https://api.github.com/repos/PolymerElements/paper-input/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PolymerElements/paper-input/downloads","issues_url":"https://api.github.com/repos/PolymerElements/paper-input/issues{/number}","pulls_url":"https://api.github.com/repos/PolymerElements/paper-input/pulls{/number}","milestones_url":"https://api.github.com/repos/PolymerElements/paper-input/milestones{/number}","notifications_url":"https://api.github.com/repos/PolymerElements/paper-input/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PolymerElements/paper-input/labels{/name}","releases_url":"https://api.github.com/repos/PolymerElements/paper-input/releases{/id}","created_at":"2015-04-21T00:40:05Z","updated_at":"2015-04-21T00:40:51Z","pushed_at":"2015-04-21T18:17:45Z","git_url":"git://github.com/PolymerElements/paper-input.git","ssh_url":"git@github.com:PolymerElements/paper-input.git","clone_url":"https://github.com/PolymerElements/paper-input.git","svn_url":"https://github.com/PolymerElements/paper-input","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PolymerElements/paper-input/pulls/1"},"html":{"href":"https://github.com/PolymerElements/paper-input/pull/1"},"issue":{"href":"https://api.github.com/repos/PolymerElements/paper-input/issues/1"},"comments":{"href":"https://api.github.com/repos/PolymerElements/paper-input/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/PolymerElements/paper-input/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/PolymerElements/paper-input/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PolymerElements/paper-input/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/PolymerElements/paper-input/statuses/369185f4aff05a1aef7366dd065f54894da272a6"}}}}