Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

a-simple-switch

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

a-simple-switch - npm Package Compare versions

Comparing version 0.8.0 to 0.9.0

release/css/SimpleSwitch.css

23

package.json
{
"name": "a-simple-switch",
"version": "0.8.0",
"version": "0.9.0",
"description": "Vanilla JS/CSS Switch UI element",
"main": "src/javascript/index.js",
"files": [
"release",
"src",
"readme.md"
],
"scripts": {
"test": "medusa",
"test": "karma start --single-run",
"manualTest": "http-server",
"build": "gulp",

@@ -34,11 +40,18 @@ "clean": "gulp clean",

"gulp-sass": "^5.1.0",
"gulp-typescript": "^6.0.0-alpha.1",
"gulp-uglify": "^3.0.2",
"gulp-webpack": "^1.5.0",
"gulp-zip": "^5.1.0",
"medusa-cli": "^0.5.5",
"http-server": "^14.1.1",
"jasmine-core": "^4.5.0",
"karma": "^6.4.1",
"karma-chrome-launcher": "^3.1.1",
"karma-jasmine": "^5.1.0",
"node-sass": "^7.0.1",
"really-simple-args": "^1.1.1",
"webpack": "^2.7.0",
"webpack-stream": "^3.2.0"
"ts-loader": "^9.3.0",
"typescript": "^4.6.4",
"webpack": "^5.72.0",
"webpack-stream": "^7.0.0"
}
}

@@ -13,16 +13,18 @@ # Simple Switch

- Vanilla JS/CSS: doesn't require any outside library to function
- Accessible: works properly with screenreaders and the ARIA spec
- Performant: uses proper layering and transitioning to ensure high performance
- Vanilla JS/CSS: doesn't require any outside library to function
- Accessible: works properly with screenreaders and the ARIA spec
- Performant: uses proper layering and transitioning to ensure high performance
---
- [Installation](#installation)
- [Installing the Javascript](#installing-the-javascript)
- [Installing the CSS](#installing-the-css)
- [Installing the SASS](#installing-the-sass)
- [Creating a Simple Switch](#creating-a-simple-switch)
- [Automatically Creating Switches](#automatically-creating-switches)
- [Manually Creating Switches](#manually-creating-switches)
- [SASS Variables](#sass-variables)
- [Installation](#installation)
- [Installing the Javascript](#installing-the-javascript)
- [Installing the CSS](#installing-the-css)
- [Installing the SASS](#installing-the-sass)
- [Creating a Simple Switch](#creating-a-simple-switch)
- [Automatically Creating Switches](#automatically-creating-switches)
- [Manually Creating Switches](#manually-creating-switches)
- [SASS Variables](#sass-variables)
- [Controlling the switch via JavaScript](#controlling-the-switch-via-javascript)
- [Contributing](#contributing)

@@ -99,2 +101,3 @@ ## Installation

Standard Switch:
```HTML

@@ -105,2 +108,3 @@ <input type="checkbox" name="my-checkbox" data-type="simple-switch" />

Material Switch:
```HTML

@@ -143,2 +147,3 @@ <input type="checkbox" name="my-checkbox" data-type="simple-switch" data-material="true" />

HTML:
```HTML

@@ -149,2 +154,3 @@ <input type="checkbox" name="my-checkbox" id="my-checkbox" />

Javascript:
```Javascript

@@ -177,5 +183,5 @@ let myCheckbox = document.getElementById("my-checkbox");

## Controlling the switch via Javascript
## Controlling the switch via JavaScript
The switch can be toggled via Javascript:
The switch can be toggled via JavaScript:

@@ -193,1 +199,14 @@ ```js

```
## Contributing
Feel free to send pull requests, issues, feature requests, etc. There is no
SLA for responses on this repo, but I trying to respond to issues and PRs in a
timely manner.
When sending PRs please follow the Google TypeScript style guide
([style guide link](https://google.github.io/styleguide/tsguide.html)) and try
to add test coverage where possible.
Most of the codebase and NPM commands (like `npm test`) should work
out-of-the-box, but you will need Chrome installed to run headless tests.
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc