Add v5.2.0 docs (#36769)
35
404.html
@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="The most popular HTML, CSS, and JS library in the world.">
|
||||
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
|
||||
<meta name="generator" content="Hugo 0.98.0">
|
||||
<meta name="generator" content="Hugo 0.101.0">
|
||||
|
||||
<meta name="docsearch:language" content="en">
|
||||
<meta name="docsearch:version" content="5.2">
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
|
||||
<link href="/docs/5.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
|
||||
<link href="/docs/5.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
|
||||
|
||||
<link href="/docs/5.2/assets/css/docs.css" rel="stylesheet">
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
<div class="skippy visually-hidden-focusable overflow-hidden">
|
||||
<div class="container-xl">
|
||||
<a class="d-inline-flex p-2 m-1" href="#content">Skip to main content</a>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -151,11 +151,11 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="32" class="d-block my-1" viewBox="0 0 118 94" role="img"><title>Bootstrap</title><path fill-rule="evenodd" clip-rule="evenodd" d="M24.509 0c-6.733 0-11.715 5.893-11.492 12.284.214 6.14-.064 14.092-2.066 20.577C8.943 39.365 5.547 43.485 0 44.014v5.972c5.547.529 8.943 4.649 10.951 11.153 2.002 6.485 2.28 14.437 2.066 20.577C12.794 88.106 17.776 94 24.51 94H93.5c6.733 0 11.714-5.893 11.491-12.284-.214-6.14.064-14.092 2.066-20.577 2.009-6.504 5.396-10.624 10.943-11.153v-5.972c-5.547-.529-8.934-4.649-10.943-11.153-2.002-6.484-2.28-14.437-2.066-20.577C105.214 5.894 100.233 0 93.5 0H24.508zM80 57.863C80 66.663 73.436 72 62.543 72H44a2 2 0 01-2-2V24a2 2 0 012-2h18.437c9.083 0 15.044 4.92 15.044 12.474 0 5.302-4.01 10.049-9.119 10.88v.277C75.317 46.394 80 51.21 80 57.863zM60.521 28.34H49.948v14.934h8.905c6.884 0 10.68-2.772 10.68-7.727 0-4.643-3.264-7.207-9.012-7.207zM49.948 49.2v16.458H60.91c7.167 0 10.964-2.876 10.964-8.281 0-5.406-3.903-8.178-11.425-8.178H49.948z" fill="currentColor"/></svg>
|
||||
</a>
|
||||
|
||||
<button class="navbar-toggler d-flex d-lg-none order-3 p-2" type="button" data-bs-toggle="offcanvas" data-bs-target="#bdNavbar" aria-controls="bdNavbar" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<svg class="bi" width="24" height="24" aria-hidden="true"><use xlink:href="#three-dots"></use></svg>
|
||||
<button class="navbar-toggler d-flex d-lg-none order-3 p-2" type="button" data-bs-toggle="offcanvas" data-bs-target="#bdNavbar" aria-controls="bdNavbar" aria-label="Toggle navigation">
|
||||
<svg class="bi" aria-hidden="true"><use xlink:href="#three-dots"></use></svg>
|
||||
</button>
|
||||
|
||||
<div class="offcanvas-lg offcanvas-end flex-grow-1" id="bdNavbar" aria-labelledby="bdNavbarOffcanvasLabel" data-bs-scroll="true">
|
||||
<div class="offcanvas-lg offcanvas-end flex-grow-1" tabindex="-1" id="bdNavbar" aria-labelledby="bdNavbarOffcanvasLabel" data-bs-scroll="true">
|
||||
<div class="offcanvas-header px-4 pb-0">
|
||||
<h5 class="offcanvas-title text-white" id="bdNavbarOffcanvasLabel">Bootstrap</h5>
|
||||
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="offcanvas" aria-label="Close" data-bs-target="#bdNavbar"></button>
|
||||
@ -183,7 +183,7 @@
|
||||
|
||||
<hr class="d-lg-none text-white-50">
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="navbar-nav flex-row flex-wrap ms-md-auto">
|
||||
<li class="nav-item col-6 col-lg-auto">
|
||||
@ -214,13 +214,13 @@
|
||||
<div class="vr d-none d-lg-flex h-100 mx-lg-2 text-white"></div>
|
||||
<hr class="d-lg-none text-white-50">
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<button class="btn btn-link nav-link py-2 px-0 px-lg-2 dropdown-toggle" id="bd-versions" data-bs-toggle="dropdown" aria-expanded="false" data-bs-display="static">
|
||||
<span class="d-lg-none">Bootstrap</span> v5.2
|
||||
<button type="button" class="btn btn-link nav-link py-2 px-0 px-lg-2 dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" data-bs-display="static">
|
||||
<span class="d-lg-none" aria-hidden="true">Bootstrap</span><span class="visually-hidden">Bootstrap </span> v5.2 <span class="visually-hidden">(switch to other versions)</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="bd-versions">
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li><h6 class="dropdown-header">v5 releases</h6></li>
|
||||
<li>
|
||||
<a class="dropdown-item current" aria-current="true" href="/docs/5.2/">
|
||||
@ -250,7 +250,7 @@
|
||||
</header>
|
||||
|
||||
|
||||
|
||||
|
||||
<main class="my-auto p-5" id="content">
|
||||
<div class="text-center py-5">
|
||||
<h1 class="display-1">404</h1>
|
||||
@ -271,8 +271,7 @@
|
||||
<ul class="list-unstyled small text-muted">
|
||||
<li class="mb-2">Designed and built with all the love in the world by the <a href="/docs/5.2/about/team/">Bootstrap team</a> with the help of <a href="https://github.com/twbs/bootstrap/graphs/contributors">our contributors</a>.</li>
|
||||
<li class="mb-2">Code licensed <a href="https://github.com/twbs/bootstrap/blob/main/LICENSE" target="_blank" rel="license noopener">MIT</a>, docs <a href="https://creativecommons.org/licenses/by/3.0/" target="_blank" rel="license noopener">CC BY 3.0</a>.</li>
|
||||
<li class="mb-2">Currently v5.2.0-beta1.</li>
|
||||
<li class="mb-2">Analytics by <a href="https://usefathom.com/ref/ADZSBE" target="_blank" rel="noopener">Fathom</a>.</li>
|
||||
<li class="mb-2">Currently v5.2.0.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-6 col-lg-2 offset-lg-1 mb-3">
|
||||
@ -281,6 +280,7 @@
|
||||
<li class="mb-2"><a href="/">Home</a></li>
|
||||
<li class="mb-2"><a href="/docs/5.2/">Docs</a></li>
|
||||
<li class="mb-2"><a href="/docs/5.2/examples/">Examples</a></li>
|
||||
<li class="mb-2"><a href="https://icons.getbootstrap.com/">Icons</a></li>
|
||||
<li class="mb-2"><a href="https://themes.getbootstrap.com/">Themes</a></li>
|
||||
<li class="mb-2"><a href="https://blog.getbootstrap.com/">Blog</a></li>
|
||||
<li class="mb-2"><a href="https://cottonbureau.com/people/bootstrap">Swag Store</a></li>
|
||||
@ -293,6 +293,7 @@
|
||||
<li class="mb-2"><a href="/docs/5.2/examples/starter-template/">Starter template</a></li>
|
||||
<li class="mb-2"><a href="/docs/5.2/getting-started/webpack/">Webpack</a></li>
|
||||
<li class="mb-2"><a href="/docs/5.2/getting-started/parcel/">Parcel</a></li>
|
||||
<li class="mb-2"><a href="/docs/5.2/getting-started/vite/">Vite</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-6 col-lg-2 mb-3">
|
||||
@ -320,7 +321,7 @@
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="/docs/5.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2" crossorigin="anonymous"></script>
|
||||
<script src="/docs/5.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa" crossorigin="anonymous"></script>
|
||||
|
||||
|
||||
|
||||
@ -330,7 +331,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 529 B After Width: | Height: | Size: 525 B |
BIN
docs/5.2/assets/img/guides/bootstrap-parcel.png
Normal file
After Width: | Height: | Size: 158 KiB |
BIN
docs/5.2/assets/img/guides/bootstrap-parcel@2x.png
Normal file
After Width: | Height: | Size: 552 KiB |
BIN
docs/5.2/assets/img/guides/bootstrap-vite.png
Normal file
After Width: | Height: | Size: 165 KiB |
BIN
docs/5.2/assets/img/guides/bootstrap-vite@2x.png
Normal file
After Width: | Height: | Size: 545 KiB |
BIN
docs/5.2/assets/img/guides/bootstrap-webpack.png
Normal file
After Width: | Height: | Size: 166 KiB |
BIN
docs/5.2/assets/img/guides/bootstrap-webpack@2x.png
Normal file
After Width: | Height: | Size: 559 KiB |
BIN
docs/5.2/assets/img/guides/parcel-dev-server-bootstrap.png
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
docs/5.2/assets/img/guides/parcel-dev-server.png
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
docs/5.2/assets/img/guides/vite-dev-server-bootstrap.png
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
docs/5.2/assets/img/guides/vite-dev-server.png
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
docs/5.2/assets/img/guides/webpack-dev-server-bootstrap.png
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
docs/5.2/assets/img/guides/webpack-dev-server.png
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
docs/5.2/assets/img/parcel.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
docs/5.2/assets/img/vite.png
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
docs/5.2/assets/img/webpack.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
4
docs/5.2/assets/js/docs.min.js
vendored
947
docs/5.2/dist/css/bootstrap-grid.css
vendored
2
docs/5.2/dist/css/bootstrap-grid.css.map
vendored
4
docs/5.2/dist/css/bootstrap-grid.min.css
vendored
2
docs/5.2/dist/css/bootstrap-grid.min.css.map
vendored
947
docs/5.2/dist/css/bootstrap-grid.rtl.css
vendored
2
docs/5.2/dist/css/bootstrap-grid.rtl.css.map
vendored
4
docs/5.2/dist/css/bootstrap-grid.rtl.min.css
vendored
7
docs/5.2/dist/css/bootstrap-reboot.css
vendored
@ -1,9 +1,8 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.2.0-beta1 (https://getbootstrap.com/)
|
||||
* Bootstrap Reboot v5.2.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors
|
||||
* Copyright 2011-2022 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
:root {
|
||||
--bs-blue: #0d6efd;
|
||||
@ -68,7 +67,6 @@
|
||||
--bs-border-radius-xl: 1rem;
|
||||
--bs-border-radius-2xl: 2rem;
|
||||
--bs-border-radius-pill: 50rem;
|
||||
--bs-heading-color: ;
|
||||
--bs-link-color: #0d6efd;
|
||||
--bs-link-hover-color: #0a58ca;
|
||||
--bs-code-color: #d63384;
|
||||
@ -113,7 +111,6 @@ h6, h5, h4, h3, h2, h1 {
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
color: var(--bs-heading-color);
|
||||
}
|
||||
|
||||
h1 {
|
||||
@ -313,7 +310,7 @@ table {
|
||||
caption {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: rgba(var(--bs-body-color-rgb), 0.75);
|
||||
color: #6c757d;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
2
docs/5.2/dist/css/bootstrap-reboot.css.map
vendored
5
docs/5.2/dist/css/bootstrap-reboot.min.css
vendored
7
docs/5.2/dist/css/bootstrap-reboot.rtl.css
vendored
@ -1,9 +1,8 @@
|
||||
/*!
|
||||
* Bootstrap Reboot v5.2.0-beta1 (https://getbootstrap.com/)
|
||||
* Bootstrap Reboot v5.2.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors
|
||||
* Copyright 2011-2022 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
|
||||
*/
|
||||
:root {
|
||||
--bs-blue: #0d6efd;
|
||||
@ -68,7 +67,6 @@
|
||||
--bs-border-radius-xl: 1rem;
|
||||
--bs-border-radius-2xl: 2rem;
|
||||
--bs-border-radius-pill: 50rem;
|
||||
--bs-heading-color: ;
|
||||
--bs-link-color: #0d6efd;
|
||||
--bs-link-hover-color: #0a58ca;
|
||||
--bs-code-color: #d63384;
|
||||
@ -113,7 +111,6 @@ h6, h5, h4, h3, h2, h1 {
|
||||
margin-bottom: 0.5rem;
|
||||
font-weight: 500;
|
||||
line-height: 1.2;
|
||||
color: var(--bs-heading-color);
|
||||
}
|
||||
|
||||
h1 {
|
||||
@ -313,7 +310,7 @@ table {
|
||||
caption {
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
color: rgba(var(--bs-body-color-rgb), 0.75);
|
||||
color: #6c757d;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
796
docs/5.2/dist/css/bootstrap-utilities.css
vendored
796
docs/5.2/dist/css/bootstrap-utilities.rtl.css
vendored
1223
docs/5.2/dist/css/bootstrap.css
vendored
2
docs/5.2/dist/css/bootstrap.css.map
vendored
4
docs/5.2/dist/css/bootstrap.min.css
vendored
2
docs/5.2/dist/css/bootstrap.min.css.map
vendored
1223
docs/5.2/dist/css/bootstrap.rtl.css
vendored
2
docs/5.2/dist/css/bootstrap.rtl.css.map
vendored
4
docs/5.2/dist/css/bootstrap.rtl.min.css
vendored
2
docs/5.2/dist/css/bootstrap.rtl.min.css.map
vendored
366
docs/5.2/dist/js/bootstrap.bundle.js
vendored
@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Bootstrap v5.2.0-beta1 (https://getbootstrap.com/)
|
||||
* Bootstrap v5.2.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
@ -11,13 +11,13 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/index.js
|
||||
* Bootstrap (v5.2.0): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
const MAX_UID = 1000000;
|
||||
const MILLISECONDS_MULTIPLIER = 1000;
|
||||
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
const TRANSITION_END = 'transitionend'; // Shout-out Angus Croll (https://goo.gl/pxwQGp)
|
||||
|
||||
const toType = object => {
|
||||
if (object === null || object === undefined) {
|
||||
@ -326,7 +326,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): dom/event-handler.js
|
||||
* Bootstrap (v5.2.0): dom/event-handler.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -349,12 +349,12 @@
|
||||
* Private methods
|
||||
*/
|
||||
|
||||
function getUidEvent(element, uid) {
|
||||
function makeEventUid(element, uid) {
|
||||
return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;
|
||||
}
|
||||
|
||||
function getEvent(element) {
|
||||
const uid = getUidEvent(element);
|
||||
function getElementEvents(element) {
|
||||
const uid = makeEventUid(element);
|
||||
element.uidEvent = uid;
|
||||
eventRegistry[uid] = eventRegistry[uid] || {};
|
||||
return eventRegistry[uid];
|
||||
@ -362,7 +362,9 @@
|
||||
|
||||
function bootstrapHandler(element, fn) {
|
||||
return function handler(event) {
|
||||
event.delegateTarget = element;
|
||||
hydrateObj(event, {
|
||||
delegateTarget: element
|
||||
});
|
||||
|
||||
if (handler.oneOff) {
|
||||
EventHandler.off(element, event.type, fn);
|
||||
@ -384,7 +386,9 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
event.delegateTarget = target;
|
||||
hydrateObj(event, {
|
||||
delegateTarget: target
|
||||
});
|
||||
|
||||
if (handler.oneOff) {
|
||||
EventHandler.off(element, event.type, selector, fn);
|
||||
@ -396,20 +400,21 @@
|
||||
};
|
||||
}
|
||||
|
||||
function findHandler(events, handler, delegationSelector = null) {
|
||||
return Object.values(events).find(event => event.originalHandler === handler && event.delegationSelector === delegationSelector);
|
||||
function findHandler(events, callable, delegationSelector = null) {
|
||||
return Object.values(events).find(event => event.callable === callable && event.delegationSelector === delegationSelector);
|
||||
}
|
||||
|
||||
function normalizeParameters(originalTypeEvent, handler, delegationFunction) {
|
||||
const delegation = typeof handler === 'string';
|
||||
const originalHandler = delegation ? delegationFunction : handler;
|
||||
const isDelegated = typeof handler === 'string'; // todo: tooltip passes `false` instead of selector, so we need to check
|
||||
|
||||
const callable = isDelegated ? delegationFunction : handler || delegationFunction;
|
||||
let typeEvent = getTypeEvent(originalTypeEvent);
|
||||
|
||||
if (!nativeEvents.has(typeEvent)) {
|
||||
typeEvent = originalTypeEvent;
|
||||
}
|
||||
|
||||
return [delegation, originalHandler, typeEvent];
|
||||
return [isDelegated, callable, typeEvent];
|
||||
}
|
||||
|
||||
function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {
|
||||
@ -417,13 +422,9 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (!handler) {
|
||||
handler = delegationFunction;
|
||||
delegationFunction = null;
|
||||
} // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
|
||||
let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
|
||||
// this prevents the handler from being dispatched the same way as mouseover or mouseout does
|
||||
|
||||
|
||||
if (originalTypeEvent in customEvents) {
|
||||
const wrapFunction = fn => {
|
||||
return function (event) {
|
||||
@ -433,31 +434,26 @@
|
||||
};
|
||||
};
|
||||
|
||||
if (delegationFunction) {
|
||||
delegationFunction = wrapFunction(delegationFunction);
|
||||
} else {
|
||||
handler = wrapFunction(handler);
|
||||
}
|
||||
callable = wrapFunction(callable);
|
||||
}
|
||||
|
||||
const [delegation, originalHandler, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);
|
||||
const events = getEvent(element);
|
||||
const events = getElementEvents(element);
|
||||
const handlers = events[typeEvent] || (events[typeEvent] = {});
|
||||
const previousFunction = findHandler(handlers, originalHandler, delegation ? handler : null);
|
||||
const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null);
|
||||
|
||||
if (previousFunction) {
|
||||
previousFunction.oneOff = previousFunction.oneOff && oneOff;
|
||||
return;
|
||||
}
|
||||
|
||||
const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
|
||||
const fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFunction) : bootstrapHandler(element, handler);
|
||||
fn.delegationSelector = delegation ? handler : null;
|
||||
fn.originalHandler = originalHandler;
|
||||
const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''));
|
||||
const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable);
|
||||
fn.delegationSelector = isDelegated ? handler : null;
|
||||
fn.callable = callable;
|
||||
fn.oneOff = oneOff;
|
||||
fn.uidEvent = uid;
|
||||
handlers[uid] = fn;
|
||||
element.addEventListener(typeEvent, fn, delegation);
|
||||
element.addEventListener(typeEvent, fn, isDelegated);
|
||||
}
|
||||
|
||||
function removeHandler(element, events, typeEvent, handler, delegationSelector) {
|
||||
@ -477,7 +473,7 @@
|
||||
for (const handlerKey of Object.keys(storeElementEvent)) {
|
||||
if (handlerKey.includes(namespace)) {
|
||||
const event = storeElementEvent[handlerKey];
|
||||
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
|
||||
removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -502,18 +498,19 @@
|
||||
return;
|
||||
}
|
||||
|
||||
const [delegation, originalHandler, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);
|
||||
const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);
|
||||
const inNamespace = typeEvent !== originalTypeEvent;
|
||||
const events = getEvent(element);
|
||||
const events = getElementEvents(element);
|
||||
const storeElementEvent = events[typeEvent] || {};
|
||||
const isNamespace = originalTypeEvent.startsWith('.');
|
||||
|
||||
if (typeof originalHandler !== 'undefined') {
|
||||
if (typeof callable !== 'undefined') {
|
||||
// Simplest case: handler is passed, remove that listener ONLY.
|
||||
if (!events || !events[typeEvent]) {
|
||||
if (!Object.keys(storeElementEvent).length) {
|
||||
return;
|
||||
}
|
||||
|
||||
removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
|
||||
removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -523,14 +520,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
const storeElementEvent = events[typeEvent] || {};
|
||||
|
||||
for (const keyHandlers of Object.keys(storeElementEvent)) {
|
||||
const handlerKey = keyHandlers.replace(stripUidRegex, '');
|
||||
|
||||
if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
|
||||
const event = storeElementEvent[keyHandlers];
|
||||
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
|
||||
removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -556,21 +551,11 @@
|
||||
defaultPrevented = jQueryEvent.isDefaultPrevented();
|
||||
}
|
||||
|
||||
const evt = new Event(event, {
|
||||
let evt = new Event(event, {
|
||||
bubbles,
|
||||
cancelable: true
|
||||
}); // merge custom information in our event
|
||||
|
||||
if (typeof args !== 'undefined') {
|
||||
for (const key of Object.keys(args)) {
|
||||
Object.defineProperty(evt, key, {
|
||||
get() {
|
||||
return args[key];
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
evt = hydrateObj(evt, args);
|
||||
|
||||
if (defaultPrevented) {
|
||||
evt.preventDefault();
|
||||
@ -589,9 +574,28 @@
|
||||
|
||||
};
|
||||
|
||||
function hydrateObj(obj, meta) {
|
||||
for (const [key, value] of Object.entries(meta || {})) {
|
||||
try {
|
||||
obj[key] = value;
|
||||
} catch (_unused) {
|
||||
Object.defineProperty(obj, key, {
|
||||
configurable: true,
|
||||
|
||||
get() {
|
||||
return value;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): dom/data.js
|
||||
* Bootstrap (v5.2.0): dom/data.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -643,7 +647,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): dom/manipulator.js
|
||||
* Bootstrap (v5.2.0): dom/manipulator.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -713,7 +717,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/config.js
|
||||
* Bootstrap (v5.2.0): util/config.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -774,7 +778,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): base-component.js
|
||||
* Bootstrap (v5.2.0): base-component.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -782,7 +786,7 @@
|
||||
* Constants
|
||||
*/
|
||||
|
||||
const VERSION = '5.2.0-beta1';
|
||||
const VERSION = '5.2.0';
|
||||
/**
|
||||
* Class definition
|
||||
*/
|
||||
@ -853,7 +857,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/component-functions.js
|
||||
* Bootstrap (v5.2.0): util/component-functions.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -879,7 +883,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): alert.js
|
||||
* Bootstrap (v5.2.0): alert.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -959,7 +963,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): button.js
|
||||
* Bootstrap (v5.2.0): button.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1021,7 +1025,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): dom/selector-engine.js
|
||||
* Bootstrap (v5.2.0): dom/selector-engine.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1092,7 +1096,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/swipe.js
|
||||
* Bootstrap (v5.2.0): util/swipe.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1112,14 +1116,14 @@
|
||||
const CLASS_NAME_POINTER_EVENT = 'pointer-event';
|
||||
const SWIPE_THRESHOLD = 40;
|
||||
const Default$c = {
|
||||
endCallback: null,
|
||||
leftCallback: null,
|
||||
rightCallback: null,
|
||||
endCallback: null
|
||||
rightCallback: null
|
||||
};
|
||||
const DefaultType$c = {
|
||||
endCallback: '(function|null)',
|
||||
leftCallback: '(function|null)',
|
||||
rightCallback: '(function|null)',
|
||||
endCallback: '(function|null)'
|
||||
rightCallback: '(function|null)'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
@ -1228,7 +1232,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): carousel.js
|
||||
* Bootstrap (v5.2.0): carousel.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1284,9 +1288,10 @@
|
||||
};
|
||||
const DefaultType$b = {
|
||||
interval: '(number|boolean)',
|
||||
// TODO:v6 remove boolean support
|
||||
keyboard: 'boolean',
|
||||
ride: '(boolean|string)',
|
||||
pause: '(string|boolean)',
|
||||
ride: '(boolean|string)',
|
||||
touch: 'boolean',
|
||||
wrap: 'boolean'
|
||||
};
|
||||
@ -1675,7 +1680,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): collapse.js
|
||||
* Bootstrap (v5.2.0): collapse.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1703,12 +1708,12 @@
|
||||
const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';
|
||||
const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="collapse"]';
|
||||
const Default$a = {
|
||||
toggle: true,
|
||||
parent: null
|
||||
parent: null,
|
||||
toggle: true
|
||||
};
|
||||
const DefaultType$a = {
|
||||
toggle: 'boolean',
|
||||
parent: '(null|element)'
|
||||
parent: '(null|element)',
|
||||
toggle: 'boolean'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
@ -3800,7 +3805,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): dropdown.js
|
||||
* Bootstrap (v5.2.0): dropdown.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -3846,20 +3851,20 @@
|
||||
const PLACEMENT_TOPCENTER = 'top';
|
||||
const PLACEMENT_BOTTOMCENTER = 'bottom';
|
||||
const Default$9 = {
|
||||
offset: [0, 2],
|
||||
autoClose: true,
|
||||
boundary: 'clippingParents',
|
||||
reference: 'toggle',
|
||||
display: 'dynamic',
|
||||
offset: [0, 2],
|
||||
popperConfig: null,
|
||||
autoClose: true
|
||||
reference: 'toggle'
|
||||
};
|
||||
const DefaultType$9 = {
|
||||
offset: '(array|string|function)',
|
||||
autoClose: '(boolean|string)',
|
||||
boundary: '(string|element)',
|
||||
reference: '(string|element|object)',
|
||||
display: 'string',
|
||||
offset: '(array|string|function)',
|
||||
popperConfig: '(null|object|function)',
|
||||
autoClose: '(boolean|string)'
|
||||
reference: '(string|element|object)'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
@ -4230,7 +4235,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/scrollBar.js
|
||||
* Bootstrap (v5.2.0): util/scrollBar.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -4349,7 +4354,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/backdrop.js
|
||||
* Bootstrap (v5.2.0): util/backdrop.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -4363,19 +4368,19 @@
|
||||
const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$9}`;
|
||||
const Default$8 = {
|
||||
className: 'modal-backdrop',
|
||||
clickCallback: null,
|
||||
isAnimated: false,
|
||||
isVisible: true,
|
||||
// if false, we use the backdrop helper without adding any element to the dom
|
||||
isAnimated: false,
|
||||
rootElement: 'body',
|
||||
// give the choice to place backdrop under different elements
|
||||
clickCallback: null
|
||||
rootElement: 'body' // give the choice to place backdrop under different elements
|
||||
|
||||
};
|
||||
const DefaultType$8 = {
|
||||
className: 'string',
|
||||
isVisible: 'boolean',
|
||||
clickCallback: '(function|null)',
|
||||
isAnimated: 'boolean',
|
||||
rootElement: '(element|string)',
|
||||
clickCallback: '(function|null)'
|
||||
isVisible: 'boolean',
|
||||
rootElement: '(element|string)'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
@ -4495,7 +4500,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/focustrap.js
|
||||
* Bootstrap (v5.2.0): util/focustrap.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -4512,13 +4517,13 @@
|
||||
const TAB_NAV_FORWARD = 'forward';
|
||||
const TAB_NAV_BACKWARD = 'backward';
|
||||
const Default$7 = {
|
||||
trapElement: null,
|
||||
// The element to trap focus inside of
|
||||
autofocus: true
|
||||
autofocus: true,
|
||||
trapElement: null // The element to trap focus inside of
|
||||
|
||||
};
|
||||
const DefaultType$7 = {
|
||||
trapElement: 'element',
|
||||
autofocus: 'boolean'
|
||||
autofocus: 'boolean',
|
||||
trapElement: 'element'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
@ -4604,7 +4609,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): modal.js
|
||||
* Bootstrap (v5.2.0): modal.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -4623,7 +4628,7 @@
|
||||
const EVENT_SHOW$4 = `show${EVENT_KEY$4}`;
|
||||
const EVENT_SHOWN$4 = `shown${EVENT_KEY$4}`;
|
||||
const EVENT_RESIZE$1 = `resize${EVENT_KEY$4}`;
|
||||
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$4}`;
|
||||
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$4}`;
|
||||
const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$4}`;
|
||||
const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$4}${DATA_API_KEY$2}`;
|
||||
const CLASS_NAME_OPEN = 'modal-open';
|
||||
@ -4636,13 +4641,13 @@
|
||||
const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
|
||||
const Default$6 = {
|
||||
backdrop: true,
|
||||
keyboard: true,
|
||||
focus: true
|
||||
focus: true,
|
||||
keyboard: true
|
||||
};
|
||||
const DefaultType$6 = {
|
||||
backdrop: '(boolean|string)',
|
||||
keyboard: 'boolean',
|
||||
focus: 'boolean'
|
||||
focus: 'boolean',
|
||||
keyboard: 'boolean'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
@ -4814,7 +4819,7 @@
|
||||
this._adjustDialog();
|
||||
}
|
||||
});
|
||||
EventHandler.on(this._element, EVENT_CLICK_DISMISS, event => {
|
||||
EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {
|
||||
if (event.target !== event.currentTarget) {
|
||||
// click is inside modal-dialog
|
||||
return;
|
||||
@ -4977,7 +4982,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): offcanvas.js
|
||||
* Bootstrap (v5.2.0): offcanvas.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -5075,7 +5080,7 @@
|
||||
this._element.classList.add(CLASS_NAME_SHOWING$1);
|
||||
|
||||
const completeCallBack = () => {
|
||||
if (!this._config.scroll) {
|
||||
if (!this._config.scroll || this._config.backdrop) {
|
||||
this._focustrap.activate();
|
||||
}
|
||||
|
||||
@ -5251,7 +5256,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/sanitizer.js
|
||||
* Bootstrap (v5.2.0): util/sanitizer.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -5260,14 +5265,14 @@
|
||||
/**
|
||||
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
||||
*
|
||||
* Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
|
||||
* Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
|
||||
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
|
||||
/**
|
||||
* A pattern that matches safe data URLs. Only matches image, video and audio types.
|
||||
*
|
||||
* Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
|
||||
* Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
|
||||
const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
|
||||
@ -5356,7 +5361,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/template-factory.js
|
||||
* Bootstrap (v5.2.0): util/template-factory.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -5366,27 +5371,27 @@
|
||||
|
||||
const NAME$5 = 'TemplateFactory';
|
||||
const Default$4 = {
|
||||
extraClass: '',
|
||||
template: '<div></div>',
|
||||
allowList: DefaultAllowlist,
|
||||
content: {},
|
||||
// { selector : text , selector2 : text2 , }
|
||||
extraClass: '',
|
||||
html: false,
|
||||
sanitize: true,
|
||||
sanitizeFn: null,
|
||||
allowList: DefaultAllowlist
|
||||
template: '<div></div>'
|
||||
};
|
||||
const DefaultType$4 = {
|
||||
extraClass: '(string|function)',
|
||||
template: 'string',
|
||||
allowList: 'object',
|
||||
content: 'object',
|
||||
extraClass: '(string|function)',
|
||||
html: 'boolean',
|
||||
sanitize: 'boolean',
|
||||
sanitizeFn: '(null|function)',
|
||||
allowList: 'object'
|
||||
template: 'string'
|
||||
};
|
||||
const DefaultContentType = {
|
||||
selector: '(string|element)',
|
||||
entry: '(string|element|function|null)'
|
||||
entry: '(string|element|function|null)',
|
||||
selector: '(string|element)'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
@ -5514,7 +5519,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): tooltip.js
|
||||
* Bootstrap (v5.2.0): tooltip.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -5552,42 +5557,42 @@
|
||||
LEFT: isRTL() ? 'right' : 'left'
|
||||
};
|
||||
const Default$3 = {
|
||||
allowList: DefaultAllowlist,
|
||||
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,
|
||||
placement: 'top',
|
||||
offset: [0, 0],
|
||||
container: false,
|
||||
fallbackPlacements: ['top', 'right', 'bottom', 'left'],
|
||||
boundary: 'clippingParents',
|
||||
container: false,
|
||||
customClass: '',
|
||||
delay: 0,
|
||||
fallbackPlacements: ['top', 'right', 'bottom', 'left'],
|
||||
html: false,
|
||||
offset: [0, 0],
|
||||
placement: 'top',
|
||||
popperConfig: null,
|
||||
sanitize: true,
|
||||
sanitizeFn: null,
|
||||
allowList: DefaultAllowlist,
|
||||
popperConfig: null
|
||||
selector: false,
|
||||
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
|
||||
title: '',
|
||||
trigger: 'hover focus'
|
||||
};
|
||||
const DefaultType$3 = {
|
||||
allowList: 'object',
|
||||
animation: 'boolean',
|
||||
template: 'string',
|
||||
title: '(string|element|function)',
|
||||
trigger: 'string',
|
||||
delay: '(number|object)',
|
||||
html: 'boolean',
|
||||
selector: '(string|boolean)',
|
||||
placement: '(string|function)',
|
||||
offset: '(array|string|function)',
|
||||
container: '(string|element|boolean)',
|
||||
fallbackPlacements: 'array',
|
||||
boundary: '(string|element)',
|
||||
container: '(string|element|boolean)',
|
||||
customClass: '(string|function)',
|
||||
delay: '(number|object)',
|
||||
fallbackPlacements: 'array',
|
||||
html: 'boolean',
|
||||
offset: '(array|string|function)',
|
||||
placement: '(string|function)',
|
||||
popperConfig: '(null|object|function)',
|
||||
sanitize: 'boolean',
|
||||
sanitizeFn: '(null|function)',
|
||||
allowList: 'object',
|
||||
popperConfig: '(null|object|function)'
|
||||
selector: '(string|boolean)',
|
||||
template: 'string',
|
||||
title: '(string|element|function)',
|
||||
trigger: 'string'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
@ -5606,7 +5611,8 @@
|
||||
this._isHovered = false;
|
||||
this._activeTrigger = {};
|
||||
this._popper = null;
|
||||
this._templateFactory = null; // Protected
|
||||
this._templateFactory = null;
|
||||
this._newContent = null; // Protected
|
||||
|
||||
this.tip = null;
|
||||
|
||||
@ -5696,6 +5702,12 @@
|
||||
|
||||
if (showEvent.defaultPrevented || !isInTheDom) {
|
||||
return;
|
||||
} // todo v6 remove this OR make it optional
|
||||
|
||||
|
||||
if (this.tip) {
|
||||
this.tip.remove();
|
||||
this.tip = null;
|
||||
}
|
||||
|
||||
const tip = this._getTipElement();
|
||||
@ -5714,7 +5726,7 @@
|
||||
if (this._popper) {
|
||||
this._popper.update();
|
||||
} else {
|
||||
this._createPopper(tip);
|
||||
this._popper = this._createPopper(tip);
|
||||
}
|
||||
|
||||
tip.classList.add(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we add extra
|
||||
@ -5800,7 +5812,7 @@
|
||||
|
||||
_getTipElement() {
|
||||
if (!this.tip) {
|
||||
this.tip = this._createTipElement(this._getContentForTemplate());
|
||||
this.tip = this._createTipElement(this._newContent || this._getContentForTemplate());
|
||||
}
|
||||
|
||||
return this.tip;
|
||||
@ -5828,19 +5840,11 @@
|
||||
}
|
||||
|
||||
setContent(content) {
|
||||
let isShown = false;
|
||||
this._newContent = content;
|
||||
|
||||
if (this.tip) {
|
||||
isShown = this._isShown();
|
||||
this.tip.remove();
|
||||
this.tip = null;
|
||||
}
|
||||
if (this._isShown()) {
|
||||
this._disposePopper();
|
||||
|
||||
this._disposePopper();
|
||||
|
||||
this.tip = this._createTipElement(content);
|
||||
|
||||
if (isShown) {
|
||||
this.show();
|
||||
}
|
||||
}
|
||||
@ -5867,7 +5871,7 @@
|
||||
}
|
||||
|
||||
_getTitle() {
|
||||
return this._config.title;
|
||||
return this._resolvePossibleFunction(this._config.title) || this._config.originalTitle;
|
||||
} // Private
|
||||
|
||||
|
||||
@ -5886,7 +5890,7 @@
|
||||
_createPopper(tip) {
|
||||
const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
|
||||
const attachment = AttachmentMap[placement.toUpperCase()];
|
||||
this._popper = createPopper(this._element, tip, this._getPopperConfig(attachment));
|
||||
return createPopper(this._element, tip, this._getPopperConfig(attachment));
|
||||
}
|
||||
|
||||
_getOffset() {
|
||||
@ -5999,7 +6003,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this._element.getAttribute('aria-label') && !this._element.textContent) {
|
||||
if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {
|
||||
this._element.setAttribute('aria-label', title);
|
||||
}
|
||||
|
||||
@ -6075,7 +6079,6 @@
|
||||
}
|
||||
|
||||
config.originalTitle = this._element.getAttribute('title') || '';
|
||||
config.title = this._resolvePossibleFunction(config.title) || config.originalTitle;
|
||||
|
||||
if (typeof config.title === 'number') {
|
||||
config.title = config.title.toString();
|
||||
@ -6138,7 +6141,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): popover.js
|
||||
* Bootstrap (v5.2.0): popover.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -6150,11 +6153,11 @@
|
||||
const SELECTOR_TITLE = '.popover-header';
|
||||
const SELECTOR_CONTENT = '.popover-body';
|
||||
const Default$2 = { ...Tooltip.Default,
|
||||
placement: 'right',
|
||||
offset: [0, 8],
|
||||
trigger: 'click',
|
||||
content: '',
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
|
||||
offset: [0, 8],
|
||||
placement: 'right',
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>',
|
||||
trigger: 'click'
|
||||
};
|
||||
const DefaultType$2 = { ...Tooltip.DefaultType,
|
||||
content: '(null|string|element|function)'
|
||||
@ -6221,7 +6224,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): scrollspy.js
|
||||
* Bootstrap (v5.2.0): scrollspy.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -6341,7 +6344,8 @@
|
||||
|
||||
if (root.scrollTo) {
|
||||
root.scrollTo({
|
||||
top: height
|
||||
top: height,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
return;
|
||||
} // Chrome 60 doesn't support `scrollTo`
|
||||
@ -6507,7 +6511,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): tab.js
|
||||
* Bootstrap (v5.2.0): tab.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -6608,15 +6612,9 @@
|
||||
this._activate(getElementFromSelector(element)); // Search and activate/show the proper section
|
||||
|
||||
|
||||
const isAnimated = element.classList.contains(CLASS_NAME_FADE$1);
|
||||
|
||||
const complete = () => {
|
||||
if (isAnimated) {
|
||||
// todo: maybe is redundant
|
||||
element.classList.add(CLASS_NAME_SHOW$1);
|
||||
}
|
||||
|
||||
if (element.getAttribute('role') !== 'tab') {
|
||||
element.classList.add(CLASS_NAME_SHOW$1);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -6631,7 +6629,7 @@
|
||||
});
|
||||
};
|
||||
|
||||
this._queueCallback(complete, element, isAnimated);
|
||||
this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));
|
||||
}
|
||||
|
||||
_deactivate(element, relatedElem) {
|
||||
@ -6645,15 +6643,9 @@
|
||||
this._deactivate(getElementFromSelector(element)); // Search and deactivate the shown section too
|
||||
|
||||
|
||||
const isAnimated = element.classList.contains(CLASS_NAME_FADE$1);
|
||||
|
||||
const complete = () => {
|
||||
if (isAnimated) {
|
||||
// todo maybe is redundant
|
||||
element.classList.remove(CLASS_NAME_SHOW$1);
|
||||
}
|
||||
|
||||
if (element.getAttribute('role') !== 'tab') {
|
||||
element.classList.remove(CLASS_NAME_SHOW$1);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -6667,7 +6659,7 @@
|
||||
});
|
||||
};
|
||||
|
||||
this._queueCallback(complete, element, isAnimated);
|
||||
this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));
|
||||
}
|
||||
|
||||
_keydown(event) {
|
||||
@ -6832,7 +6824,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): toast.js
|
||||
* Bootstrap (v5.2.0): toast.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -7049,7 +7041,7 @@
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): index.umd.js
|
||||
* Bootstrap (v5.2.0): index.umd.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|
2
docs/5.2/dist/js/bootstrap.bundle.js.map
vendored
4
docs/5.2/dist/js/bootstrap.bundle.min.js
vendored
2
docs/5.2/dist/js/bootstrap.bundle.min.js.map
vendored
364
docs/5.2/dist/js/bootstrap.esm.js
vendored
@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Bootstrap v5.2.0-beta1 (https://getbootstrap.com/)
|
||||
* Bootstrap v5.2.0 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
@ -7,13 +7,13 @@ import * as Popper from '@popperjs/core';
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/index.js
|
||||
* Bootstrap (v5.2.0): util/index.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
const MAX_UID = 1000000;
|
||||
const MILLISECONDS_MULTIPLIER = 1000;
|
||||
const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)
|
||||
const TRANSITION_END = 'transitionend'; // Shout-out Angus Croll (https://goo.gl/pxwQGp)
|
||||
|
||||
const toType = object => {
|
||||
if (object === null || object === undefined) {
|
||||
@ -322,7 +322,7 @@ const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): dom/event-handler.js
|
||||
* Bootstrap (v5.2.0): dom/event-handler.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -345,12 +345,12 @@ const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'cont
|
||||
* Private methods
|
||||
*/
|
||||
|
||||
function getUidEvent(element, uid) {
|
||||
function makeEventUid(element, uid) {
|
||||
return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;
|
||||
}
|
||||
|
||||
function getEvent(element) {
|
||||
const uid = getUidEvent(element);
|
||||
function getElementEvents(element) {
|
||||
const uid = makeEventUid(element);
|
||||
element.uidEvent = uid;
|
||||
eventRegistry[uid] = eventRegistry[uid] || {};
|
||||
return eventRegistry[uid];
|
||||
@ -358,7 +358,9 @@ function getEvent(element) {
|
||||
|
||||
function bootstrapHandler(element, fn) {
|
||||
return function handler(event) {
|
||||
event.delegateTarget = element;
|
||||
hydrateObj(event, {
|
||||
delegateTarget: element
|
||||
});
|
||||
|
||||
if (handler.oneOff) {
|
||||
EventHandler.off(element, event.type, fn);
|
||||
@ -380,7 +382,9 @@ function bootstrapDelegationHandler(element, selector, fn) {
|
||||
continue;
|
||||
}
|
||||
|
||||
event.delegateTarget = target;
|
||||
hydrateObj(event, {
|
||||
delegateTarget: target
|
||||
});
|
||||
|
||||
if (handler.oneOff) {
|
||||
EventHandler.off(element, event.type, selector, fn);
|
||||
@ -392,20 +396,21 @@ function bootstrapDelegationHandler(element, selector, fn) {
|
||||
};
|
||||
}
|
||||
|
||||
function findHandler(events, handler, delegationSelector = null) {
|
||||
return Object.values(events).find(event => event.originalHandler === handler && event.delegationSelector === delegationSelector);
|
||||
function findHandler(events, callable, delegationSelector = null) {
|
||||
return Object.values(events).find(event => event.callable === callable && event.delegationSelector === delegationSelector);
|
||||
}
|
||||
|
||||
function normalizeParameters(originalTypeEvent, handler, delegationFunction) {
|
||||
const delegation = typeof handler === 'string';
|
||||
const originalHandler = delegation ? delegationFunction : handler;
|
||||
const isDelegated = typeof handler === 'string'; // todo: tooltip passes `false` instead of selector, so we need to check
|
||||
|
||||
const callable = isDelegated ? delegationFunction : handler || delegationFunction;
|
||||
let typeEvent = getTypeEvent(originalTypeEvent);
|
||||
|
||||
if (!nativeEvents.has(typeEvent)) {
|
||||
typeEvent = originalTypeEvent;
|
||||
}
|
||||
|
||||
return [delegation, originalHandler, typeEvent];
|
||||
return [isDelegated, callable, typeEvent];
|
||||
}
|
||||
|
||||
function addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {
|
||||
@ -413,13 +418,9 @@ function addHandler(element, originalTypeEvent, handler, delegationFunction, one
|
||||
return;
|
||||
}
|
||||
|
||||
if (!handler) {
|
||||
handler = delegationFunction;
|
||||
delegationFunction = null;
|
||||
} // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
|
||||
let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
|
||||
// this prevents the handler from being dispatched the same way as mouseover or mouseout does
|
||||
|
||||
|
||||
if (originalTypeEvent in customEvents) {
|
||||
const wrapFunction = fn => {
|
||||
return function (event) {
|
||||
@ -429,31 +430,26 @@ function addHandler(element, originalTypeEvent, handler, delegationFunction, one
|
||||
};
|
||||
};
|
||||
|
||||
if (delegationFunction) {
|
||||
delegationFunction = wrapFunction(delegationFunction);
|
||||
} else {
|
||||
handler = wrapFunction(handler);
|
||||
}
|
||||
callable = wrapFunction(callable);
|
||||
}
|
||||
|
||||
const [delegation, originalHandler, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);
|
||||
const events = getEvent(element);
|
||||
const events = getElementEvents(element);
|
||||
const handlers = events[typeEvent] || (events[typeEvent] = {});
|
||||
const previousFunction = findHandler(handlers, originalHandler, delegation ? handler : null);
|
||||
const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null);
|
||||
|
||||
if (previousFunction) {
|
||||
previousFunction.oneOff = previousFunction.oneOff && oneOff;
|
||||
return;
|
||||
}
|
||||
|
||||
const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
|
||||
const fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFunction) : bootstrapHandler(element, handler);
|
||||
fn.delegationSelector = delegation ? handler : null;
|
||||
fn.originalHandler = originalHandler;
|
||||
const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''));
|
||||
const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable);
|
||||
fn.delegationSelector = isDelegated ? handler : null;
|
||||
fn.callable = callable;
|
||||
fn.oneOff = oneOff;
|
||||
fn.uidEvent = uid;
|
||||
handlers[uid] = fn;
|
||||
element.addEventListener(typeEvent, fn, delegation);
|
||||
element.addEventListener(typeEvent, fn, isDelegated);
|
||||
}
|
||||
|
||||
function removeHandler(element, events, typeEvent, handler, delegationSelector) {
|
||||
@ -473,7 +469,7 @@ function removeNamespacedHandlers(element, events, typeEvent, namespace) {
|
||||
for (const handlerKey of Object.keys(storeElementEvent)) {
|
||||
if (handlerKey.includes(namespace)) {
|
||||
const event = storeElementEvent[handlerKey];
|
||||
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
|
||||
removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -498,18 +494,19 @@ const EventHandler = {
|
||||
return;
|
||||
}
|
||||
|
||||
const [delegation, originalHandler, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);
|
||||
const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);
|
||||
const inNamespace = typeEvent !== originalTypeEvent;
|
||||
const events = getEvent(element);
|
||||
const events = getElementEvents(element);
|
||||
const storeElementEvent = events[typeEvent] || {};
|
||||
const isNamespace = originalTypeEvent.startsWith('.');
|
||||
|
||||
if (typeof originalHandler !== 'undefined') {
|
||||
if (typeof callable !== 'undefined') {
|
||||
// Simplest case: handler is passed, remove that listener ONLY.
|
||||
if (!events || !events[typeEvent]) {
|
||||
if (!Object.keys(storeElementEvent).length) {
|
||||
return;
|
||||
}
|
||||
|
||||
removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
|
||||
removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -519,14 +516,12 @@ const EventHandler = {
|
||||
}
|
||||
}
|
||||
|
||||
const storeElementEvent = events[typeEvent] || {};
|
||||
|
||||
for (const keyHandlers of Object.keys(storeElementEvent)) {
|
||||
const handlerKey = keyHandlers.replace(stripUidRegex, '');
|
||||
|
||||
if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
|
||||
const event = storeElementEvent[keyHandlers];
|
||||
removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
|
||||
removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -552,21 +547,11 @@ const EventHandler = {
|
||||
defaultPrevented = jQueryEvent.isDefaultPrevented();
|
||||
}
|
||||
|
||||
const evt = new Event(event, {
|
||||
let evt = new Event(event, {
|
||||
bubbles,
|
||||
cancelable: true
|
||||
}); // merge custom information in our event
|
||||
|
||||
if (typeof args !== 'undefined') {
|
||||
for (const key of Object.keys(args)) {
|
||||
Object.defineProperty(evt, key, {
|
||||
get() {
|
||||
return args[key];
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
evt = hydrateObj(evt, args);
|
||||
|
||||
if (defaultPrevented) {
|
||||
evt.preventDefault();
|
||||
@ -585,9 +570,28 @@ const EventHandler = {
|
||||
|
||||
};
|
||||
|
||||
function hydrateObj(obj, meta) {
|
||||
for (const [key, value] of Object.entries(meta || {})) {
|
||||
try {
|
||||
obj[key] = value;
|
||||
} catch (_unused) {
|
||||
Object.defineProperty(obj, key, {
|
||||
configurable: true,
|
||||
|
||||
get() {
|
||||
return value;
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): dom/data.js
|
||||
* Bootstrap (v5.2.0): dom/data.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -639,7 +643,7 @@ const Data = {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): dom/manipulator.js
|
||||
* Bootstrap (v5.2.0): dom/manipulator.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -709,7 +713,7 @@ const Manipulator = {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/config.js
|
||||
* Bootstrap (v5.2.0): util/config.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -770,7 +774,7 @@ class Config {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): base-component.js
|
||||
* Bootstrap (v5.2.0): base-component.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -778,7 +782,7 @@ class Config {
|
||||
* Constants
|
||||
*/
|
||||
|
||||
const VERSION = '5.2.0-beta1';
|
||||
const VERSION = '5.2.0';
|
||||
/**
|
||||
* Class definition
|
||||
*/
|
||||
@ -849,7 +853,7 @@ class BaseComponent extends Config {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/component-functions.js
|
||||
* Bootstrap (v5.2.0): util/component-functions.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -875,7 +879,7 @@ const enableDismissTrigger = (component, method = 'hide') => {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): alert.js
|
||||
* Bootstrap (v5.2.0): alert.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -955,7 +959,7 @@ defineJQueryPlugin(Alert);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): button.js
|
||||
* Bootstrap (v5.2.0): button.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1017,7 +1021,7 @@ defineJQueryPlugin(Button);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): dom/selector-engine.js
|
||||
* Bootstrap (v5.2.0): dom/selector-engine.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1088,7 +1092,7 @@ const SelectorEngine = {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/swipe.js
|
||||
* Bootstrap (v5.2.0): util/swipe.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1108,14 +1112,14 @@ const POINTER_TYPE_PEN = 'pen';
|
||||
const CLASS_NAME_POINTER_EVENT = 'pointer-event';
|
||||
const SWIPE_THRESHOLD = 40;
|
||||
const Default$c = {
|
||||
endCallback: null,
|
||||
leftCallback: null,
|
||||
rightCallback: null,
|
||||
endCallback: null
|
||||
rightCallback: null
|
||||
};
|
||||
const DefaultType$c = {
|
||||
endCallback: '(function|null)',
|
||||
leftCallback: '(function|null)',
|
||||
rightCallback: '(function|null)',
|
||||
endCallback: '(function|null)'
|
||||
rightCallback: '(function|null)'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
@ -1224,7 +1228,7 @@ class Swipe extends Config {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): carousel.js
|
||||
* Bootstrap (v5.2.0): carousel.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1280,9 +1284,10 @@ const Default$b = {
|
||||
};
|
||||
const DefaultType$b = {
|
||||
interval: '(number|boolean)',
|
||||
// TODO:v6 remove boolean support
|
||||
keyboard: 'boolean',
|
||||
ride: '(boolean|string)',
|
||||
pause: '(string|boolean)',
|
||||
ride: '(boolean|string)',
|
||||
touch: 'boolean',
|
||||
wrap: 'boolean'
|
||||
};
|
||||
@ -1671,7 +1676,7 @@ defineJQueryPlugin(Carousel);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): collapse.js
|
||||
* Bootstrap (v5.2.0): collapse.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1699,12 +1704,12 @@ const HEIGHT = 'height';
|
||||
const SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';
|
||||
const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="collapse"]';
|
||||
const Default$a = {
|
||||
toggle: true,
|
||||
parent: null
|
||||
parent: null,
|
||||
toggle: true
|
||||
};
|
||||
const DefaultType$a = {
|
||||
toggle: 'boolean',
|
||||
parent: '(null|element)'
|
||||
parent: '(null|element)',
|
||||
toggle: 'boolean'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
@ -1961,7 +1966,7 @@ defineJQueryPlugin(Collapse);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): dropdown.js
|
||||
* Bootstrap (v5.2.0): dropdown.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -2007,20 +2012,20 @@ const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';
|
||||
const PLACEMENT_TOPCENTER = 'top';
|
||||
const PLACEMENT_BOTTOMCENTER = 'bottom';
|
||||
const Default$9 = {
|
||||
offset: [0, 2],
|
||||
autoClose: true,
|
||||
boundary: 'clippingParents',
|
||||
reference: 'toggle',
|
||||
display: 'dynamic',
|
||||
offset: [0, 2],
|
||||
popperConfig: null,
|
||||
autoClose: true
|
||||
reference: 'toggle'
|
||||
};
|
||||
const DefaultType$9 = {
|
||||
offset: '(array|string|function)',
|
||||
autoClose: '(boolean|string)',
|
||||
boundary: '(string|element)',
|
||||
reference: '(string|element|object)',
|
||||
display: 'string',
|
||||
offset: '(array|string|function)',
|
||||
popperConfig: '(null|object|function)',
|
||||
autoClose: '(boolean|string)'
|
||||
reference: '(string|element|object)'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
@ -2391,7 +2396,7 @@ defineJQueryPlugin(Dropdown);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/scrollBar.js
|
||||
* Bootstrap (v5.2.0): util/scrollBar.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -2510,7 +2515,7 @@ class ScrollBarHelper {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/backdrop.js
|
||||
* Bootstrap (v5.2.0): util/backdrop.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -2524,19 +2529,19 @@ const CLASS_NAME_SHOW$5 = 'show';
|
||||
const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$9}`;
|
||||
const Default$8 = {
|
||||
className: 'modal-backdrop',
|
||||
clickCallback: null,
|
||||
isAnimated: false,
|
||||
isVisible: true,
|
||||
// if false, we use the backdrop helper without adding any element to the dom
|
||||
isAnimated: false,
|
||||
rootElement: 'body',
|
||||
// give the choice to place backdrop under different elements
|
||||
clickCallback: null
|
||||
rootElement: 'body' // give the choice to place backdrop under different elements
|
||||
|
||||
};
|
||||
const DefaultType$8 = {
|
||||
className: 'string',
|
||||
isVisible: 'boolean',
|
||||
clickCallback: '(function|null)',
|
||||
isAnimated: 'boolean',
|
||||
rootElement: '(element|string)',
|
||||
clickCallback: '(function|null)'
|
||||
isVisible: 'boolean',
|
||||
rootElement: '(element|string)'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
@ -2656,7 +2661,7 @@ class Backdrop extends Config {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/focustrap.js
|
||||
* Bootstrap (v5.2.0): util/focustrap.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -2673,13 +2678,13 @@ const TAB_KEY = 'Tab';
|
||||
const TAB_NAV_FORWARD = 'forward';
|
||||
const TAB_NAV_BACKWARD = 'backward';
|
||||
const Default$7 = {
|
||||
trapElement: null,
|
||||
// The element to trap focus inside of
|
||||
autofocus: true
|
||||
autofocus: true,
|
||||
trapElement: null // The element to trap focus inside of
|
||||
|
||||
};
|
||||
const DefaultType$7 = {
|
||||
trapElement: 'element',
|
||||
autofocus: 'boolean'
|
||||
autofocus: 'boolean',
|
||||
trapElement: 'element'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
@ -2765,7 +2770,7 @@ class FocusTrap extends Config {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): modal.js
|
||||
* Bootstrap (v5.2.0): modal.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -2784,7 +2789,7 @@ const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$4}`;
|
||||
const EVENT_SHOW$4 = `show${EVENT_KEY$4}`;
|
||||
const EVENT_SHOWN$4 = `shown${EVENT_KEY$4}`;
|
||||
const EVENT_RESIZE$1 = `resize${EVENT_KEY$4}`;
|
||||
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$4}`;
|
||||
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$4}`;
|
||||
const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$4}`;
|
||||
const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$4}${DATA_API_KEY$2}`;
|
||||
const CLASS_NAME_OPEN = 'modal-open';
|
||||
@ -2797,13 +2802,13 @@ const SELECTOR_MODAL_BODY = '.modal-body';
|
||||
const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
|
||||
const Default$6 = {
|
||||
backdrop: true,
|
||||
keyboard: true,
|
||||
focus: true
|
||||
focus: true,
|
||||
keyboard: true
|
||||
};
|
||||
const DefaultType$6 = {
|
||||
backdrop: '(boolean|string)',
|
||||
keyboard: 'boolean',
|
||||
focus: 'boolean'
|
||||
focus: 'boolean',
|
||||
keyboard: 'boolean'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
@ -2975,7 +2980,7 @@ class Modal extends BaseComponent {
|
||||
this._adjustDialog();
|
||||
}
|
||||
});
|
||||
EventHandler.on(this._element, EVENT_CLICK_DISMISS, event => {
|
||||
EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {
|
||||
if (event.target !== event.currentTarget) {
|
||||
// click is inside modal-dialog
|
||||
return;
|
||||
@ -3138,7 +3143,7 @@ defineJQueryPlugin(Modal);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): offcanvas.js
|
||||
* Bootstrap (v5.2.0): offcanvas.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -3236,7 +3241,7 @@ class Offcanvas extends BaseComponent {
|
||||
this._element.classList.add(CLASS_NAME_SHOWING$1);
|
||||
|
||||
const completeCallBack = () => {
|
||||
if (!this._config.scroll) {
|
||||
if (!this._config.scroll || this._config.backdrop) {
|
||||
this._focustrap.activate();
|
||||
}
|
||||
|
||||
@ -3412,7 +3417,7 @@ defineJQueryPlugin(Offcanvas);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/sanitizer.js
|
||||
* Bootstrap (v5.2.0): util/sanitizer.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -3421,14 +3426,14 @@ const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
|
||||
/**
|
||||
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
||||
*
|
||||
* Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
|
||||
* Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
|
||||
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
|
||||
/**
|
||||
* A pattern that matches safe data URLs. Only matches image, video and audio types.
|
||||
*
|
||||
* Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
|
||||
* Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
|
||||
*/
|
||||
|
||||
const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
|
||||
@ -3517,7 +3522,7 @@ function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): util/template-factory.js
|
||||
* Bootstrap (v5.2.0): util/template-factory.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -3527,27 +3532,27 @@ function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
|
||||
|
||||
const NAME$5 = 'TemplateFactory';
|
||||
const Default$4 = {
|
||||
extraClass: '',
|
||||
template: '<div></div>',
|
||||
allowList: DefaultAllowlist,
|
||||
content: {},
|
||||
// { selector : text , selector2 : text2 , }
|
||||
extraClass: '',
|
||||
html: false,
|
||||
sanitize: true,
|
||||
sanitizeFn: null,
|
||||
allowList: DefaultAllowlist
|
||||
template: '<div></div>'
|
||||
};
|
||||
const DefaultType$4 = {
|
||||
extraClass: '(string|function)',
|
||||
template: 'string',
|
||||
allowList: 'object',
|
||||
content: 'object',
|
||||
extraClass: '(string|function)',
|
||||
html: 'boolean',
|
||||
sanitize: 'boolean',
|
||||
sanitizeFn: '(null|function)',
|
||||
allowList: 'object'
|
||||
template: 'string'
|
||||
};
|
||||
const DefaultContentType = {
|
||||
selector: '(string|element)',
|
||||
entry: '(string|element|function|null)'
|
||||
entry: '(string|element|function|null)',
|
||||
selector: '(string|element)'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
@ -3675,7 +3680,7 @@ class TemplateFactory extends Config {
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): tooltip.js
|
||||
* Bootstrap (v5.2.0): tooltip.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -3713,42 +3718,42 @@ const AttachmentMap = {
|
||||
LEFT: isRTL() ? 'right' : 'left'
|
||||
};
|
||||
const Default$3 = {
|
||||
allowList: DefaultAllowlist,
|
||||
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,
|
||||
placement: 'top',
|
||||
offset: [0, 0],
|
||||
container: false,
|
||||
fallbackPlacements: ['top', 'right', 'bottom', 'left'],
|
||||
boundary: 'clippingParents',
|
||||
container: false,
|
||||
customClass: '',
|
||||
delay: 0,
|
||||
fallbackPlacements: ['top', 'right', 'bottom', 'left'],
|
||||
html: false,
|
||||
offset: [0, 0],
|
||||
placement: 'top',
|
||||
popperConfig: null,
|
||||
sanitize: true,
|
||||
sanitizeFn: null,
|
||||
allowList: DefaultAllowlist,
|
||||
popperConfig: null
|
||||
selector: false,
|
||||
template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
|
||||
title: '',
|
||||
trigger: 'hover focus'
|
||||
};
|
||||
const DefaultType$3 = {
|
||||
allowList: 'object',
|
||||
animation: 'boolean',
|
||||
template: 'string',
|
||||
title: '(string|element|function)',
|
||||
trigger: 'string',
|
||||
delay: '(number|object)',
|
||||
html: 'boolean',
|
||||
selector: '(string|boolean)',
|
||||
placement: '(string|function)',
|
||||
offset: '(array|string|function)',
|
||||
container: '(string|element|boolean)',
|
||||
fallbackPlacements: 'array',
|
||||
boundary: '(string|element)',
|
||||
container: '(string|element|boolean)',
|
||||
customClass: '(string|function)',
|
||||
delay: '(number|object)',
|
||||
fallbackPlacements: 'array',
|
||||
html: 'boolean',
|
||||
offset: '(array|string|function)',
|
||||
placement: '(string|function)',
|
||||
popperConfig: '(null|object|function)',
|
||||
sanitize: 'boolean',
|
||||
sanitizeFn: '(null|function)',
|
||||
allowList: 'object',
|
||||
popperConfig: '(null|object|function)'
|
||||
selector: '(string|boolean)',
|
||||
template: 'string',
|
||||
title: '(string|element|function)',
|
||||
trigger: 'string'
|
||||
};
|
||||
/**
|
||||
* Class definition
|
||||
@ -3767,7 +3772,8 @@ class Tooltip extends BaseComponent {
|
||||
this._isHovered = false;
|
||||
this._activeTrigger = {};
|
||||
this._popper = null;
|
||||
this._templateFactory = null; // Protected
|
||||
this._templateFactory = null;
|
||||
this._newContent = null; // Protected
|
||||
|
||||
this.tip = null;
|
||||
|
||||
@ -3857,6 +3863,12 @@ class Tooltip extends BaseComponent {
|
||||
|
||||
if (showEvent.defaultPrevented || !isInTheDom) {
|
||||
return;
|
||||
} // todo v6 remove this OR make it optional
|
||||
|
||||
|
||||
if (this.tip) {
|
||||
this.tip.remove();
|
||||
this.tip = null;
|
||||
}
|
||||
|
||||
const tip = this._getTipElement();
|
||||
@ -3875,7 +3887,7 @@ class Tooltip extends BaseComponent {
|
||||
if (this._popper) {
|
||||
this._popper.update();
|
||||
} else {
|
||||
this._createPopper(tip);
|
||||
this._popper = this._createPopper(tip);
|
||||
}
|
||||
|
||||
tip.classList.add(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we add extra
|
||||
@ -3961,7 +3973,7 @@ class Tooltip extends BaseComponent {
|
||||
|
||||
_getTipElement() {
|
||||
if (!this.tip) {
|
||||
this.tip = this._createTipElement(this._getContentForTemplate());
|
||||
this.tip = this._createTipElement(this._newContent || this._getContentForTemplate());
|
||||
}
|
||||
|
||||
return this.tip;
|
||||
@ -3989,19 +4001,11 @@ class Tooltip extends BaseComponent {
|
||||
}
|
||||
|
||||
setContent(content) {
|
||||
let isShown = false;
|
||||
this._newContent = content;
|
||||
|
||||
if (this.tip) {
|
||||
isShown = this._isShown();
|
||||
this.tip.remove();
|
||||
this.tip = null;
|
||||
}
|
||||
if (this._isShown()) {
|
||||
this._disposePopper();
|
||||
|
||||
this._disposePopper();
|
||||
|
||||
this.tip = this._createTipElement(content);
|
||||
|
||||
if (isShown) {
|
||||
this.show();
|
||||
}
|
||||
}
|
||||
@ -4028,7 +4032,7 @@ class Tooltip extends BaseComponent {
|
||||
}
|
||||
|
||||
_getTitle() {
|
||||
return this._config.title;
|
||||
return this._resolvePossibleFunction(this._config.title) || this._config.originalTitle;
|
||||
} // Private
|
||||
|
||||
|
||||
@ -4047,7 +4051,7 @@ class Tooltip extends BaseComponent {
|
||||
_createPopper(tip) {
|
||||
const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;
|
||||
const attachment = AttachmentMap[placement.toUpperCase()];
|
||||
this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment));
|
||||
return Popper.createPopper(this._element, tip, this._getPopperConfig(attachment));
|
||||
}
|
||||
|
||||
_getOffset() {
|
||||
@ -4160,7 +4164,7 @@ class Tooltip extends BaseComponent {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this._element.getAttribute('aria-label') && !this._element.textContent) {
|
||||
if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {
|
||||
this._element.setAttribute('aria-label', title);
|
||||
}
|
||||
|
||||
@ -4236,7 +4240,6 @@ class Tooltip extends BaseComponent {
|
||||
}
|
||||
|
||||
config.originalTitle = this._element.getAttribute('title') || '';
|
||||
config.title = this._resolvePossibleFunction(config.title) || config.originalTitle;
|
||||
|
||||
if (typeof config.title === 'number') {
|
||||
config.title = config.title.toString();
|
||||
@ -4299,7 +4302,7 @@ defineJQueryPlugin(Tooltip);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): popover.js
|
||||
* Bootstrap (v5.2.0): popover.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -4311,11 +4314,11 @@ const NAME$3 = 'popover';
|
||||
const SELECTOR_TITLE = '.popover-header';
|
||||
const SELECTOR_CONTENT = '.popover-body';
|
||||
const Default$2 = { ...Tooltip.Default,
|
||||
placement: 'right',
|
||||
offset: [0, 8],
|
||||
trigger: 'click',
|
||||
content: '',
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
|
||||
offset: [0, 8],
|
||||
placement: 'right',
|
||||
template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>',
|
||||
trigger: 'click'
|
||||
};
|
||||
const DefaultType$2 = { ...Tooltip.DefaultType,
|
||||
content: '(null|string|element|function)'
|
||||
@ -4382,7 +4385,7 @@ defineJQueryPlugin(Popover);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): scrollspy.js
|
||||
* Bootstrap (v5.2.0): scrollspy.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -4502,7 +4505,8 @@ class ScrollSpy extends BaseComponent {
|
||||
|
||||
if (root.scrollTo) {
|
||||
root.scrollTo({
|
||||
top: height
|
||||
top: height,
|
||||
behavior: 'smooth'
|
||||
});
|
||||
return;
|
||||
} // Chrome 60 doesn't support `scrollTo`
|
||||
@ -4668,7 +4672,7 @@ defineJQueryPlugin(ScrollSpy);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): tab.js
|
||||
* Bootstrap (v5.2.0): tab.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
@ -4769,15 +4773,9 @@ class Tab extends BaseComponent {
|
||||
this._activate(getElementFromSelector(element)); // Search and activate/show the proper section
|
||||
|
||||
|
||||
const isAnimated = element.classList.contains(CLASS_NAME_FADE$1);
|
||||
|
||||
const complete = () => {
|
||||
if (isAnimated) {
|
||||
// todo: maybe is redundant
|
||||
element.classList.add(CLASS_NAME_SHOW$1);
|
||||
}
|
||||
|
||||
if (element.getAttribute('role') !== 'tab') {
|
||||
element.classList.add(CLASS_NAME_SHOW$1);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -4792,7 +4790,7 @@ class Tab extends BaseComponent {
|
||||
});
|
||||
};
|
||||
|
||||
this._queueCallback(complete, element, isAnimated);
|
||||
this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));
|
||||
}
|
||||
|
||||
_deactivate(element, relatedElem) {
|
||||
@ -4806,15 +4804,9 @@ class Tab extends BaseComponent {
|
||||
this._deactivate(getElementFromSelector(element)); // Search and deactivate the shown section too
|
||||
|
||||
|
||||
const isAnimated = element.classList.contains(CLASS_NAME_FADE$1);
|
||||
|
||||
const complete = () => {
|
||||
if (isAnimated) {
|
||||
// todo maybe is redundant
|
||||
element.classList.remove(CLASS_NAME_SHOW$1);
|
||||
}
|
||||
|
||||
if (element.getAttribute('role') !== 'tab') {
|
||||
element.classList.remove(CLASS_NAME_SHOW$1);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -4828,7 +4820,7 @@ class Tab extends BaseComponent {
|
||||
});
|
||||
};
|
||||
|
||||
this._queueCallback(complete, element, isAnimated);
|
||||
this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE$1));
|
||||
}
|
||||
|
||||
_keydown(event) {
|
||||
@ -4993,7 +4985,7 @@ defineJQueryPlugin(Tab);
|
||||
|
||||
/**
|
||||
* --------------------------------------------------------------------------
|
||||
* Bootstrap (v5.2.0-beta1): toast.js
|
||||
* Bootstrap (v5.2.0): toast.js
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
* --------------------------------------------------------------------------
|
||||
*/
|
||||
|