bootstrap 5.2.0 → 5.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +24 -4
- data/assets/javascripts/bootstrap/alert.js +2 -2
- data/assets/javascripts/bootstrap/base-component.js +3 -3
- data/assets/javascripts/bootstrap/button.js +2 -2
- data/assets/javascripts/bootstrap/carousel.js +2 -2
- data/assets/javascripts/bootstrap/collapse.js +2 -2
- data/assets/javascripts/bootstrap/dom/data.js +2 -2
- data/assets/javascripts/bootstrap/dom/event-handler.js +2 -2
- data/assets/javascripts/bootstrap/dom/manipulator.js +2 -2
- data/assets/javascripts/bootstrap/dom/selector-engine.js +2 -2
- data/assets/javascripts/bootstrap/dropdown.js +7 -5
- data/assets/javascripts/bootstrap/modal.js +16 -13
- data/assets/javascripts/bootstrap/offcanvas.js +2 -2
- data/assets/javascripts/bootstrap/popover.js +2 -2
- data/assets/javascripts/bootstrap/scrollspy.js +16 -12
- data/assets/javascripts/bootstrap/tab.js +2 -2
- data/assets/javascripts/bootstrap/toast.js +2 -2
- data/assets/javascripts/bootstrap/tooltip.js +11 -7
- data/assets/javascripts/bootstrap/util/backdrop.js +2 -2
- data/assets/javascripts/bootstrap/util/component-functions.js +2 -2
- data/assets/javascripts/bootstrap/util/config.js +2 -2
- data/assets/javascripts/bootstrap/util/focustrap.js +2 -2
- data/assets/javascripts/bootstrap/util/index.js +2 -2
- data/assets/javascripts/bootstrap/util/sanitizer.js +2 -2
- data/assets/javascripts/bootstrap/util/scrollbar.js +2 -2
- data/assets/javascripts/bootstrap/util/swipe.js +2 -2
- data/assets/javascripts/bootstrap/util/template-factory.js +2 -2
- data/assets/javascripts/bootstrap.js +71 -58
- data/assets/javascripts/bootstrap.min.js +2 -2
- data/assets/stylesheets/bootstrap/_accordion.scss +7 -4
- data/assets/stylesheets/bootstrap/_button-group.scss +1 -1
- data/assets/stylesheets/bootstrap/_buttons.scss +23 -8
- data/assets/stylesheets/bootstrap/_dropdown.scss +2 -1
- data/assets/stylesheets/bootstrap/_functions.scss +1 -1
- data/assets/stylesheets/bootstrap/_list-group.scss +6 -5
- data/assets/stylesheets/bootstrap/_modal.scss +1 -1
- data/assets/stylesheets/bootstrap/_nav.scss +2 -2
- data/assets/stylesheets/bootstrap/_navbar.scss +2 -0
- data/assets/stylesheets/bootstrap/_offcanvas.scss +5 -4
- data/assets/stylesheets/bootstrap/_pagination.scss +1 -1
- data/assets/stylesheets/bootstrap/_popover.scss +5 -5
- data/assets/stylesheets/bootstrap/_toasts.scss +3 -2
- data/assets/stylesheets/bootstrap/_variables.scss +17 -16
- data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +1 -0
- data/assets/stylesheets/bootstrap/forms/_input-group.scss +7 -4
- data/assets/stylesheets/bootstrap/mixins/_banner.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +10 -10
- data/assets/stylesheets/bootstrap/mixins/_utilities.scss +1 -1
- data/bootstrap.gemspec +1 -1
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35584b903c24d5444ccbcc115e69da218717c9ba4203ddcb127a035e9eefe6b3
|
4
|
+
data.tar.gz: fa22a6ec7eb6d3d3f96cffb07665efcdf33073e4c7bc7e1ea66ca285a5f228a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89f3ba0eae753449d28a1df745dd115a74f1be60369569810a51534ed7febf8ca606d2397904cd17d01010572670fc198417b9e3038e03363ec852b51bffb9ad
|
7
|
+
data.tar.gz: 8b181219cb0f2758ad9e98bf5aa5980a41f215ec711d7f987416bd3dd035f3bc2ed7659016dab35a4099b5eef2bb744893723b4103320e9f730c1f748c6811ee
|
data/README.md
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# Bootstrap Ruby Gem [![Build Status](https://travis-ci.org/twbs/bootstrap-rubygem.svg?branch=master)](https://travis-ci.org/twbs/bootstrap-rubygem) [![Gem](https://img.shields.io/gem/v/bootstrap.svg)](https://rubygems.org/gems/bootstrap)
|
2
2
|
|
3
|
-
[Bootstrap 5][bootstrap-home] ruby gem for Ruby on Rails (*Sprockets*) and Hanami (formerly Lotus).
|
3
|
+
[Bootstrap 5][bootstrap-home] ruby gem for Ruby on Rails (*Sprockets*/*Importmaps*) and Hanami (formerly Lotus).
|
4
4
|
|
5
5
|
For Sass versions of Bootstrap 3 and 2 see [bootstrap-sass](https://github.com/twbs/bootstrap-sass) instead.
|
6
6
|
|
7
|
-
**Ruby on Rails
|
8
|
-
|
7
|
+
**Ruby on Rails Note**: Newer releases of Rails have added additional ways for
|
8
|
+
assets to be processed. The `twbs/bootstrap-rubygem` is for use with Importmaps
|
9
|
+
or Sprockets, but not Webpack.
|
9
10
|
|
10
11
|
## Installation
|
11
12
|
|
@@ -20,7 +21,7 @@ Please see the appropriate guide for your environment of choice:
|
|
20
21
|
Add `bootstrap` to your Gemfile:
|
21
22
|
|
22
23
|
```ruby
|
23
|
-
gem 'bootstrap', '~> 5.2.
|
24
|
+
gem 'bootstrap', '~> 5.2.1'
|
24
25
|
```
|
25
26
|
|
26
27
|
Ensure that `sprockets-rails` is at least v2.3.2.
|
@@ -58,6 +59,25 @@ Bootstrap tooltips and popovers depend on [popper.js] for positioning.
|
|
58
59
|
The `bootstrap` gem already depends on the
|
59
60
|
[popper_js](https://github.com/glebm/popper_js-rubygem) gem.
|
60
61
|
|
62
|
+
#### Importmaps
|
63
|
+
|
64
|
+
You can pin either `bootstrap.js` or `bootstrap.min.js` in `config/importmap.rb`
|
65
|
+
as well as `popper.js`:
|
66
|
+
|
67
|
+
```ruby
|
68
|
+
pin "bootstrap", to: "bootstrap.min.js", preload: true
|
69
|
+
pin "@popperjs/core", to: "popper.js", preload: true
|
70
|
+
```
|
71
|
+
|
72
|
+
Whichever files you pin will need to be added to `config.assets.precompile`:
|
73
|
+
|
74
|
+
```ruby
|
75
|
+
# config/initializers/assets.rb
|
76
|
+
Rails.application.config.assets.precompile += %w(bootstrap.min.js popper.js)
|
77
|
+
```
|
78
|
+
|
79
|
+
#### Sprockets
|
80
|
+
|
61
81
|
Add Bootstrap dependencies and Bootstrap to your `application.js`:
|
62
82
|
|
63
83
|
```js
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap alert.js v5.2.
|
2
|
+
* Bootstrap alert.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
/**
|
18
18
|
* --------------------------------------------------------------------------
|
19
|
-
* Bootstrap (v5.2.
|
19
|
+
* Bootstrap (v5.2.1): alert.js
|
20
20
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
21
21
|
* --------------------------------------------------------------------------
|
22
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap base-component.js v5.2.
|
2
|
+
* Bootstrap base-component.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -17,7 +17,7 @@
|
|
17
17
|
|
18
18
|
/**
|
19
19
|
* --------------------------------------------------------------------------
|
20
|
-
* Bootstrap (v5.2.
|
20
|
+
* Bootstrap (v5.2.1): base-component.js
|
21
21
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
22
22
|
* --------------------------------------------------------------------------
|
23
23
|
*/
|
@@ -25,7 +25,7 @@
|
|
25
25
|
* Constants
|
26
26
|
*/
|
27
27
|
|
28
|
-
const VERSION = '5.2.
|
28
|
+
const VERSION = '5.2.1';
|
29
29
|
/**
|
30
30
|
* Class definition
|
31
31
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap button.js v5.2.
|
2
|
+
* Bootstrap button.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
/**
|
18
18
|
* --------------------------------------------------------------------------
|
19
|
-
* Bootstrap (v5.2.
|
19
|
+
* Bootstrap (v5.2.1): button.js
|
20
20
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
21
21
|
* --------------------------------------------------------------------------
|
22
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap carousel.js v5.2.
|
2
|
+
* Bootstrap carousel.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -19,7 +19,7 @@
|
|
19
19
|
|
20
20
|
/**
|
21
21
|
* --------------------------------------------------------------------------
|
22
|
-
* Bootstrap (v5.2.
|
22
|
+
* Bootstrap (v5.2.1): carousel.js
|
23
23
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
24
24
|
* --------------------------------------------------------------------------
|
25
25
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap collapse.js v5.2.
|
2
|
+
* Bootstrap collapse.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -17,7 +17,7 @@
|
|
17
17
|
|
18
18
|
/**
|
19
19
|
* --------------------------------------------------------------------------
|
20
|
-
* Bootstrap (v5.2.
|
20
|
+
* Bootstrap (v5.2.1): collapse.js
|
21
21
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
22
22
|
* --------------------------------------------------------------------------
|
23
23
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap data.js v5.2.
|
2
|
+
* Bootstrap data.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
/**
|
13
13
|
* --------------------------------------------------------------------------
|
14
|
-
* Bootstrap (v5.2.
|
14
|
+
* Bootstrap (v5.2.1): dom/data.js
|
15
15
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap event-handler.js v5.2.
|
2
|
+
* Bootstrap event-handler.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
/**
|
13
13
|
* --------------------------------------------------------------------------
|
14
|
-
* Bootstrap (v5.2.
|
14
|
+
* Bootstrap (v5.2.1): dom/event-handler.js
|
15
15
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap manipulator.js v5.2.
|
2
|
+
* Bootstrap manipulator.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
/**
|
13
13
|
* --------------------------------------------------------------------------
|
14
|
-
* Bootstrap (v5.2.
|
14
|
+
* Bootstrap (v5.2.1): dom/manipulator.js
|
15
15
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap selector-engine.js v5.2.
|
2
|
+
* Bootstrap selector-engine.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
/**
|
13
13
|
* --------------------------------------------------------------------------
|
14
|
-
* Bootstrap (v5.2.
|
14
|
+
* Bootstrap (v5.2.1): dom/selector-engine.js
|
15
15
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap dropdown.js v5.2.
|
2
|
+
* Bootstrap dropdown.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -37,7 +37,7 @@
|
|
37
37
|
|
38
38
|
/**
|
39
39
|
* --------------------------------------------------------------------------
|
40
|
-
* Bootstrap (v5.2.
|
40
|
+
* Bootstrap (v5.2.1): dropdown.js
|
41
41
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
42
42
|
* --------------------------------------------------------------------------
|
43
43
|
*/
|
@@ -107,8 +107,9 @@
|
|
107
107
|
super(element, config);
|
108
108
|
this._popper = null;
|
109
109
|
this._parent = this._element.parentNode; // dropdown wrapper
|
110
|
+
// todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
|
110
111
|
|
111
|
-
this._menu = SelectorEngine__default.default.
|
112
|
+
this._menu = SelectorEngine__default.default.next(this._element, SELECTOR_MENU)[0] || SelectorEngine__default.default.prev(this._element, SELECTOR_MENU)[0];
|
112
113
|
this._inNavbar = this._detectNavbar();
|
113
114
|
} // Getters
|
114
115
|
|
@@ -424,8 +425,9 @@
|
|
424
425
|
return;
|
425
426
|
}
|
426
427
|
|
427
|
-
event.preventDefault();
|
428
|
-
|
428
|
+
event.preventDefault(); // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
|
429
|
+
|
430
|
+
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine__default.default.prev(this, SELECTOR_DATA_TOGGLE)[0] || SelectorEngine__default.default.next(this, SELECTOR_DATA_TOGGLE)[0];
|
429
431
|
const instance = Dropdown.getOrCreateInstance(getToggleButton);
|
430
432
|
|
431
433
|
if (isUpOrDownEvent) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap modal.js v5.2.
|
2
|
+
* Bootstrap modal.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
/**
|
22
22
|
* --------------------------------------------------------------------------
|
23
|
-
* Bootstrap (v5.2.
|
23
|
+
* Bootstrap (v5.2.1): modal.js
|
24
24
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
25
25
|
* --------------------------------------------------------------------------
|
26
26
|
*/
|
@@ -39,6 +39,7 @@
|
|
39
39
|
const EVENT_SHOW = `show${EVENT_KEY}`;
|
40
40
|
const EVENT_SHOWN = `shown${EVENT_KEY}`;
|
41
41
|
const EVENT_RESIZE = `resize${EVENT_KEY}`;
|
42
|
+
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
|
42
43
|
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`;
|
43
44
|
const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`;
|
44
45
|
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`;
|
@@ -231,20 +232,22 @@
|
|
231
232
|
}
|
232
233
|
});
|
233
234
|
EventHandler__default.default.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {
|
234
|
-
|
235
|
-
//
|
236
|
-
|
237
|
-
|
235
|
+
EventHandler__default.default.one(this._element, EVENT_CLICK_DISMISS, event2 => {
|
236
|
+
// a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
|
237
|
+
if (this._dialog.contains(event.target) || this._dialog.contains(event2.target)) {
|
238
|
+
return;
|
239
|
+
}
|
238
240
|
|
239
|
-
|
240
|
-
|
241
|
+
if (this._config.backdrop === 'static') {
|
242
|
+
this._triggerBackdropTransition();
|
241
243
|
|
242
|
-
|
243
|
-
|
244
|
+
return;
|
245
|
+
}
|
244
246
|
|
245
|
-
|
246
|
-
|
247
|
-
|
247
|
+
if (this._config.backdrop) {
|
248
|
+
this.hide();
|
249
|
+
}
|
250
|
+
});
|
248
251
|
});
|
249
252
|
}
|
250
253
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap offcanvas.js v5.2.
|
2
|
+
* Bootstrap offcanvas.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
/**
|
22
22
|
* --------------------------------------------------------------------------
|
23
|
-
* Bootstrap (v5.2.
|
23
|
+
* Bootstrap (v5.2.1): offcanvas.js
|
24
24
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
25
25
|
* --------------------------------------------------------------------------
|
26
26
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap popover.js v5.2.
|
2
|
+
* Bootstrap popover.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
/**
|
17
17
|
* --------------------------------------------------------------------------
|
18
|
-
* Bootstrap (v5.2.
|
18
|
+
* Bootstrap (v5.2.1): popover.js
|
19
19
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
20
20
|
* --------------------------------------------------------------------------
|
21
21
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap scrollspy.js v5.2.
|
2
|
+
* Bootstrap scrollspy.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -17,7 +17,7 @@
|
|
17
17
|
|
18
18
|
/**
|
19
19
|
* --------------------------------------------------------------------------
|
20
|
-
* Bootstrap (v5.2.
|
20
|
+
* Bootstrap (v5.2.1): scrollspy.js
|
21
21
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
22
22
|
* --------------------------------------------------------------------------
|
23
23
|
*/
|
@@ -48,14 +48,16 @@
|
|
48
48
|
// TODO: v6 @deprecated, keep it for backwards compatibility reasons
|
49
49
|
rootMargin: '0px 0px -25%',
|
50
50
|
smoothScroll: false,
|
51
|
-
target: null
|
51
|
+
target: null,
|
52
|
+
threshold: [0.1, 0.5, 1]
|
52
53
|
};
|
53
54
|
const DefaultType = {
|
54
55
|
offset: '(number|null)',
|
55
56
|
// TODO v6 @deprecated, keep it for backwards compatibility reasons
|
56
57
|
rootMargin: 'string',
|
57
58
|
smoothScroll: 'boolean',
|
58
|
-
target: 'element'
|
59
|
+
target: 'element',
|
60
|
+
threshold: 'array'
|
59
61
|
};
|
60
62
|
/**
|
61
63
|
* Class definition
|
@@ -116,7 +118,14 @@
|
|
116
118
|
|
117
119
|
_configAfterMerge(config) {
|
118
120
|
// TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case
|
119
|
-
config.target = index.getElement(config.target) || document.body;
|
121
|
+
config.target = index.getElement(config.target) || document.body; // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only
|
122
|
+
|
123
|
+
config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin;
|
124
|
+
|
125
|
+
if (typeof config.threshold === 'string') {
|
126
|
+
config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value));
|
127
|
+
}
|
128
|
+
|
120
129
|
return config;
|
121
130
|
}
|
122
131
|
|
@@ -152,8 +161,8 @@
|
|
152
161
|
_getNewObserver() {
|
153
162
|
const options = {
|
154
163
|
root: this._rootElement,
|
155
|
-
threshold:
|
156
|
-
rootMargin: this.
|
164
|
+
threshold: this._config.threshold,
|
165
|
+
rootMargin: this._config.rootMargin
|
157
166
|
};
|
158
167
|
return new IntersectionObserver(entries => this._observerCallback(entries), options);
|
159
168
|
} // The logic of selection
|
@@ -198,11 +207,6 @@
|
|
198
207
|
activate(entry);
|
199
208
|
}
|
200
209
|
}
|
201
|
-
} // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only
|
202
|
-
|
203
|
-
|
204
|
-
_getRootMargin() {
|
205
|
-
return this._config.offset ? `${this._config.offset}px 0px -30%` : this._config.rootMargin;
|
206
210
|
}
|
207
211
|
|
208
212
|
_initializeTargetsAndObservables() {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap tab.js v5.2.
|
2
|
+
* Bootstrap tab.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -17,7 +17,7 @@
|
|
17
17
|
|
18
18
|
/**
|
19
19
|
* --------------------------------------------------------------------------
|
20
|
-
* Bootstrap (v5.2.
|
20
|
+
* Bootstrap (v5.2.1): tab.js
|
21
21
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
22
22
|
* --------------------------------------------------------------------------
|
23
23
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap toast.js v5.2.
|
2
|
+
* Bootstrap toast.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
/**
|
18
18
|
* --------------------------------------------------------------------------
|
19
|
-
* Bootstrap (v5.2.
|
19
|
+
* Bootstrap (v5.2.1): toast.js
|
20
20
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
21
21
|
* --------------------------------------------------------------------------
|
22
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap tooltip.js v5.2.
|
2
|
+
* Bootstrap tooltip.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -37,7 +37,7 @@
|
|
37
37
|
|
38
38
|
/**
|
39
39
|
* --------------------------------------------------------------------------
|
40
|
-
* Bootstrap (v5.2.
|
40
|
+
* Bootstrap (v5.2.1): tooltip.js
|
41
41
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
42
42
|
* --------------------------------------------------------------------------
|
43
43
|
*/
|
@@ -126,7 +126,7 @@
|
|
126
126
|
|
127
127
|
this._isEnabled = true;
|
128
128
|
this._timeout = 0;
|
129
|
-
this._isHovered =
|
129
|
+
this._isHovered = null;
|
130
130
|
this._activeTrigger = {};
|
131
131
|
this._popper = null;
|
132
132
|
this._templateFactory = null;
|
@@ -199,6 +199,10 @@
|
|
199
199
|
this.tip.remove();
|
200
200
|
}
|
201
201
|
|
202
|
+
if (this._config.originalTitle) {
|
203
|
+
this._element.setAttribute('title', this._config.originalTitle);
|
204
|
+
}
|
205
|
+
|
202
206
|
this._disposePopper();
|
203
207
|
|
204
208
|
super.dispose();
|
@@ -259,13 +263,13 @@
|
|
259
263
|
}
|
260
264
|
|
261
265
|
const complete = () => {
|
262
|
-
const previousHoverState = this._isHovered;
|
263
|
-
this._isHovered = false;
|
264
266
|
EventHandler__default.default.trigger(this._element, this.constructor.eventName(EVENT_SHOWN));
|
265
267
|
|
266
|
-
if (
|
268
|
+
if (this._isHovered === false) {
|
267
269
|
this._leave();
|
268
270
|
}
|
271
|
+
|
272
|
+
this._isHovered = false;
|
269
273
|
};
|
270
274
|
|
271
275
|
this._queueCallback(complete, this.tip, this._isAnimated());
|
@@ -296,7 +300,7 @@
|
|
296
300
|
this._activeTrigger[TRIGGER_CLICK] = false;
|
297
301
|
this._activeTrigger[TRIGGER_FOCUS] = false;
|
298
302
|
this._activeTrigger[TRIGGER_HOVER] = false;
|
299
|
-
this._isHovered =
|
303
|
+
this._isHovered = null; // it is a trick to support manual triggering
|
300
304
|
|
301
305
|
const complete = () => {
|
302
306
|
if (this._isWithActiveTrigger()) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap backdrop.js v5.2.
|
2
|
+
* Bootstrap backdrop.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
/**
|
18
18
|
* --------------------------------------------------------------------------
|
19
|
-
* Bootstrap (v5.2.
|
19
|
+
* Bootstrap (v5.2.1): util/backdrop.js
|
20
20
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
21
21
|
* --------------------------------------------------------------------------
|
22
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap component-functions.js v5.2.
|
2
|
+
* Bootstrap component-functions.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
/**
|
17
17
|
* --------------------------------------------------------------------------
|
18
|
-
* Bootstrap (v5.2.
|
18
|
+
* Bootstrap (v5.2.1): util/component-functions.js
|
19
19
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
20
20
|
* --------------------------------------------------------------------------
|
21
21
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap config.js v5.2.
|
2
|
+
* Bootstrap config.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
/**
|
17
17
|
* --------------------------------------------------------------------------
|
18
|
-
* Bootstrap (v5.2.
|
18
|
+
* Bootstrap (v5.2.1): util/config.js
|
19
19
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
20
20
|
* --------------------------------------------------------------------------
|
21
21
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap focustrap.js v5.2.
|
2
|
+
* Bootstrap focustrap.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -17,7 +17,7 @@
|
|
17
17
|
|
18
18
|
/**
|
19
19
|
* --------------------------------------------------------------------------
|
20
|
-
* Bootstrap (v5.2.
|
20
|
+
* Bootstrap (v5.2.1): util/focustrap.js
|
21
21
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
22
22
|
* --------------------------------------------------------------------------
|
23
23
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap index.js v5.2.
|
2
|
+
* Bootstrap index.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
/**
|
13
13
|
* --------------------------------------------------------------------------
|
14
|
-
* Bootstrap (v5.2.
|
14
|
+
* Bootstrap (v5.2.1): util/index.js
|
15
15
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap sanitizer.js v5.2.
|
2
|
+
* Bootstrap sanitizer.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -11,7 +11,7 @@
|
|
11
11
|
|
12
12
|
/**
|
13
13
|
* --------------------------------------------------------------------------
|
14
|
-
* Bootstrap (v5.2.
|
14
|
+
* Bootstrap (v5.2.1): util/sanitizer.js
|
15
15
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap scrollbar.js v5.2.
|
2
|
+
* Bootstrap scrollbar.js v5.2.1 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
/**
|
18
18
|
* --------------------------------------------------------------------------
|
19
|
-
* Bootstrap (v5.2.
|
19
|
+
* Bootstrap (v5.2.1): util/scrollBar.js
|
20
20
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
21
21
|
* --------------------------------------------------------------------------
|
22
22
|
*/
|