vue-toggles 1.1.4 → 2.0.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 CHANGED
@@ -1,115 +1,99 @@
1
- <h1 align="center">Vue Toggles</h1>
2
- <p align="center">
3
- A highly customizable and accessible toggle.
4
- Now with SSR support!
5
- </p>
6
-
7
- <p align="center">
8
- <a href="https://www.npmjs.com/package/vue-toggles"><img src="https://img.shields.io/npm/v/vue-toggles.svg?style=flat-square"/> <img src="https://img.shields.io/npm/dt/vue-toggles.svg?style=flat-square"/></a> <a href="https://vuejs.org/"><img src="https://img.shields.io/badge/vue-2.x-brightgreen.svg?style=flat-square"/></a>
9
- </p>
10
-
11
- <p align="center">
12
- <img src="./vue-toggles.jpg" alt="Vue Toggles Logo"/>
13
- </p>
14
-
15
- ## Demo
16
-
17
- - [Demo](https://vue-toggles.netlify.app/)
18
- - [CodeSandbox](https://codesandbox.io/s/vue-toggles-mkkp4?file=/src/App.vue)
19
-
20
- ## Introduction
21
-
22
- Vue Toggles comes out of the box with accessibility support for:
23
-
24
- - `aria-checked` depending on state
25
- - `aria-readonly` if the toggle is disabled
26
- - `prefers-reduced-motion` if the user has requested any type of motion reduction [[prefers-reduced-motion](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion)]
27
-
28
- ### Accessibility
29
-
30
- What's left for you, when it comes to accessibility, is labeling the toggle correctly. This is either done by:
31
-
32
- - A `<label for="example-id">Toggle description</label>` followed by the toggle component `<VueToggles id="example-id" />`
33
- - An `aria-label`, for example `<VueToggles aria-label="Toggle description" />`. Remember, you still need a visual text description of what the toggle does
34
-
35
- The `focus`-style is also left up to you — which is recommended you don't remove. If you think the default is ugly, style it yourself!
36
-
37
- ## Installation
38
-
39
- ```
40
- npm i vue-toggles
41
- ```
42
-
43
- ### Import
44
-
45
- ```javascript
46
- import Vue from 'vue';
47
- import VueToggles from 'vue-toggles';
48
-
49
- Vue.component('VueToggles', VueToggles);
50
- ```
51
-
52
- ### SSR import (Nuxt for example)
53
-
54
- ```javascript
55
- import Vue from 'vue';
56
- import VueToggles from 'vue-toggles/dist/vue-toggles.ssr';
57
- import 'vue-toggles/dist/vue-toggles.ssr.css';
58
-
59
- Vue.component('VueToggles', VueToggles);
60
- ```
61
-
62
- ## Usage
63
-
64
- The toggle is very easy to use out of the box. The bare minimum for it to work is a `@click`-function and a `:value`-prop.
65
-
66
- ```html
67
- <VueToggles :value="value" @click="value = !value" />
68
- ```
69
-
70
- ## Options
71
-
72
- You can also add more props to customize things like color and width/height.
73
-
74
- ```html
75
- <VueToggles
76
- height="30"
77
- width="90"
78
- checkedText="On"
79
- uncheckedText="Off"
80
- checkedBg="#b4d455"
81
- uncheckedBg="lightgrey"
82
- :value="value"
83
- @click="value = !value"
84
- />
85
- ```
86
-
87
- ## Properties
88
-
89
- | Name | Type | Default | Description |
90
- | -------------- | ---------------- | --------- | ------------------------------------------------- |
91
- | value | Boolean | `false` | Initial state of the toggle button |
92
- | disabled | Boolean | `false` | Toggle does not react on mouse or keyboard events |
93
- | reverse | Boolean | `false` | Reverse toggle to Right to Left |
94
- | height | [String, Number] | `25` | Height of the toggle in `px` |
95
- | width | [String, Number] | `75` | Width of the toggle in `px` |
96
- | checkedText | String | `null` | Optional text when the toggle is checked |
97
- | uncheckedText | String | `null` | Optional text when the toggle is unchecked |
98
- | checkedBg | String | `#5850ec` | Background color when the toggle is checked |
99
- | uncheckedBg | String | `#939393` | Background color when the toggle is unchecked |
100
- | checkedColor | String | `#ffffff` | Text color when the toggle is checked |
101
- | uncheckedColor | String | `#ffffff` | Text color when the toggle is unchecked |
102
- | dotColor | String | `#ffffff` | Color of the toggle dot |
103
- | fontSize | [String, Number] | `12` | Font size in `px` |
104
- | fontWeight | [Number, String] | `normal` | Font weight |
105
-
106
- ### Browser compatibility
107
-
108
- - Chrome: 40+
109
- - Firefox: 25+
110
- - Safari: 10+
111
- - IE: 11+
112
-
113
- ### License
114
-
115
- [MIT](http://opensource.org/licenses/MIT)
1
+ <h1 align="center">Vue Toggles</h1>
2
+ <p align="center">
3
+ A highly customizable and accessible toggle component for Vue 3.
4
+ </p>
5
+
6
+ <p align="center">
7
+ <a href="https://www.npmjs.com/package/vue-toggles"><img src="https://img.shields.io/npm/v/vue-toggles.svg?style=flat-square"/> <img src="https://img.shields.io/npm/dt/vue-toggles.svg?style=flat-square"/></a> <a href="https://vuejs.org/"><img src="https://img.shields.io/badge/vue-3.x-brightgreen.svg?style=flat-square"/></a>
8
+ </p>
9
+
10
+ <p align="center">
11
+ <img src="./public/vue-toggles.jpg" alt="Vue Toggles Logo"/>
12
+ </p>
13
+
14
+ ## Introduction
15
+
16
+ Vue Toggles comes out of the box with accessibility support for:
17
+
18
+ - `aria-checked` depending on state
19
+ - `aria-readonly` if the toggle is disabled
20
+ - `prefers-reduced-motion` if the user has requested any type of motion reduction [[prefers-reduced-motion](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion)]
21
+
22
+ ### Accessibility
23
+
24
+ What's left for you, when it comes to accessibility, is labeling the toggle correctly. This is either done by:
25
+
26
+ - A `<label for="example-id">Toggle description</label>` followed by the toggle component `<VueToggles id="example-id" />`
27
+ - Or an `aria-label`, for example `<VueToggles aria-label="Toggle description" />`. Remember, you still need a visual text description of what the toggle does
28
+
29
+ The `focus`-style is also left up to you — which you shouldn't remove. If you think the default is ugly, style it yourself!
30
+
31
+ ## Installation
32
+
33
+ ```
34
+ npm i vue-toggles
35
+ ```
36
+
37
+ ### Import component
38
+
39
+ ```javascript
40
+ import { VueToggles } from "vue-toggles";
41
+ ```
42
+
43
+ ### Import types
44
+
45
+ ```javascript
46
+ import { type VueTogglesProps } from "vue-toggles";
47
+ ```
48
+
49
+ ## Usage
50
+
51
+ The toggle is very easy to use out of the box. The bare minimum for it to work is a `@click`-function and a `:value`-prop.
52
+
53
+ ```html
54
+ <VueToggles :value="example" @click="example = !example" />
55
+ ```
56
+
57
+ ## Options
58
+
59
+ You can also add more props to customize things like color and width/height.
60
+
61
+ ```html
62
+ <VueToggles
63
+ :value="value"
64
+ height="30"
65
+ width="90"
66
+ checkedText="On"
67
+ uncheckedText="Off"
68
+ checkedBg="#b4d455"
69
+ uncheckedBg="lightgrey"
70
+ @click="value = !value"
71
+ />
72
+ ```
73
+
74
+ ## Properties
75
+
76
+ | Name | Type | Default | Description |
77
+ | ------------------ | ---------------- | --------- | ------------------------------------------------- |
78
+ | value | Boolean | `false` | Initial state of the toggle button |
79
+ | disabled | Boolean | `false` | Toggle does not react on mouse or keyboard events |
80
+ | reverse | Boolean | `false` | Reverse toggle to Right to Left |
81
+ | height | [String, Number] | `25` | Height of the toggle in `px` |
82
+ | width | [String, Number] | `75` | Width of the toggle in `px` |
83
+ | dotColor | String | `#ffffff` | Color of the toggle dot |
84
+ | uncheckedBg | String | `#939393` | Background color when the toggle is unchecked |
85
+ | checkedBg | String | `#5850ec` | Background color when the toggle is checked |
86
+ | uncheckedTextColor | String | `#ffffff` | Text color when the toggle is unchecked |
87
+ | checkedTextColor | String | `#ffffff` | Text color when the toggle is checked |
88
+ | uncheckedText | String | `""` | Optional text when the toggle is unchecked |
89
+ | checkedText | String | `""` | Optional text when the toggle is checked |
90
+ | fontSize | String | `12` | Font size in `px` |
91
+ | fontWeight | String | `normal` | Font weight |
92
+
93
+ ## Vue 2 support
94
+
95
+ If you're looking for the Vue 2 version, it's available [here](https://www.npmjs.com/package/vue-toggles/v/1.1.4).
96
+
97
+ ## License
98
+
99
+ [MIT](http://opensource.org/licenses/MIT)
@@ -0,0 +1,128 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ value: {
3
+ type: import("vue").PropType<boolean>;
4
+ required: true;
5
+ };
6
+ disabled: {
7
+ type: import("vue").PropType<boolean>;
8
+ };
9
+ reverse: {
10
+ type: import("vue").PropType<boolean>;
11
+ };
12
+ width: {
13
+ type: import("vue").PropType<number>;
14
+ default: number;
15
+ };
16
+ height: {
17
+ type: import("vue").PropType<number>;
18
+ default: number;
19
+ };
20
+ dotColor: {
21
+ type: import("vue").PropType<string>;
22
+ default: string;
23
+ };
24
+ uncheckedBg: {
25
+ type: import("vue").PropType<string>;
26
+ default: string;
27
+ };
28
+ checkedBg: {
29
+ type: import("vue").PropType<string>;
30
+ default: string;
31
+ };
32
+ uncheckedTextColor: {
33
+ type: import("vue").PropType<string>;
34
+ default: string;
35
+ };
36
+ checkedTextColor: {
37
+ type: import("vue").PropType<string>;
38
+ default: string;
39
+ };
40
+ uncheckedText: {
41
+ type: import("vue").PropType<string>;
42
+ default: string;
43
+ };
44
+ checkedText: {
45
+ type: import("vue").PropType<string>;
46
+ default: string;
47
+ };
48
+ fontSize: {
49
+ type: import("vue").PropType<number>;
50
+ default: number;
51
+ };
52
+ fontWeight: {
53
+ type: import("vue").PropType<string>;
54
+ default: string;
55
+ };
56
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
57
+ click: (args_0: void) => void;
58
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
59
+ value: {
60
+ type: import("vue").PropType<boolean>;
61
+ required: true;
62
+ };
63
+ disabled: {
64
+ type: import("vue").PropType<boolean>;
65
+ };
66
+ reverse: {
67
+ type: import("vue").PropType<boolean>;
68
+ };
69
+ width: {
70
+ type: import("vue").PropType<number>;
71
+ default: number;
72
+ };
73
+ height: {
74
+ type: import("vue").PropType<number>;
75
+ default: number;
76
+ };
77
+ dotColor: {
78
+ type: import("vue").PropType<string>;
79
+ default: string;
80
+ };
81
+ uncheckedBg: {
82
+ type: import("vue").PropType<string>;
83
+ default: string;
84
+ };
85
+ checkedBg: {
86
+ type: import("vue").PropType<string>;
87
+ default: string;
88
+ };
89
+ uncheckedTextColor: {
90
+ type: import("vue").PropType<string>;
91
+ default: string;
92
+ };
93
+ checkedTextColor: {
94
+ type: import("vue").PropType<string>;
95
+ default: string;
96
+ };
97
+ uncheckedText: {
98
+ type: import("vue").PropType<string>;
99
+ default: string;
100
+ };
101
+ checkedText: {
102
+ type: import("vue").PropType<string>;
103
+ default: string;
104
+ };
105
+ fontSize: {
106
+ type: import("vue").PropType<number>;
107
+ default: number;
108
+ };
109
+ fontWeight: {
110
+ type: import("vue").PropType<string>;
111
+ default: string;
112
+ };
113
+ }>> & {
114
+ onClick?: ((args_0?: void | undefined) => any) | undefined;
115
+ }, {
116
+ width: number;
117
+ height: number;
118
+ dotColor: string;
119
+ uncheckedBg: string;
120
+ checkedBg: string;
121
+ uncheckedTextColor: string;
122
+ checkedTextColor: string;
123
+ uncheckedText: string;
124
+ checkedText: string;
125
+ fontSize: number;
126
+ fontWeight: string;
127
+ }, {}>;
128
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { type VueTogglesProps } from "./types";
2
+ export { default as VueToggles } from "./components/VueToggles.vue";
@@ -0,0 +1,81 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".vue-toggles{display:flex;align-items:center;border-radius:9999px;overflow:hidden;transition:background-color ease .2s,width ease .2s,height ease .2s}.vue-toggles__dot{position:relative;display:flex;align-items:center;border-radius:9999px;box-shadow:0 1px 3px #0000001a,0 1px 2px #0000000f;transition:margin ease .2s}.vue-toggles__text{position:absolute;font-family:inherit;-webkit-user-select:none;user-select:none;white-space:nowrap}@media (prefers-reduced-motion){.vue-toggles,.vue-toggles *,.vue-toggles *:before,.vue-toggles *:after{animation:none!important;transition:none!important;transition-duration:none!important}}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ import { defineComponent as g, computed as i, openBlock as o, createElementBlock as h, normalizeStyle as a, withKeys as d, withModifiers as s, createElementVNode as p, toDisplayString as x, createCommentVNode as v } from "vue";
3
+ const k = ["aria-checked", "aria-disabled", "aria-readonly", "onKeyup"], $ = /* @__PURE__ */ g({
4
+ __name: "VueToggles",
5
+ props: {
6
+ value: { type: Boolean },
7
+ disabled: { type: Boolean },
8
+ reverse: { type: Boolean },
9
+ width: { default: 75 },
10
+ height: { default: 25 },
11
+ dotColor: { default: "#ffffff" },
12
+ uncheckedBg: { default: "#939393" },
13
+ checkedBg: { default: "#5850ec" },
14
+ uncheckedTextColor: { default: "#ffffff" },
15
+ checkedTextColor: { default: "#ffffff" },
16
+ uncheckedText: { default: "" },
17
+ checkedText: { default: "" },
18
+ fontSize: { default: 12 },
19
+ fontWeight: { default: "normal" }
20
+ },
21
+ emits: ["click"],
22
+ setup(n, { emit: r }) {
23
+ const e = n, c = i(() => ({
24
+ width: `${e.width}px`,
25
+ height: `${e.height}px`,
26
+ background: e.value ? e.checkedBg : e.uncheckedBg,
27
+ opacity: e.disabled ? "0.5" : "1",
28
+ cursor: e.disabled ? "not-allowed" : "pointer"
29
+ })), u = i(() => {
30
+ const t = {
31
+ background: e.dotColor,
32
+ width: `${e.height - 8}px`,
33
+ height: `${e.height - 8}px`,
34
+ "min-width": `${e.height - 8}px`,
35
+ "min-height": `${e.height - 8}px`,
36
+ "margin-left": e.value ? `${e.width - (e.height - 3)}px` : "5px"
37
+ };
38
+ return e.value ? e.reverse ? t["margin-left"] = "5px" : t["margin-left"] = `${e.width - (e.height - 3)}px` : e.reverse ? t["margin-left"] = `${e.width - (e.height - 3)}px` : t["margin-left"] = "5px", t;
39
+ }), f = i(() => {
40
+ const t = {
41
+ "font-weight": e.fontWeight,
42
+ "font-size": `${e.fontSize}px`,
43
+ color: e.value && !e.disabled ? e.checkedTextColor : e.uncheckedTextColor,
44
+ right: e.value ? `${e.height - 3}px` : "auto",
45
+ left: e.value ? "auto" : `${e.height - 3}px`
46
+ };
47
+ return e.value ? e.reverse ? (t.left = `${e.height - 3}px`, t.right = "auto") : (t.right = `${e.height - 3}px`, t.left = "auto") : e.reverse ? (t.right = `${e.height - 3}px`, t.left = "auto") : (t.left = `${e.height - 3}px`, t.right = "auto"), t;
48
+ }), l = () => {
49
+ e.disabled || r("click");
50
+ };
51
+ return (t, y) => (o(), h("span", {
52
+ class: "vue-toggles",
53
+ style: a(c.value),
54
+ role: "switch",
55
+ tabindex: "0",
56
+ "aria-checked": t.value,
57
+ "aria-disabled": t.disabled,
58
+ "aria-readonly": t.disabled,
59
+ onKeyup: [
60
+ d(s(l, ["prevent"]), ["enter"]),
61
+ d(s(l, ["prevent"]), ["space"])
62
+ ],
63
+ onClick: l
64
+ }, [
65
+ p("span", {
66
+ "aria-hidden": "true",
67
+ style: a(u.value),
68
+ class: "vue-toggles__dot"
69
+ }, [
70
+ t.checkedText || t.uncheckedText ? (o(), h("span", {
71
+ key: 0,
72
+ class: "vue-toggles__text",
73
+ style: a(f.value)
74
+ }, x(t.value ? t.checkedText : t.uncheckedText), 5)) : v("", !0)
75
+ ], 4)
76
+ ], 44, k));
77
+ }
78
+ });
79
+ export {
80
+ $ as VueToggles
81
+ };
@@ -0,0 +1,2 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".vue-toggles{display:flex;align-items:center;border-radius:9999px;overflow:hidden;transition:background-color ease .2s,width ease .2s,height ease .2s}.vue-toggles__dot{position:relative;display:flex;align-items:center;border-radius:9999px;box-shadow:0 1px 3px #0000001a,0 1px 2px #0000000f;transition:margin ease .2s}.vue-toggles__text{position:absolute;font-family:inherit;-webkit-user-select:none;user-select:none;white-space:nowrap}@media (prefers-reduced-motion){.vue-toggles,.vue-toggles *,.vue-toggles *:before,.vue-toggles *:after{animation:none!important;transition:none!important;transition-duration:none!important}}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ (function(l,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(l=typeof globalThis<"u"?globalThis:l||self,i(l.VueToggles={},l.Vue))})(this,function(l,i){"use strict";const n=["aria-checked","aria-disabled","aria-readonly","onKeyup"],a=i.defineComponent({__name:"VueToggles",props:{value:{type:Boolean},disabled:{type:Boolean},reverse:{type:Boolean},width:{default:75},height:{default:25},dotColor:{default:"#ffffff"},uncheckedBg:{default:"#939393"},checkedBg:{default:"#5850ec"},uncheckedTextColor:{default:"#ffffff"},checkedTextColor:{default:"#ffffff"},uncheckedText:{default:""},checkedText:{default:""},fontSize:{default:12},fontWeight:{default:"normal"}},emits:["click"],setup(d,{emit:s}){const e=d,h=i.computed(()=>({width:`${e.width}px`,height:`${e.height}px`,background:e.value?e.checkedBg:e.uncheckedBg,opacity:e.disabled?"0.5":"1",cursor:e.disabled?"not-allowed":"pointer"})),r=i.computed(()=>{const t={background:e.dotColor,width:`${e.height-8}px`,height:`${e.height-8}px`,"min-width":`${e.height-8}px`,"min-height":`${e.height-8}px`,"margin-left":e.value?`${e.width-(e.height-3)}px`:"5px"};return e.value?e.reverse?t["margin-left"]="5px":t["margin-left"]=`${e.width-(e.height-3)}px`:e.reverse?t["margin-left"]=`${e.width-(e.height-3)}px`:t["margin-left"]="5px",t}),c=i.computed(()=>{const t={"font-weight":e.fontWeight,"font-size":`${e.fontSize}px`,color:e.value&&!e.disabled?e.checkedTextColor:e.uncheckedTextColor,right:e.value?`${e.height-3}px`:"auto",left:e.value?"auto":`${e.height-3}px`};return e.value?e.reverse?(t.left=`${e.height-3}px`,t.right="auto"):(t.right=`${e.height-3}px`,t.left="auto"):e.reverse?(t.right=`${e.height-3}px`,t.left="auto"):(t.left=`${e.height-3}px`,t.right="auto"),t}),o=()=>{e.disabled||s("click")};return(t,u)=>(i.openBlock(),i.createElementBlock("span",{class:"vue-toggles",style:i.normalizeStyle(h.value),role:"switch",tabindex:"0","aria-checked":t.value,"aria-disabled":t.disabled,"aria-readonly":t.disabled,onKeyup:[i.withKeys(i.withModifiers(o,["prevent"]),["enter"]),i.withKeys(i.withModifiers(o,["prevent"]),["space"])],onClick:o},[i.createElementVNode("span",{"aria-hidden":"true",style:i.normalizeStyle(r.value),class:"vue-toggles__dot"},[t.checkedText||t.uncheckedText?(i.openBlock(),i.createElementBlock("span",{key:0,class:"vue-toggles__text",style:i.normalizeStyle(c.value)},i.toDisplayString(t.value?t.checkedText:t.uncheckedText),5)):i.createCommentVNode("",!0)],4)],44,n))}}),f="";l.VueToggles=a,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,70 +1,65 @@
1
- {
2
- "name": "vue-toggles",
3
- "version": "1.1.4",
4
- "author": "Julian Lagerberg <juliandreas@fastmail.com>",
5
- "private": false,
6
- "license": "MIT",
7
- "homepage": "https://vue-toggles.netlify.app/",
8
- "bugs": {
9
- "url": "https://github.com/juliandreas/vue-toggles"
10
- },
11
- "repository": {
12
- "type": "git",
13
- "url": "git+https://github.com/juliandreas/vue-toggles.git"
14
- },
15
- "main": "dist/vue-toggles.esm.js",
16
- "style": "dist/vue-toggles.ssr.css",
17
- "types": "src/index.d.ts",
18
- "files": [
19
- "dist",
20
- "src"
21
- ],
22
- "scripts": {
23
- "serve": "vue-cli-service serve",
24
- "lint": "vue-cli-service lint",
25
- "build": "rollup -c",
26
- "demo": "vue-cli-service build",
27
- "deploy": "npm run build & npm publish",
28
- "beta": "npm run build & npm publish --tag beta"
29
- },
30
- "peerDependencies": {
31
- "vue": "^2.6.11"
32
- },
33
- "devDependencies": {
34
- "@rollup/plugin-buble": "^0.21.3",
35
- "@rollup/plugin-commonjs": "^13.0.2",
36
- "@vue/cli-plugin-babel": "^4.5.3",
37
- "@vue/cli-plugin-eslint": "^4.5.3",
38
- "@vue/cli-service": "^4.5.3",
39
- "@vue/eslint-config-prettier": "^6.0.0",
40
- "babel-eslint": "^10.1.0",
41
- "core-js": "^3.6.4",
42
- "eslint": "^7.7.0",
43
- "eslint-plugin-prettier": "^3.1.4",
44
- "eslint-plugin-vue": "^6.2.2",
45
- "node-sass": "^4.12.0",
46
- "prettier": "^2.0.5",
47
- "rollup": "^2.26.3",
48
- "rollup-plugin-css-only": "^2.1.0",
49
- "rollup-plugin-filesize": "^9.0.2",
50
- "rollup-plugin-vue": "^5.1.9",
51
- "sass-loader": "^9.0.3",
52
- "vue": "^2.6.11",
53
- "vue-template-compiler": "^2.6.11"
54
- },
55
- "keywords": [
56
- "vue",
57
- "vuejs",
58
- "vue.js",
59
- "vue2",
60
- "toggle",
61
- "toggles",
62
- "checkbox",
63
- "switch",
64
- "library",
65
- "component library",
66
- "accessibility",
67
- "accessible",
68
- "a11y"
69
- ]
70
- }
1
+ {
2
+ "name": "vue-toggles",
3
+ "version": "2.0.0",
4
+ "description": "A highly customizable and accessible toggle component for Vue.js 3",
5
+ "homepage": "https://github.com/juliandreas/vue-toggles#readme",
6
+ "bugs": {
7
+ "url": "https://github.com/juliandreas/vue-toggles/issues"
8
+ },
9
+ "private": false,
10
+ "license": "MIT",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/juliandreas/vue-toggles.git"
14
+ },
15
+ "type": "module",
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "main": "./dist/vue-toggles.umd.cjs",
20
+ "module": "./dist/vue-toggles.js",
21
+ "types": "./dist/index.d.ts",
22
+ "exports": {
23
+ ".": {
24
+ "import": "./dist/vue-toggles.js",
25
+ "require": "./dist/vue-toggles.umd.js"
26
+ }
27
+ },
28
+ "scripts": {
29
+ "dev": "vite",
30
+ "build": "vite build && vue-tsc --emitDeclarationOnly",
31
+ "preview": "vite preview",
32
+ "test:unit": "vitest",
33
+ "deploy": "npm run build && npm publish",
34
+ "beta": "npm run build && npm publish --tag beta"
35
+ },
36
+ "peerDependencies": {
37
+ "vue": "^3.3.4"
38
+ },
39
+ "devDependencies": {
40
+ "@types/node": "^20.5.6",
41
+ "@vitejs/plugin-vue": "^4.3.1",
42
+ "@vue/eslint-config-typescript": "^11.0.3",
43
+ "@vue/test-utils": "^2.4.1",
44
+ "eslint": "^8.46.0",
45
+ "eslint-plugin-vue": "^9.16.1",
46
+ "typescript": "^5.2.2",
47
+ "vite": "^4.4.9",
48
+ "vite-plugin-css-injected-by-js": "^3.3.0",
49
+ "vitest": "^0.34.2",
50
+ "vue-tsc": "^1.8.8"
51
+ },
52
+ "keywords": [
53
+ "vue",
54
+ "vuejs",
55
+ "vue.js",
56
+ "vue3",
57
+ "toggle",
58
+ "checkbox",
59
+ "switch",
60
+ "library",
61
+ "component library",
62
+ "accessibility",
63
+ "a11y"
64
+ ]
65
+ }