@reach/dialog
Advanced tools
Comparing version 0.6.3 to 0.6.4
@@ -7,11 +7,8 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
import Portal from "@reach/portal"; | ||
import { checkStyles, wrapEvent, useForkedRef } from "@reach/utils"; | ||
import { checkStyles, noop, useForkedRef, wrapEvent } from "@reach/utils"; | ||
import FocusLock from "react-focus-lock"; | ||
import { RemoveScroll } from "react-remove-scroll"; | ||
import PropTypes from "prop-types"; | ||
var noop = function noop() {}; //////////////////////////////////////////////////////////////////////////////// | ||
import PropTypes from "prop-types"; //////////////////////////////////////////////////////////////////////////////// | ||
// DialogOverlay | ||
export var DialogOverlay = forwardRef(function DialogOverlay(_ref, forwardedRef) { | ||
@@ -18,0 +15,0 @@ var _ref$isOpen = _ref.isOpen, |
10
index.js
@@ -28,6 +28,4 @@ "use strict"; | ||
var noop = function noop() {}; //////////////////////////////////////////////////////////////////////////////// | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// DialogOverlay | ||
var DialogOverlay = (0, _react.forwardRef)(function DialogOverlay(_ref, forwardedRef) { | ||
@@ -65,3 +63,3 @@ var _ref$isOpen = _ref.isOpen, | ||
_ref2$onDismiss = _ref2.onDismiss, | ||
onDismiss = _ref2$onDismiss === void 0 ? noop : _ref2$onDismiss, | ||
onDismiss = _ref2$onDismiss === void 0 ? _utils.noop : _ref2$onDismiss, | ||
onMouseDown = _ref2.onMouseDown, | ||
@@ -142,3 +140,3 @@ onKeyDown = _ref2.onKeyDown, | ||
_ref4$onDismiss = _ref4.onDismiss, | ||
onDismiss = _ref4$onDismiss === void 0 ? noop : _ref4$onDismiss, | ||
onDismiss = _ref4$onDismiss === void 0 ? _utils.noop : _ref4$onDismiss, | ||
initialFocusRef = _ref4.initialFocusRef, | ||
@@ -182,3 +180,3 @@ props = _objectWithoutPropertiesLoose(_ref4, ["isOpen", "onDismiss", "initialFocusRef"]); | ||
return noop; | ||
return _utils.noop; | ||
} | ||
@@ -185,0 +183,0 @@ |
{ | ||
"name": "@reach/dialog", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"description": "Accessible React Modal Dialog.", | ||
@@ -14,3 +14,3 @@ "author": "React Training <hello@reacttraining.com>", | ||
"@reach/portal": "^0.6.2", | ||
"@reach/utils": "^0.6.1", | ||
"@reach/utils": "^0.6.4", | ||
"prop-types": "^15.7.2", | ||
@@ -32,3 +32,3 @@ "react-focus-lock": "^2.2.1", | ||
], | ||
"gitHead": "89c011be8fff3828f61fe2f26c5bfb2bf17106d6" | ||
"gitHead": "c20cdf7f2dd6b9eabe5461138daf320e2833aa41" | ||
} |
import React, { forwardRef, useCallback, useEffect, useRef } from "react"; | ||
import Portal from "@reach/portal"; | ||
import { checkStyles, wrapEvent, useForkedRef } from "@reach/utils"; | ||
import { checkStyles, noop, useForkedRef, wrapEvent } from "@reach/utils"; | ||
import FocusLock from "react-focus-lock"; | ||
@@ -8,4 +8,2 @@ import { RemoveScroll } from "react-remove-scroll"; | ||
const noop = () => {}; | ||
//////////////////////////////////////////////////////////////////////////////// | ||
@@ -12,0 +10,0 @@ // DialogOverlay |
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
29666
700
Updated@reach/utils@^0.6.4