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

@reach/alert-dialog

Package Overview
Dependencies
Maintainers
4
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reach/alert-dialog - npm Package Compare versions

Comparing version 0.16.2 to 0.17.0

36

dist/reach-alert-dialog.cjs.dev.js

@@ -58,4 +58,7 @@ 'use strict';

_excluded5 = ["id", "isOpen", "onDismiss", "leastDestructiveRef"];
var AlertDialogContext = /*#__PURE__*/context.createNamedContext("AlertDialogContext", {}); ////////////////////////////////////////////////////////////////////////////////
var _createContext = /*#__PURE__*/context.createContext("AlertDialog"),
AlertDialogProvider = _createContext[0],
useAlertDialogCtx = _createContext[1]; ////////////////////////////////////////////////////////////////////////////////
/**

@@ -73,2 +76,3 @@ * AlertDialogOverlay

var AlertDialogOverlay = /*#__PURE__*/React.forwardRef(function AlertDialogOverlay(_ref, forwardedRef) {

@@ -83,9 +87,7 @@ var leastDestructiveRef = _ref.leastDestructiveRef,

var descriptionId = id ? makeId.makeId("alert-dialog-description", id) : undefined;
return /*#__PURE__*/React.createElement(AlertDialogContext.Provider, {
value: {
labelId: labelId,
descriptionId: descriptionId,
overlayRef: ownRef,
leastDestructiveRef: leastDestructiveRef
}
return /*#__PURE__*/React.createElement(AlertDialogProvider, {
labelId: labelId,
descriptionId: descriptionId,
overlayRef: ownRef,
leastDestructiveRef: leastDestructiveRef
}, /*#__PURE__*/React.createElement(dialog.DialogOverlay, _extends({}, props, {

@@ -130,7 +132,7 @@ ref: ref,

var _React$useContext = React.useContext(AlertDialogContext),
descriptionId = _React$useContext.descriptionId,
labelId = _React$useContext.labelId,
leastDestructiveRef = _React$useContext.leastDestructiveRef,
overlayRef = _React$useContext.overlayRef;
var _useAlertDialogCtx = useAlertDialogCtx("AlertDialogContent"),
descriptionId = _useAlertDialogCtx.descriptionId,
labelId = _useAlertDialogCtx.labelId,
leastDestructiveRef = _useAlertDialogCtx.leastDestructiveRef,
overlayRef = _useAlertDialogCtx.overlayRef;

@@ -199,4 +201,4 @@ React.useEffect(function () {

var _React$useContext2 = React.useContext(AlertDialogContext),
labelId = _React$useContext2.labelId;
var _useAlertDialogCtx2 = useAlertDialogCtx("AlertDialogLabel"),
labelId = _useAlertDialogCtx2.labelId;

@@ -231,4 +233,4 @@ return /*#__PURE__*/React.createElement(Comp, _extends({}, props, {

var _React$useContext3 = React.useContext(AlertDialogContext),
descriptionId = _React$useContext3.descriptionId;
var _useAlertDialogCtx3 = useAlertDialogCtx("AlertDialogDescription"),
descriptionId = _useAlertDialogCtx3.descriptionId;

@@ -235,0 +237,0 @@ return /*#__PURE__*/React.createElement(Comp, _extends({}, props, {

@@ -57,4 +57,7 @@ 'use strict';

_excluded5 = ["id", "isOpen", "onDismiss", "leastDestructiveRef"];
var AlertDialogContext = /*#__PURE__*/context.createNamedContext("AlertDialogContext", {}); ////////////////////////////////////////////////////////////////////////////////
var _createContext = /*#__PURE__*/context.createContext("AlertDialog"),
AlertDialogProvider = _createContext[0],
useAlertDialogCtx = _createContext[1]; ////////////////////////////////////////////////////////////////////////////////
/**

@@ -72,2 +75,3 @@ * AlertDialogOverlay

var AlertDialogOverlay = /*#__PURE__*/React.forwardRef(function AlertDialogOverlay(_ref, forwardedRef) {

@@ -82,9 +86,7 @@ var leastDestructiveRef = _ref.leastDestructiveRef,

var descriptionId = id ? makeId.makeId("alert-dialog-description", id) : undefined;
return /*#__PURE__*/React.createElement(AlertDialogContext.Provider, {
value: {
labelId: labelId,
descriptionId: descriptionId,
overlayRef: ownRef,
leastDestructiveRef: leastDestructiveRef
}
return /*#__PURE__*/React.createElement(AlertDialogProvider, {
labelId: labelId,
descriptionId: descriptionId,
overlayRef: ownRef,
leastDestructiveRef: leastDestructiveRef
}, /*#__PURE__*/React.createElement(dialog.DialogOverlay, _extends({}, props, {

@@ -117,7 +119,7 @@ ref: ref,

var _React$useContext = React.useContext(AlertDialogContext),
descriptionId = _React$useContext.descriptionId,
labelId = _React$useContext.labelId,
leastDestructiveRef = _React$useContext.leastDestructiveRef,
overlayRef = _React$useContext.overlayRef;
var _useAlertDialogCtx = useAlertDialogCtx("AlertDialogContent"),
descriptionId = _useAlertDialogCtx.descriptionId,
labelId = _useAlertDialogCtx.labelId,
leastDestructiveRef = _useAlertDialogCtx.leastDestructiveRef,
overlayRef = _useAlertDialogCtx.overlayRef;

@@ -176,4 +178,4 @@ React.useEffect(function () {

var _React$useContext2 = React.useContext(AlertDialogContext),
labelId = _React$useContext2.labelId;
var _useAlertDialogCtx2 = useAlertDialogCtx("AlertDialogLabel"),
labelId = _useAlertDialogCtx2.labelId;

@@ -204,4 +206,4 @@ return /*#__PURE__*/React.createElement(Comp, _extends({}, props, {

var _React$useContext3 = React.useContext(AlertDialogContext),
descriptionId = _React$useContext3.descriptionId;
var _useAlertDialogCtx3 = useAlertDialogCtx("AlertDialogDescription"),
descriptionId = _useAlertDialogCtx3.descriptionId;

@@ -208,0 +210,0 @@ return /*#__PURE__*/React.createElement(Comp, _extends({}, props, {

@@ -1,6 +0,6 @@

import { forwardRef, useRef, createElement, useContext, useEffect } from 'react';
import { forwardRef, useRef, createElement, useEffect } from 'react';
import { DialogOverlay, DialogContent } from '@reach/dialog';
import { useId } from '@reach/auto-id';
import { getOwnerDocument } from '@reach/utils/owner-document';
import { createNamedContext } from '@reach/utils/context';
import { createContext } from '@reach/utils/context';
import { makeId } from '@reach/utils/make-id';

@@ -49,4 +49,7 @@ import { useComposedRefs } from '@reach/utils/compose-refs';

_excluded5 = ["id", "isOpen", "onDismiss", "leastDestructiveRef"];
var AlertDialogContext = /*#__PURE__*/createNamedContext("AlertDialogContext", {}); ////////////////////////////////////////////////////////////////////////////////
var _createContext = /*#__PURE__*/createContext("AlertDialog"),
AlertDialogProvider = _createContext[0],
useAlertDialogCtx = _createContext[1]; ////////////////////////////////////////////////////////////////////////////////
/**

@@ -64,2 +67,3 @@ * AlertDialogOverlay

var AlertDialogOverlay = /*#__PURE__*/forwardRef(function AlertDialogOverlay(_ref, forwardedRef) {

@@ -74,9 +78,7 @@ var leastDestructiveRef = _ref.leastDestructiveRef,

var descriptionId = id ? makeId("alert-dialog-description", id) : undefined;
return /*#__PURE__*/createElement(AlertDialogContext.Provider, {
value: {
labelId: labelId,
descriptionId: descriptionId,
overlayRef: ownRef,
leastDestructiveRef: leastDestructiveRef
}
return /*#__PURE__*/createElement(AlertDialogProvider, {
labelId: labelId,
descriptionId: descriptionId,
overlayRef: ownRef,
leastDestructiveRef: leastDestructiveRef
}, /*#__PURE__*/createElement(DialogOverlay, _extends({}, props, {

@@ -121,7 +123,7 @@ ref: ref,

var _React$useContext = useContext(AlertDialogContext),
descriptionId = _React$useContext.descriptionId,
labelId = _React$useContext.labelId,
leastDestructiveRef = _React$useContext.leastDestructiveRef,
overlayRef = _React$useContext.overlayRef;
var _useAlertDialogCtx = useAlertDialogCtx("AlertDialogContent"),
descriptionId = _useAlertDialogCtx.descriptionId,
labelId = _useAlertDialogCtx.labelId,
leastDestructiveRef = _useAlertDialogCtx.leastDestructiveRef,
overlayRef = _useAlertDialogCtx.overlayRef;

@@ -190,4 +192,4 @@ useEffect(function () {

var _React$useContext2 = useContext(AlertDialogContext),
labelId = _React$useContext2.labelId;
var _useAlertDialogCtx2 = useAlertDialogCtx("AlertDialogLabel"),
labelId = _useAlertDialogCtx2.labelId;

@@ -222,4 +224,4 @@ return /*#__PURE__*/createElement(Comp, _extends({}, props, {

var _React$useContext3 = useContext(AlertDialogContext),
descriptionId = _React$useContext3.descriptionId;
var _useAlertDialogCtx3 = useAlertDialogCtx("AlertDialogDescription"),
descriptionId = _useAlertDialogCtx3.descriptionId;

@@ -226,0 +228,0 @@ return /*#__PURE__*/createElement(Comp, _extends({}, props, {

{
"name": "@reach/alert-dialog",
"version": "0.16.2",
"version": "0.17.0",
"description": "Accessible React Alert Dialog.",

@@ -16,5 +16,5 @@ "author": "React Training <hello@reacttraining.com>",

"dependencies": {
"@reach/auto-id": "0.16.0",
"@reach/dialog": "0.16.2",
"@reach/utils": "0.16.0",
"@reach/auto-id": "0.17.0",
"@reach/dialog": "0.17.0",
"@reach/utils": "0.17.0",
"invariant": "^2.2.4",

@@ -43,3 +43,3 @@ "prop-types": "^15.7.2",

],
"gitHead": "d81d4627145952b415b42537ef6497838567baa2"
"gitHead": "d206aefac2bede58c06a54b18d48eee7537096e0"
}
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