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

@interop-ui/react-alert-dialog

Package Overview
Dependencies
Maintainers
4
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 0.0.1-11 to 0.0.1-12

72

dist/index.d.ts
import * as React from "react";
import { DialogCloseProps, DialogContentProps, DialogOverlayProps, DialogProps, DialogTriggerProps } from "@interop-ui/react-dialog";
interface AlertDialogStaticProps {
Trigger: typeof AlertDialogTrigger;
Overlay: typeof AlertDialogOverlay;
Content: typeof AlertDialogContent;
Cancel: typeof AlertDialogCancel;
Action: typeof AlertDialogAction;
Title: typeof AlertDialogTitle;
Description: typeof AlertDialogDescription;
}
export type AlertDialogProps = DialogProps;
export const AlertDialog: React.FC<AlertDialogProps> & AlertDialogStaticProps;
declare const TRIGGER_DEFAULT_TAG = "button";
type AlertDialogTriggerDOMProps = React.ComponentPropsWithoutRef<typeof TRIGGER_DEFAULT_TAG>;
type AlertDialogTriggerOwnProps = {};
export type AlertDialogTriggerProps = DialogTriggerProps & AlertDialogTriggerDOMProps & AlertDialogTriggerOwnProps;
declare const AlertDialogTrigger: import("@interop-ui/react-utils").ForwardRefExoticComponentWithAs<"button", Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "form" | "slot" | "style" | "title" | "key" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">> & {
displayName: string;
import { Dialog } from "@interop-ui/react-dialog";
export const AlertDialog: React.FC<React.ComponentProps<typeof Dialog>>;
export const AlertDialogTrigger: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"button", Pick<{}, never>>;
export const AlertDialogOverlay: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"div", Pick<Pick<{}, never>, never>>;
export const AlertDialogCancel: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"button", Pick<{}, never>>;
export const AlertDialogAction: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"button", Pick<{}, never>>;
type AlertDialogContentOwnProps = {
refToFocusOnOpen?: never;
id?: never;
};
declare const OVERLAY_DEFAULT_TAG = "div";
type AlertDialogOverlayDOMProps = React.ComponentPropsWithoutRef<typeof OVERLAY_DEFAULT_TAG>;
type AlertDialogOverlayOwnProps = {};
export type AlertDialogOverlayProps = DialogOverlayProps & AlertDialogOverlayDOMProps & AlertDialogOverlayOwnProps;
declare const AlertDialogOverlay: import("@interop-ui/react-utils").ForwardRefExoticComponentWithAs<"div", Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">> & {
displayName: string;
};
declare const CANCEL_DEFAULT_TAG = "button";
type AlertDialogCancelDOMProps = React.ComponentPropsWithoutRef<typeof CANCEL_DEFAULT_TAG>;
type AlertDialogCancelOwnProps = {};
export type AlertDialogCancelProps = DialogCloseProps & AlertDialogCancelOwnProps & AlertDialogCancelDOMProps;
declare const AlertDialogCancel: import("@interop-ui/react-utils").ForwardRefExoticComponentWithAs<"button", Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "form" | "slot" | "style" | "title" | "key" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">> & {
displayName: string;
};
declare const ACTION_DEFAULT_TAG = "button";
type AlertDialogActionDOMProps = React.ComponentPropsWithoutRef<typeof ACTION_DEFAULT_TAG>;
type AlertDialogActionOwnProps = {};
export type AlertDialogActionProps = DialogCloseProps & AlertDialogActionOwnProps & AlertDialogActionDOMProps;
declare const AlertDialogAction: import("@interop-ui/react-utils").ForwardRefExoticComponentWithAs<"button", Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "form" | "slot" | "style" | "title" | "key" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">> & {
displayName: string;
};
declare const CONTENT_DEFAULT_TAG = "div";
type AlertDialogContentDOMProps = Omit<React.ComponentPropsWithoutRef<typeof CONTENT_DEFAULT_TAG>, 'id'>;
type AlertDialogContentOwnProps = {};
export type AlertDialogContentProps = Omit<DialogContentProps, 'refToFocusOnOpen'> & AlertDialogContentDOMProps & AlertDialogContentOwnProps;
declare const AlertDialogContent: import("@interop-ui/react-utils").ForwardRefExoticComponentWithAs<"div", AlertDialogContentProps> & {
displayName: string;
};
declare const TITLE_DEFAULT_TAG = "h2";
type AlertDialogTitleDOMProps = React.ComponentPropsWithoutRef<typeof TITLE_DEFAULT_TAG>;
type AlertDialogTitleOwnProps = {};
export type AlertDialogTitleProps = AlertDialogTitleDOMProps & AlertDialogTitleOwnProps;
declare const AlertDialogTitle: import("@interop-ui/react-utils").ForwardRefExoticComponentWithAs<"h2", Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">> & {
displayName: string;
};
declare const DESCRIPTION_DEFAULT_TAG = "p";
type AlertDialogDescriptionDOMProps = React.ComponentPropsWithoutRef<typeof DESCRIPTION_DEFAULT_TAG>;
type AlertDialogDescriptionOwnProps = {};
export type AlertDialogDescriptionProps = AlertDialogDescriptionDOMProps & AlertDialogDescriptionOwnProps;
declare const AlertDialogDescription: import("@interop-ui/react-utils").ForwardRefExoticComponentWithAs<"p", Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture">> & {
displayName: string;
};
export const AlertDialogContent: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"div", import("@interop-ui/react-polymorphic").MergeProps<Pick<import("@interop-ui/react-dialog").DialogContentOwnProps, "onEscapeKeyDown" | "onPointerDownOutside" | "onOpenAutoFocus" | "onCloseAutoFocus">, AlertDialogContentOwnProps>>;
export const AlertDialogTitle: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"h2", {}>;
export const AlertDialogDescription: import("@interop-ui/react-polymorphic").ForwardRefExoticComponentWithAs<"p", {}>;
//# sourceMappingURL=index.d.ts.map

2

dist/index.js

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

var e,t,r=require("@interop-ui/react-utils"),n=r.createContext,a=r.forwardRef,i=r.useComposedRefs,o=r.useId,l=r.useDocumentRef,c=r.composeEventHandlers,s=require("@interop-ui/utils"),u=s.getPartDataAttrObj,d=s.makeId,f=(s.warning,require("@interop-ui/react-dialog").Dialog),p=(e={},t=require("react"),Object.keys(t).forEach((function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})})),e);function g(){return(g=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function y(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,a=!1,i=void 0;try{for(var o,l=e[Symbol.iterator]();!(n=(o=l.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){a=!0,i=e}finally{try{n||null==l.return||l.return()}finally{if(a)throw i}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var m=b(n("AlertDialogContext","AlertDialog"),2),h=m[0],A=m[1],D=b(n("AlertDialogContext","AlertDialog"),2),O=D[0],C=D[1],I=function(e){var t=e.children,r=e.id,n=y(e,["children","id"]),a=d("alert-dialog",o()),i=r||a,l=d(i,"description"),c=d(i,"title");return p.createElement(f,n,p.createElement(h.Provider,{value:p.useMemo((function(){return{descriptionId:l,titleId:c}}),[l,c])},t))};exports.AlertDialog=I;var w=a((function(e,t){var r=e.as,n=void 0===r?"button":r,a=y(e,["as"]);return p.createElement(f.Trigger,g({},u("AlertDialog.Trigger"),{as:n,ref:t},a))})),E=a((function(e,t){var r=e.as,n=void 0===r?"div":r,a=y(e,["as"]);return p.createElement(f.Overlay,g({},u("AlertDialog.Overlay"),{as:n,ref:t},a))})),T=a((function(e,t){var r=e.as,n=void 0===r?"button":r,a=y(e,["as"]),o=C("AlertDialog.Cancel").cancelRef,l=i(t,o);return p.createElement(f.Close,g({},u("AlertDialog.Cancel"),{as:n,ref:l},a))})),j=a((function(e,t){var r=e.as,n=void 0===r?"button":r,a=y(e,["as"]);return p.createElement(f.Close,g({},u("AlertDialog.Action"),{as:n,ref:t},a))})),S=a((function(e,t){var r=e.as,n=void 0===r?"div":r,a=e["aria-label"],o=e["aria-labelledby"],s=e["aria-describedby"],d=e.children,b=y(e,["as","aria-label","aria-labelledby","aria-describedby","children"]),v=A("AlertDialogContent"),m=v.descriptionId,h=v.titleId,D=p.useRef(null),C=p.useRef(null),I=l(C),w=i(t,C);return p.createElement(f.Content,g({},u("AlertDialog.Content"),{as:n,ref:w,role:"alertdialog","aria-describedby":s||m,"aria-labelledby":a?void 0:o||h,"aria-label":a||void 0},b,{onOpenAutoFocus:c(b.onOpenAutoFocus,(function(e){var t;e.preventDefault(),null===(t=D.current)||void 0===t||t.focus({preventScroll:!0})}))}),p.createElement(O.Provider,{value:p.useMemo((function(){return{cancelRef:D,ownerDocumentRef:I}}),[D,I])},!1,d))})),N=a((function(e,t){var r=e.as,n=void 0===r?"h2":r,a=y(e,["as"]),i=A("AlertDialogTitle").titleId;return p.createElement(n,g({},u("AlertDialog.Title"),{ref:t,id:i},a))})),x=a((function(e,t){var r=e.as,n=void 0===r?"p":r,a=y(e,["as"]),i=A("AlertDialogDescription").descriptionId;return p.createElement(n,g({},u("AlertDialog.Description"),{ref:t,id:i},a))}));I.Cancel=T,I.Action=j,I.Content=S,I.Description=x,I.Overlay=E,I.Title=N,I.Trigger=w,I.Title.displayName="AlertDialog.Title",I.Cancel.displayName="AlertDialog.Cancel",I.Action.displayName="AlertDialog.Action",I.Content.displayName="AlertDialog.Content",I.Description.displayName="AlertDialog.Description",I.Overlay.displayName="AlertDialog.Overlay",I.Trigger.displayName="AlertDialog.Trigger",I.displayName="AlertDialog";"".concat("AlertDialog.Content"," requires a label for the component to be accessible for screen reader users.\n\nYou can label the ").concat("AlertDialog.Content"," by passing a ").concat("AlertDialog.Title"," component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a title by assigning it an `id` and passing the same value to the `aria-labelledby` prop in ").concat("AlertDialog.Content",". If the label is confusing or duplicative for sighted users, you can also pass a label directly by using the `aria-label` prop.\n\nFor more information, see https://LINK-TO-DOCS.com"),"".concat("AlertDialog.Content"," requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the ").concat("AlertDialog.Content"," by passing a ").concat("AlertDialog.Description"," component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an `id` and passing the same value to the `aria-describedby` prop in ").concat("AlertDialog.Content",". If the description is confusing or duplicative for sighted users, you can use the `interop-ui/react-visually-hidden` component as a wrapper around your description component.\n\nFor more information, see https://LINK-TO-DOCS.com");
var e,t,r=require("@interop-ui/react-dialog"),n=r.Dialog,a=r.DialogOverlay,o=r.DialogContent,i=r.DialogTrigger,l=r.DialogClose,c=require("@interop-ui/react-polymorphic").forwardRefWithAs,s=require("@interop-ui/react-utils"),u=s.createContext,d=s.useComposedRefs,p=s.useId,g=s.useDocumentRef,f=s.composeEventHandlers,y=require("@interop-ui/utils"),b=y.getPartDataAttrObj,m=y.makeId,D=(y.warning,e={},t=require("react"),Object.keys(t).forEach((function(r){"default"!==r&&"__esModule"!==r&&Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[r]}})})),e);function v(){return(v=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function A(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,a=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(n=(i=l.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){a=!0,o=e}finally{try{n||null==l.return||l.return()}finally{if(a)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return O(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var C=h(u("AlertDialogContext","AlertDialog"),2),x=C[0],I=C[1],w=h(u("AlertDialogContext","AlertDialog"),2),E=w[0],j=w[1],T=function(e){var t=e.children,r=e.id,a=A(e,["children","id"]),o=m("alert-dialog",p()),i=r||o,l=m(i,"description"),c=m(i,"title");return D.createElement(n,a,D.createElement(x.Provider,{value:D.useMemo((function(){return{descriptionId:l,titleId:c}}),[l,c])},t))};exports.AlertDialog=T,T.displayName="AlertDialog";var S=c((function(e,t){return D.createElement(i,v({},b("AlertDialogTrigger"),{ref:t},e))}));exports.AlertDialogTrigger=S,S.displayName="AlertDialogTrigger";var N=c((function(e,t){return D.createElement(a,v({},b("AlertDialogOverlay"),{ref:t},e))}));exports.AlertDialogOverlay=N,N.displayName="AlertDialogOverlay";var R=c((function(e,t){var r=j("AlertDialogCancel").cancelRef,n=d(t,r);return D.createElement(l,v({},b("AlertDialogCancel"),{ref:n},e))}));exports.AlertDialogCancel=R,R.displayName="AlertDialogCancel";var q=c((function(e,t){return D.createElement(l,v({},b("AlertDialogAction"),{ref:t},e))}));exports.AlertDialogAction=q,q.displayName="AlertDialogAction";var P=c((function(e,t){var r=e["aria-label"],n=e["aria-labelledby"],a=e["aria-describedby"],i=e.children,l=A(e,["aria-label","aria-labelledby","aria-describedby","children"]),c=I("AlertDialogContent"),s=c.descriptionId,u=c.titleId,p=D.useRef(null),y=D.useRef(null),m=g(y),h=d(t,y);return D.createElement(o,v({},b("AlertDialogContent"),{ref:h,role:"alertdialog","aria-describedby":a||s,"aria-labelledby":r?void 0:n||u,"aria-label":r||void 0},l,{onOpenAutoFocus:f(l.onOpenAutoFocus,(function(e){var t;e.preventDefault(),null===(t=p.current)||void 0===t||t.focus({preventScroll:!0})}))}),D.createElement(E.Provider,{value:D.useMemo((function(){return{cancelRef:p,ownerDocumentRef:m}}),[p,m])},!1,i))}));exports.AlertDialogContent=P,P.displayName="AlertDialogContent";var F=c((function(e,t){var r=e.as,n=void 0===r?"h2":r,a=A(e,["as"]),o=I("AlertDialogTitle").titleId;return D.createElement(n,v({},b("AlertDialogTitle"),{ref:t,id:o},a))}));exports.AlertDialogTitle=F,F.displayName="AlertDialogTitle";var M=c((function(e,t){var r=e.as,n=void 0===r?"p":r,a=A(e,["as"]),o=I("AlertDialogDescription").descriptionId;return D.createElement(n,v({},b("AlertDialogDescription"),{ref:t,id:o},a))}));exports.AlertDialogDescription=M,M.displayName="AlertDialogDescription";"".concat("AlertDialogContent"," requires a label for the component to be accessible for screen reader users.\n\nYou can label the ").concat("AlertDialogContent"," by passing a ").concat("AlertDialogTitle"," component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a title by assigning it an `id` and passing the same value to the `aria-labelledby` prop in ").concat("AlertDialogContent",". If the label is confusing or duplicative for sighted users, you can also pass a label directly by using the `aria-label` prop.\n\nFor more information, see https://LINK-TO-DOCS.com"),"".concat("AlertDialogContent"," requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the ").concat("AlertDialogContent"," by passing a ").concat("AlertDialogDescription"," component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an `id` and passing the same value to the `aria-describedby` prop in ").concat("AlertDialogContent",". If the description is confusing or duplicative for sighted users, you can use the `interop-ui/react-visually-hidden` component as a wrapper around your description component.\n\nFor more information, see https://LINK-TO-DOCS.com");
//# sourceMappingURL=index.js.map

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

import{createContext as e,forwardRef as t,useComposedRefs as r,useId as a,useDocumentRef as o,composeEventHandlers as i}from"@interop-ui/react-utils";import{getPartDataAttrObj as n,makeId as l,warning as s}from"@interop-ui/utils";import{Dialog as c}from"@interop-ui/react-dialog";import*as g from"react";function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}function d(e,t){if(null==e)return{};var r,a,o=function(e,t){if(null==e)return{};var r,a,o={},i=Object.keys(e);for(a=0;a<i.length;a++)r=i[a],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}const[p,D]=e("AlertDialogContext","AlertDialog"),[A,f]=e("AlertDialogContext","AlertDialog");export const AlertDialog=function(e){const{children:t,id:r}=e,o=d(e,["children","id"]),i=l("alert-dialog",a()),n=r||i,s=l(n,"description"),u=l(n,"title");return g.createElement(c,o,g.createElement(p.Provider,{value:g.useMemo((()=>({descriptionId:s,titleId:u})),[s,u])},t))};const b="button",y=t((function(e,t){const{as:r=b}=e,a=d(e,["as"]);return g.createElement(c.Trigger,u({},n("AlertDialog.Trigger"),{as:r,ref:t},a))})),m="div",h=t((function(e,t){const{as:r=m}=e,a=d(e,["as"]);return g.createElement(c.Overlay,u({},n("AlertDialog.Overlay"),{as:r,ref:t},a))})),v="button",C=t((function(e,t){const{as:a=v}=e,o=d(e,["as"]),{cancelRef:i}=f("AlertDialog.Cancel"),l=r(t,i);return g.createElement(c.Close,u({},n("AlertDialog.Cancel"),{as:a,ref:l},o))})),O="button",T=t((function(e,t){const{as:r=O}=e,a=d(e,["as"]);return g.createElement(c.Close,u({},n("AlertDialog.Action"),{as:r,ref:t},a))})),E="div",I=t((function(e,t){const{as:a=E,"aria-label":l,"aria-labelledby":s,"aria-describedby":p,children:f}=e,b=d(e,["as","aria-label","aria-labelledby","aria-describedby","children"]),{descriptionId:y,titleId:m}=D("AlertDialogContent"),h=g.useRef(null),v=g.useRef(null),C=o(v),O=r(t,v);return g.createElement(c.Content,u({},n("AlertDialog.Content"),{as:a,ref:O,role:"alertdialog","aria-describedby":p||y,"aria-labelledby":l?void 0:s||m,"aria-label":l||void 0},b,{onOpenAutoFocus:i(b.onOpenAutoFocus,(e=>{var t;e.preventDefault(),null===(t=h.current)||void 0===t||t.focus({preventScroll:!0})}))}),g.createElement(A.Provider,{value:g.useMemo((()=>({cancelRef:h,ownerDocumentRef:C})),[h,C])},!1,f))})),N="h2",w=t((function(e,t){const{as:r=N}=e,a=d(e,["as"]),{titleId:o}=D("AlertDialogTitle");return g.createElement(r,u({},n("AlertDialog.Title"),{ref:t,id:o},a))})),x="p",j=t((function(e,t){const{as:r=x}=e,a=d(e,["as"]),{descriptionId:o}=D("AlertDialogDescription");return g.createElement(r,u({},n("AlertDialog.Description"),{ref:t,id:o},a))}));AlertDialog.Cancel=C,AlertDialog.Action=T,AlertDialog.Content=I,AlertDialog.Description=j,AlertDialog.Overlay=h,AlertDialog.Title=w,AlertDialog.Trigger=y,AlertDialog.Title.displayName="AlertDialog.Title",AlertDialog.Cancel.displayName="AlertDialog.Cancel",AlertDialog.Action.displayName="AlertDialog.Action",AlertDialog.Content.displayName="AlertDialog.Content",AlertDialog.Description.displayName="AlertDialog.Description",AlertDialog.Overlay.displayName="AlertDialog.Overlay",AlertDialog.Trigger.displayName="AlertDialog.Trigger",AlertDialog.displayName="AlertDialog";"".concat("AlertDialog.Content"," requires a label for the component to be accessible for screen reader users.\n\nYou can label the ").concat("AlertDialog.Content"," by passing a ").concat("AlertDialog.Title"," component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a title by assigning it an `id` and passing the same value to the `aria-labelledby` prop in ").concat("AlertDialog.Content",". If the label is confusing or duplicative for sighted users, you can also pass a label directly by using the `aria-label` prop.\n\nFor more information, see https://LINK-TO-DOCS.com"),"".concat("AlertDialog.Content"," requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the ").concat("AlertDialog.Content"," by passing a ").concat("AlertDialog.Description"," component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an `id` and passing the same value to the `aria-describedby` prop in ").concat("AlertDialog.Content",". If the description is confusing or duplicative for sighted users, you can use the `interop-ui/react-visually-hidden` component as a wrapper around your description component.\n\nFor more information, see https://LINK-TO-DOCS.com");
import{Dialog as e,DialogOverlay as t,DialogContent as r,DialogTrigger as o,DialogClose as l}from"@interop-ui/react-dialog";import{forwardRefWithAs as i}from"@interop-ui/react-polymorphic";import{createContext as a,useComposedRefs as n,useId as c,useDocumentRef as s,composeEventHandlers as p}from"@interop-ui/react-utils";import{getPartDataAttrObj as g,makeId as d,warning as u}from"@interop-ui/utils";import*as D from"react";function A(){return(A=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}function m(e,t){if(null==e)return{};var r,o,l=function(e,t){if(null==e)return{};var r,o,l={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}const[y,b]=a("AlertDialogContext","AlertDialog"),[f,h]=a("AlertDialogContext","AlertDialog");export const AlertDialog=t=>{const{children:r,id:o}=t,l=m(t,["children","id"]),i=d("alert-dialog",c()),a=o||i,n=d(a,"description"),s=d(a,"title");return D.createElement(e,l,D.createElement(y.Provider,{value:D.useMemo((()=>({descriptionId:n,titleId:s})),[n,s])},r))};AlertDialog.displayName="AlertDialog";export const AlertDialogTrigger=i(((e,t)=>D.createElement(o,A({},g("AlertDialogTrigger"),{ref:t},e))));AlertDialogTrigger.displayName="AlertDialogTrigger";export const AlertDialogOverlay=i(((e,r)=>D.createElement(t,A({},g("AlertDialogOverlay"),{ref:r},e))));AlertDialogOverlay.displayName="AlertDialogOverlay";export const AlertDialogCancel=i(((e,t)=>{const{cancelRef:r}=h("AlertDialogCancel"),o=n(t,r);return D.createElement(l,A({},g("AlertDialogCancel"),{ref:o},e))}));AlertDialogCancel.displayName="AlertDialogCancel";export const AlertDialogAction=i(((e,t)=>D.createElement(l,A({},g("AlertDialogAction"),{ref:t},e))));AlertDialogAction.displayName="AlertDialogAction";export const AlertDialogContent=i(((e,t)=>{const{"aria-label":o,"aria-labelledby":l,"aria-describedby":i,children:a}=e,c=m(e,["aria-label","aria-labelledby","aria-describedby","children"]),{descriptionId:d,titleId:u}=b("AlertDialogContent"),y=D.useRef(null),h=D.useRef(null),v=s(h),O=n(t,h);return D.createElement(r,A({},g("AlertDialogContent"),{ref:O,role:"alertdialog","aria-describedby":i||d,"aria-labelledby":o?void 0:l||u,"aria-label":o||void 0},c,{onOpenAutoFocus:p(c.onOpenAutoFocus,(e=>{var t;e.preventDefault(),null===(t=y.current)||void 0===t||t.focus({preventScroll:!0})}))}),D.createElement(f.Provider,{value:D.useMemo((()=>({cancelRef:y,ownerDocumentRef:v})),[y,v])},!1,a))}));AlertDialogContent.displayName="AlertDialogContent";const v="h2";export const AlertDialogTitle=i(((e,t)=>{const{as:r=v}=e,o=m(e,["as"]),{titleId:l}=b("AlertDialogTitle");return D.createElement(r,A({},g("AlertDialogTitle"),{ref:t,id:l},o))}));AlertDialogTitle.displayName="AlertDialogTitle";const O="p";export const AlertDialogDescription=i(((e,t)=>{const{as:r=O}=e,o=m(e,["as"]),{descriptionId:l}=b("AlertDialogDescription");return D.createElement(r,A({},g("AlertDialogDescription"),{ref:t,id:l},o))}));AlertDialogDescription.displayName="AlertDialogDescription";"".concat("AlertDialogContent"," requires a label for the component to be accessible for screen reader users.\n\nYou can label the ").concat("AlertDialogContent"," by passing a ").concat("AlertDialogTitle"," component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a title by assigning it an `id` and passing the same value to the `aria-labelledby` prop in ").concat("AlertDialogContent",". If the label is confusing or duplicative for sighted users, you can also pass a label directly by using the `aria-label` prop.\n\nFor more information, see https://LINK-TO-DOCS.com"),"".concat("AlertDialogContent"," requires a description for the component to be accessible for screen reader users.\n\nYou can add a description to the ").concat("AlertDialogContent"," by passing a ").concat("AlertDialogDescription"," component as a child, which also benefits sighted users by adding visible context to the dialog.\n\nAlternatively, you can use your own component as a description by assigning it an `id` and passing the same value to the `aria-describedby` prop in ").concat("AlertDialogContent",". If the description is confusing or duplicative for sighted users, you can use the `interop-ui/react-visually-hidden` component as a wrapper around your description component.\n\nFor more information, see https://LINK-TO-DOCS.com");
//# sourceMappingURL=index.module.js.map
{
"name": "@interop-ui/react-alert-dialog",
"version": "0.0.1-11",
"version": "0.0.1-12",
"license": "MIT",

@@ -20,5 +20,6 @@ "source": "src/index.ts",

"dependencies": {
"@interop-ui/react-dialog": "0.0.1-13",
"@interop-ui/react-utils": "0.0.1-12",
"@interop-ui/utils": "0.0.1-4"
"@interop-ui/react-dialog": "0.0.1-14",
"@interop-ui/react-polymorphic": "0.0.1-0",
"@interop-ui/react-utils": "0.0.1-13",
"@interop-ui/utils": "0.0.1-5"
},

@@ -25,0 +26,0 @@ "devDependencies": {

@@ -15,3 +15,12 @@ # `react-alert-dialog`

import * as React from 'react';
import { AlertDialog } from '@interop-ui/react-alert-dialog';
import {
AlertDialog,
AlertDialogTrigger,
AlertDialogOverlay,
AlertDialogContent,
AlertDialogTitle,
AlertDialogDescription,
AlertDialogAction,
AlertDialogCancel,
} from '@interop-ui/react-alert-dialog';

@@ -21,12 +30,12 @@ function MyComponent() {

<AlertDialog>
<AlertDialog.Trigger>Delete everything</AlertDialog.Trigger>
<AlertDialog.Overlay />
<AlertDialog.Content>
<AlertDialog.Title>Are you sure?</AlertDialog.Title>
<AlertDialog.Description>
<AlertDialogTrigger>Delete everything</AlertDialogTrigger>
<AlertDialogOverlay />
<AlertDialogContent>
<AlertDialogTitle>Are you sure?</AlertDialogTitle>
<AlertDialogDescription>
This will do a very dangerous thing. Thar be dragons!
</AlertDialog.Description>
<AlertDialog.Action onClick={deleteFiles}>Delete them</AlertDialog.Action>
<AlertDialog.Cancel>Never mind</AlertDialog.Cancel>
</AlertDialog.Content>
</AlertDialogDescription>
<AlertDialogAction onClick={deleteFiles}>Delete them</AlertDialogAction>
<AlertDialogCancel>Never mind</AlertDialogCancel>
</AlertDialogContent>
</AlertDialog>

@@ -33,0 +42,0 @@ );

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

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