Updated bootstrap to 4.3.1
This commit is contained in:
parent
c343f1f2d1
commit
fcd12d9924
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"version": 3,
|
||||
"mappings": "AAAA,AAAA,aAAa,AAAA,CACT,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,CAAC,CACV,UAAU,CAAE,IAAI,CAChB,SAAS,CAAE,KAAK,CAChB,KAAK,CAAE,CAAC,CACR,WAAW,CAAC,WAAW,CACvB,WAAW,CAAE,IAAI,CACjB,UAAU,CAAE,iBAAiB,CAQhC,AAjBD,AAUI,aAVS,AAUR,IAAK,CAAA,kBAAkB,CAAE,CACtB,OAAO,CAAE,MAAM,CACf,KAAK,CAAE,IAAI,CACX,SAAS,CAAE,KAAK,CAChB,WAAW,CAAC,GAAG,CACf,UAAU,CAAE,iBAAiB,CAChC,AAGL,AAAA,UAAU,AAAC,CACP,MAAM,CAAE,IAAI,CACZ,SAAS,CAAE,KAAK,CAChB,gBAAgB,CAAE,OAAO,CACzB,aAAa,CAAE,IAAI,CACnB,OAAO,CAAE,IAAI,CAehB,AApBD,AAOQ,UAPE,AAML,MAAM,CACD,YAAY,AAAA,CACV,UAAU,CAAE,KAAK,CACjB,KAAK,CAAE,OAAO,CACjB,AAVT,AAWQ,UAXE,AAML,MAAM,CAKD,aAAa,AAAA,CACX,OAAO,CAAE,MAAM,CACf,SAAS,CAAE,KAAK,CAChB,KAAK,CAAE,GAAG,CACV,SAAS,CAAE,KAAK,CAChB,WAAW,CAAC,GAAG,CACf,UAAU,CAAE,iBAAiB,CAChC,AAIT,AAAA,YAAY,AAAA,CACR,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,KAAK,CAAE,KAAK,CACZ,OAAO,CAAE,IAAI,CACb,eAAe,CAAE,MAAM,CACvB,WAAW,CAAE,MAAM,CACnB,aAAa,CAAE,GAAG,CAClB,KAAK,CAAC,KAAK,CAKd,AAbD,AASI,YATQ,CASR,CAAC,AAAC,CACE,MAAM,CAAE,KAAK,CACb,WAAW,CAAE,IAAI,CACpB",
|
||||
"mappings": "AAAA,AAAA,aAAa,AAAC,CACV,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,CAAC,CACV,UAAU,CAAE,IAAI,CAChB,SAAS,CAAE,KAAK,CAChB,KAAK,CAAE,CAAC,CACR,WAAW,CAAE,WAAW,CACxB,WAAW,CAAE,IAAI,CACjB,UAAU,CAAE,iBAAiB,CAShC,AAlBD,AAWI,aAXS,AAWR,IAAK,CAAA,kBAAkB,CAAE,CACtB,OAAO,CAAE,MAAM,CACf,KAAK,CAAE,IAAI,CACX,SAAS,CAAE,KAAK,CAChB,WAAW,CAAE,GAAG,CAChB,UAAU,CAAE,iBAAiB,CAChC,AAGL,AAAA,UAAU,AAAC,CACP,MAAM,CAAE,IAAI,CACZ,SAAS,CAAE,KAAK,CAChB,gBAAgB,CAAE,OAAO,CACzB,aAAa,CAAE,IAAI,CACnB,OAAO,CAAE,IAAI,CAiBhB,AAtBD,AAQQ,UARE,AAOL,MAAM,CACF,YAAY,AAAC,CACV,UAAU,CAAE,KAAK,CACjB,KAAK,CAAE,OAAO,CACjB,AAXT,AAaQ,UAbE,AAOL,MAAM,CAMF,aAAa,AAAC,CACX,OAAO,CAAE,MAAM,CACf,SAAS,CAAE,KAAK,CAChB,KAAK,CAAE,GAAG,CACV,SAAS,CAAE,KAAK,CAChB,WAAW,CAAE,GAAG,CAChB,UAAU,CAAE,iBAAiB,CAChC,AAIT,AAAA,YAAY,AAAC,CACT,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,KAAK,CAAE,KAAK,CACZ,OAAO,CAAE,IAAI,CACb,eAAe,CAAE,MAAM,CACvB,WAAW,CAAE,MAAM,CACnB,aAAa,CAAE,GAAG,CAClB,KAAK,CAAE,KAAK,CAMf,AAdD,AAUI,YAVQ,CAUR,CAAC,AAAC,CACE,MAAM,CAAE,KAAK,CACb,WAAW,CAAE,IAAI,CACpB",
|
||||
"sources": [
|
||||
"../scss/search.scss"
|
||||
],
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
/*!
|
||||
* Bootstrap alert.js v4.2.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap alert.js v4.3.1 (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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||
(global.Alert = factory(global.jQuery,global.Util));
|
||||
}(this, (function ($,Util) { 'use strict';
|
||||
(global = global || self, global.Alert = factory(global.jQuery, global.Util));
|
||||
}(this, function ($, Util) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
|
||||
|
@ -35,7 +35,7 @@
|
|||
*/
|
||||
|
||||
var NAME = 'alert';
|
||||
var VERSION = '4.2.1';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.alert';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
|
@ -90,8 +90,8 @@
|
|||
_proto.dispose = function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
}; // Private
|
||||
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getRootElement = function _getRootElement(element) {
|
||||
var selector = Util.getSelectorFromElement(element);
|
||||
|
@ -133,8 +133,8 @@
|
|||
|
||||
_proto._destroyElement = function _destroyElement(element) {
|
||||
$(element).detach().trigger(Event.CLOSED).remove();
|
||||
}; // Static
|
||||
|
||||
} // Static
|
||||
;
|
||||
|
||||
Alert._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
|
@ -195,5 +195,5 @@
|
|||
|
||||
return Alert;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=alert.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,13 @@
|
|||
/*!
|
||||
* Bootstrap button.js v4.2.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap button.js v4.3.1 (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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
||||
(global.Button = factory(global.jQuery));
|
||||
}(this, (function ($) { 'use strict';
|
||||
(global = global || self, global.Button = factory(global.jQuery));
|
||||
}(this, function ($) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
|
||||
var NAME = 'button';
|
||||
var VERSION = '4.2.1';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.button';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
|
@ -120,8 +120,8 @@
|
|||
_proto.dispose = function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
}; // Static
|
||||
|
||||
} // Static
|
||||
;
|
||||
|
||||
Button._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
|
@ -183,5 +183,5 @@
|
|||
|
||||
return Button;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=button.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,13 @@
|
|||
/*!
|
||||
* Bootstrap carousel.js v4.2.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap carousel.js v4.3.1 (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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||
(global.Carousel = factory(global.jQuery,global.Util));
|
||||
}(this, (function ($,Util) { 'use strict';
|
||||
(global = global || self, global.Carousel = factory(global.jQuery, global.Util));
|
||||
}(this, function ($, Util) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
|
||||
|
@ -69,7 +69,7 @@
|
|||
*/
|
||||
|
||||
var NAME = 'carousel';
|
||||
var VERSION = '4.2.1';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.carousel';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
|
@ -264,8 +264,8 @@
|
|||
this._isSliding = null;
|
||||
this._activeElement = null;
|
||||
this._indicatorsElement = null;
|
||||
}; // Private
|
||||
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _objectSpread({}, Default, config);
|
||||
|
@ -309,7 +309,9 @@
|
|||
});
|
||||
}
|
||||
|
||||
if (this._config.touch) {
|
||||
this._addTouchEventListeners();
|
||||
}
|
||||
};
|
||||
|
||||
_proto._addTouchEventListeners = function _addTouchEventListeners() {
|
||||
|
@ -550,8 +552,8 @@
|
|||
if (isCycling) {
|
||||
this.cycle();
|
||||
}
|
||||
}; // Static
|
||||
|
||||
} // Static
|
||||
;
|
||||
|
||||
Carousel._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
|
@ -578,7 +580,7 @@
|
|||
}
|
||||
|
||||
data[action]();
|
||||
} else if (_config.interval) {
|
||||
} else if (_config.interval && _config.ride) {
|
||||
data.pause();
|
||||
data.cycle();
|
||||
}
|
||||
|
@ -662,5 +664,5 @@
|
|||
|
||||
return Carousel;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=carousel.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,13 @@
|
|||
/*!
|
||||
* Bootstrap collapse.js v4.2.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap collapse.js v4.3.1 (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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||
(global.Collapse = factory(global.jQuery,global.Util));
|
||||
}(this, (function ($,Util) { 'use strict';
|
||||
(global = global || self, global.Collapse = factory(global.jQuery, global.Util));
|
||||
}(this, function ($, Util) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
|
||||
|
@ -69,7 +69,7 @@
|
|||
*/
|
||||
|
||||
var NAME = 'collapse';
|
||||
var VERSION = '4.2.1';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.collapse';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
|
@ -291,8 +291,8 @@
|
|||
this._element = null;
|
||||
this._triggerArray = null;
|
||||
this._isTransitioning = null;
|
||||
}; // Private
|
||||
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _objectSpread({}, Default, config);
|
||||
|
@ -336,8 +336,8 @@
|
|||
if (triggerArray.length) {
|
||||
$(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
|
||||
}
|
||||
}; // Static
|
||||
|
||||
} // Static
|
||||
;
|
||||
|
||||
Collapse._getTargetFromElement = function _getTargetFromElement(element) {
|
||||
var selector = Util.getSelectorFromElement(element);
|
||||
|
@ -424,5 +424,5 @@
|
|||
|
||||
return Collapse;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=collapse.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,13 @@
|
|||
/*!
|
||||
* Bootstrap dropdown.js v4.2.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap dropdown.js v4.3.1 (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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
|
||||
(global.Dropdown = factory(global.jQuery,global.Popper,global.Util));
|
||||
}(this, (function ($,Popper,Util) { 'use strict';
|
||||
(global = global || self, global.Dropdown = factory(global.jQuery, global.Popper, global.Util));
|
||||
}(this, function ($, Popper, Util) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
|
||||
|
@ -70,7 +70,7 @@
|
|||
*/
|
||||
|
||||
var NAME = 'dropdown';
|
||||
var VERSION = '4.2.1';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.dropdown';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
|
@ -299,8 +299,8 @@
|
|||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate();
|
||||
}
|
||||
}; // Private
|
||||
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._addEventListeners = function _addEventListeners() {
|
||||
var _this = this;
|
||||
|
@ -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
|
||||
},
|
||||
|
@ -391,8 +395,8 @@
|
|||
}
|
||||
|
||||
return popperConfig;
|
||||
}; // Static
|
||||
|
||||
} // Static
|
||||
;
|
||||
|
||||
Dropdown._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
|
@ -476,8 +480,8 @@
|
|||
}
|
||||
|
||||
return parent || element.parentNode;
|
||||
}; // eslint-disable-next-line complexity
|
||||
|
||||
} // eslint-disable-next-line complexity
|
||||
;
|
||||
|
||||
Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) {
|
||||
// If not input/textarea:
|
||||
|
@ -587,5 +591,5 @@
|
|||
|
||||
return Dropdown;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=dropdown.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.2.1): index.js
|
||||
* Bootstrap (v4.3.1): index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
/*!
|
||||
* Bootstrap modal.js v4.2.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap modal.js v4.3.1 (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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||
(global.Modal = factory(global.jQuery,global.Util));
|
||||
}(this, (function ($,Util) { 'use strict';
|
||||
(global = global || self, global.Modal = factory(global.jQuery, global.Util));
|
||||
}(this, function ($, Util) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
|
||||
|
@ -69,7 +69,7 @@
|
|||
*/
|
||||
|
||||
var NAME = 'modal';
|
||||
var VERSION = '4.2.1';
|
||||
var VERSION = '4.3.1';
|
||||
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',
|
||||
|
@ -262,8 +264,8 @@
|
|||
|
||||
_proto.handleUpdate = function handleUpdate() {
|
||||
this._adjustDialog();
|
||||
}; // Private
|
||||
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _objectSpread({}, Default, config);
|
||||
|
@ -287,7 +289,11 @@
|
|||
|
||||
this._element.setAttribute('aria-modal', true);
|
||||
|
||||
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);
|
||||
|
@ -457,11 +463,11 @@
|
|||
} else if (callback) {
|
||||
callback();
|
||||
}
|
||||
}; // ----------------------------------------------------------------------
|
||||
} // ----------------------------------------------------------------------
|
||||
// the following methods are used to handle overflowing modals
|
||||
// todo (fat): these should probably be refactored out of modal.js
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
;
|
||||
|
||||
_proto._adjustDialog = function _adjustDialog() {
|
||||
var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
|
||||
|
@ -546,8 +552,8 @@
|
|||
var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
|
||||
document.body.removeChild(scrollDiv);
|
||||
return scrollbarWidth;
|
||||
}; // Static
|
||||
|
||||
} // Static
|
||||
;
|
||||
|
||||
Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) {
|
||||
return this.each(function () {
|
||||
|
@ -640,5 +646,5 @@
|
|||
|
||||
return Modal;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=modal.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,13 @@
|
|||
/*!
|
||||
* Bootstrap popover.js v4.2.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap popover.js v4.3.1 (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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./tooltip.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './tooltip.js'], factory) :
|
||||
(global.Popover = factory(global.jQuery,global.Tooltip));
|
||||
}(this, (function ($,Tooltip) { 'use strict';
|
||||
(global = global || self, global.Popover = factory(global.jQuery, global.Tooltip));
|
||||
}(this, function ($, Tooltip) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Tooltip = Tooltip && Tooltip.hasOwnProperty('default') ? Tooltip['default'] : Tooltip;
|
||||
|
@ -75,7 +75,7 @@
|
|||
*/
|
||||
|
||||
var NAME = 'popover';
|
||||
var VERSION = '4.2.1';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.popover';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
|
@ -158,8 +158,8 @@
|
|||
|
||||
this.setElementContent($tip.find(Selector.CONTENT), content);
|
||||
$tip.removeClass(ClassName.FADE + " " + ClassName.SHOW);
|
||||
}; // Private
|
||||
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getContent = function _getContent() {
|
||||
return this.element.getAttribute('data-content') || this.config.content;
|
||||
|
@ -172,8 +172,8 @@
|
|||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
}
|
||||
}; // Static
|
||||
|
||||
} // Static
|
||||
;
|
||||
|
||||
Popover._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
|
@ -257,5 +257,5 @@
|
|||
|
||||
return Popover;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=popover.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,13 @@
|
|||
/*!
|
||||
* Bootstrap scrollspy.js v4.2.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap scrollspy.js v4.3.1 (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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||
(global.ScrollSpy = factory(global.jQuery,global.Util));
|
||||
}(this, (function ($,Util) { 'use strict';
|
||||
(global = global || self, global.ScrollSpy = factory(global.jQuery, global.Util));
|
||||
}(this, function ($, Util) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
|
||||
|
@ -69,7 +69,7 @@
|
|||
*/
|
||||
|
||||
var NAME = 'scrollspy';
|
||||
var VERSION = '4.2.1';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.scrollspy';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
|
@ -192,8 +192,8 @@
|
|||
this._targets = null;
|
||||
this._activeTarget = null;
|
||||
this._scrollHeight = null;
|
||||
}; // Private
|
||||
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _objectSpread({}, Default, typeof config === 'object' && config ? config : {});
|
||||
|
@ -300,8 +300,8 @@
|
|||
}).forEach(function (node) {
|
||||
return node.classList.remove(ClassName.ACTIVE);
|
||||
});
|
||||
}; // Static
|
||||
|
||||
} // Static
|
||||
;
|
||||
|
||||
ScrollSpy._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
|
@ -371,5 +371,5 @@
|
|||
|
||||
return ScrollSpy;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=scrollspy.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,13 @@
|
|||
/*!
|
||||
* Bootstrap tab.js v4.2.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap tab.js v4.3.1 (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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||
(global.Tab = factory(global.jQuery,global.Util));
|
||||
}(this, (function ($,Util) { 'use strict';
|
||||
(global = global || self, global.Tab = factory(global.jQuery, global.Util));
|
||||
}(this, function ($, Util) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
|
||||
|
@ -35,7 +35,7 @@
|
|||
*/
|
||||
|
||||
var NAME = 'tab';
|
||||
var VERSION = '4.2.1';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.tab';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
|
@ -143,8 +143,8 @@
|
|||
_proto.dispose = function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
}; // Private
|
||||
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._activate = function _activate(element, container, callback) {
|
||||
var _this2 = this;
|
||||
|
@ -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];
|
||||
|
@ -202,8 +205,8 @@
|
|||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
}; // Static
|
||||
|
||||
} // Static
|
||||
;
|
||||
|
||||
Tab._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
|
@ -262,5 +265,5 @@
|
|||
|
||||
return Tab;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=tab.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,13 @@
|
|||
/*!
|
||||
* Bootstrap toast.js v4.2.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap toast.js v4.3.1 (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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
|
||||
(global.Toast = factory(global.jQuery,global.Util));
|
||||
}(this, (function ($,Util) { 'use strict';
|
||||
(global = global || self, global.Toast = factory(global.jQuery, global.Util));
|
||||
}(this, function ($, Util) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
|
||||
|
@ -69,7 +69,7 @@
|
|||
*/
|
||||
|
||||
var NAME = 'toast';
|
||||
var VERSION = '4.2.1';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.toast';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
|
@ -184,8 +184,8 @@
|
|||
$.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
this._config = null;
|
||||
}; // Private
|
||||
|
||||
} // Private
|
||||
;
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _objectSpread({}, Default, $(this._element).data(), typeof config === 'object' && config ? config : {});
|
||||
|
@ -218,8 +218,8 @@
|
|||
} else {
|
||||
complete();
|
||||
}
|
||||
}; // Static
|
||||
|
||||
} // Static
|
||||
;
|
||||
|
||||
Toast._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
|
@ -253,6 +253,11 @@
|
|||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Toast;
|
||||
|
@ -274,5 +279,5 @@
|
|||
|
||||
return Toast;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=toast.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,13 @@
|
|||
/*!
|
||||
* Bootstrap tooltip.js v4.2.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap tooltip.js v4.3.1 (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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
|
||||
(global.Tooltip = factory(global.jQuery,global.Popper,global.Util));
|
||||
}(this, (function ($,Popper,Util) { 'use strict';
|
||||
(global = global || self, global.Tooltip = factory(global.jQuery, global.Popper, global.Util));
|
||||
}(this, function ($, Popper, Util) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
|
||||
|
@ -63,6 +63,127 @@
|
|||
return target;
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.3.1): tools/sanitizer.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
|
||||
var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
|
||||
var DefaultWhitelist = {
|
||||
// Global attributes allowed on any supplied element below.
|
||||
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
|
||||
a: ['target', 'href', 'title', 'rel'],
|
||||
area: [],
|
||||
b: [],
|
||||
br: [],
|
||||
col: [],
|
||||
code: [],
|
||||
div: [],
|
||||
em: [],
|
||||
hr: [],
|
||||
h1: [],
|
||||
h2: [],
|
||||
h3: [],
|
||||
h4: [],
|
||||
h5: [],
|
||||
h6: [],
|
||||
i: [],
|
||||
img: ['src', 'alt', 'title', 'width', 'height'],
|
||||
li: [],
|
||||
ol: [],
|
||||
p: [],
|
||||
pre: [],
|
||||
s: [],
|
||||
small: [],
|
||||
span: [],
|
||||
sub: [],
|
||||
sup: [],
|
||||
strong: [],
|
||||
u: [],
|
||||
ul: []
|
||||
/**
|
||||
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
||||
*
|
||||
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
|
||||
};
|
||||
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
|
||||
/**
|
||||
* A pattern that matches safe data URLs. Only matches image, video and audio types.
|
||||
*
|
||||
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
|
||||
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
|
||||
|
||||
function allowedAttribute(attr, allowedAttributeList) {
|
||||
var attrName = attr.nodeName.toLowerCase();
|
||||
|
||||
if (allowedAttributeList.indexOf(attrName) !== -1) {
|
||||
if (uriAttrs.indexOf(attrName) !== -1) {
|
||||
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
var regExp = allowedAttributeList.filter(function (attrRegex) {
|
||||
return attrRegex instanceof RegExp;
|
||||
}); // Check if a regular expression validates the attribute.
|
||||
|
||||
for (var i = 0, l = regExp.length; i < l; i++) {
|
||||
if (attrName.match(regExp[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
|
||||
if (unsafeHtml.length === 0) {
|
||||
return unsafeHtml;
|
||||
}
|
||||
|
||||
if (sanitizeFn && typeof sanitizeFn === 'function') {
|
||||
return sanitizeFn(unsafeHtml);
|
||||
}
|
||||
|
||||
var domParser = new window.DOMParser();
|
||||
var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
|
||||
var whitelistKeys = Object.keys(whiteList);
|
||||
var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
|
||||
|
||||
var _loop = function _loop(i, len) {
|
||||
var el = elements[i];
|
||||
var elName = el.nodeName.toLowerCase();
|
||||
|
||||
if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
|
||||
el.parentNode.removeChild(el);
|
||||
return "continue";
|
||||
}
|
||||
|
||||
var attributeList = [].slice.call(el.attributes);
|
||||
var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
|
||||
attributeList.forEach(function (attr) {
|
||||
if (!allowedAttribute(attr, whitelistedAttributes)) {
|
||||
el.removeAttribute(attr.nodeName);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
for (var i = 0, len = elements.length; i < len; i++) {
|
||||
var _ret = _loop(i, len);
|
||||
|
||||
if (_ret === "continue") continue;
|
||||
}
|
||||
|
||||
return createdDocument.body.innerHTML;
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
|
@ -70,12 +191,13 @@
|
|||
*/
|
||||
|
||||
var NAME = 'tooltip';
|
||||
var VERSION = '4.2.1';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.tooltip';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var CLASS_PREFIX = 'bs-tooltip';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
|
||||
var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
|
||||
var DefaultType = {
|
||||
animation: 'boolean',
|
||||
template: 'string',
|
||||
|
@ -85,10 +207,13 @@
|
|||
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)'
|
||||
boundary: '(string|element)',
|
||||
sanitize: 'boolean',
|
||||
sanitizeFn: '(null|function)',
|
||||
whiteList: 'object'
|
||||
};
|
||||
var AttachmentMap = {
|
||||
AUTO: 'auto',
|
||||
|
@ -109,7 +234,10 @@
|
|||
offset: 0,
|
||||
container: false,
|
||||
fallbackPlacement: 'flip',
|
||||
boundary: 'scrollParent'
|
||||
boundary: 'scrollParent',
|
||||
sanitize: true,
|
||||
sanitizeFn: null,
|
||||
whiteList: DefaultWhitelist
|
||||
};
|
||||
var HoverState = {
|
||||
SHOW: 'show',
|
||||
|
@ -294,9 +422,7 @@
|
|||
this._popper = new Popper(this.element, tip, {
|
||||
placement: attachment,
|
||||
modifiers: {
|
||||
offset: {
|
||||
offset: this.config.offset
|
||||
},
|
||||
offset: this._getOffset(),
|
||||
flip: {
|
||||
behavior: this.config.fallbackPlacement
|
||||
},
|
||||
|
@ -405,8 +531,8 @@
|
|||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate();
|
||||
}
|
||||
}; // Protected
|
||||
|
||||
} // Protected
|
||||
;
|
||||
|
||||
_proto.isWithContent = function isWithContent() {
|
||||
return Boolean(this.getTitle());
|
||||
|
@ -428,19 +554,27 @@
|
|||
};
|
||||
|
||||
_proto.setElementContent = function setElementContent($element, content) {
|
||||
var html = this.config.html;
|
||||
|
||||
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
|
||||
// Content is a DOM node or a jQuery
|
||||
if (html) {
|
||||
if (this.config.html) {
|
||||
if (!$(content).parent().is($element)) {
|
||||
$element.empty().append(content);
|
||||
}
|
||||
} else {
|
||||
$element.text($(content).text());
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.config.html) {
|
||||
if (this.config.sanitize) {
|
||||
content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
|
||||
}
|
||||
|
||||
$element.html(content);
|
||||
} else {
|
||||
$element[html ? 'html' : 'text'](content);
|
||||
$element.text(content);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -452,8 +586,25 @@
|
|||
}
|
||||
|
||||
return title;
|
||||
}; // Private
|
||||
} // 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) {
|
||||
|
@ -472,27 +623,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();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -591,7 +742,13 @@
|
|||
};
|
||||
|
||||
_proto._getConfig = function _getConfig(config) {
|
||||
config = _objectSpread({}, this.constructor.Default, $(this.element).data(), typeof config === 'object' && config ? config : {});
|
||||
var dataAttributes = $(this.element).data();
|
||||
Object.keys(dataAttributes).forEach(function (dataAttr) {
|
||||
if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
|
||||
delete dataAttributes[dataAttr];
|
||||
}
|
||||
});
|
||||
config = _objectSpread({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
|
||||
|
||||
if (typeof config.delay === 'number') {
|
||||
config.delay = {
|
||||
|
@ -609,6 +766,11 @@
|
|||
}
|
||||
|
||||
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
|
||||
if (config.sanitize) {
|
||||
config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
|
||||
}
|
||||
|
||||
return config;
|
||||
};
|
||||
|
||||
|
@ -657,8 +819,8 @@
|
|||
this.hide();
|
||||
this.show();
|
||||
this.config.animation = initConfigAnimation;
|
||||
}; // Static
|
||||
|
||||
} // Static
|
||||
;
|
||||
|
||||
Tooltip._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
|
@ -741,5 +903,5 @@
|
|||
|
||||
return Tooltip;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=tooltip.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,19 +1,19 @@
|
|||
/*!
|
||||
* Bootstrap util.js v4.2.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Bootstrap util.js v4.3.1 (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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) :
|
||||
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
|
||||
(global.Util = factory(global.jQuery));
|
||||
}(this, (function ($) { 'use strict';
|
||||
(global = global || self, global.Util = factory(global.jQuery));
|
||||
}(this, function ($) { 'use strict';
|
||||
|
||||
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.2.1): util.js
|
||||
* Bootstrap (v4.3.1): util.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
@ -89,7 +89,11 @@
|
|||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
|
||||
}
|
||||
|
||||
return selector && document.querySelector(selector) ? selector : null;
|
||||
try {
|
||||
return document.querySelector(selector) ? selector : null;
|
||||
} catch (err) {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
|
||||
if (!element) {
|
||||
|
@ -164,5 +168,5 @@
|
|||
|
||||
return Util;
|
||||
|
||||
})));
|
||||
}));
|
||||
//# sourceMappingURL=util.js.map
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.2.1): alert.js
|
||||
* Bootstrap (v4.3.1): 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.1'
|
||||
const DATA_KEY = 'bs.alert'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.2.1): button.js
|
||||
* Bootstrap (v4.3.1): 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.1'
|
||||
const DATA_KEY = 'bs.button'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.2.1): carousel.js
|
||||
* Bootstrap (v4.3.1): 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.1'
|
||||
const DATA_KEY = 'bs.carousel'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
|
@ -268,8 +268,10 @@ class Carousel {
|
|||
.on(Event.MOUSELEAVE, (event) => this.cycle(event))
|
||||
}
|
||||
|
||||
if (this._config.touch) {
|
||||
this._addTouchEventListeners()
|
||||
}
|
||||
}
|
||||
|
||||
_addTouchEventListeners() {
|
||||
if (!this._touchSupported) {
|
||||
|
@ -531,7 +533,7 @@ class Carousel {
|
|||
throw new TypeError(`No method named "${action}"`)
|
||||
}
|
||||
data[action]()
|
||||
} else if (_config.interval) {
|
||||
} else if (_config.interval && _config.ride) {
|
||||
data.pause()
|
||||
data.cycle()
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.2.1): collapse.js
|
||||
* Bootstrap (v4.3.1): 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.1'
|
||||
const DATA_KEY = 'bs.collapse'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.2.1): dropdown.js
|
||||
* Bootstrap (v4.3.1): 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.1'
|
||||
const DATA_KEY = 'bs.dropdown'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
|
@ -319,24 +319,30 @@ class Dropdown {
|
|||
return $(this._element).closest('.navbar').length > 0
|
||||
}
|
||||
|
||||
_getPopperConfig() {
|
||||
const offsetConf = {}
|
||||
_getOffset() {
|
||||
const offset = {}
|
||||
|
||||
if (typeof this._config.offset === 'function') {
|
||||
offsetConf.fn = (data) => {
|
||||
offset.fn = (data) => {
|
||||
data.offsets = {
|
||||
...data.offsets,
|
||||
...this._config.offset(data.offsets) || {}
|
||||
...this._config.offset(data.offsets, this._element) || {}
|
||||
}
|
||||
|
||||
return data
|
||||
}
|
||||
} else {
|
||||
offsetConf.offset = this._config.offset
|
||||
offset.offset = this._config.offset
|
||||
}
|
||||
|
||||
return offset
|
||||
}
|
||||
|
||||
_getPopperConfig() {
|
||||
const popperConfig = {
|
||||
placement: this._getPlacement(),
|
||||
modifiers: {
|
||||
offset: offsetConf,
|
||||
offset: this._getOffset(),
|
||||
flip: {
|
||||
enabled: this._config.flip
|
||||
},
|
||||
|
@ -352,6 +358,7 @@ class Dropdown {
|
|||
enabled: false
|
||||
}
|
||||
}
|
||||
|
||||
return popperConfig
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import Util from './util'
|
|||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.2.1): index.js
|
||||
* Bootstrap (v4.3.1): index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.2.1): modal.js
|
||||
* Bootstrap (v4.3.1): 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.1'
|
||||
const DATA_KEY = 'bs.modal'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
|
@ -51,6 +51,7 @@ const Event = {
|
|||
}
|
||||
|
||||
const ClassName = {
|
||||
SCROLLABLE : 'modal-dialog-scrollable',
|
||||
SCROLLBAR_MEASURER : 'modal-scrollbar-measure',
|
||||
BACKDROP : 'modal-backdrop',
|
||||
OPEN : 'modal-open',
|
||||
|
@ -60,6 +61,7 @@ const ClassName = {
|
|||
|
||||
const 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',
|
||||
|
@ -244,7 +246,12 @@ class Modal {
|
|||
this._element.style.display = 'block'
|
||||
this._element.removeAttribute('aria-hidden')
|
||||
this._element.setAttribute('aria-modal', true)
|
||||
|
||||
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,6 +1,6 @@
|
|||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.2.1): popover.js
|
||||
* Bootstrap (v4.3.1): 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.1'
|
||||
const DATA_KEY = 'bs.popover'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.2.1): scrollspy.js
|
||||
* Bootstrap (v4.3.1): 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.1'
|
||||
const DATA_KEY = 'bs.scrollspy'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.2.1): tab.js
|
||||
* Bootstrap (v4.3.1): 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.1'
|
||||
const DATA_KEY = 'bs.tab'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const DATA_API_KEY = '.data-api'
|
||||
|
@ -188,7 +188,10 @@ class Tab {
|
|||
}
|
||||
|
||||
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)) {
|
||||
const dropdownElement = $(element).closest(Selector.DROPDOWN)[0]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.2.1): toast.js
|
||||
* Bootstrap (v4.3.1): 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.1'
|
||||
const DATA_KEY = 'bs.toast'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
|
@ -75,6 +75,10 @@ class Toast {
|
|||
return DefaultType
|
||||
}
|
||||
|
||||
static get Default() {
|
||||
return Default
|
||||
}
|
||||
|
||||
// Public
|
||||
|
||||
show() {
|
||||
|
|
|
@ -0,0 +1,127 @@
|
|||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.3.1): tools/sanitizer.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
const uriAttrs = [
|
||||
'background',
|
||||
'cite',
|
||||
'href',
|
||||
'itemtype',
|
||||
'longdesc',
|
||||
'poster',
|
||||
'src',
|
||||
'xlink:href'
|
||||
]
|
||||
|
||||
const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i
|
||||
|
||||
export const DefaultWhitelist = {
|
||||
// Global attributes allowed on any supplied element below.
|
||||
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
|
||||
a: ['target', 'href', 'title', 'rel'],
|
||||
area: [],
|
||||
b: [],
|
||||
br: [],
|
||||
col: [],
|
||||
code: [],
|
||||
div: [],
|
||||
em: [],
|
||||
hr: [],
|
||||
h1: [],
|
||||
h2: [],
|
||||
h3: [],
|
||||
h4: [],
|
||||
h5: [],
|
||||
h6: [],
|
||||
i: [],
|
||||
img: ['src', 'alt', 'title', 'width', 'height'],
|
||||
li: [],
|
||||
ol: [],
|
||||
p: [],
|
||||
pre: [],
|
||||
s: [],
|
||||
small: [],
|
||||
span: [],
|
||||
sub: [],
|
||||
sup: [],
|
||||
strong: [],
|
||||
u: [],
|
||||
ul: []
|
||||
}
|
||||
|
||||
/**
|
||||
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
||||
*
|
||||
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi
|
||||
|
||||
/**
|
||||
* A pattern that matches safe data URLs. Only matches image, video and audio types.
|
||||
*
|
||||
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i
|
||||
|
||||
function allowedAttribute(attr, allowedAttributeList) {
|
||||
const attrName = attr.nodeName.toLowerCase()
|
||||
|
||||
if (allowedAttributeList.indexOf(attrName) !== -1) {
|
||||
if (uriAttrs.indexOf(attrName) !== -1) {
|
||||
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
const regExp = allowedAttributeList.filter((attrRegex) => attrRegex instanceof RegExp)
|
||||
|
||||
// Check if a regular expression validates the attribute.
|
||||
for (let i = 0, l = regExp.length; i < l; i++) {
|
||||
if (attrName.match(regExp[i])) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
export function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
|
||||
if (unsafeHtml.length === 0) {
|
||||
return unsafeHtml
|
||||
}
|
||||
|
||||
if (sanitizeFn && typeof sanitizeFn === 'function') {
|
||||
return sanitizeFn(unsafeHtml)
|
||||
}
|
||||
|
||||
const domParser = new window.DOMParser()
|
||||
const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html')
|
||||
const whitelistKeys = Object.keys(whiteList)
|
||||
const elements = [].slice.call(createdDocument.body.querySelectorAll('*'))
|
||||
|
||||
for (let i = 0, len = elements.length; i < len; i++) {
|
||||
const el = elements[i]
|
||||
const elName = el.nodeName.toLowerCase()
|
||||
|
||||
if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
|
||||
el.parentNode.removeChild(el)
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
const attributeList = [].slice.call(el.attributes)
|
||||
const whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])
|
||||
|
||||
attributeList.forEach((attr) => {
|
||||
if (!allowedAttribute(attr, whitelistedAttributes)) {
|
||||
el.removeAttribute(attr.nodeName)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return createdDocument.body.innerHTML
|
||||
}
|
|
@ -1,10 +1,14 @@
|
|||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.2.1): tooltip.js
|
||||
* Bootstrap (v4.3.1): tooltip.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
import {
|
||||
DefaultWhitelist,
|
||||
sanitizeHtml
|
||||
} from './tools/sanitizer'
|
||||
import $ from 'jquery'
|
||||
import Popper from 'popper.js'
|
||||
import Util from './util'
|
||||
|
@ -16,12 +20,13 @@ import Util from './util'
|
|||
*/
|
||||
|
||||
const NAME = 'tooltip'
|
||||
const VERSION = '4.2.1'
|
||||
const VERSION = '4.3.1'
|
||||
const DATA_KEY = 'bs.tooltip'
|
||||
const EVENT_KEY = `.${DATA_KEY}`
|
||||
const JQUERY_NO_CONFLICT = $.fn[NAME]
|
||||
const CLASS_PREFIX = 'bs-tooltip'
|
||||
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g')
|
||||
const DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']
|
||||
|
||||
const DefaultType = {
|
||||
animation : 'boolean',
|
||||
|
@ -32,10 +37,13 @@ const DefaultType = {
|
|||
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)'
|
||||
boundary : '(string|element)',
|
||||
sanitize : 'boolean',
|
||||
sanitizeFn : '(null|function)',
|
||||
whiteList : 'object'
|
||||
}
|
||||
|
||||
const AttachmentMap = {
|
||||
|
@ -60,7 +68,10 @@ const Default = {
|
|||
offset : 0,
|
||||
container : false,
|
||||
fallbackPlacement : 'flip',
|
||||
boundary : 'scrollParent'
|
||||
boundary : 'scrollParent',
|
||||
sanitize : true,
|
||||
sanitizeFn : null,
|
||||
whiteList : DefaultWhitelist
|
||||
}
|
||||
|
||||
const HoverState = {
|
||||
|
@ -285,9 +296,7 @@ class Tooltip {
|
|||
this._popper = new Popper(this.element, tip, {
|
||||
placement: attachment,
|
||||
modifiers: {
|
||||
offset: {
|
||||
offset: this.config.offset
|
||||
},
|
||||
offset: this._getOffset(),
|
||||
flip: {
|
||||
behavior: this.config.fallbackPlacement
|
||||
},
|
||||
|
@ -421,18 +430,27 @@ class Tooltip {
|
|||
}
|
||||
|
||||
setElementContent($element, content) {
|
||||
const html = this.config.html
|
||||
if (typeof content === 'object' && (content.nodeType || content.jquery)) {
|
||||
// Content is a DOM node or a jQuery
|
||||
if (html) {
|
||||
if (this.config.html) {
|
||||
if (!$(content).parent().is($element)) {
|
||||
$element.empty().append(content)
|
||||
}
|
||||
} else {
|
||||
$element.text($(content).text())
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if (this.config.html) {
|
||||
if (this.config.sanitize) {
|
||||
content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn)
|
||||
}
|
||||
|
||||
$element.html(content)
|
||||
} else {
|
||||
$element[html ? 'html' : 'text'](content)
|
||||
$element.text(content)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -450,6 +468,25 @@ class Tooltip {
|
|||
|
||||
// Private
|
||||
|
||||
_getOffset() {
|
||||
const offset = {}
|
||||
|
||||
if (typeof this.config.offset === 'function') {
|
||||
offset.fn = (data) => {
|
||||
data.offsets = {
|
||||
...data.offsets,
|
||||
...this.config.offset(data.offsets, this.element) || {}
|
||||
}
|
||||
|
||||
return data
|
||||
}
|
||||
} else {
|
||||
offset.offset = this.config.offset
|
||||
}
|
||||
|
||||
return offset
|
||||
}
|
||||
|
||||
_getContainer() {
|
||||
if (this.config.container === false) {
|
||||
return document.body
|
||||
|
@ -619,9 +656,18 @@ class Tooltip {
|
|||
}
|
||||
|
||||
_getConfig(config) {
|
||||
const dataAttributes = $(this.element).data()
|
||||
|
||||
Object.keys(dataAttributes)
|
||||
.forEach((dataAttr) => {
|
||||
if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
|
||||
delete dataAttributes[dataAttr]
|
||||
}
|
||||
})
|
||||
|
||||
config = {
|
||||
...this.constructor.Default,
|
||||
...$(this.element).data(),
|
||||
...dataAttributes,
|
||||
...typeof config === 'object' && config ? config : {}
|
||||
}
|
||||
|
||||
|
@ -646,6 +692,10 @@ class Tooltip {
|
|||
this.constructor.DefaultType
|
||||
)
|
||||
|
||||
if (config.sanitize) {
|
||||
config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn)
|
||||
}
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.2.1): util.js
|
||||
* Bootstrap (v4.3.1): util.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
@ -82,7 +82,11 @@ const Util = {
|
|||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : ''
|
||||
}
|
||||
|
||||
return selector && document.querySelector(selector) ? selector : null
|
||||
try {
|
||||
return document.querySelector(selector) ? selector : null
|
||||
} catch (err) {
|
||||
return null
|
||||
}
|
||||
},
|
||||
|
||||
getTransitionDurationFromElement(element) {
|
||||
|
|
|
@ -6,19 +6,7 @@
|
|||
<title>Bootstrap Plugin Test Suite</title>
|
||||
|
||||
<!-- jQuery -->
|
||||
<script>
|
||||
(function () {
|
||||
var path = '../../site/docs/4.2/assets/js/vendor/jquery-slim.min.js'
|
||||
// get jquery param from the query string.
|
||||
var jQueryVersion = location.search.match(/[?&]jquery=(.*?)(?=&|$)/)
|
||||
|
||||
// If a version was specified, use that version from jQuery CDN
|
||||
if (jQueryVersion) {
|
||||
path = 'https://code.jquery.com/jquery-' + jQueryVersion[1] + '.min.js'
|
||||
}
|
||||
document.write('<script src="' + path + '"><\/script>')
|
||||
}())
|
||||
</script>
|
||||
<script src="../../node_modules/jquery/dist/jquery.slim.min.js"></script>
|
||||
<script src="../../node_modules/popper.js/dist/umd/popper.min.js"></script>
|
||||
|
||||
<!-- QUnit -->
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
/* eslint-env node */
|
||||
/* eslint no-process-env: 0 */
|
||||
|
||||
const path = require('path')
|
||||
const ip = require('ip')
|
||||
const pkg = require('../../package.json')
|
||||
const {
|
||||
browsers,
|
||||
browsersKeys
|
||||
} = require('./browsers')
|
||||
const path = require('path')
|
||||
const jsCoveragePath = path.resolve(__dirname, '../coverage')
|
||||
|
||||
const jqueryFile = process.env.USE_OLD_JQUERY ? 'https://code.jquery.com/jquery-1.9.1.min.js' : `site/docs/${pkg.version_short}/assets/js/vendor/jquery-slim.min.js`
|
||||
const jqueryFile = process.env.USE_OLD_JQUERY ? 'https://code.jquery.com/jquery-1.9.1.min.js' : 'node_modules/jquery/dist/jquery.slim.min.js'
|
||||
const bundle = process.env.BUNDLE === 'true'
|
||||
const browserStack = process.env.BROWSER === 'true'
|
||||
|
||||
|
@ -94,7 +92,7 @@ if (bundle) {
|
|||
conf.browsers = browsersKeys
|
||||
reporters.push('BrowserStack')
|
||||
files = files.concat([
|
||||
`site/docs/${pkg.version_short}/assets/js/vendor/jquery-slim.min.js`,
|
||||
'node_modules/jquery/dist/jquery.slim.min.js',
|
||||
'js/dist/util.js',
|
||||
'js/dist/tooltip.js',
|
||||
'js/dist/!(util|index|tooltip).js' // include all of our js/dist files except util.js, index.js and tooltip.js
|
||||
|
@ -117,7 +115,7 @@ if (bundle) {
|
|||
conf.customLaunchers = customLaunchers
|
||||
conf.detectBrowsers = detectBrowsers
|
||||
conf.coverageIstanbulReporter = {
|
||||
dir: jsCoveragePath,
|
||||
dir: path.resolve(__dirname, '../coverage/'),
|
||||
reports: ['lcov', 'text-summary'],
|
||||
thresholds: {
|
||||
emitWarning: false,
|
||||
|
|
|
@ -948,7 +948,7 @@ $(function () {
|
|||
$textArea.trigger(eventKeyDown)
|
||||
})
|
||||
|
||||
QUnit.test('Should not go to the next item when the carousel is not visible', function (assert) {
|
||||
QUnit.test('should not go to the next item when the carousel is not visible', function (assert) {
|
||||
assert.expect(2)
|
||||
var done = assert.async()
|
||||
var html = '<div id="myCarousel" class="carousel slide" data-interval="50" style="display: none;">' +
|
||||
|
@ -985,7 +985,7 @@ $(function () {
|
|||
}, 80)
|
||||
})
|
||||
|
||||
QUnit.test('Should not go to the next item when the parent of the carousel is not visible', function (assert) {
|
||||
QUnit.test('should not go to the next item when the parent of the carousel is not visible', function (assert) {
|
||||
assert.expect(2)
|
||||
var done = assert.async()
|
||||
var html = '<div id="parent" style="display: none;">' +
|
||||
|
@ -1270,4 +1270,64 @@ $(function () {
|
|||
assert.strictEqual(spy.called, true)
|
||||
sandbox.restore()
|
||||
})
|
||||
|
||||
QUnit.test('should not cycle when there is no attribute data-ride', function (assert) {
|
||||
assert.expect(1)
|
||||
|
||||
var spy = sinon.spy(Carousel.prototype, 'cycle')
|
||||
|
||||
var carouselHTML = '<div class="carousel"></div>'
|
||||
var $carousel = $(carouselHTML)
|
||||
$carousel.appendTo('#qunit-fixture')
|
||||
$carousel.bootstrapCarousel()
|
||||
|
||||
assert.strictEqual(spy.called, false)
|
||||
spy.restore()
|
||||
})
|
||||
|
||||
QUnit.test('should cycle when there is data-ride attribute', function (assert) {
|
||||
assert.expect(1)
|
||||
|
||||
var spy = sinon.spy(Carousel.prototype, 'cycle')
|
||||
|
||||
var carouselHTML = '<div class="carousel" data-ride="carousel"></div>'
|
||||
var $carousel = $(carouselHTML)
|
||||
$carousel.appendTo('#qunit-fixture')
|
||||
$carousel.bootstrapCarousel()
|
||||
|
||||
assert.strictEqual(spy.called, true)
|
||||
spy.restore()
|
||||
})
|
||||
|
||||
QUnit.test('should init carousels with data-ride on load event', function (assert) {
|
||||
assert.expect(1)
|
||||
|
||||
var done = assert.async()
|
||||
var spy = sinon.spy(Carousel, '_jQueryInterface')
|
||||
|
||||
var carouselHTML = '<div class="carousel" data-ride="carousel"></div>'
|
||||
var $carousel = $(carouselHTML)
|
||||
$carousel.appendTo('#qunit-fixture')
|
||||
|
||||
$(window).trigger($.Event('load'))
|
||||
|
||||
setTimeout(function () {
|
||||
assert.strictEqual(spy.called, true)
|
||||
spy.restore()
|
||||
done()
|
||||
}, 5)
|
||||
})
|
||||
|
||||
QUnit.test('should not add touch event listeners when touch option set to false', function (assert) {
|
||||
assert.expect(1)
|
||||
|
||||
var spy = sinon.spy(Carousel.prototype, '_addTouchEventListeners')
|
||||
var $carousel = $('<div class="carousel" data-ride="carousel" data-touch="false"></div>')
|
||||
|
||||
$carousel.appendTo('#qunit-fixture')
|
||||
$carousel.bootstrapCarousel()
|
||||
|
||||
assert.strictEqual(spy.called, false)
|
||||
spy.restore()
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1361,4 +1361,59 @@ $(function () {
|
|||
$dropdown.hide()
|
||||
assert.ok($dropdown.parent('.dropdown').hasClass('show'))
|
||||
})
|
||||
|
||||
QUnit.test('should create offset modifier correctly when offset option is a function', function (assert) {
|
||||
assert.expect(2)
|
||||
|
||||
var getOffset = function (offsets) {
|
||||
return offsets
|
||||
}
|
||||
|
||||
var dropdownHTML =
|
||||
'<div class="dropdown">' +
|
||||
' <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>' +
|
||||
' <div class="dropdown-menu">' +
|
||||
' <a class="dropdown-item" href="#">Another link</a>' +
|
||||
' </div>' +
|
||||
'</div>'
|
||||
|
||||
var $dropdown = $(dropdownHTML)
|
||||
.appendTo('#qunit-fixture')
|
||||
.find('[data-toggle="dropdown"]')
|
||||
.bootstrapDropdown({
|
||||
offset: getOffset
|
||||
})
|
||||
|
||||
var dropdown = $dropdown.data('bs.dropdown')
|
||||
var offset = dropdown._getOffset()
|
||||
|
||||
assert.ok(typeof offset.offset === 'undefined')
|
||||
assert.ok(typeof offset.fn === 'function')
|
||||
})
|
||||
|
||||
QUnit.test('should create offset modifier correctly when offset option is not a function', function (assert) {
|
||||
assert.expect(2)
|
||||
|
||||
var dropdownHTML =
|
||||
'<div class="dropdown">' +
|
||||
' <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown</a>' +
|
||||
' <div class="dropdown-menu">' +
|
||||
' <a class="dropdown-item" href="#">Another link</a>' +
|
||||
' </div>' +
|
||||
'</div>'
|
||||
|
||||
var myOffset = 42
|
||||
var $dropdown = $(dropdownHTML)
|
||||
.appendTo('#qunit-fixture')
|
||||
.find('[data-toggle="dropdown"]')
|
||||
.bootstrapDropdown({
|
||||
offset: myOffset
|
||||
})
|
||||
|
||||
var dropdown = $dropdown.data('bs.dropdown')
|
||||
var offset = dropdown._getOffset()
|
||||
|
||||
assert.strictEqual(offset.offset, myOffset)
|
||||
assert.ok(typeof offset.fn === 'undefined')
|
||||
})
|
||||
})
|
||||
|
|
|
@ -619,22 +619,20 @@ $(function () {
|
|||
assert.expect(1)
|
||||
var done = assert.async()
|
||||
|
||||
try {
|
||||
var $toggleBtn = $('<button data-toggle="modal" data-target="<div id="modal-test"><div class="contents"<div<div id="close" data-dismiss="modal"/></div></div>"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
|
||||
$toggleBtn.trigger('click')
|
||||
} catch (e) {
|
||||
setTimeout(function () {
|
||||
assert.strictEqual($('#modal-test').length, 0, 'target has not been parsed and added to the document')
|
||||
done()
|
||||
}
|
||||
}, 0)
|
||||
})
|
||||
|
||||
QUnit.test('should not execute js from target', function (assert) {
|
||||
assert.expect(0)
|
||||
var done = assert.async()
|
||||
|
||||
try {
|
||||
// This toggle button contains XSS payload in its data-target
|
||||
// Note: it uses the onerror handler of an img element to execute the js, because a simple script element does not work here
|
||||
// a script element works in manual tests though, so here it is likely blocked by the qunit framework
|
||||
|
@ -650,9 +648,8 @@ $(function () {
|
|||
.appendTo('#qunit-fixture')
|
||||
|
||||
$toggleBtn.trigger('click')
|
||||
} catch (e) {
|
||||
done()
|
||||
}
|
||||
|
||||
setTimeout(done, 500)
|
||||
})
|
||||
|
||||
QUnit.test('should not try to open a modal which is already visible', function (assert) {
|
||||
|
@ -672,7 +669,7 @@ $(function () {
|
|||
})
|
||||
|
||||
QUnit.test('transition duration should be the modal-dialog duration before triggering shown event', function (assert) {
|
||||
assert.expect(2)
|
||||
assert.expect(1)
|
||||
var done = assert.async()
|
||||
var style = [
|
||||
'<style>',
|
||||
|
@ -697,22 +694,17 @@ $(function () {
|
|||
'</div>'
|
||||
].join('')
|
||||
|
||||
var beginTimestamp = 0
|
||||
var $modal = $(modalHTML).appendTo('#qunit-fixture')
|
||||
var $modalDialog = $('.modal-dialog')
|
||||
var transitionDuration = Util.getTransitionDurationFromElement($modalDialog[0])
|
||||
|
||||
assert.strictEqual(transitionDuration, 300)
|
||||
var expectedTransitionDuration = 300
|
||||
var spy = sinon.spy(Util, 'getTransitionDurationFromElement')
|
||||
|
||||
$modal.on('shown.bs.modal', function () {
|
||||
var diff = Date.now() - beginTimestamp
|
||||
assert.ok(diff < 400)
|
||||
assert.ok(spy.returned(expectedTransitionDuration))
|
||||
$style.remove()
|
||||
spy.restore()
|
||||
done()
|
||||
})
|
||||
.bootstrapModal('show')
|
||||
|
||||
beginTimestamp = Date.now()
|
||||
})
|
||||
|
||||
QUnit.test('should dispose modal', function (assert) {
|
||||
|
@ -793,4 +785,31 @@ $(function () {
|
|||
})
|
||||
.bootstrapModal('show')
|
||||
})
|
||||
|
||||
QUnit.test('should scroll to top of the modal body if the modal has .modal-dialog-scrollable class', function (assert) {
|
||||
assert.expect(2)
|
||||
var done = assert.async()
|
||||
|
||||
var $modal = $([
|
||||
'<div id="modal-test">',
|
||||
' <div class="modal-dialog modal-dialog-scrollable">',
|
||||
' <div class="modal-content">',
|
||||
' <div class="modal-body" style="height: 100px; overflow-y: auto;">',
|
||||
' <div style="height: 200px" />',
|
||||
' </div>',
|
||||
' </div>',
|
||||
' </div>',
|
||||
'</div>'
|
||||
].join('')).appendTo('#qunit-fixture')
|
||||
|
||||
var $modalBody = $('.modal-body')
|
||||
$modalBody.scrollTop(100)
|
||||
assert.strictEqual($modalBody.scrollTop(), 100)
|
||||
|
||||
$modal.on('shown.bs.modal', function () {
|
||||
assert.strictEqual($modalBody.scrollTop(), 0, 'modal body scrollTop should be 0 when opened')
|
||||
done()
|
||||
})
|
||||
.bootstrapModal('show')
|
||||
})
|
||||
})
|
||||
|
|
|
@ -459,4 +459,60 @@ $(function () {
|
|||
})
|
||||
.trigger($.Event('click'))
|
||||
})
|
||||
|
||||
QUnit.test('should not add show class to tab panes if there is no `.fade` class', function (assert) {
|
||||
assert.expect(1)
|
||||
var done = assert.async()
|
||||
|
||||
var html = [
|
||||
'<ul class="nav nav-tabs" role="tablist">',
|
||||
' <li class="nav-item">',
|
||||
' <a class="nav-link nav-tab" href="#home" role="tab" data-toggle="tab">Home</a>',
|
||||
' </li>',
|
||||
' <li class="nav-item">',
|
||||
' <a id="secondNav" class="nav-link nav-tab" href="#profile" role="tab" data-toggle="tab">Profile</a>',
|
||||
' </li>',
|
||||
'</ul>',
|
||||
'<div class="tab-content">',
|
||||
' <div role="tabpanel" class="tab-pane" id="home">test 1</div>',
|
||||
' <div role="tabpanel" class="tab-pane" id="profile">test 2</div>',
|
||||
'</div>'
|
||||
].join('')
|
||||
|
||||
$(html).appendTo('#qunit-fixture')
|
||||
|
||||
$('#secondNav').on('shown.bs.tab', function () {
|
||||
assert.strictEqual($('.show').length, 0)
|
||||
done()
|
||||
})
|
||||
.trigger($.Event('click'))
|
||||
})
|
||||
|
||||
QUnit.test('should add show class to tab panes if there is a `.fade` class', function (assert) {
|
||||
assert.expect(1)
|
||||
var done = assert.async()
|
||||
|
||||
var html = [
|
||||
'<ul class="nav nav-tabs" role="tablist">',
|
||||
' <li class="nav-item">',
|
||||
' <a class="nav-link nav-tab" href="#home" role="tab" data-toggle="tab">Home</a>',
|
||||
' </li>',
|
||||
' <li class="nav-item">',
|
||||
' <a id="secondNav" class="nav-link nav-tab" href="#profile" role="tab" data-toggle="tab">Profile</a>',
|
||||
' </li>',
|
||||
'</ul>',
|
||||
'<div class="tab-content">',
|
||||
' <div role="tabpanel" class="tab-pane fade" id="home">test 1</div>',
|
||||
' <div role="tabpanel" class="tab-pane fade" id="profile">test 2</div>',
|
||||
'</div>'
|
||||
].join('')
|
||||
|
||||
$(html).appendTo('#qunit-fixture')
|
||||
|
||||
$('#secondNav').on('shown.bs.tab', function () {
|
||||
assert.strictEqual($('.show').length, 1)
|
||||
done()
|
||||
})
|
||||
.trigger($.Event('click'))
|
||||
})
|
||||
})
|
||||
|
|
|
@ -236,4 +236,24 @@ $(function () {
|
|||
})
|
||||
.bootstrapToast('show')
|
||||
})
|
||||
|
||||
QUnit.test('should expose default setting to allow to override them', function (assert) {
|
||||
assert.expect(1)
|
||||
|
||||
var defaultDelay = 1000
|
||||
Toast.Default.delay = defaultDelay
|
||||
|
||||
var toastHtml =
|
||||
'<div class="toast" data-autohide="false" data-animation="false">' +
|
||||
'<button type="button" class="ml-2 mb-1 close" data-dismiss="toast">' +
|
||||
'close' +
|
||||
'</button>' +
|
||||
'</div>'
|
||||
|
||||
var $toast = $(toastHtml)
|
||||
.bootstrapToast()
|
||||
|
||||
var toast = $toast.data('bs.toast')
|
||||
assert.strictEqual(toast._config.delay, defaultDelay)
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1069,4 +1069,201 @@ $(function () {
|
|||
|
||||
assert.strictEqual(tooltip._isEnabled, true)
|
||||
})
|
||||
|
||||
QUnit.test('should create offset modifier correctly when offset option is a function', function (assert) {
|
||||
assert.expect(2)
|
||||
|
||||
var getOffset = function (offsets) {
|
||||
return offsets
|
||||
}
|
||||
|
||||
var $trigger = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.bootstrapTooltip({
|
||||
offset: getOffset
|
||||
})
|
||||
|
||||
var tooltip = $trigger.data('bs.tooltip')
|
||||
var offset = tooltip._getOffset()
|
||||
|
||||
assert.ok(typeof offset.offset === 'undefined')
|
||||
assert.ok(typeof offset.fn === 'function')
|
||||
})
|
||||
|
||||
QUnit.test('should create offset modifier correctly when offset option is not a function', function (assert) {
|
||||
assert.expect(2)
|
||||
|
||||
var myOffset = 42
|
||||
var $trigger = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.bootstrapTooltip({
|
||||
offset: myOffset
|
||||
})
|
||||
|
||||
var tooltip = $trigger.data('bs.tooltip')
|
||||
var offset = tooltip._getOffset()
|
||||
|
||||
assert.strictEqual(offset.offset, myOffset)
|
||||
assert.ok(typeof offset.fn === 'undefined')
|
||||
})
|
||||
|
||||
QUnit.test('should disable sanitizer', function (assert) {
|
||||
assert.expect(1)
|
||||
|
||||
var $trigger = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.bootstrapTooltip({
|
||||
sanitize: false
|
||||
})
|
||||
|
||||
var tooltip = $trigger.data('bs.tooltip')
|
||||
assert.strictEqual(tooltip.config.sanitize, false)
|
||||
})
|
||||
|
||||
QUnit.test('should sanitize template by removing disallowed tags', function (assert) {
|
||||
assert.expect(1)
|
||||
|
||||
var $trigger = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.bootstrapTooltip({
|
||||
template: [
|
||||
'<div>',
|
||||
' <script>console.log("oups script inserted")</script>',
|
||||
' <span>Some content</span>',
|
||||
'</div>'
|
||||
].join('')
|
||||
})
|
||||
|
||||
var tooltip = $trigger.data('bs.tooltip')
|
||||
assert.strictEqual(tooltip.config.template.indexOf('script'), -1)
|
||||
})
|
||||
|
||||
QUnit.test('should sanitize template by removing disallowed attributes', function (assert) {
|
||||
assert.expect(1)
|
||||
|
||||
var $trigger = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.bootstrapTooltip({
|
||||
template: [
|
||||
'<div>',
|
||||
' <img src="x" onError="alert(\'test\')">Some content</img>',
|
||||
'</div>'
|
||||
].join('')
|
||||
})
|
||||
|
||||
var tooltip = $trigger.data('bs.tooltip')
|
||||
assert.strictEqual(tooltip.config.template.indexOf('onError'), -1)
|
||||
})
|
||||
|
||||
QUnit.test('should sanitize template by removing tags with XSS', function (assert) {
|
||||
assert.expect(1)
|
||||
|
||||
var $trigger = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.bootstrapTooltip({
|
||||
template: [
|
||||
'<div>',
|
||||
' <a href="javascript:alert(7)">Click me</a>',
|
||||
' <span>Some content</span>',
|
||||
'</div>'
|
||||
].join('')
|
||||
})
|
||||
|
||||
var tooltip = $trigger.data('bs.tooltip')
|
||||
assert.strictEqual(tooltip.config.template.indexOf('script'), -1)
|
||||
})
|
||||
|
||||
QUnit.test('should allow custom sanitization rules', function (assert) {
|
||||
assert.expect(2)
|
||||
|
||||
var $trigger = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.bootstrapTooltip({
|
||||
template: [
|
||||
'<a href="javascript:alert(7)">Click me</a>',
|
||||
'<span>Some content</span>'
|
||||
].join(''),
|
||||
whiteList: {
|
||||
span: null
|
||||
}
|
||||
})
|
||||
|
||||
var tooltip = $trigger.data('bs.tooltip')
|
||||
|
||||
assert.strictEqual(tooltip.config.template.indexOf('<a'), -1)
|
||||
assert.ok(tooltip.config.template.indexOf('span') !== -1)
|
||||
})
|
||||
|
||||
QUnit.test('should allow passing a custom function for sanitization', function (assert) {
|
||||
assert.expect(1)
|
||||
|
||||
var $trigger = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.bootstrapTooltip({
|
||||
template: [
|
||||
'<span>Some content</span>'
|
||||
].join(''),
|
||||
sanitizeFn: function (input) {
|
||||
return input
|
||||
}
|
||||
})
|
||||
|
||||
var tooltip = $trigger.data('bs.tooltip')
|
||||
|
||||
assert.ok(tooltip.config.template.indexOf('span') !== -1)
|
||||
})
|
||||
|
||||
QUnit.test('should allow passing aria attributes', function (assert) {
|
||||
assert.expect(1)
|
||||
|
||||
var $trigger = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.bootstrapTooltip({
|
||||
template: [
|
||||
'<span aria-pressed="true">Some content</span>'
|
||||
].join('')
|
||||
})
|
||||
|
||||
var tooltip = $trigger.data('bs.tooltip')
|
||||
|
||||
assert.ok(tooltip.config.template.indexOf('aria-pressed') !== -1)
|
||||
})
|
||||
|
||||
QUnit.test('should not sanitize element content', function (assert) {
|
||||
assert.expect(1)
|
||||
|
||||
var $element = $('<div />').appendTo('#qunit-fixture')
|
||||
var content = '<script>var test = 1;</script>'
|
||||
|
||||
var $trigger = $('<a href="#" rel="tooltip" data-trigger="click" title="Another tooltip"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.bootstrapTooltip({
|
||||
template: [
|
||||
'<span aria-pressed="true">Some content</span>'
|
||||
].join(''),
|
||||
html: true,
|
||||
sanitize: false
|
||||
})
|
||||
|
||||
var tooltip = $trigger.data('bs.tooltip')
|
||||
tooltip.setElementContent($element, content)
|
||||
|
||||
assert.strictEqual($element[0].innerHTML, content)
|
||||
})
|
||||
|
||||
QUnit.test('should not take into account sanitize in data attributes', function (assert) {
|
||||
assert.expect(1)
|
||||
|
||||
var $trigger = $('<a href="#" rel="tooltip" data-sanitize="false" data-trigger="click" title="Another tooltip"/>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.bootstrapTooltip({
|
||||
template: [
|
||||
'<span aria-pressed="true">Some content</span>'
|
||||
].join('')
|
||||
})
|
||||
|
||||
var tooltip = $trigger.data('bs.tooltip')
|
||||
|
||||
assert.strictEqual(tooltip.config.sanitize, true)
|
||||
})
|
||||
})
|
||||
|
|
|
@ -20,17 +20,16 @@ $(function () {
|
|||
assert.strictEqual(Util.getSelectorFromElement($el2[0]), null)
|
||||
})
|
||||
|
||||
QUnit.test('Util.getSelectorFromElement should throw error when there is a bad selector', function (assert) {
|
||||
QUnit.test('Util.getSelectorFromElement should return null when there is a bad selector', function (assert) {
|
||||
assert.expect(2)
|
||||
|
||||
var $el = $('<div data-target="#1"></div>').appendTo($('#qunit-fixture'))
|
||||
|
||||
try {
|
||||
assert.ok(true, 'trying to use a bad selector')
|
||||
Util.getSelectorFromElement($el[0])
|
||||
} catch (e) {
|
||||
assert.ok(e instanceof DOMException)
|
||||
}
|
||||
assert.strictEqual(Util.getSelectorFromElement($el[0]), null)
|
||||
|
||||
var $el2 = $('<a href="/posts"></a>').appendTo($('#qunit-fixture'))
|
||||
|
||||
assert.strictEqual(Util.getSelectorFromElement($el2[0]), null)
|
||||
})
|
||||
|
||||
QUnit.test('Util.typeCheckConfig should thrown an error when a bad config is passed', function (assert) {
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../../../site/docs/4.2/assets/js/vendor/jquery-slim.min.js"></script>
|
||||
<script src="../../../node_modules/jquery/dist/jquery.slim.min.js"></script>
|
||||
<script src="../../dist/util.js"></script>
|
||||
<script src="../../dist/alert.js"></script>
|
||||
</body>
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../../../site/docs/4.2/assets/js/vendor/jquery-slim.min.js"></script>
|
||||
<script src="../../../node_modules/jquery/dist/jquery.slim.min.js"></script>
|
||||
<script src="../../dist/util.js"></script>
|
||||
<script src="../../dist/button.js"></script>
|
||||
</body>
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../../../site/docs/4.2/assets/js/vendor/jquery-slim.min.js"></script>
|
||||
<script src="../../../node_modules/jquery/dist/jquery.slim.min.js"></script>
|
||||
<script src="../../dist/util.js"></script>
|
||||
<script src="../../dist/carousel.js"></script>
|
||||
<script>
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../../../site/docs/4.2/assets/js/vendor/jquery-slim.min.js"></script>
|
||||
<script src="../../../node_modules/jquery/dist/jquery.slim.min.js"></script>
|
||||
<script src="../../dist/util.js"></script>
|
||||
<script src="../../dist/collapse.js"></script>
|
||||
</body>
|
||||
|
|
|
@ -203,7 +203,7 @@
|
|||
|
||||
</div>
|
||||
|
||||
<script src="../../../site/docs/4.2/assets/js/vendor/jquery-slim.min.js"></script>
|
||||
<script src="../../../node_modules/jquery/dist/jquery.slim.min.js"></script>
|
||||
<script src="../../../node_modules/popper.js/dist/umd/popper.min.js"></script>
|
||||
<script src="../../dist/util.js"></script>
|
||||
<script src="../../dist/dropdown.js"></script>
|
||||
|
|
|
@ -205,7 +205,7 @@
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<script src="../../../site/docs/4.2/assets/js/vendor/jquery-slim.min.js"></script>
|
||||
<script src="../../../node_modules/jquery/dist/jquery.slim.min.js"></script>
|
||||
<script src="../../../node_modules/popper.js/dist/umd/popper.min.js"></script>
|
||||
<script src="../../dist/util.js"></script>
|
||||
<script src="../../dist/modal.js"></script>
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<script src="../../../site/docs/4.2/assets/js/vendor/jquery-slim.min.js"></script>
|
||||
<script src="../../../node_modules/jquery/dist/jquery.slim.min.js"></script>
|
||||
<script src="../../../node_modules/popper.js/dist/umd/popper.min.js"></script>
|
||||
<script src="../../dist/util.js"></script>
|
||||
<script src="../../dist/tooltip.js"></script>
|
||||
|
|
|
@ -86,7 +86,7 @@
|
|||
<p>Ad leggings keytar, brunch id art party dolor labore.</p>
|
||||
</div>
|
||||
|
||||
<script src="../../../site/docs/4.2/assets/js/vendor/jquery-slim.min.js"></script>
|
||||
<script src="../../../node_modules/jquery/dist/jquery.slim.min.js"></script>
|
||||
<script src="../../dist/util.js"></script>
|
||||
<script src="../../dist/scrollspy.js"></script>
|
||||
<script src="../../dist/dropdown.js"></script>
|
||||
|
|
|
@ -225,7 +225,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../../../site/docs/4.2/assets/js/vendor/jquery-slim.min.js"></script>
|
||||
<script src="../../../node_modules/jquery/dist/jquery.slim.min.js"></script>
|
||||
<script src="../../../node_modules/popper.js/dist/umd/popper.min.js"></script>
|
||||
<script src="../../dist/util.js"></script>
|
||||
<script src="../../dist/tab.js"></script>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../../../site/docs/4.2/assets/js/vendor/jquery-slim.min.js"></script>
|
||||
<script src="../../../node_modules/jquery/dist/jquery.slim.min.js"></script>
|
||||
<script src="../../dist/util.js"></script>
|
||||
<script src="../../dist/toast.js"></script>
|
||||
<script>
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<div id="customContainer"></div>
|
||||
</div>
|
||||
|
||||
<script src="../../../site/docs/4.2/assets/js/vendor/jquery-slim.min.js"></script>
|
||||
<script src="../../../node_modules/jquery/dist/jquery.slim.min.js"></script>
|
||||
<script src="../../../node_modules/popper.js/dist/umd/popper.min.js"></script>
|
||||
<script src="../../dist/util.js"></script>
|
||||
<script src="../../dist/tooltip.js"></script>
|
||||
|
|
|
@ -6,13 +6,14 @@
|
|||
.badge {
|
||||
display: inline-block;
|
||||
padding: $badge-padding-y $badge-padding-x;
|
||||
font-size: $badge-font-size;
|
||||
@include font-size($badge-font-size);
|
||||
font-weight: $badge-font-weight;
|
||||
line-height: 1;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
@include border-radius($badge-border-radius);
|
||||
@include transition($badge-transition);
|
||||
|
||||
@at-root a#{&} {
|
||||
@include hover-focus {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
font-family: $btn-font-family;
|
||||
font-weight: $btn-font-weight;
|
||||
color: $body-color;
|
||||
text-align: center;
|
||||
|
@ -34,11 +35,6 @@
|
|||
@include box-shadow(none);
|
||||
}
|
||||
|
||||
// Opinionated: add "hand" cursor to non-disabled .btn elements
|
||||
&:not(:disabled):not(.disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&:not(:disabled):not(.disabled):active,
|
||||
&:not(:disabled):not(.disabled).active {
|
||||
@include box-shadow($btn-active-box-shadow);
|
||||
|
@ -81,6 +77,7 @@ fieldset:disabled a.btn {
|
|||
.btn-link {
|
||||
font-weight: $font-weight-normal;
|
||||
color: $link-color;
|
||||
text-decoration: $link-decoration;
|
||||
|
||||
@include hover {
|
||||
color: $link-hover-color;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
|
||||
word-wrap: break-word;
|
||||
background-color: $card-bg;
|
||||
background-clip: border-box;
|
||||
|
@ -36,6 +36,7 @@
|
|||
// as much space as possible, ensuring footers are aligned to the bottom.
|
||||
flex: 1 1 auto;
|
||||
padding: $card-spacer-x;
|
||||
color: $card-color;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
|
@ -195,55 +196,35 @@
|
|||
|
||||
// Handle rounded corners
|
||||
@if $enable-rounded {
|
||||
&:first-child {
|
||||
&:not(:last-child) {
|
||||
@include border-right-radius(0);
|
||||
|
||||
.card-img-top,
|
||||
.card-header {
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
.card-img-bottom,
|
||||
.card-footer {
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
&:not(:first-child) {
|
||||
@include border-left-radius(0);
|
||||
|
||||
.card-img-top,
|
||||
.card-header {
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-top-left-radius: 0;
|
||||
}
|
||||
.card-img-bottom,
|
||||
.card-footer {
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:only-child {
|
||||
@include border-radius($card-border-radius);
|
||||
|
||||
.card-img-top,
|
||||
.card-header {
|
||||
@include border-top-radius($card-border-radius);
|
||||
}
|
||||
.card-img-bottom,
|
||||
.card-footer {
|
||||
@include border-bottom-radius($card-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
&:not(:first-child):not(:last-child):not(:only-child) {
|
||||
@include border-radius(0);
|
||||
|
||||
.card-img-top,
|
||||
.card-img-bottom,
|
||||
.card-header,
|
||||
.card-footer {
|
||||
@include border-radius(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -278,29 +259,27 @@
|
|||
//
|
||||
|
||||
.accordion {
|
||||
.card {
|
||||
> .card {
|
||||
overflow: hidden;
|
||||
|
||||
&:not(:first-of-type) {
|
||||
.card-header:first-child {
|
||||
border-radius: 0;
|
||||
@include border-radius(0);
|
||||
}
|
||||
|
||||
&:not(:last-of-type) {
|
||||
border-bottom: 0;
|
||||
border-radius: 0;
|
||||
@include border-radius(0);
|
||||
}
|
||||
}
|
||||
|
||||
&:first-of-type {
|
||||
border-bottom: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
@include border-bottom-radius(0);
|
||||
}
|
||||
|
||||
&:last-of-type {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
@include border-top-radius(0);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
|
|
|
@ -127,8 +127,7 @@
|
|||
display: inline-block;
|
||||
width: $carousel-control-icon-width;
|
||||
height: $carousel-control-icon-width;
|
||||
background: transparent no-repeat center center;
|
||||
background-size: 100% 100%;
|
||||
background: no-repeat 50% / 100% 100%;
|
||||
}
|
||||
.carousel-control-prev-icon {
|
||||
background-image: $carousel-control-prev-icon-bg;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.close {
|
||||
float: right;
|
||||
font-size: $close-font-size;
|
||||
@include font-size($close-font-size);
|
||||
font-weight: $close-font-weight;
|
||||
line-height: 1;
|
||||
color: $close-color;
|
||||
|
@ -17,9 +17,6 @@
|
|||
@include hover-focus {
|
||||
opacity: .75;
|
||||
}
|
||||
|
||||
// Opinionated: add "hand" cursor to non-disabled .close elements
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Inline code
|
||||
code {
|
||||
font-size: $code-font-size;
|
||||
@include font-size($code-font-size);
|
||||
color: $code-color;
|
||||
word-break: break-word;
|
||||
|
||||
|
@ -13,7 +13,7 @@ code {
|
|||
// User input typically entered via keyboard
|
||||
kbd {
|
||||
padding: $kbd-padding-y $kbd-padding-x;
|
||||
font-size: $kbd-font-size;
|
||||
@include font-size($kbd-font-size);
|
||||
color: $kbd-color;
|
||||
background-color: $kbd-bg;
|
||||
@include border-radius($border-radius-sm);
|
||||
|
@ -21,7 +21,7 @@ kbd {
|
|||
|
||||
kbd {
|
||||
padding: 0;
|
||||
font-size: 100%;
|
||||
@include font-size(100%);
|
||||
font-weight: $nested-kbd-font-weight;
|
||||
@include box-shadow(none);
|
||||
}
|
||||
|
@ -30,12 +30,12 @@ kbd {
|
|||
// Blocks of code
|
||||
pre {
|
||||
display: block;
|
||||
font-size: $code-font-size;
|
||||
@include font-size($code-font-size);
|
||||
color: $pre-color;
|
||||
|
||||
// Account for some code outputs that place code tags in pre tags
|
||||
code {
|
||||
font-size: inherit;
|
||||
@include font-size(inherit);
|
||||
color: inherit;
|
||||
word-break: normal;
|
||||
}
|
||||
|
|
|
@ -95,9 +95,7 @@
|
|||
width: $custom-control-indicator-size;
|
||||
height: $custom-control-indicator-size;
|
||||
content: "";
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: $custom-control-indicator-bg-size;
|
||||
background: no-repeat 50% / #{$custom-control-indicator-bg-size};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -144,6 +142,7 @@
|
|||
|
||||
.custom-radio {
|
||||
.custom-control-label::before {
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-radius: $custom-radio-indicator-border-radius;
|
||||
}
|
||||
|
||||
|
@ -173,6 +172,7 @@
|
|||
left: -($custom-switch-width + $custom-control-gutter);
|
||||
width: $custom-switch-width;
|
||||
pointer-events: all;
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-radius: $custom-switch-indicator-border-radius;
|
||||
}
|
||||
|
||||
|
@ -182,6 +182,7 @@
|
|||
width: $custom-switch-indicator-size;
|
||||
height: $custom-switch-indicator-size;
|
||||
background-color: $custom-control-indicator-border-color;
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-radius: $custom-switch-indicator-border-radius;
|
||||
@include transition(transform .15s ease-in-out, $custom-forms-transition);
|
||||
}
|
||||
|
@ -213,6 +214,8 @@
|
|||
width: 100%;
|
||||
height: $custom-select-height;
|
||||
padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
|
||||
font-family: $custom-select-font-family;
|
||||
@include font-size($custom-select-font-size);
|
||||
font-weight: $custom-select-font-weight;
|
||||
line-height: $custom-select-line-height;
|
||||
color: $custom-select-color;
|
||||
|
@ -220,11 +223,7 @@
|
|||
background: $custom-select-background;
|
||||
background-color: $custom-select-bg;
|
||||
border: $custom-select-border-width solid $custom-select-border-color;
|
||||
@if $enable-rounded {
|
||||
border-radius: $custom-select-border-radius;
|
||||
} @else {
|
||||
border-radius: 0;
|
||||
}
|
||||
@include border-radius($custom-select-border-radius, 0);
|
||||
@include box-shadow($custom-select-box-shadow);
|
||||
appearance: none;
|
||||
|
||||
|
@ -262,7 +261,7 @@
|
|||
|
||||
// Hides the default caret in IE11
|
||||
&::-ms-expand {
|
||||
opacity: 0;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -271,7 +270,7 @@
|
|||
padding-top: $custom-select-padding-y-sm;
|
||||
padding-bottom: $custom-select-padding-y-sm;
|
||||
padding-left: $custom-select-padding-x-sm;
|
||||
font-size: $custom-select-font-size-sm;
|
||||
@include font-size($custom-select-font-size-sm);
|
||||
}
|
||||
|
||||
.custom-select-lg {
|
||||
|
@ -279,7 +278,7 @@
|
|||
padding-top: $custom-select-padding-y-lg;
|
||||
padding-bottom: $custom-select-padding-y-lg;
|
||||
padding-left: $custom-select-padding-x-lg;
|
||||
font-size: $custom-select-font-size-lg;
|
||||
@include font-size($custom-select-font-size-lg);
|
||||
}
|
||||
|
||||
|
||||
|
@ -331,6 +330,7 @@
|
|||
z-index: 1;
|
||||
height: $custom-file-height;
|
||||
padding: $custom-file-padding-y $custom-file-padding-x;
|
||||
font-family: $custom-file-font-family;
|
||||
font-weight: $custom-file-font-weight;
|
||||
line-height: $custom-file-line-height;
|
||||
color: $custom-file-color;
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
}
|
||||
|
||||
.dropdown-toggle {
|
||||
white-space: nowrap;
|
||||
|
||||
// Generate the caret automatically
|
||||
@include caret;
|
||||
}
|
||||
|
@ -22,8 +24,8 @@
|
|||
min-width: $dropdown-min-width;
|
||||
padding: $dropdown-padding-y 0;
|
||||
margin: $dropdown-spacer 0 0; // override default ul
|
||||
font-size: $font-size-base; // Redeclare because nesting can cause inheritance issues
|
||||
color: $body-color;
|
||||
@include font-size($dropdown-font-size);
|
||||
color: $dropdown-color;
|
||||
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
|
||||
list-style: none;
|
||||
background-color: $dropdown-bg;
|
||||
|
@ -33,17 +35,6 @@
|
|||
@include box-shadow($dropdown-box-shadow);
|
||||
}
|
||||
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
||||
|
||||
.dropdown-menu#{$infix}-right {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
||||
|
@ -52,6 +43,11 @@
|
|||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.dropdown-menu#{$infix}-right {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -118,7 +114,7 @@
|
|||
|
||||
// Dividers (basically an `<hr>`) within the dropdown
|
||||
.dropdown-divider {
|
||||
@include nav-divider($dropdown-divider-bg);
|
||||
@include nav-divider($dropdown-divider-bg, $dropdown-divider-margin-y);
|
||||
}
|
||||
|
||||
// Links, buttons, and more within the dropdown menu
|
||||
|
@ -136,6 +132,9 @@
|
|||
background-color: transparent; // For `<button>`s
|
||||
border: 0; // For `<button>`s
|
||||
|
||||
// Prevent dropdown overflow if there's no padding
|
||||
// See https://github.com/twbs/bootstrap/pull/27703
|
||||
@if $dropdown-padding-y == 0 {
|
||||
&:first-child {
|
||||
@include border-top-radius($dropdown-inner-border-radius);
|
||||
}
|
||||
|
@ -143,6 +142,7 @@
|
|||
&:last-child {
|
||||
@include border-bottom-radius($dropdown-inner-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
@include hover-focus {
|
||||
color: $dropdown-link-hover-color;
|
||||
|
@ -178,7 +178,7 @@
|
|||
display: block;
|
||||
padding: $dropdown-padding-y $dropdown-item-padding-x;
|
||||
margin-bottom: 0; // for use with heading elements
|
||||
font-size: $font-size-sm;
|
||||
@include font-size($font-size-sm);
|
||||
color: $dropdown-header-color;
|
||||
white-space: nowrap; // as with > li > a
|
||||
}
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
width: 100%;
|
||||
height: $input-height;
|
||||
padding: $input-padding-y $input-padding-x;
|
||||
font-size: $input-font-size;
|
||||
font-family: $input-font-family;
|
||||
@include font-size($input-font-size);
|
||||
font-weight: $input-font-weight;
|
||||
line-height: $input-line-height;
|
||||
color: $input-color;
|
||||
|
@ -18,13 +19,7 @@
|
|||
border: $input-border-width solid $input-border-color;
|
||||
|
||||
// Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
|
||||
@if $enable-rounded {
|
||||
// Manually use the if/else instead of the mixin to account for iOS override
|
||||
border-radius: $input-border-radius;
|
||||
} @else {
|
||||
// Otherwise undo the iOS default
|
||||
border-radius: 0;
|
||||
}
|
||||
@include border-radius($input-border-radius, 0);
|
||||
|
||||
@include box-shadow($input-box-shadow);
|
||||
@include transition($input-transition);
|
||||
|
@ -88,21 +83,21 @@ select.form-control {
|
|||
padding-top: calc(#{$input-padding-y} + #{$input-border-width});
|
||||
padding-bottom: calc(#{$input-padding-y} + #{$input-border-width});
|
||||
margin-bottom: 0; // Override the `<label>/<legend>` default
|
||||
font-size: inherit; // Override the `<legend>` default
|
||||
@include font-size(inherit); // Override the `<legend>` default
|
||||
line-height: $input-line-height;
|
||||
}
|
||||
|
||||
.col-form-label-lg {
|
||||
padding-top: calc(#{$input-padding-y-lg} + #{$input-border-width});
|
||||
padding-bottom: calc(#{$input-padding-y-lg} + #{$input-border-width});
|
||||
font-size: $input-font-size-lg;
|
||||
@include font-size($input-font-size-lg);
|
||||
line-height: $input-line-height-lg;
|
||||
}
|
||||
|
||||
.col-form-label-sm {
|
||||
padding-top: calc(#{$input-padding-y-sm} + #{$input-border-width});
|
||||
padding-bottom: calc(#{$input-padding-y-sm} + #{$input-border-width});
|
||||
font-size: $input-font-size-sm;
|
||||
@include font-size($input-font-size-sm);
|
||||
line-height: $input-line-height-sm;
|
||||
}
|
||||
|
||||
|
@ -142,7 +137,7 @@ select.form-control {
|
|||
.form-control-sm {
|
||||
height: $input-height-sm;
|
||||
padding: $input-padding-y-sm $input-padding-x-sm;
|
||||
font-size: $input-font-size-sm;
|
||||
@include font-size($input-font-size-sm);
|
||||
line-height: $input-line-height-sm;
|
||||
@include border-radius($input-border-radius-sm);
|
||||
}
|
||||
|
@ -150,7 +145,7 @@ select.form-control {
|
|||
.form-control-lg {
|
||||
height: $input-height-lg;
|
||||
padding: $input-padding-y-lg $input-padding-x-lg;
|
||||
font-size: $input-font-size-lg;
|
||||
@include font-size($input-font-size-lg);
|
||||
line-height: $input-line-height-lg;
|
||||
@include border-radius($input-border-radius-lg);
|
||||
}
|
||||
|
@ -163,7 +158,6 @@ select.form-control {
|
|||
}
|
||||
}
|
||||
|
||||
// stylelint-disable-next-line no-duplicate-selectors
|
||||
textarea.form-control {
|
||||
height: auto;
|
||||
}
|
||||
|
@ -248,8 +242,9 @@ textarea.form-control {
|
|||
// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
|
||||
// server side validation.
|
||||
|
||||
@include form-validation-state("valid", $form-feedback-valid-color);
|
||||
@include form-validation-state("invalid", $form-feedback-invalid-color);
|
||||
@each $state, $data in $form-validation-states {
|
||||
@include form-validation-state($state, map-get($data, color), map-get($data, icon));
|
||||
}
|
||||
|
||||
// Inline forms
|
||||
//
|
||||
|
@ -318,6 +313,7 @@ textarea.form-control {
|
|||
}
|
||||
.form-check-input {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
margin-top: 0;
|
||||
margin-right: $form-check-input-margin-x;
|
||||
margin-left: 0;
|
||||
|
|
|
@ -21,12 +21,12 @@
|
|||
}
|
||||
|
||||
// Starts at zero
|
||||
// Another grid mixin that ensures the min-width of the lowest breakpoint starts at 0.
|
||||
@mixin _assert-starts-at-zero($map) {
|
||||
// Used to ensure the min-width of the lowest breakpoint starts at 0.
|
||||
@mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") {
|
||||
$values: map-values($map);
|
||||
$first-value: nth($values, 1);
|
||||
@if $first-value != 0 {
|
||||
@warn "First breakpoint in `$grid-breakpoints` must start at 0, but starts at #{$first-value}.";
|
||||
@warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,6 @@
|
|||
}
|
||||
|
||||
.figure-caption {
|
||||
font-size: $figure-caption-font-size;
|
||||
@include font-size($figure-caption-font-size);
|
||||
color: $figure-caption-color;
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
align-items: center;
|
||||
padding: $input-padding-y $input-padding-x;
|
||||
margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom
|
||||
font-size: $font-size-base; // Match inputs
|
||||
@include font-size($input-font-size); // Match inputs
|
||||
font-weight: $font-weight-normal;
|
||||
line-height: $input-line-height;
|
||||
color: $input-group-addon-color;
|
||||
|
@ -139,7 +139,7 @@
|
|||
.input-group-lg > .input-group-prepend > .btn,
|
||||
.input-group-lg > .input-group-append > .btn {
|
||||
padding: $input-padding-y-lg $input-padding-x-lg;
|
||||
font-size: $input-font-size-lg;
|
||||
@include font-size($input-font-size-lg);
|
||||
line-height: $input-line-height-lg;
|
||||
@include border-radius($input-border-radius-lg);
|
||||
}
|
||||
|
@ -156,7 +156,7 @@
|
|||
.input-group-sm > .input-group-prepend > .btn,
|
||||
.input-group-sm > .input-group-append > .btn {
|
||||
padding: $input-padding-y-sm $input-padding-x-sm;
|
||||
font-size: $input-font-size-sm;
|
||||
@include font-size($input-font-size-sm);
|
||||
line-height: $input-line-height-sm;
|
||||
@include border-radius($input-border-radius-sm);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
.jumbotron {
|
||||
padding: $jumbotron-padding ($jumbotron-padding / 2);
|
||||
margin-bottom: $jumbotron-padding;
|
||||
color: $jumbotron-color;
|
||||
background-color: $jumbotron-bg;
|
||||
@include border-radius($border-radius-lg);
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
// Hover state
|
||||
@include hover-focus {
|
||||
z-index: 1; // Place hover/focus items above their siblings for proper border styling
|
||||
color: $list-group-action-hover-color;
|
||||
text-decoration: none;
|
||||
background-color: $list-group-hover-bg;
|
||||
|
@ -46,6 +47,7 @@
|
|||
padding: $list-group-item-padding-y $list-group-item-padding-x;
|
||||
// Place the border on the list items and negative margin up for better styling
|
||||
margin-bottom: -$list-group-border-width;
|
||||
color: $list-group-color;
|
||||
background-color: $list-group-bg;
|
||||
border: $list-group-border-width solid $list-group-border-color;
|
||||
|
||||
|
@ -58,11 +60,6 @@
|
|||
@include border-bottom-radius($list-group-border-radius);
|
||||
}
|
||||
|
||||
@include hover-focus {
|
||||
z-index: 1; // Place hover/active items above their siblings for proper border styling
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&.disabled,
|
||||
&:disabled {
|
||||
color: $list-group-disabled-color;
|
||||
|
@ -80,6 +77,37 @@
|
|||
}
|
||||
|
||||
|
||||
// Horizontal
|
||||
//
|
||||
// Change the layout of list group items from vertical (default) to horizontal.
|
||||
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
||||
|
||||
.list-group-horizontal#{$infix} {
|
||||
flex-direction: row;
|
||||
|
||||
.list-group-item {
|
||||
margin-right: -$list-group-border-width;
|
||||
margin-bottom: 0;
|
||||
|
||||
&:first-child {
|
||||
@include border-left-radius($list-group-border-radius);
|
||||
@include border-top-right-radius(0);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
@include border-right-radius($list-group-border-radius);
|
||||
@include border-bottom-left-radius(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Flush list items
|
||||
//
|
||||
// Remove borders and border-radius to keep list group items edge-to-edge. Most
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
//
|
||||
// Used in conjunction with global variables to enable certain theme features.
|
||||
|
||||
// Vendor
|
||||
@import "vendor/rfs";
|
||||
|
||||
// Deprecate
|
||||
@import "mixins/deprecate";
|
||||
|
||||
// Utilities
|
||||
@import "mixins/breakpoints";
|
||||
@import "mixins/hover";
|
||||
|
|
|
@ -50,17 +50,51 @@
|
|||
}
|
||||
}
|
||||
|
||||
.modal-dialog-scrollable {
|
||||
display: flex; // IE10/11
|
||||
max-height: calc(100% - #{$modal-dialog-margin * 2});
|
||||
|
||||
.modal-content {
|
||||
max-height: calc(100vh - #{$modal-dialog-margin * 2}); // IE10/11
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.modal-header,
|
||||
.modal-footer {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-dialog-centered {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: calc(100% - (#{$modal-dialog-margin} * 2));
|
||||
min-height: calc(100% - #{$modal-dialog-margin * 2});
|
||||
|
||||
// Ensure `modal-dialog-centered` extends the full height of the view (IE10/11)
|
||||
&::before {
|
||||
display: block; // IE10
|
||||
height: calc(100vh - (#{$modal-dialog-margin} * 2));
|
||||
height: calc(100vh - #{$modal-dialog-margin * 2});
|
||||
content: "";
|
||||
}
|
||||
|
||||
// Ensure `.modal-body` shows scrollbar (IE10/11)
|
||||
&.modal-dialog-scrollable {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
.modal-content {
|
||||
max-height: none;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Actual modal
|
||||
|
@ -70,6 +104,7 @@
|
|||
flex-direction: column;
|
||||
width: 100%; // Ensure `.modal-content` extends the full width of the parent `.modal-dialog`
|
||||
// counteract the pointer-events: none; in the .modal-dialog
|
||||
color: $modal-content-color;
|
||||
pointer-events: auto;
|
||||
background-color: $modal-content-bg;
|
||||
background-clip: padding-box;
|
||||
|
@ -159,11 +194,19 @@
|
|||
margin: $modal-dialog-margin-y-sm-up auto;
|
||||
}
|
||||
|
||||
.modal-dialog-scrollable {
|
||||
max-height: calc(100% - #{$modal-dialog-margin-y-sm-up * 2});
|
||||
|
||||
.modal-content {
|
||||
max-height: calc(100vh - #{$modal-dialog-margin-y-sm-up * 2});
|
||||
}
|
||||
}
|
||||
|
||||
.modal-dialog-centered {
|
||||
min-height: calc(100% - (#{$modal-dialog-margin-y-sm-up} * 2));
|
||||
min-height: calc(100% - #{$modal-dialog-margin-y-sm-up * 2});
|
||||
|
||||
&::before {
|
||||
height: calc(100vh - (#{$modal-dialog-margin-y-sm-up} * 2));
|
||||
height: calc(100vh - #{$modal-dialog-margin-y-sm-up * 2});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
padding-top: $navbar-brand-padding-y;
|
||||
padding-bottom: $navbar-brand-padding-y;
|
||||
margin-right: $navbar-padding-x;
|
||||
font-size: $navbar-brand-font-size;
|
||||
@include font-size($navbar-brand-font-size);
|
||||
line-height: inherit;
|
||||
white-space: nowrap;
|
||||
|
||||
|
@ -107,7 +107,7 @@
|
|||
// Button for toggling the navbar when in its collapsed state
|
||||
.navbar-toggler {
|
||||
padding: $navbar-toggler-padding-y $navbar-toggler-padding-x;
|
||||
font-size: $navbar-toggler-font-size;
|
||||
@include font-size($navbar-toggler-font-size);
|
||||
line-height: 1;
|
||||
background-color: transparent; // remove default button style
|
||||
border: $border-width solid transparent; // remove default button style
|
||||
|
@ -116,11 +116,6 @@
|
|||
@include hover-focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
// Opinionated: add "hand" cursor to non-disabled .navbar-toggler elements
|
||||
&:not(:disabled):not(.disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
// Keep as a separate element so folks can easily override it with another icon
|
||||
|
|
|
@ -27,11 +27,6 @@
|
|||
outline: $pagination-focus-outline;
|
||||
box-shadow: $pagination-focus-box-shadow;
|
||||
}
|
||||
|
||||
// Opinionated: add "hand" cursor to non-disabled .page-link elements
|
||||
&:not(:disabled):not(.disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.page-item {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
|
||||
// So reset our font and text properties to avoid inheriting weird values.
|
||||
@include reset-text();
|
||||
font-size: $popover-font-size;
|
||||
@include font-size($popover-font-size);
|
||||
// Allow breaking very long words so they don't overflow the popover's bounds
|
||||
word-wrap: break-word;
|
||||
background-color: $popover-bg;
|
||||
|
@ -38,73 +38,64 @@
|
|||
.bs-popover-top {
|
||||
margin-bottom: $popover-arrow-height;
|
||||
|
||||
.arrow {
|
||||
> .arrow {
|
||||
bottom: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
|
||||
}
|
||||
|
||||
.arrow::before,
|
||||
.arrow::after {
|
||||
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
}
|
||||
|
||||
.arrow::before {
|
||||
&::before {
|
||||
bottom: 0;
|
||||
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
border-top-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
.arrow::after {
|
||||
&::after {
|
||||
bottom: $popover-border-width;
|
||||
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
border-top-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bs-popover-right {
|
||||
margin-left: $popover-arrow-height;
|
||||
|
||||
.arrow {
|
||||
> .arrow {
|
||||
left: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
|
||||
width: $popover-arrow-height;
|
||||
height: $popover-arrow-width;
|
||||
margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
|
||||
}
|
||||
|
||||
.arrow::before,
|
||||
.arrow::after {
|
||||
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
}
|
||||
|
||||
.arrow::before {
|
||||
&::before {
|
||||
left: 0;
|
||||
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
border-right-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
.arrow::after {
|
||||
&::after {
|
||||
left: $popover-border-width;
|
||||
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
border-right-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bs-popover-bottom {
|
||||
margin-top: $popover-arrow-height;
|
||||
|
||||
.arrow {
|
||||
> .arrow {
|
||||
top: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
|
||||
}
|
||||
|
||||
.arrow::before,
|
||||
.arrow::after {
|
||||
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
|
||||
}
|
||||
|
||||
.arrow::before {
|
||||
&::before {
|
||||
top: 0;
|
||||
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
|
||||
border-bottom-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
.arrow::after {
|
||||
&::after {
|
||||
top: $popover-border-width;
|
||||
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
|
||||
border-bottom-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
|
||||
// This will remove the popover-header's border just below the arrow
|
||||
.popover-header::before {
|
||||
|
@ -122,28 +113,25 @@
|
|||
.bs-popover-left {
|
||||
margin-right: $popover-arrow-height;
|
||||
|
||||
.arrow {
|
||||
> .arrow {
|
||||
right: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
|
||||
width: $popover-arrow-height;
|
||||
height: $popover-arrow-width;
|
||||
margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
|
||||
}
|
||||
|
||||
.arrow::before,
|
||||
.arrow::after {
|
||||
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
|
||||
}
|
||||
|
||||
.arrow::before {
|
||||
&::before {
|
||||
right: 0;
|
||||
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
|
||||
border-left-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
.arrow::after {
|
||||
&::after {
|
||||
right: $popover-border-width;
|
||||
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
|
||||
border-left-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bs-popover-auto {
|
||||
&[x-placement^="top"] {
|
||||
|
@ -165,7 +153,7 @@
|
|||
.popover-header {
|
||||
padding: $popover-header-padding-y $popover-header-padding-x;
|
||||
margin-bottom: 0; // Reset the default from Reboot
|
||||
font-size: $font-size-base;
|
||||
@include font-size($font-size-base);
|
||||
color: $popover-header-color;
|
||||
background-color: $popover-header-bg;
|
||||
border-bottom: $popover-border-width solid darken($popover-header-bg, 5%);
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
// Disable animation if transitions are disabled
|
||||
@if $enable-transitions {
|
||||
@keyframes progress-bar-stripes {
|
||||
from { background-position: $progress-height 0; }
|
||||
to { background-position: 0 0; }
|
||||
}
|
||||
}
|
||||
|
||||
.progress {
|
||||
display: flex;
|
||||
height: $progress-height;
|
||||
overflow: hidden; // force rounded corners by cropping it
|
||||
font-size: $progress-font-size;
|
||||
@include font-size($progress-font-size);
|
||||
background-color: $progress-bg;
|
||||
@include border-radius($progress-border-radius);
|
||||
@include box-shadow($progress-box-shadow);
|
||||
|
@ -29,6 +32,12 @@
|
|||
background-size: $progress-height $progress-height;
|
||||
}
|
||||
|
||||
@if $enable-transitions {
|
||||
.progress-bar-animated {
|
||||
animation: progress-bar-stripes $progress-bar-animation-timing;
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
|
|||
body {
|
||||
margin: 0; // 1
|
||||
font-family: $font-family-base;
|
||||
font-size: $font-size-base;
|
||||
@include font-size($font-size-base);
|
||||
font-weight: $font-weight-base;
|
||||
line-height: $line-height-base;
|
||||
color: $body-color;
|
||||
|
@ -155,7 +155,7 @@ strong {
|
|||
}
|
||||
|
||||
small {
|
||||
font-size: 80%; // Add the correct font size in all browsers
|
||||
@include font-size(80%); // Add the correct font size in all browsers
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -166,7 +166,7 @@ small {
|
|||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 75%;
|
||||
@include font-size(75%);
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ code,
|
|||
kbd,
|
||||
samp {
|
||||
font-family: $font-family-monospace;
|
||||
font-size: 1em; // Correct the odd `em` font sizing in all browsers.
|
||||
@include font-size(1em); // Correct the odd `em` font sizing in all browsers.
|
||||
}
|
||||
|
||||
pre {
|
||||
|
@ -297,6 +297,7 @@ label {
|
|||
//
|
||||
// Details at https://github.com/twbs/bootstrap/issues/24093
|
||||
button {
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
|
@ -316,7 +317,7 @@ optgroup,
|
|||
textarea {
|
||||
margin: 0; // Remove the margin in Firefox and Safari
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
@include font-size(inherit);
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
|
@ -330,6 +331,14 @@ select {
|
|||
text-transform: none; // Remove the inheritance of text transform in Firefox
|
||||
}
|
||||
|
||||
// Remove the inheritance of word-wrap in Safari.
|
||||
//
|
||||
// Details at https://github.com/twbs/bootstrap/issues/24990
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
|
||||
// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
||||
// controls in Android 4.
|
||||
// 2. Correct the inability to style clickable types in iOS and Safari.
|
||||
|
@ -340,6 +349,18 @@ button,
|
|||
-webkit-appearance: button; // 2
|
||||
}
|
||||
|
||||
// Opinionated: add "hand" cursor to non-disabled button elements.
|
||||
@if $enable-pointer-cursor-for-buttons {
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
&:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
|
@ -395,7 +416,7 @@ legend {
|
|||
max-width: 100%; // 1
|
||||
padding: 0;
|
||||
margin-bottom: .5rem;
|
||||
font-size: 1.5rem;
|
||||
@include font-size(1.5rem);
|
||||
line-height: inherit;
|
||||
color: inherit; // 2
|
||||
white-space: normal; // 1
|
||||
|
@ -421,7 +442,7 @@ progress {
|
|||
}
|
||||
|
||||
//
|
||||
// Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
|
||||
// Remove the inner padding in Chrome and Safari on macOS.
|
||||
//
|
||||
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
vertical-align: text-bottom;
|
||||
border: $spinner-border-width solid currentColor;
|
||||
border-right-color: transparent;
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-radius: 50%;
|
||||
animation: spinner-border .75s linear infinite;
|
||||
}
|
||||
|
@ -42,6 +43,7 @@
|
|||
height: $spinner-height;
|
||||
vertical-align: text-bottom;
|
||||
background-color: currentColor;
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-radius: 50%;
|
||||
opacity: 0;
|
||||
animation: spinner-grow .75s linear infinite;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
.table {
|
||||
width: 100%;
|
||||
margin-bottom: $spacer;
|
||||
color: $table-color;
|
||||
background-color: $table-bg; // Reset for nesting within parents with `background-color`.
|
||||
|
||||
th,
|
||||
|
@ -22,10 +23,6 @@
|
|||
tbody + tbody {
|
||||
border-top: (2 * $table-border-width) solid $table-border-color;
|
||||
}
|
||||
|
||||
.table {
|
||||
background-color: $body-bg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -88,6 +85,7 @@
|
|||
.table-hover {
|
||||
tbody tr {
|
||||
@include hover {
|
||||
color: $table-hover-color;
|
||||
background-color: $table-hover-bg;
|
||||
}
|
||||
}
|
||||
|
@ -152,6 +150,7 @@
|
|||
&.table-hover {
|
||||
tbody tr {
|
||||
@include hover {
|
||||
color: $table-dark-hover-color;
|
||||
background-color: $table-dark-hover-bg;
|
||||
}
|
||||
}
|
||||
|
@ -175,7 +174,6 @@
|
|||
width: 100%;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
-ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
|
||||
|
||||
// Prevent double border on horizontal scroll due to use of `display: block;`
|
||||
> .table-bordered {
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
.toast {
|
||||
max-width: $toast-max-width;
|
||||
overflow: hidden; // cheap rounded corners on nested items
|
||||
font-size: $toast-font-size; // knock it down to 14px
|
||||
@include font-size($toast-font-size);
|
||||
color: $toast-color;
|
||||
background-color: $toast-background-color;
|
||||
background-clip: padding-box;
|
||||
border: $toast-border-width solid $toast-border-color;
|
||||
border-radius: $toast-border-radius;
|
||||
box-shadow: $toast-box-shadow;
|
||||
backdrop-filter: blur(10px);
|
||||
opacity: 0;
|
||||
@include border-radius($toast-border-radius);
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-bottom: $toast-padding-x;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
|
||||
// So reset our font and text properties to avoid inheriting weird values.
|
||||
@include reset-text();
|
||||
font-size: $tooltip-font-size;
|
||||
@include font-size($tooltip-font-size);
|
||||
// Allow breaking very long words so they don't overflow the tooltip's bounds
|
||||
word-wrap: break-word;
|
||||
opacity: 0;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
// stylelint-disable selector-no-qualifying-type
|
||||
|
||||
.fade {
|
||||
@include transition($transition-fade);
|
||||
|
||||
|
|
|
@ -13,36 +13,36 @@ h1, h2, h3, h4, h5, h6,
|
|||
color: $headings-color;
|
||||
}
|
||||
|
||||
h1, .h1 { font-size: $h1-font-size; }
|
||||
h2, .h2 { font-size: $h2-font-size; }
|
||||
h3, .h3 { font-size: $h3-font-size; }
|
||||
h4, .h4 { font-size: $h4-font-size; }
|
||||
h5, .h5 { font-size: $h5-font-size; }
|
||||
h6, .h6 { font-size: $h6-font-size; }
|
||||
h1, .h1 { @include font-size($h1-font-size); }
|
||||
h2, .h2 { @include font-size($h2-font-size); }
|
||||
h3, .h3 { @include font-size($h3-font-size); }
|
||||
h4, .h4 { @include font-size($h4-font-size); }
|
||||
h5, .h5 { @include font-size($h5-font-size); }
|
||||
h6, .h6 { @include font-size($h6-font-size); }
|
||||
|
||||
.lead {
|
||||
font-size: $lead-font-size;
|
||||
@include font-size($lead-font-size);
|
||||
font-weight: $lead-font-weight;
|
||||
}
|
||||
|
||||
// Type display classes
|
||||
.display-1 {
|
||||
font-size: $display1-size;
|
||||
@include font-size($display1-size);
|
||||
font-weight: $display1-weight;
|
||||
line-height: $display-line-height;
|
||||
}
|
||||
.display-2 {
|
||||
font-size: $display2-size;
|
||||
@include font-size($display2-size);
|
||||
font-weight: $display2-weight;
|
||||
line-height: $display-line-height;
|
||||
}
|
||||
.display-3 {
|
||||
font-size: $display3-size;
|
||||
@include font-size($display3-size);
|
||||
font-weight: $display3-weight;
|
||||
line-height: $display-line-height;
|
||||
}
|
||||
.display-4 {
|
||||
font-size: $display4-size;
|
||||
@include font-size($display4-size);
|
||||
font-weight: $display4-weight;
|
||||
line-height: $display-line-height;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ hr {
|
|||
|
||||
small,
|
||||
.small {
|
||||
font-size: $small-font-size;
|
||||
@include font-size($small-font-size);
|
||||
font-weight: $font-weight-normal;
|
||||
}
|
||||
|
||||
|
@ -104,19 +104,19 @@ mark,
|
|||
|
||||
// Builds on `abbr`
|
||||
.initialism {
|
||||
font-size: 90%;
|
||||
@include font-size(90%);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
// Blockquotes
|
||||
.blockquote {
|
||||
margin-bottom: $spacer;
|
||||
font-size: $blockquote-font-size;
|
||||
@include font-size($blockquote-font-size);
|
||||
}
|
||||
|
||||
.blockquote-footer {
|
||||
display: block;
|
||||
font-size: $blockquote-small-font-size;
|
||||
@include font-size($blockquote-small-font-size);
|
||||
color: $blockquote-small-color;
|
||||
|
||||
&::before {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
@import "utilities/screenreaders";
|
||||
@import "utilities/shadows";
|
||||
@import "utilities/sizing";
|
||||
@import "utilities/stretched-link";
|
||||
@import "utilities/spacing";
|
||||
@import "utilities/text";
|
||||
@import "utilities/visibility";
|
||||
|
|
|
@ -114,8 +114,11 @@ $enable-transitions: true !default;
|
|||
$enable-prefers-reduced-motion-media-query: true !default;
|
||||
$enable-hover-media-query: false !default; // Deprecated, no longer affects any compiled CSS
|
||||
$enable-grid-classes: true !default;
|
||||
$enable-pointer-cursor-for-buttons: true !default;
|
||||
$enable-print-styles: true !default;
|
||||
$enable-responsive-font-sizes: false !default;
|
||||
$enable-validation-icons: true !default;
|
||||
$enable-deprecation-messages: true !default;
|
||||
|
||||
|
||||
// Spacing
|
||||
|
@ -185,38 +188,28 @@ $paragraph-margin-bottom: 1rem !default;
|
|||
// Define the minimum dimensions at which your layout will change,
|
||||
// adapting to different screen sizes, for use in media queries.
|
||||
|
||||
$grid-breakpoints: () !default;
|
||||
// stylelint-disable-next-line scss/dollar-variable-default
|
||||
$grid-breakpoints: map-merge(
|
||||
(
|
||||
$grid-breakpoints: (
|
||||
xs: 0,
|
||||
sm: 576px,
|
||||
md: 768px,
|
||||
lg: 992px,
|
||||
xl: 1200px
|
||||
),
|
||||
$grid-breakpoints
|
||||
);
|
||||
) !default;
|
||||
|
||||
@include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
|
||||
@include _assert-starts-at-zero($grid-breakpoints);
|
||||
@include _assert-starts-at-zero($grid-breakpoints, "$grid-breakpoints");
|
||||
|
||||
|
||||
// Grid containers
|
||||
//
|
||||
// Define the maximum width of `.container` for different screen sizes.
|
||||
|
||||
$container-max-widths: () !default;
|
||||
// stylelint-disable-next-line scss/dollar-variable-default
|
||||
$container-max-widths: map-merge(
|
||||
(
|
||||
$container-max-widths: (
|
||||
sm: 540px,
|
||||
md: 720px,
|
||||
lg: 960px,
|
||||
xl: 1140px
|
||||
),
|
||||
$container-max-widths
|
||||
);
|
||||
) !default;
|
||||
|
||||
@include _assert-ascending($container-max-widths, "$container-max-widths");
|
||||
|
||||
|
@ -253,6 +246,8 @@ $component-active-color: $white !default;
|
|||
$component-active-bg: theme-color("primary") !default;
|
||||
|
||||
$caret-width: .3em !default;
|
||||
$caret-vertical-align: $caret-width * .85 !default;
|
||||
$caret-spacing: $caret-width * .85 !default;
|
||||
|
||||
$transition-base: all .2s ease-in-out !default;
|
||||
$transition-fade: opacity .15s linear !default;
|
||||
|
@ -264,13 +259,13 @@ $embed-responsive-aspect-ratios: join(
|
|||
(
|
||||
(21 9),
|
||||
(16 9),
|
||||
(3 4),
|
||||
(4 3),
|
||||
(1 1),
|
||||
),
|
||||
$embed-responsive-aspect-ratios
|
||||
);
|
||||
|
||||
// Fonts
|
||||
// Typography
|
||||
//
|
||||
// Font, line-height, and color for body text, headings, and more.
|
||||
|
||||
|
@ -281,8 +276,8 @@ $font-family-base: $font-family-sans-serif !default;
|
|||
// stylelint-enable value-keyword-case
|
||||
|
||||
$font-size-base: 1rem !default; // Assumes the browser default, typically `16px`
|
||||
$font-size-lg: ($font-size-base * 1.25) !default;
|
||||
$font-size-sm: ($font-size-base * .875) !default;
|
||||
$font-size-lg: $font-size-base * 1.25 !default;
|
||||
$font-size-sm: $font-size-base * .875 !default;
|
||||
|
||||
$font-weight-lighter: lighter !default;
|
||||
$font-weight-light: 300 !default;
|
||||
|
@ -301,10 +296,10 @@ $h5-font-size: $font-size-base * 1.25 !default;
|
|||
$h6-font-size: $font-size-base !default;
|
||||
|
||||
$headings-margin-bottom: $spacer / 2 !default;
|
||||
$headings-font-family: inherit !default;
|
||||
$headings-font-family: null !default;
|
||||
$headings-font-weight: 500 !default;
|
||||
$headings-line-height: 1.2 !default;
|
||||
$headings-color: inherit !default;
|
||||
$headings-color: null !default;
|
||||
|
||||
$display1-size: 6rem !default;
|
||||
$display2-size: 5.5rem !default;
|
||||
|
@ -317,7 +312,7 @@ $display3-weight: 300 !default;
|
|||
$display4-weight: 300 !default;
|
||||
$display-line-height: $headings-line-height !default;
|
||||
|
||||
$lead-font-size: ($font-size-base * 1.25) !default;
|
||||
$lead-font-size: $font-size-base * 1.25 !default;
|
||||
$lead-font-weight: 300 !default;
|
||||
|
||||
$small-font-size: 80% !default;
|
||||
|
@ -326,7 +321,7 @@ $text-muted: $gray-600 !default;
|
|||
|
||||
$blockquote-small-color: $gray-600 !default;
|
||||
$blockquote-small-font-size: $small-font-size !default;
|
||||
$blockquote-font-size: ($font-size-base * 1.25) !default;
|
||||
$blockquote-font-size: $font-size-base * 1.25 !default;
|
||||
|
||||
$hr-border-color: rgba($black, .1) !default;
|
||||
$hr-border-width: $border-width !default;
|
||||
|
@ -352,21 +347,25 @@ $hr-margin-y: $spacer !default;
|
|||
$table-cell-padding: .75rem !default;
|
||||
$table-cell-padding-sm: .3rem !default;
|
||||
|
||||
$table-bg: transparent !default;
|
||||
$table-color: $body-color !default;
|
||||
$table-bg: null !default;
|
||||
$table-accent-bg: rgba($black, .05) !default;
|
||||
$table-hover-color: $table-color !default;
|
||||
$table-hover-bg: rgba($black, .075) !default;
|
||||
$table-active-bg: $table-hover-bg !default;
|
||||
|
||||
$table-border-width: $border-width !default;
|
||||
$table-border-color: $gray-300 !default;
|
||||
$table-border-color: $border-color !default;
|
||||
|
||||
$table-head-bg: $gray-200 !default;
|
||||
$table-head-color: $gray-700 !default;
|
||||
|
||||
$table-dark-bg: $gray-900 !default;
|
||||
$table-dark-color: $white !default;
|
||||
$table-dark-bg: $gray-800 !default;
|
||||
$table-dark-accent-bg: rgba($white, .05) !default;
|
||||
$table-dark-hover-color: $table-dark-color !default;
|
||||
$table-dark-hover-bg: rgba($white, .075) !default;
|
||||
$table-dark-border-color: lighten($gray-900, 7.5%) !default;
|
||||
$table-dark-border-color: lighten($table-dark-bg, 7.5%) !default;
|
||||
$table-dark-color: $white !default;
|
||||
|
||||
$table-striped-order: odd !default;
|
||||
|
@ -383,6 +382,7 @@ $table-border-level: -6 !default;
|
|||
|
||||
$input-btn-padding-y: .375rem !default;
|
||||
$input-btn-padding-x: .75rem !default;
|
||||
$input-btn-font-family: null !default;
|
||||
$input-btn-font-size: $font-size-base !default;
|
||||
$input-btn-line-height: $line-height-base !default;
|
||||
|
||||
|
@ -409,6 +409,7 @@ $input-btn-border-width: $border-width !default;
|
|||
|
||||
$btn-padding-y: $input-btn-padding-y !default;
|
||||
$btn-padding-x: $input-btn-padding-x !default;
|
||||
$btn-font-family: $input-btn-font-family !default;
|
||||
$btn-font-size: $input-btn-font-size !default;
|
||||
$btn-line-height: $input-btn-line-height !default;
|
||||
|
||||
|
@ -449,6 +450,7 @@ $label-margin-bottom: .5rem !default;
|
|||
|
||||
$input-padding-y: $input-btn-padding-y !default;
|
||||
$input-padding-x: $input-btn-padding-x !default;
|
||||
$input-font-family: $input-btn-font-family !default;
|
||||
$input-font-size: $input-btn-font-size !default;
|
||||
$input-font-weight: $font-weight-base !default;
|
||||
$input-line-height: $input-btn-line-height !default;
|
||||
|
@ -486,14 +488,13 @@ $input-plaintext-color: $body-color !default;
|
|||
|
||||
$input-height-border: $input-border-width * 2 !default;
|
||||
|
||||
$input-height-inner: ($input-btn-font-size * $input-btn-line-height) + ($input-btn-padding-y * 2) !default;
|
||||
$input-height: calc(#{$input-height-inner} + #{$input-height-border}) !default;
|
||||
$input-height-inner: calc(#{$input-line-height * 1em} + #{$input-padding-y * 2}) !default;
|
||||
$input-height-inner-half: calc(#{$input-line-height * .5em} + #{$input-padding-y}) !default;
|
||||
$input-height-inner-quarter: calc(#{$input-line-height * .25em} + #{$input-padding-y / 2}) !default;
|
||||
|
||||
$input-height-inner-sm: ($input-btn-font-size-sm * $input-btn-line-height-sm) + ($input-btn-padding-y-sm * 2) !default;
|
||||
$input-height-sm: calc(#{$input-height-inner-sm} + #{$input-height-border}) !default;
|
||||
|
||||
$input-height-inner-lg: ($input-btn-font-size-lg * $input-btn-line-height-lg) + ($input-btn-padding-y-lg * 2) !default;
|
||||
$input-height-lg: calc(#{$input-height-inner-lg} + #{$input-height-border}) !default;
|
||||
$input-height: calc(#{$input-line-height * 1em} + #{$input-padding-y * 2} + #{$input-height-border}) !default;
|
||||
$input-height-sm: calc(#{$input-line-height-sm * 1em} + #{$input-btn-padding-y-sm * 2} + #{$input-height-border}) !default;
|
||||
$input-height-lg: calc(#{$input-line-height-lg * 1em} + #{$input-btn-padding-y-lg * 2} + #{$input-height-border}) !default;
|
||||
|
||||
$input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
|
||||
|
||||
|
@ -535,7 +536,7 @@ $custom-control-indicator-checked-disabled-bg: rgba(theme-color("primary"), .5)
|
|||
$custom-control-indicator-checked-box-shadow: none !default;
|
||||
$custom-control-indicator-checked-border-color: $custom-control-indicator-checked-bg !default;
|
||||
|
||||
$custom-control-indicator-focus-box-shadow: $input-btn-focus-box-shadow !default;
|
||||
$custom-control-indicator-focus-box-shadow: $input-focus-box-shadow !default;
|
||||
$custom-control-indicator-focus-border-color: $input-focus-border-color !default;
|
||||
|
||||
$custom-control-indicator-active-color: $component-active-color !default;
|
||||
|
@ -559,8 +560,10 @@ $custom-switch-width: $custom-control-indicator-size *
|
|||
$custom-switch-indicator-border-radius: $custom-control-indicator-size / 2 !default;
|
||||
$custom-switch-indicator-size: calc(#{$custom-control-indicator-size} - #{$custom-control-indicator-border-width * 4}) !default;
|
||||
|
||||
$custom-select-padding-y: $input-btn-padding-y !default;
|
||||
$custom-select-padding-x: $input-btn-padding-x !default;
|
||||
$custom-select-padding-y: $input-padding-y !default;
|
||||
$custom-select-padding-x: $input-padding-x !default;
|
||||
$custom-select-font-family: $input-font-family !default;
|
||||
$custom-select-font-size: $input-font-size !default;
|
||||
$custom-select-height: $input-height !default;
|
||||
$custom-select-indicator-padding: 1rem !default; // Extra padding to account for the presence of the background-image based indicator
|
||||
$custom-select-font-weight: $input-font-weight !default;
|
||||
|
@ -574,9 +577,9 @@ $custom-select-indicator-color: $gray-800 !default;
|
|||
$custom-select-indicator: str-replace(url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='#{$custom-select-indicator-color}' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e"), "#", "%23") !default;
|
||||
$custom-select-background: $custom-select-indicator no-repeat right $custom-select-padding-x center / $custom-select-bg-size !default; // Used so we can have multiple background elements (e.g., arrow and feedback icon)
|
||||
|
||||
$custom-select-feedback-icon-padding-right: $input-height-inner * 3 / 4 + $custom-select-padding-x + $custom-select-indicator-padding !default;
|
||||
$custom-select-feedback-icon-padding-right: calc((1em + #{2 * $custom-select-padding-y}) * 3 / 4 + #{$custom-select-padding-x + $custom-select-indicator-padding}) !default;
|
||||
$custom-select-feedback-icon-position: center right ($custom-select-padding-x + $custom-select-indicator-padding) !default;
|
||||
$custom-select-feedback-icon-size: ($input-height-inner / 2) ($input-height-inner / 2) !default;
|
||||
$custom-select-feedback-icon-size: $input-height-inner-half $input-height-inner-half !default;
|
||||
|
||||
$custom-select-border-width: $input-border-width !default;
|
||||
$custom-select-border-color: $input-border-color !default;
|
||||
|
@ -585,16 +588,16 @@ $custom-select-box-shadow: inset 0 1px 2px rgba($black, .075) !default;
|
|||
|
||||
$custom-select-focus-border-color: $input-focus-border-color !default;
|
||||
$custom-select-focus-width: $input-focus-width !default;
|
||||
$custom-select-focus-box-shadow: 0 0 0 $custom-select-focus-width rgba($custom-select-focus-border-color, .5) !default;
|
||||
$custom-select-focus-box-shadow: 0 0 0 $custom-select-focus-width $input-btn-focus-color !default;
|
||||
|
||||
$custom-select-padding-y-sm: $input-padding-y-sm !default;
|
||||
$custom-select-padding-x-sm: $input-padding-x-sm !default;
|
||||
$custom-select-font-size-sm: $input-btn-font-size-sm !default;
|
||||
$custom-select-font-size-sm: $input-font-size-sm !default;
|
||||
$custom-select-height-sm: $input-height-sm !default;
|
||||
|
||||
$custom-select-padding-y-lg: $input-padding-y-lg !default;
|
||||
$custom-select-padding-x-lg: $input-padding-x-lg !default;
|
||||
$custom-select-font-size-lg: $input-btn-font-size-lg !default;
|
||||
$custom-select-font-size-lg: $input-font-size-lg !default;
|
||||
$custom-select-height-lg: $input-height-lg !default;
|
||||
|
||||
$custom-range-track-width: 100% !default;
|
||||
|
@ -624,6 +627,7 @@ $custom-file-disabled-bg: $input-disabled-bg !default;
|
|||
$custom-file-padding-y: $input-padding-y !default;
|
||||
$custom-file-padding-x: $input-padding-x !default;
|
||||
$custom-file-line-height: $input-line-height !default;
|
||||
$custom-file-font-family: $input-font-family !default;
|
||||
$custom-file-font-weight: $input-font-weight !default;
|
||||
$custom-file-color: $input-color !default;
|
||||
$custom-file-bg: $input-bg !default;
|
||||
|
@ -648,38 +652,23 @@ $form-feedback-invalid-color: theme-color("danger") !default;
|
|||
$form-feedback-icon-valid-color: $form-feedback-valid-color !default;
|
||||
$form-feedback-icon-valid: str-replace(url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='#{$form-feedback-icon-valid-color}' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"), "#", "%23") !default;
|
||||
$form-feedback-icon-invalid-color: $form-feedback-invalid-color !default;
|
||||
$form-feedback-icon-invalid: str-replace(url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='#{$form-feedback-icon-invalid-color}' viewBox='-2 -2 7 7'%3e%3cpath stroke='%23d9534f' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E"), "#", "%23") !default;
|
||||
|
||||
|
||||
// Dropdowns
|
||||
//
|
||||
// Dropdown menu container and contents.
|
||||
|
||||
$dropdown-min-width: 10rem !default;
|
||||
$dropdown-padding-y: .5rem !default;
|
||||
$dropdown-spacer: .125rem !default;
|
||||
$dropdown-bg: $white !default;
|
||||
$dropdown-border-color: rgba($black, .15) !default;
|
||||
$dropdown-border-radius: $border-radius !default;
|
||||
$dropdown-border-width: $border-width !default;
|
||||
$dropdown-inner-border-radius: calc(#{$dropdown-border-radius} - #{$dropdown-border-width}) !default;
|
||||
$dropdown-divider-bg: $gray-200 !default;
|
||||
$dropdown-box-shadow: 0 .5rem 1rem rgba($black, .175) !default;
|
||||
|
||||
$dropdown-link-color: $gray-900 !default;
|
||||
$dropdown-link-hover-color: darken($gray-900, 5%) !default;
|
||||
$dropdown-link-hover-bg: $gray-100 !default;
|
||||
|
||||
$dropdown-link-active-color: $component-active-color !default;
|
||||
$dropdown-link-active-bg: $component-active-bg !default;
|
||||
|
||||
$dropdown-link-disabled-color: $gray-600 !default;
|
||||
|
||||
$dropdown-item-padding-y: .25rem !default;
|
||||
$dropdown-item-padding-x: 1.5rem !default;
|
||||
|
||||
$dropdown-header-color: $gray-600 !default;
|
||||
$form-feedback-icon-invalid: str-replace(url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='#{$form-feedback-icon-invalid-color}' viewBox='-2 -2 7 7'%3e%3cpath stroke='#{$form-feedback-icon-invalid-color}' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E"), "#", "%23") !default;
|
||||
|
||||
$form-validation-states: () !default;
|
||||
// stylelint-disable-next-line scss/dollar-variable-default
|
||||
$form-validation-states: map-merge(
|
||||
(
|
||||
"valid": (
|
||||
"color": $form-feedback-valid-color,
|
||||
"icon": $form-feedback-icon-valid
|
||||
),
|
||||
"invalid": (
|
||||
"color": $form-feedback-invalid-color,
|
||||
"icon": $form-feedback-icon-invalid
|
||||
),
|
||||
),
|
||||
$form-validation-states
|
||||
);
|
||||
|
||||
// Z-index master list
|
||||
//
|
||||
|
@ -755,6 +744,39 @@ $navbar-dark-brand-color: $navbar-dark-active-color !default;
|
|||
$navbar-dark-brand-hover-color: $navbar-dark-active-color !default;
|
||||
|
||||
|
||||
// Dropdowns
|
||||
//
|
||||
// Dropdown menu container and contents.
|
||||
|
||||
$dropdown-min-width: 10rem !default;
|
||||
$dropdown-padding-y: .5rem !default;
|
||||
$dropdown-spacer: .125rem !default;
|
||||
$dropdown-font-size: $font-size-base !default;
|
||||
$dropdown-color: $body-color !default;
|
||||
$dropdown-bg: $white !default;
|
||||
$dropdown-border-color: rgba($black, .15) !default;
|
||||
$dropdown-border-radius: $border-radius !default;
|
||||
$dropdown-border-width: $border-width !default;
|
||||
$dropdown-inner-border-radius: calc(#{$dropdown-border-radius} - #{$dropdown-border-width}) !default;
|
||||
$dropdown-divider-bg: $gray-200 !default;
|
||||
$dropdown-divider-margin-y: $nav-divider-margin-y !default;
|
||||
$dropdown-box-shadow: 0 .5rem 1rem rgba($black, .175) !default;
|
||||
|
||||
$dropdown-link-color: $gray-900 !default;
|
||||
$dropdown-link-hover-color: darken($gray-900, 5%) !default;
|
||||
$dropdown-link-hover-bg: $gray-100 !default;
|
||||
|
||||
$dropdown-link-active-color: $component-active-color !default;
|
||||
$dropdown-link-active-bg: $component-active-bg !default;
|
||||
|
||||
$dropdown-link-disabled-color: $gray-600 !default;
|
||||
|
||||
$dropdown-item-padding-y: .25rem !default;
|
||||
$dropdown-item-padding-x: 1.5rem !default;
|
||||
|
||||
$dropdown-header-color: $gray-600 !default;
|
||||
|
||||
|
||||
// Pagination
|
||||
|
||||
$pagination-padding-y: .5rem !default;
|
||||
|
@ -789,6 +811,7 @@ $pagination-disabled-border-color: $gray-300 !default;
|
|||
// Jumbotron
|
||||
|
||||
$jumbotron-padding: 2rem !default;
|
||||
$jumbotron-color: null !default;
|
||||
$jumbotron-bg: $gray-200 !default;
|
||||
|
||||
|
||||
|
@ -801,7 +824,8 @@ $card-border-radius: $border-radius !default;
|
|||
$card-border-color: rgba($black, .125) !default;
|
||||
$card-inner-border-radius: calc(#{$card-border-radius} - #{$card-border-width}) !default;
|
||||
$card-cap-bg: rgba($black, .03) !default;
|
||||
$card-cap-color: inherit !default;
|
||||
$card-cap-color: null !default;
|
||||
$card-color: null !default;
|
||||
$card-bg: $white !default;
|
||||
|
||||
$card-img-overlay-padding: 1.25rem !default;
|
||||
|
@ -866,10 +890,12 @@ $popover-arrow-outer-color: fade-in($popover-border-color, .05) !default
|
|||
|
||||
|
||||
// Toasts
|
||||
|
||||
$toast-max-width: 350px !default;
|
||||
$toast-padding-x: .75rem !default;
|
||||
$toast-padding-y: .25rem !default;
|
||||
$toast-font-size: .875rem !default;
|
||||
$toast-color: null !default;
|
||||
$toast-background-color: rgba($white, .85) !default;
|
||||
$toast-border-width: 1px !default;
|
||||
$toast-border-color: rgba(0, 0, 0, .1) !default;
|
||||
|
@ -889,6 +915,9 @@ $badge-padding-y: .25em !default;
|
|||
$badge-padding-x: .4em !default;
|
||||
$badge-border-radius: $border-radius !default;
|
||||
|
||||
$badge-transition: $btn-transition !default;
|
||||
$badge-focus-width: $input-btn-focus-width !default;
|
||||
|
||||
$badge-pill-padding-x: .6em !default;
|
||||
// Use a higher than normal value to ensure completely rounded edges when
|
||||
// customizing padding or font-size on labels.
|
||||
|
@ -905,6 +934,7 @@ $modal-dialog-margin-y-sm-up: 1.75rem !default;
|
|||
|
||||
$modal-title-line-height: $line-height-base !default;
|
||||
|
||||
$modal-content-color: null !default;
|
||||
$modal-content-bg: $white !default;
|
||||
$modal-content-border-color: rgba($black, .2) !default;
|
||||
$modal-content-border-width: $border-width !default;
|
||||
|
@ -914,7 +944,7 @@ $modal-content-box-shadow-sm-up: 0 .5rem 1rem rgba($black, .5) !default;
|
|||
|
||||
$modal-backdrop-bg: $black !default;
|
||||
$modal-backdrop-opacity: .5 !default;
|
||||
$modal-header-border-color: $gray-200 !default;
|
||||
$modal-header-border-color: $border-color !default;
|
||||
$modal-footer-border-color: $modal-header-border-color !default;
|
||||
$modal-header-border-width: $modal-content-border-width !default;
|
||||
$modal-footer-border-width: $modal-header-border-width !default;
|
||||
|
@ -951,7 +981,7 @@ $alert-color-level: 6 !default;
|
|||
// Progress bars
|
||||
|
||||
$progress-height: 1rem !default;
|
||||
$progress-font-size: ($font-size-base * .75) !default;
|
||||
$progress-font-size: $font-size-base * .75 !default;
|
||||
$progress-bg: $gray-200 !default;
|
||||
$progress-border-radius: $border-radius !default;
|
||||
$progress-box-shadow: inset 0 .1rem .1rem rgba($black, .1) !default;
|
||||
|
@ -963,6 +993,7 @@ $progress-bar-transition: width .6s ease !default;
|
|||
|
||||
// List group
|
||||
|
||||
$list-group-color: null !default;
|
||||
$list-group-bg: $white !default;
|
||||
$list-group-border-color: rgba($black, .125) !default;
|
||||
$list-group-border-width: $border-width !default;
|
||||
|
@ -1081,6 +1112,7 @@ $pre-scrollable-max-height: 340px !default;
|
|||
|
||||
// Utilities
|
||||
|
||||
$displays: none, inline, inline-block, block, table, table-row, table-cell, flex, inline-flex !default;
|
||||
$overflows: auto, hidden !default;
|
||||
$positions: static, relative, absolute, fixed, sticky !default;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*!
|
||||
* Bootstrap Grid v4.2.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Bootstrap Grid v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors
|
||||
* Copyright 2011-2019 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*!
|
||||
* Bootstrap Reboot v4.2.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors
|
||||
* Copyright 2011-2019 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*!
|
||||
* Bootstrap v4.2.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Bootstrap v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors
|
||||
* Copyright 2011-2019 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
|
|
|
@ -7,5 +7,11 @@
|
|||
color: color-yiq($bg);
|
||||
background-color: darken($bg, 10%);
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&.focus {
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 $badge-focus-width rgba($bg, .5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
// stylelint-disable property-blacklist
|
||||
// Single side border-radius
|
||||
|
||||
@mixin border-radius($radius: $border-radius) {
|
||||
@mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
|
||||
@if $enable-rounded {
|
||||
border-radius: $radius;
|
||||
}
|
||||
@else if $fallback-border-radius != false {
|
||||
border-radius: $fallback-border-radius;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-top-radius($radius) {
|
||||
|
@ -33,3 +37,27 @@
|
|||
border-bottom-left-radius: $radius;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-top-left-radius($radius) {
|
||||
@if $enable-rounded {
|
||||
border-top-left-radius: $radius;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-top-right-radius($radius) {
|
||||
@if $enable-rounded {
|
||||
border-top-right-radius: $radius;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-bottom-right-radius($radius) {
|
||||
@if $enable-rounded {
|
||||
border-bottom-right-radius: $radius;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-bottom-left-radius($radius) {
|
||||
@if $enable-rounded {
|
||||
border-bottom-left-radius: $radius;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
@mixin box-shadow($shadow...) {
|
||||
@if $enable-shadows {
|
||||
box-shadow: $shadow;
|
||||
$result: ();
|
||||
|
||||
@if (length($shadow) == 1) {
|
||||
// We can pass `@include box-shadow(none);`
|
||||
$result: $shadow;
|
||||
} @else {
|
||||
// Filter to avoid invalid properties for example `box-shadow: none, 1px 1px black;`
|
||||
@for $i from 1 through length($shadow) {
|
||||
@if nth($shadow, $i) != "none" {
|
||||
$result: append($result, nth($shadow, $i), "comma");
|
||||
}
|
||||
}
|
||||
}
|
||||
@if (length($result) > 0) {
|
||||
box-shadow: $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
&:focus {
|
||||
// Avoid using mixin so we can pass custom focus shadow properly
|
||||
@if $enable-shadows {
|
||||
@if $enable-shadows and $btn-active-box-shadow != none {
|
||||
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
|
||||
} @else {
|
||||
box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
|
||||
|
@ -100,12 +100,8 @@
|
|||
// Button sizes
|
||||
@mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
|
||||
padding: $padding-y $padding-x;
|
||||
font-size: $font-size;
|
||||
@include font-size($font-size);
|
||||
line-height: $line-height;
|
||||
// Manually declare to provide an override to the browser default
|
||||
@if $enable-rounded {
|
||||
border-radius: $border-radius;
|
||||
} @else {
|
||||
border-radius: 0;
|
||||
}
|
||||
@include border-radius($border-radius, 0);
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
@if $enable-caret {
|
||||
&::after {
|
||||
display: inline-block;
|
||||
margin-left: $caret-width * .85;
|
||||
vertical-align: $caret-width * .85;
|
||||
margin-left: $caret-spacing;
|
||||
vertical-align: $caret-vertical-align;
|
||||
content: "";
|
||||
@if $direction == down {
|
||||
@include caret-down;
|
||||
|
@ -48,8 +48,8 @@
|
|||
|
||||
&::before {
|
||||
display: inline-block;
|
||||
margin-right: $caret-width * .85;
|
||||
vertical-align: $caret-width * .85;
|
||||
margin-right: $caret-spacing;
|
||||
vertical-align: $caret-vertical-align;
|
||||
content: "";
|
||||
@include caret-left;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
// Deprecate mixin
|
||||
//
|
||||
// This mixin can be used to deprecate mixins or functions.
|
||||
// `$enable-deprecation-messages` is a global variable, `$ignore-warning` is a variable that can be passed to
|
||||
// some deprecated mixins to suppress the warning (for example if the mixin is still be used in the current version of Bootstrap)
|
||||
@mixin deprecate($name, $deprecate-version, $remove-version, $ignore-warning: false) {
|
||||
@if ($enable-deprecation-messages != false and $ignore-warning != true) {
|
||||
@warn "#{$name} has been deprecated as of #{$deprecate-version}. It will be removed entirely in #{$remove-version}.";
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue