bootstrap5-toggle 4.0.0 → 4.2.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/CHANGELOG.md ADDED
@@ -0,0 +1,89 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## Unreleased
8
+
9
+ ## [4.1.0](https://github.com/palcaraz/bootstrap5-toggle/tree/v4.1.0) 2022-06-30
10
+ ### [Full Changelog](https://github.com/palcaraz/bootstrap4-toggle/compare/v4.0.0...v4.1.0)
11
+ ### Added
12
+ - feat: support for npm and yarn
13
+
14
+ ## [4.0.0](https://github.com/palcaraz/bootstrap5-toggle/tree/v4.0.0) 2022-06-30
15
+ ### [Full Changelog](https://github.com/palcaraz/bootstrap4-toggle/compare/v3.6.0...v4.0.0)
16
+ ### Added
17
+ - feat: support for Boostrap 5
18
+
19
+ ## [3.6.0](https://github.com/gitbrent/bootstrap4-toggle/tree/v3.6.0) 2019-10-17
20
+ ### [Full Changelog](https://github.com/gitbrent/bootstrap4-toggle/compare/v3.5.0...v3.6.0)
21
+ ### Added
22
+ - Added option to change toggle without triggering onChange event (silent toggle) [\#7](https://github.com/gitbrent/bootstrap4-toggle/issue/7) ([aswin1980](https://github.com/aswin1980))
23
+ - Added accessibility properties to labels [\#11](https://github.com/gitbrent/bootstrap4-toggle/issue/11) ([aproquot](https://github.com/aproquot))
24
+ ### Changed
25
+ - Fixed URLs in js and css file top comment [\#5](https://github.com/gitbrent/bootstrap4-toggle/issue/5) ([wilecoyte78](https://github.com/wilecoyte78))
26
+ - Disable style is not working [\#18](https://github.com/gitbrent/bootstrap4-toggle/issue/18) ([rychlym](https://github.com/rychlym))
27
+
28
+ ## [3.5.0](https://github.com/gitbrent/bootstrap4-toggle/tree/v3.5.0) 2019-07-02
29
+ ### [Full Changelog](https://github.com/gitbrent/bootstrap4-toggle/compare/v3.4.0...v3.5.0)
30
+ ### Added
31
+ - Added ARIA `role="button"` tag to toggle
32
+ - Added `cursor: pointer;` style to toggle
33
+ ### Changed
34
+ - Fixed: Touch not working on mobile [\#2](https://github.com/gitbrent/bootstrap4-toggle/issue/2) ([wilecoyte78](https://github.com/wilecoyte78))
35
+ - Updated to Bootstrap version 4.3.1
36
+ - Updated README with better Yarn instructions
37
+
38
+ ## [3.4.0](https://github.com/gitbrent/bootstrap4-toggle/tree/v3.4.0) 2019-01-03
39
+ ### [Full Changelog](https://github.com/gitbrent/bootstrap4-toggle/compare/v3.3.0...v3.4.0)
40
+ ### Added
41
+ - Outline button styles are now available
42
+ ### Changed
43
+ - Updated to Bootstrap version 4.2.1
44
+
45
+ ## [3.3.0](https://github.com/gitbrent/bootstrap4-toggle/tree/v3.3.0) 2018-12-19
46
+ ### [Full Changelog](https://github.com/gitbrent/bootstrap4-toggle/compare/v3.2.0...v3.3.0)
47
+ ### Added
48
+ - New test created to compare core bootstrap sizes to bootstrap4-toggle
49
+ ### Changed
50
+ - Introduced new `size` values that mirror bootstrap 4: (`lg`, `sm`, `xs`)
51
+ - Converted all css units from `px` to `rem`
52
+ - Properly added border on `light` button (moved from .toggle class)
53
+ ### Removed
54
+ **DEPRECATED** Classic `size` values (`large`, `small`, `mini`)
55
+
56
+
57
+ ## [3.2.0](https://github.com/gitbrent/bootstrap4-toggle/tree/v3.2.0) 2018-11-27
58
+ ### [Full Changelog](https://github.com/gitbrent/bootstrap4-toggle/compare/v3.1.0...v3.2.0)
59
+ ### Added
60
+ ### Changed
61
+ - Removed permanent `active` state from "Off" label so mouse-over highlighting works the same as "On"
62
+ ### Removed
63
+
64
+
65
+
66
+ ## [3.1.0](https://github.com/gitbrent/bootstrap4-toggle/tree/v3.1.0) 2018-10-25
67
+ ### [Full Changelog](https://github.com/gitbrent/bootstrap4-toggle/compare/v3.0.0...v3.1.0)
68
+ ### Added
69
+ - `index.html` includes new section with dark mode colors
70
+ ### Changed
71
+ - `index.html` now fully responsive, better menu, rearranged sections
72
+ - Tweaked `border` property to work with all backgrounds and colors
73
+ ### Removed
74
+
75
+
76
+
77
+ ## [3.0.0](https://github.com/gitbrent/bootstrap4-toggle/tree/v3.0.0) 2018-10-21
78
+ ### [Full Changelog](https://github.com/gitbrent/bootstrap4-toggle/compare/v2.2.2...v3.0.0)
79
+ ### Added
80
+ - Touch support
81
+ ### Changed
82
+ - Implements Bootstrap 4 colors/styles
83
+ ### Removed
84
+ - Old Bootstrap 2 files
85
+
86
+ [Unreleased]: https://github.com/gitbrent/bootstrap4-toggle/compare/v1.9.0...HEAD
87
+ [3.2.0]: https://github.com/gitbrent/bootstrap4-toggle/compare/v3.1.0...v3.2.0
88
+ [3.1.0]: https://github.com/gitbrent/bootstrap4-toggle/compare/v3.0.0...v3.1.0
89
+ [3.0.0]: https://github.com/gitbrent/bootstrap4-toggle/compare/v2.2.2...v3.0.0
package/README.md CHANGED
@@ -1,9 +1,12 @@
1
- [![Latest release](https://img.shields.io/github/v/release/palcarazm/bootstrap5-toggle.svg?display_name=tag&include_prereleases&sort=semver)](https://github.com/palcarazm/bootstrap5-toggle/releases/latest)
2
1
  [![GitHub license](https://img.shields.io/github/license/palcarazm/bootstrap5-toggle.svg)](https://github.com/palcarazm/bootstrap5-toggle/blob/master/LICENSE)
3
- [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/palcarazm/bootstrap5-toggle/graphs/contributors)
4
- [![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)]()
5
- [![Bootstrap 5.1.3](https://img.shields.io/badge/bootstrap-5.1.3-green.svg?style=flat-square)](https://getbootstrap.com/docs/5.1)
6
- [![JSDelivr Badge](https://data.jsdelivr.com/v1/package/gh/palcarazm/bootstrap5-toggle/badge)](https://www.jsdelivr.com/package/gh/palcarazm/bootstrap5-toggle)
2
+ [![Latest release](https://img.shields.io/github/v/release/palcarazm/bootstrap5-toggle.svg?display_name=tag&include_prereleases&sort=semver)](https://github.com/palcarazm/bootstrap5-toggle/releases/latest)
3
+ [![JSDelivr Badge](https://img.shields.io/jsdelivr/npm/hm/bootstrap5-toggle?color=success&label=hits&logo=jsdelivr&logoColor=white)](https://www.jsdelivr.com/package/npm/bootstrap5-toggle)
4
+ [![NPM Badge](https://img.shields.io/npm/dm/bootstrap5-toggle?logo=npm&color=success)](https://www.npmjs.com/package/bootstrap5-toggle)
5
+ [![Bootstrap 5.1.3](https://img.shields.io/static/v1?label=bootstrap&message=5.1.3&logo=bootstrap&logoColor=white&color=success)](https://getbootstrap.com/docs/5.1)
6
+ [![Build](https://img.shields.io/github/workflow/status/palcarazm/bootstrap5-toggle/Build%20Check?logo=npm)](https://github.com/palcarazm/bootstrap5-toggle/actions?query=workflow%3A%22Build+Check%22)
7
+ [![Test](https://img.shields.io/github/workflow/status/palcarazm/bootstrap5-toggle/Cypress%20Tests?label=tests&logo=cypress)](https://github.com/palcarazm/bootstrap5-toggle/actions?query=workflow%3A%22Cypress+Tests%22)
8
+ [![Maintenance](https://img.shields.io/badge/maintained%3F-yes-success.svg)](https://github.com/palcarazm/bootstrap5-toggle/graphs/contributors)
9
+ [![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)
7
10
 
8
11
  # Bootstrap 5 Toggle
9
12
 
@@ -14,7 +17,7 @@
14
17
  #### Library Distributions
15
18
  Project |Description
16
19
  ---|---
17
- [bootstrap5-toggle](https://github.com/palcarazm/bootstrap5-toggle) | Supports bootstrap5 (requires jQuery)
20
+ [bootstrap5-toggle](https://github.com/palcarazm/bootstrap5-toggle) | Supports bootstrap5 (requires jQuery)
18
21
  [bootstrap4-toggle](https://github.com/gitbrent/bootstrap4-toggle) | Supports bootstrap4 (requires jQuery)
19
22
  [bootstrap-switch-button](https://github.com/gitbrent/bootstrap-switch-button) | Supports bootstrap4+ (ES6 class, no dependencies)
20
23
  [bootstrap-switch-button-react](https://github.com/gitbrent/bootstrap-switch-button-react) | Supports bootstrap4+ (React component, no dependencies)
@@ -34,6 +37,8 @@ Project |Description
34
37
  - [Installation](#installation)
35
38
  - [CDN](#cdn)
36
39
  - [Download](#download)
40
+ - [NPM](#npm)
41
+ - [Yarn](#yarn)
37
42
  - [Usage](#usage)
38
43
  - [Initialize With HTML](#initialize-with-html)
39
44
  - [Initialize With Code](#initialize-with-code)
@@ -52,18 +57,30 @@ Project |Description
52
57
  # Installation
53
58
 
54
59
  ## CDN
60
+ [![JSDelivr Badge](https://img.shields.io/jsdelivr/npm/hm/bootstrap5-toggle?color=success&label=hits&logo=jsdelivr&logoColor=white)](https://www.jsdelivr.com/package/npm/bootstrap5-toggle)
55
61
  ```html
56
- <link href="https://cdn.jsdelivr.net/gh/palcarazm/bootstrap5-toggle@4.0.0/css/bootstrap5-toggle.min.css" rel="stylesheet">
57
- <script src="https://cdn.jsdelivr.net/gh/palcarazm/bootstrap5-toggle@4.0.0/js/bootstrap5-toggle.min.js"></script>
62
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@4.2.0/css/bootstrap5-toggle.min.css" rel="stylesheet">
63
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@4.2.0/js/bootstrap5-toggle.min.js"></script>
58
64
  ```
59
65
 
60
66
  ## Download
61
- [Latest GitHub Release](https://github.com/palcarazm/bootstrap5-toggle/releases/latest)
67
+ [![Latest release](https://img.shields.io/github/v/release/palcarazm/bootstrap5-toggle.svg?display_name=tag&include_prereleases&sort=semver)](https://github.com/palcarazm/bootstrap5-toggle/releases/latest)
68
+
69
+ ## NPM
70
+ [![NPM Badge](https://img.shields.io/npm/dm/bootstrap5-toggle?logo=npm&color=success)](https://www.npmjs.com/package/bootstrap5-toggle)
71
+ ```ksh
72
+ npm install bootstrap5-toggle
73
+ ```
74
+
75
+ ## Yarn
76
+ ```ksh
77
+ yarn add bootstrap5-toggle
78
+ ```
62
79
 
63
80
  # Usage
64
81
 
65
82
  ## Initialize With HTML
66
- Simply add `data-toggle="toggle"` to automatically convert a plain checkbox into a bootstrap 4 toggle.
83
+ Simply add `data-toggle="toggle"` to automatically convert a plain checkbox into a bootstrap 5 toggle.
67
84
 
68
85
  ```html
69
86
  <input id="chkToggle" type="checkbox" data-toggle="toggle">
@@ -149,7 +166,7 @@ You should listen to events from the `<input type="checkbox">` directly rather t
149
166
  ```
150
167
 
151
168
  ## Stopping Event Propagation
152
- Passing `true` to the on/off methods will enable the silent option to prevent the control from propagating the change event in
169
+ Passing `true` to the on, off and toggle methods will enable the silent option to prevent the control from propagating the change event in
153
170
  cases where you want to update the controls on/off state, but do not want to fire the onChange event.
154
171
 
155
172
  ```html
@@ -0,0 +1,150 @@
1
+ /* Copyright Notice
2
+ * bootstrap5-toggle v4.2.0
3
+ * https://palcarazm.github.io/bootstrap5-toggle/
4
+ * @author 2011-2014 Min Hur (https://github.com/minhur)
5
+ * @author 2018-2019 Brent Ely (https://github.com/gitbrent)
6
+ * @author 2022 Pablo Alcaraz Martínez (https://github.com/palcarazm)
7
+ * @license MIT
8
+ * @see https://github.com/palcarazm/bootstrap5-toggle/blob/master/LICENSE
9
+ */
10
+
11
+
12
+ /*
13
+ * @added 3.0.0: Return support for "*-xs" removed in Bootstrap-4
14
+ * @see: [Comment](https://github.com/twbs/bootstrap/issues/21881#issuecomment-341972830)
15
+ */
16
+ .btn-group-xs > .btn, .btn-xs {
17
+ padding: .35rem .4rem .25rem .4rem;
18
+ font-size: .875rem;
19
+ line-height: .5;
20
+ border-radius: .2rem;
21
+ }
22
+
23
+ .checkbox label .toggle, .checkbox-inline .toggle {
24
+ margin-left: -1.25rem;
25
+ margin-right: .35rem;
26
+ }
27
+
28
+ .toggle {
29
+ position: relative;
30
+ overflow: hidden;
31
+ }
32
+ .toggle input[type="checkbox"] {
33
+ display: none;
34
+ }
35
+ .toggle-group {
36
+ position: absolute;
37
+ width: 200%;
38
+ top: 0;
39
+ bottom: 0;
40
+ left: 0;
41
+ transition: left 0.35s;
42
+ -webkit-transition: left 0.35s;
43
+ user-select: none;
44
+ -moz-user-select: none;
45
+ -webkit-user-select: none;
46
+ }
47
+ .toggle-group label, .toggle-group span { cursor: pointer; }
48
+ .toggle.off .toggle-group {
49
+ left: -100%;
50
+ }
51
+ .toggle-on {
52
+ position: absolute;
53
+ top: 0;
54
+ bottom: 0;
55
+ left: 0;
56
+ right: 50%;
57
+ margin: 0;
58
+ border: 0;
59
+ border-radius: 0;
60
+ }
61
+ .toggle-off {
62
+ position: absolute;
63
+ top: 0;
64
+ bottom: 0;
65
+ left: 50%;
66
+ right: 0;
67
+ margin: 0;
68
+ border: 0;
69
+ border-radius: 0;
70
+ box-shadow: none; /* Bootstrap 4.0 Support via (Issue #186)[https://github.com/minhur/bootstrap-toggle/issues/186]) */
71
+ }
72
+ .toggle-handle {
73
+ position: relative;
74
+ margin: 0 auto;
75
+ padding-top: 0px;
76
+ padding-bottom: 0px;
77
+ height: 100%;
78
+ width: 0px;
79
+ border-width: 0 1px;
80
+ background-color: #fff;
81
+ border-color: #fff;
82
+ }
83
+
84
+ /** Support for input-group
85
+ * @author (bryan-brancotte)[https://github.com/bryan-brancotte]
86
+ * @see https://github.com/gitbrent/bootstrap4-toggle/issues/32#issuecomment-616974580
87
+ */
88
+ .input-group .toggle-on,
89
+ .input-group .toggle-off{
90
+ position: absolute;
91
+ }
92
+
93
+ .toggle.btn-outline-primary .toggle-handle {
94
+ background-color: var(--bs-primary);
95
+ border-color: var(--bs-primary);
96
+ }
97
+ .toggle.btn-outline-secondary .toggle-handle {
98
+ background-color: var(--bs-secondary);
99
+ border-color: var(--bs-secondary);
100
+ }
101
+ .toggle.btn-outline-success .toggle-handle {
102
+ background-color: var(--bs-success);
103
+ border-color: var(--bs-success);
104
+ }
105
+ .toggle.btn-outline-danger .toggle-handle {
106
+ background-color: var(--bs-danger);
107
+ border-color: var(--bs-danger);
108
+ }
109
+ .toggle.btn-outline-warning .toggle-handle {
110
+ background-color: var(--bs-warning);
111
+ border-color: var(--bs-warning);
112
+ }
113
+ .toggle.btn-outline-info .toggle-handle {
114
+ background-color: var(--bs-info);
115
+ border-color: var(--bs-info);
116
+ }
117
+ .toggle.btn-outline-light .toggle-handle {
118
+ background-color: var(--bs-light);
119
+ border-color: var(--bs-light);
120
+ }
121
+ .toggle.btn-outline-dark .toggle-handle {
122
+ background-color: var(--bs-dark);
123
+ border-color: var(--bs-dark);
124
+ }
125
+ .toggle[class*="btn-outline"]:hover .toggle-handle {
126
+ background-color: var(--bs-light);
127
+ opacity: 0.5;
128
+ }
129
+
130
+ /* NOTE: Must come first, so classes below override as needed */
131
+ /* [default] (bootstrap-4.1.3 - .btn - h:38px) */
132
+ .toggle.btn { min-width: 3.7rem; min-height: 2.15rem; }
133
+ .toggle-on.btn { padding-right: 1.5rem; }
134
+ .toggle-off.btn { padding-left: 1.5rem; }
135
+
136
+ /* `lg` (bootstrap-4.1.3 - .btn - h:48px) */
137
+ .toggle.btn-lg { min-width: 5rem; min-height: 2.815rem; }
138
+ .toggle-on.btn-lg { padding-right: 2rem; }
139
+ .toggle-off.btn-lg { padding-left: 2rem; }
140
+ .toggle-handle.btn-lg { width: 2.5rem; }
141
+
142
+ /* `sm` (bootstrap-4.1.3 - .btn - h:31px) */
143
+ .toggle.btn-sm { min-width: 3.125rem; min-height: 1.938rem; }
144
+ .toggle-on.btn-sm { padding-right: 1rem; }
145
+ .toggle-off.btn-sm { padding-left: 1rem; }
146
+
147
+ /* `xs` (bootstrap-3.3 - .btn - h:22px) */
148
+ .toggle.btn-xs { min-width: 2.19rem; min-height: 1.375rem; }
149
+ .toggle-on.btn-xs { padding-right: .8rem; }
150
+ .toggle-off.btn-xs { padding-left: .8rem; }
@@ -1,11 +1,12 @@
1
- /*!
2
- * Bootstrap Toggle: bootstrap5-toggle.css v4.0.0
1
+ /* Copyright Notice
2
+ * bootstrap5-toggle v4.2.0
3
3
  * https://palcarazm.github.io/bootstrap5-toggle/
4
- *
5
4
  * @author 2011-2014 Min Hur (https://github.com/minhur)
6
5
  * @author 2018-2019 Brent Ely (https://github.com/gitbrent)
7
6
  * @author 2022 Pablo Alcaraz Martínez (https://github.com/palcarazm)
8
- * @lisense MIT License
7
+ * @license MIT
9
8
  * @see https://github.com/palcarazm/bootstrap5-toggle/blob/master/LICENSE
10
- * @preserve
11
- */.btn-group-xs>.btn,.btn-xs{padding:.35rem .4rem .25rem .4rem;font-size:.875rem;line-height:.5;border-radius:.2rem}.checkbox label .toggle,.checkbox-inline .toggle{margin-left:-1.25rem;margin-right:.35rem}.toggle{position:relative;overflow:hidden}.toggle.btn.btn-light,.toggle.btn.btn-outline-light{border-color:rgba(0,0,0,.15)}.toggle input[type=checkbox]{display:none}.toggle-group{position:absolute;width:200%;top:0;bottom:0;left:0;transition:left .35s;-webkit-transition:left .35s;user-select:none;-moz-user-select:none;-webkit-user-select:none}.toggle-group label,.toggle-group span{cursor:pointer}.toggle.off .toggle-group{left:-100%}.toggle-on{position:absolute;top:0;bottom:0;left:0;right:50%;margin:0;border:0;border-radius:0}.toggle-off{position:absolute;top:0;bottom:0;left:50%;right:0;margin:0;border:0;border-radius:0;box-shadow:none}.toggle-handle{position:relative;margin:0 auto;padding-top:0;padding-bottom:0;height:100%;width:0;border-width:0 1px;background-color:#fff}.toggle.btn-outline-primary .toggle-handle{background-color:var(--bs-primary);border-color:var(--bs-primary)}.toggle.btn-outline-secondary .toggle-handle{background-color:var(--bs-secondary);border-color:var(--bs-secondary)}.toggle.btn-outline-success .toggle-handle{background-color:var(--bs-success);border-color:var(--bs-success)}.toggle.btn-outline-danger .toggle-handle{background-color:var(--bs-danger);border-color:var(--bs-danger)}.toggle.btn-outline-warning .toggle-handle{background-color:var(--bs-warning);border-color:var(--bs-warning)}.toggle.btn-outline-info .toggle-handle{background-color:var(--bs-info);border-color:var(--bs-info)}.toggle.btn-outline-light .toggle-handle{background-color:var(--bs-light);border-color:var(--bs-light)}.toggle.btn-outline-dark .toggle-handle{background-color:var(--bs-dark);border-color:var(--bs-dark)}.toggle[class*=btn-outline]:hover .toggle-handle{background-color:var(--bs-light);opacity:.5}.toggle.btn{min-width:3.7rem;min-height:2.15rem}.toggle-on.btn{padding-right:1.5rem}.toggle-off.btn{padding-left:1.5rem}.toggle.btn-lg{min-width:5rem;min-height:2.815rem}.toggle-on.btn-lg{padding-right:2rem}.toggle-off.btn-lg{padding-left:2rem}.toggle-handle.btn-lg{width:2.5rem}.toggle.btn-sm{min-width:3.125rem;min-height:1.938rem}.toggle-on.btn-sm{padding-right:1rem}.toggle-off.btn-sm{padding-left:1rem}.toggle.btn-xs{min-width:2.19rem;min-height:1.375rem}.toggle-on.btn-xs{padding-right:.8rem}.toggle-off.btn-xs{padding-left:.8rem}
9
+ */
10
+
11
+ .btn-group-xs>.btn,.btn-xs{padding:.35rem .4rem .25rem .4rem;font-size:.875rem;line-height:.5;border-radius:.2rem}.checkbox label .toggle,.checkbox-inline .toggle{margin-left:-1.25rem;margin-right:.35rem}.toggle{position:relative;overflow:hidden}.toggle input[type=checkbox]{display:none}.toggle-group{position:absolute;width:200%;top:0;bottom:0;left:0;transition:left .35s;-webkit-transition:left .35s;user-select:none;-moz-user-select:none;-webkit-user-select:none}.toggle-group label,.toggle-group span{cursor:pointer}.toggle.off .toggle-group{left:-100%}.toggle-on{position:absolute;top:0;bottom:0;left:0;right:50%;margin:0;border:0;border-radius:0}.toggle-off{position:absolute;top:0;bottom:0;left:50%;right:0;margin:0;border:0;border-radius:0;box-shadow:none}.toggle-handle{position:relative;margin:0 auto;padding-top:0;padding-bottom:0;height:100%;width:0;border-width:0 1px;background-color:#fff;border-color:#fff}.input-group .toggle-off,.input-group .toggle-on{position:absolute}.toggle.btn-outline-primary .toggle-handle{background-color:var(--bs-primary);border-color:var(--bs-primary)}.toggle.btn-outline-secondary .toggle-handle{background-color:var(--bs-secondary);border-color:var(--bs-secondary)}.toggle.btn-outline-success .toggle-handle{background-color:var(--bs-success);border-color:var(--bs-success)}.toggle.btn-outline-danger .toggle-handle{background-color:var(--bs-danger);border-color:var(--bs-danger)}.toggle.btn-outline-warning .toggle-handle{background-color:var(--bs-warning);border-color:var(--bs-warning)}.toggle.btn-outline-info .toggle-handle{background-color:var(--bs-info);border-color:var(--bs-info)}.toggle.btn-outline-light .toggle-handle{background-color:var(--bs-light);border-color:var(--bs-light)}.toggle.btn-outline-dark .toggle-handle{background-color:var(--bs-dark);border-color:var(--bs-dark)}.toggle[class*=btn-outline]:hover .toggle-handle{background-color:var(--bs-light);opacity:.5}.toggle.btn{min-width:3.7rem;min-height:2.15rem}.toggle-on.btn{padding-right:1.5rem}.toggle-off.btn{padding-left:1.5rem}.toggle.btn-lg{min-width:5rem;min-height:2.815rem}.toggle-on.btn-lg{padding-right:2rem}.toggle-off.btn-lg{padding-left:2rem}.toggle-handle.btn-lg{width:2.5rem}.toggle.btn-sm{min-width:3.125rem;min-height:1.938rem}.toggle-on.btn-sm{padding-right:1rem}.toggle-off.btn-sm{padding-left:1rem}.toggle.btn-xs{min-width:2.19rem;min-height:1.375rem}.toggle-on.btn-xs{padding-right:.8rem}.toggle-off.btn-xs{padding-left:.8rem}
12
+ /*# sourceMappingURL=bootstrap5-toggle.min.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["css\\bootstrap5-toggle.css"],"names":[],"mappings":"AAeA,mBAAsB,QACrB,QAAS,OAAO,MAAM,OAAO,MAC7B,UAAW,QACX,YAAa,GACb,cAAe,MAGhB,wBAAyB,yBACxB,YAAa,SACb,aAAc,OAGf,QACC,SAAU,SACV,SAAU,OAEX,6BACC,QAAS,KAEV,cACC,SAAU,SACV,MAAO,KACP,IAAK,EACL,OAAQ,EACR,KAAM,EACN,WAAY,KAAK,KACjB,mBAAoB,KAAK,KACzB,YAAa,KACb,iBAAkB,KAClB,oBAAqB,KAEtB,oBAAqB,mBAAqB,OAAQ,QAClD,0BACC,KAAM,MAEP,WACC,SAAU,SACV,IAAK,EACL,OAAQ,EACR,KAAM,EACN,MAAO,IACP,OAAQ,EACR,OAAQ,EACR,cAAe,EAEhB,YACC,SAAU,SACV,IAAK,EACL,OAAQ,EACR,KAAM,IACN,MAAO,EACP,OAAQ,EACR,OAAQ,EACR,cAAe,EACf,WAAY,KAEb,eACC,SAAU,SACV,OAAQ,EAAE,KACV,YAAa,EACb,eAAgB,EAChB,OAAQ,KACR,MAAO,EACP,aAAc,EAAE,IAChB,iBAAkB,KAClB,aAAc,KAQf,yBADA,wBAEI,SAAU,SAGd,2CACC,iBAAkB,kBAClB,aAAc,kBAEf,6CACC,iBAAkB,oBAClB,aAAc,oBAEf,2CACC,iBAAkB,kBAClB,aAAc,kBAEf,0CACC,iBAAkB,iBAClB,aAAc,iBAEf,2CACC,iBAAkB,kBAClB,aAAc,kBAEf,wCACC,iBAAkB,eAClB,aAAc,eAEf,yCACC,iBAAkB,gBAClB,aAAc,gBAEf,wCACC,iBAAkB,eAClB,aAAc,eAEf,iDACC,iBAAkB,gBAClB,QAAS,GAKV,YAAc,UAAW,OAAQ,WAAY,QAC7C,eAAiB,cAAe,OAChC,gBAAkB,aAAc,OAGhC,eAAiB,UAAW,KAAM,WAAY,SAC9C,kBAAoB,cAAe,KACnC,mBAAqB,aAAc,KACnC,sBAAwB,MAAO,OAG/B,eAAiB,UAAW,SAAU,WAAY,SAClD,kBAAoB,cAAe,KACnC,mBAAqB,aAAc,KAGnC,eAAiB,UAAW,QAAS,WAAY,SACjD,kBAAoB,cAAe,MACnC,mBAAqB,aAAc"}
@@ -0,0 +1,199 @@
1
+ /* Copyright Notice
2
+ * bootstrap5-toggle v4.2.0
3
+ * https://palcarazm.github.io/bootstrap5-toggle/
4
+ * @author 2011-2014 Min Hur (https://github.com/minhur)
5
+ * @author 2018-2019 Brent Ely (https://github.com/gitbrent)
6
+ * @author 2022 Pablo Alcaraz Martínez (https://github.com/palcarazm)
7
+ * @license MIT
8
+ * @see https://github.com/palcarazm/bootstrap5-toggle/blob/master/LICENSE
9
+ */
10
+
11
+
12
+ +function ($) {
13
+ 'use strict';
14
+
15
+ // TOGGLE PUBLIC CLASS DEFINITION
16
+ // ==============================
17
+
18
+ var Toggle = function (element, options) {
19
+ this.$element = $(element)
20
+ this.options = $.extend({}, this.defaults(), options)
21
+ this.render()
22
+ }
23
+
24
+ Toggle.DEFAULTS = {
25
+ on: 'On',
26
+ off: 'Off',
27
+ onstyle: 'primary',
28
+ offstyle: 'secondary',
29
+ size: 'normal',
30
+ style: '',
31
+ width: null,
32
+ height: null
33
+ }
34
+
35
+ Toggle.prototype.defaults = function() {
36
+ return {
37
+ on: this.$element.attr('data-on') || Toggle.DEFAULTS.on,
38
+ off: this.$element.attr('data-off') || Toggle.DEFAULTS.off,
39
+ onstyle: this.$element.attr('data-onstyle') || Toggle.DEFAULTS.onstyle,
40
+ offstyle: this.$element.attr('data-offstyle') || Toggle.DEFAULTS.offstyle,
41
+ size: this.$element.attr('data-size') || Toggle.DEFAULTS.size,
42
+ style: this.$element.attr('data-style') || Toggle.DEFAULTS.style,
43
+ width: this.$element.attr('data-width') || Toggle.DEFAULTS.width,
44
+ height: this.$element.attr('data-height') || Toggle.DEFAULTS.height
45
+ }
46
+ }
47
+
48
+ Toggle.prototype.render = function () {
49
+ this._onstyle = 'btn-' + this.options.onstyle
50
+ this._offstyle = 'btn-' + this.options.offstyle
51
+ var size;
52
+ switch (this.options.size ) {
53
+ case 'large':
54
+ case 'lg':
55
+ size = 'btn-lg';
56
+ break;
57
+ case 'small':
58
+ case 'sm':
59
+ size = 'btn-sm';
60
+ break;
61
+ case 'mini':
62
+ case 'xs':
63
+ size = 'btn-xs';
64
+ break;
65
+ default:
66
+ size = ''
67
+ break;
68
+ }
69
+ var $toggleOn = $('<label for="'+ this.$element.prop('id') +'" class="btn">').html(this.options.on)
70
+ .addClass(this._onstyle + ' ' + size)
71
+ var $toggleOff = $('<label for="'+ this.$element.prop('id') +'" class="btn">').html(this.options.off)
72
+ .addClass(this._offstyle + ' ' + size)
73
+ var $toggleHandle = $('<span class="toggle-handle btn">')
74
+ .addClass(size)
75
+ var $toggleGroup = $('<div class="toggle-group">')
76
+ .append($toggleOn, $toggleOff, $toggleHandle)
77
+ var $toggle = $('<div class="toggle btn" data-toggle="toggle" role="button">')
78
+ .addClass( this.$element.prop('checked') ? this._onstyle : this._offstyle+' off' )
79
+ .addClass(size).addClass(this.options.style)
80
+
81
+ this.$element.wrap($toggle)
82
+ $.extend(this, {
83
+ $toggle: this.$element.parent(),
84
+ $toggleOn: $toggleOn,
85
+ $toggleOff: $toggleOff,
86
+ $toggleGroup: $toggleGroup
87
+ })
88
+ this.$toggle.append($toggleGroup)
89
+
90
+ var width = this.options.width || Math.max($toggleOn.outerWidth(), $toggleOff.outerWidth())+($toggleHandle.outerWidth()/2)
91
+ var height = this.options.height || Math.max($toggleOn.outerHeight(), $toggleOff.outerHeight())
92
+ $toggleOn.addClass('toggle-on')
93
+ $toggleOff.addClass('toggle-off')
94
+ this.$toggle.css({ width: width, height: height })
95
+ if (this.options.height) {
96
+ $toggleOn.css('line-height', $toggleOn.height() + 'px')
97
+ $toggleOff.css('line-height', $toggleOff.height() + 'px')
98
+ }
99
+ this.update(true)
100
+ this.trigger(true)
101
+ }
102
+
103
+ Toggle.prototype.toggle = function (silent = false) {
104
+ if (this.$element.prop('checked')) this.off(silent)
105
+ else this.on(silent)
106
+ }
107
+
108
+ Toggle.prototype.on = function (silent = false) {
109
+ if (this.$element.prop('disabled')) return false
110
+ this.$toggle.removeClass(this._offstyle + ' off').addClass(this._onstyle)
111
+ this.$element.prop('checked', true)
112
+ if (!silent) this.trigger()
113
+ }
114
+
115
+ Toggle.prototype.off = function (silent = false) {
116
+ if (this.$element.prop('disabled')) return false
117
+ this.$toggle.removeClass(this._onstyle).addClass(this._offstyle + ' off')
118
+ this.$element.prop('checked', false)
119
+ if (!silent) this.trigger()
120
+ }
121
+
122
+ Toggle.prototype.enable = function () {
123
+ this.$toggle.removeClass('disabled')
124
+ this.$toggle.removeAttr('disabled')
125
+ this.$element.prop('disabled', false)
126
+ }
127
+
128
+ Toggle.prototype.disable = function () {
129
+ this.$toggle.addClass('disabled')
130
+ this.$toggle.attr('disabled', 'disabled')
131
+ this.$element.prop('disabled', true)
132
+ }
133
+
134
+ Toggle.prototype.update = function (silent) {
135
+ if (this.$element.prop('disabled')) this.disable()
136
+ else this.enable()
137
+ if (this.$element.prop('checked')) this.on(silent)
138
+ else this.off(silent)
139
+ }
140
+
141
+ Toggle.prototype.trigger = function (silent) {
142
+ this.$element.off('change.bs.toggle')
143
+ if (!silent) this.$element.change()
144
+ this.$element.on('change.bs.toggle', $.proxy(function() {
145
+ this.update()
146
+ }, this))
147
+ }
148
+
149
+ Toggle.prototype.destroy = function() {
150
+ this.$element.off('change.bs.toggle')
151
+ this.$toggleGroup.remove()
152
+ this.$element.removeData('bs.toggle')
153
+ this.$element.unwrap()
154
+ }
155
+
156
+ // TOGGLE PLUGIN DEFINITION
157
+ // ========================
158
+
159
+ function Plugin(option) {
160
+ var optArg = Array.prototype.slice.call( arguments, 1 )[0]
161
+
162
+ return this.each(function () {
163
+ var $this = $(this)
164
+ var data = $this.data('bs.toggle')
165
+ var options = typeof option == 'object' && option
166
+
167
+ if (!data) $this.data('bs.toggle', (data = new Toggle(this, options)))
168
+ if (typeof option === 'string' && data[option] && typeof optArg === 'boolean') data[option](optArg)
169
+ else if (typeof option === 'string' && data[option]) data[option]()
170
+ //else if (option && !data[option]) console.log('bootstrap-toggle: error: method `'+ option +'` does not exist!');
171
+ })
172
+ }
173
+
174
+ var old = $.fn.bootstrapToggle
175
+
176
+ $.fn.bootstrapToggle = Plugin
177
+ $.fn.bootstrapToggle.Constructor = Toggle
178
+
179
+ // TOGGLE NO CONFLICT
180
+ // ==================
181
+
182
+ $.fn.toggle.noConflict = function () {
183
+ $.fn.bootstrapToggle = old
184
+ return this
185
+ }
186
+
187
+ // TOGGLE DATA-API
188
+ // ===============
189
+
190
+ $(function() {
191
+ $('input[type=checkbox][data-toggle^=toggle]').bootstrapToggle()
192
+ })
193
+
194
+ $(document).on('click.bs.toggle', 'div[data-toggle^=toggle]', function(e) {
195
+ var $checkbox = $(this).find('input[type=checkbox]')
196
+ $checkbox.bootstrapToggle('toggle')
197
+ e.preventDefault()
198
+ })
199
+ }(jQuery);
@@ -1,13 +1,12 @@
1
- /*!
2
- * Bootstrap Toggle: bootstrap5-toggle.css v4.0.0
3
- * https://palcarazm.github.io/bootstrap5-toggle/
4
- *
5
- * @author 2011-2014 Min Hur (https://github.com/minhur)
6
- * @author 2018-2019 Brent Ely (https://github.com/gitbrent)
7
- * @author 2022 Pablo Alcaraz Martínez (https://github.com/palcarazm)
8
- * @lisense MIT License
9
- * @see https://github.com/palcarazm/bootstrap5-toggle/blob/master/LICENSE
10
- * @preserve
11
- */
12
- !function(l){"use strict";function i(t,e){this.$element=l(t),this.options=l.extend({},this.defaults(),e),this.render()}i.VERSION="3.7.0-beta",i.DEFAULTS={on:"On",off:"Off",onstyle:"primary",offstyle:"light",size:"normal",style:"",width:null,height:null},i.prototype.defaults=function(){return{on:this.$element.attr("data-on")||i.DEFAULTS.on,off:this.$element.attr("data-off")||i.DEFAULTS.off,onstyle:this.$element.attr("data-onstyle")||i.DEFAULTS.onstyle,offstyle:this.$element.attr("data-offstyle")||i.DEFAULTS.offstyle,size:this.$element.attr("data-size")||i.DEFAULTS.size,style:this.$element.attr("data-style")||i.DEFAULTS.style,width:this.$element.attr("data-width")||i.DEFAULTS.width,height:this.$element.attr("data-height")||i.DEFAULTS.height}},i.prototype.render=function(){this._onstyle="btn-"+this.options.onstyle,this._offstyle="btn-"+this.options.offstyle;var t="large"===this.options.size||"lg"===this.options.size?"btn-lg":"small"===this.options.size||"sm"===this.options.size?"btn-sm":"mini"===this.options.size||"xs"===this.options.size?"btn-xs":"",e=l('<label for="'+this.$element.prop("id")+'" class="btn">').html(this.options.on).addClass(this._onstyle+" "+t),s=l('<label for="'+this.$element.prop("id")+'" class="btn">').html(this.options.off).addClass(this._offstyle+" "+t),o=l('<span class="toggle-handle btn btn-light">').addClass(t),i=l('<div class="toggle-group">').append(e,s,o),t=l('<div class="toggle btn" data-toggle="toggle" role="button">').addClass(this.$element.prop("checked")?this._onstyle:this._offstyle+" off").addClass(t).addClass(this.options.style),t=(this.$element.wrap(t),l.extend(this,{$toggle:this.$element.parent(),$toggleOn:e,$toggleOff:s,$toggleGroup:i}),this.$toggle.append(i),this.options.width||Math.max(e.outerWidth(),s.outerWidth())+o.outerWidth()/2),i=this.options.height||Math.max(e.outerHeight(),s.outerHeight());e.addClass("toggle-on"),s.addClass("toggle-off"),this.$toggle.css({width:t,height:i}),this.options.height&&(e.css("line-height",e.height()+"px"),s.css("line-height",s.height()+"px")),this.update(!0),this.trigger(!0)},i.prototype.toggle=function(){this.$element.prop("checked")?this.off():this.on()},i.prototype.on=function(t){if(this.$element.prop("disabled"))return!1;this.$toggle.removeClass(this._offstyle+" off").addClass(this._onstyle),this.$element.prop("checked",!0),t||this.trigger()},i.prototype.off=function(t){if(this.$element.prop("disabled"))return!1;this.$toggle.removeClass(this._onstyle).addClass(this._offstyle+" off"),this.$element.prop("checked",!1),t||this.trigger()},i.prototype.enable=function(){this.$toggle.removeClass("disabled"),this.$toggle.removeAttr("disabled"),this.$element.prop("disabled",!1)},i.prototype.disable=function(){this.$toggle.addClass("disabled"),this.$toggle.attr("disabled","disabled"),this.$element.prop("disabled",!0)},i.prototype.update=function(t){this.$element.prop("disabled")?this.disable():this.enable(),this.$element.prop("checked")?this.on(t):this.off(t)},i.prototype.trigger=function(t){this.$element.off("change.bs.toggle"),t||this.$element.change(),this.$element.on("change.bs.toggle",l.proxy(function(){this.update()},this))},i.prototype.destroy=function(){this.$element.off("change.bs.toggle"),this.$toggleGroup.remove(),this.$element.removeData("bs.toggle"),this.$element.unwrap()};var t=l.fn.bootstrapToggle;l.fn.bootstrapToggle=function(s){var o=Array.prototype.slice.call(arguments,1)[0];return this.each(function(){var t=l(this),e=t.data("bs.toggle");e||t.data("bs.toggle",e=new i(this,"object"==typeof s&&s)),"string"==typeof s&&e[s]&&"boolean"==typeof o?e[s](o):"string"==typeof s&&e[s]&&e[s]()})},l.fn.bootstrapToggle.Constructor=i,l.fn.toggle.noConflict=function(){return l.fn.bootstrapToggle=t,this},l(function(){l("input[type=checkbox][data-toggle^=toggle]").bootstrapToggle()}),l(document).on("click.bs.toggle","div[data-toggle^=toggle]",function(t){l(this).find("input[type=checkbox]").bootstrapToggle("toggle"),t.preventDefault()})}(jQuery);
1
+ /* Copyright Notice
2
+ * bootstrap5-toggle v4.2.0
3
+ * https://palcarazm.github.io/bootstrap5-toggle/
4
+ * @author 2011-2014 Min Hur (https://github.com/minhur)
5
+ * @author 2018-2019 Brent Ely (https://github.com/gitbrent)
6
+ * @author 2022 Pablo Alcaraz Martínez (https://github.com/palcarazm)
7
+ * @license MIT
8
+ * @see https://github.com/palcarazm/bootstrap5-toggle/blob/master/LICENSE
9
+ */
10
+
11
+ !function(n){"use strict";function i(t,e){this.$element=n(t),this.options=n.extend({},this.defaults(),e),this.render()}i.DEFAULTS={on:"On",off:"Off",onstyle:"primary",offstyle:"secondary",size:"normal",style:"",width:null,height:null},i.prototype.defaults=function(){return{on:this.$element.attr("data-on")||i.DEFAULTS.on,off:this.$element.attr("data-off")||i.DEFAULTS.off,onstyle:this.$element.attr("data-onstyle")||i.DEFAULTS.onstyle,offstyle:this.$element.attr("data-offstyle")||i.DEFAULTS.offstyle,size:this.$element.attr("data-size")||i.DEFAULTS.size,style:this.$element.attr("data-style")||i.DEFAULTS.style,width:this.$element.attr("data-width")||i.DEFAULTS.width,height:this.$element.attr("data-height")||i.DEFAULTS.height}},i.prototype.render=function(){var t;switch(this._onstyle="btn-"+this.options.onstyle,this._offstyle="btn-"+this.options.offstyle,this.options.size){case"large":case"lg":t="btn-lg";break;case"small":case"sm":t="btn-sm";break;case"mini":case"xs":t="btn-xs";break;default:t=""}var e=n('<label for="'+this.$element.prop("id")+'" class="btn">').html(this.options.on).addClass(this._onstyle+" "+t),s=n('<label for="'+this.$element.prop("id")+'" class="btn">').html(this.options.off).addClass(this._offstyle+" "+t),o=n('<span class="toggle-handle btn">').addClass(t),i=n('<div class="toggle-group">').append(e,s,o),l=n('<div class="toggle btn" data-toggle="toggle" role="button">').addClass(this.$element.prop("checked")?this._onstyle:this._offstyle+" off").addClass(t).addClass(this.options.style),l=(this.$element.wrap(l),n.extend(this,{$toggle:this.$element.parent(),$toggleOn:e,$toggleOff:s,$toggleGroup:i}),this.$toggle.append(i),this.options.width||Math.max(e.outerWidth(),s.outerWidth())+o.outerWidth()/2),i=this.options.height||Math.max(e.outerHeight(),s.outerHeight());e.addClass("toggle-on"),s.addClass("toggle-off"),this.$toggle.css({width:l,height:i}),this.options.height&&(e.css("line-height",e.height()+"px"),s.css("line-height",s.height()+"px")),this.update(!0),this.trigger(!0)},i.prototype.toggle=function(t=!1){this.$element.prop("checked")?this.off(t):this.on(t)},i.prototype.on=function(t=!1){if(this.$element.prop("disabled"))return!1;this.$toggle.removeClass(this._offstyle+" off").addClass(this._onstyle),this.$element.prop("checked",!0),t||this.trigger()},i.prototype.off=function(t=!1){if(this.$element.prop("disabled"))return!1;this.$toggle.removeClass(this._onstyle).addClass(this._offstyle+" off"),this.$element.prop("checked",!1),t||this.trigger()},i.prototype.enable=function(){this.$toggle.removeClass("disabled"),this.$toggle.removeAttr("disabled"),this.$element.prop("disabled",!1)},i.prototype.disable=function(){this.$toggle.addClass("disabled"),this.$toggle.attr("disabled","disabled"),this.$element.prop("disabled",!0)},i.prototype.update=function(t){this.$element.prop("disabled")?this.disable():this.enable(),this.$element.prop("checked")?this.on(t):this.off(t)},i.prototype.trigger=function(t){this.$element.off("change.bs.toggle"),t||this.$element.change(),this.$element.on("change.bs.toggle",n.proxy(function(){this.update()},this))},i.prototype.destroy=function(){this.$element.off("change.bs.toggle"),this.$toggleGroup.remove(),this.$element.removeData("bs.toggle"),this.$element.unwrap()};var t=n.fn.bootstrapToggle;n.fn.bootstrapToggle=function(s){var o=Array.prototype.slice.call(arguments,1)[0];return this.each(function(){var t=n(this),e=t.data("bs.toggle");e||t.data("bs.toggle",e=new i(this,"object"==typeof s&&s)),"string"==typeof s&&e[s]&&"boolean"==typeof o?e[s](o):"string"==typeof s&&e[s]&&e[s]()})},n.fn.bootstrapToggle.Constructor=i,n.fn.toggle.noConflict=function(){return n.fn.bootstrapToggle=t,this},n(function(){n("input[type=checkbox][data-toggle^=toggle]").bootstrapToggle()}),n(document).on("click.bs.toggle","div[data-toggle^=toggle]",function(t){n(this).find("input[type=checkbox]").bootstrapToggle("toggle"),t.preventDefault()})}(jQuery);
13
12
  //# sourceMappingURL=bootstrap5-toggle.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap5-toggle.min.js","sources":["bootstrap5-toggle.js"],"names":["$","Toggle","element","options","this","$element","extend","defaults","render","DEFAULTS","on","off","onstyle","offstyle","size","style","width","height","prototype","attr","_onstyle","_offstyle","$toggleOn","prop","html","addClass","$toggleOff","$toggleHandle","$toggleGroup","append","$toggle","wrap","parent","Math","max","outerWidth","outerHeight","css","update","trigger","toggle","silent","removeClass","enable","removeAttr","disable","change","proxy","destroy","remove","removeData","unwrap","old","fn","bootstrapToggle","option","optArg","Array","slice","call","arguments","each","$this","data","Constructor","noConflict","document","e","find","preventDefault","jQuery"],"mappings":"CAWC,SAAUA,gBAMG,SAATC,EAAmBC,EAASC,GAC/BC,KAAKC,SAAYL,EAAEE,GACnBE,KAAKD,QAAYH,EAAEM,OAAO,GAAIF,KAAKG,WAAYJ,GAC/CC,KAAKI,SAGNP,EAAOQ,SAAW,CACjBC,GAAI,KACJC,IAAK,MACLC,QAAS,UACTC,SAAU,YACVC,KAAM,SACNC,MAAO,GACPC,MAAO,KACPC,OAAQ,MAGThB,EAAOiB,UAAUX,SAAW,WAC3B,MAAO,CACNG,GAAIN,KAAKC,SA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MRJ,EAAE,WACDA,EAAE,6CAA6CsD,oBAGhDtD,EAAEkE,UAAUxD,GAAG,kBAAmB,2BAA4B,SAASyD,GACtDnE,EAAEI,MAAMgE,KAAK,wBACnBd,gBAAgB,UAC1Ba,EAAEE,mBAzLH,CA2LCC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bootstrap5-toggle",
3
- "version": "4.0.0",
3
+ "version": "4.2.0",
4
4
  "author": {
5
5
  "name": "Pablo Alcaraz Martínez",
6
6
  "url": "https://github.com/palcarazm/"
@@ -10,11 +10,13 @@
10
10
  "license": "MIT",
11
11
  "main": "js/bootstrap5-toggle.min.js",
12
12
  "files": [
13
- "css/bootstrap5-toggle.min.css",
14
- "js/bootstrap5-toggle.min.js"
13
+ "css/*",
14
+ "js/*"
15
15
  ],
16
16
  "scripts": {
17
- "build": "grunt"
17
+ "build": "grunt",
18
+ "postversion": "grunt",
19
+ "prepublishOnly": "grunt"
18
20
  },
19
21
  "keywords": [
20
22
  "bootstrap",
@@ -37,10 +39,16 @@
37
39
  "url": "https://github.com/palcarazm/bootstrap5-toggle/issues"
38
40
  },
39
41
  "devDependencies": {
42
+ "cypress": "^10.3.0",
40
43
  "doctoc": "^2.2.0",
41
44
  "grunt": "^1.5.3",
45
+ "grunt-banner": "^0.6.0",
42
46
  "grunt-contrib-clean": "^2.0.1",
43
47
  "grunt-contrib-cssmin": "^4.0.0",
44
48
  "grunt-contrib-uglify": "^5.2.1"
49
+ },
50
+ "dependencies": {
51
+ "bootstrap": "^5.1.3",
52
+ "jquery": "^3.6.0"
45
53
  }
46
54
  }