2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-24 14:04:09 +03:00

Release v4.3.0 (#28228)

* Prep for v4.3.0

* More updates for v4.3.0.

* rerun to build docs source map
This commit is contained in:
Mark Otto
2019-02-11 11:15:34 -08:00
committed by GitHub
parent 3aa0770b71
commit 1ded0d6a4e
277 changed files with 478 additions and 347 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap alert.js v4.2.1 (https://getbootstrap.com/)
* Bootstrap alert.js v4.3.0 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -35,7 +35,7 @@
*/
var NAME = 'alert';
var VERSION = '4.2.1';
var VERSION = '4.3.0';
var DATA_KEY = 'bs.alert';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap button.js v4.2.1 (https://getbootstrap.com/)
* Bootstrap button.js v4.3.0 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -34,7 +34,7 @@
*/
var NAME = 'button';
var VERSION = '4.2.1';
var VERSION = '4.3.0';
var DATA_KEY = 'bs.button';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
+1 -1
View File
File diff suppressed because one or more lines are too long
+5 -3
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap carousel.js v4.2.1 (https://getbootstrap.com/)
* Bootstrap carousel.js v4.3.0 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -69,7 +69,7 @@
*/
var NAME = 'carousel';
var VERSION = '4.2.1';
var VERSION = '4.3.0';
var DATA_KEY = 'bs.carousel';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -309,7 +309,9 @@
});
}
this._addTouchEventListeners();
if (this._config.touch) {
this._addTouchEventListeners();
}
};
_proto._addTouchEventListeners = function _addTouchEventListeners() {
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap collapse.js v4.2.1 (https://getbootstrap.com/)
* Bootstrap collapse.js v4.3.0 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -69,7 +69,7 @@
*/
var NAME = 'collapse';
var VERSION = '4.2.1';
var VERSION = '4.3.0';
var DATA_KEY = 'bs.collapse';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
+1 -1
View File
File diff suppressed because one or more lines are too long
+12 -8
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap dropdown.js v4.2.1 (https://getbootstrap.com/)
* Bootstrap dropdown.js v4.3.0 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -70,7 +70,7 @@
*/
var NAME = 'dropdown';
var VERSION = '4.2.1';
var VERSION = '4.3.0';
var DATA_KEY = 'bs.dropdown';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -356,24 +356,28 @@
return $(this._element).closest('.navbar').length > 0;
};
_proto._getPopperConfig = function _getPopperConfig() {
_proto._getOffset = function _getOffset() {
var _this2 = this;
var offsetConf = {};
var offset = {};
if (typeof this._config.offset === 'function') {
offsetConf.fn = function (data) {
data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets) || {});
offset.fn = function (data) {
data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {});
return data;
};
} else {
offsetConf.offset = this._config.offset;
offset.offset = this._config.offset;
}
return offset;
};
_proto._getPopperConfig = function _getPopperConfig() {
var popperConfig = {
placement: this._getPlacement(),
modifiers: {
offset: offsetConf,
offset: this._getOffset(),
flip: {
enabled: this._config.flip
},
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.2.1): index.js
* Bootstrap (v4.3.0): index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
+9 -3
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap modal.js v4.2.1 (https://getbootstrap.com/)
* Bootstrap modal.js v4.3.0 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -69,7 +69,7 @@
*/
var NAME = 'modal';
var VERSION = '4.2.1';
var VERSION = '4.3.0';
var DATA_KEY = 'bs.modal';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -102,6 +102,7 @@
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
};
var ClassName = {
SCROLLABLE: 'modal-dialog-scrollable',
SCROLLBAR_MEASURER: 'modal-scrollbar-measure',
BACKDROP: 'modal-backdrop',
OPEN: 'modal-open',
@@ -110,6 +111,7 @@
};
var Selector = {
DIALOG: '.modal-dialog',
MODAL_BODY: '.modal-body',
DATA_TOGGLE: '[data-toggle="modal"]',
DATA_DISMISS: '[data-dismiss="modal"]',
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
@@ -287,7 +289,11 @@
this._element.setAttribute('aria-modal', true);
this._element.scrollTop = 0;
if ($(this._dialog).hasClass(ClassName.SCROLLABLE)) {
this._dialog.querySelector(Selector.MODAL_BODY).scrollTop = 0;
} else {
this._element.scrollTop = 0;
}
if (transition) {
Util.reflow(this._element);
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap popover.js v4.2.1 (https://getbootstrap.com/)
* Bootstrap popover.js v4.3.0 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -75,7 +75,7 @@
*/
var NAME = 'popover';
var VERSION = '4.2.1';
var VERSION = '4.3.0';
var DATA_KEY = 'bs.popover';
var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap scrollspy.js v4.2.1 (https://getbootstrap.com/)
* Bootstrap scrollspy.js v4.3.0 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -69,7 +69,7 @@
*/
var NAME = 'scrollspy';
var VERSION = '4.2.1';
var VERSION = '4.3.0';
var DATA_KEY = 'bs.scrollspy';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -3
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap tab.js v4.2.1 (https://getbootstrap.com/)
* Bootstrap tab.js v4.3.0 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -35,7 +35,7 @@
*/
var NAME = 'tab';
var VERSION = '4.2.1';
var VERSION = '4.3.0';
var DATA_KEY = 'bs.tab';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
@@ -186,7 +186,10 @@
}
Util.reflow(element);
$(element).addClass(ClassName.SHOW);
if (element.classList.contains(ClassName.FADE)) {
element.classList.add(ClassName.SHOW);
}
if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
+1 -1
View File
File diff suppressed because one or more lines are too long
+7 -2
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap toast.js v4.2.1 (https://getbootstrap.com/)
* Bootstrap toast.js v4.3.0 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -69,7 +69,7 @@
*/
var NAME = 'toast';
var VERSION = '4.2.1';
var VERSION = '4.3.0';
var DATA_KEY = 'bs.toast';
var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
@@ -253,6 +253,11 @@
get: function get() {
return DefaultType;
}
}, {
key: "Default",
get: function get() {
return Default;
}
}]);
return Toast;
+1 -1
View File
File diff suppressed because one or more lines are too long
+32 -17
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap tooltip.js v4.2.1 (https://getbootstrap.com/)
* Bootstrap tooltip.js v4.3.0 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -70,7 +70,7 @@
*/
var NAME = 'tooltip';
var VERSION = '4.2.1';
var VERSION = '4.3.0';
var DATA_KEY = 'bs.tooltip';
var EVENT_KEY = "." + DATA_KEY;
var JQUERY_NO_CONFLICT = $.fn[NAME];
@@ -85,7 +85,7 @@
html: 'boolean',
selector: '(string|boolean)',
placement: '(string|function)',
offset: '(number|string)',
offset: '(number|string|function)',
container: '(string|element|boolean)',
fallbackPlacement: '(string|array)',
boundary: '(string|element)'
@@ -294,9 +294,7 @@
this._popper = new Popper(this.element, tip, {
placement: attachment,
modifiers: {
offset: {
offset: this.config.offset
},
offset: this._getOffset(),
flip: {
behavior: this.config.fallbackPlacement
},
@@ -455,6 +453,23 @@
} // Private
;
_proto._getOffset = function _getOffset() {
var _this3 = this;
var offset = {};
if (typeof this.config.offset === 'function') {
offset.fn = function (data) {
data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {});
return data;
};
} else {
offset.offset = this.config.offset;
}
return offset;
};
_proto._getContainer = function _getContainer() {
if (this.config.container === false) {
return document.body;
@@ -472,27 +487,27 @@
};
_proto._setListeners = function _setListeners() {
var _this3 = this;
var _this4 = this;
var triggers = this.config.trigger.split(' ');
triggers.forEach(function (trigger) {
if (trigger === 'click') {
$(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) {
return _this3.toggle(event);
$(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) {
return _this4.toggle(event);
});
} else if (trigger !== Trigger.MANUAL) {
var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN;
var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT;
$(_this3.element).on(eventIn, _this3.config.selector, function (event) {
return _this3._enter(event);
}).on(eventOut, _this3.config.selector, function (event) {
return _this3._leave(event);
var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN;
var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT;
$(_this4.element).on(eventIn, _this4.config.selector, function (event) {
return _this4._enter(event);
}).on(eventOut, _this4.config.selector, function (event) {
return _this4._leave(event);
});
}
});
$(this.element).closest('.modal').on('hide.bs.modal', function () {
if (_this3.element) {
_this3.hide();
if (_this4.element) {
_this4.hide();
}
});
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,5 +1,5 @@
/*!
* Bootstrap util.js v4.2.1 (https://getbootstrap.com/)
* Bootstrap util.js v4.3.0 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -13,7 +13,7 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.2.1): util.js
* Bootstrap (v4.3.0): util.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.2.1): alert.js
* Bootstrap (v4.3.0): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'alert'
const VERSION = '4.2.1'
const VERSION = '4.3.0'
const DATA_KEY = 'bs.alert'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
+2 -2
View File
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.2.1): button.js
* Bootstrap (v4.3.0): button.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -14,7 +14,7 @@ import $ from 'jquery'
*/
const NAME = 'button'
const VERSION = '4.2.1'
const VERSION = '4.3.0'
const DATA_KEY = 'bs.button'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
+2 -2
View File
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.2.1): carousel.js
* Bootstrap (v4.3.0): carousel.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'carousel'
const VERSION = '4.2.1'
const VERSION = '4.3.0'
const DATA_KEY = 'bs.carousel'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
+2 -2
View File
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.2.1): collapse.js
* Bootstrap (v4.3.0): collapse.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'collapse'
const VERSION = '4.2.1'
const VERSION = '4.3.0'
const DATA_KEY = 'bs.collapse'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
+2 -2
View File
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.2.1): dropdown.js
* Bootstrap (v4.3.0): dropdown.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -16,7 +16,7 @@ import Util from './util'
*/
const NAME = 'dropdown'
const VERSION = '4.2.1'
const VERSION = '4.3.0'
const DATA_KEY = 'bs.dropdown'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
+1 -1
View File
@@ -14,7 +14,7 @@ import Util from './util'
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.2.1): index.js
* Bootstrap (v4.3.0): index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
+2 -2
View File
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.2.1): modal.js
* Bootstrap (v4.3.0): modal.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'modal'
const VERSION = '4.2.1'
const VERSION = '4.3.0'
const DATA_KEY = 'bs.modal'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
+2 -2
View File
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.2.1): popover.js
* Bootstrap (v4.3.0): popover.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Tooltip from './tooltip'
*/
const NAME = 'popover'
const VERSION = '4.2.1'
const VERSION = '4.3.0'
const DATA_KEY = 'bs.popover'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
+2 -2
View File
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.2.1): scrollspy.js
* Bootstrap (v4.3.0): scrollspy.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'scrollspy'
const VERSION = '4.2.1'
const VERSION = '4.3.0'
const DATA_KEY = 'bs.scrollspy'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
+2 -2
View File
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.2.1): tab.js
* Bootstrap (v4.3.0): tab.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'tab'
const VERSION = '4.2.1'
const VERSION = '4.3.0'
const DATA_KEY = 'bs.tab'
const EVENT_KEY = `.${DATA_KEY}`
const DATA_API_KEY = '.data-api'
+2 -2
View File
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.2.1): toast.js
* Bootstrap (v4.3.0): toast.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -15,7 +15,7 @@ import Util from './util'
*/
const NAME = 'toast'
const VERSION = '4.2.1'
const VERSION = '4.3.0'
const DATA_KEY = 'bs.toast'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
+2 -2
View File
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.2.1): tooltip.js
* Bootstrap (v4.3.0): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
@@ -16,7 +16,7 @@ import Util from './util'
*/
const NAME = 'tooltip'
const VERSION = '4.2.1'
const VERSION = '4.3.0'
const DATA_KEY = 'bs.tooltip'
const EVENT_KEY = `.${DATA_KEY}`
const JQUERY_NO_CONFLICT = $.fn[NAME]
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.2.1): util.js
* Bootstrap (v4.3.0): util.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/