Commit Graph

595 Commits

Author SHA1 Message Date
Johann-S d5752a18ab toast should allow prevent default for hide and show events 2019-05-16 13:24:29 +02:00
XhmikosR 438e01b61c Rename `eventHandler` and `selectorEngine` files. 2019-05-08 17:26:37 +03:00
XhmikosR e7657c8bc0 Remove the `unicorn/filename-case` rule suppression. 2019-05-08 17:26:37 +03:00
Johann-S 14f53d9baa fix unit tests for chrome mobile 2019-04-15 13:48:27 +02:00
XhmikosR 105687ac4a Update eslint config for the new xo rules. 2019-04-10 15:18:57 +03:00
Johann-S 1752addadf Reset carousel touch delta x to prevent click transformation in swipe (#28558) 2019-03-27 14:37:04 +02:00
Johann-S 08679ac0b5 Add back support for IE 11 2019-03-18 01:11:05 +02:00
XhmikosR 5bcd6a29cd Disable a few rules for now. 2019-03-11 17:01:28 +02:00
XhmikosR 46c037410b Comply to the new rules. 2019-03-11 17:01:28 +02:00
XhmikosR 44e6abcba5 Switch to eslint-config-xo and eslint-plugin-unicorn. 2019-03-11 17:01:28 +02:00
XhmikosR 9cbd041f6b
tests: add tests for plugins version. (#28366) 2019-02-27 13:20:25 +02:00
Johann-S 8a37045b79 move util in a util folder with the sanitizer 2019-02-26 13:04:04 +02:00
XhmikosR f0c6b24bd7 4.3.1. 2019-02-20 22:05:45 +02:00
Joshua Wilson fdbb5db919 minor jQuery.hasclass removal (#28158) 2019-02-20 22:05:45 +02:00
Peter Blazejewicz cbd333185e Use consistent arrow class (#28105) 2019-02-20 22:05:45 +02:00
Johann-S c096e0e0da bump to 4.2.1 2019-02-20 22:05:45 +02:00
Johann-S 661db08eeb rewrite toast plugin without jquery 2019-02-20 22:05:45 +02:00
Johann-S 57d50b2134 Improve manipulator coverage 2019-02-20 22:05:45 +02:00
Alessandro Chitolina 6cfc78f2d9 Remove IE support and button bsChecked hack 2019-02-20 22:05:45 +02:00
Johann-S a2f1d79045 Refactor util plugin and some tests 2019-02-20 22:05:45 +02:00
Johann-S c44db783bf chore(update): bump to 4.1.3 2019-02-20 22:05:45 +02:00
Johann-S 6b0808354d fix(unit-test): dropdown, collapse and carousel 2019-02-20 22:05:45 +02:00
Johann-S a1cc9a6e33 fix(util): increase util coverage 2019-02-20 22:05:45 +02:00
Johann-S 096413a994 fix(selector-engine): increase coverage for selector engine 2019-02-20 22:05:45 +02:00
Johann-S 64591b3722 fix(manipulator): increase coverage for manipulator 2019-02-20 22:05:45 +02:00
Johann-S 0b719e065c fix(data): increase coverage for data 2019-02-20 22:05:45 +02:00
Johann-S 9313446274 fix(event-handler): remove the use of our event handler in unit test 2019-02-20 22:05:45 +02:00
Johann-S 2b78078779 fix(data): do not use data object in our unit tests 2019-02-20 22:05:45 +02:00
Johann-S 7eddee286e remove old references to jquery and some fixes 2019-02-20 22:05:45 +02:00
Alessandro Chitolina 0263d1742c rewritten scrollspy without jquery 2019-02-20 22:05:45 +02:00
Johann-S 9744886519 upgrade to v4 stable 2019-02-20 22:05:45 +02:00
Alessandro Chitolina 7f08061eca rewritten tab without jquery 2019-02-20 22:05:45 +02:00
Johann-S 90261b484c Dropdown without jQuery 2019-02-20 22:05:45 +02:00
Johann-S 2ff8ed5cbf Fix new unit test in popover 2019-02-20 22:05:45 +02:00
Alessandro Chitolina ec69de4b7e allow register the same handler for different delegated selectors in eventHandler 2019-02-20 22:05:45 +02:00
Alessandro Chitolina cc6e130fc1 tooltip without jquery 2019-02-20 22:05:45 +02:00
Johann-S bcbea02886 fix unit test modal 2019-02-20 22:05:45 +02:00
Johann-S 69e4d4f3ac Rewrite Collapse without jQuery 2019-02-20 22:05:45 +02:00
Alessandro Chitolina 53ca76ebc0 Workaround for M$ Edge resetting defaultPrevented flag upon dispatchEvent 2019-02-20 22:05:45 +02:00
Alessandro Chitolina 33211eefdf Rewritten modal without jquery (#23955)
* Trigger jquery events if available in event handler

* Rewritten modal without jquery
2019-02-20 22:05:45 +02:00
Johann-S 9f9712b98c Add Manipulator object to add shortcuts for dom manipulations 2019-02-20 22:05:45 +02:00
Johann-S 44f38e4128 Rewrite carousel without jquery 2019-02-20 22:05:45 +02:00
XhmikosR aba87279fd button without jquery 2019-02-20 22:05:45 +02:00
Johann-S 2970d14dd9 Remove jQuery from alert.js and add .alert only if jQuery is available 2019-02-20 22:05:45 +02:00
Johann-S 0b16c8c6d9 alert without jquery 2019-02-20 22:05:45 +02:00
Patrick H. Lauke 4b00aa6c4e Remove incorrect aria-haspopup from dropdown toggles (#28299)
`aria-haspopup` use requires the use of an ARIA `menu`, `listbox`, `tree`, `grid` or `dialog` (see https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup)

in our use (as generic disclosure widgets), it's incorrect and sets up the wrong assumption/behavior from assistive technologies.

in future, we likely want to change our dropdowns to essentially be like a `dialog` - move focus to it when opened, possibly make it modal so focus is maintained inside it and the rest of the page
is hidden/inert.

but for now, removing the incorrect attribute is probably the quickest, most immediate fix.
2019-02-19 11:25:36 +02:00
Johann-S 7bc4d2e0bc Add sanitize template option for tooltip/popover plugins. 2019-02-13 08:32:15 +02:00
Johann-S b54ddfda83 fix modal test to be sure we call getTransitionDurationFromElement 2019-02-06 15:01:13 +01:00
Johann-S 3c49467224 allow to override default toast options (#28186) 2019-02-06 15:19:04 +02:00
Johann-S 11880109fc
fix tabs, apply show class only when fade class is present (#28183) 2019-02-06 11:12:02 +01:00
Jason Golieb e44d0475e0 Move dropdown offset function logic into private function. (#28138) 2019-02-05 10:31:18 +02:00
Jason Golieb 88a34aacbe Add support for tooltip offset option to be a function. 2019-02-05 10:24:49 +02:00
Shohei Yoshida de0bb1e052 Scrollable modal (#27769) 2019-01-20 23:28:16 +02:00
Johann-S d51ee0dcf1 Fix Carousel's touch option to not add touch listeners when set to false (#28046) 2019-01-14 18:53:54 +02:00
Johann-S 89a73f100e carousel should not cycle when there is no data-ride on init (#27968) 2019-01-04 18:15:01 +02:00
Johann-S 3bd9fb3649 getSelectorFromElement return null on bad selectors (#27912) 2018-12-23 14:30:35 +02:00
Mike Vastola fc15c4c4ce Change button checkbox/radios to ignore hidden input fields (#27802) 2018-12-10 10:40:08 +02:00
Johann-S fa03289d13 avoid console call in our unit tests (#27790) 2018-12-06 10:51:35 +02:00
Patrick H. Lauke 6c00dd08bc Add aria-modal to modals (#27780)
Dynamically set/remove `aria-modal="true"` when a modal is shown/hidden
2018-12-05 20:58:09 +02:00
Johann-S b16127fc10 Allow Tooltips/Popovers to work in shadow DOM 2018-12-05 16:02:59 +01:00
Johann-S 37f74c7070 fix regression about using element for tooltip container option 2018-12-05 10:57:02 +01:00
Johann-S 32ab52ba2e Add test to make sure we enforce focus on modal (#27723) 2018-11-25 18:20:55 +02:00
Johann-S 557d5ac74d Remove the show delay for our toast plugin 2018-11-13 08:47:32 +02:00
Laussel Loïc 4cac833447 Implement `data-dismiss="toast"` to allow user to interact itself with the component (#27155) 2018-11-13 08:47:32 +02:00
Johann-S 16cf76ff1a Create toast JS plugin, add unit tests. 2018-11-13 08:47:32 +02:00
Johann-S f7a4b39767 handle detached tooltip when we try to hide a modal 2018-11-02 13:39:58 +01:00
Johann-S cebdfb9090 fix dispose modal unit test 2018-10-30 16:59:24 +01:00
Andrew Luca bd2851938a test(Modal): check if modal is disposed 2018-10-30 16:28:32 +01:00
XhmikosR 02df7cd0d2
Fix util tests on IE 10 (#27556) 2018-10-30 15:29:04 +02:00
Martijn Cuppens 5aed968750 Prevent the background to be shown when transitioning 2018-10-30 08:57:02 +02:00
Johann-S 91f8077ed5 add unit tests for our carousel 2018-10-29 14:49:29 +01:00
Johann-S 2c2d04aba5 add unit test to test tabs can be removed without throwing error 2018-10-29 14:01:03 +01:00
Johann-S ffc8d507c7 calculate modal transition duration based on modal-dialog element 2018-10-28 23:59:17 +02:00
Andrew Luca 1f1308ba22 test(Modal): reuse _getScrollbarWidth in tests 2018-10-21 17:45:02 +02:00
Johann-S b1dc6b324c avoid drag img 2018-10-20 15:32:09 +03:00
patrickhlauke 8883ccb205 Set touch-action to "none"
Firefox currently seems extremely fickle - with `pan-y` if fires pointercancel as soon as a touch strays even a pixel or so vertically.
While `touch-action: pan-y` would be ideal (allowing users to scroll the page even when their finger started the scroll on the carousel), this prevents a swipe that isn't perfectly/only horizontal to be recognised by Firefox.
2018-10-20 15:32:09 +03:00
patrickhlauke 7b8f01d839 Use correct touch-action values
- my fault, my original advice of using `touch-action: pan-x` is exactly the value we *don't* want to have the browser handle...
2018-10-20 15:32:09 +03:00
Johann-S 735c374e9c use pointer events if available 2018-10-20 15:32:09 +03:00
Johann-S c08652cfe8 swipe left/right without hammerjs 2018-10-20 15:32:09 +03:00
Johann-S caefd70463 Add touch support in our carousel with HammerJS. 2018-10-20 15:32:09 +03:00
galczo5 6cbcd03efb Add `show` and `hide` methods to dropdown (#27370) 2018-10-20 14:27:51 +03:00
Christopher Morrissey ea0faadde5 feature(carousel): carousel-item interval (#26667)
adds the ability to assign data-interval to an individual carousel-item
2018-09-18 15:55:48 +03:00
Johann-S a689120fd2 throw error when folks try to use a bad selector 2018-09-13 22:13:36 +02:00
Johann-S 6e2a823a44 collapse children with no data-parent 2018-09-10 21:10:00 +02:00
Johann-S a3e45d8ced
add information about valid selectors (#27137) 2018-08-31 21:00:29 +02:00
Johann-S eab9da5beb fix(util): use querySelector for ids 2018-08-12 17:01:01 +02:00
Johann-S 6b92321f6a fix(util): use getElementById when it's possible 2018-08-07 18:49:02 +02:00
Johann-S 283ab30164 fix(modal): fix unit test and resetting style 2018-07-11 11:05:38 +02:00
Catalin Zalog cb82394fc8 fix(modal): removes .navbar-toggler margin 2018-07-11 11:05:38 +02:00
Johann-S e57a2f244b fix(tooltip): get tip on placement change 2018-06-25 16:54:14 +02:00
jakubhonisek 49e094619b feat(dropdown): add original click event 2018-06-25 15:29:34 +02:00
Johann-S f2aab5ea99 fix(tooltip): remove useless unit test 2018-05-22 17:26:21 +03:00
Johann-S 0338b61eb6 chore(deps): update qunit and karma-qunit 2018-05-22 17:26:21 +03:00
Johann-S ba10b63c9d fix issue related to Object.keys and Dropdown issue 2018-04-13 18:59:30 +02:00
Johann-S 0871d69ec9
v4 improve coverage (#25945)
* Improve code coverage for our Button plugin

* improve coverage for our Alert plugin

* test tooltip update method

* test update and dispose for dropdown

* increase code coverage requirements
2018-04-10 09:28:29 +02:00
XhmikosR 875ed0b975 Clean up globals.
Also, add a missing license header in build/workbox.js.
2018-04-09 22:44:22 +03:00
Johann-S fd57d371f8 fix bundle and run test against it 2018-03-29 21:21:31 -07:00
vsn4ik 68db42c9f8 Fix skip element disabled via attribute when using keyboard navigation 2018-03-26 09:37:25 +02:00
Johann-S bedc96e48b Use transitionEnd in QUnit since we moved away from PhantomJS 2018-03-20 15:56:51 +01:00
Johann-S 4d5c5923fa Add Sinon to do better unit test 2018-03-13 15:37:11 +01:00