Socket
Socket
Sign inDemoInstall

vuejs-toggle-switch

Package Overview
Dependencies
1
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 3.0.0

dist/style.css

58

package.json
{
"name": "vuejs-toggle-switch",
"description": "A toggle switch component for Vue.js",
"version": "2.0.0",
"version": "3.0.0",
"author": "LMH, hejlllars@hotmail.com , softwarefun.no",

@@ -9,17 +9,21 @@ "license": "MIT",

"private": false,
"main": "./dist/ToggleSwitch.common.js",
"type": "module",
"files": [
"dist"
],
"main": "./dist/vuejs-toggle-switch.umd.cjs",
"module": "./dist/vuejs-toggle-switch.js",
"types": "./dist/main.d.ts",
"exports": {
".": {
"import": "./dist/vuejs-toggle-switch.js",
"require": "./dist/vuejs-toggle-switch.umd.js"
},
"./dist/style.css": "./dist/style.css"
},
"scripts": {
"serve": "vue-cli-service serve ./src/main.js",
"build": "vue-cli-service build --target lib --name ToggleSwitch src/components/index.js",
"version": "npm run build && git add -A",
"postversion": "git push -u --follow-tags origin master && npm publish"
"dev": "vite",
"build": "vite build && vue-tsc --emitDeclarationOnly",
"preview": "vite preview"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^5.0.4",
"@vue/cli-service": "^5.0.4",
"node-sass": "7.0.1",
"sass-loader": "^13.0.0",
"vue": "^2.6.14",
"vue-template-compiler": "^2.6.14"
},
"repository": {

@@ -32,19 +36,10 @@ "type": "git",

},
"files": [
"dist/*",
"src/*",
"public/*",
"*.json",
"*.js"
],
"postcss": {
"plugins": {
"autoprefixer": {}
}
"dependencies": {
"vue": "^3.2.47"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
],
"devDependencies": {
"@vitejs/plugin-vue": "^4.1.0",
"sass": "^1.62.1",
"vite": "^4.3.2"
},
"keywords": [

@@ -54,4 +49,5 @@ "vuejs",

"toggle",
"switch"
"switch",
"toggle switch"
]
}
# vuejs-toggle-switch
Toggle switch for vue.js <br>
v2.0.0
v3.0.0

@@ -14,5 +14,2 @@ <img src="https://img.shields.io/badge/license-MIT-green.svg" /> <img src="https://img.shields.io/badge/dependencies-0-brightgreen.svg" /> <img src="https://img.shields.io/badge/bugs-0-red.svg" />

NB! Version 1.2.32 and later use rem instead of px
NM! Version 2.0.0 and later use value prop.
## Setup

@@ -40,3 +37,3 @@ install:

v-model="selectedMapOption" // This is optional 2-way binding (try not to use both 1-way and 2-way)
:value="selectedMapOption" // This is optional 1-way binding (try not to use both 1-way and 2-way)
:modelValue="selectedMapOption" // This is optional 1-way binding (try not to use both 1-way and 2-way)
:name="name" // This is optional for input block

@@ -61,10 +58,9 @@ :group="switchGroup" // This is optional, use if multiple toggle-switch on same page with same label names

size: {
fontSize: 14,
height: 34,
padding: 7,
width: 100
height: 2,
width: 16,
padding: 0.4,
fontSize: 1
},
config: {
delay: .4,
preSelected: 'unknown',
preSelected: 'On',
disabled: false,

@@ -76,3 +72,3 @@ items: [

}
}
},
```

@@ -99,4 +95,3 @@

| items | Array | Off/On | Items for switch, name and value (string) mandatory |
| value | String | n/a | Value, ie: v-model="selectedMapOption" |
| delay | Number | .4 | Transition delay between labels is seconds |
| modelValue | String | n/a | Value, ie: v-model="selectedMapOption" |
| squareCorners | Boolean | false | Rounded corners of switch |

@@ -103,0 +98,0 @@ | noBorder | Boolean | false | Remove border |

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc