diff --git a/.changeset/gentle-poems-matter.md b/.changeset/gentle-poems-matter.md new file mode 100644 index 00000000..00202254 --- /dev/null +++ b/.changeset/gentle-poems-matter.md @@ -0,0 +1,5 @@ +--- +'focus-trap-react': patch +--- + +Bump focus-trap to v7.4.0 for new onPost/Pause and onPost/Unpause hooks via existing `focusTrapOptions` prop. ([#948](https://github.com/focus-trap/focus-trap-react/issues/948)) diff --git a/package.json b/package.json index b3510c4e..82ebd33d 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "typescript": "^4.9.5" }, "dependencies": { - "focus-trap": "^7.3.1", + "focus-trap": "^7.4.0", "tabbable": "^6.1.1" }, "peerDependencies": { diff --git a/src/focus-trap-react.js b/src/focus-trap-react.js index 47b9ace1..c11345ce 100644 --- a/src/focus-trap-react.js +++ b/src/focus-trap-react.js @@ -423,6 +423,10 @@ FocusTrap.propTypes = { onActivate: PropTypes.func, onPostActivate: PropTypes.func, checkCanFocusTrap: PropTypes.func, + onPause: PropTypes.func, + onPostPause: PropTypes.func, + onUnpause: PropTypes.func, + onPostUnpause: PropTypes.func, onDeactivate: PropTypes.func, onPostDeactivate: PropTypes.func, checkCanReturnFocus: PropTypes.func, diff --git a/yarn.lock b/yarn.lock index 17bf4103..c47ebae9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4328,10 +4328,10 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.0.tgz#a5d06b4a8b01e3a63771daa5cb7a1903e2e57067" integrity sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA== -focus-trap@^7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/focus-trap/-/focus-trap-7.3.1.tgz#417c98e5f1ab94e717d31f1bafa2da45dabcd65f" - integrity sha512-bX/u4FJ+F0Pp6b/8Q9W8Br/JaLJ7rrhOJAzai9JU8bh4BPdOjEATy4pxHcbBBxFjPN4d1oHy7/KqknEdOetm9w== +focus-trap@^7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/focus-trap/-/focus-trap-7.4.0.tgz#20f760a497f593b01d2e446168009c1f12ab0385" + integrity sha512-yI7FwUqU4TVb+7t6PaQ3spT/42r/KLEi8mtdGoQo2li/kFzmu9URmalTvw7xCCJtSOyhBxscvEAmvjeN9iHARg== dependencies: tabbable "^6.1.1"