From ca73e39f041a1ce93fb925a22cdea54538b6ec88 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Thu, 18 Jan 2018 14:28:19 -0800 Subject: [PATCH 1/6] Upgrade bootstrap to 4.0.0 --- .../javascripts/solidus_admin/bootstrap.js | 1257 +++++++++-------- .../solidus_admin/bootstrap/_alert.scss | 4 +- .../bootstrap/_button-group.scss | 103 +- .../solidus_admin/bootstrap/_buttons.scss | 45 +- .../solidus_admin/bootstrap/_card.scss | 35 +- .../solidus_admin/bootstrap/_carousel.scss | 4 +- .../solidus_admin/bootstrap/_close.scss | 7 +- .../solidus_admin/bootstrap/_code.scss | 16 +- .../bootstrap/_custom-forms.scss | 208 +-- .../solidus_admin/bootstrap/_dropdown.scss | 32 +- .../solidus_admin/bootstrap/_forms.scss | 117 +- .../solidus_admin/bootstrap/_functions.scss | 8 +- .../solidus_admin/bootstrap/_images.scss | 1 - .../solidus_admin/bootstrap/_input-group.scss | 225 ++- .../solidus_admin/bootstrap/_list-group.scss | 3 +- .../solidus_admin/bootstrap/_modal.scss | 33 +- .../solidus_admin/bootstrap/_nav.scss | 4 +- .../solidus_admin/bootstrap/_navbar.scss | 11 +- .../solidus_admin/bootstrap/_pagination.scss | 51 +- .../solidus_admin/bootstrap/_popover.scss | 223 ++- .../solidus_admin/bootstrap/_print.scss | 20 +- .../solidus_admin/bootstrap/_progress.scss | 5 +- .../solidus_admin/bootstrap/_reboot.scss | 28 +- .../solidus_admin/bootstrap/_tables.scss | 2 +- .../solidus_admin/bootstrap/_tooltip.scss | 122 +- .../solidus_admin/bootstrap/_type.scss | 4 +- .../solidus_admin/bootstrap/_variables.scss | 282 ++-- .../bootstrap/bootstrap-grid.scss | 11 +- .../bootstrap/bootstrap-reboot.scss | 6 +- .../solidus_admin/bootstrap/bootstrap.scss | 8 +- .../bootstrap/mixins/_background-variant.scss | 3 +- .../bootstrap/mixins/_breakpoints.scss | 18 +- .../bootstrap/mixins/_buttons.scss | 59 +- .../bootstrap/mixins/_caret.scss | 30 + .../bootstrap/mixins/_forms.scss | 67 +- .../bootstrap/mixins/_grid-framework.scss | 12 +- .../bootstrap/mixins/_hover.scss | 70 +- .../bootstrap/mixins/_list-group.scss | 23 +- .../bootstrap/mixins/_screen-reader.scss | 2 +- .../bootstrap/mixins/_text-hide.scss | 1 + .../bootstrap/utilities/_borders.scss | 7 +- .../bootstrap/utilities/_display.scss | 38 +- 42 files changed, 1684 insertions(+), 1521 deletions(-) diff --git a/backend/vendor/assets/javascripts/solidus_admin/bootstrap.js b/backend/vendor/assets/javascripts/solidus_admin/bootstrap.js index 630a9e01957..fd152b9c060 100644 --- a/backend/vendor/assets/javascripts/solidus_admin/bootstrap.js +++ b/backend/vendor/assets/javascripts/solidus_admin/bootstrap.js @@ -1,36 +1,72 @@ /*! - * Bootstrap v4.0.0-beta.2 (https://getbootstrap.com) - * Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap v4.0.0 (https://getbootstrap.com) + * Copyright 2011-2018 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; +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; +} + +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; + subClass.__proto__ = superClass; +} + /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.2): util.js + * Bootstrap (v4.0.0): util.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ -var Util = function () { +var Util = function ($$$1) { /** * ------------------------------------------------------------------------ * Private TransitionEnd Helpers * ------------------------------------------------------------------------ */ var transition = false; - var MAX_UID = 1000000; - var TransitionEndEvent = { - WebkitTransition: 'webkitTransitionEnd', - MozTransition: 'transitionend', - OTransition: 'oTransitionEnd otransitionend', - 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(); @@ -41,7 +77,7 @@ var Util = function () { bindType: transition.end, delegateType: transition.end, handle: function handle(event) { - if ($(event.target).is(this)) { + if ($$$1(event.target).is(this)) { return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params } @@ -51,28 +87,20 @@ var Util = function () { } function transitionEndTest() { - if (window.QUnit) { + if (typeof window !== 'undefined' && window.QUnit) { 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) { var _this = this; var called = false; - $(this).one(Util.TRANSITION_END, function () { + $$$1(this).one(Util.TRANSITION_END, function () { called = true; }); setTimeout(function () { @@ -85,12 +113,19 @@ var Util = function () { function setTransitionEndSupport() { transition = transitionEndTest(); - $.fn.emulateTransitionEnd = transitionEndEmulator; + $$$1.fn.emulateTransitionEnd = transitionEndEmulator; if (Util.supportsTransitionEnd()) { - $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); + $$$1.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); } } + + function escapeId(selector) { + // We escape IDs in case of special selectors (selector = '#myId:something') + // $.escapeSelector does not exist in jQuery < 3 + selector = typeof $$$1.escapeSelector === 'function' ? $$$1.escapeSelector(selector).substr(1) : selector.replace(/(:|\.|\[|\]|,|=|@)/g, '\\$1'); + return selector; + } /** * -------------------------------------------------------------------------- * Public Util Api @@ -113,12 +148,17 @@ var Util = function () { if (!selector || selector === '#') { selector = element.getAttribute('href') || ''; + } // If it's an ID + + + if (selector.charAt(0) === '#') { + selector = escapeId(selector); } try { - var $selector = $(document).find(selector); + var $selector = $$$1(document).find(selector); return $selector.length > 0 ? selector : null; - } catch (error) { + } catch (err) { return null; } }, @@ -126,7 +166,7 @@ var Util = function () { return element.offsetHeight; }, triggerTransitionEnd: function triggerTransitionEnd(element) { - $(element).trigger(transition.end); + $$$1(element).trigger(transition.end); }, supportsTransitionEnd: function supportsTransitionEnd() { return Boolean(transition); @@ -152,51 +192,25 @@ var Util = function () { return Util; }($); -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; -} - -var createClass = _createClass; - -function _inheritsLoose(subClass, superClass) { - subClass.prototype = Object.create(superClass.prototype); - subClass.prototype.constructor = subClass; - subClass.__proto__ = superClass; -} - -var inheritsLoose = _inheritsLoose; - /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.2): alert.js + * Bootstrap (v4.0.0): alert.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ -var Alert = function () { +var Alert = function ($$$1) { /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ var NAME = 'alert'; - var VERSION = '4.0.0-beta.2'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.alert'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; - var JQUERY_NO_CONFLICT = $.fn[NAME]; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; var TRANSITION_DURATION = 150; var Selector = { DISMISS: '[data-dismiss="alert"]' @@ -223,12 +237,12 @@ var Alert = function () { function () { function Alert(element) { this._element = element; - } // getters + } // Getters var _proto = Alert.prototype; - // public + // Public _proto.close = function close(element) { element = element || this._element; @@ -244,9 +258,9 @@ var Alert = function () { }; _proto.dispose = function dispose() { - $.removeData(this._element, DATA_KEY); + $$$1.removeData(this._element, DATA_KEY); this._element = null; - }; // private + }; // Private _proto._getRootElement = function _getRootElement(element) { @@ -254,46 +268,46 @@ var Alert = function () { var parent = false; if (selector) { - parent = $(selector)[0]; + parent = $$$1(selector)[0]; } if (!parent) { - parent = $(element).closest("." + ClassName.ALERT)[0]; + parent = $$$1(element).closest("." + ClassName.ALERT)[0]; } return parent; }; _proto._triggerCloseEvent = function _triggerCloseEvent(element) { - var closeEvent = $.Event(Event.CLOSE); - $(element).trigger(closeEvent); + var closeEvent = $$$1.Event(Event.CLOSE); + $$$1(element).trigger(closeEvent); return closeEvent; }; _proto._removeElement = function _removeElement(element) { var _this = this; - $(element).removeClass(ClassName.SHOW); + $$$1(element).removeClass(ClassName.SHOW); - if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) { + if (!Util.supportsTransitionEnd() || !$$$1(element).hasClass(ClassName.FADE)) { this._destroyElement(element); return; } - $(element).one(Util.TRANSITION_END, function (event) { + $$$1(element).one(Util.TRANSITION_END, function (event) { return _this._destroyElement(element, event); }).emulateTransitionEnd(TRANSITION_DURATION); }; _proto._destroyElement = function _destroyElement(element) { - $(element).detach().trigger(Event.CLOSED).remove(); - }; // static + $$$1(element).detach().trigger(Event.CLOSED).remove(); + }; // Static Alert._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { - var $element = $(this); + var $element = $$$1(this); var data = $element.data(DATA_KEY); if (!data) { @@ -317,7 +331,7 @@ var Alert = function () { }; }; - createClass(Alert, null, [{ + _createClass(Alert, null, [{ key: "VERSION", get: function get() { return VERSION; @@ -332,18 +346,18 @@ var Alert = function () { */ - $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert())); + $$$1(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert())); /** * ------------------------------------------------------------------------ * jQuery * ------------------------------------------------------------------------ */ - $.fn[NAME] = Alert._jQueryInterface; - $.fn[NAME].Constructor = Alert; + $$$1.fn[NAME] = Alert._jQueryInterface; + $$$1.fn[NAME].Constructor = Alert; - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; return Alert._jQueryInterface; }; @@ -352,23 +366,23 @@ var Alert = function () { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.2): button.js + * Bootstrap (v4.0.0): button.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ -var Button = function () { +var Button = function ($$$1) { /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ var NAME = 'button'; - var VERSION = '4.0.0-beta.2'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.button'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; - var JQUERY_NO_CONFLICT = $.fn[NAME]; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; var ClassName = { ACTIVE: 'active', BUTTON: 'btn', @@ -397,29 +411,29 @@ var Button = function () { function () { function Button(element) { this._element = element; - } // getters + } // Getters var _proto = Button.prototype; - // public + // Public _proto.toggle = function toggle() { var triggerChangeEvent = true; var addAriaPressed = true; - var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0]; + var rootElement = $$$1(this._element).closest(Selector.DATA_TOGGLE)[0]; if (rootElement) { - var input = $(this._element).find(Selector.INPUT)[0]; + var input = $$$1(this._element).find(Selector.INPUT)[0]; if (input) { if (input.type === 'radio') { - if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) { + if (input.checked && $$$1(this._element).hasClass(ClassName.ACTIVE)) { triggerChangeEvent = false; } else { - var activeElement = $(rootElement).find(Selector.ACTIVE)[0]; + var activeElement = $$$1(rootElement).find(Selector.ACTIVE)[0]; if (activeElement) { - $(activeElement).removeClass(ClassName.ACTIVE); + $$$1(activeElement).removeClass(ClassName.ACTIVE); } } } @@ -429,8 +443,8 @@ var Button = function () { return; } - input.checked = !$(this._element).hasClass(ClassName.ACTIVE); - $(input).trigger('change'); + input.checked = !$$$1(this._element).hasClass(ClassName.ACTIVE); + $$$1(input).trigger('change'); } input.focus(); @@ -439,27 +453,27 @@ var Button = function () { } if (addAriaPressed) { - this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE)); + this._element.setAttribute('aria-pressed', !$$$1(this._element).hasClass(ClassName.ACTIVE)); } if (triggerChangeEvent) { - $(this._element).toggleClass(ClassName.ACTIVE); + $$$1(this._element).toggleClass(ClassName.ACTIVE); } }; _proto.dispose = function dispose() { - $.removeData(this._element, DATA_KEY); + $$$1.removeData(this._element, DATA_KEY); this._element = null; - }; // static + }; // Static Button._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { - var data = $(this).data(DATA_KEY); + var data = $$$1(this).data(DATA_KEY); if (!data) { data = new Button(this); - $(this).data(DATA_KEY, data); + $$$1(this).data(DATA_KEY, data); } if (config === 'toggle') { @@ -468,7 +482,7 @@ var Button = function () { }); }; - createClass(Button, null, [{ + _createClass(Button, null, [{ key: "VERSION", get: function get() { return VERSION; @@ -483,18 +497,18 @@ var Button = function () { */ - $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { + $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { event.preventDefault(); var button = event.target; - if (!$(button).hasClass(ClassName.BUTTON)) { - button = $(button).closest(Selector.BUTTON); + if (!$$$1(button).hasClass(ClassName.BUTTON)) { + button = $$$1(button).closest(Selector.BUTTON); } - Button._jQueryInterface.call($(button), 'toggle'); + Button._jQueryInterface.call($$$1(button), 'toggle'); }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { - var button = $(event.target).closest(Selector.BUTTON)[0]; - $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)); + var button = $$$1(event.target).closest(Selector.BUTTON)[0]; + $$$1(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)); }); /** * ------------------------------------------------------------------------ @@ -502,11 +516,11 @@ var Button = function () { * ------------------------------------------------------------------------ */ - $.fn[NAME] = Button._jQueryInterface; - $.fn[NAME].Constructor = Button; + $$$1.fn[NAME] = Button._jQueryInterface; + $$$1.fn[NAME].Constructor = Button; - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; return Button._jQueryInterface; }; @@ -515,23 +529,23 @@ var Button = function () { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.2): carousel.js + * Bootstrap (v4.0.0): carousel.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ -var Carousel = function () { +var Carousel = function ($$$1) { /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ var NAME = 'carousel'; - var VERSION = '4.0.0-beta.2'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.carousel'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; - var JQUERY_NO_CONFLICT = $.fn[NAME]; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; var TRANSITION_DURATION = 600; var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key @@ -606,16 +620,16 @@ var Carousel = function () { this._isSliding = false; this.touchTimeout = null; this._config = this._getConfig(config); - this._element = $(element)[0]; - this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0]; + this._element = $$$1(element)[0]; + this._indicatorsElement = $$$1(this._element).find(Selector.INDICATORS)[0]; this._addEventListeners(); - } // getters + } // Getters var _proto = Carousel.prototype; - // public + // Public _proto.next = function next() { if (!this._isSliding) { this._slide(Direction.NEXT); @@ -625,7 +639,7 @@ var Carousel = function () { _proto.nextWhenVisible = function nextWhenVisible() { // Don't call next when the page isn't visible // or the carousel or its parent isn't visible - if (!document.hidden && $(this._element).is(':visible') && $(this._element).css('visibility') !== 'hidden') { + if (!document.hidden && $$$1(this._element).is(':visible') && $$$1(this._element).css('visibility') !== 'hidden') { this.next(); } }; @@ -641,7 +655,7 @@ var Carousel = function () { this._isPaused = true; } - if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) { + if ($$$1(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) { Util.triggerTransitionEnd(this._element); this.cycle(true); } @@ -668,7 +682,7 @@ var Carousel = function () { _proto.to = function to(index) { var _this = this; - this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; + this._activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0]; var activeIndex = this._getItemIndex(this._activeElement); @@ -677,7 +691,7 @@ var Carousel = function () { } if (this._isSliding) { - $(this._element).one(Event.SLID, function () { + $$$1(this._element).one(Event.SLID, function () { return _this.to(index); }); return; @@ -695,8 +709,8 @@ var Carousel = function () { }; _proto.dispose = function dispose() { - $(this._element).off(EVENT_KEY); - $.removeData(this._element, DATA_KEY); + $$$1(this._element).off(EVENT_KEY); + $$$1.removeData(this._element, DATA_KEY); this._items = null; this._config = null; this._element = null; @@ -705,11 +719,11 @@ var Carousel = function () { this._isSliding = null; this._activeElement = null; this._indicatorsElement = null; - }; // private + }; // Private _proto._getConfig = function _getConfig(config) { - config = $.extend({}, Default, config); + config = _extends({}, Default, config); Util.typeCheckConfig(NAME, config, DefaultType); return config; }; @@ -718,27 +732,27 @@ var Carousel = function () { var _this2 = this; if (this._config.keyboard) { - $(this._element).on(Event.KEYDOWN, function (event) { + $$$1(this._element).on(Event.KEYDOWN, function (event) { return _this2._keydown(event); }); } if (this._config.pause === 'hover') { - $(this._element).on(Event.MOUSEENTER, function (event) { + $$$1(this._element).on(Event.MOUSEENTER, function (event) { return _this2.pause(event); }).on(Event.MOUSELEAVE, function (event) { return _this2.cycle(event); }); if ('ontouchstart' in document.documentElement) { - // if it's a touch-enabled device, mouseenter/leave are fired as + // If it's a touch-enabled device, mouseenter/leave are fired as // part of the mouse compatibility events on first tap - the carousel // would stop cycling until user tapped out of it; // here, we listen for touchend, explicitly pause the carousel // (as if it's the second time we tap on it, mouseenter compat event // is NOT fired) and after a timeout (to allow for mouse compatibility // events to fire) we explicitly restart cycling - $(this._element).on(Event.TOUCHEND, function () { + $$$1(this._element).on(Event.TOUCHEND, function () { _this2.pause(); if (_this2.touchTimeout) { @@ -770,12 +784,11 @@ var Carousel = function () { break; default: - return; } }; _proto._getItemIndex = function _getItemIndex(element) { - this._items = $.makeArray($(element).parent().find(Selector.ITEM)); + this._items = $$$1.makeArray($$$1(element).parent().find(Selector.ITEM)); return this._items.indexOf(element); }; @@ -800,26 +813,26 @@ var Carousel = function () { _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) { var targetIndex = this._getItemIndex(relatedTarget); - var fromIndex = this._getItemIndex($(this._element).find(Selector.ACTIVE_ITEM)[0]); + var fromIndex = this._getItemIndex($$$1(this._element).find(Selector.ACTIVE_ITEM)[0]); - var slideEvent = $.Event(Event.SLIDE, { + var slideEvent = $$$1.Event(Event.SLIDE, { relatedTarget: relatedTarget, direction: eventDirectionName, from: fromIndex, to: targetIndex }); - $(this._element).trigger(slideEvent); + $$$1(this._element).trigger(slideEvent); return slideEvent; }; _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { if (this._indicatorsElement) { - $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE); + $$$1(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE); var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; if (nextIndicator) { - $(nextIndicator).addClass(ClassName.ACTIVE); + $$$1(nextIndicator).addClass(ClassName.ACTIVE); } } }; @@ -827,7 +840,7 @@ var Carousel = function () { _proto._slide = function _slide(direction, element) { var _this3 = this; - var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; + var activeElement = $$$1(this._element).find(Selector.ACTIVE_ITEM)[0]; var activeElementIndex = this._getItemIndex(activeElement); @@ -850,7 +863,7 @@ var Carousel = function () { eventDirectionName = Direction.RIGHT; } - if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) { + if (nextElement && $$$1(nextElement).hasClass(ClassName.ACTIVE)) { this._isSliding = false; return; } @@ -862,7 +875,7 @@ var Carousel = function () { } if (!activeElement || !nextElement) { - // some weirdness is happening, so we bail + // Some weirdness is happening, so we bail return; } @@ -874,61 +887,61 @@ var Carousel = function () { this._setActiveIndicatorElement(nextElement); - var slidEvent = $.Event(Event.SLID, { + var slidEvent = $$$1.Event(Event.SLID, { relatedTarget: nextElement, direction: eventDirectionName, from: activeElementIndex, to: nextElementIndex }); - if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) { - $(nextElement).addClass(orderClassName); + if (Util.supportsTransitionEnd() && $$$1(this._element).hasClass(ClassName.SLIDE)) { + $$$1(nextElement).addClass(orderClassName); Util.reflow(nextElement); - $(activeElement).addClass(directionalClassName); - $(nextElement).addClass(directionalClassName); - $(activeElement).one(Util.TRANSITION_END, function () { - $(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE); - $(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName); + $$$1(activeElement).addClass(directionalClassName); + $$$1(nextElement).addClass(directionalClassName); + $$$1(activeElement).one(Util.TRANSITION_END, function () { + $$$1(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE); + $$$1(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName); _this3._isSliding = false; setTimeout(function () { - return $(_this3._element).trigger(slidEvent); + return $$$1(_this3._element).trigger(slidEvent); }, 0); }).emulateTransitionEnd(TRANSITION_DURATION); } else { - $(activeElement).removeClass(ClassName.ACTIVE); - $(nextElement).addClass(ClassName.ACTIVE); + $$$1(activeElement).removeClass(ClassName.ACTIVE); + $$$1(nextElement).addClass(ClassName.ACTIVE); this._isSliding = false; - $(this._element).trigger(slidEvent); + $$$1(this._element).trigger(slidEvent); } if (isCycling) { this.cycle(); } - }; // static + }; // Static Carousel._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { - var data = $(this).data(DATA_KEY); + var data = $$$1(this).data(DATA_KEY); - var _config = $.extend({}, Default, $(this).data()); + var _config = _extends({}, Default, $$$1(this).data()); if (typeof config === 'object') { - $.extend(_config, config); + _config = _extends({}, _config, config); } var action = typeof config === 'string' ? config : _config.slide; if (!data) { data = new Carousel(this, _config); - $(this).data(DATA_KEY, data); + $$$1(this).data(DATA_KEY, data); } if (typeof config === 'number') { data.to(config); } else if (typeof action === 'string') { if (typeof data[action] === 'undefined') { - throw new Error("No method named \"" + action + "\""); + throw new TypeError("No method named \"" + action + "\""); } data[action](); @@ -946,29 +959,29 @@ var Carousel = function () { return; } - var target = $(selector)[0]; + var target = $$$1(selector)[0]; - if (!target || !$(target).hasClass(ClassName.CAROUSEL)) { + if (!target || !$$$1(target).hasClass(ClassName.CAROUSEL)) { return; } - var config = $.extend({}, $(target).data(), $(this).data()); + var config = _extends({}, $$$1(target).data(), $$$1(this).data()); var slideIndex = this.getAttribute('data-slide-to'); if (slideIndex) { config.interval = false; } - Carousel._jQueryInterface.call($(target), config); + Carousel._jQueryInterface.call($$$1(target), config); if (slideIndex) { - $(target).data(DATA_KEY).to(slideIndex); + $$$1(target).data(DATA_KEY).to(slideIndex); } event.preventDefault(); }; - createClass(Carousel, null, [{ + _createClass(Carousel, null, [{ key: "VERSION", get: function get() { return VERSION; @@ -988,10 +1001,10 @@ var Carousel = function () { */ - $(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler); - $(window).on(Event.LOAD_DATA_API, function () { - $(Selector.DATA_RIDE).each(function () { - var $carousel = $(this); + $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler); + $$$1(window).on(Event.LOAD_DATA_API, function () { + $$$1(Selector.DATA_RIDE).each(function () { + var $carousel = $$$1(this); Carousel._jQueryInterface.call($carousel, $carousel.data()); }); @@ -1002,11 +1015,11 @@ var Carousel = function () { * ------------------------------------------------------------------------ */ - $.fn[NAME] = Carousel._jQueryInterface; - $.fn[NAME].Constructor = Carousel; + $$$1.fn[NAME] = Carousel._jQueryInterface; + $$$1.fn[NAME].Constructor = Carousel; - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; return Carousel._jQueryInterface; }; @@ -1015,23 +1028,23 @@ var Carousel = function () { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.2): collapse.js + * Bootstrap (v4.0.0): collapse.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ -var Collapse = function () { +var Collapse = function ($$$1) { /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ var NAME = 'collapse'; - var VERSION = '4.0.0-beta.2'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.collapse'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; - var JQUERY_NO_CONFLICT = $.fn[NAME]; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; var TRANSITION_DURATION = 600; var Default = { toggle: true, @@ -1076,14 +1089,16 @@ var Collapse = function () { this._isTransitioning = false; this._element = element; this._config = this._getConfig(config); - this._triggerArray = $.makeArray($("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]"))); - var tabToggles = $(Selector.DATA_TOGGLE); + this._triggerArray = $$$1.makeArray($$$1("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]"))); + var tabToggles = $$$1(Selector.DATA_TOGGLE); for (var i = 0; i < tabToggles.length; i++) { var elem = tabToggles[i]; var selector = Util.getSelectorFromElement(elem); - if (selector !== null && $(selector).filter(element).length > 0) { + if (selector !== null && $$$1(selector).filter(element).length > 0) { + this._selector = selector; + this._triggerArray.push(elem); } } @@ -1097,14 +1112,14 @@ var Collapse = function () { if (this._config.toggle) { this.toggle(); } - } // getters + } // Getters var _proto = Collapse.prototype; - // public + // Public _proto.toggle = function toggle() { - if ($(this._element).hasClass(ClassName.SHOW)) { + if ($$$1(this._element).hasClass(ClassName.SHOW)) { this.hide(); } else { this.show(); @@ -1114,7 +1129,7 @@ var Collapse = function () { _proto.show = function show() { var _this = this; - if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) { + if (this._isTransitioning || $$$1(this._element).hasClass(ClassName.SHOW)) { return; } @@ -1122,54 +1137,54 @@ var Collapse = function () { var activesData; if (this._parent) { - actives = $.makeArray($(this._parent).children().children(Selector.ACTIVES)); + actives = $$$1.makeArray($$$1(this._parent).find(Selector.ACTIVES).filter("[data-parent=\"" + this._config.parent + "\"]")); - if (!actives.length) { + if (actives.length === 0) { actives = null; } } if (actives) { - activesData = $(actives).data(DATA_KEY); + activesData = $$$1(actives).not(this._selector).data(DATA_KEY); if (activesData && activesData._isTransitioning) { return; } } - var startEvent = $.Event(Event.SHOW); - $(this._element).trigger(startEvent); + var startEvent = $$$1.Event(Event.SHOW); + $$$1(this._element).trigger(startEvent); if (startEvent.isDefaultPrevented()) { return; } if (actives) { - Collapse._jQueryInterface.call($(actives), 'hide'); + Collapse._jQueryInterface.call($$$1(actives).not(this._selector), 'hide'); if (!activesData) { - $(actives).data(DATA_KEY, null); + $$$1(actives).data(DATA_KEY, null); } } var dimension = this._getDimension(); - $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); + $$$1(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); this._element.style[dimension] = 0; - if (this._triggerArray.length) { - $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); + if (this._triggerArray.length > 0) { + $$$1(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); } this.setTransitioning(true); var complete = function complete() { - $(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW); + $$$1(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW); _this._element.style[dimension] = ''; _this.setTransitioning(false); - $(_this._element).trigger(Event.SHOWN); + $$$1(_this._element).trigger(Event.SHOWN); }; if (!Util.supportsTransitionEnd()) { @@ -1179,19 +1194,19 @@ var Collapse = function () { var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); var scrollSize = "scroll" + capitalizedDimension; - $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); this._element.style[dimension] = this._element[scrollSize] + "px"; }; _proto.hide = function hide() { var _this2 = this; - if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) { + if (this._isTransitioning || !$$$1(this._element).hasClass(ClassName.SHOW)) { return; } - var startEvent = $.Event(Event.HIDE); - $(this._element).trigger(startEvent); + var startEvent = $$$1.Event(Event.HIDE); + $$$1(this._element).trigger(startEvent); if (startEvent.isDefaultPrevented()) { return; @@ -1201,18 +1216,18 @@ var Collapse = function () { this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px"; Util.reflow(this._element); - $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW); + $$$1(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW); - if (this._triggerArray.length) { + if (this._triggerArray.length > 0) { for (var i = 0; i < this._triggerArray.length; i++) { var trigger = this._triggerArray[i]; var selector = Util.getSelectorFromElement(trigger); if (selector !== null) { - var $elem = $(selector); + var $elem = $$$1(selector); if (!$elem.hasClass(ClassName.SHOW)) { - $(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false); + $$$1(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false); } } } @@ -1223,7 +1238,7 @@ var Collapse = function () { var complete = function complete() { _this2.setTransitioning(false); - $(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN); + $$$1(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN); }; this._element.style[dimension] = ''; @@ -1233,7 +1248,7 @@ var Collapse = function () { return; } - $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + $$$1(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); }; _proto.setTransitioning = function setTransitioning(isTransitioning) { @@ -1241,25 +1256,25 @@ var Collapse = function () { }; _proto.dispose = function dispose() { - $.removeData(this._element, DATA_KEY); + $$$1.removeData(this._element, DATA_KEY); this._config = null; this._parent = null; this._element = null; this._triggerArray = null; this._isTransitioning = null; - }; // private + }; // Private _proto._getConfig = function _getConfig(config) { - config = $.extend({}, Default, config); - config.toggle = Boolean(config.toggle); // coerce string values + config = _extends({}, Default, config); + config.toggle = Boolean(config.toggle); // Coerce string values Util.typeCheckConfig(NAME, config, DefaultType); return config; }; _proto._getDimension = function _getDimension() { - var hasWidth = $(this._element).hasClass(Dimension.WIDTH); + var hasWidth = $$$1(this._element).hasClass(Dimension.WIDTH); return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; }; @@ -1269,17 +1284,17 @@ var Collapse = function () { var parent = null; if (Util.isElement(this._config.parent)) { - parent = this._config.parent; // it's a jQuery object + parent = this._config.parent; // It's a jQuery object if (typeof this._config.parent.jquery !== 'undefined') { parent = this._config.parent[0]; } } else { - parent = $(this._config.parent)[0]; + parent = $$$1(this._config.parent)[0]; } var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]"; - $(parent).find(selector).each(function (i, element) { + $$$1(parent).find(selector).each(function (i, element) { _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); }); return parent; @@ -1287,26 +1302,26 @@ var Collapse = function () { _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { if (element) { - var isOpen = $(element).hasClass(ClassName.SHOW); + var isOpen = $$$1(element).hasClass(ClassName.SHOW); - if (triggerArray.length) { - $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); + if (triggerArray.length > 0) { + $$$1(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); } } - }; // static + }; // Static Collapse._getTargetFromElement = function _getTargetFromElement(element) { var selector = Util.getSelectorFromElement(element); - return selector ? $(selector)[0] : null; + return selector ? $$$1(selector)[0] : null; }; Collapse._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { - var $this = $(this); + var $this = $$$1(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; @@ -1319,7 +1334,7 @@ var Collapse = function () { if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new Error("No method named \"" + config + "\""); + throw new TypeError("No method named \"" + config + "\""); } data[config](); @@ -1327,7 +1342,7 @@ var Collapse = function () { }); }; - createClass(Collapse, null, [{ + _createClass(Collapse, null, [{ key: "VERSION", get: function get() { return VERSION; @@ -1347,16 +1362,16 @@ var Collapse = function () { */ - $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { // preventDefault only for elements (which change the URL) not inside the collapsible element if (event.currentTarget.tagName === 'A') { event.preventDefault(); } - var $trigger = $(this); + var $trigger = $$$1(this); var selector = Util.getSelectorFromElement(this); - $(selector).each(function () { - var $target = $(this); + $$$1(selector).each(function () { + var $target = $$$1(this); var data = $target.data(DATA_KEY); var config = data ? 'toggle' : $trigger.data(); @@ -1369,11 +1384,11 @@ var Collapse = function () { * ------------------------------------------------------------------------ */ - $.fn[NAME] = Collapse._jQueryInterface; - $.fn[NAME].Constructor = Collapse; + $$$1.fn[NAME] = Collapse._jQueryInterface; + $$$1.fn[NAME].Constructor = Collapse; - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; return Collapse._jQueryInterface; }; @@ -1382,32 +1397,23 @@ var Collapse = function () { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.2): dropdown.js + * Bootstrap (v4.0.0): dropdown.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ -var Dropdown = function () { - /** - * Check for Popper dependency - * Popper - https://popper.js.org - */ - if (typeof Popper === 'undefined') { - throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)'); - } +var Dropdown = function ($$$1) { /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ - - var NAME = 'dropdown'; - var VERSION = '4.0.0-beta.2'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.dropdown'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; - var JQUERY_NO_CONFLICT = $.fn[NAME]; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key @@ -1435,8 +1441,11 @@ var Dropdown = function () { DISABLED: 'disabled', SHOW: 'show', DROPUP: 'dropup', + 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"]', @@ -1449,15 +1458,21 @@ var Dropdown = function () { TOP: 'top-start', TOPEND: 'top-end', BOTTOM: 'bottom-start', - BOTTOMEND: 'bottom-end' + BOTTOMEND: 'bottom-end', + RIGHT: 'right-start', + RIGHTEND: 'right-end', + LEFT: 'left-start', + LEFTEND: 'left-end' }; 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 @@ -1477,20 +1492,20 @@ var Dropdown = function () { this._inNavbar = this._detectNavbar(); this._addEventListeners(); - } // getters + } // Getters var _proto = Dropdown.prototype; - // public + // Public _proto.toggle = function toggle() { - if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) { + if (this._element.disabled || $$$1(this._element).hasClass(ClassName.DISABLED)) { return; } var parent = Dropdown._getParentFromElement(this._element); - var isActive = $(this._menu).hasClass(ClassName.SHOW); + var isActive = $$$1(this._menu).hasClass(ClassName.SHOW); Dropdown._clearMenus(); @@ -1501,49 +1516,68 @@ var Dropdown = function () { var relatedTarget = { relatedTarget: this._element }; - var showEvent = $.Event(Event.SHOW, relatedTarget); - $(parent).trigger(showEvent); + var showEvent = $$$1.Event(Event.SHOW, relatedTarget); + $$$1(parent).trigger(showEvent); if (showEvent.isDefaultPrevented()) { return; - } + } // Disable totally Popper.js for Dropdown in Navbar - var element = this._element; // for dropup with alignment we use the parent as popper container - if ($(parent).hasClass(ClassName.DROPUP)) { - if ($(this._menu).hasClass(ClassName.MENULEFT) || $(this._menu).hasClass(ClassName.MENURIGHT)) { - element = parent; + if (!this._inNavbar) { + /** + * Check for Popper dependency + * Popper - https://popper.js.org + */ + if (typeof Popper === 'undefined') { + throw new TypeError('Bootstrap dropdown require Popper.js (https://popper.js.org)'); } - } - this._popper = new Popper(element, this._menu, this._getPopperConfig()); // if this is a touch-enabled device we add extra + var element = this._element; // For dropup with alignment we use the parent as popper container + + if ($$$1(parent).hasClass(ClassName.DROPUP)) { + 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()); + } // If this is a touch-enabled device we add extra // empty mouseover listeners to the body's immediate children; // only needed because of broken event delegation on iOS // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html - if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) { - $('body').children().on('mouseover', null, $.noop); + + if ('ontouchstart' in document.documentElement && $$$1(parent).closest(Selector.NAVBAR_NAV).length === 0) { + $$$1('body').children().on('mouseover', null, $$$1.noop); } this._element.focus(); this._element.setAttribute('aria-expanded', true); - $(this._menu).toggleClass(ClassName.SHOW); - $(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget)); + $$$1(this._menu).toggleClass(ClassName.SHOW); + $$$1(parent).toggleClass(ClassName.SHOW).trigger($$$1.Event(Event.SHOWN, relatedTarget)); }; _proto.dispose = function dispose() { - $.removeData(this._element, DATA_KEY); - $(this._element).off(EVENT_KEY); + $$$1.removeData(this._element, DATA_KEY); + $$$1(this._element).off(EVENT_KEY); this._element = null; this._menu = null; if (this._popper !== null) { this._popper.destroy(); - } - this._popper = null; + this._popper = null; + } }; _proto.update = function update() { @@ -1552,13 +1586,13 @@ var Dropdown = function () { if (this._popper !== null) { this._popper.scheduleUpdate(); } - }; // private + }; // Private _proto._addEventListeners = function _addEventListeners() { var _this = this; - $(this._element).on(Event.CLICK, function (event) { + $$$1(this._element).on(Event.CLICK, function (event) { event.preventDefault(); event.stopPropagation(); @@ -1567,7 +1601,7 @@ var Dropdown = function () { }; _proto._getConfig = function _getConfig(config) { - config = $.extend({}, this.constructor.Default, $(this._element).data(), config); + config = _extends({}, this.constructor.Default, $$$1(this._element).data(), config); Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); return config; }; @@ -1576,23 +1610,27 @@ var Dropdown = function () { if (!this._menu) { var parent = Dropdown._getParentFromElement(this._element); - this._menu = $(parent).find(Selector.MENU)[0]; + this._menu = $$$1(parent).find(Selector.MENU)[0]; } return this._menu; }; _proto._getPlacement = function _getPlacement() { - var $parentDropdown = $(this._element).parent(); + var $parentDropdown = $$$1(this._element).parent(); var placement = AttachmentMap.BOTTOM; // Handle dropup if ($parentDropdown.hasClass(ClassName.DROPUP)) { placement = AttachmentMap.TOP; - if ($(this._menu).hasClass(ClassName.MENURIGHT)) { + if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) { placement = AttachmentMap.TOPEND; } - } else if ($(this._menu).hasClass(ClassName.MENURIGHT)) { + } else if ($parentDropdown.hasClass(ClassName.DROPRIGHT)) { + placement = AttachmentMap.RIGHT; + } else if ($parentDropdown.hasClass(ClassName.DROPLEFT)) { + placement = AttachmentMap.LEFT; + } else if ($$$1(this._menu).hasClass(ClassName.MENURIGHT)) { placement = AttachmentMap.BOTTOMEND; } @@ -1600,7 +1638,7 @@ var Dropdown = function () { }; _proto._detectNavbar = function _detectNavbar() { - return $(this._element).closest('.navbar').length > 0; + return $$$1(this._element).closest('.navbar').length > 0; }; _proto._getPopperConfig = function _getPopperConfig() { @@ -1610,7 +1648,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 { @@ -1623,35 +1661,30 @@ var Dropdown = function () { offset: offsetConf, flip: { enabled: this._config.flip + }, + preventOverflow: { + boundariesElement: this._config.boundary } - } // Disable Popper.js for Dropdown in Navbar - + } }; - - if (this._inNavbar) { - popperConfig.modifiers.applyStyle = { - enabled: !this._inNavbar - }; - } - return popperConfig; - }; // static + }; // Static Dropdown._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { - var data = $(this).data(DATA_KEY); + var data = $$$1(this).data(DATA_KEY); var _config = typeof config === 'object' ? config : null; if (!data) { data = new Dropdown(this, _config); - $(this).data(DATA_KEY, data); + $$$1(this).data(DATA_KEY, data); } if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new Error("No method named \"" + config + "\""); + throw new TypeError("No method named \"" + config + "\""); } data[config](); @@ -1664,12 +1697,12 @@ var Dropdown = function () { return; } - var toggles = $.makeArray($(Selector.DATA_TOGGLE)); + var toggles = $$$1.makeArray($$$1(Selector.DATA_TOGGLE)); for (var i = 0; i < toggles.length; i++) { var parent = Dropdown._getParentFromElement(toggles[i]); - var context = $(toggles[i]).data(DATA_KEY); + var context = $$$1(toggles[i]).data(DATA_KEY); var relatedTarget = { relatedTarget: toggles[i] }; @@ -1680,30 +1713,30 @@ var Dropdown = function () { var dropdownMenu = context._menu; - if (!$(parent).hasClass(ClassName.SHOW)) { + if (!$$$1(parent).hasClass(ClassName.SHOW)) { continue; } - if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $.contains(parent, event.target)) { + if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $$$1.contains(parent, event.target)) { continue; } - var hideEvent = $.Event(Event.HIDE, relatedTarget); - $(parent).trigger(hideEvent); + var hideEvent = $$$1.Event(Event.HIDE, relatedTarget); + $$$1(parent).trigger(hideEvent); if (hideEvent.isDefaultPrevented()) { continue; - } // if this is a touch-enabled device we remove the extra + } // If this is a touch-enabled device we remove the extra // empty mouseover listeners we added for iOS support if ('ontouchstart' in document.documentElement) { - $('body').children().off('mouseover', null, $.noop); + $$$1('body').children().off('mouseover', null, $$$1.noop); } toggles[i].setAttribute('aria-expanded', 'false'); - $(dropdownMenu).removeClass(ClassName.SHOW); - $(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget)); + $$$1(dropdownMenu).removeClass(ClassName.SHOW); + $$$1(parent).removeClass(ClassName.SHOW).trigger($$$1.Event(Event.HIDDEN, relatedTarget)); } }; @@ -1712,53 +1745,61 @@ var Dropdown = function () { var selector = Util.getSelectorFromElement(element); if (selector) { - parent = $(selector)[0]; + parent = $$$1(selector)[0]; } return parent || element.parentNode; - }; + }; // eslint-disable-next-line complexity + Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { - if (!REGEXP_KEYDOWN.test(event.which) || /button/i.test(event.target.tagName) && event.which === SPACE_KEYCODE || /input|textarea/i.test(event.target.tagName)) { + // If not input/textarea: + // - And not a key in REGEXP_KEYDOWN => not a dropdown command + // If input/textarea: + // - If space key => not a dropdown command + // - If key is other than escape + // - If key is not up or down => not a dropdown command + // - If trigger inside the menu => not a dropdown command + if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $$$1(event.target).closest(Selector.MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { return; } event.preventDefault(); event.stopPropagation(); - if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { + if (this.disabled || $$$1(this).hasClass(ClassName.DISABLED)) { return; } var parent = Dropdown._getParentFromElement(this); - var isActive = $(parent).hasClass(ClassName.SHOW); + var isActive = $$$1(parent).hasClass(ClassName.SHOW); if (!isActive && (event.which !== ESCAPE_KEYCODE || event.which !== SPACE_KEYCODE) || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) { if (event.which === ESCAPE_KEYCODE) { - var toggle = $(parent).find(Selector.DATA_TOGGLE)[0]; - $(toggle).trigger('focus'); + var toggle = $$$1(parent).find(Selector.DATA_TOGGLE)[0]; + $$$1(toggle).trigger('focus'); } - $(this).trigger('click'); + $$$1(this).trigger('click'); return; } - var items = $(parent).find(Selector.VISIBLE_ITEMS).get(); + var items = $$$1(parent).find(Selector.VISIBLE_ITEMS).get(); - if (!items.length) { + if (items.length === 0) { return; } var index = items.indexOf(event.target); if (event.which === ARROW_UP_KEYCODE && index > 0) { - // up + // Up index--; } if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { - // down + // Down index++; } @@ -1769,7 +1810,7 @@ var Dropdown = function () { items[index].focus(); }; - createClass(Dropdown, null, [{ + _createClass(Dropdown, null, [{ key: "VERSION", get: function get() { return VERSION; @@ -1794,11 +1835,11 @@ var Dropdown = function () { */ - $(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + " " + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + $$$1(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + " " + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { event.preventDefault(); event.stopPropagation(); - Dropdown._jQueryInterface.call($(this), 'toggle'); + Dropdown._jQueryInterface.call($$$1(this), 'toggle'); }).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) { e.stopPropagation(); }); @@ -1808,11 +1849,11 @@ var Dropdown = function () { * ------------------------------------------------------------------------ */ - $.fn[NAME] = Dropdown._jQueryInterface; - $.fn[NAME].Constructor = Dropdown; + $$$1.fn[NAME] = Dropdown._jQueryInterface; + $$$1.fn[NAME].Constructor = Dropdown; - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; return Dropdown._jQueryInterface; }; @@ -1821,23 +1862,23 @@ var Dropdown = function () { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.2): modal.js + * Bootstrap (v4.0.0): modal.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ -var Modal = function () { +var Modal = function ($$$1) { /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ var NAME = 'modal'; - var VERSION = '4.0.0-beta.2'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.modal'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; - var JQUERY_NO_CONFLICT = $.fn[NAME]; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; var TRANSITION_DURATION = 300; var BACKDROP_TRANSITION_DURATION = 150; var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key @@ -1895,19 +1936,19 @@ var Modal = function () { function Modal(element, config) { this._config = this._getConfig(config); this._element = element; - this._dialog = $(element).find(Selector.DIALOG)[0]; + this._dialog = $$$1(element).find(Selector.DIALOG)[0]; this._backdrop = null; this._isShown = false; this._isBodyOverflowing = false; this._ignoreBackdropClick = false; this._originalBodyPadding = 0; this._scrollbarWidth = 0; - } // getters + } // Getters var _proto = Modal.prototype; - // public + // Public _proto.toggle = function toggle(relatedTarget) { return this._isShown ? this.hide() : this.show(relatedTarget); }; @@ -1919,14 +1960,14 @@ var Modal = function () { return; } - if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { + if (Util.supportsTransitionEnd() && $$$1(this._element).hasClass(ClassName.FADE)) { this._isTransitioning = true; } - var showEvent = $.Event(Event.SHOW, { + var showEvent = $$$1.Event(Event.SHOW, { relatedTarget: relatedTarget }); - $(this._element).trigger(showEvent); + $$$1(this._element).trigger(showEvent); if (this._isShown || showEvent.isDefaultPrevented()) { return; @@ -1940,18 +1981,18 @@ var Modal = function () { this._adjustDialog(); - $(document.body).addClass(ClassName.OPEN); + $$$1(document.body).addClass(ClassName.OPEN); this._setEscapeEvent(); this._setResizeEvent(); - $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) { + $$$1(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) { return _this.hide(event); }); - $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () { - $(_this._element).one(Event.MOUSEUP_DISMISS, function (event) { - if ($(event.target).is(_this._element)) { + $$$1(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () { + $$$1(_this._element).one(Event.MOUSEUP_DISMISS, function (event) { + if ($$$1(event.target).is(_this._element)) { _this._ignoreBackdropClick = true; } }); @@ -1973,15 +2014,15 @@ var Modal = function () { return; } - var hideEvent = $.Event(Event.HIDE); - $(this._element).trigger(hideEvent); + var hideEvent = $$$1.Event(Event.HIDE); + $$$1(this._element).trigger(hideEvent); if (!this._isShown || hideEvent.isDefaultPrevented()) { return; } this._isShown = false; - var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE); + var transition = Util.supportsTransitionEnd() && $$$1(this._element).hasClass(ClassName.FADE); if (transition) { this._isTransitioning = true; @@ -1991,13 +2032,13 @@ var Modal = function () { this._setResizeEvent(); - $(document).off(Event.FOCUSIN); - $(this._element).removeClass(ClassName.SHOW); - $(this._element).off(Event.CLICK_DISMISS); - $(this._dialog).off(Event.MOUSEDOWN_DISMISS); + $$$1(document).off(Event.FOCUSIN); + $$$1(this._element).removeClass(ClassName.SHOW); + $$$1(this._element).off(Event.CLICK_DISMISS); + $$$1(this._dialog).off(Event.MOUSEDOWN_DISMISS); if (transition) { - $(this._element).one(Util.TRANSITION_END, function (event) { + $$$1(this._element).one(Util.TRANSITION_END, function (event) { return _this2._hideModal(event); }).emulateTransitionEnd(TRANSITION_DURATION); } else { @@ -2006,8 +2047,8 @@ var Modal = function () { }; _proto.dispose = function dispose() { - $.removeData(this._element, DATA_KEY); - $(window, document, this._element, this._backdrop).off(EVENT_KEY); + $$$1.removeData(this._element, DATA_KEY); + $$$1(window, document, this._element, this._backdrop).off(EVENT_KEY); this._config = null; this._element = null; this._dialog = null; @@ -2020,11 +2061,11 @@ var Modal = function () { _proto.handleUpdate = function handleUpdate() { this._adjustDialog(); - }; // private + }; // Private _proto._getConfig = function _getConfig(config) { - config = $.extend({}, Default, config); + config = _extends({}, Default, config); Util.typeCheckConfig(NAME, config, DefaultType); return config; }; @@ -2032,10 +2073,10 @@ var Modal = function () { _proto._showElement = function _showElement(relatedTarget) { var _this3 = this; - var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE); + var transition = Util.supportsTransitionEnd() && $$$1(this._element).hasClass(ClassName.FADE); if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { - // don't move modals dom position + // Don't move modal's DOM position document.body.appendChild(this._element); } @@ -2049,13 +2090,13 @@ var Modal = function () { Util.reflow(this._element); } - $(this._element).addClass(ClassName.SHOW); + $$$1(this._element).addClass(ClassName.SHOW); if (this._config.focus) { this._enforceFocus(); } - var shownEvent = $.Event(Event.SHOWN, { + var shownEvent = $$$1.Event(Event.SHOWN, { relatedTarget: relatedTarget }); @@ -2065,11 +2106,11 @@ var Modal = function () { } _this3._isTransitioning = false; - $(_this3._element).trigger(shownEvent); + $$$1(_this3._element).trigger(shownEvent); }; if (transition) { - $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION); + $$$1(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION); } else { transitionComplete(); } @@ -2078,9 +2119,9 @@ var Modal = function () { _proto._enforceFocus = function _enforceFocus() { var _this4 = this; - $(document).off(Event.FOCUSIN) // guard against infinite focus loop + $$$1(document).off(Event.FOCUSIN) // Guard against infinite focus loop .on(Event.FOCUSIN, function (event) { - if (document !== event.target && _this4._element !== event.target && !$(_this4._element).has(event.target).length) { + if (document !== event.target && _this4._element !== event.target && $$$1(_this4._element).has(event.target).length === 0) { _this4._element.focus(); } }); @@ -2090,7 +2131,7 @@ var Modal = function () { var _this5 = this; if (this._isShown && this._config.keyboard) { - $(this._element).on(Event.KEYDOWN_DISMISS, function (event) { + $$$1(this._element).on(Event.KEYDOWN_DISMISS, function (event) { if (event.which === ESCAPE_KEYCODE) { event.preventDefault(); @@ -2098,7 +2139,7 @@ var Modal = function () { } }); } else if (!this._isShown) { - $(this._element).off(Event.KEYDOWN_DISMISS); + $$$1(this._element).off(Event.KEYDOWN_DISMISS); } }; @@ -2106,11 +2147,11 @@ var Modal = function () { var _this6 = this; if (this._isShown) { - $(window).on(Event.RESIZE, function (event) { + $$$1(window).on(Event.RESIZE, function (event) { return _this6.handleUpdate(event); }); } else { - $(window).off(Event.RESIZE); + $$$1(window).off(Event.RESIZE); } }; @@ -2124,19 +2165,19 @@ var Modal = function () { this._isTransitioning = false; this._showBackdrop(function () { - $(document.body).removeClass(ClassName.OPEN); + $$$1(document.body).removeClass(ClassName.OPEN); _this7._resetAdjustments(); _this7._resetScrollbar(); - $(_this7._element).trigger(Event.HIDDEN); + $$$1(_this7._element).trigger(Event.HIDDEN); }); }; _proto._removeBackdrop = function _removeBackdrop() { if (this._backdrop) { - $(this._backdrop).remove(); + $$$1(this._backdrop).remove(); this._backdrop = null; } }; @@ -2144,7 +2185,7 @@ var Modal = function () { _proto._showBackdrop = function _showBackdrop(callback) { var _this8 = this; - var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : ''; + var animate = $$$1(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : ''; if (this._isShown && this._config.backdrop) { var doAnimate = Util.supportsTransitionEnd() && animate; @@ -2152,11 +2193,11 @@ var Modal = function () { this._backdrop.className = ClassName.BACKDROP; if (animate) { - $(this._backdrop).addClass(animate); + $$$1(this._backdrop).addClass(animate); } - $(this._backdrop).appendTo(document.body); - $(this._element).on(Event.CLICK_DISMISS, function (event) { + $$$1(this._backdrop).appendTo(document.body); + $$$1(this._element).on(Event.CLICK_DISMISS, function (event) { if (_this8._ignoreBackdropClick) { _this8._ignoreBackdropClick = false; return; @@ -2177,7 +2218,7 @@ var Modal = function () { Util.reflow(this._backdrop); } - $(this._backdrop).addClass(ClassName.SHOW); + $$$1(this._backdrop).addClass(ClassName.SHOW); if (!callback) { return; @@ -2188,9 +2229,9 @@ var Modal = function () { return; } - $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); + $$$1(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); } else if (!this._isShown && this._backdrop) { - $(this._backdrop).removeClass(ClassName.SHOW); + $$$1(this._backdrop).removeClass(ClassName.SHOW); var callbackRemove = function callbackRemove() { _this8._removeBackdrop(); @@ -2200,8 +2241,8 @@ var Modal = function () { } }; - if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { - $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); + if (Util.supportsTransitionEnd() && $$$1(this._element).hasClass(ClassName.FADE)) { + $$$1(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); } else { callbackRemove(); } @@ -2244,52 +2285,52 @@ var Modal = function () { // Note: DOMNode.style.paddingRight returns the actual value or '' if not set // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set // Adjust fixed content padding - $(Selector.FIXED_CONTENT).each(function (index, element) { - var actualPadding = $(element)[0].style.paddingRight; - var calculatedPadding = $(element).css('padding-right'); - $(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px"); + $$$1(Selector.FIXED_CONTENT).each(function (index, element) { + var actualPadding = $$$1(element)[0].style.paddingRight; + var calculatedPadding = $$$1(element).css('padding-right'); + $$$1(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this9._scrollbarWidth + "px"); }); // Adjust sticky content margin - $(Selector.STICKY_CONTENT).each(function (index, element) { - var actualMargin = $(element)[0].style.marginRight; - var calculatedMargin = $(element).css('margin-right'); - $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px"); + $$$1(Selector.STICKY_CONTENT).each(function (index, element) { + var actualMargin = $$$1(element)[0].style.marginRight; + var calculatedMargin = $$$1(element).css('margin-right'); + $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this9._scrollbarWidth + "px"); }); // Adjust navbar-toggler margin - $(Selector.NAVBAR_TOGGLER).each(function (index, element) { - var actualMargin = $(element)[0].style.marginRight; - var calculatedMargin = $(element).css('margin-right'); - $(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + "px"); + $$$1(Selector.NAVBAR_TOGGLER).each(function (index, element) { + var actualMargin = $$$1(element)[0].style.marginRight; + var calculatedMargin = $$$1(element).css('margin-right'); + $$$1(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this9._scrollbarWidth + "px"); }); // Adjust body padding var actualPadding = document.body.style.paddingRight; - var calculatedPadding = $('body').css('padding-right'); - $('body').data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px"); + var calculatedPadding = $$$1('body').css('padding-right'); + $$$1('body').data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px"); } }; _proto._resetScrollbar = function _resetScrollbar() { // Restore fixed content padding - $(Selector.FIXED_CONTENT).each(function (index, element) { - var padding = $(element).data('padding-right'); + $$$1(Selector.FIXED_CONTENT).each(function (index, element) { + var padding = $$$1(element).data('padding-right'); if (typeof padding !== 'undefined') { - $(element).css('padding-right', padding).removeData('padding-right'); + $$$1(element).css('padding-right', padding).removeData('padding-right'); } }); // Restore sticky content and navbar-toggler margin - $(Selector.STICKY_CONTENT + ", " + Selector.NAVBAR_TOGGLER).each(function (index, element) { - var margin = $(element).data('margin-right'); + $$$1(Selector.STICKY_CONTENT + ", " + Selector.NAVBAR_TOGGLER).each(function (index, element) { + var margin = $$$1(element).data('margin-right'); if (typeof margin !== 'undefined') { - $(element).css('margin-right', margin).removeData('margin-right'); + $$$1(element).css('margin-right', margin).removeData('margin-right'); } }); // Restore body padding - var padding = $('body').data('padding-right'); + var padding = $$$1('body').data('padding-right'); if (typeof padding !== 'undefined') { - $('body').css('padding-right', padding).removeData('padding-right'); + $$$1('body').css('padding-right', padding).removeData('padding-right'); } }; @@ -2301,23 +2342,23 @@ var Modal = function () { 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 () { - var data = $(this).data(DATA_KEY); + var data = $$$1(this).data(DATA_KEY); - var _config = $.extend({}, Modal.Default, $(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); - $(this).data(DATA_KEY, data); + $$$1(this).data(DATA_KEY, data); } if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new Error("No method named \"" + config + "\""); + throw new TypeError("No method named \"" + config + "\""); } data[config](relatedTarget); @@ -2327,7 +2368,7 @@ var Modal = function () { }); }; - createClass(Modal, null, [{ + _createClass(Modal, null, [{ key: "VERSION", get: function get() { return VERSION; @@ -2347,36 +2388,36 @@ var Modal = function () { */ - $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { var _this10 = this; var target; var selector = Util.getSelectorFromElement(this); if (selector) { - target = $(selector)[0]; + target = $$$1(selector)[0]; } - var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(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(); } - var $target = $(target).one(Event.SHOW, function (showEvent) { + var $target = $$$1(target).one(Event.SHOW, function (showEvent) { if (showEvent.isDefaultPrevented()) { - // only register focus restorer if modal will actually get shown + // Only register focus restorer if modal will actually get shown return; } $target.one(Event.HIDDEN, function () { - if ($(_this10).is(':visible')) { + if ($$$1(_this10).is(':visible')) { _this10.focus(); } }); }); - Modal._jQueryInterface.call($(target), config, this); + Modal._jQueryInterface.call($$$1(target), config, this); }); /** * ------------------------------------------------------------------------ @@ -2384,11 +2425,11 @@ var Modal = function () { * ------------------------------------------------------------------------ */ - $.fn[NAME] = Modal._jQueryInterface; - $.fn[NAME].Constructor = Modal; + $$$1.fn[NAME] = Modal._jQueryInterface; + $$$1.fn[NAME].Constructor = Modal; - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; return Modal._jQueryInterface; }; @@ -2397,31 +2438,22 @@ var Modal = function () { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.2): tooltip.js + * Bootstrap (v4.0.0): tooltip.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ -var Tooltip = function () { - /** - * Check for Popper dependency - * Popper - https://popper.js.org - */ - if (typeof Popper === 'undefined') { - throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)'); - } +var Tooltip = function ($$$1) { /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ - - var NAME = 'tooltip'; - var VERSION = '4.0.0-beta.2'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.tooltip'; var EVENT_KEY = "." + DATA_KEY; - var JQUERY_NO_CONFLICT = $.fn[NAME]; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; var TRANSITION_DURATION = 150; var CLASS_PREFIX = 'bs-tooltip'; var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); @@ -2436,7 +2468,8 @@ var Tooltip = function () { placement: '(string|function)', offset: '(number|string)', container: '(string|element|boolean)', - fallbackPlacement: '(string|array)' + fallbackPlacement: '(string|array)', + boundary: '(string|element)' }; var AttachmentMap = { AUTO: 'auto', @@ -2456,7 +2489,8 @@ var Tooltip = function () { placement: 'top', offset: 0, container: false, - fallbackPlacement: 'flip' + fallbackPlacement: 'flip', + boundary: 'scrollParent' }; var HoverState = { SHOW: 'show', @@ -2500,24 +2534,32 @@ var Tooltip = function () { /*#__PURE__*/ function () { function Tooltip(element, config) { - // private + /** + * Check for Popper dependency + * Popper - https://popper.js.org + */ + if (typeof Popper === 'undefined') { + throw new TypeError('Bootstrap tooltips require Popper.js (https://popper.js.org)'); + } // private + + this._isEnabled = true; this._timeout = 0; this._hoverState = ''; this._activeTrigger = {}; - this._popper = null; // protected + this._popper = null; // Protected this.element = element; this.config = this._getConfig(config); this.tip = null; this._setListeners(); - } // getters + } // Getters var _proto = Tooltip.prototype; - // public + // Public _proto.enable = function enable() { this._isEnabled = true; }; @@ -2537,11 +2579,11 @@ var Tooltip = function () { if (event) { var dataKey = this.constructor.DATA_KEY; - var context = $(event.currentTarget).data(dataKey); + var context = $$$1(event.currentTarget).data(dataKey); if (!context) { context = new this.constructor(event.currentTarget, this._getDelegateConfig()); - $(event.currentTarget).data(dataKey, context); + $$$1(event.currentTarget).data(dataKey, context); } context._activeTrigger.click = !context._activeTrigger.click; @@ -2552,7 +2594,7 @@ var Tooltip = function () { context._leave(null, context); } } else { - if ($(this.getTipElement()).hasClass(ClassName.SHOW)) { + if ($$$1(this.getTipElement()).hasClass(ClassName.SHOW)) { this._leave(null, this); return; @@ -2564,12 +2606,12 @@ var Tooltip = function () { _proto.dispose = function dispose() { clearTimeout(this._timeout); - $.removeData(this.element, this.constructor.DATA_KEY); - $(this.element).off(this.constructor.EVENT_KEY); - $(this.element).closest('.modal').off('hide.bs.modal'); + $$$1.removeData(this.element, this.constructor.DATA_KEY); + $$$1(this.element).off(this.constructor.EVENT_KEY); + $$$1(this.element).closest('.modal').off('hide.bs.modal'); if (this.tip) { - $(this.tip).remove(); + $$$1(this.tip).remove(); } this._isEnabled = null; @@ -2590,15 +2632,15 @@ var Tooltip = function () { _proto.show = function show() { var _this = this; - if ($(this.element).css('display') === 'none') { + if ($$$1(this.element).css('display') === 'none') { throw new Error('Please use show on visible elements'); } - var showEvent = $.Event(this.constructor.Event.SHOW); + var showEvent = $$$1.Event(this.constructor.Event.SHOW); if (this.isWithContent() && this._isEnabled) { - $(this.element).trigger(showEvent); - var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element); + $$$1(this.element).trigger(showEvent); + var isInTheDom = $$$1.contains(this.element.ownerDocument.documentElement, this.element); if (showEvent.isDefaultPrevented() || !isInTheDom) { return; @@ -2611,7 +2653,7 @@ var Tooltip = function () { this.setContent(); if (this.config.animation) { - $(tip).addClass(ClassName.FADE); + $$$1(tip).addClass(ClassName.FADE); } var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; @@ -2619,14 +2661,14 @@ var Tooltip = function () { var attachment = this._getAttachment(placement); this.addAttachmentClass(attachment); - var container = this.config.container === false ? document.body : $(this.config.container); - $(tip).data(this.constructor.DATA_KEY, this); + var container = this.config.container === false ? document.body : $$$1(this.config.container); + $$$1(tip).data(this.constructor.DATA_KEY, this); - if (!$.contains(this.element.ownerDocument.documentElement, this.tip)) { - $(tip).appendTo(container); + if (!$$$1.contains(this.element.ownerDocument.documentElement, this.tip)) { + $$$1(tip).appendTo(container); } - $(this.element).trigger(this.constructor.Event.INSERTED); + $$$1(this.element).trigger(this.constructor.Event.INSERTED); this._popper = new Popper(this.element, tip, { placement: attachment, modifiers: { @@ -2638,6 +2680,9 @@ var Tooltip = function () { }, arrow: { element: Selector.ARROW + }, + preventOverflow: { + boundariesElement: this.config.boundary } }, onCreate: function onCreate(data) { @@ -2649,13 +2694,13 @@ var Tooltip = function () { _this._handlePopperPlacementChange(data); } }); - $(tip).addClass(ClassName.SHOW); // if this is a touch-enabled device we add extra + $$$1(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra // empty mouseover listeners to the body's immediate children; // only needed because of broken event delegation on iOS // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html if ('ontouchstart' in document.documentElement) { - $('body').children().on('mouseover', null, $.noop); + $$$1('body').children().on('mouseover', null, $$$1.noop); } var complete = function complete() { @@ -2665,15 +2710,15 @@ var Tooltip = function () { var prevHoverState = _this._hoverState; _this._hoverState = null; - $(_this.element).trigger(_this.constructor.Event.SHOWN); + $$$1(_this.element).trigger(_this.constructor.Event.SHOWN); if (prevHoverState === HoverState.OUT) { _this._leave(null, _this); } }; - if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { - $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION); + if (Util.supportsTransitionEnd() && $$$1(this.tip).hasClass(ClassName.FADE)) { + $$$1(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION); } else { complete(); } @@ -2684,7 +2729,7 @@ var Tooltip = function () { var _this2 = this; var tip = this.getTipElement(); - var hideEvent = $.Event(this.constructor.Event.HIDE); + var hideEvent = $$$1.Event(this.constructor.Event.HIDE); var complete = function complete() { if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) { @@ -2695,7 +2740,7 @@ var Tooltip = function () { _this2.element.removeAttribute('aria-describedby'); - $(_this2.element).trigger(_this2.constructor.Event.HIDDEN); + $$$1(_this2.element).trigger(_this2.constructor.Event.HIDDEN); if (_this2._popper !== null) { _this2._popper.destroy(); @@ -2706,25 +2751,25 @@ var Tooltip = function () { } }; - $(this.element).trigger(hideEvent); + $$$1(this.element).trigger(hideEvent); if (hideEvent.isDefaultPrevented()) { return; } - $(tip).removeClass(ClassName.SHOW); // if this is a touch-enabled device we remove the extra + $$$1(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra // empty mouseover listeners we added for iOS support if ('ontouchstart' in document.documentElement) { - $('body').children().off('mouseover', null, $.noop); + $$$1('body').children().off('mouseover', null, $$$1.noop); } this._activeTrigger[Trigger.CLICK] = false; this._activeTrigger[Trigger.FOCUS] = false; this._activeTrigger[Trigger.HOVER] = false; - if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { - $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + if (Util.supportsTransitionEnd() && $$$1(this.tip).hasClass(ClassName.FADE)) { + $$$1(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); } else { complete(); } @@ -2736,7 +2781,7 @@ var Tooltip = function () { if (this._popper !== null) { this._popper.scheduleUpdate(); } - }; // protected + }; // Protected _proto.isWithContent = function isWithContent() { @@ -2744,16 +2789,16 @@ var Tooltip = function () { }; _proto.addAttachmentClass = function addAttachmentClass(attachment) { - $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); + $$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); }; _proto.getTipElement = function getTipElement() { - this.tip = this.tip || $(this.config.template)[0]; + this.tip = this.tip || $$$1(this.config.template)[0]; return this.tip; }; _proto.setContent = function setContent() { - var $tip = $(this.getTipElement()); + var $tip = $$$1(this.getTipElement()); this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle()); $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW); }; @@ -2762,13 +2807,13 @@ var Tooltip = function () { var html = this.config.html; if (typeof content === 'object' && (content.nodeType || content.jquery)) { - // content is a DOM node or a jQuery + // Content is a DOM node or a jQuery if (html) { - if (!$(content).parent().is($element)) { + if (!$$$1(content).parent().is($element)) { $element.empty().append(content); } } else { - $element.text($(content).text()); + $element.text($$$1(content).text()); } } else { $element[html ? 'html' : 'text'](content); @@ -2783,7 +2828,7 @@ var Tooltip = function () { } return title; - }; // private + }; // Private _proto._getAttachment = function _getAttachment(placement) { @@ -2796,26 +2841,26 @@ var Tooltip = function () { 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) { + $$$1(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) { return _this3.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) { + $$$1(_this3.element).on(eventIn, _this3.config.selector, function (event) { return _this3._enter(event); }).on(eventOut, _this3.config.selector, function (event) { return _this3._leave(event); }); } - $(_this3.element).closest('.modal').on('hide.bs.modal', function () { + $$$1(_this3.element).closest('.modal').on('hide.bs.modal', function () { return _this3.hide(); }); }); if (this.config.selector) { - this.config = $.extend({}, this.config, { + this.config = _extends({}, this.config, { trigger: 'manual', selector: '' }); @@ -2835,18 +2880,18 @@ var Tooltip = function () { _proto._enter = function _enter(event, context) { var dataKey = this.constructor.DATA_KEY; - context = context || $(event.currentTarget).data(dataKey); + context = context || $$$1(event.currentTarget).data(dataKey); if (!context) { context = new this.constructor(event.currentTarget, this._getDelegateConfig()); - $(event.currentTarget).data(dataKey, context); + $$$1(event.currentTarget).data(dataKey, context); } if (event) { context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; } - if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) { + if ($$$1(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) { context._hoverState = HoverState.SHOW; return; } @@ -2868,11 +2913,11 @@ var Tooltip = function () { _proto._leave = function _leave(event, context) { var dataKey = this.constructor.DATA_KEY; - context = context || $(event.currentTarget).data(dataKey); + context = context || $$$1(event.currentTarget).data(dataKey); if (!context) { context = new this.constructor(event.currentTarget, this._getDelegateConfig()); - $(event.currentTarget).data(dataKey, context); + $$$1(event.currentTarget).data(dataKey, context); } if (event) { @@ -2909,7 +2954,7 @@ var Tooltip = function () { }; _proto._getConfig = function _getConfig(config) { - config = $.extend({}, this.constructor.Default, $(this.element).data(), config); + config = _extends({}, this.constructor.Default, $$$1(this.element).data(), config); if (typeof config.delay === 'number') { config.delay = { @@ -2945,7 +2990,7 @@ var Tooltip = function () { }; _proto._cleanTipClass = function _cleanTipClass() { - var $tip = $(this.getTipElement()); + var $tip = $$$1(this.getTipElement()); var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); if (tabClass !== null && tabClass.length > 0) { @@ -2967,17 +3012,17 @@ var Tooltip = function () { return; } - $(tip).removeClass(ClassName.FADE); + $$$1(tip).removeClass(ClassName.FADE); this.config.animation = false; this.hide(); this.show(); this.config.animation = initConfigAnimation; - }; // static + }; // Static Tooltip._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { - var data = $(this).data(DATA_KEY); + var data = $$$1(this).data(DATA_KEY); var _config = typeof config === 'object' && config; @@ -2987,12 +3032,12 @@ var Tooltip = function () { if (!data) { data = new Tooltip(this, _config); - $(this).data(DATA_KEY, data); + $$$1(this).data(DATA_KEY, data); } if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new Error("No method named \"" + config + "\""); + throw new TypeError("No method named \"" + config + "\""); } data[config](); @@ -3000,7 +3045,7 @@ var Tooltip = function () { }); }; - createClass(Tooltip, null, [{ + _createClass(Tooltip, null, [{ key: "VERSION", get: function get() { return VERSION; @@ -3045,11 +3090,11 @@ var Tooltip = function () { */ - $.fn[NAME] = Tooltip._jQueryInterface; - $.fn[NAME].Constructor = Tooltip; + $$$1.fn[NAME] = Tooltip._jQueryInterface; + $$$1.fn[NAME].Constructor = Tooltip; - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; return Tooltip._jQueryInterface; }; @@ -3058,31 +3103,31 @@ var Tooltip = function () { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.2): popover.js + * Bootstrap (v4.0.0): popover.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ -var Popover = function () { +var Popover = function ($$$1) { /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ var NAME = 'popover'; - var VERSION = '4.0.0-beta.2'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.popover'; var EVENT_KEY = "." + DATA_KEY; - var JQUERY_NO_CONFLICT = $.fn[NAME]; + 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 = $.extend({}, Tooltip.Default, { + var Default = _extends({}, Tooltip.Default, { placement: 'right', trigger: 'click', content: '', template: '' }); - var DefaultType = $.extend({}, Tooltip.DefaultType, { + var DefaultType = _extends({}, Tooltip.DefaultType, { content: '(string|element|function)' }); var ClassName = { @@ -3115,7 +3160,7 @@ var Popover = function () { var Popover = /*#__PURE__*/ function (_Tooltip) { - inheritsLoose(Popover, _Tooltip); + _inheritsLoose(Popover, _Tooltip); function Popover() { return _Tooltip.apply(this, arguments) || this; @@ -3123,46 +3168,53 @@ var Popover = function () { var _proto = Popover.prototype; - // overrides + // Overrides _proto.isWithContent = function isWithContent() { return this.getTitle() || this._getContent(); }; _proto.addAttachmentClass = function addAttachmentClass(attachment) { - $(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); + $$$1(this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); }; _proto.getTipElement = function getTipElement() { - this.tip = this.tip || $(this.config.template)[0]; + this.tip = this.tip || $$$1(this.config.template)[0]; return this.tip; }; _proto.setContent = function setContent() { - var $tip = $(this.getTipElement()); // we use append for html objects to maintain js events + var $tip = $$$1(this.getTipElement()); // We use append for html objects to maintain js events this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); - this.setElementContent($tip.find(Selector.CONTENT), this._getContent()); + + var content = this._getContent(); + + if (typeof content === 'function') { + content = content.call(this.element); + } + + 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') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content); + return this.element.getAttribute('data-content') || this.config.content; }; _proto._cleanTipClass = function _cleanTipClass() { - var $tip = $(this.getTipElement()); + var $tip = $$$1(this.getTipElement()); var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); if (tabClass !== null && tabClass.length > 0) { $tip.removeClass(tabClass.join('')); } - }; // static + }; // Static Popover._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { - var data = $(this).data(DATA_KEY); + var data = $$$1(this).data(DATA_KEY); var _config = typeof config === 'object' ? config : null; @@ -3172,12 +3224,12 @@ var Popover = function () { if (!data) { data = new Popover(this, _config); - $(this).data(DATA_KEY, data); + $$$1(this).data(DATA_KEY, data); } if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new Error("No method named \"" + config + "\""); + throw new TypeError("No method named \"" + config + "\""); } data[config](); @@ -3185,9 +3237,9 @@ var Popover = function () { }); }; - createClass(Popover, null, [{ + _createClass(Popover, null, [{ key: "VERSION", - // getters + // Getters get: function get() { return VERSION; } @@ -3231,11 +3283,11 @@ var Popover = function () { */ - $.fn[NAME] = Popover._jQueryInterface; - $.fn[NAME].Constructor = Popover; + $$$1.fn[NAME] = Popover._jQueryInterface; + $$$1.fn[NAME].Constructor = Popover; - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; return Popover._jQueryInterface; }; @@ -3244,23 +3296,23 @@ var Popover = function () { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.2): scrollspy.js + * Bootstrap (v4.0.0): scrollspy.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ -var ScrollSpy = function () { +var ScrollSpy = function ($$$1) { /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ var NAME = 'scrollspy'; - var VERSION = '4.0.0-beta.2'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.scrollspy'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; - var JQUERY_NO_CONFLICT = $.fn[NAME]; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; var Default = { offset: 10, method: 'auto', @@ -3317,42 +3369,42 @@ var ScrollSpy = function () { this._targets = []; this._activeTarget = null; this._scrollHeight = 0; - $(this._scrollElement).on(Event.SCROLL, function (event) { + $$$1(this._scrollElement).on(Event.SCROLL, function (event) { return _this._process(event); }); this.refresh(); this._process(); - } // getters + } // Getters var _proto = ScrollSpy.prototype; - // public + // Public _proto.refresh = function refresh() { var _this2 = this; - var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET; + var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION; var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; this._offsets = []; this._targets = []; this._scrollHeight = this._getScrollHeight(); - var targets = $.makeArray($(this._selector)); + var targets = $$$1.makeArray($$$1(this._selector)); targets.map(function (element) { var target; var targetSelector = Util.getSelectorFromElement(element); if (targetSelector) { - target = $(targetSelector)[0]; + target = $$$1(targetSelector)[0]; } if (target) { var targetBCR = target.getBoundingClientRect(); if (targetBCR.width || targetBCR.height) { - // todo (fat): remove sketch reliance on jQuery position/offset - return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; + // TODO (fat): remove sketch reliance on jQuery position/offset + return [$$$1(target)[offsetMethod]().top + offsetBase, targetSelector]; } } @@ -3369,8 +3421,8 @@ var ScrollSpy = function () { }; _proto.dispose = function dispose() { - $.removeData(this._element, DATA_KEY); - $(this._scrollElement).off(EVENT_KEY); + $$$1.removeData(this._element, DATA_KEY); + $$$1(this._scrollElement).off(EVENT_KEY); this._element = null; this._scrollElement = null; this._config = null; @@ -3379,18 +3431,18 @@ var ScrollSpy = function () { this._targets = null; this._activeTarget = null; this._scrollHeight = null; - }; // private + }; // Private _proto._getConfig = function _getConfig(config) { - config = $.extend({}, Default, config); + config = _extends({}, Default, config); if (typeof config.target !== 'string') { - var id = $(config.target).attr('id'); + var id = $$$1(config.target).attr('id'); if (!id) { id = Util.getUID(NAME); - $(config.target).attr('id', id); + $$$1(config.target).attr('id', id); } config.target = "#" + id; @@ -3461,7 +3513,7 @@ var ScrollSpy = function () { queries = queries.map(function (selector) { return selector + "[data-target=\"" + target + "\"]," + (selector + "[href=\"" + target + "\"]"); }); - var $link = $(queries.join(',')); + var $link = $$$1(queries.join(',')); if ($link.hasClass(ClassName.DROPDOWN_ITEM)) { $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); @@ -3476,30 +3528,30 @@ var ScrollSpy = function () { $link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE); } - $(this._scrollElement).trigger(Event.ACTIVATE, { + $$$1(this._scrollElement).trigger(Event.ACTIVATE, { relatedTarget: target }); }; _proto._clear = function _clear() { - $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE); - }; // static + $$$1(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE); + }; // Static ScrollSpy._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { - var data = $(this).data(DATA_KEY); + var data = $$$1(this).data(DATA_KEY); var _config = typeof config === 'object' && config; if (!data) { data = new ScrollSpy(this, _config); - $(this).data(DATA_KEY, data); + $$$1(this).data(DATA_KEY, data); } if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new Error("No method named \"" + config + "\""); + throw new TypeError("No method named \"" + config + "\""); } data[config](); @@ -3507,7 +3559,7 @@ var ScrollSpy = function () { }); }; - createClass(ScrollSpy, null, [{ + _createClass(ScrollSpy, null, [{ key: "VERSION", get: function get() { return VERSION; @@ -3527,11 +3579,11 @@ var ScrollSpy = function () { */ - $(window).on(Event.LOAD_DATA_API, function () { - var scrollSpys = $.makeArray($(Selector.DATA_SPY)); + $$$1(window).on(Event.LOAD_DATA_API, function () { + var scrollSpys = $$$1.makeArray($$$1(Selector.DATA_SPY)); for (var i = scrollSpys.length; i--;) { - var $spy = $(scrollSpys[i]); + var $spy = $$$1(scrollSpys[i]); ScrollSpy._jQueryInterface.call($spy, $spy.data()); } @@ -3542,11 +3594,11 @@ var ScrollSpy = function () { * ------------------------------------------------------------------------ */ - $.fn[NAME] = ScrollSpy._jQueryInterface; - $.fn[NAME].Constructor = ScrollSpy; + $$$1.fn[NAME] = ScrollSpy._jQueryInterface; + $$$1.fn[NAME].Constructor = ScrollSpy; - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; return ScrollSpy._jQueryInterface; }; @@ -3555,23 +3607,23 @@ var ScrollSpy = function () { /** * -------------------------------------------------------------------------- - * Bootstrap (v4.0.0-beta.2): tab.js + * Bootstrap (v4.0.0): tab.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ -var Tab = function () { +var Tab = function ($$$1) { /** * ------------------------------------------------------------------------ * Constants * ------------------------------------------------------------------------ */ var NAME = 'tab'; - var VERSION = '4.0.0-beta.2'; + var VERSION = '4.0.0'; var DATA_KEY = 'bs.tab'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; - var JQUERY_NO_CONFLICT = $.fn[NAME]; + var JQUERY_NO_CONFLICT = $$$1.fn[NAME]; var TRANSITION_DURATION = 150; var Event = { HIDE: "hide" + EVENT_KEY, @@ -3608,62 +3660,62 @@ var Tab = function () { function () { function Tab(element) { this._element = element; - } // getters + } // Getters var _proto = Tab.prototype; - // public + // Public _proto.show = function show() { var _this = 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 && $$$1(this._element).hasClass(ClassName.ACTIVE) || $$$1(this._element).hasClass(ClassName.DISABLED)) { return; } var target; var previous; - var listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0]; + var listElement = $$$1(this._element).closest(Selector.NAV_LIST_GROUP)[0]; var selector = Util.getSelectorFromElement(this._element); if (listElement) { var itemSelector = listElement.nodeName === 'UL' ? Selector.ACTIVE_UL : Selector.ACTIVE; - previous = $.makeArray($(listElement).find(itemSelector)); + previous = $$$1.makeArray($$$1(listElement).find(itemSelector)); previous = previous[previous.length - 1]; } - var hideEvent = $.Event(Event.HIDE, { + var hideEvent = $$$1.Event(Event.HIDE, { relatedTarget: this._element }); - var showEvent = $.Event(Event.SHOW, { + var showEvent = $$$1.Event(Event.SHOW, { relatedTarget: previous }); if (previous) { - $(previous).trigger(hideEvent); + $$$1(previous).trigger(hideEvent); } - $(this._element).trigger(showEvent); + $$$1(this._element).trigger(showEvent); if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) { return; } if (selector) { - target = $(selector)[0]; + target = $$$1(selector)[0]; } this._activate(this._element, listElement); var complete = function complete() { - var hiddenEvent = $.Event(Event.HIDDEN, { + var hiddenEvent = $$$1.Event(Event.HIDDEN, { relatedTarget: _this._element }); - var shownEvent = $.Event(Event.SHOWN, { + var shownEvent = $$$1.Event(Event.SHOWN, { relatedTarget: previous }); - $(previous).trigger(hiddenEvent); - $(_this._element).trigger(shownEvent); + $$$1(previous).trigger(hiddenEvent); + $$$1(_this._element).trigger(shownEvent); }; if (target) { @@ -3674,9 +3726,9 @@ var Tab = function () { }; _proto.dispose = function dispose() { - $.removeData(this._element, DATA_KEY); + $$$1.removeData(this._element, DATA_KEY); this._element = null; - }; // private + }; // Private _proto._activate = function _activate(element, container, callback) { @@ -3685,36 +3737,32 @@ var Tab = function () { var activeElements; if (container.nodeName === 'UL') { - activeElements = $(container).find(Selector.ACTIVE_UL); + activeElements = $$$1(container).find(Selector.ACTIVE_UL); } else { - activeElements = $(container).children(Selector.ACTIVE); + activeElements = $$$1(container).children(Selector.ACTIVE); } var active = activeElements[0]; - var isTransitioning = callback && Util.supportsTransitionEnd() && active && $(active).hasClass(ClassName.FADE); + 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) { - $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); + $$$1(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); } else { complete(); } - - if (active) { - $(active).removeClass(ClassName.SHOW); - } }; - _proto._transitionComplete = function _transitionComplete(element, active, isTransitioning, callback) { + _proto._transitionComplete = function _transitionComplete(element, active, callback) { if (active) { - $(active).removeClass(ClassName.ACTIVE); - var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0]; + $$$1(active).removeClass(ClassName.SHOW + " " + ClassName.ACTIVE); + var dropdownChild = $$$1(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0]; if (dropdownChild) { - $(dropdownChild).removeClass(ClassName.ACTIVE); + $$$1(dropdownChild).removeClass(ClassName.ACTIVE); } if (active.getAttribute('role') === 'tab') { @@ -3722,24 +3770,20 @@ var Tab = function () { } } - $(element).addClass(ClassName.ACTIVE); + $$$1(element).addClass(ClassName.ACTIVE); if (element.getAttribute('role') === 'tab') { element.setAttribute('aria-selected', true); } - if (isTransitioning) { - Util.reflow(element); - $(element).addClass(ClassName.SHOW); - } else { - $(element).removeClass(ClassName.FADE); - } + Util.reflow(element); + $$$1(element).addClass(ClassName.SHOW); - if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { - var dropdownElement = $(element).closest(Selector.DROPDOWN)[0]; + if (element.parentNode && $$$1(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { + var dropdownElement = $$$1(element).closest(Selector.DROPDOWN)[0]; if (dropdownElement) { - $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); + $$$1(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); } element.setAttribute('aria-expanded', true); @@ -3748,12 +3792,12 @@ var Tab = function () { if (callback) { callback(); } - }; // static + }; // Static Tab._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { - var $this = $(this); + var $this = $$$1(this); var data = $this.data(DATA_KEY); if (!data) { @@ -3763,7 +3807,7 @@ var Tab = function () { if (typeof config === 'string') { if (typeof data[config] === 'undefined') { - throw new Error("No method named \"" + config + "\""); + throw new TypeError("No method named \"" + config + "\""); } data[config](); @@ -3771,7 +3815,7 @@ var Tab = function () { }); }; - createClass(Tab, null, [{ + _createClass(Tab, null, [{ key: "VERSION", get: function get() { return VERSION; @@ -3786,10 +3830,10 @@ var Tab = function () { */ - $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { + $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { event.preventDefault(); - Tab._jQueryInterface.call($(this), 'show'); + Tab._jQueryInterface.call($$$1(this), 'show'); }); /** * ------------------------------------------------------------------------ @@ -3797,11 +3841,11 @@ var Tab = function () { * ------------------------------------------------------------------------ */ - $.fn[NAME] = Tab._jQueryInterface; - $.fn[NAME].Constructor = Tab; + $$$1.fn[NAME] = Tab._jQueryInterface; + $$$1.fn[NAME].Constructor = Tab; - $.fn[NAME].noConflict = function () { - $.fn[NAME] = JQUERY_NO_CONFLICT; + $$$1.fn[NAME].noConflict = function () { + $$$1.fn[NAME] = JQUERY_NO_CONFLICT; return Tab._jQueryInterface; }; @@ -3815,12 +3859,12 @@ var Tab = function () { * -------------------------------------------------------------------------- */ -(function () { - if (typeof $ === 'undefined') { - throw new Error('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.'); +(function ($$$1) { + if (typeof $$$1 === 'undefined') { + throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.'); } - var version = $.fn.jquery.split(' ')[0].split('.'); + var version = $$$1.fn.jquery.split(' ')[0].split('.'); var minMajor = 1; var ltMajor = 2; var minMinor = 9; @@ -3844,7 +3888,6 @@ exports.Scrollspy = ScrollSpy; exports.Tab = Tab; exports.Tooltip = Tooltip; -return exports; +Object.defineProperty(exports, '__esModule', { value: true }); -}({},$,Popper)); -//# sourceMappingURL=bootstrap.js.map +}))); diff --git a/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_alert.scss b/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_alert.scss index 66fba24ead2..dd43e2376a1 100644 --- a/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_alert.scss +++ b/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_alert.scss @@ -27,6 +27,8 @@ // Expand the right padding and account for the close button's positioning. .alert-dismissible { + padding-right: ($close-font-size + $alert-padding-x * 2); + // Adjust close link position .close { position: absolute; @@ -44,6 +46,6 @@ @each $color, $value in $theme-colors { .alert-#{$color} { - @include alert-variant(theme-color-level($color, -10), theme-color-level($color, -9), theme-color-level($color, 6)); + @include alert-variant(theme-color-level($color, $alert-bg-level), theme-color-level($color, $alert-border-level), theme-color-level($color, $alert-color-level)); } } diff --git a/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_button-group.scss b/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_button-group.scss index 1a373f32328..c1b826536c5 100644 --- a/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_button-group.scss +++ b/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_button-group.scss @@ -14,12 +14,12 @@ // Bring the hover, focused, and "active" buttons to the front to overlay // the borders properly @include hover { - z-index: 2; + z-index: 1; } &:focus, &:active, &.active { - z-index: 2; + z-index: 1; } } @@ -28,7 +28,7 @@ .btn + .btn-group, .btn-group + .btn, .btn-group + .btn-group { - margin-left: -$input-btn-border-width; + margin-left: -$btn-border-width; } } @@ -43,48 +43,23 @@ } } -.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { - border-radius: 0; -} - -// Set corners individual because sometimes a single button can be in a .btn-group -// and we need :first-child and :last-child to both match -.btn-group > .btn:first-child { - margin-left: 0; - - &:not(:last-child):not(.dropdown-toggle) { - @include border-right-radius(0); +.btn-group { + > .btn:first-child { + margin-left: 0; } -} -// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu -// immediately after it -.btn-group > .btn:last-child:not(:first-child), -.btn-group > .dropdown-toggle:not(:first-child) { - @include border-left-radius(0); -} -// Custom edits for including btn-groups within btn-groups (useful for including -// dropdown buttons within a btn-group) -.btn-group > .btn-group { - float: left; -} - -.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} - -.btn-group > .btn-group:first-child:not(:last-child) { - > .btn:last-child, - > .dropdown-toggle { + // Reset rounded corners + > .btn:not(:last-child):not(.dropdown-toggle), + > .btn-group:not(:last-child) > .btn { @include border-right-radius(0); } -} -.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { - @include border-left-radius(0); + > .btn:not(:first-child), + > .btn-group:not(:first-child) > .btn { + @include border-left-radius(0); + } } - // Sizing // // Remix the default button sizing classes into new ones for easier manipulation. @@ -97,9 +72,9 @@ // Split button dropdowns // -.btn + .dropdown-toggle-split { - padding-right: $input-btn-padding-x * .75; - padding-left: $input-btn-padding-x * .75; +.dropdown-toggle-split { + padding-right: $btn-padding-x * .75; + padding-left: $btn-padding-x * .75; &::after { margin-left: 0; @@ -107,13 +82,13 @@ } .btn-sm + .dropdown-toggle-split { - padding-right: $input-btn-padding-x-sm * .75; - padding-left: $input-btn-padding-x-sm * .75; + padding-right: $btn-padding-x-sm * .75; + padding-left: $btn-padding-x-sm * .75; } .btn-lg + .dropdown-toggle-split { - padding-right: $input-btn-padding-x-lg * .75; - padding-left: $input-btn-padding-x-lg * .75; + padding-right: $btn-padding-x-lg * .75; + padding-left: $btn-padding-x-lg * .75; } @@ -147,36 +122,18 @@ > .btn + .btn-group, > .btn-group + .btn, > .btn-group + .btn-group { - margin-top: -$input-btn-border-width; + margin-top: -$btn-border-width; margin-left: 0; } - > .btn { - &:not(:first-child):not(:last-child) { - border-radius: 0; - } - - &:first-child:not(:last-child) { - @include border-bottom-radius(0); - } - - &:last-child:not(:first-child) { - @include border-top-radius(0); - } + // Reset rounded corners + > .btn:not(:last-child):not(.dropdown-toggle), + > .btn-group:not(:last-child) > .btn { + @include border-bottom-radius(0); } - > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; - } - - > .btn-group:first-child:not(:last-child) { - > .btn:last-child, - > .dropdown-toggle { - @include border-bottom-radius(0); - } - } - - > .btn-group:last-child:not(:first-child) > .btn:first-child { + > .btn:not(:first-child), + > .btn-group:not(:first-child) > .btn { @include border-top-radius(0); } } @@ -194,13 +151,15 @@ // See https://github.com/twbs/bootstrap/pull/12794 and // https://github.com/twbs/bootstrap/pull/14559 for more information. -[data-toggle="buttons"] { +.btn-group-toggle { > .btn, > .btn-group > .btn { + margin-bottom: 0; // Override default `` elements a.btn.disabled, -fieldset[disabled] a.btn { +fieldset:disabled a.btn { pointer-events: none; } @@ -58,11 +68,7 @@ fieldset[disabled] a.btn { @each $color, $value in $theme-colors { .btn-outline-#{$color} { - @if $color == "light" { - @include button-outline-variant($value, $gray-900); - } @else { - @include button-outline-variant($value, $white); - } + @include button-outline-variant($value); } } @@ -86,6 +92,7 @@ fieldset[disabled] a.btn { &:focus, &.focus { + text-decoration: $link-hover-decoration; border-color: transparent; box-shadow: none; } @@ -104,11 +111,11 @@ fieldset[disabled] a.btn { // .btn-lg { - @include button-size($input-btn-padding-y-lg, $input-btn-padding-x-lg, $font-size-lg, $input-btn-line-height-lg, $btn-border-radius-lg); + @include button-size($btn-padding-y-lg, $btn-padding-x-lg, $font-size-lg, $btn-line-height-lg, $btn-border-radius-lg); } .btn-sm { - @include button-size($input-btn-padding-y-sm, $input-btn-padding-x-sm, $font-size-sm, $input-btn-line-height-sm, $btn-border-radius-sm); + @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $font-size-sm, $btn-line-height-sm, $btn-border-radius-sm); } @@ -119,11 +126,11 @@ fieldset[disabled] a.btn { .btn-block { display: block; width: 100%; -} -// Vertically space out multiple block buttons -.btn-block + .btn-block { - margin-top: $btn-block-spacing-y; + // Vertically space out multiple block buttons + + .btn-block { + margin-top: $btn-block-spacing-y; + } } // Specificity overrides diff --git a/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_card.scss b/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_card.scss index a739f193558..4c4845c0bb1 100644 --- a/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_card.scss +++ b/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_card.scss @@ -172,14 +172,17 @@ display: flex; flex-direction: column; - .card { + // The child selector allows nested `.card` within `.card-group` + // to display properly. + > .card { margin-bottom: $card-group-margin; } @include media-breakpoint-up(sm) { flex-flow: row wrap; - - .card { + // The child selector allows nested `.card` within `.card-group` + // to display properly. + > .card { // Flexbugs #4: https://github.com/philipwalton/flexbugs#4-flex-shorthand-declarations-with-unitless-flex-basis-values-are-ignored flex: 1 0 0%; margin-bottom: 0; @@ -194,10 +197,12 @@ &:first-child { @include border-right-radius(0); - .card-img-top { + .card-img-top, + .card-header { border-top-right-radius: 0; } - .card-img-bottom { + .card-img-bottom, + .card-footer { border-bottom-right-radius: 0; } } @@ -205,10 +210,12 @@ &:last-child { @include border-left-radius(0); - .card-img-top { + .card-img-top, + .card-header { border-top-left-radius: 0; } - .card-img-bottom { + .card-img-bottom, + .card-footer { border-bottom-left-radius: 0; } } @@ -216,20 +223,24 @@ &:only-child { @include border-radius($card-border-radius); - .card-img-top { + .card-img-top, + .card-header { @include border-top-radius($card-border-radius); } - .card-img-bottom { + .card-img-bottom, + .card-footer { @include border-bottom-radius($card-border-radius); } } &:not(:first-child):not(:last-child):not(:only-child) { - border-radius: 0; + @include border-radius(0); .card-img-top, - .card-img-bottom { - border-radius: 0; + .card-img-bottom, + .card-header, + .card-footer { + @include border-radius(0); } } } diff --git a/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_carousel.scss b/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_carousel.scss index c3c207387c9..72a503445b3 100644 --- a/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_carousel.scss +++ b/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_carousel.scss @@ -91,13 +91,13 @@ .carousel-control-prev { left: 0; @if $enable-gradients { - background: linear-gradient(90deg, rgba(0,0,0,.25), rgba(0,0,0,.001)); + background: linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .001)); } } .carousel-control-next { right: 0; @if $enable-gradients { - background: linear-gradient(270deg, rgba(0,0,0,.25), rgba(0,0,0,.001)); + background: linear-gradient(270deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .001)); } } diff --git a/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_close.scss b/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_close.scss index 897d4868443..871cb08fd8e 100644 --- a/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_close.scss +++ b/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_close.scss @@ -12,6 +12,11 @@ text-decoration: none; opacity: .75; } + + // Opinionated: add "hand" cursor to non-disabled .close elements + &:not(:disabled):not(.disabled) { + cursor: pointer; + } } // Additional properties for button version @@ -22,7 +27,7 @@ // stylelint-disable property-no-vendor-prefix, selector-no-qualifying-type button.close { padding: 0; - background: transparent; + background-color: transparent; border: 0; -webkit-appearance: none; } diff --git a/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_code.scss b/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_code.scss index 759da15b791..9de20fa0dee 100644 --- a/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_code.scss +++ b/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_code.scss @@ -8,24 +8,20 @@ samp { // Inline code code { - padding: $code-padding-y $code-padding-x; font-size: $code-font-size; color: $code-color; - background-color: $code-bg; - @include border-radius($border-radius); + word-break: break-word; // Streamline the style when inside anchors to avoid broken underline and more a > & { - padding: 0; color: inherit; - background-color: inherit; } } // User input typically entered via keyboard kbd { - padding: $code-padding-y $code-padding-x; - font-size: $code-font-size; + padding: $kbd-padding-y $kbd-padding-x; + font-size: $kbd-font-size; color: $kbd-color; background-color: $kbd-bg; @include border-radius($border-radius-sm); @@ -42,18 +38,14 @@ kbd { // Blocks of code pre { display: block; - margin-top: 0; - margin-bottom: 1rem; font-size: $code-font-size; color: $pre-color; // Account for some code outputs that place code tags in pre tags code { - padding: 0; font-size: inherit; color: inherit; - background-color: transparent; - border-radius: 0; + word-break: normal; } } diff --git a/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_custom-forms.scss b/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_custom-forms.scss index a521dbdc944..2d83f7ea688 100644 --- a/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_custom-forms.scss +++ b/backend/vendor/assets/stylesheets/solidus_admin/bootstrap/_custom-forms.scss @@ -9,9 +9,13 @@ .custom-control { position: relative; - display: inline-flex; + display: block; min-height: (1rem * $line-height-base); padding-left: $custom-control-gutter; +} + +.custom-control-inline { + display: inline-flex; margin-right: $custom-control-spacer-x; } @@ -20,71 +24,107 @@ z-index: -1; // Put the input behind the label so it doesn't overlay text opacity: 0; - &:checked ~ .custom-control-indicator { + &:checked ~ .custom-control-label::before { color: $custom-control-indicator-checked-color; @include gradient-bg($custom-control-indicator-checked-bg); @include box-shadow($custom-control-indicator-checked-box-shadow); } - &:focus ~ .custom-control-indicator { + &:focus ~ .custom-control-label::before { // the mixin is not used here to make sure there is feedback box-shadow: $custom-control-indicator-focus-box-shadow; } - &:active ~ .custom-control-indicator { + &:active ~ .custom-control-label::before { color: $custom-control-indicator-active-color; - @include gradient-bg($custom-control-indicator-active-bg); + background-color: $custom-control-indicator-active-bg; @include box-shadow($custom-control-indicator-active-box-shadow); } &:disabled { - ~ .custom-control-indicator { - background-color: $custom-control-indicator-disabled-bg; - } + ~ .custom-control-label { + color: $custom-control-label-disabled-color; - ~ .custom-control-description { - color: $custom-control-description-disabled-color; + &::before { + background-color: $custom-control-indicator-disabled-bg; + } } } } -// Custom indicator +// Custom control indicators // -// Generates a shadow element to create our makeshift checkbox/radio background. +// Build the custom controls out of psuedo-elements. -.custom-control-indicator { - position: absolute; - top: (($line-height-base - $custom-control-indicator-size) / 2); - left: 0; - display: block; - width: $custom-control-indicator-size; - height: $custom-control-indicator-size; - pointer-events: none; - user-select: none; - background-color: $custom-control-indicator-bg; - background-repeat: no-repeat; - background-position: center center; - background-size: $custom-control-indicator-bg-size; - @include box-shadow($custom-control-indicator-box-shadow); +.custom-control-label { + margin-bottom: 0; + + // Background-color and (when enabled) gradient + &::before { + position: absolute; + top: (($line-height-base - $custom-control-indicator-size) / 2); + left: 0; + display: block; + width: $custom-control-indicator-size; + height: $custom-control-indicator-size; + pointer-events: none; + content: ""; + user-select: none; + background-color: $custom-control-indicator-bg; + @include box-shadow($custom-control-indicator-box-shadow); + } + + // Foreground (icon) + &::after { + position: absolute; + top: (($line-height-base - $custom-control-indicator-size) / 2); + left: 0; + display: block; + 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; + } } + // Checkboxes // // Tweak just a few things for checkboxes. .custom-checkbox { - .custom-control-indicator { + .custom-control-label::before { @include border-radius($custom-checkbox-indicator-border-radius); } - .custom-control-input:checked ~ .custom-control-indicator { - background-image: $custom-checkbox-indicator-icon-checked; + .custom-control-input:checked ~ .custom-control-label { + &::before { + @include gradient-bg($custom-control-indicator-checked-bg); + } + &::after { + background-image: $custom-checkbox-indicator-icon-checked; + } } - .custom-control-input:indeterminate ~ .custom-control-indicator { - background-color: $custom-checkbox-indicator-indeterminate-bg; - background-image: $custom-checkbox-indicator-icon-indeterminate; - @include box-shadow($custom-checkbox-indicator-indeterminate-box-shadow); + .custom-control-input:indeterminate ~ .custom-control-label { + &::before { + @include gradient-bg($custom-checkbox-indicator-indeterminate-bg); + @include box-shadow($custom-checkbox-indicator-indeterminate-box-shadow); + } + &::after { + background-image: $custom-checkbox-indicator-icon-indeterminate; + } + } + + .custom-control-input:disabled { + &:checked ~ .custom-control-label::before { + background-color: $custom-control-indicator-checked-disabled-bg; + } + &:indeterminate ~ .custom-control-label::before { + background-color: $custom-control-indicator-checked-disabled-bg; + } } } @@ -93,30 +133,22 @@ // Tweak just a few things for radios. .custom-radio { - .custom-control-indicator { + .custom-control-label::before { border-radius: $custom-radio-indicator-border-radius; } - .custom-control-input:checked ~ .custom-control-indicator { - background-image: $custom-radio-indicator-icon-checked; + .custom-control-input:checked ~ .custom-control-label { + &::before { + @include gradient-bg($custom-control-indicator-checked-bg); + } + &::after { + background-image: $custom-radio-indicator-icon-checked; + } } -} - - -// Layout options -// -// By default radios and checkboxes are `inline-block` with no additional spacing -// set. Use these optional classes to tweak the layout. -.custom-controls-stacked { - display: flex; - flex-direction: column; - - .custom-control { - margin-bottom: $custom-control-spacer-y; - - + .custom-control { - margin-left: 0; + .custom-control-input:disabled { + &:checked ~ .custom-control-label::before { + background-color: $custom-control-indicator-checked-disabled-bg; } } } @@ -130,8 +162,8 @@ .custom-select { display: inline-block; - max-width: 100%; - height: $input-height; + 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; line-height: $custom-select-line-height; color: $custom-select-color; @@ -148,12 +180,12 @@ &:focus { border-color: $custom-select-focus-border-color; - outline: none; - @include box-shadow($custom-select-focus-box-shadow); + outline: 0; + box-shadow: $custom-select-focus-box-shadow; &::-ms-value { // For visual consistency with other platforms/browsers, - // supress the default white text on blue background highlight given to + // suppress the default white text on blue background highlight given to // the selected option text when the (still closed) s in some browsers, due to the limited stylability of ` - - - +
+ + + +
diff --git a/backend/app/views/spree/admin/tax_rates/_form.html.erb b/backend/app/views/spree/admin/tax_rates/_form.html.erb index 842543c3bff..9b4e27ea26e 100644 --- a/backend/app/views/spree/admin/tax_rates/_form.html.erb +++ b/backend/app/views/spree/admin/tax_rates/_form.html.erb @@ -43,9 +43,11 @@
<%= f.text_field :starts_at, class: 'datepicker form-control datepicker-from', value: datepicker_field_value(f.object.starts_at), placeholder: Spree::TaxRate.human_attribute_name(:starts_at) %> - - - +
+ + + +
<%= f.text_field :expires_at, class: 'datepicker form-control datepicker-to', value: datepicker_field_value(f.object.expires_at), placeholder: Spree::TaxRate.human_attribute_name(:expires_at) %>
diff --git a/backend/app/views/spree/admin/users/index.html.erb b/backend/app/views/spree/admin/users/index.html.erb index ef703bc5e6b..61471cddb4e 100644 --- a/backend/app/views/spree/admin/users/index.html.erb +++ b/backend/app/views/spree/admin/users/index.html.erb @@ -36,9 +36,11 @@ <%= f.text_field :created_at_gt, class: 'datepicker form-control datepicker-from', value: params[:q].try!("[]", :created_at_gt), placeholder: t('spree.start') %> - - - +
+ + + +
<%= f.text_field :created_at_lt, class: 'datepicker form-control datepicker-to', value: params[:q].try!("[]", :created_at_lt), placeholder: t('spree.stop') %> From a89f95ee02c857bf11ad773464f1217851bcf7c3 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Thu, 18 Jan 2018 16:32:09 -0800 Subject: [PATCH 4/6] Fix input-group-addon in taxons form --- backend/app/views/spree/admin/taxons/_form.html.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/app/views/spree/admin/taxons/_form.html.erb b/backend/app/views/spree/admin/taxons/_form.html.erb index 25b89f4e314..f3baebcd403 100644 --- a/backend/app/views/spree/admin/taxons/_form.html.erb +++ b/backend/app/views/spree/admin/taxons/_form.html.erb @@ -10,7 +10,11 @@ <%= label_tag :permalink_part, Spree::Taxon.human_attribute_name(:permalink), class: 'required' %>
<% if @taxon.parent %> - <%= @taxon.permalink.split('/')[0...-1].join('/') + '/' %> +
+ + <%= @taxon.permalink.split('/')[0...-1].join('/') + '/' %> + +
<% end %> <%= text_field_tag :permalink_part, @permalink_part, class: 'fullwidth form-control' %>
From d49162120f2f1dc87616c7fb0284fdf1c3f1f49b Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Thu, 18 Jan 2018 16:37:41 -0800 Subject: [PATCH 5/6] Fix input-group-addon in tiered calculators --- .../promotions/calculators/fields/tiered_flat_rate.hbs | 8 ++++++-- .../promotions/calculators/fields/tiered_percent.hbs | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/backend/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_flat_rate.hbs b/backend/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_flat_rate.hbs index 9c2a0541fc3..8287c41b525 100644 --- a/backend/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_flat_rate.hbs +++ b/backend/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_flat_rate.hbs @@ -3,13 +3,17 @@
- $ +
+ $ +
- $ +
+ $ +
diff --git a/backend/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_percent.hbs b/backend/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_percent.hbs index 90e80d5abab..00b27498dec 100644 --- a/backend/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_percent.hbs +++ b/backend/app/assets/javascripts/spree/backend/templates/promotions/calculators/fields/tiered_percent.hbs @@ -3,7 +3,9 @@
- $ +
+ $ +
@@ -11,7 +13,9 @@
- % +
+ % +
From 5f27514243e7166c21da06bbe0c0584c7dbb991b Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Thu, 18 Jan 2018 16:41:15 -0800 Subject: [PATCH 6/6] Fix input-group-addon for inline payment edit --- .../views/spree/admin/payments/_list.html.erb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/backend/app/views/spree/admin/payments/_list.html.erb b/backend/app/views/spree/admin/payments/_list.html.erb index 38da052d392..c0519c05aa3 100644 --- a/backend/app/views/spree/admin/payments/_list.html.erb +++ b/backend/app/views/spree/admin/payments/_list.html.erb @@ -33,14 +33,16 @@
-
-
- <%= ::Money::Currency.find(@order.currency).symbol %> -
-
+ +
+
+ + <%= ::Money::Currency.find(@order.currency).symbol %> + +
<%= text_field_tag :amount, payment.amount, class: 'js-edit-amount align-right form-control' %> - -
+
+
<%= payment.display_amount.to_html %>