Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In brief, a complete rework of all components for stronger TypeScript or improved JavaScript consistency, as well as new features. * Added full RTL support for Carousel, Dropdown, Popover & Tooltip * Tooltip & Popover make use of a new way to determine the best `container` option and `parentOffset` similar to [floating-ui](https://floating-ui.com/), slightly more simple and efficient, the `container` option is possible to become deprecated * Tooltip & Popover have a better way to determine the best container option, will even override an incorrectly configured container option * Tooltip & Popover all utilities now work best in any configuration, any container, the viewport is always what's called the "clippingParent" for the original library * Carousel will now work with multiple instances of arrows, indicators, within the instance markup (`data-bs-target` attribute is optional) or outside the instance markup (`data-bs-target` attribute is required) * Modal / Offcanvas make use of a container similar to Tooptip / Popover to append the overlay, no option is required * all event listeners now use `e.code` instead of the legacy `e.which` * Dropdown fixed repositioning in all possible ways * Added `relatedTarget` property to all Offcanvas events * Added `relatedTarget` property to ScrollSpy event * Added `relatedTarget` property to all Toast events * Toast - added `interactiveToastHandler` for handler to prevent the autohide behavior to kick in when user interacts with the toast instance without closing it (usually by hovering or focusing the toast) * Toast - changed default delay from 500 to 5000 (miliseconds) * Toast - fixed `hide.bs.toast` event missfire * all components and utils use a new way to refer to `Document` / `Window` similar to [floating-ui](https://floating-ui.com/), in theory should enable access & control over components initialized within iframes smiley face ;) * Some components make use of a new `Timer` to guard against unwanted execution (Carousel, Collapse, Modal, Tooltip Popover, Tab, Toast), with other words, spamming triggering event on Tooltip will never break the instance * TypeScript improvements all round, not only that but now esm modules are also with strong TypeScript definitions * V4 uses new legacy `shorter-js` utils, V5 uses lighter new revamped utils * Re-added `on` / `off` utils for TypeScript consistency * some changes to initialization callback, allowing components to initialize `customElements` * Demo improvements
- Loading branch information