Skip to content

Commit 81f88fb

Browse files
committedJul 27, 2020
Initial commit
0 parents  commit 81f88fb

12 files changed

+19707
-0
lines changed
 

‎.eslintrc.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
'cypress/globals': true,
5+
browser: true,
6+
node: true
7+
},
8+
plugins: [
9+
'cypress',
10+
'vuejs-accessibility'
11+
],
12+
extends: [
13+
'plugin:vue/recommended',
14+
'@vue/standard',
15+
'plugin:vuejs-accessibility/recommended'
16+
],
17+
parserOptions: {
18+
parser: 'babel-eslint'
19+
},
20+
rules: {
21+
'no-console': 'off'
22+
}
23+
}

‎.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
.temp
4+
demo/vue-focus-loop.js

‎LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Vue A11Y
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# [@vue-a11y/focus-loop](https://focus-loop.vue-a11y.com)
2+

‎cypress.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"baseUrl": "http://localhost:8080",
3+
"fixturesFolder": "tests/e2e/fixtures",
4+
"screenshotsFolder": "tests/e2e/screenshots",
5+
"integrationFolder": "tests/e2e/integration",
6+
"fileServerFolder": "demo",
7+
"pluginsFile": false,
8+
"supportFile": "tests/e2e/support"
9+
}

‎jest.config.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
moduleNameMapper: {
3+
'^@/(.*)$': '<rootDir>/$1',
4+
'^vue$': 'vue/dist/vue.common.js'
5+
},
6+
moduleFileExtensions: ['js', 'vue', 'json'],
7+
testMatch: [
8+
'**/(*.)test.(js|jsx|ts|tsx)'
9+
],
10+
transform: {
11+
'^.+\\.js$': 'babel-jest',
12+
'.*\\.(vue)$': 'vue-jest'
13+
}
14+
}

‎package-lock.json

+19,438
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"name": "@vue-a11y/focus-loop",
3+
"version": "0.0.1",
4+
"description": "",
5+
"main": "dist/vue-focus-loop.ssr.js",
6+
"browser": "dist/vue-focus-loop.esm.js",
7+
"module": "dist/vue-focus-loop.esm.js",
8+
"unpkg": "dist/vue-focus-loop.min.js",
9+
"types": "index.d.ts",
10+
"scripts": {
11+
"dev": "rollup --config rollup.config.dev.js --watch",
12+
"build": "npm run build:ssr & npm run build:es & npm run build:unpkg",
13+
"build:ssr": "rollup --config rollup.config.prod.js --format cjs --file dist/vue-focus-loop.ssr.js",
14+
"build:es": "rollup --config rollup.config.prod.js --format es --file dist/vue-focus-loop.esm.js",
15+
"build:unpkg": "rollup --config rollup.config.prod.js --format iife --file dist/vue-focus-loop.min.js",
16+
"docs:dev": "vuepress dev docs --no-cache",
17+
"docs:build": "vuepress build docs --no-cache && echo darkmode.vue-a11y.com >> docs/.vuepress/dist/CNAME",
18+
"docs:publish": "gh-pages -d docs/.vuepress/dist",
19+
"demo:dev": "cd demo && npm run serve",
20+
"demo:build": "cd demo && npm run build",
21+
"demo:publish": "cp ./demo/dist/index.html ./demo/dist/200.html && surge ./demo/dist https://vue-focus-loop.surge.sh/",
22+
"release": "standard-version",
23+
"test:unit": "jest",
24+
"test:e2e": "node_modules/.bin/cypress run --headless",
25+
"test:e2e:open": "node_modules/.bin/cypress open ",
26+
"project:publish": "git push --tags origin master && npm run build && npm publish --access public"
27+
},
28+
"repository": {
29+
"type": "git",
30+
"url": "git+https://github.com/vue-a11y/vue-focus-loop.git"
31+
},
32+
"keywords": [
33+
"vue",
34+
"component",
35+
"a11y",
36+
"accessibility",
37+
"focus",
38+
"tab",
39+
"tab-loop",
40+
"focus trap",
41+
"focus loop",
42+
"vue-a11y",
43+
"vue.js"
44+
],
45+
"author": "Alan Ktquez <ktquez@gmail.com> (https://github.com/ktquez)",
46+
"license": "MIT",
47+
"bugs": {
48+
"url": "https://github.com/vue-a11y/vue-focus-loop/issues"
49+
},
50+
"homepage": "https://github.com/vue-a11y/vue-focus-loop#readme",
51+
"devDependencies": {
52+
"@rollup/plugin-buble": "^0.21.3",
53+
"@rollup/plugin-commonjs": "^14.0.0",
54+
"@rollup/plugin-node-resolve": "^8.4.0",
55+
"@rollup/plugin-replace": "^2.3.3",
56+
"@vue/eslint-config-standard": "^5.1.2",
57+
"@vue/test-utils": "^1.0.3",
58+
"@vuepress/plugin-register-components": "^1.5.2",
59+
"@vuepress/theme-default": "^1.5.2",
60+
"babel-eslint": "^10.1.0",
61+
"babel-jest": "^26.1.0",
62+
"chokidar": "^3.4.1",
63+
"cypress": "^4.11.0",
64+
"eslint": "^7.5.0",
65+
"eslint-plugin-cypress": "^2.11.1",
66+
"eslint-plugin-import": "^2.22.0",
67+
"eslint-plugin-node": "^11.1.0",
68+
"eslint-plugin-promise": "^4.2.1",
69+
"eslint-plugin-standard": "^4.0.1",
70+
"eslint-plugin-vue": "^6.2.2",
71+
"eslint-plugin-vue-a11y": "0.0.31",
72+
"eslint-plugin-vuejs-accessibility": "^0.3.1",
73+
"gh-pages": "^3.1.0",
74+
"jest": "^26.1.0",
75+
"portal-vue": "^2.1.7",
76+
"rollup": "^2.23.0",
77+
"rollup-plugin-eslint": "^7.0.0",
78+
"rollup-plugin-terser": "^6.1.0",
79+
"rollup-plugin-vue": "^6.0.0-beta.9",
80+
"rollup-plugin-vue-inline-svg": "^1.1.1",
81+
"standard-version": "^8.0.2",
82+
"vue": "^2.6.11",
83+
"vue-template-compiler": "^2.6.11",
84+
"vuepress": "^1.5.2",
85+
"vuepress-theme-default-vue-a11y": "^0.1.15"
86+
},
87+
"dependencies": {}
88+
}

‎rollup.config.dev.js

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import buble from '@rollup/plugin-buble'
2+
import resolve from '@rollup/plugin-node-resolve'
3+
import chokidar from 'chokidar'
4+
import { eslint } from 'rollup-plugin-eslint'
5+
import vue from 'rollup-plugin-vue'
6+
7+
export default {
8+
input: 'src/index.js',
9+
watch: {
10+
chokidar,
11+
include: ['src/**']
12+
},
13+
plugins: [
14+
resolve(),
15+
eslint({
16+
include: './src/**'
17+
}),
18+
vue({
19+
css: true,
20+
compileTemplate: true
21+
}),
22+
buble()
23+
],
24+
output: [
25+
{
26+
name: 'VueFocusLoop',
27+
file: 'demo/vue-focus-loop.js',
28+
format: 'umd',
29+
exports: 'named'
30+
}
31+
]
32+
}

‎rollup.config.prod.js

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import buble from '@rollup/plugin-buble'
2+
import commonjs from '@rollup/plugin-commonjs'
3+
import replace from '@rollup/plugin-replace'
4+
import { terser } from 'rollup-plugin-terser'
5+
import vue from 'rollup-plugin-vue'
6+
7+
export default commandLineArgs => {
8+
return {
9+
input: 'src/index.js',
10+
plugins: [
11+
commonjs(),
12+
replace({
13+
'process.env.NODE_ENV': JSON.stringify('production')
14+
}),
15+
vue({
16+
css: true,
17+
compileTemplate: true,
18+
template: {
19+
isProduction: true,
20+
optimizeSSR: commandLineArgs.format === 'cjs'
21+
}
22+
}),
23+
buble(),
24+
commandLineArgs.format === 'iife' && terser()
25+
],
26+
output: {
27+
name: 'VueFocusLoop',
28+
exports: 'named'
29+
}
30+
}
31+
}

‎test/support/commands.js

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// ***********************************************
2+
// This example commands.js shows you how to
3+
// create various custom commands and overwrite
4+
// existing commands.
5+
//
6+
// For more comprehensive examples of custom
7+
// commands please read more here:
8+
// https://on.cypress.io/custom-commands
9+
// ***********************************************
10+
//
11+
//
12+
// -- This is a parent command --
13+
// Cypress.Commands.add("login", (email, password) => { ... })
14+
//
15+
//
16+
// -- This is a child command --
17+
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
18+
//
19+
//
20+
// -- This is a dual command --
21+
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
22+
//
23+
//
24+
// -- This is will overwrite an existing command --
25+
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })

‎test/support/index.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// ***********************************************************
2+
// This example support/index.js is processed and
3+
// loaded automatically before your test files.
4+
//
5+
// This is a great place to put global configuration and
6+
// behavior that modifies Cypress.
7+
//
8+
// You can change the location of this file or turn off
9+
// automatically serving support files with the
10+
// 'supportFile' configuration option.
11+
//
12+
// You can read more here:
13+
// https://on.cypress.io/configuration
14+
// ***********************************************************
15+
16+
// Import commands.js using ES2015 syntax:
17+
import './commands';
18+
19+
// Alternatively you can use CommonJS syntax:
20+
// require('./commands')

0 commit comments

Comments
 (0)
Please sign in to comment.