diff --git a/assets/javascripts/bootstrap-sprockets.js b/assets/javascripts/bootstrap-sprockets.js index 372f6032..a2407804 100644 --- a/assets/javascripts/bootstrap-sprockets.js +++ b/assets/javascripts/bootstrap-sprockets.js @@ -1,12 +1,12 @@ //= require ./bootstrap/util -//= require ./bootstrap/scrollspy +//= require ./bootstrap/alert //= require ./bootstrap/button +//= require ./bootstrap/carousel //= require ./bootstrap/collapse -//= require ./bootstrap/modal //= require ./bootstrap/dropdown -//= require ./bootstrap/carousel -//= require ./bootstrap/toast +//= require ./bootstrap/modal //= require ./bootstrap/tooltip //= require ./bootstrap/popover -//= require ./bootstrap/alert +//= require ./bootstrap/scrollspy //= require ./bootstrap/tab +//= require ./bootstrap/toast diff --git a/assets/javascripts/bootstrap.js b/assets/javascripts/bootstrap.js index 1dc569c4..bf520a0f 100644 --- a/assets/javascripts/bootstrap.js +++ b/assets/javascripts/bootstrap.js @@ -1,16 +1,16 @@ /*! - * Bootstrap v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap v4.3.0 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('popper.js'), require('jquery')) : - typeof define === 'function' && define.amd ? define(['exports', 'popper.js', 'jquery'], factory) : - (factory((global.bootstrap = {}),global.Popper,global.jQuery)); -}(this, (function (exports,Popper,$) { 'use strict'; + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) : + typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) : + (global = global || self, factory(global.bootstrap = {}, global.jQuery, global.Popper)); +}(this, function (exports, $, Popper) { 'use strict'; - Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; + Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper; function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { @@ -70,7 +70,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v4.2.1): util.js + * Bootstrap (v4.3.0): util.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -146,7 +146,11 @@ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : ''; } - return selector && document.querySelector(selector) ? selector : null; + try { + return document.querySelector(selector) ? selector : null; + } catch (err) { + return null; + } }, getTransitionDurationFromElement: function getTransitionDurationFromElement(element) { if (!element) { @@ -226,7 +230,7 @@ */ var NAME = 'alert'; - var VERSION = '4.2.1'; + var VERSION = '4.3.0'; var DATA_KEY = 'bs.alert'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -281,8 +285,8 @@ _proto.dispose = function dispose() { $.removeData(this._element, DATA_KEY); this._element = null; - }; // Private - + } // Private + ; _proto._getRootElement = function _getRootElement(element) { var selector = Util.getSelectorFromElement(element); @@ -324,8 +328,8 @@ _proto._destroyElement = function _destroyElement(element) { $(element).detach().trigger(Event.CLOSED).remove(); - }; // Static - + } // Static + ; Alert._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -391,7 +395,7 @@ */ var NAME$1 = 'button'; - var VERSION$1 = '4.2.1'; + var VERSION$1 = '4.3.0'; var DATA_KEY$1 = 'bs.button'; var EVENT_KEY$1 = "." + DATA_KEY$1; var DATA_API_KEY$1 = '.data-api'; @@ -477,8 +481,8 @@ _proto.dispose = function dispose() { $.removeData(this._element, DATA_KEY$1); this._element = null; - }; // Static - + } // Static + ; Button._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -545,7 +549,7 @@ */ var NAME$2 = 'carousel'; - var VERSION$2 = '4.2.1'; + var VERSION$2 = '4.3.0'; var DATA_KEY$2 = 'bs.carousel'; var EVENT_KEY$2 = "." + DATA_KEY$2; var DATA_API_KEY$2 = '.data-api'; @@ -740,8 +744,8 @@ this._isSliding = null; this._activeElement = null; this._indicatorsElement = null; - }; // Private - + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default, config); @@ -785,7 +789,9 @@ }); } - this._addTouchEventListeners(); + if (this._config.touch) { + this._addTouchEventListeners(); + } }; _proto._addTouchEventListeners = function _addTouchEventListeners() { @@ -1026,8 +1032,8 @@ if (isCycling) { this.cycle(); } - }; // Static - + } // Static + ; Carousel._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -1054,7 +1060,7 @@ } data[action](); - } else if (_config.interval) { + } else if (_config.interval && _config.ride) { data.pause(); data.cycle(); } @@ -1143,7 +1149,7 @@ */ var NAME$3 = 'collapse'; - var VERSION$3 = '4.2.1'; + var VERSION$3 = '4.3.0'; var DATA_KEY$3 = 'bs.collapse'; var EVENT_KEY$3 = "." + DATA_KEY$3; var DATA_API_KEY$3 = '.data-api'; @@ -1365,8 +1371,8 @@ this._element = null; this._triggerArray = null; this._isTransitioning = null; - }; // Private - + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default$1, config); @@ -1410,8 +1416,8 @@ if (triggerArray.length) { $(triggerArray).toggleClass(ClassName$3.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); } - }; // Static - + } // Static + ; Collapse._getTargetFromElement = function _getTargetFromElement(element) { var selector = Util.getSelectorFromElement(element); @@ -1503,7 +1509,7 @@ */ var NAME$4 = 'dropdown'; - var VERSION$4 = '4.2.1'; + var VERSION$4 = '4.3.0'; var DATA_KEY$4 = 'bs.dropdown'; var EVENT_KEY$4 = "." + DATA_KEY$4; var DATA_API_KEY$4 = '.data-api'; @@ -1732,8 +1738,8 @@ if (this._popper !== null) { this._popper.scheduleUpdate(); } - }; // Private - + } // Private + ; _proto._addEventListeners = function _addEventListeners() { var _this = this; @@ -1789,24 +1795,28 @@ return $(this._element).closest('.navbar').length > 0; }; - _proto._getPopperConfig = function _getPopperConfig() { + _proto._getOffset = function _getOffset() { var _this2 = this; - var offsetConf = {}; + var offset = {}; if (typeof this._config.offset === 'function') { - offsetConf.fn = function (data) { - data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets) || {}); + offset.fn = function (data) { + data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {}); return data; }; } else { - offsetConf.offset = this._config.offset; + offset.offset = this._config.offset; } + return offset; + }; + + _proto._getPopperConfig = function _getPopperConfig() { var popperConfig = { placement: this._getPlacement(), modifiers: { - offset: offsetConf, + offset: this._getOffset(), flip: { enabled: this._config.flip }, @@ -1824,8 +1834,8 @@ } return popperConfig; - }; // Static - + } // Static + ; Dropdown._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -1909,8 +1919,8 @@ } return parent || element.parentNode; - }; // eslint-disable-next-line complexity - + } // eslint-disable-next-line complexity + ; Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { // If not input/textarea: @@ -2025,7 +2035,7 @@ */ var NAME$5 = 'modal'; - var VERSION$5 = '4.2.1'; + var VERSION$5 = '4.3.0'; var DATA_KEY$5 = 'bs.modal'; var EVENT_KEY$5 = "." + DATA_KEY$5; var DATA_API_KEY$5 = '.data-api'; @@ -2058,6 +2068,7 @@ CLICK_DATA_API: "click" + EVENT_KEY$5 + DATA_API_KEY$5 }; var ClassName$5 = { + SCROLLABLE: 'modal-dialog-scrollable', SCROLLBAR_MEASURER: 'modal-scrollbar-measure', BACKDROP: 'modal-backdrop', OPEN: 'modal-open', @@ -2066,6 +2077,7 @@ }; var Selector$5 = { DIALOG: '.modal-dialog', + MODAL_BODY: '.modal-body', DATA_TOGGLE: '[data-toggle="modal"]', DATA_DISMISS: '[data-dismiss="modal"]', FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', @@ -2218,8 +2230,8 @@ _proto.handleUpdate = function handleUpdate() { this._adjustDialog(); - }; // Private - + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default$3, config); @@ -2243,7 +2255,11 @@ this._element.setAttribute('aria-modal', true); - this._element.scrollTop = 0; + if ($(this._dialog).hasClass(ClassName$5.SCROLLABLE)) { + this._dialog.querySelector(Selector$5.MODAL_BODY).scrollTop = 0; + } else { + this._element.scrollTop = 0; + } if (transition) { Util.reflow(this._element); @@ -2413,11 +2429,11 @@ } else if (callback) { callback(); } - }; // ---------------------------------------------------------------------- + } // ---------------------------------------------------------------------- // the following methods are used to handle overflowing modals // todo (fat): these should probably be refactored out of modal.js // ---------------------------------------------------------------------- - + ; _proto._adjustDialog = function _adjustDialog() { var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; @@ -2502,8 +2518,8 @@ var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); return scrollbarWidth; - }; // Static - + } // Static + ; Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { return this.each(function () { @@ -2601,7 +2617,7 @@ */ var NAME$6 = 'tooltip'; - var VERSION$6 = '4.2.1'; + var VERSION$6 = '4.3.0'; var DATA_KEY$6 = 'bs.tooltip'; var EVENT_KEY$6 = "." + DATA_KEY$6; var JQUERY_NO_CONFLICT$6 = $.fn[NAME$6]; @@ -2616,7 +2632,7 @@ html: 'boolean', selector: '(string|boolean)', placement: '(string|function)', - offset: '(number|string)', + offset: '(number|string|function)', container: '(string|element|boolean)', fallbackPlacement: '(string|array)', boundary: '(string|element)' @@ -2825,9 +2841,7 @@ this._popper = new Popper(this.element, tip, { placement: attachment, modifiers: { - offset: { - offset: this.config.offset - }, + offset: this._getOffset(), flip: { behavior: this.config.fallbackPlacement }, @@ -2936,8 +2950,8 @@ if (this._popper !== null) { this._popper.scheduleUpdate(); } - }; // Protected - + } // Protected + ; _proto.isWithContent = function isWithContent() { return Boolean(this.getTitle()); @@ -2983,8 +2997,25 @@ } return title; - }; // Private + } // Private + ; + _proto._getOffset = function _getOffset() { + var _this3 = this; + + var offset = {}; + + if (typeof this.config.offset === 'function') { + offset.fn = function (data) { + data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {}); + return data; + }; + } else { + offset.offset = this.config.offset; + } + + return offset; + }; _proto._getContainer = function _getContainer() { if (this.config.container === false) { @@ -3003,27 +3034,27 @@ }; _proto._setListeners = function _setListeners() { - var _this3 = this; + var _this4 = this; var triggers = this.config.trigger.split(' '); triggers.forEach(function (trigger) { if (trigger === 'click') { - $(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) { - return _this3.toggle(event); + $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) { + return _this4.toggle(event); }); } else if (trigger !== Trigger.MANUAL) { - var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN; - var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT; - $(_this3.element).on(eventIn, _this3.config.selector, function (event) { - return _this3._enter(event); - }).on(eventOut, _this3.config.selector, function (event) { - return _this3._leave(event); + var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN; + var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT; + $(_this4.element).on(eventIn, _this4.config.selector, function (event) { + return _this4._enter(event); + }).on(eventOut, _this4.config.selector, function (event) { + return _this4._leave(event); }); } }); $(this.element).closest('.modal').on('hide.bs.modal', function () { - if (_this3.element) { - _this3.hide(); + if (_this4.element) { + _this4.hide(); } }); @@ -3188,8 +3219,8 @@ this.hide(); this.show(); this.config.animation = initConfigAnimation; - }; // Static - + } // Static + ; Tooltip._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -3277,7 +3308,7 @@ */ var NAME$7 = 'popover'; - var VERSION$7 = '4.2.1'; + var VERSION$7 = '4.3.0'; var DATA_KEY$7 = 'bs.popover'; var EVENT_KEY$7 = "." + DATA_KEY$7; var JQUERY_NO_CONFLICT$7 = $.fn[NAME$7]; @@ -3360,8 +3391,8 @@ this.setElementContent($tip.find(Selector$7.CONTENT), content); $tip.removeClass(ClassName$7.FADE + " " + ClassName$7.SHOW); - }; // Private - + } // Private + ; _proto._getContent = function _getContent() { return this.element.getAttribute('data-content') || this.config.content; @@ -3374,8 +3405,8 @@ if (tabClass !== null && tabClass.length > 0) { $tip.removeClass(tabClass.join('')); } - }; // Static - + } // Static + ; Popover._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -3464,7 +3495,7 @@ */ var NAME$8 = 'scrollspy'; - var VERSION$8 = '4.2.1'; + var VERSION$8 = '4.3.0'; var DATA_KEY$8 = 'bs.scrollspy'; var EVENT_KEY$8 = "." + DATA_KEY$8; var DATA_API_KEY$6 = '.data-api'; @@ -3587,8 +3618,8 @@ this._targets = null; this._activeTarget = null; this._scrollHeight = null; - }; // Private - + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default$6, typeof config === 'object' && config ? config : {}); @@ -3695,8 +3726,8 @@ }).forEach(function (node) { return node.classList.remove(ClassName$8.ACTIVE); }); - }; // Static - + } // Static + ; ScrollSpy._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -3771,7 +3802,7 @@ */ var NAME$9 = 'tab'; - var VERSION$9 = '4.2.1'; + var VERSION$9 = '4.3.0'; var DATA_KEY$9 = 'bs.tab'; var EVENT_KEY$9 = "." + DATA_KEY$9; var DATA_API_KEY$7 = '.data-api'; @@ -3879,8 +3910,8 @@ _proto.dispose = function dispose() { $.removeData(this._element, DATA_KEY$9); this._element = null; - }; // Private - + } // Private + ; _proto._activate = function _activate(element, container, callback) { var _this2 = this; @@ -3922,7 +3953,10 @@ } Util.reflow(element); - $(element).addClass(ClassName$9.SHOW); + + if (element.classList.contains(ClassName$9.FADE)) { + element.classList.add(ClassName$9.SHOW); + } if (element.parentNode && $(element.parentNode).hasClass(ClassName$9.DROPDOWN_MENU)) { var dropdownElement = $(element).closest(Selector$9.DROPDOWN)[0]; @@ -3938,8 +3972,8 @@ if (callback) { callback(); } - }; // Static - + } // Static + ; Tab._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -4003,7 +4037,7 @@ */ var NAME$a = 'toast'; - var VERSION$a = '4.2.1'; + var VERSION$a = '4.3.0'; var DATA_KEY$a = 'bs.toast'; var EVENT_KEY$a = "." + DATA_KEY$a; var JQUERY_NO_CONFLICT$a = $.fn[NAME$a]; @@ -4118,8 +4152,8 @@ $.removeData(this._element, DATA_KEY$a); this._element = null; this._config = null; - }; // Private - + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default$7, $(this._element).data(), typeof config === 'object' && config ? config : {}); @@ -4152,8 +4186,8 @@ } else { complete(); } - }; // Static - + } // Static + ; Toast._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -4187,6 +4221,11 @@ get: function get() { return DefaultType$7; } + }, { + key: "Default", + get: function get() { + return Default$7; + } }]); return Toast; @@ -4208,7 +4247,7 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v4.2.1): index.js + * Bootstrap (v4.3.0): index.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -4245,4 +4284,4 @@ Object.defineProperty(exports, '__esModule', { value: true }); -}))); +})); diff --git a/assets/javascripts/bootstrap.min.js b/assets/javascripts/bootstrap.min.js index d33c9cc1..3b7e7adf 100644 --- a/assets/javascripts/bootstrap.min.js +++ b/assets/javascripts/bootstrap.min.js @@ -1,6 +1,6 @@ /*! - * Bootstrap v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap v4.3.0 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("popper.js"),require("jquery")):"function"==typeof define&&define.amd?define(["exports","popper.js","jquery"],e):e(t.bootstrap={},t.Popper,t.jQuery)}(this,function(t,u,g){"use strict";function i(t,e){for(var n=0;nthis._items.length-1||t<0))if(this._isSliding)g(this._element).one(Q.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=ndocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},De="show",we="out",Ae={HIDE:"hide"+Ee,HIDDEN:"hidden"+Ee,SHOW:"show"+Ee,SHOWN:"shown"+Ee,INSERTED:"inserted"+Ee,CLICK:"click"+Ee,FOCUSIN:"focusin"+Ee,FOCUSOUT:"focusout"+Ee,MOUSEENTER:"mouseenter"+Ee,MOUSELEAVE:"mouseleave"+Ee},Ne="fade",Oe="show",ke=".tooltip-inner",Pe=".arrow",Le="hover",je="focus",He="click",Re="manual",Ue=function(){function i(t,e){if("undefined"==typeof u)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=g(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(g(this.getTipElement()).hasClass(Oe))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),g.removeData(this.element,this.constructor.DATA_KEY),g(this.element).off(this.constructor.EVENT_KEY),g(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&g(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===g(this.element).css("display"))throw new Error("Please use show on visible elements");var t=g.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){g(this.element).trigger(t);var n=_.findShadowRoot(this.element),i=g.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var o=this.getTipElement(),r=_.getUID(this.constructor.NAME);o.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&g(o).addClass(Ne);var s="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,a=this._getAttachment(s);this.addAttachmentClass(a);var l=this._getContainer();g(o).data(this.constructor.DATA_KEY,this),g.contains(this.element.ownerDocument.documentElement,this.tip)||g(o).appendTo(l),g(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new u(this.element,o,{placement:a,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:Pe},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),g(o).addClass(Oe),"ontouchstart"in document.documentElement&&g(document.body).children().on("mouseover",null,g.noop);var c=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,g(e.element).trigger(e.constructor.Event.SHOWN),t===we&&e._leave(null,e)};if(g(this.tip).hasClass(Ne)){var h=_.getTransitionDurationFromElement(this.tip);g(this.tip).one(_.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=g.Event(this.constructor.Event.HIDE),o=function(){e._hoverState!==De&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),g(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(g(this.element).trigger(i),!i.isDefaultPrevented()){if(g(n).removeClass(Oe),"ontouchstart"in document.documentElement&&g(document.body).children().off("mouseover",null,g.noop),this._activeTrigger[He]=!1,this._activeTrigger[je]=!1,this._activeTrigger[Le]=!1,g(this.tip).hasClass(Ne)){var r=_.getTransitionDurationFromElement(n);g(n).one(_.TRANSITION_END,o).emulateTransitionEnd(r)}else o();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){g(this.getTipElement()).addClass(Ce+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(g(t.querySelectorAll(ke)),this.getTitle()),g(t).removeClass(Ne+" "+Oe)},t.setElementContent=function(t,e){var n=this.config.html;"object"==typeof e&&(e.nodeType||e.jquery)?n?g(e).parent().is(t)||t.empty().append(e):t.text(g(e).text()):t[n?"html":"text"](e)},t.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getContainer=function(){return!1===this.config.container?document.body:_.isElement(this.config.container)?g(this.config.container):g(document).find(this.config.container)},t._getAttachment=function(t){return be[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)g(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==Re){var e=t===Le?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===Le?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;g(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}}),g(this.element).closest(".modal").on("hide.bs.modal",function(){i.element&&i.hide()}),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?je:Le]=!0),g(e.getTipElement()).hasClass(Oe)||e._hoverState===De?e._hoverState=De:(clearTimeout(e._timeout),e._hoverState=De,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===De&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?je:Le]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=we,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===we&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){return"number"==typeof(t=l({},this.constructor.Default,g(this.element).data(),"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),_.typeCheckConfig(pe,t,this.constructor.DefaultType),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(Te);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(g(t).removeClass(Ne),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=g(this).data(ve),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),g(this).data(ve,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.2.1"}},{key:"Default",get:function(){return Ie}},{key:"NAME",get:function(){return pe}},{key:"DATA_KEY",get:function(){return ve}},{key:"Event",get:function(){return Ae}},{key:"EVENT_KEY",get:function(){return Ee}},{key:"DefaultType",get:function(){return Se}}]),i}();g.fn[pe]=Ue._jQueryInterface,g.fn[pe].Constructor=Ue,g.fn[pe].noConflict=function(){return g.fn[pe]=ye,Ue._jQueryInterface};var We="popover",xe="bs.popover",Fe="."+xe,qe=g.fn[We],Me="bs-popover",Ke=new RegExp("(^|\\s)"+Me+"\\S+","g"),Qe=l({},Ue.Default,{placement:"right",trigger:"click",content:"",template:''}),Be=l({},Ue.DefaultType,{content:"(string|element|function)"}),Ve="fade",Ye="show",Xe=".popover-header",ze=".popover-body",Ge={HIDE:"hide"+Fe,HIDDEN:"hidden"+Fe,SHOW:"show"+Fe,SHOWN:"shown"+Fe,INSERTED:"inserted"+Fe,CLICK:"click"+Fe,FOCUSIN:"focusin"+Fe,FOCUSOUT:"focusout"+Fe,MOUSEENTER:"mouseenter"+Fe,MOUSELEAVE:"mouseleave"+Fe},Je=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var o=i.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){g(this.getTipElement()).addClass(Me+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},o.setContent=function(){var t=g(this.getTipElement());this.setElementContent(t.find(Xe),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(ze),e),t.removeClass(Ve+" "+Ye)},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(Ke);null!==e&&0=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||tthis._items.length-1||t<0))if(this._isSliding)g(this._element).one(Q.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=ndocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},Ae="show",Ne="out",Oe={HIDE:"hide"+Ce,HIDDEN:"hidden"+Ce,SHOW:"show"+Ce,SHOWN:"shown"+Ce,INSERTED:"inserted"+Ce,CLICK:"click"+Ce,FOCUSIN:"focusin"+Ce,FOCUSOUT:"focusout"+Ce,MOUSEENTER:"mouseenter"+Ce,MOUSELEAVE:"mouseleave"+Ce},ke="fade",Pe="show",Le=".tooltip-inner",je=".arrow",He="hover",Re="focus",Ue="click",We="manual",xe=function(){function i(t,e){if("undefined"==typeof u)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=g(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(g(this.getTipElement()).hasClass(Pe))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),g.removeData(this.element,this.constructor.DATA_KEY),g(this.element).off(this.constructor.EVENT_KEY),g(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&g(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===g(this.element).css("display"))throw new Error("Please use show on visible elements");var t=g.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){g(this.element).trigger(t);var n=_.findShadowRoot(this.element),i=g.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!i)return;var o=this.getTipElement(),r=_.getUID(this.constructor.NAME);o.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&g(o).addClass(ke);var s="function"==typeof this.config.placement?this.config.placement.call(this,o,this.element):this.config.placement,a=this._getAttachment(s);this.addAttachmentClass(a);var l=this._getContainer();g(o).data(this.constructor.DATA_KEY,this),g.contains(this.element.ownerDocument.documentElement,this.tip)||g(o).appendTo(l),g(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new u(this.element,o,{placement:a,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:je},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}}),g(o).addClass(Pe),"ontouchstart"in document.documentElement&&g(document.body).children().on("mouseover",null,g.noop);var c=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,g(e.element).trigger(e.constructor.Event.SHOWN),t===Ne&&e._leave(null,e)};if(g(this.tip).hasClass(ke)){var h=_.getTransitionDurationFromElement(this.tip);g(this.tip).one(_.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=g.Event(this.constructor.Event.HIDE),o=function(){e._hoverState!==Ae&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),g(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(g(this.element).trigger(i),!i.isDefaultPrevented()){if(g(n).removeClass(Pe),"ontouchstart"in document.documentElement&&g(document.body).children().off("mouseover",null,g.noop),this._activeTrigger[Ue]=!1,this._activeTrigger[Re]=!1,this._activeTrigger[He]=!1,g(this.tip).hasClass(ke)){var r=_.getTransitionDurationFromElement(n);g(n).one(_.TRANSITION_END,o).emulateTransitionEnd(r)}else o();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){g(this.getTipElement()).addClass(Se+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(g(t.querySelectorAll(Le)),this.getTitle()),g(t).removeClass(ke+" "+Pe)},t.setElementContent=function(t,e){var n=this.config.html;"object"==typeof e&&(e.nodeType||e.jquery)?n?g(e).parent().is(t)||t.empty().append(e):t.text(g(e).text()):t[n?"html":"text"](e)},t.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getOffset=function(){var e=this,t={};return"function"==typeof this.config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e.config.offset(t.offsets,e.element)||{}),t}:t.offset=this.config.offset,t},t._getContainer=function(){return!1===this.config.container?document.body:_.isElement(this.config.container)?g(this.config.container):g(document).find(this.config.container)},t._getAttachment=function(t){return De[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)g(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==We){var e=t===He?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===He?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;g(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}}),g(this.element).closest(".modal").on("hide.bs.modal",function(){i.element&&i.hide()}),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Re:He]=!0),g(e.getTipElement()).hasClass(Pe)||e._hoverState===Ae?e._hoverState=Ae:(clearTimeout(e._timeout),e._hoverState=Ae,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===Ae&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||g(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),g(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Re:He]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=Ne,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===Ne&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){return"number"==typeof(t=l({},this.constructor.Default,g(this.element).data(),"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),_.typeCheckConfig(ye,t,this.constructor.DefaultType),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(be);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(g(t).removeClass(ke),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=g(this).data(Ee),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),g(this).data(Ee,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.3.0"}},{key:"Default",get:function(){return we}},{key:"NAME",get:function(){return ye}},{key:"DATA_KEY",get:function(){return Ee}},{key:"Event",get:function(){return Oe}},{key:"EVENT_KEY",get:function(){return Ce}},{key:"DefaultType",get:function(){return Ie}}]),i}();g.fn[ye]=xe._jQueryInterface,g.fn[ye].Constructor=xe,g.fn[ye].noConflict=function(){return g.fn[ye]=Te,xe._jQueryInterface};var Fe="popover",qe="bs.popover",Me="."+qe,Ke=g.fn[Fe],Qe="bs-popover",Be=new RegExp("(^|\\s)"+Qe+"\\S+","g"),Ve=l({},xe.Default,{placement:"right",trigger:"click",content:"",template:''}),Ye=l({},xe.DefaultType,{content:"(string|element|function)"}),Xe="fade",ze="show",Ge=".popover-header",Je=".popover-body",Ze={HIDE:"hide"+Me,HIDDEN:"hidden"+Me,SHOW:"show"+Me,SHOWN:"shown"+Me,INSERTED:"inserted"+Me,CLICK:"click"+Me,FOCUSIN:"focusin"+Me,FOCUSOUT:"focusout"+Me,MOUSEENTER:"mouseenter"+Me,MOUSELEAVE:"mouseleave"+Me},$e=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var o=i.prototype;return o.isWithContent=function(){return this.getTitle()||this._getContent()},o.addAttachmentClass=function(t){g(this.getTipElement()).addClass(Qe+"-"+t)},o.getTipElement=function(){return this.tip=this.tip||g(this.config.template)[0],this.tip},o.setContent=function(){var t=g(this.getTipElement());this.setElementContent(t.find(Ge),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(Je),e),t.removeClass(Xe+" "+ze)},o._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},o._cleanTipClass=function(){var t=g(this.getTipElement()),e=t.attr("class").match(Be);null!==e&&0=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t 0; }; - _proto._getPopperConfig = function _getPopperConfig() { + _proto._getOffset = function _getOffset() { var _this2 = this; - var offsetConf = {}; + var offset = {}; if (typeof this._config.offset === 'function') { - offsetConf.fn = function (data) { - data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets) || {}); + offset.fn = function (data) { + data.offsets = _objectSpread({}, data.offsets, _this2._config.offset(data.offsets, _this2._element) || {}); return data; }; } else { - offsetConf.offset = this._config.offset; + offset.offset = this._config.offset; } + return offset; + }; + + _proto._getPopperConfig = function _getPopperConfig() { var popperConfig = { placement: this._getPlacement(), modifiers: { - offset: offsetConf, + offset: this._getOffset(), flip: { enabled: this._config.flip }, @@ -391,8 +395,8 @@ } return popperConfig; - }; // Static - + } // Static + ; Dropdown._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -476,8 +480,8 @@ } return parent || element.parentNode; - }; // eslint-disable-next-line complexity - + } // eslint-disable-next-line complexity + ; Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { // If not input/textarea: @@ -587,4 +591,4 @@ return Dropdown; -}))); +})); diff --git a/assets/javascripts/bootstrap/modal.js b/assets/javascripts/bootstrap/modal.js index 6be03d14..da13eb25 100644 --- a/assets/javascripts/bootstrap/modal.js +++ b/assets/javascripts/bootstrap/modal.js @@ -1,13 +1,13 @@ /*! - * Bootstrap modal.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap modal.js v4.3.0 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : - (global.Modal = factory(global.jQuery,global.Util)); -}(this, (function ($,Util) { 'use strict'; + (global = global || self, global.Modal = factory(global.jQuery, global.Util)); +}(this, function ($, Util) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; @@ -69,7 +69,7 @@ */ var NAME = 'modal'; - var VERSION = '4.2.1'; + var VERSION = '4.3.0'; var DATA_KEY = 'bs.modal'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -102,6 +102,7 @@ CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY }; var ClassName = { + SCROLLABLE: 'modal-dialog-scrollable', SCROLLBAR_MEASURER: 'modal-scrollbar-measure', BACKDROP: 'modal-backdrop', OPEN: 'modal-open', @@ -110,6 +111,7 @@ }; var Selector = { DIALOG: '.modal-dialog', + MODAL_BODY: '.modal-body', DATA_TOGGLE: '[data-toggle="modal"]', DATA_DISMISS: '[data-dismiss="modal"]', FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top', @@ -262,8 +264,8 @@ _proto.handleUpdate = function handleUpdate() { this._adjustDialog(); - }; // Private - + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default, config); @@ -287,7 +289,11 @@ this._element.setAttribute('aria-modal', true); - this._element.scrollTop = 0; + if ($(this._dialog).hasClass(ClassName.SCROLLABLE)) { + this._dialog.querySelector(Selector.MODAL_BODY).scrollTop = 0; + } else { + this._element.scrollTop = 0; + } if (transition) { Util.reflow(this._element); @@ -457,11 +463,11 @@ } else if (callback) { callback(); } - }; // ---------------------------------------------------------------------- + } // ---------------------------------------------------------------------- // the following methods are used to handle overflowing modals // todo (fat): these should probably be refactored out of modal.js // ---------------------------------------------------------------------- - + ; _proto._adjustDialog = function _adjustDialog() { var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; @@ -546,8 +552,8 @@ var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); return scrollbarWidth; - }; // Static - + } // Static + ; Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { return this.each(function () { @@ -640,4 +646,4 @@ return Modal; -}))); +})); diff --git a/assets/javascripts/bootstrap/popover.js b/assets/javascripts/bootstrap/popover.js index 1226ce31..19f2e25e 100644 --- a/assets/javascripts/bootstrap/popover.js +++ b/assets/javascripts/bootstrap/popover.js @@ -1,13 +1,13 @@ /*! - * Bootstrap popover.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap popover.js v4.3.0 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./tooltip.js')) : typeof define === 'function' && define.amd ? define(['jquery', './tooltip.js'], factory) : - (global.Popover = factory(global.jQuery,global.Tooltip)); -}(this, (function ($,Tooltip) { 'use strict'; + (global = global || self, global.Popover = factory(global.jQuery, global.Tooltip)); +}(this, function ($, Tooltip) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; Tooltip = Tooltip && Tooltip.hasOwnProperty('default') ? Tooltip['default'] : Tooltip; @@ -75,7 +75,7 @@ */ var NAME = 'popover'; - var VERSION = '4.2.1'; + var VERSION = '4.3.0'; var DATA_KEY = 'bs.popover'; var EVENT_KEY = "." + DATA_KEY; var JQUERY_NO_CONFLICT = $.fn[NAME]; @@ -158,8 +158,8 @@ this.setElementContent($tip.find(Selector.CONTENT), content); $tip.removeClass(ClassName.FADE + " " + ClassName.SHOW); - }; // Private - + } // Private + ; _proto._getContent = function _getContent() { return this.element.getAttribute('data-content') || this.config.content; @@ -172,8 +172,8 @@ if (tabClass !== null && tabClass.length > 0) { $tip.removeClass(tabClass.join('')); } - }; // Static - + } // Static + ; Popover._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -257,4 +257,4 @@ return Popover; -}))); +})); diff --git a/assets/javascripts/bootstrap/scrollspy.js b/assets/javascripts/bootstrap/scrollspy.js index 8ad54088..6658d127 100644 --- a/assets/javascripts/bootstrap/scrollspy.js +++ b/assets/javascripts/bootstrap/scrollspy.js @@ -1,13 +1,13 @@ /*! - * Bootstrap scrollspy.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap scrollspy.js v4.3.0 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : - (global.ScrollSpy = factory(global.jQuery,global.Util)); -}(this, (function ($,Util) { 'use strict'; + (global = global || self, global.ScrollSpy = factory(global.jQuery, global.Util)); +}(this, function ($, Util) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; @@ -69,7 +69,7 @@ */ var NAME = 'scrollspy'; - var VERSION = '4.2.1'; + var VERSION = '4.3.0'; var DATA_KEY = 'bs.scrollspy'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -192,8 +192,8 @@ this._targets = null; this._activeTarget = null; this._scrollHeight = null; - }; // Private - + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default, typeof config === 'object' && config ? config : {}); @@ -300,8 +300,8 @@ }).forEach(function (node) { return node.classList.remove(ClassName.ACTIVE); }); - }; // Static - + } // Static + ; ScrollSpy._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -371,4 +371,4 @@ return ScrollSpy; -}))); +})); diff --git a/assets/javascripts/bootstrap/tab.js b/assets/javascripts/bootstrap/tab.js index 9851df51..3b23bccf 100644 --- a/assets/javascripts/bootstrap/tab.js +++ b/assets/javascripts/bootstrap/tab.js @@ -1,13 +1,13 @@ /*! - * Bootstrap tab.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap tab.js v4.3.0 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : - (global.Tab = factory(global.jQuery,global.Util)); -}(this, (function ($,Util) { 'use strict'; + (global = global || self, global.Tab = factory(global.jQuery, global.Util)); +}(this, function ($, Util) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; @@ -35,7 +35,7 @@ */ var NAME = 'tab'; - var VERSION = '4.2.1'; + var VERSION = '4.3.0'; var DATA_KEY = 'bs.tab'; var EVENT_KEY = "." + DATA_KEY; var DATA_API_KEY = '.data-api'; @@ -143,8 +143,8 @@ _proto.dispose = function dispose() { $.removeData(this._element, DATA_KEY); this._element = null; - }; // Private - + } // Private + ; _proto._activate = function _activate(element, container, callback) { var _this2 = this; @@ -186,7 +186,10 @@ } Util.reflow(element); - $(element).addClass(ClassName.SHOW); + + if (element.classList.contains(ClassName.FADE)) { + element.classList.add(ClassName.SHOW); + } if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { var dropdownElement = $(element).closest(Selector.DROPDOWN)[0]; @@ -202,8 +205,8 @@ if (callback) { callback(); } - }; // Static - + } // Static + ; Tab._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -262,4 +265,4 @@ return Tab; -}))); +})); diff --git a/assets/javascripts/bootstrap/toast.js b/assets/javascripts/bootstrap/toast.js index e26b84ce..9c268a94 100644 --- a/assets/javascripts/bootstrap/toast.js +++ b/assets/javascripts/bootstrap/toast.js @@ -1,13 +1,13 @@ /*! - * Bootstrap toast.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap toast.js v4.3.0 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) : - (global.Toast = factory(global.jQuery,global.Util)); -}(this, (function ($,Util) { 'use strict'; + (global = global || self, global.Toast = factory(global.jQuery, global.Util)); +}(this, function ($, Util) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util; @@ -69,7 +69,7 @@ */ var NAME = 'toast'; - var VERSION = '4.2.1'; + var VERSION = '4.3.0'; var DATA_KEY = 'bs.toast'; var EVENT_KEY = "." + DATA_KEY; var JQUERY_NO_CONFLICT = $.fn[NAME]; @@ -184,8 +184,8 @@ $.removeData(this._element, DATA_KEY); this._element = null; this._config = null; - }; // Private - + } // Private + ; _proto._getConfig = function _getConfig(config) { config = _objectSpread({}, Default, $(this._element).data(), typeof config === 'object' && config ? config : {}); @@ -218,8 +218,8 @@ } else { complete(); } - }; // Static - + } // Static + ; Toast._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -253,6 +253,11 @@ get: function get() { return DefaultType; } + }, { + key: "Default", + get: function get() { + return Default; + } }]); return Toast; @@ -274,4 +279,4 @@ return Toast; -}))); +})); diff --git a/assets/javascripts/bootstrap/tooltip.js b/assets/javascripts/bootstrap/tooltip.js index c89fbc0b..b96de60e 100644 --- a/assets/javascripts/bootstrap/tooltip.js +++ b/assets/javascripts/bootstrap/tooltip.js @@ -1,13 +1,13 @@ /*! - * Bootstrap tooltip.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap tooltip.js v4.3.0 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) : typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) : - (global.Tooltip = factory(global.jQuery,global.Popper,global.Util)); -}(this, (function ($,Popper,Util) { 'use strict'; + (global = global || self, global.Tooltip = factory(global.jQuery, global.Popper, global.Util)); +}(this, function ($, Popper, Util) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper; @@ -70,7 +70,7 @@ */ var NAME = 'tooltip'; - var VERSION = '4.2.1'; + var VERSION = '4.3.0'; var DATA_KEY = 'bs.tooltip'; var EVENT_KEY = "." + DATA_KEY; var JQUERY_NO_CONFLICT = $.fn[NAME]; @@ -85,7 +85,7 @@ html: 'boolean', selector: '(string|boolean)', placement: '(string|function)', - offset: '(number|string)', + offset: '(number|string|function)', container: '(string|element|boolean)', fallbackPlacement: '(string|array)', boundary: '(string|element)' @@ -294,9 +294,7 @@ this._popper = new Popper(this.element, tip, { placement: attachment, modifiers: { - offset: { - offset: this.config.offset - }, + offset: this._getOffset(), flip: { behavior: this.config.fallbackPlacement }, @@ -405,8 +403,8 @@ if (this._popper !== null) { this._popper.scheduleUpdate(); } - }; // Protected - + } // Protected + ; _proto.isWithContent = function isWithContent() { return Boolean(this.getTitle()); @@ -452,8 +450,25 @@ } return title; - }; // Private + } // Private + ; + + _proto._getOffset = function _getOffset() { + var _this3 = this; + + var offset = {}; + + if (typeof this.config.offset === 'function') { + offset.fn = function (data) { + data.offsets = _objectSpread({}, data.offsets, _this3.config.offset(data.offsets, _this3.element) || {}); + return data; + }; + } else { + offset.offset = this.config.offset; + } + return offset; + }; _proto._getContainer = function _getContainer() { if (this.config.container === false) { @@ -472,27 +487,27 @@ }; _proto._setListeners = function _setListeners() { - var _this3 = this; + var _this4 = this; var triggers = this.config.trigger.split(' '); triggers.forEach(function (trigger) { if (trigger === 'click') { - $(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) { - return _this3.toggle(event); + $(_this4.element).on(_this4.constructor.Event.CLICK, _this4.config.selector, function (event) { + return _this4.toggle(event); }); } else if (trigger !== Trigger.MANUAL) { - var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN; - var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT; - $(_this3.element).on(eventIn, _this3.config.selector, function (event) { - return _this3._enter(event); - }).on(eventOut, _this3.config.selector, function (event) { - return _this3._leave(event); + var eventIn = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSEENTER : _this4.constructor.Event.FOCUSIN; + var eventOut = trigger === Trigger.HOVER ? _this4.constructor.Event.MOUSELEAVE : _this4.constructor.Event.FOCUSOUT; + $(_this4.element).on(eventIn, _this4.config.selector, function (event) { + return _this4._enter(event); + }).on(eventOut, _this4.config.selector, function (event) { + return _this4._leave(event); }); } }); $(this.element).closest('.modal').on('hide.bs.modal', function () { - if (_this3.element) { - _this3.hide(); + if (_this4.element) { + _this4.hide(); } }); @@ -657,8 +672,8 @@ this.hide(); this.show(); this.config.animation = initConfigAnimation; - }; // Static - + } // Static + ; Tooltip._jQueryInterface = function _jQueryInterface(config) { return this.each(function () { @@ -741,4 +756,4 @@ return Tooltip; -}))); +})); diff --git a/assets/javascripts/bootstrap/util.js b/assets/javascripts/bootstrap/util.js index 49fbf119..3ef0c3ba 100644 --- a/assets/javascripts/bootstrap/util.js +++ b/assets/javascripts/bootstrap/util.js @@ -1,19 +1,19 @@ /*! - * Bootstrap util.js v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap util.js v4.3.0 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery')) : typeof define === 'function' && define.amd ? define(['jquery'], factory) : - (global.Util = factory(global.jQuery)); -}(this, (function ($) { 'use strict'; + (global = global || self, global.Util = factory(global.jQuery)); +}(this, function ($) { 'use strict'; $ = $ && $.hasOwnProperty('default') ? $['default'] : $; /** * -------------------------------------------------------------------------- - * Bootstrap (v4.2.1): util.js + * Bootstrap (v4.3.0): util.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * -------------------------------------------------------------------------- */ @@ -89,7 +89,11 @@ selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : ''; } - return selector && document.querySelector(selector) ? selector : null; + try { + return document.querySelector(selector) ? selector : null; + } catch (err) { + return null; + } }, getTransitionDurationFromElement: function getTransitionDurationFromElement(element) { if (!element) { @@ -164,4 +168,4 @@ return Util; -}))); +})); diff --git a/assets/stylesheets/_bootstrap-grid.scss b/assets/stylesheets/_bootstrap-grid.scss index 52b830ed..2b3610a0 100644 --- a/assets/stylesheets/_bootstrap-grid.scss +++ b/assets/stylesheets/_bootstrap-grid.scss @@ -1,7 +1,7 @@ /*! - * Bootstrap Grid v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors - * Copyright 2011-2018 Twitter, Inc. + * Bootstrap Grid v4.3.0 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors + * Copyright 2011-2019 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ diff --git a/assets/stylesheets/_bootstrap-reboot.scss b/assets/stylesheets/_bootstrap-reboot.scss index a10ce7a2..4cef8eba 100644 --- a/assets/stylesheets/_bootstrap-reboot.scss +++ b/assets/stylesheets/_bootstrap-reboot.scss @@ -1,7 +1,7 @@ /*! - * Bootstrap Reboot v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors - * Copyright 2011-2018 Twitter, Inc. + * Bootstrap Reboot v4.3.0 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors + * Copyright 2011-2019 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) */ diff --git a/assets/stylesheets/_bootstrap.scss b/assets/stylesheets/_bootstrap.scss index 4de16584..4e0da655 100644 --- a/assets/stylesheets/_bootstrap.scss +++ b/assets/stylesheets/_bootstrap.scss @@ -1,7 +1,7 @@ /*! - * Bootstrap v4.2.1 (https://getbootstrap.com/) - * Copyright 2011-2018 The Bootstrap Authors - * Copyright 2011-2018 Twitter, Inc. + * Bootstrap v4.3.0 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors + * Copyright 2011-2019 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ diff --git a/assets/stylesheets/bootstrap/_badge.scss b/assets/stylesheets/bootstrap/_badge.scss index bdbe4b9c..2082f058 100644 --- a/assets/stylesheets/bootstrap/_badge.scss +++ b/assets/stylesheets/bootstrap/_badge.scss @@ -6,13 +6,14 @@ .badge { display: inline-block; padding: $badge-padding-y $badge-padding-x; - font-size: $badge-font-size; + @include font-size($badge-font-size); font-weight: $badge-font-weight; line-height: 1; text-align: center; white-space: nowrap; vertical-align: baseline; @include border-radius($badge-border-radius); + @include transition($badge-transition); @at-root a#{&} { @include hover-focus { diff --git a/assets/stylesheets/bootstrap/_buttons.scss b/assets/stylesheets/bootstrap/_buttons.scss index 7c45534e..2a7d94ad 100644 --- a/assets/stylesheets/bootstrap/_buttons.scss +++ b/assets/stylesheets/bootstrap/_buttons.scss @@ -6,6 +6,7 @@ .btn { display: inline-block; + font-family: $btn-font-family; font-weight: $btn-font-weight; color: $body-color; text-align: center; @@ -34,11 +35,6 @@ @include box-shadow(none); } - // Opinionated: add "hand" cursor to non-disabled .btn elements - &:not(:disabled):not(.disabled) { - cursor: pointer; - } - &:not(:disabled):not(.disabled):active, &:not(:disabled):not(.disabled).active { @include box-shadow($btn-active-box-shadow); @@ -81,6 +77,7 @@ fieldset:disabled a.btn { .btn-link { font-weight: $font-weight-normal; color: $link-color; + text-decoration: $link-decoration; @include hover { color: $link-hover-color; diff --git a/assets/stylesheets/bootstrap/_card.scss b/assets/stylesheets/bootstrap/_card.scss index 377bec0f..c6b67ce0 100644 --- a/assets/stylesheets/bootstrap/_card.scss +++ b/assets/stylesheets/bootstrap/_card.scss @@ -6,7 +6,7 @@ position: relative; display: flex; flex-direction: column; - min-width: 0; + min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106 word-wrap: break-word; background-color: $card-bg; background-clip: border-box; @@ -36,6 +36,7 @@ // as much space as possible, ensuring footers are aligned to the bottom. flex: 1 1 auto; padding: $card-spacer-x; + color: $card-color; } .card-title { @@ -195,55 +196,35 @@ // Handle rounded corners @if $enable-rounded { - &:first-child { + &:not(:last-child) { @include border-right-radius(0); .card-img-top, .card-header { + // stylelint-disable-next-line property-blacklist border-top-right-radius: 0; } .card-img-bottom, .card-footer { + // stylelint-disable-next-line property-blacklist border-bottom-right-radius: 0; } } - &:last-child { + &:not(:first-child) { @include border-left-radius(0); .card-img-top, .card-header { + // stylelint-disable-next-line property-blacklist border-top-left-radius: 0; } .card-img-bottom, .card-footer { + // stylelint-disable-next-line property-blacklist border-bottom-left-radius: 0; } } - - &:only-child { - @include border-radius($card-border-radius); - - .card-img-top, - .card-header { - @include border-top-radius($card-border-radius); - } - .card-img-bottom, - .card-footer { - @include border-bottom-radius($card-border-radius); - } - } - - &:not(:first-child):not(:last-child):not(:only-child) { - @include border-radius(0); - - .card-img-top, - .card-img-bottom, - .card-header, - .card-footer { - @include border-radius(0); - } - } } } } @@ -278,29 +259,27 @@ // .accordion { - .card { + > .card { overflow: hidden; &:not(:first-of-type) { .card-header:first-child { - border-radius: 0; + @include border-radius(0); } &:not(:last-of-type) { border-bottom: 0; - border-radius: 0; + @include border-radius(0); } } &:first-of-type { border-bottom: 0; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; + @include border-bottom-radius(0); } &:last-of-type { - border-top-left-radius: 0; - border-top-right-radius: 0; + @include border-top-radius(0); } .card-header { diff --git a/assets/stylesheets/bootstrap/_carousel.scss b/assets/stylesheets/bootstrap/_carousel.scss index 8e6639ac..20ea04ba 100644 --- a/assets/stylesheets/bootstrap/_carousel.scss +++ b/assets/stylesheets/bootstrap/_carousel.scss @@ -127,8 +127,7 @@ display: inline-block; width: $carousel-control-icon-width; height: $carousel-control-icon-width; - background: transparent no-repeat center center; - background-size: 100% 100%; + background: no-repeat 50% / 100% 100%; } .carousel-control-prev-icon { background-image: $carousel-control-prev-icon-bg; diff --git a/assets/stylesheets/bootstrap/_close.scss b/assets/stylesheets/bootstrap/_close.scss index 821922f4..5cc96f57 100644 --- a/assets/stylesheets/bootstrap/_close.scss +++ b/assets/stylesheets/bootstrap/_close.scss @@ -1,6 +1,6 @@ .close { float: right; - font-size: $close-font-size; + @include font-size($close-font-size); font-weight: $close-font-weight; line-height: 1; color: $close-color; @@ -17,9 +17,6 @@ @include hover-focus { opacity: .75; } - - // Opinionated: add "hand" cursor to non-disabled .close elements - cursor: pointer; } } diff --git a/assets/stylesheets/bootstrap/_code.scss b/assets/stylesheets/bootstrap/_code.scss index 9b2e027f..74b6e1c8 100644 --- a/assets/stylesheets/bootstrap/_code.scss +++ b/assets/stylesheets/bootstrap/_code.scss @@ -1,6 +1,6 @@ // Inline code code { - font-size: $code-font-size; + @include font-size($code-font-size); color: $code-color; word-break: break-word; @@ -13,7 +13,7 @@ code { // User input typically entered via keyboard kbd { padding: $kbd-padding-y $kbd-padding-x; - font-size: $kbd-font-size; + @include font-size($kbd-font-size); color: $kbd-color; background-color: $kbd-bg; @include border-radius($border-radius-sm); @@ -21,7 +21,7 @@ kbd { kbd { padding: 0; - font-size: 100%; + @include font-size(100%); font-weight: $nested-kbd-font-weight; @include box-shadow(none); } @@ -30,12 +30,12 @@ kbd { // Blocks of code pre { display: block; - font-size: $code-font-size; + @include font-size($code-font-size); color: $pre-color; // Account for some code outputs that place code tags in pre tags code { - font-size: inherit; + @include font-size(inherit); color: inherit; word-break: normal; } diff --git a/assets/stylesheets/bootstrap/_custom-forms.scss b/assets/stylesheets/bootstrap/_custom-forms.scss index e6bf7ad6..03f3fc5b 100644 --- a/assets/stylesheets/bootstrap/_custom-forms.scss +++ b/assets/stylesheets/bootstrap/_custom-forms.scss @@ -95,9 +95,7 @@ width: $custom-control-indicator-size; height: $custom-control-indicator-size; content: ""; - background-repeat: no-repeat; - background-position: center center; - background-size: $custom-control-indicator-bg-size; + background: no-repeat 50% / #{$custom-control-indicator-bg-size}; } } @@ -144,6 +142,7 @@ .custom-radio { .custom-control-label::before { + // stylelint-disable-next-line property-blacklist border-radius: $custom-radio-indicator-border-radius; } @@ -173,6 +172,7 @@ left: -($custom-switch-width + $custom-control-gutter); width: $custom-switch-width; pointer-events: all; + // stylelint-disable-next-line property-blacklist border-radius: $custom-switch-indicator-border-radius; } @@ -182,6 +182,7 @@ width: $custom-switch-indicator-size; height: $custom-switch-indicator-size; background-color: $custom-control-indicator-border-color; + // stylelint-disable-next-line property-blacklist border-radius: $custom-switch-indicator-border-radius; @include transition(transform .15s ease-in-out, $custom-forms-transition); } @@ -213,6 +214,8 @@ width: 100%; height: $custom-select-height; padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x; + font-family: $custom-select-font-family; + @include font-size($custom-select-font-size); font-weight: $custom-select-font-weight; line-height: $custom-select-line-height; color: $custom-select-color; @@ -220,11 +223,7 @@ background: $custom-select-background; background-color: $custom-select-bg; border: $custom-select-border-width solid $custom-select-border-color; - @if $enable-rounded { - border-radius: $custom-select-border-radius; - } @else { - border-radius: 0; - } + @include border-radius($custom-select-border-radius, 0); @include box-shadow($custom-select-box-shadow); appearance: none; @@ -262,7 +261,7 @@ // Hides the default caret in IE11 &::-ms-expand { - opacity: 0; + display: none; } } @@ -271,7 +270,7 @@ padding-top: $custom-select-padding-y-sm; padding-bottom: $custom-select-padding-y-sm; padding-left: $custom-select-padding-x-sm; - font-size: $custom-select-font-size-sm; + @include font-size($custom-select-font-size-sm); } .custom-select-lg { @@ -279,7 +278,7 @@ padding-top: $custom-select-padding-y-lg; padding-bottom: $custom-select-padding-y-lg; padding-left: $custom-select-padding-x-lg; - font-size: $custom-select-font-size-lg; + @include font-size($custom-select-font-size-lg); } @@ -331,6 +330,7 @@ z-index: 1; height: $custom-file-height; padding: $custom-file-padding-y $custom-file-padding-x; + font-family: $custom-file-font-family; font-weight: $custom-file-font-weight; line-height: $custom-file-line-height; color: $custom-file-color; diff --git a/assets/stylesheets/bootstrap/_dropdown.scss b/assets/stylesheets/bootstrap/_dropdown.scss index 93c1d78e..ac3c8c8a 100644 --- a/assets/stylesheets/bootstrap/_dropdown.scss +++ b/assets/stylesheets/bootstrap/_dropdown.scss @@ -7,6 +7,8 @@ } .dropdown-toggle { + white-space: nowrap; + // Generate the caret automatically @include caret; } @@ -22,8 +24,8 @@ min-width: $dropdown-min-width; padding: $dropdown-padding-y 0; margin: $dropdown-spacer 0 0; // override default ul - font-size: $font-size-base; // Redeclare because nesting can cause inheritance issues - color: $body-color; + @include font-size($dropdown-font-size); + color: $dropdown-color; text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer) list-style: none; background-color: $dropdown-bg; @@ -33,17 +35,6 @@ @include box-shadow($dropdown-box-shadow); } -@each $breakpoint in map-keys($grid-breakpoints) { - @include media-breakpoint-up($breakpoint) { - $infix: breakpoint-infix($breakpoint, $grid-breakpoints); - - .dropdown-menu#{$infix}-right { - right: 0; - left: auto; - } - } -} - @each $breakpoint in map-keys($grid-breakpoints) { @include media-breakpoint-up($breakpoint) { $infix: breakpoint-infix($breakpoint, $grid-breakpoints); @@ -52,6 +43,11 @@ right: auto; left: 0; } + + .dropdown-menu#{$infix}-right { + right: 0; + left: auto; + } } } @@ -118,7 +114,7 @@ // Dividers (basically an `
`) within the dropdown .dropdown-divider { - @include nav-divider($dropdown-divider-bg); + @include nav-divider($dropdown-divider-bg, $dropdown-divider-margin-y); } // Links, buttons, and more within the dropdown menu @@ -136,12 +132,16 @@ background-color: transparent; // For `