mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-03-20 06:20:23 +00:00
Merge branch 'master' into release-drafter
This commit is contained in:
commit
febdcefcd7
136 changed files with 6261 additions and 6452 deletions
|
|
@ -56,5 +56,11 @@
|
|||
"path": "./dist/js/bootstrap.min.js",
|
||||
"maxSize": "16.5 kB"
|
||||
}
|
||||
]
|
||||
],
|
||||
"ci": {
|
||||
"trackBranches": [
|
||||
"master",
|
||||
"v4-dev"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -45,8 +45,9 @@
|
|||
"unicorn/prefer-includes": "off",
|
||||
"unicorn/prefer-node-append": "off",
|
||||
"unicorn/prefer-node-remove": "off",
|
||||
"unicorn/prefer-number-properties": "off",
|
||||
"unicorn/prefer-query-selector": "off",
|
||||
"unicorn/prefer-text-content": "off",
|
||||
"unicorn/prefer-set-has": "off",
|
||||
"unicorn/prevent-abbreviations": "off"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
|
|
@ -41,11 +41,11 @@ jobs:
|
|||
- name: Run tests
|
||||
run: npm test
|
||||
|
||||
- name: Run bundlesize
|
||||
run: npm run bundlesize
|
||||
- name: Run bundlewatch
|
||||
run: npm run bundlewatch
|
||||
if: matrix.node == 10
|
||||
env:
|
||||
BUNDLESIZE_GITHUB_TOKEN: "${{ secrets.BUNDLESIZE_GITHUB_TOKEN }}"
|
||||
BUNDLEWATCH_GITHUB_TOKEN: "${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}"
|
||||
|
||||
- name: Run BrowserStack tests
|
||||
run: npm run js-test-cloud
|
||||
|
|
|
|||
1025
dist/css/bootstrap-grid.css
vendored
1025
dist/css/bootstrap-grid.css
vendored
File diff suppressed because it is too large
Load diff
BIN
dist/css/bootstrap-grid.css.map
vendored
BIN
dist/css/bootstrap-grid.css.map
vendored
Binary file not shown.
6
dist/css/bootstrap-grid.min.css
vendored
6
dist/css/bootstrap-grid.min.css
vendored
File diff suppressed because one or more lines are too long
BIN
dist/css/bootstrap-grid.min.css.map
vendored
BIN
dist/css/bootstrap-grid.min.css.map
vendored
Binary file not shown.
91
dist/css/bootstrap-reboot.css
vendored
91
dist/css/bootstrap-reboot.css
vendored
|
|
@ -1,7 +1,7 @@
|
|||
/*!
|
||||
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors
|
||||
* Copyright 2011-2019 Twitter, Inc.
|
||||
* Copyright 2011-2020 The Bootstrap Authors
|
||||
* Copyright 2011-2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
|
|
@ -47,19 +47,43 @@ h1, h2, h3, h4, h5, h6 {
|
|||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
font-size: calc(1.375rem + 1.5vw);
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
font-size: calc(1.325rem + 0.9vw);
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
h2 {
|
||||
font-size: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
font-size: calc(1.3rem + 0.6vw);
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
h3 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.5rem;
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
h4 {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
h5 {
|
||||
|
|
@ -132,6 +156,11 @@ small {
|
|||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.2em;
|
||||
background-color: #fcf8e3;
|
||||
}
|
||||
|
||||
sub,
|
||||
sup {
|
||||
position: relative;
|
||||
|
|
@ -150,12 +179,11 @@ sup {
|
|||
|
||||
a {
|
||||
color: #0d6efd;
|
||||
text-decoration: none;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #024dbc;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a:not([href]), a:not([href]):hover {
|
||||
|
|
@ -213,16 +241,13 @@ figure {
|
|||
margin: 0 0 1rem;
|
||||
}
|
||||
|
||||
img {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
img,
|
||||
svg {
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table {
|
||||
caption-side: bottom;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
|
|
@ -231,11 +256,11 @@ caption {
|
|||
padding-bottom: 0.5rem;
|
||||
color: #6c757d;
|
||||
text-align: left;
|
||||
caption-side: bottom;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: inherit;
|
||||
text-align: -webkit-match-parent;
|
||||
}
|
||||
|
||||
label {
|
||||
|
|
@ -308,7 +333,6 @@ input[type="month"] {
|
|||
}
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
|
|
@ -324,24 +348,33 @@ legend {
|
|||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
font-size: 1.5rem;
|
||||
font-size: calc(1.275rem + 0.3vw);
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.2em;
|
||||
background-color: #fcf8e3;
|
||||
@media (min-width: 1200px) {
|
||||
legend {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
legend + * {
|
||||
clear: left;
|
||||
}
|
||||
|
||||
::-webkit-datetime-edit {
|
||||
overflow: visible;
|
||||
line-height: 0;
|
||||
::-webkit-datetime-edit-fields-wrapper,
|
||||
::-webkit-datetime-edit-text,
|
||||
::-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"] {
|
||||
|
|
@ -371,12 +404,8 @@ summary {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
main {
|
||||
display: block;
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
|
|
|
|||
BIN
dist/css/bootstrap-reboot.css.map
vendored
BIN
dist/css/bootstrap-reboot.css.map
vendored
Binary file not shown.
6
dist/css/bootstrap-reboot.min.css
vendored
6
dist/css/bootstrap-reboot.min.css
vendored
|
|
@ -1,8 +1,8 @@
|
|||
/*!
|
||||
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors
|
||||
* Copyright 2011-2019 Twitter, Inc.
|
||||
* Copyright 2011-2020 The Bootstrap Authors
|
||||
* Copyright 2011-2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/*,::after,::before{box-sizing:border-box}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 */
|
||||
BIN
dist/css/bootstrap-reboot.min.css.map
vendored
BIN
dist/css/bootstrap-reboot.min.css.map
vendored
Binary file not shown.
72
dist/css/bootstrap-utilities.css
vendored
72
dist/css/bootstrap-utilities.css
vendored
|
|
@ -1,7 +1,7 @@
|
|||
/*!
|
||||
* Bootstrap Utilities v4.3.1 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2019 The Bootstrap Authors
|
||||
* Copyright 2011-2019 Twitter, Inc.
|
||||
* Copyright 2011-2020 The Bootstrap Authors
|
||||
* Copyright 2011-2020 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
.align-baseline {
|
||||
|
|
@ -84,14 +84,14 @@
|
|||
display: inline-flex !important;
|
||||
}
|
||||
|
||||
.shadow-sm {
|
||||
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
|
||||
}
|
||||
|
||||
.shadow {
|
||||
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 {
|
||||
box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
|
||||
}
|
||||
|
|
@ -1013,10 +1013,6 @@
|
|||
text-align: center !important;
|
||||
}
|
||||
|
||||
.text-justify {
|
||||
text-align: justify !important;
|
||||
}
|
||||
|
||||
.text-primary {
|
||||
color: #0d6efd !important;
|
||||
}
|
||||
|
|
@ -1145,19 +1141,59 @@
|
|||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.text-decoration-underline {
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
|
||||
.text-decoration-line-through {
|
||||
text-decoration: line-through !important;
|
||||
}
|
||||
|
||||
.font-italic {
|
||||
font-style: italic !important;
|
||||
}
|
||||
|
||||
.font-normal {
|
||||
font-style: normal !important;
|
||||
}
|
||||
|
||||
.text-break {
|
||||
overflow-wrap: break-word !important;
|
||||
word-break: break-word !important;
|
||||
word-wrap: break-word !important;
|
||||
}
|
||||
|
||||
.font-monospace {
|
||||
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 {
|
||||
border-radius: 0.25rem !important;
|
||||
}
|
||||
|
|
@ -1796,9 +1832,6 @@
|
|||
.text-sm-center {
|
||||
text-align: center !important;
|
||||
}
|
||||
.text-sm-justify {
|
||||
text-align: justify !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
|
|
@ -2387,9 +2420,6 @@
|
|||
.text-md-center {
|
||||
text-align: center !important;
|
||||
}
|
||||
.text-md-justify {
|
||||
text-align: justify !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
|
|
@ -2978,9 +3008,6 @@
|
|||
.text-lg-center {
|
||||
text-align: center !important;
|
||||
}
|
||||
.text-lg-justify {
|
||||
text-align: justify !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
|
|
@ -3569,9 +3596,6 @@
|
|||
.text-xl-center {
|
||||
text-align: center !important;
|
||||
}
|
||||
.text-xl-justify {
|
||||
text-align: justify !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
|
|
|||
BIN
dist/css/bootstrap-utilities.css.map
vendored
BIN
dist/css/bootstrap-utilities.css.map
vendored
Binary file not shown.
6
dist/css/bootstrap-utilities.min.css
vendored
6
dist/css/bootstrap-utilities.min.css
vendored
File diff suppressed because one or more lines are too long
BIN
dist/css/bootstrap-utilities.min.css.map
vendored
BIN
dist/css/bootstrap-utilities.min.css.map
vendored
Binary file not shown.
File diff suppressed because it is too large
Load diff
BIN
dist/css/bootstrap.css.map
vendored
BIN
dist/css/bootstrap.css.map
vendored
Binary file not shown.
6
dist/css/bootstrap.min.css
vendored
6
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
BIN
dist/css/bootstrap.min.css.map
vendored
BIN
dist/css/bootstrap.min.css.map
vendored
Binary file not shown.
1256
dist/js/bootstrap.bundle.js
vendored
1256
dist/js/bootstrap.bundle.js
vendored
File diff suppressed because it is too large
Load diff
BIN
dist/js/bootstrap.bundle.js.map
vendored
BIN
dist/js/bootstrap.bundle.js.map
vendored
Binary file not shown.
4
dist/js/bootstrap.bundle.min.js
vendored
4
dist/js/bootstrap.bundle.min.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/js/bootstrap.bundle.min.js.map
vendored
BIN
dist/js/bootstrap.bundle.min.js.map
vendored
Binary file not shown.
1256
dist/js/bootstrap.esm.js
vendored
1256
dist/js/bootstrap.esm.js
vendored
File diff suppressed because it is too large
Load diff
BIN
dist/js/bootstrap.esm.js.map
vendored
BIN
dist/js/bootstrap.esm.js.map
vendored
Binary file not shown.
4
dist/js/bootstrap.esm.min.js
vendored
4
dist/js/bootstrap.esm.min.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/js/bootstrap.esm.min.js.map
vendored
BIN
dist/js/bootstrap.esm.min.js.map
vendored
Binary file not shown.
1258
dist/js/bootstrap.js
1258
dist/js/bootstrap.js
File diff suppressed because it is too large
Load diff
BIN
dist/js/bootstrap.js.map
vendored
BIN
dist/js/bootstrap.js.map
vendored
Binary file not shown.
4
dist/js/bootstrap.min.js
vendored
4
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
BIN
dist/js/bootstrap.min.js.map
vendored
BIN
dist/js/bootstrap.min.js.map
vendored
Binary file not shown.
48
js/dist/alert.js
vendored
48
js/dist/alert.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* 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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
@ -9,9 +9,9 @@
|
|||
(global = global || self, global.Alert = factory(global.Data, global.EventHandler, global.SelectorEngine));
|
||||
}(this, (function (Data, EventHandler, SelectorEngine) { 'use strict';
|
||||
|
||||
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
|
||||
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
|
|
@ -78,9 +78,7 @@
|
|||
};
|
||||
|
||||
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
||||
var evt = document.createEvent('HTMLEvents');
|
||||
evt.initEvent(TRANSITION_END, true, true);
|
||||
element.dispatchEvent(evt);
|
||||
element.dispatchEvent(new Event(TRANSITION_END));
|
||||
};
|
||||
|
||||
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
|
||||
|
|
@ -123,28 +121,20 @@
|
|||
var DATA_KEY = 'bs.alert';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var Selector = {
|
||||
DISMISS: '[data-dismiss="alert"]'
|
||||
};
|
||||
var Event = {
|
||||
CLOSE: "close" + EVENT_KEY,
|
||||
CLOSED: "closed" + EVENT_KEY,
|
||||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
var ClassName = {
|
||||
ALERT: 'alert',
|
||||
FADE: 'fade',
|
||||
SHOW: 'show'
|
||||
};
|
||||
var SELECTOR_DISMISS = '[data-dismiss="alert"]';
|
||||
var EVENT_CLOSE = "close" + EVENT_KEY;
|
||||
var EVENT_CLOSED = "closed" + EVENT_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASSNAME_ALERT = 'alert';
|
||||
var CLASSNAME_FADE = 'fade';
|
||||
var CLASSNAME_SHOW = 'show';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Alert =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var Alert = /*#__PURE__*/function () {
|
||||
function Alert(element) {
|
||||
this._element = element;
|
||||
|
||||
|
|
@ -183,22 +173,22 @@
|
|||
var parent = getElementFromSelector(element);
|
||||
|
||||
if (!parent) {
|
||||
parent = SelectorEngine.closest(element, "." + ClassName.ALERT);
|
||||
parent = SelectorEngine.closest(element, "." + CLASSNAME_ALERT);
|
||||
}
|
||||
|
||||
return parent;
|
||||
};
|
||||
|
||||
_proto._triggerCloseEvent = function _triggerCloseEvent(element) {
|
||||
return EventHandler.trigger(element, Event.CLOSE);
|
||||
return EventHandler.trigger(element, EVENT_CLOSE);
|
||||
};
|
||||
|
||||
_proto._removeElement = function _removeElement(element) {
|
||||
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);
|
||||
|
||||
return;
|
||||
|
|
@ -216,7 +206,7 @@
|
|||
element.parentNode.removeChild(element);
|
||||
}
|
||||
|
||||
EventHandler.trigger(element, Event.CLOSED);
|
||||
EventHandler.trigger(element, EVENT_CLOSED);
|
||||
} // 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();
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
|
|
|
|||
BIN
js/dist/alert.js.map
vendored
BIN
js/dist/alert.js.map
vendored
Binary file not shown.
77
js/dist/button.js
vendored
77
js/dist/button.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* 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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
@ -9,9 +9,9 @@
|
|||
(global = global || self, global.Button = factory(global.Data, global.EventHandler, global.SelectorEngine));
|
||||
}(this, (function (Data, EventHandler, SelectorEngine) { 'use strict';
|
||||
|
||||
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
|
||||
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
|
|
@ -58,32 +58,25 @@
|
|||
var DATA_KEY = 'bs.button';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var ClassName = {
|
||||
ACTIVE: 'active',
|
||||
BUTTON: 'btn',
|
||||
FOCUS: 'focus'
|
||||
};
|
||||
var Selector = {
|
||||
DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
|
||||
DATA_TOGGLE: '[data-toggle="buttons"]',
|
||||
INPUT: 'input:not([type="hidden"])',
|
||||
ACTIVE: '.active',
|
||||
BUTTON: '.btn'
|
||||
};
|
||||
var Event = {
|
||||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
|
||||
FOCUS_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY,
|
||||
BLUR_DATA_API: "blur" + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
var CLASS_NAME_ACTIVE = 'active';
|
||||
var CLASS_NAME_BUTTON = 'btn';
|
||||
var CLASS_NAME_DISABLED = 'disabled';
|
||||
var CLASS_NAME_FOCUS = 'focus';
|
||||
var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="buttons"]';
|
||||
var SELECTOR_INPUT = 'input:not([type="hidden"])';
|
||||
var SELECTOR_ACTIVE = '.active';
|
||||
var SELECTOR_BUTTON = '.btn';
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var EVENT_FOCUS_DATA_API = "focus" + EVENT_KEY + DATA_API_KEY;
|
||||
var EVENT_BLUR_DATA_API = "blur" + EVENT_KEY + DATA_API_KEY;
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Button =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var Button = /*#__PURE__*/function () {
|
||||
function Button(element) {
|
||||
this._element = element;
|
||||
Data.setData(element, DATA_KEY, this);
|
||||
|
|
@ -96,28 +89,28 @@
|
|||
_proto.toggle = function toggle() {
|
||||
var triggerChangeEvent = true;
|
||||
var addAriaPressed = true;
|
||||
var rootElement = SelectorEngine.closest(this._element, Selector.DATA_TOGGLE);
|
||||
var rootElement = SelectorEngine.closest(this._element, SELECTOR_DATA_TOGGLE);
|
||||
|
||||
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.checked && this._element.classList.contains(ClassName.ACTIVE)) {
|
||||
if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
|
||||
triggerChangeEvent = false;
|
||||
} else {
|
||||
var activeElement = SelectorEngine.findOne(Selector.ACTIVE, rootElement);
|
||||
var activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE, rootElement);
|
||||
|
||||
if (activeElement) {
|
||||
activeElement.classList.remove(ClassName.ACTIVE);
|
||||
activeElement.classList.remove(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
input.checked = !this._element.classList.contains(ClassName.ACTIVE);
|
||||
input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE);
|
||||
EventHandler.trigger(input, 'change');
|
||||
}
|
||||
|
||||
|
|
@ -127,11 +120,11 @@
|
|||
}
|
||||
|
||||
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) {
|
||||
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();
|
||||
var button = event.target;
|
||||
|
||||
if (!button.classList.contains(ClassName.BUTTON)) {
|
||||
button = SelectorEngine.closest(button, Selector.BUTTON);
|
||||
if (!button.classList.contains(CLASS_NAME_BUTTON)) {
|
||||
button = SelectorEngine.closest(button, SELECTOR_BUTTON);
|
||||
}
|
||||
|
||||
var data = Data.getData(button, DATA_KEY);
|
||||
|
|
@ -191,18 +184,18 @@
|
|||
|
||||
data.toggle();
|
||||
});
|
||||
EventHandler.on(document, Event.FOCUS_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
|
||||
var button = SelectorEngine.closest(event.target, Selector.BUTTON);
|
||||
EventHandler.on(document, EVENT_FOCUS_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
|
||||
var button = SelectorEngine.closest(event.target, SELECTOR_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) {
|
||||
var button = SelectorEngine.closest(event.target, Selector.BUTTON);
|
||||
EventHandler.on(document, EVENT_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) {
|
||||
var button = SelectorEngine.closest(event.target, SELECTOR_BUTTON);
|
||||
|
||||
if (button) {
|
||||
button.classList.remove(ClassName.FOCUS);
|
||||
button.classList.remove(CLASS_NAME_FOCUS);
|
||||
}
|
||||
});
|
||||
var $ = getjQuery();
|
||||
|
|
|
|||
BIN
js/dist/button.js.map
vendored
BIN
js/dist/button.js.map
vendored
Binary file not shown.
203
js/dist/carousel.js
vendored
203
js/dist/carousel.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* 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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
@ -9,10 +9,10 @@
|
|||
(global = global || self, global.Carousel = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
|
||||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
|
||||
|
||||
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator;
|
||||
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
|
||||
SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
|
|
@ -64,13 +64,13 @@
|
|||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
|
||||
if (i % 2) {
|
||||
ownKeys(source, true).forEach(function (key) {
|
||||
ownKeys(Object(source), true).forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
} else if (Object.getOwnPropertyDescriptors) {
|
||||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||||
} else {
|
||||
ownKeys(source).forEach(function (key) {
|
||||
ownKeys(Object(source)).forEach(function (key) {
|
||||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||||
});
|
||||
}
|
||||
|
|
@ -89,6 +89,10 @@
|
|||
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
var toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
|
||||
|
|
@ -132,9 +136,7 @@
|
|||
};
|
||||
|
||||
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
||||
var evt = document.createEvent('HTMLEvents');
|
||||
evt.initEvent(TRANSITION_END, true, true);
|
||||
element.dispatchEvent(evt);
|
||||
element.dispatchEvent(new Event(TRANSITION_END));
|
||||
};
|
||||
|
||||
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) {
|
||||
if (!element) {
|
||||
return false;
|
||||
|
|
@ -242,48 +236,39 @@
|
|||
wrap: 'boolean',
|
||||
touch: 'boolean'
|
||||
};
|
||||
var Direction = {
|
||||
NEXT: 'next',
|
||||
PREV: 'prev',
|
||||
LEFT: 'left',
|
||||
RIGHT: 'right'
|
||||
};
|
||||
var Event = {
|
||||
SLIDE: "slide" + EVENT_KEY,
|
||||
SLID: "slid" + EVENT_KEY,
|
||||
KEYDOWN: "keydown" + EVENT_KEY,
|
||||
MOUSEENTER: "mouseenter" + EVENT_KEY,
|
||||
MOUSELEAVE: "mouseleave" + EVENT_KEY,
|
||||
TOUCHSTART: "touchstart" + EVENT_KEY,
|
||||
TOUCHMOVE: "touchmove" + EVENT_KEY,
|
||||
TOUCHEND: "touchend" + EVENT_KEY,
|
||||
POINTERDOWN: "pointerdown" + EVENT_KEY,
|
||||
POINTERUP: "pointerup" + EVENT_KEY,
|
||||
DRAG_START: "dragstart" + EVENT_KEY,
|
||||
LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY,
|
||||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
var ClassName = {
|
||||
CAROUSEL: 'carousel',
|
||||
ACTIVE: 'active',
|
||||
SLIDE: 'slide',
|
||||
RIGHT: 'carousel-item-right',
|
||||
LEFT: 'carousel-item-left',
|
||||
NEXT: 'carousel-item-next',
|
||||
PREV: 'carousel-item-prev',
|
||||
ITEM: 'carousel-item',
|
||||
POINTER_EVENT: 'pointer-event'
|
||||
};
|
||||
var Selector = {
|
||||
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 DIRECTION_NEXT = 'next';
|
||||
var DIRECTION_PREV = 'prev';
|
||||
var DIRECTION_LEFT = 'left';
|
||||
var DIRECTION_RIGHT = 'right';
|
||||
var EVENT_SLIDE = "slide" + EVENT_KEY;
|
||||
var EVENT_SLID = "slid" + EVENT_KEY;
|
||||
var EVENT_KEYDOWN = "keydown" + EVENT_KEY;
|
||||
var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY;
|
||||
var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY;
|
||||
var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY;
|
||||
var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY;
|
||||
var EVENT_TOUCHEND = "touchend" + EVENT_KEY;
|
||||
var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY;
|
||||
var EVENT_POINTERUP = "pointerup" + EVENT_KEY;
|
||||
var EVENT_DRAG_START = "dragstart" + EVENT_KEY;
|
||||
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_CAROUSEL = 'carousel';
|
||||
var CLASS_NAME_ACTIVE = 'active';
|
||||
var CLASS_NAME_SLIDE = 'slide';
|
||||
var CLASS_NAME_RIGHT = 'carousel-item-right';
|
||||
var CLASS_NAME_LEFT = 'carousel-item-left';
|
||||
var CLASS_NAME_NEXT = 'carousel-item-next';
|
||||
var CLASS_NAME_PREV = 'carousel-item-prev';
|
||||
var CLASS_NAME_POINTER_EVENT = 'pointer-event';
|
||||
var SELECTOR_ACTIVE = '.active';
|
||||
var SELECTOR_ACTIVE_ITEM = '.active.carousel-item';
|
||||
var SELECTOR_ITEM = '.carousel-item';
|
||||
var SELECTOR_ITEM_IMG = '.carousel-item img';
|
||||
var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev';
|
||||
var SELECTOR_INDICATORS = '.carousel-indicators';
|
||||
var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]';
|
||||
var SELECTOR_DATA_RIDE = '[data-ride="carousel"]';
|
||||
var PointerType = {
|
||||
TOUCH: 'touch',
|
||||
PEN: 'pen'
|
||||
|
|
@ -294,9 +279,7 @@
|
|||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Carousel =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var Carousel = /*#__PURE__*/function () {
|
||||
function Carousel(element, config) {
|
||||
this._items = null;
|
||||
this._interval = null;
|
||||
|
|
@ -308,7 +291,7 @@
|
|||
this.touchDeltaX = 0;
|
||||
this._config = this._getConfig(config);
|
||||
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._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent);
|
||||
|
||||
|
|
@ -323,7 +306,7 @@
|
|||
// Public
|
||||
_proto.next = function next() {
|
||||
if (!this._isSliding) {
|
||||
this._slide(Direction.NEXT);
|
||||
this._slide(DIRECTION_NEXT);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -337,7 +320,7 @@
|
|||
|
||||
_proto.prev = function prev() {
|
||||
if (!this._isSliding) {
|
||||
this._slide(Direction.PREV);
|
||||
this._slide(DIRECTION_PREV);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -346,7 +329,7 @@
|
|||
this._isPaused = true;
|
||||
}
|
||||
|
||||
if (SelectorEngine.findOne(Selector.NEXT_PREV, this._element)) {
|
||||
if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {
|
||||
triggerTransitionEnd(this._element);
|
||||
this.cycle(true);
|
||||
}
|
||||
|
|
@ -373,7 +356,7 @@
|
|||
_proto.to = function to(index) {
|
||||
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);
|
||||
|
||||
|
|
@ -382,7 +365,7 @@
|
|||
}
|
||||
|
||||
if (this._isSliding) {
|
||||
EventHandler.one(this._element, Event.SLID, function () {
|
||||
EventHandler.one(this._element, EVENT_SLID, function () {
|
||||
return _this.to(index);
|
||||
});
|
||||
return;
|
||||
|
|
@ -394,7 +377,7 @@
|
|||
return;
|
||||
}
|
||||
|
||||
var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
|
||||
var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV;
|
||||
|
||||
this._slide(direction, this._items[index]);
|
||||
};
|
||||
|
|
@ -443,16 +426,16 @@
|
|||
var _this2 = this;
|
||||
|
||||
if (this._config.keyboard) {
|
||||
EventHandler.on(this._element, Event.KEYDOWN, function (event) {
|
||||
EventHandler.on(this._element, EVENT_KEYDOWN, function (event) {
|
||||
return _this2._keydown(event);
|
||||
});
|
||||
}
|
||||
|
||||
if (this._config.pause === 'hover') {
|
||||
EventHandler.on(this._element, Event.MOUSEENTER, function (event) {
|
||||
EventHandler.on(this._element, EVENT_MOUSEENTER, function (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);
|
||||
});
|
||||
}
|
||||
|
|
@ -509,29 +492,29 @@
|
|||
}
|
||||
};
|
||||
|
||||
makeArray(SelectorEngine.find(Selector.ITEM_IMG, this._element)).forEach(function (itemImg) {
|
||||
EventHandler.on(itemImg, Event.DRAG_START, function (e) {
|
||||
SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(function (itemImg) {
|
||||
EventHandler.on(itemImg, EVENT_DRAG_START, function (e) {
|
||||
return e.preventDefault();
|
||||
});
|
||||
});
|
||||
|
||||
if (this._pointerEvent) {
|
||||
EventHandler.on(this._element, Event.POINTERDOWN, function (event) {
|
||||
EventHandler.on(this._element, EVENT_POINTERDOWN, function (event) {
|
||||
return start(event);
|
||||
});
|
||||
EventHandler.on(this._element, Event.POINTERUP, function (event) {
|
||||
EventHandler.on(this._element, EVENT_POINTERUP, function (event) {
|
||||
return end(event);
|
||||
});
|
||||
|
||||
this._element.classList.add(ClassName.POINTER_EVENT);
|
||||
this._element.classList.add(CLASS_NAME_POINTER_EVENT);
|
||||
} else {
|
||||
EventHandler.on(this._element, Event.TOUCHSTART, function (event) {
|
||||
EventHandler.on(this._element, EVENT_TOUCHSTART, function (event) {
|
||||
return start(event);
|
||||
});
|
||||
EventHandler.on(this._element, Event.TOUCHMOVE, function (event) {
|
||||
EventHandler.on(this._element, EVENT_TOUCHMOVE, function (event) {
|
||||
return move(event);
|
||||
});
|
||||
EventHandler.on(this._element, Event.TOUCHEND, function (event) {
|
||||
EventHandler.on(this._element, EVENT_TOUCHEND, function (event) {
|
||||
return end(event);
|
||||
});
|
||||
}
|
||||
|
|
@ -556,13 +539,13 @@
|
|||
};
|
||||
|
||||
_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);
|
||||
};
|
||||
|
||||
_proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
|
||||
var isNextDirection = direction === Direction.NEXT;
|
||||
var isPrevDirection = direction === Direction.PREV;
|
||||
var isNextDirection = direction === DIRECTION_NEXT;
|
||||
var isPrevDirection = direction === DIRECTION_PREV;
|
||||
|
||||
var activeIndex = this._getItemIndex(activeElement);
|
||||
|
||||
|
|
@ -573,7 +556,7 @@
|
|||
return activeElement;
|
||||
}
|
||||
|
||||
var delta = direction === Direction.PREV ? -1 : 1;
|
||||
var delta = direction === DIRECTION_PREV ? -1 : 1;
|
||||
var itemIndex = (activeIndex + delta) % this._items.length;
|
||||
return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
|
||||
};
|
||||
|
|
@ -581,9 +564,9 @@
|
|||
_proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
|
||||
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,
|
||||
direction: eventDirectionName,
|
||||
from: fromIndex,
|
||||
|
|
@ -593,16 +576,16 @@
|
|||
|
||||
_proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
|
||||
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++) {
|
||||
indicators[i].classList.remove(ClassName.ACTIVE);
|
||||
indicators[i].classList.remove(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
|
||||
var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
|
||||
|
||||
if (nextIndicator) {
|
||||
nextIndicator.classList.add(ClassName.ACTIVE);
|
||||
nextIndicator.classList.add(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -610,7 +593,7 @@
|
|||
_proto._slide = function _slide(direction, element) {
|
||||
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);
|
||||
|
||||
|
|
@ -623,17 +606,17 @@
|
|||
var orderClassName;
|
||||
var eventDirectionName;
|
||||
|
||||
if (direction === Direction.NEXT) {
|
||||
directionalClassName = ClassName.LEFT;
|
||||
orderClassName = ClassName.NEXT;
|
||||
eventDirectionName = Direction.LEFT;
|
||||
if (direction === DIRECTION_NEXT) {
|
||||
directionalClassName = CLASS_NAME_LEFT;
|
||||
orderClassName = CLASS_NAME_NEXT;
|
||||
eventDirectionName = DIRECTION_LEFT;
|
||||
} else {
|
||||
directionalClassName = ClassName.RIGHT;
|
||||
orderClassName = ClassName.PREV;
|
||||
eventDirectionName = Direction.RIGHT;
|
||||
directionalClassName = CLASS_NAME_RIGHT;
|
||||
orderClassName = CLASS_NAME_PREV;
|
||||
eventDirectionName = DIRECTION_RIGHT;
|
||||
}
|
||||
|
||||
if (nextElement && nextElement.classList.contains(ClassName.ACTIVE)) {
|
||||
if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) {
|
||||
this._isSliding = false;
|
||||
return;
|
||||
}
|
||||
|
|
@ -657,7 +640,7 @@
|
|||
|
||||
this._setActiveIndicatorElement(nextElement);
|
||||
|
||||
if (this._element.classList.contains(ClassName.SLIDE)) {
|
||||
if (this._element.classList.contains(CLASS_NAME_SLIDE)) {
|
||||
nextElement.classList.add(orderClassName);
|
||||
reflow(nextElement);
|
||||
activeElement.classList.add(directionalClassName);
|
||||
|
|
@ -675,13 +658,13 @@
|
|||
EventHandler.one(activeElement, TRANSITION_END, function () {
|
||||
nextElement.classList.remove(directionalClassName);
|
||||
nextElement.classList.remove(orderClassName);
|
||||
nextElement.classList.add(ClassName.ACTIVE);
|
||||
activeElement.classList.remove(ClassName.ACTIVE);
|
||||
nextElement.classList.add(CLASS_NAME_ACTIVE);
|
||||
activeElement.classList.remove(CLASS_NAME_ACTIVE);
|
||||
activeElement.classList.remove(orderClassName);
|
||||
activeElement.classList.remove(directionalClassName);
|
||||
_this4._isSliding = false;
|
||||
setTimeout(function () {
|
||||
EventHandler.trigger(_this4._element, Event.SLID, {
|
||||
EventHandler.trigger(_this4._element, EVENT_SLID, {
|
||||
relatedTarget: nextElement,
|
||||
direction: eventDirectionName,
|
||||
from: activeElementIndex,
|
||||
|
|
@ -691,10 +674,10 @@
|
|||
});
|
||||
emulateTransitionEnd(activeElement, transitionDuration);
|
||||
} else {
|
||||
activeElement.classList.remove(ClassName.ACTIVE);
|
||||
nextElement.classList.add(ClassName.ACTIVE);
|
||||
activeElement.classList.remove(CLASS_NAME_ACTIVE);
|
||||
nextElement.classList.add(CLASS_NAME_ACTIVE);
|
||||
this._isSliding = false;
|
||||
EventHandler.trigger(this._element, Event.SLID, {
|
||||
EventHandler.trigger(this._element, EVENT_SLID, {
|
||||
relatedTarget: nextElement,
|
||||
direction: eventDirectionName,
|
||||
from: activeElementIndex,
|
||||
|
|
@ -746,7 +729,7 @@
|
|||
Carousel.dataApiClickHandler = function dataApiClickHandler(event) {
|
||||
var target = getElementFromSelector(this);
|
||||
|
||||
if (!target || !target.classList.contains(ClassName.CAROUSEL)) {
|
||||
if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -792,9 +775,9 @@
|
|||
*/
|
||||
|
||||
|
||||
EventHandler.on(document, Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel.dataApiClickHandler);
|
||||
EventHandler.on(window, Event.LOAD_DATA_API, function () {
|
||||
var carousels = makeArray(SelectorEngine.find(Selector.DATA_RIDE));
|
||||
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler);
|
||||
EventHandler.on(window, EVENT_LOAD_DATA_API, function () {
|
||||
var carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);
|
||||
|
||||
for (var i = 0, len = carousels.length; i < len; i++) {
|
||||
Carousel.carouselInterface(carousels[i], Data.getData(carousels[i], DATA_KEY));
|
||||
|
|
|
|||
BIN
js/dist/carousel.js.map
vendored
BIN
js/dist/carousel.js.map
vendored
Binary file not shown.
136
js/dist/collapse.js
vendored
136
js/dist/collapse.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* 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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
@ -9,10 +9,10 @@
|
|||
(global = global || self, global.Collapse = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
|
||||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
|
||||
|
||||
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator;
|
||||
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
|
||||
SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
|
|
@ -64,13 +64,13 @@
|
|||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
|
||||
if (i % 2) {
|
||||
ownKeys(source, true).forEach(function (key) {
|
||||
ownKeys(Object(source), true).forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
} else if (Object.getOwnPropertyDescriptors) {
|
||||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||||
} else {
|
||||
ownKeys(source).forEach(function (key) {
|
||||
ownKeys(Object(source)).forEach(function (key) {
|
||||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||||
});
|
||||
}
|
||||
|
|
@ -89,6 +89,10 @@
|
|||
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
var toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
|
||||
|
|
@ -142,9 +146,7 @@
|
|||
};
|
||||
|
||||
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
||||
var evt = document.createEvent('HTMLEvents');
|
||||
evt.initEvent(TRANSITION_END, true, true);
|
||||
element.dispatchEvent(evt);
|
||||
element.dispatchEvent(new Event(TRANSITION_END));
|
||||
};
|
||||
|
||||
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) {
|
||||
return element.offsetHeight;
|
||||
};
|
||||
|
|
@ -223,47 +217,37 @@
|
|||
toggle: 'boolean',
|
||||
parent: '(string|element)'
|
||||
};
|
||||
var Event = {
|
||||
SHOW: "show" + EVENT_KEY,
|
||||
SHOWN: "shown" + EVENT_KEY,
|
||||
HIDE: "hide" + EVENT_KEY,
|
||||
HIDDEN: "hidden" + EVENT_KEY,
|
||||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
var ClassName = {
|
||||
SHOW: 'show',
|
||||
COLLAPSE: 'collapse',
|
||||
COLLAPSING: 'collapsing',
|
||||
COLLAPSED: 'collapsed'
|
||||
};
|
||||
var Dimension = {
|
||||
WIDTH: 'width',
|
||||
HEIGHT: 'height'
|
||||
};
|
||||
var Selector = {
|
||||
ACTIVES: '.show, .collapsing',
|
||||
DATA_TOGGLE: '[data-toggle="collapse"]'
|
||||
};
|
||||
var EVENT_SHOW = "show" + EVENT_KEY;
|
||||
var EVENT_SHOWN = "shown" + EVENT_KEY;
|
||||
var EVENT_HIDE = "hide" + EVENT_KEY;
|
||||
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var CLASS_NAME_COLLAPSE = 'collapse';
|
||||
var CLASS_NAME_COLLAPSING = 'collapsing';
|
||||
var CLASS_NAME_COLLAPSED = 'collapsed';
|
||||
var WIDTH = 'width';
|
||||
var HEIGHT = 'height';
|
||||
var SELECTOR_ACTIVES = '.show, .collapsing';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="collapse"]';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Collapse =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var Collapse = /*#__PURE__*/function () {
|
||||
function Collapse(element, config) {
|
||||
this._isTransitioning = false;
|
||||
this._element = element;
|
||||
this._config = this._getConfig(config);
|
||||
this._triggerArray = makeArray(SelectorEngine.find("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]")));
|
||||
var toggleList = makeArray(SelectorEngine.find(Selector.DATA_TOGGLE));
|
||||
this._triggerArray = SelectorEngine.find(SELECTOR_DATA_TOGGLE + "[href=\"#" + element.id + "\"]," + (SELECTOR_DATA_TOGGLE + "[data-target=\"#" + element.id + "\"]"));
|
||||
var toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE);
|
||||
|
||||
for (var i = 0, len = toggleList.length; i < len; i++) {
|
||||
var elem = toggleList[i];
|
||||
var selector = getSelectorFromElement(elem);
|
||||
var filterElement = makeArray(SelectorEngine.find(selector)).filter(function (foundElem) {
|
||||
var filterElement = SelectorEngine.find(selector).filter(function (foundElem) {
|
||||
return foundElem === element;
|
||||
});
|
||||
|
||||
|
|
@ -292,7 +276,7 @@
|
|||
|
||||
// Public
|
||||
_proto.toggle = function toggle() {
|
||||
if (this._element.classList.contains(ClassName.SHOW)) {
|
||||
if (this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
this.hide();
|
||||
} else {
|
||||
this.show();
|
||||
|
|
@ -302,7 +286,7 @@
|
|||
_proto.show = function show() {
|
||||
var _this = this;
|
||||
|
||||
if (this._isTransitioning || this._element.classList.contains(ClassName.SHOW)) {
|
||||
if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -310,12 +294,12 @@
|
|||
var activesData;
|
||||
|
||||
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') {
|
||||
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) {
|
||||
|
|
@ -336,7 +320,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
var startEvent = EventHandler.trigger(this._element, Event.SHOW);
|
||||
var startEvent = EventHandler.trigger(this._element, EVENT_SHOW);
|
||||
|
||||
if (startEvent.defaultPrevented) {
|
||||
return;
|
||||
|
|
@ -356,15 +340,15 @@
|
|||
|
||||
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;
|
||||
|
||||
if (this._triggerArray.length) {
|
||||
this._triggerArray.forEach(function (element) {
|
||||
element.classList.remove(ClassName.COLLAPSED);
|
||||
element.classList.remove(CLASS_NAME_COLLAPSED);
|
||||
element.setAttribute('aria-expanded', true);
|
||||
});
|
||||
}
|
||||
|
|
@ -372,17 +356,17 @@
|
|||
this.setTransitioning(true);
|
||||
|
||||
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.setTransitioning(false);
|
||||
|
||||
EventHandler.trigger(_this._element, Event.SHOWN);
|
||||
EventHandler.trigger(_this._element, EVENT_SHOWN);
|
||||
};
|
||||
|
||||
var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
|
||||
|
|
@ -396,11 +380,11 @@
|
|||
_proto.hide = function hide() {
|
||||
var _this2 = this;
|
||||
|
||||
if (this._isTransitioning || !this._element.classList.contains(ClassName.SHOW)) {
|
||||
if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var startEvent = EventHandler.trigger(this._element, Event.HIDE);
|
||||
var startEvent = EventHandler.trigger(this._element, EVENT_HIDE);
|
||||
|
||||
if (startEvent.defaultPrevented) {
|
||||
return;
|
||||
|
|
@ -411,11 +395,11 @@
|
|||
this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px";
|
||||
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;
|
||||
|
||||
|
|
@ -424,8 +408,8 @@
|
|||
var trigger = this._triggerArray[i];
|
||||
var elem = getElementFromSelector(trigger);
|
||||
|
||||
if (elem && !elem.classList.contains(ClassName.SHOW)) {
|
||||
trigger.classList.add(ClassName.COLLAPSED);
|
||||
if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {
|
||||
trigger.classList.add(CLASS_NAME_COLLAPSED);
|
||||
trigger.setAttribute('aria-expanded', false);
|
||||
}
|
||||
}
|
||||
|
|
@ -436,11 +420,11 @@
|
|||
var complete = function complete() {
|
||||
_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] = '';
|
||||
|
|
@ -472,9 +456,9 @@
|
|||
};
|
||||
|
||||
_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() {
|
||||
|
|
@ -491,8 +475,8 @@
|
|||
parent = SelectorEngine.findOne(parent);
|
||||
}
|
||||
|
||||
var selector = "[data-toggle=\"collapse\"][data-parent=\"" + parent + "\"]";
|
||||
makeArray(SelectorEngine.find(selector, parent)).forEach(function (element) {
|
||||
var selector = SELECTOR_DATA_TOGGLE + "[data-parent=\"" + parent + "\"]";
|
||||
SelectorEngine.find(selector, parent).forEach(function (element) {
|
||||
var selected = getElementFromSelector(element);
|
||||
|
||||
_this3._addAriaAndCollapsedClass(selected, [element]);
|
||||
|
|
@ -502,14 +486,14 @@
|
|||
|
||||
_proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) {
|
||||
if (element) {
|
||||
var isOpen = element.classList.contains(ClassName.SHOW);
|
||||
var isOpen = element.classList.contains(CLASS_NAME_SHOW);
|
||||
|
||||
if (triggerArray.length) {
|
||||
triggerArray.forEach(function (elem) {
|
||||
if (isOpen) {
|
||||
elem.classList.remove(ClassName.COLLAPSED);
|
||||
elem.classList.remove(CLASS_NAME_COLLAPSED);
|
||||
} else {
|
||||
elem.classList.add(ClassName.COLLAPSED);
|
||||
elem.classList.add(CLASS_NAME_COLLAPSED);
|
||||
}
|
||||
|
||||
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
|
||||
if (event.target.tagName === 'A') {
|
||||
event.preventDefault();
|
||||
|
|
@ -580,7 +564,7 @@
|
|||
|
||||
var triggerData = Manipulator.getDataAttributes(this);
|
||||
var selector = getSelectorFromElement(this);
|
||||
var selectorElements = makeArray(SelectorEngine.find(selector));
|
||||
var selectorElements = SelectorEngine.find(selector);
|
||||
selectorElements.forEach(function (element) {
|
||||
var data = Data.getData(element, DATA_KEY);
|
||||
var config;
|
||||
|
|
|
|||
BIN
js/dist/collapse.js.map
vendored
BIN
js/dist/collapse.js.map
vendored
Binary file not shown.
2
js/dist/dom/data.js
vendored
2
js/dist/dom/data.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* 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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
|
|||
4
js/dist/dom/event-handler.js
vendored
4
js/dist/dom/event-handler.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* 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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
@ -279,7 +279,7 @@
|
|||
evt = document.createEvent('HTMLEvents');
|
||||
evt.initEvent(typeEvent, bubbles, true);
|
||||
} else {
|
||||
evt = polyfill_js.createCustomEvent(event, {
|
||||
evt = new CustomEvent(event, {
|
||||
bubbles: bubbles,
|
||||
cancelable: true
|
||||
});
|
||||
|
|
|
|||
BIN
js/dist/dom/event-handler.js.map
vendored
BIN
js/dist/dom/event-handler.js.map
vendored
Binary file not shown.
6
js/dist/dom/manipulator.js
vendored
6
js/dist/dom/manipulator.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* 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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
@ -43,13 +43,13 @@
|
|||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
|
||||
if (i % 2) {
|
||||
ownKeys(source, true).forEach(function (key) {
|
||||
ownKeys(Object(source), true).forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
} else if (Object.getOwnPropertyDescriptors) {
|
||||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||||
} else {
|
||||
ownKeys(source).forEach(function (key) {
|
||||
ownKeys(Object(source)).forEach(function (key) {
|
||||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||||
});
|
||||
}
|
||||
|
|
|
|||
73
js/dist/dom/polyfill.js
vendored
73
js/dist/dom/polyfill.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* 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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
@ -32,58 +32,11 @@
|
|||
};
|
||||
|
||||
/* istanbul ignore file */
|
||||
var _Element$prototype = Element.prototype;
|
||||
exports.matches = _Element$prototype.matches;
|
||||
exports.closest = _Element$prototype.closest;
|
||||
exports.find = Element.prototype.querySelectorAll;
|
||||
exports.findOne = Element.prototype.querySelector;
|
||||
|
||||
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
|
||||
|
||||
exports.findOne = Element.prototype.querySelector; // MSEdge resets defaultPrevented flag upon dispatchEvent call if at least one listener is attached
|
||||
|
||||
var defaultPreventedPreservedOnDispatch = function () {
|
||||
var e = exports.createCustomEvent('Bootstrap', {
|
||||
var e = new CustomEvent('Bootstrap', {
|
||||
cancelable: true
|
||||
});
|
||||
var element = document.createElement('div');
|
||||
|
|
@ -95,26 +48,6 @@
|
|||
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 supportScopeQuery = function () {
|
||||
|
|
|
|||
BIN
js/dist/dom/polyfill.js.map
vendored
BIN
js/dist/dom/polyfill.js.map
vendored
Binary file not shown.
58
js/dist/dom/selector-engine.js
vendored
58
js/dist/dom/selector-engine.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* 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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
@ -9,21 +9,6 @@
|
|||
(global = global || self, global.SelectorEngine = factory(global.Polyfill));
|
||||
}(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
|
||||
|
|
@ -39,14 +24,16 @@
|
|||
var NODE_TEXT = 3;
|
||||
var SelectorEngine = {
|
||||
matches: function matches(element, selector) {
|
||||
return polyfill_js.matches.call(element, selector);
|
||||
return element.matches(selector);
|
||||
},
|
||||
find: function find(selector, element) {
|
||||
var _ref;
|
||||
|
||||
if (element === void 0) {
|
||||
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) {
|
||||
if (element === void 0) {
|
||||
|
|
@ -56,11 +43,12 @@
|
|||
return polyfill_js.findOne.call(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 _this.matches(child, selector);
|
||||
return child.matches(selector);
|
||||
});
|
||||
},
|
||||
parents: function parents(element, selector) {
|
||||
|
|
@ -78,21 +66,33 @@
|
|||
return parents;
|
||||
},
|
||||
closest: function closest(element, selector) {
|
||||
return polyfill_js.closest.call(element, selector);
|
||||
return element.closest(selector);
|
||||
},
|
||||
prev: function prev(element, selector) {
|
||||
var siblings = [];
|
||||
var previous = element.previousSibling;
|
||||
var previous = element.previousElementSibling;
|
||||
|
||||
while (previous && previous.nodeType === Node.ELEMENT_NODE && previous.nodeType !== NODE_TEXT) {
|
||||
if (this.matches(previous, selector)) {
|
||||
siblings.push(previous);
|
||||
while (previous) {
|
||||
if (previous.matches(selector)) {
|
||||
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 [];
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
BIN
js/dist/dom/selector-engine.js.map
vendored
BIN
js/dist/dom/selector-engine.js.map
vendored
Binary file not shown.
213
js/dist/dropdown.js
vendored
213
js/dist/dropdown.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* 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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
@ -9,11 +9,11 @@
|
|||
(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';
|
||||
|
||||
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator;
|
||||
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
|
||||
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
|
||||
Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
|
||||
SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
|
|
@ -65,13 +65,13 @@
|
|||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
|
||||
if (i % 2) {
|
||||
ownKeys(source, true).forEach(function (key) {
|
||||
ownKeys(Object(source), true).forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
} else if (Object.getOwnPropertyDescriptors) {
|
||||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||||
} else {
|
||||
ownKeys(source).forEach(function (key) {
|
||||
ownKeys(Object(source)).forEach(function (key) {
|
||||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||||
});
|
||||
}
|
||||
|
|
@ -88,6 +88,10 @@
|
|||
*/
|
||||
|
||||
var toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
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) {
|
||||
if (!element) {
|
||||
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 REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE);
|
||||
var Event = {
|
||||
HIDE: "hide" + EVENT_KEY,
|
||||
HIDDEN: "hidden" + EVENT_KEY,
|
||||
SHOW: "show" + EVENT_KEY,
|
||||
SHOWN: "shown" + EVENT_KEY,
|
||||
CLICK: "click" + EVENT_KEY,
|
||||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
|
||||
KEYDOWN_DATA_API: "keydown" + EVENT_KEY + DATA_API_KEY,
|
||||
KEYUP_DATA_API: "keyup" + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
var ClassName = {
|
||||
DISABLED: 'disabled',
|
||||
SHOW: 'show',
|
||||
DROPUP: 'dropup',
|
||||
DROPRIGHT: 'dropright',
|
||||
DROPLEFT: 'dropleft',
|
||||
MENURIGHT: 'dropdown-menu-right',
|
||||
POSITION_STATIC: 'position-static'
|
||||
};
|
||||
var Selector = {
|
||||
DATA_TOGGLE: '[data-toggle="dropdown"]',
|
||||
FORM_CHILD: '.dropdown form',
|
||||
MENU: '.dropdown-menu',
|
||||
NAVBAR_NAV: '.navbar-nav',
|
||||
VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'
|
||||
};
|
||||
var AttachmentMap = {
|
||||
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 EVENT_HIDE = "hide" + EVENT_KEY;
|
||||
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
||||
var EVENT_SHOW = "show" + EVENT_KEY;
|
||||
var EVENT_SHOWN = "shown" + EVENT_KEY;
|
||||
var EVENT_CLICK = "click" + EVENT_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY + DATA_API_KEY;
|
||||
var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_DISABLED = 'disabled';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var CLASS_NAME_DROPUP = 'dropup';
|
||||
var CLASS_NAME_DROPRIGHT = 'dropright';
|
||||
var CLASS_NAME_DROPLEFT = 'dropleft';
|
||||
var CLASS_NAME_MENURIGHT = 'dropdown-menu-right';
|
||||
var CLASS_NAME_NAVBAR = 'navbar';
|
||||
var CLASS_NAME_POSITION_STATIC = 'position-static';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="dropdown"]';
|
||||
var SELECTOR_FORM_CHILD = '.dropdown form';
|
||||
var SELECTOR_MENU = '.dropdown-menu';
|
||||
var SELECTOR_NAVBAR_NAV = '.navbar-nav';
|
||||
var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
|
||||
var PLACEMENT_TOP = 'top-start';
|
||||
var PLACEMENT_TOPEND = 'top-end';
|
||||
var PLACEMENT_BOTTOM = 'bottom-start';
|
||||
var PLACEMENT_BOTTOMEND = 'bottom-end';
|
||||
var PLACEMENT_RIGHT = 'right-start';
|
||||
var PLACEMENT_LEFT = 'left-start';
|
||||
var Default = {
|
||||
offset: 0,
|
||||
flip: true,
|
||||
|
|
@ -242,9 +229,7 @@
|
|||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Dropdown =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var Dropdown = /*#__PURE__*/function () {
|
||||
function Dropdown(element, config) {
|
||||
this._element = element;
|
||||
this._popper = null;
|
||||
|
|
@ -262,11 +247,11 @@
|
|||
|
||||
// Public
|
||||
_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;
|
||||
}
|
||||
|
||||
var isActive = this._menu.classList.contains(ClassName.SHOW);
|
||||
var isActive = this._element.classList.contains(CLASS_NAME_SHOW);
|
||||
|
||||
Dropdown.clearMenus();
|
||||
|
||||
|
|
@ -278,7 +263,7 @@
|
|||
};
|
||||
|
||||
_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;
|
||||
}
|
||||
|
||||
|
|
@ -286,7 +271,7 @@
|
|||
var relatedTarget = {
|
||||
relatedTarget: this._element
|
||||
};
|
||||
var showEvent = EventHandler.trigger(parent, Event.SHOW, relatedTarget);
|
||||
var showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget);
|
||||
|
||||
if (showEvent.defaultPrevented) {
|
||||
return;
|
||||
|
|
@ -314,7 +299,7 @@
|
|||
|
||||
|
||||
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());
|
||||
|
|
@ -324,8 +309,10 @@
|
|||
// 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) {
|
||||
makeArray(document.body.children).forEach(function (elem) {
|
||||
if ('ontouchstart' in document.documentElement && !SelectorEngine.closest(parent, SELECTOR_NAVBAR_NAV)) {
|
||||
var _ref;
|
||||
|
||||
(_ref = []).concat.apply(_ref, document.body.children).forEach(function (elem) {
|
||||
return EventHandler.on(elem, 'mouseover', null, noop());
|
||||
});
|
||||
}
|
||||
|
|
@ -334,13 +321,13 @@
|
|||
|
||||
this._element.setAttribute('aria-expanded', true);
|
||||
|
||||
Manipulator.toggleClass(this._menu, ClassName.SHOW);
|
||||
Manipulator.toggleClass(parent, ClassName.SHOW);
|
||||
EventHandler.trigger(parent, Event.SHOWN, relatedTarget);
|
||||
Manipulator.toggleClass(this._menu, CLASS_NAME_SHOW);
|
||||
Manipulator.toggleClass(this._element, CLASS_NAME_SHOW);
|
||||
EventHandler.trigger(parent, EVENT_SHOWN, relatedTarget);
|
||||
};
|
||||
|
||||
_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;
|
||||
}
|
||||
|
||||
|
|
@ -348,7 +335,7 @@
|
|||
var relatedTarget = {
|
||||
relatedTarget: this._element
|
||||
};
|
||||
var hideEvent = EventHandler.trigger(parent, Event.HIDE, relatedTarget);
|
||||
var hideEvent = EventHandler.trigger(parent, EVENT_HIDE, relatedTarget);
|
||||
|
||||
if (hideEvent.defaultPrevented) {
|
||||
return;
|
||||
|
|
@ -358,9 +345,9 @@
|
|||
this._popper.destroy();
|
||||
}
|
||||
|
||||
Manipulator.toggleClass(this._menu, ClassName.SHOW);
|
||||
Manipulator.toggleClass(parent, ClassName.SHOW);
|
||||
EventHandler.trigger(parent, Event.HIDDEN, relatedTarget);
|
||||
Manipulator.toggleClass(this._menu, CLASS_NAME_SHOW);
|
||||
Manipulator.toggleClass(this._element, CLASS_NAME_SHOW);
|
||||
EventHandler.trigger(parent, EVENT_HIDDEN, relatedTarget);
|
||||
};
|
||||
|
||||
_proto.dispose = function dispose() {
|
||||
|
|
@ -388,7 +375,7 @@
|
|||
_proto._addEventListeners = function _addEventListeners() {
|
||||
var _this = this;
|
||||
|
||||
EventHandler.on(this._element, Event.CLICK, function (event) {
|
||||
EventHandler.on(this._element, EVENT_CLICK, function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
|
|
@ -403,33 +390,32 @@
|
|||
};
|
||||
|
||||
_proto._getMenuElement = function _getMenuElement() {
|
||||
var parent = Dropdown.getParentFromElement(this._element);
|
||||
return SelectorEngine.findOne(Selector.MENU, parent);
|
||||
return SelectorEngine.next(this._element, SELECTOR_MENU)[0];
|
||||
};
|
||||
|
||||
_proto._getPlacement = function _getPlacement() {
|
||||
var parentDropdown = this._element.parentNode;
|
||||
var placement = AttachmentMap.BOTTOM; // Handle dropup
|
||||
var placement = PLACEMENT_BOTTOM; // Handle dropup
|
||||
|
||||
if (parentDropdown.classList.contains(ClassName.DROPUP)) {
|
||||
placement = AttachmentMap.TOP;
|
||||
if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
|
||||
placement = PLACEMENT_TOP;
|
||||
|
||||
if (this._menu.classList.contains(ClassName.MENURIGHT)) {
|
||||
placement = AttachmentMap.TOPEND;
|
||||
if (this._menu.classList.contains(CLASS_NAME_MENURIGHT)) {
|
||||
placement = PLACEMENT_TOPEND;
|
||||
}
|
||||
} else if (parentDropdown.classList.contains(ClassName.DROPRIGHT)) {
|
||||
placement = AttachmentMap.RIGHT;
|
||||
} else if (parentDropdown.classList.contains(ClassName.DROPLEFT)) {
|
||||
placement = AttachmentMap.LEFT;
|
||||
} else if (this._menu.classList.contains(ClassName.MENURIGHT)) {
|
||||
placement = AttachmentMap.BOTTOMEND;
|
||||
} else if (parentDropdown.classList.contains(CLASS_NAME_DROPRIGHT)) {
|
||||
placement = PLACEMENT_RIGHT;
|
||||
} else if (parentDropdown.classList.contains(CLASS_NAME_DROPLEFT)) {
|
||||
placement = PLACEMENT_LEFT;
|
||||
} else if (this._menu.classList.contains(CLASS_NAME_MENURIGHT)) {
|
||||
placement = PLACEMENT_BOTTOMEND;
|
||||
}
|
||||
|
||||
return placement;
|
||||
};
|
||||
|
||||
_proto._detectNavbar = function _detectNavbar() {
|
||||
return Boolean(SelectorEngine.closest(this._element, '.navbar'));
|
||||
return Boolean(SelectorEngine.closest(this._element, "." + CLASS_NAME_NAVBAR));
|
||||
};
|
||||
|
||||
_proto._getOffset = function _getOffset() {
|
||||
|
|
@ -502,7 +488,7 @@
|
|||
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++) {
|
||||
var parent = Dropdown.getParentFromElement(toggles[i]);
|
||||
|
|
@ -521,15 +507,15 @@
|
|||
|
||||
var dropdownMenu = context._menu;
|
||||
|
||||
if (!parent.classList.contains(ClassName.SHOW)) {
|
||||
if (!toggles[i].classList.contains(CLASS_NAME_SHOW)) {
|
||||
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;
|
||||
}
|
||||
|
||||
var hideEvent = EventHandler.trigger(parent, Event.HIDE, relatedTarget);
|
||||
var hideEvent = EventHandler.trigger(parent, EVENT_HIDE, relatedTarget);
|
||||
|
||||
if (hideEvent.defaultPrevented) {
|
||||
continue;
|
||||
|
|
@ -538,7 +524,9 @@
|
|||
|
||||
|
||||
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());
|
||||
});
|
||||
}
|
||||
|
|
@ -549,9 +537,9 @@
|
|||
context._popper.destroy();
|
||||
}
|
||||
|
||||
dropdownMenu.classList.remove(ClassName.SHOW);
|
||||
parent.classList.remove(ClassName.SHOW);
|
||||
EventHandler.trigger(parent, Event.HIDDEN, relatedTarget);
|
||||
dropdownMenu.classList.remove(CLASS_NAME_SHOW);
|
||||
toggles[i].classList.remove(CLASS_NAME_SHOW);
|
||||
EventHandler.trigger(parent, EVENT_HIDDEN, relatedTarget);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -567,36 +555,39 @@
|
|||
// - If key is other than escape
|
||||
// - If key is not up or down => not a dropdown command
|
||||
// - If trigger inside the menu => not a dropdown command
|
||||
if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || 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;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
if (this.disabled || this.classList.contains(ClassName.DISABLED)) {
|
||||
if (this.disabled || this.classList.contains(CLASS_NAME_DISABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = Dropdown.getParentFromElement(this);
|
||||
var isActive = parent.classList.contains(ClassName.SHOW);
|
||||
|
||||
if (!isActive || isActive && (event.which === ESCAPE_KEYCODE || event.which === SPACE_KEYCODE)) {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
SelectorEngine.findOne(Selector.DATA_TOGGLE, parent).focus();
|
||||
}
|
||||
var isActive = this.classList.contains(CLASS_NAME_SHOW);
|
||||
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
var button = this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0];
|
||||
button.focus();
|
||||
Dropdown.clearMenus();
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
|
||||
var index = items.indexOf(event.target);
|
||||
var index = items.indexOf(event.target) || 0;
|
||||
|
||||
if (event.which === ARROW_UP_KEYCODE && index > 0) {
|
||||
// Up
|
||||
|
|
@ -608,10 +599,6 @@
|
|||
index++;
|
||||
}
|
||||
|
||||
if (index < 0) {
|
||||
index = 0;
|
||||
}
|
||||
|
||||
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.MENU, Dropdown.dataApiKeydownHandler);
|
||||
EventHandler.on(document, Event.CLICK_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_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, 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_KEYUP_DATA_API, Dropdown.clearMenus);
|
||||
EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
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();
|
||||
});
|
||||
var $ = getjQuery();
|
||||
|
|
|
|||
BIN
js/dist/dropdown.js.map
vendored
BIN
js/dist/dropdown.js.map
vendored
Binary file not shown.
190
js/dist/modal.js
vendored
190
js/dist/modal.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* 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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
@ -9,10 +9,10 @@
|
|||
(global = global || self, global.Modal = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
|
||||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
|
||||
|
||||
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator;
|
||||
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
|
||||
SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
|
|
@ -64,13 +64,13 @@
|
|||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
|
||||
if (i % 2) {
|
||||
ownKeys(source, true).forEach(function (key) {
|
||||
ownKeys(Object(source), true).forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
} else if (Object.getOwnPropertyDescriptors) {
|
||||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||||
} else {
|
||||
ownKeys(source).forEach(function (key) {
|
||||
ownKeys(Object(source)).forEach(function (key) {
|
||||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||||
});
|
||||
}
|
||||
|
|
@ -89,6 +89,10 @@
|
|||
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
var toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
|
||||
|
|
@ -132,9 +136,7 @@
|
|||
};
|
||||
|
||||
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
||||
var evt = document.createEvent('HTMLEvents');
|
||||
evt.initEvent(TRANSITION_END, true, true);
|
||||
element.dispatchEvent(evt);
|
||||
element.dispatchEvent(new Event(TRANSITION_END));
|
||||
};
|
||||
|
||||
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) {
|
||||
if (!element) {
|
||||
return false;
|
||||
|
|
@ -233,50 +227,42 @@
|
|||
focus: 'boolean',
|
||||
show: 'boolean'
|
||||
};
|
||||
var Event = {
|
||||
HIDE: "hide" + EVENT_KEY,
|
||||
HIDE_PREVENTED: "hidePrevented" + EVENT_KEY,
|
||||
HIDDEN: "hidden" + EVENT_KEY,
|
||||
SHOW: "show" + EVENT_KEY,
|
||||
SHOWN: "shown" + EVENT_KEY,
|
||||
FOCUSIN: "focusin" + EVENT_KEY,
|
||||
RESIZE: "resize" + EVENT_KEY,
|
||||
CLICK_DISMISS: "click.dismiss" + EVENT_KEY,
|
||||
KEYDOWN_DISMISS: "keydown.dismiss" + EVENT_KEY,
|
||||
MOUSEUP_DISMISS: "mouseup.dismiss" + EVENT_KEY,
|
||||
MOUSEDOWN_DISMISS: "mousedown.dismiss" + EVENT_KEY,
|
||||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
var ClassName = {
|
||||
SCROLLABLE: 'modal-dialog-scrollable',
|
||||
SCROLLBAR_MEASURER: 'modal-scrollbar-measure',
|
||||
BACKDROP: 'modal-backdrop',
|
||||
OPEN: 'modal-open',
|
||||
FADE: 'fade',
|
||||
SHOW: 'show',
|
||||
STATIC: 'modal-static'
|
||||
};
|
||||
var Selector = {
|
||||
DIALOG: '.modal-dialog',
|
||||
MODAL_BODY: '.modal-body',
|
||||
DATA_TOGGLE: '[data-toggle="modal"]',
|
||||
DATA_DISMISS: '[data-dismiss="modal"]',
|
||||
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
|
||||
STICKY_CONTENT: '.sticky-top'
|
||||
};
|
||||
var EVENT_HIDE = "hide" + EVENT_KEY;
|
||||
var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY;
|
||||
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
||||
var EVENT_SHOW = "show" + EVENT_KEY;
|
||||
var EVENT_SHOWN = "shown" + EVENT_KEY;
|
||||
var EVENT_FOCUSIN = "focusin" + EVENT_KEY;
|
||||
var EVENT_RESIZE = "resize" + EVENT_KEY;
|
||||
var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
|
||||
var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY;
|
||||
var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY;
|
||||
var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY;
|
||||
var EVENT_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 CLASS_NAME_BACKDROP = 'modal-backdrop';
|
||||
var CLASS_NAME_OPEN = 'modal-open';
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var CLASS_NAME_STATIC = 'modal-static';
|
||||
var SELECTOR_DIALOG = '.modal-dialog';
|
||||
var SELECTOR_MODAL_BODY = '.modal-body';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="modal"]';
|
||||
var SELECTOR_DATA_DISMISS = '[data-dismiss="modal"]';
|
||||
var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
|
||||
var SELECTOR_STICKY_CONTENT = '.sticky-top';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Modal =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var Modal = /*#__PURE__*/function () {
|
||||
function Modal(element, config) {
|
||||
this._config = this._getConfig(config);
|
||||
this._element = element;
|
||||
this._dialog = SelectorEngine.findOne(Selector.DIALOG, element);
|
||||
this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, element);
|
||||
this._backdrop = null;
|
||||
this._isShown = false;
|
||||
this._isBodyOverflowing = false;
|
||||
|
|
@ -301,11 +287,11 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (this._element.classList.contains(ClassName.FADE)) {
|
||||
if (this._element.classList.contains(CLASS_NAME_FADE)) {
|
||||
this._isTransitioning = true;
|
||||
}
|
||||
|
||||
var showEvent = EventHandler.trigger(this._element, Event.SHOW, {
|
||||
var showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {
|
||||
relatedTarget: relatedTarget
|
||||
});
|
||||
|
||||
|
|
@ -325,11 +311,11 @@
|
|||
|
||||
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);
|
||||
});
|
||||
EventHandler.on(this._dialog, Event.MOUSEDOWN_DISMISS, function () {
|
||||
EventHandler.one(_this._element, Event.MOUSEUP_DISMISS, function (event) {
|
||||
EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, function () {
|
||||
EventHandler.one(_this._element, EVENT_MOUSEUP_DISMISS, function (event) {
|
||||
if (event.target === _this._element) {
|
||||
_this._ignoreBackdropClick = true;
|
||||
}
|
||||
|
|
@ -352,7 +338,7 @@
|
|||
return;
|
||||
}
|
||||
|
||||
var hideEvent = EventHandler.trigger(this._element, Event.HIDE);
|
||||
var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
|
||||
|
||||
if (hideEvent.defaultPrevented) {
|
||||
return;
|
||||
|
|
@ -360,7 +346,7 @@
|
|||
|
||||
this._isShown = false;
|
||||
|
||||
var transition = this._element.classList.contains(ClassName.FADE);
|
||||
var transition = this._element.classList.contains(CLASS_NAME_FADE);
|
||||
|
||||
if (transition) {
|
||||
this._isTransitioning = true;
|
||||
|
|
@ -370,12 +356,12 @@
|
|||
|
||||
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._dialog, Event.MOUSEDOWN_DISMISS);
|
||||
EventHandler.off(this._element, EVENT_CLICK_DISMISS);
|
||||
EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);
|
||||
|
||||
if (transition) {
|
||||
var transitionDuration = getTransitionDurationFromElement(this._element);
|
||||
|
|
@ -393,12 +379,12 @@
|
|||
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
|
||||
* 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);
|
||||
this._config = null;
|
||||
this._element = null;
|
||||
|
|
@ -425,9 +411,9 @@
|
|||
_proto._showElement = function _showElement(relatedTarget) {
|
||||
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) {
|
||||
// Don't move modal's DOM position
|
||||
|
|
@ -440,7 +426,7 @@
|
|||
|
||||
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;
|
||||
} else {
|
||||
this._element.scrollTop = 0;
|
||||
|
|
@ -450,7 +436,7 @@
|
|||
reflow(this._element);
|
||||
}
|
||||
|
||||
this._element.classList.add(ClassName.SHOW);
|
||||
this._element.classList.add(CLASS_NAME_SHOW);
|
||||
|
||||
if (this._config.focus) {
|
||||
this._enforceFocus();
|
||||
|
|
@ -462,7 +448,7 @@
|
|||
}
|
||||
|
||||
_this3._isTransitioning = false;
|
||||
EventHandler.trigger(_this3._element, Event.SHOWN, {
|
||||
EventHandler.trigger(_this3._element, EVENT_SHOWN, {
|
||||
relatedTarget: relatedTarget
|
||||
});
|
||||
};
|
||||
|
|
@ -479,9 +465,9 @@
|
|||
_proto._enforceFocus = function _enforceFocus() {
|
||||
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)) {
|
||||
_this4._element.focus();
|
||||
}
|
||||
|
|
@ -491,14 +477,18 @@
|
|||
_proto._setEscapeEvent = function _setEscapeEvent() {
|
||||
var _this5 = this;
|
||||
|
||||
if (this._isShown && this._config.keyboard) {
|
||||
EventHandler.on(this._element, Event.KEYDOWN_DISMISS, function (event) {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
if (this._isShown) {
|
||||
EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, function (event) {
|
||||
if (_this5._config.keyboard && event.which === ESCAPE_KEYCODE) {
|
||||
event.preventDefault();
|
||||
|
||||
_this5.hide();
|
||||
} else if (!_this5._config.keyboard && event.which === ESCAPE_KEYCODE) {
|
||||
_this5._triggerBackdropTransition();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
EventHandler.off(this._element, Event.KEYDOWN_DISMISS);
|
||||
EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -506,11 +496,11 @@
|
|||
var _this6 = this;
|
||||
|
||||
if (this._isShown) {
|
||||
EventHandler.on(window, Event.RESIZE, function () {
|
||||
EventHandler.on(window, EVENT_RESIZE, function () {
|
||||
return _this6._adjustDialog();
|
||||
});
|
||||
} else {
|
||||
EventHandler.off(window, Event.RESIZE);
|
||||
EventHandler.off(window, EVENT_RESIZE);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -526,13 +516,13 @@
|
|||
this._isTransitioning = false;
|
||||
|
||||
this._showBackdrop(function () {
|
||||
document.body.classList.remove(ClassName.OPEN);
|
||||
document.body.classList.remove(CLASS_NAME_OPEN);
|
||||
|
||||
_this7._resetAdjustments();
|
||||
|
||||
_this7._resetScrollbar();
|
||||
|
||||
EventHandler.trigger(_this7._element, Event.HIDDEN);
|
||||
EventHandler.trigger(_this7._element, EVENT_HIDDEN);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -545,18 +535,18 @@
|
|||
_proto._showBackdrop = function _showBackdrop(callback) {
|
||||
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) {
|
||||
this._backdrop = document.createElement('div');
|
||||
this._backdrop.className = ClassName.BACKDROP;
|
||||
this._backdrop.className = CLASS_NAME_BACKDROP;
|
||||
|
||||
if (animate) {
|
||||
this._backdrop.classList.add(animate);
|
||||
}
|
||||
|
||||
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) {
|
||||
_this8._ignoreBackdropClick = false;
|
||||
return;
|
||||
|
|
@ -573,7 +563,7 @@
|
|||
reflow(this._backdrop);
|
||||
}
|
||||
|
||||
this._backdrop.classList.add(ClassName.SHOW);
|
||||
this._backdrop.classList.add(CLASS_NAME_SHOW);
|
||||
|
||||
if (!animate) {
|
||||
callback();
|
||||
|
|
@ -584,7 +574,7 @@
|
|||
EventHandler.one(this._backdrop, TRANSITION_END, callback);
|
||||
emulateTransitionEnd(this._backdrop, backdropTransitionDuration);
|
||||
} else if (!this._isShown && this._backdrop) {
|
||||
this._backdrop.classList.remove(ClassName.SHOW);
|
||||
this._backdrop.classList.remove(CLASS_NAME_SHOW);
|
||||
|
||||
var callbackRemove = function callbackRemove() {
|
||||
_this8._removeBackdrop();
|
||||
|
|
@ -592,7 +582,7 @@
|
|||
callback();
|
||||
};
|
||||
|
||||
if (this._element.classList.contains(ClassName.FADE)) {
|
||||
if (this._element.classList.contains(CLASS_NAME_FADE)) {
|
||||
var _backdropTransitionDuration = getTransitionDurationFromElement(this._backdrop);
|
||||
|
||||
EventHandler.one(this._backdrop, TRANSITION_END, callbackRemove);
|
||||
|
|
@ -609,17 +599,17 @@
|
|||
var _this9 = this;
|
||||
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._element.classList.add(ClassName.STATIC);
|
||||
this._element.classList.add(CLASS_NAME_STATIC);
|
||||
|
||||
var modalTransitionDuration = getTransitionDurationFromElement(this._element);
|
||||
EventHandler.one(this._element, TRANSITION_END, function () {
|
||||
_this9._element.classList.remove(ClassName.STATIC);
|
||||
_this9._element.classList.remove(CLASS_NAME_STATIC);
|
||||
});
|
||||
emulateTransitionEnd(this._element, modalTransitionDuration);
|
||||
|
||||
|
|
@ -662,14 +652,14 @@
|
|||
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
|
||||
// while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set
|
||||
// Adjust fixed content padding
|
||||
makeArray(SelectorEngine.find(Selector.FIXED_CONTENT)).forEach(function (element) {
|
||||
SelectorEngine.find(SELECTOR_FIXED_CONTENT).forEach(function (element) {
|
||||
var actualPadding = element.style.paddingRight;
|
||||
var calculatedPadding = window.getComputedStyle(element)['padding-right'];
|
||||
Manipulator.setDataAttribute(element, 'padding-right', actualPadding);
|
||||
element.style.paddingRight = parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px";
|
||||
}); // 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 calculatedMargin = window.getComputedStyle(element)['margin-right'];
|
||||
Manipulator.setDataAttribute(element, 'margin-right', actualMargin);
|
||||
|
|
@ -682,12 +672,12 @@
|
|||
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() {
|
||||
// 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');
|
||||
|
||||
if (typeof padding !== 'undefined') {
|
||||
|
|
@ -696,7 +686,7 @@
|
|||
}
|
||||
}); // 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');
|
||||
|
||||
if (typeof margin !== 'undefined') {
|
||||
|
|
@ -718,7 +708,7 @@
|
|||
_proto._getScrollbarWidth = function _getScrollbarWidth() {
|
||||
// thx d.walsh
|
||||
var scrollDiv = document.createElement('div');
|
||||
scrollDiv.className = ClassName.SCROLLBAR_MEASURER;
|
||||
scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER;
|
||||
document.body.appendChild(scrollDiv);
|
||||
var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth;
|
||||
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 target = getElementFromSelector(this);
|
||||
|
|
@ -782,13 +772,13 @@
|
|||
event.preventDefault();
|
||||
}
|
||||
|
||||
EventHandler.one(target, Event.SHOW, function (showEvent) {
|
||||
EventHandler.one(target, EVENT_SHOW, function (showEvent) {
|
||||
if (showEvent.defaultPrevented) {
|
||||
// only register focus restorer if modal will actually get shown
|
||||
return;
|
||||
}
|
||||
|
||||
EventHandler.one(target, Event.HIDDEN, function () {
|
||||
EventHandler.one(target, EVENT_HIDDEN, function () {
|
||||
if (isVisible(_this11)) {
|
||||
_this11.focus();
|
||||
}
|
||||
|
|
|
|||
BIN
js/dist/modal.js.map
vendored
BIN
js/dist/modal.js.map
vendored
Binary file not shown.
36
js/dist/popover.js
vendored
36
js/dist/popover.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* 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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
@ -9,9 +9,9 @@
|
|||
(global = global || self, global.Popover = factory(global.Data, global.SelectorEngine, global.Tooltip));
|
||||
}(this, (function (Data, SelectorEngine, Tooltip) { 'use strict';
|
||||
|
||||
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
|
||||
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
Tooltip = Tooltip && Tooltip.hasOwnProperty('default') ? Tooltip['default'] : Tooltip;
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
Tooltip = Tooltip && Object.prototype.hasOwnProperty.call(Tooltip, 'default') ? Tooltip['default'] : Tooltip;
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
|
|
@ -63,13 +63,13 @@
|
|||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
|
||||
if (i % 2) {
|
||||
ownKeys(source, true).forEach(function (key) {
|
||||
ownKeys(Object(source), true).forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
} else if (Object.getOwnPropertyDescriptors) {
|
||||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||||
} else {
|
||||
ownKeys(source).forEach(function (key) {
|
||||
ownKeys(Object(source)).forEach(function (key) {
|
||||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||||
});
|
||||
}
|
||||
|
|
@ -126,14 +126,6 @@
|
|||
content: '(string|element|function)'
|
||||
});
|
||||
|
||||
var ClassName = {
|
||||
FADE: 'fade',
|
||||
SHOW: 'show'
|
||||
};
|
||||
var Selector = {
|
||||
TITLE: '.popover-header',
|
||||
CONTENT: '.popover-body'
|
||||
};
|
||||
var Event = {
|
||||
HIDE: "hide" + EVENT_KEY,
|
||||
HIDDEN: "hidden" + EVENT_KEY,
|
||||
|
|
@ -146,15 +138,17 @@
|
|||
MOUSEENTER: "mouseenter" + 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
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Popover =
|
||||
/*#__PURE__*/
|
||||
function (_Tooltip) {
|
||||
var Popover = /*#__PURE__*/function (_Tooltip) {
|
||||
_inheritsLoose(Popover, _Tooltip);
|
||||
|
||||
function Popover() {
|
||||
|
|
@ -171,7 +165,7 @@
|
|||
_proto.setContent = function setContent() {
|
||||
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();
|
||||
|
||||
|
|
@ -179,9 +173,9 @@
|
|||
content = content.call(this.element);
|
||||
}
|
||||
|
||||
this.setElementContent(SelectorEngine.findOne(Selector.CONTENT, tip), content);
|
||||
tip.classList.remove(ClassName.FADE);
|
||||
tip.classList.remove(ClassName.SHOW);
|
||||
this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);
|
||||
tip.classList.remove(CLASS_NAME_FADE);
|
||||
tip.classList.remove(CLASS_NAME_SHOW);
|
||||
};
|
||||
|
||||
_proto._addAttachmentClass = function _addAttachmentClass(attachment) {
|
||||
|
|
|
|||
BIN
js/dist/popover.js.map
vendored
BIN
js/dist/popover.js.map
vendored
Binary file not shown.
108
js/dist/scrollspy.js
vendored
108
js/dist/scrollspy.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* 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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
@ -9,10 +9,10 @@
|
|||
(global = global || self, global.ScrollSpy = factory(global.Data, global.EventHandler, global.Manipulator, global.SelectorEngine));
|
||||
}(this, (function (Data, EventHandler, Manipulator, SelectorEngine) { 'use strict';
|
||||
|
||||
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator;
|
||||
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
|
||||
SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
|
|
@ -64,13 +64,13 @@
|
|||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
|
||||
if (i % 2) {
|
||||
ownKeys(source, true).forEach(function (key) {
|
||||
ownKeys(Object(source), true).forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
} else if (Object.getOwnPropertyDescriptors) {
|
||||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||||
} else {
|
||||
ownKeys(source).forEach(function (key) {
|
||||
ownKeys(Object(source)).forEach(function (key) {
|
||||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||||
});
|
||||
}
|
||||
|
|
@ -88,6 +88,10 @@
|
|||
var MAX_UID = 1000000;
|
||||
|
||||
var toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
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 _window = window,
|
||||
jQuery = _window.jQuery;
|
||||
|
|
@ -182,49 +178,39 @@
|
|||
method: 'string',
|
||||
target: '(string|element)'
|
||||
};
|
||||
var Event = {
|
||||
ACTIVATE: "activate" + EVENT_KEY,
|
||||
SCROLL: "scroll" + EVENT_KEY,
|
||||
LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
var ClassName = {
|
||||
DROPDOWN_ITEM: 'dropdown-item',
|
||||
ACTIVE: 'active'
|
||||
};
|
||||
var Selector = {
|
||||
DATA_SPY: '[data-spy="scroll"]',
|
||||
NAV_LIST_GROUP: '.nav, .list-group',
|
||||
NAV_LINKS: '.nav-link',
|
||||
NAV_ITEMS: '.nav-item',
|
||||
LIST_ITEMS: '.list-group-item',
|
||||
DROPDOWN: '.dropdown',
|
||||
DROPDOWN_TOGGLE: '.dropdown-toggle'
|
||||
};
|
||||
var OffsetMethod = {
|
||||
OFFSET: 'offset',
|
||||
POSITION: 'position'
|
||||
};
|
||||
var EVENT_ACTIVATE = "activate" + EVENT_KEY;
|
||||
var EVENT_SCROLL = "scroll" + EVENT_KEY;
|
||||
var EVENT_LOAD_DATA_API = "load" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
|
||||
var CLASS_NAME_ACTIVE = 'active';
|
||||
var SELECTOR_DATA_SPY = '[data-spy="scroll"]';
|
||||
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
|
||||
var SELECTOR_NAV_LINKS = '.nav-link';
|
||||
var SELECTOR_NAV_ITEMS = '.nav-item';
|
||||
var SELECTOR_LIST_ITEMS = '.list-group-item';
|
||||
var SELECTOR_DROPDOWN = '.dropdown';
|
||||
var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
|
||||
var METHOD_OFFSET = 'offset';
|
||||
var METHOD_POSITION = 'position';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var ScrollSpy =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var ScrollSpy = /*#__PURE__*/function () {
|
||||
function ScrollSpy(element, config) {
|
||||
var _this = this;
|
||||
|
||||
this._element = element;
|
||||
this._scrollElement = element.tagName === 'BODY' ? window : element;
|
||||
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._targets = [];
|
||||
this._activeTarget = null;
|
||||
this._scrollHeight = 0;
|
||||
EventHandler.on(this._scrollElement, Event.SCROLL, function (event) {
|
||||
EventHandler.on(this._scrollElement, EVENT_SCROLL, function (event) {
|
||||
return _this._process(event);
|
||||
});
|
||||
this.refresh();
|
||||
|
|
@ -241,13 +227,13 @@
|
|||
_proto.refresh = function refresh() {
|
||||
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 offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0;
|
||||
var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
|
||||
this._offsets = [];
|
||||
this._targets = [];
|
||||
this._scrollHeight = this._getScrollHeight();
|
||||
var targets = makeArray(SelectorEngine.find(this._selector));
|
||||
var targets = SelectorEngine.find(this._selector);
|
||||
targets.map(function (element) {
|
||||
var target;
|
||||
var targetSelector = getSelectorFromElement(element);
|
||||
|
|
@ -371,37 +357,37 @@
|
|||
|
||||
var link = SelectorEngine.findOne(queries.join(','));
|
||||
|
||||
if (link.classList.contains(ClassName.DROPDOWN_ITEM)) {
|
||||
SelectorEngine.findOne(Selector.DROPDOWN_TOGGLE, SelectorEngine.closest(link, Selector.DROPDOWN)).classList.add(ClassName.ACTIVE);
|
||||
link.classList.add(ClassName.ACTIVE);
|
||||
if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
|
||||
SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, SelectorEngine.closest(link, SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE);
|
||||
link.classList.add(CLASS_NAME_ACTIVE);
|
||||
} else {
|
||||
// Set triggered link as active
|
||||
link.classList.add(ClassName.ACTIVE);
|
||||
SelectorEngine.parents(link, Selector.NAV_LIST_GROUP).forEach(function (listGroup) {
|
||||
link.classList.add(CLASS_NAME_ACTIVE);
|
||||
SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP).forEach(function (listGroup) {
|
||||
// Set triggered links parents as active
|
||||
// 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) {
|
||||
return item.classList.add(ClassName.ACTIVE);
|
||||
SelectorEngine.prev(listGroup, SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).forEach(function (item) {
|
||||
return item.classList.add(CLASS_NAME_ACTIVE);
|
||||
}); // Handle special case when .nav-link is inside .nav-item
|
||||
|
||||
SelectorEngine.prev(listGroup, Selector.NAV_ITEMS).forEach(function (navItem) {
|
||||
SelectorEngine.children(navItem, Selector.NAV_LINKS).forEach(function (item) {
|
||||
return item.classList.add(ClassName.ACTIVE);
|
||||
SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS).forEach(function (navItem) {
|
||||
SelectorEngine.children(navItem, SELECTOR_NAV_LINKS).forEach(function (item) {
|
||||
return item.classList.add(CLASS_NAME_ACTIVE);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
EventHandler.trigger(this._scrollElement, Event.ACTIVATE, {
|
||||
EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {
|
||||
relatedTarget: target
|
||||
});
|
||||
};
|
||||
|
||||
_proto._clear = function _clear() {
|
||||
makeArray(SelectorEngine.find(this._selector)).filter(function (node) {
|
||||
return node.classList.contains(ClassName.ACTIVE);
|
||||
SelectorEngine.find(this._selector).filter(function (node) {
|
||||
return node.classList.contains(CLASS_NAME_ACTIVE);
|
||||
}).forEach(function (node) {
|
||||
return node.classList.remove(ClassName.ACTIVE);
|
||||
return node.classList.remove(CLASS_NAME_ACTIVE);
|
||||
});
|
||||
} // Static
|
||||
;
|
||||
|
|
@ -451,8 +437,8 @@
|
|||
*/
|
||||
|
||||
|
||||
EventHandler.on(window, Event.LOAD_DATA_API, function () {
|
||||
makeArray(SelectorEngine.find(Selector.DATA_SPY)).forEach(function (spy) {
|
||||
EventHandler.on(window, EVENT_LOAD_DATA_API, function () {
|
||||
SelectorEngine.find(SELECTOR_DATA_SPY).forEach(function (spy) {
|
||||
return new ScrollSpy(spy, Manipulator.getDataAttributes(spy));
|
||||
});
|
||||
});
|
||||
|
|
|
|||
BIN
js/dist/scrollspy.js.map
vendored
BIN
js/dist/scrollspy.js.map
vendored
Binary file not shown.
108
js/dist/tab.js
vendored
108
js/dist/tab.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* 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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
@ -9,9 +9,9 @@
|
|||
(global = global || self, global.Tab = factory(global.Data, global.EventHandler, global.SelectorEngine));
|
||||
}(this, (function (Data, EventHandler, SelectorEngine) { 'use strict';
|
||||
|
||||
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
|
||||
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
|
|
@ -78,9 +78,7 @@
|
|||
};
|
||||
|
||||
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
||||
var evt = document.createEvent('HTMLEvents');
|
||||
evt.initEvent(TRANSITION_END, true, true);
|
||||
element.dispatchEvent(evt);
|
||||
element.dispatchEvent(new Event(TRANSITION_END));
|
||||
};
|
||||
|
||||
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
|
||||
|
|
@ -101,14 +99,6 @@
|
|||
}, emulatedDuration);
|
||||
};
|
||||
|
||||
var makeArray = function makeArray(nodeList) {
|
||||
if (!nodeList) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [].slice.call(nodeList);
|
||||
};
|
||||
|
||||
var reflow = function reflow(element) {
|
||||
return element.offsetHeight;
|
||||
};
|
||||
|
|
@ -135,38 +125,30 @@
|
|||
var DATA_KEY = 'bs.tab';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var DATA_API_KEY = '.data-api';
|
||||
var Event = {
|
||||
HIDE: "hide" + EVENT_KEY,
|
||||
HIDDEN: "hidden" + EVENT_KEY,
|
||||
SHOW: "show" + EVENT_KEY,
|
||||
SHOWN: "shown" + EVENT_KEY,
|
||||
CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
|
||||
};
|
||||
var ClassName = {
|
||||
DROPDOWN_MENU: 'dropdown-menu',
|
||||
ACTIVE: 'active',
|
||||
DISABLED: 'disabled',
|
||||
FADE: 'fade',
|
||||
SHOW: 'show'
|
||||
};
|
||||
var Selector = {
|
||||
DROPDOWN: '.dropdown',
|
||||
NAV_LIST_GROUP: '.nav, .list-group',
|
||||
ACTIVE: '.active',
|
||||
ACTIVE_UL: ':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'
|
||||
};
|
||||
var EVENT_HIDE = "hide" + EVENT_KEY;
|
||||
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
||||
var EVENT_SHOW = "show" + EVENT_KEY;
|
||||
var EVENT_SHOWN = "shown" + EVENT_KEY;
|
||||
var EVENT_CLICK_DATA_API = "click" + EVENT_KEY + DATA_API_KEY;
|
||||
var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
|
||||
var CLASS_NAME_ACTIVE = 'active';
|
||||
var CLASS_NAME_DISABLED = 'disabled';
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var SELECTOR_DROPDOWN = '.dropdown';
|
||||
var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
|
||||
var SELECTOR_ACTIVE = '.active';
|
||||
var SELECTOR_ACTIVE_UL = ':scope > li > .active';
|
||||
var SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]';
|
||||
var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
|
||||
var SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Tab =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var Tab = /*#__PURE__*/function () {
|
||||
function Tab(element) {
|
||||
this._element = element;
|
||||
Data.setData(this._element, DATA_KEY, this);
|
||||
|
|
@ -179,29 +161,29 @@
|
|||
_proto.show = function show() {
|
||||
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;
|
||||
}
|
||||
|
||||
var previous;
|
||||
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) {
|
||||
var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? Selector.ACTIVE_UL : Selector.ACTIVE;
|
||||
previous = makeArray(SelectorEngine.find(itemSelector, listElement));
|
||||
var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
|
||||
previous = SelectorEngine.find(itemSelector, listElement);
|
||||
previous = previous[previous.length - 1];
|
||||
}
|
||||
|
||||
var hideEvent = null;
|
||||
|
||||
if (previous) {
|
||||
hideEvent = EventHandler.trigger(previous, Event.HIDE, {
|
||||
hideEvent = EventHandler.trigger(previous, EVENT_HIDE, {
|
||||
relatedTarget: this._element
|
||||
});
|
||||
}
|
||||
|
||||
var showEvent = EventHandler.trigger(this._element, Event.SHOW, {
|
||||
var showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {
|
||||
relatedTarget: previous
|
||||
});
|
||||
|
||||
|
|
@ -212,10 +194,10 @@
|
|||
this._activate(this._element, listElement);
|
||||
|
||||
var complete = function complete() {
|
||||
EventHandler.trigger(previous, Event.HIDDEN, {
|
||||
EventHandler.trigger(previous, EVENT_HIDDEN, {
|
||||
relatedTarget: _this._element
|
||||
});
|
||||
EventHandler.trigger(_this._element, Event.SHOWN, {
|
||||
EventHandler.trigger(_this._element, EVENT_SHOWN, {
|
||||
relatedTarget: previous
|
||||
});
|
||||
};
|
||||
|
|
@ -236,9 +218,9 @@
|
|||
_proto._activate = function _activate(element, container, callback) {
|
||||
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 isTransitioning = callback && active && active.classList.contains(ClassName.FADE);
|
||||
var isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE);
|
||||
|
||||
var complete = function complete() {
|
||||
return _this2._transitionComplete(element, active, callback);
|
||||
|
|
@ -246,7 +228,7 @@
|
|||
|
||||
if (active && isTransitioning) {
|
||||
var transitionDuration = getTransitionDurationFromElement(active);
|
||||
active.classList.remove(ClassName.SHOW);
|
||||
active.classList.remove(CLASS_NAME_SHOW);
|
||||
EventHandler.one(active, TRANSITION_END, complete);
|
||||
emulateTransitionEnd(active, transitionDuration);
|
||||
} else {
|
||||
|
|
@ -256,11 +238,11 @@
|
|||
|
||||
_proto._transitionComplete = function _transitionComplete(element, active, callback) {
|
||||
if (active) {
|
||||
active.classList.remove(ClassName.ACTIVE);
|
||||
var dropdownChild = SelectorEngine.findOne(Selector.DROPDOWN_ACTIVE_CHILD, active.parentNode);
|
||||
active.classList.remove(CLASS_NAME_ACTIVE);
|
||||
var dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode);
|
||||
|
||||
if (dropdownChild) {
|
||||
dropdownChild.classList.remove(ClassName.ACTIVE);
|
||||
dropdownChild.classList.remove(CLASS_NAME_ACTIVE);
|
||||
}
|
||||
|
||||
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') {
|
||||
element.setAttribute('aria-selected', true);
|
||||
|
|
@ -276,16 +258,16 @@
|
|||
|
||||
reflow(element);
|
||||
|
||||
if (element.classList.contains(ClassName.FADE)) {
|
||||
element.classList.add(ClassName.SHOW);
|
||||
if (element.classList.contains(CLASS_NAME_FADE)) {
|
||||
element.classList.add(CLASS_NAME_SHOW);
|
||||
}
|
||||
|
||||
if (element.parentNode && element.parentNode.classList.contains(ClassName.DROPDOWN_MENU)) {
|
||||
var dropdownElement = SelectorEngine.closest(element, Selector.DROPDOWN);
|
||||
if (element.parentNode && element.parentNode.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
|
||||
var dropdownElement = SelectorEngine.closest(element, SELECTOR_DROPDOWN);
|
||||
|
||||
if (dropdownElement) {
|
||||
makeArray(SelectorEngine.find(Selector.DROPDOWN_TOGGLE)).forEach(function (dropdown) {
|
||||
return dropdown.classList.add(ClassName.ACTIVE);
|
||||
SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE).forEach(function (dropdown) {
|
||||
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();
|
||||
var data = Data.getData(this, DATA_KEY) || new Tab(this);
|
||||
data.show();
|
||||
|
|
|
|||
BIN
js/dist/tab.js.map
vendored
BIN
js/dist/tab.js.map
vendored
Binary file not shown.
82
js/dist/toast.js
vendored
82
js/dist/toast.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* 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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
@ -9,9 +9,9 @@
|
|||
(global = global || self, global.Toast = factory(global.Data, global.EventHandler, global.Manipulator));
|
||||
}(this, (function (Data, EventHandler, Manipulator) { 'use strict';
|
||||
|
||||
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator;
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
|
|
@ -63,13 +63,13 @@
|
|||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
|
||||
if (i % 2) {
|
||||
ownKeys(source, true).forEach(function (key) {
|
||||
ownKeys(Object(source), true).forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
} else if (Object.getOwnPropertyDescriptors) {
|
||||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||||
} else {
|
||||
ownKeys(source).forEach(function (key) {
|
||||
ownKeys(Object(source)).forEach(function (key) {
|
||||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||||
});
|
||||
}
|
||||
|
|
@ -88,6 +88,10 @@
|
|||
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
var toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
|
||||
|
|
@ -115,9 +119,7 @@
|
|||
};
|
||||
|
||||
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
||||
var evt = document.createEvent('HTMLEvents');
|
||||
evt.initEvent(TRANSITION_END, true, true);
|
||||
element.dispatchEvent(evt);
|
||||
element.dispatchEvent(new Event(TRANSITION_END));
|
||||
};
|
||||
|
||||
var isElement = function isElement(obj) {
|
||||
|
|
@ -179,19 +181,15 @@
|
|||
var VERSION = '4.3.1';
|
||||
var DATA_KEY = 'bs.toast';
|
||||
var EVENT_KEY = "." + DATA_KEY;
|
||||
var Event = {
|
||||
CLICK_DISMISS: "click.dismiss" + EVENT_KEY,
|
||||
HIDE: "hide" + EVENT_KEY,
|
||||
HIDDEN: "hidden" + EVENT_KEY,
|
||||
SHOW: "show" + EVENT_KEY,
|
||||
SHOWN: "shown" + EVENT_KEY
|
||||
};
|
||||
var ClassName = {
|
||||
FADE: 'fade',
|
||||
HIDE: 'hide',
|
||||
SHOW: 'show',
|
||||
SHOWING: 'showing'
|
||||
};
|
||||
var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
|
||||
var EVENT_HIDE = "hide" + EVENT_KEY;
|
||||
var EVENT_HIDDEN = "hidden" + EVENT_KEY;
|
||||
var EVENT_SHOW = "show" + EVENT_KEY;
|
||||
var EVENT_SHOWN = "shown" + EVENT_KEY;
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_HIDE = 'hide';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var CLASS_NAME_SHOWING = 'showing';
|
||||
var DefaultType = {
|
||||
animation: 'boolean',
|
||||
autohide: 'boolean',
|
||||
|
|
@ -202,18 +200,14 @@
|
|||
autohide: true,
|
||||
delay: 500
|
||||
};
|
||||
var Selector = {
|
||||
DATA_DISMISS: '[data-dismiss="toast"]'
|
||||
};
|
||||
var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Toast =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var Toast = /*#__PURE__*/function () {
|
||||
function Toast(element, config) {
|
||||
this._element = element;
|
||||
this._config = this._getConfig(config);
|
||||
|
|
@ -231,22 +225,22 @@
|
|||
_proto.show = function show() {
|
||||
var _this = this;
|
||||
|
||||
var showEvent = EventHandler.trigger(this._element, Event.SHOW);
|
||||
var showEvent = EventHandler.trigger(this._element, EVENT_SHOW);
|
||||
|
||||
if (showEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._config.animation) {
|
||||
this._element.classList.add(ClassName.FADE);
|
||||
this._element.classList.add(CLASS_NAME_FADE);
|
||||
}
|
||||
|
||||
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) {
|
||||
_this._timeout = setTimeout(function () {
|
||||
|
|
@ -255,11 +249,11 @@
|
|||
}
|
||||
};
|
||||
|
||||
this._element.classList.remove(ClassName.HIDE);
|
||||
this._element.classList.remove(CLASS_NAME_HIDE);
|
||||
|
||||
reflow(this._element);
|
||||
|
||||
this._element.classList.add(ClassName.SHOWING);
|
||||
this._element.classList.add(CLASS_NAME_SHOWING);
|
||||
|
||||
if (this._config.animation) {
|
||||
var transitionDuration = getTransitionDurationFromElement(this._element);
|
||||
|
|
@ -273,23 +267,23 @@
|
|||
_proto.hide = function hide() {
|
||||
var _this2 = this;
|
||||
|
||||
if (!this._element.classList.contains(ClassName.SHOW)) {
|
||||
if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var hideEvent = EventHandler.trigger(this._element, Event.HIDE);
|
||||
var hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);
|
||||
|
||||
if (hideEvent.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
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) {
|
||||
var transitionDuration = getTransitionDurationFromElement(this._element);
|
||||
|
|
@ -304,11 +298,11 @@
|
|||
clearTimeout(this._timeout);
|
||||
this._timeout = null;
|
||||
|
||||
if (this._element.classList.contains(ClassName.SHOW)) {
|
||||
this._element.classList.remove(ClassName.SHOW);
|
||||
if (this._element.classList.contains(CLASS_NAME_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);
|
||||
this._element = null;
|
||||
this._config = null;
|
||||
|
|
@ -324,7 +318,7 @@
|
|||
_proto._setListeners = function _setListeners() {
|
||||
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();
|
||||
});
|
||||
} // Static
|
||||
|
|
|
|||
BIN
js/dist/toast.js.map
vendored
BIN
js/dist/toast.js.map
vendored
Binary file not shown.
155
js/dist/tooltip.js
vendored
155
js/dist/tooltip.js
vendored
|
|
@ -1,6 +1,6 @@
|
|||
/*!
|
||||
* 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)
|
||||
*/
|
||||
(function (global, factory) {
|
||||
|
|
@ -9,11 +9,11 @@
|
|||
(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';
|
||||
|
||||
Data = Data && Data.hasOwnProperty('default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && EventHandler.hasOwnProperty('default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Manipulator.hasOwnProperty('default') ? Manipulator['default'] : Manipulator;
|
||||
Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
|
||||
SelectorEngine = SelectorEngine && SelectorEngine.hasOwnProperty('default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
Data = Data && Object.prototype.hasOwnProperty.call(Data, 'default') ? Data['default'] : Data;
|
||||
EventHandler = EventHandler && Object.prototype.hasOwnProperty.call(EventHandler, 'default') ? EventHandler['default'] : EventHandler;
|
||||
Manipulator = Manipulator && Object.prototype.hasOwnProperty.call(Manipulator, 'default') ? Manipulator['default'] : Manipulator;
|
||||
Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
|
||||
SelectorEngine = SelectorEngine && Object.prototype.hasOwnProperty.call(SelectorEngine, 'default') ? SelectorEngine['default'] : SelectorEngine;
|
||||
|
||||
function _defineProperties(target, props) {
|
||||
for (var i = 0; i < props.length; i++) {
|
||||
|
|
@ -65,13 +65,13 @@
|
|||
var source = arguments[i] != null ? arguments[i] : {};
|
||||
|
||||
if (i % 2) {
|
||||
ownKeys(source, true).forEach(function (key) {
|
||||
ownKeys(Object(source), true).forEach(function (key) {
|
||||
_defineProperty(target, key, source[key]);
|
||||
});
|
||||
} else if (Object.getOwnPropertyDescriptors) {
|
||||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
||||
} else {
|
||||
ownKeys(source).forEach(function (key) {
|
||||
ownKeys(Object(source)).forEach(function (key) {
|
||||
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
||||
});
|
||||
}
|
||||
|
|
@ -91,6 +91,10 @@
|
|||
var TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
|
||||
var toType = function toType(obj) {
|
||||
if (obj === null || obj === undefined) {
|
||||
return "" + obj;
|
||||
}
|
||||
|
||||
return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
|
||||
};
|
||||
/**
|
||||
|
|
@ -132,9 +136,7 @@
|
|||
};
|
||||
|
||||
var triggerTransitionEnd = function triggerTransitionEnd(element) {
|
||||
var evt = document.createEvent('HTMLEvents');
|
||||
evt.initEvent(TRANSITION_END, true, true);
|
||||
element.dispatchEvent(evt);
|
||||
element.dispatchEvent(new Event(TRANSITION_END));
|
||||
};
|
||||
|
||||
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) {
|
||||
if (!document.documentElement.attachShadow) {
|
||||
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
|
||||
*/
|
||||
|
||||
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.
|
||||
*
|
||||
* 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 attrName = attr.nodeName.toLowerCase();
|
||||
|
||||
if (allowedAttributeList.indexOf(attrName) !== -1) {
|
||||
if (uriAttrs.indexOf(attrName) !== -1) {
|
||||
return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
|
||||
return SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -255,8 +249,8 @@
|
|||
return attrRegex instanceof RegExp;
|
||||
}); // Check if a regular expression validates the attribute.
|
||||
|
||||
for (var i = 0, l = regExp.length; i < l; i++) {
|
||||
if (attrName.match(regExp[i])) {
|
||||
for (var i = 0, len = regExp.length; i < len; i++) {
|
||||
if (regExp[i].test(attrName)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -283,7 +277,7 @@
|
|||
h5: [],
|
||||
h6: [],
|
||||
i: [],
|
||||
img: ['src', 'alt', 'title', 'width', 'height'],
|
||||
img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
|
||||
li: [],
|
||||
ol: [],
|
||||
p: [],
|
||||
|
|
@ -298,6 +292,8 @@
|
|||
ul: []
|
||||
};
|
||||
function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
|
||||
var _ref;
|
||||
|
||||
if (!unsafeHtml.length) {
|
||||
return unsafeHtml;
|
||||
}
|
||||
|
|
@ -309,9 +305,12 @@
|
|||
var domParser = new window.DOMParser();
|
||||
var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
|
||||
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 _ref2;
|
||||
|
||||
var el = elements[i];
|
||||
var elName = el.nodeName.toLowerCase();
|
||||
|
||||
|
|
@ -320,7 +319,8 @@
|
|||
return "continue";
|
||||
}
|
||||
|
||||
var attributeList = makeArray(el.attributes);
|
||||
var attributeList = (_ref2 = []).concat.apply(_ref2, el.attributes);
|
||||
|
||||
var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
|
||||
attributeList.forEach(function (attr) {
|
||||
if (!allowedAttribute(attr, whitelistedAttributes)) {
|
||||
|
|
@ -394,11 +394,7 @@
|
|||
whiteList: DefaultWhitelist,
|
||||
popperConfig: null
|
||||
};
|
||||
var HoverState = {
|
||||
SHOW: 'show',
|
||||
OUT: 'out'
|
||||
};
|
||||
var Event = {
|
||||
var Event$1 = {
|
||||
HIDE: "hide" + EVENT_KEY,
|
||||
HIDDEN: "hidden" + EVENT_KEY,
|
||||
SHOW: "show" + EVENT_KEY,
|
||||
|
|
@ -410,28 +406,23 @@
|
|||
MOUSEENTER: "mouseenter" + EVENT_KEY,
|
||||
MOUSELEAVE: "mouseleave" + EVENT_KEY
|
||||
};
|
||||
var ClassName = {
|
||||
FADE: 'fade',
|
||||
SHOW: 'show'
|
||||
};
|
||||
var Selector = {
|
||||
TOOLTIP_INNER: '.tooltip-inner'
|
||||
};
|
||||
var Trigger = {
|
||||
HOVER: 'hover',
|
||||
FOCUS: 'focus',
|
||||
CLICK: 'click',
|
||||
MANUAL: 'manual'
|
||||
};
|
||||
var CLASS_NAME_FADE = 'fade';
|
||||
var CLASS_NAME_MODAL = 'modal';
|
||||
var CLASS_NAME_SHOW = 'show';
|
||||
var HOVER_STATE_SHOW = 'show';
|
||||
var HOVER_STATE_OUT = 'out';
|
||||
var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
|
||||
var TRIGGER_HOVER = 'hover';
|
||||
var TRIGGER_FOCUS = 'focus';
|
||||
var TRIGGER_CLICK = 'click';
|
||||
var TRIGGER_MANUAL = 'manual';
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
var Tooltip =
|
||||
/*#__PURE__*/
|
||||
function () {
|
||||
var Tooltip = /*#__PURE__*/function () {
|
||||
function Tooltip(element, config) {
|
||||
if (typeof Popper === 'undefined') {
|
||||
throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org)');
|
||||
|
|
@ -491,7 +482,7 @@
|
|||
context._leave(null, context);
|
||||
}
|
||||
} else {
|
||||
if (this.getTipElement().classList.contains(ClassName.SHOW)) {
|
||||
if (this.getTipElement().classList.contains(CLASS_NAME_SHOW)) {
|
||||
this._leave(null, this);
|
||||
|
||||
return;
|
||||
|
|
@ -505,7 +496,7 @@
|
|||
clearTimeout(this._timeout);
|
||||
Data.removeData(this.element, this.constructor.DATA_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) {
|
||||
this.tip.parentNode.removeChild(this.tip);
|
||||
|
|
@ -549,7 +540,7 @@
|
|||
this.setContent();
|
||||
|
||||
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;
|
||||
|
|
@ -568,13 +559,15 @@
|
|||
|
||||
EventHandler.trigger(this.element, this.constructor.Event.INSERTED);
|
||||
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;
|
||||
// only needed because of broken event delegation on iOS
|
||||
// https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
|
||||
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
makeArray(document.body.children).forEach(function (element) {
|
||||
var _ref;
|
||||
|
||||
(_ref = []).concat.apply(_ref, document.body.children).forEach(function (element) {
|
||||
EventHandler.on(element, 'mouseover', noop());
|
||||
});
|
||||
}
|
||||
|
|
@ -588,12 +581,12 @@
|
|||
_this._hoverState = null;
|
||||
EventHandler.trigger(_this.element, _this.constructor.Event.SHOWN);
|
||||
|
||||
if (prevHoverState === HoverState.OUT) {
|
||||
if (prevHoverState === HOVER_STATE_OUT) {
|
||||
_this._leave(null, _this);
|
||||
}
|
||||
};
|
||||
|
||||
if (this.tip.classList.contains(ClassName.FADE)) {
|
||||
if (this.tip.classList.contains(CLASS_NAME_FADE)) {
|
||||
var transitionDuration = getTransitionDurationFromElement(this.tip);
|
||||
EventHandler.one(this.tip, TRANSITION_END, complete);
|
||||
emulateTransitionEnd(this.tip, transitionDuration);
|
||||
|
|
@ -609,7 +602,7 @@
|
|||
var tip = this.getTipElement();
|
||||
|
||||
var complete = function complete() {
|
||||
if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
|
||||
if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
|
||||
tip.parentNode.removeChild(tip);
|
||||
}
|
||||
|
||||
|
|
@ -628,20 +621,22 @@
|
|||
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
|
||||
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
||||
this._activeTrigger[Trigger.CLICK] = false;
|
||||
this._activeTrigger[Trigger.FOCUS] = false;
|
||||
this._activeTrigger[Trigger.HOVER] = false;
|
||||
this._activeTrigger[TRIGGER_CLICK] = false;
|
||||
this._activeTrigger[TRIGGER_FOCUS] = 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);
|
||||
EventHandler.one(tip, TRANSITION_END, complete);
|
||||
emulateTransitionEnd(tip, transitionDuration);
|
||||
|
|
@ -676,9 +671,9 @@
|
|||
|
||||
_proto.setContent = function setContent() {
|
||||
var tip = this.getTipElement();
|
||||
this.setElementContent(SelectorEngine.findOne(Selector.TOOLTIP_INNER, tip), this.getTitle());
|
||||
tip.classList.remove(ClassName.FADE);
|
||||
tip.classList.remove(ClassName.SHOW);
|
||||
this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
|
||||
tip.classList.remove(CLASS_NAME_FADE);
|
||||
tip.classList.remove(CLASS_NAME_SHOW);
|
||||
};
|
||||
|
||||
_proto.setElementContent = function setElementContent(element, content) {
|
||||
|
|
@ -801,9 +796,9 @@
|
|||
EventHandler.on(_this5.element, _this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
|
||||
return _this5.toggle(event);
|
||||
});
|
||||
} else if (trigger !== Trigger.MANUAL) {
|
||||
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;
|
||||
} else if (trigger !== TRIGGER_MANUAL) {
|
||||
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;
|
||||
EventHandler.on(_this5.element, eventIn, _this5.config.selector, function (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) {
|
||||
this.config = _objectSpread2({}, this.config, {
|
||||
|
|
@ -850,16 +845,16 @@
|
|||
}
|
||||
|
||||
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) {
|
||||
context._hoverState = HoverState.SHOW;
|
||||
if (context.getTipElement().classList.contains(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
|
||||
context._hoverState = HOVER_STATE_SHOW;
|
||||
return;
|
||||
}
|
||||
|
||||
clearTimeout(context._timeout);
|
||||
context._hoverState = HoverState.SHOW;
|
||||
context._hoverState = HOVER_STATE_SHOW;
|
||||
|
||||
if (!context.config.delay || !context.config.delay.show) {
|
||||
context.show();
|
||||
|
|
@ -867,7 +862,7 @@
|
|||
}
|
||||
|
||||
context._timeout = setTimeout(function () {
|
||||
if (context._hoverState === HoverState.SHOW) {
|
||||
if (context._hoverState === HOVER_STATE_SHOW) {
|
||||
context.show();
|
||||
}
|
||||
}, context.config.delay.show);
|
||||
|
|
@ -883,7 +878,7 @@
|
|||
}
|
||||
|
||||
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()) {
|
||||
|
|
@ -891,7 +886,7 @@
|
|||
}
|
||||
|
||||
clearTimeout(context._timeout);
|
||||
context._hoverState = HoverState.OUT;
|
||||
context._hoverState = HOVER_STATE_OUT;
|
||||
|
||||
if (!context.config.delay || !context.config.delay.hide) {
|
||||
context.hide();
|
||||
|
|
@ -899,7 +894,7 @@
|
|||
}
|
||||
|
||||
context._timeout = setTimeout(function () {
|
||||
if (context._hoverState === HoverState.OUT) {
|
||||
if (context._hoverState === HOVER_STATE_OUT) {
|
||||
context.hide();
|
||||
}
|
||||
}, context.config.delay.hide);
|
||||
|
|
@ -971,7 +966,7 @@
|
|||
var tip = this.getTipElement();
|
||||
var tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);
|
||||
|
||||
if (tabClass !== null && tabClass.length) {
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
tabClass.map(function (token) {
|
||||
return token.trim();
|
||||
}).forEach(function (tClass) {
|
||||
|
|
@ -997,7 +992,7 @@
|
|||
return;
|
||||
}
|
||||
|
||||
tip.classList.remove(ClassName.FADE);
|
||||
tip.classList.remove(CLASS_NAME_FADE);
|
||||
this.config.animation = false;
|
||||
this.hide();
|
||||
this.show();
|
||||
|
|
@ -1056,7 +1051,7 @@
|
|||
}, {
|
||||
key: "Event",
|
||||
get: function get() {
|
||||
return Event;
|
||||
return Event$1;
|
||||
}
|
||||
}, {
|
||||
key: "EVENT_KEY",
|
||||
|
|
|
|||
BIN
js/dist/tooltip.js.map
vendored
BIN
js/dist/tooltip.js.map
vendored
Binary file not shown.
|
|
@ -118,7 +118,7 @@ class Carousel {
|
|||
this._element = element
|
||||
this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element)
|
||||
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0
|
||||
this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent)
|
||||
this._pointerEvent = Boolean(window.PointerEvent)
|
||||
|
||||
this._addEventListeners()
|
||||
Data.setData(element, DATA_KEY, this)
|
||||
|
|
@ -478,13 +478,10 @@ class Carousel {
|
|||
|
||||
EventHandler
|
||||
.one(activeElement, TRANSITION_END, () => {
|
||||
nextElement.classList.remove(directionalClassName)
|
||||
nextElement.classList.remove(orderClassName)
|
||||
nextElement.classList.remove(directionalClassName, orderClassName)
|
||||
nextElement.classList.add(CLASS_NAME_ACTIVE)
|
||||
|
||||
activeElement.classList.remove(CLASS_NAME_ACTIVE)
|
||||
activeElement.classList.remove(orderClassName)
|
||||
activeElement.classList.remove(directionalClassName)
|
||||
activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName)
|
||||
|
||||
this._isSliding = false
|
||||
|
||||
|
|
|
|||
|
|
@ -192,8 +192,7 @@ class Collapse {
|
|||
|
||||
const complete = () => {
|
||||
this._element.classList.remove(CLASS_NAME_COLLAPSING)
|
||||
this._element.classList.add(CLASS_NAME_COLLAPSE)
|
||||
this._element.classList.add(CLASS_NAME_SHOW)
|
||||
this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)
|
||||
|
||||
this._element.style[dimension] = ''
|
||||
|
||||
|
|
@ -230,8 +229,7 @@ class Collapse {
|
|||
reflow(this._element)
|
||||
|
||||
this._element.classList.add(CLASS_NAME_COLLAPSING)
|
||||
this._element.classList.remove(CLASS_NAME_COLLAPSE)
|
||||
this._element.classList.remove(CLASS_NAME_SHOW)
|
||||
this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)
|
||||
|
||||
const triggerArrayLength = this._triggerArray.length
|
||||
if (triggerArrayLength > 0) {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}`
|
|||
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_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_BACKDROP = 'modal-backdrop'
|
||||
const CLASS_NAME_OPEN = 'modal-open'
|
||||
|
|
@ -249,11 +248,10 @@ class Modal {
|
|||
this._element.style.display = 'block'
|
||||
this._element.removeAttribute('aria-hidden')
|
||||
this._element.setAttribute('aria-modal', true)
|
||||
this._element.scrollTop = 0
|
||||
|
||||
if (this._dialog.classList.contains(CLASS_NAME_SCROLLABLE) && modalBody) {
|
||||
if (modalBody) {
|
||||
modalBody.scrollTop = 0
|
||||
} else {
|
||||
this._element.scrollTop = 0
|
||||
}
|
||||
|
||||
if (transition) {
|
||||
|
|
|
|||
|
|
@ -113,8 +113,7 @@ class Popover extends Tooltip {
|
|||
|
||||
this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content)
|
||||
|
||||
tip.classList.remove(CLASS_NAME_FADE)
|
||||
tip.classList.remove(CLASS_NAME_SHOW)
|
||||
tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)
|
||||
}
|
||||
|
||||
_addAttachmentClass(attachment) {
|
||||
|
|
|
|||
|
|
@ -400,8 +400,7 @@ class Tooltip {
|
|||
setContent() {
|
||||
const tip = this.getTipElement()
|
||||
this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle())
|
||||
tip.classList.remove(CLASS_NAME_FADE)
|
||||
tip.classList.remove(CLASS_NAME_SHOW)
|
||||
tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)
|
||||
}
|
||||
|
||||
setElementContent(element, content) {
|
||||
|
|
@ -421,7 +420,7 @@ class Tooltip {
|
|||
element.appendChild(content)
|
||||
}
|
||||
} else {
|
||||
element.innerText = content.textContent
|
||||
element.textContent = content.textContent
|
||||
}
|
||||
|
||||
return
|
||||
|
|
@ -434,7 +433,7 @@ class Tooltip {
|
|||
|
||||
element.innerHTML = content
|
||||
} else {
|
||||
element.innerText = content
|
||||
element.textContent = content
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,21 +25,21 @@
|
|||
</ol>
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item">
|
||||
<img class="d-block w-100" data-src="holder.js/800x400?auto=yes&bg=777&fg=555&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">
|
||||
<h5>First slide label</h5>
|
||||
<p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item active">
|
||||
<img class="d-block w-100" data-src="holder.js/800x400?auto=yes&bg=666&fg=444&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">
|
||||
<h5>Second slide label</h5>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
<img class="d-block w-100" data-src="holder.js/800x400?auto=yes&bg=555&fg=333&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">
|
||||
<h5>Third slide label</h5>
|
||||
<p>Praesent commodo cursus magna, vel scelerisque nisl consectetur.</p>
|
||||
|
|
|
|||
|
|
@ -5,12 +5,11 @@ import EventHandler from '../../src/dom/event-handler'
|
|||
import { getFixture, clearFixture, createEvent, jQueryMock } from '../helpers/fixture'
|
||||
|
||||
describe('Carousel', () => {
|
||||
const { Simulator, PointerEvent, MSPointerEvent } = window
|
||||
const originWinPointerEvent = PointerEvent || MSPointerEvent
|
||||
const supportPointerEvent = Boolean(PointerEvent || MSPointerEvent)
|
||||
const { Simulator, PointerEvent } = window
|
||||
const originWinPointerEvent = PointerEvent
|
||||
const supportPointerEvent = Boolean(PointerEvent)
|
||||
|
||||
window.MSPointerEvent = null
|
||||
const cssStyleCarousel = '.carousel.pointer-event { -ms-touch-action: none; touch-action: none; }'
|
||||
const cssStyleCarousel = '.carousel.pointer-event { touch-action: none; }'
|
||||
|
||||
const stylesCarousel = document.createElement('style')
|
||||
stylesCarousel.type = 'text/css'
|
||||
|
|
|
|||
|
|
@ -382,10 +382,29 @@ describe('Modal', () => {
|
|||
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 = [
|
||||
'<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>',
|
||||
'</div>'
|
||||
|
|
@ -403,25 +422,6 @@ describe('Modal', () => {
|
|||
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 => {
|
||||
fixtureEl.innerHTML = '<div class="modal fade"><div class="modal-dialog" /></div>'
|
||||
|
||||
|
|
|
|||
|
|
@ -129,8 +129,8 @@ describe('Tab', () => {
|
|||
it('should not fire shown when tab is already active', done => {
|
||||
fixtureEl.innerHTML = [
|
||||
'<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"><a href="#profile" class="nav-link" role="tab">Profile</a></li>',
|
||||
' <li class="nav-item" role="presentation"><a href="#home" class="nav-link active" role="tab">Home</a></li>',
|
||||
' <li class="nav-item" role="presentation"><a href="#profile" class="nav-link" role="tab">Profile</a></li>',
|
||||
'</ul>',
|
||||
'<div class="tab-content">',
|
||||
' <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 => {
|
||||
fixtureEl.innerHTML = [
|
||||
'<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"><a href="#profile" class="nav-link disabled" role="tab">Profile</a></li>',
|
||||
' <li class="nav-item" role="presentation"><a href="#home" class="nav-link active" role="tab">Home</a></li>',
|
||||
' <li class="nav-item" role="presentation"><a href="#profile" class="nav-link disabled" role="tab">Profile</a></li>',
|
||||
'</ul>',
|
||||
'<div class="tab-content">',
|
||||
' <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 => {
|
||||
fixtureEl.innerHTML = [
|
||||
'<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"><a id="triggerProfile" href="#profile" class="nav-link" role="tab">Profile</a></li>',
|
||||
' <li class="nav-item" role="presentation"><a href="#home" class="nav-link active" role="tab">Home</a></li>',
|
||||
' <li class="nav-item" role="presentation"><a id="triggerProfile" href="#profile" class="nav-link" role="tab">Profile</a></li>',
|
||||
'</ul>',
|
||||
'<div class="tab-content">',
|
||||
' <div class="tab-pane active" id="home" role="tabpanel"></div>',
|
||||
|
|
@ -275,17 +275,17 @@ describe('Tab', () => {
|
|||
it('should handle removed tabs', done => {
|
||||
fixtureEl.innerHTML = [
|
||||
'<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">',
|
||||
' <button class="close"><span aria-hidden="true">×</span></button>',
|
||||
' </a>',
|
||||
' </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">',
|
||||
' <button class="close"><span aria-hidden="true">×</span></button>',
|
||||
' </a>',
|
||||
' </li>',
|
||||
' <li class="nav-item">',
|
||||
' <li class="nav-item" role="presentation">',
|
||||
' <a class="nav-link nav-tab" href="#references" role="tab" data-toggle="tab">',
|
||||
' <button id="btnClose" class="close"><span aria-hidden="true">×</span></button>',
|
||||
' </a>',
|
||||
|
|
@ -418,8 +418,8 @@ describe('Tab', () => {
|
|||
it('should create dynamically a tab', done => {
|
||||
fixtureEl.innerHTML = [
|
||||
'<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"><a id="triggerProfile" data-toggle="tab" href="#profile" class="nav-link" role="tab">Profile</a></li>',
|
||||
' <li class="nav-item" role="presentation"><a href="#home" class="nav-link active" role="tab">Home</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>',
|
||||
'<div class="tab-content">',
|
||||
' <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 => {
|
||||
fixtureEl.innerHTML = [
|
||||
'<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"><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-home" href="#home" class="nav-link" data-toggle="tab" role="tab">Home</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>',
|
||||
'<div class="tab-content">',
|
||||
' <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 => {
|
||||
fixtureEl.innerHTML = [
|
||||
'<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>',
|
||||
' </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>',
|
||||
' </li>',
|
||||
'</ul>',
|
||||
|
|
@ -567,10 +567,10 @@ describe('Tab', () => {
|
|||
it('should add show class to tab panes if there is a `.fade` class', done => {
|
||||
fixtureEl.innerHTML = [
|
||||
'<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>',
|
||||
' </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>',
|
||||
' </li>',
|
||||
'</ul>',
|
||||
|
|
|
|||
|
|
@ -913,7 +913,7 @@ describe('Tooltip', () => {
|
|||
|
||||
tooltip.setElementContent(tooltip.getTipElement(), 'test')
|
||||
|
||||
expect(tooltip.getTipElement().innerText).toEqual('test')
|
||||
expect(tooltip.getTipElement().textContent).toEqual('test')
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<h1>Collapse <small>Bootstrap Visual Test</small></h1>
|
||||
|
||||
<div id="accordion" role="tablist">
|
||||
<div class="card">
|
||||
<div class="card" role="presentation">
|
||||
<div class="card-header" role="tab" id="headingOne">
|
||||
<h5 class="mb-0">
|
||||
<a data-toggle="collapse" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card" role="presentation">
|
||||
<div class="card-header" role="tab" id="headingTwo">
|
||||
<h5 class="mb-0">
|
||||
<a class="collapsed" data-toggle="collapse" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card" role="presentation">
|
||||
<div class="card-header" role="tab" id="headingThree">
|
||||
<h5 class="mb-0">
|
||||
<a class="collapsed" data-toggle="collapse" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card" role="presentation">
|
||||
<div class="card-header" role="tab" id="headingFour">
|
||||
<h5 class="mb-0">
|
||||
<a class="collapsed" data-toggle="collapse" href="#collapseFour" aria-expanded="false" aria-controls="collapseFour">
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@
|
|||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="dropdown" data-toggle="dropdown" aria-expanded="false">Dropdown</a>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdown">
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</div>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdown">
|
||||
<li><a class="dropdown-item" href="#">Action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Another action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Something else here</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
@ -51,11 +51,11 @@
|
|||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="dropdown2" data-toggle="dropdown" aria-expanded="false">Dropdown</a>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdown2">
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</div>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdown2">
|
||||
<li><a class="dropdown-item" href="#">Action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Another action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Something else here</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -72,20 +72,20 @@
|
|||
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
|
||||
<span class="sr-only">Dropup split</span>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</div>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#">Action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Another action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Something else here</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="btn-group dropup">
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-expanded="false">Dropup</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</div>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#">Action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Another action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Something else here</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
|
|
@ -173,11 +173,11 @@
|
|||
<div class="col-sm-3 mt-4">
|
||||
<div class="btn-group dropdown">
|
||||
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" data-offset="10,20">Dropdown offset</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</div>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#">Action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Another action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Something else here</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<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">
|
||||
<span class="sr-only">Dropdown split</span>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</div>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" href="#">Action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Another action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Something else here</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<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">
|
||||
Dropdown menu without Popper.js
|
||||
</button>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</div>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
||||
<li><a class="dropdown-item" href="#">Action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Another action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Something else here</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
<div id="accordion" role="tablist">
|
||||
<div class="card">
|
||||
<div class="card" role="presentation">
|
||||
<div class="card-header" role="tab" id="headingOne">
|
||||
<h5 class="mb-0">
|
||||
<a data-toggle="collapse" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card" role="presentation">
|
||||
<div class="card-header" role="tab" id="headingTwo">
|
||||
<h5 class="mb-0">
|
||||
<a class="collapsed" data-toggle="collapse" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card" role="presentation">
|
||||
<div class="card-header" role="tab" id="headingThree">
|
||||
<h5 class="mb-0">
|
||||
<a class="collapsed" data-toggle="collapse" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
|
||||
|
|
|
|||
|
|
@ -25,11 +25,11 @@
|
|||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="dropdown" data-toggle="dropdown" aria-expanded="false">Dropdown</a>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdown">
|
||||
<a class="dropdown-item" href="#one">One</a>
|
||||
<a class="dropdown-item" href="#two">Two</a>
|
||||
<a class="dropdown-item" href="#three">Three</a>
|
||||
</div>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdown">
|
||||
<li><a class="dropdown-item" href="#one">One</a></li>
|
||||
<li><a class="dropdown-item" href="#two">Two</a></li>
|
||||
<li><a class="dropdown-item" href="#three">Three</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#final">Final</a>
|
||||
|
|
|
|||
|
|
@ -18,18 +18,17 @@
|
|||
<h4>Tabs without fade</h4>
|
||||
|
||||
<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>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" data-toggle="tab" href="#profile" role="tab">Profile</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="dropdown" data-toggle="dropdown" aria-expanded="false">Dropdown</a>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdown">
|
||||
<a class="dropdown-item" data-toggle="tab" href="#fat" role="tab">@fat</a>
|
||||
<a class="dropdown-item" data-toggle="tab" href="#mdo" role="tab">@mdo</a>
|
||||
</div>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" data-toggle="tab" href="#fat" role="tab">@fat</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" data-toggle="tab" href="#mdo" role="tab">@mdo</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -55,18 +54,17 @@
|
|||
<h4>Tabs with fade</h4>
|
||||
|
||||
<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>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" data-toggle="tab" href="#profile2" role="tab">Profile</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="dropdown2" data-toggle="dropdown" aria-expanded="false">Dropdown</a>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdown2">
|
||||
<a class="dropdown-item" data-toggle="tab" href="#fat2" role="tab">@fat</a>
|
||||
<a class="dropdown-item" data-toggle="tab" href="#mdo2" role="tab">@mdo</a>
|
||||
</div>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" data-toggle="tab" href="#fat2" role="tab">@fat</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" data-toggle="tab" href="#mdo2" role="tab">@mdo</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -92,18 +90,17 @@
|
|||
<h4>Tabs without fade (no initially active pane)</h4>
|
||||
|
||||
<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>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" data-toggle="tab" href="#profile3" role="tab">Profile</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="dropdown3" data-toggle="dropdown" aria-expanded="false">Dropdown</a>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdown3">
|
||||
<a class="dropdown-item" data-toggle="tab" href="#fat3" role="tab">@fat</a>
|
||||
<a class="dropdown-item" data-toggle="tab" href="#mdo3" role="tab">@mdo</a>
|
||||
</div>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" data-toggle="tab" href="#fat3" role="tab">@fat</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" data-toggle="tab" href="#mdo3" role="tab">@mdo</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -129,18 +126,17 @@
|
|||
<h4>Tabs with fade (no initially active pane)</h4>
|
||||
|
||||
<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>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" data-toggle="tab" href="#profile4" role="tab">Profile</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="dropdown4" data-toggle="dropdown" aria-expanded="false">Dropdown</a>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdown4">
|
||||
<a class="dropdown-item" data-toggle="tab" href="#fat4" role="tab">@fat</a>
|
||||
<a class="dropdown-item" data-toggle="tab" href="#mdo4" role="tab">@mdo</a>
|
||||
</div>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" data-toggle="tab" href="#fat4" role="tab">@fat</a>
|
||||
</li>
|
||||
<li class="nav-item" role="presentation">
|
||||
<a class="nav-link" data-toggle="tab" href="#mdo4" role="tab">@mdo</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
|
@ -169,10 +165,10 @@
|
|||
<a class="nav-link nav-item" data-toggle="tab" href="#profile5">Profile</a>
|
||||
<div class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="dropdown5" data-toggle="dropdown" aria-expanded="false">Dropdown</a>
|
||||
<div class="dropdown-menu" aria-labelledby="dropdown5">
|
||||
<a class="dropdown-item" data-toggle="tab" href="#fat5">@fat</a>
|
||||
<a class="dropdown-item" data-toggle="tab" href="#mdo5">@mdo</a>
|
||||
</div>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdown5">
|
||||
<li><a class="dropdown-item" data-toggle="tab" href="#fat5">@fat</a></li>
|
||||
<li><a class="dropdown-item" data-toggle="tab" href="#mdo5">@mdo</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="nav-link nav-item disabled" href="#">Disabled</a>
|
||||
</nav>
|
||||
|
|
|
|||
2659
package-lock.json
generated
2659
package-lock.json
generated
File diff suppressed because it is too large
Load diff
32
package.json
32
package.json
|
|
@ -19,7 +19,7 @@
|
|||
],
|
||||
"scripts": {
|
||||
"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-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-*",
|
||||
|
|
@ -92,24 +92,24 @@
|
|||
"devDependencies": {
|
||||
"@babel/cli": "^7.8.4",
|
||||
"@babel/core": "^7.9.0",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.9.0",
|
||||
"@babel/preset-env": "^7.9.0",
|
||||
"@rollup/plugin-commonjs": "^11.0.2",
|
||||
"@rollup/plugin-node-resolve": "^7.1.1",
|
||||
"autoprefixer": "^9.7.5",
|
||||
"bundlesize": "^0.18.0",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.9.5",
|
||||
"@babel/preset-env": "^7.9.5",
|
||||
"@rollup/plugin-commonjs": "^11.1.0",
|
||||
"@rollup/plugin-node-resolve": "^7.1.3",
|
||||
"autoprefixer": "^9.7.6",
|
||||
"bundlewatch": "^0.2.6",
|
||||
"clean-css-cli": "^4.3.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-xo": "^0.29.1",
|
||||
"eslint-plugin-import": "^2.20.1",
|
||||
"eslint-plugin-unicorn": "^17.2.0",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
"eslint-plugin-unicorn": "^18.0.1",
|
||||
"find-unused-sass-variables": "^1.0.5",
|
||||
"glob": "^7.1.6",
|
||||
"hammer-simulator": "0.0.1",
|
||||
"hugo-bin": "^0.56.3",
|
||||
"hugo-bin": "^0.57.0",
|
||||
"ip": "^1.1.5",
|
||||
"karma": "^4.4.1",
|
||||
"karma": "^5.0.1",
|
||||
"karma-browserstack-launcher": "1.4.0",
|
||||
"karma-chrome-launcher": "^3.1.0",
|
||||
"karma-coverage-istanbul-reporter": "^2.1.1",
|
||||
|
|
@ -118,21 +118,21 @@
|
|||
"karma-jasmine": "^3.1.1",
|
||||
"karma-jasmine-html-reporter": "^1.5.3",
|
||||
"karma-rollup-preprocessor": "^7.0.5",
|
||||
"linkinator": "^2.0.4",
|
||||
"linkinator": "^2.0.6",
|
||||
"lockfile-lint": "^4.2.2",
|
||||
"node-sass": "^4.13.1",
|
||||
"nodemon": "^2.0.2",
|
||||
"nodemon": "^2.0.3",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"popper.js": "^1.16.0",
|
||||
"postcss-cli": "^7.1.0",
|
||||
"rollup": "^2.2.0",
|
||||
"rollup": "^2.6.1",
|
||||
"rollup-plugin-babel": "^4.4.0",
|
||||
"rollup-plugin-istanbul": "^2.0.1",
|
||||
"serve": "^11.3.0",
|
||||
"shelljs": "^0.8.3",
|
||||
"stylelint": "^13.2.1",
|
||||
"stylelint": "^13.3.2",
|
||||
"stylelint-config-twbs-bootstrap": "^2.0.1",
|
||||
"terser": "^4.6.7",
|
||||
"terser": "^4.6.11",
|
||||
"vnu-jar": "20.3.16"
|
||||
},
|
||||
"files": [
|
||||
|
|
|
|||
|
|
@ -40,8 +40,7 @@
|
|||
}
|
||||
|
||||
|
||||
// Alternate styles
|
||||
//
|
||||
// scss-docs-start alert-modifiers
|
||||
// Generate contextual modifier classes for colorizing the alert.
|
||||
|
||||
@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));
|
||||
}
|
||||
}
|
||||
// scss-docs-end alert-modifiers
|
||||
|
|
|
|||
|
|
@ -149,8 +149,6 @@
|
|||
.btn-group-toggle {
|
||||
> .btn,
|
||||
> .btn-group > .btn {
|
||||
margin-bottom: 0; // Override default `<label>` value
|
||||
|
||||
input[type="radio"],
|
||||
input[type="checkbox"] {
|
||||
position: absolute;
|
||||
|
|
|
|||
|
|
@ -19,15 +19,18 @@
|
|||
margin-left: 0;
|
||||
}
|
||||
|
||||
> .list-group:first-child {
|
||||
.list-group-item:first-child {
|
||||
@include border-top-radius($card-border-radius);
|
||||
}
|
||||
}
|
||||
> .list-group {
|
||||
border-top: inherit;
|
||||
border-bottom: inherit;
|
||||
|
||||
> .list-group:last-child {
|
||||
.list-group-item:last-child {
|
||||
@include border-bottom-radius($card-border-radius);
|
||||
&:first-child {
|
||||
border-top-width: 0;
|
||||
@include border-top-radius($card-inner-border-radius);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-bottom-width: 0;
|
||||
@include border-bottom-radius($card-inner-border-radius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -87,6 +90,7 @@
|
|||
|
||||
.card-footer {
|
||||
padding: $card-cap-padding-y $card-cap-padding-x;
|
||||
color: $card-cap-color;
|
||||
background-color: $card-cap-bg;
|
||||
border-top: $card-border-width solid $card-border-color;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
@include box-shadow($dropdown-box-shadow);
|
||||
}
|
||||
|
||||
// scss-docs-start responsive-breakpoints
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
$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)
|
||||
// Just add .dropup after the standard .dropdown class and you're set.
|
||||
|
|
|
|||
|
|
@ -128,12 +128,14 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
|
|||
}
|
||||
|
||||
// Request a color level
|
||||
// scss-docs-start color-level
|
||||
@function color-level($color: $primary, $level: 0) {
|
||||
$color-base: if($level > 0, $black, $white);
|
||||
$level: abs($level);
|
||||
|
||||
@return mix($color-base, $color, $level * $theme-color-interval);
|
||||
}
|
||||
// scss-docs-end color-level
|
||||
|
||||
@function tint-color($color, $level) {
|
||||
@return mix(white, $color, $level * $theme-color-interval);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
//
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
// No need to set list-style: none; since .list-group-item is block level
|
||||
padding-left: 0; // reset padding because ul and ol
|
||||
margin-bottom: 0;
|
||||
@include border-radius($list-group-border-radius);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -46,18 +47,17 @@
|
|||
position: relative;
|
||||
display: block;
|
||||
padding: $list-group-item-padding-y $list-group-item-padding-x;
|
||||
margin-bottom: 0; // for <label> variations
|
||||
color: $list-group-color;
|
||||
text-decoration: if($link-decoration == none, null, none);
|
||||
background-color: $list-group-bg;
|
||||
border: $list-group-border-width solid $list-group-border-color;
|
||||
|
||||
&:first-child {
|
||||
@include border-top-radius($list-group-border-radius);
|
||||
@include border-top-radius(inherit);
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
@include border-bottom-radius($list-group-border-radius);
|
||||
@include border-bottom-radius(inherit);
|
||||
}
|
||||
|
||||
&.disabled,
|
||||
|
|
@ -133,29 +133,25 @@
|
|||
// useful within other components (e.g., cards).
|
||||
|
||||
.list-group-flush {
|
||||
@include border-radius(0);
|
||||
|
||||
.list-group-item {
|
||||
border-right-width: 0;
|
||||
border-left-width: 0;
|
||||
@include border-radius(0);
|
||||
border-width: 0 0 $list-group-border-width;
|
||||
|
||||
&:first-child {
|
||||
border-top-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
.list-group-item:last-child {
|
||||
&:last-child {
|
||||
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.
|
||||
// Organizationally, this must come after the `:hover` states.
|
||||
|
||||
@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
|
||||
|
|
|
|||
|
|
@ -62,11 +62,6 @@
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
.modal-header,
|
||||
.modal-footer {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
|
@ -115,6 +110,7 @@
|
|||
// Top section of the modal w/ title and dismiss
|
||||
.modal-header {
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
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
|
||||
padding: $modal-header-padding;
|
||||
|
|
@ -148,6 +144,7 @@
|
|||
.modal-footer {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
flex-shrink: 0;
|
||||
align-items: center; // vertically center
|
||||
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;
|
||||
|
|
@ -204,3 +201,35 @@
|
|||
@include media-breakpoint-up(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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
display: block;
|
||||
padding: $nav-link-padding-y $nav-link-padding-x;
|
||||
text-decoration: if($link-decoration == none, null, none);
|
||||
@include transition($nav-link-transition);
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
|
|
|
|||
|
|
@ -57,11 +57,12 @@
|
|||
padding-bottom: $navbar-brand-padding-y;
|
||||
margin-right: $navbar-brand-margin-right;
|
||||
@include font-size($navbar-brand-font-size);
|
||||
text-decoration: if($link-decoration == none, null, none);
|
||||
white-space: nowrap;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
text-decoration: none;
|
||||
text-decoration: if($link-hover-decoration == underline, none, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ pre,
|
|||
code,
|
||||
kbd,
|
||||
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.
|
||||
}
|
||||
|
||||
|
|
@ -381,7 +381,6 @@ th {
|
|||
|
||||
label {
|
||||
display: inline-block; // 1
|
||||
margin-bottom: $label-margin-bottom;
|
||||
}
|
||||
|
||||
// Remove the default `border-radius` that macOS Chrome adds.
|
||||
|
|
@ -467,19 +466,6 @@ button,
|
|||
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.
|
||||
|
||||
textarea {
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -174,23 +174,14 @@
|
|||
// Generate series of `.table-responsive-*` classes for configuring the screen
|
||||
// size of where your table will overflow.
|
||||
|
||||
.table-responsive {
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
$next: breakpoint-next($breakpoint, $grid-breakpoints);
|
||||
$infix: breakpoint-infix($next, $grid-breakpoints);
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
$next: breakpoint-next($breakpoint, $grid-breakpoints);
|
||||
$infix: breakpoint-infix($next, $grid-breakpoints);
|
||||
|
||||
&#{$infix} {
|
||||
@include media-breakpoint-down($breakpoint) {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
// Prevent double border on horizontal scroll due to use of `display: block;`
|
||||
> .table-bordered {
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
@include media-breakpoint-down($breakpoint) {
|
||||
.table-responsive#{$infix} {
|
||||
overflow-x: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ $utilities: map-merge(
|
|||
"font-family": (
|
||||
property: font-family,
|
||||
class: font,
|
||||
values: (monospace: $font-family-monospace)
|
||||
values: (monospace: var(--font-family-monospace))
|
||||
),
|
||||
"user-select": (
|
||||
property: user-select,
|
||||
|
|
|
|||
|
|
@ -320,13 +320,13 @@ $border-width: 1px !default;
|
|||
$border-color: $gray-300 !default;
|
||||
|
||||
$border-radius: .25rem !default;
|
||||
$border-radius-lg: .3rem !default;
|
||||
$border-radius-sm: .2rem !default;
|
||||
$border-radius-lg: .3rem !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-sm: 0 .125rem .25rem rgba($black, .075) !default;
|
||||
$box-shadow-lg: 0 1rem 3rem rgba($black, .175) !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-collapse: height .35s ease !default;
|
||||
|
||||
// scss-docs-start embed-responsive-aspect-ratios
|
||||
$embed-responsive-aspect-ratios: (
|
||||
"21by9": (
|
||||
x: 21,
|
||||
|
|
@ -359,6 +360,7 @@ $embed-responsive-aspect-ratios: (
|
|||
y: 1
|
||||
)
|
||||
) !default;
|
||||
// scss-docs-end embed-responsive-aspect-ratios
|
||||
|
||||
// Typography
|
||||
//
|
||||
|
|
@ -367,15 +369,15 @@ $embed-responsive-aspect-ratios: (
|
|||
// 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-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
|
||||
|
||||
// $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-root: null !default;
|
||||
$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-lg: $font-size-base * 1.25 !default;
|
||||
|
||||
$font-weight-lighter: lighter !default;
|
||||
$font-weight-light: 300 !default;
|
||||
|
|
@ -386,8 +388,8 @@ $font-weight-bolder: bolder !default;
|
|||
$font-weight-base: $font-weight-normal !default;
|
||||
|
||||
$line-height-base: 1.5 !default;
|
||||
$line-height-lg: 2 !default;
|
||||
$line-height-sm: 1.25 !default;
|
||||
$line-height-lg: 2 !default;
|
||||
|
||||
$h1-font-size: $font-size-base * 2.5 !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
|
||||
$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-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;
|
||||
|
||||
|
||||
// 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-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-border-radius: $border-radius !default;
|
||||
$input-border-radius-lg: $border-radius-lg !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-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-label-color: 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;
|
||||
|
||||
|
|
@ -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-size: contain !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-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: 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: (
|
||||
"valid": (
|
||||
"color": $form-feedback-valid-color,
|
||||
|
|
@ -780,6 +786,7 @@ $form-validation-states: (
|
|||
"icon": $form-feedback-icon-invalid
|
||||
)
|
||||
) !default;
|
||||
// scss-docs-end form-validation-states
|
||||
|
||||
// Z-index master list
|
||||
//
|
||||
|
|
@ -799,6 +806,7 @@ $zindex-tooltip: 1070 !default;
|
|||
|
||||
$nav-link-padding-y: .5rem !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-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: $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-md: 500px !default;
|
||||
$modal-lg: 800px !default;
|
||||
$modal-xl: 1140px !default;
|
||||
|
||||
$modal-fade-transform: translate(0, -50px) !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-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-active-color: $component-active-color !default;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
border: $form-check-input-border;
|
||||
appearance: none;
|
||||
color-adjust: exact; // Keep themed appearance for print
|
||||
@include transition($form-check-transition);
|
||||
|
||||
&[type="checkbox"] {
|
||||
@include border-radius($form-check-input-border-radius);
|
||||
|
|
@ -99,7 +100,6 @@
|
|||
}
|
||||
|
||||
.form-check-label {
|
||||
margin-bottom: 0;
|
||||
color: $form-check-label-color;
|
||||
cursor: $form-check-label-cursor;
|
||||
}
|
||||
|
|
@ -120,9 +120,6 @@
|
|||
background-size: $form-switch-bg-size; // Get a 1px separation
|
||||
@include border-radius($form-switch-border-radius);
|
||||
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 {
|
||||
background-image: escape-svg($form-switch-focus-bg-image);
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
background-color: $input-bg;
|
||||
background-clip: padding-box;
|
||||
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.
|
||||
@include border-radius($input-border-radius, 0);
|
||||
|
|
@ -28,10 +29,10 @@
|
|||
background-color: $input-focus-bg;
|
||||
border-color: $input-focus-border-color;
|
||||
outline: 0;
|
||||
// Avoid using mixin so we can pass custom focus shadow properly
|
||||
@if $enable-shadows {
|
||||
box-shadow: $input-box-shadow, $input-focus-box-shadow;
|
||||
@include box-shadow($input-box-shadow, $input-focus-box-shadow);
|
||||
} @else {
|
||||
// Avoid using mixin so we can pass custom focus shadow properly
|
||||
box-shadow: $input-focus-box-shadow;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,8 +28,9 @@
|
|||
border-color: $form-select-focus-border-color;
|
||||
outline: 0;
|
||||
@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 {
|
||||
// Avoid using mixin so we can pass custom focus shadow properly
|
||||
box-shadow: $form-select-focus-box-shadow;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
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
|
||||
font-weight: $font-weight-normal;
|
||||
line-height: $input-line-height;
|
||||
|
|
|
|||
|
|
@ -2,14 +2,25 @@
|
|||
// 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)
|
||||
// text to align with the form controls.
|
||||
.col-form-label {
|
||||
padding-top: 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
|
||||
font-style: $form-label-font-style;
|
||||
font-weight: $form-label-font-weight;
|
||||
line-height: $input-line-height;
|
||||
color: $form-label-color;
|
||||
}
|
||||
|
||||
.col-form-label-lg {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
|
||||
// server-side validation.
|
||||
|
||||
// scss-docs-start form-validation-states-loop
|
||||
@each $state, $data in $form-validation-states {
|
||||
@include form-validation-state($state, map-get($data, color), map-get($data, icon));
|
||||
}
|
||||
// scss-docs-end form-validation-states-loop
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@
|
|||
color: $hover-color;
|
||||
@include gradient-bg($hover-background);
|
||||
border-color: $hover-border;
|
||||
// Avoid using mixin so we can pass custom focus shadow properly
|
||||
@if $enable-shadows {
|
||||
box-shadow: $btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
|
||||
@include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
|
||||
} @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);
|
||||
}
|
||||
}
|
||||
|
|
@ -48,10 +48,10 @@
|
|||
border-color: $active-border;
|
||||
|
||||
&:focus {
|
||||
// Avoid using mixin so we can pass custom focus shadow properly
|
||||
@if $enable-shadows and $btn-active-box-shadow != none {
|
||||
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
|
||||
@if $enable-shadows {
|
||||
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
|
||||
} @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);
|
||||
}
|
||||
}
|
||||
|
|
@ -96,10 +96,10 @@
|
|||
border-color: $active-border;
|
||||
|
||||
&:focus {
|
||||
// Avoid using mixin so we can pass custom focus shadow properly
|
||||
@if $enable-shadows and $btn-active-box-shadow != none {
|
||||
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5);
|
||||
@if $enable-shadows {
|
||||
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5));
|
||||
} @else {
|
||||
// Avoid using mixin so we can pass custom focus shadow properly
|
||||
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
Loading…
Reference in a new issue