bootstrap 5.1.3 → 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 (95) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -4
  3. data/assets/javascripts/bootstrap/alert.js +11 -146
  4. data/assets/javascripts/bootstrap/base-component.js +37 -120
  5. data/assets/javascripts/bootstrap/button.js +10 -74
  6. data/assets/javascripts/bootstrap/carousel.js +213 -485
  7. data/assets/javascripts/bootstrap/collapse.js +65 -249
  8. data/assets/javascripts/bootstrap/dom/data.js +3 -5
  9. data/assets/javascripts/bootstrap/dom/event-handler.js +94 -132
  10. data/assets/javascripts/bootstrap/dom/manipulator.js +23 -27
  11. data/assets/javascripts/bootstrap/dom/selector-engine.js +16 -58
  12. data/assets/javascripts/bootstrap/dropdown.js +103 -317
  13. data/assets/javascripts/bootstrap/modal.js +107 -749
  14. data/assets/javascripts/bootstrap/offcanvas.js +90 -659
  15. data/assets/javascripts/bootstrap/popover.js +36 -118
  16. data/assets/javascripts/bootstrap/scrollspy.js +183 -262
  17. data/assets/javascripts/bootstrap/tab.js +215 -214
  18. data/assets/javascripts/bootstrap/toast.js +36 -218
  19. data/assets/javascripts/bootstrap/tooltip.js +280 -629
  20. data/assets/javascripts/bootstrap/util/backdrop.js +165 -0
  21. data/assets/javascripts/bootstrap/util/component-functions.js +46 -0
  22. data/assets/javascripts/bootstrap/util/config.js +79 -0
  23. data/assets/javascripts/bootstrap/util/focustrap.js +129 -0
  24. data/assets/javascripts/bootstrap/util/index.js +350 -0
  25. data/assets/javascripts/bootstrap/util/sanitizer.js +122 -0
  26. data/assets/javascripts/bootstrap/util/scrollbar.js +138 -0
  27. data/assets/javascripts/bootstrap/util/swipe.js +155 -0
  28. data/assets/javascripts/bootstrap/util/template-factory.js +177 -0
  29. data/assets/javascripts/bootstrap-global-this-define.js +1 -1
  30. data/assets/javascripts/bootstrap-sprockets.js +17 -8
  31. data/assets/javascripts/bootstrap.js +2093 -1881
  32. data/assets/javascripts/bootstrap.min.js +3 -3
  33. data/assets/stylesheets/_bootstrap-grid.scss +3 -6
  34. data/assets/stylesheets/_bootstrap-reboot.scss +3 -7
  35. data/assets/stylesheets/_bootstrap.scss +4 -6
  36. data/assets/stylesheets/bootstrap/_accordion.scss +56 -25
  37. data/assets/stylesheets/bootstrap/_alert.scss +18 -4
  38. data/assets/stylesheets/bootstrap/_badge.scss +14 -5
  39. data/assets/stylesheets/bootstrap/_breadcrumb.scss +22 -10
  40. data/assets/stylesheets/bootstrap/_button-group.scss +4 -1
  41. data/assets/stylesheets/bootstrap/_buttons.scss +125 -29
  42. data/assets/stylesheets/bootstrap/_card.scss +55 -37
  43. data/assets/stylesheets/bootstrap/_close.scss +1 -1
  44. data/assets/stylesheets/bootstrap/_containers.scss +1 -1
  45. data/assets/stylesheets/bootstrap/_dropdown.scss +85 -76
  46. data/assets/stylesheets/bootstrap/_functions.scss +8 -8
  47. data/assets/stylesheets/bootstrap/_grid.scss +3 -3
  48. data/assets/stylesheets/bootstrap/_helpers.scss +1 -0
  49. data/assets/stylesheets/bootstrap/_list-group.scss +48 -30
  50. data/assets/stylesheets/bootstrap/_maps.scss +54 -0
  51. data/assets/stylesheets/bootstrap/_modal.scss +71 -43
  52. data/assets/stylesheets/bootstrap/_nav.scss +53 -20
  53. data/assets/stylesheets/bootstrap/_navbar.scss +93 -150
  54. data/assets/stylesheets/bootstrap/_offcanvas.scss +120 -59
  55. data/assets/stylesheets/bootstrap/_pagination.scss +66 -21
  56. data/assets/stylesheets/bootstrap/_placeholders.scss +1 -1
  57. data/assets/stylesheets/bootstrap/_popover.scss +90 -52
  58. data/assets/stylesheets/bootstrap/_progress.scss +20 -9
  59. data/assets/stylesheets/bootstrap/_reboot.scss +25 -40
  60. data/assets/stylesheets/bootstrap/_root.scss +40 -21
  61. data/assets/stylesheets/bootstrap/_spinners.scss +38 -22
  62. data/assets/stylesheets/bootstrap/_tables.scss +32 -23
  63. data/assets/stylesheets/bootstrap/_toasts.scss +38 -16
  64. data/assets/stylesheets/bootstrap/_tooltip.scss +61 -56
  65. data/assets/stylesheets/bootstrap/_type.scss +2 -0
  66. data/assets/stylesheets/bootstrap/_utilities.scss +43 -26
  67. data/assets/stylesheets/bootstrap/_variables.scss +128 -135
  68. data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +3 -6
  69. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +15 -3
  70. data/assets/stylesheets/bootstrap/forms/_form-check.scss +28 -5
  71. data/assets/stylesheets/bootstrap/forms/_form-control.scss +12 -37
  72. data/assets/stylesheets/bootstrap/forms/_form-select.scss +0 -1
  73. data/assets/stylesheets/bootstrap/forms/_input-group.scss +19 -8
  74. data/assets/stylesheets/bootstrap/helpers/_color-bg.scss +10 -0
  75. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +2 -2
  76. data/assets/stylesheets/bootstrap/helpers/_position.scss +7 -1
  77. data/assets/stylesheets/bootstrap/helpers/_ratio.scss +2 -2
  78. data/assets/stylesheets/bootstrap/helpers/_vr.scss +1 -1
  79. data/assets/stylesheets/bootstrap/mixins/_alert.scss +7 -3
  80. data/assets/stylesheets/bootstrap/mixins/_banner.scss +9 -0
  81. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +8 -8
  82. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +32 -95
  83. data/assets/stylesheets/bootstrap/mixins/_container.scss +4 -2
  84. data/assets/stylesheets/bootstrap/mixins/_forms.scss +18 -10
  85. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +1 -1
  86. data/assets/stylesheets/bootstrap/mixins/_grid.scss +12 -12
  87. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +4 -25
  88. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
  89. data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +12 -9
  90. data/assets/stylesheets/bootstrap/mixins/_utilities.scss +13 -5
  91. data/bootstrap.gemspec +1 -1
  92. data/lib/bootstrap/version.rb +2 -2
  93. data/tasks/updater/js.rb +10 -5
  94. data/tasks/updater.rb +2 -2
  95. metadata +16 -4
@@ -1,13 +1,13 @@
1
1
  /*!
2
- * Bootstrap popover.js v5.1.3 (https://getbootstrap.com/)
3
- * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
2
+ * Bootstrap popover.js v5.2.2 (https://getbootstrap.com/)
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
  */
6
6
  (function (global, factory) {
7
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./tooltip.js')) :
8
- typeof define === 'function' && define.amd ? define(['./tooltip'], factory) :
9
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.Tooltip));
10
- })(this, (function (Tooltip) { 'use strict';
7
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./util/index'), require('./tooltip')) :
8
+ typeof define === 'function' && define.amd ? define(['./util/index', './tooltip'], factory) :
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Popover = factory(global.Index, global.Tooltip));
10
+ })(this, (function (index, Tooltip) { 'use strict';
11
11
 
12
12
  const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { default: e };
13
13
 
@@ -15,103 +15,29 @@
15
15
 
16
16
  /**
17
17
  * --------------------------------------------------------------------------
18
- * Bootstrap (v5.1.3): util/index.js
19
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
20
- * --------------------------------------------------------------------------
21
- */
22
-
23
- const getjQuery = () => {
24
- const {
25
- jQuery
26
- } = window;
27
-
28
- if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
29
- return jQuery;
30
- }
31
-
32
- return null;
33
- };
34
-
35
- const DOMContentLoadedCallbacks = [];
36
-
37
- const onDOMContentLoaded = callback => {
38
- if (document.readyState === 'loading') {
39
- // add listener on the first call when the document is in loading state
40
- if (!DOMContentLoadedCallbacks.length) {
41
- document.addEventListener('DOMContentLoaded', () => {
42
- DOMContentLoadedCallbacks.forEach(callback => callback());
43
- });
44
- }
45
-
46
- DOMContentLoadedCallbacks.push(callback);
47
- } else {
48
- callback();
49
- }
50
- };
51
-
52
- const defineJQueryPlugin = plugin => {
53
- onDOMContentLoaded(() => {
54
- const $ = getjQuery();
55
- /* istanbul ignore if */
56
-
57
- if ($) {
58
- const name = plugin.NAME;
59
- const JQUERY_NO_CONFLICT = $.fn[name];
60
- $.fn[name] = plugin.jQueryInterface;
61
- $.fn[name].Constructor = plugin;
62
-
63
- $.fn[name].noConflict = () => {
64
- $.fn[name] = JQUERY_NO_CONFLICT;
65
- return plugin.jQueryInterface;
66
- };
67
- }
68
- });
69
- };
70
-
71
- /**
72
- * --------------------------------------------------------------------------
73
- * Bootstrap (v5.1.3): popover.js
18
+ * Bootstrap (v5.2.2): popover.js
74
19
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
75
20
  * --------------------------------------------------------------------------
76
21
  */
77
22
  /**
78
- * ------------------------------------------------------------------------
79
23
  * Constants
80
- * ------------------------------------------------------------------------
81
24
  */
82
25
 
83
26
  const NAME = 'popover';
84
- const DATA_KEY = 'bs.popover';
85
- const EVENT_KEY = `.${DATA_KEY}`;
86
- const CLASS_PREFIX = 'bs-popover';
27
+ const SELECTOR_TITLE = '.popover-header';
28
+ const SELECTOR_CONTENT = '.popover-body';
87
29
  const Default = { ...Tooltip__default.default.Default,
88
- placement: 'right',
89
- offset: [0, 8],
90
- trigger: 'click',
91
30
  content: '',
92
- template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
31
+ offset: [0, 8],
32
+ placement: 'right',
33
+ template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>',
34
+ trigger: 'click'
93
35
  };
94
36
  const DefaultType = { ...Tooltip__default.default.DefaultType,
95
- content: '(string|element|function)'
96
- };
97
- const Event = {
98
- HIDE: `hide${EVENT_KEY}`,
99
- HIDDEN: `hidden${EVENT_KEY}`,
100
- SHOW: `show${EVENT_KEY}`,
101
- SHOWN: `shown${EVENT_KEY}`,
102
- INSERTED: `inserted${EVENT_KEY}`,
103
- CLICK: `click${EVENT_KEY}`,
104
- FOCUSIN: `focusin${EVENT_KEY}`,
105
- FOCUSOUT: `focusout${EVENT_KEY}`,
106
- MOUSEENTER: `mouseenter${EVENT_KEY}`,
107
- MOUSELEAVE: `mouseleave${EVENT_KEY}`
37
+ content: '(null|string|element|function)'
108
38
  };
109
- const SELECTOR_TITLE = '.popover-header';
110
- const SELECTOR_CONTENT = '.popover-body';
111
39
  /**
112
- * ------------------------------------------------------------------------
113
- * Class Definition
114
- * ------------------------------------------------------------------------
40
+ * Class definition
115
41
  */
116
42
 
117
43
  class Popover extends Tooltip__default.default {
@@ -120,36 +46,29 @@
120
46
  return Default;
121
47
  }
122
48
 
123
- static get NAME() {
124
- return NAME;
125
- }
126
-
127
- static get Event() {
128
- return Event;
129
- }
130
-
131
49
  static get DefaultType() {
132
50
  return DefaultType;
133
- } // Overrides
134
-
135
-
136
- isWithContent() {
137
- return this.getTitle() || this._getContent();
138
51
  }
139
52
 
140
- setContent(tip) {
141
- this._sanitizeAndSetContent(tip, this.getTitle(), SELECTOR_TITLE);
53
+ static get NAME() {
54
+ return NAME;
55
+ } // Overrides
56
+
142
57
 
143
- this._sanitizeAndSetContent(tip, this._getContent(), SELECTOR_CONTENT);
58
+ _isWithContent() {
59
+ return this._getTitle() || this._getContent();
144
60
  } // Private
145
61
 
146
62
 
147
- _getContent() {
148
- return this._resolvePossibleFunction(this._config.content);
63
+ _getContentForTemplate() {
64
+ return {
65
+ [SELECTOR_TITLE]: this._getTitle(),
66
+ [SELECTOR_CONTENT]: this._getContent()
67
+ };
149
68
  }
150
69
 
151
- _getBasicClassPrefix() {
152
- return CLASS_PREFIX;
70
+ _getContent() {
71
+ return this._resolvePossibleFunction(this._config.content);
153
72
  } // Static
154
73
 
155
74
 
@@ -157,26 +76,25 @@
157
76
  return this.each(function () {
158
77
  const data = Popover.getOrCreateInstance(this, config);
159
78
 
160
- if (typeof config === 'string') {
161
- if (typeof data[config] === 'undefined') {
162
- throw new TypeError(`No method named "${config}"`);
163
- }
79
+ if (typeof config !== 'string') {
80
+ return;
81
+ }
164
82
 
165
- data[config]();
83
+ if (typeof data[config] === 'undefined') {
84
+ throw new TypeError(`No method named "${config}"`);
166
85
  }
86
+
87
+ data[config]();
167
88
  });
168
89
  }
169
90
 
170
91
  }
171
92
  /**
172
- * ------------------------------------------------------------------------
173
93
  * jQuery
174
- * ------------------------------------------------------------------------
175
- * add .Popover to jQuery only if jQuery is present
176
94
  */
177
95
 
178
96
 
179
- defineJQueryPlugin(Popover);
97
+ index.defineJQueryPlugin(Popover);
180
98
 
181
99
  return Popover;
182
100