bootstrap 5.2.0 → 5.2.1
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 +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
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap swipe.js v5.2.
|
2
|
+
* Bootstrap swipe.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/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.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/template-factory.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 v5.2.
|
2
|
+
* Bootstrap 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
|
*/
|
@@ -31,7 +31,7 @@
|
|
31
31
|
|
32
32
|
/**
|
33
33
|
* --------------------------------------------------------------------------
|
34
|
-
* Bootstrap (v5.2.
|
34
|
+
* Bootstrap (v5.2.1): 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.1): 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.1): 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.1): 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.1): 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.1): 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.1';
|
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.1): 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.1): 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.1): 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.1): 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.1): 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.1): 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.1): 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.1): 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.
|
2065
|
+
this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0];
|
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];
|
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.1): 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.1): 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.1): 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.1): 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
|
+
EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {
|
3012
|
+
// a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
|
3013
|
+
if (this._dialog.contains(event.target) || this._dialog.contains(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.1): 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.1): 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.1): 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.1): 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;
|
@@ -3866,6 +3871,10 @@
|
|
3866
3871
|
this.tip.remove();
|
3867
3872
|
}
|
3868
3873
|
|
3874
|
+
if (this._config.originalTitle) {
|
3875
|
+
this._element.setAttribute('title', this._config.originalTitle);
|
3876
|
+
}
|
3877
|
+
|
3869
3878
|
this._disposePopper();
|
3870
3879
|
|
3871
3880
|
super.dispose();
|
@@ -3926,13 +3935,13 @@
|
|
3926
3935
|
}
|
3927
3936
|
|
3928
3937
|
const complete = () => {
|
3929
|
-
const previousHoverState = this._isHovered;
|
3930
|
-
this._isHovered = false;
|
3931
3938
|
EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN$2));
|
3932
3939
|
|
3933
|
-
if (
|
3940
|
+
if (this._isHovered === false) {
|
3934
3941
|
this._leave();
|
3935
3942
|
}
|
3943
|
+
|
3944
|
+
this._isHovered = false;
|
3936
3945
|
};
|
3937
3946
|
|
3938
3947
|
this._queueCallback(complete, this.tip, this._isAnimated());
|
@@ -3963,7 +3972,7 @@
|
|
3963
3972
|
this._activeTrigger[TRIGGER_CLICK] = false;
|
3964
3973
|
this._activeTrigger[TRIGGER_FOCUS] = false;
|
3965
3974
|
this._activeTrigger[TRIGGER_HOVER] = false;
|
3966
|
-
this._isHovered =
|
3975
|
+
this._isHovered = null; // it is a trick to support manual triggering
|
3967
3976
|
|
3968
3977
|
const complete = () => {
|
3969
3978
|
if (this._isWithActiveTrigger()) {
|
@@ -4326,7 +4335,7 @@
|
|
4326
4335
|
|
4327
4336
|
/**
|
4328
4337
|
* --------------------------------------------------------------------------
|
4329
|
-
* Bootstrap (v5.2.
|
4338
|
+
* Bootstrap (v5.2.1): popover.js
|
4330
4339
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
4331
4340
|
* --------------------------------------------------------------------------
|
4332
4341
|
*/
|
@@ -4409,7 +4418,7 @@
|
|
4409
4418
|
|
4410
4419
|
/**
|
4411
4420
|
* --------------------------------------------------------------------------
|
4412
|
-
* Bootstrap (v5.2.
|
4421
|
+
* Bootstrap (v5.2.1): scrollspy.js
|
4413
4422
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
4414
4423
|
* --------------------------------------------------------------------------
|
4415
4424
|
*/
|
@@ -4440,14 +4449,16 @@
|
|
4440
4449
|
// TODO: v6 @deprecated, keep it for backwards compatibility reasons
|
4441
4450
|
rootMargin: '0px 0px -25%',
|
4442
4451
|
smoothScroll: false,
|
4443
|
-
target: null
|
4452
|
+
target: null,
|
4453
|
+
threshold: [0.1, 0.5, 1]
|
4444
4454
|
};
|
4445
4455
|
const DefaultType$1 = {
|
4446
4456
|
offset: '(number|null)',
|
4447
4457
|
// TODO v6 @deprecated, keep it for backwards compatibility reasons
|
4448
4458
|
rootMargin: 'string',
|
4449
4459
|
smoothScroll: 'boolean',
|
4450
|
-
target: 'element'
|
4460
|
+
target: 'element',
|
4461
|
+
threshold: 'array'
|
4451
4462
|
};
|
4452
4463
|
/**
|
4453
4464
|
* Class definition
|
@@ -4508,7 +4519,14 @@
|
|
4508
4519
|
|
4509
4520
|
_configAfterMerge(config) {
|
4510
4521
|
// TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case
|
4511
|
-
config.target = getElement(config.target) || document.body;
|
4522
|
+
config.target = getElement(config.target) || document.body; // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only
|
4523
|
+
|
4524
|
+
config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin;
|
4525
|
+
|
4526
|
+
if (typeof config.threshold === 'string') {
|
4527
|
+
config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value));
|
4528
|
+
}
|
4529
|
+
|
4512
4530
|
return config;
|
4513
4531
|
}
|
4514
4532
|
|
@@ -4544,8 +4562,8 @@
|
|
4544
4562
|
_getNewObserver() {
|
4545
4563
|
const options = {
|
4546
4564
|
root: this._rootElement,
|
4547
|
-
threshold:
|
4548
|
-
rootMargin: this.
|
4565
|
+
threshold: this._config.threshold,
|
4566
|
+
rootMargin: this._config.rootMargin
|
4549
4567
|
};
|
4550
4568
|
return new IntersectionObserver(entries => this._observerCallback(entries), options);
|
4551
4569
|
} // The logic of selection
|
@@ -4590,11 +4608,6 @@
|
|
4590
4608
|
activate(entry);
|
4591
4609
|
}
|
4592
4610
|
}
|
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
4611
|
}
|
4599
4612
|
|
4600
4613
|
_initializeTargetsAndObservables() {
|
@@ -4696,7 +4709,7 @@
|
|
4696
4709
|
|
4697
4710
|
/**
|
4698
4711
|
* --------------------------------------------------------------------------
|
4699
|
-
* Bootstrap (v5.2.
|
4712
|
+
* Bootstrap (v5.2.1): tab.js
|
4700
4713
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
4701
4714
|
* --------------------------------------------------------------------------
|
4702
4715
|
*/
|
@@ -5009,7 +5022,7 @@
|
|
5009
5022
|
|
5010
5023
|
/**
|
5011
5024
|
* --------------------------------------------------------------------------
|
5012
|
-
* Bootstrap (v5.2.
|
5025
|
+
* Bootstrap (v5.2.1): toast.js
|
5013
5026
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5014
5027
|
* --------------------------------------------------------------------------
|
5015
5028
|
*/
|
@@ -5226,7 +5239,7 @@
|
|
5226
5239
|
|
5227
5240
|
/**
|
5228
5241
|
* --------------------------------------------------------------------------
|
5229
|
-
* Bootstrap (v5.2.
|
5242
|
+
* Bootstrap (v5.2.1): index.umd.js
|
5230
5243
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5231
5244
|
* --------------------------------------------------------------------------
|
5232
5245
|
*/
|