1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00
This commit is contained in:
XhmikosR 2019-04-18 14:47:52 +03:00 committed by GitHub
parent 5c5b15a077
commit 091aa1e9fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 2632 additions and 2060 deletions

File diff suppressed because one or more lines are too long

View file

@ -33,7 +33,7 @@ body {
background-color: #fff;
}
[tabindex="-1"]:focus {
[tabindex="-1"]:focus:not(:focus-visible) {
outline: 0 !important;
}

File diff suppressed because one or more lines are too long

View file

@ -4,5 +4,5 @@
* 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)
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */

File diff suppressed because one or more lines are too long

View file

@ -63,7 +63,7 @@ body {
background-color: #fff;
}
[tabindex="-1"]:focus {
[tabindex="-1"]:focus:not(:focus-visible) {
outline: 0 !important;
}
@ -1876,7 +1876,7 @@ textarea.form-control {
margin-left: -1.25rem;
}
.form-check-input:disabled ~ .form-check-label {
.form-check-input[disabled] ~ .form-check-label {
color: #6c757d;
}
@ -2260,6 +2260,9 @@ fieldset:disabled a.btn {
}
.btn-primary:focus, .btn-primary.focus {
color: #fff;
background-color: #0069d9;
border-color: #0062cc;
box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);
}
@ -2294,6 +2297,9 @@ fieldset:disabled a.btn {
}
.btn-secondary:focus, .btn-secondary.focus {
color: #fff;
background-color: #5a6268;
border-color: #545b62;
box-shadow: 0 0 0 0.2rem rgba(130, 138, 145, 0.5);
}
@ -2328,6 +2334,9 @@ fieldset:disabled a.btn {
}
.btn-success:focus, .btn-success.focus {
color: #fff;
background-color: #218838;
border-color: #1e7e34;
box-shadow: 0 0 0 0.2rem rgba(72, 180, 97, 0.5);
}
@ -2362,6 +2371,9 @@ fieldset:disabled a.btn {
}
.btn-info:focus, .btn-info.focus {
color: #fff;
background-color: #138496;
border-color: #117a8b;
box-shadow: 0 0 0 0.2rem rgba(58, 176, 195, 0.5);
}
@ -2396,6 +2408,9 @@ fieldset:disabled a.btn {
}
.btn-warning:focus, .btn-warning.focus {
color: #212529;
background-color: #e0a800;
border-color: #d39e00;
box-shadow: 0 0 0 0.2rem rgba(222, 170, 12, 0.5);
}
@ -2430,6 +2445,9 @@ fieldset:disabled a.btn {
}
.btn-danger:focus, .btn-danger.focus {
color: #fff;
background-color: #c82333;
border-color: #bd2130;
box-shadow: 0 0 0 0.2rem rgba(225, 83, 97, 0.5);
}
@ -2464,6 +2482,9 @@ fieldset:disabled a.btn {
}
.btn-light:focus, .btn-light.focus {
color: #212529;
background-color: #e2e6ea;
border-color: #dae0e5;
box-shadow: 0 0 0 0.2rem rgba(216, 217, 219, 0.5);
}
@ -2498,6 +2519,9 @@ fieldset:disabled a.btn {
}
.btn-dark:focus, .btn-dark.focus {
color: #fff;
background-color: #23272b;
border-color: #1d2124;
box-shadow: 0 0 0 0.2rem rgba(82, 88, 93, 0.5);
}
@ -3447,11 +3471,11 @@ input[type="button"].btn-block {
border-color: #b3d7ff;
}
.custom-control-input:disabled ~ .custom-control-label {
.custom-control-input[disabled] ~ .custom-control-label {
color: #6c757d;
}
.custom-control-input:disabled ~ .custom-control-label::before {
.custom-control-input[disabled] ~ .custom-control-label::before {
background-color: #e9ecef;
}
@ -3644,7 +3668,7 @@ input[type="button"].btn-block {
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
.custom-file-input:disabled ~ .custom-file-label {
.custom-file-input[disabled] ~ .custom-file-label {
background-color: #e9ecef;
}
@ -4569,6 +4593,10 @@ input[type="button"].btn-block {
content: "/";
}
.breadcrumb-item + .breadcrumb-item:hover::before {
text-decoration: underline;
}
.breadcrumb-item + .breadcrumb-item:hover::before {
text-decoration: none;
}
@ -4669,25 +4697,15 @@ input[type="button"].btn-block {
.badge {
display: inline-block;
padding: 0.25em 0.4em;
padding: 0.25em 0.5em;
font-size: 75%;
font-weight: 700;
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: 0.25rem;
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
.badge {
transition: none;
}
}
a.badge:hover, a.badge:focus {
text-decoration: none;
}
.badge:empty {
@ -4699,132 +4717,6 @@ a.badge:hover, a.badge:focus {
top: -1px;
}
.badge-pill {
padding-right: 0.6em;
padding-left: 0.6em;
border-radius: 10rem;
}
.badge-primary {
color: #fff;
background-color: #007bff;
}
a.badge-primary:hover, a.badge-primary:focus {
color: #fff;
background-color: #0062cc;
}
a.badge-primary:focus, a.badge-primary.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5);
}
.badge-secondary {
color: #fff;
background-color: #6c757d;
}
a.badge-secondary:hover, a.badge-secondary:focus {
color: #fff;
background-color: #545b62;
}
a.badge-secondary:focus, a.badge-secondary.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.5);
}
.badge-success {
color: #fff;
background-color: #28a745;
}
a.badge-success:hover, a.badge-success:focus {
color: #fff;
background-color: #1e7e34;
}
a.badge-success:focus, a.badge-success.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5);
}
.badge-info {
color: #fff;
background-color: #17a2b8;
}
a.badge-info:hover, a.badge-info:focus {
color: #fff;
background-color: #117a8b;
}
a.badge-info:focus, a.badge-info.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.5);
}
.badge-warning {
color: #212529;
background-color: #ffc107;
}
a.badge-warning:hover, a.badge-warning:focus {
color: #212529;
background-color: #d39e00;
}
a.badge-warning:focus, a.badge-warning.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.5);
}
.badge-danger {
color: #fff;
background-color: #dc3545;
}
a.badge-danger:hover, a.badge-danger:focus {
color: #fff;
background-color: #bd2130;
}
a.badge-danger:focus, a.badge-danger.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5);
}
.badge-light {
color: #212529;
background-color: #f8f9fa;
}
a.badge-light:hover, a.badge-light:focus {
color: #212529;
background-color: #dae0e5;
}
a.badge-light:focus, a.badge-light.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5);
}
.badge-dark {
color: #fff;
background-color: #343a40;
}
a.badge-dark:hover, a.badge-dark:focus {
color: #fff;
background-color: #1d2124;
}
a.badge-dark:focus, a.badge-dark.focus {
outline: 0;
box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5);
}
.jumbotron {
padding: 2rem 1rem;
margin-bottom: 2rem;
@ -4878,10 +4770,6 @@ a.badge-dark:focus, a.badge-dark.focus {
border-color: #b8daff;
}
.alert-primary hr {
border-top-color: #9fcdff;
}
.alert-primary .alert-link {
color: #002752;
}
@ -4892,10 +4780,6 @@ a.badge-dark:focus, a.badge-dark.focus {
border-color: #d6d8db;
}
.alert-secondary hr {
border-top-color: #c8cbcf;
}
.alert-secondary .alert-link {
color: #202326;
}
@ -4906,10 +4790,6 @@ a.badge-dark:focus, a.badge-dark.focus {
border-color: #c3e6cb;
}
.alert-success hr {
border-top-color: #b1dfbb;
}
.alert-success .alert-link {
color: #0b2e13;
}
@ -4920,10 +4800,6 @@ a.badge-dark:focus, a.badge-dark.focus {
border-color: #bee5eb;
}
.alert-info hr {
border-top-color: #abdde5;
}
.alert-info .alert-link {
color: #062c33;
}
@ -4934,10 +4810,6 @@ a.badge-dark:focus, a.badge-dark.focus {
border-color: #ffeeba;
}
.alert-warning hr {
border-top-color: #ffe8a1;
}
.alert-warning .alert-link {
color: #533f03;
}
@ -4948,10 +4820,6 @@ a.badge-dark:focus, a.badge-dark.focus {
border-color: #f5c6cb;
}
.alert-danger hr {
border-top-color: #f1b0b7;
}
.alert-danger .alert-link {
color: #491217;
}
@ -4962,10 +4830,6 @@ a.badge-dark:focus, a.badge-dark.focus {
border-color: #fdfdfe;
}
.alert-light hr {
border-top-color: #ececf6;
}
.alert-light .alert-link {
color: #686868;
}
@ -4976,10 +4840,6 @@ a.badge-dark:focus, a.badge-dark.focus {
border-color: #c6c8ca;
}
.alert-dark hr {
border-top-color: #b9bbbe;
}
.alert-dark .alert-link {
color: #040505;
}
@ -6215,82 +6075,34 @@ a.close.disabled {
background-color: #007bff !important;
}
a.bg-primary:hover, a.bg-primary:focus,
button.bg-primary:hover,
button.bg-primary:focus {
background-color: #0062cc !important;
}
.bg-secondary {
background-color: #6c757d !important;
}
a.bg-secondary:hover, a.bg-secondary:focus,
button.bg-secondary:hover,
button.bg-secondary:focus {
background-color: #545b62 !important;
}
.bg-success {
background-color: #28a745 !important;
}
a.bg-success:hover, a.bg-success:focus,
button.bg-success:hover,
button.bg-success:focus {
background-color: #1e7e34 !important;
}
.bg-info {
background-color: #17a2b8 !important;
}
a.bg-info:hover, a.bg-info:focus,
button.bg-info:hover,
button.bg-info:focus {
background-color: #117a8b !important;
}
.bg-warning {
background-color: #ffc107 !important;
}
a.bg-warning:hover, a.bg-warning:focus,
button.bg-warning:hover,
button.bg-warning:focus {
background-color: #d39e00 !important;
}
.bg-danger {
background-color: #dc3545 !important;
}
a.bg-danger:hover, a.bg-danger:focus,
button.bg-danger:hover,
button.bg-danger:focus {
background-color: #bd2130 !important;
}
.bg-light {
background-color: #f8f9fa !important;
}
a.bg-light:hover, a.bg-light:focus,
button.bg-light:hover,
button.bg-light:focus {
background-color: #dae0e5 !important;
}
.bg-dark {
background-color: #343a40 !important;
}
a.bg-dark:hover, a.bg-dark:focus,
button.bg-dark:hover,
button.bg-dark:focus {
background-color: #1d2124 !important;
}
.bg-white {
background-color: #fff !important;
}
@ -9450,14 +9262,6 @@ a.text-dark:hover, a.text-dark:focus {
color: rgba(255, 255, 255, 0.5) !important;
}
.text-hide {
font: 0/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
}
.text-decoration-none {
text-decoration: none !important;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -135,7 +135,9 @@
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
var evt = document.createEvent('HTMLEvents');
evt.initEvent(TRANSITION_END, true, true);
element.dispatchEvent(evt);
};
var isElement = function isElement(obj) {
@ -291,93 +293,145 @@
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/polyfill.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/* istanbul ignore next */
/* istanbul ignore file */
var _Element$prototype = Element.prototype,
matches = _Element$prototype.matches,
closest = _Element$prototype.closest;
var find = Element.prototype.querySelectorAll;
var findOne = Element.prototype.querySelector;
var Polyfill = function () {
// MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
var defaultPreventedPreservedOnDispatch = function () {
var e = new CustomEvent('Bootstrap', {
cancelable: true
});
var element = document.createElement('div');
element.addEventListener('Bootstrap', function () {
return null;
});
e.preventDefault();
element.dispatchEvent(e);
return e.defaultPrevented;
}();
var createCustomEvent = function createCustomEvent(eventName, params) {
var cEvent = new CustomEvent(eventName, params);
return cEvent;
};
var find = Element.prototype.querySelectorAll;
var findOne = Element.prototype.querySelector;
var scopeSelectorRegex = /:scope\b/;
if (typeof window.CustomEvent !== 'function') {
createCustomEvent = function createCustomEvent(eventName, params) {
params = params || {
bubbles: false,
cancelable: false,
detail: null
};
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail);
return evt;
};
}
var supportScopeQuery = function () {
var element = document.createElement('div');
var workingDefaultPrevented = function () {
var e = document.createEvent('CustomEvent');
e.initEvent('Bootstrap', true, true);
e.preventDefault();
return e.defaultPrevented;
}();
try {
element.querySelectorAll(':scope *');
} catch (error) {
return false;
if (!workingDefaultPrevented) {
var origPreventDefault = Event.prototype.preventDefault;
Event.prototype.preventDefault = function () {
if (!this.cancelable) {
return;
}
return true;
}();
origPreventDefault.call(this);
Object.defineProperty(this, 'defaultPrevented', {
get: function get() {
return true;
},
configurable: true
});
};
} // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
if (!supportScopeQuery) {
find = function find(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelectorAll(selector);
var defaultPreventedPreservedOnDispatch = function () {
var e = createCustomEvent('Bootstrap', {
cancelable: true
});
var element = document.createElement('div');
element.addEventListener('Bootstrap', function () {
return null;
});
e.preventDefault();
element.dispatchEvent(e);
return e.defaultPrevented;
}();
if (!matches) {
matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
}
if (!closest) {
closest = function closest(selector) {
var element = this;
do {
if (matches.call(element, selector)) {
return element;
}
var hasId = Boolean(this.id);
element = element.parentElement || element.parentNode;
} while (element !== null && element.nodeType === 1);
if (!hasId) {
this.id = getUID('scope');
}
return null;
};
}
var nodeList = null;
var scopeSelectorRegex = /:scope\b/;
try {
selector = selector.replace(scopeSelectorRegex, "#" + this.id);
nodeList = this.querySelectorAll(selector);
} finally {
if (!hasId) {
this.removeAttribute('id');
}
}
var supportScopeQuery = function () {
var element = document.createElement('div');
return nodeList;
};
findOne = function findOne(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelector(selector);
}
var matches = find.call(this, selector);
if (typeof matches[0] !== 'undefined') {
return matches[0];
}
return null;
};
try {
element.querySelectorAll(':scope *');
} catch (error) {
return false;
}
return {
defaultPreventedPreservedOnDispatch: defaultPreventedPreservedOnDispatch,
find: find,
findOne: findOne
};
return true;
}();
if (!supportScopeQuery) {
find = function find(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelectorAll(selector);
}
var hasId = Boolean(this.id);
if (!hasId) {
this.id = getUID('scope');
}
var nodeList = null;
try {
selector = selector.replace(scopeSelectorRegex, "#" + this.id);
nodeList = this.querySelectorAll(selector);
} finally {
if (!hasId) {
this.removeAttribute('id');
}
}
return nodeList;
};
findOne = function findOne(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelector(selector);
}
var matches = find.call(this, selector);
if (typeof matches[0] !== 'undefined') {
return matches[0];
}
return null;
};
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/eventHandler.js
@ -468,10 +522,8 @@
delegationSelector = null;
}
var uidList = Object.keys(events);
for (var i = 0; i < uidList.length; i++) {
var uid = uidList[i];
for (var _i = 0, _Object$keys = Object.keys(events); _i < _Object$keys.length; _i++) {
var uid = _Object$keys[_i];
var event = events[uid];
if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
@ -630,7 +682,7 @@
evt = document.createEvent('HTMLEvents');
evt.initEvent(typeEvent, bubbles, true);
} else {
evt = new CustomEvent(event, {
evt = createCustomEvent(event, {
bubbles: bubbles,
cancelable: true
});
@ -650,7 +702,7 @@
if (defaultPrevented) {
evt.preventDefault();
if (!Polyfill.defaultPreventedPreservedOnDispatch) {
if (!defaultPreventedPreservedOnDispatch) {
Object.defineProperty(evt, 'defaultPrevented', {
get: function get() {
return true;
@ -683,14 +735,12 @@
* ------------------------------------------------------------------------
*/
var findFn = Polyfill.find,
_findOne = Polyfill.findOne;
var NODE_TEXT = 3;
var SelectorEngine = {
matches: function matches(element, selector) {
return element.matches(selector);
matches: function matches$1(element, selector) {
return matches.call(element, selector);
},
find: function find(selector, element) {
find: function find$1(selector, element) {
if (element === void 0) {
element = document.documentElement;
}
@ -699,9 +749,9 @@
return null;
}
return findFn.call(element, selector);
return find.call(element, selector);
},
findOne: function findOne(selector, element) {
findOne: function findOne$1(selector, element) {
if (element === void 0) {
element = document.documentElement;
}
@ -710,7 +760,7 @@
return null;
}
return _findOne.call(element, selector);
return findOne.call(element, selector);
},
children: function children(element, selector) {
var _this = this;
@ -742,12 +792,12 @@
return parents;
},
closest: function closest(element, selector) {
closest: function closest$1(element, selector) {
if (typeof selector !== 'string') {
return null;
}
return element.closest(selector);
return closest.call(element, selector);
},
prev: function prev(element, selector) {
if (typeof selector !== 'string') {
@ -1096,11 +1146,17 @@
});
EventHandler.on(document, Event$2.FOCUS_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
var button = SelectorEngine.closest(event.target, Selector$1.BUTTON);
button.classList.add(ClassName$1.FOCUS);
if (button) {
button.classList.add(ClassName$1.FOCUS);
}
});
EventHandler.on(document, Event$2.BLUR_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
var button = SelectorEngine.closest(event.target, Selector$1.BUTTON);
button.classList.remove(ClassName$1.FOCUS);
if (button) {
button.classList.remove(ClassName$1.FOCUS);
}
});
/**
* ------------------------------------------------------------------------
@ -1419,7 +1475,8 @@
return;
}
var direction = absDeltax / this.touchDeltaX; // swipe left
var direction = absDeltax / this.touchDeltaX;
this.touchDeltaX = 0; // swipe left
if (direction > 0) {
this.prev();
@ -2246,7 +2303,7 @@
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.14.7
* @version 1.15.0
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
@ -3071,7 +3128,7 @@
* @argument value
* @returns index or -1
*/
function find(arr, check) {
function find$1(arr, check) {
// use native find if supported
if (Array.prototype.find) {
return arr.find(check);
@ -3099,7 +3156,7 @@
}
// use `find` + `indexOf` if `findIndex` isn't supported
var match = find(arr, function (obj) {
var match = find$1(arr, function (obj) {
return obj[prop] === value;
});
return arr.indexOf(match);
@ -3516,7 +3573,7 @@
// Remove this legacy support in Popper.js v2
var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {
var legacyGpuAccelerationOption = find$1(data.instance.modifiers, function (modifier) {
return modifier.name === 'applyStyle';
}).gpuAcceleration;
if (legacyGpuAccelerationOption !== undefined) {
@ -3611,7 +3668,7 @@
* @returns {Boolean}
*/
function isModifierRequired(modifiers, requestingName, requestedName) {
var requesting = find(modifiers, function (_ref) {
var requesting = find$1(modifiers, function (_ref) {
var name = _ref.name;
return name === requestingName;
});
@ -3850,7 +3907,14 @@
// flip the variation if required
var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;
var flippedVariation = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
// flips variation if reference element overflows boundaries
var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);
// flips variation if popper content overflows boundaries
var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);
var flippedVariation = flippedVariationByRef || flippedVariationByContent;
if (overlapsRef || overflowsBoundaries || flippedVariation) {
// this boolean to detect any flip loop
@ -3985,7 +4049,7 @@
// Detect if the offset string contains a pair of values or a single one
// they could be separated by comma or space
var divider = fragments.indexOf(find(fragments, function (frag) {
var divider = fragments.indexOf(find$1(fragments, function (frag) {
return frag.search(/,|\s/) !== -1;
}));
@ -4196,7 +4260,7 @@
}
var refRect = data.offsets.reference;
var bound = find(data.instance.modifiers, function (modifier) {
var bound = find$1(data.instance.modifiers, function (modifier) {
return modifier.name === 'preventOverflow';
}).boundaries;
@ -4457,7 +4521,23 @@
* The popper will never be placed outside of the defined boundaries
* (except if `keepTogether` is enabled)
*/
boundariesElement: 'viewport'
boundariesElement: 'viewport',
/**
* @prop {Boolean} flipVariations=false
* The popper will switch placement variation between `-start` and `-end` when
* the reference element overlaps its boundaries.
*
* The original placement should have a set variation.
*/
flipVariations: false,
/**
* @prop {Boolean} flipVariationsByContent=false
* The popper will switch placement variation between `-start` and `-end` when
* the popper element overlaps its reference boundaries.
*
* The original placement should have a set variation.
*/
flipVariationsByContent: false
},
/**
@ -4674,8 +4754,8 @@
/**
* Creates a new Popper.js instance.
* @class Popper
* @param {HTMLElement|referenceObject} reference - The reference element used to position the popper
* @param {HTMLElement} popper - The HTML element used as the popper
* @param {Element|referenceObject} reference - The reference element used to position the popper
* @param {Element} popper - The HTML / XML element used as the popper
* @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)
* @return {Object} instance - The generated Popper.js instance
*/
@ -7665,7 +7745,9 @@
EventHandler.trigger(_this._element, Event$b.SHOWN);
if (_this._config.autohide) {
_this.hide();
_this._timeout = setTimeout(function () {
_this.hide();
}, _this._config.delay);
}
};
@ -7682,7 +7764,7 @@
}
};
_proto.hide = function hide(withoutTimeout) {
_proto.hide = function hide() {
var _this2 = this;
if (!this._element.classList.contains(ClassName$a.SHOW)) {
@ -7691,12 +7773,20 @@
EventHandler.trigger(this._element, Event$b.HIDE);
if (withoutTimeout) {
this._close();
var complete = function complete() {
_this2._element.classList.add(ClassName$a.HIDE);
EventHandler.trigger(_this2._element, Event$b.HIDDEN);
};
this._element.classList.remove(ClassName$a.SHOW);
if (this._config.animation) {
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
this._timeout = setTimeout(function () {
_this2._close();
}, this._config.delay);
complete();
}
};
@ -7725,28 +7815,8 @@
var _this3 = this;
EventHandler.on(this._element, Event$b.CLICK_DISMISS, Selector$a.DATA_DISMISS, function () {
return _this3.hide(true);
return _this3.hide();
});
};
_proto._close = function _close() {
var _this4 = this;
var complete = function complete() {
_this4._element.classList.add(ClassName$a.HIDE);
EventHandler.trigger(_this4._element, Event$b.HIDDEN);
};
this._element.classList.remove(ClassName$a.SHOW);
if (this._config.animation) {
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
} // Static
;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3178
dist/js/bootstrap.esm.js vendored

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -137,7 +137,9 @@
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
var evt = document.createEvent('HTMLEvents');
evt.initEvent(TRANSITION_END, true, true);
element.dispatchEvent(evt);
};
var isElement = function isElement(obj) {
@ -293,93 +295,145 @@
}
};
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/polyfill.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
/* istanbul ignore next */
/* istanbul ignore file */
var _Element$prototype = Element.prototype,
matches = _Element$prototype.matches,
closest = _Element$prototype.closest;
var find = Element.prototype.querySelectorAll;
var findOne = Element.prototype.querySelector;
var Polyfill = function () {
// MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
var defaultPreventedPreservedOnDispatch = function () {
var e = new CustomEvent('Bootstrap', {
cancelable: true
});
var element = document.createElement('div');
element.addEventListener('Bootstrap', function () {
return null;
});
e.preventDefault();
element.dispatchEvent(e);
return e.defaultPrevented;
}();
var createCustomEvent = function createCustomEvent(eventName, params) {
var cEvent = new CustomEvent(eventName, params);
return cEvent;
};
var find = Element.prototype.querySelectorAll;
var findOne = Element.prototype.querySelector;
var scopeSelectorRegex = /:scope\b/;
if (typeof window.CustomEvent !== 'function') {
createCustomEvent = function createCustomEvent(eventName, params) {
params = params || {
bubbles: false,
cancelable: false,
detail: null
};
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail);
return evt;
};
}
var supportScopeQuery = function () {
var element = document.createElement('div');
var workingDefaultPrevented = function () {
var e = document.createEvent('CustomEvent');
e.initEvent('Bootstrap', true, true);
e.preventDefault();
return e.defaultPrevented;
}();
try {
element.querySelectorAll(':scope *');
} catch (error) {
return false;
if (!workingDefaultPrevented) {
var origPreventDefault = Event.prototype.preventDefault;
Event.prototype.preventDefault = function () {
if (!this.cancelable) {
return;
}
return true;
}();
origPreventDefault.call(this);
Object.defineProperty(this, 'defaultPrevented', {
get: function get() {
return true;
},
configurable: true
});
};
} // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
if (!supportScopeQuery) {
find = function find(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelectorAll(selector);
var defaultPreventedPreservedOnDispatch = function () {
var e = createCustomEvent('Bootstrap', {
cancelable: true
});
var element = document.createElement('div');
element.addEventListener('Bootstrap', function () {
return null;
});
e.preventDefault();
element.dispatchEvent(e);
return e.defaultPrevented;
}();
if (!matches) {
matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
}
if (!closest) {
closest = function closest(selector) {
var element = this;
do {
if (matches.call(element, selector)) {
return element;
}
var hasId = Boolean(this.id);
element = element.parentElement || element.parentNode;
} while (element !== null && element.nodeType === 1);
if (!hasId) {
this.id = getUID('scope');
}
return null;
};
}
var nodeList = null;
var scopeSelectorRegex = /:scope\b/;
try {
selector = selector.replace(scopeSelectorRegex, "#" + this.id);
nodeList = this.querySelectorAll(selector);
} finally {
if (!hasId) {
this.removeAttribute('id');
}
}
var supportScopeQuery = function () {
var element = document.createElement('div');
return nodeList;
};
findOne = function findOne(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelector(selector);
}
var matches = find.call(this, selector);
if (typeof matches[0] !== 'undefined') {
return matches[0];
}
return null;
};
try {
element.querySelectorAll(':scope *');
} catch (error) {
return false;
}
return {
defaultPreventedPreservedOnDispatch: defaultPreventedPreservedOnDispatch,
find: find,
findOne: findOne
};
return true;
}();
if (!supportScopeQuery) {
find = function find(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelectorAll(selector);
}
var hasId = Boolean(this.id);
if (!hasId) {
this.id = getUID('scope');
}
var nodeList = null;
try {
selector = selector.replace(scopeSelectorRegex, "#" + this.id);
nodeList = this.querySelectorAll(selector);
} finally {
if (!hasId) {
this.removeAttribute('id');
}
}
return nodeList;
};
findOne = function findOne(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelector(selector);
}
var matches = find.call(this, selector);
if (typeof matches[0] !== 'undefined') {
return matches[0];
}
return null;
};
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/eventHandler.js
@ -470,10 +524,8 @@
delegationSelector = null;
}
var uidList = Object.keys(events);
for (var i = 0; i < uidList.length; i++) {
var uid = uidList[i];
for (var _i = 0, _Object$keys = Object.keys(events); _i < _Object$keys.length; _i++) {
var uid = _Object$keys[_i];
var event = events[uid];
if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
@ -632,7 +684,7 @@
evt = document.createEvent('HTMLEvents');
evt.initEvent(typeEvent, bubbles, true);
} else {
evt = new CustomEvent(event, {
evt = createCustomEvent(event, {
bubbles: bubbles,
cancelable: true
});
@ -652,7 +704,7 @@
if (defaultPrevented) {
evt.preventDefault();
if (!Polyfill.defaultPreventedPreservedOnDispatch) {
if (!defaultPreventedPreservedOnDispatch) {
Object.defineProperty(evt, 'defaultPrevented', {
get: function get() {
return true;
@ -685,14 +737,12 @@
* ------------------------------------------------------------------------
*/
var findFn = Polyfill.find,
_findOne = Polyfill.findOne;
var NODE_TEXT = 3;
var SelectorEngine = {
matches: function matches(element, selector) {
return element.matches(selector);
matches: function matches$1(element, selector) {
return matches.call(element, selector);
},
find: function find(selector, element) {
find: function find$1(selector, element) {
if (element === void 0) {
element = document.documentElement;
}
@ -701,9 +751,9 @@
return null;
}
return findFn.call(element, selector);
return find.call(element, selector);
},
findOne: function findOne(selector, element) {
findOne: function findOne$1(selector, element) {
if (element === void 0) {
element = document.documentElement;
}
@ -712,7 +762,7 @@
return null;
}
return _findOne.call(element, selector);
return findOne.call(element, selector);
},
children: function children(element, selector) {
var _this = this;
@ -744,12 +794,12 @@
return parents;
},
closest: function closest(element, selector) {
closest: function closest$1(element, selector) {
if (typeof selector !== 'string') {
return null;
}
return element.closest(selector);
return closest.call(element, selector);
},
prev: function prev(element, selector) {
if (typeof selector !== 'string') {
@ -1098,11 +1148,17 @@
});
EventHandler.on(document, Event$2.FOCUS_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
var button = SelectorEngine.closest(event.target, Selector$1.BUTTON);
button.classList.add(ClassName$1.FOCUS);
if (button) {
button.classList.add(ClassName$1.FOCUS);
}
});
EventHandler.on(document, Event$2.BLUR_DATA_API, Selector$1.DATA_TOGGLE_CARROT, function (event) {
var button = SelectorEngine.closest(event.target, Selector$1.BUTTON);
button.classList.remove(ClassName$1.FOCUS);
if (button) {
button.classList.remove(ClassName$1.FOCUS);
}
});
/**
* ------------------------------------------------------------------------
@ -1421,7 +1477,8 @@
return;
}
var direction = absDeltax / this.touchDeltaX; // swipe left
var direction = absDeltax / this.touchDeltaX;
this.touchDeltaX = 0; // swipe left
if (direction > 0) {
this.prev();
@ -5088,7 +5145,9 @@
EventHandler.trigger(_this._element, Event$b.SHOWN);
if (_this._config.autohide) {
_this.hide();
_this._timeout = setTimeout(function () {
_this.hide();
}, _this._config.delay);
}
};
@ -5105,7 +5164,7 @@
}
};
_proto.hide = function hide(withoutTimeout) {
_proto.hide = function hide() {
var _this2 = this;
if (!this._element.classList.contains(ClassName$a.SHOW)) {
@ -5114,12 +5173,20 @@
EventHandler.trigger(this._element, Event$b.HIDE);
if (withoutTimeout) {
this._close();
var complete = function complete() {
_this2._element.classList.add(ClassName$a.HIDE);
EventHandler.trigger(_this2._element, Event$b.HIDDEN);
};
this._element.classList.remove(ClassName$a.SHOW);
if (this._config.animation) {
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
this._timeout = setTimeout(function () {
_this2._close();
}, this._config.delay);
complete();
}
};
@ -5148,28 +5215,8 @@
var _this3 = this;
EventHandler.on(this._element, Event$b.CLICK_DISMISS, Selector$a.DATA_DISMISS, function () {
return _this3.hide(true);
return _this3.hide();
});
};
_proto._close = function _close() {
var _this4 = this;
var complete = function complete() {
_this4._element.classList.add(ClassName$a.HIDE);
EventHandler.trigger(_this4._element, Event$b.HIDDEN);
};
this._element.classList.remove(ClassName$a.SHOW);
if (this._config.animation) {
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
} // Static
;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

12
js/dist/alert.js vendored
View file

@ -79,7 +79,9 @@
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
var evt = document.createEvent('HTMLEvents');
evt.initEvent(TRANSITION_END, true, true);
element.dispatchEvent(evt);
};
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
@ -114,7 +116,7 @@
var Selector = {
DISMISS: '[data-dismiss="alert"]'
};
var Event$1 = {
var Event = {
CLOSE: "close" + EVENT_KEY,
CLOSED: "closed" + EVENT_KEY,
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
@ -184,7 +186,7 @@
};
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
return EventHandler.trigger(element, Event$1.CLOSE);
return EventHandler.trigger(element, Event.CLOSE);
};
_proto._removeElement = function _removeElement(element) {
@ -210,7 +212,7 @@
element.parentNode.removeChild(element);
}
EventHandler.trigger(element, Event$1.CLOSED);
EventHandler.trigger(element, Event.CLOSED);
} // Static
;
@ -258,7 +260,7 @@
*/
EventHandler.on(document, Event$1.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
/**
* ------------------------------------------------------------------------
* jQuery

File diff suppressed because one or more lines are too long

10
js/dist/button.js vendored
View file

@ -188,11 +188,17 @@
});
EventHandler.on(document, Event.FOCUS_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
var button = SelectorEngine.closest(event.target, Selector.BUTTON);
button.classList.add(ClassName.FOCUS);
if (button) {
button.classList.add(ClassName.FOCUS);
}
});
EventHandler.on(document, Event.BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
var button = SelectorEngine.closest(event.target, Selector.BUTTON);
button.classList.remove(ClassName.FOCUS);
if (button) {
button.classList.remove(ClassName.FOCUS);
}
});
/**
* ------------------------------------------------------------------------

File diff suppressed because one or more lines are too long

39
js/dist/carousel.js vendored
View file

@ -118,7 +118,9 @@
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
var evt = document.createEvent('HTMLEvents');
evt.initEvent(TRANSITION_END, true, true);
element.dispatchEvent(evt);
};
var isElement = function isElement(obj) {
@ -219,7 +221,7 @@
LEFT: 'left',
RIGHT: 'right'
};
var Event$1 = {
var Event = {
SLIDE: "slide" + EVENT_KEY,
SLID: "slid" + EVENT_KEY,
KEYDOWN: "keydown" + EVENT_KEY,
@ -354,7 +356,7 @@
}
if (this._isSliding) {
EventHandler.one(this._element, Event$1.SLID, function () {
EventHandler.one(this._element, Event.SLID, function () {
return _this.to(index);
});
return;
@ -398,7 +400,8 @@
return;
}
var direction = absDeltax / this.touchDeltaX; // swipe left
var direction = absDeltax / this.touchDeltaX;
this.touchDeltaX = 0; // swipe left
if (direction > 0) {
this.prev();
@ -414,16 +417,16 @@
var _this2 = this;
if (this._config.keyboard) {
EventHandler.on(this._element, Event$1.KEYDOWN, function (event) {
EventHandler.on(this._element, Event.KEYDOWN, function (event) {
return _this2._keydown(event);
});
}
if (this._config.pause === 'hover') {
EventHandler.on(this._element, Event$1.MOUSEENTER, function (event) {
EventHandler.on(this._element, Event.MOUSEENTER, function (event) {
return _this2.pause(event);
});
EventHandler.on(this._element, Event$1.MOUSELEAVE, function (event) {
EventHandler.on(this._element, Event.MOUSELEAVE, function (event) {
return _this2.cycle(event);
});
}
@ -485,28 +488,28 @@
};
makeArray(SelectorEngine.find(Selector.ITEM_IMG, this._element)).forEach(function (itemImg) {
EventHandler.on(itemImg, Event$1.DRAG_START, function (e) {
EventHandler.on(itemImg, Event.DRAG_START, function (e) {
return e.preventDefault();
});
});
if (this._pointerEvent) {
EventHandler.on(this._element, Event$1.POINTERDOWN, function (event) {
EventHandler.on(this._element, Event.POINTERDOWN, function (event) {
return start(event);
});
EventHandler.on(this._element, Event$1.POINTERUP, function (event) {
EventHandler.on(this._element, Event.POINTERUP, function (event) {
return end(event);
});
this._element.classList.add(ClassName.POINTER_EVENT);
} else {
EventHandler.on(this._element, Event$1.TOUCHSTART, function (event) {
EventHandler.on(this._element, Event.TOUCHSTART, function (event) {
return start(event);
});
EventHandler.on(this._element, Event$1.TOUCHMOVE, function (event) {
EventHandler.on(this._element, Event.TOUCHMOVE, function (event) {
return move(event);
});
EventHandler.on(this._element, Event$1.TOUCHEND, function (event) {
EventHandler.on(this._element, Event.TOUCHEND, function (event) {
return end(event);
});
}
@ -560,7 +563,7 @@
var fromIndex = this._getItemIndex(SelectorEngine.findOne(Selector.ACTIVE_ITEM, this._element));
return EventHandler.trigger(this._element, Event$1.SLIDE, {
return EventHandler.trigger(this._element, Event.SLIDE, {
relatedTarget: relatedTarget,
direction: eventDirectionName,
from: fromIndex,
@ -658,7 +661,7 @@
activeElement.classList.remove(directionalClassName);
_this4._isSliding = false;
setTimeout(function () {
EventHandler.trigger(_this4._element, Event$1.SLID, {
EventHandler.trigger(_this4._element, Event.SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
@ -671,7 +674,7 @@
activeElement.classList.remove(ClassName.ACTIVE);
nextElement.classList.add(ClassName.ACTIVE);
this._isSliding = false;
EventHandler.trigger(this._element, Event$1.SLID, {
EventHandler.trigger(this._element, Event.SLID, {
relatedTarget: nextElement,
direction: eventDirectionName,
from: activeElementIndex,
@ -775,8 +778,8 @@
*/
EventHandler.on(document, Event$1.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
EventHandler.on(window, Event$1.LOAD_DATA_API, function () {
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
EventHandler.on(window, Event.LOAD_DATA_API, function () {
var carousels = makeArray(SelectorEngine.find(Selector.DATA_RIDE));
for (var i = 0, len = carousels.length; i < len; i++) {

File diff suppressed because one or more lines are too long

16
js/dist/collapse.js vendored
View file

@ -118,7 +118,9 @@
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
var evt = document.createEvent('HTMLEvents');
evt.initEvent(TRANSITION_END, true, true);
element.dispatchEvent(evt);
};
var isElement = function isElement(obj) {
@ -186,7 +188,7 @@
toggle: 'boolean',
parent: '(string|element)'
};
var Event$1 = {
var Event = {
SHOW: "show" + EVENT_KEY,
SHOWN: "shown" + EVENT_KEY,
HIDE: "hide" + EVENT_KEY,
@ -300,7 +302,7 @@
}
}
var startEvent = EventHandler.trigger(this._element, Event$1.SHOW);
var startEvent = EventHandler.trigger(this._element, Event.SHOW);
if (startEvent.defaultPrevented) {
return;
@ -346,7 +348,7 @@
_this.setTransitioning(false);
EventHandler.trigger(_this._element, Event$1.SHOWN);
EventHandler.trigger(_this._element, Event.SHOWN);
};
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
@ -364,7 +366,7 @@
return;
}
var startEvent = EventHandler.trigger(this._element, Event$1.HIDE);
var startEvent = EventHandler.trigger(this._element, Event.HIDE);
if (startEvent.defaultPrevented) {
return;
@ -408,7 +410,7 @@
_this2._element.classList.add(ClassName.COLLAPSE);
EventHandler.trigger(_this2._element, Event$1.HIDDEN);
EventHandler.trigger(_this2._element, Event.HIDDEN);
};
this._element.style[dimension] = '';
@ -543,7 +545,7 @@
*/
EventHandler.on(document, Event$1.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
EventHandler.on(document, 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.target.tagName === 'A') {
event.preventDefault();

File diff suppressed because one or more lines are too long

View file

@ -4,12 +4,10 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./polyfill.js')) :
typeof define === 'function' && define.amd ? define(['./polyfill.js'], factory) :
(global = global || self, global.EventHandler = factory(global.Polyfill));
}(this, function (Polyfill) { 'use strict';
Polyfill = Polyfill && Polyfill.hasOwnProperty('default') ? Polyfill['default'] : Polyfill;
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.EventHandler = factory());
}(this, function () { 'use strict';
/**
* --------------------------------------------------------------------------
@ -17,8 +15,163 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var MAX_UID = 1000000;
var _window = window,
jQuery = _window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
/**
* --------------------------------------------------------------------------
* Public Util Api
* --------------------------------------------------------------------------
*/
var 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;
};
/* istanbul ignore file */
var _Element$prototype = Element.prototype,
matches = _Element$prototype.matches,
closest = _Element$prototype.closest;
var find = Element.prototype.querySelectorAll;
var findOne = Element.prototype.querySelector;
var createCustomEvent = function createCustomEvent(eventName, params) {
var cEvent = new CustomEvent(eventName, params);
return cEvent;
};
if (typeof window.CustomEvent !== 'function') {
createCustomEvent = function createCustomEvent(eventName, params) {
params = params || {
bubbles: false,
cancelable: false,
detail: null
};
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail);
return evt;
};
}
var workingDefaultPrevented = function () {
var e = document.createEvent('CustomEvent');
e.initEvent('Bootstrap', true, true);
e.preventDefault();
return e.defaultPrevented;
}();
if (!workingDefaultPrevented) {
var origPreventDefault = Event.prototype.preventDefault;
Event.prototype.preventDefault = function () {
if (!this.cancelable) {
return;
}
origPreventDefault.call(this);
Object.defineProperty(this, 'defaultPrevented', {
get: function get() {
return true;
},
configurable: true
});
};
} // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
var defaultPreventedPreservedOnDispatch = function () {
var e = createCustomEvent('Bootstrap', {
cancelable: true
});
var element = document.createElement('div');
element.addEventListener('Bootstrap', function () {
return null;
});
e.preventDefault();
element.dispatchEvent(e);
return e.defaultPrevented;
}();
if (!matches) {
matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
}
if (!closest) {
closest = function closest(selector) {
var element = this;
do {
if (matches.call(element, selector)) {
return element;
}
element = element.parentElement || element.parentNode;
} while (element !== null && element.nodeType === 1);
return null;
};
}
var scopeSelectorRegex = /:scope\b/;
var supportScopeQuery = function () {
var element = document.createElement('div');
try {
element.querySelectorAll(':scope *');
} catch (error) {
return false;
}
return true;
}();
if (!supportScopeQuery) {
find = function find(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelectorAll(selector);
}
var hasId = Boolean(this.id);
if (!hasId) {
this.id = getUID('scope');
}
var nodeList = null;
try {
selector = selector.replace(scopeSelectorRegex, "#" + this.id);
nodeList = this.querySelectorAll(selector);
} finally {
if (!hasId) {
this.removeAttribute('id');
}
}
return nodeList;
};
findOne = function findOne(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelector(selector);
}
var matches = find.call(this, selector);
if (typeof matches[0] !== 'undefined') {
return matches[0];
}
return null;
};
}
/**
* --------------------------------------------------------------------------
@ -110,10 +263,8 @@
delegationSelector = null;
}
var uidList = Object.keys(events);
for (var i = 0; i < uidList.length; i++) {
var uid = uidList[i];
for (var _i = 0, _Object$keys = Object.keys(events); _i < _Object$keys.length; _i++) {
var uid = _Object$keys[_i];
var event = events[uid];
if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
@ -272,7 +423,7 @@
evt = document.createEvent('HTMLEvents');
evt.initEvent(typeEvent, bubbles, true);
} else {
evt = new CustomEvent(event, {
evt = createCustomEvent(event, {
bubbles: bubbles,
cancelable: true
});
@ -292,7 +443,7 @@
if (defaultPrevented) {
evt.preventDefault();
if (!Polyfill.defaultPreventedPreservedOnDispatch) {
if (!defaultPreventedPreservedOnDispatch) {
Object.defineProperty(evt, 'defaultPrevented', {
get: function get() {
return true;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -4,12 +4,10 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('./polyfill.js')) :
typeof define === 'function' && define.amd ? define(['./polyfill.js'], factory) :
(global = global || self, global.SelectorEngine = factory(global.Polyfill));
}(this, function (Polyfill) { 'use strict';
Polyfill = Polyfill && Polyfill.hasOwnProperty('default') ? Polyfill['default'] : Polyfill;
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.SelectorEngine = factory());
}(this, function () { 'use strict';
/**
* --------------------------------------------------------------------------
@ -17,8 +15,24 @@
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var MAX_UID = 1000000;
var _window = window,
jQuery = _window.jQuery; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
/**
* --------------------------------------------------------------------------
* Public Util Api
* --------------------------------------------------------------------------
*/
var 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;
};
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
@ -28,6 +42,145 @@
return [].slice.call(nodeList);
};
/* istanbul ignore file */
var _Element$prototype = Element.prototype,
matches = _Element$prototype.matches,
closest = _Element$prototype.closest;
var find = Element.prototype.querySelectorAll;
var findOne = Element.prototype.querySelector;
var createCustomEvent = function createCustomEvent(eventName, params) {
var cEvent = new CustomEvent(eventName, params);
return cEvent;
};
if (typeof window.CustomEvent !== 'function') {
createCustomEvent = function createCustomEvent(eventName, params) {
params = params || {
bubbles: false,
cancelable: false,
detail: null
};
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail);
return evt;
};
}
var workingDefaultPrevented = function () {
var e = document.createEvent('CustomEvent');
e.initEvent('Bootstrap', true, true);
e.preventDefault();
return e.defaultPrevented;
}();
if (!workingDefaultPrevented) {
var origPreventDefault = Event.prototype.preventDefault;
Event.prototype.preventDefault = function () {
if (!this.cancelable) {
return;
}
origPreventDefault.call(this);
Object.defineProperty(this, 'defaultPrevented', {
get: function get() {
return true;
},
configurable: true
});
};
} // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
var defaultPreventedPreservedOnDispatch = function () {
var e = createCustomEvent('Bootstrap', {
cancelable: true
});
var element = document.createElement('div');
element.addEventListener('Bootstrap', function () {
return null;
});
e.preventDefault();
element.dispatchEvent(e);
return e.defaultPrevented;
}();
if (!matches) {
matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
}
if (!closest) {
closest = function closest(selector) {
var element = this;
do {
if (matches.call(element, selector)) {
return element;
}
element = element.parentElement || element.parentNode;
} while (element !== null && element.nodeType === 1);
return null;
};
}
var scopeSelectorRegex = /:scope\b/;
var supportScopeQuery = function () {
var element = document.createElement('div');
try {
element.querySelectorAll(':scope *');
} catch (error) {
return false;
}
return true;
}();
if (!supportScopeQuery) {
find = function find(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelectorAll(selector);
}
var hasId = Boolean(this.id);
if (!hasId) {
this.id = getUID('scope');
}
var nodeList = null;
try {
selector = selector.replace(scopeSelectorRegex, "#" + this.id);
nodeList = this.querySelectorAll(selector);
} finally {
if (!hasId) {
this.removeAttribute('id');
}
}
return nodeList;
};
findOne = function findOne(selector) {
if (!scopeSelectorRegex.test(selector)) {
return this.querySelector(selector);
}
var matches = find.call(this, selector);
if (typeof matches[0] !== 'undefined') {
return matches[0];
}
return null;
};
}
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/selectorEngine.js
@ -40,14 +193,12 @@
* ------------------------------------------------------------------------
*/
var findFn = Polyfill.find,
_findOne = Polyfill.findOne;
var NODE_TEXT = 3;
var SelectorEngine = {
matches: function matches(element, selector) {
return element.matches(selector);
matches: function matches$1(element, selector) {
return matches.call(element, selector);
},
find: function find(selector, element) {
find: function find$1(selector, element) {
if (element === void 0) {
element = document.documentElement;
}
@ -56,9 +207,9 @@
return null;
}
return findFn.call(element, selector);
return find.call(element, selector);
},
findOne: function findOne(selector, element) {
findOne: function findOne$1(selector, element) {
if (element === void 0) {
element = document.documentElement;
}
@ -67,7 +218,7 @@
return null;
}
return _findOne.call(element, selector);
return findOne.call(element, selector);
},
children: function children(element, selector) {
var _this = this;
@ -99,12 +250,12 @@
return parents;
},
closest: function closest(element, selector) {
closest: function closest$1(element, selector) {
if (typeof selector !== 'string') {
return null;
}
return element.closest(selector);
return closest.call(element, selector);
},
prev: function prev(element, selector) {
if (typeof selector !== 'string') {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

48
js/dist/modal.js vendored
View file

@ -118,7 +118,9 @@
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
var evt = document.createEvent('HTMLEvents');
evt.initEvent(TRANSITION_END, true, true);
element.dispatchEvent(evt);
};
var isElement = function isElement(obj) {
@ -204,7 +206,7 @@
focus: 'boolean',
show: 'boolean'
};
var Event$1 = {
var Event = {
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
SHOW: "show" + EVENT_KEY,
@ -275,7 +277,7 @@
this._isTransitioning = true;
}
var showEvent = EventHandler.trigger(this._element, Event$1.SHOW, {
var showEvent = EventHandler.trigger(this._element, Event.SHOW, {
relatedTarget: relatedTarget
});
@ -295,11 +297,11 @@
this._setResizeEvent();
EventHandler.on(this._element, Event$1.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
EventHandler.on(this._element, Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
return _this.hide(event);
});
EventHandler.on(this._dialog, Event$1.MOUSEDOWN_DISMISS, function () {
EventHandler.one(_this._element, Event$1.MOUSEUP_DISMISS, function (event) {
EventHandler.on(this._dialog, Event.MOUSEDOWN_DISMISS, function () {
EventHandler.one(_this._element, Event.MOUSEUP_DISMISS, function (event) {
if (event.target === _this._element) {
_this._ignoreBackdropClick = true;
}
@ -322,7 +324,7 @@
return;
}
var hideEvent = EventHandler.trigger(this._element, Event$1.HIDE);
var hideEvent = EventHandler.trigger(this._element, Event.HIDE);
if (!this._isShown || hideEvent.defaultPrevented) {
return;
@ -340,12 +342,12 @@
this._setResizeEvent();
EventHandler.off(document, Event$1.FOCUSIN);
EventHandler.off(document, Event.FOCUSIN);
this._element.classList.remove(ClassName.SHOW);
EventHandler.off(this._element, Event$1.CLICK_DISMISS);
EventHandler.off(this._dialog, Event$1.MOUSEDOWN_DISMISS);
EventHandler.off(this._element, Event.CLICK_DISMISS);
EventHandler.off(this._dialog, Event.MOUSEDOWN_DISMISS);
if (transition) {
var transitionDuration = getTransitionDurationFromElement(this._element);
@ -368,7 +370,7 @@
* It will remove `Event.CLICK_DATA_API` event that should remain
*/
EventHandler.off(document, Event$1.FOCUSIN);
EventHandler.off(document, Event.FOCUSIN);
Data.removeData(this._element, DATA_KEY);
this._config = null;
this._element = null;
@ -430,7 +432,7 @@
}
_this3._isTransitioning = false;
EventHandler.trigger(_this3._element, Event$1.SHOWN, {
EventHandler.trigger(_this3._element, Event.SHOWN, {
relatedTarget: relatedTarget
});
};
@ -447,9 +449,9 @@
_proto._enforceFocus = function _enforceFocus() {
var _this4 = this;
EventHandler.off(document, Event$1.FOCUSIN); // guard against infinite focus loop
EventHandler.off(document, Event.FOCUSIN); // guard against infinite focus loop
EventHandler.on(document, Event$1.FOCUSIN, function (event) {
EventHandler.on(document, Event.FOCUSIN, function (event) {
if (document !== event.target && _this4._element !== event.target && !_this4._element.contains(event.target)) {
_this4._element.focus();
}
@ -460,7 +462,7 @@
var _this5 = this;
if (this._isShown && this._config.keyboard) {
EventHandler.on(this._element, Event$1.KEYDOWN_DISMISS, function (event) {
EventHandler.on(this._element, Event.KEYDOWN_DISMISS, function (event) {
if (event.which === ESCAPE_KEYCODE) {
event.preventDefault();
@ -468,7 +470,7 @@
}
});
} else if (!this._isShown) {
EventHandler.off(this._element, Event$1.KEYDOWN_DISMISS);
EventHandler.off(this._element, Event.KEYDOWN_DISMISS);
}
};
@ -476,11 +478,11 @@
var _this6 = this;
if (this._isShown) {
EventHandler.on(window, Event$1.RESIZE, function (event) {
EventHandler.on(window, Event.RESIZE, function (event) {
return _this6.handleUpdate(event);
});
} else {
EventHandler.off(window, Event$1.RESIZE);
EventHandler.off(window, Event.RESIZE);
}
};
@ -502,7 +504,7 @@
_this7._resetScrollbar();
EventHandler.trigger(_this7._element, Event$1.HIDDEN);
EventHandler.trigger(_this7._element, Event.HIDDEN);
});
};
@ -528,7 +530,7 @@
}
document.body.appendChild(this._backdrop);
EventHandler.on(this._element, Event$1.CLICK_DISMISS, function (event) {
EventHandler.on(this._element, Event.CLICK_DISMISS, function (event) {
if (_this8._ignoreBackdropClick) {
_this8._ignoreBackdropClick = false;
return;
@ -731,7 +733,7 @@
*/
EventHandler.on(document, Event$1.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
var _this10 = this;
var target;
@ -747,13 +749,13 @@
event.preventDefault();
}
EventHandler.one(target, Event$1.SHOW, function (showEvent) {
EventHandler.one(target, Event.SHOW, function (showEvent) {
if (showEvent.defaultPrevented) {
// only register focus restorer if modal will actually get shown
return;
}
EventHandler.one(target, Event$1.HIDDEN, function () {
EventHandler.one(target, Event.HIDDEN, function () {
if (isVisible(_this10)) {
_this10.focus();
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

16
js/dist/tab.js vendored
View file

@ -79,7 +79,9 @@
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
var evt = document.createEvent('HTMLEvents');
evt.initEvent(TRANSITION_END, true, true);
element.dispatchEvent(evt);
};
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
@ -123,7 +125,7 @@
var DATA_KEY = 'bs.tab';
var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api';
var Event$1 = {
var Event = {
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
SHOW: "show" + EVENT_KEY,
@ -186,12 +188,12 @@
var hideEvent = null;
if (previous) {
hideEvent = EventHandler.trigger(previous, Event$1.HIDE, {
hideEvent = EventHandler.trigger(previous, Event.HIDE, {
relatedTarget: this._element
});
}
var showEvent = EventHandler.trigger(this._element, Event$1.SHOW, {
var showEvent = EventHandler.trigger(this._element, Event.SHOW, {
relatedTarget: previous
});
@ -206,10 +208,10 @@
this._activate(this._element, listElement);
var complete = function complete() {
EventHandler.trigger(previous, Event$1.HIDDEN, {
EventHandler.trigger(previous, Event.HIDDEN, {
relatedTarget: _this._element
});
EventHandler.trigger(_this._element, Event$1.SHOWN, {
EventHandler.trigger(_this._element, Event.SHOWN, {
relatedTarget: previous
});
};
@ -326,7 +328,7 @@
*/
EventHandler.on(document, Event$1.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
event.preventDefault();
var data = Data.getData(this, DATA_KEY) || new Tab(this);
data.show();

2
js/dist/tab.js.map vendored

File diff suppressed because one or more lines are too long

62
js/dist/toast.js vendored
View file

@ -102,7 +102,9 @@
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
var evt = document.createEvent('HTMLEvents');
evt.initEvent(TRANSITION_END, true, true);
element.dispatchEvent(evt);
};
var isElement = function isElement(obj) {
@ -149,7 +151,7 @@
var VERSION = '4.3.1';
var DATA_KEY = 'bs.toast';
var EVENT_KEY = "." + DATA_KEY;
var Event$1 = {
var Event = {
CLICK_DISMISS: "click.dismiss" + EVENT_KEY,
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
@ -202,7 +204,7 @@
_proto.show = function show() {
var _this = this;
EventHandler.trigger(this._element, Event$1.SHOW);
EventHandler.trigger(this._element, Event.SHOW);
if (this._config.animation) {
this._element.classList.add(ClassName.FADE);
@ -213,10 +215,12 @@
_this._element.classList.add(ClassName.SHOW);
EventHandler.trigger(_this._element, Event$1.SHOWN);
EventHandler.trigger(_this._element, Event.SHOWN);
if (_this._config.autohide) {
_this.hide();
_this._timeout = setTimeout(function () {
_this.hide();
}, _this._config.delay);
}
};
@ -233,21 +237,29 @@
}
};
_proto.hide = function hide(withoutTimeout) {
_proto.hide = function hide() {
var _this2 = this;
if (!this._element.classList.contains(ClassName.SHOW)) {
return;
}
EventHandler.trigger(this._element, Event$1.HIDE);
EventHandler.trigger(this._element, Event.HIDE);
if (withoutTimeout) {
this._close();
var complete = function complete() {
_this2._element.classList.add(ClassName.HIDE);
EventHandler.trigger(_this2._element, Event.HIDDEN);
};
this._element.classList.remove(ClassName.SHOW);
if (this._config.animation) {
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
this._timeout = setTimeout(function () {
_this2._close();
}, this._config.delay);
complete();
}
};
@ -259,7 +271,7 @@
this._element.classList.remove(ClassName.SHOW);
}
EventHandler.off(this._element, Event$1.CLICK_DISMISS);
EventHandler.off(this._element, Event.CLICK_DISMISS);
Data.removeData(this._element, DATA_KEY);
this._element = null;
this._config = null;
@ -275,29 +287,9 @@
_proto._setListeners = function _setListeners() {
var _this3 = this;
EventHandler.on(this._element, Event$1.CLICK_DISMISS, Selector.DATA_DISMISS, function () {
return _this3.hide(true);
EventHandler.on(this._element, Event.CLICK_DISMISS, Selector.DATA_DISMISS, function () {
return _this3.hide();
});
};
_proto._close = function _close() {
var _this4 = this;
var complete = function complete() {
_this4._element.classList.add(ClassName.HIDE);
EventHandler.trigger(_this4._element, Event$1.HIDDEN);
};
this._element.classList.remove(ClassName.SHOW);
if (this._config.animation) {
var transitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, complete);
emulateTransitionEnd(this._element, transitionDuration);
} else {
complete();
}
} // Static
;

File diff suppressed because one or more lines are too long

8
js/dist/tooltip.js vendored
View file

@ -120,7 +120,9 @@
};
var triggerTransitionEnd = function triggerTransitionEnd(element) {
element.dispatchEvent(new Event(TRANSITION_END));
var evt = document.createEvent('HTMLEvents');
evt.initEvent(TRANSITION_END, true, true);
element.dispatchEvent(evt);
};
var isElement = function isElement(obj) {
@ -372,7 +374,7 @@
SHOW: 'show',
OUT: 'out'
};
var Event$1 = {
var Event = {
HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY,
SHOW: "show" + EVENT_KEY,
@ -1032,7 +1034,7 @@
}, {
key: "Event",
get: function get() {
return Event$1;
return Event;
}
}, {
key: "EVENT_KEY",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -19,4 +19,4 @@
* Licensed under the Creative Commons Attribution 3.0 Unported License.
* For details, see https://creativecommons.org/licenses/by/3.0/.
*/
(function(){"use strict";function t(t){return[].slice.call(t)}t(document.querySelectorAll(".tooltip-demo")).forEach(function(t){new bootstrap.Tooltip(t,{selector:'[data-toggle="tooltip"]'})});t(document.querySelectorAll('[data-toggle="popover"]')).forEach(function(t){new bootstrap.Popover(t)});t(document.querySelectorAll(".toast")).forEach(function(t){var e=new bootstrap.Toast(t,{autohide:false});e.show()});t(document.querySelectorAll(".tooltip-test")).forEach(function(t){new bootstrap.Tooltip(t)});t(document.querySelectorAll(".popover-test")).forEach(function(t){new bootstrap.Popover(t)});t(document.querySelectorAll('.bd-example-indeterminate [type="checkbox"]')).forEach(function(t){t.indeterminate=true});t(document.querySelectorAll('.bd-content [href="#"]')).forEach(function(t){t.addEventListener("click",function(t){t.preventDefault()})});var e=document.getElementById("exampleModal");if(e){e.addEventListener("show.bs.modal",function(t){var n=t.relatedTarget;var o=n.getAttribute("data-whatever");var r=e.querySelector(".modal-title");var i=e.querySelector(".modal-body input");r.innerHTML="New message to "+o;i.value=o})}t(document.querySelectorAll(".bd-toggle-animated-progress > .progress-bar-striped")).forEach(function(t){t.addEventListener("click",function(){if(t.classList.contains("progress-bar-animated")){t.classList.remove("progress-bar-animated")}else{t.classList.add("progress-bar-animated")}})});var n='<div class="bd-clipboard"><button type="button" class="btn-clipboard" title="Copy to clipboard">Copy</button></div>';t(document.querySelectorAll("figure.highlight, div.highlight")).forEach(function(t){t.insertAdjacentHTML("beforebegin",n)});t(document.querySelectorAll(".btn-clipboard")).forEach(function(t){var e=new bootstrap.Tooltip(t);t.addEventListener("mouseleave",function(){e.hide()})});var o=new ClipboardJS(".btn-clipboard",{target:function(t){return t.parentNode.nextElementSibling}});o.on("success",function(t){var e=bootstrap.Tooltip._getInstance(t.trigger);t.trigger.setAttribute("title","Copied!");e._fixTitle();e.show();t.trigger.setAttribute("title","Copy to clipboard");e._fixTitle();t.clearSelection()});o.on("error",function(t){var e=/Mac/i.test(navigator.userAgent)?"⌘":"Ctrl-";var n="Press "+e+"C to copy";var o=bootstrap.Tooltip._getInstance(t.trigger);t.trigger.setAttribute("title",n);o._fixTitle();o.show();t.trigger.setAttribute("title","Copy to clipboard");o._fixTitle()});anchors.options={icon:"#"};anchors.add(".bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5");t(document.querySelectorAll(".bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5")).forEach(function(t){t.innerHTML='<span class="bd-content-title">'+t.innerHTML+"</span>"});bsCustomFileInput.init()})();(function(){"use strict";if(!window.docsearch){return}var t=document.getElementById("search-input");var e=t.getAttribute("data-docs-version");function n(){var t=window.location;var e=t.origin;if(!e){var n=t.port?":"+t.port:"";e=t.protocol+"//"+t.hostname+n}return e}window.docsearch({apiKey:"5990ad008512000bba2cf951ccf0332f",indexName:"bootstrap",inputSelector:"#search-input",algoliaOptions:{facetFilters:["version:"+e]},transformData:function(t){return t.map(function(t){var e=n();var o=/^https?:\/\/getbootstrap\.com/;t.url=e.match(o)?t.url:t.url.replace(o,"");if(t.anchor==="content"){t.url=t.url.replace(/#content$/,"");t.anchor=null}return t})},debug:false})})();
(function(){"use strict";function t(t){return[].slice.call(t)}t(document.querySelectorAll(".tooltip-demo")).forEach(function(t){new bootstrap.Tooltip(t,{selector:'[data-toggle="tooltip"]'})});t(document.querySelectorAll('[data-toggle="popover"]')).forEach(function(t){new bootstrap.Popover(t)});t(document.querySelectorAll(".toast")).forEach(function(t){var e=new bootstrap.Toast(t,{autohide:false});e.show()});t(document.querySelectorAll(".tooltip-test")).forEach(function(t){new bootstrap.Tooltip(t)});t(document.querySelectorAll(".popover-test")).forEach(function(t){new bootstrap.Popover(t)});t(document.querySelectorAll('.bd-example-indeterminate [type="checkbox"]')).forEach(function(t){t.indeterminate=true});t(document.querySelectorAll('.bd-content [href="#"]')).forEach(function(t){t.addEventListener("click",function(t){t.preventDefault()})});var e=document.getElementById("exampleModal");if(e){e.addEventListener("show.bs.modal",function(t){var n=t.relatedTarget;var o=n.getAttribute("data-whatever");var r=e.querySelector(".modal-title");var i=e.querySelector(".modal-body input");r.innerHTML="New message to "+o;i.value=o})}t(document.querySelectorAll(".bd-toggle-animated-progress > .progress-bar-striped")).forEach(function(t){t.addEventListener("click",function(){if(t.classList.contains("progress-bar-animated")){t.classList.remove("progress-bar-animated")}else{t.classList.add("progress-bar-animated")}})});var n='<div class="bd-clipboard"><button type="button" class="btn-clipboard" title="Copy to clipboard">Copy</button></div>';t(document.querySelectorAll("figure.highlight, div.highlight")).forEach(function(t){t.insertAdjacentHTML("beforebegin",n)});t(document.querySelectorAll(".btn-clipboard")).forEach(function(t){var e=new bootstrap.Tooltip(t);t.addEventListener("mouseleave",function(){e.hide()})});var o=new ClipboardJS(".btn-clipboard",{target:function(t){return t.parentNode.nextElementSibling}});o.on("success",function(t){var e=bootstrap.Tooltip._getInstance(t.trigger);t.trigger.setAttribute("title","Copied!");e._fixTitle();e.show();t.trigger.setAttribute("title","Copy to clipboard");e._fixTitle();t.clearSelection()});o.on("error",function(t){var e=/Mac/i.test(navigator.userAgent)?"⌘":"Ctrl-";var n="Press "+e+"C to copy";var o=bootstrap.Tooltip._getInstance(t.trigger);t.trigger.setAttribute("title",n);o._fixTitle();o.show();t.trigger.setAttribute("title","Copy to clipboard");o._fixTitle()});anchors.options={icon:"#"};anchors.add(".bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5");t(document.querySelectorAll(".bd-content > h2, .bd-content > h3, .bd-content > h4, .bd-content > h5")).forEach(function(t){t.innerHTML='<span class="bd-content-title">'+t.innerHTML+"</span>"});bsCustomFileInput.init()})();(function(){"use strict";if(!window.docsearch){return}var t=document.getElementById("search-input");var e=t.getAttribute("data-docs-version");function n(){var t=window.location;var e=t.origin;if(!e){var n=t.port?":"+t.port:"";e=t.protocol+"//"+t.hostname+n}return e}window.docsearch({apiKey:"5990ad008512000bba2cf951ccf0332f",indexName:"bootstrap",inputSelector:"#search-input",algoliaOptions:{facetFilters:["version:"+e]},transformData:function(t){return t.map(function(t){var e=n();var o="https://getbootstrap.com";t.url=e.indexOf(o)!==-1?t.url:t.url.replace(o,"");if(t.anchor==="content"){t.url=t.url.replace(/#content$/,"");t.anchor=null}return t})},debug:false})})();