aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit
AgeCommit message (Collapse)AuthorFilesLines
2024-07-19Fix `this` reference for JavaScript functions (#38725)Nathan Sarang-Walters4-7/+96
2024-02-18Selector Engine: fix multiple IDs (#39201)GeoSot2-0/+41
* fix: regression of #38989 * Add unit test in selector-engine.spec.js --------- Co-authored-by: Julien Déramond <[email protected]> Co-authored-by: XhmikosR <[email protected]>
2024-02-06Build(deps-dev): Bump eslint-config-xo from 0.43.1 to 0.44.0 (#39651)dependabot[bot]8-8/+24
* Build(deps-dev): Bump eslint-config-xo from 0.43.1 to 0.44.0 Bumps [eslint-config-xo](https://github.com/xojs/eslint-config-xo) from 0.43.1 to 0.44.0. - [Release notes](https://github.com/xojs/eslint-config-xo/releases) - [Commits](https://github.com/xojs/eslint-config-xo/compare/v0.43.1...v0.44.0) --- updated-dependencies: - dependency-name: eslint-config-xo dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Update .eslintrc.json * Update .eslintrc.json * autofix --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: XhmikosR <[email protected]>
2023-09-13Fix collapse multiple ids target (#38989)Louis-Maxime Piton1-0/+12
2023-07-23Support `Home` and `End` keys in tabs (#38498)Kyle Tsang1-0/+112
* Support `Home` and `End` keys in tabs * Update tab.js * simplify tests * Update navs-tabs.md * Update .bundlewatch.config.json --------- Co-authored-by: Patrick H. Lauke <[email protected]> Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Mark Otto <[email protected]>
2023-05-01Update URL sanitizer to allow more protocols (#38531)Kyle Tsang1-10/+68
Co-authored-by: XhmikosR <[email protected]>
2023-05-01Fix scrollspy and accented anchor links (#38502)Alejandro Mendoza1-0/+34
2023-04-11dropdown.spec.js: expect nothing in constructor (#38442)XhmikosR1-0/+1
2023-03-29Tweak and re-organize ESLint config (#38369)XhmikosR28-110/+91
* Tweak and re-organize ESLint config * merge individual configs to the root config * enable more eslint-plugin-import rules * lint markdown files * Lint
2023-03-14Fix wrong generation of `aria-labelledby` in tab navigation (#38223)Jan Bensch1-1/+1
* fix wrong generation of aria-labelledby in tab navigation * fix wrong test --------- Co-authored-by: Jan Bensch <[email protected]> Co-authored-by: XhmikosR <[email protected]>
2023-02-21Tests: remove unnecessary `id`/`aria-labelledby` from collapse unit tests ↵Julien Déramond1-15/+15
(#38089)
2023-02-11Minor fix to avoid creating void elements in tooltip test file (#38034)Julien Déramond1-51/+51
2022-11-12Docs: use `<button>` for dropdown/popover examples, explain preference over ↵Patrick H. Lauke1-3/+3
`<a>` for dropdowns, tweak collapse prose (#37432) * Expand dropdown explanation for use of `<a>`, use `<button>`s for modal examples * Remove redundant `role="button"` from collapse test `<button>` elements * Tweak language * Tweak collapse prose
2022-11-12ESLint: enable prefer-template rule (#37484)XhmikosR3-3/+3
2022-11-07Properly escape IDs in getSelector() to handle weird IDs (#35565) (#35566)Pierre Souchay2-3/+40
2022-11-06Move `getElementFromSelector` & `getSelectorFromElement` to SelectorEngine ↵GeoSot2-115/+156
(#36027) * Move `getElementFromSelector` & getSelectorFromElement` inside selector-engine.js, in order to use SelectorEngine methods, avoiding raw querySelector usage * add `getMultipleElementsFromSelector` helper Co-authored-by: Julien Déramond <[email protected]>
2022-10-07Boost `execute` function, being able to handle arguments (#36652)GeoSot1-0/+19
2022-10-03Rename some vars in tab unit tests for consistency (#37248)Julien Déramond1-9/+9
2022-10-02Ensure Tab keyboard functionality after #37146 (#37200)GeoSot1-4/+30
* fix: keyboard functionality * test: add tests * Add some focus spies in 2 other unit tests Co-authored-by: Julien Déramond <[email protected]>
2022-09-27Dropdown: fix case with invalid markup (#37190)GeoSot1-0/+22
This fixes a backward incompatible change in v5.2.1 where `.drodown-toggle` isn't present in the markup.
2022-09-23Tests: add testcase to Tabs, keyboard handler (#37189)GeoSot1-6/+13
2022-09-22Fix active class toggling of tabs within dropdown (#37151)Carson Sievert1-3/+4
* Close #36947: fix active class toggling tabs within dropdown
2022-09-20Drop tabs auto-focus (#37146)GeoSot1-2/+29
* fix: drop tabs auto-focus
2022-09-15Fix modal event listeners (#37128)Jérémie Broutier1-0/+30
* Fix modal event listeners (#37126) Co-authored-by: GeoSot <[email protected]>
2022-09-07Fix modal event-listeners during dismiss click (#36863)GeoSot1-0/+4
ref: #36855
2022-09-02fix(dropdowns): Fix multiple dropdowns when they are inside the same tag ↵Louis-Maxime Piton1-0/+61
(#37011)
2022-07-28ScrollSpy: make the threshold option configurable (#36750)GeoSot1-0/+44
* feat(ScrollSpy): make the threshold option configurable
2022-07-27Re-set tooltip title, on disposal (#36751)GeoSot1-0/+19
fix(reg): Re-set tooltip title, on disposal
2022-07-19Fix failing test on EventHandler (#36772)GeoSot1-4/+3
2022-07-18Fix typos in code (#36763)Marc Wrobel1-1/+1
Shoutout is correct but has been replaced by its more common form : Shout-out (https://www.merriam-webster.com/dictionary/shout-out).
2022-07-15Standardization of `spyOn` usage (#36742)Julien Déramond1-3/+3
2022-07-14Offcanvas: activate focustrap when backdrop is enabled (#36717)GeoSot1-1/+23
* fix(offcanvas): activate focustrap when backdrop is enabled * Adding tabindex='-1' for both offcanvases in the docs * Remove useless aria-expanded='false' in togglers * Update js/tests/unit/offcanvas.spec.js Co-authored-by: Julien Déramond <[email protected]> Co-authored-by: Julien Déramond <[email protected]> Co-authored-by: Patrick H. Lauke <[email protected]>
2022-07-06Handle non-empty whitespace `textContent` in Tooltip trigger (#36588)Nathan Walters1-0/+19
2022-07-04ref(tests): Minor fix to use self-closing input HTML tag (#36667)Julien Déramond3-5/+5
2022-06-30Fix interoperability issue regarding Event properties (#36386)Aleksander Machniak1-0/+37
* Fix interoperability issue regarding Event properties - make possible to re-set read-only event properties - use hydrateObj() to set delegateTarget property Fixes #36207 Co-authored-by: GeoSot <[email protected]> Co-authored-by: Julien Déramond <[email protected]>
2022-06-27Force tooltip and popover to recreate content every time it opens (#35679)GeoSot1-2/+4
2022-06-27ref(tab): remove show from panels dependent-less they have `.fade` class or ↵GeoSot1-2/+2
not (simplify checks) (#36622)
2022-06-21fix: change dismiss handler, listening to key down, instead of click (#36401)GeoSot1-6/+13
2022-06-14Carousel: Remove redundant reference to `interval=false` from docs (#36545)GeoSot1-7/+7
* docs: remove redundant reference to `interval=false` * docs: remove redundant reference to `interval=false` from tests Co-authored-by: XhmikosR <[email protected]>
2022-06-08Fix typo in dropdown unit testJulien Déramond1-1/+1
2022-06-08Scrollspy: enable smooth-scroll behavior (#36528)GeoSot1-1/+1
2022-05-31JS: tests fixes & standardization of spies usage (#36398)Louis-Maxime Piton18-342/+338
* Fix carousel spec typo * Change carousel test name in align with testing method * Make the spies declarations the same everywhere
2022-05-12Revert backdrop utilization, handling clicks over modal (#36324)GeoSot1-7/+3
* refactor(Modal.js): stop using backdrop class to handle clicks over modal * Revert #35554 and backdrop callback usage Explanation: In order to bypass `.modal`, was applied a css rule `pointer-events:none` which caused the side effect, and user couldn't scroll "long content modals" * Update .bundlewatch.config.json Co-authored-by: Mark Otto <[email protected]>
2022-05-05Handle disabled focused tabs with tab JavaScript plugin (#36169)Julien Déramond1-0/+66
* Handle disabled tabs * Fix after feedback * Update js/src/tab.js Co-authored-by: GeoSot <[email protected]> * Update js/src/tab.js Co-authored-by: GeoSot <[email protected]> * Commit suggestions via GitHub broke the thing * Add some unit tests * Remove temp doc modification * Add tests for left arrow * Add disabled tabs in JavaScript Behavior section * Compact 4 tests to 2 tests * Compact 4 tests to 2 tests * Add 'disabled' attribute for all buttons * Change the disabled pane position only for the vertical version * Change ids for the confusing first example in JavaScript behavior * Use disabled attribute instead of the class for buttons in tabs Co-authored-by: GeoSot <[email protected]>
2022-04-21Carousel: Fix not used option (`ride`), simplify `cycle` method (#35983)GeoSot1-105/+104
* Fix not used option (`ride`) (according to docs), continuing of #35753 a247fe9 * separate concept of `programmatical cycle` vs `maybe cycle after click` functionality
2022-04-21Manipulator: Add JSON parse support (#35077)GeoSot3-7/+119
Support parsing JSON from each component's main element using the `data-bs-config` attribute. The `bs-config` attribute will be reserved and omitted during `getDataAttributes` parsing. With this commit, every component, will create its config object, using: * defaults * data-bs-config * the rest of data attributes * configuration object given during instance initialization Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Mark Otto <[email protected]> Co-authored-by: Mark Otto <[email protected]>
2022-04-17v5.2.0 design refresh, plus responsive offcanvas classes (#35736)Mark Otto1-0/+22
* Add responsive offcanvas classes - Updates navbar-expand classes to de-dupe some styles—these shouldn't interfere now. - Adds some JS to the offcanvas component to help with responsiveness Co-Authored-By: GeoSot <[email protected]> * Redesign homepage, docs, and examples Homepage: - New Bootstrap purple navbar - Redesigned masthead - Rewrote and redesigned homepage content - Replace Copy text with icons like Bootstrap Icons site across all ClipboardJS instances - Fixed padding issues in site footer - Match homepage button styles to examples page, use gap instead of tons of responsive margin utils Docs: - New navbar, no more subnav. Migrated search and version picker into the main navbar and refreshed the design of it all, including the responsive toggles. - New sidebar navigation is always expanded, and now features Bootstrap Icons alongside section headings - Sidebar navigation autoscrolls to active link for better usability - Subnav and navbar padding issues ironed out - Enhanced the version picker in anticipation of v5.2: we can now link right to the same page in the previous version. - Redesign callouts to add more color to our pages - Collapse table of contents on mobile - Cleanup and redesign button styles with CSS variables - Update design for subnav version dropdown - Update highlight and example to be full-width until md - Improve the Added In badges - Turn the ToC into a well on mobile - Redesign code snippets to better house two action buttons Examples: - Redesign Examples page layout - Add new example for responsive offcanvases in navbars * Convert offcanvas to CSS vars * Feat: add resize handler to Offcanvas.js. If we could use as default the `.offcanvas` class without modifiers, we then, could add a simplified selector The selector itself, ignores the .offcanvas class as it doesn't have any responsive behavior The `aria-modal` addon is to protect us, selection backdrop elements * Separate examples code, Add some selectors, fix stackblitz btn Co-authored-by: GeoSot <[email protected]>
2022-04-13Revamp Scrollspy using Intersection observer (#33421)GeoSot2-316/+383
* Revamp scrollspy to use IntersectionObserver * Add smooth scroll support * Update scrollspy.js/md * move functionality to method * Update scrollspy.js * Add SmoothScroll to docs example * Refactor Using `Maps` and smaller methods * Update scrollspy.md/js * Update scrollspy.spec.js * Support backwards compatibility * minor optimizations * Merge activation functionality * Update scrollspy.md * Update scrollspy.js * Rewording some of the documentation changes * Update scrollspy.js * Update scrollspy.md * tweaking calculation functionality & drop text that suggests, to deactivate target when wrapper is not visible * tweak calculation * Fix lint * Support scrollspy in body & tests * change doc example to a more valid solution Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Patrick H. Lauke <[email protected]>
2022-04-06Revamp tabs & follow ARIA 1.1 practices (#33079)GeoSot1-29/+197
* Tab: Revamp tab.js & add support Aria features * Tab: Add tab support, just to keep backwards compatibility. Better to remove it on v6 * Revert "Tab: Add tab support, just to keep backwards compatibility. Better to remove it on v6" * Support arrow down/up functionality * add prevent default to avoid scrolling the page during up/down keys handling * remove panel tabindex handling * Expand documentation text for JS plugin * Rearrange new docs to specifically call out a11y * properly place section Co-authored-by: XhmikosR <[email protected]> Co-authored-by: Patrick H. Lauke <[email protected]> Co-authored-by: Mark Otto <[email protected]>
2022-03-19No propagating escape event in an open dropdown.louismaxime.piton1-0/+35