focus-trap-react 10.0.1 → 10.0.2
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 +6 -0
- package/dist/focus-trap-react.js +8 -3
- package/package.json +10 -10
- package/src/focus-trap-react.js +3 -0
package/CHANGELOG.md
CHANGED
package/dist/focus-trap-react.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
5
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
6
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
7
7
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
8
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11,7 +11,9 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
|
|
|
11
11
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12
12
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
13
13
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
16
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
15
17
|
var React = require('react');
|
|
16
18
|
var PropTypes = require('prop-types');
|
|
17
19
|
var _require = require('focus-trap'),
|
|
@@ -420,7 +422,10 @@ FocusTrap.propTypes = {
|
|
|
420
422
|
tabbableOptions: PropTypes.shape({
|
|
421
423
|
displayCheck: PropTypes.oneOf(['full', 'legacy-full', 'non-zero-area', 'none']),
|
|
422
424
|
getShadowRoot: PropTypes.oneOfType([PropTypes.bool, PropTypes.func])
|
|
423
|
-
})
|
|
425
|
+
}),
|
|
426
|
+
trapStack: PropTypes.array,
|
|
427
|
+
isKeyForward: PropTypes.func,
|
|
428
|
+
isKeyBackward: PropTypes.func
|
|
424
429
|
}),
|
|
425
430
|
containerElements: PropTypes.arrayOf(PropTypes.instanceOf(ElementType)),
|
|
426
431
|
// DOM element ONLY
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "focus-trap-react",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.2",
|
|
4
4
|
"description": "A React component that traps focus.",
|
|
5
5
|
"main": "dist/focus-trap-react.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"homepage": "https://github.com/focus-trap/focus-trap-react#readme",
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@babel/cli": "^7.19.3",
|
|
61
|
-
"@babel/core": "^7.20.
|
|
61
|
+
"@babel/core": "^7.20.5",
|
|
62
62
|
"@babel/eslint-parser": "^7.19.1",
|
|
63
63
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
64
64
|
"@babel/preset-env": "^7.20.2",
|
|
@@ -75,27 +75,27 @@
|
|
|
75
75
|
"babelify": "^10.0.0",
|
|
76
76
|
"browserify": "^17.0.0",
|
|
77
77
|
"budo": "^11.8.4",
|
|
78
|
-
"cypress": "^
|
|
78
|
+
"cypress": "^11.2.0",
|
|
79
79
|
"cypress-plugin-tab": "^1.0.5",
|
|
80
|
-
"eslint": "^8.
|
|
80
|
+
"eslint": "^8.28.0",
|
|
81
81
|
"eslint-config-prettier": "^8.5.0",
|
|
82
82
|
"eslint-plugin-cypress": "^2.12.1",
|
|
83
|
-
"eslint-plugin-jest": "^27.1.
|
|
84
|
-
"eslint-plugin-react": "^7.31.
|
|
83
|
+
"eslint-plugin-jest": "^27.1.6",
|
|
84
|
+
"eslint-plugin-react": "^7.31.11",
|
|
85
85
|
"jest": "^29.3.1",
|
|
86
86
|
"jest-environment-jsdom": "^29.3.1",
|
|
87
|
-
"jest-watch-typeahead": "^2.2.
|
|
87
|
+
"jest-watch-typeahead": "^2.2.1",
|
|
88
88
|
"onchange": "^7.1.0",
|
|
89
|
-
"prettier": "^2.
|
|
89
|
+
"prettier": "^2.8.0",
|
|
90
90
|
"prop-types": "^15.8.1",
|
|
91
91
|
"react": "^18.2.0",
|
|
92
92
|
"react-dom": "^18.2.0",
|
|
93
|
-
"regenerator-runtime": "^0.13.
|
|
93
|
+
"regenerator-runtime": "^0.13.11",
|
|
94
94
|
"start-server-and-test": "^1.14.0",
|
|
95
95
|
"typescript": "^4.9.3"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
|
-
"focus-trap": "^7.
|
|
98
|
+
"focus-trap": "^7.2.0",
|
|
99
99
|
"tabbable": "^6.0.1"
|
|
100
100
|
},
|
|
101
101
|
"peerDependencies": {
|
package/src/focus-trap-react.js
CHANGED
|
@@ -461,6 +461,9 @@ FocusTrap.propTypes = {
|
|
|
461
461
|
]),
|
|
462
462
|
getShadowRoot: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
|
|
463
463
|
}),
|
|
464
|
+
trapStack: PropTypes.array,
|
|
465
|
+
isKeyForward: PropTypes.func,
|
|
466
|
+
isKeyBackward: PropTypes.func,
|
|
464
467
|
}),
|
|
465
468
|
containerElements: PropTypes.arrayOf(PropTypes.instanceOf(ElementType)), // DOM element ONLY
|
|
466
469
|
children: PropTypes.oneOfType([
|