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

@interop-ui/react-lock

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@interop-ui/react-lock - npm Package Compare versions

Comparing version 0.0.1-3 to 0.0.1-4

24

dist/index.d.ts
import * as React from "react";
type FocusableTarget = HTMLElement | {
focus(): void;
};
export type LockProps = {
children: React.ReactNode | ((ref: React.RefObject<HTMLElement | undefined>) => React.ReactNode);
children: React.ReactNode;
/**
* Whether the Lock is currently active
* (defaut: false)
*/
isActive?: boolean;
/**
* A function called when the Lock is deactivated from the inside (escape / outslide click)
*/
onDeactivate?(): void;
onDeactivate?: () => void;
/**

@@ -18,3 +16,3 @@ * A ref to an element to focus on inside the Lock after it is activated.

*/
refToFocusOnActivation?: React.RefObject<HTMLElement | null | undefined>;
refToFocusOnActivation?: React.RefObject<FocusableTarget | null | undefined>;
/**

@@ -25,3 +23,3 @@ * A ref to an element to focus on outside the Lock after it is deactivated.

*/
refToFocusOnDeactivation?: React.RefObject<HTMLElement | null | undefined>;
refToFocusOnDeactivation?: React.RefObject<FocusableTarget | null | undefined>;
/** Whether pressing the escape key should deactivate the Lock */

@@ -31,10 +29,10 @@ shouldDeactivateOnEscape?: boolean;

shouldDeactivateOnOutsideClick?: boolean | ((event: MouseEvent | TouchEvent) => boolean);
/** Whether pointer events happening outside the locked container should be blocked */
shouldBlockOutsideClick: boolean;
/** Whether pointer events happening outside the locked container should be prevented */
shouldPreventOutsideClick?: boolean;
};
export function Lock({ children, isActive, onDeactivate, refToFocusOnActivation, refToFocusOnDeactivation, shouldDeactivateOnEscape, shouldDeactivateOnOutsideClick, shouldBlockOutsideClick, }: LockProps): JSX.Element;
export function Lock({ children, ...props }: LockProps): JSX.Element | null;
export function useLockContext(): {
lockContainerRef: React.RefObject<HTMLElement | null>;
lockContainerRef: React.RefObject<HTMLElement>;
};
//# sourceMappingURL=index.d.ts.map
{
"name": "@interop-ui/react-lock",
"version": "0.0.1-3",
"version": "0.0.1-4",
"license": "MIT",

@@ -14,12 +14,12 @@ "source": "src/index.ts",

"scripts": {
"build": "parcel build src/index.ts",
"build": "parcel build src/index.ts --no-cache",
"clean": "rm -rf dist",
"bump": "yarn version --deferred",
"version": "yarn version",
"prepublish": "yarn clean && yarn build"
},
"dependencies": {
"@interop-ui/react-debug-context": "0.0.1-3",
"@interop-ui/react-utils": "0.0.1-3",
"@interop-ui/tabbable": "0.0.1-2",
"@interop-ui/utils": "0.0.1-2",
"@interop-ui/react-debug-context": "0.0.1-4",
"@interop-ui/react-utils": "0.0.1-4",
"@interop-ui/tabbable": "0.0.1-3",
"@interop-ui/utils": "0.0.1-3",
"aria-hidden": "^1.1.1"

@@ -26,0 +26,0 @@ },

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