Commit 2a745e54 authored by Mark Otto's avatar Mark Otto
Browse files

npm build

parent a662f853
Showing with 83 additions and 95 deletions
+83 -95
...@@ -8173,7 +8173,7 @@ a.text-dark:focus, a.text-dark:hover { ...@@ -8173,7 +8173,7 @@ a.text-dark:focus, a.text-dark:hover {
} }
.text-muted { .text-muted {
color: #ced4da !important; color: #868e96 !important;
} }
.text-hide { .text-hide {
......
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.
...@@ -1625,8 +1625,6 @@ var Dropdown = function ($) { ...@@ -1625,8 +1625,6 @@ var Dropdown = function ($) {
}; };
Dropdown.prototype._getPopperConfig = function _getPopperConfig() { Dropdown.prototype._getPopperConfig = function _getPopperConfig() {
var _this10 = this;
var popperConfig = { var popperConfig = {
placement: this._getPlacement(), placement: this._getPlacement(),
modifiers: { modifiers: {
...@@ -1639,14 +1637,10 @@ var Dropdown = function ($) { ...@@ -1639,14 +1637,10 @@ var Dropdown = function ($) {
} }
}; };
// Disable Popper.js for Dropdown in Navbar
if (this._inNavbar) { if (this._inNavbar) {
popperConfig.modifiers.AfterApplyStyle = { popperConfig.modifiers.applyStyle = {
enabled: true, enabled: !this._inNavbar
order: 901, // ApplyStyle order + 1
fn: function fn() {
// reset Popper styles
$(_this10._menu).attr('style', '');
}
}; };
} }
return popperConfig; return popperConfig;
...@@ -1929,7 +1923,7 @@ var Modal = function ($) { ...@@ -1929,7 +1923,7 @@ var Modal = function ($) {
}; };
Modal.prototype.show = function show(relatedTarget) { Modal.prototype.show = function show(relatedTarget) {
var _this11 = this; var _this10 = this;
if (this._isTransitioning) { if (this._isTransitioning) {
return; return;
...@@ -1960,24 +1954,24 @@ var Modal = function ($) { ...@@ -1960,24 +1954,24 @@ var Modal = function ($) {
this._setResizeEvent(); this._setResizeEvent();
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) { $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
return _this11.hide(event); return _this10.hide(event);
}); });
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () { $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
$(_this11._element).one(Event.MOUSEUP_DISMISS, function (event) { $(_this10._element).one(Event.MOUSEUP_DISMISS, function (event) {
if ($(event.target).is(_this11._element)) { if ($(event.target).is(_this10._element)) {
_this11._ignoreBackdropClick = true; _this10._ignoreBackdropClick = true;
} }
}); });
}); });
this._showBackdrop(function () { this._showBackdrop(function () {
return _this11._showElement(relatedTarget); return _this10._showElement(relatedTarget);
}); });
}; };
Modal.prototype.hide = function hide(event) { Modal.prototype.hide = function hide(event) {
var _this12 = this; var _this11 = this;
if (event) { if (event) {
event.preventDefault(); event.preventDefault();
...@@ -2016,7 +2010,7 @@ var Modal = function ($) { ...@@ -2016,7 +2010,7 @@ var Modal = function ($) {
if (transition) { if (transition) {
$(this._element).one(Util.TRANSITION_END, function (event) { $(this._element).one(Util.TRANSITION_END, function (event) {
return _this12._hideModal(event); return _this11._hideModal(event);
}).emulateTransitionEnd(TRANSITION_DURATION); }).emulateTransitionEnd(TRANSITION_DURATION);
} else { } else {
this._hideModal(); this._hideModal();
...@@ -2051,7 +2045,7 @@ var Modal = function ($) { ...@@ -2051,7 +2045,7 @@ var Modal = function ($) {
}; };
Modal.prototype._showElement = function _showElement(relatedTarget) { Modal.prototype._showElement = function _showElement(relatedTarget) {
var _this13 = this; var _this12 = this;
var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE); var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
...@@ -2079,11 +2073,11 @@ var Modal = function ($) { ...@@ -2079,11 +2073,11 @@ var Modal = function ($) {
}); });
var transitionComplete = function transitionComplete() { var transitionComplete = function transitionComplete() {
if (_this13._config.focus) { if (_this12._config.focus) {
_this13._element.focus(); _this12._element.focus();
} }
_this13._isTransitioning = false; _this12._isTransitioning = false;
$(_this13._element).trigger(shownEvent); $(_this12._element).trigger(shownEvent);
}; };
if (transition) { if (transition) {
...@@ -2094,24 +2088,24 @@ var Modal = function ($) { ...@@ -2094,24 +2088,24 @@ var Modal = function ($) {
}; };
Modal.prototype._enforceFocus = function _enforceFocus() { Modal.prototype._enforceFocus = function _enforceFocus() {
var _this14 = this; var _this13 = this;
$(document).off(Event.FOCUSIN) // guard against infinite focus loop $(document).off(Event.FOCUSIN) // guard against infinite focus loop
.on(Event.FOCUSIN, function (event) { .on(Event.FOCUSIN, function (event) {
if (document !== event.target && _this14._element !== event.target && !$(_this14._element).has(event.target).length) { if (document !== event.target && _this13._element !== event.target && !$(_this13._element).has(event.target).length) {
_this14._element.focus(); _this13._element.focus();
} }
}); });
}; };
Modal.prototype._setEscapeEvent = function _setEscapeEvent() { Modal.prototype._setEscapeEvent = function _setEscapeEvent() {
var _this15 = this; var _this14 = this;
if (this._isShown && this._config.keyboard) { if (this._isShown && this._config.keyboard) {
$(this._element).on(Event.KEYDOWN_DISMISS, function (event) { $(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
if (event.which === ESCAPE_KEYCODE) { if (event.which === ESCAPE_KEYCODE) {
event.preventDefault(); event.preventDefault();
_this15.hide(); _this14.hide();
} }
}); });
} else if (!this._isShown) { } else if (!this._isShown) {
...@@ -2120,11 +2114,11 @@ var Modal = function ($) { ...@@ -2120,11 +2114,11 @@ var Modal = function ($) {
}; };
Modal.prototype._setResizeEvent = function _setResizeEvent() { Modal.prototype._setResizeEvent = function _setResizeEvent() {
var _this16 = this; var _this15 = this;
if (this._isShown) { if (this._isShown) {
$(window).on(Event.RESIZE, function (event) { $(window).on(Event.RESIZE, function (event) {
return _this16.handleUpdate(event); return _this15.handleUpdate(event);
}); });
} else { } else {
$(window).off(Event.RESIZE); $(window).off(Event.RESIZE);
...@@ -2132,16 +2126,16 @@ var Modal = function ($) { ...@@ -2132,16 +2126,16 @@ var Modal = function ($) {
}; };
Modal.prototype._hideModal = function _hideModal() { Modal.prototype._hideModal = function _hideModal() {
var _this17 = this; var _this16 = this;
this._element.style.display = 'none'; this._element.style.display = 'none';
this._element.setAttribute('aria-hidden', true); this._element.setAttribute('aria-hidden', true);
this._isTransitioning = false; this._isTransitioning = false;
this._showBackdrop(function () { this._showBackdrop(function () {
$(document.body).removeClass(ClassName.OPEN); $(document.body).removeClass(ClassName.OPEN);
_this17._resetAdjustments(); _this16._resetAdjustments();
_this17._resetScrollbar(); _this16._resetScrollbar();
$(_this17._element).trigger(Event.HIDDEN); $(_this16._element).trigger(Event.HIDDEN);
}); });
}; };
...@@ -2153,7 +2147,7 @@ var Modal = function ($) { ...@@ -2153,7 +2147,7 @@ var Modal = function ($) {
}; };
Modal.prototype._showBackdrop = function _showBackdrop(callback) { Modal.prototype._showBackdrop = function _showBackdrop(callback) {
var _this18 = this; var _this17 = this;
var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : ''; var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
...@@ -2170,17 +2164,17 @@ var Modal = function ($) { ...@@ -2170,17 +2164,17 @@ var Modal = function ($) {
$(this._backdrop).appendTo(document.body); $(this._backdrop).appendTo(document.body);
$(this._element).on(Event.CLICK_DISMISS, function (event) { $(this._element).on(Event.CLICK_DISMISS, function (event) {
if (_this18._ignoreBackdropClick) { if (_this17._ignoreBackdropClick) {
_this18._ignoreBackdropClick = false; _this17._ignoreBackdropClick = false;
return; return;
} }
if (event.target !== event.currentTarget) { if (event.target !== event.currentTarget) {
return; return;
} }
if (_this18._config.backdrop === 'static') { if (_this17._config.backdrop === 'static') {
_this18._element.focus(); _this17._element.focus();
} else { } else {
_this18.hide(); _this17.hide();
} }
}); });
...@@ -2204,7 +2198,7 @@ var Modal = function ($) { ...@@ -2204,7 +2198,7 @@ var Modal = function ($) {
$(this._backdrop).removeClass(ClassName.SHOW); $(this._backdrop).removeClass(ClassName.SHOW);
var callbackRemove = function callbackRemove() { var callbackRemove = function callbackRemove() {
_this18._removeBackdrop(); _this17._removeBackdrop();
if (callback) { if (callback) {
callback(); callback();
} }
...@@ -2248,7 +2242,7 @@ var Modal = function ($) { ...@@ -2248,7 +2242,7 @@ var Modal = function ($) {
}; };
Modal.prototype._setScrollbar = function _setScrollbar() { Modal.prototype._setScrollbar = function _setScrollbar() {
var _this19 = this; var _this18 = this;
if (this._isBodyOverflowing) { if (this._isBodyOverflowing) {
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
...@@ -2258,14 +2252,14 @@ var Modal = function ($) { ...@@ -2258,14 +2252,14 @@ var Modal = function ($) {
$(Selector.FIXED_CONTENT).each(function (index, element) { $(Selector.FIXED_CONTENT).each(function (index, element) {
var actualPadding = $(element)[0].style.paddingRight; var actualPadding = $(element)[0].style.paddingRight;
var calculatedPadding = $(element).css('padding-right'); var calculatedPadding = $(element).css('padding-right');
$(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this19._scrollbarWidth + 'px'); $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this18._scrollbarWidth + 'px');
}); });
// Adjust navbar-toggler margin // Adjust navbar-toggler margin
$(Selector.NAVBAR_TOGGLER).each(function (index, element) { $(Selector.NAVBAR_TOGGLER).each(function (index, element) {
var actualMargin = $(element)[0].style.marginRight; var actualMargin = $(element)[0].style.marginRight;
var calculatedMargin = $(element).css('margin-right'); var calculatedMargin = $(element).css('margin-right');
$(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this19._scrollbarWidth + 'px'); $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this18._scrollbarWidth + 'px');
}); });
// Adjust body padding // Adjust body padding
...@@ -2354,7 +2348,7 @@ var Modal = function ($) { ...@@ -2354,7 +2348,7 @@ var Modal = function ($) {
*/ */
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
var _this20 = this; var _this19 = this;
var target = void 0; var target = void 0;
var selector = Util.getSelectorFromElement(this); var selector = Util.getSelectorFromElement(this);
...@@ -2376,8 +2370,8 @@ var Modal = function ($) { ...@@ -2376,8 +2370,8 @@ var Modal = function ($) {
} }
$target.one(Event.HIDDEN, function () { $target.one(Event.HIDDEN, function () {
if ($(_this20).is(':visible')) { if ($(_this19).is(':visible')) {
_this20.focus(); _this19.focus();
} }
}); });
}); });
...@@ -2471,7 +2465,7 @@ var ScrollSpy = function ($) { ...@@ -2471,7 +2465,7 @@ var ScrollSpy = function ($) {
var ScrollSpy = function () { var ScrollSpy = function () {
function ScrollSpy(element, config) { function ScrollSpy(element, config) {
var _this21 = this; var _this20 = this;
_classCallCheck(this, ScrollSpy); _classCallCheck(this, ScrollSpy);
...@@ -2485,7 +2479,7 @@ var ScrollSpy = function ($) { ...@@ -2485,7 +2479,7 @@ var ScrollSpy = function ($) {
this._scrollHeight = 0; this._scrollHeight = 0;
$(this._scrollElement).on(Event.SCROLL, function (event) { $(this._scrollElement).on(Event.SCROLL, function (event) {
return _this21._process(event); return _this20._process(event);
}); });
this.refresh(); this.refresh();
...@@ -2497,7 +2491,7 @@ var ScrollSpy = function ($) { ...@@ -2497,7 +2491,7 @@ var ScrollSpy = function ($) {
// public // public
ScrollSpy.prototype.refresh = function refresh() { ScrollSpy.prototype.refresh = function refresh() {
var _this22 = this; var _this21 = this;
var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET; var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET;
...@@ -2533,8 +2527,8 @@ var ScrollSpy = function ($) { ...@@ -2533,8 +2527,8 @@ var ScrollSpy = function ($) {
}).sort(function (a, b) { }).sort(function (a, b) {
return a[0] - b[0]; return a[0] - b[0];
}).forEach(function (item) { }).forEach(function (item) {
_this22._offsets.push(item[0]); _this21._offsets.push(item[0]);
_this22._targets.push(item[1]); _this21._targets.push(item[1]);
}); });
}; };
...@@ -2781,7 +2775,7 @@ var Tab = function ($) { ...@@ -2781,7 +2775,7 @@ var Tab = function ($) {
// public // public
Tab.prototype.show = function show() { Tab.prototype.show = function show() {
var _this23 = this; var _this22 = this;
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE) || $(this._element).hasClass(ClassName.DISABLED)) { if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE) || $(this._element).hasClass(ClassName.DISABLED)) {
return; return;
...@@ -2823,7 +2817,7 @@ var Tab = function ($) { ...@@ -2823,7 +2817,7 @@ var Tab = function ($) {
var complete = function complete() { var complete = function complete() {
var hiddenEvent = $.Event(Event.HIDDEN, { var hiddenEvent = $.Event(Event.HIDDEN, {
relatedTarget: _this23._element relatedTarget: _this22._element
}); });
var shownEvent = $.Event(Event.SHOWN, { var shownEvent = $.Event(Event.SHOWN, {
...@@ -2831,7 +2825,7 @@ var Tab = function ($) { ...@@ -2831,7 +2825,7 @@ var Tab = function ($) {
}); });
$(previous).trigger(hiddenEvent); $(previous).trigger(hiddenEvent);
$(_this23._element).trigger(shownEvent); $(_this22._element).trigger(shownEvent);
}; };
if (target) { if (target) {
...@@ -2849,13 +2843,13 @@ var Tab = function ($) { ...@@ -2849,13 +2843,13 @@ var Tab = function ($) {
// private // private
Tab.prototype._activate = function _activate(element, container, callback) { Tab.prototype._activate = function _activate(element, container, callback) {
var _this24 = this; var _this23 = this;
var active = $(container).find(Selector.ACTIVE)[0]; var active = $(container).find(Selector.ACTIVE)[0];
var isTransitioning = callback && Util.supportsTransitionEnd() && active && $(active).hasClass(ClassName.FADE); var isTransitioning = callback && Util.supportsTransitionEnd() && active && $(active).hasClass(ClassName.FADE);
var complete = function complete() { var complete = function complete() {
return _this24._transitionComplete(element, active, isTransitioning, callback); return _this23._transitionComplete(element, active, isTransitioning, callback);
}; };
if (active && isTransitioning) { if (active && isTransitioning) {
...@@ -3167,7 +3161,7 @@ var Tooltip = function ($) { ...@@ -3167,7 +3161,7 @@ var Tooltip = function ($) {
}; };
Tooltip.prototype.show = function show() { Tooltip.prototype.show = function show() {
var _this25 = this; var _this24 = this;
if ($(this.element).css('display') === 'none') { if ($(this.element).css('display') === 'none') {
throw new Error('Please use show on visible elements'); throw new Error('Please use show on visible elements');
...@@ -3225,11 +3219,11 @@ var Tooltip = function ($) { ...@@ -3225,11 +3219,11 @@ var Tooltip = function ($) {
}, },
onCreate: function onCreate(data) { onCreate: function onCreate(data) {
if (data.originalPlacement !== data.placement) { if (data.originalPlacement !== data.placement) {
_this25._handlePopperPlacementChange(data); _this24._handlePopperPlacementChange(data);
} }
}, },
onUpdate: function onUpdate(data) { onUpdate: function onUpdate(data) {
_this25._handlePopperPlacementChange(data); _this24._handlePopperPlacementChange(data);
} }
}); });
...@@ -3244,16 +3238,16 @@ var Tooltip = function ($) { ...@@ -3244,16 +3238,16 @@ var Tooltip = function ($) {
} }
var complete = function complete() { var complete = function complete() {
if (_this25.config.animation) { if (_this24.config.animation) {
_this25._fixTransition(); _this24._fixTransition();
} }
var prevHoverState = _this25._hoverState; var prevHoverState = _this24._hoverState;
_this25._hoverState = null; _this24._hoverState = null;
$(_this25.element).trigger(_this25.constructor.Event.SHOWN); $(_this24.element).trigger(_this24.constructor.Event.SHOWN);
if (prevHoverState === HoverState.OUT) { if (prevHoverState === HoverState.OUT) {
_this25._leave(null, _this25); _this24._leave(null, _this24);
} }
}; };
...@@ -3266,20 +3260,20 @@ var Tooltip = function ($) { ...@@ -3266,20 +3260,20 @@ var Tooltip = function ($) {
}; };
Tooltip.prototype.hide = function hide(callback) { Tooltip.prototype.hide = function hide(callback) {
var _this26 = this; var _this25 = this;
var tip = this.getTipElement(); var tip = this.getTipElement();
var hideEvent = $.Event(this.constructor.Event.HIDE); var hideEvent = $.Event(this.constructor.Event.HIDE);
var complete = function complete() { var complete = function complete() {
if (_this26._hoverState !== HoverState.SHOW && tip.parentNode) { if (_this25._hoverState !== HoverState.SHOW && tip.parentNode) {
tip.parentNode.removeChild(tip); tip.parentNode.removeChild(tip);
} }
_this26._cleanTipClass(); _this25._cleanTipClass();
_this26.element.removeAttribute('aria-describedby'); _this25.element.removeAttribute('aria-describedby');
$(_this26.element).trigger(_this26.constructor.Event.HIDDEN); $(_this25.element).trigger(_this25.constructor.Event.HIDDEN);
if (_this26._popper !== null) { if (_this25._popper !== null) {
_this26._popper.destroy(); _this25._popper.destroy();
} }
if (callback) { if (callback) {
...@@ -3374,28 +3368,28 @@ var Tooltip = function ($) { ...@@ -3374,28 +3368,28 @@ var Tooltip = function ($) {
}; };
Tooltip.prototype._setListeners = function _setListeners() { Tooltip.prototype._setListeners = function _setListeners() {
var _this27 = this; var _this26 = this;
var triggers = this.config.trigger.split(' '); var triggers = this.config.trigger.split(' ');
triggers.forEach(function (trigger) { triggers.forEach(function (trigger) {
if (trigger === 'click') { if (trigger === 'click') {
$(_this27.element).on(_this27.constructor.Event.CLICK, _this27.config.selector, function (event) { $(_this26.element).on(_this26.constructor.Event.CLICK, _this26.config.selector, function (event) {
return _this27.toggle(event); return _this26.toggle(event);
}); });
} else if (trigger !== Trigger.MANUAL) { } else if (trigger !== Trigger.MANUAL) {
var eventIn = trigger === Trigger.HOVER ? _this27.constructor.Event.MOUSEENTER : _this27.constructor.Event.FOCUSIN; var eventIn = trigger === Trigger.HOVER ? _this26.constructor.Event.MOUSEENTER : _this26.constructor.Event.FOCUSIN;
var eventOut = trigger === Trigger.HOVER ? _this27.constructor.Event.MOUSELEAVE : _this27.constructor.Event.FOCUSOUT; var eventOut = trigger === Trigger.HOVER ? _this26.constructor.Event.MOUSELEAVE : _this26.constructor.Event.FOCUSOUT;
$(_this27.element).on(eventIn, _this27.config.selector, function (event) { $(_this26.element).on(eventIn, _this26.config.selector, function (event) {
return _this27._enter(event); return _this26._enter(event);
}).on(eventOut, _this27.config.selector, function (event) { }).on(eventOut, _this26.config.selector, function (event) {
return _this27._leave(event); return _this26._leave(event);
}); });
} }
$(_this27.element).closest('.modal').on('hide.bs.modal', function () { $(_this26.element).closest('.modal').on('hide.bs.modal', function () {
return _this27.hide(); return _this26.hide();
}); });
}); });
......
This diff is collapsed.
...@@ -231,8 +231,6 @@ var Dropdown = function ($) { ...@@ -231,8 +231,6 @@ var Dropdown = function ($) {
}; };
Dropdown.prototype._getPopperConfig = function _getPopperConfig() { Dropdown.prototype._getPopperConfig = function _getPopperConfig() {
var _this2 = this;
var popperConfig = { var popperConfig = {
placement: this._getPlacement(), placement: this._getPlacement(),
modifiers: { modifiers: {
...@@ -245,14 +243,10 @@ var Dropdown = function ($) { ...@@ -245,14 +243,10 @@ var Dropdown = function ($) {
} }
}; };
// Disable Popper.js for Dropdown in Navbar
if (this._inNavbar) { if (this._inNavbar) {
popperConfig.modifiers.AfterApplyStyle = { popperConfig.modifiers.applyStyle = {
enabled: true, enabled: !this._inNavbar
order: 901, // ApplyStyle order + 1
fn: function fn() {
// reset Popper styles
$(_this2._menu).attr('style', '');
}
}; };
} }
return popperConfig; return popperConfig;
......
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
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