|
@@ -1,13 +1,61 @@
|
|
/*!
|
|
/*!
|
|
- * Bootstrap v5.3.0-alpha1 (https://getbootstrap.com/)
|
|
|
|
- * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
|
|
|
|
+ * Bootstrap v5.3.0-alpha3 (https://getbootstrap.com/)
|
|
|
|
+ * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
*/
|
|
*/
|
|
import * as Popper from '@popperjs/core';
|
|
import * as Popper from '@popperjs/core';
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): util/index.js
|
|
|
|
|
|
+ * Bootstrap dom/data.js
|
|
|
|
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
|
|
+ * --------------------------------------------------------------------------
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * Constants
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+const elementMap = new Map();
|
|
|
|
+const Data = {
|
|
|
|
+ set(element, key, instance) {
|
|
|
|
+ if (!elementMap.has(element)) {
|
|
|
|
+ elementMap.set(element, new Map());
|
|
|
|
+ }
|
|
|
|
+ const instanceMap = elementMap.get(element);
|
|
|
|
+
|
|
|
|
+ // make it clear we only want one instance per element
|
|
|
|
+ // can be removed later when multiple key/instances are fine to be used
|
|
|
|
+ if (!instanceMap.has(key) && instanceMap.size !== 0) {
|
|
|
|
+ // eslint-disable-next-line no-console
|
|
|
|
+ console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ instanceMap.set(key, instance);
|
|
|
|
+ },
|
|
|
|
+ get(element, key) {
|
|
|
|
+ if (elementMap.has(element)) {
|
|
|
|
+ return elementMap.get(element).get(key) || null;
|
|
|
|
+ }
|
|
|
|
+ return null;
|
|
|
|
+ },
|
|
|
|
+ remove(element, key) {
|
|
|
|
+ if (!elementMap.has(element)) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ const instanceMap = elementMap.get(element);
|
|
|
|
+ instanceMap.delete(key);
|
|
|
|
+
|
|
|
|
+ // free up element references if there are no instances left for an element
|
|
|
|
+ if (instanceMap.size === 0) {
|
|
|
|
+ elementMap.delete(element);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * --------------------------------------------------------------------------
|
|
|
|
+ * Bootstrap util/index.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -254,7 +302,7 @@ const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): dom/event-handler.js
|
|
|
|
|
|
+ * Bootstrap dom/event-handler.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -324,7 +372,7 @@ function findHandler(events, callable, delegationSelector = null) {
|
|
}
|
|
}
|
|
function normalizeParameters(originalTypeEvent, handler, delegationFunction) {
|
|
function normalizeParameters(originalTypeEvent, handler, delegationFunction) {
|
|
const isDelegated = typeof handler === 'string';
|
|
const isDelegated = typeof handler === 'string';
|
|
- // todo: tooltip passes `false` instead of selector, so we need to check
|
|
|
|
|
|
+ // TODO: tooltip passes `false` instead of selector, so we need to check
|
|
const callable = isDelegated ? delegationFunction : handler || delegationFunction;
|
|
const callable = isDelegated ? delegationFunction : handler || delegationFunction;
|
|
let typeEvent = getTypeEvent(originalTypeEvent);
|
|
let typeEvent = getTypeEvent(originalTypeEvent);
|
|
if (!nativeEvents.has(typeEvent)) {
|
|
if (!nativeEvents.has(typeEvent)) {
|
|
@@ -441,11 +489,10 @@ const EventHandler = {
|
|
nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
|
|
nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
|
|
defaultPrevented = jQueryEvent.isDefaultPrevented();
|
|
defaultPrevented = jQueryEvent.isDefaultPrevented();
|
|
}
|
|
}
|
|
- let evt = new Event(event, {
|
|
|
|
|
|
+ const evt = hydrateObj(new Event(event, {
|
|
bubbles,
|
|
bubbles,
|
|
cancelable: true
|
|
cancelable: true
|
|
- });
|
|
|
|
- evt = hydrateObj(evt, args);
|
|
|
|
|
|
+ }), args);
|
|
if (defaultPrevented) {
|
|
if (defaultPrevented) {
|
|
evt.preventDefault();
|
|
evt.preventDefault();
|
|
}
|
|
}
|
|
@@ -476,55 +523,7 @@ function hydrateObj(obj, meta = {}) {
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): dom/data.js
|
|
|
|
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
|
|
- * --------------------------------------------------------------------------
|
|
|
|
- */
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * Constants
|
|
|
|
- */
|
|
|
|
-
|
|
|
|
-const elementMap = new Map();
|
|
|
|
-const Data = {
|
|
|
|
- set(element, key, instance) {
|
|
|
|
- if (!elementMap.has(element)) {
|
|
|
|
- elementMap.set(element, new Map());
|
|
|
|
- }
|
|
|
|
- const instanceMap = elementMap.get(element);
|
|
|
|
-
|
|
|
|
- // make it clear we only want one instance per element
|
|
|
|
- // can be removed later when multiple key/instances are fine to be used
|
|
|
|
- if (!instanceMap.has(key) && instanceMap.size !== 0) {
|
|
|
|
- // eslint-disable-next-line no-console
|
|
|
|
- console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- instanceMap.set(key, instance);
|
|
|
|
- },
|
|
|
|
- get(element, key) {
|
|
|
|
- if (elementMap.has(element)) {
|
|
|
|
- return elementMap.get(element).get(key) || null;
|
|
|
|
- }
|
|
|
|
- return null;
|
|
|
|
- },
|
|
|
|
- remove(element, key) {
|
|
|
|
- if (!elementMap.has(element)) {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- const instanceMap = elementMap.get(element);
|
|
|
|
- instanceMap.delete(key);
|
|
|
|
-
|
|
|
|
- // free up element references if there are no instances left for an element
|
|
|
|
- if (instanceMap.size === 0) {
|
|
|
|
- elementMap.delete(element);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * --------------------------------------------------------------------------
|
|
|
|
- * Bootstrap (v5.3.0-alpha1): dom/manipulator.js
|
|
|
|
|
|
+ * Bootstrap dom/manipulator.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -581,7 +580,7 @@ const Manipulator = {
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): util/config.js
|
|
|
|
|
|
+ * Bootstrap util/config.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -633,7 +632,7 @@ class Config {
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): base-component.js
|
|
|
|
|
|
+ * Bootstrap base-component.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -642,7 +641,7 @@ class Config {
|
|
* Constants
|
|
* Constants
|
|
*/
|
|
*/
|
|
|
|
|
|
-const VERSION = '5.3.0-alpha1';
|
|
|
|
|
|
+const VERSION = '5.3.0-alpha2';
|
|
|
|
|
|
/**
|
|
/**
|
|
* Class definition
|
|
* Class definition
|
|
@@ -701,7 +700,7 @@ class BaseComponent extends Config {
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): dom/selector-engine.js
|
|
|
|
|
|
+ * Bootstrap dom/selector-engine.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -789,7 +788,7 @@ const SelectorEngine = {
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): util/component-functions.js
|
|
|
|
|
|
+ * Bootstrap util/component-functions.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -813,7 +812,7 @@ const enableDismissTrigger = (component, method = 'hide') => {
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): alert.js
|
|
|
|
|
|
+ * Bootstrap alert.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -887,7 +886,7 @@ defineJQueryPlugin(Alert);
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): button.js
|
|
|
|
|
|
+ * Bootstrap button.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -950,7 +949,7 @@ defineJQueryPlugin(Button);
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): util/swipe.js
|
|
|
|
|
|
+ * Bootstrap util/swipe.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -1069,7 +1068,7 @@ class Swipe extends Config {
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): carousel.js
|
|
|
|
|
|
+ * Bootstrap carousel.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -1329,7 +1328,7 @@ class Carousel extends BaseComponent {
|
|
}
|
|
}
|
|
if (!activeElement || !nextElement) {
|
|
if (!activeElement || !nextElement) {
|
|
// Some weirdness is happening, so we bail
|
|
// Some weirdness is happening, so we bail
|
|
- // todo: change tests that use empty divs to avoid this check
|
|
|
|
|
|
+ // TODO: change tests that use empty divs to avoid this check
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
const isCycling = Boolean(this._interval);
|
|
const isCycling = Boolean(this._interval);
|
|
@@ -1441,7 +1440,7 @@ defineJQueryPlugin(Carousel);
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): collapse.js
|
|
|
|
|
|
+ * Bootstrap collapse.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -1674,7 +1673,7 @@ defineJQueryPlugin(Collapse);
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): dropdown.js
|
|
|
|
|
|
+ * Bootstrap dropdown.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -1746,7 +1745,7 @@ class Dropdown extends BaseComponent {
|
|
super(element, config);
|
|
super(element, config);
|
|
this._popper = null;
|
|
this._popper = null;
|
|
this._parent = this._element.parentNode; // dropdown wrapper
|
|
this._parent = this._element.parentNode; // dropdown wrapper
|
|
- // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
|
|
|
|
|
|
+ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
|
|
this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);
|
|
this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);
|
|
this._inNavbar = this._detectNavbar();
|
|
this._inNavbar = this._detectNavbar();
|
|
}
|
|
}
|
|
@@ -1920,7 +1919,7 @@ class Dropdown extends BaseComponent {
|
|
|
|
|
|
// Disable Popper if we have a static display or Dropdown is in Navbar
|
|
// Disable Popper if we have a static display or Dropdown is in Navbar
|
|
if (this._inNavbar || this._config.display === 'static') {
|
|
if (this._inNavbar || this._config.display === 'static') {
|
|
- Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // todo:v6 remove
|
|
|
|
|
|
+ Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // TODO: v6 remove
|
|
defaultBsPopperConfig.modifiers = [{
|
|
defaultBsPopperConfig.modifiers = [{
|
|
name: 'applyStyles',
|
|
name: 'applyStyles',
|
|
enabled: false
|
|
enabled: false
|
|
@@ -2002,7 +2001,7 @@ class Dropdown extends BaseComponent {
|
|
}
|
|
}
|
|
event.preventDefault();
|
|
event.preventDefault();
|
|
|
|
|
|
- // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
|
|
|
|
|
|
+ // TODO: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
|
|
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);
|
|
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);
|
|
const instance = Dropdown.getOrCreateInstance(getToggleButton);
|
|
const instance = Dropdown.getOrCreateInstance(getToggleButton);
|
|
if (isUpOrDownEvent) {
|
|
if (isUpOrDownEvent) {
|
|
@@ -2041,104 +2040,7 @@ defineJQueryPlugin(Dropdown);
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): util/scrollBar.js
|
|
|
|
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
|
|
- * --------------------------------------------------------------------------
|
|
|
|
- */
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * Constants
|
|
|
|
- */
|
|
|
|
-
|
|
|
|
-const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
|
|
|
|
-const SELECTOR_STICKY_CONTENT = '.sticky-top';
|
|
|
|
-const PROPERTY_PADDING = 'padding-right';
|
|
|
|
-const PROPERTY_MARGIN = 'margin-right';
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * Class definition
|
|
|
|
- */
|
|
|
|
-
|
|
|
|
-class ScrollBarHelper {
|
|
|
|
- constructor() {
|
|
|
|
- this._element = document.body;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // Public
|
|
|
|
- getWidth() {
|
|
|
|
- // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
|
|
|
|
- const documentWidth = document.documentElement.clientWidth;
|
|
|
|
- return Math.abs(window.innerWidth - documentWidth);
|
|
|
|
- }
|
|
|
|
- hide() {
|
|
|
|
- const width = this.getWidth();
|
|
|
|
- this._disableOverFlow();
|
|
|
|
- // give padding to element to balance the hidden scrollbar width
|
|
|
|
- this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
|
|
|
|
- // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
|
|
|
|
- this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
|
|
|
|
- this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);
|
|
|
|
- }
|
|
|
|
- reset() {
|
|
|
|
- this._resetElementAttributes(this._element, 'overflow');
|
|
|
|
- this._resetElementAttributes(this._element, PROPERTY_PADDING);
|
|
|
|
- this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);
|
|
|
|
- this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);
|
|
|
|
- }
|
|
|
|
- isOverflowing() {
|
|
|
|
- return this.getWidth() > 0;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // Private
|
|
|
|
- _disableOverFlow() {
|
|
|
|
- this._saveInitialAttribute(this._element, 'overflow');
|
|
|
|
- this._element.style.overflow = 'hidden';
|
|
|
|
- }
|
|
|
|
- _setElementAttributes(selector, styleProperty, callback) {
|
|
|
|
- const scrollbarWidth = this.getWidth();
|
|
|
|
- const manipulationCallBack = element => {
|
|
|
|
- if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- this._saveInitialAttribute(element, styleProperty);
|
|
|
|
- const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);
|
|
|
|
- element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);
|
|
|
|
- };
|
|
|
|
- this._applyManipulationCallback(selector, manipulationCallBack);
|
|
|
|
- }
|
|
|
|
- _saveInitialAttribute(element, styleProperty) {
|
|
|
|
- const actualValue = element.style.getPropertyValue(styleProperty);
|
|
|
|
- if (actualValue) {
|
|
|
|
- Manipulator.setDataAttribute(element, styleProperty, actualValue);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- _resetElementAttributes(selector, styleProperty) {
|
|
|
|
- const manipulationCallBack = element => {
|
|
|
|
- const value = Manipulator.getDataAttribute(element, styleProperty);
|
|
|
|
- // We only want to remove the property if the value is `null`; the value can also be zero
|
|
|
|
- if (value === null) {
|
|
|
|
- element.style.removeProperty(styleProperty);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- Manipulator.removeDataAttribute(element, styleProperty);
|
|
|
|
- element.style.setProperty(styleProperty, value);
|
|
|
|
- };
|
|
|
|
- this._applyManipulationCallback(selector, manipulationCallBack);
|
|
|
|
- }
|
|
|
|
- _applyManipulationCallback(selector, callBack) {
|
|
|
|
- if (isElement(selector)) {
|
|
|
|
- callBack(selector);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- for (const sel of SelectorEngine.find(selector, this._element)) {
|
|
|
|
- callBack(sel);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * --------------------------------------------------------------------------
|
|
|
|
- * Bootstrap (v5.3.0-alpha1): util/backdrop.js
|
|
|
|
|
|
+ * Bootstrap util/backdrop.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -2262,7 +2164,7 @@ class Backdrop extends Config {
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): util/focustrap.js
|
|
|
|
|
|
+ * Bootstrap util/focustrap.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -2360,7 +2262,104 @@ class FocusTrap extends Config {
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): modal.js
|
|
|
|
|
|
+ * Bootstrap util/scrollBar.js
|
|
|
|
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
|
|
+ * --------------------------------------------------------------------------
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * Constants
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
|
|
|
|
+const SELECTOR_STICKY_CONTENT = '.sticky-top';
|
|
|
|
+const PROPERTY_PADDING = 'padding-right';
|
|
|
|
+const PROPERTY_MARGIN = 'margin-right';
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * Class definition
|
|
|
|
+ */
|
|
|
|
+
|
|
|
|
+class ScrollBarHelper {
|
|
|
|
+ constructor() {
|
|
|
|
+ this._element = document.body;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // Public
|
|
|
|
+ getWidth() {
|
|
|
|
+ // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
|
|
|
|
+ const documentWidth = document.documentElement.clientWidth;
|
|
|
|
+ return Math.abs(window.innerWidth - documentWidth);
|
|
|
|
+ }
|
|
|
|
+ hide() {
|
|
|
|
+ const width = this.getWidth();
|
|
|
|
+ this._disableOverFlow();
|
|
|
|
+ // give padding to element to balance the hidden scrollbar width
|
|
|
|
+ this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
|
|
|
|
+ // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth
|
|
|
|
+ this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);
|
|
|
|
+ this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);
|
|
|
|
+ }
|
|
|
|
+ reset() {
|
|
|
|
+ this._resetElementAttributes(this._element, 'overflow');
|
|
|
|
+ this._resetElementAttributes(this._element, PROPERTY_PADDING);
|
|
|
|
+ this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);
|
|
|
|
+ this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);
|
|
|
|
+ }
|
|
|
|
+ isOverflowing() {
|
|
|
|
+ return this.getWidth() > 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // Private
|
|
|
|
+ _disableOverFlow() {
|
|
|
|
+ this._saveInitialAttribute(this._element, 'overflow');
|
|
|
|
+ this._element.style.overflow = 'hidden';
|
|
|
|
+ }
|
|
|
|
+ _setElementAttributes(selector, styleProperty, callback) {
|
|
|
|
+ const scrollbarWidth = this.getWidth();
|
|
|
|
+ const manipulationCallBack = element => {
|
|
|
|
+ if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this._saveInitialAttribute(element, styleProperty);
|
|
|
|
+ const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);
|
|
|
|
+ element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);
|
|
|
|
+ };
|
|
|
|
+ this._applyManipulationCallback(selector, manipulationCallBack);
|
|
|
|
+ }
|
|
|
|
+ _saveInitialAttribute(element, styleProperty) {
|
|
|
|
+ const actualValue = element.style.getPropertyValue(styleProperty);
|
|
|
|
+ if (actualValue) {
|
|
|
|
+ Manipulator.setDataAttribute(element, styleProperty, actualValue);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ _resetElementAttributes(selector, styleProperty) {
|
|
|
|
+ const manipulationCallBack = element => {
|
|
|
|
+ const value = Manipulator.getDataAttribute(element, styleProperty);
|
|
|
|
+ // We only want to remove the property if the value is `null`; the value can also be zero
|
|
|
|
+ if (value === null) {
|
|
|
|
+ element.style.removeProperty(styleProperty);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ Manipulator.removeDataAttribute(element, styleProperty);
|
|
|
|
+ element.style.setProperty(styleProperty, value);
|
|
|
|
+ };
|
|
|
|
+ this._applyManipulationCallback(selector, manipulationCallBack);
|
|
|
|
+ }
|
|
|
|
+ _applyManipulationCallback(selector, callBack) {
|
|
|
|
+ if (isElement(selector)) {
|
|
|
|
+ callBack(selector);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ for (const sel of SelectorEngine.find(selector, this._element)) {
|
|
|
|
+ callBack(sel);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * --------------------------------------------------------------------------
|
|
|
|
+ * Bootstrap modal.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -2466,9 +2465,8 @@ class Modal extends BaseComponent {
|
|
this._queueCallback(() => this._hideModal(), this._element, this._isAnimated());
|
|
this._queueCallback(() => this._hideModal(), this._element, this._isAnimated());
|
|
}
|
|
}
|
|
dispose() {
|
|
dispose() {
|
|
- for (const htmlElement of [window, this._dialog]) {
|
|
|
|
- EventHandler.off(htmlElement, EVENT_KEY$4);
|
|
|
|
- }
|
|
|
|
|
|
+ EventHandler.off(window, EVENT_KEY$4);
|
|
|
|
+ EventHandler.off(this._dialog, EVENT_KEY$4);
|
|
this._backdrop.dispose();
|
|
this._backdrop.dispose();
|
|
this._focustrap.deactivate();
|
|
this._focustrap.deactivate();
|
|
super.dispose();
|
|
super.dispose();
|
|
@@ -2523,7 +2521,6 @@ class Modal extends BaseComponent {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
if (this._config.keyboard) {
|
|
if (this._config.keyboard) {
|
|
- event.preventDefault();
|
|
|
|
this.hide();
|
|
this.hide();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -2666,7 +2663,7 @@ defineJQueryPlugin(Modal);
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): offcanvas.js
|
|
|
|
|
|
+ * Bootstrap offcanvas.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -2824,11 +2821,11 @@ class Offcanvas extends BaseComponent {
|
|
if (event.key !== ESCAPE_KEY) {
|
|
if (event.key !== ESCAPE_KEY) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (!this._config.keyboard) {
|
|
|
|
- EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
|
|
|
|
|
|
+ if (this._config.keyboard) {
|
|
|
|
+ this.hide();
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- this.hide();
|
|
|
|
|
|
+ EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
@@ -2896,13 +2893,12 @@ defineJQueryPlugin(Offcanvas);
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): util/sanitizer.js
|
|
|
|
|
|
+ * Bootstrap util/sanitizer.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
|
|
|
|
const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
|
|
const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
|
|
-const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
|
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
|
@@ -2929,6 +2925,9 @@ const allowedAttribute = (attribute, allowedAttributeList) => {
|
|
// Check if a regular expression validates the attribute.
|
|
// Check if a regular expression validates the attribute.
|
|
return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));
|
|
return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+// js-docs-start allow-list
|
|
|
|
+const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
|
|
const DefaultAllowlist = {
|
|
const DefaultAllowlist = {
|
|
// Global attributes allowed on any supplied element below.
|
|
// Global attributes allowed on any supplied element below.
|
|
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
|
|
'*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
|
|
@@ -2962,6 +2961,8 @@ const DefaultAllowlist = {
|
|
u: [],
|
|
u: [],
|
|
ul: []
|
|
ul: []
|
|
};
|
|
};
|
|
|
|
+// js-docs-end allow-list
|
|
|
|
+
|
|
function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
|
|
function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
|
|
if (!unsafeHtml.length) {
|
|
if (!unsafeHtml.length) {
|
|
return unsafeHtml;
|
|
return unsafeHtml;
|
|
@@ -2991,7 +2992,7 @@ function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): util/template-factory.js
|
|
|
|
|
|
+ * Bootstrap util/template-factory.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -3126,7 +3127,7 @@ class TemplateFactory extends Config {
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): tooltip.js
|
|
|
|
|
|
+ * Bootstrap tooltip.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -3173,7 +3174,7 @@ const Default$3 = {
|
|
delay: 0,
|
|
delay: 0,
|
|
fallbackPlacements: ['top', 'right', 'bottom', 'left'],
|
|
fallbackPlacements: ['top', 'right', 'bottom', 'left'],
|
|
html: false,
|
|
html: false,
|
|
- offset: [0, 0],
|
|
|
|
|
|
+ offset: [0, 6],
|
|
placement: 'top',
|
|
placement: 'top',
|
|
popperConfig: null,
|
|
popperConfig: null,
|
|
sanitize: true,
|
|
sanitize: true,
|
|
@@ -3286,7 +3287,7 @@ class Tooltip extends BaseComponent {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- // todo v6 remove this OR make it optional
|
|
|
|
|
|
+ // TODO: v6 remove this or make it optional
|
|
this._disposePopper();
|
|
this._disposePopper();
|
|
const tip = this._getTipElement();
|
|
const tip = this._getTipElement();
|
|
this._element.setAttribute('aria-describedby', tip.getAttribute('id'));
|
|
this._element.setAttribute('aria-describedby', tip.getAttribute('id'));
|
|
@@ -3372,12 +3373,12 @@ class Tooltip extends BaseComponent {
|
|
_createTipElement(content) {
|
|
_createTipElement(content) {
|
|
const tip = this._getTemplateFactory(content).toHtml();
|
|
const tip = this._getTemplateFactory(content).toHtml();
|
|
|
|
|
|
- // todo: remove this check on v6
|
|
|
|
|
|
+ // TODO: remove this check in v6
|
|
if (!tip) {
|
|
if (!tip) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
|
|
tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
|
|
- // todo: on v6 the following can be achieved with CSS only
|
|
|
|
|
|
+ // TODO: v6 the following can be achieved with CSS only
|
|
tip.classList.add(`bs-${this.constructor.NAME}-auto`);
|
|
tip.classList.add(`bs-${this.constructor.NAME}-auto`);
|
|
const tipId = getUID(this.constructor.NAME).toString();
|
|
const tipId = getUID(this.constructor.NAME).toString();
|
|
tip.setAttribute('id', tipId);
|
|
tip.setAttribute('id', tipId);
|
|
@@ -3637,7 +3638,7 @@ defineJQueryPlugin(Tooltip);
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): popover.js
|
|
|
|
|
|
+ * Bootstrap popover.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -3717,7 +3718,7 @@ defineJQueryPlugin(Popover);
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): scrollspy.js
|
|
|
|
|
|
+ * Bootstrap scrollspy.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -3976,7 +3977,7 @@ defineJQueryPlugin(ScrollSpy);
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): tab.js
|
|
|
|
|
|
+ * Bootstrap tab.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|
|
@@ -4009,7 +4010,7 @@ const NOT_SELECTOR_DROPDOWN_TOGGLE = ':not(.dropdown-toggle)';
|
|
const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]';
|
|
const SELECTOR_TAB_PANEL = '.list-group, .nav, [role="tablist"]';
|
|
const SELECTOR_OUTER = '.nav-item, .list-group-item';
|
|
const SELECTOR_OUTER = '.nav-item, .list-group-item';
|
|
const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role="tab"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`;
|
|
const SELECTOR_INNER = `.nav-link${NOT_SELECTOR_DROPDOWN_TOGGLE}, .list-group-item${NOT_SELECTOR_DROPDOWN_TOGGLE}, [role="tab"]${NOT_SELECTOR_DROPDOWN_TOGGLE}`;
|
|
-const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]'; // todo:v6: could be only `tab`
|
|
|
|
|
|
+const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]'; // TODO: could only be `tab` in v6
|
|
const SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`;
|
|
const SELECTOR_INNER_ELEM = `${SELECTOR_INNER}, ${SELECTOR_DATA_TOGGLE}`;
|
|
const SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-bs-toggle="tab"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="pill"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="list"]`;
|
|
const SELECTOR_DATA_TOGGLE_ACTIVE = `.${CLASS_NAME_ACTIVE}[data-bs-toggle="tab"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="pill"], .${CLASS_NAME_ACTIVE}[data-bs-toggle="list"]`;
|
|
|
|
|
|
@@ -4023,7 +4024,7 @@ class Tab extends BaseComponent {
|
|
this._parent = this._element.closest(SELECTOR_TAB_PANEL);
|
|
this._parent = this._element.closest(SELECTOR_TAB_PANEL);
|
|
if (!this._parent) {
|
|
if (!this._parent) {
|
|
return;
|
|
return;
|
|
- // todo: should Throw exception on v6
|
|
|
|
|
|
+ // TODO: should throw exception in v6
|
|
// throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)
|
|
// throw new TypeError(`${element.outerHTML} has not a valid parent ${SELECTOR_INNER_ELEM}`)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -4155,7 +4156,7 @@ class Tab extends BaseComponent {
|
|
}
|
|
}
|
|
this._setAttributeIfNotExists(target, 'role', 'tabpanel');
|
|
this._setAttributeIfNotExists(target, 'role', 'tabpanel');
|
|
if (child.id) {
|
|
if (child.id) {
|
|
- this._setAttributeIfNotExists(target, 'aria-labelledby', `#${child.id}`);
|
|
|
|
|
|
+ this._setAttributeIfNotExists(target, 'aria-labelledby', `${child.id}`);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
_toggleDropDown(element, open) {
|
|
_toggleDropDown(element, open) {
|
|
@@ -4237,7 +4238,7 @@ defineJQueryPlugin(Tab);
|
|
|
|
|
|
/**
|
|
/**
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
- * Bootstrap (v5.3.0-alpha1): toast.js
|
|
|
|
|
|
+ * Bootstrap toast.js
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
* --------------------------------------------------------------------------
|
|
* --------------------------------------------------------------------------
|
|
*/
|
|
*/
|