1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-21 04:41:36 +02:00

Release v5.1.1 (#34869)

* Prepare v5.1.1.

* Dist
This commit is contained in:
XhmikosR
2021-09-07 18:37:44 +03:00
committed by GitHub
parent b6855ae138
commit 0d81d3cbc1
114 changed files with 650 additions and 334 deletions

View File

@@ -1,5 +1,5 @@
/*!
* Bootstrap v5.1.0 (https://getbootstrap.com/)
* Bootstrap v5.1.1 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -33,7 +33,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/index.js
* Bootstrap (v5.1.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -344,7 +344,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): dom/event-handler.js
* Bootstrap (v5.1.1): dom/event-handler.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -407,7 +407,6 @@
event.delegateTarget = target;
if (handler.oneOff) {
// eslint-disable-next-line unicorn/consistent-destructuring
EventHandler.off(element, event.type, selector, fn);
}
@@ -633,7 +632,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): dom/data.js
* Bootstrap (v5.1.1): dom/data.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -687,7 +686,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): base-component.js
* Bootstrap (v5.1.1): base-component.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -697,7 +696,7 @@
* ------------------------------------------------------------------------
*/
const VERSION = '5.1.0';
const VERSION = '5.1.1';
class BaseComponent {
constructor(element) {
@@ -753,7 +752,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/component-functions.js
* Bootstrap (v5.1.1): util/component-functions.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -779,7 +778,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): alert.js
* Bootstrap (v5.1.1): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -868,7 +867,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): button.js
* Bootstrap (v5.1.1): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -939,7 +938,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): dom/manipulator.js
* Bootstrap (v5.1.1): dom/manipulator.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -1013,7 +1012,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): dom/selector-engine.js
* Bootstrap (v5.1.1): dom/selector-engine.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -1083,7 +1082,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): carousel.js
* Bootstrap (v5.1.1): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -1308,8 +1307,12 @@
}
_addTouchEventListeners() {
const hasPointerPenTouch = event => {
return this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);
};
const start = event => {
if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
if (hasPointerPenTouch(event)) {
this.touchStartX = event.clientX;
} else if (!this._pointerEvent) {
this.touchStartX = event.touches[0].clientX;
@@ -1322,7 +1325,7 @@
};
const end = event => {
if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {
if (hasPointerPenTouch(event)) {
this.touchDeltaX = event.clientX - this.touchStartX;
}
@@ -1628,7 +1631,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): collapse.js
* Bootstrap (v5.1.1): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -1662,7 +1665,7 @@
const CLASS_NAME_HORIZONTAL = 'collapse-horizontal';
const WIDTH = 'width';
const HEIGHT = 'height';
const SELECTOR_ACTIVES = '.show, .collapsing';
const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';
const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="collapse"]';
/**
* ------------------------------------------------------------------------
@@ -1946,7 +1949,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): dropdown.js
* Bootstrap (v5.1.1): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -2408,7 +2411,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/scrollBar.js
* Bootstrap (v5.1.1): util/scrollBar.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -2512,7 +2515,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/backdrop.js
* Bootstrap (v5.1.1): util/backdrop.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -2636,7 +2639,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/focustrap.js
* Bootstrap (v5.1.1): util/focustrap.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -2739,7 +2742,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): modal.js
* Bootstrap (v5.1.1): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -2779,6 +2782,7 @@
const CLASS_NAME_FADE$3 = 'fade';
const CLASS_NAME_SHOW$4 = 'show';
const CLASS_NAME_STATIC = 'modal-static';
const OPEN_SELECTOR$1 = '.modal.show';
const SELECTOR_DIALOG = '.modal-dialog';
const SELECTOR_MODAL_BODY = '.modal-body';
const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
@@ -3144,7 +3148,14 @@
this.focus();
}
});
});
}); // avoid conflict when clicking moddal toggler while another one is open
const allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1);
if (allReadyOpen) {
Modal.getInstance(allReadyOpen).hide();
}
const data = Modal.getOrCreateInstance(target);
data.toggle(this);
});
@@ -3160,7 +3171,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): offcanvas.js
* Bootstrap (v5.1.1): offcanvas.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -3416,7 +3427,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): util/sanitizer.js
* Bootstrap (v5.1.1): util/sanitizer.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -3529,7 +3540,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): tooltip.js
* Bootstrap (v5.1.1): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -3703,9 +3714,7 @@
this.tip.remove();
}
if (this._popper) {
this._popper.destroy();
}
this._disposePopper();
super.dispose();
}
@@ -3725,6 +3734,15 @@
if (showEvent.defaultPrevented || !isInTheDom) {
return;
} // A trick to recreate a tooltip in case a new title is given by using the NOT documented `data-bs-original-title`
// This will be removed later in favor of a `setContent` method
if (this.constructor.NAME === 'tooltip' && this.tip && this.getTitle() !== this.tip.querySelector(SELECTOR_TOOLTIP_INNER).innerHTML) {
this._disposePopper();
this.tip.remove();
this.tip = null;
}
const tip = this.getTipElement();
@@ -3814,11 +3832,7 @@
EventHandler.trigger(this._element, this.constructor.Event.HIDDEN);
if (this._popper) {
this._popper.destroy();
this._popper = null;
}
this._disposePopper();
};
const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE);
@@ -4198,6 +4212,14 @@
this._cleanTipClass();
this._addAttachmentClass(this._getAttachment(state.placement));
}
_disposePopper() {
if (this._popper) {
this._popper.destroy();
this._popper = null;
}
} // Static
@@ -4228,7 +4250,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): popover.js
* Bootstrap (v5.1.1): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -4338,7 +4360,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): scrollspy.js
* Bootstrap (v5.1.1): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -4573,7 +4595,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): tab.js
* Bootstrap (v5.1.1): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -4771,7 +4793,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): toast.js
* Bootstrap (v5.1.1): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -5001,7 +5023,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v5.1.0): index.umd.js
* Bootstrap (v5.1.1): index.umd.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* --------------------------------------------------------------------------
*/