1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-21 12:51:52 +02:00

Release v5.2.1 (#37098)

* Bump version to v5.2.1.

* Dist
This commit is contained in:
XhmikosR
2022-09-07 18:31:39 +03:00
committed by GitHub
parent 23fb7a7915
commit 23e50829f9
131 changed files with 644 additions and 567 deletions

View File

@@ -1,5 +1,5 @@
/*!
* Bootstrap v5.2.0 (https://getbootstrap.com/)
* Bootstrap v5.2.1 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -31,7 +31,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): util/index.js
* Bootstrap (v5.2.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -346,7 +346,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): dom/event-handler.js
* Bootstrap (v5.2.1): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -615,7 +615,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): dom/data.js
* Bootstrap (v5.2.1): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -667,7 +667,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): dom/manipulator.js
* Bootstrap (v5.2.1): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -737,7 +737,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): util/config.js
* Bootstrap (v5.2.1): util/config.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -798,7 +798,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): base-component.js
* Bootstrap (v5.2.1): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -806,7 +806,7 @@
* Constants
*/
const VERSION = '5.2.0';
const VERSION = '5.2.1';
/**
* Class definition
*/
@@ -877,7 +877,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): util/component-functions.js
* Bootstrap (v5.2.1): util/component-functions.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -903,7 +903,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): alert.js
* Bootstrap (v5.2.1): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -983,7 +983,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): button.js
* Bootstrap (v5.2.1): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -1045,7 +1045,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): dom/selector-engine.js
* Bootstrap (v5.2.1): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -1116,7 +1116,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): util/swipe.js
* Bootstrap (v5.2.1): util/swipe.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -1252,7 +1252,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): carousel.js
* Bootstrap (v5.2.1): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -1700,7 +1700,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): collapse.js
* Bootstrap (v5.2.1): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -1990,7 +1990,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): dropdown.js
* Bootstrap (v5.2.1): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -2060,8 +2060,9 @@
super(element, config);
this._popper = null;
this._parent = this._element.parentNode; // dropdown wrapper
// todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
this._menu = SelectorEngine.findOne(SELECTOR_MENU, this._parent);
this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0];
this._inNavbar = this._detectNavbar();
} // Getters
@@ -2377,8 +2378,9 @@
return;
}
event.preventDefault();
const getToggleButton = SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);
event.preventDefault(); // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
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];
const instance = Dropdown.getOrCreateInstance(getToggleButton);
if (isUpOrDownEvent) {
@@ -2420,7 +2422,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): util/scrollBar.js
* Bootstrap (v5.2.1): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -2539,7 +2541,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): util/backdrop.js
* Bootstrap (v5.2.1): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -2685,7 +2687,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): util/focustrap.js
* Bootstrap (v5.2.1): util/focustrap.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -2794,7 +2796,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): modal.js
* Bootstrap (v5.2.1): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -2813,6 +2815,7 @@
const EVENT_SHOW$4 = `show${EVENT_KEY$4}`;
const EVENT_SHOWN$4 = `shown${EVENT_KEY$4}`;
const EVENT_RESIZE$1 = `resize${EVENT_KEY$4}`;
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$4}`;
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$4}`;
const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$4}`;
const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$4}${DATA_API_KEY$2}`;
@@ -3005,20 +3008,22 @@
}
});
EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {
if (event.target !== event.currentTarget) {
// click is inside modal-dialog
return;
}
EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {
// a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
if (this._dialog.contains(event.target) || this._dialog.contains(event2.target)) {
return;
}
if (this._config.backdrop === 'static') {
this._triggerBackdropTransition();
if (this._config.backdrop === 'static') {
this._triggerBackdropTransition();
return;
}
return;
}
if (this._config.backdrop) {
this.hide();
}
if (this._config.backdrop) {
this.hide();
}
});
});
}
@@ -3167,7 +3172,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): offcanvas.js
* Bootstrap (v5.2.1): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -3441,7 +3446,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): util/sanitizer.js
* Bootstrap (v5.2.1): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -3546,7 +3551,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): util/template-factory.js
* Bootstrap (v5.2.1): util/template-factory.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -3704,7 +3709,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): tooltip.js
* Bootstrap (v5.2.1): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -3793,7 +3798,7 @@
this._isEnabled = true;
this._timeout = 0;
this._isHovered = false;
this._isHovered = null;
this._activeTrigger = {};
this._popper = null;
this._templateFactory = null;
@@ -3866,6 +3871,10 @@
this.tip.remove();
}
if (this._config.originalTitle) {
this._element.setAttribute('title', this._config.originalTitle);
}
this._disposePopper();
super.dispose();
@@ -3926,13 +3935,13 @@
}
const complete = () => {
const previousHoverState = this._isHovered;
this._isHovered = false;
EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN$2));
if (previousHoverState) {
if (this._isHovered === false) {
this._leave();
}
this._isHovered = false;
};
this._queueCallback(complete, this.tip, this._isAnimated());
@@ -3963,7 +3972,7 @@
this._activeTrigger[TRIGGER_CLICK] = false;
this._activeTrigger[TRIGGER_FOCUS] = false;
this._activeTrigger[TRIGGER_HOVER] = false;
this._isHovered = false;
this._isHovered = null; // it is a trick to support manual triggering
const complete = () => {
if (this._isWithActiveTrigger()) {
@@ -4326,7 +4335,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): popover.js
* Bootstrap (v5.2.1): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -4409,7 +4418,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): scrollspy.js
* Bootstrap (v5.2.1): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -4440,14 +4449,16 @@
// TODO: v6 @deprecated, keep it for backwards compatibility reasons
rootMargin: '0px 0px -25%',
smoothScroll: false,
target: null
target: null,
threshold: [0.1, 0.5, 1]
};
const DefaultType$1 = {
offset: '(number|null)',
// TODO v6 @deprecated, keep it for backwards compatibility reasons
rootMargin: 'string',
smoothScroll: 'boolean',
target: 'element'
target: 'element',
threshold: 'array'
};
/**
* Class definition
@@ -4508,7 +4519,14 @@
_configAfterMerge(config) {
// TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case
config.target = getElement(config.target) || document.body;
config.target = getElement(config.target) || document.body; // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only
config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin;
if (typeof config.threshold === 'string') {
config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value));
}
return config;
}
@@ -4544,8 +4562,8 @@
_getNewObserver() {
const options = {
root: this._rootElement,
threshold: [0.1, 0.5, 1],
rootMargin: this._getRootMargin()
threshold: this._config.threshold,
rootMargin: this._config.rootMargin
};
return new IntersectionObserver(entries => this._observerCallback(entries), options);
} // The logic of selection
@@ -4590,11 +4608,6 @@
activate(entry);
}
}
} // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only
_getRootMargin() {
return this._config.offset ? `${this._config.offset}px 0px -30%` : this._config.rootMargin;
}
_initializeTargetsAndObservables() {
@@ -4696,7 +4709,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): tab.js
* Bootstrap (v5.2.1): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -5009,7 +5022,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): toast.js
* Bootstrap (v5.2.1): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -5226,7 +5239,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.2.0): index.umd.js
* Bootstrap (v5.2.1): index.umd.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/