Skip to content
This repository was archived by the owner on Oct 5, 2022. It is now read-only.

Commit 5b6dd62

Browse files
authored
Accessibility (#22)
1 parent ed1344e commit 5b6dd62

22 files changed

+1421
-1390
lines changed

.editorconfig

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ indent_size = 4
99
trim_trailing_whitespace = true
1010

1111
[*.md]
12-
trim_trailing_whitespace = false
12+
trim_trailing_whitespace = false
13+
14+
[*.scss]
15+
insert_final_newline = false

CHANGELOG.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
All notable changes to this project will be documented here.
44

5+
<a name="4.0.0"></a>
6+
## [4.0.0](https://github.com/rawilk/vue-context/releases/tag/4.0.0)
7+
8+
Released 2019-05-18
9+
10+
### Added 4.0.0
11+
- Added support for keyboard navigation (up and down arrows).
12+
- Added ability to close menu on esc.
13+
- Added `lazy` prop as an alternative to `v-show`.
14+
- Added `tag` prop to specify menu tag (defaults to `<ul>`).
15+
16+
### Changes 4.0.0
17+
- Default menu tag is now `<ul>` and menu is now the top-level element.
18+
- Changed how the menu is styled.
19+
20+
### Updates 4.0.0
21+
- Updated build process and project structure.
22+
- Ran `npm audit fix` to fix vulnerabilities found from dependencies.
23+
524
<a name="3.4.2"></a>
625
## [3.4.2](https://github.com/rawilk/vue-context/releases/tag/3.4.2)
726

@@ -117,4 +136,4 @@ Released 2017-08-18
117136

118137
Released 2017-08-17
119138

120-
- Initial release
139+
- Initial release

CONTRIBUTING.md

-1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,5 @@ Please follow these coding conventions when contributing to the project.
8585
hash arrows.
8686
- I leave an empty line between code and return statements.
8787
- I ALWAYS put spaces between properties in an object (`{ VueContext }`, not `{VueContext}`).
88-
- I always a function declaration and its parameters (`methodName ()`, not `methodName()`).
8988
- I always use single quotes over double quotes, unless it makes sense to use double quotes. If that's the case, I usually prefer to
9089
use template strings instead of double quotes (`` `${variable} some text that has a single quote ' in it` `` instead of `variable + " some text that has a single quote ' in it"`).

README.md

+8-10
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,12 @@
77
[![VueJS version](https://img.shields.io/badge/vue.js-2.x-green.svg?style=for-the-badge)](https://vuejs.org)
88

99
`vue-context` provides a simple yet flexible context menu for Vue. It is styled for the standard `<ul>` tag, but any menu template can be used.
10-
The menu is lightweight with its only dependency being `vue-clickaway`. The menu has some basic styles applied to it but they can be easily
10+
The menu is lightweight with its only dependencies being `vue-clickaway` and `core-js`. The menu has some basic styles applied to it but they can be easily
1111
overridden by your own styles.
1212
<br><br>
1313
The menu disappears when you expect by utilizing `vue-clickaway` and it also optionally disappears when clicked on.
1414

15-
![Screenshot](screenshot.png)
16-
17-
## Note
18-
The API has changed since the last major release. Check [v2 documentation](https://vue-context.com/docs/2.0/overview)
19-
if you use the old version.
15+
![Screenshot](screenshot.jpg)
2016

2117
## Getting Started
2218

@@ -63,10 +59,12 @@ Next add an element to the page that will trigger the context menu to appear, an
6359
</div>
6460

6561
<vue-context ref="menu">
66-
<ul>
67-
<li @click="onClick($event.target.innerText)">Option 1</li>
68-
<li @click="onClick($event.target.innerText)">Option 2</li>
69-
</ul>
62+
<li>
63+
<a href="#" @click.prevent="onClick($event.target.innerText)">Option 1</a>
64+
</li>
65+
<li>
66+
<a href="#" @click.prevent="onClick($event.target.innerText)">Option 2</a>
67+
</li>
7068
</vue-context>
7169

7270
</div>

build/webpack.mix.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ const inProduction = mix.inProduction();
44

55
mix
66
.setPublicPath('dist')
7-
.js('src/index.js', 'vue-context.js')
7+
.js('src/js/index.js', 'js/vue-context.js')
88
.sourceMaps(! inProduction)
99
.webpackConfig({
1010
output: {
1111
libraryTarget: 'umd',
1212
umdNamedDefine: true
1313
}
14-
});
14+
});

dist/js/vue-context.js

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

dist/vue-context.js

-1
This file was deleted.

0 commit comments

Comments
 (0)