Merge branch 'MDL-64887-master-3' of git://github.com/bmbrands/moodle
This commit is contained in:
@@ -74,10 +74,13 @@ theme/boost/amd/src/button.js
|
||||
theme/boost/amd/src/carousel.js
|
||||
theme/boost/amd/src/collapse.js
|
||||
theme/boost/amd/src/dropdown.js
|
||||
theme/boost/amd/src/index.js
|
||||
theme/boost/amd/src/modal.js
|
||||
theme/boost/amd/src/popover.js
|
||||
theme/boost/amd/src/sanitizer.js
|
||||
theme/boost/amd/src/scrollspy.js
|
||||
theme/boost/amd/src/tab.js
|
||||
theme/boost/amd/src/toast.js
|
||||
theme/boost/amd/src/tooltip.js
|
||||
theme/boost/amd/src/util.js
|
||||
theme/boost/amd/src/tether.js
|
||||
|
||||
@@ -75,10 +75,13 @@ theme/boost/amd/src/button.js
|
||||
theme/boost/amd/src/carousel.js
|
||||
theme/boost/amd/src/collapse.js
|
||||
theme/boost/amd/src/dropdown.js
|
||||
theme/boost/amd/src/index.js
|
||||
theme/boost/amd/src/modal.js
|
||||
theme/boost/amd/src/popover.js
|
||||
theme/boost/amd/src/sanitizer.js
|
||||
theme/boost/amd/src/scrollspy.js
|
||||
theme/boost/amd/src/tab.js
|
||||
theme/boost/amd/src/toast.js
|
||||
theme/boost/amd/src/tooltip.js
|
||||
theme/boost/amd/src/util.js
|
||||
theme/boost/amd/src/tether.js
|
||||
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
define ("theme_boost/alert",["exports","jquery","./util"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var h=d(b),i=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function f(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function g(a,b,c){if(b)f(a.prototype,b);if(c)f(a,c);return a}var j=function(a){var b="bs.alert",c=".".concat(b),d=a.fn.alert,f={CLOSE:"close".concat(c),CLOSED:"closed".concat(c),CLICK_DATA_API:"click".concat(c).concat(".data-api")},h={ALERT:"alert",FADE:"fade",SHOW:"show"},j=function(){function c(a){e(this,c);this._element=a}g(c,[{key:"close",value:function(a){a=a||this._element;var b=this._getRootElement(a),c=this._triggerCloseEvent(b);if(c.isDefaultPrevented()){return}this._removeElement(b)}},{key:"dispose",value:function(){a.removeData(this._element,b);this._element=null}},{key:"_getRootElement",value:function(b){var c=i.default.getSelectorFromElement(b),d=!1;if(c){d=a(c)[0]}if(!d){d=a(b).closest(".".concat(h.ALERT))[0]}return d}},{key:"_triggerCloseEvent",value:function(b){var c=a.Event(f.CLOSE);a(b).trigger(c);return c}},{key:"_removeElement",value:function(b){var c=this;a(b).removeClass(h.SHOW);if(!i.default.supportsTransitionEnd()||!a(b).hasClass(h.FADE)){this._destroyElement(b);return}a(b).one(i.default.TRANSITION_END,function(a){return c._destroyElement(b,a)}).emulateTransitionEnd(150)}},{key:"_destroyElement",value:function(b){a(b).detach().trigger(f.CLOSED).remove()}}],[{key:"_jQueryInterface",value:function(d){return this.each(function(){var e=a(this),f=e.data(b);if(!f){f=new c(this);e.data(b,f)}if("close"===d){f[d](this)}})}},{key:"_handleDismiss",value:function(a){return function(b){if(b){b.preventDefault()}a.close(this)}}},{key:"VERSION",get:function(){return"4.0.0"}}]);return c}();a(document).on(f.CLICK_DATA_API,{DISMISS:"[data-dismiss=\"alert\"]"}.DISMISS,j._handleDismiss(new j));a.fn.alert=j._jQueryInterface;a.fn.alert.Constructor=j;a.fn.alert.noConflict=function(){a.fn.alert=d;return j._jQueryInterface};return j}(h.default);a.default=j;return a.default});
|
||||
"use strict";define ("theme_boost/alert",["exports","jquery","./util"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var h=d(b),i=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function f(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function g(a,b,c){if(b)f(a.prototype,b);if(c)f(a,c);return a}var j="bs.alert",k=".".concat(j),l=h.default.fn.alert,m={CLOSE:"close".concat(k),CLOSED:"closed".concat(k),CLICK_DATA_API:"click".concat(k).concat(".data-api")},n={ALERT:"alert",FADE:"fade",SHOW:"show"},o=function(){function a(b){e(this,a);this._element=b}g(a,[{key:"close",value:function(a){var b=this._element;if(a){b=this._getRootElement(a)}var c=this._triggerCloseEvent(b);if(c.isDefaultPrevented()){return}this._removeElement(b)}},{key:"dispose",value:function(){h.default.removeData(this._element,j);this._element=null}},{key:"_getRootElement",value:function(a){var b=i.default.getSelectorFromElement(a),c=!1;if(b){c=document.querySelector(b)}if(!c){c=(0,h.default)(a).closest(".".concat(n.ALERT))[0]}return c}},{key:"_triggerCloseEvent",value:function(a){var b=h.default.Event(m.CLOSE);(0,h.default)(a).trigger(b);return b}},{key:"_removeElement",value:function(a){var b=this;(0,h.default)(a).removeClass(n.SHOW);if(!(0,h.default)(a).hasClass(n.FADE)){this._destroyElement(a);return}var c=i.default.getTransitionDurationFromElement(a);(0,h.default)(a).one(i.default.TRANSITION_END,function(c){return b._destroyElement(a,c)}).emulateTransitionEnd(c)}},{key:"_destroyElement",value:function(a){(0,h.default)(a).detach().trigger(m.CLOSED).remove()}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=(0,h.default)(this),d=c.data(j);if(!d){d=new a(this);c.data(j,d)}if("close"===b){d[b](this)}})}},{key:"_handleDismiss",value:function(a){return function(b){if(b){b.preventDefault()}a.close(this)}}},{key:"VERSION",get:function(){return"4.3.1"}}]);return a}();(0,h.default)(document).on(m.CLICK_DATA_API,{DISMISS:"[data-dismiss=\"alert\"]"}.DISMISS,o._handleDismiss(new o));h.default.fn.alert=o._jQueryInterface;h.default.fn.alert.Constructor=o;h.default.fn.alert.noConflict=function(){h.default.fn.alert=l;return o._jQueryInterface};a.default=o;return a.default});
|
||||
//# sourceMappingURL=alert.min.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
define ("theme_boost/button",["exports","jquery"],function(a,b){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var f=function(a){return a&&a.__esModule?a:{default:a}}(b);function c(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function d(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function e(a,b,c){if(b)d(a.prototype,b);if(c)d(a,c);return a}var g=function(a){var b="bs.button",d=".".concat(b),f=".data-api",g=a.fn.button,h={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},i={DATA_TOGGLE_CARROT:"[data-toggle^=\"button\"]",DATA_TOGGLE:"[data-toggle=\"buttons\"]",INPUT:"input",ACTIVE:".active",BUTTON:".btn"},j={CLICK_DATA_API:"click".concat(d).concat(f),FOCUS_BLUR_DATA_API:"focus".concat(d).concat(f," ")+"blur".concat(d).concat(f)},k=function(){function d(a){c(this,d);this._element=a}e(d,[{key:"toggle",value:function(){var b=!0,c=!0,d=a(this._element).closest(i.DATA_TOGGLE)[0];if(d){var e=a(this._element).find(i.INPUT)[0];if(e){if("radio"===e.type){if(e.checked&&a(this._element).hasClass(h.ACTIVE)){b=!1}else{var f=a(d).find(i.ACTIVE)[0];if(f){a(f).removeClass(h.ACTIVE)}}}if(b){if(e.hasAttribute("disabled")||d.hasAttribute("disabled")||e.classList.contains("disabled")||d.classList.contains("disabled")){return}e.checked=!a(this._element).hasClass(h.ACTIVE);a(e).trigger("change")}e.focus();c=!1}}if(c){this._element.setAttribute("aria-pressed",!a(this._element).hasClass(h.ACTIVE))}if(b){a(this._element).toggleClass(h.ACTIVE)}}},{key:"dispose",value:function(){a.removeData(this._element,b);this._element=null}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var e=a(this).data(b);if(!e){e=new d(this);a(this).data(b,e)}if("toggle"===c){e[c]()}})}},{key:"VERSION",get:function(){return"4.0.0"}}]);return d}();a(document).on(j.CLICK_DATA_API,i.DATA_TOGGLE_CARROT,function(b){b.preventDefault();var c=b.target;if(!a(c).hasClass(h.BUTTON)){c=a(c).closest(i.BUTTON)}k._jQueryInterface.call(a(c),"toggle")}).on(j.FOCUS_BLUR_DATA_API,i.DATA_TOGGLE_CARROT,function(b){var c=a(b.target).closest(i.BUTTON)[0];a(c).toggleClass(h.FOCUS,/^focus(in)?$/.test(b.type))});a.fn.button=k._jQueryInterface;a.fn.button.Constructor=k;a.fn.button.noConflict=function(){a.fn.button=g;return k._jQueryInterface};return k}(f.default);a.default=g;return a.default});
|
||||
"use strict";define ("theme_boost/button",["exports","jquery"],function(a,b){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var f=function(a){return a&&a.__esModule?a:{default:a}}(b);function c(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function d(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function e(a,b,c){if(b)d(a.prototype,b);if(c)d(a,c);return a}var g="bs.button",h=".".concat(g),i=".data-api",j=f.default.fn.button,k={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},l={DATA_TOGGLE_CARROT:"[data-toggle^=\"button\"]",DATA_TOGGLE:"[data-toggle=\"buttons\"]",INPUT:"input:not([type=\"hidden\"])",ACTIVE:".active",BUTTON:".btn"},m={CLICK_DATA_API:"click".concat(h).concat(i),FOCUS_BLUR_DATA_API:"focus".concat(h).concat(i," ")+"blur".concat(h).concat(i)},n=function(){function a(b){c(this,a);this._element=b}e(a,[{key:"toggle",value:function(){var a=!0,b=!0,c=(0,f.default)(this._element).closest(l.DATA_TOGGLE)[0];if(c){var d=this._element.querySelector(l.INPUT);if(d){if("radio"===d.type){if(d.checked&&this._element.classList.contains(k.ACTIVE)){a=!1}else{var e=c.querySelector(l.ACTIVE);if(e){(0,f.default)(e).removeClass(k.ACTIVE)}}}if(a){if(d.hasAttribute("disabled")||c.hasAttribute("disabled")||d.classList.contains("disabled")||c.classList.contains("disabled")){return}d.checked=!this._element.classList.contains(k.ACTIVE);(0,f.default)(d).trigger("change")}d.focus();b=!1}}if(b){this._element.setAttribute("aria-pressed",!this._element.classList.contains(k.ACTIVE))}if(a){(0,f.default)(this._element).toggleClass(k.ACTIVE)}}},{key:"dispose",value:function(){f.default.removeData(this._element,g);this._element=null}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=(0,f.default)(this).data(g);if(!c){c=new a(this);(0,f.default)(this).data(g,c)}if("toggle"===b){c[b]()}})}},{key:"VERSION",get:function(){return"4.3.1"}}]);return a}();(0,f.default)(document).on(m.CLICK_DATA_API,l.DATA_TOGGLE_CARROT,function(a){a.preventDefault();var b=a.target;if(!(0,f.default)(b).hasClass(k.BUTTON)){b=(0,f.default)(b).closest(l.BUTTON)}n._jQueryInterface.call((0,f.default)(b),"toggle")}).on(m.FOCUS_BLUR_DATA_API,l.DATA_TOGGLE_CARROT,function(a){var b=(0,f.default)(a.target).closest(l.BUTTON)[0];(0,f.default)(b).toggleClass(k.FOCUS,/^focus(in)?$/.test(a.type))});f.default.fn.button=n._jQueryInterface;f.default.fn.button.Constructor=n;f.default.fn.button.noConflict=function(){f.default.fn.button=j;return n._jQueryInterface};a.default=n;return a.default});
|
||||
//# sourceMappingURL=button.min.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
"use strict";define ("theme_boost/index",["exports","jquery","./alert","./button","./carousel","./collapse","./dropdown","./modal","./popover","./scrollspy","./tab","./toast","./tooltip","./util"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.Tooltip=a.Toast=a.Tab=a.Scrollspy=a.Popover=a.Modal=a.Dropdown=a.Collapse=a.Carousel=a.Button=a.Alert=a.Util=void 0;var p=o(b),q=o(c),r=o(d),s=o(e),t=o(f),u=o(g),v=o(h),w=o(i),x=o(j),y=o(k),z=o(l),A=o(m),B=o(n);function o(a){return a&&a.__esModule?a:{default:a}}(function(){if("undefined"==typeof p.default){throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.")}var a=p.default.fn.jquery.split(" ")[0].split("."),b=9;if(a[0]<2&&a[1]<b||a[0]===1&&a[1]===b&&a[2]<1||a[0]>=4){throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}})();a.Util=B.default;a.Alert=q.default;a.Button=r.default;a.Carousel=s.default;a.Collapse=t.default;a.Dropdown=u.default;a.Modal=v.default;a.Popover=w.default;a.Scrollspy=x.default;a.Tab=y.default;a.Toast=z.default;a.Tooltip=A.default});
|
||||
//# sourceMappingURL=index.min.js.map
|
||||
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
define ("theme_boost/loader",["jquery","./tether","core/event"],function(a,b,c){window.jQuery=a;window.Tether=b;require(["theme_boost/aria","theme_boost/pending","theme_boost/util","theme_boost/alert","theme_boost/button","theme_boost/carousel","theme_boost/collapse","theme_boost/dropdown","theme_boost/modal","theme_boost/scrollspy","theme_boost/tab","theme_boost/tooltip","theme_boost/popover"],function(b){a("body").popover({trigger:"focus",selector:"[data-toggle=popover][data-trigger!=hover]"});a("html").popover({container:"body",selector:"[data-toggle=popover][data-trigger=hover]",trigger:"hover",delay:{hide:500}});c.getLegacyEvents().done(function(b){a(document).on(b.FILTER_CONTENT_UPDATED,function(){a("body").popover({selector:"[data-toggle=\"popover\"]",trigger:"focus"})})});b.init()});return{}});
|
||||
define ("theme_boost/loader",["jquery","./tether","core/event"],function(a,b,c){window.jQuery=a;window.Tether=b;require(["theme_boost/aria","theme_boost/pending","theme_boost/util","theme_boost/alert","theme_boost/button","theme_boost/carousel","theme_boost/collapse","theme_boost/dropdown","theme_boost/modal","theme_boost/scrollspy","theme_boost/tab","theme_boost/tooltip","theme_boost/popover"],function(b){a("body").popover({trigger:"focus",selector:"[data-toggle=popover][data-trigger!=hover]"});a("html").popover({container:"body",selector:"[data-toggle=popover][data-trigger=hover]",trigger:"hover",delay:{hide:500}});a.fn.dropdown.Constructor.Default.flip=!1;c.getLegacyEvents().done(function(b){a(document).on(b.FILTER_CONTENT_UPDATED,function(){a("body").popover({selector:"[data-toggle=\"popover\"]",trigger:"focus"})})});b.init()});return{}});
|
||||
//# sourceMappingURL=loader.min.js.map
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sources":["../src/loader.js"],"names":["define","jQuery","Tether","Event","window","require","Aria","popover","trigger","selector","container","delay","hide","getLegacyEvents","done","events","document","on","FILTER_CONTENT_UPDATED","init"],"mappings":"AAyBAA,OAAM,sBAAC,CAAC,QAAD,CAAW,UAAX,CAAuB,YAAvB,CAAD,CAAuC,SAASC,CAAT,CAAiBC,CAAjB,CAAyBC,CAAzB,CAAgC,CAEzEC,MAAM,CAACH,MAAP,CAAgBA,CAAhB,CACAG,MAAM,CAACF,MAAP,CAAgBA,CAAhB,CAEAG,OAAO,CAAC,CAAC,kBAAD,CACA,qBADA,CAEA,kBAFA,CAGA,mBAHA,CAIA,oBAJA,CAKA,sBALA,CAMA,sBANA,CAOA,sBAPA,CAQA,mBARA,CASA,uBATA,CAUA,iBAVA,CAWA,qBAXA,CAYA,qBAZA,CAAD,CAaC,SAASC,CAAT,CAAe,CAGnBL,CAAM,CAAC,MAAD,CAAN,CAAeM,OAAf,CAAuB,CACnBC,OAAO,CAAE,OADU,CAEnBC,QAAQ,CAAE,4CAFS,CAAvB,EAKAR,CAAM,CAAC,MAAD,CAAN,CAAeM,OAAf,CAAuB,CACnBG,SAAS,CAAE,MADQ,CAEnBD,QAAQ,CAAE,2CAFS,CAGnBD,OAAO,CAAE,OAHU,CAInBG,KAAK,CAAE,CACHC,IAAI,CAAE,GADH,CAJY,CAAvB,EAUAT,CAAK,CAACU,eAAN,GAAwBC,IAAxB,CAA6B,SAASC,CAAT,CAAiB,CAC1Cd,CAAM,CAACe,QAAD,CAAN,CAAiBC,EAAjB,CAAoBF,CAAM,CAACG,sBAA3B,CAAmD,UAAW,CAC1DjB,CAAM,CAAC,MAAD,CAAN,CAAeM,OAAf,CAAuB,CACnBE,QAAQ,CAAE,2BADS,CAEnBD,OAAO,CAAE,OAFU,CAAvB,CAKH,CAND,CAOH,CARD,EAUAF,CAAI,CAACa,IAAL,EACH,CA1CM,CAAP,CA6CA,MAAO,EACV,CAnDK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Template renderer for Moodle. Load and render Moodle templates with Mustache.\n *\n * @module core/templates\n * @package core\n * @class templates\n * @copyright 2015 Damyon Wiese <[email protected]>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 2.9\n */\ndefine(['jquery', './tether', 'core/event'], function(jQuery, Tether, Event) {\n\n window.jQuery = jQuery;\n window.Tether = Tether;\n\n require(['theme_boost/aria',\n 'theme_boost/pending',\n 'theme_boost/util',\n 'theme_boost/alert',\n 'theme_boost/button',\n 'theme_boost/carousel',\n 'theme_boost/collapse',\n 'theme_boost/dropdown',\n 'theme_boost/modal',\n 'theme_boost/scrollspy',\n 'theme_boost/tab',\n 'theme_boost/tooltip',\n 'theme_boost/popover'],\n function(Aria) {\n\n // We do twice because: https://github.com/twbs/bootstrap/issues/10547\n jQuery('body').popover({\n trigger: 'focus',\n selector: \"[data-toggle=popover][data-trigger!=hover]\"\n });\n\n jQuery(\"html\").popover({\n container: \"body\",\n selector: \"[data-toggle=popover][data-trigger=hover]\",\n trigger: \"hover\",\n delay: {\n hide: 500\n }\n });\n\n // We need to call popover automatically if nodes are added to the page later.\n Event.getLegacyEvents().done(function(events) {\n jQuery(document).on(events.FILTER_CONTENT_UPDATED, function() {\n jQuery('body').popover({\n selector: '[data-toggle=\"popover\"]',\n trigger: 'focus'\n });\n\n });\n });\n\n Aria.init();\n });\n\n\n return {};\n});\n"],"file":"loader.min.js"}
|
||||
{"version":3,"sources":["../src/loader.js"],"names":["define","jQuery","Tether","Event","window","require","Aria","popover","trigger","selector","container","delay","hide","fn","dropdown","Constructor","Default","flip","getLegacyEvents","done","events","document","on","FILTER_CONTENT_UPDATED","init"],"mappings":"AAyBAA,OAAM,sBAAC,CAAC,QAAD,CAAW,UAAX,CAAuB,YAAvB,CAAD,CAAuC,SAASC,CAAT,CAAiBC,CAAjB,CAAyBC,CAAzB,CAAgC,CAEzEC,MAAM,CAACH,MAAP,CAAgBA,CAAhB,CACAG,MAAM,CAACF,MAAP,CAAgBA,CAAhB,CAEAG,OAAO,CAAC,CAAC,kBAAD,CACA,qBADA,CAEA,kBAFA,CAGA,mBAHA,CAIA,oBAJA,CAKA,sBALA,CAMA,sBANA,CAOA,sBAPA,CAQA,mBARA,CASA,uBATA,CAUA,iBAVA,CAWA,qBAXA,CAYA,qBAZA,CAAD,CAaC,SAASC,CAAT,CAAe,CAGnBL,CAAM,CAAC,MAAD,CAAN,CAAeM,OAAf,CAAuB,CACnBC,OAAO,CAAE,OADU,CAEnBC,QAAQ,CAAE,4CAFS,CAAvB,EAKAR,CAAM,CAAC,MAAD,CAAN,CAAeM,OAAf,CAAuB,CACnBG,SAAS,CAAE,MADQ,CAEnBD,QAAQ,CAAE,2CAFS,CAGnBD,OAAO,CAAE,OAHU,CAInBG,KAAK,CAAE,CACHC,IAAI,CAAE,GADH,CAJY,CAAvB,EAUAX,CAAM,CAACY,EAAP,CAAUC,QAAV,CAAmBC,WAAnB,CAA+BC,OAA/B,CAAuCC,IAAvC,IAGAd,CAAK,CAACe,eAAN,GAAwBC,IAAxB,CAA6B,SAASC,CAAT,CAAiB,CAC1CnB,CAAM,CAACoB,QAAD,CAAN,CAAiBC,EAAjB,CAAoBF,CAAM,CAACG,sBAA3B,CAAmD,UAAW,CAC1DtB,CAAM,CAAC,MAAD,CAAN,CAAeM,OAAf,CAAuB,CACnBE,QAAQ,CAAE,2BADS,CAEnBD,OAAO,CAAE,OAFU,CAAvB,CAKH,CAND,CAOH,CARD,EAUAF,CAAI,CAACkB,IAAL,EACH,CA7CM,CAAP,CAgDA,MAAO,EACV,CAtDK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Template renderer for Moodle. Load and render Moodle templates with Mustache.\n *\n * @module core/templates\n * @package core\n * @class templates\n * @copyright 2015 Damyon Wiese <[email protected]>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 2.9\n */\ndefine(['jquery', './tether', 'core/event'], function(jQuery, Tether, Event) {\n\n window.jQuery = jQuery;\n window.Tether = Tether;\n\n require(['theme_boost/aria',\n 'theme_boost/pending',\n 'theme_boost/util',\n 'theme_boost/alert',\n 'theme_boost/button',\n 'theme_boost/carousel',\n 'theme_boost/collapse',\n 'theme_boost/dropdown',\n 'theme_boost/modal',\n 'theme_boost/scrollspy',\n 'theme_boost/tab',\n 'theme_boost/tooltip',\n 'theme_boost/popover'],\n function(Aria) {\n\n // We do twice because: https://github.com/twbs/bootstrap/issues/10547\n jQuery('body').popover({\n trigger: 'focus',\n selector: \"[data-toggle=popover][data-trigger!=hover]\"\n });\n\n jQuery(\"html\").popover({\n container: \"body\",\n selector: \"[data-toggle=popover][data-trigger=hover]\",\n trigger: \"hover\",\n delay: {\n hide: 500\n }\n });\n\n // Disables flipping the dropdowns up and getting hidden behind the navbar.\n jQuery.fn.dropdown.Constructor.Default.flip = false;\n\n // We need to call popover automatically if nodes are added to the page later.\n Event.getLegacyEvents().done(function(events) {\n jQuery(document).on(events.FILTER_CONTENT_UPDATED, function() {\n jQuery('body').popover({\n selector: '[data-toggle=\"popover\"]',\n trigger: 'focus'\n });\n\n });\n });\n\n Aria.init();\n });\n\n\n return {};\n});\n"],"file":"loader.min.js"}
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
define ("theme_boost/pending",["jquery"],function(a){var b={alert:[{start:"close",end:"closed"}],carousel:[{start:"slide",end:"slid"}],collapse:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}],dropdown:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}],modal:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}],popover:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}],tab:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}],tooltip:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}]};Object.keys(b).forEach(function(c){b[c].forEach(function(b){var d=b.start+".bs."+c,e=b.end+".bs."+c;a(document.body).on(d,function(){M.util.js_pending(e)});a(document.body).on(e,function(){M.util.js_complete(e)})})})});
|
||||
define ("theme_boost/pending",["jquery"],function(a){var b={alert:[{start:"close",end:"closed"}],carousel:[{start:"slide",end:"slid"}],collapse:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}],dropdown:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}],modal:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}],popover:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}],tab:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}],toast:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}],tooltip:[{start:"hide",end:"hidden"},{start:"show",end:"shown"}]};Object.keys(b).forEach(function(c){b[c].forEach(function(b){var d=b.start+".bs."+c,e=b.end+".bs."+c;a(document.body).on(d,function(){M.util.js_pending(e)});a(document.body).on(e,function(){M.util.js_complete(e)})})})});
|
||||
//# sourceMappingURL=pending.min.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
function _typeof2(a){if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof2=function(a){return typeof a}}else{_typeof2=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return _typeof2(a)}define ("theme_boost/popover",["exports","jquery","./tooltip"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var l=d(b),m=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a){if("function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)){e=function(a){return _typeof2(a)}}else{e=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":_typeof2(a)}}return e(a)}function f(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function g(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function h(a,b,c){if(b)g(a.prototype,b);if(c)g(a,c);return a}function i(a,b){if(b&&("object"===e(b)||"function"==typeof b)){return b}if(void 0===a){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return a}function j(a,b){if("function"!=typeof b&&null!==b){throw new TypeError("Super expression must either be null or a function")}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}});if(b)Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b}function k(){k=Object.assign||function(a){for(var b=1,c;b<arguments.length;b++){c=arguments[b];for(var d in c){if(Object.prototype.hasOwnProperty.call(c,d)){a[d]=c[d]}}}return a};return k.apply(this,arguments)}var n=function(a){var b="bs.popover",c=".".concat(b),d=a.fn.popover,g="bs-popover",l=new RegExp("(^|\\s)".concat(g,"\\S+"),"g"),n=k({},m.default.Default,{placement:"right",trigger:"click",content:"",template:"<div class=\"popover\" role=\"tooltip\"><div class=\"arrow\"></div><h3 class=\"popover-header\"></h3><div class=\"popover-body\"></div></div>"}),o=k({},m.default.DefaultType,{content:"(string|element|function)"}),p={FADE:"fade",SHOW:"show"},q={TITLE:".popover-header",CONTENT:".popover-body"},r={HIDE:"hide".concat(c),HIDDEN:"hidden".concat(c),SHOW:"show".concat(c),SHOWN:"shown".concat(c),INSERTED:"inserted".concat(c),CLICK:"click".concat(c),FOCUSIN:"focusin".concat(c),FOCUSOUT:"focusout".concat(c),MOUSEENTER:"mouseenter".concat(c),MOUSELEAVE:"mouseleave".concat(c)},s=function(d){j(k,d);function k(){f(this,k);return i(this,(k.__proto__||Object.getPrototypeOf(k)).apply(this,arguments))}h(k,[{key:"isWithContent",value:function(){return this.getTitle()||this._getContent()}},{key:"addAttachmentClass",value:function(b){a(this.getTipElement()).addClass("".concat(g,"-").concat(b))}},{key:"getTipElement",value:function(){this.tip=this.tip||a(this.config.template)[0];return this.tip}},{key:"setContent",value:function(){var b=a(this.getTipElement());this.setElementContent(b.find(q.TITLE),this.getTitle());var c=this._getContent();if("function"==typeof c){c=c.call(this.element)}this.setElementContent(b.find(q.CONTENT),c);b.removeClass("".concat(p.FADE," ").concat(p.SHOW))}},{key:"_getContent",value:function(){return this.element.getAttribute("data-content")||this.config.content}},{key:"_cleanTipClass",value:function(){var b=a(this.getTipElement()),c=b.attr("class").match(l);if(null!==c&&0<c.length){b.removeClass(c.join(""))}}}],[{key:"_jQueryInterface",value:function(c){return this.each(function(){var d=a(this).data(b),f="object"===e(c)?c:null;if(!d&&/destroy|hide/.test(c)){return}if(!d){d=new k(this,f);a(this).data(b,d)}if("string"==typeof c){if("undefined"==typeof d[c]){throw new TypeError("No method named \"".concat(c,"\""))}d[c]()}})}},{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return n}},{key:"NAME",get:function(){return"popover"}},{key:"DATA_KEY",get:function(){return b}},{key:"Event",get:function(){return r}},{key:"EVENT_KEY",get:function(){return c}},{key:"DefaultType",get:function(){return o}}]);return k}(m.default);a.fn.popover=s._jQueryInterface;a.fn.popover.Constructor=s;a.fn.popover.noConflict=function(){a.fn.popover=d;return s._jQueryInterface};return s}(l.default);a.default=n;return a.default});
|
||||
"use strict";function _typeof2(a){if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof2=function(a){return typeof a}}else{_typeof2=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return _typeof2(a)}define ("theme_boost/popover",["exports","jquery","./tooltip"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var o=d(b),p=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a){if("function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)){e=function(a){return _typeof2(a)}}else{e=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":_typeof2(a)}}return e(a)}function f(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function g(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function h(a,b,c){if(b)g(a.prototype,b);if(c)g(a,c);return a}function i(a,b){if(b&&("object"===e(b)||"function"==typeof b)){return b}return j(a)}function j(a){if(void 0===a){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return a}function k(a,b){if("function"!=typeof b&&null!==b){throw new TypeError("Super expression must either be null or a function")}a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,writable:!0,configurable:!0}});if(b)l(a,b)}function l(a,b){l=Object.setPrototypeOf||function(a,b){a.__proto__=b;return a};return l(a,b)}function m(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{},d=Object.keys(c);if("function"==typeof Object.getOwnPropertySymbols){d=d.concat(Object.getOwnPropertySymbols(c).filter(function(a){return Object.getOwnPropertyDescriptor(c,a).enumerable}))}d.forEach(function(b){n(a,b,c[b])})}return a}function n(a,b,c){if(b in a){Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0})}else{a[b]=c}return a}var q="bs.popover",r=".".concat(q),s=o.default.fn.popover,t="bs-popover",u=new RegExp("(^|\\s)".concat(t,"\\S+"),"g"),v=m({},p.default.Default,{placement:"right",trigger:"click",content:"",template:"<div class=\"popover\" role=\"tooltip\"><div class=\"arrow\"></div><h3 class=\"popover-header\"></h3><div class=\"popover-body\"></div></div>"}),w=m({},p.default.DefaultType,{content:"(string|element|function)"}),x={FADE:"fade",SHOW:"show"},y={TITLE:".popover-header",CONTENT:".popover-body"},z={HIDE:"hide".concat(r),HIDDEN:"hidden".concat(r),SHOW:"show".concat(r),SHOWN:"shown".concat(r),INSERTED:"inserted".concat(r),CLICK:"click".concat(r),FOCUSIN:"focusin".concat(r),FOCUSOUT:"focusout".concat(r),MOUSEENTER:"mouseenter".concat(r),MOUSELEAVE:"mouseleave".concat(r)},A=function(a){k(b,a);function b(){f(this,b);return i(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}h(b,[{key:"isWithContent",value:function(){return this.getTitle()||this._getContent()}},{key:"addAttachmentClass",value:function(a){(0,o.default)(this.getTipElement()).addClass("".concat(t,"-").concat(a))}},{key:"getTipElement",value:function(){this.tip=this.tip||(0,o.default)(this.config.template)[0];return this.tip}},{key:"setContent",value:function(){var a=(0,o.default)(this.getTipElement());this.setElementContent(a.find(y.TITLE),this.getTitle());var b=this._getContent();if("function"==typeof b){b=b.call(this.element)}this.setElementContent(a.find(y.CONTENT),b);a.removeClass("".concat(x.FADE," ").concat(x.SHOW))}},{key:"_getContent",value:function(){return this.element.getAttribute("data-content")||this.config.content}},{key:"_cleanTipClass",value:function(){var a=(0,o.default)(this.getTipElement()),b=a.attr("class").match(u);if(null!==b&&0<b.length){a.removeClass(b.join(""))}}}],[{key:"_jQueryInterface",value:function(a){return this.each(function(){var c=(0,o.default)(this).data(q),d="object"===e(a)?a:null;if(!c&&/dispose|hide/.test(a)){return}if(!c){c=new b(this,d);(0,o.default)(this).data(q,c)}if("string"==typeof a){if("undefined"==typeof c[a]){throw new TypeError("No method named \"".concat(a,"\""))}c[a]()}})}},{key:"VERSION",get:function(){return"4.3.1"}},{key:"Default",get:function(){return v}},{key:"NAME",get:function(){return"popover"}},{key:"DATA_KEY",get:function(){return q}},{key:"Event",get:function(){return z}},{key:"EVENT_KEY",get:function(){return r}},{key:"DefaultType",get:function(){return w}}]);return b}(p.default);o.default.fn.popover=A._jQueryInterface;o.default.fn.popover.Constructor=A;o.default.fn.popover.noConflict=function(){o.default.fn.popover=s;return A._jQueryInterface};a.default=A;return a.default});
|
||||
//# sourceMappingURL=popover.min.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
+2
@@ -0,0 +1,2 @@
|
||||
"use strict";define ("theme_boost/sanitizer",["exports"],function(a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.sanitizeHtml=function(a,c,d){if(0===a.length){return a}if(d&&"function"==typeof d){return d(a)}for(var e=new window.DOMParser,f=e.parseFromString(a,"text/html"),g=Object.keys(c),h=[].slice.call(f.body.querySelectorAll("*")),j=function(a){var d=h[a],e=d.nodeName.toLowerCase();if(-1===g.indexOf(d.nodeName.toLowerCase())){d.parentNode.removeChild(d);return"continue"}var f=[].slice.call(d.attributes),i=[].concat(c["*"]||[],c[e]||[]);f.forEach(function(a){if(!b(a,i)){d.removeAttribute(a.nodeName)}})},k=0,l=h.length,m;k<l;k++){m=j(k,l);if("continue"===m)continue}return f.body.innerHTML};var c=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],d=/^aria-[\w-]*$/i,e=a.DefaultWhitelist={"*":["class","dir","id","lang","role",d],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},f=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,g=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function b(a,b){var d=a.nodeName.toLowerCase();if(-1!==b.indexOf(d)){if(-1!==c.indexOf(d)){return!!(a.nodeValue.match(f)||a.nodeValue.match(g))}return!0}for(var e=b.filter(function(a){return a instanceof RegExp}),h=0,j=e.length;h<j;h++){if(d.match(e[h])){return!0}}return!1}});
|
||||
//# sourceMappingURL=sanitizer.min.js.map
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
define ("theme_boost/tab",["exports","jquery","./util"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var h=d(b),i=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function f(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function g(a,b,c){if(b)f(a.prototype,b);if(c)f(a,c);return a}var j=function(a){var b="bs.tab",c=".".concat(b),d=a.fn.tab,f={HIDE:"hide".concat(c),HIDDEN:"hidden".concat(c),SHOW:"show".concat(c),SHOWN:"shown".concat(c),CLICK_DATA_API:"click".concat(c).concat(".data-api")},h={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},j={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",ACTIVE_UL:"> li > .active",DATA_TOGGLE:"[data-toggle=\"tab\"], [data-toggle=\"pill\"], [data-toggle=\"list\"]",DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},k=function(){function c(a){e(this,c);this._element=a}g(c,[{key:"show",value:function(){var b=this;if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&a(this._element).hasClass(h.ACTIVE)||a(this._element).hasClass(h.DISABLED)){return}var c,d,e=a(this._element).closest(j.NAV_LIST_GROUP)[0],g=i.default.getSelectorFromElement(this._element);if(e){var k="UL"===e.nodeName?j.ACTIVE_UL:j.ACTIVE;d=a.makeArray(a(e).find(k));d=d[d.length-1]}var l=a.Event(f.HIDE,{relatedTarget:this._element}),m=a.Event(f.SHOW,{relatedTarget:d});if(d){a(d).trigger(l)}a(this._element).trigger(m);if(m.isDefaultPrevented()||l.isDefaultPrevented()){return}if(g){c=a(g)[0]}this._activate(this._element,e);var n=function(){var c=a.Event(f.HIDDEN,{relatedTarget:b._element}),e=a.Event(f.SHOWN,{relatedTarget:d});a(d).trigger(c);a(b._element).trigger(e)};if(c){this._activate(c,c.parentNode,n)}else{n()}}},{key:"dispose",value:function(){a.removeData(this._element,b);this._element=null}},{key:"_activate",value:function(b,c,d){var e=this,f;if("UL"===c.nodeName){f=a(c).find(j.ACTIVE_UL)}else{f=a(c).children(j.ACTIVE)}var g=f[0],k=d&&i.default.supportsTransitionEnd()&&g&&a(g).hasClass(h.FADE),l=function(){return e._transitionComplete(b,g,d)};if(g&&k){a(g).one(i.default.TRANSITION_END,l).emulateTransitionEnd(150)}else{l()}}},{key:"_transitionComplete",value:function(b,c,d){if(c){a(c).removeClass("".concat(h.SHOW," ").concat(h.ACTIVE));var e=a(c.parentNode).find(j.DROPDOWN_ACTIVE_CHILD)[0];if(e){a(e).removeClass(h.ACTIVE)}if("tab"===c.getAttribute("role")){c.setAttribute("aria-selected",!1)}}a(b).addClass(h.ACTIVE);if("tab"===b.getAttribute("role")){b.setAttribute("aria-selected",!0)}i.default.reflow(b);a(b).addClass(h.SHOW);if(b.parentNode&&a(b.parentNode).hasClass(h.DROPDOWN_MENU)){var f=a(b).closest(j.DROPDOWN)[0];if(f){a(f).find(j.DROPDOWN_TOGGLE).addClass(h.ACTIVE)}b.setAttribute("aria-expanded",!0)}if(d){d()}}}],[{key:"_jQueryInterface",value:function(d){return this.each(function(){var e=a(this),f=e.data(b);if(!f){f=new c(this);e.data(b,f)}if("string"==typeof d){if("undefined"==typeof f[d]){throw new TypeError("No method named \"".concat(d,"\""))}f[d]()}})}},{key:"VERSION",get:function(){return"4.0.0"}}]);return c}();a(document).on(f.CLICK_DATA_API,j.DATA_TOGGLE,function(b){b.preventDefault();k._jQueryInterface.call(a(this),"show")});a.fn.tab=k._jQueryInterface;a.fn.tab.Constructor=k;a.fn.tab.noConflict=function(){a.fn.tab=d;return k._jQueryInterface};return k}(h.default);a.default=j;return a.default});
|
||||
"use strict";define ("theme_boost/tab",["exports","jquery","./util"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var h=d(b),i=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function f(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function g(a,b,c){if(b)f(a.prototype,b);if(c)f(a,c);return a}var j="bs.tab",k=".".concat(j),l=h.default.fn.tab,m={HIDE:"hide".concat(k),HIDDEN:"hidden".concat(k),SHOW:"show".concat(k),SHOWN:"shown".concat(k),CLICK_DATA_API:"click".concat(k).concat(".data-api")},n={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},o={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",ACTIVE_UL:"> li > .active",DATA_TOGGLE:"[data-toggle=\"tab\"], [data-toggle=\"pill\"], [data-toggle=\"list\"]",DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},p=function(){function a(b){e(this,a);this._element=b}g(a,[{key:"show",value:function(){var a=this;if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&(0,h.default)(this._element).hasClass(n.ACTIVE)||(0,h.default)(this._element).hasClass(n.DISABLED)){return}var b,c,d=(0,h.default)(this._element).closest(o.NAV_LIST_GROUP)[0],e=i.default.getSelectorFromElement(this._element);if(d){var f="UL"===d.nodeName||"OL"===d.nodeName?o.ACTIVE_UL:o.ACTIVE;c=h.default.makeArray((0,h.default)(d).find(f));c=c[c.length-1]}var g=h.default.Event(m.HIDE,{relatedTarget:this._element}),j=h.default.Event(m.SHOW,{relatedTarget:c});if(c){(0,h.default)(c).trigger(g)}(0,h.default)(this._element).trigger(j);if(j.isDefaultPrevented()||g.isDefaultPrevented()){return}if(e){b=document.querySelector(e)}this._activate(this._element,d);var k=function(){var b=h.default.Event(m.HIDDEN,{relatedTarget:a._element}),d=h.default.Event(m.SHOWN,{relatedTarget:c});(0,h.default)(c).trigger(b);(0,h.default)(a._element).trigger(d)};if(b){this._activate(b,b.parentNode,k)}else{k()}}},{key:"dispose",value:function(){h.default.removeData(this._element,j);this._element=null}},{key:"_activate",value:function(a,b,c){var d=this,e=b&&("UL"===b.nodeName||"OL"===b.nodeName)?(0,h.default)(b).find(o.ACTIVE_UL):(0,h.default)(b).children(o.ACTIVE),f=e[0],g=c&&f&&(0,h.default)(f).hasClass(n.FADE),j=function(){return d._transitionComplete(a,f,c)};if(f&&g){var k=i.default.getTransitionDurationFromElement(f);(0,h.default)(f).removeClass(n.SHOW).one(i.default.TRANSITION_END,j).emulateTransitionEnd(k)}else{j()}}},{key:"_transitionComplete",value:function(a,b,c){if(b){(0,h.default)(b).removeClass(n.ACTIVE);var d=(0,h.default)(b.parentNode).find(o.DROPDOWN_ACTIVE_CHILD)[0];if(d){(0,h.default)(d).removeClass(n.ACTIVE)}if("tab"===b.getAttribute("role")){b.setAttribute("aria-selected",!1)}}(0,h.default)(a).addClass(n.ACTIVE);if("tab"===a.getAttribute("role")){a.setAttribute("aria-selected",!0)}i.default.reflow(a);if(a.classList.contains(n.FADE)){a.classList.add(n.SHOW)}if(a.parentNode&&(0,h.default)(a.parentNode).hasClass(n.DROPDOWN_MENU)){var e=(0,h.default)(a).closest(o.DROPDOWN)[0];if(e){var f=[].slice.call(e.querySelectorAll(o.DROPDOWN_TOGGLE));(0,h.default)(f).addClass(n.ACTIVE)}a.setAttribute("aria-expanded",!0)}if(c){c()}}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=(0,h.default)(this),d=c.data(j);if(!d){d=new a(this);c.data(j,d)}if("string"==typeof b){if("undefined"==typeof d[b]){throw new TypeError("No method named \"".concat(b,"\""))}d[b]()}})}},{key:"VERSION",get:function(){return"4.3.1"}}]);return a}();(0,h.default)(document).on(m.CLICK_DATA_API,o.DATA_TOGGLE,function(a){a.preventDefault();p._jQueryInterface.call((0,h.default)(this),"show")});h.default.fn.tab=p._jQueryInterface;h.default.fn.tab.Constructor=p;h.default.fn.tab.noConflict=function(){h.default.fn.tab=l;return p._jQueryInterface};a.default=p;return a.default});
|
||||
//# sourceMappingURL=tab.min.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
"use strict";function _typeof2(a){if("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator){_typeof2=function(a){return typeof a}}else{_typeof2=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}}return _typeof2(a)}define ("theme_boost/toast",["exports","jquery","./util"],function(a,b,c){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var k=d(b),l=d(c);function d(a){return a&&a.__esModule?a:{default:a}}function e(a){if("function"==typeof Symbol&&"symbol"===_typeof2(Symbol.iterator)){e=function(a){return _typeof2(a)}}else{e=function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":_typeof2(a)}}return e(a)}function f(a){for(var b=1;b<arguments.length;b++){var c=null!=arguments[b]?arguments[b]:{},d=Object.keys(c);if("function"==typeof Object.getOwnPropertySymbols){d=d.concat(Object.getOwnPropertySymbols(c).filter(function(a){return Object.getOwnPropertyDescriptor(c,a).enumerable}))}d.forEach(function(b){g(a,b,c[b])})}return a}function g(a,b,c){if(b in a){Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0})}else{a[b]=c}return a}function h(a,b){if(!(a instanceof b)){throw new TypeError("Cannot call a class as a function")}}function i(a,b){for(var c=0,d;c<b.length;c++){d=b[c];d.enumerable=d.enumerable||!1;d.configurable=!0;if("value"in d)d.writable=!0;Object.defineProperty(a,d.key,d)}}function j(a,b,c){if(b)i(a.prototype,b);if(c)i(a,c);return a}var m="bs.toast",n=".".concat(m),o=k.default.fn.toast,p={CLICK_DISMISS:"click.dismiss".concat(n),HIDE:"hide".concat(n),HIDDEN:"hidden".concat(n),SHOW:"show".concat(n),SHOWN:"shown".concat(n)},q={FADE:"fade",HIDE:"hide",SHOW:"show",SHOWING:"showing"},r={animation:"boolean",autohide:"boolean",delay:"number"},s={animation:!0,autohide:!0,delay:500},t={DATA_DISMISS:"[data-dismiss=\"toast\"]"},u=function(){function a(b,c){h(this,a);this._element=b;this._config=this._getConfig(c);this._timeout=null;this._setListeners()}j(a,[{key:"show",value:function(){var a=this;(0,k.default)(this._element).trigger(p.SHOW);if(this._config.animation){this._element.classList.add(q.FADE)}var b=function(){a._element.classList.remove(q.SHOWING);a._element.classList.add(q.SHOW);(0,k.default)(a._element).trigger(p.SHOWN);if(a._config.autohide){a.hide()}};this._element.classList.remove(q.HIDE);this._element.classList.add(q.SHOWING);if(this._config.animation){var c=l.default.getTransitionDurationFromElement(this._element);(0,k.default)(this._element).one(l.default.TRANSITION_END,b).emulateTransitionEnd(c)}else{b()}}},{key:"hide",value:function(a){var b=this;if(!this._element.classList.contains(q.SHOW)){return}(0,k.default)(this._element).trigger(p.HIDE);if(a){this._close()}else{this._timeout=setTimeout(function(){b._close()},this._config.delay)}}},{key:"dispose",value:function(){clearTimeout(this._timeout);this._timeout=null;if(this._element.classList.contains(q.SHOW)){this._element.classList.remove(q.SHOW)}(0,k.default)(this._element).off(p.CLICK_DISMISS);k.default.removeData(this._element,m);this._element=null;this._config=null}},{key:"_getConfig",value:function(a){a=f({},s,(0,k.default)(this._element).data(),"object"===e(a)&&a?a:{});l.default.typeCheckConfig("toast",a,this.constructor.DefaultType);return a}},{key:"_setListeners",value:function(){var a=this;(0,k.default)(this._element).on(p.CLICK_DISMISS,t.DATA_DISMISS,function(){return a.hide(!0)})}},{key:"_close",value:function(){var a=this,b=function(){a._element.classList.add(q.HIDE);(0,k.default)(a._element).trigger(p.HIDDEN)};this._element.classList.remove(q.SHOW);if(this._config.animation){var c=l.default.getTransitionDurationFromElement(this._element);(0,k.default)(this._element).one(l.default.TRANSITION_END,b).emulateTransitionEnd(c)}else{b()}}}],[{key:"_jQueryInterface",value:function(b){return this.each(function(){var c=(0,k.default)(this),d=c.data(m),f="object"===e(b)&&b;if(!d){d=new a(this,f);c.data(m,d)}if("string"==typeof b){if("undefined"==typeof d[b]){throw new TypeError("No method named \"".concat(b,"\""))}d[b](this)}})}},{key:"VERSION",get:function(){return"4.3.1"}},{key:"DefaultType",get:function(){return r}},{key:"Default",get:function(){return s}}]);return a}();k.default.fn.toast=u._jQueryInterface;k.default.fn.toast.Constructor=u;k.default.fn.toast.noConflict=function(){k.default.fn.toast=o;return u._jQueryInterface};a.default=u;return a.default});
|
||||
//# sourceMappingURL=toast.min.js.map
|
||||
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
define ("theme_boost/util",["exports","jquery"],function(a,b){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var c=function(a){return a&&a.__esModule?a:{default:a}}(b);var d=function(a){var g=!1;function b(a){return{}.toString.call(a).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function c(){return{bindType:g.end,delegateType:g.end,handle:function(b){if(a(b.target).is(this)){return b.handleObj.handler.apply(this,arguments)}}}}function d(){if("undefined"!=typeof window&&window.QUnit){return!1}return{end:"transitionend"}}function e(b){var c=this,d=!1;a(this).one(h.TRANSITION_END,function(){d=!0});setTimeout(function(){if(!d){h.triggerTransitionEnd(c)}},b);return this}function f(b){b="function"==typeof a.escapeSelector?a.escapeSelector(b).substr(1):b.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1");return b}var h={TRANSITION_END:"bsTransitionEnd",getUID:function(a){do{a+=~~(Math.random()*1e6)}while(document.getElementById(a));return a},getSelectorFromElement:function(b){var c=b.getAttribute("data-target");if(!c||"#"===c){c=b.getAttribute("href")||""}if("#"===c.charAt(0)){c=f(c)}try{var d=a(document).find(c);return 0<d.length?c:null}catch(a){return null}},reflow:function(a){return a.offsetHeight},triggerTransitionEnd:function(b){a(b).trigger(g.end)},supportsTransitionEnd:function(){return!!g},isElement:function(a){return(a[0]||a).nodeType},typeCheckConfig:function(a,c,d){for(var e in d){if(Object.prototype.hasOwnProperty.call(d,e)){var f=d[e],g=c[e],i=g&&h.isElement(g)?"element":b(g);if(!new RegExp(f).test(i)){throw new Error("".concat(a.toUpperCase(),": ")+"Option \"".concat(e,"\" provided type \"").concat(i,"\" ")+"but expected type \"".concat(f,"\"."))}}}}};(function(){g=d();a.fn.emulateTransitionEnd=e;if(h.supportsTransitionEnd()){a.event.special[h.TRANSITION_END]=c()}})();return h}(c.default);a.default=d;return a.default});
|
||||
"use strict";define ("theme_boost/util",["exports","jquery"],function(a,b){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var f=function(a){return a&&a.__esModule?a:{default:a}}(b);function c(a){return{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase()}function d(){return{bindType:"transitionend",delegateType:"transitionend",handle:function(a){if((0,f.default)(a.target).is(this)){return a.handleObj.handler.apply(this,arguments)}}}}function e(a){var b=this,c=!1;(0,f.default)(this).one(g.TRANSITION_END,function(){c=!0});setTimeout(function(){if(!c){g.triggerTransitionEnd(b)}},a);return this}var g={TRANSITION_END:"bsTransitionEnd",getUID:function(a){do{a+=~~(Math.random()*1e6)}while(document.getElementById(a));return a},getSelectorFromElement:function(a){var b=a.getAttribute("data-target");if(!b||"#"===b){var c=a.getAttribute("href");b=c&&"#"!==c?c.trim():""}try{return document.querySelector(b)?b:null}catch(a){return null}},getTransitionDurationFromElement:function(a){if(!a){return 0}var b=(0,f.default)(a).css("transition-duration"),c=(0,f.default)(a).css("transition-delay"),d=parseFloat(b),e=parseFloat(c);if(!d&&!e){return 0}b=b.split(",")[0];c=c.split(",")[0];return(parseFloat(b)+parseFloat(c))*1e3},reflow:function(a){return a.offsetHeight},triggerTransitionEnd:function(a){(0,f.default)(a).trigger("transitionend")},supportsTransitionEnd:function(){return!0},isElement:function(a){return(a[0]||a).nodeType},typeCheckConfig:function(a,b,d){for(var e in d){if(Object.prototype.hasOwnProperty.call(d,e)){var f=d[e],h=b[e],i=h&&g.isElement(h)?"element":c(h);if(!new RegExp(f).test(i)){throw new Error("".concat(a.toUpperCase(),": ")+"Option \"".concat(e,"\" provided type \"").concat(i,"\" ")+"but expected type \"".concat(f,"\"."))}}}},findShadowRoot:function(a){if(!document.documentElement.attachShadow){return null}if("function"==typeof a.getRootNode){var b=a.getRootNode();return b instanceof ShadowRoot?b:null}if(a instanceof ShadowRoot){return a}if(!a.parentNode){return null}return g.findShadowRoot(a.parentNode)}};(function(){f.default.fn.emulateTransitionEnd=e;f.default.event.special[g.TRANSITION_END]=d()})();a.default=g;return a.default});
|
||||
//# sourceMappingURL=util.min.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
+161
-164
@@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
"use strict";
|
||||
|
||||
@@ -38,179 +40,174 @@ define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0): alert.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var Alert = function ($) {
|
||||
var NAME = 'alert';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.alert';
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = _jquery2.default.fn[NAME];
|
||||
var Selector = {
|
||||
DISMISS: '[data-dismiss="alert"]'
|
||||
};
|
||||
var Event = {
|
||||
CLOSE: "close".concat(EVENT_KEY),
|
||||
CLOSED: "closed".concat(EVENT_KEY),
|
||||
CLICK_DATA_API: "click".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
};
|
||||
var ClassName = {
|
||||
ALERT: 'alert',
|
||||
FADE: 'fade',
|
||||
SHOW: 'show'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var NAME = 'alert';
|
||||
var VERSION = '4.0.0';
|
||||
var DATA_KEY = 'bs.alert';
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 150;
|
||||
var Selector = {
|
||||
DISMISS: '[data-dismiss="alert"]'
|
||||
};
|
||||
var Event = {
|
||||
CLOSE: "close".concat(EVENT_KEY),
|
||||
CLOSED: "closed".concat(EVENT_KEY),
|
||||
CLICK_DATA_API: "click".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
};
|
||||
var ClassName = {
|
||||
ALERT: 'alert',
|
||||
FADE: 'fade',
|
||||
SHOW: 'show'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
var Alert = function () {
|
||||
function Alert(element) {
|
||||
_classCallCheck(this, Alert);
|
||||
|
||||
this._element = element;
|
||||
} // Getters
|
||||
|
||||
|
||||
_createClass(Alert, [{
|
||||
key: "close",
|
||||
value: function close(element) {
|
||||
element = element || this._element;
|
||||
|
||||
var rootElement = this._getRootElement(element);
|
||||
|
||||
var customEvent = this._triggerCloseEvent(rootElement);
|
||||
|
||||
if (customEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._removeElement(rootElement);
|
||||
}
|
||||
}, {
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
}
|
||||
}, {
|
||||
key: "_getRootElement",
|
||||
value: function _getRootElement(element) {
|
||||
var selector = _util2.default.getSelectorFromElement(element);
|
||||
|
||||
var parent = false;
|
||||
|
||||
if (selector) {
|
||||
parent = $(selector)[0];
|
||||
}
|
||||
|
||||
if (!parent) {
|
||||
parent = $(element).closest(".".concat(ClassName.ALERT))[0];
|
||||
}
|
||||
|
||||
return parent;
|
||||
}
|
||||
}, {
|
||||
key: "_triggerCloseEvent",
|
||||
value: function _triggerCloseEvent(element) {
|
||||
var closeEvent = $.Event(Event.CLOSE);
|
||||
$(element).trigger(closeEvent);
|
||||
return closeEvent;
|
||||
}
|
||||
}, {
|
||||
key: "_removeElement",
|
||||
value: function _removeElement(element) {
|
||||
var _this = this;
|
||||
|
||||
$(element).removeClass(ClassName.SHOW);
|
||||
|
||||
if (!_util2.default.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
|
||||
this._destroyElement(element);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$(element).one(_util2.default.TRANSITION_END, function (event) {
|
||||
return _this._destroyElement(element, event);
|
||||
}).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
}
|
||||
}, {
|
||||
key: "_destroyElement",
|
||||
value: function _destroyElement(element) {
|
||||
$(element).detach().trigger(Event.CLOSED).remove();
|
||||
}
|
||||
}], [{
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $element = $(this);
|
||||
var data = $element.data(DATA_KEY);
|
||||
|
||||
if (!data) {
|
||||
data = new Alert(this);
|
||||
$element.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (config === 'close') {
|
||||
data[config](this);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "_handleDismiss",
|
||||
value: function _handleDismiss(alertInstance) {
|
||||
return function (event) {
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
alertInstance.close(this);
|
||||
};
|
||||
}
|
||||
}, {
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Alert;
|
||||
}();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Alert._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Alert;
|
||||
};
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Alert._jQueryInterface;
|
||||
};
|
||||
var Alert = function () {
|
||||
function Alert(element) {
|
||||
_classCallCheck(this, Alert);
|
||||
|
||||
this._element = element;
|
||||
} // Getters
|
||||
|
||||
|
||||
_createClass(Alert, [{
|
||||
key: "close",
|
||||
value: function close(element) {
|
||||
var rootElement = this._element;
|
||||
|
||||
if (element) {
|
||||
rootElement = this._getRootElement(element);
|
||||
}
|
||||
|
||||
var customEvent = this._triggerCloseEvent(rootElement);
|
||||
|
||||
if (customEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._removeElement(rootElement);
|
||||
}
|
||||
}, {
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
_jquery2.default.removeData(this._element, DATA_KEY);
|
||||
|
||||
this._element = null;
|
||||
}
|
||||
}, {
|
||||
key: "_getRootElement",
|
||||
value: function _getRootElement(element) {
|
||||
var selector = _util2.default.getSelectorFromElement(element);
|
||||
|
||||
var parent = false;
|
||||
|
||||
if (selector) {
|
||||
parent = document.querySelector(selector);
|
||||
}
|
||||
|
||||
if (!parent) {
|
||||
parent = (0, _jquery2.default)(element).closest(".".concat(ClassName.ALERT))[0];
|
||||
}
|
||||
|
||||
return parent;
|
||||
}
|
||||
}, {
|
||||
key: "_triggerCloseEvent",
|
||||
value: function _triggerCloseEvent(element) {
|
||||
var closeEvent = _jquery2.default.Event(Event.CLOSE);
|
||||
|
||||
(0, _jquery2.default)(element).trigger(closeEvent);
|
||||
return closeEvent;
|
||||
}
|
||||
}, {
|
||||
key: "_removeElement",
|
||||
value: function _removeElement(element) {
|
||||
var _this = this;
|
||||
|
||||
(0, _jquery2.default)(element).removeClass(ClassName.SHOW);
|
||||
|
||||
if (!(0, _jquery2.default)(element).hasClass(ClassName.FADE)) {
|
||||
this._destroyElement(element);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var transitionDuration = _util2.default.getTransitionDurationFromElement(element);
|
||||
|
||||
(0, _jquery2.default)(element).one(_util2.default.TRANSITION_END, function (event) {
|
||||
return _this._destroyElement(element, event);
|
||||
}).emulateTransitionEnd(transitionDuration);
|
||||
}
|
||||
}, {
|
||||
key: "_destroyElement",
|
||||
value: function _destroyElement(element) {
|
||||
(0, _jquery2.default)(element).detach().trigger(Event.CLOSED).remove();
|
||||
}
|
||||
}], [{
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $element = (0, _jquery2.default)(this);
|
||||
var data = $element.data(DATA_KEY);
|
||||
|
||||
if (!data) {
|
||||
data = new Alert(this);
|
||||
$element.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (config === 'close') {
|
||||
data[config](this);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "_handleDismiss",
|
||||
value: function _handleDismiss(alertInstance) {
|
||||
return function (event) {
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
alertInstance.close(this);
|
||||
};
|
||||
}
|
||||
}, {
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Alert;
|
||||
}(_jquery2.default);
|
||||
}();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
(0, _jquery2.default)(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
_jquery2.default.fn[NAME] = Alert._jQueryInterface;
|
||||
_jquery2.default.fn[NAME].Constructor = Alert;
|
||||
|
||||
_jquery2.default.fn[NAME].noConflict = function () {
|
||||
_jquery2.default.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Alert._jQueryInterface;
|
||||
};
|
||||
|
||||
exports.default = Alert;
|
||||
});
|
||||
+123
-130
@@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
define(["exports", "jquery"], function (exports, _jquery) {
|
||||
"use strict";
|
||||
|
||||
@@ -36,165 +38,156 @@ define(["exports", "jquery"], function (exports, _jquery) {
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0): button.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var Button = function ($) {
|
||||
var NAME = 'button';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.button';
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = _jquery2.default.fn[NAME];
|
||||
var ClassName = {
|
||||
ACTIVE: 'active',
|
||||
BUTTON: 'btn',
|
||||
FOCUS: 'focus'
|
||||
};
|
||||
var Selector = {
|
||||
DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
|
||||
DATA_TOGGLE: '[data-toggle="buttons"]',
|
||||
INPUT: 'input:not([type="hidden"])',
|
||||
ACTIVE: '.active',
|
||||
BUTTON: '.btn'
|
||||
};
|
||||
var Event = {
|
||||
CLICK_DATA_API: "click".concat(EVENT_KEY).concat(DATA_API_KEY),
|
||||
FOCUS_BLUR_DATA_API: "focus".concat(EVENT_KEY).concat(DATA_API_KEY, " ") + "blur".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var NAME = 'button';
|
||||
var VERSION = '4.0.0';
|
||||
var DATA_KEY = 'bs.button';
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var ClassName = {
|
||||
ACTIVE: 'active',
|
||||
BUTTON: 'btn',
|
||||
FOCUS: 'focus'
|
||||
};
|
||||
var Selector = {
|
||||
DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
|
||||
DATA_TOGGLE: '[data-toggle="buttons"]',
|
||||
INPUT: 'input',
|
||||
ACTIVE: '.active',
|
||||
BUTTON: '.btn'
|
||||
};
|
||||
var Event = {
|
||||
CLICK_DATA_API: "click".concat(EVENT_KEY).concat(DATA_API_KEY),
|
||||
FOCUS_BLUR_DATA_API: "focus".concat(EVENT_KEY).concat(DATA_API_KEY, " ") + "blur".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
var Button = function () {
|
||||
function Button(element) {
|
||||
_classCallCheck(this, Button);
|
||||
var Button = function () {
|
||||
function Button(element) {
|
||||
_classCallCheck(this, Button);
|
||||
|
||||
this._element = element;
|
||||
} // Getters
|
||||
this._element = element;
|
||||
} // Getters
|
||||
|
||||
|
||||
_createClass(Button, [{
|
||||
key: "toggle",
|
||||
value: function toggle() {
|
||||
var triggerChangeEvent = true;
|
||||
var addAriaPressed = true;
|
||||
var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
|
||||
_createClass(Button, [{
|
||||
key: "toggle",
|
||||
value: function toggle() {
|
||||
var triggerChangeEvent = true;
|
||||
var addAriaPressed = true;
|
||||
var rootElement = (0, _jquery2.default)(this._element).closest(Selector.DATA_TOGGLE)[0];
|
||||
|
||||
if (rootElement) {
|
||||
var input = $(this._element).find(Selector.INPUT)[0];
|
||||
if (rootElement) {
|
||||
var input = this._element.querySelector(Selector.INPUT);
|
||||
|
||||
if (input) {
|
||||
if (input.type === 'radio') {
|
||||
if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) {
|
||||
triggerChangeEvent = false;
|
||||
} else {
|
||||
var activeElement = $(rootElement).find(Selector.ACTIVE)[0];
|
||||
if (input) {
|
||||
if (input.type === 'radio') {
|
||||
if (input.checked && this._element.classList.contains(ClassName.ACTIVE)) {
|
||||
triggerChangeEvent = false;
|
||||
} else {
|
||||
var activeElement = rootElement.querySelector(Selector.ACTIVE);
|
||||
|
||||
if (activeElement) {
|
||||
$(activeElement).removeClass(ClassName.ACTIVE);
|
||||
}
|
||||
if (activeElement) {
|
||||
(0, _jquery2.default)(activeElement).removeClass(ClassName.ACTIVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (triggerChangeEvent) {
|
||||
if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
|
||||
$(input).trigger('change');
|
||||
if (triggerChangeEvent) {
|
||||
if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
input.focus();
|
||||
addAriaPressed = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (addAriaPressed) {
|
||||
this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
|
||||
}
|
||||
|
||||
if (triggerChangeEvent) {
|
||||
$(this._element).toggleClass(ClassName.ACTIVE);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
}
|
||||
}], [{
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
|
||||
if (!data) {
|
||||
data = new Button(this);
|
||||
$(this).data(DATA_KEY, data);
|
||||
input.checked = !this._element.classList.contains(ClassName.ACTIVE);
|
||||
(0, _jquery2.default)(input).trigger('change');
|
||||
}
|
||||
|
||||
if (config === 'toggle') {
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
input.focus();
|
||||
addAriaPressed = false;
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
|
||||
if (addAriaPressed) {
|
||||
this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName.ACTIVE));
|
||||
}
|
||||
}]);
|
||||
|
||||
return Button;
|
||||
}();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
$(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 (triggerChangeEvent) {
|
||||
(0, _jquery2.default)(this._element).toggleClass(ClassName.ACTIVE);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
_jquery2.default.removeData(this._element, DATA_KEY);
|
||||
|
||||
Button._jQueryInterface.call($(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));
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
this._element = null;
|
||||
}
|
||||
}], [{
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = (0, _jquery2.default)(this).data(DATA_KEY);
|
||||
|
||||
$.fn[NAME] = Button._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Button;
|
||||
if (!data) {
|
||||
data = new Button(this);
|
||||
(0, _jquery2.default)(this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Button._jQueryInterface;
|
||||
};
|
||||
if (config === 'toggle') {
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Button;
|
||||
}(_jquery2.default);
|
||||
}();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
(0, _jquery2.default)(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
|
||||
event.preventDefault();
|
||||
var button = event.target;
|
||||
|
||||
if (!(0, _jquery2.default)(button).hasClass(ClassName.BUTTON)) {
|
||||
button = (0, _jquery2.default)(button).closest(Selector.BUTTON);
|
||||
}
|
||||
|
||||
Button._jQueryInterface.call((0, _jquery2.default)(button), 'toggle');
|
||||
}).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
|
||||
var button = (0, _jquery2.default)(event.target).closest(Selector.BUTTON)[0];
|
||||
(0, _jquery2.default)(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
_jquery2.default.fn[NAME] = Button._jQueryInterface;
|
||||
_jquery2.default.fn[NAME].Constructor = Button;
|
||||
|
||||
_jquery2.default.fn[NAME].noConflict = function () {
|
||||
_jquery2.default.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Button._jQueryInterface;
|
||||
};
|
||||
|
||||
exports.default = Button;
|
||||
});
|
||||
+591
-468
File diff suppressed because it is too large
Load Diff
+386
-370
@@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
"use strict";
|
||||
|
||||
@@ -29,22 +31,38 @@ define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
return _typeof(obj);
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
function _objectSpread(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
var ownKeys = Object.keys(source);
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
if (typeof Object.getOwnPropertySymbols === 'function') {
|
||||
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
||||
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
||||
}));
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
ownKeys.forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
}
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
return target;
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
@@ -70,386 +88,384 @@ define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0): collapse.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var Collapse = function ($) {
|
||||
var NAME = 'collapse';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.collapse';
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = _jquery2.default.fn[NAME];
|
||||
var Default = {
|
||||
toggle: true,
|
||||
parent: ''
|
||||
};
|
||||
var DefaultType = {
|
||||
toggle: 'boolean',
|
||||
parent: '(string|element)'
|
||||
};
|
||||
var Event = {
|
||||
SHOW: "show".concat(EVENT_KEY),
|
||||
SHOWN: "shown".concat(EVENT_KEY),
|
||||
HIDE: "hide".concat(EVENT_KEY),
|
||||
HIDDEN: "hidden".concat(EVENT_KEY),
|
||||
CLICK_DATA_API: "click".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
};
|
||||
var ClassName = {
|
||||
SHOW: 'show',
|
||||
COLLAPSE: 'collapse',
|
||||
COLLAPSING: 'collapsing',
|
||||
COLLAPSED: 'collapsed'
|
||||
};
|
||||
var Dimension = {
|
||||
WIDTH: 'width',
|
||||
HEIGHT: 'height'
|
||||
};
|
||||
var Selector = {
|
||||
ACTIVES: '.show, .collapsing',
|
||||
DATA_TOGGLE: '[data-toggle="collapse"]'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var NAME = 'collapse';
|
||||
var VERSION = '4.0.0';
|
||||
var DATA_KEY = 'bs.collapse';
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 600;
|
||||
var Default = {
|
||||
toggle: true,
|
||||
parent: ''
|
||||
};
|
||||
var DefaultType = {
|
||||
toggle: 'boolean',
|
||||
parent: '(string|element)'
|
||||
};
|
||||
var Event = {
|
||||
SHOW: "show".concat(EVENT_KEY),
|
||||
SHOWN: "shown".concat(EVENT_KEY),
|
||||
HIDE: "hide".concat(EVENT_KEY),
|
||||
HIDDEN: "hidden".concat(EVENT_KEY),
|
||||
CLICK_DATA_API: "click".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
};
|
||||
var ClassName = {
|
||||
SHOW: 'show',
|
||||
COLLAPSE: 'collapse',
|
||||
COLLAPSING: 'collapsing',
|
||||
COLLAPSED: 'collapsed'
|
||||
};
|
||||
var Dimension = {
|
||||
WIDTH: 'width',
|
||||
HEIGHT: 'height'
|
||||
};
|
||||
var Selector = {
|
||||
ACTIVES: '.show, .collapsing',
|
||||
DATA_TOGGLE: '[data-toggle="collapse"]'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
var Collapse = function () {
|
||||
function Collapse(element, config) {
|
||||
_classCallCheck(this, Collapse);
|
||||
var Collapse = function () {
|
||||
function Collapse(element, config) {
|
||||
_classCallCheck(this, Collapse);
|
||||
|
||||
this._isTransitioning = false;
|
||||
this._element = element;
|
||||
this._config = this._getConfig(config);
|
||||
this._triggerArray = $.makeArray($("[data-toggle=\"collapse\"][href=\"#".concat(element.id, "\"],") + "[data-toggle=\"collapse\"][data-target=\"#".concat(element.id, "\"]")));
|
||||
var tabToggles = $(Selector.DATA_TOGGLE);
|
||||
this._isTransitioning = false;
|
||||
this._element = element;
|
||||
this._config = this._getConfig(config);
|
||||
this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#".concat(element.id, "\"],") + "[data-toggle=\"collapse\"][data-target=\"#".concat(element.id, "\"]")));
|
||||
var toggleList = [].slice.call(document.querySelectorAll(Selector.DATA_TOGGLE));
|
||||
|
||||
for (var i = 0; i < tabToggles.length; i++) {
|
||||
var elem = tabToggles[i];
|
||||
for (var i = 0, len = toggleList.length; i < len; i++) {
|
||||
var elem = toggleList[i];
|
||||
|
||||
var selector = _util2.default.getSelectorFromElement(elem);
|
||||
var selector = _util2.default.getSelectorFromElement(elem);
|
||||
|
||||
if (selector !== null && $(selector).filter(element).length > 0) {
|
||||
this._selector = selector;
|
||||
var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) {
|
||||
return foundElem === element;
|
||||
});
|
||||
|
||||
this._triggerArray.push(elem);
|
||||
}
|
||||
if (selector !== null && filterElement.length > 0) {
|
||||
this._selector = selector;
|
||||
|
||||
this._triggerArray.push(elem);
|
||||
}
|
||||
|
||||
this._parent = this._config.parent ? this._getParent() : null;
|
||||
|
||||
if (!this._config.parent) {
|
||||
this._addAriaAndCollapsedClass(this._element, this._triggerArray);
|
||||
}
|
||||
|
||||
if (this._config.toggle) {
|
||||
this.toggle();
|
||||
}
|
||||
} // Getters
|
||||
|
||||
|
||||
_createClass(Collapse, [{
|
||||
key: "toggle",
|
||||
value: function toggle() {
|
||||
if ($(this._element).hasClass(ClassName.SHOW)) {
|
||||
this.hide();
|
||||
} else {
|
||||
this.show();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "show",
|
||||
value: function show() {
|
||||
var _this = this;
|
||||
|
||||
if (this._isTransitioning || $(this._element).hasClass(ClassName.SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var actives;
|
||||
var activesData;
|
||||
|
||||
if (this._parent) {
|
||||
actives = $.makeArray($(this._parent).find(Selector.ACTIVES).filter("[data-parent=\"".concat(this._config.parent, "\"]")));
|
||||
|
||||
if (actives.length === 0) {
|
||||
actives = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (actives) {
|
||||
activesData = $(actives).not(this._selector).data(DATA_KEY);
|
||||
|
||||
if (activesData && activesData._isTransitioning) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var startEvent = $.Event(Event.SHOW);
|
||||
$(this._element).trigger(startEvent);
|
||||
|
||||
if (startEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (actives) {
|
||||
Collapse._jQueryInterface.call($(actives).not(this._selector), 'hide');
|
||||
|
||||
if (!activesData) {
|
||||
$(actives).data(DATA_KEY, null);
|
||||
}
|
||||
}
|
||||
|
||||
var dimension = this._getDimension();
|
||||
|
||||
$(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
|
||||
this._element.style[dimension] = 0;
|
||||
|
||||
if (this._triggerArray.length > 0) {
|
||||
$(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);
|
||||
_this._element.style[dimension] = '';
|
||||
|
||||
_this.setTransitioning(false);
|
||||
|
||||
$(_this._element).trigger(Event.SHOWN);
|
||||
};
|
||||
|
||||
if (!_util2.default.supportsTransitionEnd()) {
|
||||
complete();
|
||||
return;
|
||||
}
|
||||
|
||||
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
|
||||
var scrollSize = "scroll".concat(capitalizedDimension);
|
||||
$(this._element).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
this._element.style[dimension] = "".concat(this._element[scrollSize], "px");
|
||||
}
|
||||
}, {
|
||||
key: "hide",
|
||||
value: function hide() {
|
||||
var _this2 = this;
|
||||
|
||||
if (this._isTransitioning || !$(this._element).hasClass(ClassName.SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var startEvent = $.Event(Event.HIDE);
|
||||
$(this._element).trigger(startEvent);
|
||||
|
||||
if (startEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var dimension = this._getDimension();
|
||||
|
||||
this._element.style[dimension] = "".concat(this._element.getBoundingClientRect()[dimension], "px");
|
||||
|
||||
_util2.default.reflow(this._element);
|
||||
|
||||
$(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
|
||||
|
||||
if (this._triggerArray.length > 0) {
|
||||
for (var i = 0; i < this._triggerArray.length; i++) {
|
||||
var trigger = this._triggerArray[i];
|
||||
|
||||
var selector = _util2.default.getSelectorFromElement(trigger);
|
||||
|
||||
if (selector !== null) {
|
||||
var $elem = $(selector);
|
||||
|
||||
if (!$elem.hasClass(ClassName.SHOW)) {
|
||||
$(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.setTransitioning(true);
|
||||
|
||||
var complete = function complete() {
|
||||
_this2.setTransitioning(false);
|
||||
|
||||
$(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
|
||||
};
|
||||
|
||||
this._element.style[dimension] = '';
|
||||
|
||||
if (!_util2.default.supportsTransitionEnd()) {
|
||||
complete();
|
||||
return;
|
||||
}
|
||||
|
||||
$(this._element).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
}
|
||||
}, {
|
||||
key: "setTransitioning",
|
||||
value: function setTransitioning(isTransitioning) {
|
||||
this._isTransitioning = isTransitioning;
|
||||
}
|
||||
}, {
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._config = null;
|
||||
this._parent = null;
|
||||
this._element = null;
|
||||
this._triggerArray = null;
|
||||
this._isTransitioning = null;
|
||||
}
|
||||
}, {
|
||||
key: "_getConfig",
|
||||
value: function _getConfig(config) {
|
||||
config = _extends({}, Default, config);
|
||||
config.toggle = Boolean(config.toggle); // Coerce string values
|
||||
|
||||
_util2.default.typeCheckConfig(NAME, config, DefaultType);
|
||||
|
||||
return config;
|
||||
}
|
||||
}, {
|
||||
key: "_getDimension",
|
||||
value: function _getDimension() {
|
||||
var hasWidth = $(this._element).hasClass(Dimension.WIDTH);
|
||||
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
|
||||
}
|
||||
}, {
|
||||
key: "_getParent",
|
||||
value: function _getParent() {
|
||||
var _this3 = this;
|
||||
|
||||
var parent = null;
|
||||
|
||||
if (_util2.default.isElement(this._config.parent)) {
|
||||
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];
|
||||
}
|
||||
|
||||
var selector = "[data-toggle=\"collapse\"][data-parent=\"".concat(this._config.parent, "\"]");
|
||||
$(parent).find(selector).each(function (i, element) {
|
||||
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
|
||||
});
|
||||
return parent;
|
||||
}
|
||||
}, {
|
||||
key: "_addAriaAndCollapsedClass",
|
||||
value: function _addAriaAndCollapsedClass(element, triggerArray) {
|
||||
if (element) {
|
||||
var isOpen = $(element).hasClass(ClassName.SHOW);
|
||||
|
||||
if (triggerArray.length > 0) {
|
||||
$(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
|
||||
}
|
||||
}
|
||||
}
|
||||
}], [{
|
||||
key: "_getTargetFromElement",
|
||||
value: function _getTargetFromElement(element) {
|
||||
var selector = _util2.default.getSelectorFromElement(element);
|
||||
|
||||
return selector ? $(selector)[0] : null;
|
||||
}
|
||||
}, {
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $this = $(this);
|
||||
var data = $this.data(DATA_KEY);
|
||||
|
||||
var _config = _extends({}, Default, $this.data(), _typeof(config) === 'object' && config);
|
||||
|
||||
if (!data && _config.toggle && /show|hide/.test(config)) {
|
||||
_config.toggle = false;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = new Collapse(this, _config);
|
||||
$this.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(config, "\""));
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Collapse;
|
||||
}();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
|
||||
if (event.currentTarget.tagName === 'A') {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
var $trigger = $(this);
|
||||
this._parent = this._config.parent ? this._getParent() : null;
|
||||
|
||||
var selector = _util2.default.getSelectorFromElement(this);
|
||||
if (!this._config.parent) {
|
||||
this._addAriaAndCollapsedClass(this._element, this._triggerArray);
|
||||
}
|
||||
|
||||
$(selector).each(function () {
|
||||
var $target = $(this);
|
||||
var data = $target.data(DATA_KEY);
|
||||
var config = data ? 'toggle' : $trigger.data();
|
||||
if (this._config.toggle) {
|
||||
this.toggle();
|
||||
}
|
||||
} // Getters
|
||||
|
||||
Collapse._jQueryInterface.call($target, config);
|
||||
});
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Collapse._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Collapse;
|
||||
_createClass(Collapse, [{
|
||||
key: "toggle",
|
||||
value: function toggle() {
|
||||
if ((0, _jquery2.default)(this._element).hasClass(ClassName.SHOW)) {
|
||||
this.hide();
|
||||
} else {
|
||||
this.show();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "show",
|
||||
value: function show() {
|
||||
var _this = this;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Collapse._jQueryInterface;
|
||||
};
|
||||
if (this._isTransitioning || (0, _jquery2.default)(this._element).hasClass(ClassName.SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var actives;
|
||||
var activesData;
|
||||
|
||||
if (this._parent) {
|
||||
actives = [].slice.call(this._parent.querySelectorAll(Selector.ACTIVES)).filter(function (elem) {
|
||||
if (typeof _this._config.parent === 'string') {
|
||||
return elem.getAttribute('data-parent') === _this._config.parent;
|
||||
}
|
||||
|
||||
return elem.classList.contains(ClassName.COLLAPSE);
|
||||
});
|
||||
|
||||
if (actives.length === 0) {
|
||||
actives = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (actives) {
|
||||
activesData = (0, _jquery2.default)(actives).not(this._selector).data(DATA_KEY);
|
||||
|
||||
if (activesData && activesData._isTransitioning) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var startEvent = _jquery2.default.Event(Event.SHOW);
|
||||
|
||||
(0, _jquery2.default)(this._element).trigger(startEvent);
|
||||
|
||||
if (startEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (actives) {
|
||||
Collapse._jQueryInterface.call((0, _jquery2.default)(actives).not(this._selector), 'hide');
|
||||
|
||||
if (!activesData) {
|
||||
(0, _jquery2.default)(actives).data(DATA_KEY, null);
|
||||
}
|
||||
}
|
||||
|
||||
var dimension = this._getDimension();
|
||||
|
||||
(0, _jquery2.default)(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING);
|
||||
this._element.style[dimension] = 0;
|
||||
|
||||
if (this._triggerArray.length) {
|
||||
(0, _jquery2.default)(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true);
|
||||
}
|
||||
|
||||
this.setTransitioning(true);
|
||||
|
||||
var complete = function complete() {
|
||||
(0, _jquery2.default)(_this._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.SHOW);
|
||||
_this._element.style[dimension] = '';
|
||||
|
||||
_this.setTransitioning(false);
|
||||
|
||||
(0, _jquery2.default)(_this._element).trigger(Event.SHOWN);
|
||||
};
|
||||
|
||||
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
|
||||
var scrollSize = "scroll".concat(capitalizedDimension);
|
||||
|
||||
var transitionDuration = _util2.default.getTransitionDurationFromElement(this._element);
|
||||
|
||||
(0, _jquery2.default)(this._element).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
this._element.style[dimension] = "".concat(this._element[scrollSize], "px");
|
||||
}
|
||||
}, {
|
||||
key: "hide",
|
||||
value: function hide() {
|
||||
var _this2 = this;
|
||||
|
||||
if (this._isTransitioning || !(0, _jquery2.default)(this._element).hasClass(ClassName.SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var startEvent = _jquery2.default.Event(Event.HIDE);
|
||||
|
||||
(0, _jquery2.default)(this._element).trigger(startEvent);
|
||||
|
||||
if (startEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var dimension = this._getDimension();
|
||||
|
||||
this._element.style[dimension] = "".concat(this._element.getBoundingClientRect()[dimension], "px");
|
||||
|
||||
_util2.default.reflow(this._element);
|
||||
|
||||
(0, _jquery2.default)(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.SHOW);
|
||||
var triggerArrayLength = this._triggerArray.length;
|
||||
|
||||
if (triggerArrayLength > 0) {
|
||||
for (var i = 0; i < triggerArrayLength; i++) {
|
||||
var trigger = this._triggerArray[i];
|
||||
|
||||
var selector = _util2.default.getSelectorFromElement(trigger);
|
||||
|
||||
if (selector !== null) {
|
||||
var $elem = (0, _jquery2.default)([].slice.call(document.querySelectorAll(selector)));
|
||||
|
||||
if (!$elem.hasClass(ClassName.SHOW)) {
|
||||
(0, _jquery2.default)(trigger).addClass(ClassName.COLLAPSED).attr('aria-expanded', false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.setTransitioning(true);
|
||||
|
||||
var complete = function complete() {
|
||||
_this2.setTransitioning(false);
|
||||
|
||||
(0, _jquery2.default)(_this2._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN);
|
||||
};
|
||||
|
||||
this._element.style[dimension] = '';
|
||||
|
||||
var transitionDuration = _util2.default.getTransitionDurationFromElement(this._element);
|
||||
|
||||
(0, _jquery2.default)(this._element).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
}
|
||||
}, {
|
||||
key: "setTransitioning",
|
||||
value: function setTransitioning(isTransitioning) {
|
||||
this._isTransitioning = isTransitioning;
|
||||
}
|
||||
}, {
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
_jquery2.default.removeData(this._element, DATA_KEY);
|
||||
|
||||
this._config = null;
|
||||
this._parent = null;
|
||||
this._element = null;
|
||||
this._triggerArray = null;
|
||||
this._isTransitioning = null;
|
||||
}
|
||||
}, {
|
||||
key: "_getConfig",
|
||||
value: function _getConfig(config) {
|
||||
config = _objectSpread({}, Default, config);
|
||||
config.toggle = Boolean(config.toggle); // Coerce string values
|
||||
|
||||
_util2.default.typeCheckConfig(NAME, config, DefaultType);
|
||||
|
||||
return config;
|
||||
}
|
||||
}, {
|
||||
key: "_getDimension",
|
||||
value: function _getDimension() {
|
||||
var hasWidth = (0, _jquery2.default)(this._element).hasClass(Dimension.WIDTH);
|
||||
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT;
|
||||
}
|
||||
}, {
|
||||
key: "_getParent",
|
||||
value: function _getParent() {
|
||||
var _this3 = this;
|
||||
|
||||
var parent;
|
||||
|
||||
if (_util2.default.isElement(this._config.parent)) {
|
||||
parent = this._config.parent; // It's a jQuery object
|
||||
|
||||
if (typeof this._config.parent.jquery !== 'undefined') {
|
||||
parent = this._config.parent[0];
|
||||
}
|
||||
} else {
|
||||
parent = document.querySelector(this._config.parent);
|
||||
}
|
||||
|
||||
var selector = "[data-toggle=\"collapse\"][data-parent=\"".concat(this._config.parent, "\"]");
|
||||
var children = [].slice.call(parent.querySelectorAll(selector));
|
||||
(0, _jquery2.default)(children).each(function (i, element) {
|
||||
_this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
|
||||
});
|
||||
return parent;
|
||||
}
|
||||
}, {
|
||||
key: "_addAriaAndCollapsedClass",
|
||||
value: function _addAriaAndCollapsedClass(element, triggerArray) {
|
||||
var isOpen = (0, _jquery2.default)(element).hasClass(ClassName.SHOW);
|
||||
|
||||
if (triggerArray.length) {
|
||||
(0, _jquery2.default)(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen);
|
||||
}
|
||||
}
|
||||
}], [{
|
||||
key: "_getTargetFromElement",
|
||||
value: function _getTargetFromElement(element) {
|
||||
var selector = _util2.default.getSelectorFromElement(element);
|
||||
|
||||
return selector ? document.querySelector(selector) : null;
|
||||
}
|
||||
}, {
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $this = (0, _jquery2.default)(this);
|
||||
var data = $this.data(DATA_KEY);
|
||||
|
||||
var _config = _objectSpread({}, Default, $this.data(), _typeof(config) === 'object' && config ? config : {});
|
||||
|
||||
if (!data && _config.toggle && /show|hide/.test(config)) {
|
||||
_config.toggle = false;
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = new Collapse(this, _config);
|
||||
$this.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(config, "\""));
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Collapse;
|
||||
}(_jquery2.default);
|
||||
}();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
(0, _jquery2.default)(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
|
||||
if (event.currentTarget.tagName === 'A') {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
var $trigger = (0, _jquery2.default)(this);
|
||||
|
||||
var selector = _util2.default.getSelectorFromElement(this);
|
||||
|
||||
var selectors = [].slice.call(document.querySelectorAll(selector));
|
||||
(0, _jquery2.default)(selectors).each(function () {
|
||||
var $target = (0, _jquery2.default)(this);
|
||||
var data = $target.data(DATA_KEY);
|
||||
var config = data ? 'toggle' : $trigger.data();
|
||||
|
||||
Collapse._jQueryInterface.call($target, config);
|
||||
});
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
_jquery2.default.fn[NAME] = Collapse._jQueryInterface;
|
||||
_jquery2.default.fn[NAME].Constructor = Collapse;
|
||||
|
||||
_jquery2.default.fn[NAME].noConflict = function () {
|
||||
_jquery2.default.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Collapse._jQueryInterface;
|
||||
};
|
||||
|
||||
exports.default = Collapse;
|
||||
});
|
||||
+534
-447
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,79 @@
|
||||
"use strict";
|
||||
|
||||
define(["exports", "jquery", "./alert", "./button", "./carousel", "./collapse", "./dropdown", "./modal", "./popover", "./scrollspy", "./tab", "./toast", "./tooltip", "./util"], function (exports, _jquery, _alert, _button, _carousel, _collapse, _dropdown, _modal, _popover, _scrollspy, _tab, _toast, _tooltip, _util) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.Tooltip = exports.Toast = exports.Tab = exports.Scrollspy = exports.Popover = exports.Modal = exports.Dropdown = exports.Collapse = exports.Carousel = exports.Button = exports.Alert = exports.Util = undefined;
|
||||
|
||||
var _jquery2 = _interopRequireDefault(_jquery);
|
||||
|
||||
var _alert2 = _interopRequireDefault(_alert);
|
||||
|
||||
var _button2 = _interopRequireDefault(_button);
|
||||
|
||||
var _carousel2 = _interopRequireDefault(_carousel);
|
||||
|
||||
var _collapse2 = _interopRequireDefault(_collapse);
|
||||
|
||||
var _dropdown2 = _interopRequireDefault(_dropdown);
|
||||
|
||||
var _modal2 = _interopRequireDefault(_modal);
|
||||
|
||||
var _popover2 = _interopRequireDefault(_popover);
|
||||
|
||||
var _scrollspy2 = _interopRequireDefault(_scrollspy);
|
||||
|
||||
var _tab2 = _interopRequireDefault(_tab);
|
||||
|
||||
var _toast2 = _interopRequireDefault(_toast);
|
||||
|
||||
var _tooltip2 = _interopRequireDefault(_tooltip);
|
||||
|
||||
var _util2 = _interopRequireDefault(_util);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.3.1): index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
(function () {
|
||||
if (typeof _jquery2.default === 'undefined') {
|
||||
throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.');
|
||||
}
|
||||
|
||||
var version = _jquery2.default.fn.jquery.split(' ')[0].split('.');
|
||||
|
||||
var minMajor = 1;
|
||||
var ltMajor = 2;
|
||||
var minMinor = 9;
|
||||
var minPatch = 1;
|
||||
var maxMajor = 4;
|
||||
|
||||
if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) {
|
||||
throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0');
|
||||
}
|
||||
})();
|
||||
|
||||
exports.Util = _util2.default;
|
||||
exports.Alert = _alert2.default;
|
||||
exports.Button = _button2.default;
|
||||
exports.Carousel = _carousel2.default;
|
||||
exports.Collapse = _collapse2.default;
|
||||
exports.Dropdown = _dropdown2.default;
|
||||
exports.Modal = _modal2.default;
|
||||
exports.Popover = _popover2.default;
|
||||
exports.Scrollspy = _scrollspy2.default;
|
||||
exports.Tab = _tab2.default;
|
||||
exports.Toast = _toast2.default;
|
||||
exports.Tooltip = _tooltip2.default;
|
||||
});
|
||||
@@ -58,6 +58,9 @@ define(['jquery', './tether', 'core/event'], function(jQuery, Tether, Event) {
|
||||
}
|
||||
});
|
||||
|
||||
// Disables flipping the dropdowns up and getting hidden behind the navbar.
|
||||
jQuery.fn.dropdown.Constructor.Default.flip = false;
|
||||
|
||||
// We need to call popover automatically if nodes are added to the page later.
|
||||
Event.getLegacyEvents().done(function(events) {
|
||||
jQuery(document).on(events.FILTER_CONTENT_UPDATED, function() {
|
||||
|
||||
+607
-577
File diff suppressed because it is too large
Load Diff
@@ -92,6 +92,17 @@ define(['jquery'], function($) {
|
||||
},
|
||||
],
|
||||
|
||||
toast: [
|
||||
{
|
||||
start: 'hide',
|
||||
end: 'hidden',
|
||||
},
|
||||
{
|
||||
start: 'show',
|
||||
end: 'shown',
|
||||
},
|
||||
],
|
||||
|
||||
tooltip: [
|
||||
{
|
||||
start: 'hide',
|
||||
|
||||
+206
-186
@@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
define(["exports", "jquery", "./tooltip"], function (exports, _jquery, _tooltip) {
|
||||
"use strict";
|
||||
|
||||
@@ -56,6 +58,10 @@ define(["exports", "jquery", "./tooltip"], function (exports, _jquery, _tooltip)
|
||||
return call;
|
||||
}
|
||||
|
||||
return _assertThisInitialized(self);
|
||||
}
|
||||
|
||||
function _assertThisInitialized(self) {
|
||||
if (self === void 0) {
|
||||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
||||
}
|
||||
@@ -71,227 +77,241 @@ define(["exports", "jquery", "./tooltip"], function (exports, _jquery, _tooltip)
|
||||
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
||||
constructor: {
|
||||
value: subClass,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
});
|
||||
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
||||
if (superClass) _setPrototypeOf(subClass, superClass);
|
||||
}
|
||||
|
||||
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;
|
||||
function _setPrototypeOf(o, p) {
|
||||
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
||||
o.__proto__ = p;
|
||||
return o;
|
||||
};
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
return _setPrototypeOf(o, p);
|
||||
}
|
||||
|
||||
function _objectSpread(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
var ownKeys = Object.keys(source);
|
||||
|
||||
if (typeof Object.getOwnPropertySymbols === 'function') {
|
||||
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
||||
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
||||
}));
|
||||
}
|
||||
|
||||
ownKeys.forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0): popover.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var Popover = function ($) {
|
||||
var NAME = 'popover';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.popover';
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var JQUERY_NO_CONFLICT = _jquery2.default.fn[NAME];
|
||||
var CLASS_PREFIX = 'bs-popover';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)".concat(CLASS_PREFIX, "\\S+"), 'g');
|
||||
|
||||
var Default = _objectSpread({}, _tooltip2.default.Default, {
|
||||
placement: 'right',
|
||||
trigger: 'click',
|
||||
content: '',
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
|
||||
});
|
||||
|
||||
var DefaultType = _objectSpread({}, _tooltip2.default.DefaultType, {
|
||||
content: '(string|element|function)'
|
||||
});
|
||||
|
||||
var ClassName = {
|
||||
FADE: 'fade',
|
||||
SHOW: 'show'
|
||||
};
|
||||
var Selector = {
|
||||
TITLE: '.popover-header',
|
||||
CONTENT: '.popover-body'
|
||||
};
|
||||
var Event = {
|
||||
HIDE: "hide".concat(EVENT_KEY),
|
||||
HIDDEN: "hidden".concat(EVENT_KEY),
|
||||
SHOW: "show".concat(EVENT_KEY),
|
||||
SHOWN: "shown".concat(EVENT_KEY),
|
||||
INSERTED: "inserted".concat(EVENT_KEY),
|
||||
CLICK: "click".concat(EVENT_KEY),
|
||||
FOCUSIN: "focusin".concat(EVENT_KEY),
|
||||
FOCUSOUT: "focusout".concat(EVENT_KEY),
|
||||
MOUSEENTER: "mouseenter".concat(EVENT_KEY),
|
||||
MOUSELEAVE: "mouseleave".concat(EVENT_KEY)
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var NAME = 'popover';
|
||||
var VERSION = '4.0.0';
|
||||
var DATA_KEY = 'bs.popover';
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var CLASS_PREFIX = 'bs-popover';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)".concat(CLASS_PREFIX, "\\S+"), 'g');
|
||||
|
||||
var Default = _extends({}, _tooltip2.default.Default, {
|
||||
placement: 'right',
|
||||
trigger: 'click',
|
||||
content: '',
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>'
|
||||
});
|
||||
};
|
||||
|
||||
var DefaultType = _extends({}, _tooltip2.default.DefaultType, {
|
||||
content: '(string|element|function)'
|
||||
});
|
||||
var Popover = function (_Tooltip) {
|
||||
_inherits(Popover, _Tooltip);
|
||||
|
||||
var ClassName = {
|
||||
FADE: 'fade',
|
||||
SHOW: 'show'
|
||||
};
|
||||
var Selector = {
|
||||
TITLE: '.popover-header',
|
||||
CONTENT: '.popover-body'
|
||||
};
|
||||
var Event = {
|
||||
HIDE: "hide".concat(EVENT_KEY),
|
||||
HIDDEN: "hidden".concat(EVENT_KEY),
|
||||
SHOW: "show".concat(EVENT_KEY),
|
||||
SHOWN: "shown".concat(EVENT_KEY),
|
||||
INSERTED: "inserted".concat(EVENT_KEY),
|
||||
CLICK: "click".concat(EVENT_KEY),
|
||||
FOCUSIN: "focusin".concat(EVENT_KEY),
|
||||
FOCUSOUT: "focusout".concat(EVENT_KEY),
|
||||
MOUSEENTER: "mouseenter".concat(EVENT_KEY),
|
||||
MOUSELEAVE: "mouseleave".concat(EVENT_KEY)
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
function Popover() {
|
||||
_classCallCheck(this, Popover);
|
||||
|
||||
};
|
||||
return _possibleConstructorReturn(this, (Popover.__proto__ || Object.getPrototypeOf(Popover)).apply(this, arguments));
|
||||
}
|
||||
|
||||
var Popover = function (_Tooltip) {
|
||||
_inherits(Popover, _Tooltip);
|
||||
|
||||
function Popover() {
|
||||
_classCallCheck(this, Popover);
|
||||
|
||||
return _possibleConstructorReturn(this, (Popover.__proto__ || Object.getPrototypeOf(Popover)).apply(this, arguments));
|
||||
_createClass(Popover, [{
|
||||
key: "isWithContent",
|
||||
value: function isWithContent() {
|
||||
return this.getTitle() || this._getContent();
|
||||
}
|
||||
}, {
|
||||
key: "addAttachmentClass",
|
||||
value: function addAttachmentClass(attachment) {
|
||||
(0, _jquery2.default)(this.getTipElement()).addClass("".concat(CLASS_PREFIX, "-").concat(attachment));
|
||||
}
|
||||
}, {
|
||||
key: "getTipElement",
|
||||
value: function getTipElement() {
|
||||
this.tip = this.tip || (0, _jquery2.default)(this.config.template)[0];
|
||||
return this.tip;
|
||||
}
|
||||
}, {
|
||||
key: "setContent",
|
||||
value: function setContent() {
|
||||
var $tip = (0, _jquery2.default)(this.getTipElement()); // We use append for html objects to maintain js events
|
||||
|
||||
_createClass(Popover, [{
|
||||
key: "isWithContent",
|
||||
value: function isWithContent() {
|
||||
return this.getTitle() || this._getContent();
|
||||
this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
|
||||
|
||||
var content = this._getContent();
|
||||
|
||||
if (typeof content === 'function') {
|
||||
content = content.call(this.element);
|
||||
}
|
||||
}, {
|
||||
key: "addAttachmentClass",
|
||||
value: function addAttachmentClass(attachment) {
|
||||
$(this.getTipElement()).addClass("".concat(CLASS_PREFIX, "-").concat(attachment));
|
||||
|
||||
this.setElementContent($tip.find(Selector.CONTENT), content);
|
||||
$tip.removeClass("".concat(ClassName.FADE, " ").concat(ClassName.SHOW));
|
||||
}
|
||||
}, {
|
||||
key: "_getContent",
|
||||
value: function _getContent() {
|
||||
return this.element.getAttribute('data-content') || this.config.content;
|
||||
}
|
||||
}, {
|
||||
key: "_cleanTipClass",
|
||||
value: function _cleanTipClass() {
|
||||
var $tip = (0, _jquery2.default)(this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
}
|
||||
}, {
|
||||
key: "getTipElement",
|
||||
value: function getTipElement() {
|
||||
this.tip = this.tip || $(this.config.template)[0];
|
||||
return this.tip;
|
||||
}
|
||||
}, {
|
||||
key: "setContent",
|
||||
value: function setContent() {
|
||||
var $tip = $(this.getTipElement()); // We use append for html objects to maintain js events
|
||||
}
|
||||
}], [{
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = (0, _jquery2.default)(this).data(DATA_KEY);
|
||||
|
||||
this.setElementContent($tip.find(Selector.TITLE), this.getTitle());
|
||||
var _config = _typeof(config) === 'object' ? config : null;
|
||||
|
||||
var content = this._getContent();
|
||||
|
||||
if (typeof content === 'function') {
|
||||
content = content.call(this.element);
|
||||
if (!data && /dispose|hide/.test(config)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.setElementContent($tip.find(Selector.CONTENT), content);
|
||||
$tip.removeClass("".concat(ClassName.FADE, " ").concat(ClassName.SHOW));
|
||||
}
|
||||
}, {
|
||||
key: "_getContent",
|
||||
value: function _getContent() {
|
||||
return this.element.getAttribute('data-content') || this.config.content;
|
||||
}
|
||||
}, {
|
||||
key: "_cleanTipClass",
|
||||
value: function _cleanTipClass() {
|
||||
var $tip = $(this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
if (!data) {
|
||||
data = new Popover(this, _config);
|
||||
(0, _jquery2.default)(this).data(DATA_KEY, data);
|
||||
}
|
||||
}
|
||||
}], [{
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
|
||||
var _config = _typeof(config) === 'object' ? config : null;
|
||||
|
||||
if (!data && /destroy|hide/.test(config)) {
|
||||
return;
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(config, "\""));
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
data = new Popover(this, _config);
|
||||
$(this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(config, "\""));
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: "NAME",
|
||||
get: function get() {
|
||||
return NAME;
|
||||
}
|
||||
}, {
|
||||
key: "DATA_KEY",
|
||||
get: function get() {
|
||||
return DATA_KEY;
|
||||
}
|
||||
}, {
|
||||
key: "Event",
|
||||
get: function get() {
|
||||
return Event;
|
||||
}
|
||||
}, {
|
||||
key: "EVENT_KEY",
|
||||
get: function get() {
|
||||
return EVENT_KEY;
|
||||
}
|
||||
}, {
|
||||
key: "DefaultType",
|
||||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Popover;
|
||||
}(_tooltip2.default);
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
$.fn[NAME] = Popover._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Popover;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Popover._jQueryInterface;
|
||||
};
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: "NAME",
|
||||
get: function get() {
|
||||
return NAME;
|
||||
}
|
||||
}, {
|
||||
key: "DATA_KEY",
|
||||
get: function get() {
|
||||
return DATA_KEY;
|
||||
}
|
||||
}, {
|
||||
key: "Event",
|
||||
get: function get() {
|
||||
return Event;
|
||||
}
|
||||
}, {
|
||||
key: "EVENT_KEY",
|
||||
get: function get() {
|
||||
return EVENT_KEY;
|
||||
}
|
||||
}, {
|
||||
key: "DefaultType",
|
||||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Popover;
|
||||
}(_jquery2.default);
|
||||
}(_tooltip2.default);
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
_jquery2.default.fn[NAME] = Popover._jQueryInterface;
|
||||
_jquery2.default.fn[NAME].Constructor = Popover;
|
||||
|
||||
_jquery2.default.fn[NAME].noConflict = function () {
|
||||
_jquery2.default.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Popover._jQueryInterface;
|
||||
};
|
||||
|
||||
exports.default = Popover;
|
||||
});
|
||||
@@ -0,0 +1,131 @@
|
||||
"use strict";
|
||||
|
||||
define(["exports"], function (exports) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.sanitizeHtml = sanitizeHtml;
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.3.1): tools/sanitizer.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
|
||||
var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
|
||||
var DefaultWhitelist = exports.DefaultWhitelist = {
|
||||
// Global attributes allowed on any supplied element below.
|
||||
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
|
||||
a: ['target', 'href', 'title', 'rel'],
|
||||
area: [],
|
||||
b: [],
|
||||
br: [],
|
||||
col: [],
|
||||
code: [],
|
||||
div: [],
|
||||
em: [],
|
||||
hr: [],
|
||||
h1: [],
|
||||
h2: [],
|
||||
h3: [],
|
||||
h4: [],
|
||||
h5: [],
|
||||
h6: [],
|
||||
i: [],
|
||||
img: ['src', 'alt', 'title', 'width', 'height'],
|
||||
li: [],
|
||||
ol: [],
|
||||
p: [],
|
||||
pre: [],
|
||||
s: [],
|
||||
small: [],
|
||||
span: [],
|
||||
sub: [],
|
||||
sup: [],
|
||||
strong: [],
|
||||
u: [],
|
||||
ul: []
|
||||
/**
|
||||
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
||||
*
|
||||
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
|
||||
};
|
||||
var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi;
|
||||
/**
|
||||
* A pattern that matches safe data URLs. Only matches image, video and audio types.
|
||||
*
|
||||
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
|
||||
var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;
|
||||
|
||||
function allowedAttribute(attr, allowedAttributeList) {
|
||||
var attrName = attr.nodeName.toLowerCase();
|
||||
|
||||
if (allowedAttributeList.indexOf(attrName) !== -1) {
|
||||
if (uriAttrs.indexOf(attrName) !== -1) {
|
||||
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
var regExp = allowedAttributeList.filter(function (attrRegex) {
|
||||
return attrRegex instanceof RegExp;
|
||||
}); // Check if a regular expression validates the attribute.
|
||||
|
||||
for (var i = 0, l = regExp.length; i < l; i++) {
|
||||
if (attrName.match(regExp[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
|
||||
if (unsafeHtml.length === 0) {
|
||||
return unsafeHtml;
|
||||
}
|
||||
|
||||
if (sanitizeFn && typeof sanitizeFn === 'function') {
|
||||
return sanitizeFn(unsafeHtml);
|
||||
}
|
||||
|
||||
var domParser = new window.DOMParser();
|
||||
var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
|
||||
var whitelistKeys = Object.keys(whiteList);
|
||||
var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
|
||||
|
||||
var _loop = function _loop(i, len) {
|
||||
var el = elements[i];
|
||||
var elName = el.nodeName.toLowerCase();
|
||||
|
||||
if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
|
||||
el.parentNode.removeChild(el);
|
||||
return "continue";
|
||||
}
|
||||
|
||||
var attributeList = [].slice.call(el.attributes);
|
||||
var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
|
||||
attributeList.forEach(function (attr) {
|
||||
if (!allowedAttribute(attr, whitelistedAttributes)) {
|
||||
el.removeAttribute(attr.nodeName);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
for (var i = 0, len = elements.length; i < len; i++) {
|
||||
var _ret = _loop(i, len);
|
||||
|
||||
if (_ret === "continue") continue;
|
||||
}
|
||||
|
||||
return createdDocument.body.innerHTML;
|
||||
}
|
||||
});
|
||||
+308
-294
@@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
"use strict";
|
||||
|
||||
@@ -29,22 +31,38 @@ define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
return _typeof(obj);
|
||||
}
|
||||
|
||||
function _extends() {
|
||||
_extends = Object.assign || function (target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i];
|
||||
function _objectSpread(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
var ownKeys = Object.keys(source);
|
||||
|
||||
for (var key in source) {
|
||||
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
||||
target[key] = source[key];
|
||||
}
|
||||
}
|
||||
if (typeof Object.getOwnPropertySymbols === 'function') {
|
||||
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
||||
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
||||
}));
|
||||
}
|
||||
|
||||
return target;
|
||||
};
|
||||
ownKeys.forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
}
|
||||
|
||||
return _extends.apply(this, arguments);
|
||||
return target;
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
@@ -70,321 +88,317 @@ define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0): scrollspy.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var ScrollSpy = function ($) {
|
||||
var NAME = 'scrollspy';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.scrollspy';
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = _jquery2.default.fn[NAME];
|
||||
var Default = {
|
||||
offset: 10,
|
||||
method: 'auto',
|
||||
target: ''
|
||||
};
|
||||
var DefaultType = {
|
||||
offset: 'number',
|
||||
method: 'string',
|
||||
target: '(string|element)'
|
||||
};
|
||||
var Event = {
|
||||
ACTIVATE: "activate".concat(EVENT_KEY),
|
||||
SCROLL: "scroll".concat(EVENT_KEY),
|
||||
LOAD_DATA_API: "load".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
};
|
||||
var ClassName = {
|
||||
DROPDOWN_ITEM: 'dropdown-item',
|
||||
DROPDOWN_MENU: 'dropdown-menu',
|
||||
ACTIVE: 'active'
|
||||
};
|
||||
var Selector = {
|
||||
DATA_SPY: '[data-spy="scroll"]',
|
||||
ACTIVE: '.active',
|
||||
NAV_LIST_GROUP: '.nav, .list-group',
|
||||
NAV_LINKS: '.nav-link',
|
||||
NAV_ITEMS: '.nav-item',
|
||||
LIST_ITEMS: '.list-group-item',
|
||||
DROPDOWN: '.dropdown',
|
||||
DROPDOWN_ITEMS: '.dropdown-item',
|
||||
DROPDOWN_TOGGLE: '.dropdown-toggle'
|
||||
};
|
||||
var OffsetMethod = {
|
||||
OFFSET: 'offset',
|
||||
POSITION: 'position'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var NAME = 'scrollspy';
|
||||
var VERSION = '4.0.0';
|
||||
var DATA_KEY = 'bs.scrollspy';
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var Default = {
|
||||
offset: 10,
|
||||
method: 'auto',
|
||||
target: ''
|
||||
};
|
||||
var DefaultType = {
|
||||
offset: 'number',
|
||||
method: 'string',
|
||||
target: '(string|element)'
|
||||
};
|
||||
var Event = {
|
||||
ACTIVATE: "activate".concat(EVENT_KEY),
|
||||
SCROLL: "scroll".concat(EVENT_KEY),
|
||||
LOAD_DATA_API: "load".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
};
|
||||
var ClassName = {
|
||||
DROPDOWN_ITEM: 'dropdown-item',
|
||||
DROPDOWN_MENU: 'dropdown-menu',
|
||||
ACTIVE: 'active'
|
||||
};
|
||||
var Selector = {
|
||||
DATA_SPY: '[data-spy="scroll"]',
|
||||
ACTIVE: '.active',
|
||||
NAV_LIST_GROUP: '.nav, .list-group',
|
||||
NAV_LINKS: '.nav-link',
|
||||
NAV_ITEMS: '.nav-item',
|
||||
LIST_ITEMS: '.list-group-item',
|
||||
DROPDOWN: '.dropdown',
|
||||
DROPDOWN_ITEMS: '.dropdown-item',
|
||||
DROPDOWN_TOGGLE: '.dropdown-toggle'
|
||||
};
|
||||
var OffsetMethod = {
|
||||
OFFSET: 'offset',
|
||||
POSITION: 'position'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
var ScrollSpy = function () {
|
||||
function ScrollSpy(element, config) {
|
||||
var _this = this;
|
||||
var ScrollSpy = function () {
|
||||
function ScrollSpy(element, config) {
|
||||
var _this = this;
|
||||
|
||||
_classCallCheck(this, ScrollSpy);
|
||||
_classCallCheck(this, ScrollSpy);
|
||||
|
||||
this._element = element;
|
||||
this._scrollElement = element.tagName === 'BODY' ? window : element;
|
||||
this._config = this._getConfig(config);
|
||||
this._selector = "".concat(this._config.target, " ").concat(Selector.NAV_LINKS, ",") + "".concat(this._config.target, " ").concat(Selector.LIST_ITEMS, ",") + "".concat(this._config.target, " ").concat(Selector.DROPDOWN_ITEMS);
|
||||
this._element = element;
|
||||
this._scrollElement = element.tagName === 'BODY' ? window : element;
|
||||
this._config = this._getConfig(config);
|
||||
this._selector = "".concat(this._config.target, " ").concat(Selector.NAV_LINKS, ",") + "".concat(this._config.target, " ").concat(Selector.LIST_ITEMS, ",") + "".concat(this._config.target, " ").concat(Selector.DROPDOWN_ITEMS);
|
||||
this._offsets = [];
|
||||
this._targets = [];
|
||||
this._activeTarget = null;
|
||||
this._scrollHeight = 0;
|
||||
(0, _jquery2.default)(this._scrollElement).on(Event.SCROLL, function (event) {
|
||||
return _this._process(event);
|
||||
});
|
||||
this.refresh();
|
||||
|
||||
this._process();
|
||||
} // Getters
|
||||
|
||||
|
||||
_createClass(ScrollSpy, [{
|
||||
key: "refresh",
|
||||
value: function refresh() {
|
||||
var _this2 = this;
|
||||
|
||||
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._activeTarget = null;
|
||||
this._scrollHeight = 0;
|
||||
$(this._scrollElement).on(Event.SCROLL, function (event) {
|
||||
return _this._process(event);
|
||||
this._scrollHeight = this._getScrollHeight();
|
||||
var targets = [].slice.call(document.querySelectorAll(this._selector));
|
||||
targets.map(function (element) {
|
||||
var target;
|
||||
|
||||
var targetSelector = _util2.default.getSelectorFromElement(element);
|
||||
|
||||
if (targetSelector) {
|
||||
target = document.querySelector(targetSelector);
|
||||
}
|
||||
|
||||
if (target) {
|
||||
var targetBCR = target.getBoundingClientRect();
|
||||
|
||||
if (targetBCR.width || targetBCR.height) {
|
||||
// TODO (fat): remove sketch reliance on jQuery position/offset
|
||||
return [(0, _jquery2.default)(target)[offsetMethod]().top + offsetBase, targetSelector];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}).filter(function (item) {
|
||||
return item;
|
||||
}).sort(function (a, b) {
|
||||
return a[0] - b[0];
|
||||
}).forEach(function (item) {
|
||||
_this2._offsets.push(item[0]);
|
||||
|
||||
_this2._targets.push(item[1]);
|
||||
});
|
||||
this.refresh();
|
||||
}
|
||||
}, {
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
_jquery2.default.removeData(this._element, DATA_KEY);
|
||||
|
||||
this._process();
|
||||
} // Getters
|
||||
(0, _jquery2.default)(this._scrollElement).off(EVENT_KEY);
|
||||
this._element = null;
|
||||
this._scrollElement = null;
|
||||
this._config = null;
|
||||
this._selector = null;
|
||||
this._offsets = null;
|
||||
this._targets = null;
|
||||
this._activeTarget = null;
|
||||
this._scrollHeight = null;
|
||||
}
|
||||
}, {
|
||||
key: "_getConfig",
|
||||
value: function _getConfig(config) {
|
||||
config = _objectSpread({}, Default, _typeof(config) === 'object' && config ? config : {});
|
||||
|
||||
if (typeof config.target !== 'string') {
|
||||
var id = (0, _jquery2.default)(config.target).attr('id');
|
||||
|
||||
_createClass(ScrollSpy, [{
|
||||
key: "refresh",
|
||||
value: function refresh() {
|
||||
var _this2 = this;
|
||||
if (!id) {
|
||||
id = _util2.default.getUID(NAME);
|
||||
(0, _jquery2.default)(config.target).attr('id', id);
|
||||
}
|
||||
|
||||
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));
|
||||
targets.map(function (element) {
|
||||
var target;
|
||||
|
||||
var targetSelector = _util2.default.getSelectorFromElement(element);
|
||||
|
||||
if (targetSelector) {
|
||||
target = $(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];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}).filter(function (item) {
|
||||
return item;
|
||||
}).sort(function (a, b) {
|
||||
return a[0] - b[0];
|
||||
}).forEach(function (item) {
|
||||
_this2._offsets.push(item[0]);
|
||||
|
||||
_this2._targets.push(item[1]);
|
||||
});
|
||||
config.target = "#".concat(id);
|
||||
}
|
||||
}, {
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
$(this._scrollElement).off(EVENT_KEY);
|
||||
this._element = null;
|
||||
this._scrollElement = null;
|
||||
this._config = null;
|
||||
this._selector = null;
|
||||
this._offsets = null;
|
||||
this._targets = null;
|
||||
|
||||
_util2.default.typeCheckConfig(NAME, config, DefaultType);
|
||||
|
||||
return config;
|
||||
}
|
||||
}, {
|
||||
key: "_getScrollTop",
|
||||
value: function _getScrollTop() {
|
||||
return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
|
||||
}
|
||||
}, {
|
||||
key: "_getScrollHeight",
|
||||
value: function _getScrollHeight() {
|
||||
return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
|
||||
}
|
||||
}, {
|
||||
key: "_getOffsetHeight",
|
||||
value: function _getOffsetHeight() {
|
||||
return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
|
||||
}
|
||||
}, {
|
||||
key: "_process",
|
||||
value: function _process() {
|
||||
var scrollTop = this._getScrollTop() + this._config.offset;
|
||||
|
||||
var scrollHeight = this._getScrollHeight();
|
||||
|
||||
var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
|
||||
|
||||
if (this._scrollHeight !== scrollHeight) {
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
if (scrollTop >= maxScroll) {
|
||||
var target = this._targets[this._targets.length - 1];
|
||||
|
||||
if (this._activeTarget !== target) {
|
||||
this._activate(target);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
|
||||
this._activeTarget = null;
|
||||
this._scrollHeight = null;
|
||||
}
|
||||
}, {
|
||||
key: "_getConfig",
|
||||
value: function _getConfig(config) {
|
||||
config = _extends({}, Default, config);
|
||||
|
||||
if (typeof config.target !== 'string') {
|
||||
var id = $(config.target).attr('id');
|
||||
|
||||
if (!id) {
|
||||
id = _util2.default.getUID(NAME);
|
||||
$(config.target).attr('id', id);
|
||||
}
|
||||
|
||||
config.target = "#".concat(id);
|
||||
}
|
||||
|
||||
_util2.default.typeCheckConfig(NAME, config, DefaultType);
|
||||
|
||||
return config;
|
||||
}
|
||||
}, {
|
||||
key: "_getScrollTop",
|
||||
value: function _getScrollTop() {
|
||||
return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
|
||||
}
|
||||
}, {
|
||||
key: "_getScrollHeight",
|
||||
value: function _getScrollHeight() {
|
||||
return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
|
||||
}
|
||||
}, {
|
||||
key: "_getOffsetHeight",
|
||||
value: function _getOffsetHeight() {
|
||||
return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
|
||||
}
|
||||
}, {
|
||||
key: "_process",
|
||||
value: function _process() {
|
||||
var scrollTop = this._getScrollTop() + this._config.offset;
|
||||
|
||||
var scrollHeight = this._getScrollHeight();
|
||||
|
||||
var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();
|
||||
|
||||
if (this._scrollHeight !== scrollHeight) {
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
if (scrollTop >= maxScroll) {
|
||||
var target = this._targets[this._targets.length - 1];
|
||||
|
||||
if (this._activeTarget !== target) {
|
||||
this._activate(target);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
|
||||
this._activeTarget = null;
|
||||
|
||||
this._clear();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i = this._offsets.length; i--;) {
|
||||
var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
|
||||
|
||||
if (isActiveTarget) {
|
||||
this._activate(this._targets[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "_activate",
|
||||
value: function _activate(target) {
|
||||
this._activeTarget = target;
|
||||
|
||||
this._clear();
|
||||
|
||||
var queries = this._selector.split(','); // eslint-disable-next-line arrow-body-style
|
||||
return;
|
||||
}
|
||||
|
||||
var offsetLength = this._offsets.length;
|
||||
|
||||
queries = queries.map(function (selector) {
|
||||
return "".concat(selector, "[data-target=\"").concat(target, "\"],") + "".concat(selector, "[href=\"").concat(target, "\"]");
|
||||
});
|
||||
var $link = $(queries.join(','));
|
||||
for (var i = offsetLength; i--;) {
|
||||
var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);
|
||||
|
||||
if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
|
||||
$link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
|
||||
$link.addClass(ClassName.ACTIVE);
|
||||
} else {
|
||||
// Set triggered link as active
|
||||
$link.addClass(ClassName.ACTIVE); // Set triggered links parents as active
|
||||
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
|
||||
if (isActiveTarget) {
|
||||
this._activate(this._targets[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "_activate",
|
||||
value: function _activate(target) {
|
||||
this._activeTarget = target;
|
||||
|
||||
$link.parents(Selector.NAV_LIST_GROUP).prev("".concat(Selector.NAV_LINKS, ", ").concat(Selector.LIST_ITEMS)).addClass(ClassName.ACTIVE); // Handle special case when .nav-link is inside .nav-item
|
||||
this._clear();
|
||||
|
||||
$link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
|
||||
var queries = this._selector.split(',').map(function (selector) {
|
||||
return "".concat(selector, "[data-target=\"").concat(target, "\"],").concat(selector, "[href=\"").concat(target, "\"]");
|
||||
});
|
||||
|
||||
var $link = (0, _jquery2.default)([].slice.call(document.querySelectorAll(queries.join(','))));
|
||||
|
||||
if ($link.hasClass(ClassName.DROPDOWN_ITEM)) {
|
||||
$link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
|
||||
$link.addClass(ClassName.ACTIVE);
|
||||
} else {
|
||||
// Set triggered link as active
|
||||
$link.addClass(ClassName.ACTIVE); // Set triggered links parents as active
|
||||
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
|
||||
|
||||
$link.parents(Selector.NAV_LIST_GROUP).prev("".concat(Selector.NAV_LINKS, ", ").concat(Selector.LIST_ITEMS)).addClass(ClassName.ACTIVE); // Handle special case when .nav-link is inside .nav-item
|
||||
|
||||
$link.parents(Selector.NAV_LIST_GROUP).prev(Selector.NAV_ITEMS).children(Selector.NAV_LINKS).addClass(ClassName.ACTIVE);
|
||||
}
|
||||
|
||||
(0, _jquery2.default)(this._scrollElement).trigger(Event.ACTIVATE, {
|
||||
relatedTarget: target
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "_clear",
|
||||
value: function _clear() {
|
||||
[].slice.call(document.querySelectorAll(this._selector)).filter(function (node) {
|
||||
return node.classList.contains(ClassName.ACTIVE);
|
||||
}).forEach(function (node) {
|
||||
return node.classList.remove(ClassName.ACTIVE);
|
||||
});
|
||||
}
|
||||
}], [{
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = (0, _jquery2.default)(this).data(DATA_KEY);
|
||||
|
||||
var _config = _typeof(config) === 'object' && config;
|
||||
|
||||
if (!data) {
|
||||
data = new ScrollSpy(this, _config);
|
||||
(0, _jquery2.default)(this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
$(this._scrollElement).trigger(Event.ACTIVATE, {
|
||||
relatedTarget: target
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "_clear",
|
||||
value: function _clear() {
|
||||
$(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
|
||||
}
|
||||
}], [{
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
|
||||
var _config = _typeof(config) === 'object' && config;
|
||||
|
||||
if (!data) {
|
||||
data = new ScrollSpy(this, _config);
|
||||
$(this).data(DATA_KEY, data);
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(config, "\""));
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(config, "\""));
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}]);
|
||||
|
||||
return ScrollSpy;
|
||||
}();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
$(window).on(Event.LOAD_DATA_API, function () {
|
||||
var scrollSpys = $.makeArray($(Selector.DATA_SPY));
|
||||
|
||||
for (var i = scrollSpys.length; i--;) {
|
||||
var $spy = $(scrollSpys[i]);
|
||||
|
||||
ScrollSpy._jQueryInterface.call($spy, $spy.data());
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = ScrollSpy._jQueryInterface;
|
||||
$.fn[NAME].Constructor = ScrollSpy;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return ScrollSpy._jQueryInterface;
|
||||
};
|
||||
}, {
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}]);
|
||||
|
||||
return ScrollSpy;
|
||||
}(_jquery2.default);
|
||||
}();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
(0, _jquery2.default)(window).on(Event.LOAD_DATA_API, function () {
|
||||
var scrollSpys = [].slice.call(document.querySelectorAll(Selector.DATA_SPY));
|
||||
var scrollSpysLength = scrollSpys.length;
|
||||
|
||||
for (var i = scrollSpysLength; i--;) {
|
||||
var $spy = (0, _jquery2.default)(scrollSpys[i]);
|
||||
|
||||
ScrollSpy._jQueryInterface.call($spy, $spy.data());
|
||||
}
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
_jquery2.default.fn[NAME] = ScrollSpy._jQueryInterface;
|
||||
_jquery2.default.fn[NAME].Constructor = ScrollSpy;
|
||||
|
||||
_jquery2.default.fn[NAME].noConflict = function () {
|
||||
_jquery2.default.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return ScrollSpy._jQueryInterface;
|
||||
};
|
||||
|
||||
exports.default = ScrollSpy;
|
||||
});
|
||||
+204
-211
@@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
"use strict";
|
||||
|
||||
@@ -38,252 +40,243 @@ define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0): tab.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var Tab = function ($) {
|
||||
var NAME = 'tab';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.tab';
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = _jquery2.default.fn[NAME];
|
||||
var Event = {
|
||||
HIDE: "hide".concat(EVENT_KEY),
|
||||
HIDDEN: "hidden".concat(EVENT_KEY),
|
||||
SHOW: "show".concat(EVENT_KEY),
|
||||
SHOWN: "shown".concat(EVENT_KEY),
|
||||
CLICK_DATA_API: "click".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
};
|
||||
var ClassName = {
|
||||
DROPDOWN_MENU: 'dropdown-menu',
|
||||
ACTIVE: 'active',
|
||||
DISABLED: 'disabled',
|
||||
FADE: 'fade',
|
||||
SHOW: 'show'
|
||||
};
|
||||
var Selector = {
|
||||
DROPDOWN: '.dropdown',
|
||||
NAV_LIST_GROUP: '.nav, .list-group',
|
||||
ACTIVE: '.active',
|
||||
ACTIVE_UL: '> li > .active',
|
||||
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
|
||||
DROPDOWN_TOGGLE: '.dropdown-toggle',
|
||||
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var NAME = 'tab';
|
||||
var VERSION = '4.0.0';
|
||||
var DATA_KEY = 'bs.tab';
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 150;
|
||||
var Event = {
|
||||
HIDE: "hide".concat(EVENT_KEY),
|
||||
HIDDEN: "hidden".concat(EVENT_KEY),
|
||||
SHOW: "show".concat(EVENT_KEY),
|
||||
SHOWN: "shown".concat(EVENT_KEY),
|
||||
CLICK_DATA_API: "click".concat(EVENT_KEY).concat(DATA_API_KEY)
|
||||
};
|
||||
var ClassName = {
|
||||
DROPDOWN_MENU: 'dropdown-menu',
|
||||
ACTIVE: 'active',
|
||||
DISABLED: 'disabled',
|
||||
FADE: 'fade',
|
||||
SHOW: 'show'
|
||||
};
|
||||
var Selector = {
|
||||
DROPDOWN: '.dropdown',
|
||||
NAV_LIST_GROUP: '.nav, .list-group',
|
||||
ACTIVE: '.active',
|
||||
ACTIVE_UL: '> li > .active',
|
||||
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
|
||||
DROPDOWN_TOGGLE: '.dropdown-toggle',
|
||||
DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
var Tab = function () {
|
||||
function Tab(element) {
|
||||
_classCallCheck(this, Tab);
|
||||
var Tab = function () {
|
||||
function Tab(element) {
|
||||
_classCallCheck(this, Tab);
|
||||
|
||||
this._element = element;
|
||||
} // Getters
|
||||
this._element = element;
|
||||
} // Getters
|
||||
|
||||
|
||||
_createClass(Tab, [{
|
||||
key: "show",
|
||||
value: function show() {
|
||||
var _this = this;
|
||||
_createClass(Tab, [{
|
||||
key: "show",
|
||||
value: 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)) {
|
||||
return;
|
||||
}
|
||||
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && (0, _jquery2.default)(this._element).hasClass(ClassName.ACTIVE) || (0, _jquery2.default)(this._element).hasClass(ClassName.DISABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var target;
|
||||
var previous;
|
||||
var listElement = $(this._element).closest(Selector.NAV_LIST_GROUP)[0];
|
||||
var target;
|
||||
var previous;
|
||||
var listElement = (0, _jquery2.default)(this._element).closest(Selector.NAV_LIST_GROUP)[0];
|
||||
|
||||
var selector = _util2.default.getSelectorFromElement(this._element);
|
||||
var selector = _util2.default.getSelectorFromElement(this._element);
|
||||
|
||||
if (listElement) {
|
||||
var itemSelector = listElement.nodeName === 'UL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
|
||||
previous = $.makeArray($(listElement).find(itemSelector));
|
||||
previous = previous[previous.length - 1];
|
||||
}
|
||||
if (listElement) {
|
||||
var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
|
||||
previous = _jquery2.default.makeArray((0, _jquery2.default)(listElement).find(itemSelector));
|
||||
previous = previous[previous.length - 1];
|
||||
}
|
||||
|
||||
var hideEvent = $.Event(Event.HIDE, {
|
||||
relatedTarget: this._element
|
||||
var hideEvent = _jquery2.default.Event(Event.HIDE, {
|
||||
relatedTarget: this._element
|
||||
});
|
||||
|
||||
var showEvent = _jquery2.default.Event(Event.SHOW, {
|
||||
relatedTarget: previous
|
||||
});
|
||||
|
||||
if (previous) {
|
||||
(0, _jquery2.default)(previous).trigger(hideEvent);
|
||||
}
|
||||
|
||||
(0, _jquery2.default)(this._element).trigger(showEvent);
|
||||
|
||||
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (selector) {
|
||||
target = document.querySelector(selector);
|
||||
}
|
||||
|
||||
this._activate(this._element, listElement);
|
||||
|
||||
var complete = function complete() {
|
||||
var hiddenEvent = _jquery2.default.Event(Event.HIDDEN, {
|
||||
relatedTarget: _this._element
|
||||
});
|
||||
var showEvent = $.Event(Event.SHOW, {
|
||||
|
||||
var shownEvent = _jquery2.default.Event(Event.SHOWN, {
|
||||
relatedTarget: previous
|
||||
});
|
||||
|
||||
if (previous) {
|
||||
$(previous).trigger(hideEvent);
|
||||
(0, _jquery2.default)(previous).trigger(hiddenEvent);
|
||||
(0, _jquery2.default)(_this._element).trigger(shownEvent);
|
||||
};
|
||||
|
||||
if (target) {
|
||||
this._activate(target, target.parentNode, complete);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
_jquery2.default.removeData(this._element, DATA_KEY);
|
||||
|
||||
this._element = null;
|
||||
}
|
||||
}, {
|
||||
key: "_activate",
|
||||
value: function _activate(element, container, callback) {
|
||||
var _this2 = this;
|
||||
|
||||
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? (0, _jquery2.default)(container).find(Selector.ACTIVE_UL) : (0, _jquery2.default)(container).children(Selector.ACTIVE);
|
||||
var active = activeElements[0];
|
||||
var isTransitioning = callback && active && (0, _jquery2.default)(active).hasClass(ClassName.FADE);
|
||||
|
||||
var complete = function complete() {
|
||||
return _this2._transitionComplete(element, active, callback);
|
||||
};
|
||||
|
||||
if (active && isTransitioning) {
|
||||
var transitionDuration = _util2.default.getTransitionDurationFromElement(active);
|
||||
|
||||
(0, _jquery2.default)(active).removeClass(ClassName.SHOW).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "_transitionComplete",
|
||||
value: function _transitionComplete(element, active, callback) {
|
||||
if (active) {
|
||||
(0, _jquery2.default)(active).removeClass(ClassName.ACTIVE);
|
||||
var dropdownChild = (0, _jquery2.default)(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
|
||||
|
||||
if (dropdownChild) {
|
||||
(0, _jquery2.default)(dropdownChild).removeClass(ClassName.ACTIVE);
|
||||
}
|
||||
|
||||
$(this._element).trigger(showEvent);
|
||||
|
||||
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (selector) {
|
||||
target = $(selector)[0];
|
||||
}
|
||||
|
||||
this._activate(this._element, listElement);
|
||||
|
||||
var complete = function complete() {
|
||||
var hiddenEvent = $.Event(Event.HIDDEN, {
|
||||
relatedTarget: _this._element
|
||||
});
|
||||
var shownEvent = $.Event(Event.SHOWN, {
|
||||
relatedTarget: previous
|
||||
});
|
||||
$(previous).trigger(hiddenEvent);
|
||||
$(_this._element).trigger(shownEvent);
|
||||
};
|
||||
|
||||
if (target) {
|
||||
this._activate(target, target.parentNode, complete);
|
||||
} else {
|
||||
complete();
|
||||
if (active.getAttribute('role') === 'tab') {
|
||||
active.setAttribute('aria-selected', false);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
|
||||
(0, _jquery2.default)(element).addClass(ClassName.ACTIVE);
|
||||
|
||||
if (element.getAttribute('role') === 'tab') {
|
||||
element.setAttribute('aria-selected', true);
|
||||
}
|
||||
}, {
|
||||
key: "_activate",
|
||||
value: function _activate(element, container, callback) {
|
||||
var _this2 = this;
|
||||
|
||||
var activeElements;
|
||||
_util2.default.reflow(element);
|
||||
|
||||
if (container.nodeName === 'UL') {
|
||||
activeElements = $(container).find(Selector.ACTIVE_UL);
|
||||
} else {
|
||||
activeElements = $(container).children(Selector.ACTIVE);
|
||||
if (element.classList.contains(ClassName.FADE)) {
|
||||
element.classList.add(ClassName.SHOW);
|
||||
}
|
||||
|
||||
if (element.parentNode && (0, _jquery2.default)(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
|
||||
var dropdownElement = (0, _jquery2.default)(element).closest(Selector.DROPDOWN)[0];
|
||||
|
||||
if (dropdownElement) {
|
||||
var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(Selector.DROPDOWN_TOGGLE));
|
||||
(0, _jquery2.default)(dropdownToggleList).addClass(ClassName.ACTIVE);
|
||||
}
|
||||
|
||||
var active = activeElements[0];
|
||||
var isTransitioning = callback && _util2.default.supportsTransitionEnd() && active && $(active).hasClass(ClassName.FADE);
|
||||
|
||||
var complete = function complete() {
|
||||
return _this2._transitionComplete(element, active, callback);
|
||||
};
|
||||
|
||||
if (active && isTransitioning) {
|
||||
$(active).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
element.setAttribute('aria-expanded', true);
|
||||
}
|
||||
}, {
|
||||
key: "_transitionComplete",
|
||||
value: function _transitionComplete(element, active, callback) {
|
||||
if (active) {
|
||||
$(active).removeClass("".concat(ClassName.SHOW, " ").concat(ClassName.ACTIVE));
|
||||
var dropdownChild = $(active.parentNode).find(Selector.DROPDOWN_ACTIVE_CHILD)[0];
|
||||
|
||||
if (dropdownChild) {
|
||||
$(dropdownChild).removeClass(ClassName.ACTIVE);
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
}], [{
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $this = (0, _jquery2.default)(this);
|
||||
var data = $this.data(DATA_KEY);
|
||||
|
||||
if (!data) {
|
||||
data = new Tab(this);
|
||||
$this.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(config, "\""));
|
||||
}
|
||||
|
||||
if (active.getAttribute('role') === 'tab') {
|
||||
active.setAttribute('aria-selected', false);
|
||||
}
|
||||
data[config]();
|
||||
}
|
||||
|
||||
$(element).addClass(ClassName.ACTIVE);
|
||||
|
||||
if (element.getAttribute('role') === 'tab') {
|
||||
element.setAttribute('aria-selected', true);
|
||||
}
|
||||
|
||||
_util2.default.reflow(element);
|
||||
|
||||
$(element).addClass(ClassName.SHOW);
|
||||
|
||||
if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) {
|
||||
var dropdownElement = $(element).closest(Selector.DROPDOWN)[0];
|
||||
|
||||
if (dropdownElement) {
|
||||
$(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE);
|
||||
}
|
||||
|
||||
element.setAttribute('aria-expanded', true);
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
}], [{
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $this = $(this);
|
||||
var data = $this.data(DATA_KEY);
|
||||
|
||||
if (!data) {
|
||||
data = new Tab(this);
|
||||
$this.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(config, "\""));
|
||||
}
|
||||
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Tab;
|
||||
}();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
Tab._jQueryInterface.call($(this), 'show');
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$.fn[NAME] = Tab._jQueryInterface;
|
||||
$.fn[NAME].Constructor = Tab;
|
||||
|
||||
$.fn[NAME].noConflict = function () {
|
||||
$.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Tab._jQueryInterface;
|
||||
};
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Tab;
|
||||
}(_jquery2.default);
|
||||
}();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Data Api implementation
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
(0, _jquery2.default)(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
Tab._jQueryInterface.call((0, _jquery2.default)(this), 'show');
|
||||
});
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
_jquery2.default.fn[NAME] = Tab._jQueryInterface;
|
||||
_jquery2.default.fn[NAME].Constructor = Tab;
|
||||
|
||||
_jquery2.default.fn[NAME].noConflict = function () {
|
||||
_jquery2.default.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Tab._jQueryInterface;
|
||||
};
|
||||
|
||||
exports.default = Tab;
|
||||
});
|
||||
@@ -0,0 +1,312 @@
|
||||
"use strict";
|
||||
|
||||
define(["exports", "jquery", "./util"], function (exports, _jquery, _util) {
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _jquery2 = _interopRequireDefault(_jquery);
|
||||
|
||||
var _util2 = _interopRequireDefault(_util);
|
||||
|
||||
function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {
|
||||
default: obj
|
||||
};
|
||||
}
|
||||
|
||||
function _typeof(obj) {
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
_typeof = function _typeof(obj) {
|
||||
return typeof obj;
|
||||
};
|
||||
} else {
|
||||
_typeof = function _typeof(obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
}
|
||||
|
||||
return _typeof(obj);
|
||||
}
|
||||
|
||||
function _objectSpread(target) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
var ownKeys = Object.keys(source);
|
||||
|
||||
if (typeof Object.getOwnPropertySymbols === 'function') {
|
||||
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
||||
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
||||
}));
|
||||
}
|
||||
|
||||
ownKeys.forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function _classCallCheck(instance, Constructor) {
|
||||
if (!(instance instanceof Constructor)) {
|
||||
throw new TypeError("Cannot call a class as a function");
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var NAME = 'toast';
|
||||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.toast';
|
||||
var EVENT_KEY = ".".concat(DATA_KEY);
|
||||
var JQUERY_NO_CONFLICT = _jquery2.default.fn[NAME];
|
||||
var Event = {
|
||||
CLICK_DISMISS: "click.dismiss".concat(EVENT_KEY),
|
||||
HIDE: "hide".concat(EVENT_KEY),
|
||||
HIDDEN: "hidden".concat(EVENT_KEY),
|
||||
SHOW: "show".concat(EVENT_KEY),
|
||||
SHOWN: "shown".concat(EVENT_KEY)
|
||||
};
|
||||
var ClassName = {
|
||||
FADE: 'fade',
|
||||
HIDE: 'hide',
|
||||
SHOW: 'show',
|
||||
SHOWING: 'showing'
|
||||
};
|
||||
var DefaultType = {
|
||||
animation: 'boolean',
|
||||
autohide: 'boolean',
|
||||
delay: 'number'
|
||||
};
|
||||
var Default = {
|
||||
animation: true,
|
||||
autohide: true,
|
||||
delay: 500
|
||||
};
|
||||
var Selector = {
|
||||
DATA_DISMISS: '[data-dismiss="toast"]'
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
};
|
||||
|
||||
var Toast = function () {
|
||||
function Toast(element, config) {
|
||||
_classCallCheck(this, Toast);
|
||||
|
||||
this._element = element;
|
||||
this._config = this._getConfig(config);
|
||||
this._timeout = null;
|
||||
|
||||
this._setListeners();
|
||||
} // Getters
|
||||
|
||||
|
||||
_createClass(Toast, [{
|
||||
key: "show",
|
||||
value: function show() {
|
||||
var _this = this;
|
||||
|
||||
(0, _jquery2.default)(this._element).trigger(Event.SHOW);
|
||||
|
||||
if (this._config.animation) {
|
||||
this._element.classList.add(ClassName.FADE);
|
||||
}
|
||||
|
||||
var complete = function complete() {
|
||||
_this._element.classList.remove(ClassName.SHOWING);
|
||||
|
||||
_this._element.classList.add(ClassName.SHOW);
|
||||
|
||||
(0, _jquery2.default)(_this._element).trigger(Event.SHOWN);
|
||||
|
||||
if (_this._config.autohide) {
|
||||
_this.hide();
|
||||
}
|
||||
};
|
||||
|
||||
this._element.classList.remove(ClassName.HIDE);
|
||||
|
||||
this._element.classList.add(ClassName.SHOWING);
|
||||
|
||||
if (this._config.animation) {
|
||||
var transitionDuration = _util2.default.getTransitionDurationFromElement(this._element);
|
||||
|
||||
(0, _jquery2.default)(this._element).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "hide",
|
||||
value: function hide(withoutTimeout) {
|
||||
var _this2 = this;
|
||||
|
||||
if (!this._element.classList.contains(ClassName.SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
(0, _jquery2.default)(this._element).trigger(Event.HIDE);
|
||||
|
||||
if (withoutTimeout) {
|
||||
this._close();
|
||||
} else {
|
||||
this._timeout = setTimeout(function () {
|
||||
_this2._close();
|
||||
}, this._config.delay);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "dispose",
|
||||
value: function dispose() {
|
||||
clearTimeout(this._timeout);
|
||||
this._timeout = null;
|
||||
|
||||
if (this._element.classList.contains(ClassName.SHOW)) {
|
||||
this._element.classList.remove(ClassName.SHOW);
|
||||
}
|
||||
|
||||
(0, _jquery2.default)(this._element).off(Event.CLICK_DISMISS);
|
||||
|
||||
_jquery2.default.removeData(this._element, DATA_KEY);
|
||||
|
||||
this._element = null;
|
||||
this._config = null;
|
||||
}
|
||||
}, {
|
||||
key: "_getConfig",
|
||||
value: function _getConfig(config) {
|
||||
config = _objectSpread({}, Default, (0, _jquery2.default)(this._element).data(), _typeof(config) === 'object' && config ? config : {});
|
||||
|
||||
_util2.default.typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
|
||||
return config;
|
||||
}
|
||||
}, {
|
||||
key: "_setListeners",
|
||||
value: function _setListeners() {
|
||||
var _this3 = this;
|
||||
|
||||
(0, _jquery2.default)(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function () {
|
||||
return _this3.hide(true);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "_close",
|
||||
value: function _close() {
|
||||
var _this4 = this;
|
||||
|
||||
var complete = function complete() {
|
||||
_this4._element.classList.add(ClassName.HIDE);
|
||||
|
||||
(0, _jquery2.default)(_this4._element).trigger(Event.HIDDEN);
|
||||
};
|
||||
|
||||
this._element.classList.remove(ClassName.SHOW);
|
||||
|
||||
if (this._config.animation) {
|
||||
var transitionDuration = _util2.default.getTransitionDurationFromElement(this._element);
|
||||
|
||||
(0, _jquery2.default)(this._element).one(_util2.default.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
}
|
||||
}], [{
|
||||
key: "_jQueryInterface",
|
||||
value: function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var $element = (0, _jquery2.default)(this);
|
||||
var data = $element.data(DATA_KEY);
|
||||
|
||||
var _config = _typeof(config) === 'object' && config;
|
||||
|
||||
if (!data) {
|
||||
data = new Toast(this, _config);
|
||||
$element.data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
if (typeof config === 'string') {
|
||||
if (typeof data[config] === 'undefined') {
|
||||
throw new TypeError("No method named \"".concat(config, "\""));
|
||||
}
|
||||
|
||||
data[config](this);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "VERSION",
|
||||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: "DefaultType",
|
||||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
}, {
|
||||
key: "Default",
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Toast;
|
||||
}();
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* jQuery
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
_jquery2.default.fn[NAME] = Toast._jQueryInterface;
|
||||
_jquery2.default.fn[NAME].Constructor = Toast;
|
||||
|
||||
_jquery2.default.fn[NAME].noConflict = function () {
|
||||
_jquery2.default.fn[NAME] = JQUERY_NO_CONFLICT;
|
||||
return Toast._jQueryInterface;
|
||||
};
|
||||
|
||||
exports.default = Toast;
|
||||
});
|
||||
+699
-622
File diff suppressed because it is too large
Load Diff
+142
-126
@@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
define(["exports", "jquery"], function (exports, _jquery) {
|
||||
"use strict";
|
||||
|
||||
@@ -15,142 +17,156 @@ define(["exports", "jquery"], function (exports, _jquery) {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0): util.js
|
||||
* Bootstrap (v4.3.1): util.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
var Util = function ($) {
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Private TransitionEnd Helpers
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var transition = false;
|
||||
var MAX_UID = 1000000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
function toType(obj) {
|
||||
return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
|
||||
}
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Private TransitionEnd Helpers
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
var TRANSITION_END = 'transitionend';
|
||||
var MAX_UID = 1000000;
|
||||
var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
function getSpecialTransitionEndEvent() {
|
||||
return {
|
||||
bindType: transition.end,
|
||||
delegateType: transition.end,
|
||||
handle: function handle(event) {
|
||||
if ($(event.target).is(this)) {
|
||||
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
|
||||
}
|
||||
function toType(obj) {
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
}
|
||||
|
||||
return undefined; // eslint-disable-line no-undefined
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function transitionEndTest() {
|
||||
if (typeof window !== 'undefined' && window.QUnit) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return {
|
||||
end: 'transitionend'
|
||||
};
|
||||
}
|
||||
|
||||
function transitionEndEmulator(duration) {
|
||||
var _this = this;
|
||||
|
||||
var called = false;
|
||||
$(this).one(Util.TRANSITION_END, function () {
|
||||
called = true;
|
||||
});
|
||||
setTimeout(function () {
|
||||
if (!called) {
|
||||
Util.triggerTransitionEnd(_this);
|
||||
}
|
||||
}, duration);
|
||||
return this;
|
||||
}
|
||||
|
||||
function setTransitionEndSupport() {
|
||||
transition = transitionEndTest();
|
||||
$.fn.emulateTransitionEnd = transitionEndEmulator;
|
||||
|
||||
if (Util.supportsTransitionEnd()) {
|
||||
$.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 $.escapeSelector === 'function' ? $.escapeSelector(selector).substr(1) : selector.replace(/(:|\.|\[|\]|,|=|@)/g, '\\$1');
|
||||
return selector;
|
||||
}
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Public Util Api
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
var Util = {
|
||||
TRANSITION_END: 'bsTransitionEnd',
|
||||
getUID: function getUID(prefix) {
|
||||
do {
|
||||
// eslint-disable-next-line no-bitwise
|
||||
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
|
||||
} while (document.getElementById(prefix));
|
||||
|
||||
return prefix;
|
||||
},
|
||||
getSelectorFromElement: function getSelectorFromElement(element) {
|
||||
var selector = element.getAttribute('data-target');
|
||||
|
||||
if (!selector || selector === '#') {
|
||||
selector = element.getAttribute('href') || '';
|
||||
} // If it's an ID
|
||||
|
||||
|
||||
if (selector.charAt(0) === '#') {
|
||||
selector = escapeId(selector);
|
||||
function getSpecialTransitionEndEvent() {
|
||||
return {
|
||||
bindType: TRANSITION_END,
|
||||
delegateType: TRANSITION_END,
|
||||
handle: function handle(event) {
|
||||
if ((0, _jquery2.default)(event.target).is(this)) {
|
||||
return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
|
||||
}
|
||||
|
||||
try {
|
||||
var $selector = $(document).find(selector);
|
||||
return $selector.length > 0 ? selector : null;
|
||||
} catch (err) {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
reflow: function reflow(element) {
|
||||
return element.offsetHeight;
|
||||
},
|
||||
triggerTransitionEnd: function triggerTransitionEnd(element) {
|
||||
$(element).trigger(transition.end);
|
||||
},
|
||||
supportsTransitionEnd: function supportsTransitionEnd() {
|
||||
return Boolean(transition);
|
||||
},
|
||||
isElement: function isElement(obj) {
|
||||
return (obj[0] || obj).nodeType;
|
||||
},
|
||||
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
|
||||
for (var property in configTypes) {
|
||||
if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
|
||||
var expectedTypes = configTypes[property];
|
||||
var value = config[property];
|
||||
var valueType = value && Util.isElement(value) ? 'element' : toType(value);
|
||||
|
||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
||||
throw new Error("".concat(componentName.toUpperCase(), ": ") + "Option \"".concat(property, "\" provided type \"").concat(valueType, "\" ") + "but expected type \"".concat(expectedTypes, "\"."));
|
||||
}
|
||||
}
|
||||
}
|
||||
return undefined; // eslint-disable-line no-undefined
|
||||
}
|
||||
};
|
||||
setTransitionEndSupport();
|
||||
return Util;
|
||||
}(_jquery2.default);
|
||||
}
|
||||
|
||||
function transitionEndEmulator(duration) {
|
||||
var _this = this;
|
||||
|
||||
var called = false;
|
||||
(0, _jquery2.default)(this).one(Util.TRANSITION_END, function () {
|
||||
called = true;
|
||||
});
|
||||
setTimeout(function () {
|
||||
if (!called) {
|
||||
Util.triggerTransitionEnd(_this);
|
||||
}
|
||||
}, duration);
|
||||
return this;
|
||||
}
|
||||
|
||||
function setTransitionEndSupport() {
|
||||
_jquery2.default.fn.emulateTransitionEnd = transitionEndEmulator;
|
||||
_jquery2.default.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
|
||||
}
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Public Util Api
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
var Util = {
|
||||
TRANSITION_END: 'bsTransitionEnd',
|
||||
getUID: function getUID(prefix) {
|
||||
do {
|
||||
// eslint-disable-next-line no-bitwise
|
||||
prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
|
||||
} while (document.getElementById(prefix));
|
||||
|
||||
return prefix;
|
||||
},
|
||||
getSelectorFromElement: function getSelectorFromElement(element) {
|
||||
var selector = element.getAttribute('data-target');
|
||||
|
||||
if (!selector || selector === '#') {
|
||||
var hrefAttr = element.getAttribute('href');
|
||||
selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : '';
|
||||
}
|
||||
|
||||
try {
|
||||
return document.querySelector(selector) ? selector : null;
|
||||
} catch (err) {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
|
||||
if (!element) {
|
||||
return 0;
|
||||
} // Get transition-duration of the element
|
||||
|
||||
|
||||
var transitionDuration = (0, _jquery2.default)(element).css('transition-duration');
|
||||
var transitionDelay = (0, _jquery2.default)(element).css('transition-delay');
|
||||
var floatTransitionDuration = parseFloat(transitionDuration);
|
||||
var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found
|
||||
|
||||
if (!floatTransitionDuration && !floatTransitionDelay) {
|
||||
return 0;
|
||||
} // If multiple durations are defined, take the first
|
||||
|
||||
|
||||
transitionDuration = transitionDuration.split(',')[0];
|
||||
transitionDelay = transitionDelay.split(',')[0];
|
||||
return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
|
||||
},
|
||||
reflow: function reflow(element) {
|
||||
return element.offsetHeight;
|
||||
},
|
||||
triggerTransitionEnd: function triggerTransitionEnd(element) {
|
||||
(0, _jquery2.default)(element).trigger(TRANSITION_END);
|
||||
},
|
||||
supportsTransitionEnd: function supportsTransitionEnd() {
|
||||
return Boolean(TRANSITION_END);
|
||||
},
|
||||
isElement: function isElement(obj) {
|
||||
return (obj[0] || obj).nodeType;
|
||||
},
|
||||
typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
|
||||
for (var property in configTypes) {
|
||||
if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
|
||||
var expectedTypes = configTypes[property];
|
||||
var value = config[property];
|
||||
var valueType = value && Util.isElement(value) ? 'element' : toType(value);
|
||||
|
||||
if (!new RegExp(expectedTypes).test(valueType)) {
|
||||
throw new Error("".concat(componentName.toUpperCase(), ": ") + "Option \"".concat(property, "\" provided type \"").concat(valueType, "\" ") + "but expected type \"".concat(expectedTypes, "\"."));
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
findShadowRoot: function findShadowRoot(element) {
|
||||
if (!document.documentElement.attachShadow) {
|
||||
return null;
|
||||
} // Can find the shadow root otherwise it'll return the document
|
||||
|
||||
|
||||
if (typeof element.getRootNode === 'function') {
|
||||
var root = element.getRootNode();
|
||||
return root instanceof ShadowRoot ? root : null;
|
||||
}
|
||||
|
||||
if (element instanceof ShadowRoot) {
|
||||
return element;
|
||||
} // when we don't find a shadow root
|
||||
|
||||
|
||||
if (!element.parentNode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return Util.findShadowRoot(element.parentNode);
|
||||
}
|
||||
};
|
||||
setTransitionEndSupport();
|
||||
exports.default = Util;
|
||||
});
|
||||
@@ -4,7 +4,7 @@ Twitter bootstrap
|
||||
-----------------
|
||||
|
||||
Sass:
|
||||
This theme uses the version 4.0.0 Twitter bootstrap sass files.
|
||||
This theme uses the version 4.3.1 Twitter bootstrap sass files.
|
||||
The bootstrap repository is available on:
|
||||
|
||||
https://github.com/twitter/bootstrap.git
|
||||
@@ -13,9 +13,7 @@ To update to the latest release of twitter bootstrap:
|
||||
|
||||
* remove all files from scss/bootstrap,
|
||||
* download the new scss files and store them in scss/bootstrap
|
||||
* re-apply /* rtl:begin:ignore */ on the top of _popover.scss before .popover rule and /* rtl:end:ignore */ before
|
||||
.popover-arrow::after rule. See MDL-56763 commit (1a4faf9b).
|
||||
* comment out all uses of the @supports syntax in SCSS (see https://github.com/sabberworm/PHP-CSS-Parser/issues/127). In Bootstrap 4.0 The @supports rules are used for carousal transitions (nice sliding) and the .sticky-top helper class. The carousel bootstrap component will still be functional.
|
||||
* remove left: 0; from .popover {} in scss/bootstrap/_popover.scss. In RTL mode this prevents popovers from showing and it is not required in LTR mode.
|
||||
* update ./thirdpartylibs.xml
|
||||
|
||||
Javascript:
|
||||
@@ -23,13 +21,20 @@ Javascript:
|
||||
This theme uses the transpiled javascript from bootstrap4 as amd modules.
|
||||
|
||||
To update the javascript files:
|
||||
Checkout the latest branch of bootstrap to a folder, Run the follwing inside the cloned Bootstrap repository:
|
||||
Checkout the version you are updating to in a folder, Run the follwing inside the cloned Bootstrap repository:
|
||||
|
||||
```
|
||||
$ npm install @babel/[email protected].37 @babel/[email protected].37 babel-plugin-transform-es2015-modules-amd @babel/plugin-proposal-object-rest-spread
|
||||
$ npm install @babel/[email protected].41 @babel/[email protected].41 babel-plugin-transform-es2015-modules-amd @babel/plugin-proposal-object-rest-spread
|
||||
$ mkdir out
|
||||
$ ./node_modules/@babel/cli/bin/babel.js --presets @babel/preset-env --plugins transform-es2015-modules-amd,@babel/plugin-proposal-object-rest-spread -d ./out/ js/src/
|
||||
```
|
||||
|
||||
Copy the transpiled files from out/ into the amd/src/ folder for the theme.
|
||||
|
||||
Moodle core includes the popper.js Library, so make sure each of the new js files references the "core/popper" library instead of "popper.js".
|
||||
For version 4.3.1 these files were: tooltip.js and dropdown.js
|
||||
|
||||
Move the amd/src/tools/sanatizer.js to amd/src/sanatizer.js and update libraries including sanatizer.js.
|
||||
For version 4.3.1 this file was: tooltip.js
|
||||
|
||||
Run grunt to re-compile the JS files. (thanks to Joby Harding)
|
||||
@@ -1,22 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2011-2018 Twitter, Inc.
|
||||
Copyright (c) 2011-2018 The Bootstrap Authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -27,7 +27,7 @@
|
||||
// Expand the right padding and account for the close button's positioning.
|
||||
|
||||
.alert-dismissible {
|
||||
padding-right: ($close-font-size + $alert-padding-x * 2);
|
||||
padding-right: $close-font-size + $alert-padding-x * 2;
|
||||
|
||||
// Adjust close link position
|
||||
.close {
|
||||
|
||||
@@ -6,13 +6,20 @@
|
||||
.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 {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Empty badges collapse automatically
|
||||
&:empty {
|
||||
|
||||
@@ -5,17 +5,20 @@
|
||||
margin-bottom: $breadcrumb-margin-bottom;
|
||||
list-style: none;
|
||||
background-color: $breadcrumb-bg;
|
||||
@include border-radius($border-radius);
|
||||
@include border-radius($breadcrumb-border-radius);
|
||||
}
|
||||
|
||||
.breadcrumb-item {
|
||||
// The separator between breadcrumbs (by default, a forward-slash: "/")
|
||||
+ .breadcrumb-item::before {
|
||||
display: inline-block; // Suppress underlining of the separator in modern browsers
|
||||
padding-right: $breadcrumb-item-padding;
|
||||
+ .breadcrumb-item {
|
||||
padding-left: $breadcrumb-item-padding;
|
||||
color: $breadcrumb-divider-color;
|
||||
content: "#{$breadcrumb-divider}";
|
||||
|
||||
&::before {
|
||||
display: inline-block; // Suppress underlining of the separator in modern browsers
|
||||
padding-right: $breadcrumb-item-padding;
|
||||
color: $breadcrumb-divider-color;
|
||||
content: $breadcrumb-divider;
|
||||
}
|
||||
}
|
||||
|
||||
// IE9-11 hack to properly handle hyperlink underlines for breadcrumbs built
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
> .btn {
|
||||
position: relative;
|
||||
flex: 0 1 auto;
|
||||
flex: 1 1 auto;
|
||||
|
||||
// Bring the hover, focused, and "active" buttons to the front to overlay
|
||||
// the borders properly
|
||||
@@ -22,14 +22,6 @@
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Prevent double borders when buttons are next to each other
|
||||
.btn + .btn,
|
||||
.btn + .btn-group,
|
||||
.btn-group + .btn,
|
||||
.btn-group + .btn-group {
|
||||
margin-left: -$btn-border-width;
|
||||
}
|
||||
}
|
||||
|
||||
// Optional: Group multiple button groups together for a toolbar
|
||||
@@ -44,8 +36,10 @@
|
||||
}
|
||||
|
||||
.btn-group {
|
||||
> .btn:first-child {
|
||||
margin-left: 0;
|
||||
// Prevent double borders when buttons are next to each other
|
||||
> .btn:not(:first-child),
|
||||
> .btn-group:not(:first-child) {
|
||||
margin-left: -$btn-border-width;
|
||||
}
|
||||
|
||||
// Reset rounded corners
|
||||
@@ -76,9 +70,15 @@
|
||||
padding-right: $btn-padding-x * .75;
|
||||
padding-left: $btn-padding-x * .75;
|
||||
|
||||
&::after {
|
||||
&::after,
|
||||
.dropup &::after,
|
||||
.dropright &::after {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.dropleft &::before {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-sm + .dropdown-toggle-split {
|
||||
@@ -113,17 +113,14 @@
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
|
||||
.btn,
|
||||
.btn-group {
|
||||
> .btn,
|
||||
> .btn-group {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
> .btn + .btn,
|
||||
> .btn + .btn-group,
|
||||
> .btn-group + .btn,
|
||||
> .btn-group + .btn-group {
|
||||
> .btn:not(:first-child),
|
||||
> .btn-group:not(:first-child) {
|
||||
margin-top: -$btn-border-width;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
// Reset rounded corners
|
||||
|
||||
@@ -6,17 +6,19 @@
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
font-family: $btn-font-family;
|
||||
font-weight: $btn-font-weight;
|
||||
color: $body-color;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
user-select: none;
|
||||
background-color: transparent;
|
||||
border: $btn-border-width solid transparent;
|
||||
@include button-size($btn-padding-y, $btn-padding-x, $font-size-base, $btn-line-height, $btn-border-radius);
|
||||
@include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius);
|
||||
@include transition($btn-transition);
|
||||
|
||||
// Share hover and focus styles
|
||||
@include hover-focus {
|
||||
@include hover {
|
||||
color: $body-color;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
@@ -33,14 +35,8 @@
|
||||
@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 {
|
||||
background-image: none;
|
||||
@include box-shadow($btn-active-box-shadow);
|
||||
|
||||
&:focus {
|
||||
@@ -81,25 +77,23 @@ fieldset:disabled a.btn {
|
||||
.btn-link {
|
||||
font-weight: $font-weight-normal;
|
||||
color: $link-color;
|
||||
background-color: transparent;
|
||||
text-decoration: $link-decoration;
|
||||
|
||||
@include hover {
|
||||
color: $link-hover-color;
|
||||
text-decoration: $link-hover-decoration;
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&.focus {
|
||||
text-decoration: $link-hover-decoration;
|
||||
border-color: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
&:disabled,
|
||||
&.disabled {
|
||||
color: $btn-link-disabled-color;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
// No need for an active state here
|
||||
@@ -111,11 +105,11 @@ fieldset:disabled a.btn {
|
||||
//
|
||||
|
||||
.btn-lg {
|
||||
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $font-size-lg, $btn-line-height-lg, $btn-border-radius-lg);
|
||||
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-line-height-lg, $btn-border-radius-lg);
|
||||
}
|
||||
|
||||
.btn-sm {
|
||||
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $font-size-sm, $btn-line-height-sm, $btn-border-radius-sm);
|
||||
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-line-height-sm, $btn-border-radius-sm);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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 {
|
||||
@@ -43,7 +44,7 @@
|
||||
}
|
||||
|
||||
.card-subtitle {
|
||||
margin-top: -($card-spacer-y / 2);
|
||||
margin-top: -$card-spacer-y / 2;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
@@ -68,6 +69,7 @@
|
||||
.card-header {
|
||||
padding: $card-spacer-y $card-spacer-x;
|
||||
margin-bottom: 0; // Removes the default margin-bottom of <hN>
|
||||
color: $card-cap-color;
|
||||
background-color: $card-cap-bg;
|
||||
border-bottom: $card-border-width solid $card-border-color;
|
||||
|
||||
@@ -98,15 +100,15 @@
|
||||
//
|
||||
|
||||
.card-header-tabs {
|
||||
margin-right: -($card-spacer-x / 2);
|
||||
margin-right: -$card-spacer-x / 2;
|
||||
margin-bottom: -$card-spacer-y;
|
||||
margin-left: -($card-spacer-x / 2);
|
||||
margin-left: -$card-spacer-x / 2;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.card-header-pills {
|
||||
margin-right: -($card-spacer-x / 2);
|
||||
margin-left: -($card-spacer-x / 2);
|
||||
margin-right: -$card-spacer-x / 2;
|
||||
margin-left: -$card-spacer-x / 2;
|
||||
}
|
||||
|
||||
// Card image
|
||||
@@ -153,7 +155,7 @@
|
||||
|
||||
.card {
|
||||
display: flex;
|
||||
// Flexbugs #4: https://github.com/philipwalton/flexbugs#4-flex-shorthand-declarations-with-unitless-flex-basis-values-are-ignored
|
||||
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
|
||||
flex: 1 0 0%;
|
||||
flex-direction: column;
|
||||
margin-right: $card-deck-margin;
|
||||
@@ -183,7 +185,7 @@
|
||||
// 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
|
||||
// Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
|
||||
flex: 1 0 0%;
|
||||
margin-bottom: 0;
|
||||
|
||||
@@ -194,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -261,6 +243,8 @@
|
||||
@include media-breakpoint-up(sm) {
|
||||
column-count: $card-columns-count;
|
||||
column-gap: $card-columns-gap;
|
||||
orphans: 1;
|
||||
widows: 1;
|
||||
|
||||
.card {
|
||||
display: inline-block; // Don't let them vertically span multiple columns
|
||||
@@ -268,3 +252,38 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Accordion
|
||||
//
|
||||
|
||||
.accordion {
|
||||
> .card {
|
||||
overflow: hidden;
|
||||
|
||||
&:not(:first-of-type) {
|
||||
.card-header:first-child {
|
||||
@include border-radius(0);
|
||||
}
|
||||
|
||||
&:not(:last-of-type) {
|
||||
border-bottom: 0;
|
||||
@include border-radius(0);
|
||||
}
|
||||
}
|
||||
|
||||
&:first-of-type {
|
||||
border-bottom: 0;
|
||||
@include border-bottom-radius(0);
|
||||
}
|
||||
|
||||
&:last-of-type {
|
||||
@include border-top-radius(0);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
margin-bottom: -$card-border-width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,39 @@
|
||||
// Wrapper for the slide container and indicators
|
||||
// Notes on the classes:
|
||||
//
|
||||
// 1. .carousel.pointer-event should ideally be pan-y (to allow for users to scroll vertically)
|
||||
// even when their scroll action started on a carousel, but for compatibility (with Firefox)
|
||||
// we're preventing all actions instead
|
||||
// 2. The .carousel-item-left and .carousel-item-right is used to indicate where
|
||||
// the active slide is heading.
|
||||
// 3. .active.carousel-item is the current slide.
|
||||
// 4. .active.carousel-item-left and .active.carousel-item-right is the current
|
||||
// slide in its in-transition state. Only one of these occurs at a time.
|
||||
// 5. .carousel-item-next.carousel-item-left and .carousel-item-prev.carousel-item-right
|
||||
// is the upcoming slide in transition.
|
||||
|
||||
.carousel {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.carousel.pointer-event {
|
||||
touch-action: pan-y;
|
||||
}
|
||||
|
||||
.carousel-inner {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
@include clearfix();
|
||||
}
|
||||
|
||||
.carousel-item {
|
||||
position: relative;
|
||||
display: none;
|
||||
align-items: center;
|
||||
float: left;
|
||||
width: 100%;
|
||||
@include transition($carousel-transition);
|
||||
margin-right: -100%;
|
||||
backface-visibility: hidden;
|
||||
perspective: 1000px;
|
||||
@include transition($carousel-transition);
|
||||
}
|
||||
|
||||
.carousel-item.active,
|
||||
@@ -25,39 +42,42 @@
|
||||
display: block;
|
||||
}
|
||||
|
||||
.carousel-item-next,
|
||||
.carousel-item-prev {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
.carousel-item-next:not(.carousel-item-left),
|
||||
.active.carousel-item-right {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
// CSS3 transforms when supported by the browser
|
||||
// .carousel-item-next.carousel-item-left,
|
||||
// .carousel-item-prev.carousel-item-right {
|
||||
// transform: translateX(0);
|
||||
.carousel-item-prev:not(.carousel-item-right),
|
||||
.active.carousel-item-left {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
// @supports (transform-style: preserve-3d) {
|
||||
// transform: translate3d(0, 0, 0);
|
||||
// }
|
||||
// }
|
||||
|
||||
// .carousel-item-next,
|
||||
// .active.carousel-item-right {
|
||||
// transform: translateX(100%);
|
||||
//
|
||||
// Alternate transitions
|
||||
//
|
||||
|
||||
// @supports (transform-style: preserve-3d) {
|
||||
// transform: translate3d(100%, 0, 0);
|
||||
// }
|
||||
// }
|
||||
.carousel-fade {
|
||||
.carousel-item {
|
||||
opacity: 0;
|
||||
transition-property: opacity;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
// .carousel-item-prev,
|
||||
// .active.carousel-item-left {
|
||||
// transform: translateX(-100%);
|
||||
.carousel-item.active,
|
||||
.carousel-item-next.carousel-item-left,
|
||||
.carousel-item-prev.carousel-item-right {
|
||||
z-index: 1;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
// @supports (transform-style: preserve-3d) {
|
||||
// transform: translate3d(-100%, 0, 0);
|
||||
// }
|
||||
// }
|
||||
.active.carousel-item-left,
|
||||
.active.carousel-item-right {
|
||||
z-index: 0;
|
||||
opacity: 0;
|
||||
@include transition(0s $carousel-transition-duration opacity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
@@ -69,6 +89,7 @@
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
// Use flex for alignment (1-3)
|
||||
display: flex; // 1. allow flex styles
|
||||
align-items: center; // 2. vertically center contents
|
||||
@@ -77,27 +98,26 @@
|
||||
color: $carousel-control-color;
|
||||
text-align: center;
|
||||
opacity: $carousel-control-opacity;
|
||||
// We can't have a transition here because WebKit cancels the carousel
|
||||
// animation if you trip this while in the middle of another animation.
|
||||
@include transition($carousel-control-transition);
|
||||
|
||||
// Hover/focus state
|
||||
@include hover-focus {
|
||||
color: $carousel-control-color;
|
||||
text-decoration: none;
|
||||
outline: 0;
|
||||
opacity: .9;
|
||||
opacity: $carousel-control-hover-opacity;
|
||||
}
|
||||
}
|
||||
.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($black, .25), rgba($black, .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($black, .25), rgba($black, .001));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,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;
|
||||
@@ -126,7 +145,7 @@
|
||||
.carousel-indicators {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 10px;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 15;
|
||||
display: flex;
|
||||
@@ -138,38 +157,25 @@
|
||||
list-style: none;
|
||||
|
||||
li {
|
||||
position: relative;
|
||||
box-sizing: content-box;
|
||||
flex: 0 1 auto;
|
||||
width: $carousel-indicator-width;
|
||||
height: $carousel-indicator-height;
|
||||
margin-right: $carousel-indicator-spacer;
|
||||
margin-left: $carousel-indicator-spacer;
|
||||
text-indent: -999px;
|
||||
background-color: rgba($carousel-indicator-active-bg, .5);
|
||||
|
||||
// Use pseudo classes to increase the hit area by 10px on top and bottom.
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
left: 0;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 10px;
|
||||
content: "";
|
||||
}
|
||||
&::after {
|
||||
position: absolute;
|
||||
bottom: -10px;
|
||||
left: 0;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 10px;
|
||||
content: "";
|
||||
}
|
||||
cursor: pointer;
|
||||
background-color: $carousel-indicator-active-bg;
|
||||
background-clip: padding-box;
|
||||
// Use transparent borders to increase the hit area by 10px on top and bottom.
|
||||
border-top: $carousel-indicator-hit-area-height solid transparent;
|
||||
border-bottom: $carousel-indicator-hit-area-height solid transparent;
|
||||
opacity: .5;
|
||||
@include transition($carousel-indicator-transition);
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: $carousel-indicator-active-bg;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,9 +186,9 @@
|
||||
|
||||
.carousel-caption {
|
||||
position: absolute;
|
||||
right: ((100% - $carousel-caption-width) / 2);
|
||||
right: (100% - $carousel-caption-width) / 2;
|
||||
bottom: 20px;
|
||||
left: ((100% - $carousel-caption-width) / 2);
|
||||
left: (100% - $carousel-caption-width) / 2;
|
||||
z-index: 10;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
.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;
|
||||
text-shadow: $close-text-shadow;
|
||||
opacity: .5;
|
||||
|
||||
@include hover-focus {
|
||||
// Override <a>'s hover style
|
||||
@include hover {
|
||||
color: $close-color;
|
||||
text-decoration: none;
|
||||
opacity: .75;
|
||||
}
|
||||
|
||||
// Opinionated: add "hand" cursor to non-disabled .close elements
|
||||
&:not(:disabled):not(.disabled) {
|
||||
cursor: pointer;
|
||||
@include hover-focus {
|
||||
opacity: .75;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,11 +25,17 @@
|
||||
// If you want the anchor version, it requires `href="#"`.
|
||||
// See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile
|
||||
|
||||
// stylelint-disable property-no-vendor-prefix, selector-no-qualifying-type
|
||||
// stylelint-disable-next-line selector-no-qualifying-type
|
||||
button.close {
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
// Future-proof disabling of clicks on `<a>` elements
|
||||
|
||||
// stylelint-disable-next-line selector-no-qualifying-type
|
||||
a.close.disabled {
|
||||
pointer-events: none;
|
||||
}
|
||||
// stylelint-enable
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
// Inline and block code styles
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: $font-family-monospace;
|
||||
}
|
||||
|
||||
// Inline code
|
||||
code {
|
||||
font-size: $code-font-size;
|
||||
@include font-size($code-font-size);
|
||||
color: $code-color;
|
||||
word-break: break-word;
|
||||
|
||||
@@ -21,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);
|
||||
@@ -29,7 +21,7 @@ kbd {
|
||||
|
||||
kbd {
|
||||
padding: 0;
|
||||
font-size: 100%;
|
||||
@include font-size(100%);
|
||||
font-weight: $nested-kbd-font-weight;
|
||||
@include box-shadow(none);
|
||||
}
|
||||
@@ -38,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;
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
.custom-control {
|
||||
position: relative;
|
||||
display: block;
|
||||
min-height: (1rem * $line-height-base);
|
||||
padding-left: $custom-control-gutter;
|
||||
min-height: $font-size-base * $line-height-base;
|
||||
padding-left: $custom-control-gutter + $custom-control-indicator-size;
|
||||
}
|
||||
|
||||
.custom-control-inline {
|
||||
@@ -26,18 +26,28 @@
|
||||
|
||||
&:checked ~ .custom-control-label::before {
|
||||
color: $custom-control-indicator-checked-color;
|
||||
border-color: $custom-control-indicator-checked-border-color;
|
||||
@include gradient-bg($custom-control-indicator-checked-bg);
|
||||
@include box-shadow($custom-control-indicator-checked-box-shadow);
|
||||
}
|
||||
|
||||
&: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;
|
||||
@if $enable-shadows {
|
||||
box-shadow: $input-box-shadow, $input-focus-box-shadow;
|
||||
} @else {
|
||||
box-shadow: $custom-control-indicator-focus-box-shadow;
|
||||
}
|
||||
}
|
||||
|
||||
&:active ~ .custom-control-label::before {
|
||||
&:focus:not(:checked) ~ .custom-control-label::before {
|
||||
border-color: $custom-control-indicator-focus-border-color;
|
||||
}
|
||||
|
||||
&:not(:disabled):active ~ .custom-control-label::before {
|
||||
color: $custom-control-indicator-active-color;
|
||||
background-color: $custom-control-indicator-active-bg;
|
||||
border-color: $custom-control-indicator-active-border-color;
|
||||
@include box-shadow($custom-control-indicator-active-box-shadow);
|
||||
}
|
||||
|
||||
@@ -54,38 +64,38 @@
|
||||
|
||||
// Custom control indicators
|
||||
//
|
||||
// Build the custom controls out of psuedo-elements.
|
||||
// Build the custom controls out of pseudo-elements.
|
||||
|
||||
.custom-control-label {
|
||||
position: relative;
|
||||
margin-bottom: 0;
|
||||
vertical-align: top;
|
||||
|
||||
// Background-color and (when enabled) gradient
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: (($line-height-base - $custom-control-indicator-size) / 2);
|
||||
left: 0;
|
||||
top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
|
||||
left: -($custom-control-gutter + $custom-control-indicator-size);
|
||||
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;
|
||||
border: $custom-control-indicator-border-color solid $custom-control-indicator-border-width;
|
||||
@include box-shadow($custom-control-indicator-box-shadow);
|
||||
}
|
||||
|
||||
// Foreground (icon)
|
||||
&::after {
|
||||
position: absolute;
|
||||
top: (($line-height-base - $custom-control-indicator-size) / 2);
|
||||
left: 0;
|
||||
top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
|
||||
left: -($custom-control-gutter + $custom-control-indicator-size);
|
||||
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;
|
||||
background: no-repeat 50% / #{$custom-control-indicator-bg-size};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,9 +110,6 @@
|
||||
}
|
||||
|
||||
.custom-control-input:checked ~ .custom-control-label {
|
||||
&::before {
|
||||
@include gradient-bg($custom-control-indicator-checked-bg);
|
||||
}
|
||||
&::after {
|
||||
background-image: $custom-checkbox-indicator-icon-checked;
|
||||
}
|
||||
@@ -110,6 +117,7 @@
|
||||
|
||||
.custom-control-input:indeterminate ~ .custom-control-label {
|
||||
&::before {
|
||||
border-color: $custom-checkbox-indicator-indeterminate-border-color;
|
||||
@include gradient-bg($custom-checkbox-indicator-indeterminate-bg);
|
||||
@include box-shadow($custom-checkbox-indicator-indeterminate-box-shadow);
|
||||
}
|
||||
@@ -134,13 +142,11 @@
|
||||
|
||||
.custom-radio {
|
||||
.custom-control-label::before {
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-radius: $custom-radio-indicator-border-radius;
|
||||
}
|
||||
|
||||
.custom-control-input:checked ~ .custom-control-label {
|
||||
&::before {
|
||||
@include gradient-bg($custom-control-indicator-checked-bg);
|
||||
}
|
||||
&::after {
|
||||
background-image: $custom-radio-indicator-icon-checked;
|
||||
}
|
||||
@@ -154,10 +160,53 @@
|
||||
}
|
||||
|
||||
|
||||
// switches
|
||||
//
|
||||
// Tweak a few things for switches
|
||||
|
||||
.custom-switch {
|
||||
padding-left: $custom-switch-width + $custom-control-gutter;
|
||||
|
||||
.custom-control-label {
|
||||
&::before {
|
||||
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;
|
||||
}
|
||||
|
||||
&::after {
|
||||
top: calc(#{(($font-size-base * $line-height-base - $custom-control-indicator-size) / 2)} + #{$custom-control-indicator-border-width * 2});
|
||||
left: calc(#{-($custom-switch-width + $custom-control-gutter)} + #{$custom-control-indicator-border-width * 2});
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
.custom-control-input:checked ~ .custom-control-label {
|
||||
&::after {
|
||||
background-color: $custom-control-indicator-bg;
|
||||
transform: translateX($custom-switch-width - $custom-control-indicator-size);
|
||||
}
|
||||
}
|
||||
|
||||
.custom-control-input:disabled {
|
||||
&:checked ~ .custom-control-label::before {
|
||||
background-color: $custom-control-indicator-checked-disabled-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Select
|
||||
//
|
||||
// Replaces the browser default select with a custom one, mostly pulled from
|
||||
// http://primercss.io.
|
||||
// https://primer.github.io/.
|
||||
//
|
||||
|
||||
.custom-select {
|
||||
@@ -165,23 +214,27 @@
|
||||
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;
|
||||
vertical-align: middle;
|
||||
background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center;
|
||||
background-size: $custom-select-bg-size;
|
||||
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;
|
||||
|
||||
&:focus {
|
||||
border-color: $custom-select-focus-border-color;
|
||||
outline: 0;
|
||||
box-shadow: $custom-select-focus-box-shadow;
|
||||
@if $enable-shadows {
|
||||
box-shadow: $custom-select-box-shadow, $custom-select-focus-box-shadow;
|
||||
} @else {
|
||||
box-shadow: $custom-select-focus-box-shadow;
|
||||
}
|
||||
|
||||
&::-ms-value {
|
||||
// For visual consistency with other platforms/browsers,
|
||||
@@ -208,22 +261,24 @@
|
||||
|
||||
// Hides the default caret in IE11
|
||||
&::-ms-expand {
|
||||
opacity: 0;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.custom-select-sm {
|
||||
height: $custom-select-height-sm;
|
||||
padding-top: $custom-select-padding-y;
|
||||
padding-bottom: $custom-select-padding-y;
|
||||
font-size: $custom-select-font-size-sm;
|
||||
padding-top: $custom-select-padding-y-sm;
|
||||
padding-bottom: $custom-select-padding-y-sm;
|
||||
padding-left: $custom-select-padding-x-sm;
|
||||
@include font-size($custom-select-font-size-sm);
|
||||
}
|
||||
|
||||
.custom-select-lg {
|
||||
height: $custom-select-height-lg;
|
||||
padding-top: $custom-select-padding-y;
|
||||
padding-bottom: $custom-select-padding-y;
|
||||
font-size: $custom-select-font-size-lg;
|
||||
padding-top: $custom-select-padding-y-lg;
|
||||
padding-bottom: $custom-select-padding-y-lg;
|
||||
padding-left: $custom-select-padding-x-lg;
|
||||
@include font-size($custom-select-font-size-lg);
|
||||
}
|
||||
|
||||
|
||||
@@ -247,13 +302,13 @@
|
||||
margin: 0;
|
||||
opacity: 0;
|
||||
|
||||
&:focus ~ .custom-file-control {
|
||||
&:focus ~ .custom-file-label {
|
||||
border-color: $custom-file-focus-border-color;
|
||||
box-shadow: $custom-file-focus-box-shadow;
|
||||
}
|
||||
|
||||
&::before {
|
||||
border-color: $custom-file-focus-border-color;
|
||||
}
|
||||
&:disabled ~ .custom-file-label {
|
||||
background-color: $custom-file-disabled-bg;
|
||||
}
|
||||
|
||||
@each $lang, $value in $custom-file-text {
|
||||
@@ -261,6 +316,10 @@
|
||||
content: $value;
|
||||
}
|
||||
}
|
||||
|
||||
~ .custom-file-label[data-browse]::after {
|
||||
content: attr(data-browse);
|
||||
}
|
||||
}
|
||||
|
||||
.custom-file-label {
|
||||
@@ -271,6 +330,8 @@
|
||||
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;
|
||||
background-color: $custom-file-bg;
|
||||
@@ -285,13 +346,162 @@
|
||||
bottom: 0;
|
||||
z-index: 3;
|
||||
display: block;
|
||||
height: calc(#{$custom-file-height} - #{$custom-file-border-width} * 2);
|
||||
height: $custom-file-height-inner;
|
||||
padding: $custom-file-padding-y $custom-file-padding-x;
|
||||
line-height: $custom-file-line-height;
|
||||
color: $custom-file-button-color;
|
||||
content: "Browse";
|
||||
@include gradient-bg($custom-file-button-bg);
|
||||
border-left: $custom-file-border-width solid $custom-file-border-color;
|
||||
border-left: inherit;
|
||||
@include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Range
|
||||
//
|
||||
// Style range inputs the same across browsers. Vendor-specific rules for pseudo
|
||||
// elements cannot be mixed. As such, there are no shared styles for focus or
|
||||
// active states on prefixed selectors.
|
||||
|
||||
.custom-range {
|
||||
width: 100%;
|
||||
height: calc(#{$custom-range-thumb-height} + #{$custom-range-thumb-focus-box-shadow-width * 2});
|
||||
padding: 0; // Need to reset padding
|
||||
background-color: transparent;
|
||||
appearance: none;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
|
||||
// Pseudo-elements must be split across multiple rulesets to have an effect.
|
||||
// No box-shadow() mixin for focus accessibility.
|
||||
&::-webkit-slider-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
||||
&::-moz-range-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
||||
&::-ms-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
|
||||
}
|
||||
|
||||
&::-moz-focus-outer {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
&::-webkit-slider-thumb {
|
||||
width: $custom-range-thumb-width;
|
||||
height: $custom-range-thumb-height;
|
||||
margin-top: ($custom-range-track-height - $custom-range-thumb-height) / 2; // Webkit specific
|
||||
@include gradient-bg($custom-range-thumb-bg);
|
||||
border: $custom-range-thumb-border;
|
||||
@include border-radius($custom-range-thumb-border-radius);
|
||||
@include box-shadow($custom-range-thumb-box-shadow);
|
||||
@include transition($custom-forms-transition);
|
||||
appearance: none;
|
||||
|
||||
&:active {
|
||||
@include gradient-bg($custom-range-thumb-active-bg);
|
||||
}
|
||||
}
|
||||
|
||||
&::-webkit-slider-runnable-track {
|
||||
width: $custom-range-track-width;
|
||||
height: $custom-range-track-height;
|
||||
color: transparent; // Why?
|
||||
cursor: $custom-range-track-cursor;
|
||||
background-color: $custom-range-track-bg;
|
||||
border-color: transparent;
|
||||
@include border-radius($custom-range-track-border-radius);
|
||||
@include box-shadow($custom-range-track-box-shadow);
|
||||
}
|
||||
|
||||
&::-moz-range-thumb {
|
||||
width: $custom-range-thumb-width;
|
||||
height: $custom-range-thumb-height;
|
||||
@include gradient-bg($custom-range-thumb-bg);
|
||||
border: $custom-range-thumb-border;
|
||||
@include border-radius($custom-range-thumb-border-radius);
|
||||
@include box-shadow($custom-range-thumb-box-shadow);
|
||||
@include transition($custom-forms-transition);
|
||||
appearance: none;
|
||||
|
||||
&:active {
|
||||
@include gradient-bg($custom-range-thumb-active-bg);
|
||||
}
|
||||
}
|
||||
|
||||
&::-moz-range-track {
|
||||
width: $custom-range-track-width;
|
||||
height: $custom-range-track-height;
|
||||
color: transparent;
|
||||
cursor: $custom-range-track-cursor;
|
||||
background-color: $custom-range-track-bg;
|
||||
border-color: transparent; // Firefox specific?
|
||||
@include border-radius($custom-range-track-border-radius);
|
||||
@include box-shadow($custom-range-track-box-shadow);
|
||||
}
|
||||
|
||||
&::-ms-thumb {
|
||||
width: $custom-range-thumb-width;
|
||||
height: $custom-range-thumb-height;
|
||||
margin-top: 0; // Edge specific
|
||||
margin-right: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
|
||||
margin-left: $custom-range-thumb-focus-box-shadow-width; // Workaround that overflowed box-shadow is hidden.
|
||||
@include gradient-bg($custom-range-thumb-bg);
|
||||
border: $custom-range-thumb-border;
|
||||
@include border-radius($custom-range-thumb-border-radius);
|
||||
@include box-shadow($custom-range-thumb-box-shadow);
|
||||
@include transition($custom-forms-transition);
|
||||
appearance: none;
|
||||
|
||||
&:active {
|
||||
@include gradient-bg($custom-range-thumb-active-bg);
|
||||
}
|
||||
}
|
||||
|
||||
&::-ms-track {
|
||||
width: $custom-range-track-width;
|
||||
height: $custom-range-track-height;
|
||||
color: transparent;
|
||||
cursor: $custom-range-track-cursor;
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
border-width: $custom-range-thumb-height / 2;
|
||||
@include box-shadow($custom-range-track-box-shadow);
|
||||
}
|
||||
|
||||
&::-ms-fill-lower {
|
||||
background-color: $custom-range-track-bg;
|
||||
@include border-radius($custom-range-track-border-radius);
|
||||
}
|
||||
|
||||
&::-ms-fill-upper {
|
||||
margin-right: 15px; // arbitrary?
|
||||
background-color: $custom-range-track-bg;
|
||||
@include border-radius($custom-range-track-border-radius);
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
&::-webkit-slider-thumb {
|
||||
background-color: $custom-range-thumb-disabled-bg;
|
||||
}
|
||||
|
||||
&::-webkit-slider-runnable-track {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&::-moz-range-thumb {
|
||||
background-color: $custom-range-thumb-disabled-bg;
|
||||
}
|
||||
|
||||
&::-moz-range-track {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&::-ms-thumb {
|
||||
background-color: $custom-range-thumb-disabled-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.custom-control-label::before,
|
||||
.custom-file-label,
|
||||
.custom-select {
|
||||
@include transition($custom-forms-transition);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
// The dropdown wrapper (`<div>`)
|
||||
.dropup,
|
||||
.dropdown {
|
||||
.dropright,
|
||||
.dropdown,
|
||||
.dropleft {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dropdown-toggle {
|
||||
white-space: nowrap;
|
||||
|
||||
// Generate the caret automatically
|
||||
@include caret;
|
||||
}
|
||||
@@ -20,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;
|
||||
@@ -31,10 +35,28 @@
|
||||
@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}-left {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.dropdown-menu#{$infix}-right {
|
||||
right: 0;
|
||||
left: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
||||
// Just add .dropup after the standard .dropdown class and you're set.
|
||||
.dropup {
|
||||
.dropdown-menu {
|
||||
top: auto;
|
||||
bottom: 100%;
|
||||
margin-top: 0;
|
||||
margin-bottom: $dropdown-spacer;
|
||||
}
|
||||
@@ -46,6 +68,9 @@
|
||||
|
||||
.dropright {
|
||||
.dropdown-menu {
|
||||
top: 0;
|
||||
right: auto;
|
||||
left: 100%;
|
||||
margin-top: 0;
|
||||
margin-left: $dropdown-spacer;
|
||||
}
|
||||
@@ -60,6 +85,9 @@
|
||||
|
||||
.dropleft {
|
||||
.dropdown-menu {
|
||||
top: 0;
|
||||
right: 100%;
|
||||
left: auto;
|
||||
margin-top: 0;
|
||||
margin-right: $dropdown-spacer;
|
||||
}
|
||||
@@ -72,9 +100,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
// When enabled Popper.js, reset basic dropdown position
|
||||
// stylelint-disable-next-line no-duplicate-selectors
|
||||
.dropdown-menu {
|
||||
&[x-placement^="top"],
|
||||
&[x-placement^="right"],
|
||||
&[x-placement^="bottom"],
|
||||
&[x-placement^="left"] {
|
||||
right: auto;
|
||||
bottom: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// Dividers (basically an `<hr>`) within the dropdown
|
||||
.dropdown-divider {
|
||||
@include nav-divider($dropdown-divider-bg);
|
||||
@include nav-divider($dropdown-divider-bg, $dropdown-divider-margin-y);
|
||||
}
|
||||
|
||||
// Links, buttons, and more within the dropdown menu
|
||||
@@ -92,6 +132,18 @@
|
||||
background-color: transparent; // For `<button>`s
|
||||
border: 0; // For `<button>`s
|
||||
|
||||
// Prevent dropdown overflow if there's no padding
|
||||
// See https://github.com/twbs/bootstrap/pull/27703
|
||||
@if $dropdown-padding-y == 0 {
|
||||
&:first-child {
|
||||
@include border-top-radius($dropdown-inner-border-radius);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
@include border-bottom-radius($dropdown-inner-border-radius);
|
||||
}
|
||||
}
|
||||
|
||||
@include hover-focus {
|
||||
color: $dropdown-link-hover-color;
|
||||
text-decoration: none;
|
||||
@@ -108,6 +160,7 @@
|
||||
&.disabled,
|
||||
&:disabled {
|
||||
color: $dropdown-link-disabled-color;
|
||||
pointer-events: none;
|
||||
background-color: transparent;
|
||||
// Remove CSS gradients if they're enabled
|
||||
@if $enable-gradients {
|
||||
@@ -125,7 +178,14 @@
|
||||
display: block;
|
||||
padding: $dropdown-padding-y $dropdown-item-padding-x;
|
||||
margin-bottom: 0; // for use with heading elements
|
||||
font-size: $font-size-sm;
|
||||
@include font-size($font-size-sm);
|
||||
color: $dropdown-header-color;
|
||||
white-space: nowrap; // as with > li > a
|
||||
}
|
||||
|
||||
// Dropdown text
|
||||
.dropdown-item-text {
|
||||
display: block;
|
||||
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
|
||||
color: $dropdown-link-color;
|
||||
}
|
||||
|
||||
@@ -7,8 +7,11 @@
|
||||
.form-control {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: $input-height;
|
||||
padding: $input-padding-y $input-padding-x;
|
||||
font-size: $font-size-base;
|
||||
font-family: $input-font-family;
|
||||
@include font-size($input-font-size);
|
||||
font-weight: $input-font-weight;
|
||||
line-height: $input-line-height;
|
||||
color: $input-color;
|
||||
background-color: $input-bg;
|
||||
@@ -16,13 +19,7 @@
|
||||
border: $input-border-width solid $input-border-color;
|
||||
|
||||
// Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
|
||||
@if $enable-rounded {
|
||||
// Manually use the if/else instead of the mixin to account for iOS override
|
||||
border-radius: $input-border-radius;
|
||||
} @else {
|
||||
// Otherwise undo the iOS default
|
||||
border-radius: 0;
|
||||
}
|
||||
@include border-radius($input-border-radius, 0);
|
||||
|
||||
@include box-shadow($input-box-shadow);
|
||||
@include transition($input-transition);
|
||||
@@ -57,10 +54,6 @@
|
||||
}
|
||||
|
||||
select.form-control {
|
||||
&:not([size]):not([multiple]) {
|
||||
height: $input-height;
|
||||
}
|
||||
|
||||
&:focus::-ms-value {
|
||||
// Suppress the nested default white text on blue background highlight given to
|
||||
// the selected option text when the (still closed) <select> receives focus
|
||||
@@ -90,21 +83,21 @@ select.form-control {
|
||||
padding-top: calc(#{$input-padding-y} + #{$input-border-width});
|
||||
padding-bottom: calc(#{$input-padding-y} + #{$input-border-width});
|
||||
margin-bottom: 0; // Override the `<label>/<legend>` default
|
||||
font-size: inherit; // Override the `<legend>` default
|
||||
@include font-size(inherit); // Override the `<legend>` default
|
||||
line-height: $input-line-height;
|
||||
}
|
||||
|
||||
.col-form-label-lg {
|
||||
padding-top: calc(#{$input-padding-y-lg} + #{$input-border-width});
|
||||
padding-bottom: calc(#{$input-padding-y-lg} + #{$input-border-width});
|
||||
font-size: $font-size-lg;
|
||||
@include font-size($input-font-size-lg);
|
||||
line-height: $input-line-height-lg;
|
||||
}
|
||||
|
||||
.col-form-label-sm {
|
||||
padding-top: calc(#{$input-padding-y-sm} + #{$input-border-width});
|
||||
padding-bottom: calc(#{$input-padding-y-sm} + #{$input-border-width});
|
||||
font-size: $font-size-sm;
|
||||
@include font-size($input-font-size-sm);
|
||||
line-height: $input-line-height-sm;
|
||||
}
|
||||
|
||||
@@ -121,6 +114,7 @@ select.form-control {
|
||||
padding-bottom: $input-padding-y;
|
||||
margin-bottom: 0; // match inputs if this class comes on inputs with default margins
|
||||
line-height: $input-line-height;
|
||||
color: $input-plaintext-color;
|
||||
background-color: transparent;
|
||||
border: solid transparent;
|
||||
border-width: $input-border-width 0;
|
||||
@@ -138,35 +132,35 @@ select.form-control {
|
||||
// Build on `.form-control` with modifier classes to decrease or increase the
|
||||
// height and font-size of form controls.
|
||||
//
|
||||
// The `.form-group-* form-control` variations are sadly duplicated to avoid the
|
||||
// issue documented in https://github.com/twbs/bootstrap/issues/15074.
|
||||
// Repeated in `_input_group.scss` to avoid Sass extend issues.
|
||||
|
||||
.form-control-sm {
|
||||
height: $input-height-sm;
|
||||
padding: $input-padding-y-sm $input-padding-x-sm;
|
||||
font-size: $font-size-sm;
|
||||
@include font-size($input-font-size-sm);
|
||||
line-height: $input-line-height-sm;
|
||||
@include border-radius($input-border-radius-sm);
|
||||
}
|
||||
|
||||
select.form-control-sm {
|
||||
&:not([size]):not([multiple]) {
|
||||
height: $input-height-sm;
|
||||
}
|
||||
}
|
||||
|
||||
.form-control-lg {
|
||||
height: $input-height-lg;
|
||||
padding: $input-padding-y-lg $input-padding-x-lg;
|
||||
font-size: $font-size-lg;
|
||||
@include font-size($input-font-size-lg);
|
||||
line-height: $input-line-height-lg;
|
||||
@include border-radius($input-border-radius-lg);
|
||||
}
|
||||
|
||||
select.form-control-lg {
|
||||
&:not([size]):not([multiple]) {
|
||||
height: $input-height-lg;
|
||||
// stylelint-disable-next-line no-duplicate-selectors
|
||||
select.form-control {
|
||||
&[size],
|
||||
&[multiple] {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
textarea.form-control {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
// Form groups
|
||||
//
|
||||
@@ -190,13 +184,13 @@ select.form-control-lg {
|
||||
.form-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-right: -5px;
|
||||
margin-left: -5px;
|
||||
margin-right: -$form-grid-gutter-width / 2;
|
||||
margin-left: -$form-grid-gutter-width / 2;
|
||||
|
||||
> .col,
|
||||
> [class*="col-"] {
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
padding-right: $form-grid-gutter-width / 2;
|
||||
padding-left: $form-grid-gutter-width / 2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,8 +242,9 @@ select.form-control-lg {
|
||||
// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
|
||||
// server side validation.
|
||||
|
||||
@include form-validation-state("valid", $form-feedback-valid-color);
|
||||
@include form-validation-state("invalid", $form-feedback-invalid-color);
|
||||
@each $state, $data in $form-validation-states {
|
||||
@include form-validation-state($state, map-get($data, color), map-get($data, icon));
|
||||
}
|
||||
|
||||
// Inline forms
|
||||
//
|
||||
@@ -302,7 +297,8 @@ select.form-control-lg {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
.input-group,
|
||||
.custom-select {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
@@ -317,6 +313,7 @@ select.form-control-lg {
|
||||
}
|
||||
.form-check-input {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
margin-top: 0;
|
||||
margin-right: $form-check-input-margin-x;
|
||||
margin-left: 0;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Bootstrap functions
|
||||
//
|
||||
// Utility mixins and functions for evalutating source code across our variables, maps, and mixins.
|
||||
// Utility mixins and functions for evaluating source code across our variables, maps, and mixins.
|
||||
|
||||
// Ascending
|
||||
// Used to evaluate Sass maps like our grid breakpoints.
|
||||
@@ -8,7 +8,7 @@
|
||||
$prev-key: null;
|
||||
$prev-num: null;
|
||||
@each $key, $num in $map {
|
||||
@if $prev-num == null {
|
||||
@if $prev-num == null or unit($num) == "%" {
|
||||
// Do nothing
|
||||
} @else if not comparable($prev-num, $num) {
|
||||
@warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
|
||||
@@ -21,12 +21,12 @@
|
||||
}
|
||||
|
||||
// Starts at zero
|
||||
// Another grid mixin that ensures the min-width of the lowest breakpoint starts at 0.
|
||||
@mixin _assert-starts-at-zero($map) {
|
||||
// Used to ensure the min-width of the lowest breakpoint starts at 0.
|
||||
@mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") {
|
||||
$values: map-values($map);
|
||||
$first-value: nth($values, 1);
|
||||
@if $first-value != 0 {
|
||||
@warn "First breakpoint in `$grid-breakpoints` must start at 0, but starts at #{$first-value}.";
|
||||
@warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
}
|
||||
|
||||
// Color contrast
|
||||
@function color-yiq($color) {
|
||||
@function color-yiq($color, $dark: $yiq-text-dark, $light: $yiq-text-light) {
|
||||
$r: red($color);
|
||||
$g: green($color);
|
||||
$b: blue($color);
|
||||
@@ -57,9 +57,9 @@
|
||||
$yiq: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
|
||||
|
||||
@if ($yiq >= $yiq-contrasted-threshold) {
|
||||
@return $yiq-text-dark;
|
||||
@return $dark;
|
||||
} @else {
|
||||
@return $yiq-text-light;
|
||||
@return $light;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
// Request a theme color level
|
||||
@function theme-color-level($color-name: "primary", $level: 0) {
|
||||
$color: theme-color($color-name);
|
||||
$color-base: if($level > 0, #000, #fff);
|
||||
$color-base: if($level > 0, $black, $white);
|
||||
$level: abs($level);
|
||||
|
||||
@return mix($color-base, $color, $level * $theme-color-interval);
|
||||
|
||||
@@ -32,11 +32,11 @@
|
||||
}
|
||||
|
||||
.figure-img {
|
||||
margin-bottom: ($spacer / 2);
|
||||
margin-bottom: $spacer / 2;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.figure-caption {
|
||||
font-size: $figure-caption-font-size;
|
||||
@include font-size($figure-caption-font-size);
|
||||
color: $figure-caption-color;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
width: 100%;
|
||||
|
||||
> .form-control,
|
||||
> .form-control-plaintext,
|
||||
> .custom-select,
|
||||
> .custom-file {
|
||||
position: relative; // For focus state's z-index
|
||||
@@ -21,11 +22,6 @@
|
||||
width: 1%;
|
||||
margin-bottom: 0;
|
||||
|
||||
// Bring the "active" form control to the top of surrounding elements
|
||||
&:focus {
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
+ .form-control,
|
||||
+ .custom-select,
|
||||
+ .custom-file {
|
||||
@@ -33,6 +29,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Bring the "active" form control to the top of surrounding elements
|
||||
> .form-control:focus,
|
||||
> .custom-select:focus,
|
||||
> .custom-file .custom-file-input:focus ~ .custom-file-label {
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
// Bring the custom file input above the label
|
||||
> .custom-file .custom-file-input:focus {
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
> .form-control,
|
||||
> .custom-select {
|
||||
&:not(:last-child) { @include border-right-radius(0); }
|
||||
@@ -46,9 +54,8 @@
|
||||
align-items: center;
|
||||
|
||||
&:not(:last-child) .custom-file-label,
|
||||
&:not(:last-child) .custom-file-label::before { @include border-right-radius(0); }
|
||||
&:not(:first-child) .custom-file-label,
|
||||
&:not(:first-child) .custom-file-label::before { @include border-left-radius(0); }
|
||||
&:not(:last-child) .custom-file-label::after { @include border-right-radius(0); }
|
||||
&:not(:first-child) .custom-file-label { @include border-left-radius(0); }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +76,10 @@
|
||||
.btn {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
|
||||
&:focus {
|
||||
z-index: 3;
|
||||
}
|
||||
}
|
||||
|
||||
.btn + .btn,
|
||||
@@ -93,7 +104,7 @@
|
||||
align-items: center;
|
||||
padding: $input-padding-y $input-padding-x;
|
||||
margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom
|
||||
font-size: $font-size-base; // Match inputs
|
||||
@include font-size($input-font-size); // Match inputs
|
||||
font-weight: $font-weight-normal;
|
||||
line-height: $input-line-height;
|
||||
color: $input-group-addon-color;
|
||||
@@ -116,20 +127,43 @@
|
||||
// Remix the default form control sizing classes into new ones for easier
|
||||
// manipulation.
|
||||
|
||||
.input-group-lg > .form-control:not(textarea),
|
||||
.input-group-lg > .custom-select {
|
||||
height: $input-height-lg;
|
||||
}
|
||||
|
||||
.input-group-lg > .form-control,
|
||||
.input-group-lg > .custom-select,
|
||||
.input-group-lg > .input-group-prepend > .input-group-text,
|
||||
.input-group-lg > .input-group-append > .input-group-text,
|
||||
.input-group-lg > .input-group-prepend > .btn,
|
||||
.input-group-lg > .input-group-append > .btn {
|
||||
@extend .form-control-lg;
|
||||
padding: $input-padding-y-lg $input-padding-x-lg;
|
||||
@include font-size($input-font-size-lg);
|
||||
line-height: $input-line-height-lg;
|
||||
@include border-radius($input-border-radius-lg);
|
||||
}
|
||||
|
||||
.input-group-sm > .form-control:not(textarea),
|
||||
.input-group-sm > .custom-select {
|
||||
height: $input-height-sm;
|
||||
}
|
||||
|
||||
.input-group-sm > .form-control,
|
||||
.input-group-sm > .custom-select,
|
||||
.input-group-sm > .input-group-prepend > .input-group-text,
|
||||
.input-group-sm > .input-group-append > .input-group-text,
|
||||
.input-group-sm > .input-group-prepend > .btn,
|
||||
.input-group-sm > .input-group-append > .btn {
|
||||
@extend .form-control-sm;
|
||||
padding: $input-padding-y-sm $input-padding-x-sm;
|
||||
@include font-size($input-font-size-sm);
|
||||
line-height: $input-line-height-sm;
|
||||
@include border-radius($input-border-radius-sm);
|
||||
}
|
||||
|
||||
.input-group-lg > .custom-select,
|
||||
.input-group-sm > .custom-select {
|
||||
padding-right: $custom-select-padding-x + $custom-select-indicator-padding;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
.jumbotron {
|
||||
padding: $jumbotron-padding ($jumbotron-padding / 2);
|
||||
margin-bottom: $jumbotron-padding;
|
||||
color: $jumbotron-color;
|
||||
background-color: $jumbotron-bg;
|
||||
@include border-radius($border-radius-lg);
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
// Hover state
|
||||
@include hover-focus {
|
||||
z-index: 1; // Place hover/focus items above their siblings for proper border styling
|
||||
color: $list-group-action-hover-color;
|
||||
text-decoration: none;
|
||||
background-color: $list-group-hover-bg;
|
||||
@@ -46,6 +47,7 @@
|
||||
padding: $list-group-item-padding-y $list-group-item-padding-x;
|
||||
// Place the border on the list items and negative margin up for better styling
|
||||
margin-bottom: -$list-group-border-width;
|
||||
color: $list-group-color;
|
||||
background-color: $list-group-bg;
|
||||
border: $list-group-border-width solid $list-group-border-color;
|
||||
|
||||
@@ -58,14 +60,10 @@
|
||||
@include border-bottom-radius($list-group-border-radius);
|
||||
}
|
||||
|
||||
@include hover-focus {
|
||||
z-index: 1; // Place hover/active items above their siblings for proper border styling
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&.disabled,
|
||||
&:disabled {
|
||||
color: $list-group-disabled-color;
|
||||
pointer-events: none;
|
||||
background-color: $list-group-disabled-bg;
|
||||
}
|
||||
|
||||
@@ -79,6 +77,37 @@
|
||||
}
|
||||
|
||||
|
||||
// Horizontal
|
||||
//
|
||||
// Change the layout of list group items from vertical (default) to horizontal.
|
||||
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
||||
|
||||
.list-group-horizontal#{$infix} {
|
||||
flex-direction: row;
|
||||
|
||||
.list-group-item {
|
||||
margin-right: -$list-group-border-width;
|
||||
margin-bottom: 0;
|
||||
|
||||
&:first-child {
|
||||
@include border-left-radius($list-group-border-radius);
|
||||
@include border-top-right-radius(0);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
@include border-right-radius($list-group-border-radius);
|
||||
@include border-bottom-left-radius(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Flush list items
|
||||
//
|
||||
// Remove borders and border-radius to keep list group items edge-to-edge. Most
|
||||
@@ -89,6 +118,10 @@
|
||||
border-right: 0;
|
||||
border-left: 0;
|
||||
@include border-radius(0);
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: -$list-group-border-width;
|
||||
}
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
@@ -99,6 +132,7 @@
|
||||
|
||||
&:last-child {
|
||||
.list-group-item:last-child {
|
||||
margin-bottom: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
//
|
||||
// Used in conjunction with global variables to enable certain theme features.
|
||||
|
||||
// Vendor
|
||||
@import "vendor/rfs";
|
||||
|
||||
// Deprecate
|
||||
@import "mixins/deprecate";
|
||||
|
||||
// Utilities
|
||||
@import "mixins/breakpoints";
|
||||
@import "mixins/hover";
|
||||
@@ -36,7 +42,6 @@
|
||||
|
||||
// // Layout
|
||||
@import "mixins/clearfix";
|
||||
// @import "mixins/navbar-align";
|
||||
@import "mixins/grid-framework";
|
||||
@import "mixins/grid";
|
||||
@import "mixins/float";
|
||||
|
||||
@@ -4,20 +4,25 @@
|
||||
// .modal-content - actual modal w/ bg and corners and stuff
|
||||
|
||||
|
||||
// Kill the scroll on the body
|
||||
.modal-open {
|
||||
// Kill the scroll on the body
|
||||
overflow: hidden;
|
||||
|
||||
.modal {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// Container that the modal scrolls within
|
||||
.modal {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: $zindex-modal;
|
||||
display: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
// Prevent Chrome on Windows from adding a focus outline. For details, see
|
||||
// https://github.com/twbs/bootstrap/pull/10951.
|
||||
@@ -25,11 +30,6 @@
|
||||
// We deliberately don't use `-webkit-overflow-scrolling: touch;` due to a
|
||||
// gnarly iOS Safari bug: https://bugs.webkit.org/show_bug.cgi?id=158342
|
||||
// See also https://github.com/twbs/bootstrap/issues/17695
|
||||
|
||||
.modal-open & {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// Shell div to position the modal with bottom padding
|
||||
@@ -43,17 +43,58 @@
|
||||
// When fading in the modal, animate it to slide down
|
||||
.modal.fade & {
|
||||
@include transition($modal-transition);
|
||||
transform: translate(0, -25%);
|
||||
transform: $modal-fade-transform;
|
||||
}
|
||||
.modal.show & {
|
||||
transform: translate(0, 0);
|
||||
transform: $modal-show-transform;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-dialog-scrollable {
|
||||
display: flex; // IE10/11
|
||||
max-height: calc(100% - #{$modal-dialog-margin * 2});
|
||||
|
||||
.modal-content {
|
||||
max-height: calc(100vh - #{$modal-dialog-margin * 2}); // IE10/11
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.modal-header,
|
||||
.modal-footer {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-dialog-centered {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: calc(100% - (#{$modal-dialog-margin} * 2));
|
||||
min-height: calc(100% - #{$modal-dialog-margin * 2});
|
||||
|
||||
// Ensure `modal-dialog-centered` extends the full height of the view (IE10/11)
|
||||
&::before {
|
||||
display: block; // IE10
|
||||
height: calc(100vh - #{$modal-dialog-margin * 2});
|
||||
content: "";
|
||||
}
|
||||
|
||||
// Ensure `.modal-body` shows scrollbar (IE10/11)
|
||||
&.modal-dialog-scrollable {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
.modal-content {
|
||||
max-height: none;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Actual modal
|
||||
@@ -63,11 +104,12 @@
|
||||
flex-direction: column;
|
||||
width: 100%; // Ensure `.modal-content` extends the full width of the parent `.modal-dialog`
|
||||
// counteract the pointer-events: none; in the .modal-dialog
|
||||
color: $modal-content-color;
|
||||
pointer-events: auto;
|
||||
background-color: $modal-content-bg;
|
||||
background-clip: padding-box;
|
||||
border: $modal-content-border-width solid $modal-content-border-color;
|
||||
@include border-radius($border-radius-lg);
|
||||
@include border-radius($modal-content-border-radius);
|
||||
@include box-shadow($modal-content-box-shadow-xs);
|
||||
// Remove focus outline from opened modal
|
||||
outline: 0;
|
||||
@@ -77,10 +119,10 @@
|
||||
.modal-backdrop {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: $zindex-modal-backdrop;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: $modal-backdrop-bg;
|
||||
|
||||
// Fade for backdrop
|
||||
@@ -96,12 +138,12 @@
|
||||
justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
|
||||
padding: $modal-header-padding;
|
||||
border-bottom: $modal-header-border-width solid $modal-header-border-color;
|
||||
@include border-top-radius($border-radius-lg);
|
||||
@include border-top-radius($modal-content-border-radius);
|
||||
|
||||
.close {
|
||||
padding: $modal-header-padding;
|
||||
// auto on the left force icon to the right even when there is no .modal-title
|
||||
margin: (-$modal-header-padding) (-$modal-header-padding) (-$modal-header-padding) auto;
|
||||
margin: (-$modal-header-padding-y) (-$modal-header-padding-x) (-$modal-header-padding-y) auto;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,6 +170,7 @@
|
||||
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
|
||||
padding: $modal-inner-padding;
|
||||
border-top: $modal-footer-border-width solid $modal-footer-border-color;
|
||||
@include border-bottom-radius($modal-content-border-radius);
|
||||
|
||||
// Easily place margin between footer elements
|
||||
> :not(:first-child) { margin-left: .25rem; }
|
||||
@@ -151,8 +194,20 @@
|
||||
margin: $modal-dialog-margin-y-sm-up auto;
|
||||
}
|
||||
|
||||
.modal-dialog-scrollable {
|
||||
max-height: calc(100% - #{$modal-dialog-margin-y-sm-up * 2});
|
||||
|
||||
.modal-content {
|
||||
max-height: calc(100vh - #{$modal-dialog-margin-y-sm-up * 2});
|
||||
}
|
||||
}
|
||||
|
||||
.modal-dialog-centered {
|
||||
min-height: calc(100% - (#{$modal-dialog-margin-y-sm-up} * 2));
|
||||
min-height: calc(100% - #{$modal-dialog-margin-y-sm-up * 2});
|
||||
|
||||
&::before {
|
||||
height: calc(100vh - #{$modal-dialog-margin-y-sm-up * 2});
|
||||
}
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
@@ -160,9 +215,15 @@
|
||||
}
|
||||
|
||||
.modal-sm { max-width: $modal-sm; }
|
||||
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(lg) {
|
||||
.modal-lg { max-width: $modal-lg; }
|
||||
.modal-lg,
|
||||
.modal-xl {
|
||||
max-width: $modal-lg;
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-up(xl) {
|
||||
.modal-xl { max-width: $modal-xl; }
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
// Disabled state lightens text
|
||||
&.disabled {
|
||||
color: $nav-link-disabled-color;
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
padding: $navbar-padding-y $navbar-padding-x;
|
||||
|
||||
// Because flex properties aren't inherited, we need to redeclare these first
|
||||
// few properities so that content nested within behave properly.
|
||||
// few properties so that content nested within behave properly.
|
||||
> .container,
|
||||
> .container-fluid {
|
||||
display: flex;
|
||||
@@ -44,7 +44,7 @@
|
||||
padding-top: $navbar-brand-padding-y;
|
||||
padding-bottom: $navbar-brand-padding-y;
|
||||
margin-right: $navbar-padding-x;
|
||||
font-size: $navbar-brand-font-size;
|
||||
@include font-size($navbar-brand-font-size);
|
||||
line-height: inherit;
|
||||
white-space: nowrap;
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
// Powered by the collapse Bootstrap JavaScript plugin.
|
||||
|
||||
// When collapsed, prevent the toggleable navbar contents from appearing in
|
||||
// the default flexbox row orienation. Requires the use of `flex-wrap: wrap`
|
||||
// the default flexbox row orientation. Requires the use of `flex-wrap: wrap`
|
||||
// on the `.navbar` parent.
|
||||
.navbar-collapse {
|
||||
flex-basis: 100%;
|
||||
@@ -107,7 +107,7 @@
|
||||
// Button for toggling the navbar when in its collapsed state
|
||||
.navbar-toggler {
|
||||
padding: $navbar-toggler-padding-y $navbar-toggler-padding-x;
|
||||
font-size: $navbar-toggler-font-size;
|
||||
@include font-size($navbar-toggler-font-size);
|
||||
line-height: 1;
|
||||
background-color: transparent; // remove default button style
|
||||
border: $border-width solid transparent; // remove default button style
|
||||
@@ -116,11 +116,6 @@
|
||||
@include hover-focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
// Opinionated: add "hand" cursor to non-disabled .navbar-toggler elements
|
||||
&:not(:disabled):not(.disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
// Keep as a separate element so folks can easily override it with another icon
|
||||
@@ -162,11 +157,6 @@
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.dropdown-menu-right {
|
||||
right: 0;
|
||||
left: auto; // Reset the default from `.dropdown-menu`
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
padding-right: $navbar-nav-link-padding-x;
|
||||
padding-left: $navbar-nav-link-padding-x;
|
||||
@@ -180,7 +170,7 @@
|
||||
}
|
||||
|
||||
.navbar-collapse {
|
||||
display: flex !important; // stylelint-disable-line declaration-no-important
|
||||
display: flex !important; // stylelint-disable-line declaration-no-important
|
||||
|
||||
// Changes flex-bases to auto because of an IE10 bug
|
||||
flex-basis: auto;
|
||||
@@ -189,13 +179,6 @@
|
||||
.navbar-toggler {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dropup {
|
||||
.dropdown-menu {
|
||||
top: auto;
|
||||
bottom: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,10 +192,10 @@
|
||||
// Dark links against a light background
|
||||
.navbar-light {
|
||||
.navbar-brand {
|
||||
color: $navbar-light-active-color;
|
||||
color: $navbar-light-brand-color;
|
||||
|
||||
@include hover-focus {
|
||||
color: $navbar-light-active-color;
|
||||
color: $navbar-light-brand-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,10 +244,10 @@
|
||||
// White links against a dark background
|
||||
.navbar-dark {
|
||||
.navbar-brand {
|
||||
color: $navbar-dark-active-color;
|
||||
color: $navbar-dark-brand-color;
|
||||
|
||||
@include hover-focus {
|
||||
color: $navbar-dark-active-color;
|
||||
color: $navbar-dark-brand-hover-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
border: $pagination-border-width solid $pagination-border-color;
|
||||
|
||||
&:hover {
|
||||
z-index: 2;
|
||||
color: $pagination-hover-color;
|
||||
text-decoration: none;
|
||||
background-color: $pagination-hover-bg;
|
||||
@@ -23,14 +24,9 @@
|
||||
|
||||
&:focus {
|
||||
z-index: 2;
|
||||
outline: 0;
|
||||
outline: $pagination-focus-outline;
|
||||
box-shadow: $pagination-focus-box-shadow;
|
||||
}
|
||||
|
||||
// Opinionated: add "hand" cursor to non-disabled .page-link elements
|
||||
&:not(:disabled):not(.disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.page-item {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
/* rtl:begin:ignore */
|
||||
|
||||
.popover {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
// left: 0; This line is disabled because it hides the popovers in RTL mode.
|
||||
z-index: $zindex-popover;
|
||||
display: block;
|
||||
max-width: $popover-max-width;
|
||||
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
|
||||
// So reset our font and text properties to avoid inheriting weird values.
|
||||
@include reset-text();
|
||||
font-size: $popover-font-size;
|
||||
@include font-size($popover-font-size);
|
||||
// Allow breaking very long words so they don't overflow the popover's bounds
|
||||
word-wrap: break-word;
|
||||
background-color: $popover-bg;
|
||||
@@ -17,7 +17,6 @@
|
||||
border: $popover-border-width solid $popover-border-color;
|
||||
@include border-radius($popover-border-radius);
|
||||
@include box-shadow($popover-box-shadow);
|
||||
|
||||
.arrow {
|
||||
position: absolute;
|
||||
display: block;
|
||||
@@ -39,72 +38,63 @@
|
||||
.bs-popover-top {
|
||||
margin-bottom: $popover-arrow-height;
|
||||
|
||||
.arrow {
|
||||
> .arrow {
|
||||
bottom: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
|
||||
}
|
||||
|
||||
.arrow::before,
|
||||
.arrow::after {
|
||||
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
}
|
||||
&::before {
|
||||
bottom: 0;
|
||||
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
border-top-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
.arrow::before {
|
||||
bottom: 0;
|
||||
border-top-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
.arrow::after {
|
||||
bottom: $popover-border-width;
|
||||
border-top-color: $popover-arrow-color;
|
||||
&::after {
|
||||
bottom: $popover-border-width;
|
||||
border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
border-top-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bs-popover-right {
|
||||
margin-left: $popover-arrow-height;
|
||||
|
||||
.arrow {
|
||||
> .arrow {
|
||||
left: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
|
||||
width: $popover-arrow-height;
|
||||
height: $popover-arrow-width;
|
||||
margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
|
||||
}
|
||||
|
||||
.arrow::before,
|
||||
.arrow::after {
|
||||
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
}
|
||||
&::before {
|
||||
left: 0;
|
||||
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
border-right-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
.arrow::before {
|
||||
left: 0;
|
||||
border-right-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
.arrow::after {
|
||||
left: $popover-border-width;
|
||||
border-right-color: $popover-arrow-color;
|
||||
&::after {
|
||||
left: $popover-border-width;
|
||||
border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
|
||||
border-right-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bs-popover-bottom {
|
||||
margin-top: $popover-arrow-height;
|
||||
|
||||
.arrow {
|
||||
> .arrow {
|
||||
top: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
|
||||
}
|
||||
|
||||
.arrow::before,
|
||||
.arrow::after {
|
||||
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
|
||||
}
|
||||
&::before {
|
||||
top: 0;
|
||||
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
|
||||
border-bottom-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
.arrow::before {
|
||||
top: 0;
|
||||
border-bottom-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
.arrow::after {
|
||||
top: $popover-border-width;
|
||||
border-bottom-color: $popover-arrow-color;
|
||||
&::after {
|
||||
top: $popover-border-width;
|
||||
border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
|
||||
border-bottom-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
|
||||
// This will remove the popover-header's border just below the arrow
|
||||
@@ -114,7 +104,7 @@
|
||||
left: 50%;
|
||||
display: block;
|
||||
width: $popover-arrow-width;
|
||||
margin-left: ($popover-arrow-width / -2);
|
||||
margin-left: -$popover-arrow-width / 2;
|
||||
content: "";
|
||||
border-bottom: $popover-border-width solid $popover-header-bg;
|
||||
}
|
||||
@@ -123,26 +113,23 @@
|
||||
.bs-popover-left {
|
||||
margin-right: $popover-arrow-height;
|
||||
|
||||
.arrow {
|
||||
> .arrow {
|
||||
right: calc((#{$popover-arrow-height} + #{$popover-border-width}) * -1);
|
||||
width: $popover-arrow-height;
|
||||
height: $popover-arrow-width;
|
||||
margin: $border-radius-lg 0; // make sure the arrow does not touch the popover's rounded corners
|
||||
}
|
||||
|
||||
.arrow::before,
|
||||
.arrow::after {
|
||||
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
|
||||
}
|
||||
&::before {
|
||||
right: 0;
|
||||
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
|
||||
border-left-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
.arrow::before {
|
||||
right: 0;
|
||||
border-left-color: $popover-arrow-outer-color;
|
||||
}
|
||||
|
||||
.arrow::after {
|
||||
right: $popover-border-width;
|
||||
border-left-color: $popover-arrow-color;
|
||||
&::after {
|
||||
right: $popover-border-width;
|
||||
border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
|
||||
border-left-color: $popover-arrow-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,7 +153,7 @@
|
||||
.popover-header {
|
||||
padding: $popover-header-padding-y $popover-header-padding-x;
|
||||
margin-bottom: 0; // Reset the default from Reboot
|
||||
font-size: $font-size-base;
|
||||
@include font-size($font-size-base);
|
||||
color: $popover-header-color;
|
||||
background-color: $popover-header-bg;
|
||||
border-bottom: $popover-border-width solid darken($popover-header-bg, 5%);
|
||||
@@ -182,4 +169,3 @@
|
||||
padding: $popover-body-padding-y $popover-body-padding-x;
|
||||
color: $popover-body-color;
|
||||
}
|
||||
/* rtl:end:ignore */
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// ==========================================================================
|
||||
// Print styles.
|
||||
// Inlined to avoid the additional HTTP request:
|
||||
// http://www.phpied.com/delay-loading-your-print-css/
|
||||
// https://www.phpied.com/delay-loading-your-print-css/
|
||||
// ==========================================================================
|
||||
|
||||
@if $enable-print-styles {
|
||||
@@ -14,7 +14,7 @@
|
||||
*::before,
|
||||
*::after {
|
||||
// Bootstrap specific; comment out `color` and `background`
|
||||
//color: #000 !important; // Black prints faster: http://www.sanbeiji.com/archives/953
|
||||
//color: $black !important; // Black prints faster
|
||||
text-shadow: none !important;
|
||||
//background: transparent !important;
|
||||
box-shadow: none !important;
|
||||
@@ -51,7 +51,7 @@
|
||||
}
|
||||
pre,
|
||||
blockquote {
|
||||
border: $border-width solid #999; // Bootstrap custom code; using `$border-width` instead of 1px
|
||||
border: $border-width solid $gray-500; // Bootstrap custom code; using `$border-width` instead of 1px
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
display: none;
|
||||
}
|
||||
.badge {
|
||||
border: $border-width solid #000;
|
||||
border: $border-width solid $black;
|
||||
}
|
||||
|
||||
.table {
|
||||
@@ -109,16 +109,33 @@
|
||||
|
||||
td,
|
||||
th {
|
||||
background-color: #fff !important;
|
||||
background-color: $white !important;
|
||||
}
|
||||
}
|
||||
|
||||
.table-bordered {
|
||||
th,
|
||||
td {
|
||||
border: 1px solid #ddd !important;
|
||||
border: 1px solid $gray-300 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.table-dark {
|
||||
color: inherit;
|
||||
|
||||
th,
|
||||
td,
|
||||
thead th,
|
||||
tbody + tbody {
|
||||
border-color: $table-border-color;
|
||||
}
|
||||
}
|
||||
|
||||
.table .thead-dark th {
|
||||
color: inherit;
|
||||
border-color: $table-border-color;
|
||||
}
|
||||
|
||||
// Bootstrap specific changes end
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
@keyframes progress-bar-stripes {
|
||||
from { background-position: $progress-height 0; }
|
||||
to { background-position: 0 0; }
|
||||
// Disable animation if transitions are disabled
|
||||
@if $enable-transitions {
|
||||
@keyframes progress-bar-stripes {
|
||||
from { background-position: $progress-height 0; }
|
||||
to { background-position: 0 0; }
|
||||
}
|
||||
}
|
||||
|
||||
.progress {
|
||||
display: flex;
|
||||
height: $progress-height;
|
||||
overflow: hidden; // force rounded corners by cropping it
|
||||
font-size: $progress-font-size;
|
||||
@include font-size($progress-font-size);
|
||||
background-color: $progress-bg;
|
||||
@include border-radius($progress-border-radius);
|
||||
@include box-shadow($progress-box-shadow);
|
||||
@@ -19,6 +22,7 @@
|
||||
justify-content: center;
|
||||
color: $progress-bar-color;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
background-color: $progress-bar-bg;
|
||||
@include transition($progress-bar-transition);
|
||||
}
|
||||
@@ -28,6 +32,12 @@
|
||||
background-size: $progress-height $progress-height;
|
||||
}
|
||||
|
||||
.progress-bar-animated {
|
||||
animation: progress-bar-stripes $progress-bar-animation-timing;
|
||||
@if $enable-transitions {
|
||||
.progress-bar-animated {
|
||||
animation: progress-bar-stripes $progress-bar-animation-timing;
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
// 2. Change the default font family in all browsers.
|
||||
// 3. Correct the line height in all browsers.
|
||||
// 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
|
||||
// 5. Setting @viewport causes scrollbars to overlap content in IE11 and Edge, so
|
||||
// we force a non-overlapping, non-auto-hiding scrollbar to counteract.
|
||||
// 6. Change the default tap highlight to be completely transparent in iOS.
|
||||
// 5. Change the default tap highlight to be completely transparent in iOS.
|
||||
|
||||
*,
|
||||
*::before,
|
||||
@@ -28,36 +26,27 @@ html {
|
||||
font-family: sans-serif; // 2
|
||||
line-height: 1.15; // 3
|
||||
-webkit-text-size-adjust: 100%; // 4
|
||||
-ms-text-size-adjust: 100%; // 4
|
||||
-ms-overflow-style: scrollbar; // 5
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); // 6
|
||||
-webkit-tap-highlight-color: rgba($black, 0); // 5
|
||||
}
|
||||
|
||||
// IE10+ doesn't honor `<meta name="viewport">` in some cases.
|
||||
@at-root {
|
||||
@-ms-viewport {
|
||||
width: device-width;
|
||||
}
|
||||
}
|
||||
|
||||
// stylelint-disable selector-list-comma-newline-after
|
||||
// Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
|
||||
article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||
// TODO: remove in v5
|
||||
// stylelint-disable-next-line selector-list-comma-newline-after
|
||||
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||
display: block;
|
||||
}
|
||||
// stylelint-enable selector-list-comma-newline-after
|
||||
|
||||
// Body
|
||||
//
|
||||
// 1. Remove the margin in all browsers.
|
||||
// 2. As a best practice, apply a default `background-color`.
|
||||
// 3. Set an explicit initial text-align value so that we can later use the
|
||||
// 3. Set an explicit initial text-align value so that we can later use
|
||||
// the `inherit` value on things like `<th>` elements.
|
||||
|
||||
body {
|
||||
margin: 0; // 1
|
||||
font-family: $font-family-base;
|
||||
font-size: $font-size-base;
|
||||
@include font-size($font-size-base);
|
||||
font-weight: $font-weight-base;
|
||||
line-height: $line-height-base;
|
||||
color: $body-color;
|
||||
@@ -95,12 +84,11 @@ hr {
|
||||
//
|
||||
// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
|
||||
// margin for easier control within type scales as it avoids margin collapsing.
|
||||
// stylelint-disable selector-list-comma-newline-after
|
||||
// stylelint-disable-next-line selector-list-comma-newline-after
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: 0;
|
||||
margin-bottom: $headings-margin-bottom;
|
||||
}
|
||||
// stylelint-enable selector-list-comma-newline-after
|
||||
|
||||
// Reset margins on paragraphs
|
||||
//
|
||||
@@ -113,17 +101,19 @@ p {
|
||||
|
||||
// Abbreviations
|
||||
//
|
||||
// 1. Remove the bottom border in Firefox 39-.
|
||||
// 1. Duplicate behavior to the data-* attribute for our tooltip plugin
|
||||
// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
// 3. Add explicit cursor to indicate changed behavior.
|
||||
// 4. Duplicate behavior to the data-* attribute for our tooltip plugin
|
||||
// 4. Remove the bottom border in Firefox 39-.
|
||||
// 5. Prevent the text-decoration to be skipped.
|
||||
|
||||
abbr[title],
|
||||
abbr[data-original-title] { // 4
|
||||
abbr[data-original-title] { // 1
|
||||
text-decoration: underline; // 2
|
||||
text-decoration: underline dotted; // 2
|
||||
cursor: help; // 3
|
||||
border-bottom: 0; // 1
|
||||
border-bottom: 0; // 4
|
||||
text-decoration-skip-ink: none; // 5
|
||||
}
|
||||
|
||||
address {
|
||||
@@ -159,19 +149,13 @@ blockquote {
|
||||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
dfn {
|
||||
font-style: italic; // Add the correct font style in Android 4.3-
|
||||
}
|
||||
|
||||
// stylelint-disable font-weight-notation
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder; // Add the correct font weight in Chrome, Edge, and Safari
|
||||
font-weight: $font-weight-bolder; // Add the correct font weight in Chrome, Edge, and Safari
|
||||
}
|
||||
// stylelint-enable font-weight-notation
|
||||
|
||||
small {
|
||||
font-size: 80%; // Add the correct font size in all browsers
|
||||
@include font-size(80%); // Add the correct font size in all browsers
|
||||
}
|
||||
|
||||
//
|
||||
@@ -182,7 +166,7 @@ small {
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
font-size: 75%;
|
||||
@include font-size(75%);
|
||||
line-height: 0;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
@@ -199,7 +183,6 @@ a {
|
||||
color: $link-color;
|
||||
text-decoration: $link-decoration;
|
||||
background-color: transparent; // Remove the gray background on active links in IE 10.
|
||||
-webkit-text-decoration-skip: objects; // Remove gaps in links underline in iOS 8+ and Safari 8+.
|
||||
|
||||
@include hover {
|
||||
color: $link-hover-color;
|
||||
@@ -232,15 +215,13 @@ a:not([href]):not([tabindex]) {
|
||||
// Code
|
||||
//
|
||||
|
||||
// stylelint-disable font-family-no-duplicate-names
|
||||
pre,
|
||||
code,
|
||||
kbd,
|
||||
samp {
|
||||
font-family: monospace, monospace; // Correct the inheritance and scaling of font size in all browsers.
|
||||
font-size: 1em; // Correct the odd `em` font sizing in all browsers.
|
||||
font-family: $font-family-monospace;
|
||||
@include font-size(1em); // Correct the odd `em` font sizing in all browsers.
|
||||
}
|
||||
// stylelint-enable font-family-no-duplicate-names
|
||||
|
||||
pre {
|
||||
// Remove browser default top margin
|
||||
@@ -249,9 +230,6 @@ pre {
|
||||
margin-bottom: 1rem;
|
||||
// Don't allow content to break outside
|
||||
overflow: auto;
|
||||
// We have @viewport set which causes scrollbars to overlap content in IE11 and Edge, so
|
||||
// we force a non-overlapping, non-auto-hiding scrollbar to counteract.
|
||||
-ms-overflow-style: scrollbar;
|
||||
}
|
||||
|
||||
|
||||
@@ -274,8 +252,11 @@ img {
|
||||
border-style: none; // Remove the border on images inside links in IE 10-.
|
||||
}
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden; // Hide the overflow in IE
|
||||
svg {
|
||||
// Workaround for the SVG overflow bug in IE10/11 is still required.
|
||||
// See https://github.com/twbs/bootstrap/issues/26878
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
@@ -290,7 +271,7 @@ table {
|
||||
caption {
|
||||
padding-top: $table-cell-padding;
|
||||
padding-bottom: $table-cell-padding;
|
||||
color: $text-muted;
|
||||
color: $table-caption-color;
|
||||
text-align: left;
|
||||
caption-side: bottom;
|
||||
}
|
||||
@@ -309,13 +290,14 @@ th {
|
||||
label {
|
||||
// Allow labels to use `margin` for spacing.
|
||||
display: inline-block;
|
||||
margin-bottom: .5rem;
|
||||
margin-bottom: $label-margin-bottom;
|
||||
}
|
||||
|
||||
// Remove the default `border-radius` that macOS Chrome adds.
|
||||
//
|
||||
// Details at https://github.com/twbs/bootstrap/issues/24093
|
||||
button {
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
@@ -335,7 +317,7 @@ optgroup,
|
||||
textarea {
|
||||
margin: 0; // Remove the margin in Firefox and Safari
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
@include font-size(inherit);
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
@@ -349,16 +331,36 @@ select {
|
||||
text-transform: none; // Remove the inheritance of text transform in Firefox
|
||||
}
|
||||
|
||||
// Remove the inheritance of word-wrap in Safari.
|
||||
//
|
||||
// Details at https://github.com/twbs/bootstrap/issues/24990
|
||||
select {
|
||||
word-wrap: normal;
|
||||
}
|
||||
|
||||
|
||||
// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
||||
// controls in Android 4.
|
||||
// 2. Correct the inability to style clickable types in iOS and Safari.
|
||||
button,
|
||||
html [type="button"], // 1
|
||||
[type="button"], // 1
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button; // 2
|
||||
}
|
||||
|
||||
// Opinionated: add "hand" cursor to non-disabled button elements.
|
||||
@if $enable-pointer-cursor-for-buttons {
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
&:not(:disabled) {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
@@ -414,7 +416,7 @@ legend {
|
||||
max-width: 100%; // 1
|
||||
padding: 0;
|
||||
margin-bottom: .5rem;
|
||||
font-size: 1.5rem;
|
||||
@include font-size(1.5rem);
|
||||
line-height: inherit;
|
||||
color: inherit; // 2
|
||||
white-space: normal; // 1
|
||||
@@ -440,10 +442,9 @@ progress {
|
||||
}
|
||||
|
||||
//
|
||||
// Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
|
||||
// Remove the inner padding in Chrome and Safari on macOS.
|
||||
//
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// Rotating border
|
||||
//
|
||||
|
||||
@keyframes spinner-border {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.spinner-border {
|
||||
display: inline-block;
|
||||
width: $spinner-width;
|
||||
height: $spinner-height;
|
||||
vertical-align: text-bottom;
|
||||
border: $spinner-border-width solid currentColor;
|
||||
border-right-color: transparent;
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-radius: 50%;
|
||||
animation: spinner-border .75s linear infinite;
|
||||
}
|
||||
|
||||
.spinner-border-sm {
|
||||
width: $spinner-width-sm;
|
||||
height: $spinner-height-sm;
|
||||
border-width: $spinner-border-width-sm;
|
||||
}
|
||||
|
||||
//
|
||||
// Growing circle
|
||||
//
|
||||
|
||||
@keyframes spinner-grow {
|
||||
0% {
|
||||
transform: scale(0);
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.spinner-grow {
|
||||
display: inline-block;
|
||||
width: $spinner-width;
|
||||
height: $spinner-height;
|
||||
vertical-align: text-bottom;
|
||||
background-color: currentColor;
|
||||
// stylelint-disable-next-line property-blacklist
|
||||
border-radius: 50%;
|
||||
opacity: 0;
|
||||
animation: spinner-grow .75s linear infinite;
|
||||
}
|
||||
|
||||
.spinner-grow-sm {
|
||||
width: $spinner-width-sm;
|
||||
height: $spinner-height-sm;
|
||||
}
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
.table {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
margin-bottom: $spacer;
|
||||
color: $table-color;
|
||||
background-color: $table-bg; // Reset for nesting within parents with `background-color`.
|
||||
|
||||
th,
|
||||
@@ -23,10 +23,6 @@
|
||||
tbody + tbody {
|
||||
border-top: (2 * $table-border-width) solid $table-border-color;
|
||||
}
|
||||
|
||||
.table {
|
||||
background-color: $body-bg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,9 +38,9 @@
|
||||
}
|
||||
|
||||
|
||||
// Bordered version
|
||||
// Border versions
|
||||
//
|
||||
// Add borders all around the table and between all the columns.
|
||||
// Add or remove borders all around the table and between all the columns.
|
||||
|
||||
.table-bordered {
|
||||
border: $table-border-width solid $table-border-color;
|
||||
@@ -57,18 +53,26 @@
|
||||
thead {
|
||||
th,
|
||||
td {
|
||||
border-bottom-width: (2 * $table-border-width);
|
||||
border-bottom-width: 2 * $table-border-width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table-borderless {
|
||||
th,
|
||||
td,
|
||||
thead th,
|
||||
tbody + tbody {
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Zebra-striping
|
||||
//
|
||||
// Default zebra-stripe styles (alternating gray and transparent backgrounds)
|
||||
|
||||
.table-striped {
|
||||
tbody tr:nth-of-type(odd) {
|
||||
tbody tr:nth-of-type(#{$table-striped-order}) {
|
||||
background-color: $table-accent-bg;
|
||||
}
|
||||
}
|
||||
@@ -81,6 +85,7 @@
|
||||
.table-hover {
|
||||
tbody tr {
|
||||
@include hover {
|
||||
color: $table-hover-color;
|
||||
background-color: $table-hover-bg;
|
||||
}
|
||||
}
|
||||
@@ -93,7 +98,7 @@
|
||||
// inheritance to nested tables.
|
||||
|
||||
@each $color, $value in $theme-colors {
|
||||
@include table-row-variant($color, theme-color-level($color, -9));
|
||||
@include table-row-variant($color, theme-color-level($color, $table-bg-level), theme-color-level($color, $table-border-level));
|
||||
}
|
||||
|
||||
@include table-row-variant(active, $table-active-bg);
|
||||
@@ -145,6 +150,7 @@
|
||||
&.table-hover {
|
||||
tbody tr {
|
||||
@include hover {
|
||||
color: $table-dark-hover-color;
|
||||
background-color: $table-dark-hover-bg;
|
||||
}
|
||||
}
|
||||
@@ -168,7 +174,6 @@
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
-ms-overflow-style: -ms-autohiding-scrollbar; // See https://github.com/twbs/bootstrap/pull/10057
|
||||
|
||||
// Prevent double border on horizontal scroll due to use of `display: block;`
|
||||
> .table-bordered {
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
.toast {
|
||||
max-width: $toast-max-width;
|
||||
overflow: hidden; // cheap rounded corners on nested items
|
||||
@include font-size($toast-font-size);
|
||||
color: $toast-color;
|
||||
background-color: $toast-background-color;
|
||||
background-clip: padding-box;
|
||||
border: $toast-border-width solid $toast-border-color;
|
||||
box-shadow: $toast-box-shadow;
|
||||
backdrop-filter: blur(10px);
|
||||
opacity: 0;
|
||||
@include border-radius($toast-border-radius);
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-bottom: $toast-padding-x;
|
||||
}
|
||||
|
||||
&.showing {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&.show {
|
||||
display: block;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&.hide {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.toast-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: $toast-padding-y $toast-padding-x;
|
||||
color: $toast-header-color;
|
||||
background-color: $toast-header-background-color;
|
||||
background-clip: padding-box;
|
||||
border-bottom: $toast-border-width solid $toast-header-border-color;
|
||||
}
|
||||
|
||||
.toast-body {
|
||||
padding: $toast-padding-x; // apply to both vertical and horizontal
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
|
||||
// So reset our font and text properties to avoid inheriting weird values.
|
||||
@include reset-text();
|
||||
font-size: $tooltip-font-size;
|
||||
@include font-size($tooltip-font-size);
|
||||
// Allow breaking very long words so they don't overflow the tooltip's bounds
|
||||
word-wrap: break-word;
|
||||
opacity: 0;
|
||||
|
||||
@@ -1,30 +1,14 @@
|
||||
// stylelint-disable selector-no-qualifying-type
|
||||
|
||||
.fade {
|
||||
opacity: 0;
|
||||
@include transition($transition-fade);
|
||||
|
||||
&.show {
|
||||
opacity: 1;
|
||||
&:not(.show) {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.collapse {
|
||||
display: none;
|
||||
&.show {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
tr {
|
||||
&.collapse.show {
|
||||
display: table-row;
|
||||
}
|
||||
}
|
||||
|
||||
tbody {
|
||||
&.collapse.show {
|
||||
display: table-row-group;
|
||||
&:not(.show) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,36 +13,36 @@ h1, h2, h3, h4, h5, h6,
|
||||
color: $headings-color;
|
||||
}
|
||||
|
||||
h1, .h1 { font-size: $h1-font-size; }
|
||||
h2, .h2 { font-size: $h2-font-size; }
|
||||
h3, .h3 { font-size: $h3-font-size; }
|
||||
h4, .h4 { font-size: $h4-font-size; }
|
||||
h5, .h5 { font-size: $h5-font-size; }
|
||||
h6, .h6 { font-size: $h6-font-size; }
|
||||
h1, .h1 { @include font-size($h1-font-size); }
|
||||
h2, .h2 { @include font-size($h2-font-size); }
|
||||
h3, .h3 { @include font-size($h3-font-size); }
|
||||
h4, .h4 { @include font-size($h4-font-size); }
|
||||
h5, .h5 { @include font-size($h5-font-size); }
|
||||
h6, .h6 { @include font-size($h6-font-size); }
|
||||
|
||||
.lead {
|
||||
font-size: $lead-font-size;
|
||||
@include font-size($lead-font-size);
|
||||
font-weight: $lead-font-weight;
|
||||
}
|
||||
|
||||
// Type display classes
|
||||
.display-1 {
|
||||
font-size: $display1-size;
|
||||
@include font-size($display1-size);
|
||||
font-weight: $display1-weight;
|
||||
line-height: $display-line-height;
|
||||
}
|
||||
.display-2 {
|
||||
font-size: $display2-size;
|
||||
@include font-size($display2-size);
|
||||
font-weight: $display2-weight;
|
||||
line-height: $display-line-height;
|
||||
}
|
||||
.display-3 {
|
||||
font-size: $display3-size;
|
||||
@include font-size($display3-size);
|
||||
font-weight: $display3-weight;
|
||||
line-height: $display-line-height;
|
||||
}
|
||||
.display-4 {
|
||||
font-size: $display4-size;
|
||||
@include font-size($display4-size);
|
||||
font-weight: $display4-weight;
|
||||
line-height: $display-line-height;
|
||||
}
|
||||
@@ -66,7 +66,7 @@ hr {
|
||||
|
||||
small,
|
||||
.small {
|
||||
font-size: $small-font-size;
|
||||
@include font-size($small-font-size);
|
||||
font-weight: $font-weight-normal;
|
||||
}
|
||||
|
||||
@@ -104,22 +104,22 @@ mark,
|
||||
|
||||
// Builds on `abbr`
|
||||
.initialism {
|
||||
font-size: 90%;
|
||||
@include font-size(90%);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
// Blockquotes
|
||||
.blockquote {
|
||||
margin-bottom: $spacer;
|
||||
font-size: $blockquote-font-size;
|
||||
@include font-size($blockquote-font-size);
|
||||
}
|
||||
|
||||
.blockquote-footer {
|
||||
display: block;
|
||||
font-size: 80%; // back to default font-size
|
||||
@include font-size($blockquote-small-font-size);
|
||||
color: $blockquote-small-color;
|
||||
|
||||
&::before {
|
||||
content: "\2014 \00A0"; // em dash, nbsp
|
||||
content: "\2014\00A0"; // em dash, nbsp
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,9 +6,12 @@
|
||||
@import "utilities/embed";
|
||||
@import "utilities/flex";
|
||||
@import "utilities/float";
|
||||
@import "utilities/overflow";
|
||||
@import "utilities/position";
|
||||
@import "utilities/screenreaders";
|
||||
@import "utilities/shadows";
|
||||
@import "utilities/sizing";
|
||||
@import "utilities/stretched-link";
|
||||
@import "utilities/spacing";
|
||||
@import "utilities/text";
|
||||
@import "utilities/visibility";
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+4
-7
@@ -1,14 +1,10 @@
|
||||
/*!
|
||||
* Bootstrap Grid v4.0.0 (https://getbootstrap.com)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Bootstrap Grid v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors
|
||||
* Copyright 2011-2019 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
@at-root {
|
||||
@-ms-viewport { width: device-width; } // stylelint-disable-line at-rule-no-vendor-prefix
|
||||
}
|
||||
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
-ms-overflow-style: scrollbar;
|
||||
@@ -30,3 +26,4 @@ html {
|
||||
@import "grid";
|
||||
@import "utilities/display";
|
||||
@import "utilities/flex";
|
||||
@import "utilities/spacing";
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v4.0.0 (https://getbootstrap.com)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors
|
||||
* Copyright 2011-2019 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
|
||||
+5
-3
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap v4.0.0 (https://getbootstrap.com)
|
||||
* Copyright 2011-2018 The Bootstrap Authors
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Bootstrap v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors
|
||||
* Copyright 2011-2019 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
@@ -34,9 +34,11 @@
|
||||
@import "media";
|
||||
@import "list-group";
|
||||
@import "close";
|
||||
@import "toasts";
|
||||
@import "modal";
|
||||
@import "tooltip";
|
||||
@import "popover";
|
||||
@import "carousel";
|
||||
@import "spinners";
|
||||
@import "utilities";
|
||||
@import "print";
|
||||
|
||||
@@ -5,8 +5,13 @@
|
||||
&[href] {
|
||||
@include hover-focus {
|
||||
color: color-yiq($bg);
|
||||
text-decoration: none;
|
||||
background-color: darken($bg, 10%);
|
||||
}
|
||||
|
||||
&:focus,
|
||||
&.focus {
|
||||
outline: 0;
|
||||
box-shadow: 0 0 0 $badge-focus-width rgba($bg, .5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
// stylelint-disable property-blacklist
|
||||
// Single side border-radius
|
||||
|
||||
@mixin border-radius($radius: $border-radius) {
|
||||
@mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
|
||||
@if $enable-rounded {
|
||||
border-radius: $radius;
|
||||
}
|
||||
@else if $fallback-border-radius != false {
|
||||
border-radius: $fallback-border-radius;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-top-radius($radius) {
|
||||
@@ -33,3 +37,27 @@
|
||||
border-bottom-left-radius: $radius;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-top-left-radius($radius) {
|
||||
@if $enable-rounded {
|
||||
border-top-left-radius: $radius;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-top-right-radius($radius) {
|
||||
@if $enable-rounded {
|
||||
border-top-right-radius: $radius;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-bottom-right-radius($radius) {
|
||||
@if $enable-rounded {
|
||||
border-bottom-right-radius: $radius;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin border-bottom-left-radius($radius) {
|
||||
@if $enable-rounded {
|
||||
border-bottom-left-radius: $radius;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
@mixin box-shadow($shadow...) {
|
||||
@if $enable-shadows {
|
||||
box-shadow: $shadow;
|
||||
$result: ();
|
||||
|
||||
@if (length($shadow) == 1) {
|
||||
// We can pass `@include box-shadow(none);`
|
||||
$result: $shadow;
|
||||
} @else {
|
||||
// Filter to avoid invalid properties for example `box-shadow: none, 1px 1px black;`
|
||||
@for $i from 1 through length($shadow) {
|
||||
@if nth($shadow, $i) != "none" {
|
||||
$result: append($result, nth($shadow, $i), "comma");
|
||||
}
|
||||
}
|
||||
}
|
||||
@if (length($result) > 0) {
|
||||
box-shadow: $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// md
|
||||
@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
|
||||
$n: index($breakpoint-names, $name);
|
||||
@return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
|
||||
@return if($n != null and $n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
|
||||
}
|
||||
|
||||
// Minimum breakpoint width. Null for the smallest (first) breakpoint.
|
||||
@@ -39,10 +39,10 @@
|
||||
// 767.98px
|
||||
@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
|
||||
$next: breakpoint-next($name, $breakpoints);
|
||||
@return if($next, breakpoint-min($next, $breakpoints) - .02px, null);
|
||||
@return if($next, breakpoint-min($next, $breakpoints) - .02, null);
|
||||
}
|
||||
|
||||
// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash infront.
|
||||
// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
|
||||
// Useful for making responsive utilities.
|
||||
//
|
||||
// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
&.focus {
|
||||
// Avoid using mixin so we can pass custom focus shadow properly
|
||||
@if $enable-shadows {
|
||||
box-shadow: $btn-box-shadow, 0 0 0 $btn-focus-width rgba($border, .5);
|
||||
box-shadow: $btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
|
||||
} @else {
|
||||
box-shadow: 0 0 0 $btn-focus-width rgba($border, .5);
|
||||
box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
color: color-yiq($background);
|
||||
background-color: $background;
|
||||
border-color: $border;
|
||||
// Remove CSS gradients if they're enabled
|
||||
@if $enable-gradients {
|
||||
background-image: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(:disabled):not(.disabled):active,
|
||||
@@ -45,10 +49,10 @@
|
||||
|
||||
&:focus {
|
||||
// Avoid using mixin so we can pass custom focus shadow properly
|
||||
@if $enable-shadows {
|
||||
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($border, .5);
|
||||
@if $enable-shadows and $btn-active-box-shadow != none {
|
||||
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
|
||||
} @else {
|
||||
box-shadow: 0 0 0 $btn-focus-width rgba($border, .5);
|
||||
box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,11 +60,9 @@
|
||||
|
||||
@mixin button-outline-variant($color, $color-hover: color-yiq($color), $active-background: $color, $active-border: $color) {
|
||||
color: $color;
|
||||
background-color: transparent;
|
||||
background-image: none;
|
||||
border-color: $color;
|
||||
|
||||
&:hover {
|
||||
@include hover {
|
||||
color: $color-hover;
|
||||
background-color: $active-background;
|
||||
border-color: $active-border;
|
||||
@@ -98,12 +100,8 @@
|
||||
// Button sizes
|
||||
@mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
|
||||
padding: $padding-y $padding-x;
|
||||
font-size: $font-size;
|
||||
@include font-size($font-size);
|
||||
line-height: $line-height;
|
||||
// Manually declare to provide an override to the browser default
|
||||
@if $enable-rounded {
|
||||
border-radius: $border-radius;
|
||||
} @else {
|
||||
border-radius: 0;
|
||||
}
|
||||
@include border-radius($border-radius, 0);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
@mixin caret-right {
|
||||
border-top: $caret-width solid transparent;
|
||||
border-right: 0;
|
||||
border-bottom: $caret-width solid transparent;
|
||||
border-left: $caret-width solid;
|
||||
}
|
||||
@@ -28,10 +29,8 @@
|
||||
@if $enable-caret {
|
||||
&::after {
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin-left: $caret-width * .85;
|
||||
vertical-align: $caret-width * .85;
|
||||
margin-left: $caret-spacing;
|
||||
vertical-align: $caret-vertical-align;
|
||||
content: "";
|
||||
@if $direction == down {
|
||||
@include caret-down;
|
||||
@@ -49,10 +48,8 @@
|
||||
|
||||
&::before {
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin-right: $caret-width * .85;
|
||||
vertical-align: $caret-width * .85;
|
||||
margin-right: $caret-spacing;
|
||||
vertical-align: $caret-vertical-align;
|
||||
content: "";
|
||||
@include caret-left;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// Deprecate mixin
|
||||
//
|
||||
// This mixin can be used to deprecate mixins or functions.
|
||||
// `$enable-deprecation-messages` is a global variable, `$ignore-warning` is a variable that can be passed to
|
||||
// some deprecated mixins to suppress the warning (for example if the mixin is still be used in the current version of Bootstrap)
|
||||
@mixin deprecate($name, $deprecate-version, $remove-version, $ignore-warning: false) {
|
||||
@if ($enable-deprecation-messages != false and $ignore-warning != true) {
|
||||
@warn "#{$name} has been deprecated as of #{$deprecate-version}. It will be removed entirely in #{$remove-version}.";
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,13 @@
|
||||
|
||||
@mixin float-left {
|
||||
float: left !important;
|
||||
@include deprecate("The `float-left` mixin", "v4.3.0", "v5");
|
||||
}
|
||||
@mixin float-right {
|
||||
float: right !important;
|
||||
@include deprecate("The `float-right` mixin", "v4.3.0", "v5");
|
||||
}
|
||||
@mixin float-none {
|
||||
float: none !important;
|
||||
@include deprecate("The `float-none` mixin", "v4.3.0", "v5");
|
||||
}
|
||||
|
||||
@@ -26,12 +26,12 @@
|
||||
}
|
||||
|
||||
|
||||
@mixin form-validation-state($state, $color) {
|
||||
@mixin form-validation-state($state, $color, $icon) {
|
||||
.#{$state}-feedback {
|
||||
display: none;
|
||||
width: 100%;
|
||||
margin-top: $form-feedback-margin-top;
|
||||
font-size: $form-feedback-font-size;
|
||||
@include font-size($form-feedback-font-size);
|
||||
color: $color;
|
||||
}
|
||||
|
||||
@@ -41,21 +41,28 @@
|
||||
z-index: 5;
|
||||
display: none;
|
||||
max-width: 100%; // Contain to parent when possible
|
||||
padding: .5rem;
|
||||
padding: $form-feedback-tooltip-padding-y $form-feedback-tooltip-padding-x;
|
||||
margin-top: .1rem;
|
||||
font-size: .875rem;
|
||||
line-height: 1;
|
||||
color: #fff;
|
||||
background-color: rgba($color, .8);
|
||||
border-radius: .2rem;
|
||||
@include font-size($form-feedback-tooltip-font-size);
|
||||
line-height: $form-feedback-tooltip-line-height;
|
||||
color: color-yiq($color);
|
||||
background-color: rgba($color, $form-feedback-tooltip-opacity);
|
||||
@include border-radius($form-feedback-tooltip-border-radius);
|
||||
}
|
||||
|
||||
.form-control,
|
||||
.custom-select {
|
||||
.form-control {
|
||||
.was-validated &:#{$state},
|
||||
&.is-#{$state} {
|
||||
border-color: $color;
|
||||
|
||||
@if $enable-validation-icons {
|
||||
padding-right: $input-height-inner;
|
||||
background-image: $icon;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center right $input-height-inner-quarter;
|
||||
background-size: $input-height-inner-half $input-height-inner-half;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border-color: $color;
|
||||
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
|
||||
@@ -68,6 +75,50 @@
|
||||
}
|
||||
}
|
||||
|
||||
// stylelint-disable-next-line selector-no-qualifying-type
|
||||
textarea.form-control {
|
||||
.was-validated &:#{$state},
|
||||
&.is-#{$state} {
|
||||
@if $enable-validation-icons {
|
||||
padding-right: $input-height-inner;
|
||||
background-position: top $input-height-inner-quarter right $input-height-inner-quarter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.custom-select {
|
||||
.was-validated &:#{$state},
|
||||
&.is-#{$state} {
|
||||
border-color: $color;
|
||||
|
||||
@if $enable-validation-icons {
|
||||
padding-right: $custom-select-feedback-icon-padding-right;
|
||||
background: $custom-select-background, $icon $custom-select-bg no-repeat $custom-select-feedback-icon-position / $custom-select-feedback-icon-size;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
border-color: $color;
|
||||
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
|
||||
}
|
||||
|
||||
~ .#{$state}-feedback,
|
||||
~ .#{$state}-tooltip {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.form-control-file {
|
||||
.was-validated &:#{$state},
|
||||
&.is-#{$state} {
|
||||
~ .#{$state}-feedback,
|
||||
~ .#{$state}-tooltip {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-check-input {
|
||||
.was-validated &:#{$state},
|
||||
&.is-#{$state} {
|
||||
@@ -89,7 +140,7 @@
|
||||
color: $color;
|
||||
|
||||
&::before {
|
||||
background-color: lighten($color, 25%);
|
||||
border-color: $color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,13 +151,18 @@
|
||||
|
||||
&:checked {
|
||||
~ .custom-control-label::before {
|
||||
border-color: lighten($color, 10%);
|
||||
@include gradient-bg(lighten($color, 10%));
|
||||
}
|
||||
}
|
||||
|
||||
&:focus {
|
||||
~ .custom-control-label::before {
|
||||
box-shadow: 0 0 0 1px $body-bg, 0 0 0 $input-focus-width rgba($color, .25);
|
||||
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
|
||||
}
|
||||
|
||||
&:not(:checked) ~ .custom-control-label::before {
|
||||
border-color: $color;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,8 +174,6 @@
|
||||
&.is-#{$state} {
|
||||
~ .custom-file-label {
|
||||
border-color: $color;
|
||||
|
||||
&::before { border-color: inherit; }
|
||||
}
|
||||
|
||||
~ .#{$state}-feedback,
|
||||
@@ -129,6 +183,7 @@
|
||||
|
||||
&:focus {
|
||||
~ .custom-file-label {
|
||||
border-color: $color;
|
||||
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
// Horizontal gradient, from left to right
|
||||
//
|
||||
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
||||
@mixin gradient-x($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
||||
@mixin gradient-x($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
|
||||
background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
@@ -19,27 +19,27 @@
|
||||
// Vertical gradient, from top to bottom
|
||||
//
|
||||
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
||||
@mixin gradient-y($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
||||
@mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
|
||||
background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
|
||||
@mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
|
||||
@mixin gradient-directional($start-color: $gray-700, $end-color: $gray-800, $deg: 45deg) {
|
||||
background-image: linear-gradient($deg, $start-color, $end-color);
|
||||
background-repeat: repeat-x;
|
||||
}
|
||||
@mixin gradient-x-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
|
||||
@mixin gradient-x-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
|
||||
background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
@mixin gradient-y-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
|
||||
@mixin gradient-y-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
|
||||
background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
@mixin gradient-radial($inner-color: #555, $outer-color: #333) {
|
||||
@mixin gradient-radial($inner-color: $gray-700, $outer-color: $gray-800) {
|
||||
background-image: radial-gradient(circle, $inner-color, $outer-color);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
@mixin gradient-striped($color: rgba(255,255,255,.15), $angle: 45deg) {
|
||||
@mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) {
|
||||
background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
||||
}
|
||||
|
||||
@@ -8,9 +8,8 @@
|
||||
%grid-column {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
min-height: 1px; // Prevent columns from collapsing when empty
|
||||
padding-right: ($gutter / 2);
|
||||
padding-left: ($gutter / 2);
|
||||
padding-right: $gutter / 2;
|
||||
padding-left: $gutter / 2;
|
||||
}
|
||||
|
||||
@each $breakpoint in map-keys($breakpoints) {
|
||||
@@ -37,7 +36,7 @@
|
||||
.col#{$infix}-auto {
|
||||
flex: 0 0 auto;
|
||||
width: auto;
|
||||
max-width: none; // Reset earlier grid tiers
|
||||
max-width: 100%; // Reset earlier grid tiers
|
||||
}
|
||||
|
||||
@for $i from 1 through $columns {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user