Commit 3452e8dc authored by fat's avatar fat

rewritten tooltip + tether integration and death to our positioner jank

parent 8eee78ca
...@@ -71,7 +71,8 @@ module.exports = function (grunt) { ...@@ -71,7 +71,8 @@ module.exports = function (grunt) {
'js/dist/dropdown.js' : 'js/src/dropdown.js', 'js/dist/dropdown.js' : 'js/src/dropdown.js',
'js/dist/modal.js' : 'js/src/modal.js', 'js/dist/modal.js' : 'js/src/modal.js',
'js/dist/scrollspy.js' : 'js/src/scrollspy.js', 'js/dist/scrollspy.js' : 'js/src/scrollspy.js',
'js/dist/tab.js' : 'js/src/tab.js' 'js/dist/tab.js' : 'js/src/tab.js',
'js/dist/tooltip.js' : 'js/src/tooltip.js'
} }
} }
}, },
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff was suppressed by a .gitattributes entry.
...@@ -3,4 +3,1256 @@ ...@@ -3,4 +3,1256 @@
* Copyright 2011-2014 Twitter, Inc. * Copyright 2011-2014 Twitter, Inc.
* Licensed under the Creative Commons Attribution 3.0 Unported License. For * Licensed under the Creative Commons Attribution 3.0 Unported License. For
* details, see http://creativecommons.org/licenses/by/3.0/. * details, see http://creativecommons.org/licenses/by/3.0/.
*/.bd-featurette,.bd-footer{border-top:1px solid #eee}.bd-example:after,.bd-header:after{clear:both}.ge,.sd{font-style:italic}.bd-container{position:relative;max-width:62rem;padding:0 1rem 1rem;margin-right:auto;margin-left:auto}@media (min-width:768px){.bd-container{padding:2rem}}@media (min-width:992px){.bd-container{padding:4rem}}.bd-container>table{display:block;width:100%;max-width:100%;overflow-y:auto;margin-bottom:1rem}.bd-container>table>tbody>tr>td,.bd-container>table>tbody>tr>th,.bd-container>table>tfoot>tr>td,.bd-container>table>tfoot>tr>th,.bd-container>table>thead>tr>td,.bd-container>table>thead>tr>th{padding:.75rem;line-height:1.5;vertical-align:top;border:1px solid #eceeef}.bd-container>table td:first-child>code{white-space:nowrap}.bd-content>h2{margin-top:3rem}.bd-content>h3{margin-top:1.5rem}.bd-content>ol li,.bd-content>ul li{margin-bottom:.25rem}@media (min-width:34em){.bd-title{font-size:4rem}.bd-title+p{font-size:1.5rem;font-weight:300}}.bd-sidebar{padding:0;margin-bottom:0;background-color:#fafafa}.bd-sidebar .navbar-toggler{position:absolute;top:1.25rem;right:0;z-index:5}.bd-sidebar .navbar-header{float:none;margin-right:-15px}.bd-sidebar .navbar-collapse{padding:0;border:0}@media (min-width:992px){.bd-docs{margin-left:240px}.bd-sidebar{position:fixed;top:0;bottom:0;left:0;width:240px;overflow-y:auto;border-right:1px solid #eee}}.bd-example,.bd-masthead,.bd-search{position:relative}.bd-sidebar .navbar-brand{display:block;float:none;height:auto;padding:1.75rem 1.25rem;font-size:20px;font-weight:500;line-height:1}.bd-sidebar-brand:focus,.bd-sidebar-brand:hover{text-decoration:none}.bd-search{margin-right:1.25rem;margin-bottom:1.5rem;margin-left:1.25rem}.bd-search .form-control{height:2.45rem;padding-top:.4rem;padding-bottom:.4rem}.bd-search-results{right:0;display:block;padding:0;overflow:hidden;font-size:.9rem}.bd-search-results:empty{display:none}.bd-search-results>li>a{padding-left:.75rem;padding-right:.75rem}.bd-search-results>li:first-child{margin-top:.25rem}.bd-search-results>li:last-child{margin-bottom:.25rem}.bd-search-results>.no-results{padding:.75rem 1rem;color:#7a7a7a;text-align:center}.bd-sidenav{display:none}.active>.bd-sidenav,.bd-toc-link{display:block}.bd-toc-link{padding:.25rem 1.25rem;color:#55595c}.bd-toc-link:focus,.bd-toc-link:hover{color:#0275d8;text-decoration:none}.active>.bd-toc-link{font-weight:500;color:#373a3c}.bd-toc-item.active{margin-top:1rem;margin-bottom:1rem}.bd-toc-item:first-child{margin-top:0}.bd-toc-item:last-child{margin-bottom:2rem}.bd-sidebar .nav>li>a{display:block;padding:.25rem 1.25rem;font-size:90%;color:#99979c}.bd-sidebar .nav>li>a:focus,.bd-sidebar .nav>li>a:hover{color:#0275d8;text-decoration:none;background-color:transparent}.bd-sidebar .nav>.active:focus>a,.bd-sidebar .nav>.active:hover>a,.bd-sidebar .nav>.active>a{font-weight:500;color:#373a3c;background-color:transparent}.bd-sidebar .nav .nav{display:none;padding-bottom:.75rem}.bd-booticon,.bd-sidebar .nav>.active>.nav{display:block}.bd-sidebar .nav .nav>li>a{padding-top:1px;padding-bottom:1px;font-weight:400;padding-top:.125rem;padding-bottom:.125rem;padding-left:2rem;font-size:80%}.bd-sidebar .nav .nav>.active:focus>a,.bd-sidebar .nav .nav>.active:hover>a,.bd-sidebar .nav .nav>.active>a{font-weight:500}.bd-booticon{width:9rem;height:9rem;font-size:6.5rem;line-height:9rem;color:#fff;text-align:center;cursor:default;background-color:#563d7c;border-radius:15%}.bd-brand-logos,.bd-callout,.bd-callout code,.bd-team img,.color-swatch{border-radius:.25rem}.carbonad,.carbonad-tag,.carbonad-text{width:auto!important;height:auto!important}.bd-booticon.inverse{color:#563d7c;background-color:#fff}.bd-booticon.outline{background-color:transparent;border:1px solid #cdbfe3}.bd-nav-home{margin-bottom:0;background-color:#563d7c;border-bottom:0}.bd-nav-home .navbar-brand>a{font-weight:500;color:#fff}.bd-nav-home .nav-link{font-weight:500;color:#cdbfe3}.bd-nav-home .nav-link:focus,.bd-nav-home .nav-link:hover{color:#fff;background-color:rgba(0,0,0,.5)}.bd-header{padding-bottom:.5rem;margin-bottom:1rem;border-bottom:1px solid rgba(255,255,255,.25)}.bd-header:after,.bd-header:before{content:" ";display:table}.bd-header .bd-header-mark{float:left;padding-top:.6em;padding-bottom:.6em;font-size:1.25rem;font-weight:500}.bd-header-nav{float:right}.bd-header-nav .nav-link{float:left}.bd-header-nav .nav-link:hover{background-color:transparent}.bd-masthead{padding:2rem 0;text-align:center}.bd-masthead .bd-booticon{margin:0 auto 2rem;color:#55595c;border-color:#55595c}.bd-masthead h1{font-weight:300;line-height:1}.bd-masthead .lead{margin-left:auto;margin-right:auto;margin-bottom:2rem;font-size:1.25rem}.bd-masthead .version{margin-top:-1rem;margin-bottom:2rem}.bd-masthead .btn{width:100%;padding:1rem 2rem;font-size:1.25rem;font-weight:500;color:#55595c;border-color:#55595c}.bd-masthead .btn:hover{color:#fff;background-color:#55595c}@media (min-width:480px){.bd-masthead .btn{width:auto}}@media (min-width:768px){.bd-masthead{padding:2rem 0 4rem}.bd-header{margin-bottom:4rem}.bd-masthead h1{font-size:4rem}.bd-masthead .lead{font-size:1.5rem}}@media (min-width:992px){.bd-masthead .lead{width:80%;font-size:2rem}}.bd-featurette{padding-top:3rem;padding-bottom:3rem;font-size:1rem;line-height:1.5;color:#555;text-align:center;background-color:#fff}.bd-featurette .highlight,.carbonad{text-align:left}.bd-featurette-title{margin-bottom:.5rem;font-size:2rem;font-weight:400;color:#333}.half-rule{width:6rem;margin:2.5rem auto}.bd-featurette h4{margin-top:1rem;margin-bottom:.5rem;font-weight:400;color:#333}.bd-featurette-img{display:block;margin-bottom:1.25rem;color:#333}.bd-featurette-img:hover{color:#0275d8;text-decoration:none}.bd-featurette-img img{display:block;margin-bottom:1rem}@media (min-width:480px){.bd-featurette .img-responsive{margin-top:2rem}}@media (min-width:768px){.bd-featurette{padding-top:6rem;padding-bottom:6rem}.bd-featurette-title{font-size:2.5rem}.bd-featurette .lead{max-width:80%;margin-right:auto;margin-left:auto}.bd-featurette .img-responsive{margin-top:0}}.bd-featured-sites{margin-right:-1px;margin-left:-1px}.bd-featured-sites .col-xs-6{padding:1px}.bd-featured-sites .img-responsive{margin-top:0}.carbonad{padding:1.25rem!important;margin:0 -1rem 2rem!important;overflow:hidden;font-size:.8rem!important;line-height:1rem!important;color:#55595c!important;background:#f5f5f5!important;border:0!important}.carbonad-img{margin:0!important}.carbonad-tag,.carbonad-text{display:block!important;float:none!important;margin-left:145px!important;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif!important}.carbonad-text{padding-top:0!important}.carbonad-tag{color:inherit!important;text-align:left!important}.anchorjs-link,.bd-brand-item,.bd-example-tooltips,.responsive-utilities td{text-align:center}.carbonad-tag a,.carbonad-text a{color:#55595c!important}.carbonad-tag a:hover,.carbonad-text a:hover{color:#0275d8!important}.carbonad #azcarbon>img{display:none}@media (min-width:34em){.carbonad{width:330px!important;margin:1.5rem auto!important;border-width:1px!important;border-radius:.25rem}.bd-masthead .carbonad{margin:3rem auto 0!important}}@media (min-width:48em){.carbonad{margin-right:0!important;margin-left:0!important}}@media (min-width:62em){.carbonad{float:right;width:330px!important;padding:1rem!important;margin:.5rem 0 1rem 2rem!important}.bd-masthead .carbonad{float:none;margin:0 auto!important}}.bd-footer{padding-top:2rem;margin-top:2rem;font-size:85%;color:#777}.bd-footer-links{padding-left:0;margin-top:20px;color:#999}.bd-footer-links li{display:inline;padding:0 2px}.bd-footer-links li:first-child{padding-left:0}@media (min-width:768px){.bd-featured-sites .col-sm-3:first-child img{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.bd-featured-sites .col-sm-3:last-child img{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.bd-footer p{margin-bottom:0}}.bd-social{margin-bottom:1.5rem;margin-left:-.5rem}.bd-social-buttons{display:inline-block;padding-left:0;margin-bottom:0;list-style:none}.bd-social-buttons li{display:inline-block;padding:.25rem .5rem;line-height:1}.bd-social-buttons .twitter-follow-button{width:225px!important}.bd-social-buttons .twitter-share-button{width:98px!important}.github-btn{overflow:hidden;border:0}.bd-example-row .row{margin-bottom:1rem}.bd-example-row .row>[class^=col-]{padding-top:.75rem;padding-bottom:.75rem;background-color:rgba(86,61,124,.15);border:1px solid rgba(86,61,124,.2)}.bd-example{padding:1rem;margin:1rem -1rem;border:solid #f7f7f9;border-width:.2rem 0 0}.bd-example:after,.bd-example:before{content:" ";display:table}@media (min-width:34em){.bd-example{margin-left:0;margin-right:0;margin-bottom:0;padding:1.5rem;border-width:.2rem}}.bd-example+.highlight{margin-top:-1rem}.bd-example+.zero-clipboard+.highlight{margin-top:0}.bd-example+p{margin-top:2rem}.bd-example .container{width:auto}.bd-example>.alert+.alert,.bd-example>.nav+.nav,.bd-example>.navbar+.navbar,.bd-example>.progress+.btn,.bd-example>.progress+.progress{margin-top:1rem}.bd-example>.dropdown-menu:first-child{position:static;display:block}.bd-example>.table-responsive:last-child>.table,.bd-example>:last-child{margin-bottom:0!important}.bd-example>.close{float:none}.bd-example-type .table .type-info{color:#999;vertical-align:middle}.bd-example-type .table td{padding:1rem 0;border-color:#eee}.bd-example-type .table tr:first-child td{border-top:0}.bd-example-type h1,.bd-example-type h2,.bd-example-type h3,.bd-example-type h4,.bd-example-type h5,.bd-example-type h6{margin:0}.bd-example-bg-classes p{padding:1rem}.bd-example>img+img{margin-left:.5rem}.bd-example>.btn-group{margin-top:.25rem;margin-bottom:.25rem}.bd-example-control-sizing input[type=text]+input[type=text],.bd-example-control-sizing select,.bd-example>.btn-toolbar+.btn-toolbar{margin-top:.5rem}.bd-example-form .input-group{margin-bottom:.5rem}.bd-example>textarea.form-control{resize:vertical}.bd-example>.list-group{max-width:400px}.bd-example .navbar:last-child{margin-bottom:0}.bd-navbar-bottom-example,.bd-navbar-top-example{z-index:1;padding:0;overflow:hidden}.bd-navbar-bottom-example .navbar-header,.bd-navbar-top-example .navbar-header{margin-left:0}.bd-navbar-bottom-example .navbar-fixed-bottom,.bd-navbar-top-example .navbar-fixed-top{position:relative;margin-right:0;margin-left:0}.bd-navbar-top-example{padding-bottom:45px}.bd-navbar-top-example .navbar-fixed-top{top:-1px}.bd-navbar-bottom-example{padding-top:45px}.bd-navbar-bottom-example .navbar-fixed-bottom{bottom:-1px}.bd-navbar-bottom-example .navbar{margin-bottom:0}@media (min-width:768px){.bd-navbar-bottom-example .navbar-fixed-bottom,.bd-navbar-top-example .navbar-fixed-top{position:absolute}}.bd-example .pagination{margin-top:.5rem;margin-bottom:.5rem}.bd-example>.pager{margin-top:0}.bd-example-modal{background-color:#f5f5f5}.bd-example-modal .modal{position:relative;top:auto;right:auto;bottom:auto;left:auto;z-index:1;display:block}.bd-example-modal .modal-dialog{left:auto;margin-right:auto;margin-left:auto}.bd-example>.dropdown>.dropdown-toggle{float:left}.bd-example>.dropdown>.dropdown-menu{position:static;display:block;margin-bottom:.25rem;clear:left}.bd-example-tabs .nav-tabs{margin-bottom:1rem}.bd-example-tooltips>.btn{margin-top:.25rem;margin-bottom:.25rem}.bd-example-popover{padding-bottom:1.5rem;background-color:#f9f9f9}.bd-example-popover .popover{position:relative;display:block;float:left;width:260px;margin:1.25rem}.bd-example-tooltip .tooltip{position:relative;display:inline-block;margin:10px 20px;opacity:1}.scrollspy-example{position:relative;height:200px;margin-top:.5rem;overflow:auto}.bd-example>.center-block:not(img){max-width:200px;padding:.5rem;background-color:#eee}.bd-example>.bg-danger,.bd-example>.bg-info,.bd-example>.bg-primary,.bd-example>.bg-success,.bd-example>.bg-warning{padding:.5rem;margin-top:.5rem;margin-bottom:.5rem}.highlight{padding:1rem;margin:1rem -1rem;background-color:#f7f7f9}@media (min-width:34em){.highlight{padding:1.5rem;margin-right:0;margin-left:0}}.highlight pre{padding:0;margin-top:0;margin-bottom:0;background-color:transparent;border:0}.highlight pre code{font-size:inherit;color:#373a3c}#focusedInput{border-color:#66afe9;outline:0;outline:dotted thin;-webkit-box-shadow:0 0 .5rem rgba(102,175,233,.6);box-shadow:0 0 .5rem rgba(102,175,233,.6)}.table-responsive .highlight pre{white-space:normal}.bd-table th small,.responsive-utilities th small{display:block;font-weight:400;color:#999}.responsive-utilities tbody th{font-weight:400}.responsive-utilities td.is-visible{color:#468847;background-color:#dff0d8!important}.responsive-utilities td.is-hidden{color:#ccc;background-color:#f9f9f9!important}.responsive-utilities-test{margin-top:.25rem}.responsive-utilities-test .col-xs-6{margin-bottom:.5rem}.responsive-utilities-test span{display:block;padding:1rem .5rem;font-size:1rem;font-weight:700;line-height:1.1;text-align:center;border-radius:.25rem}.hidden-on .col-xs-6>.not-visible,.visible-on .col-xs-6>.not-visible{color:#999;border:1px solid #ddd}.hidden-on .col-xs-6 .visible,.visible-on .col-xs-6 .visible{color:#468847;background-color:#dff0d8;border:1px solid #d6e9c6}@media (max-width:33.9em){.hidden-xs-only{display:none!important}}@media (min-width:34em)and (max-width:47.9em){.hidden-sm-only{display:none!important}}@media (min-width:48em)and (max-width:61.9em){.hidden-md-only{display:none!important}}@media (min-width:62em)and (max-width:74.9em){.hidden-lg-only{display:none!important}}@media (min-width:75em){.hidden-xl-only{display:none!important}}.btn-outline{color:#563d7c;background-color:transparent;border-color:#563d7c}.btn-outline:active,.btn-outline:focus,.btn-outline:hover{color:#fff;background-color:#563d7c;border-color:#563d7c}.btn-outline-inverse{color:#fff;background-color:transparent;border-color:#cdbfe3}.btn-outline-inverse:active,.btn-outline-inverse:focus,.btn-outline-inverse:hover{color:#563d7c;text-shadow:none;background-color:#fff;border-color:#fff}.bd-callout{padding:1.25rem;margin-top:1.25rem;margin-bottom:1.25rem;border:1px solid #eee;border-left-width:.25rem}.bd-callout h4{margin-top:0;margin-bottom:.25rem}.bd-callout p:last-child{margin-bottom:0}.bd-callout+.bd-callout{margin-top:-.25rem}.bd-callout-info{border-left-color:#5bc0de}.bd-callout-info h4{color:#5bc0de}.bd-callout-warning{border-left-color:#f0ad4e}.bd-callout-warning h4{color:#f0ad4e}.bd-callout-danger{border-left-color:#d9534f}.bd-callout-danger h4{color:#d9534f}.bd-examples .img-thumbnail{margin-bottom:.75rem}.bd-examples h4{margin-bottom:.25rem}.bd-examples p{margin-bottom:1.25rem}@media (max-width:480px){.bd-examples{margin-right:-.75rem;margin-left:-.75rem}.bd-examples>[class^=col-]{padding-right:.75rem;padding-left:.75rem}}.bd-team .team-member{line-height:2rem;color:#555}.bd-team .team-member:hover{color:#333;text-decoration:none}.bd-team .github-btn{float:right;width:180px;height:1.25rem;margin-top:.25rem}.bd-team img{float:left;width:2rem;margin-right:.5rem}.bd-browser-bugs td p{margin-bottom:0}.bd-browser-bugs th:first-child{width:18%}.bd-brand-logos{display:table;width:100%;margin-bottom:1rem;overflow:hidden;color:#563d7c;background-color:#f9f9f9}.bd-brand-logos .inverse,.color-swatches .bd-purple{background-color:#563d7c}.bd-brand-item{padding:4rem 0}.bd-brand-item+.bd-brand-item{border-top:1px solid #fff}.bd-brand-logos .inverse{color:#fff}.bd-brand-item h1,.bd-brand-item h3{margin-top:0;margin-bottom:0}.bd-brand-item .bd-booticon{margin-right:auto;margin-left:auto}@media (min-width:768px){.bd-brand-item{display:table-cell;width:1%}.bd-brand-item+.bd-brand-item{border-top:0;border-left:1px solid #fff}.bd-brand-item h1{font-size:4rem}}.color-swatches{margin:0 -5px;overflow:hidden}.color-swatch{float:left;width:4rem;height:4rem;margin-right:.25rem;margin-left:.25rem}.color-swatches .bd-purple-light{background-color:#cdbfe3}.color-swatches .bd-purple-lighter{background-color:#e5e1ea}.color-swatches .bd-gray{background-color:#f9f9f9}.zero-clipboard{position:relative;display:none;float:right}.btn-clipboard{position:absolute;top:0;right:0;z-index:10;display:block;padding:.25rem .5rem;font-size:75%;color:#818a91;cursor:pointer;background-color:#eceeef;border-radius:0 .2rem}.btn-clipboard-hover{color:#fff;background-color:#027de7}@media (min-width:768px){.color-swatch{width:6rem;height:6rem}.zero-clipboard{display:block}}.hll{background-color:#ffc}.c{color:#999}.err{color:#A00;background-color:#FAA}.k{color:#069}.o{color:#555}.cm{color:#999}.cp{color:#099}.c1,.cs{color:#999}.gd{background-color:#FCC;border:1px solid #C00}.gr{color:red}.gh{color:#030}.gi{background-color:#CFC;border:1px solid #0C0}.go{color:#AAA}.gp{color:#009}.gu{color:#030}.gt{color:#9C6}.kc,.kd,.kn,.kp,.kr{color:#069}.kt{color:#078}.m{color:#F60}.s{color:#d44950}.na{color:#4f9fcf}.nb{color:#366}.nc{color:#0A8}.no{color:#360}.nd{color:#99F}.ni{color:#999}.ne{color:#C00}.nf{color:#C0F}.nl{color:#99F}.nn{color:#0CF}.nt{color:#2f6f9f}.nv{color:#033}.ow{color:#000}.w{color:#bbb}.mf,.mh,.mi,.mo{color:#F60}.s2,.sb,.sc,.sd,.se,.sh{color:#C30}.si{color:#A00}.sx{color:#C30}.sr{color:#3AA}.s1{color:#C30}.ss{color:#FC3}.bp{color:#366}.vc,.vg,.vi{color:#033}.il{color:#F60}.css .nt+.nt,.css .o,.css .o+.nt{color:#999}@font-face{font-family:anchorjs-icons;src:url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg6v8yoAAAC8AAAAYGNtYXDL8RqdAAABHAAAADxnYXNwAAAAEAAAAVgAAAAIZ2x5Zkm2oNUAAAFgAAABWGhlYWQAHd4cAAACuAAAADZoaGVhB3sECwAAAvAAAAAkaG10eAYAAEcAAAMUAAAADGxvY2EACgCsAAADIAAAAAhtYXhwAAYAcAAAAygAAAAgbmFtZUQXtNYAAANIAAABOXBvc3QAAwAAAAAEhAAAACAAAwQAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAACDmAAPA/8D/wAPAAEAAAAAAAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEACgAAAAGAAQAAQACACDmAP//AAAAIOYA////4RoCAAEAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAIARwAHA7kDeQA2AG0AAAEnLgEiBg8BDgEUFh8BHgMXNy4DLwEuATQ2PwE+ATIWHwEeARQGDwEeAxU3PgE0JicBLgMnBx4DHwEeARQGDwEOASImLwEuATQ2PwEuAzUHDgEUFh8BHgEyNj8BPgE0Ji8BA7kEI1ldWiPaIyQkIwQDBgYGBFAEBwYHAwQTExMT2xMwMjETBBMTExNjBwkGA5gkIyMk/r4DBgYGBFAEBwYHAwQTExMT2xMwMjETBBMTExNjBwkGA5gkIyMkBCNZXVoj2iMkJCMEA3UEJCMjJNojWV1aIwQDBgUFA1ACBQUFAwQUMDIxE9oTExMTBBMxMjATYxAhISIRmSNaXVkj/sYDBgUFA1ACBQUFAwQUMDIxE9oTExMTBBMxMjATYxAhISIRmSNaXVkjBCQjIyTaI1ldWiMEAAEAAAABAABR/4xQXw889QALBAAAAAAAzqNM0wAAAADOo0zTAAAAAAO5A3kAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAABHA7kAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAgAAAAQAAEcAAAAAAAoArAABAAAAAwBuAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEADgAAAAEAAAAAAAIADgBHAAEAAAAAAAMADgAkAAEAAAAAAAQADgBVAAEAAAAAAAUAFgAOAAEAAAAAAAYABwAyAAEAAAAAAAoAKABjAAMAAQQJAAEADgAAAAMAAQQJAAIADgBHAAMAAQQJAAMADgAkAAMAAQQJAAQADgBVAAMAAQQJAAUAFgAOAAMAAQQJAAYADgA5AAMAAQQJAAoAKABjAGkAYwBvAG0AbwBvAG4AVgBlAHIAcwBpAG8AbgAgADAALgAwAGkAYwBvAG0AbwBvAG5pY29tb29uAGkAYwBvAG0AbwBvAG4AUgBlAGcAdQBsAGEAcgBpAGMAbwBtAG8AbwBuAEcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format('truetype'),url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAATwAAsAAAAABKQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDq/zKmNtYXAAAAFoAAAAPAAAADzL8RqdZ2FzcAAAAaQAAAAIAAAACAAAABBnbHlmAAABrAAAAVgAAAFYSbag1WhlYWQAAAMEAAAANgAAADYAHd4caGhlYQAAAzwAAAAkAAAAJAd7BAtobXR4AAADYAAAAAwAAAAMBgAAR2xvY2EAAANsAAAACAAAAAgACgCsbWF4cAAAA3QAAAAgAAAAIAAGAHBuYW1lAAADlAAAATkAAAE5RBe01nBvc3QAAATQAAAAIAAAACAAAwAAAAMEAAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAg5gADwP/A/8ADwABAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAgAAAAMAAAAUAAMAAQAAABQABAAoAAAABgAEAAEAAgAg5gD//wAAACDmAP///+EaAgABAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAACAEcABwO5A3kANgBtAAABJy4BIgYPAQ4BFBYfAR4DFzcuAy8BLgE0Nj8BPgEyFh8BHgEUBg8BHgMVNz4BNCYnAS4DJwceAx8BHgEUBg8BDgEiJi8BLgE0Nj8BLgM1Bw4BFBYfAR4BMjY/AT4BNCYvAQO5BCNZXVoj2iMkJCMEAwYGBgRQBAcGBwMEExMTE9sTMDIxEwQTExMTYwcJBgOYJCMjJP6+AwYGBgRQBAcGBwMEExMTE9sTMDIxEwQTExMTYwcJBgOYJCMjJAQjWV1aI9ojJCQjBAN1BCQjIyTaI1ldWiMEAwYFBQNQAgUFBQMEFDAyMRPaExMTEwQTMTIwE2MQISEiEZkjWl1ZI/7GAwYFBQNQAgUFBQMEFDAyMRPaExMTEwQTMTIwE2MQISEiEZkjWl1ZIwQkIyMk2iNZXVojBAABAAAAAQAAUf+MUF8PPPUACwQAAAAAAM6jTNMAAAAAzqNM0wAAAAADuQN5AAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAARwO5AAEAAAAAAAAAAAAAAAAAAAADAAAAAAIAAAAEAABHAAAAAAAKAKwAAQAAAAMAbgACAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAA4AAAABAAAAAAACAA4ARwABAAAAAAADAA4AJAABAAAAAAAEAA4AVQABAAAAAAAFABYADgABAAAAAAAGAAcAMgABAAAAAAAKACgAYwADAAEECQABAA4AAAADAAEECQACAA4ARwADAAEECQADAA4AJAADAAEECQAEAA4AVQADAAEECQAFABYADgADAAEECQAGAA4AOQADAAEECQAKACgAYwBpAGMAbwBtAG8AbwBuAFYAZQByAHMAaQBvAG4AIAAwAC4AMABpAGMAbwBtAG8AbwBuaWNvbW9vbgBpAGMAbwBtAG8AbwBuAFIAZQBnAHUAbABhAHIAaQBjAG8AbQBvAG8AbgBHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4AAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff');font-style:normal;font-weight:400}.anchorjs-icon{font-family:anchorjs-icons;font-style:normal;font-variant:normal;font-weight:400;line-height:1;speak:none;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.anchorjs-link{opacity:0;text-decoration:none}.anchorjs-link:focus,:hover>.anchorjs-link{opacity:1;-webkit-transition:color .16s linear;-o-transition:color .16s linear;transition:color .16s linear}.anchorjs-description{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.anchorjs-link{float:left;width:1.2em;height:1em;padding-right:.2em;margin-top:.25em;margin-left:-1.2em;font-size:70%;color:inherit}:hover>.anchorjs-link:hover{color:#0275d8;text-decoration:none}.anchorjs-icon:before{content:'\e600'}@media (max-width:47.9em){.anchorjs-link{display:none}} */
\ No newline at end of file .bd-container {
position: relative;
max-width: 62rem;
padding: 0 1rem 1rem;
margin-right: auto;
margin-left: auto; }
@media (min-width: 768px) {
.bd-container {
padding: 2rem; } }
@media (min-width: 992px) {
.bd-container {
padding: 4rem; } }
.bd-container > table {
display: block;
width: 100%;
max-width: 100%;
overflow-y: auto;
margin-bottom: 1rem; }
.bd-container > table > thead > tr > th,
.bd-container > table > thead > tr > td,
.bd-container > table > tbody > tr > th,
.bd-container > table > tbody > tr > td,
.bd-container > table > tfoot > tr > th,
.bd-container > table > tfoot > tr > td {
padding: 0.75rem;
line-height: 1.5;
vertical-align: top;
border: 1px solid #eceeef; }
.bd-container > table td:first-child > code {
white-space: nowrap; }
.bd-content > h2 {
margin-top: 3rem; }
.bd-content > h3 {
margin-top: 1.5rem; }
.bd-content > ul li,
.bd-content > ol li {
margin-bottom: .25rem; }
@media (min-width: 34em) {
.bd-title {
font-size: 4rem; }
.bd-title + p {
font-size: 1.5rem;
font-weight: 300; } }
.bd-sidebar {
padding: 0;
margin-bottom: 0;
background-color: #fafafa; }
.bd-sidebar .navbar-toggler {
position: absolute;
top: 1.25rem;
right: 0;
z-index: 5; }
.bd-sidebar .navbar-header {
float: none;
margin-right: -15px; }
.bd-sidebar .navbar-collapse {
padding: 0;
border: 0; }
@media (min-width: 992px) {
.bd-docs {
margin-left: 240px; }
.bd-sidebar {
position: fixed;
top: 0;
bottom: 0;
left: 0;
width: 240px;
overflow-y: auto;
border-right: 1px solid #eee; } }
.bd-sidebar .navbar-brand {
display: block;
float: none;
height: auto;
padding: 1.75rem 1.25rem;
font-size: 20px;
font-weight: 500;
line-height: 1; }
.bd-sidebar-brand:hover,
.bd-sidebar-brand:focus {
text-decoration: none; }
.bd-search {
position: relative;
margin-right: 1.25rem;
margin-bottom: 1.5rem;
margin-left: 1.25rem; }
.bd-search .form-control {
height: 2.45rem;
padding-top: .4rem;
padding-bottom: .4rem; }
.bd-search-results {
right: 0;
display: block;
padding: 0;
overflow: hidden;
font-size: .9rem; }
.bd-search-results:empty {
display: none; }
.bd-search-results > li > a {
padding-left: .75rem;
padding-right: .75rem; }
.bd-search-results > li:first-child {
margin-top: .25rem; }
.bd-search-results > li:last-child {
margin-bottom: .25rem; }
.bd-search-results > .no-results {
padding: 0.75rem 1rem;
color: #7a7a7a;
text-align: center; }
.bd-sidenav {
display: none; }
.bd-toc-link {
display: block;
padding: 0.25rem 1.25rem;
color: #55595c; }
.bd-toc-link:hover,
.bd-toc-link:focus {
color: #0275d8;
text-decoration: none; }
.active > .bd-toc-link {
font-weight: 500;
color: #373a3c; }
.active > .bd-sidenav {
display: block; }
.bd-toc-item.active {
margin-top: 1rem;
margin-bottom: 1rem; }
.bd-toc-item:first-child {
margin-top: 0; }
.bd-toc-item:last-child {
margin-bottom: 2rem; }
.bd-sidebar .nav > li > a {
display: block;
padding: 0.25rem 1.25rem;
font-size: 90%;
color: #99979c; }
.bd-sidebar .nav > li > a:hover,
.bd-sidebar .nav > li > a:focus {
color: #0275d8;
text-decoration: none;
background-color: transparent; }
.bd-sidebar .nav > .active > a,
.bd-sidebar .nav > .active:hover > a,
.bd-sidebar .nav > .active:focus > a {
font-weight: 500;
color: #373a3c;
background-color: transparent; }
.bd-sidebar .nav .nav {
display: none;
padding-bottom: .75rem; }
.bd-sidebar .nav .nav > li > a {
padding-top: 1px;
padding-bottom: 1px;
padding-left: 2rem;
font-size: 75%;
font-weight: normal; }
.bd-sidebar .nav .nav > .active > a,
.bd-sidebar .nav .nav > .active:hover > a,
.bd-sidebar .nav .nav > .active:focus > a {
font-weight: 500; }
.bd-sidebar .nav > .active > .nav {
display: block; }
.bd-sidebar .nav .nav > li > a {
padding-top: .125rem;
padding-bottom: .125rem;
padding-left: 2rem;
font-size: 80%; }
.bd-booticon {
display: block;
width: 9rem;
height: 9rem;
font-size: 6.5rem;
line-height: 9rem;
color: #fff;
text-align: center;
cursor: default;
background-color: #563d7c;
border-radius: 15%; }
.bd-booticon.inverse {
color: #563d7c;
background-color: #fff; }
.bd-booticon.outline {
background-color: transparent;
border: 1px solid #cdbfe3; }
.bd-nav-home {
margin-bottom: 0;
background-color: #563d7c;
border-bottom: 0; }
.bd-nav-home .navbar-brand > a {
font-weight: 500;
color: #fff; }
.bd-nav-home .nav-link {
font-weight: 500;
color: #cdbfe3; }
.bd-nav-home .nav-link:hover,
.bd-nav-home .nav-link:focus {
color: #fff;
background-color: rgba(0, 0, 0, 0.5); }
.bd-header {
padding-bottom: .5rem;
margin-bottom: 1rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.25); }
.bd-header:before,
.bd-header:after {
content: " ";
display: table; }
.bd-header:after {
clear: both; }
.bd-header .bd-header-mark {
float: left;
padding-top: .6em;
padding-bottom: .6em;
font-size: 1.25rem;
font-weight: 500; }
.bd-header-nav {
float: right; }
.bd-header-nav .nav-link {
float: left; }
.bd-header-nav .nav-link:hover {
background-color: transparent; }
.bd-masthead {
position: relative;
padding: 2rem 0;
text-align: center; }
.bd-masthead .bd-booticon {
margin: 0 auto 2rem;
color: #55595c;
border-color: #55595c; }
.bd-masthead h1 {
font-weight: 300;
line-height: 1; }
.bd-masthead .lead {
margin-left: auto;
margin-right: auto;
margin-bottom: 2rem;
font-size: 1.25rem; }
.bd-masthead .version {
margin-top: -1rem;
margin-bottom: 2rem; }
.bd-masthead .btn {
width: 100%;
padding: 1rem 2rem;
font-size: 1.25rem;
font-weight: 500;
color: #55595c;
border-color: #55595c; }
.bd-masthead .btn:hover {
color: #fff;
background-color: #55595c; }
@media (min-width: 480px) {
.bd-masthead .btn {
width: auto; } }
@media (min-width: 768px) {
.bd-masthead {
padding: 2rem 0 4rem; }
.bd-header {
margin-bottom: 4rem; }
.bd-masthead h1 {
font-size: 4rem; }
.bd-masthead .lead {
font-size: 1.5rem; } }
@media (min-width: 992px) {
.bd-masthead .lead {
width: 80%;
font-size: 2rem; } }
.bd-featurette {
padding-top: 3rem;
padding-bottom: 3rem;
font-size: 1rem;
line-height: 1.5;
color: #555;
text-align: center;
background-color: #fff;
border-top: 1px solid #eee; }
.bd-featurette .highlight {
text-align: left; }
.bd-featurette-title {
margin-bottom: .5rem;
font-size: 2rem;
font-weight: normal;
color: #333; }
.half-rule {
width: 6rem;
margin: 2.5rem auto; }
.bd-featurette h4 {
margin-top: 1rem;
margin-bottom: .5rem;
font-weight: normal;
color: #333; }
.bd-featurette-img {
display: block;
margin-bottom: 1.25rem;
color: #333; }
.bd-featurette-img:hover {
color: #0275d8;
text-decoration: none; }
.bd-featurette-img img {
display: block;
margin-bottom: 1rem; }
@media (min-width: 480px) {
.bd-featurette .img-responsive {
margin-top: 2rem; } }
@media (min-width: 768px) {
.bd-featurette {
padding-top: 6rem;
padding-bottom: 6rem; }
.bd-featurette-title {
font-size: 2.5rem; }
.bd-featurette .lead {
max-width: 80%;
margin-right: auto;
margin-left: auto; }
.bd-featurette .img-responsive {
margin-top: 0; } }
.bd-featured-sites {
margin-right: -1px;
margin-left: -1px; }
.bd-featured-sites .col-xs-6 {
padding: 1px; }
.bd-featured-sites .img-responsive {
margin-top: 0; }
@media (min-width: 768px) {
.bd-featured-sites .col-sm-3:first-child img {
border-top-left-radius: .25rem;
border-bottom-left-radius: .25rem; }
.bd-featured-sites .col-sm-3:last-child img {
border-top-right-radius: .25rem;
border-bottom-right-radius: .25rem; } }
.carbonad {
width: auto !important;
height: auto !important;
padding: 1.25rem !important;
margin: 0 -1rem 2rem !important;
overflow: hidden;
/* clearfix */
font-size: .8rem !important;
line-height: 1rem !important;
color: #55595c !important;
text-align: left;
background: #f5f5f5 !important;
border: 0 !important; }
.carbonad-img {
margin: 0 !important; }
.carbonad-text,
.carbonad-tag {
display: block !important;
float: none !important;
width: auto !important;
height: auto !important;
margin-left: 145px !important;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important; }
.carbonad-text {
padding-top: 0 !important; }
.carbonad-tag {
color: inherit !important;
text-align: left !important; }
.carbonad-text a,
.carbonad-tag a {
color: #55595c !important; }
.carbonad-text a:hover,
.carbonad-tag a:hover {
color: #0275d8 !important; }
.carbonad #azcarbon > img {
display: none; }
@media (min-width: 34em) {
.carbonad {
width: 330px !important;
margin: 1.5rem auto !important;
border-width: 1px !important;
border-radius: .25rem; }
.bd-masthead .carbonad {
margin: 3rem auto 0 !important; } }
@media (min-width: 48em) {
.carbonad {
margin-right: 0 !important;
margin-left: 0 !important; } }
@media (min-width: 62em) {
.carbonad {
float: right;
width: 330px !important;
padding: 1rem !important;
margin: 0.5rem 0 1rem 2rem !important; }
.bd-masthead .carbonad {
float: none;
margin: 0 auto !important; } }
.bd-footer {
padding-top: 2rem;
margin-top: 2rem;
font-size: 85%;
color: #777;
border-top: 1px solid #eee; }
.bd-footer-links {
padding-left: 0;
margin-top: 20px;
color: #999; }
.bd-footer-links li {
display: inline;
padding: 0 2px; }
.bd-footer-links li:first-child {
padding-left: 0; }
@media (min-width: 768px) {
.bd-footer p {
margin-bottom: 0; } }
.bd-social {
margin-bottom: 1.5rem;
margin-left: -.5rem; }
.bd-social-buttons {
display: inline-block;
padding-left: 0;
margin-bottom: 0;
list-style: none; }
.bd-social-buttons li {
display: inline-block;
padding: 0.25rem 0.5rem;
line-height: 1; }
.bd-social-buttons .twitter-follow-button {
width: 225px !important; }
.bd-social-buttons .twitter-share-button {
width: 98px !important; }
.github-btn {
overflow: hidden;
border: 0; }
.bd-example-row .row {
margin-bottom: 1rem; }
.bd-example-row .row > [class^="col-"] {
padding-top: .75rem;
padding-bottom: .75rem;
background-color: rgba(86, 61, 124, 0.15);
border: 1px solid rgba(86, 61, 124, 0.2); }
.bd-example {
position: relative;
padding: 1rem;
margin: 1rem -1rem;
border: solid #f7f7f9;
border-width: .2rem 0 0; }
.bd-example:before,
.bd-example:after {
content: " ";
display: table; }
.bd-example:after {
clear: both; }
@media (min-width: 34em) {
.bd-example {
margin-left: 0;
margin-right: 0;
margin-bottom: 0;
padding: 1.5rem;
border-width: .2rem; } }
.bd-example + .highlight {
margin-top: -1rem; }
.bd-example + .zero-clipboard + .highlight {
margin-top: 0; }
.bd-example + p {
margin-top: 2rem; }
.bd-example .container {
width: auto; }
.bd-example > .nav + .nav,
.bd-example > .alert + .alert,
.bd-example > .navbar + .navbar,
.bd-example > .progress + .progress,
.bd-example > .progress + .btn {
margin-top: 1rem; }
.bd-example > .dropdown-menu:first-child {
position: static;
display: block; }
.bd-example > *:last-child,
.bd-example > .table-responsive:last-child > .table {
margin-bottom: 0 !important; }
.bd-example > .close {
float: none; }
.bd-example-type .table .type-info {
color: #999;
vertical-align: middle; }
.bd-example-type .table td {
padding: 1rem 0;
border-color: #eee; }
.bd-example-type .table tr:first-child td {
border-top: 0; }
.bd-example-type h1,
.bd-example-type h2,
.bd-example-type h3,
.bd-example-type h4,
.bd-example-type h5,
.bd-example-type h6 {
margin: 0; }
.bd-example-bg-classes p {
padding: 1rem; }
.bd-example > img + img {
margin-left: .5rem; }
.bd-example > .btn-group {
margin-top: .25rem;
margin-bottom: .25rem; }
.bd-example > .btn-toolbar + .btn-toolbar {
margin-top: .5rem; }
.bd-example-control-sizing select,
.bd-example-control-sizing input[type="text"] + input[type="text"] {
margin-top: .5rem; }
.bd-example-form .input-group {
margin-bottom: .5rem; }
.bd-example > textarea.form-control {
resize: vertical; }
.bd-example > .list-group {
max-width: 400px; }
.bd-example .navbar:last-child {
margin-bottom: 0; }
.bd-navbar-top-example,
.bd-navbar-bottom-example {
z-index: 1;
padding: 0;
overflow: hidden; }
.bd-navbar-top-example .navbar-header,
.bd-navbar-bottom-example .navbar-header {
margin-left: 0; }
.bd-navbar-top-example .navbar-fixed-top,
.bd-navbar-bottom-example .navbar-fixed-bottom {
position: relative;
margin-right: 0;
margin-left: 0; }
.bd-navbar-top-example {
padding-bottom: 45px; }
.bd-navbar-top-example .navbar-fixed-top {
top: -1px; }
.bd-navbar-bottom-example {
padding-top: 45px; }
.bd-navbar-bottom-example .navbar-fixed-bottom {
bottom: -1px; }
.bd-navbar-bottom-example .navbar {
margin-bottom: 0; }
@media (min-width: 768px) {
.bd-navbar-top-example .navbar-fixed-top,
.bd-navbar-bottom-example .navbar-fixed-bottom {
position: absolute; } }
.bd-example .pagination {
margin-top: .5rem;
margin-bottom: .5rem; }
.bd-example > .pager {
margin-top: 0; }
.bd-example-modal {
background-color: #f5f5f5; }
.bd-example-modal .modal {
position: relative;
top: auto;
right: auto;
bottom: auto;
left: auto;
z-index: 1;
display: block; }
.bd-example-modal .modal-dialog {
left: auto;
margin-right: auto;
margin-left: auto; }
.bd-example > .dropdown > .dropdown-toggle {
float: left; }
.bd-example > .dropdown > .dropdown-menu {
position: static;
display: block;
margin-bottom: .25rem;
clear: left; }
.bd-example-tabs .nav-tabs {
margin-bottom: 1rem; }
.bd-example-tooltips {
text-align: center; }
.bd-example-tooltips > .btn {
margin-top: .25rem;
margin-bottom: .25rem; }
.bd-example-popover {
padding-bottom: 1.5rem;
background-color: #f9f9f9; }
.bd-example-popover .popover {
position: relative;
display: block;
float: left;
width: 260px;
margin: 1.25rem; }
.bd-example-tooltip .tooltip {
position: relative;
display: inline-block;
margin: 10px 20px;
opacity: 1; }
.scrollspy-example {
position: relative;
height: 200px;
margin-top: .5rem;
overflow: auto; }
.bd-example > .center-block:not(img) {
max-width: 200px;
padding: .5rem;
background-color: #eee; }
.bd-example > .bg-primary,
.bd-example > .bg-success,
.bd-example > .bg-info,
.bd-example > .bg-warning,
.bd-example > .bg-danger {
padding: .5rem;
margin-top: .5rem;
margin-bottom: .5rem; }
.highlight {
padding: 1rem;
margin: 1rem -1rem;
background-color: #f7f7f9; }
@media (min-width: 34em) {
.highlight {
padding: 1.5rem;
margin-right: 0;
margin-left: 0; } }
.highlight pre {
padding: 0;
margin-top: 0;
margin-bottom: 0;
background-color: transparent;
border: 0; }
.highlight pre code {
font-size: inherit;
color: #373a3c; }
#focusedInput {
border-color: #66afe9;
outline: 0;
outline: thin dotted \9;
box-shadow: 0 0 0.5rem rgba(102, 175, 233, 0.6); }
.table-responsive .highlight pre {
white-space: normal; }
.bd-table th small,
.responsive-utilities th small {
display: block;
font-weight: normal;
color: #999; }
.responsive-utilities tbody th {
font-weight: normal; }
.responsive-utilities td {
text-align: center; }
.responsive-utilities td.is-visible {
color: #468847;
background-color: #dff0d8 !important; }
.responsive-utilities td.is-hidden {
color: #ccc;
background-color: #f9f9f9 !important; }
.responsive-utilities-test {
margin-top: .25rem; }
.responsive-utilities-test .col-xs-6 {
margin-bottom: .5rem; }
.responsive-utilities-test span {
display: block;
padding: 1rem 0.5rem;
font-size: 1rem;
font-weight: bold;
line-height: 1.1;
text-align: center;
border-radius: .25rem; }
.visible-on .col-xs-6 > .not-visible,
.hidden-on .col-xs-6 > .not-visible {
color: #999;
border: 1px solid #ddd; }
.visible-on .col-xs-6 .visible,
.hidden-on .col-xs-6 .visible {
color: #468847;
background-color: #dff0d8;
border: 1px solid #d6e9c6; }
@media (max-width: 33.9em) {
.hidden-xs-only {
display: none !important; } }
@media (min-width: 34em) and (max-width: 47.9em) {
.hidden-sm-only {
display: none !important; } }
@media (min-width: 48em) and (max-width: 61.9em) {
.hidden-md-only {
display: none !important; } }
@media (min-width: 62em) and (max-width: 74.9em) {
.hidden-lg-only {
display: none !important; } }
@media (min-width: 75em) {
.hidden-xl-only {
display: none !important; } }
.btn-outline {
color: #563d7c;
background-color: transparent;
border-color: #563d7c; }
.btn-outline:hover,
.btn-outline:focus,
.btn-outline:active {
color: #fff;
background-color: #563d7c;
border-color: #563d7c; }
.btn-outline-inverse {
color: #fff;
background-color: transparent;
border-color: #cdbfe3; }
.btn-outline-inverse:hover,
.btn-outline-inverse:focus,
.btn-outline-inverse:active {
color: #563d7c;
text-shadow: none;
background-color: #fff;
border-color: #fff; }
.bd-callout {
padding: 1.25rem;
margin-top: 1.25rem;
margin-bottom: 1.25rem;
border: 1px solid #eee;
border-left-width: .25rem;
border-radius: .25rem; }
.bd-callout h4 {
margin-top: 0;
margin-bottom: .25rem; }
.bd-callout p:last-child {
margin-bottom: 0; }
.bd-callout code {
border-radius: .25rem; }
.bd-callout + .bd-callout {
margin-top: -.25rem; }
.bd-callout-info {
border-left-color: #5bc0de; }
.bd-callout-info h4 {
color: #5bc0de; }
.bd-callout-warning {
border-left-color: #f0ad4e; }
.bd-callout-warning h4 {
color: #f0ad4e; }
.bd-callout-danger {
border-left-color: #d9534f; }
.bd-callout-danger h4 {
color: #d9534f; }
.bd-examples .img-thumbnail {
margin-bottom: .75rem; }
.bd-examples h4 {
margin-bottom: .25rem; }
.bd-examples p {
margin-bottom: 1.25rem; }
@media (max-width: 480px) {
.bd-examples {
margin-right: -.75rem;
margin-left: -.75rem; }
.bd-examples > [class^="col-"] {
padding-right: .75rem;
padding-left: .75rem; } }
.bd-team .team-member {
line-height: 2rem;
color: #555; }
.bd-team .team-member:hover {
color: #333;
text-decoration: none; }
.bd-team .github-btn {
float: right;
width: 180px;
height: 1.25rem;
margin-top: .25rem; }
.bd-team img {
float: left;
width: 2rem;
margin-right: .5rem;
border-radius: .25rem; }
.bd-browser-bugs td p {
margin-bottom: 0; }
.bd-browser-bugs th:first-child {
width: 18%; }
.bd-brand-logos {
display: table;
width: 100%;
margin-bottom: 1rem;
overflow: hidden;
color: #563d7c;
background-color: #f9f9f9;
border-radius: .25rem; }
.bd-brand-item {
padding: 4rem 0;
text-align: center; }
.bd-brand-item + .bd-brand-item {
border-top: 1px solid #fff; }
.bd-brand-logos .inverse {
color: #fff;
background-color: #563d7c; }
.bd-brand-item h1,
.bd-brand-item h3 {
margin-top: 0;
margin-bottom: 0; }
.bd-brand-item .bd-booticon {
margin-right: auto;
margin-left: auto; }
@media (min-width: 768px) {
.bd-brand-item {
display: table-cell;
width: 1%; }
.bd-brand-item + .bd-brand-item {
border-top: 0;
border-left: 1px solid #fff; }
.bd-brand-item h1 {
font-size: 4rem; } }
.color-swatches {
margin: 0 -5px;
overflow: hidden; }
.color-swatch {
float: left;
width: 4rem;
height: 4rem;
margin-right: .25rem;
margin-left: .25rem;
border-radius: .25rem; }
@media (min-width: 768px) {
.color-swatch {
width: 6rem;
height: 6rem; } }
.color-swatches .bd-purple {
background-color: #563d7c; }
.color-swatches .bd-purple-light {
background-color: #cdbfe3; }
.color-swatches .bd-purple-lighter {
background-color: #e5e1ea; }
.color-swatches .bd-gray {
background-color: #f9f9f9; }
.zero-clipboard {
position: relative;
display: none;
float: right; }
.btn-clipboard {
position: absolute;
top: 0;
right: 0;
z-index: 10;
display: block;
padding: 0.25rem 0.5rem;
font-size: 75%;
color: #818a91;
cursor: pointer;
background-color: #eceeef;
border-radius: 0 0.2rem 0 0.2rem; }
.btn-clipboard-hover {
color: #fff;
background-color: #027de7; }
@media (min-width: 768px) {
.zero-clipboard {
display: block; } }
.hll {
background-color: #ffffcc; }
.c {
color: #999; }
.err {
color: #AA0000;
background-color: #FFAAAA; }
.k {
color: #006699; }
.o {
color: #555555; }
.cm {
color: #999; }
.cp {
color: #009999; }
.c1 {
color: #999; }
.cs {
color: #999; }
.gd {
background-color: #FFCCCC;
border: 1px solid #CC0000; }
.ge {
font-style: italic; }
.gr {
color: #FF0000; }
.gh {
color: #003300; }
.gi {
background-color: #CCFFCC;
border: 1px solid #00CC00; }
.go {
color: #AAAAAA; }
.gp {
color: #000099; }
.gu {
color: #003300; }
.gt {
color: #99CC66; }
.kc {
color: #006699; }
.kd {
color: #006699; }
.kn {
color: #006699; }
.kp {
color: #006699; }
.kr {
color: #006699; }
.kt {
color: #007788; }
.m {
color: #FF6600; }
.s {
color: #d44950; }
.na {
color: #4f9fcf; }
.nb {
color: #336666; }
.nc {
color: #00AA88; }
.no {
color: #336600; }
.nd {
color: #9999FF; }
.ni {
color: #999999; }
.ne {
color: #CC0000; }
.nf {
color: #CC00FF; }
.nl {
color: #9999FF; }
.nn {
color: #00CCFF; }
.nt {
color: #2f6f9f; }
.nv {
color: #003333; }
.ow {
color: #000000; }
.w {
color: #bbbbbb; }
.mf {
color: #FF6600; }
.mh {
color: #FF6600; }
.mi {
color: #FF6600; }
.mo {
color: #FF6600; }
.sb {
color: #CC3300; }
.sc {
color: #CC3300; }
.sd {
color: #CC3300;
font-style: italic; }
.s2 {
color: #CC3300; }
.se {
color: #CC3300; }
.sh {
color: #CC3300; }
.si {
color: #AA0000; }
.sx {
color: #CC3300; }
.sr {
color: #33AAAA; }
.s1 {
color: #CC3300; }
.ss {
color: #FFCC33; }
.bp {
color: #336666; }
.vc {
color: #003333; }
.vg {
color: #003333; }
.vi {
color: #003333; }
.il {
color: #FF6600; }
.css .o,
.css .o + .nt,
.css .nt + .nt {
color: #999; }
@font-face {
font-family: 'anchorjs-icons';
src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg6v8yoAAAC8AAAAYGNtYXDL8RqdAAABHAAAADxnYXNwAAAAEAAAAVgAAAAIZ2x5Zkm2oNUAAAFgAAABWGhlYWQAHd4cAAACuAAAADZoaGVhB3sECwAAAvAAAAAkaG10eAYAAEcAAAMUAAAADGxvY2EACgCsAAADIAAAAAhtYXhwAAYAcAAAAygAAAAgbmFtZUQXtNYAAANIAAABOXBvc3QAAwAAAAAEhAAAACAAAwQAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAACDmAAPA/8D/wAPAAEAAAAAAAAAAAAAAAAAAAAAgAAAAAAACAAAAAwAAABQAAwABAAAAFAAEACgAAAAGAAQAAQACACDmAP//AAAAIOYA////4RoCAAEAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAIARwAHA7kDeQA2AG0AAAEnLgEiBg8BDgEUFh8BHgMXNy4DLwEuATQ2PwE+ATIWHwEeARQGDwEeAxU3PgE0JicBLgMnBx4DHwEeARQGDwEOASImLwEuATQ2PwEuAzUHDgEUFh8BHgEyNj8BPgE0Ji8BA7kEI1ldWiPaIyQkIwQDBgYGBFAEBwYHAwQTExMT2xMwMjETBBMTExNjBwkGA5gkIyMk/r4DBgYGBFAEBwYHAwQTExMT2xMwMjETBBMTExNjBwkGA5gkIyMkBCNZXVoj2iMkJCMEA3UEJCMjJNojWV1aIwQDBgUFA1ACBQUFAwQUMDIxE9oTExMTBBMxMjATYxAhISIRmSNaXVkj/sYDBgUFA1ACBQUFAwQUMDIxE9oTExMTBBMxMjATYxAhISIRmSNaXVkjBCQjIyTaI1ldWiMEAAEAAAABAABR/4xQXw889QALBAAAAAAAzqNM0wAAAADOo0zTAAAAAAO5A3kAAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAABHA7kAAQAAAAAAAAAAAAAAAAAAAAMAAAAAAgAAAAQAAEcAAAAAAAoArAABAAAAAwBuAAIAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEADgAAAAEAAAAAAAIADgBHAAEAAAAAAAMADgAkAAEAAAAAAAQADgBVAAEAAAAAAAUAFgAOAAEAAAAAAAYABwAyAAEAAAAAAAoAKABjAAMAAQQJAAEADgAAAAMAAQQJAAIADgBHAAMAAQQJAAMADgAkAAMAAQQJAAQADgBVAAMAAQQJAAUAFgAOAAMAAQQJAAYADgA5AAMAAQQJAAoAKABjAGkAYwBvAG0AbwBvAG4AVgBlAHIAcwBpAG8AbgAgADAALgAwAGkAYwBvAG0AbwBvAG5pY29tb29uAGkAYwBvAG0AbwBvAG4AUgBlAGcAdQBsAGEAcgBpAGMAbwBtAG8AbwBuAEcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) format("truetype"), url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAATwAAsAAAAABKQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDq/zKmNtYXAAAAFoAAAAPAAAADzL8RqdZ2FzcAAAAaQAAAAIAAAACAAAABBnbHlmAAABrAAAAVgAAAFYSbag1WhlYWQAAAMEAAAANgAAADYAHd4caGhlYQAAAzwAAAAkAAAAJAd7BAtobXR4AAADYAAAAAwAAAAMBgAAR2xvY2EAAANsAAAACAAAAAgACgCsbWF4cAAAA3QAAAAgAAAAIAAGAHBuYW1lAAADlAAAATkAAAE5RBe01nBvc3QAAATQAAAAIAAAACAAAwAAAAMEAAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAg5gADwP/A/8ADwABAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAgAAAAMAAAAUAAMAAQAAABQABAAoAAAABgAEAAEAAgAg5gD//wAAACDmAP///+EaAgABAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAACAEcABwO5A3kANgBtAAABJy4BIgYPAQ4BFBYfAR4DFzcuAy8BLgE0Nj8BPgEyFh8BHgEUBg8BHgMVNz4BNCYnAS4DJwceAx8BHgEUBg8BDgEiJi8BLgE0Nj8BLgM1Bw4BFBYfAR4BMjY/AT4BNCYvAQO5BCNZXVoj2iMkJCMEAwYGBgRQBAcGBwMEExMTE9sTMDIxEwQTExMTYwcJBgOYJCMjJP6+AwYGBgRQBAcGBwMEExMTE9sTMDIxEwQTExMTYwcJBgOYJCMjJAQjWV1aI9ojJCQjBAN1BCQjIyTaI1ldWiMEAwYFBQNQAgUFBQMEFDAyMRPaExMTEwQTMTIwE2MQISEiEZkjWl1ZI/7GAwYFBQNQAgUFBQMEFDAyMRPaExMTEwQTMTIwE2MQISEiEZkjWl1ZIwQkIyMk2iNZXVojBAABAAAAAQAAUf+MUF8PPPUACwQAAAAAAM6jTNMAAAAAzqNM0wAAAAADuQN5AAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAARwO5AAEAAAAAAAAAAAAAAAAAAAADAAAAAAIAAAAEAABHAAAAAAAKAKwAAQAAAAMAbgACAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAA4AAAABAAAAAAACAA4ARwABAAAAAAADAA4AJAABAAAAAAAEAA4AVQABAAAAAAAFABYADgABAAAAAAAGAAcAMgABAAAAAAAKACgAYwADAAEECQABAA4AAAADAAEECQACAA4ARwADAAEECQADAA4AJAADAAEECQAEAA4AVQADAAEECQAFABYADgADAAEECQAGAA4AOQADAAEECQAKACgAYwBpAGMAbwBtAG8AbwBuAFYAZQByAHMAaQBvAG4AIAAwAC4AMABpAGMAbwBtAG8AbwBuaWNvbW9vbgBpAGMAbwBtAG8AbwBuAFIAZQBnAHUAbABhAHIAaQBjAG8AbQBvAG8AbgBHAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4AAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format("woff");
font-style: normal;
font-weight: normal; }
.anchorjs-icon {
font-family: 'anchorjs-icons';
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: 1;
speak: none;
text-transform: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale; }
.anchorjs-link {
opacity: 0;
text-decoration: none; }
*:hover > .anchorjs-link,
.anchorjs-link:focus {
opacity: 1;
transition: color 0.16s linear; }
.anchorjs-description {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px; }
.anchorjs-link {
float: left;
width: 1.2em;
height: 1em;
padding-right: .2em;
margin-top: .25em;
margin-left: -1.2em;
font-size: 70%;
color: inherit;
text-align: center; }
*:hover > .anchorjs-link:hover {
color: #0275d8;
text-decoration: none; }
.anchorjs-icon:before {
content: '\e600'; }
@media (max-width: 47.9em) {
.anchorjs-link {
display: none; } }
/*# sourceMappingURL=docs.min.css.map */
\ No newline at end of file
This diff was suppressed by a .gitattributes entry.
...@@ -24,7 +24,7 @@ var ScrollSpy = (function ($) { ...@@ -24,7 +24,7 @@ var ScrollSpy = (function ($) {
var DATA_KEY = 'bs.scrollspy'; var DATA_KEY = 'bs.scrollspy';
var JQUERY_NO_CONFLICT = $.fn[NAME]; var JQUERY_NO_CONFLICT = $.fn[NAME];
var Defaults = { var Default = {
offset: 10 offset: 10
}; };
......
This diff was suppressed by a .gitattributes entry.
This diff was suppressed by a .gitattributes entry.
'use strict';
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'); } }
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.0.0): alert.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
var ToolTip = (function ($) {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
var NAME = 'tooltip';
var VERSION = '4.0.0';
var DATA_KEY = 'bs.tooltip';
var JQUERY_NO_CONFLICT = $.fn[NAME];
var TRANSITION_DURATION = 150;
var CLASS_PREFIX = 'bs-tether';
var Default = {
animation: true,
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>',
trigger: 'hover focus',
title: '',
delay: 0,
html: false,
selector: false,
attachment: 'top',
offset: '0 0',
constraints: null
};
var HorizontalMirror = {
LEFT: 'right',
CENTER: 'center',
RIGHT: 'left'
};
var VerticalMirror = {
TOP: 'bottom',
MIDDLE: 'middle',
BOTTOM: 'top'
};
var VerticalDefault = {
LEFT: 'middle',
CENTER: 'bottom',
RIGHT: 'middle'
};
var HorizontalDefault = {
TOP: 'center',
MIDDLE: 'left',
BOTTOM: 'center'
};
var HoverState = {
IN: 'in',
OUT: 'out'
};
var Event = {
HIDE: 'hide.bs.tooltip',
HIDDEN: 'hidden.bs.tooltip',
SHOW: 'show.bs.tooltip',
SHOWN: 'shown.bs.tooltip',
INSERTED: 'inserted.bs.tooltip',
CLICK: 'click.bs.tooltip',
FOCUSIN: 'focusin.bs.tooltip',
FOCUSOUT: 'focusout.bs.tooltip',
MOUSEENTER: 'mouseenter.bs.tooltip',
MOUSELEAVE: 'mouseleave.bs.tooltip'
};
var ClassName = {
FADE: 'fade',
IN: 'in'
};
var Selector = {
TOOLTIP: '.tooltip',
TOOLTIP_INNER: '.tooltip-inner',
TOOLTIP_ARROW: '.tooltip-arrow'
};
var TetherClass = {
'element': false,
'enabled': false
};
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
var Tooltip = (function () {
function Tooltip(element, config) {
_classCallCheck(this, Tooltip);
// private
this._isEnabled = true;
this._timeout = 0;
this._hoverState = '';
this._activeTrigger = {};
// protected
this.element = element;
this.config = this._getConfig(config);
this.tip = null;
this.tether = null;
this._setListeners();
}
_createClass(Tooltip, [{
key: 'enable',
// public
value: function enable() {
this._isEnabled = true;
}
}, {
key: 'disable',
value: function disable() {
this._isEnabled = false;
}
}, {
key: 'toggleEnabled',
value: function toggleEnabled() {
this._isEnabled = !this._isEnabled;
}
}, {
key: 'toggle',
value: function toggle(event) {
var context = this;
if (event) {
context = $(event.currentTarget).data(DATA_KEY);
if (!context) {
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
$(event.currentTarget).data(DATA_KEY, context);
}
context._activeTrigger.click = !context._activeTrigger.click;
if (context._isWithActiveTrigger()) {
context._enter(null, context);
} else {
context._leave(null, context);
}
} else {
$(context.getTipElement()).hasClass(ClassName.IN) ? context._leave(null, context) : context._enter(null, context);
}
}
}, {
key: 'destroy',
value: function destroy() {
var _this = this;
clearTimeout(this._timeout);
this.hide(function () {
$(_this.element).off(Selector.TOOLTIP).removeData(DATA_KEY);
});
}
}, {
key: 'show',
value: function show() {
var _this2 = this;
var showEvent = $.Event(Event.SHOW);
if (this.isWithContent() && this._isEnabled) {
$(this.element).trigger(showEvent);
var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element);
if (showEvent.isDefaultPrevented() || !isInTheDom) {
return;
}
var tip = this.getTipElement();
var tipId = Util.getUID(NAME);
tip.setAttribute('id', tipId);
this.element.setAttribute('aria-describedby', tipId);
this.setContent();
if (this.config.animation) {
$(tip).addClass(ClassName.FADE);
}
var attachment = typeof this.config.attachment === 'function' ? this.config.attachment.call(this, tip, this.element) : this.config.attachment;
attachment = this.getAttachment(attachment);
$(tip).data(DATA_KEY, this);
this.element.parentNode.insertBefore(tip, this.element.nextSibling);
$(this.element).trigger(Event.INSERTED);
this.tether = new Tether({
element: this.tip,
target: this.element,
attachment: attachment,
classes: TetherClass,
classPrefix: CLASS_PREFIX,
offset: this.config.offset,
constraints: this.config.constraints
});
Util.reflow(tip);
this.tether.position();
$(tip).addClass(ClassName.IN);
var complete = function complete() {
var prevHoverState = _this2._hoverState;
_this2._hoverState = null;
$(_this2.element).trigger(Event.SHOWN);
if (prevHoverState === HoverState.OUT) {
_this2._leave(null, _this2);
}
};
Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE) ? $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION) : complete();
}
}
}, {
key: 'hide',
value: function hide(callback) {
var _this3 = this;
var tip = this.getTipElement();
var hideEvent = $.Event(Event.HIDE);
var complete = function complete() {
if (_this3._hoverState !== HoverState.IN && tip.parentNode) {
tip.parentNode.removeChild(tip);
}
_this3.element.removeAttribute('aria-describedby');
$(_this3.element).trigger(Event.HIDDEN);
_this3.cleanupTether();
if (callback) {
callback();
}
};
$(this.element).trigger(hideEvent);
if (hideEvent.isDefaultPrevented()) {
return;
}
$(tip).removeClass(ClassName.IN);
if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) {
$(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION);
} else {
complete();
}
this._hoverState = '';
}
}, {
key: 'isWithContent',
// protected
value: function isWithContent() {
return !!this.getTitle();
}
}, {
key: 'getTipElement',
value: function getTipElement() {
return this.tip = this.tip || $(this.config.template)[0];
}
}, {
key: 'getAttachment',
value: function getAttachment(attachmentString) {
var attachmentArray = attachmentString.split(' ');
var normalizedAttachment = {};
if (!attachmentArray.length) {
throw new Error('Tooltip requires attachment');
}
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = attachmentArray[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var attachment = _step.value;
attachment = attachment.toUpperCase();
if (HorizontalMirror[attachment]) {
normalizedAttachment.horizontal = HorizontalMirror[attachment];
}
if (VerticalMirror[attachment]) {
normalizedAttachment.vertical = VerticalMirror[attachment];
}
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator['return']) {
_iterator['return']();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
if (!normalizedAttachment.horizontal && !normalizedAttachment.vertical) {
throw new Error('Tooltip requires valid attachment');
}
if (!normalizedAttachment.horizontal) {
normalizedAttachment.horizontal = HorizontalDefault[normalizedAttachment.vertical.toUpperCase()];
}
if (!normalizedAttachment.vertical) {
normalizedAttachment.vertical = VerticalDefault[normalizedAttachment.horizontal.toUpperCase()];
}
return [normalizedAttachment.vertical, normalizedAttachment.horizontal].join(' ');
}
}, {
key: 'setContent',
value: function setContent() {
var tip = this.getTipElement();
var title = this.getTitle();
var method = this.config.html ? 'innerHTML' : 'innerText';
$(tip).find(Selector.TOOLTIP_INNER)[0][method] = title;
$(tip).removeClass(ClassName.FADE).removeClass(ClassName.IN);
this.cleanupTether();
}
}, {
key: 'getTitle',
value: function getTitle() {
var title = this.element.getAttribute('data-original-title');
if (!title) {
title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title;
}
return title;
}
}, {
key: 'removeTetherClasses',
value: function removeTetherClasses(i, css) {
return ((css.baseVal || css).match(new RegExp('(^|\\s)' + CLASS_PREFIX + '-\\S+', 'g')) || []).join(' ');
}
}, {
key: 'cleanupTether',
value: function cleanupTether() {
if (this.tether) {
this.tether.destroy();
// clean up after tether's junk classes
// remove after they fix issue
// (https://github.com/HubSpot/tether/issues/36)
$(this.element).removeClass(this.removeTetherClasses);
$(this.tip).removeClass(this.removeTetherClasses);
}
}
}, {
key: '_setListeners',
// private
value: function _setListeners() {
var _this4 = this;
var triggers = this.config.trigger.split(' ');
triggers.forEach(function (trigger) {
if (trigger === 'click') {
$(_this4.element).on(Event.CLICK, _this4.config.selector, _this4.toggle.bind(_this4));
} else if (trigger !== 'manual') {
var eventIn = trigger == 'hover' ? Event.MOUSEENTER : Event.FOCUSIN;
var eventOut = trigger == 'hover' ? Event.MOUSELEAVE : Event.FOCUSOUT;
$(_this4.element).on(eventIn, _this4.config.selector, _this4._enter.bind(_this4)).on(eventOut, _this4.config.selector, _this4._leave.bind(_this4));
}
});
if (this.config.selector) {
this.config = $.extend({}, this.config, {
trigger: 'manual',
selector: ''
});
} else {
this._fixTitle();
}
}
}, {
key: '_fixTitle',
value: function _fixTitle() {
var titleType = typeof this.element.getAttribute('data-original-title');
if (this.element.getAttribute('title') || titleType !== 'string') {
this.element.setAttribute('data-original-title', this.element.getAttribute('title') || '');
this.element.setAttribute('title', '');
}
}
}, {
key: '_enter',
value: function _enter(event, context) {
context = context || $(event.currentTarget).data(DATA_KEY);
if (!context) {
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
$(event.currentTarget).data(DATA_KEY, context);
}
if (event) {
context._activeTrigger[event.type == 'focusin' ? 'focus' : 'hover'] = true;
}
if ($(context.getTipElement()).hasClass('in') || context._hoverState === 'in') {
context._hoverState = 'in';
return;
}
clearTimeout(context._timeout);
context._hoverState = HoverState.IN;
if (!context.config.delay || !context.config.delay.show) {
context.show();
return;
}
context._timeout = setTimeout(function () {
if (context._hoverState === HoverState.IN) {
context.show();
}
}, context.config.delay.show);
}
}, {
key: '_leave',
value: function _leave(event, context) {
context = context || $(event.currentTarget).data(DATA_KEY);
if (!context) {
context = new this.constructor(event.currentTarget, this._getDelegateConfig());
$(event.currentTarget).data(DATA_KEY, context);
}
if (event) {
context._activeTrigger[event.type == 'focusout' ? 'focus' : 'hover'] = false;
}
if (context._isWithActiveTrigger()) {
return;
}
clearTimeout(context._timeout);
context._hoverState = HoverState.OUT;
if (!context.config.delay || !context.config.delay.hide) {
context.hide();
return;
}
context._timeout = setTimeout(function () {
if (context._hoverState === HoverState.OUT) {
context.hide();
}
}, context.config.delay.hide);
}
}, {
key: '_isWithActiveTrigger',
value: function _isWithActiveTrigger() {
for (var trigger in this._activeTrigger) {
if (this._activeTrigger[trigger]) {
return true;
}
}
return false;
}
}, {
key: '_getConfig',
value: function _getConfig(config) {
config = $.extend({}, Default, $(this.element).data(), config);
if (config.delay && typeof config.delay === 'number') {
config.delay = {
'show': config.delay,
'hide': config.delay
};
}
return config;
}
}, {
key: '_getDelegateConfig',
value: function _getDelegateConfig() {
var config = {};
if (this.config) {
for (var key in this.config) {
var value = this.config[key];
if (Default[key] !== value) {
config[key] = value;
}
}
}
return config;
}
}], [{
key: 'VERSION',
// getters
get: function () {
return VERSION;
}
}, {
key: 'Default',
get: function () {
return Default;
}
}, {
key: '_jQueryInterface',
// static
value: function _jQueryInterface(config) {
return this.each(function () {
var data = $(this).data(DATA_KEY);
var _config = typeof config === 'object' ? config : null;
if (!data && /destroy|hide/.test(config)) {
return;
}
if (!data) {
data = new Tooltip(this, _config);
$(this).data(DATA_KEY, data);
}
if (typeof config === 'string') {
data[config]();
}
});
}
}]);
return Tooltip;
})();
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Tooltip._jQueryInterface;
$.fn[NAME].Constructor = Tooltip;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return Tooltip._jQueryInterface;
};
return Tooltip;
})(jQuery);
//# sourceMappingURL=tooltip.js.map
\ No newline at end of file
This diff was suppressed by a .gitattributes entry.
...@@ -22,7 +22,7 @@ const ScrollSpy = (($) => { ...@@ -22,7 +22,7 @@ const ScrollSpy = (($) => {
const DATA_KEY = 'bs.scrollspy' const DATA_KEY = 'bs.scrollspy'
const JQUERY_NO_CONFLICT = $.fn[NAME] const JQUERY_NO_CONFLICT = $.fn[NAME]
const Defaults = { const Default = {
offset : 10 offset : 10
} }
......
import Util from './util'
/**
* --------------------------------------------------------------------------
* Bootstrap (v4.0.0): tooltip.js
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* --------------------------------------------------------------------------
*/
const ToolTip = (($) => {
/**
* ------------------------------------------------------------------------
* Constants
* ------------------------------------------------------------------------
*/
const NAME = 'tooltip'
const VERSION = '4.0.0'
const DATA_KEY = 'bs.tooltip'
const JQUERY_NO_CONFLICT = $.fn[NAME]
const TRANSITION_DURATION = 150
const CLASS_PREFIX = 'bs-tether'
const Default = {
animation : true,
template : '<div class="tooltip" role="tooltip">'
+ '<div class="tooltip-arrow"></div>'
+ '<div class="tooltip-inner"></div></div>',
trigger : 'hover focus',
title : '',
delay : 0,
html : false,
selector : false,
attachment : 'top',
offset : '0 0',
constraints : null
}
const HorizontalMirror = {
LEFT : 'right',
CENTER : 'center',
RIGHT : 'left'
}
const VerticalMirror = {
TOP : 'bottom',
MIDDLE : 'middle',
BOTTOM : 'top'
}
const VerticalDefault = {
LEFT : 'middle',
CENTER : 'bottom',
RIGHT : 'middle'
}
const HorizontalDefault = {
TOP : 'center',
MIDDLE : 'left',
BOTTOM : 'center'
}
const HoverState = {
IN : 'in',
OUT : 'out'
}
const Event = {
HIDE : 'hide.bs.tooltip',
HIDDEN : 'hidden.bs.tooltip',
SHOW : 'show.bs.tooltip',
SHOWN : 'shown.bs.tooltip',
INSERTED : 'inserted.bs.tooltip',
CLICK : 'click.bs.tooltip',
FOCUSIN : 'focusin.bs.tooltip',
FOCUSOUT : 'focusout.bs.tooltip',
MOUSEENTER : 'mouseenter.bs.tooltip',
MOUSELEAVE : 'mouseleave.bs.tooltip'
}
const ClassName = {
FADE : 'fade',
IN : 'in'
}
const Selector = {
TOOLTIP : '.tooltip',
TOOLTIP_INNER : '.tooltip-inner',
TOOLTIP_ARROW : '.tooltip-arrow'
}
const TetherClass = {
element : false,
enabled : false
}
const Trigger = {
HOVER : 'hover',
FOCUS : 'focus',
CLICK : 'click',
MANUAL : 'manual'
}
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
class Tooltip {
constructor(element, config) {
// private
this._isEnabled = true
this._timeout = 0
this._hoverState = ''
this._activeTrigger = {}
// protected
this.element = element
this.config = this._getConfig(config)
this.tip = null
this.tether = null
this._setListeners()
}
// getters
static get VERSION() {
return VERSION
}
static get Default() {
return Default
}
// public
enable() {
this._isEnabled = true
}
disable() {
this._isEnabled = false
}
toggleEnabled() {
this._isEnabled = !this._isEnabled
}
toggle(event) {
let context = this
if (event) {
context = $(event.currentTarget).data(DATA_KEY)
if (!context) {
context = new this.constructor(
event.currentTarget,
this._getDelegateConfig()
)
$(event.currentTarget).data(DATA_KEY, context)
}
context._activeTrigger.click = !context._activeTrigger.click
if (context._isWithActiveTrigger()) {
context._enter(null, context)
} else {
context._leave(null, context)
}
} else {
$(context.getTipElement()).hasClass(ClassName.IN) ?
context._leave(null, context) :
context._enter(null, context)
}
}
destroy() {
clearTimeout(this._timeout)
this.hide(() => {
$(this.element)
.off(Selector.TOOLTIP)
.removeData(DATA_KEY)
})
}
show() {
let showEvent = $.Event(Event.SHOW)
if (this.isWithContent() && this._isEnabled) {
$(this.element).trigger(showEvent)
let isInTheDom = $.contains(
this.element.ownerDocument.documentElement,
this.element
)
if (showEvent.isDefaultPrevented() || !isInTheDom) {
return
}
let tip = this.getTipElement()
let tipId = Util.getUID(NAME)
tip.setAttribute('id', tipId)
this.element.setAttribute('aria-describedby', tipId)
this.setContent()
if (this.config.animation) {
$(tip).addClass(ClassName.FADE)
}
let attachment = typeof this.config.attachment === 'function' ?
this.config.attachment.call(this, tip, this.element) :
this.config.attachment
attachment = this.getAttachment(attachment)
$(tip).data(DATA_KEY, this)
this.element.parentNode.insertBefore(tip, this.element.nextSibling)
$(this.element).trigger(Event.INSERTED)
this.tether = new Tether({
element : this.tip,
target : this.element,
attachment : attachment,
classes : TetherClass,
classPrefix : CLASS_PREFIX,
offset : this.config.offset,
constraints : this.config.constraints
})
Util.reflow(tip)
this.tether.position()
$(tip).addClass(ClassName.IN)
let complete = () => {
let prevHoverState = this._hoverState
this._hoverState = null
$(this.element).trigger(Event.SHOWN)
if (prevHoverState === HoverState.OUT) {
this._leave(null, this)
}
}
Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE) ?
$(this.tip)
.one(Util.TRANSITION_END, complete)
.emulateTransitionEnd(Tooltip._TRANSITION_DURATION) :
complete()
}
}
hide(callback) {
let tip = this.getTipElement()
let hideEvent = $.Event(Event.HIDE)
let complete = () => {
if (this._hoverState !== HoverState.IN && tip.parentNode) {
tip.parentNode.removeChild(tip)
}
this.element.removeAttribute('aria-describedby')
$(this.element).trigger(Event.HIDDEN)
this.cleanupTether()
if (callback) {
callback()
}
}
$(this.element).trigger(hideEvent)
if (hideEvent.isDefaultPrevented()) {
return
}
$(tip).removeClass(ClassName.IN)
if (Util.supportsTransitionEnd() &&
($(this.tip).hasClass(ClassName.FADE))) {
$(tip)
.one(Util.TRANSITION_END, complete)
.emulateTransitionEnd(TRANSITION_DURATION)
} else {
complete()
}
this._hoverState = ''
}
// protected
isWithContent() {
return !!this.getTitle()
}
getTipElement() {
return (this.tip = this.tip || $(this.config.template)[0])
}
getAttachment(attachmentString) {
let attachmentArray = attachmentString.split(' ')
let normalizedAttachment = {}
if (!attachmentArray.length) {
throw new Error('Tooltip requires attachment')
}
for (let attachment of attachmentArray) {
attachment = attachment.toUpperCase()
if (HorizontalMirror[attachment]) {
normalizedAttachment.horizontal = HorizontalMirror[attachment]
}
if (VerticalMirror[attachment]) {
normalizedAttachment.vertical = VerticalMirror[attachment]
}
}
if (!normalizedAttachment.horizontal &&
(!normalizedAttachment.vertical)) {
throw new Error('Tooltip requires valid attachment')
}
if (!normalizedAttachment.horizontal) {
normalizedAttachment.horizontal =
HorizontalDefault[normalizedAttachment.vertical.toUpperCase()]
}
if (!normalizedAttachment.vertical) {
normalizedAttachment.vertical =
VerticalDefault[normalizedAttachment.horizontal.toUpperCase()]
}
return [
normalizedAttachment.vertical,
normalizedAttachment.horizontal
].join(' ')
}
setContent() {
let tip = this.getTipElement()
let title = this.getTitle()
let method = this.config.html ? 'innerHTML' : 'innerText'
$(tip).find(Selector.TOOLTIP_INNER)[0][method] = title
$(tip)
.removeClass(ClassName.FADE)
.removeClass(ClassName.IN)
this.cleanupTether()
}
getTitle() {
let title = this.element.getAttribute('data-original-title')
if (!title) {
title = typeof this.config.title === 'function' ?
this.config.title.call(this.element) :
this.config.title
}
return title
}
removeTetherClasses(i, css) {
return ((css.baseVal || css).match(
new RegExp(`(^|\\s)${CLASS_PREFIX}-\\S+`, 'g')) || []
).join(' ')
}
cleanupTether() {
if (this.tether) {
this.tether.destroy()
// clean up after tether's junk classes
// remove after they fix issue
// (https://github.com/HubSpot/tether/issues/36)
$(this.element).removeClass(this.removeTetherClasses)
$(this.tip).removeClass(this.removeTetherClasses)
}
}
// private
_setListeners() {
let triggers = this.config.trigger.split(' ')
triggers.forEach((trigger) => {
if (trigger === 'click') {
$(this.element).on(
Event.CLICK,
this.config.selector,
this.toggle.bind(this)
)
} else if (trigger !== Trigger.MANUAL) {
let eventIn = trigger == Trigger.HOVER ?
Event.MOUSEENTER : Event.FOCUSIN
let eventOut = trigger == Trigger.HOVER ?
Event.MOUSELEAVE : Event.FOCUSOUT
$(this.element)
.on(
eventIn,
this.config.selector,
this._enter.bind(this)
)
.on(
eventOut,
this.config.selector,
this._leave.bind(this)
)
}
})
if (this.config.selector) {
this.config = $.extend({}, this.config, {
trigger : 'manual',
selector : ''
})
} else {
this._fixTitle()
}
}
_fixTitle() {
let titleType = typeof this.element.getAttribute('data-original-title')
if (this.element.getAttribute('title') ||
(titleType !== 'string')) {
this.element.setAttribute(
'data-original-title',
this.element.getAttribute('title') || ''
)
this.element.setAttribute('title', '')
}
}
_enter(event, context) {
context = context || $(event.currentTarget).data(DATA_KEY)
if (!context) {
context = new this.constructor(
event.currentTarget,
this._getDelegateConfig()
)
$(event.currentTarget).data(DATA_KEY, context)
}
if (event) {
context._activeTrigger[
event.type == 'focusin' ? Trigger.FOCUS : Trigger.HOVER
] = true
}
if ($(context.getTipElement()).hasClass(ClassName.IN) ||
(context._hoverState === HoverState.IN)) {
context._hoverState = HoverState.IN
return
}
clearTimeout(context._timeout)
context._hoverState = HoverState.IN
if (!context.config.delay || !context.config.delay.show) {
context.show()
return
}
context._timeout = setTimeout(() => {
if (context._hoverState === HoverState.IN) {
context.show()
}
}, context.config.delay.show)
}
_leave(event, context) {
context = context || $(event.currentTarget).data(DATA_KEY)
if (!context) {
context = new this.constructor(
event.currentTarget,
this._getDelegateConfig()
)
$(event.currentTarget).data(DATA_KEY, context)
}
if (event) {
context._activeTrigger[
event.type == 'focusout' ? Triger.FOCUS : Trigger.HOVER
] = false
}
if (context._isWithActiveTrigger()) {
return
}
clearTimeout(context._timeout)
context._hoverState = HoverState.OUT
if (!context.config.delay || !context.config.delay.hide) {
context.hide()
return
}
context._timeout = setTimeout(() => {
if (context._hoverState === HoverState.OUT) {
context.hide()
}
}, context.config.delay.hide)
}
_isWithActiveTrigger() {
for (let trigger in this._activeTrigger) {
if (this._activeTrigger[trigger]) {
return true
}
}
return false
}
_getConfig(config) {
config = $.extend({}, Default, $(this.element).data(), config)
if (config.delay && typeof config.delay === 'number') {
config.delay = {
show : config.delay,
hide : config.delay
}
}
return config
}
_getDelegateConfig() {
let config = {}
if (this.config) {
for (let key in this.config) {
let value = this.config[key]
if (Default[key] !== value) {
config[key] = value
}
}
}
return config
}
// static
static _jQueryInterface(config) {
return this.each(function () {
let data = $(this).data(DATA_KEY)
let _config = typeof config === 'object' ?
config : null
if (!data && /destroy|hide/.test(config)) {
return
}
if (!data) {
data = new Tooltip(this, _config)
$(this).data(DATA_KEY, data)
}
if (typeof config === 'string') {
data[config]()
}
})
}
}
/**
* ------------------------------------------------------------------------
* jQuery
* ------------------------------------------------------------------------
*/
$.fn[NAME] = Tooltip._jQueryInterface
$.fn[NAME].Constructor = Tooltip
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT
return Tooltip._jQueryInterface
}
return Tooltip
})(jQuery)
export default Tooltip
/* ========================================================================
* Bootstrap: tab.js v3.3.4
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// TAB CLASS DEFINITION
// ====================
var Tab = function (element) {
// jscs:disable requireDollarBeforejQueryAssignment
this.element = $(element)
// jscs:enable requireDollarBeforejQueryAssignment
}
Tab.VERSION = '3.3.4'
Tab.TRANSITION_DURATION = 150
Tab.prototype.show = function () {
var $this = this.element
var $ul = $this.closest('ul:not(.dropdown-menu)')
var selector = $this.data('target')
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
if ($this.parent('li').hasClass('active')) return
var $previous = $ul.find('.active:last a')
var hideEvent = $.Event('hide.bs.tab', {
relatedTarget: $this[0]
})
var showEvent = $.Event('show.bs.tab', {
relatedTarget: $previous[0]
})
$previous.trigger(hideEvent)
$this.trigger(showEvent)
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
var $target = $(selector)
this.activate($this.closest('li'), $ul)
this.activate($target, $target.parent(), function () {
$previous.trigger({
type: 'hidden.bs.tab',
relatedTarget: $this[0]
})
$this.trigger({
type: 'shown.bs.tab',
relatedTarget: $previous[0]
})
})
}
Tab.prototype.activate = function (element, container, callback) {
var $active = container.find('> .active')
var transition = callback
&& $.support.transition
&& ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
function next() {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
.end()
.find('[data-toggle="tab"]')
.attr('aria-expanded', false)
element
.addClass('active')
.find('[data-toggle="tab"]')
.attr('aria-expanded', true)
if (transition) {
element[0].offsetWidth // reflow for transition
element.addClass('in')
} else {
element.removeClass('fade')
}
if (element.parent('.dropdown-menu').length) {
element
.closest('li.dropdown')
.addClass('active')
.end()
.find('[data-toggle="tab"]')
.attr('aria-expanded', true)
}
callback && callback()
}
$active.length && transition ?
$active
.one('bsTransitionEnd', next)
.emulateTransitionEnd(Tab.TRANSITION_DURATION) :
next()
$active.removeClass('in')
}
// TAB PLUGIN DEFINITION
// =====================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.tab')
if (!data) $this.data('bs.tab', (data = new Tab(this)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.tab
$.fn.tab = Plugin
$.fn.tab.Constructor = Tab
// TAB NO CONFLICT
// ===============
$.fn.tab.noConflict = function () {
$.fn.tab = old
return this
}
// TAB DATA-API
// ============
var clickHandler = function (e) {
e.preventDefault()
Plugin.call($(this), 'show')
}
$(document)
.on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
.on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
}(jQuery);
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<!-- jQuery --> <!-- jQuery -->
<script src="vendor/jquery.min.js"></script> <script src="vendor/jquery.min.js"></script>
<script src="vendor/tether.min.js"></script>
<script> <script>
// Disable jQuery event aliases to ensure we don't accidentally use any of them // Disable jQuery event aliases to ensure we don't accidentally use any of them
(function () { (function () {
...@@ -139,12 +140,12 @@ ...@@ -139,12 +140,12 @@
<script src="../../js/dist/modal.js"></script> <script src="../../js/dist/modal.js"></script>
<script src="../../js/dist/scrollspy.js"></script> <script src="../../js/dist/scrollspy.js"></script>
<script src="../../js/dist/tab.js"></script> <script src="../../js/dist/tab.js"></script>
<script src="../../js/dist/tooltip.js"></script>
<!-- Old Plugin sources --> <!-- Old Plugin sources -->
<script src="../../js/tooltip.js"></script> <!-- <script src="../../js/popover.js"></script> -->
<script src="../../js/popover.js"></script>
<!-- Unit tests --> <!-- Unit tests
<script src="unit/alert.js"></script> <script src="unit/alert.js"></script>
<script src="unit/button.js"></script> <script src="unit/button.js"></script>
<script src="unit/carousel.js"></script> <script src="unit/carousel.js"></script>
...@@ -152,9 +153,9 @@ ...@@ -152,9 +153,9 @@
<script src="unit/dropdown.js"></script> <script src="unit/dropdown.js"></script>
<script src="unit/modal.js"></script> <script src="unit/modal.js"></script>
<script src="unit/scrollspy.js"></script> <script src="unit/scrollspy.js"></script>
<script src="unit/tab.js"></script> <script src="unit/tab.js"></script> -->
<script src="unit/tooltip.js"></script> <script src="unit/tooltip.js"></script>
<script src="unit/popover.js"></script> <!-- <script src="unit/popover.js"></script> -->
</head> </head>
<body> <body>
......
...@@ -16,6 +16,7 @@ $(function () { ...@@ -16,6 +16,7 @@ $(function () {
afterEach: function () { afterEach: function () {
$.fn.tooltip = $.fn.bootstrapTooltip $.fn.tooltip = $.fn.bootstrapTooltip
delete $.fn.bootstrapTooltip delete $.fn.bootstrapTooltip
$('.tooltip').remove()
} }
}) })
...@@ -34,7 +35,7 @@ $(function () { ...@@ -34,7 +35,7 @@ $(function () {
QUnit.test('should expose default settings', function (assert) { QUnit.test('should expose default settings', function (assert) {
assert.expect(1) assert.expect(1)
assert.ok($.fn.bootstrapTooltip.Constructor.DEFAULTS, 'defaults is defined') assert.ok($.fn.bootstrapTooltip.Constructor.Default, 'defaults is defined')
}) })
QUnit.test('should empty title attribute', function (assert) { QUnit.test('should empty title attribute', function (assert) {
...@@ -88,17 +89,21 @@ $(function () { ...@@ -88,17 +89,21 @@ $(function () {
assert.strictEqual(id.indexOf('tooltip'), 0, 'tooltip id has prefix') assert.strictEqual(id.indexOf('tooltip'), 0, 'tooltip id has prefix')
}) })
QUnit.test('should place tooltips relative to placement option', function (assert) { QUnit.test('should place tooltips relative to attachment option', function (assert) {
assert.expect(2) assert.expect(2)
var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>') var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>')
.appendTo('#qunit-fixture') .appendTo('#qunit-fixture')
.bootstrapTooltip({ placement: 'bottom' }) .bootstrapTooltip({ attachment: 'bottom' })
$tooltip.bootstrapTooltip('show') $tooltip.bootstrapTooltip('show')
assert.ok($('.tooltip').is('.fade.bottom.in'), 'has correct classes applied')
assert
.ok($('.tooltip')
.is('.fade.bs-tether-element-attached-top.bs-tether-element-attached-center.in'), 'has correct classes applied')
$tooltip.bootstrapTooltip('hide') $tooltip.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed')
assert.strictEqual($tooltip.data('bs.tooltip').tip.parentNode, null, 'tooltip removed')
}) })
QUnit.test('should allow html entities', function (assert) { QUnit.test('should allow html entities', function (assert) {
...@@ -111,7 +116,7 @@ $(function () { ...@@ -111,7 +116,7 @@ $(function () {
assert.notEqual($('.tooltip b').length, 0, 'b tag was inserted') assert.notEqual($('.tooltip b').length, 0, 'b tag was inserted')
$tooltip.bootstrapTooltip('hide') $tooltip.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed') assert.strictEqual($tooltip.data('bs.tooltip').tip.parentNode, null, 'tooltip removed')
}) })
QUnit.test('should respect custom classes', function (assert) { QUnit.test('should respect custom classes', function (assert) {
...@@ -124,7 +129,7 @@ $(function () { ...@@ -124,7 +129,7 @@ $(function () {
assert.ok($('.tooltip').hasClass('some-class'), 'custom class is present') assert.ok($('.tooltip').hasClass('some-class'), 'custom class is present')
$tooltip.bootstrapTooltip('hide') $tooltip.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed') assert.strictEqual($tooltip.data('bs.tooltip').tip.parentNode, null, 'tooltip removed')
}) })
QUnit.test('should fire show event', function (assert) { QUnit.test('should fire show event', function (assert) {
...@@ -253,21 +258,21 @@ $(function () { ...@@ -253,21 +258,21 @@ $(function () {
assert.ok(!$._data($tooltip[0], 'events').mouseover && !$._data($tooltip[0], 'events').mouseout, 'tooltip does not have hover events') assert.ok(!$._data($tooltip[0], 'events').mouseover && !$._data($tooltip[0], 'events').mouseout, 'tooltip does not have hover events')
}) })
QUnit.test('should show tooltip with delegate selector on click', function (assert) { // QUnit.test('should show tooltip with delegate selector on click', function (assert) {
assert.expect(2) // assert.expect(2)
var $div = $('<div><a href="#" rel="tooltip" title="Another tooltip"/></div>') // var $div = $('<div><a href="#" rel="tooltip" title="Another tooltip"/></div>')
.appendTo('#qunit-fixture') // .appendTo('#qunit-fixture')
.bootstrapTooltip({ // .bootstrapTooltip({
selector: 'a[rel="tooltip"]', // selector: 'a[rel="tooltip"]',
trigger: 'click' // trigger: 'click'
}) // })
$div.find('a').trigger('click') // $div.find('a').trigger('click')
assert.ok($('.tooltip').is('.fade.in'), 'tooltip is faded in') // assert.ok($('.tooltip').is('.fade.in'), 'tooltip is faded in')
$div.find('a').trigger('click') // $div.find('a').trigger('click')
assert.strictEqual($('.tooltip').length, 0, 'tooltip was removed from dom') // assert.strictEqual($div.data('bs.tooltip').tip.parentNode, null, 'tooltip removed')
}) // })
QUnit.test('should show tooltip when toggle is called', function (assert) { QUnit.test('should show tooltip when toggle is called', function (assert) {
assert.expect(1) assert.expect(1)
...@@ -307,20 +312,20 @@ $(function () { ...@@ -307,20 +312,20 @@ $(function () {
QUnit.test('should add position class before positioning so that position-specific styles are taken into account', function (assert) { QUnit.test('should add position class before positioning so that position-specific styles are taken into account', function (assert) {
assert.expect(1) assert.expect(1)
var styles = '<style>' var styles = '<style>'
+ '.tooltip.right { white-space: nowrap; }' + '.tooltip.right { white-space: nowrap; }'
+ '.tooltip.right .tooltip-inner { max-width: none; }' + '.tooltip.right .tooltip-inner { max-width: none; }'
+ '</style>' + '</style>'
var $styles = $(styles).appendTo('head') var $styles = $(styles).appendTo('head')
var $container = $('<div/>').appendTo('#qunit-fixture') var $container = $('<div/>').appendTo('#qunit-fixture')
var $target = $('<a href="#" rel="tooltip" title="very very very very very very very very long tooltip in one line"/>') var $target = $('<a href="#" rel="tooltip" title="very very very very very very very very long tooltip in one line"/>')
.appendTo($container) .appendTo($container)
.bootstrapTooltip({ .bootstrapTooltip({
placement: 'right', attachment: 'right',
viewport: null
}) })
.bootstrapTooltip('show') .bootstrapTooltip('show')
var $tooltip = $container.find('.tooltip')
var $tooltip = $($target.data('bs.tooltip').tip)
// this is some dumb hack shit because sub pixels in firefox // this is some dumb hack shit because sub pixels in firefox
var top = Math.round($target.offset().top + ($target[0].offsetHeight / 2) - ($tooltip[0].offsetHeight / 2)) var top = Math.round($target.offset().top + ($target[0].offsetHeight / 2) - ($tooltip[0].offsetHeight / 2))
...@@ -376,444 +381,7 @@ $(function () { ...@@ -376,444 +381,7 @@ $(function () {
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom') assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
}) })
QUnit.test('should be placed dynamically to viewport with the dynamic placement option', function (assert) { QUnit.test('should not error when trying to show an top-placed tooltip that has been removed from the dom', function (assert) {
assert.expect(6)
var $style = $('<style> div[rel="tooltip"] { position: absolute; } #qunit-fixture { top: inherit; left: inherit } </style>').appendTo('head')
var $container = $('<div/>')
.css({
position: 'relative',
height: '100%'
})
.appendTo('#qunit-fixture')
var $topTooltip = $('<div style="left: 0; top: 0;" rel="tooltip" title="Top tooltip">Top Dynamic Tooltip</div>')
.appendTo($container)
.bootstrapTooltip({ placement: 'auto', viewport: '#qunit-fixture' })
$topTooltip.bootstrapTooltip('show')
assert.ok($('.tooltip').is('.bottom'), 'top positioned tooltip is dynamically positioned to bottom')
$topTooltip.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'top positioned tooltip removed from dom')
var $rightTooltip = $('<div style="right: 0;" rel="tooltip" title="Right tooltip">Right Dynamic Tooltip</div>')
.appendTo($container)
.bootstrapTooltip({ placement: 'right auto', viewport: '#qunit-fixture' })
$rightTooltip.bootstrapTooltip('show')
assert.ok($('.tooltip').is('.left'), 'right positioned tooltip is dynamically positioned left')
$rightTooltip.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'right positioned tooltip removed from dom')
var $leftTooltip = $('<div style="left: 0;" rel="tooltip" title="Left tooltip">Left Dynamic Tooltip</div>')
.appendTo($container)
.bootstrapTooltip({ placement: 'auto left', viewport: '#qunit-fixture' })
$leftTooltip.bootstrapTooltip('show')
assert.ok($('.tooltip').is('.right'), 'left positioned tooltip is dynamically positioned right')
$leftTooltip.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'left positioned tooltip removed from dom')
$container.remove()
$style.remove()
})
QUnit.test('should position tip on top if viewport has enough space and placement is "auto top"', function (assert) {
assert.expect(2)
var styles = '<style>'
+ 'body { padding-top: 100px; }'
+ '#section { height: 300px; border: 1px solid red; padding-top: 50px }'
+ 'div[rel="tooltip"] { width: 150px; border: 1px solid blue; }'
+ '</style>'
var $styles = $(styles).appendTo('head')
var $container = $('<div id="section"/>').appendTo('#qunit-fixture')
var $target = $('<div rel="tooltip" title="tip"/>')
.appendTo($container)
.bootstrapTooltip({
placement: 'auto top',
viewport: '#section'
})
$target.bootstrapTooltip('show')
assert.ok($('.tooltip').is('.top'), 'top positioned tooltip is dynamically positioned to top')
$target.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
$styles.remove()
})
QUnit.test('should position tip on top if viewport has enough space and is not parent', function (assert) {
assert.expect(2)
var styles = '<style>'
+ '#section { height: 300px; border: 1px solid red; margin-top: 100px; }'
+ 'div[rel="tooltip"] { width: 150px; border: 1px solid blue; }'
+ '</style>'
var $styles = $(styles).appendTo('head')
var $container = $('<div id="section"/>').appendTo('#qunit-fixture')
var $target = $('<div rel="tooltip" title="tip"/>')
.appendTo($container)
.bootstrapTooltip({
placement: 'auto top',
viewport: '#qunit-fixture'
})
$target.bootstrapTooltip('show')
assert.ok($('.tooltip').is('.top'), 'top positioned tooltip is dynamically positioned to top')
$target.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
$styles.remove()
})
QUnit.test('should position tip on bottom if the tip\'s dimension exceeds the viewport area and placement is "auto top"', function (assert) {
assert.expect(2)
var styles = '<style>'
+ 'body { padding-top: 100px; }'
+ '#section { height: 300px; border: 1px solid red; }'
+ 'div[rel="tooltip"] { width: 150px; border: 1px solid blue; }'
+ '</style>'
var $styles = $(styles).appendTo('head')
var $container = $('<div id="section"/>').appendTo('#qunit-fixture')
var $target = $('<div rel="tooltip" title="tip"/>')
.appendTo($container)
.bootstrapTooltip({
placement: 'auto top',
viewport: '#section'
})
$target.bootstrapTooltip('show')
assert.ok($('.tooltip').is('.bottom'), 'top positioned tooltip is dynamically positioned to bottom')
$target.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
$styles.remove()
})
QUnit.test('should display the tip on top whenever scrollable viewport has enough room if the given placement is "auto top"', function (assert) {
assert.expect(2)
var styles = '<style>'
+ '#scrollable-div { height: 200px; overflow: auto; }'
+ '.tooltip-item { margin: 200px 0 400px; width: 150px; }'
+ '</style>'
var $styles = $(styles).appendTo('head')
var $container = $('<div id="scrollable-div"/>').appendTo('#qunit-fixture')
var $target = $('<div rel="tooltip" title="tip" class="tooltip-item">Tooltip Item</div>')
.appendTo($container)
.bootstrapTooltip({
placement: 'top auto',
viewport: '#scrollable-div'
})
$('#scrollable-div').scrollTop(100)
$target.bootstrapTooltip('show')
assert.ok($('.tooltip').is('.fade.top.in'), 'has correct classes applied')
$target.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
$styles.remove()
})
QUnit.test('should display the tip on bottom whenever scrollable viewport doesn\'t have enough room if the given placement is "auto top"', function (assert) {
assert.expect(2)
var styles = '<style>'
+ '#scrollable-div { height: 200px; overflow: auto; }'
+ '.tooltip-item { padding: 200px 0 400px; width: 150px; }'
+ '</style>'
var $styles = $(styles).appendTo('head')
var $container = $('<div id="scrollable-div"/>').appendTo('#qunit-fixture')
var $target = $('<div rel="tooltip" title="tip" class="tooltip-item">Tooltip Item</div>')
.appendTo($container)
.bootstrapTooltip({
placement: 'top auto',
viewport: '#scrollable-div'
})
$('#scrollable-div').scrollTop(200)
$target.bootstrapTooltip('show')
assert.ok($('.tooltip').is('.fade.bottom.in'), 'has correct classes applied')
$target.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
$styles.remove()
})
QUnit.test('should display the tip on bottom whenever scrollable viewport has enough room if the given placement is "auto bottom"', function (assert) {
assert.expect(2)
var styles = '<style>'
+ '#scrollable-div { height: 200px; overflow: auto; }'
+ '.spacer { height: 400px; }'
+ '.spacer:first-child { height: 200px; }'
+ '.tooltip-item { width: 150px; }'
+ '</style>'
var $styles = $(styles).appendTo('head')
var $container = $('<div id="scrollable-div"/>').appendTo('#qunit-fixture')
var $target = $('<div rel="tooltip" title="tip" class="tooltip-item">Tooltip Item</div>')
.appendTo($container)
.before('<div class="spacer"/>')
.after('<div class="spacer"/>')
.bootstrapTooltip({
placement: 'bottom auto',
viewport: '#scrollable-div'
})
$('#scrollable-div').scrollTop(200)
$target.bootstrapTooltip('show')
assert.ok($('.tooltip').is('.fade.bottom.in'), 'has correct classes applied')
$target.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
$styles.remove()
})
QUnit.test('should display the tip on top whenever scrollable viewport doesn\'t have enough room if the given placement is "auto bottom"', function (assert) {
assert.expect(2)
var styles = '<style>'
+ '#scrollable-div { height: 200px; overflow: auto; }'
+ '.tooltip-item { margin-top: 400px; width: 150px; }'
+ '</style>'
var $styles = $(styles).appendTo('head')
var $container = $('<div id="scrollable-div"/>').appendTo('#qunit-fixture')
var $target = $('<div rel="tooltip" title="tip" class="tooltip-item">Tooltip Item</div>')
.appendTo($container)
.bootstrapTooltip({
placement: 'bottom auto',
viewport: '#scrollable-div'
})
$('#scrollable-div').scrollTop(400)
$target.bootstrapTooltip('show')
assert.ok($('.tooltip').is('.fade.top.in'), 'has correct classes applied')
$target.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
$styles.remove()
})
QUnit.test('should adjust the tip\'s top position when up against the top of the viewport', function (assert) {
assert.expect(2)
var styles = '<style>'
+ '.tooltip .tooltip-inner { width: 200px; height: 200px; max-width: none; }'
+ 'a[rel="tooltip"] { position: fixed; }'
+ '</style>'
var $styles = $(styles).appendTo('head')
var $container = $('<div/>').appendTo('#qunit-fixture')
var $target = $('<a href="#" rel="tooltip" title="tip" style="top: 0px; left: 0px;"/>')
.appendTo($container)
.bootstrapTooltip({
placement: 'right',
viewport: {
selector: 'body',
padding: 12
}
})
$target.bootstrapTooltip('show')
assert.strictEqual(Math.round($container.find('.tooltip').offset().top), 12)
$target.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
$styles.remove()
})
QUnit.test('should adjust the tip\'s top position when up against the bottom of the viewport', function (assert) {
assert.expect(2)
var styles = '<style>'
+ '.tooltip .tooltip-inner { width: 200px; height: 200px; max-width: none; }'
+ 'a[rel="tooltip"] { position: fixed; }'
+ '</style>'
var $styles = $(styles).appendTo('head')
var $container = $('<div/>').appendTo('#qunit-fixture')
var $target = $('<a href="#" rel="tooltip" title="tip" style="bottom: 0px; left: 0px;"/>')
.appendTo($container)
.bootstrapTooltip({
placement: 'right',
viewport: {
selector: 'body',
padding: 12
}
})
$target.bootstrapTooltip('show')
var $tooltip = $container.find('.tooltip')
assert.strictEqual(Math.round($tooltip.offset().top), Math.round($(window).height() - 12 - $tooltip[0].offsetHeight))
$target.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
$container.remove()
$styles.remove()
})
QUnit.test('should adjust the tip\'s left position when up against the left of the viewport', function (assert) {
assert.expect(2)
var styles = '<style>'
+ '.tooltip .tooltip-inner { width: 200px; height: 200px; max-width: none; }'
+ 'a[rel="tooltip"] { position: fixed; }'
+ '</style>'
var $styles = $(styles).appendTo('head')
var $container = $('<div/>').appendTo('#qunit-fixture')
var $target = $('<a href="#" rel="tooltip" title="tip" style="top: 0px; left: 0px;"/>')
.appendTo($container)
.bootstrapTooltip({
placement: 'bottom',
viewport: {
selector: 'body',
padding: 12
}
})
$target.bootstrapTooltip('show')
assert.strictEqual(Math.round($container.find('.tooltip').offset().left), 12)
$target.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
$container.remove()
$styles.remove()
})
QUnit.test('should adjust the tip\'s left position when up against the right of the viewport', function (assert) {
assert.expect(2)
var styles = '<style>'
+ '.tooltip .tooltip-inner { width: 200px; height: 200px; max-width: none; }'
+ 'a[rel="tooltip"] { position: fixed; }'
+ '</style>'
var $styles = $(styles).appendTo('head')
var $container = $('<div/>').appendTo('body')
var $target = $('<a href="#" rel="tooltip" title="tip" style="top: 0px; right: 0px;"/>')
.appendTo($container)
.bootstrapTooltip({
placement: 'bottom',
viewport: {
selector: 'body',
padding: 12
}
})
$target.bootstrapTooltip('show')
var $tooltip = $container.find('.tooltip')
assert.strictEqual(Math.round($tooltip.offset().left), Math.round($(window).width() - 12 - $tooltip[0].offsetWidth))
$target.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
$container.remove()
$styles.remove()
})
QUnit.test('should adjust the tip when up against the right of an arbitrary viewport', function (assert) {
assert.expect(2)
var styles = '<style>'
+ '.tooltip, .tooltip .tooltip-inner { width: 200px; height: 200px; max-width: none; }'
+ '.container-viewport { position: absolute; top: 50px; left: 60px; width: 300px; height: 300px; }'
+ 'a[rel="tooltip"] { position: fixed; }'
+ '</style>'
var $styles = $(styles).appendTo('head')
var $container = $('<div class="container-viewport"/>').appendTo(document.body)
var $target = $('<a href="#" rel="tooltip" title="tip" style="top: 50px; left: 350px;"/>')
.appendTo($container)
.bootstrapTooltip({
placement: 'bottom',
viewport: '.container-viewport'
})
$target.bootstrapTooltip('show')
var $tooltip = $container.find('.tooltip')
assert.strictEqual(Math.round($tooltip.offset().left), Math.round(60 + $container.width() - $tooltip[0].offsetWidth))
$target.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
$container.remove()
$styles.remove()
})
QUnit.test('should get viewport element from function', function (assert) {
assert.expect(3)
var styles = '<style>'
+ '.tooltip, .tooltip .tooltip-inner { width: 200px; height: 200px; max-width: none; }'
+ '.container-viewport { position: absolute; top: 50px; left: 60px; width: 300px; height: 300px; }'
+ 'a[rel="tooltip"] { position: fixed; }'
+ '</style>'
var $styles = $(styles).appendTo('head')
var $container = $('<div class="container-viewport"/>').appendTo(document.body)
var $target = $('<a href="#" rel="tooltip" title="tip" style="top: 50px; left: 350px;"/>').appendTo($container)
$target
.bootstrapTooltip({
placement: 'bottom',
viewport: function ($element) {
assert.strictEqual($element[0], $target[0], 'viewport function was passed target as argument')
return ($element.closest('.container-viewport'))
}
})
$target.bootstrapTooltip('show')
var $tooltip = $container.find('.tooltip')
assert.strictEqual(Math.round($tooltip.offset().left), Math.round(60 + $container.width() - $tooltip[0].offsetWidth))
$target.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
$container.remove()
$styles.remove()
})
QUnit.test('should not misplace the tip when the right edge offset is greater or equal than the viewport width', function (assert) {
assert.expect(2)
var styles = '<style>'
+ '.tooltip, .tooltip *, .tooltip *:before, .tooltip *:after { box-sizing: border-box; }'
+ '.container-viewport, .container-viewport *, .container-viewport *:before, .container-viewport *:after { box-sizing: border-box; }'
+ '.tooltip, .tooltip .tooltip-inner { width: 50px; height: 50px; max-width: none; background: red; }'
+ '.container-viewport { padding: 100px; margin-left: 100px; width: 100px; }'
+ '</style>'
var $styles = $(styles).appendTo('head')
var $container = $('<div class="container-viewport"/>').appendTo(document.body)
var $target = $('<a href="#" rel="tooltip" title="tip">foobar</a>')
.appendTo($container)
.bootstrapTooltip({
viewport: '.container-viewport'
})
$target.bootstrapTooltip('show')
var $tooltip = $container.find('.tooltip')
assert.strictEqual(Math.round($tooltip.offset().left), Math.round($target.position().left + $target.width() / 2 - $tooltip[0].offsetWidth / 2))
$target.bootstrapTooltip('hide')
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
$container.remove()
$styles.remove()
})
QUnit.test('should not error when trying to show an auto-placed tooltip that has been removed from the dom', function (assert) {
assert.expect(1) assert.expect(1)
var passed = true var passed = true
var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>') var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>')
...@@ -821,7 +389,7 @@ $(function () { ...@@ -821,7 +389,7 @@ $(function () {
.one('show.bs.tooltip', function () { .one('show.bs.tooltip', function () {
$(this).remove() $(this).remove()
}) })
.bootstrapTooltip({ placement: 'auto' }) .bootstrapTooltip({ attachment: 'top' })
try { try {
$tooltip.bootstrapTooltip('show') $tooltip.bootstrapTooltip('show')
...@@ -858,12 +426,12 @@ $(function () { ...@@ -858,12 +426,12 @@ $(function () {
.find('a') .find('a')
.css('margin-top', 200) .css('margin-top', 200)
.bootstrapTooltip({ .bootstrapTooltip({
placement: 'top', attachment: 'top',
animate: false animate: false
}) })
.bootstrapTooltip('show') .bootstrapTooltip('show')
var $tooltip = $container.find('.tooltip') var $tooltip = $($trigger.data('bs.tooltip').tip)
setTimeout(function () { setTimeout(function () {
assert.ok(Math.round($tooltip.offset().top + $tooltip.outerHeight()) <= Math.round($trigger.offset().top)) assert.ok(Math.round($tooltip.offset().top + $tooltip.outerHeight()) <= Math.round($trigger.offset().top))
...@@ -871,38 +439,6 @@ $(function () { ...@@ -871,38 +439,6 @@ $(function () {
}, 0) }, 0)
}) })
QUnit.test('should place tooltip inside viewport', function (assert) {
assert.expect(1)
var done = assert.async()
var $container = $('<div/>')
.css({
position: 'absolute',
width: 200,
height: 200,
bottom: 0,
left: 0
})
.appendTo('#qunit-fixture')
$('<a href="#" title="Very very very very very very very very long tooltip">Hover me</a>')
.css({
position: 'absolute',
top: 0,
left: 0
})
.appendTo($container)
.bootstrapTooltip({
placement: 'top'
})
.bootstrapTooltip('show')
setTimeout(function () {
assert.ok($('.tooltip').offset().left >= 0)
done()
}, 0)
})
QUnit.test('should show tooltip if leave event hasn\'t occurred before delay expires', function (assert) { QUnit.test('should show tooltip if leave event hasn\'t occurred before delay expires', function (assert) {
assert.expect(2) assert.expect(2)
var done = assert.async() var done = assert.async()
...@@ -1021,16 +557,16 @@ $(function () { ...@@ -1021,16 +557,16 @@ $(function () {
.bootstrapTooltip({ delay: { show: 0, hide: 150 }}) .bootstrapTooltip({ delay: { show: 0, hide: 150 }})
setTimeout(function () { setTimeout(function () {
assert.ok($tooltip.data('bs.tooltip').$tip.is('.fade.in'), '1ms: tooltip faded in') assert.ok($($tooltip.data('bs.tooltip').tip).is('.fade.in'), '1ms: tooltip faded in')
$tooltip.trigger('mouseout') $tooltip.trigger('mouseout')
setTimeout(function () { setTimeout(function () {
assert.ok($tooltip.data('bs.tooltip').$tip.is('.fade.in'), '100ms: tooltip still faded in') assert.ok($($tooltip.data('bs.tooltip').tip).is('.fade.in'), '100ms: tooltip still faded in')
}, 100) }, 100)
setTimeout(function () { setTimeout(function () {
assert.ok(!$tooltip.data('bs.tooltip').$tip.is('.in'), '200ms: tooltip removed') assert.ok(!$($tooltip.data('bs.tooltip').tip).is('.in'), '200ms: tooltip removed')
done() done()
}, 200) }, 200)
...@@ -1073,61 +609,19 @@ $(function () { ...@@ -1073,61 +609,19 @@ $(function () {
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom') assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
done() done()
}) })
.bootstrapTooltip({ container: 'body', placement: 'top', trigger: 'manual' }) .bootstrapTooltip({ attachment: 'top', trigger: 'manual' })
$circle.bootstrapTooltip('show') $circle.bootstrapTooltip('show')
}) })
QUnit.test('should correctly determine auto placement based on container rather than parent', function (assert) {
assert.expect(2)
var done = assert.async()
var styles = '<style>'
+ '.tooltip, .tooltip *, .tooltip *:before, .tooltip *:after { box-sizing: border-box; }'
+ '.tooltip { position: absolute; display: block; font-size: 12px; line-height: 1.4; }'
+ '.tooltip .tooltip-inner { max-width: 200px; padding: 3px 8px; font-family: Helvetica; text-align: center; }'
+ '#trigger-parent {'
+ ' position: fixed;'
+ ' top: 100px;'
+ ' right: 17px;'
+ '}'
+ '</style>'
var $styles = $(styles).appendTo('head')
$('#qunit-fixture').append('<span id="trigger-parent"><a id="tt-trigger" title="If a_larger_text is written here, it won\'t fit using older broken version of BS">HOVER OVER ME</a></span>')
var $trigger = $('#tt-trigger')
$trigger
.on('shown.bs.tooltip', function () {
var $tip = $('.tooltip-inner')
var tipXrightEdge = $tip.offset().left + $tip.width()
var triggerXleftEdge = $trigger.offset().left
assert.ok(tipXrightEdge < triggerXleftEdge, 'tooltip with auto left placement, when near the right edge of the viewport, gets left placement')
$trigger.bootstrapTooltip('hide')
})
.on('hidden.bs.tooltip', function () {
$styles.remove()
$(this).remove()
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
done()
})
.bootstrapTooltip({
container: 'body',
placement: 'auto left',
trigger: 'manual'
})
$trigger.bootstrapTooltip('show')
})
QUnit.test('should not reload the tooltip on subsequent mouseenter events', function (assert) { QUnit.test('should not reload the tooltip on subsequent mouseenter events', function (assert) {
assert.expect(1) assert.expect(1)
var titleHtml = function () { var titleHtml = function () {
var uid = $.fn.bootstrapTooltip.Constructor.prototype.getUID('tooltip') var uid = Util.getUID('tooltip')
return '<p id="tt-content">' + uid + '</p><p>' + uid + '</p><p>' + uid + '</p>' return '<p id="tt-content">' + uid + '</p><p>' + uid + '</p><p>' + uid + '</p>'
} }
var $tooltip = $('<span id="tt-outer" rel="tooltip" data-trigger="hover" data-placement="top">some text</span>') var $tooltip = $('<span id="tt-outer" rel="tooltip" data-trigger="hover" data-attachment="top">some text</span>')
.appendTo('#qunit-fixture') .appendTo('#qunit-fixture')
$tooltip.bootstrapTooltip({ $tooltip.bootstrapTooltip({
...@@ -1149,12 +643,13 @@ $(function () { ...@@ -1149,12 +643,13 @@ $(function () {
QUnit.test('should not reload the tooltip if the mouse leaves and re-enters before hiding', function (assert) { QUnit.test('should not reload the tooltip if the mouse leaves and re-enters before hiding', function (assert) {
assert.expect(4) assert.expect(4)
var titleHtml = function () { var titleHtml = function () {
var uid = $.fn.bootstrapTooltip.Constructor.prototype.getUID('tooltip') var uid = Util.getUID('tooltip')
return '<p id="tt-content">' + uid + '</p><p>' + uid + '</p><p>' + uid + '</p>' return '<p id="tt-content">' + uid + '</p><p>' + uid + '</p><p>' + uid + '</p>'
} }
var $tooltip = $('<span id="tt-outer" rel="tooltip" data-trigger="hover" data-placement="top">some text</span>') var $tooltip = $('<span id="tt-outer" rel="tooltip" data-trigger="hover" data-attachment="top">some text</span>')
.appendTo('#qunit-fixture') .appendTo('#qunit-fixture')
$tooltip.bootstrapTooltip({ $tooltip.bootstrapTooltip({
...@@ -1162,7 +657,6 @@ $(function () { ...@@ -1162,7 +657,6 @@ $(function () {
animation: false, animation: false,
trigger: 'hover', trigger: 'hover',
delay: { show: 0, hide: 500 }, delay: { show: 0, hide: 500 },
container: $tooltip,
title: titleHtml title: titleHtml
}) })
...@@ -1175,47 +669,14 @@ $(function () { ...@@ -1175,47 +669,14 @@ $(function () {
$('#tt-outer').trigger('mouseleave') $('#tt-outer').trigger('mouseleave')
assert.strictEqual(currentUid, $('#tt-content').text()) assert.strictEqual(currentUid, $('#tt-content').text())
assert.ok(obj.hoverState == 'out', 'the tooltip hoverState should be set to "out"') assert.ok(obj._hoverState == 'out', 'the tooltip hoverState should be set to "out"')
$('#tt-content').trigger('mouseenter') $('#tt-outer').trigger('mouseenter')
assert.ok(obj.hoverState == 'in', 'the tooltip hoverState should be set to "in"') assert.ok(obj._hoverState == 'in', 'the tooltip hoverState should be set to "in"')
assert.strictEqual(currentUid, $('#tt-content').text()) assert.strictEqual(currentUid, $('#tt-content').text())
}) })
QUnit.test('should position arrow correctly when tooltip is moved to not appear offscreen', function (assert) {
assert.expect(2)
var done = assert.async()
var styles = '<style>'
+ '.tooltip, .tooltip *, .tooltip *:before, .tooltip *:after { box-sizing: border-box; }'
+ '.tooltip { position: absolute; }'
+ '.tooltip-arrow { position: absolute; width: 0; height: 0; }'
+ '.tooltip .tooltip-inner { max-width: 200px; padding: 3px 8px; }'
+ '</style>'
var $styles = $(styles).appendTo('head')
$('<a href="#" title="tooltip title" style="position: absolute; bottom: 0; right: 0;">Foobar</a>')
.appendTo('body')
.on('shown.bs.tooltip', function () {
var arrowStyles = $(this).data('bs.tooltip').$tip.find('.tooltip-arrow').attr('style')
assert.ok(/left/i.test(arrowStyles) && !/top/i.test(arrowStyles), 'arrow positioned correctly')
$(this).bootstrapTooltip('hide')
})
.on('hidden.bs.tooltip', function () {
$styles.remove()
$(this).remove()
assert.strictEqual($('.tooltip').length, 0, 'tooltip removed from dom')
done()
})
.bootstrapTooltip({
container: 'body',
placement: 'top',
trigger: 'manual'
})
.bootstrapTooltip('show')
})
QUnit.test('should correctly position tooltips on transformed elements', function (assert) { QUnit.test('should correctly position tooltips on transformed elements', function (assert) {
var styleProps = document.documentElement.style var styleProps = document.documentElement.style
if (!('transform' in styleProps) && !('webkitTransform' in styleProps) && !('msTransform' in styleProps)) { if (!('transform' in styleProps) && !('webkitTransform' in styleProps) && !('msTransform' in styleProps)) {
...@@ -1247,21 +708,12 @@ $(function () { ...@@ -1247,21 +708,12 @@ $(function () {
done() done()
}) })
.bootstrapTooltip({ .bootstrapTooltip({
container: 'body',
placement: 'top',
trigger: 'manual' trigger: 'manual'
}) })
$element.bootstrapTooltip('show') $element.bootstrapTooltip('show')
}) })
QUnit.test('should throw an error when initializing tooltip on the document object without specifying a delegation selector', function (assert) {
assert.expect(1)
assert.throws(function () {
$(document).bootstrapTooltip({ title: 'What am I on?' })
}, new Error('`selector` option must be specified when initializing tooltip on the window.document object!'))
})
QUnit.test('should do nothing when an attempt is made to hide an uninitialized tooltip', function (assert) { QUnit.test('should do nothing when an attempt is made to hide an uninitialized tooltip', function (assert) {
assert.expect(1) assert.expect(1)
...@@ -1274,25 +726,15 @@ $(function () { ...@@ -1274,25 +726,15 @@ $(function () {
assert.strictEqual($tooltip.data('bs.tooltip'), undefined, 'should not initialize the tooltip') assert.strictEqual($tooltip.data('bs.tooltip'), undefined, 'should not initialize the tooltip')
}) })
QUnit.test('should throw an error when template contains multiple top-level elements', function (assert) {
assert.expect(1)
assert.throws(function () {
$('<a href="#" data-toggle="tooltip" title="Another tooltip"></a>')
.appendTo('#qunit-fixture')
.bootstrapTooltip({ template: '<div>Foo</div><div>Bar</div>' })
.bootstrapTooltip('show')
}, new Error('tooltip `template` option must consist of exactly 1 top-level element!'))
})
QUnit.test('should not remove tooltip if multiple triggers are set and one is still active', function (assert) { QUnit.test('should not remove tooltip if multiple triggers are set and one is still active', function (assert) {
assert.expect(41) assert.expect(41)
var $el = $('<button>Trigger</button>') var $el = $('<button>Trigger</button>')
.appendTo('#qunit-fixture') .appendTo('#qunit-fixture')
.bootstrapTooltip({ trigger: 'click hover focus', animation: false }) .bootstrapTooltip({ trigger: 'click hover focus', animation: false })
var tooltip = $el.data('bs.tooltip') var tooltip = $el.data('bs.tooltip')
var $tooltip = tooltip.tip() var $tooltip = $(tooltip.getTipElement())
function showingTooltip() { return $tooltip.hasClass('in') || tooltip.hoverState == 'in' } function showingTooltip() { return $tooltip.hasClass('in') || tooltip._hoverState == 'in' }
var tests = [ var tests = [
['mouseenter', 'mouseleave'], ['mouseenter', 'mouseleave'],
......
/*! tether 0.7.1 */
!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,o){return function(){var t,e,o,i,n,s,l,r,h,a,f,p,u,d,g,c,m,b,v,y={}.hasOwnProperty,w=[].indexOf||function(t){for(var e=0,o=this.length;o>e;e++)if(e in this&&this[e]===t)return e;return-1},C=[].slice;null==this.Tether&&(this.Tether={modules:[]}),p=function(t){var e,o,i,n,s;if(o=getComputedStyle(t).position,"fixed"===o)return t;for(i=void 0,e=t;e=e.parentNode;){try{n=getComputedStyle(e)}catch(l){}if(null==n)return e;if(/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&("absolute"!==o||"relative"===(s=n.position)||"absolute"===s||"fixed"===s))return e}return document.body},m=function(){var t;return t=0,function(){return t++}}(),v={},a=function(t){var e,i,s,l,r;if(s=t._tetherZeroElement,null==s&&(s=t.createElement("div"),s.setAttribute("data-tether-id",m()),n(s.style,{top:0,left:0,position:"absolute"}),t.body.appendChild(s),t._tetherZeroElement=s),e=s.getAttribute("data-tether-id"),null==v[e]){v[e]={},r=s.getBoundingClientRect();for(i in r)l=r[i],v[e][i]=l;o(function(){return v[e]=void 0})}return v[e]},d=null,l=function(t){var e,o,i,n,s,l,r;t===document?(o=document,t=document.documentElement):o=t.ownerDocument,i=o.documentElement,e={},r=t.getBoundingClientRect();for(n in r)l=r[n],e[n]=l;return s=a(o),e.top-=s.top,e.left-=s.left,null==e.width&&(e.width=document.body.scrollWidth-e.left-e.right),null==e.height&&(e.height=document.body.scrollHeight-e.top-e.bottom),e.top=e.top-i.clientTop,e.left=e.left-i.clientLeft,e.right=o.body.clientWidth-e.width-e.left,e.bottom=o.body.clientHeight-e.height-e.top,e},h=function(t){return t.offsetParent||document.documentElement},f=function(){var t,e,o,i,s;return t=document.createElement("div"),t.style.width="100%",t.style.height="200px",e=document.createElement("div"),n(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e),i=t.offsetWidth,e.style.overflow="scroll",s=t.offsetWidth,i===s&&(s=e.clientWidth),document.body.removeChild(e),o=i-s,{width:o,height:o}},n=function(t){var e,o,i,n,s,l,r;for(null==t&&(t={}),e=[],Array.prototype.push.apply(e,arguments),r=e.slice(1),s=0,l=r.length;l>s;s++)if(i=r[s])for(o in i)y.call(i,o)&&(n=i[o],t[o]=n);return t},g=function(t,e){var o,i,n,s,l,h;if(null!=t.classList){for(l=e.split(" "),h=[],n=0,s=l.length;s>n;n++)i=l[n],i.trim()&&h.push(t.classList.remove(i));return h}return o=r(t).replace(new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi")," "),c(t,o)},e=function(t,e){var o,i,n,s,l;if(null!=t.classList){for(s=e.split(" "),l=[],i=0,n=s.length;n>i;i++)o=s[i],o.trim()&&l.push(t.classList.add(o));return l}return g(t,e),o=r(t)+(" "+e),c(t,o)},u=function(t,e){return null!=t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(r(t))},r=function(t){return t.className instanceof SVGAnimatedString?t.className.baseVal:t.className},c=function(t,e){return t.setAttribute("class",e)},b=function(t,o,i){var n,s,l,r,h,a;for(s=0,r=i.length;r>s;s++)n=i[s],w.call(o,n)<0&&u(t,n)&&g(t,n);for(a=[],l=0,h=o.length;h>l;l++)n=o[l],a.push(u(t,n)?void 0:e(t,n));return a},i=[],o=function(t){return i.push(t)},s=function(){var t,e;for(e=[];t=i.pop();)e.push(t());return e},t=function(){function t(){}return t.prototype.on=function(t,e,o,i){var n;return null==i&&(i=!1),null==this.bindings&&(this.bindings={}),null==(n=this.bindings)[t]&&(n[t]=[]),this.bindings[t].push({handler:e,ctx:o,once:i})},t.prototype.once=function(t,e,o){return this.on(t,e,o,!0)},t.prototype.off=function(t,e){var o,i,n;if(null!=(null!=(i=this.bindings)?i[t]:void 0)){if(null==e)return delete this.bindings[t];for(o=0,n=[];o<this.bindings[t].length;)n.push(this.bindings[t][o].handler===e?this.bindings[t].splice(o,1):o++);return n}},t.prototype.trigger=function(){var t,e,o,i,n,s,l,r,h;if(o=arguments[0],t=2<=arguments.length?C.call(arguments,1):[],null!=(l=this.bindings)?l[o]:void 0){for(n=0,h=[];n<this.bindings[o].length;)r=this.bindings[o][n],i=r.handler,e=r.ctx,s=r.once,i.apply(null!=e?e:this,t),h.push(s?this.bindings[o].splice(n,1):n++);return h}},t}(),this.Tether.Utils={getScrollParent:p,getBounds:l,getOffsetParent:h,extend:n,addClass:e,removeClass:g,hasClass:u,updateClasses:b,defer:o,flush:s,uniqueId:m,Evented:t,getScrollBarSize:f}}.call(this),function(){var t,e,o,i,n,s,l,r,h,a,f,p,u,d,g,c,m,b,v,y,w,C,O,T,x,A,E,S,W,M=[].slice,P=function(t,e){return function(){return t.apply(e,arguments)}};if(null==this.Tether)throw new Error("You must include the utils.js file before tether.js");i=this.Tether,W=i.Utils,c=W.getScrollParent,m=W.getSize,d=W.getOuterSize,p=W.getBounds,u=W.getOffsetParent,a=W.extend,n=W.addClass,O=W.removeClass,A=W.updateClasses,h=W.defer,f=W.flush,g=W.getScrollBarSize,E=function(t,e,o){return null==o&&(o=1),t+o>=e&&e>=t-o},x=function(){var t,e,o,i,n;for(t=document.createElement("div"),n=["transform","webkitTransform","OTransform","MozTransform","msTransform"],o=0,i=n.length;i>o;o++)if(e=n[o],void 0!==t.style[e])return e}(),T=[],C=function(){var t,e,o;for(e=0,o=T.length;o>e;e++)t=T[e],t.position(!1);return f()},b=function(){var t;return null!=(t="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance.now():void 0)?t:+new Date},function(){var t,e,o,i,n,s,l,r,h;for(e=null,o=null,i=null,n=function(){if(null!=o&&o>16)return o=Math.min(o-16,250),void(i=setTimeout(n,250));if(!(null!=e&&b()-e<10))return null!=i&&(clearTimeout(i),i=null),e=b(),C(),o=b()-e},r=["resize","scroll","touchmove"],h=[],s=0,l=r.length;l>s;s++)t=r[s],h.push(window.addEventListener(t,n));return h}(),t={center:"center",left:"right",right:"left"},e={middle:"middle",top:"bottom",bottom:"top"},o={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},r=function(o,i){var n,s;return n=o.left,s=o.top,"auto"===n&&(n=t[i.left]),"auto"===s&&(s=e[i.top]),{left:n,top:s}},l=function(t){var e,i;return{left:null!=(e=o[t.left])?e:t.left,top:null!=(i=o[t.top])?i:t.top}},s=function(){var t,e,o,i,n,s,l;for(e=1<=arguments.length?M.call(arguments,0):[],o={top:0,left:0},n=0,s=e.length;s>n;n++)l=e[n],i=l.top,t=l.left,"string"==typeof i&&(i=parseFloat(i,10)),"string"==typeof t&&(t=parseFloat(t,10)),o.top+=i,o.left+=t;return o},v=function(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t},y=w=function(t){var e,o,i;return i=t.split(" "),o=i[0],e=i[1],{top:o,left:e}},S=function(){function t(t){this.position=P(this.position,this);var e,o,n,s,l;for(T.push(this),this.history=[],this.setOptions(t,!1),s=i.modules,o=0,n=s.length;n>o;o++)e=s[o],null!=(l=e.initialize)&&l.call(this);this.position()}return t.modules=[],t.prototype.getClass=function(t){var e,o;return(null!=(e=this.options.classes)?e[t]:void 0)?this.options.classes[t]:(null!=(o=this.options.classes)?o[t]:void 0)!==!1?this.options.classPrefix?""+this.options.classPrefix+"-"+t:t:""},t.prototype.setOptions=function(t,e){var o,i,s,l,r,h;for(this.options=t,null==e&&(e=!0),o={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"},this.options=a(o,this.options),r=this.options,this.element=r.element,this.target=r.target,this.targetModifier=r.targetModifier,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),h=["element","target"],s=0,l=h.length;l>s;s++){if(i=h[s],null==this[i])throw new Error("Tether Error: Both element and target must be defined");null!=this[i].jquery?this[i]=this[i][0]:"string"==typeof this[i]&&(this[i]=document.querySelector(this[i]))}if(n(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&n(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");return this.targetAttachment=y(this.options.targetAttachment),this.attachment=y(this.options.attachment),this.offset=w(this.options.offset),this.targetOffset=w(this.options.targetOffset),null!=this.scrollParent&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParent=this.target:this.scrollParent=c(this.target),this.options.enabled!==!1?this.enable(e):void 0},t.prototype.getTargetBounds=function(){var t,e,o,i,n,s,l,r,h;if(null==this.targetModifier)return p(this.target);switch(this.targetModifier){case"visible":return this.target===document.body?{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth}:(t=p(this.target),n={height:t.height,width:t.width,top:t.top,left:t.left},n.height=Math.min(n.height,t.height-(pageYOffset-t.top)),n.height=Math.min(n.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),n.height=Math.min(innerHeight,n.height),n.height-=2,n.width=Math.min(n.width,t.width-(pageXOffset-t.left)),n.width=Math.min(n.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),n.width=Math.min(innerWidth,n.width),n.width-=2,n.top<pageYOffset&&(n.top=pageYOffset),n.left<pageXOffset&&(n.left=pageXOffset),n);case"scroll-handle":return h=this.target,h===document.body?(h=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=p(h),r=getComputedStyle(h),o=h.scrollWidth>h.clientWidth||"scroll"===[r.overflow,r.overflowX]||this.target!==document.body,s=0,o&&(s=15),i=t.height-parseFloat(r.borderTopWidth)-parseFloat(r.borderBottomWidth)-s,n={width:15,height:.975*i*(i/h.scrollHeight),left:t.left+t.width-parseFloat(r.borderLeftWidth)-15},e=0,408>i&&this.target===document.body&&(e=-11e-5*Math.pow(i,2)-.00727*i+22.58),this.target!==document.body&&(n.height=Math.max(n.height,24)),l=this.target.scrollTop/(h.scrollHeight-i),n.top=l*(i-n.height-e)+t.top+parseFloat(r.borderTopWidth),this.target===document.body&&(n.height=Math.max(n.height,24)),n}},t.prototype.clearCache=function(){return this._cache={}},t.prototype.cache=function(t,e){return null==this._cache&&(this._cache={}),null==this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]},t.prototype.enable=function(t){return null==t&&(t=!0),this.options.addTargetClasses!==!1&&n(this.target,this.getClass("enabled")),n(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParent!==document&&this.scrollParent.addEventListener("scroll",this.position),t?this.position():void 0},t.prototype.disable=function(){return O(this.target,this.getClass("enabled")),O(this.element,this.getClass("enabled")),this.enabled=!1,null!=this.scrollParent?this.scrollParent.removeEventListener("scroll",this.position):void 0},t.prototype.destroy=function(){var t,e,o,i,n;for(this.disable(),n=[],t=o=0,i=T.length;i>o;t=++o){if(e=T[t],e===this){T.splice(t,1);break}n.push(void 0)}return n},t.prototype.updateAttachClasses=function(t,e){var o,i,n,s,l,r,a,f,p,u=this;for(null==t&&(t=this.attachment),null==e&&(e=this.targetAttachment),s=["left","top","bottom","right","middle","center"],(null!=(p=this._addAttachClasses)?p.length:void 0)&&this._addAttachClasses.splice(0,this._addAttachClasses.length),o=null!=this._addAttachClasses?this._addAttachClasses:this._addAttachClasses=[],t.top&&o.push(""+this.getClass("element-attached")+"-"+t.top),t.left&&o.push(""+this.getClass("element-attached")+"-"+t.left),e.top&&o.push(""+this.getClass("target-attached")+"-"+e.top),e.left&&o.push(""+this.getClass("target-attached")+"-"+e.left),i=[],l=0,a=s.length;a>l;l++)n=s[l],i.push(""+this.getClass("element-attached")+"-"+n);for(r=0,f=s.length;f>r;r++)n=s[r],i.push(""+this.getClass("target-attached")+"-"+n);return h(function(){return null!=u._addAttachClasses?(A(u.element,u._addAttachClasses,i),u.options.addTargetClasses!==!1&&A(u.target,u._addAttachClasses,i),u._addAttachClasses=void 0):void 0})},t.prototype.position=function(t){var e,o,n,h,a,d,c,m,b,y,w,C,O,T,x,A,E,S,W,M,P,z,B,_,F,L,Y,H,X,N,j,R,U,q,k,D=this;if(null==t&&(t=!0),this.enabled){for(this.clearCache(),M=r(this.targetAttachment,this.attachment),this.updateAttachClasses(this.attachment,M),e=this.cache("element-bounds",function(){return p(D.element)}),F=e.width,n=e.height,0===F&&0===n&&null!=this.lastSize?(N=this.lastSize,F=N.width,n=N.height):this.lastSize={width:F,height:n},B=z=this.cache("target-bounds",function(){return D.getTargetBounds()}),b=v(l(this.attachment),{width:F,height:n}),P=v(l(M),B),a=v(this.offset,{width:F,height:n}),d=v(this.targetOffset,B),b=s(b,a),P=s(P,d),h=z.left+P.left-b.left,_=z.top+P.top-b.top,j=i.modules,L=0,H=j.length;H>L;L++){if(c=j[L],x=c.position.call(this,{left:h,top:_,targetAttachment:M,targetPos:z,attachment:this.attachment,elementPos:e,offset:b,targetOffset:P,manualOffset:a,manualTargetOffset:d,scrollbarSize:S}),x===!1)return!1;null!=x&&"object"==typeof x&&(_=x.top,h=x.left)}if(m={page:{top:_,left:h},viewport:{top:_-pageYOffset,bottom:pageYOffset-_-n+innerHeight,left:h-pageXOffset,right:pageXOffset-h-F+innerWidth}},document.body.scrollWidth>window.innerWidth&&(S=this.cache("scrollbar-size",g),m.viewport.bottom-=S.height),document.body.scrollHeight>window.innerHeight&&(S=this.cache("scrollbar-size",g),m.viewport.right-=S.width),(""!==(R=document.body.style.position)&&"static"!==R||""!==(U=document.body.parentElement.style.position)&&"static"!==U)&&(m.page.bottom=document.body.scrollHeight-_-n,m.page.right=document.body.scrollWidth-h-F),(null!=(q=this.options.optimizations)?q.moveElement:void 0)!==!1&&null==this.targetModifier){for(w=this.cache("target-offsetparent",function(){return u(D.target)}),T=this.cache("target-offsetparent-bounds",function(){return p(w)}),O=getComputedStyle(w),o=getComputedStyle(this.element),C=T,y={},k=["Top","Left","Bottom","Right"],Y=0,X=k.length;X>Y;Y++)W=k[Y],y[W.toLowerCase()]=parseFloat(O["border"+W+"Width"]);T.right=document.body.scrollWidth-T.left-C.width+y.right,T.bottom=document.body.scrollHeight-T.top-C.height+y.bottom,m.page.top>=T.top+y.top&&m.page.bottom>=T.bottom&&m.page.left>=T.left+y.left&&m.page.right>=T.right&&(E=w.scrollTop,A=w.scrollLeft,m.offset={top:m.page.top-T.top+E-y.top,left:m.page.left-T.left+A-y.left})}return this.move(m),this.history.unshift(m),this.history.length>3&&this.history.pop(),t&&f(),!0}},t.prototype.move=function(t){var e,o,i,n,s,l,r,f,p,d,g,c,m,b,v,y,w,C=this;if(null!=this.element.parentNode){f={};for(d in t){f[d]={};for(n in t[d]){for(i=!1,y=this.history,b=0,v=y.length;v>b;b++)if(r=y[b],!E(null!=(w=r[d])?w[n]:void 0,t[d][n])){i=!0;break}i||(f[d][n]=!0)}}e={top:"",left:"",right:"",bottom:""},p=function(t,o){var i,n,s;return(null!=(s=C.options.optimizations)?s.gpu:void 0)===!1?(t.top?e.top=""+o.top+"px":e.bottom=""+o.bottom+"px",t.left?e.left=""+o.left+"px":e.right=""+o.right+"px"):(t.top?(e.top=0,n=o.top):(e.bottom=0,n=-o.bottom),t.left?(e.left=0,i=o.left):(e.right=0,i=-o.right),e[x]="translateX("+Math.round(i)+"px) translateY("+Math.round(n)+"px)","msTransform"!==x?e[x]+=" translateZ(0)":void 0)},s=!1,(f.page.top||f.page.bottom)&&(f.page.left||f.page.right)?(e.position="absolute",p(f.page,t.page)):(f.viewport.top||f.viewport.bottom)&&(f.viewport.left||f.viewport.right)?(e.position="fixed",p(f.viewport,t.viewport)):null!=f.offset&&f.offset.top&&f.offset.left?(e.position="absolute",l=this.cache("target-offsetparent",function(){return u(C.target)}),u(this.element)!==l&&h(function(){return C.element.parentNode.removeChild(C.element),l.appendChild(C.element)}),p(f.offset,t.offset),s=!0):(e.position="absolute",p({top:!0,left:!0},t.page)),s||"BODY"===this.element.parentNode.tagName||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element)),m={},c=!1;for(n in e)g=e[n],o=this.element.style[n],""===o||""===g||"top"!==n&&"left"!==n&&"bottom"!==n&&"right"!==n||(o=parseFloat(o),g=parseFloat(g)),o!==g&&(c=!0,m[n]=e[n]);return c?h(function(){return a(C.element.style,m)}):void 0}},t}(),i.position=C,this.Tether=a(S,i)}.call(this),function(){var t,e,o,i,n,s,l,r,h,a,f=[].indexOf||function(t){for(var e=0,o=this.length;o>e;e++)if(e in this&&this[e]===t)return e;return-1};a=this.Tether.Utils,l=a.getOuterSize,s=a.getBounds,r=a.getSize,i=a.extend,h=a.updateClasses,o=a.defer,e={left:"right",right:"left",top:"bottom",bottom:"top",middle:"middle"},t=["left","top","right","bottom"],n=function(e,o){var i,n,l,r,h,a,f;if("scrollParent"===o?o=e.scrollParent:"window"===o&&(o=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),o===document&&(o=o.documentElement),null!=o.nodeType)for(n=r=s(o),h=getComputedStyle(o),o=[n.left,n.top,r.width+n.left,r.height+n.top],i=a=0,f=t.length;f>a;i=++a)l=t[i],l=l[0].toUpperCase()+l.substr(1),"Top"===l||"Left"===l?o[i]+=parseFloat(h["border"+l+"Width"]):o[i]-=parseFloat(h["border"+l+"Width"]);return o},this.Tether.modules.push({position:function(e){var l,r,a,p,u,d,g,c,m,b,v,y,w,C,O,T,x,A,E,S,W,M,P,z,B,_,F,L,Y,H,X,N,j,R,U,q,k,D,Z,V,$,G,I,J,K,Q,tt,et=this;if(_=e.top,v=e.left,W=e.targetAttachment,!this.options.constraints)return!0;for(A=function(e){var o,i,n,s;for(et.removeClass(e),s=[],i=0,n=t.length;n>i;i++)o=t[i],s.push(et.removeClass(""+e+"-"+o));return s},V=this.cache("element-bounds",function(){return s(et.element)}),b=V.height,F=V.width,0===F&&0===b&&null!=this.lastSize&&($=this.lastSize,F=$.width,b=$.height),P=this.cache("target-bounds",function(){return et.getTargetBounds()}),M=P.height,z=P.width,S={},m={},r=[this.getClass("pinned"),this.getClass("out-of-bounds")],G=this.options.constraints,L=0,N=G.length;N>L;L++)c=G[L],c.outOfBoundsClass&&r.push(c.outOfBoundsClass),c.pinnedClass&&r.push(c.pinnedClass);for(Y=0,j=r.length;j>Y;Y++)for(g=r[Y],I=["left","top","right","bottom"],H=0,R=I.length;R>H;H++)E=I[H],r.push(""+g+"-"+E);for(l=[],S=i({},W),m=i({},this.attachment),J=this.options.constraints,X=0,U=J.length;U>X;X++){if(c=J[X],B=c.to,a=c.attachment,O=c.pin,null==a&&(a=""),f.call(a," ")>=0?(K=a.split(" "),d=K[0],u=K[1]):u=d=a,p=n(this,B),("target"===d||"both"===d)&&(_<p[1]&&"top"===S.top&&(_+=M,S.top="bottom"),_+b>p[3]&&"bottom"===S.top&&(_-=M,S.top="top")),"together"===d&&(_<p[1]&&"top"===S.top&&("bottom"===m.top?(_+=M,S.top="bottom",_+=b,m.top="top"):"top"===m.top&&(_+=M,S.top="bottom",_-=b,m.top="bottom")),_+b>p[3]&&"bottom"===S.top&&("top"===m.top?(_-=M,S.top="top",_-=b,m.top="bottom"):"bottom"===m.top&&(_-=M,S.top="top",_+=b,m.top="top")),"middle"===S.top&&(_+b>p[3]&&"top"===m.top?(_-=b,m.top="bottom"):_<p[1]&&"bottom"===m.top&&(_+=b,m.top="top"))),("target"===u||"both"===u)&&(v<p[0]&&"left"===S.left&&(v+=z,S.left="right"),v+F>p[2]&&"right"===S.left&&(v-=z,S.left="left")),"together"===u&&(v<p[0]&&"left"===S.left?"right"===m.left?(v+=z,S.left="right",v+=F,m.left="left"):"left"===m.left&&(v+=z,S.left="right",v-=F,m.left="right"):v+F>p[2]&&"right"===S.left?"left"===m.left?(v-=z,S.left="left",v-=F,m.left="right"):"right"===m.left&&(v-=z,S.left="left",v+=F,m.left="left"):"center"===S.left&&(v+F>p[2]&&"left"===m.left?(v-=F,m.left="right"):v<p[0]&&"right"===m.left&&(v+=F,m.left="left"))),("element"===d||"both"===d)&&(_<p[1]&&"bottom"===m.top&&(_+=b,m.top="top"),_+b>p[3]&&"top"===m.top&&(_-=b,m.top="bottom")),("element"===u||"both"===u)&&(v<p[0]&&"right"===m.left&&(v+=F,m.left="left"),v+F>p[2]&&"left"===m.left&&(v-=F,m.left="right")),"string"==typeof O?O=function(){var t,e,o,i;for(o=O.split(","),i=[],e=0,t=o.length;t>e;e++)C=o[e],i.push(C.trim());return i}():O===!0&&(O=["top","left","right","bottom"]),O||(O=[]),T=[],y=[],_<p[1]&&(f.call(O,"top")>=0?(_=p[1],T.push("top")):y.push("top")),_+b>p[3]&&(f.call(O,"bottom")>=0?(_=p[3]-b,T.push("bottom")):y.push("bottom")),v<p[0]&&(f.call(O,"left")>=0?(v=p[0],T.push("left")):y.push("left")),v+F>p[2]&&(f.call(O,"right")>=0?(v=p[2]-F,T.push("right")):y.push("right")),T.length)for(x=null!=(Q=this.options.pinnedClass)?Q:this.getClass("pinned"),l.push(x),D=0,q=T.length;q>D;D++)E=T[D],l.push(""+x+"-"+E);if(y.length)for(w=null!=(tt=this.options.outOfBoundsClass)?tt:this.getClass("out-of-bounds"),l.push(w),Z=0,k=y.length;k>Z;Z++)E=y[Z],l.push(""+w+"-"+E);(f.call(T,"left")>=0||f.call(T,"right")>=0)&&(m.left=S.left=!1),(f.call(T,"top")>=0||f.call(T,"bottom")>=0)&&(m.top=S.top=!1),(S.top!==W.top||S.left!==W.left||m.top!==this.attachment.top||m.left!==this.attachment.left)&&this.updateAttachClasses(m,S)}return o(function(){return et.options.addTargetClasses!==!1&&h(et.target,l,r),h(et.element,l,r)}),{top:_,left:v}}})}.call(this),function(){var t,e,o,i;i=this.Tether.Utils,e=i.getBounds,o=i.updateClasses,t=i.defer,this.Tether.modules.push({position:function(i){var n,s,l,r,h,a,f,p,u,d,g,c,m,b,v,y,w,C,O,T,x,A,E,S,W,M=this;if(g=i.top,a=i.left,x=this.cache("element-bounds",function(){return e(M.element)}),h=x.height,c=x.width,d=this.getTargetBounds(),r=g+h,f=a+c,n=[],g<=d.bottom&&r>=d.top)for(A=["left","right"],m=0,w=A.length;w>m;m++)p=A[m],((E=d[p])===a||E===f)&&n.push(p);if(a<=d.right&&f>=d.left)for(S=["top","bottom"],b=0,C=S.length;C>b;b++)p=S[b],((W=d[p])===g||W===r)&&n.push(p);for(l=[],s=[],u=["left","top","right","bottom"],l.push(this.getClass("abutted")),v=0,O=u.length;O>v;v++)p=u[v],l.push(""+this.getClass("abutted")+"-"+p);for(n.length&&s.push(this.getClass("abutted")),y=0,T=n.length;T>y;y++)p=n[y],s.push(""+this.getClass("abutted")+"-"+p);return t(function(){return M.options.addTargetClasses!==!1&&o(M.target,s,l),o(M.element,s,l)}),!0}})}.call(this),function(){this.Tether.modules.push({position:function(t){var e,o,i,n,s,l,r;return l=t.top,e=t.left,this.options.shift?(o=function(t){return"function"==typeof t?t.call(this,{top:l,left:e}):t},i=o(this.options.shift),"string"==typeof i?(i=i.split(" "),i[1]||(i[1]=i[0]),s=i[0],n=i[1],s=parseFloat(s,10),n=parseFloat(n,10)):(r=[i.top,i.left],s=r[0],n=r[1]),l+=s,e+=n,{top:l,left:e}):void 0}})}.call(this),this.Tether});
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tooltip</title> <title>Tooltip</title>
<link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> <link rel="stylesheet" href="../../../dist/css/bootstrap.css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
...@@ -22,22 +22,23 @@ ...@@ -22,22 +22,23 @@
<h1>Tooltip <small>Bootstrap Visual Test</small></h1> <h1>Tooltip <small>Bootstrap Visual Test</small></h1>
</div> </div>
<p class="muted" style="margin-bottom: 0;">Tight pants next level keffiyeh <a href="#" data-toggle="tooltip" title="" data-original-title="Default tooltip">you probably</a> haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel <a href="#" data-toggle="tooltip" title="" data-original-title="Another tooltip">have a</a> terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan <a href="#" data-toggle="tooltip" title="" data-original-title="Another one here too">whatever keytar</a>, scenester farm-to-table banksy Austin <a href="#" data-toggle="tooltip" title="" data-original-title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral. <p class="muted" style="margin-bottom: 0;">Tight pants next level keffiyeh <a href="#" data-toggle="tooltip" title="Default tooltip">you probably</a> haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel <a href="#" data-toggle="tooltip" title="Another tooltip">have a</a> terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan <a href="#" data-toggle="tooltip" title="Another one here too">whatever keytar</a>, scenester farm-to-table banksy Austin <a href="#" data-toggle="tooltip" title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral.
</p> </p>
<hr> <hr>
<p> <p>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="left" title="" data-original-title="Tooltip on left">Tooltip on left</button> <button type="button" class="btn btn-default" data-toggle="tooltip" data-attachment="left" title="" data-original-title="Tooltip on left">Tooltip on left</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</button> <button type="button" class="btn btn-default" data-toggle="tooltip" data-attachment="top" title="Tooltip on top">Tooltip on top</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</button> <button type="button" class="btn btn-default" data-toggle="tooltip" data-attachment="bottom" title="Tooltip on bottom">Tooltip on bottom</button>
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</button> <button type="button" class="btn btn-default" data-toggle="tooltip" data-attachment="right" title="Tooltip on right">Tooltip on right</button>
</p> </p>
</div> </div>
<!-- JavaScript Includes --> <!-- JavaScript Includes -->
<script src="../vendor/jquery.min.js"></script> <script src="../vendor/jquery.min.js"></script>
<script src="../../transition.js"></script> <script src="../vendor/tether.min.js"></script>
<script src="../../tooltip.js"></script> <script src="../../dist/util.js"></script>
<script src="../../dist/tooltip.js"></script>
<!-- JavaScript Test --> <!-- JavaScript Test -->
<script> <script>
......
...@@ -16,23 +16,59 @@ ...@@ -16,23 +16,59 @@
opacity: 0; opacity: 0;
&.in { opacity: $tooltip-opacity; } &.in { opacity: $tooltip-opacity; }
}
.tooltip-top { &.tooltip-top,
padding: $tooltip-arrow-width 0; &.bs-tether-element-attached-bottom {
margin-top: -3px; padding: $tooltip-arrow-width 0;
} margin-top: -3px;
.tooltip-right {
padding: 0 $tooltip-arrow-width; .tooltip-arrow {
margin-left: 3px; bottom: 0;
} left: 50%;
.tooltip-bottom { margin-left: -$tooltip-arrow-width;
padding: $tooltip-arrow-width 0; border-width: $tooltip-arrow-width $tooltip-arrow-width 0;
margin-top: 3px; border-top-color: $tooltip-arrow-color;
} }
.tooltip-left { }
padding: 0 $tooltip-arrow-width; &.tooltip-right,
margin-left: -3px; &.bs-tether-element-attached-left {
padding: 0 $tooltip-arrow-width;
margin-left: 3px;
.tooltip-arrow {
top: 50%;
left: 0;
margin-top: -$tooltip-arrow-width;
border-width: $tooltip-arrow-width $tooltip-arrow-width $tooltip-arrow-width 0;
border-right-color: $tooltip-arrow-color;
}
}
&.tooltip-bottom,
&.bs-tether-element-attached-top {
padding: $tooltip-arrow-width 0;
margin-top: 3px;
.tooltip-arrow {
top: 0;
left: 50%;
margin-left: -$tooltip-arrow-width;
border-width: 0 $tooltip-arrow-width $tooltip-arrow-width;
border-bottom-color: $tooltip-arrow-color;
}
}
&.tooltip-left,
&.bs-tether-element-attached-right {
padding: 0 $tooltip-arrow-width;
margin-left: -3px;
.tooltip-arrow {
top: 50%;
right: 0;
margin-top: -$tooltip-arrow-width;
border-width: $tooltip-arrow-width 0 $tooltip-arrow-width $tooltip-arrow-width;
border-left-color: $tooltip-arrow-color;
}
}
} }
// Wrapper for the tooltip content // Wrapper for the tooltip content
...@@ -53,32 +89,4 @@ ...@@ -53,32 +89,4 @@
height: 0; height: 0;
border-color: transparent; border-color: transparent;
border-style: solid; border-style: solid;
} }
.tooltip-top .tooltip-arrow { \ No newline at end of file
bottom: 0;
left: 50%;
margin-left: -$tooltip-arrow-width;
border-width: $tooltip-arrow-width $tooltip-arrow-width 0;
border-top-color: $tooltip-arrow-color;
}
.tooltip-right .tooltip-arrow {
top: 50%;
left: 0;
margin-top: -$tooltip-arrow-width;
border-width: $tooltip-arrow-width $tooltip-arrow-width $tooltip-arrow-width 0;
border-right-color: $tooltip-arrow-color;
}
.tooltip-left .tooltip-arrow {
top: 50%;
right: 0;
margin-top: -$tooltip-arrow-width;
border-width: $tooltip-arrow-width 0 $tooltip-arrow-width $tooltip-arrow-width;
border-left-color: $tooltip-arrow-color;
}
.tooltip-bottom .tooltip-arrow {
top: 0;
left: 50%;
margin-left: -$tooltip-arrow-width;
border-width: 0 $tooltip-arrow-width $tooltip-arrow-width;
border-bottom-color: $tooltip-arrow-color;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment