@chakra-ui/focus-lock
Advanced tools
Comparing version 1.0.0-next.2 to 1.0.0-next.3
# Change Log | ||
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
All notable changes to this project will be documented in this file. See | ||
[Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
# 1.0.0-next.2 (2020-06-22) | ||
# 1.0.0-next.3 (2020-06-28) | ||
### Bug Fixes | ||
* [#891](https://github.com/chakra-ui/chakra-ui/issues/891) ([e107acc](https://github.com/chakra-ui/chakra-ui/commit/e107acc8487898a965b0d695c1da71f46fc56d5e)) | ||
* ts issue with sx prop ([d3b1340](https://github.com/chakra-ui/chakra-ui/commit/d3b1340cb255937927b4d4c56ce218141570b951)) | ||
- [#891](https://github.com/chakra-ui/chakra-ui/issues/891) | ||
([e107acc](https://github.com/chakra-ui/chakra-ui/commit/e107acc8487898a965b0d695c1da71f46fc56d5e)) | ||
- ts issue with sx prop | ||
([d3b1340](https://github.com/chakra-ui/chakra-ui/commit/d3b1340cb255937927b4d4c56ce218141570b951)) | ||
# Change Log | ||
@@ -23,3 +20,3 @@ | ||
# 1.0.0-next.1 (2020-06-21) | ||
# 1.0.0-next.2 (2020-06-21) | ||
@@ -26,0 +23,0 @@ ### Bug Fixes |
@@ -11,2 +11,4 @@ "use strict"; | ||
var _utils = require("@chakra-ui/utils"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
@@ -37,5 +39,9 @@ | ||
} else { | ||
var _contentRef$current; | ||
if (contentRef == null ? void 0 : contentRef.current) { | ||
var focusables = (0, _utils.getAllFocusable)(contentRef.current); | ||
contentRef == null ? void 0 : (_contentRef$current = contentRef.current) == null ? void 0 : _contentRef$current.focus(); | ||
if (focusables.length === 0) { | ||
contentRef.current.focus(); | ||
} | ||
} | ||
} | ||
@@ -58,4 +64,8 @@ }, [initialFocusRef, contentRef]); | ||
if (_utils.__DEV__) { | ||
FocusLock.displayName = "FocusLock"; | ||
} | ||
var _default = FocusLock; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=index.js.map |
import * as React from "react"; | ||
import ReactFocusLock from "react-focus-lock"; | ||
import { __DEV__, getAllFocusable } from "@chakra-ui/utils"; | ||
@@ -24,5 +25,9 @@ /** | ||
} else { | ||
var _contentRef$current; | ||
if (contentRef == null ? void 0 : contentRef.current) { | ||
var focusables = getAllFocusable(contentRef.current); | ||
contentRef == null ? void 0 : (_contentRef$current = contentRef.current) == null ? void 0 : _contentRef$current.focus(); | ||
if (focusables.length === 0) { | ||
contentRef.current.focus(); | ||
} | ||
} | ||
} | ||
@@ -44,3 +49,8 @@ }, [initialFocusRef, contentRef]); | ||
} | ||
if (__DEV__) { | ||
FocusLock.displayName = "FocusLock"; | ||
} | ||
export default FocusLock; | ||
//# sourceMappingURL=index.js.map |
@@ -42,3 +42,6 @@ import * as React from "react"; | ||
export declare function FocusLock(props: FocusLockProps): JSX.Element; | ||
export declare namespace FocusLock { | ||
var displayName: string; | ||
} | ||
export default FocusLock; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "@chakra-ui/focus-lock", | ||
"version": "1.0.0-next.2", | ||
"version": "1.0.0-next.3", | ||
"description": "React focus lock for all Chakra components", | ||
@@ -12,2 +12,3 @@ "keywords": [ | ||
], | ||
"sideEffects": false, | ||
"author": "Segun Adebayo <sage@adebayosegun.com>", | ||
@@ -21,3 +22,4 @@ "homepage": "https://github.com/chakra-ui/chakra-ui#readme", | ||
"files": [ | ||
"dist" | ||
"dist", | ||
"src" | ||
], | ||
@@ -49,2 +51,3 @@ "publishConfig": { | ||
"dependencies": { | ||
"@chakra-ui/utils": "^1.0.0-next.3", | ||
"react-focus-lock": "2.3.1" | ||
@@ -55,3 +58,3 @@ }, | ||
}, | ||
"gitHead": "c5b51e43e9dff400f8bba7da7ffd135f5d33628b" | ||
"gitHead": "d31ba9c35993985f49da4885dd47ab8dab49cdd1" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20434
11
234
3
+ Added@chakra-ui/utils@1.10.4(transitive)
+ Added@types/lodash@4.17.7(transitive)
+ Added@types/lodash.mergewith@4.6.6(transitive)
+ Addedcss-box-model@1.2.1(transitive)
+ Addedframesync@5.3.0(transitive)
+ Addedlodash.mergewith@4.6.2(transitive)
+ Addedtiny-invariant@1.3.3(transitive)