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 v5.2.
|
|
2
|
+
* Bootstrap 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
|
*/
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* --------------------------------------------------------------------------
|
|
34
|
-
* Bootstrap (v5.2.
|
|
34
|
+
* Bootstrap (v5.2.2): util/index.js
|
|
35
35
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
36
36
|
* --------------------------------------------------------------------------
|
|
37
37
|
*/
|
|
@@ -346,7 +346,7 @@
|
|
|
346
346
|
|
|
347
347
|
/**
|
|
348
348
|
* --------------------------------------------------------------------------
|
|
349
|
-
* Bootstrap (v5.2.
|
|
349
|
+
* Bootstrap (v5.2.2): dom/event-handler.js
|
|
350
350
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
351
351
|
* --------------------------------------------------------------------------
|
|
352
352
|
*/
|
|
@@ -615,7 +615,7 @@
|
|
|
615
615
|
|
|
616
616
|
/**
|
|
617
617
|
* --------------------------------------------------------------------------
|
|
618
|
-
* Bootstrap (v5.2.
|
|
618
|
+
* Bootstrap (v5.2.2): dom/data.js
|
|
619
619
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
620
620
|
* --------------------------------------------------------------------------
|
|
621
621
|
*/
|
|
@@ -667,7 +667,7 @@
|
|
|
667
667
|
|
|
668
668
|
/**
|
|
669
669
|
* --------------------------------------------------------------------------
|
|
670
|
-
* Bootstrap (v5.2.
|
|
670
|
+
* Bootstrap (v5.2.2): dom/manipulator.js
|
|
671
671
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
672
672
|
* --------------------------------------------------------------------------
|
|
673
673
|
*/
|
|
@@ -737,7 +737,7 @@
|
|
|
737
737
|
|
|
738
738
|
/**
|
|
739
739
|
* --------------------------------------------------------------------------
|
|
740
|
-
* Bootstrap (v5.2.
|
|
740
|
+
* Bootstrap (v5.2.2): util/config.js
|
|
741
741
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
742
742
|
* --------------------------------------------------------------------------
|
|
743
743
|
*/
|
|
@@ -798,7 +798,7 @@
|
|
|
798
798
|
|
|
799
799
|
/**
|
|
800
800
|
* --------------------------------------------------------------------------
|
|
801
|
-
* Bootstrap (v5.2.
|
|
801
|
+
* Bootstrap (v5.2.2): base-component.js
|
|
802
802
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
803
803
|
* --------------------------------------------------------------------------
|
|
804
804
|
*/
|
|
@@ -806,7 +806,7 @@
|
|
|
806
806
|
* Constants
|
|
807
807
|
*/
|
|
808
808
|
|
|
809
|
-
const VERSION = '5.2.
|
|
809
|
+
const VERSION = '5.2.2';
|
|
810
810
|
/**
|
|
811
811
|
* Class definition
|
|
812
812
|
*/
|
|
@@ -877,7 +877,7 @@
|
|
|
877
877
|
|
|
878
878
|
/**
|
|
879
879
|
* --------------------------------------------------------------------------
|
|
880
|
-
* Bootstrap (v5.2.
|
|
880
|
+
* Bootstrap (v5.2.2): util/component-functions.js
|
|
881
881
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
882
882
|
* --------------------------------------------------------------------------
|
|
883
883
|
*/
|
|
@@ -903,7 +903,7 @@
|
|
|
903
903
|
|
|
904
904
|
/**
|
|
905
905
|
* --------------------------------------------------------------------------
|
|
906
|
-
* Bootstrap (v5.2.
|
|
906
|
+
* Bootstrap (v5.2.2): alert.js
|
|
907
907
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
908
908
|
* --------------------------------------------------------------------------
|
|
909
909
|
*/
|
|
@@ -983,7 +983,7 @@
|
|
|
983
983
|
|
|
984
984
|
/**
|
|
985
985
|
* --------------------------------------------------------------------------
|
|
986
|
-
* Bootstrap (v5.2.
|
|
986
|
+
* Bootstrap (v5.2.2): button.js
|
|
987
987
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
988
988
|
* --------------------------------------------------------------------------
|
|
989
989
|
*/
|
|
@@ -1045,7 +1045,7 @@
|
|
|
1045
1045
|
|
|
1046
1046
|
/**
|
|
1047
1047
|
* --------------------------------------------------------------------------
|
|
1048
|
-
* Bootstrap (v5.2.
|
|
1048
|
+
* Bootstrap (v5.2.2): dom/selector-engine.js
|
|
1049
1049
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
1050
1050
|
* --------------------------------------------------------------------------
|
|
1051
1051
|
*/
|
|
@@ -1116,7 +1116,7 @@
|
|
|
1116
1116
|
|
|
1117
1117
|
/**
|
|
1118
1118
|
* --------------------------------------------------------------------------
|
|
1119
|
-
* Bootstrap (v5.2.
|
|
1119
|
+
* Bootstrap (v5.2.2): util/swipe.js
|
|
1120
1120
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
1121
1121
|
* --------------------------------------------------------------------------
|
|
1122
1122
|
*/
|
|
@@ -1252,7 +1252,7 @@
|
|
|
1252
1252
|
|
|
1253
1253
|
/**
|
|
1254
1254
|
* --------------------------------------------------------------------------
|
|
1255
|
-
* Bootstrap (v5.2.
|
|
1255
|
+
* Bootstrap (v5.2.2): carousel.js
|
|
1256
1256
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
1257
1257
|
* --------------------------------------------------------------------------
|
|
1258
1258
|
*/
|
|
@@ -1700,7 +1700,7 @@
|
|
|
1700
1700
|
|
|
1701
1701
|
/**
|
|
1702
1702
|
* --------------------------------------------------------------------------
|
|
1703
|
-
* Bootstrap (v5.2.
|
|
1703
|
+
* Bootstrap (v5.2.2): collapse.js
|
|
1704
1704
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
1705
1705
|
* --------------------------------------------------------------------------
|
|
1706
1706
|
*/
|
|
@@ -1990,7 +1990,7 @@
|
|
|
1990
1990
|
|
|
1991
1991
|
/**
|
|
1992
1992
|
* --------------------------------------------------------------------------
|
|
1993
|
-
* Bootstrap (v5.2.
|
|
1993
|
+
* Bootstrap (v5.2.2): dropdown.js
|
|
1994
1994
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
1995
1995
|
* --------------------------------------------------------------------------
|
|
1996
1996
|
*/
|
|
@@ -2060,8 +2060,9 @@
|
|
|
2060
2060
|
super(element, config);
|
|
2061
2061
|
this._popper = null;
|
|
2062
2062
|
this._parent = this._element.parentNode; // dropdown wrapper
|
|
2063
|
+
// todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
|
|
2063
2064
|
|
|
2064
|
-
this._menu = SelectorEngine.findOne(SELECTOR_MENU, this._parent);
|
|
2065
|
+
this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);
|
|
2065
2066
|
this._inNavbar = this._detectNavbar();
|
|
2066
2067
|
} // Getters
|
|
2067
2068
|
|
|
@@ -2377,8 +2378,9 @@
|
|
|
2377
2378
|
return;
|
|
2378
2379
|
}
|
|
2379
2380
|
|
|
2380
|
-
event.preventDefault();
|
|
2381
|
-
|
|
2381
|
+
event.preventDefault(); // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
|
|
2382
|
+
|
|
2383
|
+
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);
|
|
2382
2384
|
const instance = Dropdown.getOrCreateInstance(getToggleButton);
|
|
2383
2385
|
|
|
2384
2386
|
if (isUpOrDownEvent) {
|
|
@@ -2420,7 +2422,7 @@
|
|
|
2420
2422
|
|
|
2421
2423
|
/**
|
|
2422
2424
|
* --------------------------------------------------------------------------
|
|
2423
|
-
* Bootstrap (v5.2.
|
|
2425
|
+
* Bootstrap (v5.2.2): util/scrollBar.js
|
|
2424
2426
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
2425
2427
|
* --------------------------------------------------------------------------
|
|
2426
2428
|
*/
|
|
@@ -2539,7 +2541,7 @@
|
|
|
2539
2541
|
|
|
2540
2542
|
/**
|
|
2541
2543
|
* --------------------------------------------------------------------------
|
|
2542
|
-
* Bootstrap (v5.2.
|
|
2544
|
+
* Bootstrap (v5.2.2): util/backdrop.js
|
|
2543
2545
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
2544
2546
|
* --------------------------------------------------------------------------
|
|
2545
2547
|
*/
|
|
@@ -2685,7 +2687,7 @@
|
|
|
2685
2687
|
|
|
2686
2688
|
/**
|
|
2687
2689
|
* --------------------------------------------------------------------------
|
|
2688
|
-
* Bootstrap (v5.2.
|
|
2690
|
+
* Bootstrap (v5.2.2): util/focustrap.js
|
|
2689
2691
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
2690
2692
|
* --------------------------------------------------------------------------
|
|
2691
2693
|
*/
|
|
@@ -2794,7 +2796,7 @@
|
|
|
2794
2796
|
|
|
2795
2797
|
/**
|
|
2796
2798
|
* --------------------------------------------------------------------------
|
|
2797
|
-
* Bootstrap (v5.2.
|
|
2799
|
+
* Bootstrap (v5.2.2): modal.js
|
|
2798
2800
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
2799
2801
|
* --------------------------------------------------------------------------
|
|
2800
2802
|
*/
|
|
@@ -2813,6 +2815,7 @@
|
|
|
2813
2815
|
const EVENT_SHOW$4 = `show${EVENT_KEY$4}`;
|
|
2814
2816
|
const EVENT_SHOWN$4 = `shown${EVENT_KEY$4}`;
|
|
2815
2817
|
const EVENT_RESIZE$1 = `resize${EVENT_KEY$4}`;
|
|
2818
|
+
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$4}`;
|
|
2816
2819
|
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$4}`;
|
|
2817
2820
|
const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$4}`;
|
|
2818
2821
|
const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$4}${DATA_API_KEY$2}`;
|
|
@@ -3005,20 +3008,22 @@
|
|
|
3005
3008
|
}
|
|
3006
3009
|
});
|
|
3007
3010
|
EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3011
|
+
// a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
|
|
3012
|
+
EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {
|
|
3013
|
+
if (this._element !== event.target || this._element !== event2.target) {
|
|
3014
|
+
return;
|
|
3015
|
+
}
|
|
3012
3016
|
|
|
3013
|
-
|
|
3014
|
-
|
|
3017
|
+
if (this._config.backdrop === 'static') {
|
|
3018
|
+
this._triggerBackdropTransition();
|
|
3015
3019
|
|
|
3016
|
-
|
|
3017
|
-
|
|
3020
|
+
return;
|
|
3021
|
+
}
|
|
3018
3022
|
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3023
|
+
if (this._config.backdrop) {
|
|
3024
|
+
this.hide();
|
|
3025
|
+
}
|
|
3026
|
+
});
|
|
3022
3027
|
});
|
|
3023
3028
|
}
|
|
3024
3029
|
|
|
@@ -3167,7 +3172,7 @@
|
|
|
3167
3172
|
|
|
3168
3173
|
/**
|
|
3169
3174
|
* --------------------------------------------------------------------------
|
|
3170
|
-
* Bootstrap (v5.2.
|
|
3175
|
+
* Bootstrap (v5.2.2): offcanvas.js
|
|
3171
3176
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
3172
3177
|
* --------------------------------------------------------------------------
|
|
3173
3178
|
*/
|
|
@@ -3441,7 +3446,7 @@
|
|
|
3441
3446
|
|
|
3442
3447
|
/**
|
|
3443
3448
|
* --------------------------------------------------------------------------
|
|
3444
|
-
* Bootstrap (v5.2.
|
|
3449
|
+
* Bootstrap (v5.2.2): util/sanitizer.js
|
|
3445
3450
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
3446
3451
|
* --------------------------------------------------------------------------
|
|
3447
3452
|
*/
|
|
@@ -3546,7 +3551,7 @@
|
|
|
3546
3551
|
|
|
3547
3552
|
/**
|
|
3548
3553
|
* --------------------------------------------------------------------------
|
|
3549
|
-
* Bootstrap (v5.2.
|
|
3554
|
+
* Bootstrap (v5.2.2): util/template-factory.js
|
|
3550
3555
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
3551
3556
|
* --------------------------------------------------------------------------
|
|
3552
3557
|
*/
|
|
@@ -3704,7 +3709,7 @@
|
|
|
3704
3709
|
|
|
3705
3710
|
/**
|
|
3706
3711
|
* --------------------------------------------------------------------------
|
|
3707
|
-
* Bootstrap (v5.2.
|
|
3712
|
+
* Bootstrap (v5.2.2): tooltip.js
|
|
3708
3713
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
3709
3714
|
* --------------------------------------------------------------------------
|
|
3710
3715
|
*/
|
|
@@ -3793,7 +3798,7 @@
|
|
|
3793
3798
|
|
|
3794
3799
|
this._isEnabled = true;
|
|
3795
3800
|
this._timeout = 0;
|
|
3796
|
-
this._isHovered =
|
|
3801
|
+
this._isHovered = null;
|
|
3797
3802
|
this._activeTrigger = {};
|
|
3798
3803
|
this._popper = null;
|
|
3799
3804
|
this._templateFactory = null;
|
|
@@ -3802,6 +3807,10 @@
|
|
|
3802
3807
|
this.tip = null;
|
|
3803
3808
|
|
|
3804
3809
|
this._setListeners();
|
|
3810
|
+
|
|
3811
|
+
if (!this._config.selector) {
|
|
3812
|
+
this._fixTitle();
|
|
3813
|
+
}
|
|
3805
3814
|
} // Getters
|
|
3806
3815
|
|
|
3807
3816
|
|
|
@@ -3830,24 +3839,12 @@
|
|
|
3830
3839
|
this._isEnabled = !this._isEnabled;
|
|
3831
3840
|
}
|
|
3832
3841
|
|
|
3833
|
-
toggle(
|
|
3842
|
+
toggle() {
|
|
3834
3843
|
if (!this._isEnabled) {
|
|
3835
3844
|
return;
|
|
3836
3845
|
}
|
|
3837
3846
|
|
|
3838
|
-
|
|
3839
|
-
const context = this._initializeOnDelegatedTarget(event);
|
|
3840
|
-
|
|
3841
|
-
context._activeTrigger.click = !context._activeTrigger.click;
|
|
3842
|
-
|
|
3843
|
-
if (context._isWithActiveTrigger()) {
|
|
3844
|
-
context._enter();
|
|
3845
|
-
} else {
|
|
3846
|
-
context._leave();
|
|
3847
|
-
}
|
|
3848
|
-
|
|
3849
|
-
return;
|
|
3850
|
-
}
|
|
3847
|
+
this._activeTrigger.click = !this._activeTrigger.click;
|
|
3851
3848
|
|
|
3852
3849
|
if (this._isShown()) {
|
|
3853
3850
|
this._leave();
|
|
@@ -3866,6 +3863,10 @@
|
|
|
3866
3863
|
this.tip.remove();
|
|
3867
3864
|
}
|
|
3868
3865
|
|
|
3866
|
+
if (this._element.getAttribute('data-bs-original-title')) {
|
|
3867
|
+
this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'));
|
|
3868
|
+
}
|
|
3869
|
+
|
|
3869
3870
|
this._disposePopper();
|
|
3870
3871
|
|
|
3871
3872
|
super.dispose();
|
|
@@ -3926,13 +3927,13 @@
|
|
|
3926
3927
|
}
|
|
3927
3928
|
|
|
3928
3929
|
const complete = () => {
|
|
3929
|
-
const previousHoverState = this._isHovered;
|
|
3930
|
-
this._isHovered = false;
|
|
3931
3930
|
EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN$2));
|
|
3932
3931
|
|
|
3933
|
-
if (
|
|
3932
|
+
if (this._isHovered === false) {
|
|
3934
3933
|
this._leave();
|
|
3935
3934
|
}
|
|
3935
|
+
|
|
3936
|
+
this._isHovered = false;
|
|
3936
3937
|
};
|
|
3937
3938
|
|
|
3938
3939
|
this._queueCallback(complete, this.tip, this._isAnimated());
|
|
@@ -3963,7 +3964,7 @@
|
|
|
3963
3964
|
this._activeTrigger[TRIGGER_CLICK] = false;
|
|
3964
3965
|
this._activeTrigger[TRIGGER_FOCUS] = false;
|
|
3965
3966
|
this._activeTrigger[TRIGGER_HOVER] = false;
|
|
3966
|
-
this._isHovered =
|
|
3967
|
+
this._isHovered = null; // it is a trick to support manual triggering
|
|
3967
3968
|
|
|
3968
3969
|
const complete = () => {
|
|
3969
3970
|
if (this._isWithActiveTrigger()) {
|
|
@@ -4056,7 +4057,7 @@
|
|
|
4056
4057
|
}
|
|
4057
4058
|
|
|
4058
4059
|
_getTitle() {
|
|
4059
|
-
return this._resolvePossibleFunction(this._config.title) || this.
|
|
4060
|
+
return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title');
|
|
4060
4061
|
} // Private
|
|
4061
4062
|
|
|
4062
4063
|
|
|
@@ -4142,7 +4143,11 @@
|
|
|
4142
4143
|
|
|
4143
4144
|
for (const trigger of triggers) {
|
|
4144
4145
|
if (trigger === 'click') {
|
|
4145
|
-
EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event =>
|
|
4146
|
+
EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => {
|
|
4147
|
+
const context = this._initializeOnDelegatedTarget(event);
|
|
4148
|
+
|
|
4149
|
+
context.toggle();
|
|
4150
|
+
});
|
|
4146
4151
|
} else if (trigger !== TRIGGER_MANUAL) {
|
|
4147
4152
|
const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN$1);
|
|
4148
4153
|
const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT$1);
|
|
@@ -4170,19 +4175,10 @@
|
|
|
4170
4175
|
};
|
|
4171
4176
|
|
|
4172
4177
|
EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);
|
|
4173
|
-
|
|
4174
|
-
if (this._config.selector) {
|
|
4175
|
-
this._config = { ...this._config,
|
|
4176
|
-
trigger: 'manual',
|
|
4177
|
-
selector: ''
|
|
4178
|
-
};
|
|
4179
|
-
} else {
|
|
4180
|
-
this._fixTitle();
|
|
4181
|
-
}
|
|
4182
4178
|
}
|
|
4183
4179
|
|
|
4184
4180
|
_fixTitle() {
|
|
4185
|
-
const title = this.
|
|
4181
|
+
const title = this._element.getAttribute('title');
|
|
4186
4182
|
|
|
4187
4183
|
if (!title) {
|
|
4188
4184
|
return;
|
|
@@ -4192,6 +4188,9 @@
|
|
|
4192
4188
|
this._element.setAttribute('aria-label', title);
|
|
4193
4189
|
}
|
|
4194
4190
|
|
|
4191
|
+
this._element.setAttribute('data-bs-original-title', title); // DO NOT USE IT. Is only for backwards compatibility
|
|
4192
|
+
|
|
4193
|
+
|
|
4195
4194
|
this._element.removeAttribute('title');
|
|
4196
4195
|
}
|
|
4197
4196
|
|
|
@@ -4263,8 +4262,6 @@
|
|
|
4263
4262
|
};
|
|
4264
4263
|
}
|
|
4265
4264
|
|
|
4266
|
-
config.originalTitle = this._element.getAttribute('title') || '';
|
|
4267
|
-
|
|
4268
4265
|
if (typeof config.title === 'number') {
|
|
4269
4266
|
config.title = config.title.toString();
|
|
4270
4267
|
}
|
|
@@ -4283,11 +4280,13 @@
|
|
|
4283
4280
|
if (this.constructor.Default[key] !== this._config[key]) {
|
|
4284
4281
|
config[key] = this._config[key];
|
|
4285
4282
|
}
|
|
4286
|
-
}
|
|
4283
|
+
}
|
|
4284
|
+
|
|
4285
|
+
config.selector = false;
|
|
4286
|
+
config.trigger = 'manual'; // In the future can be replaced with:
|
|
4287
4287
|
// const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
|
|
4288
4288
|
// `Object.fromEntries(keysWithDifferentValues)`
|
|
4289
4289
|
|
|
4290
|
-
|
|
4291
4290
|
return config;
|
|
4292
4291
|
}
|
|
4293
4292
|
|
|
@@ -4326,7 +4325,7 @@
|
|
|
4326
4325
|
|
|
4327
4326
|
/**
|
|
4328
4327
|
* --------------------------------------------------------------------------
|
|
4329
|
-
* Bootstrap (v5.2.
|
|
4328
|
+
* Bootstrap (v5.2.2): popover.js
|
|
4330
4329
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
4331
4330
|
* --------------------------------------------------------------------------
|
|
4332
4331
|
*/
|
|
@@ -4409,7 +4408,7 @@
|
|
|
4409
4408
|
|
|
4410
4409
|
/**
|
|
4411
4410
|
* --------------------------------------------------------------------------
|
|
4412
|
-
* Bootstrap (v5.2.
|
|
4411
|
+
* Bootstrap (v5.2.2): scrollspy.js
|
|
4413
4412
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
4414
4413
|
* --------------------------------------------------------------------------
|
|
4415
4414
|
*/
|
|
@@ -4440,14 +4439,16 @@
|
|
|
4440
4439
|
// TODO: v6 @deprecated, keep it for backwards compatibility reasons
|
|
4441
4440
|
rootMargin: '0px 0px -25%',
|
|
4442
4441
|
smoothScroll: false,
|
|
4443
|
-
target: null
|
|
4442
|
+
target: null,
|
|
4443
|
+
threshold: [0.1, 0.5, 1]
|
|
4444
4444
|
};
|
|
4445
4445
|
const DefaultType$1 = {
|
|
4446
4446
|
offset: '(number|null)',
|
|
4447
4447
|
// TODO v6 @deprecated, keep it for backwards compatibility reasons
|
|
4448
4448
|
rootMargin: 'string',
|
|
4449
4449
|
smoothScroll: 'boolean',
|
|
4450
|
-
target: 'element'
|
|
4450
|
+
target: 'element',
|
|
4451
|
+
threshold: 'array'
|
|
4451
4452
|
};
|
|
4452
4453
|
/**
|
|
4453
4454
|
* Class definition
|
|
@@ -4508,7 +4509,14 @@
|
|
|
4508
4509
|
|
|
4509
4510
|
_configAfterMerge(config) {
|
|
4510
4511
|
// TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case
|
|
4511
|
-
config.target = getElement(config.target) || document.body;
|
|
4512
|
+
config.target = getElement(config.target) || document.body; // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only
|
|
4513
|
+
|
|
4514
|
+
config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin;
|
|
4515
|
+
|
|
4516
|
+
if (typeof config.threshold === 'string') {
|
|
4517
|
+
config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value));
|
|
4518
|
+
}
|
|
4519
|
+
|
|
4512
4520
|
return config;
|
|
4513
4521
|
}
|
|
4514
4522
|
|
|
@@ -4544,8 +4552,8 @@
|
|
|
4544
4552
|
_getNewObserver() {
|
|
4545
4553
|
const options = {
|
|
4546
4554
|
root: this._rootElement,
|
|
4547
|
-
threshold:
|
|
4548
|
-
rootMargin: this.
|
|
4555
|
+
threshold: this._config.threshold,
|
|
4556
|
+
rootMargin: this._config.rootMargin
|
|
4549
4557
|
};
|
|
4550
4558
|
return new IntersectionObserver(entries => this._observerCallback(entries), options);
|
|
4551
4559
|
} // The logic of selection
|
|
@@ -4590,11 +4598,6 @@
|
|
|
4590
4598
|
activate(entry);
|
|
4591
4599
|
}
|
|
4592
4600
|
}
|
|
4593
|
-
} // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
_getRootMargin() {
|
|
4597
|
-
return this._config.offset ? `${this._config.offset}px 0px -30%` : this._config.rootMargin;
|
|
4598
4601
|
}
|
|
4599
4602
|
|
|
4600
4603
|
_initializeTargetsAndObservables() {
|
|
@@ -4696,7 +4699,7 @@
|
|
|
4696
4699
|
|
|
4697
4700
|
/**
|
|
4698
4701
|
* --------------------------------------------------------------------------
|
|
4699
|
-
* Bootstrap (v5.2.
|
|
4702
|
+
* Bootstrap (v5.2.2): tab.js
|
|
4700
4703
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
4701
4704
|
* --------------------------------------------------------------------------
|
|
4702
4705
|
*/
|
|
@@ -4724,7 +4727,6 @@
|
|
|
4724
4727
|
const CLASS_DROPDOWN = 'dropdown';
|
|
4725
4728
|
const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
|
|
4726
4729
|
const SELECTOR_DROPDOWN_MENU = '.dropdown-menu';
|
|
4727
|
-
const SELECTOR_DROPDOWN_ITEM = '.dropdown-item';
|
|
4728
4730
|
const NOT_SELECTOR_DROPDOWN_TOGGLE = ':not(.dropdown-toggle)';
|
|
4729
4731
|
const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]';
|
|
4730
4732
|
const SELECTOR_OUTER = '.nav-item, .list-group-item';
|
|
@@ -4803,7 +4805,6 @@
|
|
|
4803
4805
|
return;
|
|
4804
4806
|
}
|
|
4805
4807
|
|
|
4806
|
-
element.focus();
|
|
4807
4808
|
element.removeAttribute('tabindex');
|
|
4808
4809
|
element.setAttribute('aria-selected', true);
|
|
4809
4810
|
|
|
@@ -4859,6 +4860,9 @@
|
|
|
4859
4860
|
const nextActiveElement = getNextActiveElement(this._getChildren().filter(element => !isDisabled(element)), event.target, isNext, true);
|
|
4860
4861
|
|
|
4861
4862
|
if (nextActiveElement) {
|
|
4863
|
+
nextActiveElement.focus({
|
|
4864
|
+
preventScroll: true
|
|
4865
|
+
});
|
|
4862
4866
|
Tab.getOrCreateInstance(nextActiveElement).show();
|
|
4863
4867
|
}
|
|
4864
4868
|
}
|
|
@@ -4934,7 +4938,6 @@
|
|
|
4934
4938
|
|
|
4935
4939
|
toggle(SELECTOR_DROPDOWN_TOGGLE, CLASS_NAME_ACTIVE);
|
|
4936
4940
|
toggle(SELECTOR_DROPDOWN_MENU, CLASS_NAME_SHOW$1);
|
|
4937
|
-
toggle(SELECTOR_DROPDOWN_ITEM, CLASS_NAME_ACTIVE);
|
|
4938
4941
|
outerElem.setAttribute('aria-expanded', open);
|
|
4939
4942
|
}
|
|
4940
4943
|
|
|
@@ -5009,7 +5012,7 @@
|
|
|
5009
5012
|
|
|
5010
5013
|
/**
|
|
5011
5014
|
* --------------------------------------------------------------------------
|
|
5012
|
-
* Bootstrap (v5.2.
|
|
5015
|
+
* Bootstrap (v5.2.2): toast.js
|
|
5013
5016
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5014
5017
|
* --------------------------------------------------------------------------
|
|
5015
5018
|
*/
|
|
@@ -5160,13 +5163,17 @@
|
|
|
5160
5163
|
switch (event.type) {
|
|
5161
5164
|
case 'mouseover':
|
|
5162
5165
|
case 'mouseout':
|
|
5163
|
-
|
|
5164
|
-
|
|
5166
|
+
{
|
|
5167
|
+
this._hasMouseInteraction = isInteracting;
|
|
5168
|
+
break;
|
|
5169
|
+
}
|
|
5165
5170
|
|
|
5166
5171
|
case 'focusin':
|
|
5167
5172
|
case 'focusout':
|
|
5168
|
-
|
|
5169
|
-
|
|
5173
|
+
{
|
|
5174
|
+
this._hasKeyboardInteraction = isInteracting;
|
|
5175
|
+
break;
|
|
5176
|
+
}
|
|
5170
5177
|
}
|
|
5171
5178
|
|
|
5172
5179
|
if (isInteracting) {
|
|
@@ -5226,7 +5233,7 @@
|
|
|
5226
5233
|
|
|
5227
5234
|
/**
|
|
5228
5235
|
* --------------------------------------------------------------------------
|
|
5229
|
-
* Bootstrap (v5.2.
|
|
5236
|
+
* Bootstrap (v5.2.2): index.umd.js
|
|
5230
5237
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
5231
5238
|
* --------------------------------------------------------------------------
|
|
5232
5239
|
*/
|