@brainfish-ai/components 0.35.16 → 0.35.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alert-dialog.d.ts +2 -2
- package/dist/esm/components/confirm-dialog.js +2 -2
- package/dist/esm/components/confirm-dialog.js.map +1 -1
- package/dist/esm/components/ui/alert-dialog.js +1 -1
- package/dist/esm/components/ui/alert-dialog.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/stats.html +1 -1
- package/package.json +1 -1
package/dist/alert-dialog.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare const AlertDialogCancel: React_2.ForwardRefExoticComponent<Omit<A
|
|
|
22
22
|
} & ClassProp) | undefined) => string> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
23
23
|
|
|
24
24
|
export declare const AlertDialogContent: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
25
|
-
zIndex?:
|
|
25
|
+
zIndex?: number;
|
|
26
26
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
27
27
|
|
|
28
28
|
export declare const AlertDialogDescription: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React_2.RefAttributes<HTMLParagraphElement>, "ref"> & React_2.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -38,7 +38,7 @@ export declare const AlertDialogHeader: {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
export declare const AlertDialogOverlay: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
41
|
-
zIndex?:
|
|
41
|
+
zIndex?: number;
|
|
42
42
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
43
43
|
|
|
44
44
|
export declare const AlertDialogPortal: React_2.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import e from"react";import{AlertDialog as t,AlertDialogContent as n,AlertDialogHeader as a,AlertDialogTitle as l,AlertDialogDescription as r,AlertDialogFooter as i,AlertDialogCancel as o,AlertDialogAction as c}from"./ui/alert-dialog.js";const m=e.forwardRef(({title:m,description:
|
|
2
|
-
return e.createElement(t,{open:h,onOpenChange:k},/* @__PURE__ */e.createElement(n,{zIndex:
|
|
1
|
+
import e from"react";import{AlertDialog as t,AlertDialogContent as n,AlertDialogHeader as a,AlertDialogTitle as l,AlertDialogDescription as r,AlertDialogFooter as i,AlertDialogCancel as o,AlertDialogAction as c}from"./ui/alert-dialog.js";const m=e.forwardRef(({title:m,description:s,onSubmit:d,onCancel:p,open:u,onOpenChange:E,variant:f,cancelText:x,submitText:C,loadingText:g,zIndex:b=50},y)=>{const[v,I]=e.useState(!1),[S,T]=e.useState(!1),h=u??S,k=E??T;e.useImperativeHandle(y,()=>({open:()=>k(!0),close:()=>k(!1)}));/* @__PURE__ */
|
|
2
|
+
return e.createElement(t,{open:h,onOpenChange:k},/* @__PURE__ */e.createElement(n,{zIndex:b},/* @__PURE__ */e.createElement(a,null,/* @__PURE__ */e.createElement(l,null,m),/* @__PURE__ */e.createElement(r,null,s)),/* @__PURE__ */e.createElement(i,null,/* @__PURE__ */e.createElement(o,{onClick:()=>{v||(p?.(),k(!1))},disabled:v},x),/* @__PURE__ */e.createElement(c,{variant:f,onClick:async()=>{if(!v){I(!0);try{await d(),k(!1)}finally{I(!1)}}},disabled:v},v&&g||C))))});m.displayName="ConfirmDialog";export{m as ConfirmDialog};
|
|
3
3
|
//# sourceMappingURL=confirm-dialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-dialog.js","sources":["../../../src/components/confirm-dialog/confirm-dialog.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n AlertDialog,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogHeader,\n AlertDialogCancel,\n AlertDialogAction,\n AlertDialogFooter,\n AlertDialogContent,\n} from '../ui/alert-dialog';\n\ninterface Props {\n title: string;\n description: React.ReactNode;\n onSubmit: () => Promise<void> | void;\n onCancel?: () => void;\n // Optional external state control - if not provided, manages state internally\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n variant: React.ComponentProps<typeof AlertDialogAction>['variant'];\n cancelText: string;\n submitText: string;\n loadingText?: string;\n zIndex?: number; // z-index of the dialog\n}\n\nexport interface ConfirmDialogRef {\n open: () => void;\n close: () => void;\n}\n\nexport const ConfirmDialog = React.forwardRef<ConfirmDialogRef, Props>(\n (\n {\n title,\n description,\n onSubmit,\n onCancel,\n open: externalOpen,\n onOpenChange: externalOnOpenChange,\n variant,\n cancelText,\n submitText,\n loadingText,\n zIndex = 50,\n },\n ref,\n ) => {\n const
|
|
1
|
+
{"version":3,"file":"confirm-dialog.js","sources":["../../../src/components/confirm-dialog/confirm-dialog.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n AlertDialog,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogHeader,\n AlertDialogCancel,\n AlertDialogAction,\n AlertDialogFooter,\n AlertDialogContent,\n} from '../ui/alert-dialog';\n\ninterface Props {\n title: string;\n description: React.ReactNode;\n onSubmit: () => Promise<void> | void;\n onCancel?: () => void;\n // Optional external state control - if not provided, manages state internally\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n variant: React.ComponentProps<typeof AlertDialogAction>['variant'];\n cancelText: string;\n submitText: string;\n loadingText?: string;\n zIndex?: number; // z-index of the dialog\n}\n\nexport interface ConfirmDialogRef {\n open: () => void;\n close: () => void;\n}\n\nexport const ConfirmDialog = React.forwardRef<ConfirmDialogRef, Props>(\n (\n {\n title,\n description,\n onSubmit,\n onCancel,\n open: externalOpen,\n onOpenChange: externalOnOpenChange,\n variant,\n cancelText,\n submitText,\n loadingText,\n zIndex = 50,\n },\n ref,\n ) => {\n const [isLoading, setIsLoading] = React.useState(false);\n\n // Internal state management (merged from useDialogState)\n const [internalOpen, setInternalOpen] = React.useState(false);\n\n // Use external state if provided, otherwise use internal state\n const isOpen = externalOpen ?? internalOpen;\n const setIsOpen = externalOnOpenChange ?? setInternalOpen;\n\n // Expose methods via ref for programmatic control\n React.useImperativeHandle(ref, () => ({\n open: () => setIsOpen(true),\n close: () => setIsOpen(false),\n }));\n\n const handleCancel = () => {\n if (isLoading) return; // Prevent cancel during loading\n onCancel?.();\n setIsOpen(false);\n };\n\n const handleSubmit = async () => {\n if (isLoading) return; // Prevent double submission\n\n setIsLoading(true);\n try {\n await onSubmit();\n setIsOpen(false); // Close dialog after successful submission\n } finally {\n setIsLoading(false);\n }\n };\n\n return (\n <AlertDialog open={isOpen} onOpenChange={setIsOpen}>\n <AlertDialogContent zIndex={zIndex}>\n <AlertDialogHeader>\n <AlertDialogTitle>{title}</AlertDialogTitle>\n <AlertDialogDescription>{description}</AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel onClick={handleCancel} disabled={isLoading}>\n {cancelText}\n </AlertDialogCancel>\n <AlertDialogAction variant={variant} onClick={handleSubmit} disabled={isLoading}>\n {isLoading ? loadingText || submitText : submitText}\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n );\n },\n);\n\nConfirmDialog.displayName = 'ConfirmDialog';\n"],"names":["ConfirmDialog","React","forwardRef","title","description","onSubmit","onCancel","open","externalOpen","onOpenChange","externalOnOpenChange","variant","cancelText","submitText","loadingText","zIndex","ref","isLoading","setIsLoading","useState","internalOpen","setInternalOpen","isOpen","setIsOpen","useImperativeHandle","close","AlertDialog","AlertDialogContent","AlertDialogHeader","createElement","AlertDialogTitle","AlertDialogDescription","AlertDialogFooter","AlertDialogCancel","onClick","disabled","AlertDialogAction","async","displayName"],"mappings":"8OAiCO,MAAMA,EAAgBC,EAAMC,WACjC,EAEIC,QACAC,cACAC,WACAC,WACAC,KAAMC,EACNC,aAAcC,EACdC,UACAC,aACAC,aACAC,cACAC,SAAS,IAEXC,KAEA,MAAOC,EAAWC,GAAgBjB,EAAMkB,UAAS,IAG1CC,EAAcC,GAAmBpB,EAAMkB,UAAS,GAGjDG,EAASd,GAAgBY,EACzBG,EAAYb,GAAwBW,EAG1CpB,EAAMuB,oBAAoBR,EAAK,KAAA,CAC7BT,KAAM,IAAMgB,GAAU,GACtBE,MAAO,IAAMF,GAAU;AAqBzB,uBACGG,EAAA,CAAYnB,KAAMe,EAAQb,aAAcc,kCACtCI,EAAA,CAAmBZ,yCACjBa,EAAA,oBACC3B,EAAA4B,cAACC,OAAkB3B,kCAClB4B,EAAA,KAAwB3B,mBAE3BH,EAAA4B,cAACG,sBACC/B,EAAA4B,cAACI,EAAA,CAAkBC,QA1BN,KACfjB,IACJX,MACAiB,GAAU,KAuBsCY,SAAUlB,GACjDL,kCAEFwB,EAAA,CAAkBzB,UAAkBuB,QAvBxBG,UACnB,IAAIpB,EAAJ,CAEAC,GAAa,GACb,UACQb,IACNkB,GAAU,EACZ,CAAA,QACEL,GAAa,EACf,CARe,GAsBmDiB,SAAUlB,GACnEA,GAAYH,GAA4BD,QASvDb,EAAcsC,YAAc"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import*as e from"react";import*as a from"@radix-ui/react-alert-dialog";import{c as t}from"../../chunks/utils.DtKoarLP.js";import{b as s}from"../../chunks/button.C7qRaFMP.js";const l=e.createContext({}),o=e.forwardRef(({onOpenChange:t,...s},o)=>{const n=e.useCallback(()=>{t?.(!1)},[t]);/* @__PURE__ */
|
|
2
|
-
return e.createElement(l.Provider,{value:{onClose:n}},/* @__PURE__ */e.createElement(a.Root,{onOpenChange:t,...s}))});o.displayName=a.Root.displayName;const n=a.Trigger,r=a.Portal,d=e.forwardRef(({className:s,zIndex:l,...
|
|
2
|
+
return e.createElement(l.Provider,{value:{onClose:n}},/* @__PURE__ */e.createElement(a.Root,{onOpenChange:t,...s}))});o.displayName=a.Root.displayName;const n=a.Trigger,r=a.Portal,d=e.forwardRef(({className:s,zIndex:l,style:o,...n},r)=>/* @__PURE__ */e.createElement(a.Overlay,{className:t("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),style:null!=l?{...o,zIndex:l}:o,...n,ref:r}));d.displayName=a.Overlay.displayName;const c=e.forwardRef(({className:s,zIndex:l,style:o,...n},c)=>/* @__PURE__ */e.createElement(r,null,/* @__PURE__ */e.createElement(d,{zIndex:l}),/* @__PURE__ */e.createElement(a.Content,{ref:c,className:t("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border border-border bg-background p-0 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-md",s),style:null!=l?{...o,zIndex:l}:o,...n})));c.displayName=a.Content.displayName;const i=({className:a,...s})=>/* @__PURE__ */e.createElement("div",{className:t("flex flex-col text-center sm:text-left",a),...s});i.displayName="AlertDialogHeader";const m=({className:a,...s})=>/* @__PURE__ */e.createElement("div",{className:t("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 pb-4 px-4",a),...s});m.displayName="AlertDialogFooter";const f=e.forwardRef(({className:s,...l},o)=>/* @__PURE__ */e.createElement(a.Title,{ref:o,className:t("text-lg font-medium px-4 my-0 h-12 flex items-center",s),...l}));f.displayName=a.Title.displayName;const p=e.forwardRef(({className:s,...l},o)=>/* @__PURE__ */e.createElement(a.Description,{ref:o,className:t("text-sm px-4 py-3 my-0",s),...l}));p.displayName=a.Description.displayName;const N=e.forwardRef(({className:o,variant:n,asChild:r,onClick:d,...c},i)=>{const{onClose:m}=e.useContext(l),f=e.useCallback(async e=>{if(!d)return;const a=d(e);if(null!=(t=a)&&"object"==typeof t&&"then"in t){e.preventDefault();try{await a,m?.()}catch(s){console.error("AlertDialogAction onClick failed:",s)}}var t},[d,m]);/* @__PURE__ */
|
|
3
3
|
return e.createElement(a.Action,{ref:i,className:t(s({variant:n}),o),onClick:f,...c})});N.displayName=a.Action.displayName;const u=e.forwardRef(({className:l,variant:o,...n},r)=>/* @__PURE__ */e.createElement(a.Cancel,{ref:r,className:t(s({variant:o||"link"}),"mt-2 sm:mt-0 text-foreground",l),...n}));u.displayName=a.Cancel.displayName;export{o as AlertDialog,N as AlertDialogAction,u as AlertDialogCancel,c as AlertDialogContent,p as AlertDialogDescription,m as AlertDialogFooter,i as AlertDialogHeader,d as AlertDialogOverlay,r as AlertDialogPortal,f as AlertDialogTitle,n as AlertDialogTrigger};
|
|
4
4
|
//# sourceMappingURL=alert-dialog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-dialog.js","sources":["../../../../src/components/ui/alert-dialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\nimport { VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\nimport { buttonVariants } from '@/components/ui/button';\n\n// Context to provide dialog close function\nconst AlertDialogContext = React.createContext<{\n onClose?: () => void;\n}>({});\n\nconst AlertDialog = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Root>\n>(({ onOpenChange, ...props }, _ref) => {\n const handleClose = React.useCallback(() => {\n onOpenChange?.(false);\n }, [onOpenChange]);\n\n return (\n <AlertDialogContext.Provider value={{ onClose: handleClose }}>\n <AlertDialogPrimitive.Root onOpenChange={onOpenChange} {...props} />\n </AlertDialogContext.Provider>\n );\n});\nAlertDialog.displayName = AlertDialogPrimitive.Root.displayName;\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay> & {\n zIndex?:
|
|
1
|
+
{"version":3,"file":"alert-dialog.js","sources":["../../../../src/components/ui/alert-dialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\nimport { VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\nimport { buttonVariants } from '@/components/ui/button';\n\n// Context to provide dialog close function\nconst AlertDialogContext = React.createContext<{\n onClose?: () => void;\n}>({});\n\nconst AlertDialog = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Root>\n>(({ onOpenChange, ...props }, _ref) => {\n const handleClose = React.useCallback(() => {\n onOpenChange?.(false);\n }, [onOpenChange]);\n\n return (\n <AlertDialogContext.Provider value={{ onClose: handleClose }}>\n <AlertDialogPrimitive.Root onOpenChange={onOpenChange} {...props} />\n </AlertDialogContext.Provider>\n );\n});\nAlertDialog.displayName = AlertDialogPrimitive.Root.displayName;\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay> & {\n zIndex?: number;\n }\n>(({ className, zIndex, style, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className,\n )}\n style={zIndex != null ? { ...style, zIndex } : style}\n {...props}\n ref={ref}\n />\n));\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\n\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content> & {\n zIndex?: number;\n }\n>(({ className, zIndex, style, ...props }, ref) => (\n <AlertDialogPortal>\n <AlertDialogOverlay zIndex={zIndex} />\n <AlertDialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border border-border bg-background p-0 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-md',\n className,\n )}\n style={zIndex != null ? { ...style, zIndex } : style}\n {...props}\n />\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col text-center sm:text-left', className)} {...props} />\n);\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 pb-4 px-4', className)}\n {...props}\n />\n);\nAlertDialogFooter.displayName = 'AlertDialogFooter';\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-medium px-4 my-0 h-12 flex items-center', className)}\n {...props}\n />\n));\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Description ref={ref} className={cn('text-sm px-4 py-3 my-0', className)} {...props} />\n));\nAlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }\n>(({ className, variant, asChild, onClick, ...props }, ref) => {\n const { onClose } = React.useContext(AlertDialogContext);\n\n const handleClick = React.useCallback(\n async (event: React.MouseEvent<HTMLButtonElement>) => {\n if (!onClick) return;\n\n const result = onClick(event);\n const isPromise = (value: unknown): value is Promise<unknown> =>\n value != null && typeof value === 'object' && 'then' in value;\n\n if (isPromise(result)) {\n event.preventDefault();\n try {\n await result;\n onClose?.();\n } catch (error) {\n console.error('AlertDialogAction onClick failed:', error);\n }\n }\n },\n [onClick, onClose],\n );\n\n if (asChild) {\n return (\n <AlertDialogPrimitive.Action\n ref={ref}\n className={cn(buttonVariants({ variant }), className)}\n onClick={handleClick}\n {...props}\n />\n );\n }\n\n return (\n <AlertDialogPrimitive.Action\n ref={ref}\n className={cn(buttonVariants({ variant }), className)}\n onClick={handleClick}\n {...props}\n />\n );\n});\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel> & VariantProps<typeof buttonVariants>\n>(({ className, variant, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel\n ref={ref}\n className={cn(buttonVariants({ variant: variant || 'link' }), 'mt-2 sm:mt-0 text-foreground', className)}\n {...props}\n />\n));\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n"],"names":["AlertDialogContext","React","createContext","AlertDialog","forwardRef","onOpenChange","props","_ref","handleClose","useCallback","Provider","value","onClose","createElement","AlertDialogPrimitive","Root","displayName","AlertDialogTrigger","Trigger","AlertDialogPortal","Portal","AlertDialogOverlay","className","zIndex","style","ref","Overlay","cn","AlertDialogContent","Content","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","Title","AlertDialogDescription","Description","AlertDialogAction","variant","asChild","onClick","useContext","handleClick","async","event","result","preventDefault","error","console","Action","buttonVariants","AlertDialogCancel","Cancel"],"mappings":"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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -273,7 +273,7 @@ export declare const AlertDialogCancel: React_2.ForwardRefExoticComponent<Omit<A
|
|
|
273
273
|
} & ClassProp) | undefined) => string> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
274
274
|
|
|
275
275
|
export declare const AlertDialogContent: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
276
|
-
zIndex?:
|
|
276
|
+
zIndex?: number;
|
|
277
277
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
278
278
|
|
|
279
279
|
export declare const AlertDialogDescription: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React_2.RefAttributes<HTMLParagraphElement>, "ref"> & React_2.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -289,7 +289,7 @@ export declare const AlertDialogHeader: {
|
|
|
289
289
|
};
|
|
290
290
|
|
|
291
291
|
export declare const AlertDialogOverlay: React_2.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
292
|
-
zIndex?:
|
|
292
|
+
zIndex?: number;
|
|
293
293
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
294
294
|
|
|
295
295
|
export declare const AlertDialogPortal: React_2.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|