Merge branch 'master' into release-drafter

This commit is contained in:
Mark Otto 2020-04-13 15:34:08 -07:00 committed by GitHub
commit febdcefcd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
136 changed files with 6289 additions and 6480 deletions

View File

@ -56,5 +56,11 @@
"path": "./dist/js/bootstrap.min.js", "path": "./dist/js/bootstrap.min.js",
"maxSize": "16.5 kB" "maxSize": "16.5 kB"
} }
],
"ci": {
"trackBranches": [
"master",
"v4-dev"
] ]
}
} }

View File

@ -45,8 +45,9 @@
"unicorn/prefer-includes": "off", "unicorn/prefer-includes": "off",
"unicorn/prefer-node-append": "off", "unicorn/prefer-node-append": "off",
"unicorn/prefer-node-remove": "off", "unicorn/prefer-node-remove": "off",
"unicorn/prefer-number-properties": "off",
"unicorn/prefer-query-selector": "off", "unicorn/prefer-query-selector": "off",
"unicorn/prefer-text-content": "off", "unicorn/prefer-set-has": "off",
"unicorn/prevent-abbreviations": "off" "unicorn/prevent-abbreviations": "off"
} }
} }

View File

@ -41,11 +41,11 @@ jobs:
- name: Run tests - name: Run tests
run: npm test run: npm test
- name: Run bundlesize - name: Run bundlewatch
run: npm run bundlesize run: npm run bundlewatch
if: matrix.node == 10 if: matrix.node == 10
env: env:
BUNDLESIZE_GITHUB_TOKEN: "${{ secrets.BUNDLESIZE_GITHUB_TOKEN }}" BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
- name: Run BrowserStack tests - name: Run BrowserStack tests
run: npm run js-test-cloud run: npm run js-test-cloud

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

@ -1,7 +1,7 @@
/*! /*!
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/) * Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors * Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc. * Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * 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) * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/ */
@ -47,19 +47,43 @@ h1, h2, h3, h4, h5, h6 {
} }
h1 { h1 {
font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
h1 {
font-size: 2.5rem; font-size: 2.5rem;
}
} }
h2 { h2 {
font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
h2 {
font-size: 2rem; font-size: 2rem;
}
} }
h3 { h3 {
font-size: calc(1.3rem + 0.6vw);
}
@media (min-width: 1200px) {
h3 {
font-size: 1.75rem; font-size: 1.75rem;
}
} }
h4 { h4 {
font-size: calc(1.275rem + 0.3vw);
}
@media (min-width: 1200px) {
h4 {
font-size: 1.5rem; font-size: 1.5rem;
}
} }
h5 { h5 {
@ -132,6 +156,11 @@ small {
font-size: 0.875em; font-size: 0.875em;
} }
mark {
padding: 0.2em;
background-color: #fcf8e3;
}
sub, sub,
sup { sup {
position: relative; position: relative;
@ -150,12 +179,11 @@ sup {
a { a {
color: #0d6efd; color: #0d6efd;
text-decoration: none; text-decoration: underline;
} }
a:hover { a:hover {
color: #024dbc; color: #024dbc;
text-decoration: underline;
} }
a:not([href]), a:not([href]):hover { a:not([href]), a:not([href]):hover {
@ -213,16 +241,13 @@ figure {
margin: 0 0 1rem; margin: 0 0 1rem;
} }
img { img,
vertical-align: middle;
}
svg { svg {
overflow: hidden;
vertical-align: middle; vertical-align: middle;
} }
table { table {
caption-side: bottom;
border-collapse: collapse; border-collapse: collapse;
} }
@ -231,11 +256,11 @@ caption {
padding-bottom: 0.5rem; padding-bottom: 0.5rem;
color: #6c757d; color: #6c757d;
text-align: left; text-align: left;
caption-side: bottom;
} }
th { th {
text-align: inherit; text-align: inherit;
text-align: -webkit-match-parent;
} }
label { label {
@ -308,7 +333,6 @@ input[type="month"] {
} }
textarea { textarea {
overflow: auto;
resize: vertical; resize: vertical;
} }
@ -324,24 +348,33 @@ legend {
width: 100%; width: 100%;
padding: 0; padding: 0;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
font-size: 1.5rem; font-size: calc(1.275rem + 0.3vw);
line-height: inherit; line-height: inherit;
color: inherit;
white-space: normal; white-space: normal;
} }
mark { @media (min-width: 1200px) {
padding: 0.2em; legend {
background-color: #fcf8e3; font-size: 1.5rem;
}
} }
progress { legend + * {
vertical-align: baseline; clear: left;
} }
::-webkit-datetime-edit { ::-webkit-datetime-edit-fields-wrapper,
overflow: visible; ::-webkit-datetime-edit-text,
line-height: 0; ::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
padding: 0;
}
::-webkit-inner-spin-button {
height: auto;
} }
[type="search"] { [type="search"] {
@ -371,12 +404,8 @@ summary {
cursor: pointer; cursor: pointer;
} }
template { progress {
display: none; vertical-align: baseline;
}
main {
display: block;
} }
[hidden] { [hidden] {

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
/*! /*!
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/) * Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors * Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc. * Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * 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) * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}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;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:2.5rem}h2{font-size:2rem}h3{font-size:1.75rem}h4{font-size:1.5rem}h5{font-size:1.25rem}h6{font-size:1rem}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;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}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:.875em}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:none}a:hover{color:#024dbc;text-decoration:underline}a:not([href]),a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img{vertical-align:middle}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;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}[list]::-webkit-calendar-picker-indicator{display:none}[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}::-moz-focus-inner{padding:0;border-style:none}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:textfield}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}mark{padding:.2em;background-color:#fcf8e3}progress{vertical-align:baseline}::-webkit-datetime-edit{overflow:visible;line-height:0}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}main{display:block}[hidden]{display:none!important} */*,::after,::before{box-sizing:border-box}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;background-color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}hr:not([size]){height:1px}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){h1{font-size:2.5rem}}h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){h2{font-size:2rem}}h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){h3{font-size:1.75rem}}h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){h4{font-size:1.5rem}}h5{font-size:1.25rem}h6{font-size:1rem}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;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}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:.875em}mark{padding:.2em;background-color:#fcf8e3}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0d6efd;text-decoration:underline}a:hover{color:#024dbc}a:not([href]),a:not([href]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:#d63384;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:.875em;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:1em;font-weight:700}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}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}[list]::-webkit-calendar-picker-indicator{display:none}[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}::-moz-focus-inner{padding:0;border-style:none}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:textfield}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit;white-space:normal}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:textfield}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */ /*# sourceMappingURL=bootstrap-reboot.min.css.map */

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
/*! /*!
* Bootstrap Utilities v4.3.1 (https://getbootstrap.com/) * Bootstrap Utilities v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors * Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc. * Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
.align-baseline { .align-baseline {
@ -84,14 +84,14 @@
display: inline-flex !important; display: inline-flex !important;
} }
.shadow-sm {
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}
.shadow { .shadow {
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
} }
.shadow-sm {
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}
.shadow-lg { .shadow-lg {
box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
} }
@ -1013,10 +1013,6 @@
text-align: center !important; text-align: center !important;
} }
.text-justify {
text-align: justify !important;
}
.text-primary { .text-primary {
color: #0d6efd !important; color: #0d6efd !important;
} }
@ -1145,19 +1141,59 @@
text-decoration: none !important; text-decoration: none !important;
} }
.text-decoration-underline {
text-decoration: underline !important;
}
.text-decoration-line-through {
text-decoration: line-through !important;
}
.font-italic { .font-italic {
font-style: italic !important; font-style: italic !important;
} }
.font-normal {
font-style: normal !important;
}
.text-break { .text-break {
overflow-wrap: break-word !important; word-wrap: break-word !important;
word-break: break-word !important;
} }
.font-monospace { .font-monospace {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important; font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
} }
.user-select-all {
-webkit-user-select: all !important;
-moz-user-select: all !important;
-ms-user-select: all !important;
user-select: all !important;
}
.user-select-auto {
-webkit-user-select: auto !important;
-moz-user-select: auto !important;
-ms-user-select: auto !important;
user-select: auto !important;
}
.user-select-none {
-webkit-user-select: none !important;
-moz-user-select: none !important;
-ms-user-select: none !important;
user-select: none !important;
}
.pe-none {
pointer-events: none !important;
}
.pe-auto {
pointer-events: auto !important;
}
.rounded { .rounded {
border-radius: 0.25rem !important; border-radius: 0.25rem !important;
} }
@ -1796,9 +1832,6 @@
.text-sm-center { .text-sm-center {
text-align: center !important; text-align: center !important;
} }
.text-sm-justify {
text-align: justify !important;
}
} }
@media (min-width: 768px) { @media (min-width: 768px) {
@ -2387,9 +2420,6 @@
.text-md-center { .text-md-center {
text-align: center !important; text-align: center !important;
} }
.text-md-justify {
text-align: justify !important;
}
} }
@media (min-width: 992px) { @media (min-width: 992px) {
@ -2978,9 +3008,6 @@
.text-lg-center { .text-lg-center {
text-align: center !important; text-align: center !important;
} }
.text-lg-justify {
text-align: justify !important;
}
} }
@media (min-width: 1200px) { @media (min-width: 1200px) {
@ -3569,9 +3596,6 @@
.text-xl-center { .text-xl-center {
text-align: center !important; text-align: center !important;
} }
.text-xl-justify {
text-align: justify !important;
}
} }
@media print { @media print {

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

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

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

1254
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

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

48
js/dist/alert.js vendored
View File

@ -1,6 +1,6 @@
/*! /*!
* Bootstrap alert.js v4.3.1 (https://getbootstrap.com/) * Bootstrap alert.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
@ -9,9 +9,9 @@
(global = global || self, global.Alert = factory(global.Data, global.EventHandler, global.SelectorEngine)); (global = global || self, global.Alert = factory(global.Data, global.EventHandler, global.SelectorEngine));
}(this, (function (Data, EventHandler, SelectorEngine) { 'use strict'; }(this, (function (Data, EventHandler, SelectorEngine) { 'use strict';
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data; Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler; EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine; SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) { function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) { for (var i = 0; i < props.length; i++) {
@ -78,9 +78,7 @@
}; };
var triggerTransitionEnd = function triggerTransitionEnd(element) { var triggerTransitionEnd = function triggerTransitionEnd(element) {
var evt = document.createEvent('HTMLEvents'); element.dispatchEvent(new Event(TRANSITION_END));
evt.initEvent(TRANSITION_END, true, true);
element.dispatchEvent(evt);
}; };
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) { var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
@ -123,28 +121,20 @@
var DATA_KEY = 'bs.alert'; var DATA_KEY = 'bs.alert';
var EVENT_KEY = "." + DATA_KEY; var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api'; var DATA_API_KEY = '.data-api';
var Selector = { var SELECTOR_DISMISS = '[data-dismiss="alert"]';
DISMISS: '[data-dismiss="alert"]' var EVENT_CLOSE = "close" + EVENT_KEY;
}; var EVENT_CLOSED = "closed" + EVENT_KEY;
var Event = { var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
CLOSE: "close" + EVENT_KEY, var CLASSNAME_ALERT = 'alert';
CLOSED: "closed" + EVENT_KEY, var CLASSNAME_FADE = 'fade';
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY var CLASSNAME_SHOW = 'show';
};
var ClassName = {
ALERT: 'alert',
FADE: 'fade',
SHOW: 'show'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var Alert = var Alert = /*#__PURE__*/function () {
/*#__PURE__*/
function () {
function Alert(element) { function Alert(element) {
this._element = element; this._element = element;
@ -183,22 +173,22 @@
var parent = getElementFromSelector(element); var parent = getElementFromSelector(element);
if (!parent) { if (!parent) {
parent = SelectorEngine.closest(element, "." + ClassName.ALERT); parent = SelectorEngine.closest(element, "." + CLASSNAME_ALERT);
} }
return parent; return parent;
}; };
_proto._triggerCloseEvent = function _triggerCloseEvent(element) { _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
return EventHandler.trigger(element, Event.CLOSE); return EventHandler.trigger(element, EVENT_CLOSE);
}; };
_proto._removeElement = function _removeElement(element) { _proto._removeElement = function _removeElement(element) {
var _this = this; var _this = this;
element.classList.remove(ClassName.SHOW); element.classList.remove(CLASSNAME_SHOW);
if (!element.classList.contains(ClassName.FADE)) { if (!element.classList.contains(CLASSNAME_FADE)) {
this._destroyElement(element); this._destroyElement(element);
return; return;
@ -216,7 +206,7 @@
element.parentNode.removeChild(element); element.parentNode.removeChild(element);
} }
EventHandler.trigger(element, Event.CLOSED); EventHandler.trigger(element, EVENT_CLOSED);
} // Static } // Static
; ;
@ -264,7 +254,7 @@
*/ */
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DISMISS, Alert.handleDismiss(new Alert())); EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()));
var $ = getjQuery(); var $ = getjQuery();
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------

File diff suppressed because one or more lines are too long

77
js/dist/button.js vendored
View File

@ -1,6 +1,6 @@
/*! /*!
* Bootstrap button.js v4.3.1 (https://getbootstrap.com/) * Bootstrap button.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
@ -9,9 +9,9 @@
(global = global || self, global.Button = factory(global.Data, global.EventHandler, global.SelectorEngine)); (global = global || self, global.Button = factory(global.Data, global.EventHandler, global.SelectorEngine));
}(this, (function (Data, EventHandler, SelectorEngine) { 'use strict'; }(this, (function (Data, EventHandler, SelectorEngine) { 'use strict';
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data; Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler; EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine; SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) { function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) { for (var i = 0; i < props.length; i++) {
@ -58,32 +58,25 @@
var DATA_KEY = 'bs.button'; var DATA_KEY = 'bs.button';
var EVENT_KEY = "." + DATA_KEY; var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api'; var DATA_API_KEY = '.data-api';
var ClassName = { var CLASS_NAME_ACTIVE = 'active';
ACTIVE: 'active', var CLASS_NAME_BUTTON = 'btn';
BUTTON: 'btn', var CLASS_NAME_DISABLED = 'disabled';
FOCUS: 'focus' var CLASS_NAME_FOCUS = 'focus';
}; var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]';
var Selector = { var SELECTOR_DATA_TOGGLE = '[data-toggle="buttons"]';
DATA_TOGGLE_CARROT: '[data-toggle^="button"]', var SELECTOR_INPUT = 'input:not([type="hidden"])';
DATA_TOGGLE: '[data-toggle="buttons"]', var SELECTOR_ACTIVE = '.active';
INPUT: 'input:not([type="hidden"])', var SELECTOR_BUTTON = '.btn';
ACTIVE: '.active', var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
BUTTON: '.btn' var EVENT_FOCUS_DATA_API = "focus" + EVENT_KEY + DATA_API_KEY;
}; var EVENT_BLUR_DATA_API = "blur" + EVENT_KEY + DATA_API_KEY;
var Event = {
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
FOCUS_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY,
BLUR_DATA_API: "blur" + EVENT_KEY + DATA_API_KEY
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var Button = var Button = /*#__PURE__*/function () {
/*#__PURE__*/
function () {
function Button(element) { function Button(element) {
this._element = element; this._element = element;
Data.setData(element, DATA_KEY, this); Data.setData(element, DATA_KEY, this);
@ -96,28 +89,28 @@
_proto.toggle = function toggle() { _proto.toggle = function toggle() {
var triggerChangeEvent = true; var triggerChangeEvent = true;
var addAriaPressed = true; var addAriaPressed = true;
var rootElement = SelectorEngine.closest(this._element, Selector.DATA_TOGGLE); var rootElement = SelectorEngine.closest(this._element, SELECTOR_DATA_TOGGLE);
if (rootElement) { if (rootElement) {
var input = SelectorEngine.findOne(Selector.INPUT, this._element); var input = SelectorEngine.findOne(SELECTOR_INPUT, this._element);
if (input && input.type === 'radio') { if (input && input.type === 'radio') {
if (input.checked && this._element.classList.contains(ClassName.ACTIVE)) { if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
triggerChangeEvent = false; triggerChangeEvent = false;
} else { } else {
var activeElement = SelectorEngine.findOne(Selector.ACTIVE, rootElement); var activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE, rootElement);
if (activeElement) { if (activeElement) {
activeElement.classList.remove(ClassName.ACTIVE); activeElement.classList.remove(CLASS_NAME_ACTIVE);
} }
} }
if (triggerChangeEvent) { if (triggerChangeEvent) {
if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) { if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains(CLASS_NAME_DISABLED) || rootElement.classList.contains(CLASS_NAME_DISABLED)) {
return; return;
} }
input.checked = !this._element.classList.contains(ClassName.ACTIVE); input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE);
EventHandler.trigger(input, 'change'); EventHandler.trigger(input, 'change');
} }
@ -127,11 +120,11 @@
} }
if (addAriaPressed) { if (addAriaPressed) {
this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName.ACTIVE)); this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE));
} }
if (triggerChangeEvent) { if (triggerChangeEvent) {
this._element.classList.toggle(ClassName.ACTIVE); this._element.classList.toggle(CLASS_NAME_ACTIVE);
} }
}; };
@ -175,12 +168,12 @@
*/ */
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
event.preventDefault(); event.preventDefault();
var button = event.target; var button = event.target;
if (!button.classList.contains(ClassName.BUTTON)) { if (!button.classList.contains(CLASS_NAME_BUTTON)) {
button = SelectorEngine.closest(button, Selector.BUTTON); button = SelectorEngine.closest(button, SELECTOR_BUTTON);
} }
var data = Data.getData(button, DATA_KEY); var data = Data.getData(button, DATA_KEY);
@ -191,18 +184,18 @@
data.toggle(); data.toggle();
}); });
EventHandler.on(document, Event.FOCUS_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { EventHandler.on(document, EVENT_FOCUS_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
var button = SelectorEngine.closest(event.target, Selector.BUTTON); var button = SelectorEngine.closest(event.target, SELECTOR_BUTTON);
if (button) { if (button) {
button.classList.add(ClassName.FOCUS); button.classList.add(CLASS_NAME_FOCUS);
} }
}); });
EventHandler.on(document, Event.BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { EventHandler.on(document, EVENT_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
var button = SelectorEngine.closest(event.target, Selector.BUTTON); var button = SelectorEngine.closest(event.target, SELECTOR_BUTTON);
if (button) { if (button) {
button.classList.remove(ClassName.FOCUS); button.classList.remove(CLASS_NAME_FOCUS);
} }
}); });
var $ = getjQuery(); var $ = getjQuery();

File diff suppressed because one or more lines are too long

203
js/dist/carousel.js vendored
View File

@ -1,6 +1,6 @@
/*! /*!
* Bootstrap carousel.js v4.3.1 (https://getbootstrap.com/) * Bootstrap carousel.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
@ -9,10 +9,10 @@
(global = global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); (global = global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; }(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data; Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler; EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator; Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine; SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) { function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) { for (var i = 0; i < props.length; i++) {
@ -64,13 +64,13 @@
var source = arguments[i] != null ? arguments[i] : {}; var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) { if (i % 2) {
ownKeys(source, true).forEach(function (key) { ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]); _defineProperty(target, key, source[key]);
}); });
} else if (Object.getOwnPropertyDescriptors) { } else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else { } else {
ownKeys(source).forEach(function (key) { ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
}); });
} }
@ -89,6 +89,10 @@
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var toType = function toType(obj) { var toType = function toType(obj) {
if (obj === null || obj === undefined) {
return "" + obj;
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
}; };
@ -132,9 +136,7 @@
}; };
var triggerTransitionEnd = function triggerTransitionEnd(element) { var triggerTransitionEnd = function triggerTransitionEnd(element) {
var evt = document.createEvent('HTMLEvents'); element.dispatchEvent(new Event(TRANSITION_END));
evt.initEvent(TRANSITION_END, true, true);
element.dispatchEvent(evt);
}; };
var isElement = function isElement(obj) { var isElement = function isElement(obj) {
@ -171,14 +173,6 @@
}); });
}; };
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
var isVisible = function isVisible(element) { var isVisible = function isVisible(element) {
if (!element) { if (!element) {
return false; return false;
@ -242,48 +236,39 @@
wrap: 'boolean', wrap: 'boolean',
touch: 'boolean' touch: 'boolean'
}; };
var Direction = { var DIRECTION_NEXT = 'next';
NEXT: 'next', var DIRECTION_PREV = 'prev';
PREV: 'prev', var DIRECTION_LEFT = 'left';
LEFT: 'left', var DIRECTION_RIGHT = 'right';
RIGHT: 'right' var EVENT_SLIDE = "slide" + EVENT_KEY;
}; var EVENT_SLID = "slid" + EVENT_KEY;
var Event = { var EVENT_KEYDOWN = "keydown" + EVENT_KEY;
SLIDE: "slide" + EVENT_KEY, var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY;
SLID: "slid" + EVENT_KEY, var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY;
KEYDOWN: "keydown" + EVENT_KEY, var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY;
MOUSEENTER: "mouseenter" + EVENT_KEY, var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY;
MOUSELEAVE: "mouseleave" + EVENT_KEY, var EVENT_TOUCHEND = "touchend" + EVENT_KEY;
TOUCHSTART: "touchstart" + EVENT_KEY, var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY;
TOUCHMOVE: "touchmove" + EVENT_KEY, var EVENT_POINTERUP = "pointerup" + EVENT_KEY;
TOUCHEND: "touchend" + EVENT_KEY, var EVENT_DRAG_START = "dragstart" + EVENT_KEY;
POINTERDOWN: "pointerdown" + EVENT_KEY, var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
POINTERUP: "pointerup" + EVENT_KEY, var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
DRAG_START: "dragstart" + EVENT_KEY, var CLASS_NAME_CAROUSEL = 'carousel';
LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY, var CLASS_NAME_ACTIVE = 'active';
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY var CLASS_NAME_SLIDE = 'slide';
}; var CLASS_NAME_RIGHT = 'carousel-item-right';
var ClassName = { var CLASS_NAME_LEFT = 'carousel-item-left';
CAROUSEL: 'carousel', var CLASS_NAME_NEXT = 'carousel-item-next';
ACTIVE: 'active', var CLASS_NAME_PREV = 'carousel-item-prev';
SLIDE: 'slide', var CLASS_NAME_POINTER_EVENT = 'pointer-event';
RIGHT: 'carousel-item-right', var SELECTOR_ACTIVE = '.active';
LEFT: 'carousel-item-left', var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
NEXT: 'carousel-item-next', var SELECTOR_ITEM = '.carousel-item';
PREV: 'carousel-item-prev', var SELECTOR_ITEM_IMG = '.carousel-item img';
ITEM: 'carousel-item', var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
POINTER_EVENT: 'pointer-event' var SELECTOR_INDICATORS = '.carousel-indicators';
}; var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
var Selector = { var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
ACTIVE: '.active',
ACTIVE_ITEM: '.active.carousel-item',
ITEM: '.carousel-item',
ITEM_IMG: '.carousel-item img',
NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
INDICATORS: '.carousel-indicators',
DATA_SLIDE: '[data-slide], [data-slide-to]',
DATA_RIDE: '[data-ride="carousel"]'
};
var PointerType = { var PointerType = {
TOUCH: 'touch', TOUCH: 'touch',
PEN: 'pen' PEN: 'pen'
@ -294,9 +279,7 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var Carousel = var Carousel = /*#__PURE__*/function () {
/*#__PURE__*/
function () {
function Carousel(element, config) { function Carousel(element, config) {
this._items = null; this._items = null;
this._interval = null; this._interval = null;
@ -308,7 +291,7 @@
this.touchDeltaX = 0; this.touchDeltaX = 0;
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._element = element; this._element = element;
this._indicatorsElement = SelectorEngine.findOne(Selector.INDICATORS, this._element); this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0; this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent); this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
@ -323,7 +306,7 @@
// Public // Public
_proto.next = function next() { _proto.next = function next() {
if (!this._isSliding) { if (!this._isSliding) {
this._slide(Direction.NEXT); this._slide(DIRECTION_NEXT);
} }
}; };
@ -337,7 +320,7 @@
_proto.prev = function prev() { _proto.prev = function prev() {
if (!this._isSliding) { if (!this._isSliding) {
this._slide(Direction.PREV); this._slide(DIRECTION_PREV);
} }
}; };
@ -346,7 +329,7 @@
this._isPaused = true; this._isPaused = true;
} }
if (SelectorEngine.findOne(Selector.NEXT_PREV, this._element)) { if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {
triggerTransitionEnd(this._element); triggerTransitionEnd(this._element);
this.cycle(true); this.cycle(true);
} }
@ -373,7 +356,7 @@
_proto.to = function to(index) { _proto.to = function to(index) {
var _this = this; var _this = this;
this._activeElement = SelectorEngine.findOne(Selector.ACTIVE_ITEM, this._element); this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
var activeIndex = this._getItemIndex(this._activeElement); var activeIndex = this._getItemIndex(this._activeElement);
@ -382,7 +365,7 @@
} }
if (this._isSliding) { if (this._isSliding) {
EventHandler.one(this._element, Event.SLID, function () { EventHandler.one(this._element, EVENT_SLID, function () {
return _this.to(index); return _this.to(index);
}); });
return; return;
@ -394,7 +377,7 @@
return; return;
} }
var direction = index > activeIndex ? Direction.NEXT : Direction.PREV; var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
this._slide(direction, this._items[index]); this._slide(direction, this._items[index]);
}; };
@ -443,16 +426,16 @@
var _this2 = this; var _this2 = this;
if (this._config.keyboard) { if (this._config.keyboard) {
EventHandler.on(this._element, Event.KEYDOWN, function (event) { EventHandler.on(this._element, EVENT_KEYDOWN, function (event) {
return _this2._keydown(event); return _this2._keydown(event);
}); });
} }
if (this._config.pause === 'hover') { if (this._config.pause === 'hover') {
EventHandler.on(this._element, Event.MOUSEENTER, function (event) { EventHandler.on(this._element, EVENT_MOUSEENTER, function (event) {
return _this2.pause(event); return _this2.pause(event);
}); });
EventHandler.on(this._element, Event.MOUSELEAVE, function (event) { EventHandler.on(this._element, EVENT_MOUSELEAVE, function (event) {
return _this2.cycle(event); return _this2.cycle(event);
}); });
} }
@ -509,29 +492,29 @@
} }
}; };
makeArray(SelectorEngine.find(Selector.ITEM_IMG, this._element)).forEach(function (itemImg) { SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(function (itemImg) {
EventHandler.on(itemImg, Event.DRAG_START, function (e) { EventHandler.on(itemImg, EVENT_DRAG_START, function (e) {
return e.preventDefault(); return e.preventDefault();
}); });
}); });
if (this._pointerEvent) { if (this._pointerEvent) {
EventHandler.on(this._element, Event.POINTERDOWN, function (event) { EventHandler.on(this._element, EVENT_POINTERDOWN, function (event) {
return start(event); return start(event);
}); });
EventHandler.on(this._element, Event.POINTERUP, function (event) { EventHandler.on(this._element, EVENT_POINTERUP, function (event) {
return end(event); return end(event);
}); });
this._element.classList.add(ClassName.POINTER_EVENT); this._element.classList.add(CLASS_NAME_POINTER_EVENT);
} else { } else {
EventHandler.on(this._element, Event.TOUCHSTART, function (event) { EventHandler.on(this._element, EVENT_TOUCHSTART, function (event) {
return start(event); return start(event);
}); });
EventHandler.on(this._element, Event.TOUCHMOVE, function (event) { EventHandler.on(this._element, EVENT_TOUCHMOVE, function (event) {
return move(event); return move(event);
}); });
EventHandler.on(this._element, Event.TOUCHEND, function (event) { EventHandler.on(this._element, EVENT_TOUCHEND, function (event) {
return end(event); return end(event);
}); });
} }
@ -556,13 +539,13 @@
}; };
_proto._getItemIndex = function _getItemIndex(element) { _proto._getItemIndex = function _getItemIndex(element) {
this._items = element && element.parentNode ? makeArray(SelectorEngine.find(Selector.ITEM, element.parentNode)) : []; this._items = element && element.parentNode ? SelectorEngine.find(SELECTOR_ITEM, element.parentNode) : [];
return this._items.indexOf(element); return this._items.indexOf(element);
}; };
_proto._getItemByDirection = function _getItemByDirection(direction, activeElement) { _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
var isNextDirection = direction === Direction.NEXT; var isNextDirection = direction === DIRECTION_NEXT;
var isPrevDirection = direction === Direction.PREV; var isPrevDirection = direction === DIRECTION_PREV;
var activeIndex = this._getItemIndex(activeElement); var activeIndex = this._getItemIndex(activeElement);
@ -573,7 +556,7 @@
return activeElement; return activeElement;
} }
var delta = direction === Direction.PREV ? -1 : 1; var delta = direction === DIRECTION_PREV ? -1 : 1;
var itemIndex = (activeIndex + delta) % this._items.length; var itemIndex = (activeIndex + delta) % this._items.length;
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
}; };
@ -581,9 +564,9 @@
_proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) { _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
var targetIndex = this._getItemIndex(relatedTarget); var targetIndex = this._getItemIndex(relatedTarget);
var fromIndex = this._getItemIndex(SelectorEngine.findOne(Selector.ACTIVE_ITEM, this._element)); var fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element));
return EventHandler.trigger(this._element, Event.SLIDE, { return EventHandler.trigger(this._element, EVENT_SLIDE, {
relatedTarget: relatedTarget, relatedTarget: relatedTarget,
direction: eventDirectionName, direction: eventDirectionName,
from: fromIndex, from: fromIndex,
@ -593,16 +576,16 @@
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
if (this._indicatorsElement) { if (this._indicatorsElement) {
var indicators = SelectorEngine.find(Selector.ACTIVE, this._indicatorsElement); var indicators = SelectorEngine.find(SELECTOR_ACTIVE, this._indicatorsElement);
for (var i = 0; i < indicators.length; i++) { for (var i = 0; i < indicators.length; i++) {
indicators[i].classList.remove(ClassName.ACTIVE); indicators[i].classList.remove(CLASS_NAME_ACTIVE);
} }
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
if (nextIndicator) { if (nextIndicator) {
nextIndicator.classList.add(ClassName.ACTIVE); nextIndicator.classList.add(CLASS_NAME_ACTIVE);
} }
} }
}; };
@ -610,7 +593,7 @@
_proto._slide = function _slide(direction, element) { _proto._slide = function _slide(direction, element) {
var _this4 = this; var _this4 = this;
var activeElement = SelectorEngine.findOne(Selector.ACTIVE_ITEM, this._element); var activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);
var activeElementIndex = this._getItemIndex(activeElement); var activeElementIndex = this._getItemIndex(activeElement);
@ -623,17 +606,17 @@
var orderClassName; var orderClassName;
var eventDirectionName; var eventDirectionName;
if (direction === Direction.NEXT) { if (direction === DIRECTION_NEXT) {
directionalClassName = ClassName.LEFT; directionalClassName = CLASS_NAME_LEFT;
orderClassName = ClassName.NEXT; orderClassName = CLASS_NAME_NEXT;
eventDirectionName = Direction.LEFT; eventDirectionName = DIRECTION_LEFT;
} else { } else {
directionalClassName = ClassName.RIGHT; directionalClassName = CLASS_NAME_RIGHT;
orderClassName = ClassName.PREV; orderClassName = CLASS_NAME_PREV;
eventDirectionName = Direction.RIGHT; eventDirectionName = DIRECTION_RIGHT;
} }
if (nextElement && nextElement.classList.contains(ClassName.ACTIVE)) { if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) {
this._isSliding = false; this._isSliding = false;
return; return;
} }
@ -657,7 +640,7 @@
this._setActiveIndicatorElement(nextElement); this._setActiveIndicatorElement(nextElement);
if (this._element.classList.contains(ClassName.SLIDE)) { if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
nextElement.classList.add(orderClassName); nextElement.classList.add(orderClassName);
reflow(nextElement); reflow(nextElement);
activeElement.classList.add(directionalClassName); activeElement.classList.add(directionalClassName);
@ -675,13 +658,13 @@
EventHandler.one(activeElement, TRANSITION_END, function () { EventHandler.one(activeElement, TRANSITION_END, function () {
nextElement.classList.remove(directionalClassName); nextElement.classList.remove(directionalClassName);
nextElement.classList.remove(orderClassName); nextElement.classList.remove(orderClassName);
nextElement.classList.add(ClassName.ACTIVE); nextElement.classList.add(CLASS_NAME_ACTIVE);
activeElement.classList.remove(ClassName.ACTIVE); activeElement.classList.remove(CLASS_NAME_ACTIVE);
activeElement.classList.remove(orderClassName); activeElement.classList.remove(orderClassName);
activeElement.classList.remove(directionalClassName); activeElement.classList.remove(directionalClassName);
_this4._isSliding = false; _this4._isSliding = false;
setTimeout(function () { setTimeout(function () {
EventHandler.trigger(_this4._element, Event.SLID, { EventHandler.trigger(_this4._element, EVENT_SLID, {
relatedTarget: nextElement, relatedTarget: nextElement,
direction: eventDirectionName, direction: eventDirectionName,
from: activeElementIndex, from: activeElementIndex,
@ -691,10 +674,10 @@
}); });
emulateTransitionEnd(activeElement, transitionDuration); emulateTransitionEnd(activeElement, transitionDuration);
} else { } else {
activeElement.classList.remove(ClassName.ACTIVE); activeElement.classList.remove(CLASS_NAME_ACTIVE);
nextElement.classList.add(ClassName.ACTIVE); nextElement.classList.add(CLASS_NAME_ACTIVE);
this._isSliding = false; this._isSliding = false;
EventHandler.trigger(this._element, Event.SLID, { EventHandler.trigger(this._element, EVENT_SLID, {
relatedTarget: nextElement, relatedTarget: nextElement,
direction: eventDirectionName, direction: eventDirectionName,
from: activeElementIndex, from: activeElementIndex,
@ -746,7 +729,7 @@
Carousel.dataApiClickHandler = function dataApiClickHandler(event) { Carousel.dataApiClickHandler = function dataApiClickHandler(event) {
var target = getElementFromSelector(this); var target = getElementFromSelector(this);
if (!target || !target.classList.contains(ClassName.CAROUSEL)) { if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
return; return;
} }
@ -792,9 +775,9 @@
*/ */
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel.dataApiClickHandler); EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);
EventHandler.on(window, Event.LOAD_DATA_API, function () { EventHandler.on(window, EVENT_LOAD_DATA_API, function () {
var carousels = makeArray(SelectorEngine.find(Selector.DATA_RIDE)); var carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
for (var i = 0, len = carousels.length; i < len; i++) { for (var i = 0, len = carousels.length; i < len; i++) {
Carousel.carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY)); Carousel.carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY));

File diff suppressed because one or more lines are too long

136
js/dist/collapse.js vendored
View File

@ -1,6 +1,6 @@
/*! /*!
* Bootstrap collapse.js v4.3.1 (https://getbootstrap.com/) * Bootstrap collapse.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
@ -9,10 +9,10 @@
(global = global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); (global = global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; }(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data; Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler; EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator; Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine; SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) { function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) { for (var i = 0; i < props.length; i++) {
@ -64,13 +64,13 @@
var source = arguments[i] != null ? arguments[i] : {}; var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) { if (i % 2) {
ownKeys(source, true).forEach(function (key) { ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]); _defineProperty(target, key, source[key]);
}); });
} else if (Object.getOwnPropertyDescriptors) { } else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else { } else {
ownKeys(source).forEach(function (key) { ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
}); });
} }
@ -89,6 +89,10 @@
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var toType = function toType(obj) { var toType = function toType(obj) {
if (obj === null || obj === undefined) {
return "" + obj;
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
}; };
@ -142,9 +146,7 @@
}; };
var triggerTransitionEnd = function triggerTransitionEnd(element) { var triggerTransitionEnd = function triggerTransitionEnd(element) {
var evt = document.createEvent('HTMLEvents'); element.dispatchEvent(new Event(TRANSITION_END));
evt.initEvent(TRANSITION_END, true, true);
element.dispatchEvent(evt);
}; };
var isElement = function isElement(obj) { var isElement = function isElement(obj) {
@ -181,14 +183,6 @@
}); });
}; };
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
var reflow = function reflow(element) { var reflow = function reflow(element) {
return element.offsetHeight; return element.offsetHeight;
}; };
@ -223,47 +217,37 @@
toggle: 'boolean', toggle: 'boolean',
parent: '(string|element)' parent: '(string|element)'
}; };
var Event = { var EVENT_SHOW = "show" + EVENT_KEY;
SHOW: "show" + EVENT_KEY, var EVENT_SHOWN = "shown" + EVENT_KEY;
SHOWN: "shown" + EVENT_KEY, var EVENT_HIDE = "hide" + EVENT_KEY;
HIDE: "hide" + EVENT_KEY, var EVENT_HIDDEN = "hidden" + EVENT_KEY;
HIDDEN: "hidden" + EVENT_KEY, var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY var CLASS_NAME_SHOW = 'show';
}; var CLASS_NAME_COLLAPSE = 'collapse';
var ClassName = { var CLASS_NAME_COLLAPSING = 'collapsing';
SHOW: 'show', var CLASS_NAME_COLLAPSED = 'collapsed';
COLLAPSE: 'collapse', var WIDTH = 'width';
COLLAPSING: 'collapsing', var HEIGHT = 'height';
COLLAPSED: 'collapsed' var SELECTOR_ACTIVES = '.show, .collapsing';
}; var SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]';
var Dimension = {
WIDTH: 'width',
HEIGHT: 'height'
};
var Selector = {
ACTIVES: '.show, .collapsing',
DATA_TOGGLE: '[data-toggle="collapse"]'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var Collapse = var Collapse = /*#__PURE__*/function () {
/*#__PURE__*/
function () {
function Collapse(element, config) { function Collapse(element, config) {
this._isTransitioning = false; this._isTransitioning = false;
this._element = element; this._element = element;
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._triggerArray = makeArray(SelectorEngine.find("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]"))); this._triggerArray = SelectorEngine.find(SELECTOR_DATA_TOGGLE + "[href=\"#" + element.id + "\"]," + (SELECTOR_DATA_TOGGLE + "[data-target=\"#" + element.id + "\"]"));
var toggleList = makeArray(SelectorEngine.find(Selector.DATA_TOGGLE)); var toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE);
for (var i = 0, len = toggleList.length; i < len; i++) { for (var i = 0, len = toggleList.length; i < len; i++) {
var elem = toggleList[i]; var elem = toggleList[i];
var selector = getSelectorFromElement(elem); var selector = getSelectorFromElement(elem);
var filterElement = makeArray(SelectorEngine.find(selector)).filter(function (foundElem) { var filterElement = SelectorEngine.find(selector).filter(function (foundElem) {
return foundElem === element; return foundElem === element;
}); });
@ -292,7 +276,7 @@
// Public // Public
_proto.toggle = function toggle() { _proto.toggle = function toggle() {
if (this._element.classList.contains(ClassName.SHOW)) { if (this._element.classList.contains(CLASS_NAME_SHOW)) {
this.hide(); this.hide();
} else { } else {
this.show(); this.show();
@ -302,7 +286,7 @@
_proto.show = function show() { _proto.show = function show() {
var _this = this; var _this = this;
if (this._isTransitioning || this._element.classList.contains(ClassName.SHOW)) { if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {
return; return;
} }
@ -310,12 +294,12 @@
var activesData; var activesData;
if (this._parent) { if (this._parent) {
actives = makeArray(SelectorEngine.find(Selector.ACTIVES, this._parent)).filter(function (elem) { actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent).filter(function (elem) {
if (typeof _this._config.parent === 'string') { if (typeof _this._config.parent === 'string') {
return elem.getAttribute('data-parent') === _this._config.parent; return elem.getAttribute('data-parent') === _this._config.parent;
} }
return elem.classList.contains(ClassName.COLLAPSE); return elem.classList.contains(CLASS_NAME_COLLAPSE);
}); });
if (actives.length === 0) { if (actives.length === 0) {
@ -336,7 +320,7 @@
} }
} }
var startEvent = EventHandler.trigger(this._element, Event.SHOW); var startEvent = EventHandler.trigger(this._element, EVENT_SHOW);
if (startEvent.defaultPrevented) { if (startEvent.defaultPrevented) {
return; return;
@ -356,15 +340,15 @@
var dimension = this._getDimension(); var dimension = this._getDimension();
this._element.classList.remove(ClassName.COLLAPSE); this._element.classList.remove(CLASS_NAME_COLLAPSE);
this._element.classList.add(ClassName.COLLAPSING); this._element.classList.add(CLASS_NAME_COLLAPSING);
this._element.style[dimension] = 0; this._element.style[dimension] = 0;
if (this._triggerArray.length) { if (this._triggerArray.length) {
this._triggerArray.forEach(function (element) { this._triggerArray.forEach(function (element) {
element.classList.remove(ClassName.COLLAPSED); element.classList.remove(CLASS_NAME_COLLAPSED);
element.setAttribute('aria-expanded', true); element.setAttribute('aria-expanded', true);
}); });
} }
@ -372,17 +356,17 @@
this.setTransitioning(true); this.setTransitioning(true);
var complete = function complete() { var complete = function complete() {
_this._element.classList.remove(ClassName.COLLAPSING); _this._element.classList.remove(CLASS_NAME_COLLAPSING);
_this._element.classList.add(ClassName.COLLAPSE); _this._element.classList.add(CLASS_NAME_COLLAPSE);
_this._element.classList.add(ClassName.SHOW); _this._element.classList.add(CLASS_NAME_SHOW);
_this._element.style[dimension] = ''; _this._element.style[dimension] = '';
_this.setTransitioning(false); _this.setTransitioning(false);
EventHandler.trigger(_this._element, Event.SHOWN); EventHandler.trigger(_this._element, EVENT_SHOWN);
}; };
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
@ -396,11 +380,11 @@
_proto.hide = function hide() { _proto.hide = function hide() {
var _this2 = this; var _this2 = this;
if (this._isTransitioning || !this._element.classList.contains(ClassName.SHOW)) { if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {
return; return;
} }
var startEvent = EventHandler.trigger(this._element, Event.HIDE); var startEvent = EventHandler.trigger(this._element, EVENT_HIDE);
if (startEvent.defaultPrevented) { if (startEvent.defaultPrevented) {
return; return;
@ -411,11 +395,11 @@
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px"; this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
reflow(this._element); reflow(this._element);
this._element.classList.add(ClassName.COLLAPSING); this._element.classList.add(CLASS_NAME_COLLAPSING);
this._element.classList.remove(ClassName.COLLAPSE); this._element.classList.remove(CLASS_NAME_COLLAPSE);
this._element.classList.remove(ClassName.SHOW); this._element.classList.remove(CLASS_NAME_SHOW);
var triggerArrayLength = this._triggerArray.length; var triggerArrayLength = this._triggerArray.length;
@ -424,8 +408,8 @@
var trigger = this._triggerArray[i]; var trigger = this._triggerArray[i];
var elem = getElementFromSelector(trigger); var elem = getElementFromSelector(trigger);
if (elem && !elem.classList.contains(ClassName.SHOW)) { if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {
trigger.classList.add(ClassName.COLLAPSED); trigger.classList.add(CLASS_NAME_COLLAPSED);
trigger.setAttribute('aria-expanded', false); trigger.setAttribute('aria-expanded', false);
} }
} }
@ -436,11 +420,11 @@
var complete = function complete() { var complete = function complete() {
_this2.setTransitioning(false); _this2.setTransitioning(false);
_this2._element.classList.remove(ClassName.COLLAPSING); _this2._element.classList.remove(CLASS_NAME_COLLAPSING);
_this2._element.classList.add(ClassName.COLLAPSE); _this2._element.classList.add(CLASS_NAME_COLLAPSE);
EventHandler.trigger(_this2._element, Event.HIDDEN); EventHandler.trigger(_this2._element, EVENT_HIDDEN);
}; };
this._element.style[dimension] = ''; this._element.style[dimension] = '';
@ -472,9 +456,9 @@
}; };
_proto._getDimension = function _getDimension() { _proto._getDimension = function _getDimension() {
var hasWidth = this._element.classList.contains(Dimension.WIDTH); var hasWidth = this._element.classList.contains(WIDTH);
return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; return hasWidth ? WIDTH : HEIGHT;
}; };
_proto._getParent = function _getParent() { _proto._getParent = function _getParent() {
@ -491,8 +475,8 @@
parent = SelectorEngine.findOne(parent); parent = SelectorEngine.findOne(parent);
} }
var selector = "[data-toggle=\"collapse\"][data-parent=\"" + parent + "\"]"; var selector = SELECTOR_DATA_TOGGLE + "[data-parent=\"" + parent + "\"]";
makeArray(SelectorEngine.find(selector, parent)).forEach(function (element) { SelectorEngine.find(selector, parent).forEach(function (element) {
var selected = getElementFromSelector(element); var selected = getElementFromSelector(element);
_this3._addAriaAndCollapsedClass(selected, [element]); _this3._addAriaAndCollapsedClass(selected, [element]);
@ -502,14 +486,14 @@
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
if (element) { if (element) {
var isOpen = element.classList.contains(ClassName.SHOW); var isOpen = element.classList.contains(CLASS_NAME_SHOW);
if (triggerArray.length) { if (triggerArray.length) {
triggerArray.forEach(function (elem) { triggerArray.forEach(function (elem) {
if (isOpen) { if (isOpen) {
elem.classList.remove(ClassName.COLLAPSED); elem.classList.remove(CLASS_NAME_COLLAPSED);
} else { } else {
elem.classList.add(ClassName.COLLAPSED); elem.classList.add(CLASS_NAME_COLLAPSED);
} }
elem.setAttribute('aria-expanded', isOpen); elem.setAttribute('aria-expanded', isOpen);
@ -572,7 +556,7 @@
*/ */
EventHandler.on(document, Event.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 // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
if (event.target.tagName === 'A') { if (event.target.tagName === 'A') {
event.preventDefault(); event.preventDefault();
@ -580,7 +564,7 @@
var triggerData = Manipulator.getDataAttributes(this); var triggerData = Manipulator.getDataAttributes(this);
var selector = getSelectorFromElement(this); var selector = getSelectorFromElement(this);
var selectorElements = makeArray(SelectorEngine.find(selector)); var selectorElements = SelectorEngine.find(selector);
selectorElements.forEach(function (element) { selectorElements.forEach(function (element) {
var data = Data.getData(element, DATA_KEY); var data = Data.getData(element, DATA_KEY);
var config; var config;

File diff suppressed because one or more lines are too long

2
js/dist/dom/data.js vendored
View File

@ -1,6 +1,6 @@
/*! /*!
* Bootstrap data.js v4.3.1 (https://getbootstrap.com/) * Bootstrap data.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {

View File

@ -1,6 +1,6 @@
/*! /*!
* Bootstrap event-handler.js v4.3.1 (https://getbootstrap.com/) * Bootstrap event-handler.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
@ -279,7 +279,7 @@
evt = document.createEvent('HTMLEvents'); evt = document.createEvent('HTMLEvents');
evt.initEvent(typeEvent, bubbles, true); evt.initEvent(typeEvent, bubbles, true);
} else { } else {
evt = polyfill_js.createCustomEvent(event, { evt = new CustomEvent(event, {
bubbles: bubbles, bubbles: bubbles,
cancelable: true cancelable: true
}); });

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
/*! /*!
* Bootstrap manipulator.js v4.3.1 (https://getbootstrap.com/) * Bootstrap manipulator.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
@ -43,13 +43,13 @@
var source = arguments[i] != null ? arguments[i] : {}; var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) { if (i % 2) {
ownKeys(source, true).forEach(function (key) { ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]); _defineProperty(target, key, source[key]);
}); });
} else if (Object.getOwnPropertyDescriptors) { } else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else { } else {
ownKeys(source).forEach(function (key) { ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
}); });
} }

View File

@ -1,6 +1,6 @@
/*! /*!
* Bootstrap polyfill.js v4.3.1 (https://getbootstrap.com/) * Bootstrap polyfill.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
@ -32,58 +32,11 @@
}; };
/* istanbul ignore file */ /* istanbul ignore file */
var _Element$prototype = Element.prototype;
exports.matches = _Element$prototype.matches;
exports.closest = _Element$prototype.closest;
exports.find = Element.prototype.querySelectorAll; exports.find = Element.prototype.querySelectorAll;
exports.findOne = Element.prototype.querySelector; exports.findOne = Element.prototype.querySelector; // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
exports.createCustomEvent = function createCustomEvent(eventName, params) {
var cEvent = new CustomEvent(eventName, params);
return cEvent;
};
if (typeof window.CustomEvent !== 'function') {
exports.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 defaultPreventedPreservedOnDispatch = function () {
var e = exports.createCustomEvent('Bootstrap', { var e = new CustomEvent('Bootstrap', {
cancelable: true cancelable: true
}); });
var element = document.createElement('div'); var element = document.createElement('div');
@ -95,26 +48,6 @@
return e.defaultPrevented; return e.defaultPrevented;
}(); }();
if (!exports.matches) {
exports.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
}
if (!exports.closest) {
exports.closest = function closest(selector) {
var element = this;
do {
if (exports.matches.call(element, selector)) {
return element;
}
element = element.parentElement || element.parentNode;
} while (element !== null && element.nodeType === 1);
return null;
};
}
var scopeSelectorRegex = /:scope\b/; var scopeSelectorRegex = /:scope\b/;
var supportScopeQuery = function () { var supportScopeQuery = function () {

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
/*! /*!
* Bootstrap selector-engine.js v4.3.1 (https://getbootstrap.com/) * Bootstrap selector-engine.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
@ -9,21 +9,6 @@
(global = global || self, global.SelectorEngine = factory(global.Polyfill)); (global = global || self, global.SelectorEngine = factory(global.Polyfill));
}(this, (function (polyfill_js) { 'use strict'; }(this, (function (polyfill_js) { 'use strict';
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.3.1): util/index.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
/** /**
* -------------------------------------------------------------------------- * --------------------------------------------------------------------------
* Bootstrap (v4.3.1): dom/selector-engine.js * Bootstrap (v4.3.1): dom/selector-engine.js
@ -39,14 +24,16 @@
var NODE_TEXT = 3; var NODE_TEXT = 3;
var SelectorEngine = { var SelectorEngine = {
matches: function matches(element, selector) { matches: function matches(element, selector) {
return polyfill_js.matches.call(element, selector); return element.matches(selector);
}, },
find: function find(selector, element) { find: function find(selector, element) {
var _ref;
if (element === void 0) { if (element === void 0) {
element = document.documentElement; element = document.documentElement;
} }
return polyfill_js.find.call(element, selector); return (_ref = []).concat.apply(_ref, polyfill_js.find.call(element, selector));
}, },
findOne: function findOne(selector, element) { findOne: function findOne(selector, element) {
if (element === void 0) { if (element === void 0) {
@ -56,11 +43,12 @@
return polyfill_js.findOne.call(element, selector); return polyfill_js.findOne.call(element, selector);
}, },
children: function children(element, selector) { children: function children(element, selector) {
var _this = this; var _ref2;
var children = (_ref2 = []).concat.apply(_ref2, element.children);
var children = makeArray(element.children);
return children.filter(function (child) { return children.filter(function (child) {
return _this.matches(child, selector); return child.matches(selector);
}); });
}, },
parents: function parents(element, selector) { parents: function parents(element, selector) {
@ -78,21 +66,33 @@
return parents; return parents;
}, },
closest: function closest(element, selector) { closest: function closest(element, selector) {
return polyfill_js.closest.call(element, selector); return element.closest(selector);
}, },
prev: function prev(element, selector) { prev: function prev(element, selector) {
var siblings = []; var previous = element.previousElementSibling;
var previous = element.previousSibling;
while (previous && previous.nodeType === Node.ELEMENT_NODE && previous.nodeType !== NODE_TEXT) { while (previous) {
if (this.matches(previous, selector)) { if (previous.matches(selector)) {
siblings.push(previous); return [previous];
} }
previous = previous.previousSibling; previous = previous.previousElementSibling;
} }
return siblings; return [];
},
next: function next(element, selector) {
var next = element.nextElementSibling;
while (next) {
if (this.matches(next, selector)) {
return [next];
}
next = next.nextElementSibling;
}
return [];
} }
}; };

File diff suppressed because one or more lines are too long

211
js/dist/dropdown.js vendored
View File

@ -1,6 +1,6 @@
/*! /*!
* Bootstrap dropdown.js v4.3.1 (https://getbootstrap.com/) * Bootstrap dropdown.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
@ -9,11 +9,11 @@
(global = global || self, global.Dropdown = factory(global.Data, global.EventHandler, global.Manipulator, global.Popper, global.SelectorEngine)); (global = global || self, global.Dropdown = factory(global.Data, global.EventHandler, global.Manipulator, global.Popper, global.SelectorEngine));
}(this, (function (Data, EventHandler, Manipulator, Popper, SelectorEngine) { 'use strict'; }(this, (function (Data, EventHandler, Manipulator, Popper, SelectorEngine) { 'use strict';
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data; Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler; EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator; Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper; Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine; SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) { function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) { for (var i = 0; i < props.length; i++) {
@ -65,13 +65,13 @@
var source = arguments[i] != null ? arguments[i] : {}; var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) { if (i % 2) {
ownKeys(source, true).forEach(function (key) { ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]); _defineProperty(target, key, source[key]);
}); });
} else if (Object.getOwnPropertyDescriptors) { } else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else { } else {
ownKeys(source).forEach(function (key) { ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
}); });
} }
@ -88,6 +88,10 @@
*/ */
var toType = function toType(obj) { var toType = function toType(obj) {
if (obj === null || obj === undefined) {
return "" + obj;
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
}; };
@ -123,14 +127,6 @@
}); });
}; };
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
var isVisible = function isVisible(element) { var isVisible = function isVisible(element) {
if (!element) { if (!element) {
return false; return false;
@ -184,42 +180,33 @@
var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse) var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse)
var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE); var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
var Event = { var EVENT_HIDE = "hide" + EVENT_KEY;
HIDE: "hide" + EVENT_KEY, var EVENT_HIDDEN = "hidden" + EVENT_KEY;
HIDDEN: "hidden" + EVENT_KEY, var EVENT_SHOW = "show" + EVENT_KEY;
SHOW: "show" + EVENT_KEY, var EVENT_SHOWN = "shown" + EVENT_KEY;
SHOWN: "shown" + EVENT_KEY, var EVENT_CLICK = "click" + EVENT_KEY;
CLICK: "click" + EVENT_KEY, var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY, var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY + DATA_API_KEY;
KEYDOWN_DATA_API: "keydown" + EVENT_KEY + DATA_API_KEY, var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY + DATA_API_KEY;
KEYUP_DATA_API: "keyup" + EVENT_KEY + DATA_API_KEY var CLASS_NAME_DISABLED = 'disabled';
}; var CLASS_NAME_SHOW = 'show';
var ClassName = { var CLASS_NAME_DROPUP = 'dropup';
DISABLED: 'disabled', var CLASS_NAME_DROPRIGHT = 'dropright';
SHOW: 'show', var CLASS_NAME_DROPLEFT = 'dropleft';
DROPUP: 'dropup', var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
DROPRIGHT: 'dropright', var CLASS_NAME_NAVBAR = 'navbar';
DROPLEFT: 'dropleft', var CLASS_NAME_POSITION_STATIC = 'position-static';
MENURIGHT: 'dropdown-menu-right', var SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]';
POSITION_STATIC: 'position-static' var SELECTOR_FORM_CHILD = '.dropdown form';
}; var SELECTOR_MENU = '.dropdown-menu';
var Selector = { var SELECTOR_NAVBAR_NAV = '.navbar-nav';
DATA_TOGGLE: '[data-toggle="dropdown"]', var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
FORM_CHILD: '.dropdown form', var PLACEMENT_TOP = 'top-start';
MENU: '.dropdown-menu', var PLACEMENT_TOPEND = 'top-end';
NAVBAR_NAV: '.navbar-nav', var PLACEMENT_BOTTOM = 'bottom-start';
VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)' var PLACEMENT_BOTTOMEND = 'bottom-end';
}; var PLACEMENT_RIGHT = 'right-start';
var AttachmentMap = { var PLACEMENT_LEFT = 'left-start';
TOP: 'top-start',
TOPEND: 'top-end',
BOTTOM: 'bottom-start',
BOTTOMEND: 'bottom-end',
RIGHT: 'right-start',
RIGHTEND: 'right-end',
LEFT: 'left-start',
LEFTEND: 'left-end'
};
var Default = { var Default = {
offset: 0, offset: 0,
flip: true, flip: true,
@ -242,9 +229,7 @@
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var Dropdown = var Dropdown = /*#__PURE__*/function () {
/*#__PURE__*/
function () {
function Dropdown(element, config) { function Dropdown(element, config) {
this._element = element; this._element = element;
this._popper = null; this._popper = null;
@ -262,11 +247,11 @@
// Public // Public
_proto.toggle = function toggle() { _proto.toggle = function toggle() {
if (this._element.disabled || this._element.classList.contains(ClassName.DISABLED)) { if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED)) {
return; return;
} }
var isActive = this._menu.classList.contains(ClassName.SHOW); var isActive = this._element.classList.contains(CLASS_NAME_SHOW);
Dropdown.clearMenus(); Dropdown.clearMenus();
@ -278,7 +263,7 @@
}; };
_proto.show = function show() { _proto.show = function show() {
if (this._element.disabled || this._element.classList.contains(ClassName.DISABLED) || this._menu.classList.contains(ClassName.SHOW)) { if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || this._menu.classList.contains(CLASS_NAME_SHOW)) {
return; return;
} }
@ -286,7 +271,7 @@
var relatedTarget = { var relatedTarget = {
relatedTarget: this._element relatedTarget: this._element
}; };
var showEvent = EventHandler.trigger(parent, Event.SHOW, relatedTarget); var showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget);
if (showEvent.defaultPrevented) { if (showEvent.defaultPrevented) {
return; return;
@ -314,7 +299,7 @@
if (this._config.boundary !== 'scrollParent') { if (this._config.boundary !== 'scrollParent') {
parent.classList.add(ClassName.POSITION_STATIC); parent.classList.add(CLASS_NAME_POSITION_STATIC);
} }
this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig()); this._popper = new Popper(referenceElement, this._menu, this._getPopperConfig());
@ -324,8 +309,10 @@
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement && !makeArray(SelectorEngine.closest(parent, Selector.NAVBAR_NAV)).length) { if ('ontouchstart' in document.documentElement && !SelectorEngine.closest(parent, SELECTOR_NAVBAR_NAV)) {
makeArray(document.body.children).forEach(function (elem) { var _ref;
(_ref = []).concat.apply(_ref, document.body.children).forEach(function (elem) {
return EventHandler.on(elem, 'mouseover', null, noop()); return EventHandler.on(elem, 'mouseover', null, noop());
}); });
} }
@ -334,13 +321,13 @@
this._element.setAttribute('aria-expanded', true); this._element.setAttribute('aria-expanded', true);
Manipulator.toggleClass(this._menu, ClassName.SHOW); Manipulator.toggleClass(this._menu, CLASS_NAME_SHOW);
Manipulator.toggleClass(parent, ClassName.SHOW); Manipulator.toggleClass(this._element, CLASS_NAME_SHOW);
EventHandler.trigger(parent, Event.SHOWN, relatedTarget); EventHandler.trigger(parent, EVENT_SHOWN, relatedTarget);
}; };
_proto.hide = function hide() { _proto.hide = function hide() {
if (this._element.disabled || this._element.classList.contains(ClassName.DISABLED) || !this._menu.classList.contains(ClassName.SHOW)) { if (this._element.disabled || this._element.classList.contains(CLASS_NAME_DISABLED) || !this._menu.classList.contains(CLASS_NAME_SHOW)) {
return; return;
} }
@ -348,7 +335,7 @@
var relatedTarget = { var relatedTarget = {
relatedTarget: this._element relatedTarget: this._element
}; };
var hideEvent = EventHandler.trigger(parent, Event.HIDE, relatedTarget); var hideEvent = EventHandler.trigger(parent, EVENT_HIDE, relatedTarget);
if (hideEvent.defaultPrevented) { if (hideEvent.defaultPrevented) {
return; return;
@ -358,9 +345,9 @@
this._popper.destroy(); this._popper.destroy();
} }
Manipulator.toggleClass(this._menu, ClassName.SHOW); Manipulator.toggleClass(this._menu, CLASS_NAME_SHOW);
Manipulator.toggleClass(parent, ClassName.SHOW); Manipulator.toggleClass(this._element, CLASS_NAME_SHOW);
EventHandler.trigger(parent, Event.HIDDEN, relatedTarget); EventHandler.trigger(parent, EVENT_HIDDEN, relatedTarget);
}; };
_proto.dispose = function dispose() { _proto.dispose = function dispose() {
@ -388,7 +375,7 @@
_proto._addEventListeners = function _addEventListeners() { _proto._addEventListeners = function _addEventListeners() {
var _this = this; var _this = this;
EventHandler.on(this._element, Event.CLICK, function (event) { EventHandler.on(this._element, EVENT_CLICK, function (event) {
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
@ -403,33 +390,32 @@
}; };
_proto._getMenuElement = function _getMenuElement() { _proto._getMenuElement = function _getMenuElement() {
var parent = Dropdown.getParentFromElement(this._element); return SelectorEngine.next(this._element, SELECTOR_MENU)[0];
return SelectorEngine.findOne(Selector.MENU, parent);
}; };
_proto._getPlacement = function _getPlacement() { _proto._getPlacement = function _getPlacement() {
var parentDropdown = this._element.parentNode; var parentDropdown = this._element.parentNode;
var placement = AttachmentMap.BOTTOM; // Handle dropup var placement = PLACEMENT_BOTTOM; // Handle dropup
if (parentDropdown.classList.contains(ClassName.DROPUP)) { if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
placement = AttachmentMap.TOP; placement = PLACEMENT_TOP;
if (this._menu.classList.contains(ClassName.MENURIGHT)) { if (this._menu.classList.contains(CLASS_NAME_MENURIGHT)) {
placement = AttachmentMap.TOPEND; placement = PLACEMENT_TOPEND;
} }
} else if (parentDropdown.classList.contains(ClassName.DROPRIGHT)) { } else if (parentDropdown.classList.contains(CLASS_NAME_DROPRIGHT)) {
placement = AttachmentMap.RIGHT; placement = PLACEMENT_RIGHT;
} else if (parentDropdown.classList.contains(ClassName.DROPLEFT)) { } else if (parentDropdown.classList.contains(CLASS_NAME_DROPLEFT)) {
placement = AttachmentMap.LEFT; placement = PLACEMENT_LEFT;
} else if (this._menu.classList.contains(ClassName.MENURIGHT)) { } else if (this._menu.classList.contains(CLASS_NAME_MENURIGHT)) {
placement = AttachmentMap.BOTTOMEND; placement = PLACEMENT_BOTTOMEND;
} }
return placement; return placement;
}; };
_proto._detectNavbar = function _detectNavbar() { _proto._detectNavbar = function _detectNavbar() {
return Boolean(SelectorEngine.closest(this._element, '.navbar')); return Boolean(SelectorEngine.closest(this._element, "." + CLASS_NAME_NAVBAR));
}; };
_proto._getOffset = function _getOffset() { _proto._getOffset = function _getOffset() {
@ -502,7 +488,7 @@
return; return;
} }
var toggles = makeArray(SelectorEngine.find(Selector.DATA_TOGGLE)); var toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE);
for (var i = 0, len = toggles.length; i < len; i++) { for (var i = 0, len = toggles.length; i < len; i++) {
var parent = Dropdown.getParentFromElement(toggles[i]); var parent = Dropdown.getParentFromElement(toggles[i]);
@ -521,15 +507,15 @@
var dropdownMenu = context._menu; var dropdownMenu = context._menu;
if (!parent.classList.contains(ClassName.SHOW)) { if (!toggles[i].classList.contains(CLASS_NAME_SHOW)) {
continue; continue;
} }
if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && parent.contains(event.target)) { if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && dropdownMenu.contains(event.target)) {
continue; continue;
} }
var hideEvent = EventHandler.trigger(parent, Event.HIDE, relatedTarget); var hideEvent = EventHandler.trigger(parent, EVENT_HIDE, relatedTarget);
if (hideEvent.defaultPrevented) { if (hideEvent.defaultPrevented) {
continue; continue;
@ -538,7 +524,9 @@
if ('ontouchstart' in document.documentElement) { if ('ontouchstart' in document.documentElement) {
makeArray(document.body.children).forEach(function (elem) { var _ref2;
(_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (elem) {
return EventHandler.off(elem, 'mouseover', null, noop()); return EventHandler.off(elem, 'mouseover', null, noop());
}); });
} }
@ -549,9 +537,9 @@
context._popper.destroy(); context._popper.destroy();
} }
dropdownMenu.classList.remove(ClassName.SHOW); dropdownMenu.classList.remove(CLASS_NAME_SHOW);
parent.classList.remove(ClassName.SHOW); toggles[i].classList.remove(CLASS_NAME_SHOW);
EventHandler.trigger(parent, Event.HIDDEN, relatedTarget); EventHandler.trigger(parent, EVENT_HIDDEN, relatedTarget);
} }
}; };
@ -567,36 +555,39 @@
// - If key is other than escape // - If key is other than escape
// - If key is not up or down => not a dropdown command // - If key is not up or down => not a dropdown command
// - If trigger inside the menu => not a dropdown command // - If trigger inside the menu => not a dropdown command
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || SelectorEngine.closest(event.target, Selector.MENU)) : !REGEXP_KEYDOWN.test(event.which)) { if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || SelectorEngine.closest(event.target, SELECTOR_MENU)) : !REGEXP_KEYDOWN.test(event.which)) {
return; return;
} }
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
if (this.disabled || this.classList.contains(ClassName.DISABLED)) { if (this.disabled || this.classList.contains(CLASS_NAME_DISABLED)) {
return; return;
} }
var parent = Dropdown.getParentFromElement(this); var parent = Dropdown.getParentFromElement(this);
var isActive = parent.classList.contains(ClassName.SHOW); var isActive = this.classList.contains(CLASS_NAME_SHOW);
if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
if (event.which === ESCAPE_KEYCODE) { if (event.which === ESCAPE_KEYCODE) {
SelectorEngine.findOne(Selector.DATA_TOGGLE, parent).focus(); var button = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0];
} button.focus();
Dropdown.clearMenus(); Dropdown.clearMenus();
return; return;
} }
var items = makeArray(SelectorEngine.find(Selector.VISIBLE_ITEMS, parent)).filter(isVisible); if (!isActive || event.which === SPACE_KEYCODE) {
Dropdown.clearMenus();
return;
}
var items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, parent).filter(isVisible);
if (!items.length) { if (!items.length) {
return; return;
} }
var index = items.indexOf(event.target); var index = items.indexOf(event.target) || 0;
if (event.which === ARROW_UP_KEYCODE && index > 0) { if (event.which === ARROW_UP_KEYCODE && index > 0) {
// Up // Up
@ -608,10 +599,6 @@
index++; index++;
} }
if (index < 0) {
index = 0;
}
items[index].focus(); items[index].focus();
}; };
@ -645,16 +632,16 @@
*/ */
EventHandler.on(document, Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown.dataApiKeydownHandler); EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler);
EventHandler.on(document, Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown.dataApiKeydownHandler); EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
EventHandler.on(document, Event.CLICK_DATA_API, Dropdown.clearMenus); EventHandler.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus);
EventHandler.on(document, Event.KEYUP_DATA_API, Dropdown.clearMenus); EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
Dropdown.dropdownInterface(this, 'toggle'); Dropdown.dropdownInterface(this, 'toggle');
}); });
EventHandler.on(document, Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) { EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_FORM_CHILD, function (e) {
return e.stopPropagation(); return e.stopPropagation();
}); });
var $ = getjQuery(); var $ = getjQuery();

File diff suppressed because one or more lines are too long

190
js/dist/modal.js vendored
View File

@ -1,6 +1,6 @@
/*! /*!
* Bootstrap modal.js v4.3.1 (https://getbootstrap.com/) * Bootstrap modal.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
@ -9,10 +9,10 @@
(global = global || self, global.Modal = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); (global = global || self, global.Modal = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; }(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data; Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler; EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator; Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine; SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) { function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) { for (var i = 0; i < props.length; i++) {
@ -64,13 +64,13 @@
var source = arguments[i] != null ? arguments[i] : {}; var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) { if (i % 2) {
ownKeys(source, true).forEach(function (key) { ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]); _defineProperty(target, key, source[key]);
}); });
} else if (Object.getOwnPropertyDescriptors) { } else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else { } else {
ownKeys(source).forEach(function (key) { ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
}); });
} }
@ -89,6 +89,10 @@
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var toType = function toType(obj) { var toType = function toType(obj) {
if (obj === null || obj === undefined) {
return "" + obj;
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
}; };
@ -132,9 +136,7 @@
}; };
var triggerTransitionEnd = function triggerTransitionEnd(element) { var triggerTransitionEnd = function triggerTransitionEnd(element) {
var evt = document.createEvent('HTMLEvents'); element.dispatchEvent(new Event(TRANSITION_END));
evt.initEvent(TRANSITION_END, true, true);
element.dispatchEvent(evt);
}; };
var isElement = function isElement(obj) { var isElement = function isElement(obj) {
@ -171,14 +173,6 @@
}); });
}; };
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
var isVisible = function isVisible(element) { var isVisible = function isVisible(element) {
if (!element) { if (!element) {
return false; return false;
@ -233,50 +227,42 @@
focus: 'boolean', focus: 'boolean',
show: 'boolean' show: 'boolean'
}; };
var Event = { var EVENT_HIDE = "hide" + EVENT_KEY;
HIDE: "hide" + EVENT_KEY, var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY;
HIDE_PREVENTED: "hidePrevented" + EVENT_KEY, var EVENT_HIDDEN = "hidden" + EVENT_KEY;
HIDDEN: "hidden" + EVENT_KEY, var EVENT_SHOW = "show" + EVENT_KEY;
SHOW: "show" + EVENT_KEY, var EVENT_SHOWN = "shown" + EVENT_KEY;
SHOWN: "shown" + EVENT_KEY, var EVENT_FOCUSIN = "focusin" + EVENT_KEY;
FOCUSIN: "focusin" + EVENT_KEY, var EVENT_RESIZE = "resize" + EVENT_KEY;
RESIZE: "resize" + EVENT_KEY, var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
CLICK_DISMISS: "click.dismiss" + EVENT_KEY, var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY;
KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY, var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY;
MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY, var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY;
MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY, var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable';
}; var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure';
var ClassName = { var CLASS_NAME_BACKDROP = 'modal-backdrop';
SCROLLABLE: 'modal-dialog-scrollable', var CLASS_NAME_OPEN = 'modal-open';
SCROLLBAR_MEASURER: 'modal-scrollbar-measure', var CLASS_NAME_FADE = 'fade';
BACKDROP: 'modal-backdrop', var CLASS_NAME_SHOW = 'show';
OPEN: 'modal-open', var CLASS_NAME_STATIC = 'modal-static';
FADE: 'fade', var SELECTOR_DIALOG = '.modal-dialog';
SHOW: 'show', var SELECTOR_MODAL_BODY = '.modal-body';
STATIC: 'modal-static' var SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]';
}; var SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]';
var Selector = { var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
DIALOG: '.modal-dialog', var SELECTOR_STICKY_CONTENT = '.sticky-top';
MODAL_BODY: '.modal-body',
DATA_TOGGLE: '[data-toggle="modal"]',
DATA_DISMISS: '[data-dismiss="modal"]',
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
STICKY_CONTENT: '.sticky-top'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var Modal = var Modal = /*#__PURE__*/function () {
/*#__PURE__*/
function () {
function Modal(element, config) { function Modal(element, config) {
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._element = element; this._element = element;
this._dialog = SelectorEngine.findOne(Selector.DIALOG, element); this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, element);
this._backdrop = null; this._backdrop = null;
this._isShown = false; this._isShown = false;
this._isBodyOverflowing = false; this._isBodyOverflowing = false;
@ -301,11 +287,11 @@
return; return;
} }
if (this._element.classList.contains(ClassName.FADE)) { if (this._element.classList.contains(CLASS_NAME_FADE)) {
this._isTransitioning = true; this._isTransitioning = true;
} }
var showEvent = EventHandler.trigger(this._element, Event.SHOW, { var showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {
relatedTarget: relatedTarget relatedTarget: relatedTarget
}); });
@ -325,11 +311,11 @@
this._setResizeEvent(); this._setResizeEvent();
EventHandler.on(this._element, Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) { EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function (event) {
return _this.hide(event); return _this.hide(event);
}); });
EventHandler.on(this._dialog, Event.MOUSEDOWN_DISMISS, function () { EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, function () {
EventHandler.one(_this._element, Event.MOUSEUP_DISMISS, function (event) { EventHandler.one(_this._element, EVENT_MOUSEUP_DISMISS, function (event) {
if (event.target === _this._element) { if (event.target === _this._element) {
_this._ignoreBackdropClick = true; _this._ignoreBackdropClick = true;
} }
@ -352,7 +338,7 @@
return; return;
} }
var hideEvent = EventHandler.trigger(this._element, Event.HIDE); var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
if (hideEvent.defaultPrevented) { if (hideEvent.defaultPrevented) {
return; return;
@ -360,7 +346,7 @@
this._isShown = false; this._isShown = false;
var transition = this._element.classList.contains(ClassName.FADE); var transition = this._element.classList.contains(CLASS_NAME_FADE);
if (transition) { if (transition) {
this._isTransitioning = true; this._isTransitioning = true;
@ -370,12 +356,12 @@
this._setResizeEvent(); this._setResizeEvent();
EventHandler.off(document, Event.FOCUSIN); EventHandler.off(document, EVENT_FOCUSIN);
this._element.classList.remove(ClassName.SHOW); this._element.classList.remove(CLASS_NAME_SHOW);
EventHandler.off(this._element, Event.CLICK_DISMISS); EventHandler.off(this._element, EVENT_CLICK_DISMISS);
EventHandler.off(this._dialog, Event.MOUSEDOWN_DISMISS); EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
if (transition) { if (transition) {
var transitionDuration = getTransitionDurationFromElement(this._element); var transitionDuration = getTransitionDurationFromElement(this._element);
@ -393,12 +379,12 @@
return EventHandler.off(htmlElement, EVENT_KEY); return EventHandler.off(htmlElement, EVENT_KEY);
}); });
/** /**
* `document` has 2 events `Event.FOCUSIN` and `Event.CLICK_DATA_API` * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
* Do not move `document` in `htmlElements` array * Do not move `document` in `htmlElements` array
* It will remove `Event.CLICK_DATA_API` event that should remain * It will remove `EVENT_CLICK_DATA_API` event that should remain
*/ */
EventHandler.off(document, Event.FOCUSIN); EventHandler.off(document, EVENT_FOCUSIN);
Data.removeData(this._element, DATA_KEY); Data.removeData(this._element, DATA_KEY);
this._config = null; this._config = null;
this._element = null; this._element = null;
@ -425,9 +411,9 @@
_proto._showElement = function _showElement(relatedTarget) { _proto._showElement = function _showElement(relatedTarget) {
var _this3 = this; var _this3 = this;
var transition = this._element.classList.contains(ClassName.FADE); var transition = this._element.classList.contains(CLASS_NAME_FADE);
var modalBody = SelectorEngine.findOne(Selector.MODAL_BODY, this._dialog); var modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);
if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
// Don't move modal's DOM position // Don't move modal's DOM position
@ -440,7 +426,7 @@
this._element.setAttribute('aria-modal', true); this._element.setAttribute('aria-modal', true);
if (this._dialog.classList.contains(ClassName.SCROLLABLE) && modalBody) { if (this._dialog.classList.contains(CLASS_NAME_SCROLLABLE) && modalBody) {
modalBody.scrollTop = 0; modalBody.scrollTop = 0;
} else { } else {
this._element.scrollTop = 0; this._element.scrollTop = 0;
@ -450,7 +436,7 @@
reflow(this._element); reflow(this._element);
} }
this._element.classList.add(ClassName.SHOW); this._element.classList.add(CLASS_NAME_SHOW);
if (this._config.focus) { if (this._config.focus) {
this._enforceFocus(); this._enforceFocus();
@ -462,7 +448,7 @@
} }
_this3._isTransitioning = false; _this3._isTransitioning = false;
EventHandler.trigger(_this3._element, Event.SHOWN, { EventHandler.trigger(_this3._element, EVENT_SHOWN, {
relatedTarget: relatedTarget relatedTarget: relatedTarget
}); });
}; };
@ -479,9 +465,9 @@
_proto._enforceFocus = function _enforceFocus() { _proto._enforceFocus = function _enforceFocus() {
var _this4 = this; var _this4 = this;
EventHandler.off(document, Event.FOCUSIN); // guard against infinite focus loop EventHandler.off(document, EVENT_FOCUSIN); // guard against infinite focus loop
EventHandler.on(document, Event.FOCUSIN, function (event) { EventHandler.on(document, EVENT_FOCUSIN, function (event) {
if (document !== event.target && _this4._element !== event.target && !_this4._element.contains(event.target)) { if (document !== event.target && _this4._element !== event.target && !_this4._element.contains(event.target)) {
_this4._element.focus(); _this4._element.focus();
} }
@ -491,14 +477,18 @@
_proto._setEscapeEvent = function _setEscapeEvent() { _proto._setEscapeEvent = function _setEscapeEvent() {
var _this5 = this; var _this5 = this;
if (this._isShown && this._config.keyboard) { if (this._isShown) {
EventHandler.on(this._element, Event.KEYDOWN_DISMISS, function (event) { EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, function (event) {
if (event.which === ESCAPE_KEYCODE) { if (_this5._config.keyboard && event.which === ESCAPE_KEYCODE) {
event.preventDefault();
_this5.hide();
} else if (!_this5._config.keyboard && event.which === ESCAPE_KEYCODE) {
_this5._triggerBackdropTransition(); _this5._triggerBackdropTransition();
} }
}); });
} else { } else {
EventHandler.off(this._element, Event.KEYDOWN_DISMISS); EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS);
} }
}; };
@ -506,11 +496,11 @@
var _this6 = this; var _this6 = this;
if (this._isShown) { if (this._isShown) {
EventHandler.on(window, Event.RESIZE, function () { EventHandler.on(window, EVENT_RESIZE, function () {
return _this6._adjustDialog(); return _this6._adjustDialog();
}); });
} else { } else {
EventHandler.off(window, Event.RESIZE); EventHandler.off(window, EVENT_RESIZE);
} }
}; };
@ -526,13 +516,13 @@
this._isTransitioning = false; this._isTransitioning = false;
this._showBackdrop(function () { this._showBackdrop(function () {
document.body.classList.remove(ClassName.OPEN); document.body.classList.remove(CLASS_NAME_OPEN);
_this7._resetAdjustments(); _this7._resetAdjustments();
_this7._resetScrollbar(); _this7._resetScrollbar();
EventHandler.trigger(_this7._element, Event.HIDDEN); EventHandler.trigger(_this7._element, EVENT_HIDDEN);
}); });
}; };
@ -545,18 +535,18 @@
_proto._showBackdrop = function _showBackdrop(callback) { _proto._showBackdrop = function _showBackdrop(callback) {
var _this8 = this; var _this8 = this;
var animate = this._element.classList.contains(ClassName.FADE) ? ClassName.FADE : ''; var animate = this._element.classList.contains(CLASS_NAME_FADE) ? CLASS_NAME_FADE : '';
if (this._isShown && this._config.backdrop) { if (this._isShown && this._config.backdrop) {
this._backdrop = document.createElement('div'); this._backdrop = document.createElement('div');
this._backdrop.className = ClassName.BACKDROP; this._backdrop.className = CLASS_NAME_BACKDROP;
if (animate) { if (animate) {
this._backdrop.classList.add(animate); this._backdrop.classList.add(animate);
} }
document.body.appendChild(this._backdrop); document.body.appendChild(this._backdrop);
EventHandler.on(this._element, Event.CLICK_DISMISS, function (event) { EventHandler.on(this._element, EVENT_CLICK_DISMISS, function (event) {
if (_this8._ignoreBackdropClick) { if (_this8._ignoreBackdropClick) {
_this8._ignoreBackdropClick = false; _this8._ignoreBackdropClick = false;
return; return;
@ -573,7 +563,7 @@
reflow(this._backdrop); reflow(this._backdrop);
} }
this._backdrop.classList.add(ClassName.SHOW); this._backdrop.classList.add(CLASS_NAME_SHOW);
if (!animate) { if (!animate) {
callback(); callback();
@ -584,7 +574,7 @@
EventHandler.one(this._backdrop, TRANSITION_END, callback); EventHandler.one(this._backdrop, TRANSITION_END, callback);
emulateTransitionEnd(this._backdrop, backdropTransitionDuration); emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
} else if (!this._isShown && this._backdrop) { } else if (!this._isShown && this._backdrop) {
this._backdrop.classList.remove(ClassName.SHOW); this._backdrop.classList.remove(CLASS_NAME_SHOW);
var callbackRemove = function callbackRemove() { var callbackRemove = function callbackRemove() {
_this8._removeBackdrop(); _this8._removeBackdrop();
@ -592,7 +582,7 @@
callback(); callback();
}; };
if (this._element.classList.contains(ClassName.FADE)) { if (this._element.classList.contains(CLASS_NAME_FADE)) {
var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop); var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
EventHandler.one(this._backdrop, TRANSITION_END, callbackRemove); EventHandler.one(this._backdrop, TRANSITION_END, callbackRemove);
@ -609,17 +599,17 @@
var _this9 = this; var _this9 = this;
if (this._config.backdrop === 'static') { if (this._config.backdrop === 'static') {
var hideEvent = EventHandler.trigger(this._element, Event.HIDE_PREVENTED); var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
if (hideEvent.defaultPrevented) { if (hideEvent.defaultPrevented) {
return; return;
} }
this._element.classList.add(ClassName.STATIC); this._element.classList.add(CLASS_NAME_STATIC);
var modalTransitionDuration = getTransitionDurationFromElement(this._element); var modalTransitionDuration = getTransitionDurationFromElement(this._element);
EventHandler.one(this._element, TRANSITION_END, function () { EventHandler.one(this._element, TRANSITION_END, function () {
_this9._element.classList.remove(ClassName.STATIC); _this9._element.classList.remove(CLASS_NAME_STATIC);
}); });
emulateTransitionEnd(this._element, modalTransitionDuration); emulateTransitionEnd(this._element, modalTransitionDuration);
@ -662,14 +652,14 @@
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set // Note: DOMNode.style.paddingRight returns the actual value or '' if not set
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
// Adjust fixed content padding // Adjust fixed content padding
makeArray(SelectorEngine.find(Selector.FIXED_CONTENT)).forEach(function (element) { SelectorEngine.find(SELECTOR_FIXED_CONTENT).forEach(function (element) {
var actualPadding = element.style.paddingRight; var actualPadding = element.style.paddingRight;
var calculatedPadding = window.getComputedStyle(element)['padding-right']; var calculatedPadding = window.getComputedStyle(element)['padding-right'];
Manipulator.setDataAttribute(element, 'padding-right', actualPadding); Manipulator.setDataAttribute(element, 'padding-right', actualPadding);
element.style.paddingRight = parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px"; element.style.paddingRight = parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px";
}); // Adjust sticky content margin }); // Adjust sticky content margin
makeArray(SelectorEngine.find(Selector.STICKY_CONTENT)).forEach(function (element) { SelectorEngine.find(SELECTOR_STICKY_CONTENT).forEach(function (element) {
var actualMargin = element.style.marginRight; var actualMargin = element.style.marginRight;
var calculatedMargin = window.getComputedStyle(element)['margin-right']; var calculatedMargin = window.getComputedStyle(element)['margin-right'];
Manipulator.setDataAttribute(element, 'margin-right', actualMargin); Manipulator.setDataAttribute(element, 'margin-right', actualMargin);
@ -682,12 +672,12 @@
document.body.style.paddingRight = parseFloat(calculatedPadding) + this._scrollbarWidth + "px"; document.body.style.paddingRight = parseFloat(calculatedPadding) + this._scrollbarWidth + "px";
} }
document.body.classList.add(ClassName.OPEN); document.body.classList.add(CLASS_NAME_OPEN);
}; };
_proto._resetScrollbar = function _resetScrollbar() { _proto._resetScrollbar = function _resetScrollbar() {
// Restore fixed content padding // Restore fixed content padding
makeArray(SelectorEngine.find(Selector.FIXED_CONTENT)).forEach(function (element) { SelectorEngine.find(SELECTOR_FIXED_CONTENT).forEach(function (element) {
var padding = Manipulator.getDataAttribute(element, 'padding-right'); var padding = Manipulator.getDataAttribute(element, 'padding-right');
if (typeof padding !== 'undefined') { if (typeof padding !== 'undefined') {
@ -696,7 +686,7 @@
} }
}); // Restore sticky content and navbar-toggler margin }); // Restore sticky content and navbar-toggler margin
makeArray(SelectorEngine.find("" + Selector.STICKY_CONTENT)).forEach(function (element) { SelectorEngine.find("" + SELECTOR_STICKY_CONTENT).forEach(function (element) {
var margin = Manipulator.getDataAttribute(element, 'margin-right'); var margin = Manipulator.getDataAttribute(element, 'margin-right');
if (typeof margin !== 'undefined') { if (typeof margin !== 'undefined') {
@ -718,7 +708,7 @@
_proto._getScrollbarWidth = function _getScrollbarWidth() { _proto._getScrollbarWidth = function _getScrollbarWidth() {
// thx d.walsh // thx d.walsh
var scrollDiv = document.createElement('div'); var scrollDiv = document.createElement('div');
scrollDiv.className = ClassName.SCROLLBAR_MEASURER; scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;
document.body.appendChild(scrollDiv); document.body.appendChild(scrollDiv);
var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
document.body.removeChild(scrollDiv); document.body.removeChild(scrollDiv);
@ -773,7 +763,7 @@
*/ */
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
var _this11 = this; var _this11 = this;
var target = getElementFromSelector(this); var target = getElementFromSelector(this);
@ -782,13 +772,13 @@
event.preventDefault(); event.preventDefault();
} }
EventHandler.one(target, Event.SHOW, function (showEvent) { EventHandler.one(target, EVENT_SHOW, function (showEvent) {
if (showEvent.defaultPrevented) { if (showEvent.defaultPrevented) {
// only register focus restorer if modal will actually get shown // only register focus restorer if modal will actually get shown
return; return;
} }
EventHandler.one(target, Event.HIDDEN, function () { EventHandler.one(target, EVENT_HIDDEN, function () {
if (isVisible(_this11)) { if (isVisible(_this11)) {
_this11.focus(); _this11.focus();
} }

File diff suppressed because one or more lines are too long

36
js/dist/popover.js vendored
View File

@ -1,6 +1,6 @@
/*! /*!
* Bootstrap popover.js v4.3.1 (https://getbootstrap.com/) * Bootstrap popover.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
@ -9,9 +9,9 @@
(global = global || self, global.Popover = factory(global.Data, global.SelectorEngine, global.Tooltip)); (global = global || self, global.Popover = factory(global.Data, global.SelectorEngine, global.Tooltip));
}(this, (function (Data, SelectorEngine, Tooltip) { 'use strict'; }(this, (function (Data, SelectorEngine, Tooltip) { 'use strict';
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data; Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine; SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
Tooltip = Tooltip && Tooltip.hasOwnProperty('default') ? Tooltip['default'] : Tooltip; Tooltip = Tooltip && Object.prototype.hasOwnProperty.call(Tooltip, 'default') ? Tooltip['default'] : Tooltip;
function _defineProperties(target, props) { function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) { for (var i = 0; i < props.length; i++) {
@ -63,13 +63,13 @@
var source = arguments[i] != null ? arguments[i] : {}; var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) { if (i % 2) {
ownKeys(source, true).forEach(function (key) { ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]); _defineProperty(target, key, source[key]);
}); });
} else if (Object.getOwnPropertyDescriptors) { } else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else { } else {
ownKeys(source).forEach(function (key) { ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
}); });
} }
@ -126,14 +126,6 @@
content: '(string|element|function)' content: '(string|element|function)'
}); });
var ClassName = {
FADE: 'fade',
SHOW: 'show'
};
var Selector = {
TITLE: '.popover-header',
CONTENT: '.popover-body'
};
var Event = { var Event = {
HIDE: "hide" + EVENT_KEY, HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY, HIDDEN: "hidden" + EVENT_KEY,
@ -146,15 +138,17 @@
MOUSEENTER: "mouseenter" + EVENT_KEY, MOUSEENTER: "mouseenter" + EVENT_KEY,
MOUSELEAVE: "mouseleave" + EVENT_KEY MOUSELEAVE: "mouseleave" + EVENT_KEY
}; };
var CLASS_NAME_FADE = 'fade';
var CLASS_NAME_SHOW = 'show';
var SELECTOR_TITLE = '.popover-header';
var SELECTOR_CONTENT = '.popover-body';
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var Popover = var Popover = /*#__PURE__*/function (_Tooltip) {
/*#__PURE__*/
function (_Tooltip) {
_inheritsLoose(Popover, _Tooltip); _inheritsLoose(Popover, _Tooltip);
function Popover() { function Popover() {
@ -171,7 +165,7 @@
_proto.setContent = function setContent() { _proto.setContent = function setContent() {
var tip = this.getTipElement(); // we use append for html objects to maintain js events var tip = this.getTipElement(); // we use append for html objects to maintain js events
this.setElementContent(SelectorEngine.findOne(Selector.TITLE, tip), this.getTitle()); this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle());
var content = this._getContent(); var content = this._getContent();
@ -179,9 +173,9 @@
content = content.call(this.element); content = content.call(this.element);
} }
this.setElementContent(SelectorEngine.findOne(Selector.CONTENT, tip), content); this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);
tip.classList.remove(ClassName.FADE); tip.classList.remove(CLASS_NAME_FADE);
tip.classList.remove(ClassName.SHOW); tip.classList.remove(CLASS_NAME_SHOW);
}; };
_proto._addAttachmentClass = function _addAttachmentClass(attachment) { _proto._addAttachmentClass = function _addAttachmentClass(attachment) {

File diff suppressed because one or more lines are too long

108
js/dist/scrollspy.js vendored
View File

@ -1,6 +1,6 @@
/*! /*!
* Bootstrap scrollspy.js v4.3.1 (https://getbootstrap.com/) * Bootstrap scrollspy.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
@ -9,10 +9,10 @@
(global = global || self, global.ScrollSpy = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine)); (global = global || self, global.ScrollSpy = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict'; }(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data; Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler; EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator; Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine; SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) { function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) { for (var i = 0; i < props.length; i++) {
@ -64,13 +64,13 @@
var source = arguments[i] != null ? arguments[i] : {}; var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) { if (i % 2) {
ownKeys(source, true).forEach(function (key) { ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]); _defineProperty(target, key, source[key]);
}); });
} else if (Object.getOwnPropertyDescriptors) { } else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else { } else {
ownKeys(source).forEach(function (key) { ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
}); });
} }
@ -88,6 +88,10 @@
var MAX_UID = 1000000; var MAX_UID = 1000000;
var toType = function toType(obj) { var toType = function toType(obj) {
if (obj === null || obj === undefined) {
return "" + obj;
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
}; };
/** /**
@ -142,14 +146,6 @@
}); });
}; };
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
var getjQuery = function getjQuery() { var getjQuery = function getjQuery() {
var _window = window, var _window = window,
jQuery = _window.jQuery; jQuery = _window.jQuery;
@ -182,49 +178,39 @@
method: 'string', method: 'string',
target: '(string|element)' target: '(string|element)'
}; };
var Event = { var EVENT_ACTIVATE = "activate" + EVENT_KEY;
ACTIVATE: "activate" + EVENT_KEY, var EVENT_SCROLL = "scroll" + EVENT_KEY;
SCROLL: "scroll" + EVENT_KEY, var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
}; var CLASS_NAME_ACTIVE = 'active';
var ClassName = { var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
DROPDOWN_ITEM: 'dropdown-item', var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
ACTIVE: 'active' var SELECTOR_NAV_LINKS = '.nav-link';
}; var SELECTOR_NAV_ITEMS = '.nav-item';
var Selector = { var SELECTOR_LIST_ITEMS = '.list-group-item';
DATA_SPY: '[data-spy="scroll"]', var SELECTOR_DROPDOWN = '.dropdown';
NAV_LIST_GROUP: '.nav, .list-group', var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
NAV_LINKS: '.nav-link', var METHOD_OFFSET = 'offset';
NAV_ITEMS: '.nav-item', var METHOD_POSITION = 'position';
LIST_ITEMS: '.list-group-item',
DROPDOWN: '.dropdown',
DROPDOWN_TOGGLE: '.dropdown-toggle'
};
var OffsetMethod = {
OFFSET: 'offset',
POSITION: 'position'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var ScrollSpy = var ScrollSpy = /*#__PURE__*/function () {
/*#__PURE__*/
function () {
function ScrollSpy(element, config) { function ScrollSpy(element, config) {
var _this = this; var _this = this;
this._element = element; this._element = element;
this._scrollElement = element.tagName === 'BODY' ? window : element; this._scrollElement = element.tagName === 'BODY' ? window : element;
this._config = this._getConfig(config); this._config = this._getConfig(config);
this._selector = this._config.target + " " + Selector.NAV_LINKS + "," + (this._config.target + " " + Selector.LIST_ITEMS + ",") + (this._config.target + " ." + ClassName.DROPDOWN_ITEM); this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " ." + CLASS_NAME_DROPDOWN_ITEM);
this._offsets = []; this._offsets = [];
this._targets = []; this._targets = [];
this._activeTarget = null; this._activeTarget = null;
this._scrollHeight = 0; this._scrollHeight = 0;
EventHandler.on(this._scrollElement, Event.SCROLL, function (event) { EventHandler.on(this._scrollElement, EVENT_SCROLL, function (event) {
return _this._process(event); return _this._process(event);
}); });
this.refresh(); this.refresh();
@ -241,13 +227,13 @@
_proto.refresh = function refresh() { _proto.refresh = function refresh() {
var _this2 = this; var _this2 = this;
var autoMethod = this._scrollElement === this._scrollElement.window ? OffsetMethod.OFFSET : OffsetMethod.POSITION; var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
this._offsets = []; this._offsets = [];
this._targets = []; this._targets = [];
this._scrollHeight = this._getScrollHeight(); this._scrollHeight = this._getScrollHeight();
var targets = makeArray(SelectorEngine.find(this._selector)); var targets = SelectorEngine.find(this._selector);
targets.map(function (element) { targets.map(function (element) {
var target; var target;
var targetSelector = getSelectorFromElement(element); var targetSelector = getSelectorFromElement(element);
@ -371,37 +357,37 @@
var link = SelectorEngine.findOne(queries.join(',')); var link = SelectorEngine.findOne(queries.join(','));
if (link.classList.contains(ClassName.DROPDOWN_ITEM)) { if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
SelectorEngine.findOne(Selector.DROPDOWN_TOGGLE, SelectorEngine.closest(link, Selector.DROPDOWN)).classList.add(ClassName.ACTIVE); SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, SelectorEngine.closest(link, SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE);
link.classList.add(ClassName.ACTIVE); link.classList.add(CLASS_NAME_ACTIVE);
} else { } else {
// Set triggered link as active // Set triggered link as active
link.classList.add(ClassName.ACTIVE); link.classList.add(CLASS_NAME_ACTIVE);
SelectorEngine.parents(link, Selector.NAV_LIST_GROUP).forEach(function (listGroup) { SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP).forEach(function (listGroup) {
// Set triggered links parents as active // Set triggered links parents as active
// With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
SelectorEngine.prev(listGroup, Selector.NAV_LINKS + ", " + Selector.LIST_ITEMS).forEach(function (item) { SelectorEngine.prev(listGroup, SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).forEach(function (item) {
return item.classList.add(ClassName.ACTIVE); return item.classList.add(CLASS_NAME_ACTIVE);
}); // Handle special case when .nav-link is inside .nav-item }); // Handle special case when .nav-link is inside .nav-item
SelectorEngine.prev(listGroup, Selector.NAV_ITEMS).forEach(function (navItem) { SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS).forEach(function (navItem) {
SelectorEngine.children(navItem, Selector.NAV_LINKS).forEach(function (item) { SelectorEngine.children(navItem, SELECTOR_NAV_LINKS).forEach(function (item) {
return item.classList.add(ClassName.ACTIVE); return item.classList.add(CLASS_NAME_ACTIVE);
}); });
}); });
}); });
} }
EventHandler.trigger(this._scrollElement, Event.ACTIVATE, { EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {
relatedTarget: target relatedTarget: target
}); });
}; };
_proto._clear = function _clear() { _proto._clear = function _clear() {
makeArray(SelectorEngine.find(this._selector)).filter(function (node) { SelectorEngine.find(this._selector).filter(function (node) {
return node.classList.contains(ClassName.ACTIVE); return node.classList.contains(CLASS_NAME_ACTIVE);
}).forEach(function (node) { }).forEach(function (node) {
return node.classList.remove(ClassName.ACTIVE); return node.classList.remove(CLASS_NAME_ACTIVE);
}); });
} // Static } // Static
; ;
@ -451,8 +437,8 @@
*/ */
EventHandler.on(window, Event.LOAD_DATA_API, function () { EventHandler.on(window, EVENT_LOAD_DATA_API, function () {
makeArray(SelectorEngine.find(Selector.DATA_SPY)).forEach(function (spy) { SelectorEngine.find(SELECTOR_DATA_SPY).forEach(function (spy) {
return new ScrollSpy(spy, Manipulator.getDataAttributes(spy)); return new ScrollSpy(spy, Manipulator.getDataAttributes(spy));
}); });
}); });

File diff suppressed because one or more lines are too long

108
js/dist/tab.js vendored
View File

@ -1,6 +1,6 @@
/*! /*!
* Bootstrap tab.js v4.3.1 (https://getbootstrap.com/) * Bootstrap tab.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
@ -9,9 +9,9 @@
(global = global || self, global.Tab = factory(global.Data, global.EventHandler, global.SelectorEngine)); (global = global || self, global.Tab = factory(global.Data, global.EventHandler, global.SelectorEngine));
}(this, (function (Data, EventHandler, SelectorEngine) { 'use strict'; }(this, (function (Data, EventHandler, SelectorEngine) { 'use strict';
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data; Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler; EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine; SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) { function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) { for (var i = 0; i < props.length; i++) {
@ -78,9 +78,7 @@
}; };
var triggerTransitionEnd = function triggerTransitionEnd(element) { var triggerTransitionEnd = function triggerTransitionEnd(element) {
var evt = document.createEvent('HTMLEvents'); element.dispatchEvent(new Event(TRANSITION_END));
evt.initEvent(TRANSITION_END, true, true);
element.dispatchEvent(evt);
}; };
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) { var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
@ -101,14 +99,6 @@
}, emulatedDuration); }, emulatedDuration);
}; };
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
var reflow = function reflow(element) { var reflow = function reflow(element) {
return element.offsetHeight; return element.offsetHeight;
}; };
@ -135,38 +125,30 @@
var DATA_KEY = 'bs.tab'; var DATA_KEY = 'bs.tab';
var EVENT_KEY = "." + DATA_KEY; var EVENT_KEY = "." + DATA_KEY;
var DATA_API_KEY = '.data-api'; var DATA_API_KEY = '.data-api';
var Event = { var EVENT_HIDE = "hide" + EVENT_KEY;
HIDE: "hide" + EVENT_KEY, var EVENT_HIDDEN = "hidden" + EVENT_KEY;
HIDDEN: "hidden" + EVENT_KEY, var EVENT_SHOW = "show" + EVENT_KEY;
SHOW: "show" + EVENT_KEY, var EVENT_SHOWN = "shown" + EVENT_KEY;
SHOWN: "shown" + EVENT_KEY, var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
}; var CLASS_NAME_ACTIVE = 'active';
var ClassName = { var CLASS_NAME_DISABLED = 'disabled';
DROPDOWN_MENU: 'dropdown-menu', var CLASS_NAME_FADE = 'fade';
ACTIVE: 'active', var CLASS_NAME_SHOW = 'show';
DISABLED: 'disabled', var SELECTOR_DROPDOWN = '.dropdown';
FADE: 'fade', var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
SHOW: 'show' var SELECTOR_ACTIVE = '.active';
}; var SELECTOR_ACTIVE_UL = ':scope > li > .active';
var Selector = { var SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]';
DROPDOWN: '.dropdown', var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
NAV_LIST_GROUP: '.nav, .list-group', var SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active';
ACTIVE: '.active',
ACTIVE_UL: ':scope > li > .active',
DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',
DROPDOWN_TOGGLE: '.dropdown-toggle',
DROPDOWN_ACTIVE_CHILD: ':scope > .dropdown-menu .active'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var Tab = var Tab = /*#__PURE__*/function () {
/*#__PURE__*/
function () {
function Tab(element) { function Tab(element) {
this._element = element; this._element = element;
Data.setData(this._element, DATA_KEY, this); Data.setData(this._element, DATA_KEY, this);
@ -179,29 +161,29 @@
_proto.show = function show() { _proto.show = function show() {
var _this = this; var _this = this;
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(ClassName.ACTIVE) || this._element.classList.contains(ClassName.DISABLED)) { if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(CLASS_NAME_ACTIVE) || this._element.classList.contains(CLASS_NAME_DISABLED)) {
return; return;
} }
var previous; var previous;
var target = getElementFromSelector(this._element); var target = getElementFromSelector(this._element);
var listElement = SelectorEngine.closest(this._element, Selector.NAV_LIST_GROUP); var listElement = SelectorEngine.closest(this._element, SELECTOR_NAV_LIST_GROUP);
if (listElement) { if (listElement) {
var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector.ACTIVE_UL : Selector.ACTIVE; var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
previous = makeArray(SelectorEngine.find(itemSelector, listElement)); previous = SelectorEngine.find(itemSelector, listElement);
previous = previous[previous.length - 1]; previous = previous[previous.length - 1];
} }
var hideEvent = null; var hideEvent = null;
if (previous) { if (previous) {
hideEvent = EventHandler.trigger(previous, Event.HIDE, { hideEvent = EventHandler.trigger(previous, EVENT_HIDE, {
relatedTarget: this._element relatedTarget: this._element
}); });
} }
var showEvent = EventHandler.trigger(this._element, Event.SHOW, { var showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {
relatedTarget: previous relatedTarget: previous
}); });
@ -212,10 +194,10 @@
this._activate(this._element, listElement); this._activate(this._element, listElement);
var complete = function complete() { var complete = function complete() {
EventHandler.trigger(previous, Event.HIDDEN, { EventHandler.trigger(previous, EVENT_HIDDEN, {
relatedTarget: _this._element relatedTarget: _this._element
}); });
EventHandler.trigger(_this._element, Event.SHOWN, { EventHandler.trigger(_this._element, EVENT_SHOWN, {
relatedTarget: previous relatedTarget: previous
}); });
}; };
@ -236,9 +218,9 @@
_proto._activate = function _activate(element, container, callback) { _proto._activate = function _activate(element, container, callback) {
var _this2 = this; var _this2 = this;
var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(Selector.ACTIVE_UL, container) : SelectorEngine.children(container, Selector.ACTIVE); var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(SELECTOR_ACTIVE_UL, container) : SelectorEngine.children(container, SELECTOR_ACTIVE);
var active = activeElements[0]; var active = activeElements[0];
var isTransitioning = callback && active && active.classList.contains(ClassName.FADE); var isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE);
var complete = function complete() { var complete = function complete() {
return _this2._transitionComplete(element, active, callback); return _this2._transitionComplete(element, active, callback);
@ -246,7 +228,7 @@
if (active && isTransitioning) { if (active && isTransitioning) {
var transitionDuration = getTransitionDurationFromElement(active); var transitionDuration = getTransitionDurationFromElement(active);
active.classList.remove(ClassName.SHOW); active.classList.remove(CLASS_NAME_SHOW);
EventHandler.one(active, TRANSITION_END, complete); EventHandler.one(active, TRANSITION_END, complete);
emulateTransitionEnd(active, transitionDuration); emulateTransitionEnd(active, transitionDuration);
} else { } else {
@ -256,11 +238,11 @@
_proto._transitionComplete = function _transitionComplete(element, active, callback) { _proto._transitionComplete = function _transitionComplete(element, active, callback) {
if (active) { if (active) {
active.classList.remove(ClassName.ACTIVE); active.classList.remove(CLASS_NAME_ACTIVE);
var dropdownChild = SelectorEngine.findOne(Selector.DROPDOWN_ACTIVE_CHILD, active.parentNode); var dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode);
if (dropdownChild) { if (dropdownChild) {
dropdownChild.classList.remove(ClassName.ACTIVE); dropdownChild.classList.remove(CLASS_NAME_ACTIVE);
} }
if (active.getAttribute('role') === 'tab') { if (active.getAttribute('role') === 'tab') {
@ -268,7 +250,7 @@
} }
} }
element.classList.add(ClassName.ACTIVE); element.classList.add(CLASS_NAME_ACTIVE);
if (element.getAttribute('role') === 'tab') { if (element.getAttribute('role') === 'tab') {
element.setAttribute('aria-selected', true); element.setAttribute('aria-selected', true);
@ -276,16 +258,16 @@
reflow(element); reflow(element);
if (element.classList.contains(ClassName.FADE)) { if (element.classList.contains(CLASS_NAME_FADE)) {
element.classList.add(ClassName.SHOW); element.classList.add(CLASS_NAME_SHOW);
} }
if (element.parentNode && element.parentNode.classList.contains(ClassName.DROPDOWN_MENU)) { if (element.parentNode && element.parentNode.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
var dropdownElement = SelectorEngine.closest(element, Selector.DROPDOWN); var dropdownElement = SelectorEngine.closest(element, SELECTOR_DROPDOWN);
if (dropdownElement) { if (dropdownElement) {
makeArray(SelectorEngine.find(Selector.DROPDOWN_TOGGLE)).forEach(function (dropdown) { SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE).forEach(function (dropdown) {
return dropdown.classList.add(ClassName.ACTIVE); return dropdown.classList.add(CLASS_NAME_ACTIVE);
}); });
} }
@ -332,7 +314,7 @@
*/ */
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
event.preventDefault(); event.preventDefault();
var data = Data.getData(this, DATA_KEY) || new Tab(this); var data = Data.getData(this, DATA_KEY) || new Tab(this);
data.show(); data.show();

2
js/dist/tab.js.map vendored

File diff suppressed because one or more lines are too long

82
js/dist/toast.js vendored
View File

@ -1,6 +1,6 @@
/*! /*!
* Bootstrap toast.js v4.3.1 (https://getbootstrap.com/) * Bootstrap toast.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
@ -9,9 +9,9 @@
(global = global || self, global.Toast = factory(global.Data, global.EventHandler, global.Manipulator)); (global = global || self, global.Toast = factory(global.Data, global.EventHandler, global.Manipulator));
}(this, (function (Data, EventHandler, Manipulator) { 'use strict'; }(this, (function (Data, EventHandler, Manipulator) { 'use strict';
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data; Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler; EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator; Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
function _defineProperties(target, props) { function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) { for (var i = 0; i < props.length; i++) {
@ -63,13 +63,13 @@
var source = arguments[i] != null ? arguments[i] : {}; var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) { if (i % 2) {
ownKeys(source, true).forEach(function (key) { ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]); _defineProperty(target, key, source[key]);
}); });
} else if (Object.getOwnPropertyDescriptors) { } else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else { } else {
ownKeys(source).forEach(function (key) { ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
}); });
} }
@ -88,6 +88,10 @@
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var toType = function toType(obj) { var toType = function toType(obj) {
if (obj === null || obj === undefined) {
return "" + obj;
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
}; };
@ -115,9 +119,7 @@
}; };
var triggerTransitionEnd = function triggerTransitionEnd(element) { var triggerTransitionEnd = function triggerTransitionEnd(element) {
var evt = document.createEvent('HTMLEvents'); element.dispatchEvent(new Event(TRANSITION_END));
evt.initEvent(TRANSITION_END, true, true);
element.dispatchEvent(evt);
}; };
var isElement = function isElement(obj) { var isElement = function isElement(obj) {
@ -179,19 +181,15 @@
var VERSION = '4.3.1'; var VERSION = '4.3.1';
var DATA_KEY = 'bs.toast'; var DATA_KEY = 'bs.toast';
var EVENT_KEY = "." + DATA_KEY; var EVENT_KEY = "." + DATA_KEY;
var Event = { var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
CLICK_DISMISS: "click.dismiss" + EVENT_KEY, var EVENT_HIDE = "hide" + EVENT_KEY;
HIDE: "hide" + EVENT_KEY, var EVENT_HIDDEN = "hidden" + EVENT_KEY;
HIDDEN: "hidden" + EVENT_KEY, var EVENT_SHOW = "show" + EVENT_KEY;
SHOW: "show" + EVENT_KEY, var EVENT_SHOWN = "shown" + EVENT_KEY;
SHOWN: "shown" + EVENT_KEY var CLASS_NAME_FADE = 'fade';
}; var CLASS_NAME_HIDE = 'hide';
var ClassName = { var CLASS_NAME_SHOW = 'show';
FADE: 'fade', var CLASS_NAME_SHOWING = 'showing';
HIDE: 'hide',
SHOW: 'show',
SHOWING: 'showing'
};
var DefaultType = { var DefaultType = {
animation: 'boolean', animation: 'boolean',
autohide: 'boolean', autohide: 'boolean',
@ -202,18 +200,14 @@
autohide: true, autohide: true,
delay: 500 delay: 500
}; };
var Selector = { var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
DATA_DISMISS: '[data-dismiss="toast"]'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var Toast = var Toast = /*#__PURE__*/function () {
/*#__PURE__*/
function () {
function Toast(element, config) { function Toast(element, config) {
this._element = element; this._element = element;
this._config = this._getConfig(config); this._config = this._getConfig(config);
@ -231,22 +225,22 @@
_proto.show = function show() { _proto.show = function show() {
var _this = this; var _this = this;
var showEvent = EventHandler.trigger(this._element, Event.SHOW); var showEvent = EventHandler.trigger(this._element, EVENT_SHOW);
if (showEvent.defaultPrevented) { if (showEvent.defaultPrevented) {
return; return;
} }
if (this._config.animation) { if (this._config.animation) {
this._element.classList.add(ClassName.FADE); this._element.classList.add(CLASS_NAME_FADE);
} }
var complete = function complete() { var complete = function complete() {
_this._element.classList.remove(ClassName.SHOWING); _this._element.classList.remove(CLASS_NAME_SHOWING);
_this._element.classList.add(ClassName.SHOW); _this._element.classList.add(CLASS_NAME_SHOW);
EventHandler.trigger(_this._element, Event.SHOWN); EventHandler.trigger(_this._element, EVENT_SHOWN);
if (_this._config.autohide) { if (_this._config.autohide) {
_this._timeout = setTimeout(function () { _this._timeout = setTimeout(function () {
@ -255,11 +249,11 @@
} }
}; };
this._element.classList.remove(ClassName.HIDE); this._element.classList.remove(CLASS_NAME_HIDE);
reflow(this._element); reflow(this._element);
this._element.classList.add(ClassName.SHOWING); this._element.classList.add(CLASS_NAME_SHOWING);
if (this._config.animation) { if (this._config.animation) {
var transitionDuration = getTransitionDurationFromElement(this._element); var transitionDuration = getTransitionDurationFromElement(this._element);
@ -273,23 +267,23 @@
_proto.hide = function hide() { _proto.hide = function hide() {
var _this2 = this; var _this2 = this;
if (!this._element.classList.contains(ClassName.SHOW)) { if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
return; return;
} }
var hideEvent = EventHandler.trigger(this._element, Event.HIDE); var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
if (hideEvent.defaultPrevented) { if (hideEvent.defaultPrevented) {
return; return;
} }
var complete = function complete() { var complete = function complete() {
_this2._element.classList.add(ClassName.HIDE); _this2._element.classList.add(CLASS_NAME_HIDE);
EventHandler.trigger(_this2._element, Event.HIDDEN); EventHandler.trigger(_this2._element, EVENT_HIDDEN);
}; };
this._element.classList.remove(ClassName.SHOW); this._element.classList.remove(CLASS_NAME_SHOW);
if (this._config.animation) { if (this._config.animation) {
var transitionDuration = getTransitionDurationFromElement(this._element); var transitionDuration = getTransitionDurationFromElement(this._element);
@ -304,11 +298,11 @@
clearTimeout(this._timeout); clearTimeout(this._timeout);
this._timeout = null; this._timeout = null;
if (this._element.classList.contains(ClassName.SHOW)) { if (this._element.classList.contains(CLASS_NAME_SHOW)) {
this._element.classList.remove(ClassName.SHOW); this._element.classList.remove(CLASS_NAME_SHOW);
} }
EventHandler.off(this._element, Event.CLICK_DISMISS); EventHandler.off(this._element, EVENT_CLICK_DISMISS);
Data.removeData(this._element, DATA_KEY); Data.removeData(this._element, DATA_KEY);
this._element = null; this._element = null;
this._config = null; this._config = null;
@ -324,7 +318,7 @@
_proto._setListeners = function _setListeners() { _proto._setListeners = function _setListeners() {
var _this3 = this; var _this3 = this;
EventHandler.on(this._element, Event.CLICK_DISMISS, Selector.DATA_DISMISS, function () { EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
return _this3.hide(); return _this3.hide();
}); });
} // Static } // Static

File diff suppressed because one or more lines are too long

155
js/dist/tooltip.js vendored
View File

@ -1,6 +1,6 @@
/*! /*!
* Bootstrap tooltip.js v4.3.1 (https://getbootstrap.com/) * Bootstrap tooltip.js v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
(function (global, factory) { (function (global, factory) {
@ -9,11 +9,11 @@
(global = global || self, global.Tooltip = factory(global.Data, global.EventHandler, global.Manipulator, global.Popper, global.SelectorEngine)); (global = global || self, global.Tooltip = factory(global.Data, global.EventHandler, global.Manipulator, global.Popper, global.SelectorEngine));
}(this, (function (Data, EventHandler, Manipulator, Popper, SelectorEngine) { 'use strict'; }(this, (function (Data, EventHandler, Manipulator, Popper, SelectorEngine) { 'use strict';
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data; Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler; EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator; Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper; Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine; SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
function _defineProperties(target, props) { function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) { for (var i = 0; i < props.length; i++) {
@ -65,13 +65,13 @@
var source = arguments[i] != null ? arguments[i] : {}; var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) { if (i % 2) {
ownKeys(source, true).forEach(function (key) { ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]); _defineProperty(target, key, source[key]);
}); });
} else if (Object.getOwnPropertyDescriptors) { } else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else { } else {
ownKeys(source).forEach(function (key) { ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
}); });
} }
@ -91,6 +91,10 @@
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp) var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
var toType = function toType(obj) { var toType = function toType(obj) {
if (obj === null || obj === undefined) {
return "" + obj;
}
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
}; };
/** /**
@ -132,9 +136,7 @@
}; };
var triggerTransitionEnd = function triggerTransitionEnd(element) { var triggerTransitionEnd = function triggerTransitionEnd(element) {
var evt = document.createEvent('HTMLEvents'); element.dispatchEvent(new Event(TRANSITION_END));
evt.initEvent(TRANSITION_END, true, true);
element.dispatchEvent(evt);
}; };
var isElement = function isElement(obj) { var isElement = function isElement(obj) {
@ -171,14 +173,6 @@
}); });
}; };
var makeArray = function makeArray(nodeList) {
if (!nodeList) {
return [];
}
return [].slice.call(nodeList);
};
var findShadowRoot = function findShadowRoot(element) { var findShadowRoot = function findShadowRoot(element) {
if (!document.documentElement.attachShadow) { if (!document.documentElement.attachShadow) {
return null; return null;
@ -231,21 +225,21 @@
* Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts * 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; var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi;
/** /**
* A pattern that matches safe data URLs. Only matches image, video and audio types. * 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 * 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; var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
var allowedAttribute = function allowedAttribute(attr, allowedAttributeList) { var allowedAttribute = function allowedAttribute(attr, allowedAttributeList) {
var attrName = attr.nodeName.toLowerCase(); var attrName = attr.nodeName.toLowerCase();
if (allowedAttributeList.indexOf(attrName) !== -1) { if (allowedAttributeList.indexOf(attrName) !== -1) {
if (uriAttrs.indexOf(attrName) !== -1) { if (uriAttrs.indexOf(attrName) !== -1) {
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN)); return SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue);
} }
return true; return true;
@ -255,8 +249,8 @@
return attrRegex instanceof RegExp; return attrRegex instanceof RegExp;
}); // Check if a regular expression validates the attribute. }); // Check if a regular expression validates the attribute.
for (var i = 0, l = regExp.length; i < l; i++) { for (var i = 0, len = regExp.length; i < len; i++) {
if (attrName.match(regExp[i])) { if (regExp[i].test(attrName)) {
return true; return true;
} }
} }
@ -283,7 +277,7 @@
h5: [], h5: [],
h6: [], h6: [],
i: [], i: [],
img: ['src', 'alt', 'title', 'width', 'height'], img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
li: [], li: [],
ol: [], ol: [],
p: [], p: [],
@ -298,6 +292,8 @@
ul: [] ul: []
}; };
function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) { function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
var _ref;
if (!unsafeHtml.length) { if (!unsafeHtml.length) {
return unsafeHtml; return unsafeHtml;
} }
@ -309,9 +305,12 @@
var domParser = new window.DOMParser(); var domParser = new window.DOMParser();
var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html'); var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
var whitelistKeys = Object.keys(whiteList); var whitelistKeys = Object.keys(whiteList);
var elements = makeArray(createdDocument.body.querySelectorAll('*'));
var elements = (_ref = []).concat.apply(_ref, createdDocument.body.querySelectorAll('*'));
var _loop = function _loop(i, len) { var _loop = function _loop(i, len) {
var _ref2;
var el = elements[i]; var el = elements[i];
var elName = el.nodeName.toLowerCase(); var elName = el.nodeName.toLowerCase();
@ -320,7 +319,8 @@
return "continue"; return "continue";
} }
var attributeList = makeArray(el.attributes); var attributeList = (_ref2 = []).concat.apply(_ref2, el.attributes);
var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []); var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
attributeList.forEach(function (attr) { attributeList.forEach(function (attr) {
if (!allowedAttribute(attr, whitelistedAttributes)) { if (!allowedAttribute(attr, whitelistedAttributes)) {
@ -394,11 +394,7 @@
whiteList: DefaultWhitelist, whiteList: DefaultWhitelist,
popperConfig: null popperConfig: null
}; };
var HoverState = { var Event$1 = {
SHOW: 'show',
OUT: 'out'
};
var Event = {
HIDE: "hide" + EVENT_KEY, HIDE: "hide" + EVENT_KEY,
HIDDEN: "hidden" + EVENT_KEY, HIDDEN: "hidden" + EVENT_KEY,
SHOW: "show" + EVENT_KEY, SHOW: "show" + EVENT_KEY,
@ -410,28 +406,23 @@
MOUSEENTER: "mouseenter" + EVENT_KEY, MOUSEENTER: "mouseenter" + EVENT_KEY,
MOUSELEAVE: "mouseleave" + EVENT_KEY MOUSELEAVE: "mouseleave" + EVENT_KEY
}; };
var ClassName = { var CLASS_NAME_FADE = 'fade';
FADE: 'fade', var CLASS_NAME_MODAL = 'modal';
SHOW: 'show' var CLASS_NAME_SHOW = 'show';
}; var HOVER_STATE_SHOW = 'show';
var Selector = { var HOVER_STATE_OUT = 'out';
TOOLTIP_INNER: '.tooltip-inner' var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
}; var TRIGGER_HOVER = 'hover';
var Trigger = { var TRIGGER_FOCUS = 'focus';
HOVER: 'hover', var TRIGGER_CLICK = 'click';
FOCUS: 'focus', var TRIGGER_MANUAL = 'manual';
CLICK: 'click',
MANUAL: 'manual'
};
/** /**
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
* Class Definition * Class Definition
* ------------------------------------------------------------------------ * ------------------------------------------------------------------------
*/ */
var Tooltip = var Tooltip = /*#__PURE__*/function () {
/*#__PURE__*/
function () {
function Tooltip(element, config) { function Tooltip(element, config) {
if (typeof Popper === 'undefined') { if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org)'); throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org)');
@ -491,7 +482,7 @@
context._leave(null, context); context._leave(null, context);
} }
} else { } else {
if (this.getTipElement().classList.contains(ClassName.SHOW)) { if (this.getTipElement().classList.contains(CLASS_NAME_SHOW)) {
this._leave(null, this); this._leave(null, this);
return; return;
@ -505,7 +496,7 @@
clearTimeout(this._timeout); clearTimeout(this._timeout);
Data.removeData(this.element, this.constructor.DATA_KEY); Data.removeData(this.element, this.constructor.DATA_KEY);
EventHandler.off(this.element, this.constructor.EVENT_KEY); EventHandler.off(this.element, this.constructor.EVENT_KEY);
EventHandler.off(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', this._hideModalHandler); EventHandler.off(SelectorEngine.closest(this.element, "." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
if (this.tip) { if (this.tip) {
this.tip.parentNode.removeChild(this.tip); this.tip.parentNode.removeChild(this.tip);
@ -549,7 +540,7 @@
this.setContent(); this.setContent();
if (this.config.animation) { if (this.config.animation) {
tip.classList.add(ClassName.FADE); tip.classList.add(CLASS_NAME_FADE);
} }
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
@ -568,13 +559,15 @@
EventHandler.trigger(this.element, this.constructor.Event.INSERTED); EventHandler.trigger(this.element, this.constructor.Event.INSERTED);
this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment)); this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));
tip.classList.add(ClassName.SHOW); // If this is a touch-enabled device we add extra tip.classList.add(CLASS_NAME_SHOW); // If this is a touch-enabled device we add extra
// empty mouseover listeners to the body's immediate children; // empty mouseover listeners to the body's immediate children;
// only needed because of broken event delegation on iOS // only needed because of broken event delegation on iOS
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
if ('ontouchstart' in document.documentElement) { if ('ontouchstart' in document.documentElement) {
makeArray(document.body.children).forEach(function (element) { var _ref;
(_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) {
EventHandler.on(element, 'mouseover', noop()); EventHandler.on(element, 'mouseover', noop());
}); });
} }
@ -588,12 +581,12 @@
_this._hoverState = null; _this._hoverState = null;
EventHandler.trigger(_this.element, _this.constructor.Event.SHOWN); EventHandler.trigger(_this.element, _this.constructor.Event.SHOWN);
if (prevHoverState === HoverState.OUT) { if (prevHoverState === HOVER_STATE_OUT) {
_this._leave(null, _this); _this._leave(null, _this);
} }
}; };
if (this.tip.classList.contains(ClassName.FADE)) { if (this.tip.classList.contains(CLASS_NAME_FADE)) {
var transitionDuration = getTransitionDurationFromElement(this.tip); var transitionDuration = getTransitionDurationFromElement(this.tip);
EventHandler.one(this.tip, TRANSITION_END, complete); EventHandler.one(this.tip, TRANSITION_END, complete);
emulateTransitionEnd(this.tip, transitionDuration); emulateTransitionEnd(this.tip, transitionDuration);
@ -609,7 +602,7 @@
var tip = this.getTipElement(); var tip = this.getTipElement();
var complete = function complete() { var complete = function complete() {
if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) { if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
tip.parentNode.removeChild(tip); tip.parentNode.removeChild(tip);
} }
@ -628,20 +621,22 @@
return; return;
} }
tip.classList.remove(ClassName.SHOW); // If this is a touch-enabled device we remove the extra tip.classList.remove(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra
// empty mouseover listeners we added for iOS support // empty mouseover listeners we added for iOS support
if ('ontouchstart' in document.documentElement) { if ('ontouchstart' in document.documentElement) {
makeArray(document.body.children).forEach(function (element) { var _ref2;
(_ref2 = []).concat.apply(_ref2, document.body.children).forEach(function (element) {
return EventHandler.off(element, 'mouseover', noop); return EventHandler.off(element, 'mouseover', noop);
}); });
} }
this._activeTrigger[Trigger.CLICK] = false; this._activeTrigger[TRIGGER_CLICK] = false;
this._activeTrigger[Trigger.FOCUS] = false; this._activeTrigger[TRIGGER_FOCUS] = false;
this._activeTrigger[Trigger.HOVER] = false; this._activeTrigger[TRIGGER_HOVER] = false;
if (this.tip.classList.contains(ClassName.FADE)) { if (this.tip.classList.contains(CLASS_NAME_FADE)) {
var transitionDuration = getTransitionDurationFromElement(tip); var transitionDuration = getTransitionDurationFromElement(tip);
EventHandler.one(tip, TRANSITION_END, complete); EventHandler.one(tip, TRANSITION_END, complete);
emulateTransitionEnd(tip, transitionDuration); emulateTransitionEnd(tip, transitionDuration);
@ -676,9 +671,9 @@
_proto.setContent = function setContent() { _proto.setContent = function setContent() {
var tip = this.getTipElement(); var tip = this.getTipElement();
this.setElementContent(SelectorEngine.findOne(Selector.TOOLTIP_INNER, tip), this.getTitle()); this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
tip.classList.remove(ClassName.FADE); tip.classList.remove(CLASS_NAME_FADE);
tip.classList.remove(ClassName.SHOW); tip.classList.remove(CLASS_NAME_SHOW);
}; };
_proto.setElementContent = function setElementContent(element, content) { _proto.setElementContent = function setElementContent(element, content) {
@ -801,9 +796,9 @@
EventHandler.on(_this5.element, _this5.constructor.Event.CLICK, _this5.config.selector, function (event) { EventHandler.on(_this5.element, _this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
return _this5.toggle(event); return _this5.toggle(event);
}); });
} else if (trigger !== Trigger.MANUAL) { } else if (trigger !== TRIGGER_MANUAL) {
var eventIn = trigger === Trigger.HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN; var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
var eventOut = trigger === Trigger.HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT; var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
EventHandler.on(_this5.element, eventIn, _this5.config.selector, function (event) { EventHandler.on(_this5.element, eventIn, _this5.config.selector, function (event) {
return _this5._enter(event); return _this5._enter(event);
}); });
@ -819,7 +814,7 @@
} }
}; };
EventHandler.on(SelectorEngine.closest(this.element, '.modal'), 'hide.bs.modal', this._hideModalHandler); EventHandler.on(SelectorEngine.closest(this.element, "." + CLASS_NAME_MODAL), 'hide.bs.modal', this._hideModalHandler);
if (this.config.selector) { if (this.config.selector) {
this.config = _objectSpread2({}, this.config, { this.config = _objectSpread2({}, this.config, {
@ -850,16 +845,16 @@
} }
if (event) { if (event) {
context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
} }
if (context.getTipElement().classList.contains(ClassName.SHOW) || context._hoverState === HoverState.SHOW) { if (context.getTipElement().classList.contains(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
context._hoverState = HoverState.SHOW; context._hoverState = HOVER_STATE_SHOW;
return; return;
} }
clearTimeout(context._timeout); clearTimeout(context._timeout);
context._hoverState = HoverState.SHOW; context._hoverState = HOVER_STATE_SHOW;
if (!context.config.delay || !context.config.delay.show) { if (!context.config.delay || !context.config.delay.show) {
context.show(); context.show();
@ -867,7 +862,7 @@
} }
context._timeout = setTimeout(function () { context._timeout = setTimeout(function () {
if (context._hoverState === HoverState.SHOW) { if (context._hoverState === HOVER_STATE_SHOW) {
context.show(); context.show();
} }
}, context.config.delay.show); }, context.config.delay.show);
@ -883,7 +878,7 @@
} }
if (event) { if (event) {
context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
} }
if (context._isWithActiveTrigger()) { if (context._isWithActiveTrigger()) {
@ -891,7 +886,7 @@
} }
clearTimeout(context._timeout); clearTimeout(context._timeout);
context._hoverState = HoverState.OUT; context._hoverState = HOVER_STATE_OUT;
if (!context.config.delay || !context.config.delay.hide) { if (!context.config.delay || !context.config.delay.hide) {
context.hide(); context.hide();
@ -899,7 +894,7 @@
} }
context._timeout = setTimeout(function () { context._timeout = setTimeout(function () {
if (context._hoverState === HoverState.OUT) { if (context._hoverState === HOVER_STATE_OUT) {
context.hide(); context.hide();
} }
}, context.config.delay.hide); }, context.config.delay.hide);
@ -971,7 +966,7 @@
var tip = this.getTipElement(); var tip = this.getTipElement();
var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX); var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
if (tabClass !== null && tabClass.length) { if (tabClass !== null && tabClass.length > 0) {
tabClass.map(function (token) { tabClass.map(function (token) {
return token.trim(); return token.trim();
}).forEach(function (tClass) { }).forEach(function (tClass) {
@ -997,7 +992,7 @@
return; return;
} }
tip.classList.remove(ClassName.FADE); tip.classList.remove(CLASS_NAME_FADE);
this.config.animation = false; this.config.animation = false;
this.hide(); this.hide();
this.show(); this.show();
@ -1056,7 +1051,7 @@
}, { }, {
key: "Event", key: "Event",
get: function get() { get: function get() {
return Event; return Event$1;
} }
}, { }, {
key: "EVENT_KEY", key: "EVENT_KEY",

File diff suppressed because one or more lines are too long

View File

@ -118,7 +118,7 @@ class Carousel {
this._element = element this._element = element
this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element) this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element)
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0 this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent) this._pointerEvent = Boolean(window.PointerEvent)
this._addEventListeners() this._addEventListeners()
Data.setData(element, DATA_KEY, this) Data.setData(element, DATA_KEY, this)
@ -478,13 +478,10 @@ class Carousel {
EventHandler EventHandler
.one(activeElement, TRANSITION_END, () => { .one(activeElement, TRANSITION_END, () => {
nextElement.classList.remove(directionalClassName) nextElement.classList.remove(directionalClassName, orderClassName)
nextElement.classList.remove(orderClassName)
nextElement.classList.add(CLASS_NAME_ACTIVE) nextElement.classList.add(CLASS_NAME_ACTIVE)
activeElement.classList.remove(CLASS_NAME_ACTIVE) activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName)
activeElement.classList.remove(orderClassName)
activeElement.classList.remove(directionalClassName)
this._isSliding = false this._isSliding = false

View File

@ -192,8 +192,7 @@ class Collapse {
const complete = () => { const complete = () => {
this._element.classList.remove(CLASS_NAME_COLLAPSING) this._element.classList.remove(CLASS_NAME_COLLAPSING)
this._element.classList.add(CLASS_NAME_COLLAPSE) this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)
this._element.classList.add(CLASS_NAME_SHOW)
this._element.style[dimension] = '' this._element.style[dimension] = ''
@ -230,8 +229,7 @@ class Collapse {
reflow(this._element) reflow(this._element)
this._element.classList.add(CLASS_NAME_COLLAPSING) this._element.classList.add(CLASS_NAME_COLLAPSING)
this._element.classList.remove(CLASS_NAME_COLLAPSE) this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)
this._element.classList.remove(CLASS_NAME_SHOW)
const triggerArrayLength = this._triggerArray.length const triggerArrayLength = this._triggerArray.length
if (triggerArrayLength > 0) { if (triggerArrayLength > 0) {

View File

@ -60,7 +60,6 @@ const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}`
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}` const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`
const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}` const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
const CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable'
const CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure' const CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure'
const CLASS_NAME_BACKDROP = 'modal-backdrop' const CLASS_NAME_BACKDROP = 'modal-backdrop'
const CLASS_NAME_OPEN = 'modal-open' const CLASS_NAME_OPEN = 'modal-open'
@ -249,11 +248,10 @@ class Modal {
this._element.style.display = 'block' this._element.style.display = 'block'
this._element.removeAttribute('aria-hidden') this._element.removeAttribute('aria-hidden')
this._element.setAttribute('aria-modal', true) this._element.setAttribute('aria-modal', true)
if (this._dialog.classList.contains(CLASS_NAME_SCROLLABLE) && modalBody) {
modalBody.scrollTop = 0
} else {
this._element.scrollTop = 0 this._element.scrollTop = 0
if (modalBody) {
modalBody.scrollTop = 0
} }
if (transition) { if (transition) {

View File

@ -113,8 +113,7 @@ class Popover extends Tooltip {
this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content) this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content)
tip.classList.remove(CLASS_NAME_FADE) tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)
tip.classList.remove(CLASS_NAME_SHOW)
} }
_addAttachmentClass(attachment) { _addAttachmentClass(attachment) {

View File

@ -400,8 +400,7 @@ class Tooltip {
setContent() { setContent() {
const tip = this.getTipElement() const tip = this.getTipElement()
this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle()) this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle())
tip.classList.remove(CLASS_NAME_FADE) tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)
tip.classList.remove(CLASS_NAME_SHOW)
} }
setElementContent(element, content) { setElementContent(element, content) {
@ -421,7 +420,7 @@ class Tooltip {
element.appendChild(content) element.appendChild(content)
} }
} else { } else {
element.innerText = content.textContent element.textContent = content.textContent
} }
return return
@ -434,7 +433,7 @@ class Tooltip {
element.innerHTML = content element.innerHTML = content
} else { } else {
element.innerText = content element.textContent = content
} }
} }

View File

@ -25,21 +25,21 @@
</ol> </ol>
<div class="carousel-inner"> <div class="carousel-inner">
<div class="carousel-item"> <div class="carousel-item">
<img class="d-block w-100" data-src="holder.js/800x400?auto=yes&amp;bg=777&amp;fg=555&amp;text=First slide" alt="First slide [800x400]" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22800%22%20height%3D%22400%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20400%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_167a6f826cb%20text%20%7B%20fill%3A%23555%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A40pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_167a6f826cb%22%3E%3Crect%20width%3D%22800%22%20height%3D%22400%22%20fill%3D%22%23777%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22285.921875%22%20y%3D%22217.7%22%3EFirst%20slide%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" data-holder-rendered="true"> <img class="d-block w-100" alt="First slide [800x400]" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22800%22%20height%3D%22400%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20400%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_167a6f826cb%20text%20%7B%20fill%3A%23555%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A40pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_167a6f826cb%22%3E%3Crect%20width%3D%22800%22%20height%3D%22400%22%20fill%3D%22%23777%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22285.921875%22%20y%3D%22217.7%22%3EFirst%20slide%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E">
<div class="carousel-caption d-none d-md-block"> <div class="carousel-caption d-none d-md-block">
<h5>First slide label</h5> <h5>First slide label</h5>
<p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p> <p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
</div> </div>
</div> </div>
<div class="carousel-item active"> <div class="carousel-item active">
<img class="d-block w-100" data-src="holder.js/800x400?auto=yes&amp;bg=666&amp;fg=444&amp;text=Second slide" alt="Second slide [800x400]" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22800%22%20height%3D%22400%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20400%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_167a6f826ce%20text%20%7B%20fill%3A%23444%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A40pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_167a6f826ce%22%3E%3Crect%20width%3D%22800%22%20height%3D%22400%22%20fill%3D%22%23666%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22247.3203125%22%20y%3D%22217.7%22%3ESecond%20slide%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" data-holder-rendered="true"> <img class="d-block w-100" alt="Second slide [800x400]" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22800%22%20height%3D%22400%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20400%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_167a6f826ce%20text%20%7B%20fill%3A%23444%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A40pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_167a6f826ce%22%3E%3Crect%20width%3D%22800%22%20height%3D%22400%22%20fill%3D%22%23666%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22247.3203125%22%20y%3D%22217.7%22%3ESecond%20slide%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E">
<div class="carousel-caption d-none d-md-block"> <div class="carousel-caption d-none d-md-block">
<h5>Second slide label</h5> <h5>Second slide label</h5>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</div> </div>
</div> </div>
<div class="carousel-item"> <div class="carousel-item">
<img class="d-block w-100" data-src="holder.js/800x400?auto=yes&amp;bg=555&amp;fg=333&amp;text=Third slide" alt="Third slide [800x400]" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22800%22%20height%3D%22400%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20400%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_167a6f826cf%20text%20%7B%20fill%3A%23333%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A40pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_167a6f826cf%22%3E%3Crect%20width%3D%22800%22%20height%3D%22400%22%20fill%3D%22%23555%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22277%22%20y%3D%22217.7%22%3EThird%20slide%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E" data-holder-rendered="true"> <img class="d-block w-100" alt="Third slide [800x400]" src="data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%22800%22%20height%3D%22400%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20800%20400%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3Cstyle%20type%3D%22text%2Fcss%22%3E%23holder_167a6f826cf%20text%20%7B%20fill%3A%23333%3Bfont-weight%3Anormal%3Bfont-family%3AHelvetica%2C%20monospace%3Bfont-size%3A40pt%20%7D%20%3C%2Fstyle%3E%3C%2Fdefs%3E%3Cg%20id%3D%22holder_167a6f826cf%22%3E%3Crect%20width%3D%22800%22%20height%3D%22400%22%20fill%3D%22%23555%22%3E%3C%2Frect%3E%3Cg%3E%3Ctext%20x%3D%22277%22%20y%3D%22217.7%22%3EThird%20slide%3C%2Ftext%3E%3C%2Fg%3E%3C%2Fg%3E%3C%2Fsvg%3E">
<div class="carousel-caption d-none d-md-block"> <div class="carousel-caption d-none d-md-block">
<h5>Third slide label</h5> <h5>Third slide label</h5>
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p> <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>

View File

@ -5,12 +5,11 @@ import EventHandler from '../../src/dom/event-handler'
import { getFixture, clearFixture, createEvent, jQueryMock } from '../helpers/fixture' import { getFixture, clearFixture, createEvent, jQueryMock } from '../helpers/fixture'
describe('Carousel', () => { describe('Carousel', () => {
const { Simulator, PointerEvent, MSPointerEvent } = window const { Simulator, PointerEvent } = window
const originWinPointerEvent = PointerEvent || MSPointerEvent const originWinPointerEvent = PointerEvent
const supportPointerEvent = Boolean(PointerEvent || MSPointerEvent) const supportPointerEvent = Boolean(PointerEvent)
window.MSPointerEvent = null const cssStyleCarousel = '.carousel.pointer-event { touch-action: none; }'
const cssStyleCarousel = '.carousel.pointer-event { -ms-touch-action: none; touch-action: none; }'
const stylesCarousel = document.createElement('style') const stylesCarousel = document.createElement('style')
stylesCarousel.type = 'text/css' stylesCarousel.type = 'text/css'

View File

@ -382,10 +382,29 @@ describe('Modal', () => {
modal.show() modal.show()
}) })
it('should set modal body scroll top to 0 if .modal-dialog-scrollable', done => { it('should set .modal\'s scroll top to 0', done => {
fixtureEl.innerHTML = [ fixtureEl.innerHTML = [
'<div class="modal fade">', '<div class="modal fade">',
' <div class="modal-dialog modal-dialog-scrollable">', ' <div class="modal-dialog">',
' </div>',
'</div>'
].join('')
const modalEl = fixtureEl.querySelector('.modal')
const modal = new Modal(modalEl)
modalEl.addEventListener('shown.bs.modal', () => {
expect(modalEl.scrollTop).toEqual(0)
done()
})
modal.show()
})
it('should set modal body scroll top to 0 if modal body do not exists', done => {
fixtureEl.innerHTML = [
'<div class="modal fade">',
' <div class="modal-dialog">',
' <div class="modal-body"></div>', ' <div class="modal-body"></div>',
' </div>', ' </div>',
'</div>' '</div>'
@ -403,25 +422,6 @@ describe('Modal', () => {
modal.show() modal.show()
}) })
it('should set .modal\'s scroll top to 0 if .modal-dialog-scrollable and modal body do not exists', done => {
fixtureEl.innerHTML = [
'<div class="modal fade">',
' <div class="modal-dialog modal-dialog-scrollable">',
' </div>',
'</div>'
].join('')
const modalEl = fixtureEl.querySelector('.modal')
const modal = new Modal(modalEl)
modalEl.addEventListener('shown.bs.modal', () => {
expect(modalEl.scrollTop).toEqual(0)
done()
})
modal.show()
})
it('should not enforce focus if focus equal to false', done => { it('should not enforce focus if focus equal to false', done => {
fixtureEl.innerHTML = '<div class="modal fade"><div class="modal-dialog" /></div>' fixtureEl.innerHTML = '<div class="modal fade"><div class="modal-dialog" /></div>'

View File

@ -129,8 +129,8 @@ describe('Tab', () => {
it('should not fire shown when tab is already active', done => { it('should not fire shown when tab is already active', done => {
fixtureEl.innerHTML = [ fixtureEl.innerHTML = [
'<ul class="nav nav-tabs" role="tablist">', '<ul class="nav nav-tabs" role="tablist">',
' <li class="nav-item"><a href="#home" class="nav-link active" role="tab">Home</a></li>', ' <li class="nav-item" role="presentation"><a href="#home" class="nav-link active" role="tab">Home</a></li>',
' <li class="nav-item"><a href="#profile" class="nav-link" role="tab">Profile</a></li>', ' <li class="nav-item" role="presentation"><a href="#profile" class="nav-link" role="tab">Profile</a></li>',
'</ul>', '</ul>',
'<div class="tab-content">', '<div class="tab-content">',
' <div class="tab-pane active" id="home" role="tabpanel"></div>', ' <div class="tab-pane active" id="home" role="tabpanel"></div>',
@ -155,8 +155,8 @@ describe('Tab', () => {
it('should not fire shown when tab is disabled', done => { it('should not fire shown when tab is disabled', done => {
fixtureEl.innerHTML = [ fixtureEl.innerHTML = [
'<ul class="nav nav-tabs" role="tablist">', '<ul class="nav nav-tabs" role="tablist">',
' <li class="nav-item"><a href="#home" class="nav-link active" role="tab">Home</a></li>', ' <li class="nav-item" role="presentation"><a href="#home" class="nav-link active" role="tab">Home</a></li>',
' <li class="nav-item"><a href="#profile" class="nav-link disabled" role="tab">Profile</a></li>', ' <li class="nav-item" role="presentation"><a href="#profile" class="nav-link disabled" role="tab">Profile</a></li>',
'</ul>', '</ul>',
'<div class="tab-content">', '<div class="tab-content">',
' <div class="tab-pane active" id="home" role="tabpanel"></div>', ' <div class="tab-pane active" id="home" role="tabpanel"></div>',
@ -181,8 +181,8 @@ describe('Tab', () => {
it('show and shown events should reference correct relatedTarget', done => { it('show and shown events should reference correct relatedTarget', done => {
fixtureEl.innerHTML = [ fixtureEl.innerHTML = [
'<ul class="nav nav-tabs" role="tablist">', '<ul class="nav nav-tabs" role="tablist">',
' <li class="nav-item"><a href="#home" class="nav-link active" role="tab">Home</a></li>', ' <li class="nav-item" role="presentation"><a href="#home" class="nav-link active" role="tab">Home</a></li>',
' <li class="nav-item"><a id="triggerProfile" href="#profile" class="nav-link" role="tab">Profile</a></li>', ' <li class="nav-item" role="presentation"><a id="triggerProfile" href="#profile" class="nav-link" role="tab">Profile</a></li>',
'</ul>', '</ul>',
'<div class="tab-content">', '<div class="tab-content">',
' <div class="tab-pane active" id="home" role="tabpanel"></div>', ' <div class="tab-pane active" id="home" role="tabpanel"></div>',
@ -275,17 +275,17 @@ describe('Tab', () => {
it('should handle removed tabs', done => { it('should handle removed tabs', done => {
fixtureEl.innerHTML = [ fixtureEl.innerHTML = [
'<ul class="nav nav-tabs" role="tablist">', '<ul class="nav nav-tabs" role="tablist">',
' <li class="nav-item">', ' <li class="nav-item" role="presentation">',
' <a class="nav-link nav-tab" href="#profile" role="tab" data-toggle="tab">', ' <a class="nav-link nav-tab" href="#profile" role="tab" data-toggle="tab">',
' <button class="close"><span aria-hidden="true">&times;</span></button>', ' <button class="close"><span aria-hidden="true">&times;</span></button>',
' </a>', ' </a>',
' </li>', ' </li>',
' <li class="nav-item">', ' <li class="nav-item" role="presentation">',
' <a id="secondNav" class="nav-link nav-tab" href="#buzz" role="tab" data-toggle="tab">', ' <a id="secondNav" class="nav-link nav-tab" href="#buzz" role="tab" data-toggle="tab">',
' <button class="close"><span aria-hidden="true">&times;</span></button>', ' <button class="close"><span aria-hidden="true">&times;</span></button>',
' </a>', ' </a>',
' </li>', ' </li>',
' <li class="nav-item">', ' <li class="nav-item" role="presentation">',
' <a class="nav-link nav-tab" href="#references" role="tab" data-toggle="tab">', ' <a class="nav-link nav-tab" href="#references" role="tab" data-toggle="tab">',
' <button id="btnClose" class="close"><span aria-hidden="true">&times;</span></button>', ' <button id="btnClose" class="close"><span aria-hidden="true">&times;</span></button>',
' </a>', ' </a>',
@ -418,8 +418,8 @@ describe('Tab', () => {
it('should create dynamically a tab', done => { it('should create dynamically a tab', done => {
fixtureEl.innerHTML = [ fixtureEl.innerHTML = [
'<ul class="nav nav-tabs" role="tablist">', '<ul class="nav nav-tabs" role="tablist">',
' <li class="nav-item"><a href="#home" class="nav-link active" role="tab">Home</a></li>', ' <li class="nav-item" role="presentation"><a href="#home" class="nav-link active" role="tab">Home</a></li>',
' <li class="nav-item"><a id="triggerProfile" data-toggle="tab" href="#profile" class="nav-link" role="tab">Profile</a></li>', ' <li class="nav-item" role="presentation"><a id="triggerProfile" data-toggle="tab" href="#profile" class="nav-link" role="tab">Profile</a></li>',
'</ul>', '</ul>',
'<div class="tab-content">', '<div class="tab-content">',
' <div class="tab-pane active" id="home" role="tabpanel"></div>', ' <div class="tab-pane active" id="home" role="tabpanel"></div>',
@ -504,8 +504,8 @@ describe('Tab', () => {
it('should not remove fade class if no active pane is present', done => { it('should not remove fade class if no active pane is present', done => {
fixtureEl.innerHTML = [ fixtureEl.innerHTML = [
'<ul class="nav nav-tabs" role="tablist">', '<ul class="nav nav-tabs" role="tablist">',
' <li class="nav-item"><a id="tab-home" href="#home" class="nav-link" data-toggle="tab" role="tab">Home</a></li>', ' <li class="nav-item" role="presentation"><a id="tab-home" href="#home" class="nav-link" data-toggle="tab" role="tab">Home</a></li>',
' <li class="nav-item"><a id="tab-profile" href="#profile" class="nav-link" data-toggle="tab" role="tab">Profile</a></li>', ' <li class="nav-item" role="presentation"><a id="tab-profile" href="#profile" class="nav-link" data-toggle="tab" role="tab">Profile</a></li>',
'</ul>', '</ul>',
'<div class="tab-content">', '<div class="tab-content">',
' <div class="tab-pane fade" id="home" role="tabpanel"></div>', ' <div class="tab-pane fade" id="home" role="tabpanel"></div>',
@ -541,10 +541,10 @@ describe('Tab', () => {
it('should not add show class to tab panes if there is no `.fade` class', done => { it('should not add show class to tab panes if there is no `.fade` class', done => {
fixtureEl.innerHTML = [ fixtureEl.innerHTML = [
'<ul class="nav nav-tabs" role="tablist">', '<ul class="nav nav-tabs" role="tablist">',
' <li class="nav-item">', ' <li class="nav-item" role="presentation">',
' <a class="nav-link nav-tab" href="#home" role="tab" data-toggle="tab">Home</a>', ' <a class="nav-link nav-tab" href="#home" role="tab" data-toggle="tab">Home</a>',
' </li>', ' </li>',
' <li class="nav-item">', ' <li class="nav-item" role="presentation">',
' <a id="secondNav" class="nav-link nav-tab" href="#profile" role="tab" data-toggle="tab">Profile</a>', ' <a id="secondNav" class="nav-link nav-tab" href="#profile" role="tab" data-toggle="tab">Profile</a>',
' </li>', ' </li>',
'</ul>', '</ul>',
@ -567,10 +567,10 @@ describe('Tab', () => {
it('should add show class to tab panes if there is a `.fade` class', done => { it('should add show class to tab panes if there is a `.fade` class', done => {
fixtureEl.innerHTML = [ fixtureEl.innerHTML = [
'<ul class="nav nav-tabs" role="tablist">', '<ul class="nav nav-tabs" role="tablist">',
' <li class="nav-item">', ' <li class="nav-item" role="presentation">',
' <a class="nav-link nav-tab" href="#home" role="tab" data-toggle="tab">Home</a>', ' <a class="nav-link nav-tab" href="#home" role="tab" data-toggle="tab">Home</a>',
' </li>', ' </li>',
' <li class="nav-item">', ' <li class="nav-item" role="presentation">',
' <a id="secondNav" class="nav-link nav-tab" href="#profile" role="tab" data-toggle="tab">Profile</a>', ' <a id="secondNav" class="nav-link nav-tab" href="#profile" role="tab" data-toggle="tab">Profile</a>',
' </li>', ' </li>',
'</ul>', '</ul>',

View File

@ -913,7 +913,7 @@ describe('Tooltip', () => {
tooltip.setElementContent(tooltip.getTipElement(), 'test') tooltip.setElementContent(tooltip.getTipElement(), 'test')
expect(tooltip.getTipElement().innerText).toEqual('test') expect(tooltip.getTipElement().textContent).toEqual('test')
}) })
}) })

View File

@ -11,7 +11,7 @@
<h1>Collapse <small>Bootstrap Visual Test</small></h1> <h1>Collapse <small>Bootstrap Visual Test</small></h1>
<div id="accordion" role="tablist"> <div id="accordion" role="tablist">
<div class="card"> <div class="card" role="presentation">
<div class="card-header" role="tab" id="headingOne"> <div class="card-header" role="tab" id="headingOne">
<h5 class="mb-0"> <h5 class="mb-0">
<a data-toggle="collapse" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> <a data-toggle="collapse" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
@ -26,7 +26,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="card"> <div class="card" role="presentation">
<div class="card-header" role="tab" id="headingTwo"> <div class="card-header" role="tab" id="headingTwo">
<h5 class="mb-0"> <h5 class="mb-0">
<a class="collapsed" data-toggle="collapse" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> <a class="collapsed" data-toggle="collapse" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
@ -40,7 +40,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="card"> <div class="card" role="presentation">
<div class="card-header" role="tab" id="headingThree"> <div class="card-header" role="tab" id="headingThree">
<h5 class="mb-0"> <h5 class="mb-0">
<a class="collapsed" data-toggle="collapse" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> <a class="collapsed" data-toggle="collapse" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
@ -54,7 +54,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="card"> <div class="card" role="presentation">
<div class="card-header" role="tab" id="headingFour"> <div class="card-header" role="tab" id="headingFour">
<h5 class="mb-0"> <h5 class="mb-0">
<a class="collapsed" data-toggle="collapse" href="#collapseFour" aria-expanded="false" aria-controls="collapseFour"> <a class="collapsed" data-toggle="collapse" href="#collapseFour" aria-expanded="false" aria-controls="collapseFour">

View File

@ -29,11 +29,11 @@
</li> </li>
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="dropdown" data-toggle="dropdown" aria-expanded="false">Dropdown</a> <a class="nav-link dropdown-toggle" href="#" id="dropdown" data-toggle="dropdown" aria-expanded="false">Dropdown</a>
<div class="dropdown-menu" aria-labelledby="dropdown"> <ul class="dropdown-menu" aria-labelledby="dropdown">
<a class="dropdown-item" href="#">Action</a> <li><a class="dropdown-item" href="#">Action</a></li>
<a class="dropdown-item" href="#">Another action</a> <li><a class="dropdown-item" href="#">Another action</a></li>
<a class="dropdown-item" href="#">Something else here</a> <li><a class="dropdown-item" href="#">Something else here</a></li>
</div> </ul>
</li> </li>
</ul> </ul>
</div> </div>
@ -51,11 +51,11 @@
</li> </li>
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="dropdown2" data-toggle="dropdown" aria-expanded="false">Dropdown</a> <a class="nav-link dropdown-toggle" href="#" id="dropdown2" data-toggle="dropdown" aria-expanded="false">Dropdown</a>
<div class="dropdown-menu" aria-labelledby="dropdown2"> <ul class="dropdown-menu" aria-labelledby="dropdown2">
<a class="dropdown-item" href="#">Action</a> <li><a class="dropdown-item" href="#">Action</a></li>
<a class="dropdown-item" href="#">Another action</a> <li><a class="dropdown-item" href="#">Another action</a></li>
<a class="dropdown-item" href="#">Something else here</a> <li><a class="dropdown-item" href="#">Something else here</a></li>
</div> </ul>
</li> </li>
</ul> </ul>
@ -72,20 +72,20 @@
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<span class="sr-only">Dropup split</span> <span class="sr-only">Dropup split</span>
</button> </button>
<div class="dropdown-menu"> <ul class="dropdown-menu">
<a class="dropdown-item" href="#">Action</a> <li><a class="dropdown-item" href="#">Action</a></li>
<a class="dropdown-item" href="#">Another action</a> <li><a class="dropdown-item" href="#">Another action</a></li>
<a class="dropdown-item" href="#">Something else here</a> <li><a class="dropdown-item" href="#">Something else here</a></li>
</div> </ul>
</div> </div>
<div class="btn-group dropup"> <div class="btn-group dropup">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Dropup</button> <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Dropup</button>
<div class="dropdown-menu"> <ul class="dropdown-menu">
<a class="dropdown-item" href="#">Action</a> <li><a class="dropdown-item" href="#">Action</a></li>
<a class="dropdown-item" href="#">Another action</a> <li><a class="dropdown-item" href="#">Another action</a></li>
<a class="dropdown-item" href="#">Something else here</a> <li><a class="dropdown-item" href="#">Something else here</a></li>
</div> </ul>
</div> </div>
<div class="btn-group"> <div class="btn-group">
@ -173,11 +173,11 @@
<div class="col-sm-3 mt-4"> <div class="col-sm-3 mt-4">
<div class="btn-group dropdown"> <div class="btn-group dropdown">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" data-offset="10,20">Dropdown offset</button> <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" data-offset="10,20">Dropdown offset</button>
<div class="dropdown-menu"> <ul class="dropdown-menu">
<a class="dropdown-item" href="#">Action</a> <li><a class="dropdown-item" href="#">Action</a></li>
<a class="dropdown-item" href="#">Another action</a> <li><a class="dropdown-item" href="#">Another action</a></li>
<a class="dropdown-item" href="#">Something else here</a> <li><a class="dropdown-item" href="#">Something else here</a></li>
</div> </ul>
</div> </div>
</div> </div>
<div class="col-sm-3 mt-4"> <div class="col-sm-3 mt-4">
@ -186,11 +186,11 @@
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false" data-reference="parent"> <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false" data-reference="parent">
<span class="sr-only">Dropdown split</span> <span class="sr-only">Dropdown split</span>
</button> </button>
<div class="dropdown-menu"> <ul class="dropdown-menu">
<a class="dropdown-item" href="#">Action</a> <li><a class="dropdown-item" href="#">Action</a></li>
<a class="dropdown-item" href="#">Another action</a> <li><a class="dropdown-item" href="#">Another action</a></li>
<a class="dropdown-item" href="#">Something else here</a> <li><a class="dropdown-item" href="#">Something else here</a></li>
</div> </ul>
</div> </div>
</div> </div>
<div class="col-sm-3 mt-4"> <div class="col-sm-3 mt-4">
@ -198,11 +198,11 @@
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" data-display="static" aria-expanded="false"> <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" data-display="static" aria-expanded="false">
Dropdown menu without Popper.js Dropdown menu without Popper.js
</button> </button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> <ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Action</a> <li><a class="dropdown-item" href="#">Action</a></li>
<a class="dropdown-item" href="#">Another action</a> <li><a class="dropdown-item" href="#">Another action</a></li>
<a class="dropdown-item" href="#">Something else here</a> <li><a class="dropdown-item" href="#">Something else here</a></li>
</div> </ul>
</div> </div>
</div> </div>
</div> </div>

View File

@ -55,7 +55,7 @@
<p><a href="#" data-toggle="tooltip" data-placement="top" title="Tooltip on top">This link</a> and <a href="#" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">that link</a> should have tooltips on hover.</p> <p><a href="#" data-toggle="tooltip" data-placement="top" title="Tooltip on top">This link</a> and <a href="#" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">that link</a> should have tooltips on hover.</p>
<div id="accordion" role="tablist"> <div id="accordion" role="tablist">
<div class="card"> <div class="card" role="presentation">
<div class="card-header" role="tab" id="headingOne"> <div class="card-header" role="tab" id="headingOne">
<h5 class="mb-0"> <h5 class="mb-0">
<a data-toggle="collapse" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> <a data-toggle="collapse" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
@ -70,7 +70,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="card"> <div class="card" role="presentation">
<div class="card-header" role="tab" id="headingTwo"> <div class="card-header" role="tab" id="headingTwo">
<h5 class="mb-0"> <h5 class="mb-0">
<a class="collapsed" data-toggle="collapse" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> <a class="collapsed" data-toggle="collapse" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
@ -84,7 +84,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="card"> <div class="card" role="presentation">
<div class="card-header" role="tab" id="headingThree"> <div class="card-header" role="tab" id="headingThree">
<h5 class="mb-0"> <h5 class="mb-0">
<a class="collapsed" data-toggle="collapse" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> <a class="collapsed" data-toggle="collapse" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">

View File

@ -25,11 +25,11 @@
</li> </li>
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="dropdown" data-toggle="dropdown" aria-expanded="false">Dropdown</a> <a class="nav-link dropdown-toggle" href="#" id="dropdown" data-toggle="dropdown" aria-expanded="false">Dropdown</a>
<div class="dropdown-menu" aria-labelledby="dropdown"> <ul class="dropdown-menu" aria-labelledby="dropdown">
<a class="dropdown-item" href="#one">One</a> <li><a class="dropdown-item" href="#one">One</a></li>
<a class="dropdown-item" href="#two">Two</a> <li><a class="dropdown-item" href="#two">Two</a></li>
<a class="dropdown-item" href="#three">Three</a> <li><a class="dropdown-item" href="#three">Three</a></li>
</div> </ul>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="#final">Final</a> <a class="nav-link" href="#final">Final</a>

View File

@ -18,18 +18,17 @@
<h4>Tabs without fade</h4> <h4>Tabs without fade</h4>
<ul class="nav nav-tabs" role="tablist"> <ul class="nav nav-tabs" role="tablist">
<li class="nav-item"> <li class="nav-item" role="presentation">
<a class="nav-link active" data-toggle="tab" href="#home" role="tab">Home</a> <a class="nav-link active" data-toggle="tab" href="#home" role="tab">Home</a>
</li> </li>
<li class="nav-item"> <li class="nav-item" role="presentation">
<a class="nav-link" data-toggle="tab" href="#profile" role="tab">Profile</a> <a class="nav-link" data-toggle="tab" href="#profile" role="tab">Profile</a>
</li> </li>
<li class="nav-item dropdown"> <li class="nav-item" role="presentation">
<a class="nav-link dropdown-toggle" href="#" id="dropdown" data-toggle="dropdown" aria-expanded="false">Dropdown</a> <a class="nav-link" data-toggle="tab" href="#fat" role="tab">@fat</a>
<div class="dropdown-menu" aria-labelledby="dropdown"> </li>
<a class="dropdown-item" data-toggle="tab" href="#fat" role="tab">@fat</a> <li class="nav-item" role="presentation">
<a class="dropdown-item" data-toggle="tab" href="#mdo" role="tab">@mdo</a> <a class="nav-link" data-toggle="tab" href="#mdo" role="tab">@mdo</a>
</div>
</li> </li>
</ul> </ul>
@ -55,18 +54,17 @@
<h4>Tabs with fade</h4> <h4>Tabs with fade</h4>
<ul class="nav nav-tabs" role="tablist"> <ul class="nav nav-tabs" role="tablist">
<li class="nav-item"> <li class="nav-item" role="presentation">
<a class="nav-link active" data-toggle="tab" href="#home2" role="tab">Home</a> <a class="nav-link active" data-toggle="tab" href="#home2" role="tab">Home</a>
</li> </li>
<li class="nav-item"> <li class="nav-item" role="presentation">
<a class="nav-link" data-toggle="tab" href="#profile2" role="tab">Profile</a> <a class="nav-link" data-toggle="tab" href="#profile2" role="tab">Profile</a>
</li> </li>
<li class="nav-item dropdown"> <li class="nav-item" role="presentation">
<a class="nav-link dropdown-toggle" href="#" id="dropdown2" data-toggle="dropdown" aria-expanded="false">Dropdown</a> <a class="nav-link" data-toggle="tab" href="#fat2" role="tab">@fat</a>
<div class="dropdown-menu" aria-labelledby="dropdown2"> </li>
<a class="dropdown-item" data-toggle="tab" href="#fat2" role="tab">@fat</a> <li class="nav-item" role="presentation">
<a class="dropdown-item" data-toggle="tab" href="#mdo2" role="tab">@mdo</a> <a class="nav-link" data-toggle="tab" href="#mdo2" role="tab">@mdo</a>
</div>
</li> </li>
</ul> </ul>
@ -92,18 +90,17 @@
<h4>Tabs without fade (no initially active pane)</h4> <h4>Tabs without fade (no initially active pane)</h4>
<ul class="nav nav-tabs" role="tablist"> <ul class="nav nav-tabs" role="tablist">
<li class="nav-item"> <li class="nav-item" role="presentation">
<a class="nav-link" data-toggle="tab" href="#home3" role="tab">Home</a> <a class="nav-link" data-toggle="tab" href="#home3" role="tab">Home</a>
</li> </li>
<li class="nav-item"> <li class="nav-item" role="presentation">
<a class="nav-link" data-toggle="tab" href="#profile3" role="tab">Profile</a> <a class="nav-link" data-toggle="tab" href="#profile3" role="tab">Profile</a>
</li> </li>
<li class="nav-item dropdown"> <li class="nav-item" role="presentation">
<a class="nav-link dropdown-toggle" href="#" id="dropdown3" data-toggle="dropdown" aria-expanded="false">Dropdown</a> <a class="nav-link" data-toggle="tab" href="#fat3" role="tab">@fat</a>
<div class="dropdown-menu" aria-labelledby="dropdown3"> </li>
<a class="dropdown-item" data-toggle="tab" href="#fat3" role="tab">@fat</a> <li class="nav-item" role="presentation">
<a class="dropdown-item" data-toggle="tab" href="#mdo3" role="tab">@mdo</a> <a class="nav-link" data-toggle="tab" href="#mdo3" role="tab">@mdo</a>
</div>
</li> </li>
</ul> </ul>
@ -129,18 +126,17 @@
<h4>Tabs with fade (no initially active pane)</h4> <h4>Tabs with fade (no initially active pane)</h4>
<ul class="nav nav-tabs" role="tablist"> <ul class="nav nav-tabs" role="tablist">
<li class="nav-item"> <li class="nav-item" role="presentation">
<a class="nav-link" data-toggle="tab" href="#home4" role="tab">Home</a> <a class="nav-link" data-toggle="tab" href="#home4" role="tab">Home</a>
</li> </li>
<li class="nav-item"> <li class="nav-item" role="presentation">
<a class="nav-link" data-toggle="tab" href="#profile4" role="tab">Profile</a> <a class="nav-link" data-toggle="tab" href="#profile4" role="tab">Profile</a>
</li> </li>
<li class="nav-item dropdown"> <li class="nav-item" role="presentation">
<a class="nav-link dropdown-toggle" href="#" id="dropdown4" data-toggle="dropdown" aria-expanded="false">Dropdown</a> <a class="nav-link" data-toggle="tab" href="#fat4" role="tab">@fat</a>
<div class="dropdown-menu" aria-labelledby="dropdown4"> </li>
<a class="dropdown-item" data-toggle="tab" href="#fat4" role="tab">@fat</a> <li class="nav-item" role="presentation">
<a class="dropdown-item" data-toggle="tab" href="#mdo4" role="tab">@mdo</a> <a class="nav-link" data-toggle="tab" href="#mdo4" role="tab">@mdo</a>
</div>
</li> </li>
</ul> </ul>
@ -169,10 +165,10 @@
<a class="nav-link nav-item" data-toggle="tab" href="#profile5">Profile</a> <a class="nav-link nav-item" data-toggle="tab" href="#profile5">Profile</a>
<div class="nav-item dropdown"> <div class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="dropdown5" data-toggle="dropdown" aria-expanded="false">Dropdown</a> <a class="nav-link dropdown-toggle" href="#" id="dropdown5" data-toggle="dropdown" aria-expanded="false">Dropdown</a>
<div class="dropdown-menu" aria-labelledby="dropdown5"> <ul class="dropdown-menu" aria-labelledby="dropdown5">
<a class="dropdown-item" data-toggle="tab" href="#fat5">@fat</a> <li><a class="dropdown-item" data-toggle="tab" href="#fat5">@fat</a></li>
<a class="dropdown-item" data-toggle="tab" href="#mdo5">@mdo</a> <li><a class="dropdown-item" data-toggle="tab" href="#mdo5">@mdo</a></li>
</div> </ul>
</div> </div>
<a class="nav-link nav-item disabled" href="#">Disabled</a> <a class="nav-link nav-item disabled" href="#">Disabled</a>
</nav> </nav>

2649
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -19,7 +19,7 @@
], ],
"scripts": { "scripts": {
"start": "npm-run-all --parallel watch docs-serve", "start": "npm-run-all --parallel watch docs-serve",
"bundlesize": "bundlesize", "bundlewatch": "bundlewatch --config .bundlewatch.config.json",
"css": "npm-run-all css-compile css-prefix css-minify", "css": "npm-run-all css-compile css-prefix css-minify",
"css-compile": "node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/ -o dist/css/", "css-compile": "node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/ -o dist/css/",
"css-lint": "npm-run-all --continue-on-error --parallel css-lint-*", "css-lint": "npm-run-all --continue-on-error --parallel css-lint-*",
@ -92,24 +92,24 @@
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.8.4", "@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0", "@babel/core": "^7.9.0",
"@babel/plugin-proposal-object-rest-spread": "^7.9.0", "@babel/plugin-proposal-object-rest-spread": "^7.9.5",
"@babel/preset-env": "^7.9.0", "@babel/preset-env": "^7.9.5",
"@rollup/plugin-commonjs": "^11.0.2", "@rollup/plugin-commonjs": "^11.1.0",
"@rollup/plugin-node-resolve": "^7.1.1", "@rollup/plugin-node-resolve": "^7.1.3",
"autoprefixer": "^9.7.5", "autoprefixer": "^9.7.6",
"bundlesize": "^0.18.0", "bundlewatch": "^0.2.6",
"clean-css-cli": "^4.3.0", "clean-css-cli": "^4.3.0",
"cross-env": "^7.0.2", "cross-env": "^7.0.2",
"eslint": "^6.8.0", "eslint": "^6.8.0",
"eslint-config-xo": "^0.29.1", "eslint-config-xo": "^0.29.1",
"eslint-plugin-import": "^2.20.1", "eslint-plugin-import": "^2.20.2",
"eslint-plugin-unicorn": "^17.2.0", "eslint-plugin-unicorn": "^18.0.1",
"find-unused-sass-variables": "^1.0.5", "find-unused-sass-variables": "^1.0.5",
"glob": "^7.1.6", "glob": "^7.1.6",
"hammer-simulator": "0.0.1", "hammer-simulator": "0.0.1",
"hugo-bin": "^0.56.3", "hugo-bin": "^0.57.0",
"ip": "^1.1.5", "ip": "^1.1.5",
"karma": "^4.4.1", "karma": "^5.0.1",
"karma-browserstack-launcher": "1.4.0", "karma-browserstack-launcher": "1.4.0",
"karma-chrome-launcher": "^3.1.0", "karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^2.1.1", "karma-coverage-istanbul-reporter": "^2.1.1",
@ -118,21 +118,21 @@
"karma-jasmine": "^3.1.1", "karma-jasmine": "^3.1.1",
"karma-jasmine-html-reporter": "^1.5.3", "karma-jasmine-html-reporter": "^1.5.3",
"karma-rollup-preprocessor": "^7.0.5", "karma-rollup-preprocessor": "^7.0.5",
"linkinator": "^2.0.4", "linkinator": "^2.0.6",
"lockfile-lint": "^4.2.2", "lockfile-lint": "^4.2.2",
"node-sass": "^4.13.1", "node-sass": "^4.13.1",
"nodemon": "^2.0.2", "nodemon": "^2.0.3",
"npm-run-all": "^4.1.5", "npm-run-all": "^4.1.5",
"popper.js": "^1.16.0", "popper.js": "^1.16.0",
"postcss-cli": "^7.1.0", "postcss-cli": "^7.1.0",
"rollup": "^2.2.0", "rollup": "^2.6.1",
"rollup-plugin-babel": "^4.4.0", "rollup-plugin-babel": "^4.4.0",
"rollup-plugin-istanbul": "^2.0.1", "rollup-plugin-istanbul": "^2.0.1",
"serve": "^11.3.0", "serve": "^11.3.0",
"shelljs": "^0.8.3", "shelljs": "^0.8.3",
"stylelint": "^13.2.1", "stylelint": "^13.3.2",
"stylelint-config-twbs-bootstrap": "^2.0.1", "stylelint-config-twbs-bootstrap": "^2.0.1",
"terser": "^4.6.7", "terser": "^4.6.11",
"vnu-jar": "20.3.16" "vnu-jar": "20.3.16"
}, },
"files": [ "files": [

View File

@ -40,8 +40,7 @@
} }
// Alternate styles // scss-docs-start alert-modifiers
//
// Generate contextual modifier classes for colorizing the alert. // Generate contextual modifier classes for colorizing the alert.
@each $color, $value in $theme-colors { @each $color, $value in $theme-colors {
@ -49,3 +48,4 @@
@include alert-variant(color-level($value, $alert-bg-level), color-level($value, $alert-border-level), color-level($value, $alert-color-level)); @include alert-variant(color-level($value, $alert-bg-level), color-level($value, $alert-border-level), color-level($value, $alert-color-level));
} }
} }
// scss-docs-end alert-modifiers

View File

@ -149,8 +149,6 @@
.btn-group-toggle { .btn-group-toggle {
> .btn, > .btn,
> .btn-group > .btn { > .btn-group > .btn {
margin-bottom: 0; // Override default `<label>` value
input[type="radio"], input[type="radio"],
input[type="checkbox"] { input[type="checkbox"] {
position: absolute; position: absolute;

View File

@ -19,15 +19,18 @@
margin-left: 0; margin-left: 0;
} }
> .list-group:first-child { > .list-group {
.list-group-item:first-child { border-top: inherit;
@include border-top-radius($card-border-radius); border-bottom: inherit;
}
&:first-child {
border-top-width: 0;
@include border-top-radius($card-inner-border-radius);
} }
> .list-group:last-child { &:last-child {
.list-group-item:last-child { border-bottom-width: 0;
@include border-bottom-radius($card-border-radius); @include border-bottom-radius($card-inner-border-radius);
} }
} }
} }
@ -87,6 +90,7 @@
.card-footer { .card-footer {
padding: $card-cap-padding-y $card-cap-padding-x; padding: $card-cap-padding-y $card-cap-padding-x;
color: $card-cap-color;
background-color: $card-cap-bg; background-color: $card-cap-bg;
border-top: $card-border-width solid $card-border-color; border-top: $card-border-width solid $card-border-color;

View File

@ -34,6 +34,7 @@
@include box-shadow($dropdown-box-shadow); @include box-shadow($dropdown-box-shadow);
} }
// scss-docs-start responsive-breakpoints
@each $breakpoint in map-keys($grid-breakpoints) { @each $breakpoint in map-keys($grid-breakpoints) {
@include media-breakpoint-up($breakpoint) { @include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints); $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@ -49,6 +50,7 @@
} }
} }
} }
// scss-docs-end responsive-breakpoints
// Allow for dropdowns to go bottom up (aka, dropup-menu) // Allow for dropdowns to go bottom up (aka, dropup-menu)
// Just add .dropup after the standard .dropdown class and you're set. // Just add .dropup after the standard .dropdown class and you're set.

View File

@ -128,12 +128,14 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
} }
// Request a color level // Request a color level
// scss-docs-start color-level
@function color-level($color: $primary, $level: 0) { @function color-level($color: $primary, $level: 0) {
$color-base: if($level > 0, $black, $white); $color-base: if($level > 0, $black, $white);
$level: abs($level); $level: abs($level);
@return mix($color-base, $color, $level * $theme-color-interval); @return mix($color-base, $color, $level * $theme-color-interval);
} }
// scss-docs-end color-level
@function tint-color($color, $level) { @function tint-color($color, $level) {
@return mix(white, $color, $level * $theme-color-interval); @return mix(white, $color, $level * $theme-color-interval);

View File

@ -12,40 +12,6 @@
} }
} }
// Gutters
//
// Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.
@if $enable-grid-classes {
@each $breakpoint in map-keys($grid-breakpoints) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@include media-breakpoint-up($breakpoint, $grid-breakpoints) {
@each $key, $value in $gutters {
.g#{$infix}-#{$key},
.gx#{$infix}-#{$key} {
margin-right: -$value / 2;
margin-left: -$value / 2;
> * {
padding-right: $value / 2;
padding-left: $value / 2;
}
}
.g#{$infix}-#{$key},
.gy#{$infix}-#{$key} {
margin-top: -$value;
> * {
margin-top: $value;
}
}
}
}
}
}
// Columns // Columns
// //

View File

@ -9,6 +9,7 @@
// No need to set list-style: none; since .list-group-item is block level // No need to set list-style: none; since .list-group-item is block level
padding-left: 0; // reset padding because ul and ol padding-left: 0; // reset padding because ul and ol
margin-bottom: 0; margin-bottom: 0;
@include border-radius($list-group-border-radius);
} }
@ -46,18 +47,17 @@
position: relative; position: relative;
display: block; display: block;
padding: $list-group-item-padding-y $list-group-item-padding-x; padding: $list-group-item-padding-y $list-group-item-padding-x;
margin-bottom: 0; // for <label> variations
color: $list-group-color; color: $list-group-color;
text-decoration: if($link-decoration == none, null, none); text-decoration: if($link-decoration == none, null, none);
background-color: $list-group-bg; background-color: $list-group-bg;
border: $list-group-border-width solid $list-group-border-color; border: $list-group-border-width solid $list-group-border-color;
&:first-child { &:first-child {
@include border-top-radius($list-group-border-radius); @include border-top-radius(inherit);
} }
&:last-child { &:last-child {
@include border-bottom-radius($list-group-border-radius); @include border-bottom-radius(inherit);
} }
&.disabled, &.disabled,
@ -133,29 +133,25 @@
// useful within other components (e.g., cards). // useful within other components (e.g., cards).
.list-group-flush { .list-group-flush {
.list-group-item {
border-right-width: 0;
border-left-width: 0;
@include border-radius(0); @include border-radius(0);
&:first-child { .list-group-item {
border-top-width: 0; border-width: 0 0 $list-group-border-width;
}
}
&:last-child { &:last-child {
.list-group-item:last-child {
border-bottom-width: 0; border-bottom-width: 0;
} }
} }
} }
// Contextual variants // scss-docs-start list-group-modifiers
// List group contextual variants
// //
// Add modifier classes to change text and background color on individual items. // Add modifier classes to change text and background color on individual items.
// Organizationally, this must come after the `:hover` states. // Organizationally, this must come after the `:hover` states.
@each $color, $value in $theme-colors { @each $color, $value in $theme-colors {
@include list-group-item-variant($color, color-level($value, -9), color-level($value, 6)); @include list-group-item-variant($color, color-level($value, $list-group-item-bg-level), color-level($value, $list-group-item-color-level));
} }
// scss-docs-end list-group-modifiers

View File

@ -62,11 +62,6 @@
overflow: hidden; overflow: hidden;
} }
.modal-header,
.modal-footer {
flex-shrink: 0;
}
.modal-body { .modal-body {
overflow-y: auto; overflow-y: auto;
} }
@ -115,6 +110,7 @@
// Top section of the modal w/ title and dismiss // Top section of the modal w/ title and dismiss
.modal-header { .modal-header {
display: flex; display: flex;
flex-shrink: 0;
align-items: flex-start; // so the close btn always stays on the upper right corner align-items: flex-start; // so the close btn always stays on the upper right corner
justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends justify-content: space-between; // Put modal header elements (title and dismiss) on opposite ends
padding: $modal-header-padding; padding: $modal-header-padding;
@ -148,6 +144,7 @@
.modal-footer { .modal-footer {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
flex-shrink: 0;
align-items: center; // vertically center align-items: center; // vertically center
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
padding: $modal-inner-padding - $modal-footer-margin-between / 2; padding: $modal-inner-padding - $modal-footer-margin-between / 2;
@ -204,3 +201,35 @@
@include media-breakpoint-up(xl) { @include media-breakpoint-up(xl) {
.modal-xl { max-width: $modal-xl; } .modal-xl { max-width: $modal-xl; }
} }
@each $breakpoint in map-keys($grid-breakpoints) {
$next-breakpoint: breakpoint-next($breakpoint);
$postfix: if(breakpoint-max($breakpoint, $grid-breakpoints) == null, "", "-#{$next-breakpoint}-down");
@include media-breakpoint-down($breakpoint) {
.modal-fullscreen#{$postfix} {
width: 100vw;
max-width: none;
height: 100%;
margin: 0;
.modal-content {
height: 100%;
border: 0;
@include border-radius(0);
}
.modal-header {
@include border-radius(0);
}
.modal-body {
overflow-y: auto;
}
.modal-footer {
@include border-radius(0);
}
}
}
}

View File

@ -15,6 +15,7 @@
display: block; display: block;
padding: $nav-link-padding-y $nav-link-padding-x; padding: $nav-link-padding-y $nav-link-padding-x;
text-decoration: if($link-decoration == none, null, none); text-decoration: if($link-decoration == none, null, none);
@include transition($nav-link-transition);
&:hover, &:hover,
&:focus { &:focus {

View File

@ -57,11 +57,12 @@
padding-bottom: $navbar-brand-padding-y; padding-bottom: $navbar-brand-padding-y;
margin-right: $navbar-brand-margin-right; margin-right: $navbar-brand-margin-right;
@include font-size($navbar-brand-font-size); @include font-size($navbar-brand-font-size);
text-decoration: if($link-decoration == none, null, none);
white-space: nowrap; white-space: nowrap;
&:hover, &:hover,
&:focus { &:focus {
text-decoration: none; text-decoration: if($link-hover-decoration == underline, none, null);
} }
} }

View File

@ -283,7 +283,7 @@ pre,
code, code,
kbd, kbd,
samp { samp {
font-family: $font-family-monospace; font-family: var(--font-family-monospace);
@include font-size(1em); // Correct the odd `em` font sizing in all browsers. @include font-size(1em); // Correct the odd `em` font sizing in all browsers.
} }
@ -381,7 +381,6 @@ th {
label { label {
display: inline-block; // 1 display: inline-block; // 1
margin-bottom: $label-margin-bottom;
} }
// Remove the default `border-radius` that macOS Chrome adds. // Remove the default `border-radius` that macOS Chrome adds.
@ -467,19 +466,6 @@ button,
border-style: none; border-style: none;
} }
// Remove the default appearance of temporal inputs to avoid a Mobile Safari
// bug where setting a custom line-height prevents text from being vertically
// centered within the input.
// See https://bugs.webkit.org/show_bug.cgi?id=139848
// and https://github.com/twbs/bootstrap/issues/11266
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
-webkit-appearance: textfield;
}
// 1. Textareas should really only resize vertically so they don't break their (horizontal) containers. // 1. Textareas should really only resize vertically so they don't break their (horizontal) containers.
textarea { textarea {

View File

@ -34,6 +34,7 @@
} }
50% { 50% {
opacity: 1; opacity: 1;
transform: none;
} }
} }

View File

@ -174,23 +174,14 @@
// Generate series of `.table-responsive-*` classes for configuring the screen // Generate series of `.table-responsive-*` classes for configuring the screen
// size of where your table will overflow. // size of where your table will overflow.
.table-responsive { @each $breakpoint in map-keys($grid-breakpoints) {
@each $breakpoint in map-keys($grid-breakpoints) {
$next: breakpoint-next($breakpoint, $grid-breakpoints); $next: breakpoint-next($breakpoint, $grid-breakpoints);
$infix: breakpoint-infix($next, $grid-breakpoints); $infix: breakpoint-infix($next, $grid-breakpoints);
&#{$infix} {
@include media-breakpoint-down($breakpoint) { @include media-breakpoint-down($breakpoint) {
display: block; .table-responsive#{$infix} {
width: 100%;
overflow-x: auto; overflow-x: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
// Prevent double border on horizontal scroll due to use of `display: block;`
> .table-bordered {
border: 0;
}
}
} }
} }
} }

View File

@ -441,7 +441,7 @@ $utilities: map-merge(
"font-family": ( "font-family": (
property: font-family, property: font-family,
class: font, class: font,
values: (monospace: $font-family-monospace) values: (monospace: var(--font-family-monospace))
), ),
"user-select": ( "user-select": (
property: user-select, property: user-select,

View File

@ -320,13 +320,13 @@ $border-width: 1px !default;
$border-color: $gray-300 !default; $border-color: $gray-300 !default;
$border-radius: .25rem !default; $border-radius: .25rem !default;
$border-radius-lg: .3rem !default;
$border-radius-sm: .2rem !default; $border-radius-sm: .2rem !default;
$border-radius-lg: .3rem !default;
$rounded-pill: 50rem !default; $rounded-pill: 50rem !default;
$box-shadow-sm: 0 .125rem .25rem rgba($black, .075) !default;
$box-shadow: 0 .5rem 1rem rgba($black, .15) !default; $box-shadow: 0 .5rem 1rem rgba($black, .15) !default;
$box-shadow-sm: 0 .125rem .25rem rgba($black, .075) !default;
$box-shadow-lg: 0 1rem 3rem rgba($black, .175) !default; $box-shadow-lg: 0 1rem 3rem rgba($black, .175) !default;
$box-shadow-inset: inset 0 1px 2px rgba($black, .075) !default; $box-shadow-inset: inset 0 1px 2px rgba($black, .075) !default;
@ -341,6 +341,7 @@ $transition-base: all .2s ease-in-out !default;
$transition-fade: opacity .15s linear !default; $transition-fade: opacity .15s linear !default;
$transition-collapse: height .35s ease !default; $transition-collapse: height .35s ease !default;
// scss-docs-start embed-responsive-aspect-ratios
$embed-responsive-aspect-ratios: ( $embed-responsive-aspect-ratios: (
"21by9": ( "21by9": (
x: 21, x: 21,
@ -359,6 +360,7 @@ $embed-responsive-aspect-ratios: (
y: 1 y: 1
) )
) !default; ) !default;
// scss-docs-end embed-responsive-aspect-ratios
// Typography // Typography
// //
@ -367,15 +369,15 @@ $embed-responsive-aspect-ratios: (
// stylelint-disable value-keyword-case // stylelint-disable value-keyword-case
$font-family-sans-serif: -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" !default; $font-family-sans-serif: -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" !default;
$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default; $font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default;
$font-family-base: $font-family-sans-serif !default; $font-family-base: var(--font-family-sans-serif) !default;
// stylelint-enable value-keyword-case // stylelint-enable value-keyword-case
// $font-size-root effects the value of `rem`, which is used for as well font sizes, paddings and margins // $font-size-root effects the value of `rem`, which is used for as well font sizes, paddings and margins
// $font-size-base effects the font size of the body text // $font-size-base effects the font size of the body text
$font-size-root: null !default; $font-size-root: null !default;
$font-size-base: 1rem !default; // Assumes the browser default, typically `16px` $font-size-base: 1rem !default; // Assumes the browser default, typically `16px`
$font-size-lg: $font-size-base * 1.25 !default;
$font-size-sm: $font-size-base * .875 !default; $font-size-sm: $font-size-base * .875 !default;
$font-size-lg: $font-size-base * 1.25 !default;
$font-weight-lighter: lighter !default; $font-weight-lighter: lighter !default;
$font-weight-light: 300 !default; $font-weight-light: 300 !default;
@ -386,8 +388,8 @@ $font-weight-bolder: bolder !default;
$font-weight-base: $font-weight-normal !default; $font-weight-base: $font-weight-normal !default;
$line-height-base: 1.5 !default; $line-height-base: 1.5 !default;
$line-height-lg: 2 !default;
$line-height-sm: 1.25 !default; $line-height-sm: 1.25 !default;
$line-height-lg: 2 !default;
$h1-font-size: $font-size-base * 2.5 !default; $h1-font-size: $font-size-base * 2.5 !default;
$h2-font-size: $font-size-base * 2 !default; $h2-font-size: $font-size-base * 2 !default;
@ -549,15 +551,19 @@ $btn-block-spacing-y: .5rem !default;
// Allows for customizing button radius independently from global border radius // Allows for customizing button radius independently from global border radius
$btn-border-radius: $border-radius !default; $btn-border-radius: $border-radius !default;
$btn-border-radius-lg: $border-radius-lg !default;
$btn-border-radius-sm: $border-radius-sm !default; $btn-border-radius-sm: $border-radius-sm !default;
$btn-border-radius-lg: $border-radius-lg !default;
$btn-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default; $btn-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
// Forms // Forms
$label-margin-bottom: .5rem !default; $form-label-margin-bottom: .5rem !default;
$form-label-font-size: null !default;
$form-label-font-style: null !default;
$form-label-font-weight: null !default;
$form-label-color: null !default;
$input-padding-y: $input-btn-padding-y !default; $input-padding-y: $input-btn-padding-y !default;
$input-padding-x: $input-btn-padding-x !default; $input-padding-x: $input-btn-padding-x !default;
@ -584,8 +590,8 @@ $input-border-width: $input-btn-border-width !default;
$input-box-shadow: $box-shadow-inset !default; $input-box-shadow: $box-shadow-inset !default;
$input-border-radius: $border-radius !default; $input-border-radius: $border-radius !default;
$input-border-radius-lg: $border-radius-lg !default;
$input-border-radius-sm: $border-radius-sm !default; $input-border-radius-sm: $border-radius-sm !default;
$input-border-radius-lg: $border-radius-lg !default;
$input-focus-bg: $input-bg !default; $input-focus-bg: $input-bg !default;
$input-focus-border-color: lighten($component-active-bg, 25%) !default; $input-focus-border-color: lighten($component-active-bg, 25%) !default;
@ -615,6 +621,7 @@ $form-check-padding-left: $form-check-input-width + .5em !defaul
$form-check-margin-bottom: .125rem !default; $form-check-margin-bottom: .125rem !default;
$form-check-label-color: null !default; $form-check-label-color: null !default;
$form-check-label-cursor: null !default; $form-check-label-cursor: null !default;
$form-check-transition: background-color .15s ease-in-out, background-position .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;
$form-check-input-active-filter: brightness(90%) !default; $form-check-input-active-filter: brightness(90%) !default;
@ -648,8 +655,6 @@ $form-switch-padding-left: $form-switch-width + .5em !default;
$form-switch-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#{$form-switch-color}'/></svg>") !default; $form-switch-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#{$form-switch-color}'/></svg>") !default;
$form-switch-bg-size: contain !default; $form-switch-bg-size: contain !default;
$form-switch-border-radius: $form-switch-width !default; $form-switch-border-radius: $form-switch-width !default;
$form-switch-transition: .2s ease-in-out !default;
$form-switch-transition-property: background-position, background-color !default;
$form-switch-focus-color: hsla(211, 100%, 75%, 1) !default; $form-switch-focus-color: hsla(211, 100%, 75%, 1) !default;
$form-switch-focus-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#{$form-switch-focus-color}'/></svg>") !default; $form-switch-focus-bg-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'><circle r='3' fill='#{$form-switch-focus-color}'/></svg>") !default;
@ -770,6 +775,7 @@ $form-feedback-icon-valid: url("data:image/svg+xml,<svg xmlns='http://w
$form-feedback-icon-invalid-color: $form-feedback-invalid-color !default; $form-feedback-icon-invalid-color: $form-feedback-invalid-color !default;
$form-feedback-icon-invalid: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='#{$form-feedback-icon-invalid-color}' viewBox='0 0 12 12'><circle cx='6' cy='6' r='4.5'/><path stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/><circle cx='6' cy='8.2' r='.6' fill='#{$form-feedback-icon-invalid-color}' stroke='none'/></svg>") !default; $form-feedback-icon-invalid: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='#{$form-feedback-icon-invalid-color}' viewBox='0 0 12 12'><circle cx='6' cy='6' r='4.5'/><path stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/><circle cx='6' cy='8.2' r='.6' fill='#{$form-feedback-icon-invalid-color}' stroke='none'/></svg>") !default;
// scss-docs-start form-validation-states
$form-validation-states: ( $form-validation-states: (
"valid": ( "valid": (
"color": $form-feedback-valid-color, "color": $form-feedback-valid-color,
@ -780,6 +786,7 @@ $form-validation-states: (
"icon": $form-feedback-icon-invalid "icon": $form-feedback-icon-invalid
) )
) !default; ) !default;
// scss-docs-end form-validation-states
// Z-index master list // Z-index master list
// //
@ -799,6 +806,7 @@ $zindex-tooltip: 1070 !default;
$nav-link-padding-y: .5rem !default; $nav-link-padding-y: .5rem !default;
$nav-link-padding-x: 1rem !default; $nav-link-padding-x: 1rem !default;
$nav-link-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out !default;
$nav-link-disabled-color: $gray-600 !default; $nav-link-disabled-color: $gray-600 !default;
$nav-tabs-border-color: $gray-300 !default; $nav-tabs-border-color: $gray-300 !default;
@ -1055,10 +1063,10 @@ $modal-header-padding-y: 1rem !default;
$modal-header-padding-x: 1rem !default; $modal-header-padding-x: 1rem !default;
$modal-header-padding: $modal-header-padding-y $modal-header-padding-x !default; // Keep this for backwards compatibility $modal-header-padding: $modal-header-padding-y $modal-header-padding-x !default; // Keep this for backwards compatibility
$modal-xl: 1140px !default;
$modal-lg: 800px !default;
$modal-md: 500px !default;
$modal-sm: 300px !default; $modal-sm: 300px !default;
$modal-md: 500px !default;
$modal-lg: 800px !default;
$modal-xl: 1140px !default;
$modal-fade-transform: translate(0, -50px) !default; $modal-fade-transform: translate(0, -50px) !default;
$modal-show-transform: none !default; $modal-show-transform: none !default;
@ -1105,6 +1113,8 @@ $list-group-border-radius: $border-radius !default;
$list-group-item-padding-y: .75rem !default; $list-group-item-padding-y: .75rem !default;
$list-group-item-padding-x: 1.25rem !default; $list-group-item-padding-x: 1.25rem !default;
$list-group-item-bg-level: -9 !default;
$list-group-item-color-level: 6 !default;
$list-group-hover-bg: $gray-100 !default; $list-group-hover-bg: $gray-100 !default;
$list-group-active-color: $component-active-color !default; $list-group-active-color: $component-active-color !default;

View File

@ -23,6 +23,7 @@
border: $form-check-input-border; border: $form-check-input-border;
appearance: none; appearance: none;
color-adjust: exact; // Keep themed appearance for print color-adjust: exact; // Keep themed appearance for print
@include transition($form-check-transition);
&[type="checkbox"] { &[type="checkbox"] {
@include border-radius($form-check-input-border-radius); @include border-radius($form-check-input-border-radius);
@ -99,7 +100,6 @@
} }
.form-check-label { .form-check-label {
margin-bottom: 0;
color: $form-check-label-color; color: $form-check-label-color;
cursor: $form-check-label-cursor; cursor: $form-check-label-cursor;
} }
@ -120,9 +120,6 @@
background-size: $form-switch-bg-size; // Get a 1px separation background-size: $form-switch-bg-size; // Get a 1px separation
@include border-radius($form-switch-border-radius); @include border-radius($form-switch-border-radius);
color-adjust: exact; // Keep themed appearance for print color-adjust: exact; // Keep themed appearance for print
// Todo: Figure out how to tackle these, with or without mixin?
// transition: $form-switch-transition;
// transition-property: $form-switch-transition-property;
&:focus { &:focus {
background-image: escape-svg($form-switch-focus-bg-image); background-image: escape-svg($form-switch-focus-bg-image);

View File

@ -15,6 +15,7 @@
background-color: $input-bg; background-color: $input-bg;
background-clip: padding-box; background-clip: padding-box;
border: $input-border-width solid $input-border-color; border: $input-border-width solid $input-border-color;
appearance: none; // Fix appearance for date inputs in Safari
// Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS. // Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
@include border-radius($input-border-radius, 0); @include border-radius($input-border-radius, 0);
@ -28,10 +29,10 @@
background-color: $input-focus-bg; background-color: $input-focus-bg;
border-color: $input-focus-border-color; border-color: $input-focus-border-color;
outline: 0; outline: 0;
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows { @if $enable-shadows {
box-shadow: $input-box-shadow, $input-focus-box-shadow; @include box-shadow($input-box-shadow, $input-focus-box-shadow);
} @else { } @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: $input-focus-box-shadow; box-shadow: $input-focus-box-shadow;
} }
} }

View File

@ -28,8 +28,9 @@
border-color: $form-select-focus-border-color; border-color: $form-select-focus-border-color;
outline: 0; outline: 0;
@if $enable-shadows { @if $enable-shadows {
box-shadow: $form-select-box-shadow, $form-select-focus-box-shadow; @include box-shadow($form-select-box-shadow, $form-select-focus-box-shadow);
} @else { } @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: $form-select-focus-box-shadow; box-shadow: $form-select-focus-box-shadow;
} }

View File

@ -63,7 +63,6 @@
display: flex; display: flex;
align-items: center; align-items: center;
padding: $input-padding-y $input-padding-x; padding: $input-padding-y $input-padding-x;
margin-bottom: 0; // Allow use of <label> elements by overriding our default margin-bottom
@include font-size($input-font-size); // Match inputs @include font-size($input-font-size); // Match inputs
font-weight: $font-weight-normal; font-weight: $font-weight-normal;
line-height: $input-line-height; line-height: $input-line-height;

View File

@ -2,14 +2,25 @@
// Labels // Labels
// //
.form-label {
margin-bottom: $form-label-margin-bottom;
@include font-size($form-label-font-size);
font-style: $form-label-font-style;
font-weight: $form-label-font-weight;
color: $form-label-color;
}
// For use with horizontal and inline forms, when you need the label (or legend) // For use with horizontal and inline forms, when you need the label (or legend)
// text to align with the form controls. // text to align with the form controls.
.col-form-label { .col-form-label {
padding-top: add($input-padding-y, $input-border-width); padding-top: add($input-padding-y, $input-border-width);
padding-bottom: add($input-padding-y, $input-border-width); padding-bottom: add($input-padding-y, $input-border-width);
margin-bottom: 0; // Override the `<label>/<legend>` default margin-bottom: 0; // Override the `<legend>` default
@include font-size(inherit); // Override the `<legend>` default @include font-size(inherit); // Override the `<legend>` default
font-style: $form-label-font-style;
font-weight: $form-label-font-weight;
line-height: $input-line-height; line-height: $input-line-height;
color: $form-label-color;
} }
.col-form-label-lg { .col-form-label-lg {

View File

@ -5,6 +5,8 @@
// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for // pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
// server-side validation. // server-side validation.
// scss-docs-start form-validation-states-loop
@each $state, $data in $form-validation-states { @each $state, $data in $form-validation-states {
@include form-validation-state($state, map-get($data, color), map-get($data, icon)); @include form-validation-state($state, map-get($data, color), map-get($data, icon));
} }
// scss-docs-end form-validation-states-loop

View File

@ -30,10 +30,10 @@
color: $hover-color; color: $hover-color;
@include gradient-bg($hover-background); @include gradient-bg($hover-background);
border-color: $hover-border; border-color: $hover-border;
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows { @if $enable-shadows {
box-shadow: $btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5); @include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
} @else { } @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5); box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
} }
} }
@ -48,10 +48,10 @@
border-color: $active-border; border-color: $active-border;
&:focus { &:focus {
// Avoid using mixin so we can pass custom focus shadow properly @if $enable-shadows {
@if $enable-shadows and $btn-active-box-shadow != none { @include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
} @else { } @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5); box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
} }
} }
@ -96,10 +96,10 @@
border-color: $active-border; border-color: $active-border;
&:focus { &:focus {
// Avoid using mixin so we can pass custom focus shadow properly @if $enable-shadows {
@if $enable-shadows and $btn-active-box-shadow != none { @include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5));
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5);
} @else { } @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5); box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
} }
} }

Some files were not shown because too many files have changed in this diff Show More