diff --git a/.eslintrc.json b/.eslintrc.json
index f9b5e8b..fea230e 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,15 +1,15 @@
{
- "extends": "vaadin",
+ "extends": [
+ "eslint:recommended",
+ "plugin:prettier/recommended"
+ ],
+ "plugins": ["prettier"],
"env": {
"browser": true,
- "node": true,
"es6": true
},
- "plugins": [
- "html"
- ],
- "globals": {
- "Polymer": false,
- "Vaadin": false
+ "parserOptions": {
+ "sourceType": "module",
+ "ecmaVersion": 2018
}
}
diff --git a/.gemini.yml b/.gemini.yml
deleted file mode 100644
index 8b911a0..0000000
--- a/.gemini.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-rootUrl: http://localhost:8080/components/vaadin-checkbox/test/visual/
-gridUrl: http://localhost:4444/wd/hub
-screenshotsDir: ./test/visual/screens
-
-system:
- plugins:
- polyserve:
- port: 8080
- sauce: true
-
-browsers:
- chrome:
- desiredCapabilities:
- browserName: "chrome"
- version: "67.0"
- platform: "Windows 10"
-
- firefox:
- desiredCapabilities:
- browserName: "firefox"
- version: "47.0"
- platform: "Windows 10"
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..9a8c97f
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,33 @@
+### Description
+
+
+### Live Demo
+
+https://glitch.com/edit/#!/vaadin-checkbox-issue
+
+
+### Steps to Reproduce
+
+
+### Expected Results
+
+
+### Actual Results
+
+
+### Browsers Affected
+
+- [ ] Chrome
+- [ ] Firefox
+- [ ] Safari
+- [ ] iOS Safari
+- [ ] Android Chrome
+
+### Version
+
+- vaadin-checkbox: vX.X.X
diff --git a/.github/workflows/sauce.yml b/.github/workflows/sauce.yml
new file mode 100644
index 0000000..3d25b22
--- /dev/null
+++ b/.github/workflows/sauce.yml
@@ -0,0 +1,47 @@
+name: sauce
+
+on:
+ push:
+ branches:
+ - '**'
+ tags-ignore:
+ - '*.*'
+
+jobs:
+ unit-tests:
+ runs-on: ubuntu-latest
+ if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v1
+ with:
+ node-version: 12
+
+ - name: Install dependencies
+ run: npm install
+
+ - name: SauceLabs tests
+ env:
+ SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
+ SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
+ run: npm run test:sauce
+
+ visual-tests:
+ runs-on: ubuntu-latest
+ if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v1
+ with:
+ node-version: 12
+
+ - name: Install dependencies
+ run: npm install
+
+ - name: Visual tests
+ env:
+ SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
+ SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
+ run: npm run test:visual
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..65e2568
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,43 @@
+name: tests
+
+on: [pull_request]
+
+jobs:
+ lint:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v1
+ with:
+ node-version: 12
+
+ - name: Install dependencies
+ run: npm install
+
+ - name: Check version
+ run: npm run check-version
+
+ - name: Lint JavaScript
+ run: npm run lint:js
+
+ - name: Lint CSS
+ run: npm run lint:css
+
+ - name: Lint typings
+ run: npm run lint:types
+
+ unit-tests:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-node@v1
+ with:
+ node-version: 12
+
+ - name: Install dependencies
+ run: npm install
+
+ - name: Unit tests
+ run: npm test
diff --git a/.hermione.conf.js b/.hermione.conf.js
new file mode 100644
index 0000000..a151f26
--- /dev/null
+++ b/.hermione.conf.js
@@ -0,0 +1,24 @@
+module.exports = {
+ browsers: {
+ chrome: {
+ baseUrl: 'http://localhost:8080/test/visual/',
+ screenshotsDir: (test) => {
+ const folder = test.title.replace(/-(lumo|material)(-)?(rtl|ltr)?/, '');
+ return `test/visual/screens/${folder}`;
+ },
+ desiredCapabilities: {
+ browserName: 'chrome',
+ version: '85.0',
+ platform: 'Windows 10'
+ }
+ }
+ },
+ plugins: {
+ 'hermione-esm': {
+ port: 8080
+ },
+ 'hermione-sauce': {
+ verbose: false
+ }
+ }
+};
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..3506f0e
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,6 @@
+{
+ "singleQuote": true,
+ "printWidth": 120,
+ "trailingComma": "none",
+ "htmlWhitespaceSensitivity": "strict"
+}
diff --git a/.stylelintrc b/.stylelintrc
index b2189e2..5a1a6a7 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -1,3 +1,6 @@
{
- "extends": "stylelint-config-vaadin"
+ "extends": [
+ "stylelint-config-vaadin",
+ "stylelint-config-prettier"
+ ]
}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 8d07a9c..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,64 +0,0 @@
-sudo: false
-dist: xenial
-language: node_js
-node_js: 8.11
-
-cache:
- directories:
- - node_modules
-
-addons:
- firefox: latest
- chrome: stable
-
-jobs:
- include:
- - if: type = push
- env: TEST_SUITE=unit_tests POLYMER=2
- - if: type = push
- env: TEST_SUITE=visual_tests POLYMER=2
- - if: type = push
- env: TEST_SUITE=unit_tests POLYMER=3
- - if: type = pull_request
- env: POLYMER=2
- addons:
- firefox: latest
- chrome: stable
- - if: type = pull_request
- env: POLYMER=3
- addons:
- firefox: latest
- chrome: stable
- - if: type = cron
- env: TEST_SUITE=unit_tests POLYMER=2
-
-script:
- - if [[ "$POLYMER" = "2" ]]; then
- npm -q i && npm i -q --no-save bower polymer-cli && bower -q i &&
- if [[ "$TRAVIS_EVENT_TYPE" = "pull_request" ]]; then
- npm run check &&
- npm run lint &&
- xvfb-run -s '-screen 0 1024x768x24' wct;
- elif [[ "$TRAVIS_EVENT_TYPE" = "cron" ]]; then
- wct --env saucelabs-cron;
- elif [[ "$TEST_SUITE" = "visual_tests" ]]; then
- npm i -q --no-save gemini@^4.0.0 gemini-sauce gemini-polyserve &&
- gemini test test/visual;
- else
- wct --env saucelabs;
- fi;
- fi
- - if [[ "$POLYMER" = "3" ]]; then
- npm --no-save -q install -g yarn bower magi-cli web-component-tester polymer-modulizer &&
- rm -rf node_modules &&
- magi p3-convert --out . --import-style=name &&
- yarn install --flat &&
- if [[ "$TRAVIS_EVENT_TYPE" = "pull_request" ]]; then
- xvfb-run -s '-screen 0 1024x768x24' wct --npm;
- else
- wct --npm --env saucelabs;
- fi;
- fi
-
-after_success:
- - "cat ${TRAVIS_BUILD_DIR}/coverage/lcov.info | coveralls"
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md
deleted file mode 100644
index 312e28c..0000000
--- a/ISSUE_TEMPLATE.md
+++ /dev/null
@@ -1,28 +0,0 @@
-### Description
-
-
-### Expected outcome
-
-
-### Actual outcome
-
-
-### Live Demo
-
-
-### Steps to reproduce
-
-
-### Browsers Affected
-
-- [ ] Chrome
-- [ ] Firefox
-- [ ] Safari
-- [ ] Edge
-- [ ] IE 11
-- [ ] iOS Safari
-- [ ] Android Chrome
diff --git a/README.md b/README.md
index a9bb148..efc13cb 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,3 @@
-[![npm version](https://badgen.net/npm/v/@vaadin/vaadin-checkbox)](https://www.npmjs.com/package/@vaadin/vaadin-checkbox)
-[![Bower version](https://badgen.net/github/release/vaadin/vaadin-checkbox)](https://github.com/vaadin/vaadin-checkbox/releases)
-[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/vaadin/vaadin-checkbox)
-[![Build Status](https://travis-ci.org/vaadin/vaadin-checkbox.svg?branch=master)](https://travis-ci.org/vaadin/vaadin-checkbox)
-[![Coverage Status](https://coveralls.io/repos/github/vaadin/vaadin-checkbox/badge.svg?branch=master)](https://coveralls.io/github/vaadin/vaadin-checkbox?branch=master)
-[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vaadin/web-components?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
-
-[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/vaadinvaadin-checkbox)
-[![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/vaadinvaadin-checkbox.svg)](https://vaadin.com/directory/component/vaadinvaadin-checkbox)
-
# <vaadin-checkbox>
[Live Demo ↗](https://vaadin.com/components/vaadin-checkbox/html-examples)
@@ -16,17 +6,13 @@
[<vaadin-checkbox>](https://vaadin.com/components/vaadin-checkbox) is a Web Component providing an accessible and customizable checkbox, part of the [Vaadin components](https://vaadin.com/components).
-
+[![npm version](https://badgen.net/npm/v/@vaadin/vaadin-checkbox)](https://www.npmjs.com/package/@vaadin/vaadin-checkbox)
+[![Build Status](https://travis-ci.org/vaadin/vaadin-checkbox.svg?branch=master)](https://travis-ci.org/vaadin/vaadin-checkbox)
+[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/vaadin/vaadin-checkbox)
+[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/vaadinvaadin-checkbox)
+[![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/vaadinvaadin-checkbox.svg)](https://vaadin.com/directory/component/vaadinvaadin-checkbox)
+[![Discord](https://img.shields.io/discord/732335336448852018?label=discord)](https://discord.gg/PHmkCKC)
+
```html
Use the An indeterminate checkbox is neither checked nor
- unchecked. A typical use case
- is a “Select All” checkbox indicating that some, but not all, items are selected.Basic usage
- Basic usage with checkbox group
- Disabled state
- Helper text
- helper-text
attribute or add content to the helper
slot to set helper content.Object list
- Value change event
- Indeterminate checkbox
- Customizing checkbox label
- Multi-line label
- Customizing font
- Customizing icon color
- Orientation
- Horizontal
- Vertical
- Helper text position
- Below
- Above
- Required
-