Skip to content

Commit

Permalink
Merge pull request #164 from palcarazm/build/v5
Browse files Browse the repository at this point in the history
prepare 5.1.0
  • Loading branch information
palcarazm committed Apr 22, 2024
2 parents 8cdb49c + 123ca49 commit 1303275
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 31 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![NPM Badge](https://img.shields.io/npm/dm/bootstrap5-toggle?logo=npm)](https://www.npmjs.com/package/bootstrap5-toggle)
[![Build](https://img.shields.io/github/actions/workflow/status/palcarazm/bootstrap5-toggle/build.yml?branch=v5&logo=npm)](https://github.com/palcarazm/bootstrap5-toggle/actions?query=workflow%3A%22Build+Check%22)
[![Test](https://img.shields.io/github/actions/workflow/status/palcarazm/bootstrap5-toggle/cypress.yml?branch=v5&label=tests&logo=cypress)](https://github.com/palcarazm/bootstrap5-toggle/actions?query=workflow%3A%22Cypress+Tests%22)
[![Security](https://img.shields.io/snyk/vulnerabilities/npm/bootstrap5-toggle@5.0.6?logo=snyk)](https://snyk.io/advisor/npm-package/bootstrap5-toggle)
[![Security](https://img.shields.io/snyk/vulnerabilities/npm/bootstrap5-toggle@5.1.0?logo=snyk)](https://snyk.io/advisor/npm-package/bootstrap5-toggle)
[![EOL](https://img.shields.io/endpoint?url=https%3A%2F%2Fpalcarazm.github.io%2Fbootstrap5-toggle%2Fapi%2Feol%2Fv5)](https://github.com/palcarazm/bootstrap5-toggle/security/policy)
[![Funding](https://img.shields.io/badge/sponsor-30363D?style=flat&logo=GitHub-Sponsors&logoColor=#white)](https://github.com/sponsors/palcarazm)
[![Rate this package](https://badges.openbase.com/js/rating/bootstrap5-toggle.svg?token=rNvznTVToo+EmX5g+KTvfYqI9+YTWJeUWTxPj7tLA6o=)](https://openbase.com/js/bootstrap5-toggle?utm_source=embedded&utm_medium=badge&utm_campaign=rating-badge&utm_term=js/bootstrap5-toggle)
Expand Down Expand Up @@ -45,6 +45,7 @@ See EOL for each version in [Security Policy Page](https://github.com/palcarazm/
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Installation](#installation)
- [CDN](#cdn)
- [ECMAS Interface](#ecmas-interface)
Expand Down Expand Up @@ -78,18 +79,18 @@ See EOL for each version in [Security Policy Page](https://github.com/palcarazm/

```html
<link
href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.0.6/css/bootstrap5-toggle.min.css"
href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.1.0/css/bootstrap5-toggle.min.css"
rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.0.6/js/bootstrap5-toggle.ecmas.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.1.0/js/bootstrap5-toggle.ecmas.min.js"></script>
```

### jQuery Interface

```html
<link
href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.0.6/css/bootstrap5-toggle.min.css"
href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.1.0/css/bootstrap5-toggle.min.css"
rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.0.6/js/bootstrap5-toggle.jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@5.1.0/js/bootstrap5-toggle.jquery.min.js"></script>
```

## Download
Expand All @@ -101,13 +102,13 @@ See EOL for each version in [Security Policy Page](https://github.com/palcarazm/
[![NPM Badge](https://img.shields.io/npm/dm/bootstrap5-toggle?logo=npm)](https://www.npmjs.com/package/bootstrap5-toggle)

```ksh
npm install bootstrap5-toggle@5.0.6
npm install bootstrap5-toggle@5.1.0
```

## Yarn

```ksh
yarn add bootstrap5-toggle@5.0.6
yarn add bootstrap5-toggle@5.1.0
```

# Usage
Expand Down
25 changes: 13 additions & 12 deletions README.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,18 +186,19 @@ Methods can be used to control toggles directly.
</script>
```

| Method | Example | Description |
| ------------- | --------------------------------------------- | ------------------------------------------------- |
| initialize | `toggleDemo.bootstrapToggle()` | Initializes the toggle plugin with options |
| destroy | `toggleDemo.bootstrapToggle('destroy')` | Destroys the toggle |
| on | `toggleDemo.bootstrapToggle('on')` | Sets the toggle to 'On' state |
| off | `toggleDemo.bootstrapToggle('off')` | Sets the toggle to 'Off' state |
| toggle | `toggleDemo.bootstrapToggle('toggle')` | Toggles the state of the toggle on/off |
| enable | `toggleDemo.bootstrapToggle('enable')` | Enables the toggle |
| disable | `toggleDemo.bootstrapToggle('disable')` | Disables the toggle |
| readonly | `toggleDemo.bootstrapToggle('readonly')` | Disables the toggle but preserve checkbox enabled |
| indeterminate | `toggleDemo.bootstrapToggle('indeterminate')` | Sets the toggle to 'indeterminate' state |
| determinate | `toggleDemo.bootstrapToggle('determinate')` | Sets the toggle to 'determinate' state |
| Method | Example | Description |
| ------------- | --------------------------------------------- | ------------------------------------------------------------------------------------- |
| initialize | `toggleDemo.bootstrapToggle()` | Initializes the toggle plugin with options |
| destroy | `toggleDemo.bootstrapToggle('destroy')` | Destroys the toggle |
| rerender | `toggleDemo.bootstrapToggle('rerender')` | Rerender toggle with the appropriated size. Useful when parent is collapsed at first. |
| on | `toggleDemo.bootstrapToggle('on')` | Sets the toggle to 'On' state |
| off | `toggleDemo.bootstrapToggle('off')` | Sets the toggle to 'Off' state |
| toggle | `toggleDemo.bootstrapToggle('toggle')` | Toggles the state of the toggle on/off |
| enable | `toggleDemo.bootstrapToggle('enable')` | Enables the toggle |
| disable | `toggleDemo.bootstrapToggle('disable')` | Disables the toggle |
| readonly | `toggleDemo.bootstrapToggle('readonly')` | Disables the toggle but preserve checkbox enabled |
| indeterminate | `toggleDemo.bootstrapToggle('indeterminate')` | Sets the toggle to 'indeterminate' state |
| determinate | `toggleDemo.bootstrapToggle('determinate')` | Sets the toggle to 'determinate' state |

# Events

Expand Down
2 changes: 1 addition & 1 deletion css/bootstrap5-toggle.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Copyright Notice
* bootstrap5-toggle v5.0.6
* bootstrap5-toggle v5.1.0
* https://palcarazm.github.io/bootstrap5-toggle/
* @author 2011-2014 Min Hur (https://github.com/minhur)
* @author 2018-2019 Brent Ely (https://github.com/gitbrent)
Expand Down
2 changes: 1 addition & 1 deletion css/bootstrap5-toggle.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/bootstrap5-toggle.min.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion js/bootstrap5-toggle.ecmas.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Copyright Notice
* bootstrap5-toggle v5.0.6
* bootstrap5-toggle v5.1.0
* https://palcarazm.github.io/bootstrap5-toggle/
* @author 2011-2014 Min Hur (https://github.com/minhur)
* @author 2018-2019 Brent Ely (https://github.com/gitbrent)
Expand All @@ -10,6 +10,7 @@
* @see https://github.com/palcarazm/bootstrap5-toggle/blob/master/LICENSE
*/


"use strict";
function sanitize(text) {
if (!text) return text; // handle null or undefined
Expand Down
4 changes: 2 additions & 2 deletions js/bootstrap5-toggle.ecmas.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/bootstrap5-toggle.ecmas.min.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion js/bootstrap5-toggle.jquery.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Copyright Notice
* bootstrap5-toggle v5.0.6
* bootstrap5-toggle v5.1.0
* https://palcarazm.github.io/bootstrap5-toggle/
* @author 2011-2014 Min Hur (https://github.com/minhur)
* @author 2018-2019 Brent Ely (https://github.com/gitbrent)
Expand All @@ -10,6 +10,7 @@
* @see https://github.com/palcarazm/bootstrap5-toggle/blob/master/LICENSE
*/


"use strict";
function sanitize(text) {
if (!text) return text; // handle null or undefined
Expand Down
4 changes: 2 additions & 2 deletions js/bootstrap5-toggle.jquery.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 1303275

Please sign in to comment.