mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
build
This commit is contained in:
parent
183205afb8
commit
3719ed4cb6
34 changed files with 1580 additions and 621 deletions
2
dist/css/bootstrap-grid.min.css.map
vendored
2
dist/css/bootstrap-grid.min.css.map
vendored
File diff suppressed because one or more lines are too long
4
dist/css/bootstrap-reboot.css
vendored
4
dist/css/bootstrap-reboot.css
vendored
|
@ -20,6 +20,10 @@ html {
|
|||
width: device-width;
|
||||
}
|
||||
|
||||
article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
|
|
2
dist/css/bootstrap-reboot.css.map
vendored
2
dist/css/bootstrap-reboot.css.map
vendored
File diff suppressed because one or more lines are too long
2
dist/css/bootstrap-reboot.min.css
vendored
2
dist/css/bootstrap-reboot.min.css
vendored
|
@ -1 +1 @@
|
|||
html{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}*,::after,::before{-webkit-box-sizing:inherit;box-sizing:inherit}@-ms-viewport{width:device-width}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5;color:#292b2c;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0275d8;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#014c8c;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}[role=button],a,area,button,input,label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#636c72;text-align:left;caption-side:bottom}th{text-align:left}label{display:inline-block;margin-bottom:.5rem}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}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
||||
html{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}*,::after,::before{-webkit-box-sizing:inherit;box-sizing:inherit}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5;color:#292b2c;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0275d8;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#014c8c;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}[role=button],a,area,button,input,label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#636c72;text-align:left;caption-side:bottom}th{text-align:left}label{display:inline-block;margin-bottom:.5rem}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}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
2
dist/css/bootstrap-reboot.min.css.map
vendored
2
dist/css/bootstrap-reboot.min.css.map
vendored
|
@ -1 +1 @@
|
|||
{"version":3,"sources":["../../scss/_reboot.scss","dist/css/bootstrap-reboot.css","bootstrap-reboot.css","../../scss/mixins/_hover.scss"],"names":[],"mappings":"AAoBA,KACE,mBAAA,WAAA,WAAA,WACA,YAAA,WACA,YAAA,KACA,yBAAA,KACA,qBAAA,KACA,mBAAA,UACA,4BAAA,YAGF,ECjBA,QADA,SDqBE,mBAAA,QAAA,WAAA,QAKA,cAAgB,MAAA,aASlB,KACE,OAAA,EACA,YAAA,aAAA,CAAA,kBAAA,CAAA,UAAA,CAAA,MAAA,CAAA,gBAAA,CAAA,KAAA,CAAA,WACA,UAAA,KACA,YAAA,IACA,YAAA,IACA,MAAA,QACA,iBAAA,KExBF,sBFiCE,QAAA,YASF,GACE,mBAAA,YAAA,WAAA,YACA,OAAA,EACA,SAAA,QAYF,GAAA,GAAA,GAAA,GAAA,GAAA,GACE,WAAA,EACA,cAAA,MAOF,EACE,WAAA,EACA,cAAA,KC5CF,0BDsDA,YAEE,gBAAA,UACA,gBAAA,UAAA,OACA,OAAA,KACA,cAAA,EAGF,QACE,cAAA,KACA,WAAA,OACA,YAAA,QClDF,GDqDA,GCtDA,GDyDE,WAAA,EACA,cAAA,KAGF,MCrDA,MACA,MAFA,MD0DE,cAAA,EAGF,GACE,YAAA,IAGF,GACE,cAAA,MACA,YAAA,EAGF,WACE,OAAA,EAAA,EAAA,KAGF,IACE,WAAA,OAGF,ECtDA,ODwDE,YAAA,OAGF,MACE,UAAA,IAQF,IC3DA,ID6DE,SAAA,SACA,UAAA,IACA,YAAA,EACA,eAAA,SAGF,IAAM,OAAA,OACN,IAAM,IAAA,MAON,EACE,MAAA,QACA,gBAAA,KACA,iBAAA,YACA,6BAAA,QGhLE,QHmLA,MAAA,QACA,gBAAA,UAUJ,8BACE,MAAA,QACA,gBAAA,KGrLE,oCAAA,oCHwLA,MAAA,QACA,gBAAA,KANJ,oCAUI,QAAA,EC7DJ,KACA,IDqEA,ICpEA,KDwEE,YAAA,SAAA,CAAA,UACA,UAAA,IAGF,IAEE,WAAA,EAEA,cAAA,KAEA,SAAA,KAQF,OAEE,OAAA,EAAA,EAAA,KAQF,IACE,eAAA,OACA,aAAA,KAGF,eACE,SAAA,OC/EF,cD6FA,EC/FA,KACA,OAEA,MACA,MACA,OACA,QACA,SDiGE,iBAAA,aAAA,aAAA,aAQF,MACE,gBAAA,SAGF,QACE,YAAA,OACA,eAAA,OACA,MAAA,QACA,WAAA,KACA,aAAA,OAGF,GAEE,WAAA,KAQF,MAEE,QAAA,aACA,cAAA,MAOF,aACE,QAAA,IAAA,OACA,QAAA,IAAA,KAAA,yBC3GF,OD8GA,MC5GA,SADA,OAEA,SDgHE,OAAA,EACA,YAAA,QACA,UAAA,QACA,YAAA,QAGF,OC9GA,MDgHE,SAAA,QAGF,OC9GA,ODgHE,eAAA,KC1GF,aACA,cD+GA,OCjHA,mBDqHE,mBAAA,OC9GF,gCACA,+BACA,gCDgHA,yBAIE,QAAA,EACA,aAAA,KC/GF,qBDkHA,kBAEE,mBAAA,WAAA,WAAA,WACA,QAAA,EAIF,iBCjHA,2BACA,kBAFA,iBD2HE,mBAAA,QAGF,SACE,SAAA,KAEA,OAAA,SAGF,SAME,UAAA,EAEA,QAAA,EACA,OAAA,EACA,OAAA,EAKF,OACE,QAAA,MACA,MAAA,KACA,UAAA,KACA,QAAA,EACA,cAAA,MACA,UAAA,OACA,YAAA,QACA,MAAA,QACA,YAAA,OAGF,SACE,eAAA,SEnIF,yCDMA,yCDmIE,OAAA,KEpIF,cF4IE,eAAA,KACA,mBAAA,KExIF,4CDMA,yCD2IE,mBAAA,KAQF,6BACE,KAAA,QACA,mBAAA,OAOF,OACE,QAAA,aAGF,QACE,QAAA,UAGF,SACE,QAAA,KErJF,SF2JE,QAAA"}
|
||||
{"version":3,"sources":["..\\..\\scss\\_reboot.scss","dist\\css\\bootstrap-reboot.css","bootstrap-reboot.css","..\\..\\scss\\mixins\\_hover.scss"],"names":[],"mappings":"AAoBA,KACE,mBAAA,WAAA,WAAA,WACA,YAAA,WACA,YAAA,KACA,yBAAA,KACA,qBAAA,KACA,mBAAA,UACA,4BAAA,YAGF,ECjBA,QADA,SDqBE,mBAAA,QAAA,WAAA,QAKA,cAAgB,MAAA,aAIlB,QAAA,MAAA,OAAA,WAAA,OAAA,OAAA,OAAA,OAAA,KAAA,IAAA,QACE,QAAA,MAQF,KACE,OAAA,EACA,YAAA,aAAA,CAAA,kBAAA,CAAA,UAAA,CAAA,MAAA,CAAA,gBAAA,CAAA,KAAA,CAAA,WACA,UAAA,KACA,YAAA,IACA,YAAA,IACA,MAAA,QACA,iBAAA,KExBF,sBFiCE,QAAA,YASF,GACE,mBAAA,YAAA,WAAA,YACA,OAAA,EACA,SAAA,QAYF,GAAA,GAAA,GAAA,GAAA,GAAA,GACE,WAAA,EACA,cAAA,MAOF,EACE,WAAA,EACA,cAAA,KC5CF,0BDsDA,YAEE,gBAAA,UACA,gBAAA,UAAA,OACA,OAAA,KACA,cAAA,EAGF,QACE,cAAA,KACA,WAAA,OACA,YAAA,QClDF,GDqDA,GCtDA,GDyDE,WAAA,EACA,cAAA,KAGF,MCrDA,MACA,MAFA,MD0DE,cAAA,EAGF,GACE,YAAA,IAGF,GACE,cAAA,MACA,YAAA,EAGF,WACE,OAAA,EAAA,EAAA,KAGF,IACE,WAAA,OAGF,ECtDA,ODwDE,YAAA,OAGF,MACE,UAAA,IAQF,IC3DA,ID6DE,SAAA,SACA,UAAA,IACA,YAAA,EACA,eAAA,SAGF,IAAM,OAAA,OACN,IAAM,IAAA,MAON,EACE,MAAA,QACA,gBAAA,KACA,iBAAA,YACA,6BAAA,QGpLE,QHuLA,MAAA,QACA,gBAAA,UAUJ,8BACE,MAAA,QACA,gBAAA,KGzLE,oCAAA,oCH4LA,MAAA,QACA,gBAAA,KANJ,oCAUI,QAAA,EC7DJ,KACA,IDqEA,ICpEA,KDwEE,YAAA,SAAA,CAAA,UACA,UAAA,IAGF,IAEE,WAAA,EAEA,cAAA,KAEA,SAAA,KAQF,OAEE,OAAA,EAAA,EAAA,KAQF,IACE,eAAA,OACA,aAAA,KAGF,eACE,SAAA,OC/EF,cD6FA,EC/FA,KACA,OAEA,MACA,MACA,OACA,QACA,SDiGE,iBAAA,aAAA,aAAA,aAQF,MACE,gBAAA,SAGF,QACE,YAAA,OACA,eAAA,OACA,MAAA,QACA,WAAA,KACA,aAAA,OAGF,GAEE,WAAA,KAQF,MAEE,QAAA,aACA,cAAA,MAOF,aACE,QAAA,IAAA,OACA,QAAA,IAAA,KAAA,yBC3GF,OD8GA,MC5GA,SADA,OAEA,SDgHE,OAAA,EACA,YAAA,QACA,UAAA,QACA,YAAA,QAGF,OC9GA,MDgHE,SAAA,QAGF,OC9GA,ODgHE,eAAA,KC1GF,aACA,cD+GA,OCjHA,mBDqHE,mBAAA,OC9GF,gCACA,+BACA,gCDgHA,yBAIE,QAAA,EACA,aAAA,KC/GF,qBDkHA,kBAEE,mBAAA,WAAA,WAAA,WACA,QAAA,EAIF,iBCjHA,2BACA,kBAFA,iBD2HE,mBAAA,QAGF,SACE,SAAA,KAEA,OAAA,SAGF,SAME,UAAA,EAEA,QAAA,EACA,OAAA,EACA,OAAA,EAKF,OACE,QAAA,MACA,MAAA,KACA,UAAA,KACA,QAAA,EACA,cAAA,MACA,UAAA,OACA,YAAA,QACA,MAAA,QACA,YAAA,OAGF,SACE,eAAA,SEnIF,yCDMA,yCDmIE,OAAA,KEpIF,cF4IE,eAAA,KACA,mBAAA,KExIF,4CDMA,yCD2IE,mBAAA,KAQF,6BACE,KAAA,QACA,mBAAA,OAOF,OACE,QAAA,aAGF,QACE,QAAA,UAGF,SACE,QAAA,KErJF,SF2JE,QAAA"}
|
|
@ -93,6 +93,10 @@ html {
|
|||
width: device-width;
|
||||
}
|
||||
|
||||
article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
|
@ -2887,24 +2891,24 @@ tbody.collapse.show {
|
|||
background-color: transparent;
|
||||
}
|
||||
|
||||
.show > .dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.show > a {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.dropdown-menu-right {
|
||||
right: 0;
|
||||
left: auto;
|
||||
left: auto !important;
|
||||
}
|
||||
|
||||
.dropdown-menu-left {
|
||||
right: auto;
|
||||
right: auto !important;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.dropdown-menu.show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dropdown-header {
|
||||
display: block;
|
||||
padding: 0.5rem 1.5rem;
|
||||
|
@ -2914,12 +2918,6 @@ tbody.collapse.show {
|
|||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.dropup .dropdown-menu {
|
||||
top: auto;
|
||||
bottom: 100%;
|
||||
margin-bottom: 0.125rem;
|
||||
}
|
||||
|
||||
.btn-group,
|
||||
.btn-group-vertical {
|
||||
position: relative;
|
||||
|
@ -5210,6 +5208,7 @@ button.close {
|
|||
position: absolute;
|
||||
z-index: 1070;
|
||||
display: block;
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
|
@ -5233,12 +5232,11 @@ button.close {
|
|||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.tooltip.tooltip-top, .tooltip.bs-tether-element-attached-bottom {
|
||||
.tooltip.bs-tooltip-top {
|
||||
padding: 5px 0;
|
||||
margin-top: -3px;
|
||||
}
|
||||
|
||||
.tooltip.tooltip-top .tooltip-inner::before, .tooltip.bs-tether-element-attached-bottom .tooltip-inner::before {
|
||||
.tooltip.bs-tooltip-top .arrow::before {
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
|
@ -5247,12 +5245,11 @@ button.close {
|
|||
border-top-color: #000;
|
||||
}
|
||||
|
||||
.tooltip.tooltip-right, .tooltip.bs-tether-element-attached-left {
|
||||
.tooltip.bs-tooltip-right {
|
||||
padding: 0 5px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.tooltip.tooltip-right .tooltip-inner::before, .tooltip.bs-tether-element-attached-left .tooltip-inner::before {
|
||||
.tooltip.bs-tooltip-right .arrow::before {
|
||||
top: 50%;
|
||||
left: 0;
|
||||
margin-top: -5px;
|
||||
|
@ -5261,12 +5258,11 @@ button.close {
|
|||
border-right-color: #000;
|
||||
}
|
||||
|
||||
.tooltip.tooltip-bottom, .tooltip.bs-tether-element-attached-top {
|
||||
.tooltip.bs-tooltip-bottom {
|
||||
padding: 5px 0;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.tooltip.tooltip-bottom .tooltip-inner::before, .tooltip.bs-tether-element-attached-top .tooltip-inner::before {
|
||||
.tooltip.bs-tooltip-bottom .arrow::before {
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
|
@ -5275,12 +5271,11 @@ button.close {
|
|||
border-bottom-color: #000;
|
||||
}
|
||||
|
||||
.tooltip.tooltip-left, .tooltip.bs-tether-element-attached-right {
|
||||
.tooltip.bs-tooltip-left {
|
||||
padding: 0 5px;
|
||||
margin-left: -3px;
|
||||
}
|
||||
|
||||
.tooltip.tooltip-left .tooltip-inner::before, .tooltip.bs-tether-element-attached-right .tooltip-inner::before {
|
||||
.tooltip.bs-tooltip-left .arrow::before {
|
||||
top: 50%;
|
||||
right: 0;
|
||||
margin-top: -5px;
|
||||
|
@ -5289,6 +5284,14 @@ button.close {
|
|||
border-left-color: #000;
|
||||
}
|
||||
|
||||
.tooltip .arrow::before {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.tooltip-inner {
|
||||
max-width: 200px;
|
||||
padding: 3px 8px;
|
||||
|
@ -5298,14 +5301,6 @@ button.close {
|
|||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.tooltip-inner::before {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.popover {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
@ -5337,70 +5332,93 @@ button.close {
|
|||
border-radius: 0.3rem;
|
||||
}
|
||||
|
||||
.popover.popover-top, .popover.bs-tether-element-attached-bottom {
|
||||
margin-top: -10px;
|
||||
.popover .arrow::before,
|
||||
.popover .arrow::after {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.popover.popover-top::before, .popover.popover-top::after, .popover.bs-tether-element-attached-bottom::before, .popover.bs-tether-element-attached-bottom::after {
|
||||
.popover .arrow::before {
|
||||
content: "";
|
||||
border-width: 11px;
|
||||
}
|
||||
|
||||
.popover .arrow::after {
|
||||
content: "";
|
||||
border-width: 10px;
|
||||
}
|
||||
|
||||
.popover.bs-popover-top {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.popover.bs-popover-top .arrow::before,
|
||||
.popover.bs-popover-top .arrow::after {
|
||||
left: 50%;
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
.popover.popover-top::before, .popover.bs-tether-element-attached-bottom::before {
|
||||
.popover.bs-popover-top .arrow::before {
|
||||
bottom: -11px;
|
||||
margin-left: -11px;
|
||||
border-top-color: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.popover.popover-top::after, .popover.bs-tether-element-attached-bottom::after {
|
||||
.popover.bs-popover-top .arrow::after {
|
||||
bottom: -10px;
|
||||
margin-left: -10px;
|
||||
border-top-color: #fff;
|
||||
}
|
||||
|
||||
.popover.popover-right, .popover.bs-tether-element-attached-left {
|
||||
.popover.bs-popover-right {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.popover.popover-right::before, .popover.popover-right::after, .popover.bs-tether-element-attached-left::before, .popover.bs-tether-element-attached-left::after {
|
||||
.popover.bs-popover-right .arrow::before,
|
||||
.popover.bs-popover-right .arrow::after {
|
||||
top: 50%;
|
||||
border-left-width: 0;
|
||||
}
|
||||
|
||||
.popover.popover-right::before, .popover.bs-tether-element-attached-left::before {
|
||||
.popover.bs-popover-right .arrow::before {
|
||||
left: -11px;
|
||||
margin-top: -11px;
|
||||
border-right-color: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.popover.popover-right::after, .popover.bs-tether-element-attached-left::after {
|
||||
.popover.bs-popover-right .arrow::after {
|
||||
left: -10px;
|
||||
margin-top: -10px;
|
||||
border-right-color: #fff;
|
||||
}
|
||||
|
||||
.popover.popover-bottom, .popover.bs-tether-element-attached-top {
|
||||
.popover.bs-popover-bottom {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.popover.popover-bottom::before, .popover.popover-bottom::after, .popover.bs-tether-element-attached-top::before, .popover.bs-tether-element-attached-top::after {
|
||||
.popover.bs-popover-bottom .arrow::before,
|
||||
.popover.bs-popover-bottom .arrow::after {
|
||||
left: 50%;
|
||||
border-top-width: 0;
|
||||
}
|
||||
|
||||
.popover.popover-bottom::before, .popover.bs-tether-element-attached-top::before {
|
||||
.popover.bs-popover-bottom .arrow::before {
|
||||
top: -11px;
|
||||
margin-left: -11px;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.popover.popover-bottom::after, .popover.bs-tether-element-attached-top::after {
|
||||
.popover.bs-popover-bottom .arrow::after {
|
||||
top: -10px;
|
||||
margin-left: -10px;
|
||||
border-bottom-color: #fff;
|
||||
}
|
||||
|
||||
.popover.popover-bottom .popover-title::before, .popover.bs-tether-element-attached-top .popover-title::before {
|
||||
.popover.bs-popover-bottom .popover-title::before {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
|
@ -5411,22 +5429,23 @@ button.close {
|
|||
border-bottom: 1px solid #f7f7f7;
|
||||
}
|
||||
|
||||
.popover.popover-left, .popover.bs-tether-element-attached-right {
|
||||
margin-left: -10px;
|
||||
.popover.bs-popover-left {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.popover.popover-left::before, .popover.popover-left::after, .popover.bs-tether-element-attached-right::before, .popover.bs-tether-element-attached-right::after {
|
||||
.popover.bs-popover-left .arrow::before,
|
||||
.popover.bs-popover-left .arrow::after {
|
||||
top: 50%;
|
||||
border-right-width: 0;
|
||||
}
|
||||
|
||||
.popover.popover-left::before, .popover.bs-tether-element-attached-right::before {
|
||||
.popover.bs-popover-left .arrow::before {
|
||||
right: -11px;
|
||||
margin-top: -11px;
|
||||
border-left-color: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.popover.popover-left::after, .popover.bs-tether-element-attached-right::after {
|
||||
.popover.bs-popover-left .arrow::after {
|
||||
right: -10px;
|
||||
margin-top: -10px;
|
||||
border-left-color: #fff;
|
||||
|
@ -5452,26 +5471,6 @@ button.close {
|
|||
color: #292b2c;
|
||||
}
|
||||
|
||||
.popover::before,
|
||||
.popover::after {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.popover::before {
|
||||
content: "";
|
||||
border-width: 11px;
|
||||
}
|
||||
|
||||
.popover::after {
|
||||
content: "";
|
||||
border-width: 10px;
|
||||
}
|
||||
|
||||
.carousel {
|
||||
position: relative;
|
||||
}
|
||||
|
|
2
dist/css/bootstrap.css.map
vendored
2
dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
2
dist/css/bootstrap.min.css
vendored
2
dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
2
dist/css/bootstrap.min.css.map
vendored
2
dist/css/bootstrap.min.css.map
vendored
File diff suppressed because one or more lines are too long
|
@ -438,6 +438,9 @@ var Button = function ($) {
|
|||
}
|
||||
|
||||
if (triggerChangeEvent) {
|
||||
if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
|
||||
return;
|
||||
}
|
||||
input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
|
||||
$(input).trigger('change');
|
||||
}
|
||||
|
@ -1086,9 +1089,8 @@ var Collapse = function ($) {
|
|||
};
|
||||
|
||||
var Selector = {
|
||||
ACTIVES: '.card > .show, .card > .collapsing',
|
||||
DATA_TOGGLE: '[data-toggle="collapse"]',
|
||||
DATA_CHILDREN: 'data-children'
|
||||
ACTIVES: '.show, .collapsing',
|
||||
DATA_TOGGLE: '[data-toggle="collapse"]'
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1105,20 +1107,13 @@ var Collapse = function ($) {
|
|||
this._element = element;
|
||||
this._config = this._getConfig(config);
|
||||
this._triggerArray = $.makeArray($('[data-toggle="collapse"][href="#' + element.id + '"],' + ('[data-toggle="collapse"][data-target="#' + element.id + '"]')));
|
||||
|
||||
this._parent = this._config.parent ? this._getParent() : null;
|
||||
|
||||
if (!this._config.parent) {
|
||||
this._addAriaAndCollapsedClass(this._element, this._triggerArray);
|
||||
}
|
||||
|
||||
this._selectorActives = Selector.ACTIVES;
|
||||
if (this._parent) {
|
||||
var childrenSelector = this._parent.hasAttribute(Selector.DATA_CHILDREN) ? this._parent.getAttribute(Selector.DATA_CHILDREN) : null;
|
||||
if (childrenSelector !== null) {
|
||||
this._selectorActives = childrenSelector + ' > .show, ' + childrenSelector + ' > .collapsing';
|
||||
}
|
||||
}
|
||||
|
||||
if (this._config.toggle) {
|
||||
this.toggle();
|
||||
}
|
||||
|
@ -1147,7 +1142,7 @@ var Collapse = function ($) {
|
|||
var activesData = void 0;
|
||||
|
||||
if (this._parent) {
|
||||
actives = $.makeArray($(this._parent).find(this._selectorActives));
|
||||
actives = $.makeArray($(this._parent).children().children(Selector.ACTIVES));
|
||||
if (!actives.length) {
|
||||
actives = null;
|
||||
}
|
||||
|
@ -1381,6 +1376,8 @@ var Collapse = function ($) {
|
|||
return Collapse;
|
||||
}(jQuery);
|
||||
|
||||
/* global Popper */
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0-alpha.6): dropdown.js
|
||||
|
@ -1390,6 +1387,14 @@ var Collapse = function ($) {
|
|||
|
||||
var Dropdown = function ($) {
|
||||
|
||||
/**
|
||||
* Check for Popper dependency
|
||||
* Popper - https://popper.js.org
|
||||
*/
|
||||
if (typeof Popper === 'undefined') {
|
||||
throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)');
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
|
@ -1434,6 +1439,23 @@ var Dropdown = function ($) {
|
|||
VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled)'
|
||||
};
|
||||
|
||||
var AttachmentMap = {
|
||||
TOP: 'top-start',
|
||||
BOTTOM: 'bottom-start'
|
||||
};
|
||||
|
||||
var Default = {
|
||||
placement: AttachmentMap.BOTTOM,
|
||||
offset: 0,
|
||||
flip: true
|
||||
};
|
||||
|
||||
var DefaultType = {
|
||||
placement: 'string',
|
||||
offset: '(number|string)',
|
||||
flip: 'boolean'
|
||||
};
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
|
@ -1441,10 +1463,13 @@ var Dropdown = function ($) {
|
|||
*/
|
||||
|
||||
var Dropdown = function () {
|
||||
function Dropdown(element) {
|
||||
function Dropdown(element, config) {
|
||||
_classCallCheck(this, Dropdown);
|
||||
|
||||
this._element = element;
|
||||
this._popper = null;
|
||||
this._config = this._getConfig(config);
|
||||
this._menu = this._getMenuElement();
|
||||
|
||||
this._addEventListeners();
|
||||
}
|
||||
|
@ -1454,30 +1479,44 @@ var Dropdown = function ($) {
|
|||
// public
|
||||
|
||||
Dropdown.prototype.toggle = function toggle() {
|
||||
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
|
||||
return false;
|
||||
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = Dropdown._getParentFromElement(this);
|
||||
var isActive = $(parent).hasClass(ClassName.SHOW);
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
var isActive = $(this._menu).hasClass(ClassName.SHOW);
|
||||
|
||||
Dropdown._clearMenus();
|
||||
|
||||
if (isActive) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
var relatedTarget = {
|
||||
relatedTarget: this
|
||||
relatedTarget: this._element
|
||||
};
|
||||
var showEvent = $.Event(Event.SHOW, relatedTarget);
|
||||
|
||||
$(parent).trigger(showEvent);
|
||||
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle dropup
|
||||
var dropdownPlacement = $(this._element).parent().hasClass('dropup') ? AttachmentMap.TOP : this._config.placement;
|
||||
this._popper = new Popper(this._element, this._menu, {
|
||||
placement: dropdownPlacement,
|
||||
modifiers: {
|
||||
offset: {
|
||||
offset: this._config.offset
|
||||
},
|
||||
flip: {
|
||||
enabled: this._config.flip
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 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
|
||||
|
@ -1486,25 +1525,61 @@ var Dropdown = function ($) {
|
|||
$('body').children().on('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
this.focus();
|
||||
this.setAttribute('aria-expanded', true);
|
||||
this._element.focus();
|
||||
this._element.setAttribute('aria-expanded', true);
|
||||
|
||||
$(parent).toggleClass(ClassName.SHOW);
|
||||
$(parent).trigger($.Event(Event.SHOWN, relatedTarget));
|
||||
|
||||
return false;
|
||||
$(this._menu).toggleClass(ClassName.SHOW);
|
||||
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));
|
||||
};
|
||||
|
||||
Dropdown.prototype.dispose = function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
$(this._element).off(EVENT_KEY);
|
||||
this._element = null;
|
||||
this._menu = null;
|
||||
if (this._popper !== null) {
|
||||
this._popper.destroy();
|
||||
}
|
||||
this._popper = null;
|
||||
};
|
||||
|
||||
Dropdown.prototype.update = function update() {
|
||||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate();
|
||||
}
|
||||
};
|
||||
|
||||
// private
|
||||
|
||||
Dropdown.prototype._addEventListeners = function _addEventListeners() {
|
||||
$(this._element).on(Event.CLICK, this.toggle);
|
||||
var _this9 = this;
|
||||
|
||||
$(this._element).on(Event.CLICK, function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
_this9.toggle();
|
||||
});
|
||||
};
|
||||
|
||||
Dropdown.prototype._getConfig = function _getConfig(config) {
|
||||
var elementData = $(this._element).data();
|
||||
if (elementData.placement !== undefined) {
|
||||
elementData.placement = AttachmentMap[elementData.placement.toUpperCase()];
|
||||
}
|
||||
|
||||
config = $.extend({}, this.constructor.Default, $(this._element).data(), config);
|
||||
|
||||
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
|
||||
return config;
|
||||
};
|
||||
|
||||
Dropdown.prototype._getMenuElement = function _getMenuElement() {
|
||||
if (!this._menu) {
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
this._menu = $(parent).find(Selector.MENU)[0];
|
||||
}
|
||||
return this._menu;
|
||||
};
|
||||
|
||||
// static
|
||||
|
@ -1512,9 +1587,10 @@ var Dropdown = function ($) {
|
|||
Dropdown._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null;
|
||||
|
||||
if (!data) {
|
||||
data = new Dropdown(this);
|
||||
data = new Dropdown(this, _config);
|
||||
$(this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
|
@ -1522,7 +1598,7 @@ var Dropdown = function ($) {
|
|||
if (data[config] === undefined) {
|
||||
throw new Error('No method named "' + config + '"');
|
||||
}
|
||||
data[config].call(this);
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -1533,13 +1609,18 @@ var Dropdown = function ($) {
|
|||
}
|
||||
|
||||
var toggles = $.makeArray($(Selector.DATA_TOGGLE));
|
||||
|
||||
for (var i = 0; i < toggles.length; i++) {
|
||||
var parent = Dropdown._getParentFromElement(toggles[i]);
|
||||
var context = $(toggles[i]).data(DATA_KEY);
|
||||
var relatedTarget = {
|
||||
relatedTarget: toggles[i]
|
||||
};
|
||||
|
||||
if (!context) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var dropdownMenu = context._menu;
|
||||
if (!$(parent).hasClass(ClassName.SHOW)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -1562,6 +1643,7 @@ var Dropdown = function ($) {
|
|||
|
||||
toggles[i].setAttribute('aria-expanded', 'false');
|
||||
|
||||
$(dropdownMenu).removeClass(ClassName.SHOW);
|
||||
$(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
|
||||
}
|
||||
};
|
||||
|
@ -1633,6 +1715,16 @@ var Dropdown = function ($) {
|
|||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: 'DefaultType',
|
||||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Dropdown;
|
||||
|
@ -1644,7 +1736,11 @@ var Dropdown = function ($) {
|
|||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + ' ' + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
|
||||
$(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + ' ' + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
Dropdown._jQueryInterface.call($(this), 'toggle');
|
||||
}).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
|
@ -1763,7 +1859,7 @@ var Modal = function ($) {
|
|||
};
|
||||
|
||||
Modal.prototype.show = function show(relatedTarget) {
|
||||
var _this9 = this;
|
||||
var _this10 = this;
|
||||
|
||||
if (this._isTransitioning) {
|
||||
return;
|
||||
|
@ -1794,24 +1890,24 @@ var Modal = function ($) {
|
|||
this._setResizeEvent();
|
||||
|
||||
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
|
||||
return _this9.hide(event);
|
||||
return _this10.hide(event);
|
||||
});
|
||||
|
||||
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
|
||||
$(_this9._element).one(Event.MOUSEUP_DISMISS, function (event) {
|
||||
if ($(event.target).is(_this9._element)) {
|
||||
_this9._ignoreBackdropClick = true;
|
||||
$(_this10._element).one(Event.MOUSEUP_DISMISS, function (event) {
|
||||
if ($(event.target).is(_this10._element)) {
|
||||
_this10._ignoreBackdropClick = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
this._showBackdrop(function () {
|
||||
return _this9._showElement(relatedTarget);
|
||||
return _this10._showElement(relatedTarget);
|
||||
});
|
||||
};
|
||||
|
||||
Modal.prototype.hide = function hide(event) {
|
||||
var _this10 = this;
|
||||
var _this11 = this;
|
||||
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
|
@ -1850,7 +1946,7 @@ var Modal = function ($) {
|
|||
if (transition) {
|
||||
|
||||
$(this._element).one(Util.TRANSITION_END, function (event) {
|
||||
return _this10._hideModal(event);
|
||||
return _this11._hideModal(event);
|
||||
}).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
} else {
|
||||
this._hideModal();
|
||||
|
@ -1885,7 +1981,7 @@ var Modal = function ($) {
|
|||
};
|
||||
|
||||
Modal.prototype._showElement = function _showElement(relatedTarget) {
|
||||
var _this11 = this;
|
||||
var _this12 = this;
|
||||
|
||||
var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
|
||||
|
||||
|
@ -1913,11 +2009,11 @@ var Modal = function ($) {
|
|||
});
|
||||
|
||||
var transitionComplete = function transitionComplete() {
|
||||
if (_this11._config.focus) {
|
||||
_this11._element.focus();
|
||||
if (_this12._config.focus) {
|
||||
_this12._element.focus();
|
||||
}
|
||||
_this11._isTransitioning = false;
|
||||
$(_this11._element).trigger(shownEvent);
|
||||
_this12._isTransitioning = false;
|
||||
$(_this12._element).trigger(shownEvent);
|
||||
};
|
||||
|
||||
if (transition) {
|
||||
|
@ -1928,24 +2024,24 @@ var Modal = function ($) {
|
|||
};
|
||||
|
||||
Modal.prototype._enforceFocus = function _enforceFocus() {
|
||||
var _this12 = this;
|
||||
var _this13 = this;
|
||||
|
||||
$(document).off(Event.FOCUSIN) // guard against infinite focus loop
|
||||
.on(Event.FOCUSIN, function (event) {
|
||||
if (document !== event.target && _this12._element !== event.target && !$(_this12._element).has(event.target).length) {
|
||||
_this12._element.focus();
|
||||
if (document !== event.target && _this13._element !== event.target && !$(_this13._element).has(event.target).length) {
|
||||
_this13._element.focus();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Modal.prototype._setEscapeEvent = function _setEscapeEvent() {
|
||||
var _this13 = this;
|
||||
var _this14 = this;
|
||||
|
||||
if (this._isShown && this._config.keyboard) {
|
||||
$(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
event.preventDefault();
|
||||
_this13.hide();
|
||||
_this14.hide();
|
||||
}
|
||||
});
|
||||
} else if (!this._isShown) {
|
||||
|
@ -1954,11 +2050,11 @@ var Modal = function ($) {
|
|||
};
|
||||
|
||||
Modal.prototype._setResizeEvent = function _setResizeEvent() {
|
||||
var _this14 = this;
|
||||
var _this15 = this;
|
||||
|
||||
if (this._isShown) {
|
||||
$(window).on(Event.RESIZE, function (event) {
|
||||
return _this14.handleUpdate(event);
|
||||
return _this15.handleUpdate(event);
|
||||
});
|
||||
} else {
|
||||
$(window).off(Event.RESIZE);
|
||||
|
@ -1966,16 +2062,16 @@ var Modal = function ($) {
|
|||
};
|
||||
|
||||
Modal.prototype._hideModal = function _hideModal() {
|
||||
var _this15 = this;
|
||||
var _this16 = this;
|
||||
|
||||
this._element.style.display = 'none';
|
||||
this._element.setAttribute('aria-hidden', true);
|
||||
this._isTransitioning = false;
|
||||
this._showBackdrop(function () {
|
||||
$(document.body).removeClass(ClassName.OPEN);
|
||||
_this15._resetAdjustments();
|
||||
_this15._resetScrollbar();
|
||||
$(_this15._element).trigger(Event.HIDDEN);
|
||||
_this16._resetAdjustments();
|
||||
_this16._resetScrollbar();
|
||||
$(_this16._element).trigger(Event.HIDDEN);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -1987,7 +2083,7 @@ var Modal = function ($) {
|
|||
};
|
||||
|
||||
Modal.prototype._showBackdrop = function _showBackdrop(callback) {
|
||||
var _this16 = this;
|
||||
var _this17 = this;
|
||||
|
||||
var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
|
||||
|
||||
|
@ -2004,17 +2100,17 @@ var Modal = function ($) {
|
|||
$(this._backdrop).appendTo(document.body);
|
||||
|
||||
$(this._element).on(Event.CLICK_DISMISS, function (event) {
|
||||
if (_this16._ignoreBackdropClick) {
|
||||
_this16._ignoreBackdropClick = false;
|
||||
if (_this17._ignoreBackdropClick) {
|
||||
_this17._ignoreBackdropClick = false;
|
||||
return;
|
||||
}
|
||||
if (event.target !== event.currentTarget) {
|
||||
return;
|
||||
}
|
||||
if (_this16._config.backdrop === 'static') {
|
||||
_this16._element.focus();
|
||||
if (_this17._config.backdrop === 'static') {
|
||||
_this17._element.focus();
|
||||
} else {
|
||||
_this16.hide();
|
||||
_this17.hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -2038,7 +2134,7 @@ var Modal = function ($) {
|
|||
$(this._backdrop).removeClass(ClassName.SHOW);
|
||||
|
||||
var callbackRemove = function callbackRemove() {
|
||||
_this16._removeBackdrop();
|
||||
_this17._removeBackdrop();
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
|
@ -2082,7 +2178,7 @@ var Modal = function ($) {
|
|||
};
|
||||
|
||||
Modal.prototype._setScrollbar = function _setScrollbar() {
|
||||
var _this17 = this;
|
||||
var _this18 = this;
|
||||
|
||||
if (this._isBodyOverflowing) {
|
||||
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
|
||||
|
@ -2092,14 +2188,14 @@ var Modal = function ($) {
|
|||
$(Selector.FIXED_CONTENT).each(function (index, element) {
|
||||
var actualPadding = $(element)[0].style.paddingRight;
|
||||
var calculatedPadding = $(element).css('padding-right');
|
||||
$(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this17._scrollbarWidth + 'px');
|
||||
$(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this18._scrollbarWidth + 'px');
|
||||
});
|
||||
|
||||
// Adjust navbar-toggler margin
|
||||
$(Selector.NAVBAR_TOGGLER).each(function (index, element) {
|
||||
var actualMargin = $(element)[0].style.marginRight;
|
||||
var calculatedMargin = $(element).css('margin-right');
|
||||
$(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this17._scrollbarWidth + 'px');
|
||||
$(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this18._scrollbarWidth + 'px');
|
||||
});
|
||||
|
||||
// Adjust body padding
|
||||
|
@ -2188,7 +2284,7 @@ var Modal = function ($) {
|
|||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
var _this18 = this;
|
||||
var _this19 = this;
|
||||
|
||||
var target = void 0;
|
||||
var selector = Util.getSelectorFromElement(this);
|
||||
|
@ -2210,8 +2306,8 @@ var Modal = function ($) {
|
|||
}
|
||||
|
||||
$target.one(Event.HIDDEN, function () {
|
||||
if ($(_this18).is(':visible')) {
|
||||
_this18.focus();
|
||||
if ($(_this19).is(':visible')) {
|
||||
_this19.focus();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -2305,7 +2401,7 @@ var ScrollSpy = function ($) {
|
|||
|
||||
var ScrollSpy = function () {
|
||||
function ScrollSpy(element, config) {
|
||||
var _this19 = this;
|
||||
var _this20 = this;
|
||||
|
||||
_classCallCheck(this, ScrollSpy);
|
||||
|
||||
|
@ -2319,7 +2415,7 @@ var ScrollSpy = function ($) {
|
|||
this._scrollHeight = 0;
|
||||
|
||||
$(this._scrollElement).on(Event.SCROLL, function (event) {
|
||||
return _this19._process(event);
|
||||
return _this20._process(event);
|
||||
});
|
||||
|
||||
this.refresh();
|
||||
|
@ -2331,7 +2427,7 @@ var ScrollSpy = function ($) {
|
|||
// public
|
||||
|
||||
ScrollSpy.prototype.refresh = function refresh() {
|
||||
var _this20 = this;
|
||||
var _this21 = this;
|
||||
|
||||
var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET;
|
||||
|
||||
|
@ -2367,8 +2463,8 @@ var ScrollSpy = function ($) {
|
|||
}).sort(function (a, b) {
|
||||
return a[0] - b[0];
|
||||
}).forEach(function (item) {
|
||||
_this20._offsets.push(item[0]);
|
||||
_this20._targets.push(item[1]);
|
||||
_this21._offsets.push(item[0]);
|
||||
_this21._targets.push(item[1]);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -2615,7 +2711,7 @@ var Tab = function ($) {
|
|||
// public
|
||||
|
||||
Tab.prototype.show = function show() {
|
||||
var _this21 = this;
|
||||
var _this22 = this;
|
||||
|
||||
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE) || $(this._element).hasClass(ClassName.DISABLED)) {
|
||||
return;
|
||||
|
@ -2657,7 +2753,7 @@ var Tab = function ($) {
|
|||
|
||||
var complete = function complete() {
|
||||
var hiddenEvent = $.Event(Event.HIDDEN, {
|
||||
relatedTarget: _this21._element
|
||||
relatedTarget: _this22._element
|
||||
});
|
||||
|
||||
var shownEvent = $.Event(Event.SHOWN, {
|
||||
|
@ -2665,7 +2761,7 @@ var Tab = function ($) {
|
|||
});
|
||||
|
||||
$(previous).trigger(hiddenEvent);
|
||||
$(_this21._element).trigger(shownEvent);
|
||||
$(_this22._element).trigger(shownEvent);
|
||||
};
|
||||
|
||||
if (target) {
|
||||
|
@ -2676,20 +2772,20 @@ var Tab = function ($) {
|
|||
};
|
||||
|
||||
Tab.prototype.dispose = function dispose() {
|
||||
$.removeClass(this._element, DATA_KEY);
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
};
|
||||
|
||||
// private
|
||||
|
||||
Tab.prototype._activate = function _activate(element, container, callback) {
|
||||
var _this22 = this;
|
||||
var _this23 = this;
|
||||
|
||||
var active = $(container).find(Selector.ACTIVE)[0];
|
||||
var isTransitioning = callback && Util.supportsTransitionEnd() && active && $(active).hasClass(ClassName.FADE);
|
||||
|
||||
var complete = function complete() {
|
||||
return _this22._transitionComplete(element, active, isTransitioning, callback);
|
||||
return _this23._transitionComplete(element, active, isTransitioning, callback);
|
||||
};
|
||||
|
||||
if (active && isTransitioning) {
|
||||
|
@ -2799,7 +2895,7 @@ var Tab = function ($) {
|
|||
return Tab;
|
||||
}(jQuery);
|
||||
|
||||
/* global Tether */
|
||||
/* global Popper */
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
|
@ -2811,11 +2907,11 @@ var Tab = function ($) {
|
|||
var Tooltip = function ($) {
|
||||
|
||||
/**
|
||||
* Check for Tether dependency
|
||||
* Tether - http://tether.io/
|
||||
* Check for Popper dependency
|
||||
* Popper - https://popper.js.org
|
||||
*/
|
||||
if (typeof Tether === 'undefined') {
|
||||
throw new Error('Bootstrap tooltips require Tether (http://tether.io/)');
|
||||
if (typeof Popper === 'undefined') {
|
||||
throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2830,22 +2926,8 @@ var Tooltip = function ($) {
|
|||
var EVENT_KEY = '.' + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 150;
|
||||
var CLASS_PREFIX = 'bs-tether';
|
||||
var TETHER_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g');
|
||||
|
||||
var Default = {
|
||||
animation: true,
|
||||
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-inner"></div></div>',
|
||||
trigger: 'hover focus',
|
||||
title: '',
|
||||
delay: 0,
|
||||
html: false,
|
||||
selector: false,
|
||||
placement: 'top',
|
||||
offset: '0 0',
|
||||
constraints: [],
|
||||
container: false
|
||||
};
|
||||
var CLASS_PREFIX = 'bs-tooltip';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g');
|
||||
|
||||
var DefaultType = {
|
||||
animation: 'boolean',
|
||||
|
@ -2856,16 +2938,30 @@ var Tooltip = function ($) {
|
|||
html: 'boolean',
|
||||
selector: '(string|boolean)',
|
||||
placement: '(string|function)',
|
||||
offset: 'string',
|
||||
constraints: 'array',
|
||||
container: '(string|element|boolean)'
|
||||
offset: '(number|string)',
|
||||
container: '(string|element|boolean)',
|
||||
fallbackPlacement: '(string|array)'
|
||||
};
|
||||
|
||||
var AttachmentMap = {
|
||||
TOP: 'bottom center',
|
||||
RIGHT: 'middle left',
|
||||
BOTTOM: 'top center',
|
||||
LEFT: 'middle right'
|
||||
TOP: 'top',
|
||||
RIGHT: 'right',
|
||||
BOTTOM: 'bottom',
|
||||
LEFT: 'left'
|
||||
};
|
||||
|
||||
var Default = {
|
||||
animation: true,
|
||||
template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
|
||||
trigger: 'hover focus',
|
||||
title: '',
|
||||
delay: 0,
|
||||
html: false,
|
||||
selector: false,
|
||||
placement: 'top',
|
||||
offset: 0,
|
||||
container: false,
|
||||
fallbackPlacement: 'flip'
|
||||
};
|
||||
|
||||
var HoverState = {
|
||||
|
@ -2896,11 +2992,6 @@ var Tooltip = function ($) {
|
|||
TOOLTIP_INNER: '.tooltip-inner'
|
||||
};
|
||||
|
||||
var TetherClass = {
|
||||
element: false,
|
||||
enabled: false
|
||||
};
|
||||
|
||||
var Trigger = {
|
||||
HOVER: 'hover',
|
||||
FOCUS: 'focus',
|
||||
|
@ -2923,7 +3014,7 @@ var Tooltip = function ($) {
|
|||
this._timeout = 0;
|
||||
this._hoverState = '';
|
||||
this._activeTrigger = {};
|
||||
this._tether = null;
|
||||
this._popper = null;
|
||||
|
||||
// protected
|
||||
this.element = element;
|
||||
|
@ -2980,8 +3071,6 @@ var Tooltip = function ($) {
|
|||
Tooltip.prototype.dispose = function dispose() {
|
||||
clearTimeout(this._timeout);
|
||||
|
||||
this.cleanupTether();
|
||||
|
||||
$.removeData(this.element, this.constructor.DATA_KEY);
|
||||
|
||||
$(this.element).off(this.constructor.EVENT_KEY);
|
||||
|
@ -2995,7 +3084,10 @@ var Tooltip = function ($) {
|
|||
this._timeout = null;
|
||||
this._hoverState = null;
|
||||
this._activeTrigger = null;
|
||||
this._tether = null;
|
||||
if (this._popper !== null) {
|
||||
this._popper.destroy();
|
||||
}
|
||||
this._popper = null;
|
||||
|
||||
this.element = null;
|
||||
this.config = null;
|
||||
|
@ -3003,7 +3095,7 @@ var Tooltip = function ($) {
|
|||
};
|
||||
|
||||
Tooltip.prototype.show = function show() {
|
||||
var _this23 = this;
|
||||
var _this24 = this;
|
||||
|
||||
if ($(this.element).css('display') === 'none') {
|
||||
throw new Error('Please use show on visible elements');
|
||||
|
@ -3034,6 +3126,7 @@ var Tooltip = function ($) {
|
|||
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
|
||||
|
||||
var attachment = this._getAttachment(placement);
|
||||
this.addAttachmentClass(attachment);
|
||||
|
||||
var container = this.config.container === false ? document.body : $(this.config.container);
|
||||
|
||||
|
@ -3045,20 +3138,26 @@ var Tooltip = function ($) {
|
|||
|
||||
$(this.element).trigger(this.constructor.Event.INSERTED);
|
||||
|
||||
this._tether = new Tether({
|
||||
attachment: attachment,
|
||||
element: tip,
|
||||
target: this.element,
|
||||
classes: TetherClass,
|
||||
classPrefix: CLASS_PREFIX,
|
||||
offset: this.config.offset,
|
||||
constraints: this.config.constraints,
|
||||
addTargetClasses: false
|
||||
this._popper = new Popper(this.element, tip, {
|
||||
placement: attachment,
|
||||
modifiers: {
|
||||
offset: {
|
||||
offset: this.config.offset
|
||||
},
|
||||
flip: {
|
||||
behavior: this.config.fallbackPlacement
|
||||
}
|
||||
},
|
||||
onCreate: function onCreate(data) {
|
||||
if (data.originalPlacement !== data.placement) {
|
||||
_this24._handlePopperPlacementChange(data);
|
||||
}
|
||||
},
|
||||
onUpdate: function onUpdate(data) {
|
||||
_this24._handlePopperPlacementChange(data);
|
||||
}
|
||||
});
|
||||
|
||||
Util.reflow(tip);
|
||||
this._tether.position();
|
||||
|
||||
$(tip).addClass(ClassName.SHOW);
|
||||
|
||||
// if this is a touch-enabled device we add extra
|
||||
|
@ -3070,39 +3169,43 @@ var Tooltip = function ($) {
|
|||
}
|
||||
|
||||
var complete = function complete() {
|
||||
var prevHoverState = _this23._hoverState;
|
||||
_this23._hoverState = null;
|
||||
if (_this24.config.animation) {
|
||||
_this24._fixTransition();
|
||||
}
|
||||
var prevHoverState = _this24._hoverState;
|
||||
_this24._hoverState = null;
|
||||
|
||||
$(_this23.element).trigger(_this23.constructor.Event.SHOWN);
|
||||
$(_this24.element).trigger(_this24.constructor.Event.SHOWN);
|
||||
|
||||
if (prevHoverState === HoverState.OUT) {
|
||||
_this23._leave(null, _this23);
|
||||
_this24._leave(null, _this24);
|
||||
}
|
||||
};
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
|
||||
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
|
||||
return;
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
|
||||
complete();
|
||||
}
|
||||
};
|
||||
|
||||
Tooltip.prototype.hide = function hide(callback) {
|
||||
var _this24 = this;
|
||||
var _this25 = this;
|
||||
|
||||
var tip = this.getTipElement();
|
||||
var hideEvent = $.Event(this.constructor.Event.HIDE);
|
||||
var complete = function complete() {
|
||||
if (_this24._hoverState !== HoverState.SHOW && tip.parentNode) {
|
||||
if (_this25._hoverState !== HoverState.SHOW && tip.parentNode) {
|
||||
tip.parentNode.removeChild(tip);
|
||||
}
|
||||
|
||||
_this24._cleanTipClass();
|
||||
_this24.element.removeAttribute('aria-describedby');
|
||||
$(_this24.element).trigger(_this24.constructor.Event.HIDDEN);
|
||||
_this24.cleanupTether();
|
||||
_this25._cleanTipClass();
|
||||
_this25.element.removeAttribute('aria-describedby');
|
||||
$(_this25.element).trigger(_this25.constructor.Event.HIDDEN);
|
||||
if (_this25._popper !== null) {
|
||||
_this25._popper.destroy();
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
|
@ -3137,24 +3240,30 @@ var Tooltip = function ($) {
|
|||
this._hoverState = '';
|
||||
};
|
||||
|
||||
Tooltip.prototype.update = function update() {
|
||||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate();
|
||||
}
|
||||
};
|
||||
|
||||
// protected
|
||||
|
||||
Tooltip.prototype.isWithContent = function isWithContent() {
|
||||
return Boolean(this.getTitle());
|
||||
};
|
||||
|
||||
Tooltip.prototype.addAttachmentClass = function addAttachmentClass(attachment) {
|
||||
$(this.getTipElement()).addClass(CLASS_PREFIX + '-' + attachment);
|
||||
};
|
||||
|
||||
Tooltip.prototype.getTipElement = function getTipElement() {
|
||||
return this.tip = this.tip || $(this.config.template)[0];
|
||||
};
|
||||
|
||||
Tooltip.prototype.setContent = function setContent() {
|
||||
var $tip = $(this.getTipElement());
|
||||
|
||||
this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
|
||||
|
||||
$tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
|
||||
|
||||
this.cleanupTether();
|
||||
};
|
||||
|
||||
Tooltip.prototype.setElementContent = function setElementContent($element, content) {
|
||||
|
@ -3183,49 +3292,35 @@ var Tooltip = function ($) {
|
|||
return title;
|
||||
};
|
||||
|
||||
Tooltip.prototype.cleanupTether = function cleanupTether() {
|
||||
if (this._tether) {
|
||||
this._tether.destroy();
|
||||
}
|
||||
};
|
||||
|
||||
// private
|
||||
|
||||
Tooltip.prototype._getAttachment = function _getAttachment(placement) {
|
||||
return AttachmentMap[placement.toUpperCase()];
|
||||
};
|
||||
|
||||
Tooltip.prototype._cleanTipClass = function _cleanTipClass() {
|
||||
var $tip = $(this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(TETHER_PREFIX_REGEX);
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
}
|
||||
};
|
||||
|
||||
Tooltip.prototype._setListeners = function _setListeners() {
|
||||
var _this25 = this;
|
||||
var _this26 = this;
|
||||
|
||||
var triggers = this.config.trigger.split(' ');
|
||||
|
||||
triggers.forEach(function (trigger) {
|
||||
if (trigger === 'click') {
|
||||
$(_this25.element).on(_this25.constructor.Event.CLICK, _this25.config.selector, function (event) {
|
||||
return _this25.toggle(event);
|
||||
$(_this26.element).on(_this26.constructor.Event.CLICK, _this26.config.selector, function (event) {
|
||||
return _this26.toggle(event);
|
||||
});
|
||||
} else if (trigger !== Trigger.MANUAL) {
|
||||
var eventIn = trigger === Trigger.HOVER ? _this25.constructor.Event.MOUSEENTER : _this25.constructor.Event.FOCUSIN;
|
||||
var eventOut = trigger === Trigger.HOVER ? _this25.constructor.Event.MOUSELEAVE : _this25.constructor.Event.FOCUSOUT;
|
||||
var eventIn = trigger === Trigger.HOVER ? _this26.constructor.Event.MOUSEENTER : _this26.constructor.Event.FOCUSIN;
|
||||
var eventOut = trigger === Trigger.HOVER ? _this26.constructor.Event.MOUSELEAVE : _this26.constructor.Event.FOCUSOUT;
|
||||
|
||||
$(_this25.element).on(eventIn, _this25.config.selector, function (event) {
|
||||
return _this25._enter(event);
|
||||
}).on(eventOut, _this25.config.selector, function (event) {
|
||||
return _this25._leave(event);
|
||||
$(_this26.element).on(eventIn, _this26.config.selector, function (event) {
|
||||
return _this26._enter(event);
|
||||
}).on(eventOut, _this26.config.selector, function (event) {
|
||||
return _this26._leave(event);
|
||||
});
|
||||
}
|
||||
|
||||
$(_this25.element).closest('.modal').on('hide.bs.modal', function () {
|
||||
return _this25.hide();
|
||||
$(_this26.element).closest('.modal').on('hide.bs.modal', function () {
|
||||
return _this26.hide();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -3363,6 +3458,32 @@ var Tooltip = function ($) {
|
|||
return config;
|
||||
};
|
||||
|
||||
Tooltip.prototype._cleanTipClass = function _cleanTipClass() {
|
||||
var $tip = $(this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
}
|
||||
};
|
||||
|
||||
Tooltip.prototype._handlePopperPlacementChange = function _handlePopperPlacementChange(data) {
|
||||
this._cleanTipClass();
|
||||
this.addAttachmentClass(this._getAttachment(data.placement));
|
||||
};
|
||||
|
||||
Tooltip.prototype._fixTransition = function _fixTransition() {
|
||||
var tip = this.getTipElement();
|
||||
var initConfigAnimation = this.config.animation;
|
||||
if (tip.getAttribute('x-placement') !== null) {
|
||||
return;
|
||||
}
|
||||
$(tip).removeClass(ClassName.FADE);
|
||||
this.config.animation = false;
|
||||
this.hide();
|
||||
this.show();
|
||||
this.config.animation = initConfigAnimation;
|
||||
};
|
||||
|
||||
// static
|
||||
|
||||
Tooltip._jQueryInterface = function _jQueryInterface(config) {
|
||||
|
@ -3464,12 +3585,14 @@ var Popover = function ($) {
|
|||
var DATA_KEY = 'bs.popover';
|
||||
var EVENT_KEY = '.' + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var CLASS_PREFIX = 'bs-popover';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g');
|
||||
|
||||
var Default = $.extend({}, Tooltip.Default, {
|
||||
placement: 'right',
|
||||
trigger: 'click',
|
||||
content: '',
|
||||
template: '<div class="popover" role="tooltip">' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>'
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>'
|
||||
});
|
||||
|
||||
var DefaultType = $.extend({}, Tooltip.DefaultType, {
|
||||
|
@ -3520,6 +3643,10 @@ var Popover = function ($) {
|
|||
return this.getTitle() || this._getContent();
|
||||
};
|
||||
|
||||
Popover.prototype.addAttachmentClass = function addAttachmentClass(attachment) {
|
||||
$(this.getTipElement()).addClass(CLASS_PREFIX + '-' + attachment);
|
||||
};
|
||||
|
||||
Popover.prototype.getTipElement = function getTipElement() {
|
||||
return this.tip = this.tip || $(this.config.template)[0];
|
||||
};
|
||||
|
@ -3532,8 +3659,6 @@ var Popover = function ($) {
|
|||
this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
|
||||
|
||||
$tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
|
||||
|
||||
this.cleanupTether();
|
||||
};
|
||||
|
||||
// private
|
||||
|
@ -3542,6 +3667,14 @@ var Popover = function ($) {
|
|||
return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);
|
||||
};
|
||||
|
||||
Popover.prototype._cleanTipClass = function _cleanTipClass() {
|
||||
var $tip = $(this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
}
|
||||
};
|
||||
|
||||
// static
|
||||
|
||||
Popover._jQueryInterface = function _jQueryInterface(config) {
|
||||
|
|
281
dist/js/bootstrap.min.js
vendored
281
dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/css/bootstrap-grid.min.css.map
vendored
2
docs/dist/css/bootstrap-grid.min.css.map
vendored
File diff suppressed because one or more lines are too long
4
docs/dist/css/bootstrap-reboot.css
vendored
4
docs/dist/css/bootstrap-reboot.css
vendored
|
@ -20,6 +20,10 @@ html {
|
|||
width: device-width;
|
||||
}
|
||||
|
||||
article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
|
|
2
docs/dist/css/bootstrap-reboot.css.map
vendored
2
docs/dist/css/bootstrap-reboot.css.map
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/css/bootstrap-reboot.min.css
vendored
2
docs/dist/css/bootstrap-reboot.min.css
vendored
|
@ -1 +1 @@
|
|||
html{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}*,::after,::before{-webkit-box-sizing:inherit;box-sizing:inherit}@-ms-viewport{width:device-width}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5;color:#292b2c;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0275d8;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#014c8c;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}[role=button],a,area,button,input,label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#636c72;text-align:left;caption-side:bottom}th{text-align:left}label{display:inline-block;margin-bottom:.5rem}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}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
||||
html{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}*,::after,::before{-webkit-box-sizing:inherit;box-sizing:inherit}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5;color:#292b2c;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#0275d8;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#014c8c;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}[role=button],a,area,button,input,label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#636c72;text-align:left;caption-side:bottom}th{text-align:left}label{display:inline-block;margin-bottom:.5rem}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}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}/*# sourceMappingURL=bootstrap-reboot.min.css.map */
|
2
docs/dist/css/bootstrap-reboot.min.css.map
vendored
2
docs/dist/css/bootstrap-reboot.min.css.map
vendored
|
@ -1 +1 @@
|
|||
{"version":3,"sources":["../../scss/_reboot.scss","dist/css/bootstrap-reboot.css","bootstrap-reboot.css","../../scss/mixins/_hover.scss"],"names":[],"mappings":"AAoBA,KACE,mBAAA,WAAA,WAAA,WACA,YAAA,WACA,YAAA,KACA,yBAAA,KACA,qBAAA,KACA,mBAAA,UACA,4BAAA,YAGF,ECjBA,QADA,SDqBE,mBAAA,QAAA,WAAA,QAKA,cAAgB,MAAA,aASlB,KACE,OAAA,EACA,YAAA,aAAA,CAAA,kBAAA,CAAA,UAAA,CAAA,MAAA,CAAA,gBAAA,CAAA,KAAA,CAAA,WACA,UAAA,KACA,YAAA,IACA,YAAA,IACA,MAAA,QACA,iBAAA,KExBF,sBFiCE,QAAA,YASF,GACE,mBAAA,YAAA,WAAA,YACA,OAAA,EACA,SAAA,QAYF,GAAA,GAAA,GAAA,GAAA,GAAA,GACE,WAAA,EACA,cAAA,MAOF,EACE,WAAA,EACA,cAAA,KC5CF,0BDsDA,YAEE,gBAAA,UACA,gBAAA,UAAA,OACA,OAAA,KACA,cAAA,EAGF,QACE,cAAA,KACA,WAAA,OACA,YAAA,QClDF,GDqDA,GCtDA,GDyDE,WAAA,EACA,cAAA,KAGF,MCrDA,MACA,MAFA,MD0DE,cAAA,EAGF,GACE,YAAA,IAGF,GACE,cAAA,MACA,YAAA,EAGF,WACE,OAAA,EAAA,EAAA,KAGF,IACE,WAAA,OAGF,ECtDA,ODwDE,YAAA,OAGF,MACE,UAAA,IAQF,IC3DA,ID6DE,SAAA,SACA,UAAA,IACA,YAAA,EACA,eAAA,SAGF,IAAM,OAAA,OACN,IAAM,IAAA,MAON,EACE,MAAA,QACA,gBAAA,KACA,iBAAA,YACA,6BAAA,QGhLE,QHmLA,MAAA,QACA,gBAAA,UAUJ,8BACE,MAAA,QACA,gBAAA,KGrLE,oCAAA,oCHwLA,MAAA,QACA,gBAAA,KANJ,oCAUI,QAAA,EC7DJ,KACA,IDqEA,ICpEA,KDwEE,YAAA,SAAA,CAAA,UACA,UAAA,IAGF,IAEE,WAAA,EAEA,cAAA,KAEA,SAAA,KAQF,OAEE,OAAA,EAAA,EAAA,KAQF,IACE,eAAA,OACA,aAAA,KAGF,eACE,SAAA,OC/EF,cD6FA,EC/FA,KACA,OAEA,MACA,MACA,OACA,QACA,SDiGE,iBAAA,aAAA,aAAA,aAQF,MACE,gBAAA,SAGF,QACE,YAAA,OACA,eAAA,OACA,MAAA,QACA,WAAA,KACA,aAAA,OAGF,GAEE,WAAA,KAQF,MAEE,QAAA,aACA,cAAA,MAOF,aACE,QAAA,IAAA,OACA,QAAA,IAAA,KAAA,yBC3GF,OD8GA,MC5GA,SADA,OAEA,SDgHE,OAAA,EACA,YAAA,QACA,UAAA,QACA,YAAA,QAGF,OC9GA,MDgHE,SAAA,QAGF,OC9GA,ODgHE,eAAA,KC1GF,aACA,cD+GA,OCjHA,mBDqHE,mBAAA,OC9GF,gCACA,+BACA,gCDgHA,yBAIE,QAAA,EACA,aAAA,KC/GF,qBDkHA,kBAEE,mBAAA,WAAA,WAAA,WACA,QAAA,EAIF,iBCjHA,2BACA,kBAFA,iBD2HE,mBAAA,QAGF,SACE,SAAA,KAEA,OAAA,SAGF,SAME,UAAA,EAEA,QAAA,EACA,OAAA,EACA,OAAA,EAKF,OACE,QAAA,MACA,MAAA,KACA,UAAA,KACA,QAAA,EACA,cAAA,MACA,UAAA,OACA,YAAA,QACA,MAAA,QACA,YAAA,OAGF,SACE,eAAA,SEnIF,yCDMA,yCDmIE,OAAA,KEpIF,cF4IE,eAAA,KACA,mBAAA,KExIF,4CDMA,yCD2IE,mBAAA,KAQF,6BACE,KAAA,QACA,mBAAA,OAOF,OACE,QAAA,aAGF,QACE,QAAA,UAGF,SACE,QAAA,KErJF,SF2JE,QAAA"}
|
||||
{"version":3,"sources":["..\\..\\scss\\_reboot.scss","dist\\css\\bootstrap-reboot.css","bootstrap-reboot.css","..\\..\\scss\\mixins\\_hover.scss"],"names":[],"mappings":"AAoBA,KACE,mBAAA,WAAA,WAAA,WACA,YAAA,WACA,YAAA,KACA,yBAAA,KACA,qBAAA,KACA,mBAAA,UACA,4BAAA,YAGF,ECjBA,QADA,SDqBE,mBAAA,QAAA,WAAA,QAKA,cAAgB,MAAA,aAIlB,QAAA,MAAA,OAAA,WAAA,OAAA,OAAA,OAAA,OAAA,KAAA,IAAA,QACE,QAAA,MAQF,KACE,OAAA,EACA,YAAA,aAAA,CAAA,kBAAA,CAAA,UAAA,CAAA,MAAA,CAAA,gBAAA,CAAA,KAAA,CAAA,WACA,UAAA,KACA,YAAA,IACA,YAAA,IACA,MAAA,QACA,iBAAA,KExBF,sBFiCE,QAAA,YASF,GACE,mBAAA,YAAA,WAAA,YACA,OAAA,EACA,SAAA,QAYF,GAAA,GAAA,GAAA,GAAA,GAAA,GACE,WAAA,EACA,cAAA,MAOF,EACE,WAAA,EACA,cAAA,KC5CF,0BDsDA,YAEE,gBAAA,UACA,gBAAA,UAAA,OACA,OAAA,KACA,cAAA,EAGF,QACE,cAAA,KACA,WAAA,OACA,YAAA,QClDF,GDqDA,GCtDA,GDyDE,WAAA,EACA,cAAA,KAGF,MCrDA,MACA,MAFA,MD0DE,cAAA,EAGF,GACE,YAAA,IAGF,GACE,cAAA,MACA,YAAA,EAGF,WACE,OAAA,EAAA,EAAA,KAGF,IACE,WAAA,OAGF,ECtDA,ODwDE,YAAA,OAGF,MACE,UAAA,IAQF,IC3DA,ID6DE,SAAA,SACA,UAAA,IACA,YAAA,EACA,eAAA,SAGF,IAAM,OAAA,OACN,IAAM,IAAA,MAON,EACE,MAAA,QACA,gBAAA,KACA,iBAAA,YACA,6BAAA,QGpLE,QHuLA,MAAA,QACA,gBAAA,UAUJ,8BACE,MAAA,QACA,gBAAA,KGzLE,oCAAA,oCH4LA,MAAA,QACA,gBAAA,KANJ,oCAUI,QAAA,EC7DJ,KACA,IDqEA,ICpEA,KDwEE,YAAA,SAAA,CAAA,UACA,UAAA,IAGF,IAEE,WAAA,EAEA,cAAA,KAEA,SAAA,KAQF,OAEE,OAAA,EAAA,EAAA,KAQF,IACE,eAAA,OACA,aAAA,KAGF,eACE,SAAA,OC/EF,cD6FA,EC/FA,KACA,OAEA,MACA,MACA,OACA,QACA,SDiGE,iBAAA,aAAA,aAAA,aAQF,MACE,gBAAA,SAGF,QACE,YAAA,OACA,eAAA,OACA,MAAA,QACA,WAAA,KACA,aAAA,OAGF,GAEE,WAAA,KAQF,MAEE,QAAA,aACA,cAAA,MAOF,aACE,QAAA,IAAA,OACA,QAAA,IAAA,KAAA,yBC3GF,OD8GA,MC5GA,SADA,OAEA,SDgHE,OAAA,EACA,YAAA,QACA,UAAA,QACA,YAAA,QAGF,OC9GA,MDgHE,SAAA,QAGF,OC9GA,ODgHE,eAAA,KC1GF,aACA,cD+GA,OCjHA,mBDqHE,mBAAA,OC9GF,gCACA,+BACA,gCDgHA,yBAIE,QAAA,EACA,aAAA,KC/GF,qBDkHA,kBAEE,mBAAA,WAAA,WAAA,WACA,QAAA,EAIF,iBCjHA,2BACA,kBAFA,iBD2HE,mBAAA,QAGF,SACE,SAAA,KAEA,OAAA,SAGF,SAME,UAAA,EAEA,QAAA,EACA,OAAA,EACA,OAAA,EAKF,OACE,QAAA,MACA,MAAA,KACA,UAAA,KACA,QAAA,EACA,cAAA,MACA,UAAA,OACA,YAAA,QACA,MAAA,QACA,YAAA,OAGF,SACE,eAAA,SEnIF,yCDMA,yCDmIE,OAAA,KEpIF,cF4IE,eAAA,KACA,mBAAA,KExIF,4CDMA,yCD2IE,mBAAA,KAQF,6BACE,KAAA,QACA,mBAAA,OAOF,OACE,QAAA,aAGF,QACE,QAAA,UAGF,SACE,QAAA,KErJF,SF2JE,QAAA"}
|
|
@ -93,6 +93,10 @@ html {
|
|||
width: device-width;
|
||||
}
|
||||
|
||||
article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
|
@ -2887,24 +2891,24 @@ tbody.collapse.show {
|
|||
background-color: transparent;
|
||||
}
|
||||
|
||||
.show > .dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.show > a {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.dropdown-menu-right {
|
||||
right: 0;
|
||||
left: auto;
|
||||
left: auto !important;
|
||||
}
|
||||
|
||||
.dropdown-menu-left {
|
||||
right: auto;
|
||||
right: auto !important;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.dropdown-menu.show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dropdown-header {
|
||||
display: block;
|
||||
padding: 0.5rem 1.5rem;
|
||||
|
@ -2914,12 +2918,6 @@ tbody.collapse.show {
|
|||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.dropup .dropdown-menu {
|
||||
top: auto;
|
||||
bottom: 100%;
|
||||
margin-bottom: 0.125rem;
|
||||
}
|
||||
|
||||
.btn-group,
|
||||
.btn-group-vertical {
|
||||
position: relative;
|
||||
|
@ -5210,6 +5208,7 @@ button.close {
|
|||
position: absolute;
|
||||
z-index: 1070;
|
||||
display: block;
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
|
@ -5233,12 +5232,11 @@ button.close {
|
|||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.tooltip.tooltip-top, .tooltip.bs-tether-element-attached-bottom {
|
||||
.tooltip.bs-tooltip-top {
|
||||
padding: 5px 0;
|
||||
margin-top: -3px;
|
||||
}
|
||||
|
||||
.tooltip.tooltip-top .tooltip-inner::before, .tooltip.bs-tether-element-attached-bottom .tooltip-inner::before {
|
||||
.tooltip.bs-tooltip-top .arrow::before {
|
||||
bottom: 0;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
|
@ -5247,12 +5245,11 @@ button.close {
|
|||
border-top-color: #000;
|
||||
}
|
||||
|
||||
.tooltip.tooltip-right, .tooltip.bs-tether-element-attached-left {
|
||||
.tooltip.bs-tooltip-right {
|
||||
padding: 0 5px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.tooltip.tooltip-right .tooltip-inner::before, .tooltip.bs-tether-element-attached-left .tooltip-inner::before {
|
||||
.tooltip.bs-tooltip-right .arrow::before {
|
||||
top: 50%;
|
||||
left: 0;
|
||||
margin-top: -5px;
|
||||
|
@ -5261,12 +5258,11 @@ button.close {
|
|||
border-right-color: #000;
|
||||
}
|
||||
|
||||
.tooltip.tooltip-bottom, .tooltip.bs-tether-element-attached-top {
|
||||
.tooltip.bs-tooltip-bottom {
|
||||
padding: 5px 0;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.tooltip.tooltip-bottom .tooltip-inner::before, .tooltip.bs-tether-element-attached-top .tooltip-inner::before {
|
||||
.tooltip.bs-tooltip-bottom .arrow::before {
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin-left: -5px;
|
||||
|
@ -5275,12 +5271,11 @@ button.close {
|
|||
border-bottom-color: #000;
|
||||
}
|
||||
|
||||
.tooltip.tooltip-left, .tooltip.bs-tether-element-attached-right {
|
||||
.tooltip.bs-tooltip-left {
|
||||
padding: 0 5px;
|
||||
margin-left: -3px;
|
||||
}
|
||||
|
||||
.tooltip.tooltip-left .tooltip-inner::before, .tooltip.bs-tether-element-attached-right .tooltip-inner::before {
|
||||
.tooltip.bs-tooltip-left .arrow::before {
|
||||
top: 50%;
|
||||
right: 0;
|
||||
margin-top: -5px;
|
||||
|
@ -5289,6 +5284,14 @@ button.close {
|
|||
border-left-color: #000;
|
||||
}
|
||||
|
||||
.tooltip .arrow::before {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.tooltip-inner {
|
||||
max-width: 200px;
|
||||
padding: 3px 8px;
|
||||
|
@ -5298,14 +5301,6 @@ button.close {
|
|||
border-radius: 0.25rem;
|
||||
}
|
||||
|
||||
.tooltip-inner::before {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.popover {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
@ -5337,70 +5332,93 @@ button.close {
|
|||
border-radius: 0.3rem;
|
||||
}
|
||||
|
||||
.popover.popover-top, .popover.bs-tether-element-attached-bottom {
|
||||
margin-top: -10px;
|
||||
.popover .arrow::before,
|
||||
.popover .arrow::after {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.popover.popover-top::before, .popover.popover-top::after, .popover.bs-tether-element-attached-bottom::before, .popover.bs-tether-element-attached-bottom::after {
|
||||
.popover .arrow::before {
|
||||
content: "";
|
||||
border-width: 11px;
|
||||
}
|
||||
|
||||
.popover .arrow::after {
|
||||
content: "";
|
||||
border-width: 10px;
|
||||
}
|
||||
|
||||
.popover.bs-popover-top {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.popover.bs-popover-top .arrow::before,
|
||||
.popover.bs-popover-top .arrow::after {
|
||||
left: 50%;
|
||||
border-bottom-width: 0;
|
||||
}
|
||||
|
||||
.popover.popover-top::before, .popover.bs-tether-element-attached-bottom::before {
|
||||
.popover.bs-popover-top .arrow::before {
|
||||
bottom: -11px;
|
||||
margin-left: -11px;
|
||||
border-top-color: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.popover.popover-top::after, .popover.bs-tether-element-attached-bottom::after {
|
||||
.popover.bs-popover-top .arrow::after {
|
||||
bottom: -10px;
|
||||
margin-left: -10px;
|
||||
border-top-color: #fff;
|
||||
}
|
||||
|
||||
.popover.popover-right, .popover.bs-tether-element-attached-left {
|
||||
.popover.bs-popover-right {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.popover.popover-right::before, .popover.popover-right::after, .popover.bs-tether-element-attached-left::before, .popover.bs-tether-element-attached-left::after {
|
||||
.popover.bs-popover-right .arrow::before,
|
||||
.popover.bs-popover-right .arrow::after {
|
||||
top: 50%;
|
||||
border-left-width: 0;
|
||||
}
|
||||
|
||||
.popover.popover-right::before, .popover.bs-tether-element-attached-left::before {
|
||||
.popover.bs-popover-right .arrow::before {
|
||||
left: -11px;
|
||||
margin-top: -11px;
|
||||
border-right-color: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.popover.popover-right::after, .popover.bs-tether-element-attached-left::after {
|
||||
.popover.bs-popover-right .arrow::after {
|
||||
left: -10px;
|
||||
margin-top: -10px;
|
||||
border-right-color: #fff;
|
||||
}
|
||||
|
||||
.popover.popover-bottom, .popover.bs-tether-element-attached-top {
|
||||
.popover.bs-popover-bottom {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.popover.popover-bottom::before, .popover.popover-bottom::after, .popover.bs-tether-element-attached-top::before, .popover.bs-tether-element-attached-top::after {
|
||||
.popover.bs-popover-bottom .arrow::before,
|
||||
.popover.bs-popover-bottom .arrow::after {
|
||||
left: 50%;
|
||||
border-top-width: 0;
|
||||
}
|
||||
|
||||
.popover.popover-bottom::before, .popover.bs-tether-element-attached-top::before {
|
||||
.popover.bs-popover-bottom .arrow::before {
|
||||
top: -11px;
|
||||
margin-left: -11px;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.popover.popover-bottom::after, .popover.bs-tether-element-attached-top::after {
|
||||
.popover.bs-popover-bottom .arrow::after {
|
||||
top: -10px;
|
||||
margin-left: -10px;
|
||||
border-bottom-color: #fff;
|
||||
}
|
||||
|
||||
.popover.popover-bottom .popover-title::before, .popover.bs-tether-element-attached-top .popover-title::before {
|
||||
.popover.bs-popover-bottom .popover-title::before {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
|
@ -5411,22 +5429,23 @@ button.close {
|
|||
border-bottom: 1px solid #f7f7f7;
|
||||
}
|
||||
|
||||
.popover.popover-left, .popover.bs-tether-element-attached-right {
|
||||
margin-left: -10px;
|
||||
.popover.bs-popover-left {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.popover.popover-left::before, .popover.popover-left::after, .popover.bs-tether-element-attached-right::before, .popover.bs-tether-element-attached-right::after {
|
||||
.popover.bs-popover-left .arrow::before,
|
||||
.popover.bs-popover-left .arrow::after {
|
||||
top: 50%;
|
||||
border-right-width: 0;
|
||||
}
|
||||
|
||||
.popover.popover-left::before, .popover.bs-tether-element-attached-right::before {
|
||||
.popover.bs-popover-left .arrow::before {
|
||||
right: -11px;
|
||||
margin-top: -11px;
|
||||
border-left-color: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.popover.popover-left::after, .popover.bs-tether-element-attached-right::after {
|
||||
.popover.bs-popover-left .arrow::after {
|
||||
right: -10px;
|
||||
margin-top: -10px;
|
||||
border-left-color: #fff;
|
||||
|
@ -5452,26 +5471,6 @@ button.close {
|
|||
color: #292b2c;
|
||||
}
|
||||
|
||||
.popover::before,
|
||||
.popover::after {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-color: transparent;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.popover::before {
|
||||
content: "";
|
||||
border-width: 11px;
|
||||
}
|
||||
|
||||
.popover::after {
|
||||
content: "";
|
||||
border-width: 10px;
|
||||
}
|
||||
|
||||
.carousel {
|
||||
position: relative;
|
||||
}
|
||||
|
|
2
docs/dist/css/bootstrap.css.map
vendored
2
docs/dist/css/bootstrap.css.map
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/css/bootstrap.min.css
vendored
2
docs/dist/css/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
2
docs/dist/css/bootstrap.min.css.map
vendored
2
docs/dist/css/bootstrap.min.css.map
vendored
File diff suppressed because one or more lines are too long
|
@ -438,6 +438,9 @@ var Button = function ($) {
|
|||
}
|
||||
|
||||
if (triggerChangeEvent) {
|
||||
if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
|
||||
return;
|
||||
}
|
||||
input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
|
||||
$(input).trigger('change');
|
||||
}
|
||||
|
@ -1086,9 +1089,8 @@ var Collapse = function ($) {
|
|||
};
|
||||
|
||||
var Selector = {
|
||||
ACTIVES: '.card > .show, .card > .collapsing',
|
||||
DATA_TOGGLE: '[data-toggle="collapse"]',
|
||||
DATA_CHILDREN: 'data-children'
|
||||
ACTIVES: '.show, .collapsing',
|
||||
DATA_TOGGLE: '[data-toggle="collapse"]'
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -1105,20 +1107,13 @@ var Collapse = function ($) {
|
|||
this._element = element;
|
||||
this._config = this._getConfig(config);
|
||||
this._triggerArray = $.makeArray($('[data-toggle="collapse"][href="#' + element.id + '"],' + ('[data-toggle="collapse"][data-target="#' + element.id + '"]')));
|
||||
|
||||
this._parent = this._config.parent ? this._getParent() : null;
|
||||
|
||||
if (!this._config.parent) {
|
||||
this._addAriaAndCollapsedClass(this._element, this._triggerArray);
|
||||
}
|
||||
|
||||
this._selectorActives = Selector.ACTIVES;
|
||||
if (this._parent) {
|
||||
var childrenSelector = this._parent.hasAttribute(Selector.DATA_CHILDREN) ? this._parent.getAttribute(Selector.DATA_CHILDREN) : null;
|
||||
if (childrenSelector !== null) {
|
||||
this._selectorActives = childrenSelector + ' > .show, ' + childrenSelector + ' > .collapsing';
|
||||
}
|
||||
}
|
||||
|
||||
if (this._config.toggle) {
|
||||
this.toggle();
|
||||
}
|
||||
|
@ -1147,7 +1142,7 @@ var Collapse = function ($) {
|
|||
var activesData = void 0;
|
||||
|
||||
if (this._parent) {
|
||||
actives = $.makeArray($(this._parent).find(this._selectorActives));
|
||||
actives = $.makeArray($(this._parent).children().children(Selector.ACTIVES));
|
||||
if (!actives.length) {
|
||||
actives = null;
|
||||
}
|
||||
|
@ -1381,6 +1376,8 @@ var Collapse = function ($) {
|
|||
return Collapse;
|
||||
}(jQuery);
|
||||
|
||||
/* global Popper */
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v4.0.0-alpha.6): dropdown.js
|
||||
|
@ -1390,6 +1387,14 @@ var Collapse = function ($) {
|
|||
|
||||
var Dropdown = function ($) {
|
||||
|
||||
/**
|
||||
* Check for Popper dependency
|
||||
* Popper - https://popper.js.org
|
||||
*/
|
||||
if (typeof Popper === 'undefined') {
|
||||
throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)');
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
|
@ -1434,6 +1439,23 @@ var Dropdown = function ($) {
|
|||
VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled)'
|
||||
};
|
||||
|
||||
var AttachmentMap = {
|
||||
TOP: 'top-start',
|
||||
BOTTOM: 'bottom-start'
|
||||
};
|
||||
|
||||
var Default = {
|
||||
placement: AttachmentMap.BOTTOM,
|
||||
offset: 0,
|
||||
flip: true
|
||||
};
|
||||
|
||||
var DefaultType = {
|
||||
placement: 'string',
|
||||
offset: '(number|string)',
|
||||
flip: 'boolean'
|
||||
};
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
|
@ -1441,10 +1463,13 @@ var Dropdown = function ($) {
|
|||
*/
|
||||
|
||||
var Dropdown = function () {
|
||||
function Dropdown(element) {
|
||||
function Dropdown(element, config) {
|
||||
_classCallCheck(this, Dropdown);
|
||||
|
||||
this._element = element;
|
||||
this._popper = null;
|
||||
this._config = this._getConfig(config);
|
||||
this._menu = this._getMenuElement();
|
||||
|
||||
this._addEventListeners();
|
||||
}
|
||||
|
@ -1454,30 +1479,44 @@ var Dropdown = function ($) {
|
|||
// public
|
||||
|
||||
Dropdown.prototype.toggle = function toggle() {
|
||||
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
|
||||
return false;
|
||||
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = Dropdown._getParentFromElement(this);
|
||||
var isActive = $(parent).hasClass(ClassName.SHOW);
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
var isActive = $(this._menu).hasClass(ClassName.SHOW);
|
||||
|
||||
Dropdown._clearMenus();
|
||||
|
||||
if (isActive) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
var relatedTarget = {
|
||||
relatedTarget: this
|
||||
relatedTarget: this._element
|
||||
};
|
||||
var showEvent = $.Event(Event.SHOW, relatedTarget);
|
||||
|
||||
$(parent).trigger(showEvent);
|
||||
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle dropup
|
||||
var dropdownPlacement = $(this._element).parent().hasClass('dropup') ? AttachmentMap.TOP : this._config.placement;
|
||||
this._popper = new Popper(this._element, this._menu, {
|
||||
placement: dropdownPlacement,
|
||||
modifiers: {
|
||||
offset: {
|
||||
offset: this._config.offset
|
||||
},
|
||||
flip: {
|
||||
enabled: this._config.flip
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 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
|
||||
|
@ -1486,25 +1525,61 @@ var Dropdown = function ($) {
|
|||
$('body').children().on('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
this.focus();
|
||||
this.setAttribute('aria-expanded', true);
|
||||
this._element.focus();
|
||||
this._element.setAttribute('aria-expanded', true);
|
||||
|
||||
$(parent).toggleClass(ClassName.SHOW);
|
||||
$(parent).trigger($.Event(Event.SHOWN, relatedTarget));
|
||||
|
||||
return false;
|
||||
$(this._menu).toggleClass(ClassName.SHOW);
|
||||
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));
|
||||
};
|
||||
|
||||
Dropdown.prototype.dispose = function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
$(this._element).off(EVENT_KEY);
|
||||
this._element = null;
|
||||
this._menu = null;
|
||||
if (this._popper !== null) {
|
||||
this._popper.destroy();
|
||||
}
|
||||
this._popper = null;
|
||||
};
|
||||
|
||||
Dropdown.prototype.update = function update() {
|
||||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate();
|
||||
}
|
||||
};
|
||||
|
||||
// private
|
||||
|
||||
Dropdown.prototype._addEventListeners = function _addEventListeners() {
|
||||
$(this._element).on(Event.CLICK, this.toggle);
|
||||
var _this9 = this;
|
||||
|
||||
$(this._element).on(Event.CLICK, function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
_this9.toggle();
|
||||
});
|
||||
};
|
||||
|
||||
Dropdown.prototype._getConfig = function _getConfig(config) {
|
||||
var elementData = $(this._element).data();
|
||||
if (elementData.placement !== undefined) {
|
||||
elementData.placement = AttachmentMap[elementData.placement.toUpperCase()];
|
||||
}
|
||||
|
||||
config = $.extend({}, this.constructor.Default, $(this._element).data(), config);
|
||||
|
||||
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
|
||||
return config;
|
||||
};
|
||||
|
||||
Dropdown.prototype._getMenuElement = function _getMenuElement() {
|
||||
if (!this._menu) {
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
this._menu = $(parent).find(Selector.MENU)[0];
|
||||
}
|
||||
return this._menu;
|
||||
};
|
||||
|
||||
// static
|
||||
|
@ -1512,9 +1587,10 @@ var Dropdown = function ($) {
|
|||
Dropdown._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null;
|
||||
|
||||
if (!data) {
|
||||
data = new Dropdown(this);
|
||||
data = new Dropdown(this, _config);
|
||||
$(this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
|
@ -1522,7 +1598,7 @@ var Dropdown = function ($) {
|
|||
if (data[config] === undefined) {
|
||||
throw new Error('No method named "' + config + '"');
|
||||
}
|
||||
data[config].call(this);
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -1533,13 +1609,18 @@ var Dropdown = function ($) {
|
|||
}
|
||||
|
||||
var toggles = $.makeArray($(Selector.DATA_TOGGLE));
|
||||
|
||||
for (var i = 0; i < toggles.length; i++) {
|
||||
var parent = Dropdown._getParentFromElement(toggles[i]);
|
||||
var context = $(toggles[i]).data(DATA_KEY);
|
||||
var relatedTarget = {
|
||||
relatedTarget: toggles[i]
|
||||
};
|
||||
|
||||
if (!context) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var dropdownMenu = context._menu;
|
||||
if (!$(parent).hasClass(ClassName.SHOW)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -1562,6 +1643,7 @@ var Dropdown = function ($) {
|
|||
|
||||
toggles[i].setAttribute('aria-expanded', 'false');
|
||||
|
||||
$(dropdownMenu).removeClass(ClassName.SHOW);
|
||||
$(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
|
||||
}
|
||||
};
|
||||
|
@ -1633,6 +1715,16 @@ var Dropdown = function ($) {
|
|||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: 'DefaultType',
|
||||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Dropdown;
|
||||
|
@ -1644,7 +1736,11 @@ var Dropdown = function ($) {
|
|||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + ' ' + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
|
||||
$(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + ' ' + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
Dropdown._jQueryInterface.call($(this), 'toggle');
|
||||
}).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
|
@ -1763,7 +1859,7 @@ var Modal = function ($) {
|
|||
};
|
||||
|
||||
Modal.prototype.show = function show(relatedTarget) {
|
||||
var _this9 = this;
|
||||
var _this10 = this;
|
||||
|
||||
if (this._isTransitioning) {
|
||||
return;
|
||||
|
@ -1794,24 +1890,24 @@ var Modal = function ($) {
|
|||
this._setResizeEvent();
|
||||
|
||||
$(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function (event) {
|
||||
return _this9.hide(event);
|
||||
return _this10.hide(event);
|
||||
});
|
||||
|
||||
$(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () {
|
||||
$(_this9._element).one(Event.MOUSEUP_DISMISS, function (event) {
|
||||
if ($(event.target).is(_this9._element)) {
|
||||
_this9._ignoreBackdropClick = true;
|
||||
$(_this10._element).one(Event.MOUSEUP_DISMISS, function (event) {
|
||||
if ($(event.target).is(_this10._element)) {
|
||||
_this10._ignoreBackdropClick = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
this._showBackdrop(function () {
|
||||
return _this9._showElement(relatedTarget);
|
||||
return _this10._showElement(relatedTarget);
|
||||
});
|
||||
};
|
||||
|
||||
Modal.prototype.hide = function hide(event) {
|
||||
var _this10 = this;
|
||||
var _this11 = this;
|
||||
|
||||
if (event) {
|
||||
event.preventDefault();
|
||||
|
@ -1850,7 +1946,7 @@ var Modal = function ($) {
|
|||
if (transition) {
|
||||
|
||||
$(this._element).one(Util.TRANSITION_END, function (event) {
|
||||
return _this10._hideModal(event);
|
||||
return _this11._hideModal(event);
|
||||
}).emulateTransitionEnd(TRANSITION_DURATION);
|
||||
} else {
|
||||
this._hideModal();
|
||||
|
@ -1885,7 +1981,7 @@ var Modal = function ($) {
|
|||
};
|
||||
|
||||
Modal.prototype._showElement = function _showElement(relatedTarget) {
|
||||
var _this11 = this;
|
||||
var _this12 = this;
|
||||
|
||||
var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE);
|
||||
|
||||
|
@ -1913,11 +2009,11 @@ var Modal = function ($) {
|
|||
});
|
||||
|
||||
var transitionComplete = function transitionComplete() {
|
||||
if (_this11._config.focus) {
|
||||
_this11._element.focus();
|
||||
if (_this12._config.focus) {
|
||||
_this12._element.focus();
|
||||
}
|
||||
_this11._isTransitioning = false;
|
||||
$(_this11._element).trigger(shownEvent);
|
||||
_this12._isTransitioning = false;
|
||||
$(_this12._element).trigger(shownEvent);
|
||||
};
|
||||
|
||||
if (transition) {
|
||||
|
@ -1928,24 +2024,24 @@ var Modal = function ($) {
|
|||
};
|
||||
|
||||
Modal.prototype._enforceFocus = function _enforceFocus() {
|
||||
var _this12 = this;
|
||||
var _this13 = this;
|
||||
|
||||
$(document).off(Event.FOCUSIN) // guard against infinite focus loop
|
||||
.on(Event.FOCUSIN, function (event) {
|
||||
if (document !== event.target && _this12._element !== event.target && !$(_this12._element).has(event.target).length) {
|
||||
_this12._element.focus();
|
||||
if (document !== event.target && _this13._element !== event.target && !$(_this13._element).has(event.target).length) {
|
||||
_this13._element.focus();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Modal.prototype._setEscapeEvent = function _setEscapeEvent() {
|
||||
var _this13 = this;
|
||||
var _this14 = this;
|
||||
|
||||
if (this._isShown && this._config.keyboard) {
|
||||
$(this._element).on(Event.KEYDOWN_DISMISS, function (event) {
|
||||
if (event.which === ESCAPE_KEYCODE) {
|
||||
event.preventDefault();
|
||||
_this13.hide();
|
||||
_this14.hide();
|
||||
}
|
||||
});
|
||||
} else if (!this._isShown) {
|
||||
|
@ -1954,11 +2050,11 @@ var Modal = function ($) {
|
|||
};
|
||||
|
||||
Modal.prototype._setResizeEvent = function _setResizeEvent() {
|
||||
var _this14 = this;
|
||||
var _this15 = this;
|
||||
|
||||
if (this._isShown) {
|
||||
$(window).on(Event.RESIZE, function (event) {
|
||||
return _this14.handleUpdate(event);
|
||||
return _this15.handleUpdate(event);
|
||||
});
|
||||
} else {
|
||||
$(window).off(Event.RESIZE);
|
||||
|
@ -1966,16 +2062,16 @@ var Modal = function ($) {
|
|||
};
|
||||
|
||||
Modal.prototype._hideModal = function _hideModal() {
|
||||
var _this15 = this;
|
||||
var _this16 = this;
|
||||
|
||||
this._element.style.display = 'none';
|
||||
this._element.setAttribute('aria-hidden', true);
|
||||
this._isTransitioning = false;
|
||||
this._showBackdrop(function () {
|
||||
$(document.body).removeClass(ClassName.OPEN);
|
||||
_this15._resetAdjustments();
|
||||
_this15._resetScrollbar();
|
||||
$(_this15._element).trigger(Event.HIDDEN);
|
||||
_this16._resetAdjustments();
|
||||
_this16._resetScrollbar();
|
||||
$(_this16._element).trigger(Event.HIDDEN);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -1987,7 +2083,7 @@ var Modal = function ($) {
|
|||
};
|
||||
|
||||
Modal.prototype._showBackdrop = function _showBackdrop(callback) {
|
||||
var _this16 = this;
|
||||
var _this17 = this;
|
||||
|
||||
var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : '';
|
||||
|
||||
|
@ -2004,17 +2100,17 @@ var Modal = function ($) {
|
|||
$(this._backdrop).appendTo(document.body);
|
||||
|
||||
$(this._element).on(Event.CLICK_DISMISS, function (event) {
|
||||
if (_this16._ignoreBackdropClick) {
|
||||
_this16._ignoreBackdropClick = false;
|
||||
if (_this17._ignoreBackdropClick) {
|
||||
_this17._ignoreBackdropClick = false;
|
||||
return;
|
||||
}
|
||||
if (event.target !== event.currentTarget) {
|
||||
return;
|
||||
}
|
||||
if (_this16._config.backdrop === 'static') {
|
||||
_this16._element.focus();
|
||||
if (_this17._config.backdrop === 'static') {
|
||||
_this17._element.focus();
|
||||
} else {
|
||||
_this16.hide();
|
||||
_this17.hide();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -2038,7 +2134,7 @@ var Modal = function ($) {
|
|||
$(this._backdrop).removeClass(ClassName.SHOW);
|
||||
|
||||
var callbackRemove = function callbackRemove() {
|
||||
_this16._removeBackdrop();
|
||||
_this17._removeBackdrop();
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
|
@ -2082,7 +2178,7 @@ var Modal = function ($) {
|
|||
};
|
||||
|
||||
Modal.prototype._setScrollbar = function _setScrollbar() {
|
||||
var _this17 = this;
|
||||
var _this18 = this;
|
||||
|
||||
if (this._isBodyOverflowing) {
|
||||
// Note: DOMNode.style.paddingRight returns the actual value or '' if not set
|
||||
|
@ -2092,14 +2188,14 @@ var Modal = function ($) {
|
|||
$(Selector.FIXED_CONTENT).each(function (index, element) {
|
||||
var actualPadding = $(element)[0].style.paddingRight;
|
||||
var calculatedPadding = $(element).css('padding-right');
|
||||
$(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this17._scrollbarWidth + 'px');
|
||||
$(element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this18._scrollbarWidth + 'px');
|
||||
});
|
||||
|
||||
// Adjust navbar-toggler margin
|
||||
$(Selector.NAVBAR_TOGGLER).each(function (index, element) {
|
||||
var actualMargin = $(element)[0].style.marginRight;
|
||||
var calculatedMargin = $(element).css('margin-right');
|
||||
$(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this17._scrollbarWidth + 'px');
|
||||
$(element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) + _this18._scrollbarWidth + 'px');
|
||||
});
|
||||
|
||||
// Adjust body padding
|
||||
|
@ -2188,7 +2284,7 @@ var Modal = function ($) {
|
|||
*/
|
||||
|
||||
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
var _this18 = this;
|
||||
var _this19 = this;
|
||||
|
||||
var target = void 0;
|
||||
var selector = Util.getSelectorFromElement(this);
|
||||
|
@ -2210,8 +2306,8 @@ var Modal = function ($) {
|
|||
}
|
||||
|
||||
$target.one(Event.HIDDEN, function () {
|
||||
if ($(_this18).is(':visible')) {
|
||||
_this18.focus();
|
||||
if ($(_this19).is(':visible')) {
|
||||
_this19.focus();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -2305,7 +2401,7 @@ var ScrollSpy = function ($) {
|
|||
|
||||
var ScrollSpy = function () {
|
||||
function ScrollSpy(element, config) {
|
||||
var _this19 = this;
|
||||
var _this20 = this;
|
||||
|
||||
_classCallCheck(this, ScrollSpy);
|
||||
|
||||
|
@ -2319,7 +2415,7 @@ var ScrollSpy = function ($) {
|
|||
this._scrollHeight = 0;
|
||||
|
||||
$(this._scrollElement).on(Event.SCROLL, function (event) {
|
||||
return _this19._process(event);
|
||||
return _this20._process(event);
|
||||
});
|
||||
|
||||
this.refresh();
|
||||
|
@ -2331,7 +2427,7 @@ var ScrollSpy = function ($) {
|
|||
// public
|
||||
|
||||
ScrollSpy.prototype.refresh = function refresh() {
|
||||
var _this20 = this;
|
||||
var _this21 = this;
|
||||
|
||||
var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET;
|
||||
|
||||
|
@ -2367,8 +2463,8 @@ var ScrollSpy = function ($) {
|
|||
}).sort(function (a, b) {
|
||||
return a[0] - b[0];
|
||||
}).forEach(function (item) {
|
||||
_this20._offsets.push(item[0]);
|
||||
_this20._targets.push(item[1]);
|
||||
_this21._offsets.push(item[0]);
|
||||
_this21._targets.push(item[1]);
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -2615,7 +2711,7 @@ var Tab = function ($) {
|
|||
// public
|
||||
|
||||
Tab.prototype.show = function show() {
|
||||
var _this21 = this;
|
||||
var _this22 = this;
|
||||
|
||||
if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE) || $(this._element).hasClass(ClassName.DISABLED)) {
|
||||
return;
|
||||
|
@ -2657,7 +2753,7 @@ var Tab = function ($) {
|
|||
|
||||
var complete = function complete() {
|
||||
var hiddenEvent = $.Event(Event.HIDDEN, {
|
||||
relatedTarget: _this21._element
|
||||
relatedTarget: _this22._element
|
||||
});
|
||||
|
||||
var shownEvent = $.Event(Event.SHOWN, {
|
||||
|
@ -2665,7 +2761,7 @@ var Tab = function ($) {
|
|||
});
|
||||
|
||||
$(previous).trigger(hiddenEvent);
|
||||
$(_this21._element).trigger(shownEvent);
|
||||
$(_this22._element).trigger(shownEvent);
|
||||
};
|
||||
|
||||
if (target) {
|
||||
|
@ -2676,20 +2772,20 @@ var Tab = function ($) {
|
|||
};
|
||||
|
||||
Tab.prototype.dispose = function dispose() {
|
||||
$.removeClass(this._element, DATA_KEY);
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
};
|
||||
|
||||
// private
|
||||
|
||||
Tab.prototype._activate = function _activate(element, container, callback) {
|
||||
var _this22 = this;
|
||||
var _this23 = this;
|
||||
|
||||
var active = $(container).find(Selector.ACTIVE)[0];
|
||||
var isTransitioning = callback && Util.supportsTransitionEnd() && active && $(active).hasClass(ClassName.FADE);
|
||||
|
||||
var complete = function complete() {
|
||||
return _this22._transitionComplete(element, active, isTransitioning, callback);
|
||||
return _this23._transitionComplete(element, active, isTransitioning, callback);
|
||||
};
|
||||
|
||||
if (active && isTransitioning) {
|
||||
|
@ -2799,7 +2895,7 @@ var Tab = function ($) {
|
|||
return Tab;
|
||||
}(jQuery);
|
||||
|
||||
/* global Tether */
|
||||
/* global Popper */
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
|
@ -2811,11 +2907,11 @@ var Tab = function ($) {
|
|||
var Tooltip = function ($) {
|
||||
|
||||
/**
|
||||
* Check for Tether dependency
|
||||
* Tether - http://tether.io/
|
||||
* Check for Popper dependency
|
||||
* Popper - https://popper.js.org
|
||||
*/
|
||||
if (typeof Tether === 'undefined') {
|
||||
throw new Error('Bootstrap tooltips require Tether (http://tether.io/)');
|
||||
if (typeof Popper === 'undefined') {
|
||||
throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2830,22 +2926,8 @@ var Tooltip = function ($) {
|
|||
var EVENT_KEY = '.' + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 150;
|
||||
var CLASS_PREFIX = 'bs-tether';
|
||||
var TETHER_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g');
|
||||
|
||||
var Default = {
|
||||
animation: true,
|
||||
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-inner"></div></div>',
|
||||
trigger: 'hover focus',
|
||||
title: '',
|
||||
delay: 0,
|
||||
html: false,
|
||||
selector: false,
|
||||
placement: 'top',
|
||||
offset: '0 0',
|
||||
constraints: [],
|
||||
container: false
|
||||
};
|
||||
var CLASS_PREFIX = 'bs-tooltip';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g');
|
||||
|
||||
var DefaultType = {
|
||||
animation: 'boolean',
|
||||
|
@ -2856,16 +2938,30 @@ var Tooltip = function ($) {
|
|||
html: 'boolean',
|
||||
selector: '(string|boolean)',
|
||||
placement: '(string|function)',
|
||||
offset: 'string',
|
||||
constraints: 'array',
|
||||
container: '(string|element|boolean)'
|
||||
offset: '(number|string)',
|
||||
container: '(string|element|boolean)',
|
||||
fallbackPlacement: '(string|array)'
|
||||
};
|
||||
|
||||
var AttachmentMap = {
|
||||
TOP: 'bottom center',
|
||||
RIGHT: 'middle left',
|
||||
BOTTOM: 'top center',
|
||||
LEFT: 'middle right'
|
||||
TOP: 'top',
|
||||
RIGHT: 'right',
|
||||
BOTTOM: 'bottom',
|
||||
LEFT: 'left'
|
||||
};
|
||||
|
||||
var Default = {
|
||||
animation: true,
|
||||
template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
|
||||
trigger: 'hover focus',
|
||||
title: '',
|
||||
delay: 0,
|
||||
html: false,
|
||||
selector: false,
|
||||
placement: 'top',
|
||||
offset: 0,
|
||||
container: false,
|
||||
fallbackPlacement: 'flip'
|
||||
};
|
||||
|
||||
var HoverState = {
|
||||
|
@ -2896,11 +2992,6 @@ var Tooltip = function ($) {
|
|||
TOOLTIP_INNER: '.tooltip-inner'
|
||||
};
|
||||
|
||||
var TetherClass = {
|
||||
element: false,
|
||||
enabled: false
|
||||
};
|
||||
|
||||
var Trigger = {
|
||||
HOVER: 'hover',
|
||||
FOCUS: 'focus',
|
||||
|
@ -2923,7 +3014,7 @@ var Tooltip = function ($) {
|
|||
this._timeout = 0;
|
||||
this._hoverState = '';
|
||||
this._activeTrigger = {};
|
||||
this._tether = null;
|
||||
this._popper = null;
|
||||
|
||||
// protected
|
||||
this.element = element;
|
||||
|
@ -2980,8 +3071,6 @@ var Tooltip = function ($) {
|
|||
Tooltip.prototype.dispose = function dispose() {
|
||||
clearTimeout(this._timeout);
|
||||
|
||||
this.cleanupTether();
|
||||
|
||||
$.removeData(this.element, this.constructor.DATA_KEY);
|
||||
|
||||
$(this.element).off(this.constructor.EVENT_KEY);
|
||||
|
@ -2995,7 +3084,10 @@ var Tooltip = function ($) {
|
|||
this._timeout = null;
|
||||
this._hoverState = null;
|
||||
this._activeTrigger = null;
|
||||
this._tether = null;
|
||||
if (this._popper !== null) {
|
||||
this._popper.destroy();
|
||||
}
|
||||
this._popper = null;
|
||||
|
||||
this.element = null;
|
||||
this.config = null;
|
||||
|
@ -3003,7 +3095,7 @@ var Tooltip = function ($) {
|
|||
};
|
||||
|
||||
Tooltip.prototype.show = function show() {
|
||||
var _this23 = this;
|
||||
var _this24 = this;
|
||||
|
||||
if ($(this.element).css('display') === 'none') {
|
||||
throw new Error('Please use show on visible elements');
|
||||
|
@ -3034,6 +3126,7 @@ var Tooltip = function ($) {
|
|||
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
|
||||
|
||||
var attachment = this._getAttachment(placement);
|
||||
this.addAttachmentClass(attachment);
|
||||
|
||||
var container = this.config.container === false ? document.body : $(this.config.container);
|
||||
|
||||
|
@ -3045,20 +3138,26 @@ var Tooltip = function ($) {
|
|||
|
||||
$(this.element).trigger(this.constructor.Event.INSERTED);
|
||||
|
||||
this._tether = new Tether({
|
||||
attachment: attachment,
|
||||
element: tip,
|
||||
target: this.element,
|
||||
classes: TetherClass,
|
||||
classPrefix: CLASS_PREFIX,
|
||||
offset: this.config.offset,
|
||||
constraints: this.config.constraints,
|
||||
addTargetClasses: false
|
||||
this._popper = new Popper(this.element, tip, {
|
||||
placement: attachment,
|
||||
modifiers: {
|
||||
offset: {
|
||||
offset: this.config.offset
|
||||
},
|
||||
flip: {
|
||||
behavior: this.config.fallbackPlacement
|
||||
}
|
||||
},
|
||||
onCreate: function onCreate(data) {
|
||||
if (data.originalPlacement !== data.placement) {
|
||||
_this24._handlePopperPlacementChange(data);
|
||||
}
|
||||
},
|
||||
onUpdate: function onUpdate(data) {
|
||||
_this24._handlePopperPlacementChange(data);
|
||||
}
|
||||
});
|
||||
|
||||
Util.reflow(tip);
|
||||
this._tether.position();
|
||||
|
||||
$(tip).addClass(ClassName.SHOW);
|
||||
|
||||
// if this is a touch-enabled device we add extra
|
||||
|
@ -3070,39 +3169,43 @@ var Tooltip = function ($) {
|
|||
}
|
||||
|
||||
var complete = function complete() {
|
||||
var prevHoverState = _this23._hoverState;
|
||||
_this23._hoverState = null;
|
||||
if (_this24.config.animation) {
|
||||
_this24._fixTransition();
|
||||
}
|
||||
var prevHoverState = _this24._hoverState;
|
||||
_this24._hoverState = null;
|
||||
|
||||
$(_this23.element).trigger(_this23.constructor.Event.SHOWN);
|
||||
$(_this24.element).trigger(_this24.constructor.Event.SHOWN);
|
||||
|
||||
if (prevHoverState === HoverState.OUT) {
|
||||
_this23._leave(null, _this23);
|
||||
_this24._leave(null, _this24);
|
||||
}
|
||||
};
|
||||
|
||||
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
|
||||
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
|
||||
return;
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
|
||||
complete();
|
||||
}
|
||||
};
|
||||
|
||||
Tooltip.prototype.hide = function hide(callback) {
|
||||
var _this24 = this;
|
||||
var _this25 = this;
|
||||
|
||||
var tip = this.getTipElement();
|
||||
var hideEvent = $.Event(this.constructor.Event.HIDE);
|
||||
var complete = function complete() {
|
||||
if (_this24._hoverState !== HoverState.SHOW && tip.parentNode) {
|
||||
if (_this25._hoverState !== HoverState.SHOW && tip.parentNode) {
|
||||
tip.parentNode.removeChild(tip);
|
||||
}
|
||||
|
||||
_this24._cleanTipClass();
|
||||
_this24.element.removeAttribute('aria-describedby');
|
||||
$(_this24.element).trigger(_this24.constructor.Event.HIDDEN);
|
||||
_this24.cleanupTether();
|
||||
_this25._cleanTipClass();
|
||||
_this25.element.removeAttribute('aria-describedby');
|
||||
$(_this25.element).trigger(_this25.constructor.Event.HIDDEN);
|
||||
if (_this25._popper !== null) {
|
||||
_this25._popper.destroy();
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
|
@ -3137,24 +3240,30 @@ var Tooltip = function ($) {
|
|||
this._hoverState = '';
|
||||
};
|
||||
|
||||
Tooltip.prototype.update = function update() {
|
||||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate();
|
||||
}
|
||||
};
|
||||
|
||||
// protected
|
||||
|
||||
Tooltip.prototype.isWithContent = function isWithContent() {
|
||||
return Boolean(this.getTitle());
|
||||
};
|
||||
|
||||
Tooltip.prototype.addAttachmentClass = function addAttachmentClass(attachment) {
|
||||
$(this.getTipElement()).addClass(CLASS_PREFIX + '-' + attachment);
|
||||
};
|
||||
|
||||
Tooltip.prototype.getTipElement = function getTipElement() {
|
||||
return this.tip = this.tip || $(this.config.template)[0];
|
||||
};
|
||||
|
||||
Tooltip.prototype.setContent = function setContent() {
|
||||
var $tip = $(this.getTipElement());
|
||||
|
||||
this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
|
||||
|
||||
$tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
|
||||
|
||||
this.cleanupTether();
|
||||
};
|
||||
|
||||
Tooltip.prototype.setElementContent = function setElementContent($element, content) {
|
||||
|
@ -3183,49 +3292,35 @@ var Tooltip = function ($) {
|
|||
return title;
|
||||
};
|
||||
|
||||
Tooltip.prototype.cleanupTether = function cleanupTether() {
|
||||
if (this._tether) {
|
||||
this._tether.destroy();
|
||||
}
|
||||
};
|
||||
|
||||
// private
|
||||
|
||||
Tooltip.prototype._getAttachment = function _getAttachment(placement) {
|
||||
return AttachmentMap[placement.toUpperCase()];
|
||||
};
|
||||
|
||||
Tooltip.prototype._cleanTipClass = function _cleanTipClass() {
|
||||
var $tip = $(this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(TETHER_PREFIX_REGEX);
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
}
|
||||
};
|
||||
|
||||
Tooltip.prototype._setListeners = function _setListeners() {
|
||||
var _this25 = this;
|
||||
var _this26 = this;
|
||||
|
||||
var triggers = this.config.trigger.split(' ');
|
||||
|
||||
triggers.forEach(function (trigger) {
|
||||
if (trigger === 'click') {
|
||||
$(_this25.element).on(_this25.constructor.Event.CLICK, _this25.config.selector, function (event) {
|
||||
return _this25.toggle(event);
|
||||
$(_this26.element).on(_this26.constructor.Event.CLICK, _this26.config.selector, function (event) {
|
||||
return _this26.toggle(event);
|
||||
});
|
||||
} else if (trigger !== Trigger.MANUAL) {
|
||||
var eventIn = trigger === Trigger.HOVER ? _this25.constructor.Event.MOUSEENTER : _this25.constructor.Event.FOCUSIN;
|
||||
var eventOut = trigger === Trigger.HOVER ? _this25.constructor.Event.MOUSELEAVE : _this25.constructor.Event.FOCUSOUT;
|
||||
var eventIn = trigger === Trigger.HOVER ? _this26.constructor.Event.MOUSEENTER : _this26.constructor.Event.FOCUSIN;
|
||||
var eventOut = trigger === Trigger.HOVER ? _this26.constructor.Event.MOUSELEAVE : _this26.constructor.Event.FOCUSOUT;
|
||||
|
||||
$(_this25.element).on(eventIn, _this25.config.selector, function (event) {
|
||||
return _this25._enter(event);
|
||||
}).on(eventOut, _this25.config.selector, function (event) {
|
||||
return _this25._leave(event);
|
||||
$(_this26.element).on(eventIn, _this26.config.selector, function (event) {
|
||||
return _this26._enter(event);
|
||||
}).on(eventOut, _this26.config.selector, function (event) {
|
||||
return _this26._leave(event);
|
||||
});
|
||||
}
|
||||
|
||||
$(_this25.element).closest('.modal').on('hide.bs.modal', function () {
|
||||
return _this25.hide();
|
||||
$(_this26.element).closest('.modal').on('hide.bs.modal', function () {
|
||||
return _this26.hide();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -3363,6 +3458,32 @@ var Tooltip = function ($) {
|
|||
return config;
|
||||
};
|
||||
|
||||
Tooltip.prototype._cleanTipClass = function _cleanTipClass() {
|
||||
var $tip = $(this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
}
|
||||
};
|
||||
|
||||
Tooltip.prototype._handlePopperPlacementChange = function _handlePopperPlacementChange(data) {
|
||||
this._cleanTipClass();
|
||||
this.addAttachmentClass(this._getAttachment(data.placement));
|
||||
};
|
||||
|
||||
Tooltip.prototype._fixTransition = function _fixTransition() {
|
||||
var tip = this.getTipElement();
|
||||
var initConfigAnimation = this.config.animation;
|
||||
if (tip.getAttribute('x-placement') !== null) {
|
||||
return;
|
||||
}
|
||||
$(tip).removeClass(ClassName.FADE);
|
||||
this.config.animation = false;
|
||||
this.hide();
|
||||
this.show();
|
||||
this.config.animation = initConfigAnimation;
|
||||
};
|
||||
|
||||
// static
|
||||
|
||||
Tooltip._jQueryInterface = function _jQueryInterface(config) {
|
||||
|
@ -3464,12 +3585,14 @@ var Popover = function ($) {
|
|||
var DATA_KEY = 'bs.popover';
|
||||
var EVENT_KEY = '.' + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var CLASS_PREFIX = 'bs-popover';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g');
|
||||
|
||||
var Default = $.extend({}, Tooltip.Default, {
|
||||
placement: 'right',
|
||||
trigger: 'click',
|
||||
content: '',
|
||||
template: '<div class="popover" role="tooltip">' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>'
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>'
|
||||
});
|
||||
|
||||
var DefaultType = $.extend({}, Tooltip.DefaultType, {
|
||||
|
@ -3520,6 +3643,10 @@ var Popover = function ($) {
|
|||
return this.getTitle() || this._getContent();
|
||||
};
|
||||
|
||||
Popover.prototype.addAttachmentClass = function addAttachmentClass(attachment) {
|
||||
$(this.getTipElement()).addClass(CLASS_PREFIX + '-' + attachment);
|
||||
};
|
||||
|
||||
Popover.prototype.getTipElement = function getTipElement() {
|
||||
return this.tip = this.tip || $(this.config.template)[0];
|
||||
};
|
||||
|
@ -3532,8 +3659,6 @@ var Popover = function ($) {
|
|||
this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
|
||||
|
||||
$tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
|
||||
|
||||
this.cleanupTether();
|
||||
};
|
||||
|
||||
// private
|
||||
|
@ -3542,6 +3667,14 @@ var Popover = function ($) {
|
|||
return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);
|
||||
};
|
||||
|
||||
Popover.prototype._cleanTipClass = function _cleanTipClass() {
|
||||
var $tip = $(this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
}
|
||||
};
|
||||
|
||||
// static
|
||||
|
||||
Popover._jQueryInterface = function _jQueryInterface(config) {
|
||||
|
|
281
docs/dist/js/bootstrap.min.js
vendored
281
docs/dist/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
3
js/dist/button.js
vendored
3
js/dist/button.js
vendored
|
@ -82,6 +82,9 @@ var Button = function ($) {
|
|||
}
|
||||
|
||||
if (triggerChangeEvent) {
|
||||
if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
|
||||
return;
|
||||
}
|
||||
input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
|
||||
$(input).trigger('change');
|
||||
}
|
||||
|
|
2
js/dist/button.js.map
vendored
2
js/dist/button.js.map
vendored
File diff suppressed because one or more lines are too long
16
js/dist/collapse.js
vendored
16
js/dist/collapse.js
vendored
|
@ -58,9 +58,8 @@ var Collapse = function ($) {
|
|||
};
|
||||
|
||||
var Selector = {
|
||||
ACTIVES: '.card > .show, .card > .collapsing',
|
||||
DATA_TOGGLE: '[data-toggle="collapse"]',
|
||||
DATA_CHILDREN: 'data-children'
|
||||
ACTIVES: '.show, .collapsing',
|
||||
DATA_TOGGLE: '[data-toggle="collapse"]'
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -77,20 +76,13 @@ var Collapse = function ($) {
|
|||
this._element = element;
|
||||
this._config = this._getConfig(config);
|
||||
this._triggerArray = $.makeArray($('[data-toggle="collapse"][href="#' + element.id + '"],' + ('[data-toggle="collapse"][data-target="#' + element.id + '"]')));
|
||||
|
||||
this._parent = this._config.parent ? this._getParent() : null;
|
||||
|
||||
if (!this._config.parent) {
|
||||
this._addAriaAndCollapsedClass(this._element, this._triggerArray);
|
||||
}
|
||||
|
||||
this._selectorActives = Selector.ACTIVES;
|
||||
if (this._parent) {
|
||||
var childrenSelector = this._parent.hasAttribute(Selector.DATA_CHILDREN) ? this._parent.getAttribute(Selector.DATA_CHILDREN) : null;
|
||||
if (childrenSelector !== null) {
|
||||
this._selectorActives = childrenSelector + ' > .show, ' + childrenSelector + ' > .collapsing';
|
||||
}
|
||||
}
|
||||
|
||||
if (this._config.toggle) {
|
||||
this.toggle();
|
||||
}
|
||||
|
@ -119,7 +111,7 @@ var Collapse = function ($) {
|
|||
var activesData = void 0;
|
||||
|
||||
if (this._parent) {
|
||||
actives = $.makeArray($(this._parent).find(this._selectorActives));
|
||||
actives = $.makeArray($(this._parent).children().children(Selector.ACTIVES));
|
||||
if (!actives.length) {
|
||||
actives = null;
|
||||
}
|
||||
|
|
2
js/dist/collapse.js.map
vendored
2
js/dist/collapse.js.map
vendored
File diff suppressed because one or more lines are too long
141
js/dist/dropdown.js
vendored
141
js/dist/dropdown.js
vendored
|
@ -1,3 +1,5 @@
|
|||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
||||
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
@ -11,6 +13,14 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|||
|
||||
var Dropdown = function ($) {
|
||||
|
||||
/**
|
||||
* Check for Popper dependency
|
||||
* Popper - https://popper.js.org
|
||||
*/
|
||||
if (typeof Popper === 'undefined') {
|
||||
throw new Error('Bootstrap dropdown require Popper.js (https://popper.js.org)');
|
||||
}
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Constants
|
||||
|
@ -55,6 +65,23 @@ var Dropdown = function ($) {
|
|||
VISIBLE_ITEMS: '.dropdown-menu .dropdown-item:not(.disabled)'
|
||||
};
|
||||
|
||||
var AttachmentMap = {
|
||||
TOP: 'top-start',
|
||||
BOTTOM: 'bottom-start'
|
||||
};
|
||||
|
||||
var Default = {
|
||||
placement: AttachmentMap.BOTTOM,
|
||||
offset: 0,
|
||||
flip: true
|
||||
};
|
||||
|
||||
var DefaultType = {
|
||||
placement: 'string',
|
||||
offset: '(number|string)',
|
||||
flip: 'boolean'
|
||||
};
|
||||
|
||||
/**
|
||||
* ------------------------------------------------------------------------
|
||||
* Class Definition
|
||||
|
@ -62,10 +89,13 @@ var Dropdown = function ($) {
|
|||
*/
|
||||
|
||||
var Dropdown = function () {
|
||||
function Dropdown(element) {
|
||||
function Dropdown(element, config) {
|
||||
_classCallCheck(this, Dropdown);
|
||||
|
||||
this._element = element;
|
||||
this._popper = null;
|
||||
this._config = this._getConfig(config);
|
||||
this._menu = this._getMenuElement();
|
||||
|
||||
this._addEventListeners();
|
||||
}
|
||||
|
@ -75,30 +105,44 @@ var Dropdown = function ($) {
|
|||
// public
|
||||
|
||||
Dropdown.prototype.toggle = function toggle() {
|
||||
if (this.disabled || $(this).hasClass(ClassName.DISABLED)) {
|
||||
return false;
|
||||
if (this._element.disabled || $(this._element).hasClass(ClassName.DISABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = Dropdown._getParentFromElement(this);
|
||||
var isActive = $(parent).hasClass(ClassName.SHOW);
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
var isActive = $(this._menu).hasClass(ClassName.SHOW);
|
||||
|
||||
Dropdown._clearMenus();
|
||||
|
||||
if (isActive) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
var relatedTarget = {
|
||||
relatedTarget: this
|
||||
relatedTarget: this._element
|
||||
};
|
||||
var showEvent = $.Event(Event.SHOW, relatedTarget);
|
||||
|
||||
$(parent).trigger(showEvent);
|
||||
|
||||
if (showEvent.isDefaultPrevented()) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle dropup
|
||||
var dropdownPlacement = $(this._element).parent().hasClass('dropup') ? AttachmentMap.TOP : this._config.placement;
|
||||
this._popper = new Popper(this._element, this._menu, {
|
||||
placement: dropdownPlacement,
|
||||
modifiers: {
|
||||
offset: {
|
||||
offset: this._config.offset
|
||||
},
|
||||
flip: {
|
||||
enabled: this._config.flip
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 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
|
||||
|
@ -107,25 +151,61 @@ var Dropdown = function ($) {
|
|||
$('body').children().on('mouseover', null, $.noop);
|
||||
}
|
||||
|
||||
this.focus();
|
||||
this.setAttribute('aria-expanded', true);
|
||||
this._element.focus();
|
||||
this._element.setAttribute('aria-expanded', true);
|
||||
|
||||
$(parent).toggleClass(ClassName.SHOW);
|
||||
$(parent).trigger($.Event(Event.SHOWN, relatedTarget));
|
||||
|
||||
return false;
|
||||
$(this._menu).toggleClass(ClassName.SHOW);
|
||||
$(parent).toggleClass(ClassName.SHOW).trigger($.Event(Event.SHOWN, relatedTarget));
|
||||
};
|
||||
|
||||
Dropdown.prototype.dispose = function dispose() {
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
$(this._element).off(EVENT_KEY);
|
||||
this._element = null;
|
||||
this._menu = null;
|
||||
if (this._popper !== null) {
|
||||
this._popper.destroy();
|
||||
}
|
||||
this._popper = null;
|
||||
};
|
||||
|
||||
Dropdown.prototype.update = function update() {
|
||||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate();
|
||||
}
|
||||
};
|
||||
|
||||
// private
|
||||
|
||||
Dropdown.prototype._addEventListeners = function _addEventListeners() {
|
||||
$(this._element).on(Event.CLICK, this.toggle);
|
||||
var _this = this;
|
||||
|
||||
$(this._element).on(Event.CLICK, function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
_this.toggle();
|
||||
});
|
||||
};
|
||||
|
||||
Dropdown.prototype._getConfig = function _getConfig(config) {
|
||||
var elementData = $(this._element).data();
|
||||
if (elementData.placement !== undefined) {
|
||||
elementData.placement = AttachmentMap[elementData.placement.toUpperCase()];
|
||||
}
|
||||
|
||||
config = $.extend({}, this.constructor.Default, $(this._element).data(), config);
|
||||
|
||||
Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
|
||||
|
||||
return config;
|
||||
};
|
||||
|
||||
Dropdown.prototype._getMenuElement = function _getMenuElement() {
|
||||
if (!this._menu) {
|
||||
var parent = Dropdown._getParentFromElement(this._element);
|
||||
this._menu = $(parent).find(Selector.MENU)[0];
|
||||
}
|
||||
return this._menu;
|
||||
};
|
||||
|
||||
// static
|
||||
|
@ -133,9 +213,10 @@ var Dropdown = function ($) {
|
|||
Dropdown._jQueryInterface = function _jQueryInterface(config) {
|
||||
return this.each(function () {
|
||||
var data = $(this).data(DATA_KEY);
|
||||
var _config = (typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object' ? config : null;
|
||||
|
||||
if (!data) {
|
||||
data = new Dropdown(this);
|
||||
data = new Dropdown(this, _config);
|
||||
$(this).data(DATA_KEY, data);
|
||||
}
|
||||
|
||||
|
@ -143,7 +224,7 @@ var Dropdown = function ($) {
|
|||
if (data[config] === undefined) {
|
||||
throw new Error('No method named "' + config + '"');
|
||||
}
|
||||
data[config].call(this);
|
||||
data[config]();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@ -154,13 +235,18 @@ var Dropdown = function ($) {
|
|||
}
|
||||
|
||||
var toggles = $.makeArray($(Selector.DATA_TOGGLE));
|
||||
|
||||
for (var i = 0; i < toggles.length; i++) {
|
||||
var parent = Dropdown._getParentFromElement(toggles[i]);
|
||||
var context = $(toggles[i]).data(DATA_KEY);
|
||||
var relatedTarget = {
|
||||
relatedTarget: toggles[i]
|
||||
};
|
||||
|
||||
if (!context) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var dropdownMenu = context._menu;
|
||||
if (!$(parent).hasClass(ClassName.SHOW)) {
|
||||
continue;
|
||||
}
|
||||
|
@ -183,6 +269,7 @@ var Dropdown = function ($) {
|
|||
|
||||
toggles[i].setAttribute('aria-expanded', 'false');
|
||||
|
||||
$(dropdownMenu).removeClass(ClassName.SHOW);
|
||||
$(parent).removeClass(ClassName.SHOW).trigger($.Event(Event.HIDDEN, relatedTarget));
|
||||
}
|
||||
};
|
||||
|
@ -254,6 +341,16 @@ var Dropdown = function ($) {
|
|||
get: function get() {
|
||||
return VERSION;
|
||||
}
|
||||
}, {
|
||||
key: 'Default',
|
||||
get: function get() {
|
||||
return Default;
|
||||
}
|
||||
}, {
|
||||
key: 'DefaultType',
|
||||
get: function get() {
|
||||
return DefaultType;
|
||||
}
|
||||
}]);
|
||||
|
||||
return Dropdown;
|
||||
|
@ -265,7 +362,11 @@ var Dropdown = function ($) {
|
|||
* ------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
$(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + ' ' + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
|
||||
$(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.MENU, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API + ' ' + Event.KEYUP_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
Dropdown._jQueryInterface.call($(this), 'toggle');
|
||||
}).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
|
@ -283,5 +384,5 @@ var Dropdown = function ($) {
|
|||
};
|
||||
|
||||
return Dropdown;
|
||||
}(jQuery);
|
||||
}(jQuery); /* global Popper */
|
||||
//# sourceMappingURL=dropdown.js.map
|
2
js/dist/dropdown.js.map
vendored
2
js/dist/dropdown.js.map
vendored
File diff suppressed because one or more lines are too long
18
js/dist/popover.js
vendored
18
js/dist/popover.js
vendored
|
@ -28,12 +28,14 @@ var Popover = function ($) {
|
|||
var DATA_KEY = 'bs.popover';
|
||||
var EVENT_KEY = '.' + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var CLASS_PREFIX = 'bs-popover';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g');
|
||||
|
||||
var Default = $.extend({}, Tooltip.Default, {
|
||||
placement: 'right',
|
||||
trigger: 'click',
|
||||
content: '',
|
||||
template: '<div class="popover" role="tooltip">' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>'
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>'
|
||||
});
|
||||
|
||||
var DefaultType = $.extend({}, Tooltip.DefaultType, {
|
||||
|
@ -84,6 +86,10 @@ var Popover = function ($) {
|
|||
return this.getTitle() || this._getContent();
|
||||
};
|
||||
|
||||
Popover.prototype.addAttachmentClass = function addAttachmentClass(attachment) {
|
||||
$(this.getTipElement()).addClass(CLASS_PREFIX + '-' + attachment);
|
||||
};
|
||||
|
||||
Popover.prototype.getTipElement = function getTipElement() {
|
||||
return this.tip = this.tip || $(this.config.template)[0];
|
||||
};
|
||||
|
@ -96,8 +102,6 @@ var Popover = function ($) {
|
|||
this.setElementContent($tip.find(Selector.CONTENT), this._getContent());
|
||||
|
||||
$tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
|
||||
|
||||
this.cleanupTether();
|
||||
};
|
||||
|
||||
// private
|
||||
|
@ -106,6 +110,14 @@ var Popover = function ($) {
|
|||
return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content);
|
||||
};
|
||||
|
||||
Popover.prototype._cleanTipClass = function _cleanTipClass() {
|
||||
var $tip = $(this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
}
|
||||
};
|
||||
|
||||
// static
|
||||
|
||||
Popover._jQueryInterface = function _jQueryInterface(config) {
|
||||
|
|
2
js/dist/popover.js.map
vendored
2
js/dist/popover.js.map
vendored
File diff suppressed because one or more lines are too long
2
js/dist/tab.js
vendored
2
js/dist/tab.js
vendored
|
@ -129,7 +129,7 @@ var Tab = function ($) {
|
|||
};
|
||||
|
||||
Tab.prototype.dispose = function dispose() {
|
||||
$.removeClass(this._element, DATA_KEY);
|
||||
$.removeData(this._element, DATA_KEY);
|
||||
this._element = null;
|
||||
};
|
||||
|
||||
|
|
2
js/dist/tab.js.map
vendored
2
js/dist/tab.js.map
vendored
File diff suppressed because one or more lines are too long
167
js/dist/tooltip.js
vendored
167
js/dist/tooltip.js
vendored
|
@ -14,11 +14,11 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|||
var Tooltip = function ($) {
|
||||
|
||||
/**
|
||||
* Check for Tether dependency
|
||||
* Tether - http://tether.io/
|
||||
* Check for Popper dependency
|
||||
* Popper - https://popper.js.org
|
||||
*/
|
||||
if (typeof Tether === 'undefined') {
|
||||
throw new Error('Bootstrap tooltips require Tether (http://tether.io/)');
|
||||
if (typeof Popper === 'undefined') {
|
||||
throw new Error('Bootstrap tooltips require Popper.js (https://popper.js.org)');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -33,22 +33,8 @@ var Tooltip = function ($) {
|
|||
var EVENT_KEY = '.' + DATA_KEY;
|
||||
var JQUERY_NO_CONFLICT = $.fn[NAME];
|
||||
var TRANSITION_DURATION = 150;
|
||||
var CLASS_PREFIX = 'bs-tether';
|
||||
var TETHER_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g');
|
||||
|
||||
var Default = {
|
||||
animation: true,
|
||||
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-inner"></div></div>',
|
||||
trigger: 'hover focus',
|
||||
title: '',
|
||||
delay: 0,
|
||||
html: false,
|
||||
selector: false,
|
||||
placement: 'top',
|
||||
offset: '0 0',
|
||||
constraints: [],
|
||||
container: false
|
||||
};
|
||||
var CLASS_PREFIX = 'bs-tooltip';
|
||||
var BSCLS_PREFIX_REGEX = new RegExp('(^|\\s)' + CLASS_PREFIX + '\\S+', 'g');
|
||||
|
||||
var DefaultType = {
|
||||
animation: 'boolean',
|
||||
|
@ -59,16 +45,30 @@ var Tooltip = function ($) {
|
|||
html: 'boolean',
|
||||
selector: '(string|boolean)',
|
||||
placement: '(string|function)',
|
||||
offset: 'string',
|
||||
constraints: 'array',
|
||||
container: '(string|element|boolean)'
|
||||
offset: '(number|string)',
|
||||
container: '(string|element|boolean)',
|
||||
fallbackPlacement: '(string|array)'
|
||||
};
|
||||
|
||||
var AttachmentMap = {
|
||||
TOP: 'bottom center',
|
||||
RIGHT: 'middle left',
|
||||
BOTTOM: 'top center',
|
||||
LEFT: 'middle right'
|
||||
TOP: 'top',
|
||||
RIGHT: 'right',
|
||||
BOTTOM: 'bottom',
|
||||
LEFT: 'left'
|
||||
};
|
||||
|
||||
var Default = {
|
||||
animation: true,
|
||||
template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>',
|
||||
trigger: 'hover focus',
|
||||
title: '',
|
||||
delay: 0,
|
||||
html: false,
|
||||
selector: false,
|
||||
placement: 'top',
|
||||
offset: 0,
|
||||
container: false,
|
||||
fallbackPlacement: 'flip'
|
||||
};
|
||||
|
||||
var HoverState = {
|
||||
|
@ -99,11 +99,6 @@ var Tooltip = function ($) {
|
|||
TOOLTIP_INNER: '.tooltip-inner'
|
||||
};
|
||||
|
||||
var TetherClass = {
|
||||
element: false,
|
||||
enabled: false
|
||||
};
|
||||
|
||||
var Trigger = {
|
||||
HOVER: 'hover',
|
||||
FOCUS: 'focus',
|
||||
|
@ -126,7 +121,7 @@ var Tooltip = function ($) {
|
|||
this._timeout = 0;
|
||||
this._hoverState = '';
|
||||
this._activeTrigger = {};
|
||||
this._tether = null;
|
||||
this._popper = null;
|
||||
|
||||
// protected
|
||||
this.element = element;
|
||||
|
@ -183,8 +178,6 @@ var Tooltip = function ($) {
|
|||
Tooltip.prototype.dispose = function dispose() {
|
||||
clearTimeout(this._timeout);
|
||||
|
||||
this.cleanupTether();
|
||||
|
||||
$.removeData(this.element, this.constructor.DATA_KEY);
|
||||
|
||||
$(this.element).off(this.constructor.EVENT_KEY);
|
||||
|
@ -198,7 +191,10 @@ var Tooltip = function ($) {
|
|||
this._timeout = null;
|
||||
this._hoverState = null;
|
||||
this._activeTrigger = null;
|
||||
this._tether = null;
|
||||
if (this._popper !== null) {
|
||||
this._popper.destroy();
|
||||
}
|
||||
this._popper = null;
|
||||
|
||||
this.element = null;
|
||||
this.config = null;
|
||||
|
@ -237,6 +233,7 @@ var Tooltip = function ($) {
|
|||
var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
|
||||
|
||||
var attachment = this._getAttachment(placement);
|
||||
this.addAttachmentClass(attachment);
|
||||
|
||||
var container = this.config.container === false ? document.body : $(this.config.container);
|
||||
|
||||
|
@ -248,20 +245,26 @@ var Tooltip = function ($) {
|
|||
|
||||
$(this.element).trigger(this.constructor.Event.INSERTED);
|
||||
|
||||
this._tether = new Tether({
|
||||
attachment: attachment,
|
||||
element: tip,
|
||||
target: this.element,
|
||||
classes: TetherClass,
|
||||
classPrefix: CLASS_PREFIX,
|
||||
offset: this.config.offset,
|
||||
constraints: this.config.constraints,
|
||||
addTargetClasses: false
|
||||
this._popper = new Popper(this.element, tip, {
|
||||
placement: attachment,
|
||||
modifiers: {
|
||||
offset: {
|
||||
offset: this.config.offset
|
||||
},
|
||||
flip: {
|
||||
behavior: this.config.fallbackPlacement
|
||||
}
|
||||
},
|
||||
onCreate: function onCreate(data) {
|
||||
if (data.originalPlacement !== data.placement) {
|
||||
_this._handlePopperPlacementChange(data);
|
||||
}
|
||||
},
|
||||
onUpdate: function onUpdate(data) {
|
||||
_this._handlePopperPlacementChange(data);
|
||||
}
|
||||
});
|
||||
|
||||
Util.reflow(tip);
|
||||
this._tether.position();
|
||||
|
||||
$(tip).addClass(ClassName.SHOW);
|
||||
|
||||
// if this is a touch-enabled device we add extra
|
||||
|
@ -273,6 +276,9 @@ var Tooltip = function ($) {
|
|||
}
|
||||
|
||||
var complete = function complete() {
|
||||
if (_this.config.animation) {
|
||||
_this._fixTransition();
|
||||
}
|
||||
var prevHoverState = _this._hoverState;
|
||||
_this._hoverState = null;
|
||||
|
||||
|
@ -285,10 +291,9 @@ var Tooltip = function ($) {
|
|||
|
||||
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
|
||||
$(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION);
|
||||
return;
|
||||
} else {
|
||||
complete();
|
||||
}
|
||||
|
||||
complete();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -305,7 +310,9 @@ var Tooltip = function ($) {
|
|||
_this2._cleanTipClass();
|
||||
_this2.element.removeAttribute('aria-describedby');
|
||||
$(_this2.element).trigger(_this2.constructor.Event.HIDDEN);
|
||||
_this2.cleanupTether();
|
||||
if (_this2._popper !== null) {
|
||||
_this2._popper.destroy();
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
|
@ -340,24 +347,30 @@ var Tooltip = function ($) {
|
|||
this._hoverState = '';
|
||||
};
|
||||
|
||||
Tooltip.prototype.update = function update() {
|
||||
if (this._popper !== null) {
|
||||
this._popper.scheduleUpdate();
|
||||
}
|
||||
};
|
||||
|
||||
// protected
|
||||
|
||||
Tooltip.prototype.isWithContent = function isWithContent() {
|
||||
return Boolean(this.getTitle());
|
||||
};
|
||||
|
||||
Tooltip.prototype.addAttachmentClass = function addAttachmentClass(attachment) {
|
||||
$(this.getTipElement()).addClass(CLASS_PREFIX + '-' + attachment);
|
||||
};
|
||||
|
||||
Tooltip.prototype.getTipElement = function getTipElement() {
|
||||
return this.tip = this.tip || $(this.config.template)[0];
|
||||
};
|
||||
|
||||
Tooltip.prototype.setContent = function setContent() {
|
||||
var $tip = $(this.getTipElement());
|
||||
|
||||
this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle());
|
||||
|
||||
$tip.removeClass(ClassName.FADE + ' ' + ClassName.SHOW);
|
||||
|
||||
this.cleanupTether();
|
||||
};
|
||||
|
||||
Tooltip.prototype.setElementContent = function setElementContent($element, content) {
|
||||
|
@ -386,26 +399,12 @@ var Tooltip = function ($) {
|
|||
return title;
|
||||
};
|
||||
|
||||
Tooltip.prototype.cleanupTether = function cleanupTether() {
|
||||
if (this._tether) {
|
||||
this._tether.destroy();
|
||||
}
|
||||
};
|
||||
|
||||
// private
|
||||
|
||||
Tooltip.prototype._getAttachment = function _getAttachment(placement) {
|
||||
return AttachmentMap[placement.toUpperCase()];
|
||||
};
|
||||
|
||||
Tooltip.prototype._cleanTipClass = function _cleanTipClass() {
|
||||
var $tip = $(this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(TETHER_PREFIX_REGEX);
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
}
|
||||
};
|
||||
|
||||
Tooltip.prototype._setListeners = function _setListeners() {
|
||||
var _this3 = this;
|
||||
|
||||
|
@ -566,6 +565,32 @@ var Tooltip = function ($) {
|
|||
return config;
|
||||
};
|
||||
|
||||
Tooltip.prototype._cleanTipClass = function _cleanTipClass() {
|
||||
var $tip = $(this.getTipElement());
|
||||
var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX);
|
||||
if (tabClass !== null && tabClass.length > 0) {
|
||||
$tip.removeClass(tabClass.join(''));
|
||||
}
|
||||
};
|
||||
|
||||
Tooltip.prototype._handlePopperPlacementChange = function _handlePopperPlacementChange(data) {
|
||||
this._cleanTipClass();
|
||||
this.addAttachmentClass(this._getAttachment(data.placement));
|
||||
};
|
||||
|
||||
Tooltip.prototype._fixTransition = function _fixTransition() {
|
||||
var tip = this.getTipElement();
|
||||
var initConfigAnimation = this.config.animation;
|
||||
if (tip.getAttribute('x-placement') !== null) {
|
||||
return;
|
||||
}
|
||||
$(tip).removeClass(ClassName.FADE);
|
||||
this.config.animation = false;
|
||||
this.hide();
|
||||
this.show();
|
||||
this.config.animation = initConfigAnimation;
|
||||
};
|
||||
|
||||
// static
|
||||
|
||||
Tooltip._jQueryInterface = function _jQueryInterface(config) {
|
||||
|
@ -645,5 +670,5 @@ var Tooltip = function ($) {
|
|||
};
|
||||
|
||||
return Tooltip;
|
||||
}(jQuery); /* global Tether */
|
||||
}(jQuery); /* global Popper */
|
||||
//# sourceMappingURL=tooltip.js.map
|
2
js/dist/tooltip.js.map
vendored
2
js/dist/tooltip.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue