0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-03-26 14:36:04 +01:00

143 Commits

Author SHA1 Message Date
XhmikosR
8f6de23682
Merge branch 'main' into prepare-523 2022-11-22 09:51:29 +02:00
XhmikosR
39589472f7 Bump version to 5.2.3 2022-11-21 20:15:33 +02:00
XhmikosR
2fde88c200
Use Object.entries in more places () 2022-11-13 09:19:11 +02:00
XhmikosR
21e036bf13
hydrateObj: use default param () 2022-11-12 10:03:16 +02:00
GeoSot
fcdfee90b3
ref: refactor getSelector not to be exported () 2022-11-07 14:55:34 +02:00
Pierre Souchay
ef4e2daa48
Properly escape IDs in getSelector() to handle weird IDs () () 2022-11-07 14:43:06 +02:00
GeoSot
e81e7cda90
Move getElementFromSelector & getSelectorFromElement to SelectorEngine ()
* 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 <juderamond@gmail.com>
2022-11-06 20:31:43 +02:00
GeoSot
aa9d32dd15
Use explicit imports in our javascript source files () 2022-10-26 08:26:51 +03:00
XhmikosR
961d5ff984
Release v5.2.2 ()
* Bump version to v5.2.2

* Dist
2022-10-03 10:44:02 +03:00
XhmikosR
23e50829f9
Release v5.2.1 ()
* Bump version to v5.2.1.

* Dist
2022-09-07 18:31:39 +03:00
XhmikosR
edf9c40956
Release v5.2.0 ()
* Bump version to 5.2.0

* Dist

* Update masthead.html
2022-07-19 18:43:58 +03:00
Aleksander Machniak
505e0235b9
Fix interoperability issue regarding Event properties ()
* Fix interoperability issue regarding Event properties

- make possible to re-set read-only event properties
- use hydrateObj() to set delegateTarget property

Fixes 

Co-authored-by: GeoSot <geo.sotis@gmail.com>
Co-authored-by: Julien Déramond <julien.deramond@orange.com>
2022-06-30 22:52:47 +03:00
GeoSot
ec8166a90f
fix: fix possible bug on event handler. ()
some browsers validate the empty object as `true`, so is safer to use an explicit check
2022-06-14 08:33:53 +03:00
GeoSot
b5a956781f
Assorted Event handler patches ()
* EventHandler: rename functions & variables

* EventHandler: export event hydration to function

* EventHandler: rename variable

* EventHandler: simplify checks and make use of one variable

Move check of falsie delegated-selector, caused by tooltip.js

* EventHandler: more renaming

* Update event-handler.js

* bump bunldewatch

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2022-05-16 07:59:50 -07:00
Mark Otto
f7e8ca91e0 Prepare v5.2.0-beta1 2022-05-13 19:44:01 +03:00
GeoSot
3edead4ffe EventHandler: change check method for custom events, avoiding regex 2022-04-25 19:52:27 -07:00
GeoSot
584600bda3
Manipulator: Add JSON parse support ()
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 <xhmikosr@gmail.com>
Co-authored-by: Mark Otto <markd.otto@gmail.com>
Co-authored-by: Mark Otto <markdotto@gmail.com>
2022-04-21 21:41:43 +03:00
GeoSot
ece1601227
Revamp Scrollspy using Intersection observer ()
* 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 <xhmikosr@gmail.com>
Co-authored-by: Patrick H. Lauke <redux@splintered.co.uk>
2022-04-13 10:29:13 -07:00
XhmikosR
cf7fec8a2e event-handler.js: remove unneeded return statement 2022-02-01 12:43:19 +02:00
GeoSot
a1e924c4da Event-handler: use Array.find instead of for 2022-02-01 12:43:19 +02:00
GeoSot
fc7c5fcb7a Event-handler: initialize variable properly 2022-02-01 12:43:19 +02:00
GeoSot
5f1c542d67 Dropdown: get dropdown's parent in one place 2022-01-30 18:01:09 +02:00
GeoSot
882185bbde
Change selector-engine.js parents method to utilize better js native methods ()
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2022-01-30 16:24:03 +02:00
GeoSot
d092817059 Event handler: merge new Event with new CustomEvent 2022-01-30 14:15:17 +02:00
GeoSot
fa93995123 Event handler: replace deprecated initEvent 2022-01-30 14:15:17 +02:00
XhmikosR
0840105d7f SelectorEngine: remove moot space 2022-01-29 13:25:30 +02:00
XhmikosR
558002f3dc Return early in more places 2022-01-29 13:25:30 +02:00
XhmikosR
b5147ec218 event-handler.js: use for...of 2022-01-29 13:25:30 +02:00
XhmikosR
62d86c07f8 Rename variables 2022-01-29 13:25:30 +02:00
XhmikosR
0c3dfe104b Remove a few unneeded variables 2022-01-29 13:25:30 +02:00
XhmikosR
e8f702666f
JS: minor refactoring ()
* add missing comments
* shorten block comments
* reorder constants
* reorder public/private methods
* sort exports alphabetically in util/index.js
* fix a couple of typos
2021-10-13 15:19:28 +03:00
XhmikosR
c44d64ed71 Merge remote-tracking branch 'remotes/origin/v513' 2021-10-09 18:28:28 +03:00
XhmikosR
1a6fdfae6b Bump version to 5.1.3. 2021-10-09 09:43:19 +03:00
XhmikosR
666fe596bf Enable unicorn/no-array-for-each rule 2021-10-05 19:52:11 +03:00
XhmikosR
2b4d0d166b Enable unicorn/no-for-loop rule 2021-10-05 19:52:11 +03:00
XhmikosR
5ecef8ac01
Release v5.1.2 () 2021-10-05 18:50:18 +03:00
XhmikosR
0d81d3cbc1
Release v5.1.1 ()
* Prepare v5.1.1.

* Dist
2021-09-07 18:37:44 +03:00
XhmikosR
4a4b61f082 Update eslint-plugin-unicorn to v35.0.0 2021-08-30 15:51:44 +03:00
XhmikosR
f20fece3a8
Prepare v5.1.0. () 2021-08-04 18:41:51 +03:00
alpadev
047145e808
Fix Manipulator.offset() ()
* test: add more test cases for Manipulator.offset()

* fix: Manipulator.offset() is using obsolete properties to get scroll position

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: GeoSot <geo.sotis@gmail.com>
2021-07-28 17:23:32 +03:00
Ryan Berliner
7646f6bd33
Add shift-tab keyboard support for dialogs (modal & Offcanvas components) ()
* consolidate dialog focus trap logic

* add shift-tab support to focustrap

* remove redundant null check of trap element

Co-authored-by: GeoSot <geo.sotis@gmail.com>

* remove area support forom focusableChildren

* fix no expectations warning in focustrap tests

Co-authored-by: GeoSot <geo.sotis@gmail.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-07-27 08:01:04 +03:00
XhmikosR
688bce4fa6
Release v5.0.2 ()
* Bump version to v5.0.2.

* Dist
2021-06-22 21:29:16 +03:00
XhmikosR
58b1be927f
Release v5.0.1 ()
* Bump version to 5.0.1.

* Dist
2021-05-13 19:22:20 +03:00
XhmikosR
bf09367486
Release v5.0.0 ()
* Bump version to 5.0.0

* Fix npm tag

* Dist
2021-05-05 22:32:12 +03:00
alpadev
d67121db28
Fix regression for handling mouseenter/mouseleave events introduced by ()
* test: update spec for sibling adjacent mouseenter/mouseleave events

there is a regression introduced by  - this would have catched that

* fix: fixup regression for mouseenter/mouseleave events introduced by 

the old logic only worked for parent-child movement since it checked for the relatedTarget to contain the delegateTarget - this should be fixed with this

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-04-19 08:30:33 +03:00
alpadev
db32b2380c
fix: make EventHandler better handle mouseenter/mouseleave events ()
* fix: make EventHandler better handle mouseenter/mouseleave events

* refactor: simplify custom events regex and move it to a variable
2021-04-13 06:25:58 +03:00
XhmikosR
220139a89f
Release v5.0.0-beta3 () 2021-03-23 18:26:54 +02:00
alpadev
48a95f7280
refactor: use a Map instead of an Object in dom/data ()
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: Rohit Sharma <rohit2sharma95@gmail.com>
2021-03-02 16:55:44 +02:00
XhmikosR
e50c11b8c6
Release v5.0.0-beta2 ()
* Bump version to 5.0.0-beta2

* Dist
2021-02-10 18:14:51 +02:00
dependabot[bot]
1b46601ce8
Bump eslint-plugin-unicorn from 25.0.1 to 26.0.1 ()
* Bump eslint-plugin-unicorn from 25.0.1 to 26.0.1

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 25.0.1 to 26.0.1.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v25.0.1...v26.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Updates for `eslint-plugin-unicorn@26.0.1`

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
2021-01-14 00:29:26 +02:00