You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@reach/dialog

Package Overview
Dependencies
Maintainers
3
Versions
67
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.7.2 to 0.7.3

README.md

2

dist/dialog.cjs.development.js
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

@@ -6,0 +4,0 @@

@@ -1,2 +0,2 @@

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("tslib"),o=require("react"),n=e(o),t=e(require("@reach/portal")),a=require("@reach/utils"),i=e(require("react-focus-lock")),l=require("react-remove-scroll");require("prop-types");var u=o.forwardRef((function(e,i){var l=e.isOpen,u=void 0===l||l,c=r.__rest(e,["isOpen"]);return o.useEffect((function(){return a.checkStyles("dialog")}),[]),u?n.createElement(t,{"data-reach-dialog-wrapper":""},n.createElement(s,r.__assign({ref:i},c))):null}));u.displayName="DialogOverlay";var s=o.forwardRef((function(e,t){var u=e.allowPinchZoom,s=e.initialFocusRef,c=e.onClick,f=e.onDismiss,d=void 0===f?a.noop:f,p=e.onMouseDown,v=e.onKeyDown,m=r.__rest(e,["allowPinchZoom","initialFocusRef","onClick","onDismiss","onMouseDown","onKeyDown"]),g=o.useRef(null),y=o.useRef(null),w=a.useForkedRef(y,t),D=o.useCallback((function(){s&&s.current&&s.current.focus()}),[s]);return o.useEffect((function(){return y.current?(r=[],o=[],(e=y.current)?(Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(n){var t,a;if(n!==(null===(a=null===(t=e.parentNode)||void 0===t?void 0:t.parentNode)||void 0===a?void 0:a.parentNode)){var i=n.getAttribute("aria-hidden");null!==i&&"false"!==i||(r.push(i),o.push(n),n.setAttribute("aria-hidden","true"))}})),function(){o.forEach((function(e,o){var n=r[o];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}):a.noop):void 0;var e,r,o}),[]),n.createElement(i,{autoFocus:!0,returnFocus:!0,onActivation:D},n.createElement(l.RemoveScroll,{allowPinchZoom:u},n.createElement("div",r.__assign({},m,{ref:w,"data-reach-dialog-overlay":"",onClick:a.wrapEvent(c,(function(e){g.current===e.target&&(e.stopPropagation(),d(e))})),onKeyDown:a.wrapEvent(v,(function(e){"Escape"===e.key&&(e.stopPropagation(),d(e))})),onMouseDown:a.wrapEvent(p,(function(e){g.current=e.target}))}))))}));u.displayName="DialogOverlay";var c=o.forwardRef((function(e,o){var t=e.onClick,i=r.__rest(e,["onClick","onKeyDown"]);return n.createElement("div",r.__assign({},i,{ref:o,"data-reach-dialog-content":"","aria-modal":"true",onClick:a.wrapEvent(t,(function(e){e.stopPropagation()})),role:"dialog",tabIndex:-1}))}));c.displayName="DialogContent";var f=o.forwardRef((function(e,o){var t=e.isOpen,i=e.onDismiss,l=void 0===i?a.noop:i,s=e.initialFocusRef,f=r.__rest(e,["isOpen","onDismiss","initialFocusRef"]);return n.createElement(u,{initialFocusRef:s,isOpen:t,onDismiss:l},n.createElement(c,r.__assign({ref:o},f)))}));f.displayName="Dialog",exports.Dialog=f,exports.DialogContent=c,exports.DialogOverlay=u,exports.default=f;
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=require("tslib"),o=require("react"),n=e(o),t=e(require("@reach/portal")),a=require("@reach/utils"),i=e(require("react-focus-lock")),l=require("react-remove-scroll");require("prop-types");var u=o.forwardRef((function(e,i){var l=e.isOpen,u=void 0===l||l,c=r.__rest(e,["isOpen"]);return o.useEffect((function(){return a.checkStyles("dialog")}),[]),u?n.createElement(t,{"data-reach-dialog-wrapper":""},n.createElement(s,r.__assign({ref:i},c))):null}));u.displayName="DialogOverlay";var s=o.forwardRef((function(e,t){var u=e.allowPinchZoom,s=e.initialFocusRef,c=e.onClick,f=e.onDismiss,d=void 0===f?a.noop:f,p=e.onMouseDown,v=e.onKeyDown,m=r.__rest(e,["allowPinchZoom","initialFocusRef","onClick","onDismiss","onMouseDown","onKeyDown"]),g=o.useRef(null),y=o.useRef(null),w=a.useForkedRef(y,t),D=o.useCallback((function(){s&&s.current&&s.current.focus()}),[s]);return o.useEffect((function(){return y.current?(r=[],o=[],(e=y.current)?(Array.prototype.forEach.call(document.querySelectorAll("body > *"),(function(n){var t,a;if(n!==(null===(a=null===(t=e.parentNode)||void 0===t?void 0:t.parentNode)||void 0===a?void 0:a.parentNode)){var i=n.getAttribute("aria-hidden");null!==i&&"false"!==i||(r.push(i),o.push(n),n.setAttribute("aria-hidden","true"))}})),function(){o.forEach((function(e,o){var n=r[o];null===n?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n)}))}):a.noop):void 0;var e,r,o}),[]),n.createElement(i,{autoFocus:!0,returnFocus:!0,onActivation:D},n.createElement(l.RemoveScroll,{allowPinchZoom:u},n.createElement("div",r.__assign({},m,{ref:w,"data-reach-dialog-overlay":"",onClick:a.wrapEvent(c,(function(e){g.current===e.target&&(e.stopPropagation(),d(e))})),onKeyDown:a.wrapEvent(v,(function(e){"Escape"===e.key&&(e.stopPropagation(),d(e))})),onMouseDown:a.wrapEvent(p,(function(e){g.current=e.target}))}))))}));u.displayName="DialogOverlay";var c=o.forwardRef((function(e,o){var t=e.onClick,i=r.__rest(e,["onClick","onKeyDown"]);return n.createElement("div",r.__assign({},i,{ref:o,"data-reach-dialog-content":"","aria-modal":"true",onClick:a.wrapEvent(t,(function(e){e.stopPropagation()})),role:"dialog",tabIndex:-1}))}));c.displayName="DialogContent";var f=o.forwardRef((function(e,o){var t=e.isOpen,i=e.onDismiss,l=void 0===i?a.noop:i,s=e.initialFocusRef,f=r.__rest(e,["isOpen","onDismiss","initialFocusRef"]);return n.createElement(u,{initialFocusRef:s,isOpen:t,onDismiss:l},n.createElement(c,r.__assign({ref:o},f)))}));f.displayName="Dialog",exports.Dialog=f,exports.DialogContent=c,exports.DialogOverlay=u,exports.default=f;
//# sourceMappingURL=dialog.cjs.production.min.js.map
{
"name": "@reach/dialog",
"version": "0.7.2",
"version": "0.7.3",
"description": "Accessible React Modal Dialog.",

@@ -18,4 +18,4 @@ "author": "React Training <hello@reacttraining.com>",

"dependencies": {
"@reach/portal": "^0.7.2",
"@reach/utils": "^0.7.2",
"@reach/portal": "^0.7.3",
"@reach/utils": "^0.7.3",
"prop-types": "^15.7.2",

@@ -33,6 +33,7 @@ "react-focus-lock": "^2.2.1",

"files": [
"README.md",
"dist",
"styles.css"
],
"gitHead": "96cf6c191cca0f2cbcb7ff578f15e289efeda1e2"
"gitHead": "fe739beb1d94cc58c4e72f88ab58efa58e0de8c8"
}

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc