aboutsummaryrefslogtreecommitdiff
path: root/js
AgeCommit message (Collapse)AuthorFilesLines
2022-04-25EventHandler: change check method for custom events, avoiding regexGeoSot1-2/+2
2022-04-21Carousel: Fix not used option (`ride`), simplify `cycle` method (#35983)GeoSot2-142/+139
* 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)GeoSot5-9/+132
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 Otto2-0/+31
* 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)GeoSot4-452/+527
* 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-13Update dropdown.jsGeoSot1-12/+9
minor refactoring
2022-04-06Revamp tabs & follow ARIA 1.1 practices (#33079)GeoSot2-113/+394
* 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
2022-03-10Carousel: change class check as it can only exist if carousel is slidingGeoSot2-3/+3
Also, fix the corresponding test
2022-03-10Carousel: rename private propertyGeoSot2-8/+8
2022-03-10Carousel: add comment for future fixesGeoSot1-0/+1
2022-03-10Carousel: omit redundant checks as we are always transforming the right valuesGeoSot2-12/+0
2022-03-10Carousel: omit config merging in jQueryInterface after we create the instanceGeoSot1-9/+1
This is already done inside `getOrCreateInstance` method
2022-03-09Carousel: return early in `_slide` methodGeoSot1-4/+4
2022-03-09Carousel: small refactoring, remove unnecessary checksGeoSot1-2/+1
2022-03-09Carousel: refactor using inline function and move variables to the proper placeGeoSot1-11/+5
2022-03-09Carousel: refactor `_slide` method te accept only order as first argumentGeoSot2-26/+19
2022-03-09Carousel: add a `getItems` helperGeoSot1-13/+11
2022-03-09Carousel: use combined selector and drop variable used onceGeoSot1-1/+1
2022-03-09Carousel: reorder variables and refactor method to use it inlineGeoSot2-33/+27
2022-03-09Carousel: cleanup jQueryInterfaceGeoSot1-7/+11
Drop chained else ifs and unused variable. Since we were checking for `typeof config === 'string'` in both places, action was never `_config.slide`.
2022-03-08Fix dropdownslouismaxime.piton1-2/+18
2022-03-02Add static backdrop to offcanvas (#35832)Jann Westermann2-15/+86
* Add static backdrop option, to offcanvas * Trigger prevented event on esc with keyboard=false * Change offcanvas doc , moving backdrop examples to examples section
2022-03-01Modal: refactor listeners to reduce some code noise (#35902)GeoSot2-23/+10
2022-03-01Carousel: simplify carousel items selectionGeoSot1-3/+1
We already know that carousel's parent is the carousel element, so we can use it explicitly
2022-03-01Carousel: move `carouselInterface` inside `jqueryInterface`GeoSot1-26/+22
2022-03-01Carousel: move logic of `dataApiClickHandler`GeoSot1-23/+21
2022-03-01Carousel: refactor dataApiKeyHandler to avoid use of `carouselInterface`GeoSot1-9/+9
2022-03-01Dropdown: Simplify dataKeyApiHandler (#35870)GeoSot1-39/+14
* Dropdown.js: Remove duplicated check for `Not Shown` instance * Dropdown.js: Rearrange `dataApiKeydownHandler` checks * Dropdown: do some fixup inside `dataApiKeydownHandler` * Update dropdown.js Co-authored-by: XhmikosR <[email protected]>
2022-02-28add testsMark Otto1-0/+49
2022-02-28Add centered dropdown and dropup optionsMark Otto1-0/+12
2022-02-25src/tooltip.js OptimizationДилян Палаузов1-3/+1
Util.findShadowRoot() returns either null or an object. It cannot return falsy, which allows this optimization.
2022-02-19Dropdown: use a better selector to avoid triggering click if button is ↵GeoSot1-5/+1
disabled (#35866)
2022-02-19Dropdown: use a combined selector to filter foreign not shown instances ↵GeoSot1-6/+3
iteration (#35766)
2022-02-19tests: revisit all tests using Promise.reject instead of throwing an error ↵GeoSot10-72/+72
(#35765)
2022-02-19Make event name helper and use it on tooltip & popover to reduce dist sizes ↵GeoSot5-69/+27
(#35856) * feat: create eventName getter function in baseComponent * refactor: use `eventName` getter on tooltip & popover
2022-02-19Carousel: remove one more call to ActiveIndexGeoSot1-3/+2
2022-02-19Carousel: change argument to `_setActiveIndicatorElement`, from element to indexGeoSot1-3/+3
2022-02-19Carousel: make direct triggering of slid event, instead of using a callbackGeoSot1-10/+6
2022-02-19Carousel: merge slide functionality, regardless of whether it is animated or notGeoSot1-20/+16
2022-02-19Carousel: simplify initialization on document load, using `getOrCreateInstance`GeoSot1-1/+1
2022-02-19Carousel: remove redundant config merge on `dataApiClickHandler`, as it is ↵GeoSot1-1/+0
done by default in the `constructor`
2022-02-15Update devDependencies (#35841)XhmikosR5-10/+10
* Update devDependencies * @babel/core ^7.17.0 → ^7.17.2 * @rollup/plugin-replace ^3.0.1 → ^3.1.0 * eslint ^8.8.0 → ^8.9.0 * eslint-config-xo ^0.39.0 → ^0.40.0 * hugo-bin ^0.80.1 → ^0.80.2 * karma ^6.3.15 → ^6.3.16 * rollup ^2.67.1 → ^2.67.2 * Fix new ESLint errors
2022-02-09Remove remaining `.navbar-light` classes (#35814)Julien Déramond2-3/+3
* Fix typo in CSS variables documentation * Drop remaining .navbar-light classes
2022-02-07Optimize jQueryInterface in Collapse (#35689)Anton1-5/+5
extracts config initialization from cycle
2022-02-01event-handler.js: remove unneeded return statementXhmikosR1-3/+0
2022-02-01Event-handler: use `Array.find` instead of `for`GeoSot1-9/+2
2022-02-01Event-handler: initialize variable properlyGeoSot1-2/+2
2022-02-01Fix Popover test that randomly fails on BrowserStack (#35757)GeoSot1-12/+7
Co-authored-by: XhmikosR <[email protected]>
2022-02-01Dropdown: use destructured variables in `dataApyKeydownHandler`GeoSot1-6/+7