* added checks to getSelector in util to prevent returning hrefs that are invalid selectors
* restored compatibility for the class selector and added test cases for keeping urls from being returned as a selector
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
* Emit events on the dropdown button
Emit the events on `.dropdown-toggle` button and then bubble up
* Add migration note for events
* Update the docs for events
* Add unit test to check the event bubbling
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
* Remove the margin from dropdown in favor of Popper
- Set the default margin to 0 for dropdowns (To remove the Popper's warning)
- Set the required offset in dropdown's defaults
* Remove the margin from the popover component
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
* tooltip: move common code to a reusable function
* tooltip: return early in `show()`
Co-authored-by: Rohit Sharma <rohit2sharma95@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
* Carousel: use buttons, not links, for prev/next
- expand the styles to neutralise border/background
- change docs page
- add extra unit test to check that links or buttons work as controls
- modify visual test to use buttons as well
- use buttons instead of links for prev/next
- remove `role="button"` from links that are actually links
* Clarify that controls can be button or link
* Update site/content/docs/5.0/components/carousel.md
Co-authored-by: Mark Otto <markd.otto@gmail.com>
* Explicitly set padding to 0 to prevent dipping/moving on active in Firefox
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
* Change from Error to TypeError
* Convert the `NAME` to upper case to make the consistency in the error message
* Update the remaining tests to be stricter
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Adds the ability to use objects implementing the virtual element interface as the value for the reference option of a dropdown config.
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
The default Popper `fallbackPlacements` value is `[oppositePlacement]`.
- The default value was previously (in v4) `'flip'` that can be achieved by passing the single value in the array, like — `[oppositePlacement]`. Keeping `null` also sets the `fallbackPlacements` to `[oppositePlacement]` (Default value in Popper)
- It's better to have **clockwise** (`['top', 'right', 'bottom', 'left']`) fallback options so that tooltip/popover can be placed to another side even if the opposite placement doesn't fit.
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
* refactor: use an utility function to define jQuery plugins
* test: add spec for defineJQueryPlugin utility function
* Update .bundlewatch.config.json
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Drop the support of show property from the modal plugin.
When creating the new modal instance in v5, the `show` property does not work anymore, so instead of fixing the behavior just removing it permanently to keep the consistency between all the plugins. (All other plugins require the `show()` method to be called on the instances to be shown)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>