Skip to content

Commit 7c6d514

Browse files
committed
initial scaffolding
1 parent 88a47ad commit 7c6d514

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+3062
-2
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/dist
2+
/node_modules
3+
*.html

.eslintrc.js

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: true,
5+
es2021: true,
6+
node: true,
7+
'vue/setup-compiler-macros': true,
8+
},
9+
extends: [
10+
'plugin:vue/vue3-essential',
11+
'airbnb-base',
12+
],
13+
parserOptions: {
14+
ecmaVersion: 'latest',
15+
sourceType: 'module',
16+
},
17+
plugins: [
18+
'vue',
19+
],
20+
rules: {
21+
'import/first': 'off',
22+
'import/named': 'error',
23+
'import/namespace': 'error',
24+
'import/default': 'error',
25+
'import/export': 'error',
26+
'import/extensions': 'off',
27+
'import/no-unresolved': 'off',
28+
'import/no-extraneous-dependencies': 'off',
29+
'import/no-dynamic-require': 'off',
30+
'import/prefer-default-export': 'off',
31+
'prefer-promise-reject-errors': 'off',
32+
33+
// allow console.log during development only
34+
'no-console': process.env.NODE_ENV === 'production' ? ['error', { allow: ['info', 'warn', 'error'] }] : 'off',
35+
// allow debugger during development only
36+
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
37+
38+
'linebreak-style': 'off',
39+
'arrow-parens': ['error', 'always'],
40+
'max-len': ['error', 400],
41+
'template-curly-spacing': ['error', 'always'],
42+
'no-underscore-dangle': 'off',
43+
'no-var': 'error',
44+
'no-param-reassign': ['error', { props: false }],
45+
indent: 'off',
46+
'indent-legacy': ['error', 2, {
47+
SwitchCase: 1,
48+
}],
49+
'vue/script-indent': ['error', 2, {
50+
baseIndent: 0,
51+
switchCase: 1,
52+
ignores: [],
53+
}],
54+
'vue/max-attributes-per-line': ['error', {
55+
singleline: 3,
56+
multiline: 1,
57+
}],
58+
},
59+
};

.github/CODE_OF_CONDUCT.md

+13

.github/FUNDING.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# These are supported funding model platforms
22

3-
github: pdanpdan
3+
github: [pdanpdan]

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ logs
44
npm-debug.log*
55
yarn-debug.log*
66
yarn-error.log*
7+
pnpm-debug.log*
78
lerna-debug.log*
89

910
# Diagnostic reports (https://nodejs.org/api/report.html)
@@ -81,6 +82,7 @@ typings/
8182
# Nuxt.js build / generate output
8283
.nuxt
8384
dist
85+
dist-ssr
8486

8587
# Gatsby files
8688
.cache/
@@ -102,3 +104,5 @@ dist
102104

103105
# TernJS port file
104106
.tern-port
107+
108+
*.local

.vscode/extensions.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["johnsoncodehk.volar"]
3+
}

CHANGELOG.md

README.md

+1-1

deploy.docs.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env sh
2+
set -e
3+
4+
yarn docs:build
5+
6+
cd docs/.vitepress/dist
7+
8+
git init
9+
git add -A
10+
git commit -m 'deploy'
11+
git push -f [email protected]:pdanpdan/vue-keyboard-trap.git master:gh-pages
12+
13+
cd -

docs/.vitepress/config.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { defineConfig } from 'vitepress';
2+
3+
export default defineConfig({
4+
base: '/vue-keyboard-trap/',
5+
themeConfig: {
6+
// Type is `DefaultTheme.Config`
7+
},
8+
});

docs/index.md

+1

index.html

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" href="/favicon.ico" />
6+
<title>Vue Keyboard Trap</title>
7+
8+
<meta name="description" content="<%= productDescription %>">
9+
<meta name="format-detection" content="telephone=no">
10+
<meta name="msapplication-tap-highlight" content="no">
11+
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, viewport-fit=cover">
12+
13+
<link rel="icon" type="image/png" sizes="128x128" href="icons/favicon-128x128.png">
14+
<link rel="icon" type="image/png" sizes="96x96" href="icons/favicon-96x96.png">
15+
<link rel="icon" type="image/png" sizes="32x32" href="icons/favicon-32x32.png">
16+
<link rel="icon" type="image/png" sizes="16x16" href="icons/favicon-16x16.png">
17+
<link rel="icon" type="image/ico" href="favicon.ico">
18+
<link rel="apple-touch-startup-image" media="(device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3)" href="icons/apple-launch-1284x2778.png">
19+
<link rel="apple-touch-startup-image" media="(device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3)" href="icons/apple-launch-1170x2532.png">
20+
<link rel="apple-touch-startup-image" media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2)" href="icons/apple-launch-828x1792.png">
21+
<link rel="apple-touch-startup-image" media="(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)" href="icons/apple-launch-1125x2436.png">
22+
<link rel="apple-touch-startup-image" media="(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3)" href="icons/apple-launch-1242x2688.png">
23+
<link rel="apple-touch-startup-image" media="(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)" href="icons/apple-launch-750x1334.png">
24+
<link rel="apple-touch-startup-image" media="(device-width: 414px) and (device-height: 736px) and (-webkit-device-pixel-ratio: 3)" href="icons/apple-launch-1242x2208.png">
25+
<link rel="apple-touch-startup-image" media="(device-width: 810px) and (device-height: 1080px) and (-webkit-device-pixel-ratio: 2)" href="icons/apple-launch-1620x2160.png">
26+
<link rel="apple-touch-startup-image" media="(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2)" href="icons/apple-launch-1536x2048.png">
27+
<link rel="apple-touch-startup-image" media="(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2)" href="icons/apple-launch-1668x2224.png">
28+
<link rel="apple-touch-startup-image" media="(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2)" href="icons/apple-launch-1668x2388.png">
29+
<link rel="apple-touch-startup-image" media="(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)" href="icons/apple-launch-2048x2732.png">
30+
</head>
31+
32+
<body>
33+
<div id="app"></div>
34+
<script type="module" src="/src/main.js"></script>
35+
</body>
36+
</html>

jsconfig.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"compilerOptions": {
3+
"baseUrl": ".",
4+
"allowJs": true,
5+
"jsx": "preserve",
6+
"paths": {
7+
"src/*": [
8+
"src/*"
9+
],
10+
"vue$": [
11+
"node_modules/vue/dist/vue.runtime.esm-bundler.js"
12+
]
13+
}
14+
},
15+
"exclude": [
16+
"dist",
17+
"node_modules"
18+
]
19+
}

package.json

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"name": "vue-keyboard-trap",
3+
"version": "0.0.1",
4+
"description": "Vue2 and Vue3 directive for keyboard navigation - roving movement and trapping inside container",
5+
"productName": "Vue Keyboard Trap",
6+
"author": {
7+
"name": "Dan Popescu",
8+
"email": "[email protected]",
9+
"url": "https://github.com/pdanpdan"
10+
},
11+
"funding": {
12+
"type": "github",
13+
"url": "https://github.com/sponsors/pdanpdan"
14+
},
15+
"repository": {
16+
"type": "git",
17+
"url": "git+https://github.com/pdanpdan/vue-keyboard-trap.git"
18+
},
19+
"keywords": [
20+
"vue",
21+
"vue2",
22+
"vue3",
23+
"directive",
24+
"keyboard",
25+
"navigation",
26+
"trap",
27+
"roving",
28+
"a11y",
29+
"accessibility"
30+
],
31+
"license": "MIT",
32+
"bugs": {
33+
"url": "https://github.com/pdanpdan/vue-keyboard-trap/issues"
34+
},
35+
"homepage": "https://pdanpdan.github.io/vue-keyboard-trap",
36+
"main": "./dist/src/index.umd.js",
37+
"module": "./dist/src/index.es.js",
38+
"exports": {
39+
".": {
40+
"require": "./dist/src/index.umd.js",
41+
"import": "./dist/src/index.es.js"
42+
}
43+
},
44+
"typings": "./dist/src/index.d.ts",
45+
"types": "./dist/src/index.d.ts",
46+
"files": [
47+
"dist"
48+
],
49+
"scripts": {
50+
"dev": "vite --config ./vite.dev.config.js",
51+
"dev:build": "vite build --config ./vite.dev.config.js",
52+
"dev:serve": "vite preview",
53+
54+
"docs:dev": "vitepress dev docs",
55+
"docs:build": "vitepress build docs",
56+
"docs:serve": "vitepress serve docs",
57+
"docs:deploy": "./deploy.docs.sh",
58+
59+
"lint": "eslint --ext .js,.vue ./",
60+
"build": "vite build --config ./vite.src.config.js",
61+
"prepublishOnly": "yarn lint && yarn dev:build && yarn build && ./deploy.docs.sh"
62+
},
63+
"peerDependencies": {
64+
"vue": "^3.0.0 || ^2.0.0"
65+
},
66+
"devDependencies": {
67+
"@vitejs/plugin-vue": "^2.3.1",
68+
"eslint": "^8.13.0",
69+
"eslint-config-airbnb-base": "^15.0.0",
70+
"eslint-plugin-import": "^2.26.0",
71+
"eslint-plugin-vue": "^8.6.0",
72+
"sass": "^1.50.0",
73+
"vite": "^2.9.5",
74+
"vitepress": "^0.22.3",
75+
"vue": "^3.2.33"
76+
},
77+
"engines": {
78+
"node": ">= 12.22.0 || >= 14.19.0 || >= 16.14.0",
79+
"yarn": ">= 1.22.0"
80+
}
81+
}

public/favicon.ico

45.4 KB
Binary file not shown.

public/icons/apple-icon-120x120.png

2.24 KB

public/icons/apple-icon-152x152.png

2.77 KB

public/icons/apple-icon-167x167.png

3.2 KB

public/icons/apple-icon-180x180.png

2.99 KB
7.47 KB
100 KB
6.22 KB
6.98 KB
6.42 KB
10.4 KB
9.67 KB
9.34 KB
10.1 KB
11 KB
3.3 KB
4.12 KB

public/icons/favicon-128x128.png

3.03 KB

public/icons/favicon-16x16.png

508 Bytes

public/icons/favicon-32x32.png

978 Bytes

public/icons/favicon-96x96.png

2.19 KB

public/icons/icon-128x128.png

3.03 KB

public/icons/icon-192x192.png

4.72 KB

public/icons/icon-256x256.png

6.59 KB

public/icons/icon-384x384.png

9.77 KB

public/icons/icon-512x512.png

14 KB

public/icons/ms-icon-144x144.png

3.57 KB

public/icons/safari-pinned-tab.svg

+1

0 commit comments

Comments
 (0)