├── .gitignore ├── .travis.yml ├── CONTRIBUTAING.md ├── LICENSE ├── README.md ├── bower.json ├── demo └── index.html ├── gpages.sh ├── index.html ├── paper-tags-input.html ├── tag-item.html ├── test ├── basic-test.html └── index.html └── wct.conf.json /.gitignore: -------------------------------------------------------------------------------- 1 | bower_components/ 2 | coverage/ 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | sudo: required 3 | dist: trusty 4 | node_js: stable 5 | before_install: 6 | - export CHROME_BIN=/usr/bin/google-chrome 7 | - sudo apt-get update 8 | - sudo apt-get install -y libappindicator1 fonts-liberation 9 | - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb 10 | - sudo dpkg -i google-chrome*.deb 11 | - rm google-chrome-stable_current_amd64.deb 12 | - "npm install -g bower" 13 | - "bower install" 14 | - "npm i -g web-component-tester@4.3.1 istanbul https://github.com/t2ym/web-component-tester-istanbul/tarball/0.10.1" 15 | - "npm install coveralls" 16 | - "export DISPLAY=:99.0" 17 | - "sh -e /etc/init.d/xvfb start" 18 | script: 19 | - wct 20 | after_script: 21 | - "cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" 22 | deploy: 23 | provider: script 24 | script: "bash ./gpages.sh cheonhyangzhang paper-tags-input" 25 | on: 26 | branch: release 27 | -------------------------------------------------------------------------------- /CONTRIBUTAING.md: -------------------------------------------------------------------------------- 1 | # Contributing to paper-tags-input 2 | 3 | Want to contribute to paper-tags-input... that's awesome! I really appreciate the help in making this project better. Here you will find everything you need to know in order to solve problems, report bugs, request features and implement your contribution and send it as a pull request. 4 | 5 | ## Reporting a bug 6 | 7 | If you find a bug in the code or an error in the documentation and want to report it, check whether it's already been reported by searching the issue tracker. In case it hasn't yet, create a new issue and describe the problem you've found. Please be sure to include the following information along with your message: 8 | 9 | - Version of paper-tags-input you are using. 10 | - Version of Polymer you are using. 11 | 12 | ## Setting up your environment 13 | 14 | Here's what you need to do before start working on the code: 15 | 16 | 1. Fork the repository 17 | 2. Clone your repository 18 | 19 | git clone https://github.com//paper-tags-input 20 | 21 | 5. Go to the paper-tags-input directory 22 | 23 | cd paper-tags-input 24 | 25 | 6. Add the main paper-tags-input repo as an upstream remote 26 | 27 | git remote add upstream https://github.com/cheonhyangzhang/paper-tags-input 28 | 29 | 7. Install all the bower packages 30 | 31 | bower install 32 | 33 | 8. Run local server 34 | 35 | polyserve -p 36 | 37 | ## Pull Request guidelines 38 | 39 | Before submitting your pull request, consider the following: 40 | 41 | - Make your changes in a new branch (this will help you rebase your code if/when needed). Make sure you checkout this branch based on latest master branch. 42 | 43 | git checkout -b my-feature-branch 44 | 45 | **Important**: 46 | Each feature/bugfix should reside in its own branch, and each branch should be based on the master branch. Avoid implementing a new feature/bugfix on top of another one because that makes code reviews harder and prevents pull requests from being selectively merged. 47 | 48 | You may need to rebase your branch on top of the latest version of the master branch. To do so is simple: 49 | 50 | 1. Switch to `master` branch 51 | 52 | git checkout master 53 | 54 | 2. Pull the latest changes from the server 55 | 56 | git pull upstream master 57 | 58 | **Note:** That command should **always** result in a fast-forward merge. 59 | 60 | 3. Switch back to your feature branch 61 | 62 | git checkout my-feature-branch 63 | 64 | 4. Rebase it on top of the master branch (there might be conflicts you'll need to resolve) 65 | 66 | git rebase master -i 67 | 68 | 5. Push the changes into your remote repository 69 | 70 | git push 71 | 72 | 6. In GitHub, send a pull request to `paper-tags-input:master` 73 | 74 | That's it! Thank you for contributing! 75 | 76 | In case you need to do changes after creating a pull request, repeat steps 1 though 4 and force a push into your remote repository 77 | 78 | git push --force 79 | 80 | That will update your pull request. You might want to update the PR page explaining the changes you have done. 81 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 Tianxiang Zhang 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # paper-tags-input 2 | [![Travis](https://img.shields.io/travis/cheonhyangzhang/paper-tags-input.svg?style=flat)](https://travis-ci.org/cheonhyangzhang/paper-tags-input) [![Coverage Status](https://coveralls.io/repos/github/cheonhyangzhang/paper-tags-input/badge.svg?branch=master)](https://coveralls.io/github/cheonhyangzhang/paper-tags-input?branch=master) 3 | 4 | Polymer element for tags input. 5 | 6 | paper-tags-input is a list of tags with a single-line text field with Material Design styling. 7 | 8 | ## Demo 9 | 10 | [Documentation and Demo](http://cheonhyangzhang.github.io/paper-tags-input/components/paper-tags-input/) 11 | 12 | ## Installation 13 | 14 | bower install --save paper-tags-input 15 | 16 | ## Dependencies 17 | 18 | Element dependencies are managed via [Bower](http://bower.io/). You can 19 | install that via: 20 | 21 | npm install -g bower 22 | 23 | Then, go ahead and download the element's dependencies: 24 | 25 | bower install 26 | 27 | ## Playing With Your Element 28 | 29 | If you wish to work on your element in isolation, we recommend that you use 30 | [Polyserve](https://github.com/PolymerLabs/polyserve) to keep your element's 31 | bower dependencies in line. You can install it via: 32 | 33 | npm install -g polyserve 34 | 35 | And you can run it via: 36 | 37 | polyserve 38 | 39 | Once running, you can preview your element at 40 | `http://localhost:8080/components/paper-tags-inpu/`, where `paper-tags-inpu` is the name of the directory containing it. 41 | 42 | ## Want to contribute? 43 | Please read the [CONTRIBUTING.md](https://github.com/cheonhyangzhang/paper-tags-inpu/blob/master/CONTRIBUTING.md) before making your changes. 44 | 45 | ## Testing Your Element 46 | 47 | Simply navigate to the `/test` directory of your element to run its tests. If 48 | you are using Polyserve: `http://localhost:8080/components/paper-tags-inpu/test/` 49 | 50 | ### web-component-tester 51 | 52 | The tests are compatible with [web-component-tester](https://github.com/Polymer/web-component-tester). 53 | Install it via: 54 | 55 | npm install -g web-component-tester 56 | 57 | Then, you can run your tests on _all_ of your local browsers via: 58 | 59 | wct 60 | 61 | #### WCT Tips 62 | 63 | `wct -l chrome` will only run tests in chrome. 64 | 65 | `wct -p` will keep the browsers alive after test runs (refresh to re-run). 66 | 67 | `wct test/some-file.html` will test only the files you specify. 68 | 69 | 70 | ## LICENSE 71 | [MIT](https://github.com/cheonhyangzhang/paper-tags-inpu/blob/master/LICENSE) 72 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "paper-tags-input", 3 | "version": "1.2.8", 4 | "authors": [ 5 | "Tianxiang Zhang " 6 | ], 7 | "description": "An input element for tags.", 8 | "keywords": [ 9 | "web-component", 10 | "web-components", 11 | "polymer", 12 | "seed" 13 | ], 14 | "main": "paper-tags-input.html", 15 | "license": "http://polymer.github.io/LICENSE.txt", 16 | "homepage": "https://github.com/cheonhyangzhang/paper-tags-input/", 17 | "ignore": [ 18 | "/.*", 19 | "/test/", 20 | "/demo/" 21 | ], 22 | "dependencies": { 23 | "polymer": "Polymer/polymer#^1.0.0", 24 | "paper-input": "PolymerElements/paper-input#^1.0.5", 25 | "paper-icon-button": "PolymerElements/paper-icon-button#^1.1.4" 26 | }, 27 | "devDependencies": { 28 | "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", 29 | "web-component-tester": "*" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | paper-tags-input Demo 16 | 17 | 18 | 19 | 20 | 21 | 26 | 27 | 142 | 143 | 144 | -------------------------------------------------------------------------------- /gpages.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # 3 | # @license 4 | # Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 5 | # This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 6 | # The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 7 | # The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 8 | # Code distributed by Google as part of the polymer project is also 9 | # subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 10 | # 11 | 12 | # This script pushes a demo-friendly version of your element and its 13 | # dependencies to gh-pages. 14 | 15 | # usage gp Polymer core-item [branch] 16 | # Run in a clean directory passing in a GitHub org and repo name 17 | echo 'Deploy gpages' 18 | org=$1 19 | repo=$2 20 | name="Tianxiang Zhang" 21 | email="cenhiangapply@gmail.com" 22 | branch=${3:-"release"} # default to release when branch isn't specified 23 | 24 | rm -rf temp 25 | mkdir temp && cd temp 26 | mkdir $repo 27 | git clone "https://${org}:${GH_TOKEN}@github.com/${org}/${repo}" --single-branch 28 | 29 | # switch to gh-pages branch 30 | pushd $repo >/dev/null 31 | git checkout --orphan gh-pages 32 | 33 | # remove all content 34 | echo 'Remove all content' 35 | git rm -rf -q . 36 | 37 | # use bower to install runtime deployment 38 | bower cache clean $repo # ensure we're getting the latest from the desired branch. 39 | git show ${branch}:bower.json > bower.json 40 | echo "{ 41 | \"directory\": \"components\" 42 | } 43 | " > .bowerrc 44 | bower install 45 | bower install $org/$repo#$branch 46 | git checkout ${branch} -- demo 47 | rm -rf components/$repo/demo 48 | mv demo components/$repo/ 49 | 50 | # redirect by default to the component folder 51 | echo "" >index.html 52 | 53 | git config user.name $name 54 | git config user.email $email 55 | # send it all to github 56 | git add -A . 57 | git commit -am 'Deploy to Github Pages' 58 | git push --force --quiet -u "https://${org}:${GH_TOKEN}@github.com/${org}/${repo}" gh-pages > /dev/null 2>&1 59 | 60 | popd >/dev/null 61 | rm -rf temp 62 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /paper-tags-input.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 61 | 62 | 88 | 89 | 90 | 91 | 279 | -------------------------------------------------------------------------------- /tag-item.html: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 23 | 24 | 100 | 101 | 102 | 179 | -------------------------------------------------------------------------------- /test/basic-test.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 30 | 31 | 32 | 35 | 36 | 37 | 40 | 41 | 42 | 43 | 46 | 47 | 48 | 49 | 52 | 53 | 54 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /wct.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "suites": ["test/basic-test.html"], 3 | "verbose": true, 4 | "plugins": { 5 | "istanbul": { 6 | "dir": "./coverage", 7 | "reporters": ["text-summary", "lcov"], 8 | "include": [ 9 | "/paper-tags-input.html", 10 | "/tag-item.html" 11 | ], 12 | "exclude": [] 13 | }, 14 | "local": { 15 | "browsers": ["chrome", "firefox"] 16 | } 17 | } 18 | } 19 | --------------------------------------------------------------------------------