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

@radix-ui/react-alert-dialog

Package Overview
Dependencies
Maintainers
8
Versions
238
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@radix-ui/react-alert-dialog - npm Package Compare versions

Comparing version 0.0.18 to 0.0.19

26

dist/index.d.ts
import * as React from "react";
import { Primitive } from "@radix-ui/react-primitive";
import * as DialogPrimitive from "@radix-ui/react-dialog";
import * as Polymorphic from "@radix-ui/react-polymorphic";
export const AlertDialog: React.FC<React.ComponentProps<typeof DialogPrimitive.Root>>;
type AlertDialogContentOwnProps = Omit<Polymorphic.OwnProps<typeof DialogPrimitive.Content>, 'refToFocusOnOpen' | 'id'>;
export type AlertDialogContentPrimitive = Polymorphic.ForwardRefComponent<Polymorphic.IntrinsicElement<typeof DialogPrimitive.Content>, AlertDialogContentOwnProps>;
export type AlertDialogContentPrimitive = Polymorphic.ForwardRefComponent<Polymorphic.IntrinsicElement<typeof DialogPrimitive.Content>, Polymorphic.OwnProps<typeof DialogPrimitive.Content>>;
export const AlertDialogContent: AlertDialogContentPrimitive;
declare const TITLE_DEFAULT_TAG = "h2";
type AlertDialogTitleOwnProps = Polymorphic.OwnProps<typeof Primitive>;
export type AlertDialogTitlePrimitive = Polymorphic.ForwardRefComponent<typeof TITLE_DEFAULT_TAG, AlertDialogTitleOwnProps>;
export const AlertDialogTitle: AlertDialogTitlePrimitive;
declare const DESCRIPTION_DEFAULT_TAG = "p";
type AlertDialogDescriptionOwnProps = Polymorphic.OwnProps<typeof Primitive>;
export type AlertDialogDescriptionPrimitive = Polymorphic.ForwardRefComponent<typeof DESCRIPTION_DEFAULT_TAG, AlertDialogDescriptionOwnProps>;
export const AlertDialogDescription: AlertDialogDescriptionPrimitive;
type AlertDialogCancelOwnProps = Polymorphic.OwnProps<typeof DialogPrimitive.Close>;

@@ -23,2 +13,4 @@ export type AlertDialogCancelPrimitive = Polymorphic.ForwardRefComponent<Polymorphic.IntrinsicElement<typeof DialogPrimitive.Close>, AlertDialogCancelOwnProps>;

export const AlertDialogAction: import("@radix-ui/react-primitive").ExtendedPrimitive<DialogPrimitive.DialogClosePrimitive, "button">;
export const AlertDialogTitle: import("@radix-ui/react-primitive").ExtendedPrimitive<DialogPrimitive.DialogTitlePrimitive, "h2">;
export const AlertDialogDescription: import("@radix-ui/react-primitive").ExtendedPrimitive<DialogPrimitive.DialogDescriptionPrimitive, "p">;
export const Root: React.FC<React.PropsWithChildren<{

@@ -29,10 +21,10 @@ open?: boolean | undefined;

}>>;
export const Title: AlertDialogTitlePrimitive;
export const Trigger: import("@radix-ui/react-primitive").ExtendedPrimitive<DialogPrimitive.DialogTriggerPrimitive, "button">;
export const Overlay: import("@radix-ui/react-primitive").ExtendedPrimitive<DialogPrimitive.DialogOverlayPrimitive, "div">;
export const Content: AlertDialogContentPrimitive;
export const Action: import("@radix-ui/react-primitive").ExtendedPrimitive<DialogPrimitive.DialogClosePrimitive, "button">;
export const Cancel: AlertDialogCancelPrimitive;
export const Action: import("@radix-ui/react-primitive").ExtendedPrimitive<DialogPrimitive.DialogClosePrimitive, "button">;
export const Content: AlertDialogContentPrimitive;
export const Description: AlertDialogDescriptionPrimitive;
export const Overlay: import("@radix-ui/react-primitive").ExtendedPrimitive<DialogPrimitive.DialogOverlayPrimitive, "div">;
export const Trigger: import("@radix-ui/react-primitive").ExtendedPrimitive<DialogPrimitive.DialogTriggerPrimitive, "button">;
export const Title: import("@radix-ui/react-primitive").ExtendedPrimitive<DialogPrimitive.DialogTitlePrimitive, "h2">;
export const Description: import("@radix-ui/react-primitive").ExtendedPrimitive<DialogPrimitive.DialogDescriptionPrimitive, "p">;
//# sourceMappingURL=index.d.ts.map

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

var e,r=require("@radix-ui/react-slot").Slottable,t=require("@radix-ui/react-id").useId,o=p({},require("@radix-ui/react-dialog")),i=require("@radix-ui/react-primitive"),l=i.Primitive,a=i.extendPrimitive,n=require("@radix-ui/primitive").composeEventHandlers,s=require("@radix-ui/react-compose-refs").useComposedRefs,c=require("@radix-ui/react-context").createContext,d=p({},require("react")),u=(e=require("@babel/runtime/helpers/extends"))&&e.__esModule?e.default:e;function p(e,r){return Object.keys(r).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}})})),e}const[g,x]=c("AlertDialog"),f=e=>/*#__PURE__*/d.createElement(g,{descriptionId:t(),titleId:t()},/*#__PURE__*/d.createElement(o.Root,e));exports.AlertDialog=f;const[A,D]=c("AlertDialogContent"),m=/*#__PURE__*/d.forwardRef(((e,t)=>{const{"aria-label":i,"aria-labelledby":l,"aria-describedby":a,children:s,...c}=e,{descriptionId:p,titleId:g}=x("AlertDialogContent"),f=d.useRef(null);/*#__PURE__*/return d.createElement(o.Content,u({role:"alertdialog","aria-describedby":a||p,"aria-labelledby":i?void 0:l||g,"aria-label":i||void 0},c,{ref:t,onOpenAutoFocus:n(c.onOpenAutoFocus,(e=>{var r;e.preventDefault(),null===(r=f.current)||void 0===r||r.focus({preventScroll:!0})}))}),/*#__PURE__*/d.createElement(A,{cancelRef:f},!1,/*#__PURE__*/d.createElement(r,null,s)))}));exports.AlertDialogContent=m;const b="h2",v=/*#__PURE__*/d.forwardRef(((e,r)=>{const{as:t=b,...o}=e,{titleId:i}=x("AlertDialogTitle");/*#__PURE__*/return d.createElement(l,u({id:i},o,{as:t,ref:r}))}));exports.AlertDialogTitle=v;const y="p",C=/*#__PURE__*/d.forwardRef(((e,r)=>{const{as:t=y,...o}=e,{descriptionId:i}=x("AlertDialogDescription");/*#__PURE__*/return d.createElement(l,u({id:i},o,{as:t,ref:r}))}));exports.AlertDialogDescription=C;const E=/*#__PURE__*/d.forwardRef(((e,r)=>{const{cancelRef:t}=D("AlertDialogCancel"),i=s(r,t);/*#__PURE__*/return d.createElement(o.Close,u({},e,{ref:i}))}));exports.AlertDialogCancel=E;const R=a(o.Trigger,{displayName:"AlertDialogTrigger"});exports.AlertDialogTrigger=R;const q=a(o.Overlay,{displayName:"AlertDialogOverlay"});exports.AlertDialogOverlay=q;const O=a(o.Close,{displayName:"AlertDialogAction"});exports.AlertDialogAction=O;const I=f;exports.Root=I;const T=v;exports.Title=T;const h=E;exports.Cancel=h;const w=O;exports.Action=w;const _=m;exports.Content=_;const N=C;exports.Description=N;const P=q;exports.Overlay=P;const j=R;exports.Trigger=j;
var e,t=require("@radix-ui/react-slot").Slottable,r=require("@radix-ui/react-primitive").extendPrimitive,o=require("@radix-ui/primitive").composeEventHandlers,l=c({},require("@radix-ui/react-dialog")),i=require("@radix-ui/react-compose-refs").useComposedRefs,n=require("@radix-ui/react-context").createContext,a=c({},require("react")),s=(e=require("@babel/runtime/helpers/extends"))&&e.__esModule?e.default:e;function c(e,t){return Object.keys(t).forEach((function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})})),e}const u=e=>/*#__PURE__*/a.createElement(l.Root,e);exports.AlertDialog=u;const[p,g]=n("AlertDialogContent"),d=/*#__PURE__*/a.forwardRef(((e,r)=>{const{children:n,...c}=e,u=a.useRef(null),g=i(r,u),d=a.useRef(null);/*#__PURE__*/return a.createElement(l.LabelWarningProvider,{value:a.useMemo((()=>({contentName:"AlertDialogContent",titleName:D,docsSlug:"alert-dialog"})),[])},/*#__PURE__*/a.createElement(p,{cancelRef:d},/*#__PURE__*/a.createElement(l.Content,s({role:"alertdialog"},c,{ref:g,onOpenAutoFocus:o(c.onOpenAutoFocus,(e=>{var t;e.preventDefault(),null===(t=d.current)||void 0===t||t.focus({preventScroll:!0})}))}),/*#__PURE__*/a.createElement(t,null,n),!1)))}));exports.AlertDialogContent=d;const x=/*#__PURE__*/a.forwardRef(((e,t)=>{const{cancelRef:r}=g("AlertDialogCancel"),o=i(t,r);/*#__PURE__*/return a.createElement(l.Close,s({},e,{ref:o}))}));exports.AlertDialogCancel=x;const m=r(l.Trigger,{displayName:"AlertDialogTrigger"});exports.AlertDialogTrigger=m;const f=r(l.Overlay,{displayName:"AlertDialogOverlay"});exports.AlertDialogOverlay=f;const A=r(l.Close,{displayName:"AlertDialogAction"});exports.AlertDialogAction=A;const D="AlertDialogTitle",v=r(l.Title,{displayName:D});exports.AlertDialogTitle=v;const C=r(l.Description,{displayName:"AlertDialogDescription"});exports.AlertDialogDescription=C;const y=u;exports.Root=y;const R=m;exports.Trigger=R;const q=f;exports.Overlay=q;const E=d;exports.Content=E;const O=A;exports.Action=O;const T=x;exports.Cancel=T;const b=v;exports.Title=b;const N=C;exports.Description=N;
//# sourceMappingURL=index.js.map

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

import{Slottable as e}from"@radix-ui/react-slot";import{useId as t}from"@radix-ui/react-id";import*as r from"@radix-ui/react-dialog";import{Primitive as o,extendPrimitive as l}from"@radix-ui/react-primitive";import{composeEventHandlers as i}from"@radix-ui/primitive";import{useComposedRefs as a}from"@radix-ui/react-compose-refs";import{createContext as n}from"@radix-ui/react-context";import*as c from"react";import s from"@babel/runtime/helpers/esm/extends";const[p,d]=n("AlertDialog");export const AlertDialog=e=>/*#__PURE__*/c.createElement(p,{descriptionId:t(),titleId:t()},/*#__PURE__*/c.createElement(r.Root,e))/*#__PURE__*/;const[g,m]=n("AlertDialogContent");export const AlertDialogContent=/*#__PURE__*/c.forwardRef(((t,o)=>{const{"aria-label":l,"aria-labelledby":a,"aria-describedby":n,children:p,...m}=t,{descriptionId:A,titleId:D}=d("AlertDialogContent"),f=c.useRef(null);/*#__PURE__*/return c.createElement(r.Content,s({role:"alertdialog","aria-describedby":n||A,"aria-labelledby":l?void 0:a||D,"aria-label":l||void 0},m,{ref:o,onOpenAutoFocus:i(m.onOpenAutoFocus,(e=>{var t;e.preventDefault(),null===(t=f.current)||void 0===t||t.focus({preventScroll:!0})}))}),/*#__PURE__*/c.createElement(g,{cancelRef:f},!1,/*#__PURE__*/c.createElement(e,null,p)))}));/*#__PURE__*/const A="h2";export const AlertDialogTitle=/*#__PURE__*/c.forwardRef(((e,t)=>{const{as:r=A,...l}=e,{titleId:i}=d("AlertDialogTitle");/*#__PURE__*/return c.createElement(o,s({id:i},l,{as:r,ref:t}))}));/*#__PURE__*/const D="p";export const AlertDialogDescription=/*#__PURE__*/c.forwardRef(((e,t)=>{const{as:r=D,...l}=e,{descriptionId:i}=d("AlertDialogDescription");/*#__PURE__*/return c.createElement(o,s({id:i},l,{as:r,ref:t}))}));/*#__PURE__*/export const AlertDialogCancel=/*#__PURE__*/c.forwardRef(((e,t)=>{const{cancelRef:o}=m("AlertDialogCancel"),l=a(t,o);/*#__PURE__*/return c.createElement(r.Close,s({},e,{ref:l}))}));/*#__PURE__*/export const AlertDialogTrigger=l(r.Trigger,{displayName:"AlertDialogTrigger"});export const AlertDialogOverlay=l(r.Overlay,{displayName:"AlertDialogOverlay"});export const AlertDialogAction=l(r.Close,{displayName:"AlertDialogAction"});export const Root=AlertDialog;export const Title=AlertDialogTitle;export const Cancel=AlertDialogCancel;export const Action=AlertDialogAction;export const Content=AlertDialogContent;export const Description=AlertDialogDescription;export const Overlay=AlertDialogOverlay;export const Trigger=AlertDialogTrigger;
import{Slottable as e}from"@radix-ui/react-slot";import{extendPrimitive as t}from"@radix-ui/react-primitive";import{composeEventHandlers as r}from"@radix-ui/primitive";import*as o from"@radix-ui/react-dialog";import{useComposedRefs as l}from"@radix-ui/react-compose-refs";import{createContext as i}from"@radix-ui/react-context";import*as a from"react";import n from"@babel/runtime/helpers/esm/extends";export const AlertDialog=e=>/*#__PURE__*/a.createElement(o.Root,e)/*#__PURE__*/;const[c,s]=i("AlertDialogContent");export const AlertDialogContent=/*#__PURE__*/a.forwardRef(((t,i)=>{const{children:s,...g}=t,m=a.useRef(null),A=l(i,m),D=a.useRef(null);/*#__PURE__*/return a.createElement(o.LabelWarningProvider,{value:a.useMemo((()=>({contentName:"AlertDialogContent",titleName:p,docsSlug:"alert-dialog"})),[])},/*#__PURE__*/a.createElement(c,{cancelRef:D},/*#__PURE__*/a.createElement(o.Content,n({role:"alertdialog"},g,{ref:A,onOpenAutoFocus:r(g.onOpenAutoFocus,(e=>{var t;e.preventDefault(),null===(t=D.current)||void 0===t||t.focus({preventScroll:!0})}))}),/*#__PURE__*/a.createElement(e,null,s),!1)))}));/*#__PURE__*/export const AlertDialogCancel=/*#__PURE__*/a.forwardRef(((e,t)=>{const{cancelRef:r}=s("AlertDialogCancel"),i=l(t,r);/*#__PURE__*/return a.createElement(o.Close,n({},e,{ref:i}))}));/*#__PURE__*/export const AlertDialogTrigger=t(o.Trigger,{displayName:"AlertDialogTrigger"});export const AlertDialogOverlay=t(o.Overlay,{displayName:"AlertDialogOverlay"});export const AlertDialogAction=t(o.Close,{displayName:"AlertDialogAction"});const p="AlertDialogTitle";export const AlertDialogTitle=t(o.Title,{displayName:p});export const AlertDialogDescription=t(o.Description,{displayName:"AlertDialogDescription"});export const Root=AlertDialog;export const Trigger=AlertDialogTrigger;export const Overlay=AlertDialogOverlay;export const Content=AlertDialogContent;export const Action=AlertDialogAction;export const Cancel=AlertDialogCancel;export const Title=AlertDialogTitle;export const Description=AlertDialogDescription;
//# sourceMappingURL=index.module.js.map
{
"name": "@radix-ui/react-alert-dialog",
"version": "0.0.18",
"version": "0.0.19",
"license": "MIT",

@@ -24,7 +24,6 @@ "source": "src/index.ts",

"@radix-ui/react-context": "0.0.5",
"@radix-ui/react-dialog": "0.0.18",
"@radix-ui/react-id": "0.0.6",
"@radix-ui/react-dialog": "0.0.19",
"@radix-ui/react-polymorphic": "0.0.12",
"@radix-ui/react-primitive": "0.0.14",
"@radix-ui/react-slot": "0.0.11"
"@radix-ui/react-slot": "0.0.12"
},

@@ -31,0 +30,0 @@ "peerDependencies": {

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

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