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.
- 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 +5 -5
- data/assets/javascripts/bootstrap/toast.js +10 -6
- data/assets/javascripts/bootstrap/tooltip.js +31 -37
- 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-sprockets.js +10 -10
- data/assets/javascripts/bootstrap.js +102 -95
- 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 +28 -7
- 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 +5 -2
- data/assets/stylesheets/bootstrap/_variables.scss +18 -17
- 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/_table-variants.scss +2 -2
- 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
- data/tasks/updater.rb +2 -2
- metadata +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Bootstrap tooltip.js v5.2.
|
|
2
|
+
* Bootstrap tooltip.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.
|
|
40
|
+
* Bootstrap (v5.2.2): 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;
|
|
@@ -135,6 +135,10 @@
|
|
|
135
135
|
this.tip = null;
|
|
136
136
|
|
|
137
137
|
this._setListeners();
|
|
138
|
+
|
|
139
|
+
if (!this._config.selector) {
|
|
140
|
+
this._fixTitle();
|
|
141
|
+
}
|
|
138
142
|
} // Getters
|
|
139
143
|
|
|
140
144
|
|
|
@@ -163,24 +167,12 @@
|
|
|
163
167
|
this._isEnabled = !this._isEnabled;
|
|
164
168
|
}
|
|
165
169
|
|
|
166
|
-
toggle(
|
|
170
|
+
toggle() {
|
|
167
171
|
if (!this._isEnabled) {
|
|
168
172
|
return;
|
|
169
173
|
}
|
|
170
174
|
|
|
171
|
-
|
|
172
|
-
const context = this._initializeOnDelegatedTarget(event);
|
|
173
|
-
|
|
174
|
-
context._activeTrigger.click = !context._activeTrigger.click;
|
|
175
|
-
|
|
176
|
-
if (context._isWithActiveTrigger()) {
|
|
177
|
-
context._enter();
|
|
178
|
-
} else {
|
|
179
|
-
context._leave();
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
175
|
+
this._activeTrigger.click = !this._activeTrigger.click;
|
|
184
176
|
|
|
185
177
|
if (this._isShown()) {
|
|
186
178
|
this._leave();
|
|
@@ -199,6 +191,10 @@
|
|
|
199
191
|
this.tip.remove();
|
|
200
192
|
}
|
|
201
193
|
|
|
194
|
+
if (this._element.getAttribute('data-bs-original-title')) {
|
|
195
|
+
this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'));
|
|
196
|
+
}
|
|
197
|
+
|
|
202
198
|
this._disposePopper();
|
|
203
199
|
|
|
204
200
|
super.dispose();
|
|
@@ -259,13 +255,13 @@
|
|
|
259
255
|
}
|
|
260
256
|
|
|
261
257
|
const complete = () => {
|
|
262
|
-
const previousHoverState = this._isHovered;
|
|
263
|
-
this._isHovered = false;
|
|
264
258
|
EventHandler__default.default.trigger(this._element, this.constructor.eventName(EVENT_SHOWN));
|
|
265
259
|
|
|
266
|
-
if (
|
|
260
|
+
if (this._isHovered === false) {
|
|
267
261
|
this._leave();
|
|
268
262
|
}
|
|
263
|
+
|
|
264
|
+
this._isHovered = false;
|
|
269
265
|
};
|
|
270
266
|
|
|
271
267
|
this._queueCallback(complete, this.tip, this._isAnimated());
|
|
@@ -296,7 +292,7 @@
|
|
|
296
292
|
this._activeTrigger[TRIGGER_CLICK] = false;
|
|
297
293
|
this._activeTrigger[TRIGGER_FOCUS] = false;
|
|
298
294
|
this._activeTrigger[TRIGGER_HOVER] = false;
|
|
299
|
-
this._isHovered =
|
|
295
|
+
this._isHovered = null; // it is a trick to support manual triggering
|
|
300
296
|
|
|
301
297
|
const complete = () => {
|
|
302
298
|
if (this._isWithActiveTrigger()) {
|
|
@@ -389,7 +385,7 @@
|
|
|
389
385
|
}
|
|
390
386
|
|
|
391
387
|
_getTitle() {
|
|
392
|
-
return this._resolvePossibleFunction(this._config.title) || this.
|
|
388
|
+
return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title');
|
|
393
389
|
} // Private
|
|
394
390
|
|
|
395
391
|
|
|
@@ -475,7 +471,11 @@
|
|
|
475
471
|
|
|
476
472
|
for (const trigger of triggers) {
|
|
477
473
|
if (trigger === 'click') {
|
|
478
|
-
EventHandler__default.default.on(this._element, this.constructor.eventName(EVENT_CLICK), this._config.selector, event =>
|
|
474
|
+
EventHandler__default.default.on(this._element, this.constructor.eventName(EVENT_CLICK), this._config.selector, event => {
|
|
475
|
+
const context = this._initializeOnDelegatedTarget(event);
|
|
476
|
+
|
|
477
|
+
context.toggle();
|
|
478
|
+
});
|
|
479
479
|
} else if (trigger !== TRIGGER_MANUAL) {
|
|
480
480
|
const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN);
|
|
481
481
|
const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT);
|
|
@@ -503,19 +503,10 @@
|
|
|
503
503
|
};
|
|
504
504
|
|
|
505
505
|
EventHandler__default.default.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
|
|
506
|
-
|
|
507
|
-
if (this._config.selector) {
|
|
508
|
-
this._config = { ...this._config,
|
|
509
|
-
trigger: 'manual',
|
|
510
|
-
selector: ''
|
|
511
|
-
};
|
|
512
|
-
} else {
|
|
513
|
-
this._fixTitle();
|
|
514
|
-
}
|
|
515
506
|
}
|
|
516
507
|
|
|
517
508
|
_fixTitle() {
|
|
518
|
-
const title = this.
|
|
509
|
+
const title = this._element.getAttribute('title');
|
|
519
510
|
|
|
520
511
|
if (!title) {
|
|
521
512
|
return;
|
|
@@ -525,6 +516,9 @@
|
|
|
525
516
|
this._element.setAttribute('aria-label', title);
|
|
526
517
|
}
|
|
527
518
|
|
|
519
|
+
this._element.setAttribute('data-bs-original-title', title); // DO NOT USE IT. Is only for backwards compatibility
|
|
520
|
+
|
|
521
|
+
|
|
528
522
|
this._element.removeAttribute('title');
|
|
529
523
|
}
|
|
530
524
|
|
|
@@ -596,8 +590,6 @@
|
|
|
596
590
|
};
|
|
597
591
|
}
|
|
598
592
|
|
|
599
|
-
config.originalTitle = this._element.getAttribute('title') || '';
|
|
600
|
-
|
|
601
593
|
if (typeof config.title === 'number') {
|
|
602
594
|
config.title = config.title.toString();
|
|
603
595
|
}
|
|
@@ -616,11 +608,13 @@
|
|
|
616
608
|
if (this.constructor.Default[key] !== this._config[key]) {
|
|
617
609
|
config[key] = this._config[key];
|
|
618
610
|
}
|
|
619
|
-
}
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
config.selector = false;
|
|
614
|
+
config.trigger = 'manual'; // In the future can be replaced with:
|
|
620
615
|
// const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
|
|
621
616
|
// `Object.fromEntries(keysWithDifferentValues)`
|
|
622
617
|
|
|
623
|
-
|
|
624
618
|
return config;
|
|
625
619
|
}
|
|
626
620
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Bootstrap backdrop.js v5.2.
|
|
2
|
+
* Bootstrap backdrop.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.
|
|
19
|
+
* Bootstrap (v5.2.2): 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.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.
|
|
18
|
+
* Bootstrap (v5.2.2): 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.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.
|
|
18
|
+
* Bootstrap (v5.2.2): 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.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.
|
|
20
|
+
* Bootstrap (v5.2.2): 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.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.
|
|
14
|
+
* Bootstrap (v5.2.2): 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.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.
|
|
14
|
+
* Bootstrap (v5.2.2): 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.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.
|
|
19
|
+
* Bootstrap (v5.2.2): util/scrollBar.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 swipe.js v5.2.
|
|
2
|
+
* Bootstrap swipe.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.
|
|
19
|
+
* Bootstrap (v5.2.2): util/swipe.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 template-factory.js v5.2.
|
|
2
|
+
* Bootstrap template-factory.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.
|
|
19
|
+
* Bootstrap (v5.2.2): util/template-factory.js
|
|
20
20
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
21
21
|
* --------------------------------------------------------------------------
|
|
22
22
|
*/
|
|
@@ -7,22 +7,22 @@
|
|
|
7
7
|
//= require ./bootstrap/base-component
|
|
8
8
|
//= require ./bootstrap/util/component-functions
|
|
9
9
|
//= require ./bootstrap/alert
|
|
10
|
-
//= require ./bootstrap/button
|
|
11
10
|
//= require ./bootstrap/dom/selector-engine
|
|
12
|
-
//= require ./bootstrap/util/swipe
|
|
13
|
-
//= require ./bootstrap/carousel
|
|
14
|
-
//= require ./bootstrap/collapse
|
|
15
|
-
//= require ./bootstrap/dropdown
|
|
16
|
-
//= require ./bootstrap/util/backdrop
|
|
17
11
|
//= require ./bootstrap/util/focustrap
|
|
18
|
-
//= require ./bootstrap/util/scrollbar
|
|
19
|
-
//= require ./bootstrap/modal
|
|
20
|
-
//= require ./bootstrap/offcanvas
|
|
21
12
|
//= require ./bootstrap/util/sanitizer
|
|
22
13
|
//= require ./bootstrap/util/template-factory
|
|
23
14
|
//= require ./bootstrap/tooltip
|
|
24
15
|
//= require ./bootstrap/popover
|
|
16
|
+
//= require ./bootstrap/util/scrollbar
|
|
17
|
+
//= require ./bootstrap/util/swipe
|
|
18
|
+
//= require ./bootstrap/util/backdrop
|
|
19
|
+
//= require ./bootstrap/button
|
|
20
|
+
//= require ./bootstrap/modal
|
|
21
|
+
//= require ./bootstrap/toast
|
|
22
|
+
//= require ./bootstrap/offcanvas
|
|
23
|
+
//= require ./bootstrap/collapse
|
|
25
24
|
//= require ./bootstrap/scrollspy
|
|
25
|
+
//= require ./bootstrap/carousel
|
|
26
26
|
//= require ./bootstrap/tab
|
|
27
|
-
//= require ./bootstrap/
|
|
27
|
+
//= require ./bootstrap/dropdown
|
|
28
28
|
//= require ./bootstrap-global-this-undefine
|