bootstrap 5.2.0 → 5.2.2

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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -4
  3. data/assets/javascripts/bootstrap/alert.js +2 -2
  4. data/assets/javascripts/bootstrap/base-component.js +3 -3
  5. data/assets/javascripts/bootstrap/button.js +2 -2
  6. data/assets/javascripts/bootstrap/carousel.js +2 -2
  7. data/assets/javascripts/bootstrap/collapse.js +2 -2
  8. data/assets/javascripts/bootstrap/dom/data.js +2 -2
  9. data/assets/javascripts/bootstrap/dom/event-handler.js +2 -2
  10. data/assets/javascripts/bootstrap/dom/manipulator.js +2 -2
  11. data/assets/javascripts/bootstrap/dom/selector-engine.js +2 -2
  12. data/assets/javascripts/bootstrap/dropdown.js +7 -5
  13. data/assets/javascripts/bootstrap/modal.js +16 -13
  14. data/assets/javascripts/bootstrap/offcanvas.js +2 -2
  15. data/assets/javascripts/bootstrap/popover.js +2 -2
  16. data/assets/javascripts/bootstrap/scrollspy.js +16 -12
  17. data/assets/javascripts/bootstrap/tab.js +5 -5
  18. data/assets/javascripts/bootstrap/toast.js +10 -6
  19. data/assets/javascripts/bootstrap/tooltip.js +31 -37
  20. data/assets/javascripts/bootstrap/util/backdrop.js +2 -2
  21. data/assets/javascripts/bootstrap/util/component-functions.js +2 -2
  22. data/assets/javascripts/bootstrap/util/config.js +2 -2
  23. data/assets/javascripts/bootstrap/util/focustrap.js +2 -2
  24. data/assets/javascripts/bootstrap/util/index.js +2 -2
  25. data/assets/javascripts/bootstrap/util/sanitizer.js +2 -2
  26. data/assets/javascripts/bootstrap/util/scrollbar.js +2 -2
  27. data/assets/javascripts/bootstrap/util/swipe.js +2 -2
  28. data/assets/javascripts/bootstrap/util/template-factory.js +2 -2
  29. data/assets/javascripts/bootstrap-sprockets.js +10 -10
  30. data/assets/javascripts/bootstrap.js +102 -95
  31. data/assets/javascripts/bootstrap.min.js +2 -2
  32. data/assets/stylesheets/bootstrap/_accordion.scss +7 -4
  33. data/assets/stylesheets/bootstrap/_button-group.scss +1 -1
  34. data/assets/stylesheets/bootstrap/_buttons.scss +28 -7
  35. data/assets/stylesheets/bootstrap/_dropdown.scss +2 -1
  36. data/assets/stylesheets/bootstrap/_functions.scss +1 -1
  37. data/assets/stylesheets/bootstrap/_list-group.scss +6 -5
  38. data/assets/stylesheets/bootstrap/_modal.scss +1 -1
  39. data/assets/stylesheets/bootstrap/_nav.scss +2 -2
  40. data/assets/stylesheets/bootstrap/_navbar.scss +2 -0
  41. data/assets/stylesheets/bootstrap/_offcanvas.scss +5 -4
  42. data/assets/stylesheets/bootstrap/_pagination.scss +1 -1
  43. data/assets/stylesheets/bootstrap/_popover.scss +5 -5
  44. data/assets/stylesheets/bootstrap/_toasts.scss +5 -2
  45. data/assets/stylesheets/bootstrap/_variables.scss +18 -17
  46. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +1 -0
  47. data/assets/stylesheets/bootstrap/forms/_input-group.scss +7 -4
  48. data/assets/stylesheets/bootstrap/mixins/_banner.scss +2 -2
  49. data/assets/stylesheets/bootstrap/mixins/_forms.scss +10 -10
  50. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +2 -2
  51. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +1 -1
  52. data/bootstrap.gemspec +1 -1
  53. data/lib/bootstrap/version.rb +2 -2
  54. data/tasks/updater/js.rb +1 -1
  55. data/tasks/updater.rb +2 -2
  56. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49075220be31b7b440684f6a22eb7ea6fcbff5860c940589c46aecbc2d20f6c1
4
- data.tar.gz: 93841930e2afddf90c28b58a4273ea89aafd543fad464d329e7fcc255cecf479
3
+ metadata.gz: a293b6bb0f077b3634982eeed77c89bfc3631f890f3df2027ddc45ceab3b18a5
4
+ data.tar.gz: d8fd6730b835bbe608e62d26359b7530a52cbadbccbe7d3589b895ac37944f79
5
5
  SHA512:
6
- metadata.gz: a9b0c4f2b4b41fd480484a246866b26762e9f5850b63b1c60eb12b1e7c180f70703254bf07aae93390a4b38a63db25f670fbf46eca0fec2f731a829825340459
7
- data.tar.gz: 6737dd3980d44c004a05f1910aeec8f7b8e068235db3e2371622744e9e8d1a617e8c1a91d138ee86225cc521102d49c2d6cf28d02bf366c11d3a0e3f6c56ccfd
6
+ metadata.gz: 6fcbeba2892da722b611946a283a166fa57cc44f80e0ccb8096f903e0d0e9f5d5dd69fbead50e819ce35184a62cb9df29d7aceb59bc215b90e75c8020fde1516
7
+ data.tar.gz: 8931244575e0476fba2ea27f1d7524043755a2237035abfd6aa1af5fe9da64001f826350f0631d9a7b9164091c4d766b8c0aa80f6d85ee78b8384b03b6b141a8
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 6 Note:**:
8
- With the release of Rails 6 there have been some minor changes made to the default configuration for The Asset Pipeline. In specific, by default _Sprockets no longer processes JavaScript_ and instead Webpack is set as the default. The `twbs/bootstrap-rubygem` is for use with Sprockets not Webpack.
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.0'
24
+ gem 'bootstrap', '~> 5.2.2'
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.0 (https://getbootstrap.com/)
2
+ * Bootstrap alert.js v5.2.2 (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.0): alert.js
19
+ * Bootstrap (v5.2.2): 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.0 (https://getbootstrap.com/)
2
+ * Bootstrap base-component.js v5.2.2 (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.0): base-component.js
20
+ * Bootstrap (v5.2.2): 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.0';
28
+ const VERSION = '5.2.2';
29
29
  /**
30
30
  * Class definition
31
31
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap button.js v5.2.0 (https://getbootstrap.com/)
2
+ * Bootstrap button.js v5.2.2 (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.0): button.js
19
+ * Bootstrap (v5.2.2): 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.0 (https://getbootstrap.com/)
2
+ * Bootstrap carousel.js v5.2.2 (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.0): carousel.js
22
+ * Bootstrap (v5.2.2): 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.0 (https://getbootstrap.com/)
2
+ * Bootstrap collapse.js v5.2.2 (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.0): collapse.js
20
+ * Bootstrap (v5.2.2): 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.0 (https://getbootstrap.com/)
2
+ * Bootstrap data.js v5.2.2 (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.0): dom/data.js
14
+ * Bootstrap (v5.2.2): 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.0 (https://getbootstrap.com/)
2
+ * Bootstrap event-handler.js v5.2.2 (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.0): dom/event-handler.js
14
+ * Bootstrap (v5.2.2): 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.0 (https://getbootstrap.com/)
2
+ * Bootstrap manipulator.js v5.2.2 (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.0): dom/manipulator.js
14
+ * Bootstrap (v5.2.2): 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.0 (https://getbootstrap.com/)
2
+ * Bootstrap selector-engine.js v5.2.2 (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.0): dom/selector-engine.js
14
+ * Bootstrap (v5.2.2): 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.0 (https://getbootstrap.com/)
2
+ * Bootstrap dropdown.js v5.2.2 (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.0): dropdown.js
40
+ * Bootstrap (v5.2.2): 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.findOne(SELECTOR_MENU, this._parent);
112
+ this._menu = SelectorEngine__default.default.next(this._element, SELECTOR_MENU)[0] || SelectorEngine__default.default.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine__default.default.findOne(SELECTOR_MENU, this._parent);
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
- const getToggleButton = SelectorEngine__default.default.findOne(SELECTOR_DATA_TOGGLE, event.delegateTarget.parentNode);
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] || SelectorEngine__default.default.findOne(SELECTOR_DATA_TOGGLE, event.delegateTarget.parentNode);
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.0 (https://getbootstrap.com/)
2
+ * Bootstrap modal.js v5.2.2 (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.0): modal.js
23
+ * Bootstrap (v5.2.2): 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
- if (event.target !== event.currentTarget) {
235
- // click is inside modal-dialog
236
- return;
237
- }
235
+ // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
236
+ EventHandler__default.default.one(this._element, EVENT_CLICK_DISMISS, event2 => {
237
+ if (this._element !== event.target || this._element !== event2.target) {
238
+ return;
239
+ }
238
240
 
239
- if (this._config.backdrop === 'static') {
240
- this._triggerBackdropTransition();
241
+ if (this._config.backdrop === 'static') {
242
+ this._triggerBackdropTransition();
241
243
 
242
- return;
243
- }
244
+ return;
245
+ }
244
246
 
245
- if (this._config.backdrop) {
246
- this.hide();
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.0 (https://getbootstrap.com/)
2
+ * Bootstrap offcanvas.js v5.2.2 (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.0): offcanvas.js
23
+ * Bootstrap (v5.2.2): 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.0 (https://getbootstrap.com/)
2
+ * Bootstrap popover.js v5.2.2 (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.0): popover.js
18
+ * Bootstrap (v5.2.2): 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.0 (https://getbootstrap.com/)
2
+ * Bootstrap scrollspy.js v5.2.2 (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.0): scrollspy.js
20
+ * Bootstrap (v5.2.2): 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: [0.1, 0.5, 1],
156
- rootMargin: this._getRootMargin()
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.0 (https://getbootstrap.com/)
2
+ * Bootstrap tab.js v5.2.2 (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.0): tab.js
20
+ * Bootstrap (v5.2.2): tab.js
21
21
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
22
22
  * --------------------------------------------------------------------------
23
23
  */
@@ -45,7 +45,6 @@
45
45
  const CLASS_DROPDOWN = 'dropdown';
46
46
  const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
47
47
  const SELECTOR_DROPDOWN_MENU = '.dropdown-menu';
48
- const SELECTOR_DROPDOWN_ITEM = '.dropdown-item';
49
48
  const NOT_SELECTOR_DROPDOWN_TOGGLE = ':not(.dropdown-toggle)';
50
49
  const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]';
51
50
  const SELECTOR_OUTER = '.nav-item, .list-group-item';
@@ -124,7 +123,6 @@
124
123
  return;
125
124
  }
126
125
 
127
- element.focus();
128
126
  element.removeAttribute('tabindex');
129
127
  element.setAttribute('aria-selected', true);
130
128
 
@@ -180,6 +178,9 @@
180
178
  const nextActiveElement = index.getNextActiveElement(this._getChildren().filter(element => !index.isDisabled(element)), event.target, isNext, true);
181
179
 
182
180
  if (nextActiveElement) {
181
+ nextActiveElement.focus({
182
+ preventScroll: true
183
+ });
183
184
  Tab.getOrCreateInstance(nextActiveElement).show();
184
185
  }
185
186
  }
@@ -255,7 +256,6 @@
255
256
 
256
257
  toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE);
257
258
  toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW);
258
- toggle(SELECTOR_DROPDOWN_ITEM, CLASS_NAME_ACTIVE);
259
259
  outerElem.setAttribute('aria-expanded', open);
260
260
  }
261
261
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap toast.js v5.2.0 (https://getbootstrap.com/)
2
+ * Bootstrap toast.js v5.2.2 (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.0): toast.js
19
+ * Bootstrap (v5.2.2): toast.js
20
20
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
21
21
  * --------------------------------------------------------------------------
22
22
  */
@@ -167,13 +167,17 @@
167
167
  switch (event.type) {
168
168
  case 'mouseover':
169
169
  case 'mouseout':
170
- this._hasMouseInteraction = isInteracting;
171
- break;
170
+ {
171
+ this._hasMouseInteraction = isInteracting;
172
+ break;
173
+ }
172
174
 
173
175
  case 'focusin':
174
176
  case 'focusout':
175
- this._hasKeyboardInteraction = isInteracting;
176
- break;
177
+ {
178
+ this._hasKeyboardInteraction = isInteracting;
179
+ break;
180
+ }
177
181
  }
178
182
 
179
183
  if (isInteracting) {