Releases: thednp/bootstrap.native
Minor improvements
Modal: 69f67cc
- Improved
queryElement()
utility #102 (comment) - all components allow multiple initializations but only one specific component event handlers attached
- Modal now allows targeting
<div class="modal">
like the original, now the modal can be fully independent of a triggering elementID - Documentation updates on Modal
New utility nodeListToArray()
fixing some bug with IE8 ae81ade
A minor improvement and docs update
- Added ability to use a container option for Popover and Tooltip #105
- Documentation updated for Tooltip and Popover
- Options / Events tables in the demo are now responsive
Major release with important changes and NEW features
This is a major release that could break backward compatibility (especially for those who rely heavily on JavaScript) as we have renamed some methods, completely revamped components, added more utilities, added original events, improved performance along with other cosmetic changes.
This is a transition version to prepare for a future version aimed at Bootstrap 4. It introduces a dedicated 4kb polyfill for legacy browsers, along with the recommended minifill.js and polyfill.io service.
Utilities
- added new utilities for event delegation:
on()
,off()
- added new utility for triggering original events
bootstrapCustomEvents()
#81 (comment) - added
initializeDataAPI
utility - added selector
queryElement()
utility - added
hasClass()
utility as suggested #98 (comment) , but implemented withclassList
- fixed
getClosest()
utility and now can be used by other components as well, like Alert stylePopover()
andstyleTooltip()
are now one common utility calledstyleTip()
Alert
- now requires
data-dismiss="alert"
attribute in order to work, for both DATA API usage and JavaScript - the event handler is no longer attached to the
document
object, but the element withdata-dismiss="alert"
attribute - now the component exposes a single public method
close()
Affix
- if the offset options are set as functions, they are executed on update instead of only at the time of initialization
- renamed most methods and now we expose a single public method
update()
- major code cleanup and performance improvements
Dropdown
- added ability to keep the dropdown-menu open via
persist: true/false
option ordata-persist="true"
attribute - if the trigger is a link, it will
event.preventDefault()
- now the component exposes a single public method
toggle()
Button
- events renamed from
bs.change.button
tochange.bs.button
- events no longer trigger twice
- now the component exposes no public method
Tab
- now can animate height as well via
data-height="true"
and the CSS from Collapse component - because the above, the handler is protected by a
isAnimating
private boolean
Modal
- no longer initialize on
.modal
via DATA API, but on[data-toggle="modal"]
elements, while via JavaScript we initialize on a triggering element, also not a modal - no longer resizes the backdrop, seems it's not needed
- the
<div class="modal">
object stores the triggering button reference inmodal.modalTrigger
, and this updates everytime you open a modal by clicking a different trigger button - renamed methods from
.open()
to.show()
and.close()
to.hide()
- added
.toggle()
method - reworked event handlers, solving #98
Collapse
- reworked event handlers, they are not removed and readded anymore, we now have a local variable
isAnimating
to prevent click - renamed
open()
toshow()
andclose()
tohide()
methods - triggering elements no longer target collapsible elements via class name, only parent accordion
- some code improvements and major cleanup
Carousel
- reworked event handlers, they are not removed and readded anymore, we now have a local variable
isSliding
to prevent click handlers from - renamed
_slideTo()
toslideTo()
and_getActiveIndex()
togetActiveIndex()
methods - if no active item is found on initialization, the first carousel item (with the 0 [zero] index) will be made active
- events also point the
relatedTarget
like the original plugin - the component also stores the
direction
in the initialization and gets updated on every instance ofslideTo()
Popover
- renamed Popover option
dismiss
todismissible
- renamed methods and only exposing 3 main public methods
Tooltip
- renamed methods and only exposing 3 main public methods
ScrollSpy
- reworked all about the component, now the JavaScript initialization should work as expected
- major performance improvements, the component now should be one of the fastest of it's kind
- fixed non-window overflowing elements active state processing, now the component will handle level 1 nested containers
All Components
- added original events to all components
- major code clean up in all components: total separation of public methods and private methods, removed alot of stuff from each component's
this
instance, much more readable code, now the library is only ~20Kb minified instead of 38Kb - major documentation re-write: added methods, more usage and added events usage guides
Major Release with Improvements
- Added CONTRIBUTING.md #80 (comment)
- Carousel, Modal, ScrollSpy Affix, Tooltip and Popover improvements dc34411
- Dropdown improvement c65de8e
- Fixed #89
- Code clean-up 283c37a
- Documentation updates.
New build script and new code structure
Minor fix for Carousel
Details #73
Improvements, cleanups and fixes
Dropdown
- the trigger can be a level 2 element
- the script now supports forms inside
dropdown-menu
- made methods to be easily accessed
- now the script supports nested dropdowns
Collapse
- typo issue with
aria
attribute - script methods are now public, also some fixes with calculating content height
- trigger wrong class manipulation
- accordions work excellent now
Carousel
Modal
- Added ability to close current opened Modal when opening another
- stop jumping around when opening modals
Documentation
- typo issue with Button script
- added CDNJS link
- added demos for nested dropdowns and forms in dropdown
Fixes for Safari and other improvements
- Fixed mouse events for Tooltip and Popover on Safari
- Fixed Dropdown
blur
handler on Safari - Added dismiss on
Esc
for Dropdown - Dropdown can now handle later added dropdowns
- Improvement for Collapse, now it should not bubble on
dblclick
- Fixed demo for Collapse, it seems we don't need prefixed
webkit-transition
for.collapse
- Updated docs
Minor fix with Tab script
Small issue fixed with dropdown inside tabs #40
Major improvements for Modal / Collapse components + other small improvements
Improvements
- change Modal prototype for easier function binding
- added addClass/removeClass utility functions to Modal
- Modal can now handle the overflow just like the original plugin
- Collapse no longer works with resize handlers, it just works exactly like jQuery's
slideToggle
- Make options optional #22
Issues:
- Overlay disappears when starting a modal from another modal #30
- Minor Button type