Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chakra-ui/focus-lock

Package Overview
Dependencies
Maintainers
4
Versions
258
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/focus-lock - npm Package Compare versions

Comparing version 1.0.0-next.4 to 1.0.0-next.5

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

# [1.0.0-next.5](https://github.com/chakra-ui/chakra-ui/compare/@chakra-ui/focus-lock@1.0.0-next.4...@chakra-ui/focus-lock@1.0.0-next.5) (2020-07-15)
### Features
- add transition for modal
([dda931b](https://github.com/chakra-ui/chakra-ui/commit/dda931bea7444c3f83392eebf1c34dd571a0dbbc))
# Change Log
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.4 (2020-07-01)

@@ -8,0 +20,0 @@

7

dist/cjs/index.js

@@ -32,4 +32,4 @@ "use strict";

isDisabled = props.isDisabled,
_props$autoFocus = props.autoFocus,
autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus;
autoFocus = props.autoFocus,
persistentFocus = props.persistentFocus;
var onActivation = React.useCallback(function () {

@@ -43,3 +43,3 @@ if (initialFocusRef == null ? void 0 : initialFocusRef.current) {

if (focusables.length === 0) {
contentRef.current.focus();
(0, _utils.focus)(contentRef.current);
}

@@ -56,2 +56,3 @@ }

return /*#__PURE__*/React.createElement(_reactFocusLock["default"], {
persistentFocus: persistentFocus,
autoFocus: autoFocus,

@@ -58,0 +59,0 @@ disabled: isDisabled,

import * as React from "react";
import ReactFocusLock from "react-focus-lock";
import { __DEV__, getAllFocusable } from "@chakra-ui/utils";
import { __DEV__, getAllFocusable, focus } from "@chakra-ui/utils";

@@ -19,3 +19,4 @@ /**

isDisabled,
autoFocus = true
autoFocus,
persistentFocus
} = props;

@@ -30,3 +31,3 @@ var onActivation = React.useCallback(() => {

if (focusables.length === 0) {
contentRef.current.focus();
focus(contentRef.current);
}

@@ -43,2 +44,3 @@ }

return /*#__PURE__*/React.createElement(ReactFocusLock, {
persistentFocus: persistentFocus,
autoFocus: autoFocus,

@@ -45,0 +47,0 @@ disabled: isDisabled,

@@ -34,2 +34,7 @@ import * as React from "react";

autoFocus?: boolean;
/**
* If `true`, disables text selections inside, and outside focus lock.
* @default `false`
*/
persistentFocus?: boolean;
}

@@ -36,0 +41,0 @@ /**

{
"name": "@chakra-ui/focus-lock",
"version": "1.0.0-next.4",
"version": "1.0.0-next.5",
"description": "React focus lock for all Chakra components",

@@ -49,3 +49,3 @@ "keywords": [

"dependencies": {
"@chakra-ui/utils": "^1.0.0-next.4",
"@chakra-ui/utils": "^1.0.0-next.5",
"react-focus-lock": "2.3.1"

@@ -56,3 +56,3 @@ },

},
"gitHead": "cdd5eac1db90ba33a07c009fb8dbcc4453d6ec01"
"gitHead": "24eec5d796d81b6fafbcfa7231fb2cb15e6d5a29"
}

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc