New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pluralsight/react-utils

Package Overview
Dependencies
Maintainers
1
Versions
1213
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pluralsight/react-utils - npm Package Compare versions

Comparing version 0.1.0-experimental-176dbe-20220831 to 0.1.0-experimental-287fdc-20220906

9

build/hooks/useFocusTrap.js

@@ -9,4 +9,3 @@ "use strict";

const getFocusItems = (0, react_1.useCallback)(() => {
var _a, _b;
const focusableItems = (_b = (_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll(selectorList)) !== null && _b !== void 0 ? _b : [];
const focusableItems = modalRef.current?.querySelectorAll(selectorList) ?? [];
return {

@@ -35,3 +34,3 @@ firstItem: focusableItems[0],

}
}, [getFocusItems, modalRef]);
}, [getFocusItems]);
const handleInitFocusTrap = (0, react_1.useCallback)(() => {

@@ -47,6 +46,6 @@ document.body.setAttribute('data-modal-open', 'true');

(0, react_1.useEffect)(() => {
const trigger = triggerRef.current;
return () => {
var _a;
document.body.removeAttribute('data-modal-open');
(_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
trigger?.focus();
};

@@ -53,0 +52,0 @@ }, [triggerRef]);

{
"name": "@pluralsight/react-utils",
"version": "0.1.0-experimental-176dbe-20220831",
"version": "0.1.0-experimental-287fdc-20220906",
"description": "A set of React custom hooks for Pluralsight.",

@@ -5,0 +5,0 @@ "main": "build/index.js",

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