focus-trap-react 8.6.0 → 8.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 8.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 7fbe8ca: Update to support new features in `focus-trap@6.6.0` including `initialFocus` which can now be false to prevent initial focus, and `escapeDeactivates` which can now alternately be a function that returns a boolean instead of a straight boolean.
8
+
3
9
  ## 8.6.0
4
10
 
5
11
  ### Minor Changes
@@ -289,9 +289,9 @@ FocusTrap.propTypes = {
289
289
  onDeactivate: PropTypes.func,
290
290
  onPostDeactivate: PropTypes.func,
291
291
  checkCanReturnFocus: PropTypes.func,
292
- initialFocus: PropTypes.oneOfType([PropTypes.instanceOf(ElementType), PropTypes.string, PropTypes.func]),
292
+ initialFocus: PropTypes.oneOfType([PropTypes.instanceOf(ElementType), PropTypes.string, PropTypes.func, PropTypes.bool]),
293
293
  fallbackFocus: PropTypes.oneOfType([PropTypes.instanceOf(ElementType), PropTypes.string, PropTypes.func]),
294
- escapeDeactivates: PropTypes.bool,
294
+ escapeDeactivates: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
295
295
  clickOutsideDeactivates: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
296
296
  returnFocusOnDeactivate: PropTypes.bool,
297
297
  setReturnFocus: PropTypes.oneOfType([PropTypes.instanceOf(ElementType), PropTypes.string, PropTypes.func]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "focus-trap-react",
3
- "version": "8.6.0",
3
+ "version": "8.7.0",
4
4
  "description": "A React component that traps focus.",
5
5
  "main": "dist/focus-trap-react.js",
6
6
  "types": "index.d.ts",
@@ -58,40 +58,40 @@
58
58
  "@babel/cli": "^7.14.5",
59
59
  "@babel/core": "^7.14.6",
60
60
  "@babel/plugin-proposal-class-properties": "^7.12.13",
61
- "@babel/preset-env": "^7.14.5",
61
+ "@babel/preset-env": "^7.14.7",
62
62
  "@babel/preset-react": "^7.14.5",
63
63
  "@changesets/cli": "^2.16.0",
64
64
  "@testing-library/cypress": "^7.0.6",
65
- "@testing-library/dom": "^7.31.2",
65
+ "@testing-library/dom": "^8.0.0",
66
66
  "@testing-library/jest-dom": "^5.14.1",
67
- "@testing-library/react": "^11.2.7",
67
+ "@testing-library/react": "^12.0.0",
68
68
  "@testing-library/user-event": "^13.1.9",
69
69
  "@types/jquery": "^3.5.5",
70
70
  "all-contributors-cli": "^6.20.0",
71
71
  "babel-eslint": "^10.1.0",
72
- "babel-jest": "^27.0.2",
72
+ "babel-jest": "^27.0.6",
73
73
  "babelify": "^10.0.0",
74
74
  "browserify": "^17.0.0",
75
75
  "budo": "^11.6.4",
76
- "cypress": "^7.5.0",
76
+ "cypress": "^7.6.0",
77
77
  "cypress-plugin-tab": "^1.0.5",
78
- "eslint": "^7.28.0",
78
+ "eslint": "^7.29.0",
79
79
  "eslint-config-prettier": "^8.3.0",
80
80
  "eslint-plugin-cypress": "^2.11.3",
81
81
  "eslint-plugin-react": "^7.24.0",
82
- "jest": "^27.0.4",
82
+ "jest": "^27.0.6",
83
83
  "jest-watch-typeahead": "^0.6.4",
84
84
  "onchange": "^7.1.0",
85
- "prettier": "^2.3.1",
85
+ "prettier": "^2.3.2",
86
86
  "prop-types": "^15.7.2",
87
87
  "react": "^17.0.2",
88
88
  "react-dom": "^17.0.2",
89
89
  "regenerator-runtime": "^0.13.7",
90
90
  "start-server-and-test": "^1.12.5",
91
- "typescript": "^4.3.2"
91
+ "typescript": "^4.3.4"
92
92
  },
93
93
  "dependencies": {
94
- "focus-trap": "^6.5.1"
94
+ "focus-trap": "^6.6.0"
95
95
  },
96
96
  "peerDependencies": {
97
97
  "prop-types": "^15.7.2",
@@ -251,13 +251,14 @@ FocusTrap.propTypes = {
251
251
  PropTypes.instanceOf(ElementType),
252
252
  PropTypes.string,
253
253
  PropTypes.func,
254
+ PropTypes.bool,
254
255
  ]),
255
256
  fallbackFocus: PropTypes.oneOfType([
256
257
  PropTypes.instanceOf(ElementType),
257
258
  PropTypes.string,
258
259
  PropTypes.func,
259
260
  ]),
260
- escapeDeactivates: PropTypes.bool,
261
+ escapeDeactivates: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
261
262
  clickOutsideDeactivates: PropTypes.oneOfType([
262
263
  PropTypes.bool,
263
264
  PropTypes.func,