Commit 935d45f4 authored by Mark Otto's avatar Mark Otto
Browse files

dist

parent 13150872
6 merge requests!28721Hot test,!27561Adds font-weight-medium to font weight classes,!25494web pack,!25326Adjust examples,!23207#22402 : modal: new autofocus & keyboardBtnNav options,!17021v4
Showing with 336 additions and 292 deletions
+336 -292
......@@ -22,4 +22,4 @@ License: MIT
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see https://creativecommons.org/licenses/by/3.0/.
*/
(function(e){"use strict";e(function(){e(".tooltip-demo").tooltip({selector:'[data-toggle="tooltip"]',container:"body"});e('[data-toggle="popover"]').popover();e(".tooltip-test").tooltip();e(".popover-test").popover();e('.bd-example-indeterminate [type="checkbox"]').prop("indeterminate",true);e('.bd-content [href="#"]').click(function(e){e.preventDefault()});e("#exampleModal").on("show.bs.modal",function(t){var n=e(t.relatedTarget);var r=n.data("whatever");var i=e(this);i.find(".modal-title").text("New message to "+r);i.find(".modal-body input").val(r)});e(".bd-toggle-animated-progress").on("click",function(){e(this).siblings(".progress").find(".progress-bar-striped").toggleClass("progress-bar-animated")});e(".highlight").each(function(){var t='<div class="bd-clipboard"><button class="btn-clipboard" title="Copy to clipboard">Copy</button></div>';e(this).before(t);e(".btn-clipboard").tooltip().on("mouseleave",function(){e(this).tooltip("hide")})});var t=new Clipboard(".btn-clipboard",{target:function(e){return e.parentNode.nextElementSibling}});t.on("success",function(t){e(t.trigger).attr("title","Copied!").tooltip("_fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("_fixTitle");t.clearSelection()});t.on("error",function(t){var n=/Mac/i.test(navigator.userAgent)?"":"Ctrl-";var r="Press "+n+"C to copy";e(t.trigger).attr("title",r).tooltip("_fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("_fixTitle")});anchors.options={icon:"#"};anchors.add(".bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5");e(".bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5").wrapInner("<div></div>")})})(jQuery);(function(){"use strict";function e(){var e=/MSIE ([0-9.]+)/.exec(window.navigator.userAgent);if(e===null){return null}var t=parseInt(e[1],10);var n=Math.floor(t);return n}function t(){var e=new Function("/*@cc_on return @_jscript_version; @*/")();if(typeof e==="undefined"){return 11}if(e<9){return 8}return e}var n=window.navigator.userAgent;if(n.indexOf("Opera")>-1||n.indexOf("Presto")>-1){return}var r=e();if(r===null){return}var i=t();if(r!==i){window.alert("WARNING: You appear to be using IE"+i+" in IE"+r+" emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!")}})();(function e(){"use strict";if("serviceWorker"in navigator){window.addEventListener("load",function(){navigator.serviceWorker.register("/sw.js").then(function(e){console.log("ServiceWorker registration successful with scope: ",e.scope);e.onupdatefound=function(){var t=e.installing;t.onstatechange=function(){switch(t.state){case"installed":if(navigator.serviceWorker.controller){console.log("new update available");location.reload(true)}break;default:}}}}).catch(function(e){console.log("ServiceWorker registration failed: ",e)})})}})();
\ No newline at end of file
(function(e){"use strict";e(function(){e(".tooltip-demo").tooltip({selector:'[data-toggle="tooltip"]',container:"body"});e('[data-toggle="popover"]').popover();e(".tooltip-test").tooltip();e(".popover-test").popover();e('.bd-example-indeterminate [type="checkbox"]').prop("indeterminate",true);e('.bd-content [href="#"]').click(function(e){e.preventDefault()});e("#exampleModal").on("show.bs.modal",function(t){var n=e(t.relatedTarget);var r=n.data("whatever");var i=e(this);i.find(".modal-title").text("New message to "+r);i.find(".modal-body input").val(r)});e(".bd-toggle-animated-progress").on("click",function(){e(this).siblings(".progress").find(".progress-bar-striped").toggleClass("progress-bar-animated")});e(".highlight").each(function(){var t='<div class="bd-clipboard"><button class="btn-clipboard" title="Copy to clipboard">Copy</button></div>';e(this).before(t);e(".btn-clipboard").tooltip().on("mouseleave",function(){e(this).tooltip("hide")})});var t=new Clipboard(".btn-clipboard",{target:function(e){return e.parentNode.nextElementSibling}});t.on("success",function(t){e(t.trigger).attr("title","Copied!").tooltip("_fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("_fixTitle");t.clearSelection()});t.on("error",function(t){var n=/Mac/i.test(navigator.userAgent)?"":"Ctrl-";var r="Press "+n+"C to copy";e(t.trigger).attr("title",r).tooltip("_fixTitle").tooltip("show").attr("title","Copy to clipboard").tooltip("_fixTitle")});anchors.options={icon:"#"};anchors.add(".bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5");e(".bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5").wrapInner("<div></div>")})})(jQuery);(function(){"use strict";function e(){var e=/MSIE ([0-9.]+)/.exec(window.navigator.userAgent);if(e===null){return null}var t=parseInt(e[1],10);var n=Math.floor(t);return n}function t(){var e=new Function("/*@cc_on return @_jscript_version; @*/")();if(typeof e==="undefined"){return 11}if(e<9){return 8}return e}var n=window.navigator.userAgent;if(n.indexOf("Opera")>-1||n.indexOf("Presto")>-1){return}var r=e();if(r===null){return}var i=t();if(r!==i){window.alert("WARNING: You appear to be using IE"+i+" in IE"+r+" emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!")}})();(function e(){"use strict";if("serviceWorker"in navigator){window.addEventListener("load",function(){navigator.serviceWorker.register("/sw.js").then(function(e){console.log("ServiceWorker registration successful with scope: ",e.scope)}).catch(function(e){console.log("ServiceWorker registration failed: ",e)})})}else{console.log("Service workers are not supported.")}})();
\ No newline at end of file
......@@ -1943,17 +1943,23 @@ select.form-control:focus::-ms-value {
}
.form-control-plaintext.form-control-sm, .input-group-sm > .form-control-plaintext.form-control,
.input-group-sm > .form-control-plaintext.input-group-addon,
.input-group-sm > .input-group-btn > .form-control-plaintext.btn, .form-control-plaintext.form-control-lg, .input-group-lg > .form-control-plaintext.form-control,
.input-group-lg > .form-control-plaintext.input-group-addon,
.input-group-lg > .input-group-btn > .form-control-plaintext.btn {
.input-group-sm > .input-group-prepend > .form-control-plaintext.input-group-text,
.input-group-sm > .input-group-append > .form-control-plaintext.input-group-text,
.input-group-sm > .input-group-prepend > .form-control-plaintext.btn,
.input-group-sm > .input-group-append > .form-control-plaintext.btn, .form-control-plaintext.form-control-lg, .input-group-lg > .form-control-plaintext.form-control,
.input-group-lg > .input-group-prepend > .form-control-plaintext.input-group-text,
.input-group-lg > .input-group-append > .form-control-plaintext.input-group-text,
.input-group-lg > .input-group-prepend > .form-control-plaintext.btn,
.input-group-lg > .input-group-append > .form-control-plaintext.btn {
padding-right: 0;
padding-left: 0;
}
.form-control-sm, .input-group-sm > .form-control,
.input-group-sm > .input-group-addon,
.input-group-sm > .input-group-btn > .btn {
.input-group-sm > .input-group-prepend > .input-group-text,
.input-group-sm > .input-group-append > .input-group-text,
.input-group-sm > .input-group-prepend > .btn,
.input-group-sm > .input-group-append > .btn {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
line-height: 1.5;
......@@ -1961,14 +1967,18 @@ select.form-control:focus::-ms-value {
}
select.form-control-sm:not([size]):not([multiple]), .input-group-sm > select.form-control:not([size]):not([multiple]),
.input-group-sm > select.input-group-addon:not([size]):not([multiple]),
.input-group-sm > .input-group-btn > select.btn:not([size]):not([multiple]) {
.input-group-sm > .input-group-prepend > select.input-group-text:not([size]):not([multiple]),
.input-group-sm > .input-group-append > select.input-group-text:not([size]):not([multiple]),
.input-group-sm > .input-group-prepend > select.btn:not([size]):not([multiple]),
.input-group-sm > .input-group-append > select.btn:not([size]):not([multiple]) {
height: calc(1.8125rem + 2px);
}
.form-control-lg, .input-group-lg > .form-control,
.input-group-lg > .input-group-addon,
.input-group-lg > .input-group-btn > .btn {
.input-group-lg > .input-group-prepend > .input-group-text,
.input-group-lg > .input-group-append > .input-group-text,
.input-group-lg > .input-group-prepend > .btn,
.input-group-lg > .input-group-append > .btn {
padding: 0.5rem 1rem;
font-size: 1.25rem;
line-height: 1.5;
......@@ -1976,8 +1986,10 @@ select.form-control-sm:not([size]):not([multiple]), .input-group-sm > select.for
}
select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.form-control:not([size]):not([multiple]),
.input-group-lg > select.input-group-addon:not([size]):not([multiple]),
.input-group-lg > .input-group-btn > select.btn:not([size]):not([multiple]) {
.input-group-lg > .input-group-prepend > select.input-group-text:not([size]):not([multiple]),
.input-group-lg > .input-group-append > select.input-group-text:not([size]):not([multiple]),
.input-group-lg > .input-group-prepend > select.btn:not([size]):not([multiple]),
.input-group-lg > .input-group-append > select.btn:not([size]):not([multiple]) {
height: calc(2.875rem + 2px);
}
......@@ -2037,6 +2049,7 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for
.valid-feedback {
display: none;
width: 100%;
margin-top: 0.25rem;
font-size: 80%;
color: #28a745;
......@@ -2115,6 +2128,7 @@ select.form-control-lg:not([size]):not([multiple]), .input-group-lg > select.for
.invalid-feedback {
display: none;
width: 100%;
margin-top: 0.25rem;
font-size: 80%;
color: #dc3545;
......@@ -3226,61 +3240,103 @@ tbody.collapse.show {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-ms-flex-align: stretch;
align-items: stretch;
width: 100%;
}
.input-group .form-control {
.input-group .form-control,
.input-group .custom-select,
.input-group .custom-file {
position: relative;
z-index: 1;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
width: 1%;
margin-bottom: 0;
}
.input-group .form-control:focus, .input-group .form-control:active, .input-group .form-control:hover {
z-index: 2;
.input-group .form-control:focus,
.input-group .custom-select:focus,
.input-group .custom-file:focus {
z-index: 3;
}
.input-group-addon,
.input-group-btn,
.input-group .form-control,
.input-group .custom-select,
.input-group .custom-file {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
.input-group .form-control + .form-control,
.input-group .custom-select + .form-control,
.input-group .custom-file + .form-control {
margin-left: -1px;
}
.input-group-addon:not(:first-child):not(:last-child),
.input-group-btn:not(:first-child):not(:last-child),
.input-group .form-control:not(:first-child):not(:last-child),
.input-group .custom-select:not(:first-child):not(:last-child),
.input-group .custom-file:not(:first-child):not(:last-child) {
.input-group .form-control:not(:first-child):not(:last-of-type),
.input-group .custom-select:not(:first-child):not(:last-of-type) {
border-radius: 0;
}
.input-group .custom-file {
.input-group .form-control:first-child,
.input-group .custom-select:first-child {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.input-group .form-control:last-of-type:not(:first-child),
.input-group .custom-select:last-of-type:not(:first-child) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.input-group .custom-file:not(:first-child):not(:last-of-type) .custom-file-control,
.input-group .custom-file:not(:first-child):not(:last-of-type) .custom-file-control::before {
border-radius: 0;
}
.input-group .custom-file:first-child .custom-file-control,
.input-group .custom-file:first-child .custom-file-control::before {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.input-group .custom-file:last-of-type:not(:first-child) .custom-file-control,
.input-group .custom-file:last-of-type:not(:first-child) .custom-file-control::before {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.input-group-prepend,
.input-group-append {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
}
.input-group .custom-select,
.input-group .custom-file {
width: 100%;
.input-group-prepend .btn,
.input-group-append .btn {
position: relative;
z-index: 2;
}
.input-group-addon,
.input-group-btn {
white-space: nowrap;
.input-group-prepend .btn + .btn,
.input-group-prepend .btn + .input-group-text,
.input-group-prepend .input-group-text + .input-group-text,
.input-group-prepend .input-group-text + .btn,
.input-group-append .btn + .btn,
.input-group-append .btn + .input-group-text,
.input-group-append .input-group-text + .input-group-text,
.input-group-append .input-group-text + .btn {
margin-left: -1px;
}
.input-group-prepend {
margin-right: -1px;
}
.input-group-addon {
.input-group-append {
margin-left: -1px;
}
.input-group-text {
padding: 0.375rem 0.75rem;
margin-bottom: 0;
font-size: 1rem;
......@@ -3288,113 +3344,40 @@ tbody.collapse.show {
line-height: 1.5;
color: #495057;
text-align: center;
white-space: nowrap;
background-color: #e9ecef;
border: 1px solid #ced4da;
border-radius: 0.25rem;
}
.input-group-addon.form-control-sm,
.input-group-sm > .input-group-addon,
.input-group-sm > .input-group-btn > .input-group-addon.btn {
padding: 0.25rem 0.5rem;
font-size: 0.875rem;
border-radius: 0.2rem;
}
.input-group-addon.form-control-lg,
.input-group-lg > .input-group-addon,
.input-group-lg > .input-group-btn > .input-group-addon.btn {
padding: 0.5rem 1rem;
font-size: 1.25rem;
border-radius: 0.3rem;
}
.input-group-addon input[type="radio"],
.input-group-addon input[type="checkbox"] {
.input-group-text input[type="radio"],
.input-group-text input[type="checkbox"] {
margin-top: 0;
}
.input-group .form-control:not(:last-child),
.input-group .custom-select:not(:last-child),
.input-group .custom-file:not(:last-child) .custom-file-control::before,
.input-group-addon:not(:last-child),
.input-group-btn:not(:last-child) > .btn,
.input-group-btn:not(:last-child) > .btn-group > .btn,
.input-group-btn:not(:last-child) > .dropdown-toggle,
.input-group-btn:not(:first-child) > .btn:not(:last-child):not(.dropdown-toggle),
.input-group-btn:not(:first-child) > .btn-group:not(:last-child) > .btn {
.input-group > .input-group-prepend > .btn,
.input-group > .input-group-prepend > .input-group-text {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.input-group-addon:not(:last-child) {
border-right: 0;
}
.input-group .form-control:not(:first-child),
.input-group .custom-select:not(:first-child),
.input-group .custom-file:not(:first-child) .custom-file-control,
.input-group-addon:not(:first-child),
.input-group-btn:not(:first-child) > .btn,
.input-group-btn:not(:first-child) > .btn-group > .btn,
.input-group-btn:not(:first-child) > .dropdown-toggle,
.input-group-btn:not(:last-child) > .btn:not(:first-child),
.input-group-btn:not(:last-child) > .btn-group:not(:first-child) > .btn {
.input-group > .input-group-prepend > .btn + .btn,
.input-group > .input-group-prepend > .btn + .input-group-text,
.input-group > .input-group-prepend > .input-group-text + .btn,
.input-group > .input-group-prepend > .input-group-text + .input-group-text {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.form-control + .input-group-addon:not(:first-child),
.custom-select + .input-group-addon:not(:first-child),
.custom-file + .input-group-addon:not(:first-child) {
border-left: 0;
}
.input-group-btn {
position: relative;
-ms-flex-align: stretch;
align-items: stretch;
font-size: 0;
white-space: nowrap;
}
.input-group-btn > .btn {
position: relative;
}
.input-group-btn > .btn + .btn {
margin-left: -1px;
}
.input-group-btn > .btn:focus, .input-group-btn > .btn:active, .input-group-btn > .btn:hover {
z-index: 2;
}
.input-group-btn:first-child > .btn + .btn {
margin-left: 0;
}
.input-group-btn:not(:last-child) > .btn,
.input-group-btn:not(:last-child) > .btn-group {
margin-right: -1px;
}
.input-group-btn:not(:first-child) > .btn,
.input-group-btn:not(:first-child) > .btn-group {
z-index: 1;
margin-left: 0;
}
.input-group-btn:not(:first-child) > .btn:first-child,
.input-group-btn:not(:first-child) > .btn-group:first-child {
margin-left: -1px;
.input-group > .input-group-append .btn:not(:last-of-type),
.input-group > .input-group-append .input-group-text:not(:last-child) {
border-radius: 0;
}
.input-group-btn:not(:first-child) > .btn:focus, .input-group-btn:not(:first-child) > .btn:active, .input-group-btn:not(:first-child) > .btn:hover,
.input-group-btn:not(:first-child) > .btn-group:focus,
.input-group-btn:not(:first-child) > .btn-group:active,
.input-group-btn:not(:first-child) > .btn-group:hover {
z-index: 2;
.input-group > .input-group-append .btn:last-of-type,
.input-group > .input-group-append .input-group-text:last-child {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.custom-control {
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This source diff could not be displayed because it is too large. You can view the blob instead.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -3,8 +3,11 @@
* Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
var bootstrap = (function (exports,$,Popper) {
'use strict';
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) :
typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) :
(factory((global.bootstrap = {}),global.jQuery,global.Popper));
}(this, (function (exports,$,Popper) { 'use strict';
$ = $ && $.hasOwnProperty('default') ? $['default'] : $;
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
......@@ -25,6 +28,24 @@ function _createClass(Constructor, protoProps, staticProps) {
return Constructor;
}
function _extends() {
_extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
......@@ -45,12 +66,7 @@ var Util = function ($$$1) {
* ------------------------------------------------------------------------
*/
var transition = false;
var MAX_UID = 1000000;
var TransitionEndEvent = {
WebkitTransition: 'webkitTransitionEnd',
transition: 'transitionend' // shoutout AngusCroll (https://goo.gl/pxwQGp)
};
var MAX_UID = 1000000; // shoutout AngusCroll (https://goo.gl/pxwQGp)
function toType(obj) {
return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
......@@ -75,17 +91,9 @@ var Util = function ($$$1) {
return false;
}
var el = document.createElement('bootstrap');
for (var name in TransitionEndEvent) {
if (typeof el.style[name] !== 'undefined') {
return {
end: TransitionEndEvent[name]
};
}
}
return false;
return {
end: 'transitionend'
};
}
function transitionEndEmulator(duration) {
......@@ -715,7 +723,7 @@ var Carousel = function ($$$1) {
_proto._getConfig = function _getConfig(config) {
config = $$$1.extend({}, Default, config);
config = _extends({}, Default, config);
Util.typeCheckConfig(NAME, config, DefaultType);
return config;
};
......@@ -917,10 +925,10 @@ var Carousel = function ($$$1) {
return this.each(function () {
var data = $$$1(this).data(DATA_KEY);
var _config = $$$1.extend({}, Default, $$$1(this).data());
var _config = _extends({}, Default, $$$1(this).data());
if (typeof config === 'object') {
$$$1.extend(_config, config);
_config = _extends({}, _config, config);
}
var action = typeof config === 'string' ? config : _config.slide;
......@@ -958,7 +966,7 @@ var Carousel = function ($$$1) {
return;
}
var config = $$$1.extend({}, $$$1(target).data(), $$$1(this).data());
var config = _extends({}, $$$1(target).data(), $$$1(this).data());
var slideIndex = this.getAttribute('data-slide-to');
if (slideIndex) {
......@@ -1257,7 +1265,7 @@ var Collapse = function ($$$1) {
_proto._getConfig = function _getConfig(config) {
config = $$$1.extend({}, Default, config);
config = _extends({}, Default, config);
config.toggle = Boolean(config.toggle); // coerce string values
Util.typeCheckConfig(NAME, config, DefaultType);
......@@ -1312,7 +1320,7 @@ var Collapse = function ($$$1) {
var $this = $$$1(this);
var data = $this.data(DATA_KEY);
var _config = $$$1.extend({}, Default, $this.data(), typeof config === 'object' && config);
var _config = _extends({}, Default, $this.data(), typeof config === 'object' && config);
if (!data && _config.toggle && /show|hide/.test(config)) {
_config.toggle = false;
......@@ -1435,7 +1443,8 @@ var Dropdown = function ($$$1) {
DROPRIGHT: 'dropright',
DROPLEFT: 'dropleft',
MENURIGHT: 'dropdown-menu-right',
MENULEFT: 'dropdown-menu-left'
MENULEFT: 'dropdown-menu-left',
POSITION_STATIC: 'position-static'
};
var Selector = {
DATA_TOGGLE: '[data-toggle="dropdown"]',
......@@ -1456,11 +1465,13 @@ var Dropdown = function ($$$1) {
};
var Default = {
offset: 0,
flip: true
flip: true,
boundary: 'scrollParent'
};
var DefaultType = {
offset: '(number|string|function)',
flip: 'boolean'
flip: 'boolean',
boundary: '(string|element)'
/**
* ------------------------------------------------------------------------
* Class Definition
......@@ -1527,6 +1538,13 @@ var Dropdown = function ($$$1) {
if ($$$1(this._menu).hasClass(ClassName.MENULEFT) || $$$1(this._menu).hasClass(ClassName.MENURIGHT)) {
element = parent;
}
} // If boundary is not `scrollParent`, then set position to `static`
// to allow the menu to "escape" the scroll parent's boundaries
// https://github.com/twbs/bootstrap/issues/24251
if (this._config.boundary !== 'scrollParent') {
$$$1(parent).addClass(ClassName.POSITION_STATIC);
}
this._popper = new Popper(element, this._menu, this._getPopperConfig());
......@@ -1582,7 +1600,7 @@ var Dropdown = function ($$$1) {
};
_proto._getConfig = function _getConfig(config) {
config = $$$1.extend({}, this.constructor.Default, $$$1(this._element).data(), config);
config = _extends({}, this.constructor.Default, $$$1(this._element).data(), config);
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
return config;
};
......@@ -1629,7 +1647,7 @@ var Dropdown = function ($$$1) {
if (typeof this._config.offset === 'function') {
offsetConf.fn = function (data) {
data.offsets = $$$1.extend({}, data.offsets, _this2._config.offset(data.offsets) || {});
data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets) || {});
return data;
};
} else {
......@@ -1642,6 +1660,9 @@ var Dropdown = function ($$$1) {
offset: offsetConf,
flip: {
enabled: this._config.flip
},
preventOverflow: {
boundariesElement: this._config.boundary
}
}
};
......@@ -2042,7 +2063,7 @@ var Modal = function ($$$1) {
_proto._getConfig = function _getConfig(config) {
config = $$$1.extend({}, Default, config);
config = _extends({}, Default, config);
Util.typeCheckConfig(NAME, config, DefaultType);
return config;
};
......@@ -2326,7 +2347,7 @@ var Modal = function ($$$1) {
return this.each(function () {
var data = $$$1(this).data(DATA_KEY);
var _config = $$$1.extend({}, Modal.Default, $$$1(this).data(), typeof config === 'object' && config);
var _config = _extends({}, Modal.Default, $$$1(this).data(), typeof config === 'object' && config);
if (!data) {
data = new Modal(this, _config);
......@@ -2375,7 +2396,7 @@ var Modal = function ($$$1) {
target = $$$1(selector)[0];
}
var config = $$$1(target).data(DATA_KEY) ? 'toggle' : $$$1.extend({}, $$$1(target).data(), $$$1(this).data());
var config = $$$1(target).data(DATA_KEY) ? 'toggle' : _extends({}, $$$1(target).data(), $$$1(this).data());
if (this.tagName === 'A' || this.tagName === 'AREA') {
event.preventDefault();
......@@ -2445,7 +2466,8 @@ var Tooltip = function ($$$1) {
placement: '(string|function)',
offset: '(number|string)',
container: '(string|element|boolean)',
fallbackPlacement: '(string|array)'
fallbackPlacement: '(string|array)',
boundary: '(string|element)'
};
var AttachmentMap = {
AUTO: 'auto',
......@@ -2465,7 +2487,8 @@ var Tooltip = function ($$$1) {
placement: 'top',
offset: 0,
container: false,
fallbackPlacement: 'flip'
fallbackPlacement: 'flip',
boundary: 'scrollParent'
};
var HoverState = {
SHOW: 'show',
......@@ -2655,6 +2678,9 @@ var Tooltip = function ($$$1) {
},
arrow: {
element: Selector.ARROW
},
preventOverflow: {
boundariesElement: this.config.boundary
}
},
onCreate: function onCreate(data) {
......@@ -2832,7 +2858,7 @@ var Tooltip = function ($$$1) {
});
if (this.config.selector) {
this.config = $$$1.extend({}, this.config, {
this.config = _extends({}, this.config, {
trigger: 'manual',
selector: ''
});
......@@ -2926,7 +2952,7 @@ var Tooltip = function ($$$1) {
};
_proto._getConfig = function _getConfig(config) {
config = $$$1.extend({}, this.constructor.Default, $$$1(this.element).data(), config);
config = _extends({}, this.constructor.Default, $$$1(this.element).data(), config);
if (typeof config.delay === 'number') {
config.delay = {
......@@ -3093,13 +3119,13 @@ var Popover = function ($$$1) {
var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
var CLASS_PREFIX = 'bs-popover';
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
var Default = $$$1.extend({}, Tooltip.Default, {
var Default = _extends({}, Tooltip.Default, {
placement: 'right',
trigger: 'click',
content: '',
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
});
var DefaultType = $$$1.extend({}, Tooltip.DefaultType, {
var DefaultType = _extends({}, Tooltip.DefaultType, {
content: '(string|element|function)'
});
var ClassName = {
......@@ -3407,7 +3433,7 @@ var ScrollSpy = function ($$$1) {
_proto._getConfig = function _getConfig(config) {
config = $$$1.extend({}, Default, config);
config = _extends({}, Default, config);
if (typeof config.target !== 'string') {
var id = $$$1(config.target).attr('id');
......@@ -3718,7 +3744,7 @@ var Tab = function ($$$1) {
var isTransitioning = callback && Util.supportsTransitionEnd() && active && $$$1(active).hasClass(ClassName.FADE);
var complete = function complete() {
return _this2._transitionComplete(element, active, isTransitioning, callback);
return _this2._transitionComplete(element, active, callback);
};
if (active && isTransitioning) {
......@@ -3726,15 +3752,11 @@ var Tab = function ($$$1) {
} else {
complete();
}
if (active) {
$$$1(active).removeClass(ClassName.SHOW);
}
};
_proto._transitionComplete = function _transitionComplete(element, active, isTransitioning, callback) {
_proto._transitionComplete = function _transitionComplete(element, active, callback) {
if (active) {
$$$1(active).removeClass(ClassName.ACTIVE);
$$$1(active).removeClass(ClassName.SHOW + " " + ClassName.ACTIVE);
var dropdownChild = $$$1(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
if (dropdownChild) {
......@@ -3752,12 +3774,8 @@ var Tab = function ($$$1) {
element.setAttribute('aria-selected', true);
}
if (isTransitioning) {
Util.reflow(element);
$$$1(element).addClass(ClassName.SHOW);
} else {
$$$1(element).removeClass(ClassName.FADE);
}
Util.reflow(element);
$$$1(element).addClass(ClassName.SHOW);
if (element.parentNode && $$$1(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
var dropdownElement = $$$1(element).closest(Selector.DROPDOWN)[0];
......@@ -3868,7 +3886,7 @@ exports.Scrollspy = ScrollSpy;
exports.Tab = Tab;
exports.Tooltip = Tooltip;
return exports;
Object.defineProperty(exports, '__esModule', { value: true });
}({},jQuery,Popper));
})));
//# sourceMappingURL=bootstrap.js.map
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
......@@ -197,7 +199,7 @@ var Carousel = function ($) {
_proto._getConfig = function _getConfig(config) {
config = $.extend({}, Default, config);
config = _extends({}, Default, config);
Util.typeCheckConfig(NAME, config, DefaultType);
return config;
};
......@@ -399,10 +401,10 @@ var Carousel = function ($) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var _config = $.extend({}, Default, $(this).data());
var _config = _extends({}, Default, $(this).data());
if (typeof config === 'object') {
$.extend(_config, config);
_config = _extends({}, _config, config);
}
var action = typeof config === 'string' ? config : _config.slide;
......@@ -440,7 +442,8 @@ var Carousel = function ($) {
return;
}
var config = $.extend({}, $(target).data(), $(this).data());
var config = _extends({}, $(target).data(), $(this).data());
var slideIndex = this.getAttribute('data-slide-to');
if (slideIndex) {
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
......@@ -239,7 +241,7 @@ var Collapse = function ($) {
_proto._getConfig = function _getConfig(config) {
config = $.extend({}, Default, config);
config = _extends({}, Default, config);
config.toggle = Boolean(config.toggle); // coerce string values
Util.typeCheckConfig(NAME, config, DefaultType);
......@@ -294,7 +296,7 @@ var Collapse = function ($) {
var $this = $(this);
var data = $this.data(DATA_KEY);
var _config = $.extend({}, Default, $this.data(), typeof config === 'object' && config);
var _config = _extends({}, Default, $this.data(), typeof config === 'object' && config);
if (!data && _config.toggle && /show|hide/.test(config)) {
_config.toggle = false;
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
......@@ -50,7 +52,8 @@ var Dropdown = function ($) {
DROPRIGHT: 'dropright',
DROPLEFT: 'dropleft',
MENURIGHT: 'dropdown-menu-right',
MENULEFT: 'dropdown-menu-left'
MENULEFT: 'dropdown-menu-left',
POSITION_STATIC: 'position-static'
};
var Selector = {
DATA_TOGGLE: '[data-toggle="dropdown"]',
......@@ -71,11 +74,13 @@ var Dropdown = function ($) {
};
var Default = {
offset: 0,
flip: true
flip: true,
boundary: 'scrollParent'
};
var DefaultType = {
offset: '(number|string|function)',
flip: 'boolean'
flip: 'boolean',
boundary: '(string|element)'
/**
* ------------------------------------------------------------------------
* Class Definition
......@@ -142,6 +147,13 @@ var Dropdown = function ($) {
if ($(this._menu).hasClass(ClassName.MENULEFT) || $(this._menu).hasClass(ClassName.MENURIGHT)) {
element = parent;
}
} // If boundary is not `scrollParent`, then set position to `static`
// to allow the menu to "escape" the scroll parent's boundaries
// https://github.com/twbs/bootstrap/issues/24251
if (this._config.boundary !== 'scrollParent') {
$(parent).addClass(ClassName.POSITION_STATIC);
}
this._popper = new Popper(element, this._menu, this._getPopperConfig());
......@@ -197,7 +209,7 @@ var Dropdown = function ($) {
};
_proto._getConfig = function _getConfig(config) {
config = $.extend({}, this.constructor.Default, $(this._element).data(), config);
config = _extends({}, this.constructor.Default, $(this._element).data(), config);
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
return config;
};
......@@ -244,7 +256,7 @@ var Dropdown = function ($) {
if (typeof this._config.offset === 'function') {
offsetConf.fn = function (data) {
data.offsets = $.extend({}, data.offsets, _this2._config.offset(data.offsets) || {});
data.offsets = _extends({}, data.offsets, _this2._config.offset(data.offsets) || {});
return data;
};
} else {
......@@ -257,6 +269,9 @@ var Dropdown = function ($) {
offset: offsetConf,
flip: {
enabled: this._config.flip
},
preventOverflow: {
boundariesElement: this._config.boundary
}
}
};
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
......@@ -206,7 +208,7 @@ var Modal = function ($) {
_proto._getConfig = function _getConfig(config) {
config = $.extend({}, Default, config);
config = _extends({}, Default, config);
Util.typeCheckConfig(NAME, config, DefaultType);
return config;
};
......@@ -490,7 +492,7 @@ var Modal = function ($) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var _config = $.extend({}, Modal.Default, $(this).data(), typeof config === 'object' && config);
var _config = _extends({}, Modal.Default, $(this).data(), typeof config === 'object' && config);
if (!data) {
data = new Modal(this, _config);
......@@ -540,7 +542,7 @@ var Modal = function ($) {
target = $(selector)[0];
}
var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(this).data());
var config = $(target).data(DATA_KEY) ? 'toggle' : _extends({}, $(target).data(), $(this).data());
if (this.tagName === 'A' || this.tagName === 'AREA') {
event.preventDefault();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment