vue3-enter-to-tab 2.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/lib/index.d.ts +3 -3
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
[](https://github.com/l3d00m/vue3-enter-to-tab/actions/workflows/release.yml)
|
|
5
5
|
[](https://github.com/l3d00m/vue3-enter-to-tab/actions/workflows/ci.yml)
|
|
6
6
|
|
|
7
|
-
A Vue 3 composable to convert
|
|
7
|
+
A Vue 3 composable to convert enter key to tab key. Especially useful when inputting forms using a numpad.
|
|
8
8
|
|
|
9
|
-
This is a fork of [ajomuch92/vue-enter-to-tab](https://github.com/ajomuch92/vue-enter-to-tab) and has been converted from a
|
|
9
|
+
This is a fork of [ajomuch92/vue-enter-to-tab](https://github.com/ajomuch92/vue-enter-to-tab) and has been converted from a Mixin to a Vue3 composable. It also features new options.
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
13
|
-
Requires Vue 3.3
|
|
13
|
+
Requires Vue >=3.3 and Node >=18.
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
# npm
|
|
@@ -55,6 +55,7 @@ See documentation below.
|
|
|
55
55
|
import { useEnterToTab } from 'vue3-enter-to-tab'
|
|
56
56
|
import { ref } from 'vue'
|
|
57
57
|
|
|
58
|
+
const form = ref<HTMLElement | null>(null)
|
|
58
59
|
const { vPreventEnterTab, isEnterToTabEnabled } = useEnterToTab(form, {
|
|
59
60
|
autoClickButton: false,
|
|
60
61
|
initialState: false,
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
2
|
export interface UseEnterToTabOptions {
|
|
3
3
|
autoClickButton?: boolean;
|
|
4
4
|
initialState?: boolean;
|
|
@@ -6,8 +6,8 @@ export interface UseEnterToTabOptions {
|
|
|
6
6
|
type HTMLElementWithPrevent = HTMLElement & {
|
|
7
7
|
preventEnterTab?: boolean;
|
|
8
8
|
};
|
|
9
|
-
export declare function useEnterToTab(element:
|
|
10
|
-
isEnterToTabEnabled:
|
|
9
|
+
export declare function useEnterToTab(element: Ref<HTMLElement | null | undefined>, options?: UseEnterToTabOptions): {
|
|
10
|
+
isEnterToTabEnabled: Ref<boolean>;
|
|
11
11
|
vPreventEnterTab: {
|
|
12
12
|
beforeMount: (el: HTMLElementWithPrevent) => boolean;
|
|
13
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue3-enter-to-tab",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"url": "https://github.com/l3d00m"
|
|
23
23
|
},
|
|
24
24
|
"engines": {
|
|
25
|
-
"node": ">=
|
|
25
|
+
"node": ">=18.0"
|
|
26
26
|
},
|
|
27
27
|
"keywords": [],
|
|
28
28
|
"bugs": {
|
|
@@ -30,18 +30,18 @@
|
|
|
30
30
|
},
|
|
31
31
|
"homepage": "https://github.com/l3d00m/vue3-enter-to-tab#readme",
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@semantic-release/commit-analyzer": "11.
|
|
34
|
-
"@semantic-release/release-notes-generator": "12.
|
|
35
|
-
"@types/node": "20.
|
|
36
|
-
"conventional-changelog-conventionalcommits": "
|
|
37
|
-
"prettier": "3.
|
|
38
|
-
"semantic-release": "
|
|
39
|
-
"ts-node": "10.9.
|
|
40
|
-
"typescript": "5.
|
|
33
|
+
"@semantic-release/commit-analyzer": "11.1.0",
|
|
34
|
+
"@semantic-release/release-notes-generator": "12.1.0",
|
|
35
|
+
"@types/node": "20.10.5",
|
|
36
|
+
"conventional-changelog-conventionalcommits": "7.0.2",
|
|
37
|
+
"prettier": "3.1.1",
|
|
38
|
+
"semantic-release": "22.0.12",
|
|
39
|
+
"ts-node": "10.9.2",
|
|
40
|
+
"typescript": "5.3.3"
|
|
41
41
|
},
|
|
42
|
-
"packageManager": "yarn@
|
|
42
|
+
"packageManager": "yarn@4.0.2",
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@vueuse/core": "
|
|
45
|
-
"vue": "
|
|
44
|
+
"@vueuse/core": "^10.7.0",
|
|
45
|
+
"vue": "^3.3.13"
|
|
46
46
|
}
|
|
47
47
|
}
|