bootstrap5-toggle 4.0.1-alpha → 4.3.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,110 @@
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.3.0](https://github.com/palcaraz/bootstrap5-toggle/tree/v4.3.0) 2022-07-25
10
+ ### [Full Changelog](https://github.com/palcaraz/bootstrap4-toggle/compare/v4.2.0...v4.3.0)
11
+ ### Added
12
+ * feat: Distribution of ECMAS lib (#2) by @palcarazm in https://github.com/palcarazm/bootstrap5-toggle/pull/36
13
+ * feat: Support readonly attribute (#35) by @palcarazm in https://github.com/palcarazm/bootstrap5-toggle/pull/37
14
+ * feat: Toggles focusable from the keyboard (#38) by @palcarazm in https://github.com/palcarazm/bootstrap5-toggle/pull/41
15
+ * feat: Switch toggle from keyboard (#39) by @palcarazm in https://github.com/palcarazm/bootstrap5-toggle/pull/42
16
+ * feat: Custom value for on and off state on form submit (#34) by @palcarazm in https://github.com/palcarazm/bootstrap5-toggle/pull/43
17
+ * feat: Tristate toggle (#40) by @palcarazm in https://github.com/palcarazm/bootstrap5-toggle/pull/47
18
+
19
+ ## [4.2.0](https://github.com/palcaraz/bootstrap5-toggle/tree/v4.2.0) 2022-07-12
20
+ ### [Full Changelog](https://github.com/palcaraz/bootstrap4-toggle/compare/v4.1.0...v4.2.0)
21
+ ### Added
22
+ * feat: Support toggle silent method by @palcarazm in https://github.com/palcarazm/bootstrap5-toggle/pull/30
23
+ ### Changed
24
+ * feat: Remove btn-light from handle by @palcarazm in https://github.com/palcarazm/bootstrap5-toggle/pull/21
25
+ * feat: Change default btn off class to secondary by @palcarazm in https://github.com/palcarazm/bootstrap5-toggle/pull/22
26
+ ### Fixed
27
+ * fix: Handle border color and btn-light border color by @palcarazm in https://github.com/palcarazm/bootstrap5-toggle/pull/17
28
+ * fix: Render in input-group by @palcarazm in https://github.com/palcarazm/bootstrap5-toggle/pull/29
29
+
30
+ ## [4.1.0](https://github.com/palcaraz/bootstrap5-toggle/tree/v4.1.0) 2022-06-30
31
+ ### [Full Changelog](https://github.com/palcaraz/bootstrap4-toggle/compare/v4.0.0...v4.1.0)
32
+ ### Added
33
+ - feat: support for npm and yarn
34
+
35
+ ## [4.0.0](https://github.com/palcaraz/bootstrap5-toggle/tree/v4.0.0) 2022-06-30
36
+ ### [Full Changelog](https://github.com/palcaraz/bootstrap4-toggle/compare/v3.6.0...v4.0.0)
37
+ ### Added
38
+ - feat: support for Boostrap 5
39
+
40
+ ## [3.6.0](https://github.com/gitbrent/bootstrap4-toggle/tree/v3.6.0) 2019-10-17
41
+ ### [Full Changelog](https://github.com/gitbrent/bootstrap4-toggle/compare/v3.5.0...v3.6.0)
42
+ ### Added
43
+ - 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))
44
+ - Added accessibility properties to labels [\#11](https://github.com/gitbrent/bootstrap4-toggle/issue/11) ([aproquot](https://github.com/aproquot))
45
+ ### Changed
46
+ - Fixed URLs in js and css file top comment [\#5](https://github.com/gitbrent/bootstrap4-toggle/issue/5) ([wilecoyte78](https://github.com/wilecoyte78))
47
+ - Disable style is not working [\#18](https://github.com/gitbrent/bootstrap4-toggle/issue/18) ([rychlym](https://github.com/rychlym))
48
+
49
+ ## [3.5.0](https://github.com/gitbrent/bootstrap4-toggle/tree/v3.5.0) 2019-07-02
50
+ ### [Full Changelog](https://github.com/gitbrent/bootstrap4-toggle/compare/v3.4.0...v3.5.0)
51
+ ### Added
52
+ - Added ARIA `role="button"` tag to toggle
53
+ - Added `cursor: pointer;` style to toggle
54
+ ### Changed
55
+ - Fixed: Touch not working on mobile [\#2](https://github.com/gitbrent/bootstrap4-toggle/issue/2) ([wilecoyte78](https://github.com/wilecoyte78))
56
+ - Updated to Bootstrap version 4.3.1
57
+ - Updated README with better Yarn instructions
58
+
59
+ ## [3.4.0](https://github.com/gitbrent/bootstrap4-toggle/tree/v3.4.0) 2019-01-03
60
+ ### [Full Changelog](https://github.com/gitbrent/bootstrap4-toggle/compare/v3.3.0...v3.4.0)
61
+ ### Added
62
+ - Outline button styles are now available
63
+ ### Changed
64
+ - Updated to Bootstrap version 4.2.1
65
+
66
+ ## [3.3.0](https://github.com/gitbrent/bootstrap4-toggle/tree/v3.3.0) 2018-12-19
67
+ ### [Full Changelog](https://github.com/gitbrent/bootstrap4-toggle/compare/v3.2.0...v3.3.0)
68
+ ### Added
69
+ - New test created to compare core bootstrap sizes to bootstrap4-toggle
70
+ ### Changed
71
+ - Introduced new `size` values that mirror bootstrap 4: (`lg`, `sm`, `xs`)
72
+ - Converted all css units from `px` to `rem`
73
+ - Properly added border on `light` button (moved from .toggle class)
74
+ ### Removed
75
+ **DEPRECATED** Classic `size` values (`large`, `small`, `mini`)
76
+
77
+
78
+ ## [3.2.0](https://github.com/gitbrent/bootstrap4-toggle/tree/v3.2.0) 2018-11-27
79
+ ### [Full Changelog](https://github.com/gitbrent/bootstrap4-toggle/compare/v3.1.0...v3.2.0)
80
+ ### Added
81
+ ### Changed
82
+ - Removed permanent `active` state from "Off" label so mouse-over highlighting works the same as "On"
83
+ ### Removed
84
+
85
+
86
+
87
+ ## [3.1.0](https://github.com/gitbrent/bootstrap4-toggle/tree/v3.1.0) 2018-10-25
88
+ ### [Full Changelog](https://github.com/gitbrent/bootstrap4-toggle/compare/v3.0.0...v3.1.0)
89
+ ### Added
90
+ - `index.html` includes new section with dark mode colors
91
+ ### Changed
92
+ - `index.html` now fully responsive, better menu, rearranged sections
93
+ - Tweaked `border` property to work with all backgrounds and colors
94
+ ### Removed
95
+
96
+
97
+
98
+ ## [3.0.0](https://github.com/gitbrent/bootstrap4-toggle/tree/v3.0.0) 2018-10-21
99
+ ### [Full Changelog](https://github.com/gitbrent/bootstrap4-toggle/compare/v2.2.2...v3.0.0)
100
+ ### Added
101
+ - Touch support
102
+ ### Changed
103
+ - Implements Bootstrap 4 colors/styles
104
+ ### Removed
105
+ - Old Bootstrap 2 files
106
+
107
+ [Unreleased]: https://github.com/gitbrent/bootstrap4-toggle/compare/v1.9.0...HEAD
108
+ [3.2.0]: https://github.com/gitbrent/bootstrap4-toggle/compare/v3.1.0...v3.2.0
109
+ [3.1.0]: https://github.com/gitbrent/bootstrap4-toggle/compare/v3.0.0...v3.1.0
110
+ [3.0.0]: https://github.com/gitbrent/bootstrap4-toggle/compare/v2.2.2...v3.0.0
package/LICENSE CHANGED
@@ -1,23 +1,23 @@
1
- The MIT License (MIT)
2
-
3
- - Copyright (c) 2011-2014 Min Hur, The New York Times Company
4
- - Copyright (c) 2018-2019 Brent Ely
5
- - Copyright (c) 2022 Pablo Alcaraz Martínez
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in
15
- all copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ - Copyright (c) 2011-2014 Min Hur, The New York Times Company
4
+ - Copyright (c) 2018-2019 Brent Ely
5
+ - Copyright (c) 2022 Pablo Alcaraz Martínez
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in
15
+ all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ THE SOFTWARE.
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 (jQuery and ECMAS distributions)
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)
@@ -24,6 +27,7 @@ Project |Description
24
27
 
25
28
  ![Demo GIF](img/bootstrap5-toggle-demo.gif)
26
29
 
30
+ <!-- To update TOC run .\node_modules\.bin\doctoc README.md --github -->
27
31
  <!-- START doctoc generated TOC please keep comment here to allow auto update -->
28
32
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
29
33
  **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
@@ -34,6 +38,8 @@ Project |Description
34
38
  - [Installation](#installation)
35
39
  - [CDN](#cdn)
36
40
  - [Download](#download)
41
+ - [NPM](#npm)
42
+ - [Yarn](#yarn)
37
43
  - [Usage](#usage)
38
44
  - [Initialize With HTML](#initialize-with-html)
39
45
  - [Initialize With Code](#initialize-with-code)
@@ -44,6 +50,7 @@ Project |Description
44
50
  - [Event Propagation](#event-propagation)
45
51
  - [Stopping Event Propagation](#stopping-event-propagation)
46
52
  - [API vs Input](#api-vs-input)
53
+ - [Collaborators welcom!](#collaborators-welcom)
47
54
 
48
55
  <!-- END doctoc generated TOC please keep comment here to allow auto update -->
49
56
 
@@ -52,18 +59,30 @@ Project |Description
52
59
  # Installation
53
60
 
54
61
  ## CDN
62
+ [![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
63
  ```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>
64
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@4.3.0/css/bootstrap5-toggle.min.css" rel="stylesheet">
65
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap5-toggle@4.3.0/js/bootstrap5-toggle.min.js"></script>
58
66
  ```
59
67
 
60
68
  ## Download
61
- [Latest GitHub Release](https://github.com/palcarazm/bootstrap5-toggle/releases/latest)
69
+ [![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)
70
+
71
+ ## NPM
72
+ [![NPM Badge](https://img.shields.io/npm/dm/bootstrap5-toggle?logo=npm&color=success)](https://www.npmjs.com/package/bootstrap5-toggle)
73
+ ```ksh
74
+ npm install bootstrap5-toggle
75
+ ```
76
+
77
+ ## Yarn
78
+ ```ksh
79
+ yarn add bootstrap5-toggle
80
+ ```
62
81
 
63
82
  # Usage
64
83
 
65
84
  ## Initialize With HTML
66
- Simply add `data-toggle="toggle"` to automatically convert a plain checkbox into a bootstrap 4 toggle.
85
+ Simply add `data-toggle="toggle"` to automatically convert a plain checkbox into a bootstrap 5 toggle.
67
86
 
68
87
  ```html
69
88
  <input id="chkToggle" type="checkbox" data-toggle="toggle">
@@ -101,16 +120,20 @@ EX: Initialize id `chkToggle` with a single line of JavaScript.
101
120
  </script>
102
121
  ```
103
122
 
104
- Name |Type |Default |Description |
105
- ----------|-----------|----------|----------------------------|
106
- `on` |string/html|"On" |Text of the on toggle
107
- `off` |string/html|"Off" |Text of the off toggle
108
- `size` |string |"normal" |Size of the toggle. Possible values are: `large`, `normal`, `small`, `mini`.
109
- `onstyle` |string |"primary" |Style of the on toggle. Possible values are: `primary`,`secondary`,`success`,`danger`,`warning`,`info`,`light`,`dark`
110
- `offstyle`|string |"light" |Style of the off toggle. Possible values are: `primary`,`secondary`,`success`,`danger`,`warning`,`info`,`light`,`dark`
123
+ Name |Type |Default |Description |
124
+ ----------|-----------|-----------|----------------------------|
125
+ `on` |string/html|"On" |Text of the on toggle
126
+ `off` |string/html|"Off" |Text of the off toggle
127
+ `size` |string |"normal" |Size of the toggle. Possible values are: `large`, `normal`, `small`, `mini`.
128
+ `onstyle` |string |"primary" |Style of the on toggle. Possible values are: `primary`, `secondary`, `success`, `danger`, `warning`, `info`, `light`, `dark` and with `outline-` prefix
129
+ `offstyle`|string |"secondary"|Style of the off toggle. Possible values are: `primary`, `secondary`, `success`, `danger`, `warning`, `info`, `light`, `dark` and with `outline-` prefix
130
+ `onvalue` |string |*null* |Sets on state value
131
+ `offvalue`|string |*null* |Sets off state value
111
132
  `style` |string | |Appends the value to the class attribute of the toggle. This can be used to apply custom styles. Refer to Custom Styles for reference.
112
133
  `width` |integer |*null* |Sets the width of the toggle. if set to *null*, width will be auto-calculated.
113
134
  `height` |integer |*null* |Sets the height of the toggle. if set to *null*, height will be auto-calculated.
135
+ `tabindex`|integer |0 |Sets the tabindex of the toggle.
136
+ `tristate`|boolean |false |Sets tristate support
114
137
 
115
138
  ## Methods
116
139
  Methods can be used to control toggles directly.
@@ -119,15 +142,18 @@ Methods can be used to control toggles directly.
119
142
  <input id="toggle-demo" type="checkbox" data-toggle="toggle">
120
143
  ```
121
144
 
122
- Method |Example |Description
123
- -----------|------------------------------------------------|------------------------------------------
124
- initialize | `$('#toggle-demo').bootstrapToggle()` |Initializes the toggle plugin with options
125
- destroy | `$('#toggle-demo').bootstrapToggle('destroy')` |Destroys the toggle
126
- on | `$('#toggle-demo').bootstrapToggle('on')` |Sets the toggle to 'On' state
127
- off | `$('#toggle-demo').bootstrapToggle('off')` |Sets the toggle to 'Off' state
128
- toggle | `$('#toggle-demo').bootstrapToggle('toggle')` |Toggles the state of the toggle on/off
129
- enable | `$('#toggle-demo').bootstrapToggle('enable')` |Enables the toggle
130
- disable | `$('#toggle-demo').bootstrapToggle('disable')` |Disables the toggle
145
+ Method |Example |Description
146
+ -------------|-----------------------------------------------------|------------------------------------------
147
+ initialize | `$('#toggle-demo').bootstrapToggle()` |Initializes the toggle plugin with options
148
+ destroy | `$('#toggle-demo').bootstrapToggle('destroy')` |Destroys the toggle
149
+ on | `$('#toggle-demo').bootstrapToggle('on')` |Sets the toggle to 'On' state
150
+ off | `$('#toggle-demo').bootstrapToggle('off')` |Sets the toggle to 'Off' state
151
+ toggle | `$('#toggle-demo').bootstrapToggle('toggle')` |Toggles the state of the toggle on/off
152
+ enable | `$('#toggle-demo').bootstrapToggle('enable')` |Enables the toggle
153
+ disable | `$('#toggle-demo').bootstrapToggle('disable')` |Disables the toggle
154
+ readonly | `$('#toggle-demo').bootstrapToggle('readonly')` |Disables the toggle but preserve checkbox enabled
155
+ indeterminate| `$('#toggle-demo').bootstrapToggle('indeterminate')`|Sets the toggle to 'indeterminate' state
156
+ determinate | `$('#toggle-demo').bootstrapToggle('determinate')` |Sets the toggle to 'determinate' state
131
157
 
132
158
  # Events
133
159
 
@@ -149,8 +175,7 @@ You should listen to events from the `<input type="checkbox">` directly rather t
149
175
  ```
150
176
 
151
177
  ## 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
153
- cases where you want to update the controls on/off state, but do not want to fire the onChange event.
178
+ Passing `true` to the on, off, toggle, determinate and indeterminate methods will enable the silent option to prevent the control from propagating the change event in cases where you want to update the controls on/off state, but do not want to fire the onChange event.
154
179
 
155
180
  ```html
156
181
  <input id="toggle-silent" type="checkbox" data-toggle="toggle">
@@ -198,3 +223,12 @@ This also means that using the API or Input to trigger events will work both way
198
223
  }
199
224
  </script>
200
225
  ```
226
+ # Collaborators welcom!
227
+ - :sos: ¿Do you need some help? Open a issue in [GitHub help wanted](https://github.com/palcarazm/bootstrap5-toggle/issues/new?assignees=&labels=help+wanted&template=help-wanted.md&title=%5BHELP%5D)
228
+ - :bug: ¿Do you find a bug? Open a issue in [GitHub bug report](https://github.com/palcarazm/bootstrap5-toggle/issues/new?assignees=&labels=bug&template=bug_report.md&title=%5BBUG%5D)
229
+ - :bulb: ¿Do you have a great idea? Open a issue in [GitHub feature request](https://github.com/palcarazm/bootstrap5-toggle/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=%5BFEATURE%5D)
230
+ - :computer: ¿Do you know how to fix a bug? Open a pull request in [GitHub pull repuest](https://github.com/palcarazm/bootstrap5-toggle/compare).
231
+
232
+ [![GitHub Contributors](https://contrib.rocks/image?repo=palcarazm/bootstrap5-toggle)](https://github.com/palcarazm/bootstrap5-toggle/graphs/contributors)
233
+
234
+ ¿Do you like the project? Give us a :star: in [GitHub](https://github.com/palcarazm/bootstrap5-toggle).
@@ -1,15 +1,14 @@
1
- /*!
2
- * Bootstrap Toggle: bootstrap5-toggle.css v4.0.0
1
+ /* Copyright Notice
2
+ * bootstrap5-toggle v4.3.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
9
  */
12
10
 
11
+
13
12
  /*
14
13
  * @added 3.0.0: Return support for "*-xs" removed in Bootstrap-4
15
14
  * @see: [Comment](https://github.com/twbs/bootstrap/issues/21881#issuecomment-341972830)
@@ -30,10 +29,6 @@
30
29
  position: relative;
31
30
  overflow: hidden;
32
31
  }
33
- .toggle.btn.btn-light, .toggle.btn.btn-outline-light {
34
- /* bootstrap-4 - add a border so toggle is delineated */
35
- border-color: rgba(0, 0, 0, .15);
36
- }
37
32
  .toggle input[type="checkbox"] {
38
33
  display: none;
39
34
  }
@@ -53,6 +48,9 @@
53
48
  .toggle.off .toggle-group {
54
49
  left: -100%;
55
50
  }
51
+ .toggle.indeterminate .toggle-group {
52
+ left: -50%;
53
+ }
56
54
  .toggle-on {
57
55
  position: absolute;
58
56
  top: 0;
@@ -83,6 +81,16 @@
83
81
  width: 0px;
84
82
  border-width: 0 1px;
85
83
  background-color: #fff;
84
+ border-color: #fff;
85
+ }
86
+
87
+ /** Support for input-group
88
+ * @author (bryan-brancotte)[https://github.com/bryan-brancotte]
89
+ * @see https://github.com/gitbrent/bootstrap4-toggle/issues/32#issuecomment-616974580
90
+ */
91
+ .input-group .toggle-on,
92
+ .input-group .toggle-off{
93
+ position: absolute;
86
94
  }
87
95
 
88
96
  .toggle.btn-outline-primary .toggle-handle {
@@ -1,11 +1,12 @@
1
- /*!
2
- * Bootstrap Toggle: bootstrap5-toggle.css v4.0.0
1
+ /* Copyright Notice
2
+ * bootstrap5-toggle v4.3.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.indeterminate .toggle-group{left:-50%}.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,oCACC,KAAM,KAEP,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,2 @@
1
+ *
2
+ !.gitignore