@paprika/takeover 2.0.0 → 2.0.2-next.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,30 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.2-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [7fbad8a]
8
+ - @paprika/helpers@2.4.1-next.0
9
+ - @paprika/button@1.1.15-next.0
10
+ - @paprika/overlay@1.0.18-next.0
11
+
12
+ ## 2.0.1
13
+
14
+ ### Patch Changes
15
+
16
+ - fd0f43a: Allow pendo elements to steal focus from react-focus-lock.
17
+ - Updated dependencies [fd0f43a]
18
+ - @paprika/overlay@1.0.17
19
+
20
+ ## 2.0.1-next.0
21
+
22
+ ### Patch Changes
23
+
24
+ - fd0f43a: Allow pendo elements to steal focus from react-focus-lock.
25
+ - Updated dependencies [fd0f43a]
26
+ - @paprika/overlay@1.0.17-next.0
27
+
3
28
  ## 2.0.0
4
29
 
5
30
  ### Patch Changes
@@ -10,6 +10,8 @@ _Object$defineProperty(exports, "__esModule", {
10
10
 
11
11
  exports["default"] = void 0;
12
12
 
13
+ var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/extends"));
14
+
13
15
  var _react = _interopRequireDefault(require("react"));
14
16
 
15
17
  var _reactFocusLock = _interopRequireDefault(require("react-focus-lock"));
@@ -22,7 +24,13 @@ var defaultProps = {
22
24
  };
23
25
 
24
26
  var FocusLock = function FocusLock(props) {
25
- return /*#__PURE__*/_react["default"].createElement(_reactFocusLock["default"], props);
27
+ var whiteList = _react["default"].useMemo(function () {
28
+ return (0, _helpers.focusLockWhiteList)(props.whiteList);
29
+ }, [props.whiteList]);
30
+
31
+ return /*#__PURE__*/_react["default"].createElement(_reactFocusLock["default"], (0, _extends2["default"])({
32
+ whiteList: whiteList
33
+ }, props));
26
34
  };
27
35
 
28
36
  FocusLock.propTypes = propTypes;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/FocusLock/FocusLock.js"],"names":["propTypes","FocusPropTypes","defaultProps","returnFocus","FocusLock","props","displayName"],"mappings":";;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA,IAAMA,SAAS,GAAGC,uBAAlB;AAEA,IAAMC,YAAY,GAAG;AACnBC,EAAAA,WAAW,EAAE;AADM,CAArB;;AAIA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAAAC,KAAK;AAAA,sBAAI,gCAAC,0BAAD,EAAsBA,KAAtB,CAAJ;AAAA,CAAvB;;AAEAD,SAAS,CAACJ,SAAV,GAAsBA,SAAtB;AACAI,SAAS,CAACF,YAAV,GAAyBA,YAAzB;AACAE,SAAS,CAACE,WAAV,GAAwB,oBAAxB;eAEeF,S","sourcesContent":["import React from \"react\";\nimport FocusLockLibrary from \"react-focus-lock\";\nimport { FocusPropTypes } from \"@paprika/helpers\";\n\nconst propTypes = FocusPropTypes;\n\nconst defaultProps = {\n returnFocus: true,\n};\n\nconst FocusLock = props => <FocusLockLibrary {...props} />;\n\nFocusLock.propTypes = propTypes;\nFocusLock.defaultProps = defaultProps;\nFocusLock.displayName = \"Takeover.FocusLock\";\n\nexport default FocusLock;\n"],"file":"FocusLock.js"}
1
+ {"version":3,"sources":["../../../src/components/FocusLock/FocusLock.js"],"names":["propTypes","FocusPropTypes","defaultProps","returnFocus","FocusLock","props","whiteList","React","useMemo","displayName"],"mappings":";;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA,IAAMA,SAAS,GAAGC,uBAAlB;AAEA,IAAMC,YAAY,GAAG;AACnBC,EAAAA,WAAW,EAAE;AADM,CAArB;;AAIA,IAAMC,SAAS,GAAG,SAAZA,SAAY,CAAAC,KAAK,EAAI;AACzB,MAAMC,SAAS,GAAGC,kBAAMC,OAAN,CAAc;AAAA,WAAM,iCAAmBH,KAAK,CAACC,SAAzB,CAAN;AAAA,GAAd,EAAyD,CAACD,KAAK,CAACC,SAAP,CAAzD,CAAlB;;AAEA,sBAAO,gCAAC,0BAAD;AAAkB,IAAA,SAAS,EAAEA;AAA7B,KAA4CD,KAA5C,EAAP;AACD,CAJD;;AAMAD,SAAS,CAACJ,SAAV,GAAsBA,SAAtB;AACAI,SAAS,CAACF,YAAV,GAAyBA,YAAzB;AACAE,SAAS,CAACK,WAAV,GAAwB,oBAAxB;eAEeL,S","sourcesContent":["import React from \"react\";\nimport FocusLockLibrary from \"react-focus-lock\";\nimport { FocusPropTypes, focusLockWhiteList } from \"@paprika/helpers\";\n\nconst propTypes = FocusPropTypes;\n\nconst defaultProps = {\n returnFocus: true,\n};\n\nconst FocusLock = props => {\n const whiteList = React.useMemo(() => focusLockWhiteList(props.whiteList), [props.whiteList]);\n\n return <FocusLockLibrary whiteList={whiteList} {...props} />;\n};\n\nFocusLock.propTypes = propTypes;\nFocusLock.defaultProps = defaultProps;\nFocusLock.displayName = \"Takeover.FocusLock\";\n\nexport default FocusLock;\n"],"file":"FocusLock.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paprika/takeover",
3
- "version": "2.0.0",
3
+ "version": "2.0.2-next.0",
4
4
  "description": "The Takeover component can toggle a full-screen view to help the user focus on complex UI tasks.",
5
5
  "author": "@paprika",
6
6
  "main": "lib/index.js",
@@ -16,11 +16,11 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@babel/runtime-corejs2": "^7.3.1",
19
- "@paprika/button": "^1.1.14",
19
+ "@paprika/button": "^1.1.15-next.0",
20
20
  "@paprika/constants": "^1.0.0",
21
21
  "@paprika/heading": "^1.0.15",
22
- "@paprika/helpers": "^2.4.0",
23
- "@paprika/overlay": "^1.0.16",
22
+ "@paprika/helpers": "^2.4.1-next.0",
23
+ "@paprika/overlay": "^1.0.18-next.0",
24
24
  "@paprika/stylers": "^1.1.7",
25
25
  "@paprika/tokens": "^2.0.0",
26
26
  "prop-types": "^15.7.2",