hazo_ui 2.6.5 → 2.7.0
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/README.md +130 -0
- package/dist/index.cjs +176 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +176 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -693,6 +693,34 @@ interface HazoUiDialogProps {
|
|
|
693
693
|
*/
|
|
694
694
|
declare function HazoUiDialog({ open, onOpenChange, children, onConfirm, onCancel, title, description, actionButtonText, actionButtonVariant, cancelButtonText, showCancelButton, actionButtonLoading, actionButtonDisabled, actionButtonIcon, footerContent, sizeWidth, sizeHeight, fixedSize, openAnimation, closeAnimation, variant, splitHeader, headerBackgroundColor, descriptionBackgroundColor, headerTextColor, bodyBackgroundColor, footerBackgroundColor, borderColor, accentColor, headerBar, headerBarColor, className, contentClassName, overlayClassName, headerClassName, footerClassName, showCloseButton, }: HazoUiDialogProps): react_jsx_runtime.JSX.Element;
|
|
695
695
|
|
|
696
|
+
type ConfirmDialogVariant = 'default' | 'destructive' | 'warning' | 'info' | 'success';
|
|
697
|
+
interface HazoUiConfirmDialogProps {
|
|
698
|
+
open: boolean;
|
|
699
|
+
onOpenChange: (open: boolean) => void;
|
|
700
|
+
title: string;
|
|
701
|
+
description?: string;
|
|
702
|
+
children?: React.ReactNode;
|
|
703
|
+
variant?: ConfirmDialogVariant;
|
|
704
|
+
confirmLabel?: string;
|
|
705
|
+
cancelLabel?: string;
|
|
706
|
+
showCancelButton?: boolean;
|
|
707
|
+
onConfirm: () => void | Promise<void>;
|
|
708
|
+
onCancel?: () => void;
|
|
709
|
+
loading?: boolean;
|
|
710
|
+
disabled?: boolean;
|
|
711
|
+
accentColor?: string;
|
|
712
|
+
confirmButtonColor?: string;
|
|
713
|
+
openAnimation?: AnimationPreset | string;
|
|
714
|
+
closeAnimation?: AnimationPreset | string;
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* HazoUiConfirmDialog Component
|
|
718
|
+
*
|
|
719
|
+
* A compact, opinionated confirmation dialog with variant-driven styling,
|
|
720
|
+
* accent top border, and async loading support.
|
|
721
|
+
*/
|
|
722
|
+
declare function HazoUiConfirmDialog({ open, onOpenChange, title, description, children, variant, confirmLabel, cancelLabel, showCancelButton, onConfirm, onCancel, loading: external_loading, disabled, accentColor, confirmButtonColor, openAnimation, closeAnimation, }: HazoUiConfirmDialogProps): react_jsx_runtime.JSX.Element;
|
|
723
|
+
|
|
696
724
|
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
697
725
|
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
698
726
|
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
@@ -710,4 +738,4 @@ declare const DialogFooter: {
|
|
|
710
738
|
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
711
739
|
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
712
740
|
|
|
713
|
-
export { type AnimationPreset, type BaseCommandInputProps, type CommandEditContext, type CommandItem, CommandNodeExtension, CommandPill, type CommandPillProps, CommandPopover, type CommandPopoverProps, type CommandTextOutput, type DialogVariant, type FilterConfig, type FilterField, type HazoUiConfig, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, type HazoUiDialogProps, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiFlexInput, type HazoUiFlexInputProps, HazoUiFlexRadio, type HazoUiFlexRadioItem, type HazoUiFlexRadioProps, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiRte, type HazoUiRteProps, HazoUiTextarea, type HazoUiTextareaProps, HazoUiTextbox, type HazoUiTextboxProps, type InsertedCommand, type PrefixColor, type PrefixConfig, type RteAttachment, type RteOutput, type RteVariable, type SortConfig, type SortField, type SuggestionState, create_command_suggestion_extension, get_hazo_ui_config, parse_commands_from_text, reset_hazo_ui_config, set_hazo_ui_config, text_to_tiptap_content };
|
|
741
|
+
export { type AnimationPreset, type BaseCommandInputProps, type CommandEditContext, type CommandItem, CommandNodeExtension, CommandPill, type CommandPillProps, CommandPopover, type CommandPopoverProps, type CommandTextOutput, type ConfirmDialogVariant, type DialogVariant, type FilterConfig, type FilterField, type HazoUiConfig, HazoUiConfirmDialog, type HazoUiConfirmDialogProps, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, type HazoUiDialogProps, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiFlexInput, type HazoUiFlexInputProps, HazoUiFlexRadio, type HazoUiFlexRadioItem, type HazoUiFlexRadioProps, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiRte, type HazoUiRteProps, HazoUiTextarea, type HazoUiTextareaProps, HazoUiTextbox, type HazoUiTextboxProps, type InsertedCommand, type PrefixColor, type PrefixConfig, type RteAttachment, type RteOutput, type RteVariable, type SortConfig, type SortField, type SuggestionState, create_command_suggestion_extension, get_hazo_ui_config, parse_commands_from_text, reset_hazo_ui_config, set_hazo_ui_config, text_to_tiptap_content };
|
package/dist/index.d.ts
CHANGED
|
@@ -693,6 +693,34 @@ interface HazoUiDialogProps {
|
|
|
693
693
|
*/
|
|
694
694
|
declare function HazoUiDialog({ open, onOpenChange, children, onConfirm, onCancel, title, description, actionButtonText, actionButtonVariant, cancelButtonText, showCancelButton, actionButtonLoading, actionButtonDisabled, actionButtonIcon, footerContent, sizeWidth, sizeHeight, fixedSize, openAnimation, closeAnimation, variant, splitHeader, headerBackgroundColor, descriptionBackgroundColor, headerTextColor, bodyBackgroundColor, footerBackgroundColor, borderColor, accentColor, headerBar, headerBarColor, className, contentClassName, overlayClassName, headerClassName, footerClassName, showCloseButton, }: HazoUiDialogProps): react_jsx_runtime.JSX.Element;
|
|
695
695
|
|
|
696
|
+
type ConfirmDialogVariant = 'default' | 'destructive' | 'warning' | 'info' | 'success';
|
|
697
|
+
interface HazoUiConfirmDialogProps {
|
|
698
|
+
open: boolean;
|
|
699
|
+
onOpenChange: (open: boolean) => void;
|
|
700
|
+
title: string;
|
|
701
|
+
description?: string;
|
|
702
|
+
children?: React.ReactNode;
|
|
703
|
+
variant?: ConfirmDialogVariant;
|
|
704
|
+
confirmLabel?: string;
|
|
705
|
+
cancelLabel?: string;
|
|
706
|
+
showCancelButton?: boolean;
|
|
707
|
+
onConfirm: () => void | Promise<void>;
|
|
708
|
+
onCancel?: () => void;
|
|
709
|
+
loading?: boolean;
|
|
710
|
+
disabled?: boolean;
|
|
711
|
+
accentColor?: string;
|
|
712
|
+
confirmButtonColor?: string;
|
|
713
|
+
openAnimation?: AnimationPreset | string;
|
|
714
|
+
closeAnimation?: AnimationPreset | string;
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* HazoUiConfirmDialog Component
|
|
718
|
+
*
|
|
719
|
+
* A compact, opinionated confirmation dialog with variant-driven styling,
|
|
720
|
+
* accent top border, and async loading support.
|
|
721
|
+
*/
|
|
722
|
+
declare function HazoUiConfirmDialog({ open, onOpenChange, title, description, children, variant, confirmLabel, cancelLabel, showCancelButton, onConfirm, onCancel, loading: external_loading, disabled, accentColor, confirmButtonColor, openAnimation, closeAnimation, }: HazoUiConfirmDialogProps): react_jsx_runtime.JSX.Element;
|
|
723
|
+
|
|
696
724
|
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
697
725
|
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
698
726
|
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
@@ -710,4 +738,4 @@ declare const DialogFooter: {
|
|
|
710
738
|
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
711
739
|
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
712
740
|
|
|
713
|
-
export { type AnimationPreset, type BaseCommandInputProps, type CommandEditContext, type CommandItem, CommandNodeExtension, CommandPill, type CommandPillProps, CommandPopover, type CommandPopoverProps, type CommandTextOutput, type DialogVariant, type FilterConfig, type FilterField, type HazoUiConfig, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, type HazoUiDialogProps, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiFlexInput, type HazoUiFlexInputProps, HazoUiFlexRadio, type HazoUiFlexRadioItem, type HazoUiFlexRadioProps, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiRte, type HazoUiRteProps, HazoUiTextarea, type HazoUiTextareaProps, HazoUiTextbox, type HazoUiTextboxProps, type InsertedCommand, type PrefixColor, type PrefixConfig, type RteAttachment, type RteOutput, type RteVariable, type SortConfig, type SortField, type SuggestionState, create_command_suggestion_extension, get_hazo_ui_config, parse_commands_from_text, reset_hazo_ui_config, set_hazo_ui_config, text_to_tiptap_content };
|
|
741
|
+
export { type AnimationPreset, type BaseCommandInputProps, type CommandEditContext, type CommandItem, CommandNodeExtension, CommandPill, type CommandPillProps, CommandPopover, type CommandPopoverProps, type CommandTextOutput, type ConfirmDialogVariant, type DialogVariant, type FilterConfig, type FilterField, type HazoUiConfig, HazoUiConfirmDialog, type HazoUiConfirmDialogProps, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, type HazoUiDialogProps, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiFlexInput, type HazoUiFlexInputProps, HazoUiFlexRadio, type HazoUiFlexRadioItem, type HazoUiFlexRadioProps, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiRte, type HazoUiRteProps, HazoUiTextarea, type HazoUiTextareaProps, HazoUiTextbox, type HazoUiTextboxProps, type InsertedCommand, type PrefixColor, type PrefixConfig, type RteAttachment, type RteOutput, type RteVariable, type SortConfig, type SortField, type SuggestionState, create_command_suggestion_extension, get_hazo_ui_config, parse_commands_from_text, reset_hazo_ui_config, set_hazo_ui_config, text_to_tiptap_content };
|
package/dist/index.js
CHANGED
|
@@ -282,6 +282,7 @@ var DialogTitle = React27.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
282
282
|
ref,
|
|
283
283
|
className: cn(
|
|
284
284
|
"text-lg font-semibold leading-none tracking-tight",
|
|
285
|
+
"break-words [overflow-wrap:anywhere]",
|
|
285
286
|
className
|
|
286
287
|
),
|
|
287
288
|
...props
|
|
@@ -6334,7 +6335,7 @@ function HazoUiDialog({
|
|
|
6334
6335
|
/* @__PURE__ */ jsx(
|
|
6335
6336
|
"div",
|
|
6336
6337
|
{
|
|
6337
|
-
className: "cls_dialog_header_title px-6 pt-6 pb-3",
|
|
6338
|
+
className: cn("cls_dialog_header_title px-6 pt-6 pb-3", showCloseButton && "pr-10"),
|
|
6338
6339
|
style: {
|
|
6339
6340
|
...finalHeaderBackgroundColor && { backgroundColor: finalHeaderBackgroundColor },
|
|
6340
6341
|
...finalHeaderTextColor && { color: finalHeaderTextColor }
|
|
@@ -6365,6 +6366,7 @@ function HazoUiDialog({
|
|
|
6365
6366
|
"cls_dialog_header shrink-0",
|
|
6366
6367
|
!headerBar && "p-6 pb-4",
|
|
6367
6368
|
has_merged_variant_header && "pb-3",
|
|
6369
|
+
showCloseButton && "pr-10",
|
|
6368
6370
|
headerClassName
|
|
6369
6371
|
),
|
|
6370
6372
|
style: headerStyles,
|
|
@@ -6447,7 +6449,179 @@ function HazoUiDialog({
|
|
|
6447
6449
|
)
|
|
6448
6450
|
] }) });
|
|
6449
6451
|
}
|
|
6452
|
+
var CONFIRM_VARIANT_PRESETS = {
|
|
6453
|
+
destructive: {
|
|
6454
|
+
accent_color: "rgb(220, 38, 38)",
|
|
6455
|
+
confirm_button_color: "rgb(220, 38, 38)",
|
|
6456
|
+
overlay_class_name: "bg-red-950/50"
|
|
6457
|
+
},
|
|
6458
|
+
warning: {
|
|
6459
|
+
accent_color: "rgb(245, 158, 11)",
|
|
6460
|
+
confirm_button_color: "rgb(245, 158, 11)",
|
|
6461
|
+
overlay_class_name: "bg-yellow-950/50"
|
|
6462
|
+
},
|
|
6463
|
+
info: {
|
|
6464
|
+
accent_color: "rgb(37, 99, 235)",
|
|
6465
|
+
confirm_button_color: "rgb(37, 99, 235)",
|
|
6466
|
+
overlay_class_name: "bg-blue-950/50"
|
|
6467
|
+
},
|
|
6468
|
+
success: {
|
|
6469
|
+
accent_color: "rgb(22, 163, 74)",
|
|
6470
|
+
confirm_button_color: "rgb(22, 163, 74)",
|
|
6471
|
+
overlay_class_name: "bg-green-950/50"
|
|
6472
|
+
}
|
|
6473
|
+
};
|
|
6474
|
+
var ANIMATION_PRESETS2 = {
|
|
6475
|
+
zoom: { open: "animate-dialog-zoom", close: "animate-dialog-zoom" },
|
|
6476
|
+
slide: { open: "animate-dialog-slide-bottom", close: "animate-dialog-slide-bottom" },
|
|
6477
|
+
fade: { open: "animate-dialog-fade", close: "animate-dialog-fade" },
|
|
6478
|
+
bounce: { open: "animate-dialog-bounce", close: "animate-dialog-bounce" },
|
|
6479
|
+
"scale-up": { open: "animate-dialog-scale", close: "animate-dialog-scale" },
|
|
6480
|
+
flip: { open: "animate-dialog-flip", close: "animate-dialog-flip" },
|
|
6481
|
+
"slide-left": { open: "animate-dialog-slide-left", close: "animate-dialog-slide-left" },
|
|
6482
|
+
"slide-right": { open: "animate-dialog-slide-right", close: "animate-dialog-slide-right" },
|
|
6483
|
+
"slide-top": { open: "animate-dialog-slide-top", close: "animate-dialog-slide-top" },
|
|
6484
|
+
none: { open: "", close: "" }
|
|
6485
|
+
};
|
|
6486
|
+
function resolve_animation_classes(open_anim = "zoom", close_anim = "zoom") {
|
|
6487
|
+
const open_classes = open_anim in ANIMATION_PRESETS2 ? ANIMATION_PRESETS2[open_anim].open : open_anim;
|
|
6488
|
+
const close_classes = close_anim in ANIMATION_PRESETS2 ? ANIMATION_PRESETS2[close_anim].close : close_anim;
|
|
6489
|
+
return `${open_classes} ${close_classes}`;
|
|
6490
|
+
}
|
|
6491
|
+
function HazoUiConfirmDialog({
|
|
6492
|
+
open,
|
|
6493
|
+
onOpenChange,
|
|
6494
|
+
title,
|
|
6495
|
+
description,
|
|
6496
|
+
children,
|
|
6497
|
+
variant = "default",
|
|
6498
|
+
confirmLabel,
|
|
6499
|
+
cancelLabel = "Cancel",
|
|
6500
|
+
showCancelButton = true,
|
|
6501
|
+
onConfirm,
|
|
6502
|
+
onCancel,
|
|
6503
|
+
loading: external_loading,
|
|
6504
|
+
disabled = false,
|
|
6505
|
+
accentColor,
|
|
6506
|
+
confirmButtonColor,
|
|
6507
|
+
openAnimation = "zoom",
|
|
6508
|
+
closeAnimation = "zoom"
|
|
6509
|
+
}) {
|
|
6510
|
+
const [internal_loading, set_internal_loading] = React27.useState(false);
|
|
6511
|
+
const config = get_hazo_ui_config();
|
|
6512
|
+
const variant_preset = variant !== "default" ? CONFIRM_VARIANT_PRESETS[variant] : void 0;
|
|
6513
|
+
const is_loading = external_loading ?? internal_loading;
|
|
6514
|
+
const resolved_confirm_label = confirmLabel ?? (showCancelButton ? "Confirm" : "OK");
|
|
6515
|
+
const resolved_accent_color = accentColor ?? variant_preset?.accent_color ?? "rgb(148, 163, 184)";
|
|
6516
|
+
const resolved_confirm_button_color = confirmButtonColor ?? variant_preset?.confirm_button_color ?? config.submit_button_background_color;
|
|
6517
|
+
const cancel_button_styles = {
|
|
6518
|
+
...config.cancel_button_background_color && { backgroundColor: config.cancel_button_background_color },
|
|
6519
|
+
...config.cancel_button_text_color && { color: config.cancel_button_text_color },
|
|
6520
|
+
...config.cancel_button_border_color && { borderColor: config.cancel_button_border_color }
|
|
6521
|
+
};
|
|
6522
|
+
const confirm_button_styles = {
|
|
6523
|
+
...resolved_confirm_button_color && {
|
|
6524
|
+
backgroundColor: resolved_confirm_button_color,
|
|
6525
|
+
borderColor: resolved_confirm_button_color,
|
|
6526
|
+
color: "white"
|
|
6527
|
+
}
|
|
6528
|
+
};
|
|
6529
|
+
const animation_classes = resolve_animation_classes(openAnimation, closeAnimation);
|
|
6530
|
+
const handle_confirm = async () => {
|
|
6531
|
+
try {
|
|
6532
|
+
const result = onConfirm();
|
|
6533
|
+
if (result instanceof Promise) {
|
|
6534
|
+
set_internal_loading(true);
|
|
6535
|
+
await result;
|
|
6536
|
+
}
|
|
6537
|
+
onOpenChange(false);
|
|
6538
|
+
} catch {
|
|
6539
|
+
} finally {
|
|
6540
|
+
set_internal_loading(false);
|
|
6541
|
+
}
|
|
6542
|
+
};
|
|
6543
|
+
const handle_cancel = () => {
|
|
6544
|
+
onCancel?.();
|
|
6545
|
+
onOpenChange(false);
|
|
6546
|
+
};
|
|
6547
|
+
const cancel_ref = React27.useRef(null);
|
|
6548
|
+
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
6549
|
+
/* @__PURE__ */ jsx(
|
|
6550
|
+
DialogOverlay,
|
|
6551
|
+
{
|
|
6552
|
+
className: cn(
|
|
6553
|
+
"cls_confirm_dialog_overlay",
|
|
6554
|
+
variant_preset?.overlay_class_name
|
|
6555
|
+
),
|
|
6556
|
+
style: { backdropFilter: "blur(4px)" }
|
|
6557
|
+
}
|
|
6558
|
+
),
|
|
6559
|
+
/* @__PURE__ */ jsxs(
|
|
6560
|
+
DialogPrimitive.Content,
|
|
6561
|
+
{
|
|
6562
|
+
className: cn(
|
|
6563
|
+
"cls_confirm_dialog_content",
|
|
6564
|
+
"fixed left-[50%] top-[50%] z-50",
|
|
6565
|
+
"translate-x-[-50%] translate-y-[-50%]",
|
|
6566
|
+
"bg-background shadow-lg",
|
|
6567
|
+
"duration-200",
|
|
6568
|
+
animation_classes,
|
|
6569
|
+
"overflow-hidden",
|
|
6570
|
+
"focus:outline-none"
|
|
6571
|
+
),
|
|
6572
|
+
style: {
|
|
6573
|
+
width: "min(90vw, 420px)",
|
|
6574
|
+
borderRadius: "12px",
|
|
6575
|
+
borderTop: `4px solid ${resolved_accent_color}`,
|
|
6576
|
+
boxShadow: "0 20px 60px rgba(0,0,0,0.15)"
|
|
6577
|
+
},
|
|
6578
|
+
onOpenAutoFocus: (e) => {
|
|
6579
|
+
if ((variant === "destructive" || variant === "warning") && showCancelButton && cancel_ref.current) {
|
|
6580
|
+
e.preventDefault();
|
|
6581
|
+
cancel_ref.current.focus();
|
|
6582
|
+
}
|
|
6583
|
+
},
|
|
6584
|
+
children: [
|
|
6585
|
+
/* @__PURE__ */ jsxs("div", { className: "cls_confirm_dialog_body px-6 pt-7 pb-5", children: [
|
|
6586
|
+
/* @__PURE__ */ jsx(DialogPrimitive.Title, { className: "cls_confirm_dialog_title text-[17px] font-semibold text-foreground mb-2.5", children: title }),
|
|
6587
|
+
children ? /* @__PURE__ */ jsx(DialogPrimitive.Description, { asChild: true, children: /* @__PURE__ */ jsx("div", { className: "cls_confirm_dialog_children text-sm text-muted-foreground leading-relaxed", children }) }) : description ? /* @__PURE__ */ jsx(DialogPrimitive.Description, { className: "cls_confirm_dialog_description text-sm text-muted-foreground leading-relaxed", children: description }) : null
|
|
6588
|
+
] }),
|
|
6589
|
+
/* @__PURE__ */ jsx("div", { className: "cls_confirm_dialog_separator border-t border-border" }),
|
|
6590
|
+
/* @__PURE__ */ jsxs("div", { className: "cls_confirm_dialog_actions px-6 py-4 flex justify-end gap-3", children: [
|
|
6591
|
+
showCancelButton && /* @__PURE__ */ jsx(
|
|
6592
|
+
Button,
|
|
6593
|
+
{
|
|
6594
|
+
ref: cancel_ref,
|
|
6595
|
+
type: "button",
|
|
6596
|
+
className: "cls_confirm_cancel_button",
|
|
6597
|
+
variant: "outline",
|
|
6598
|
+
onClick: handle_cancel,
|
|
6599
|
+
disabled: is_loading,
|
|
6600
|
+
style: cancel_button_styles,
|
|
6601
|
+
children: cancelLabel
|
|
6602
|
+
}
|
|
6603
|
+
),
|
|
6604
|
+
/* @__PURE__ */ jsxs(
|
|
6605
|
+
Button,
|
|
6606
|
+
{
|
|
6607
|
+
type: "button",
|
|
6608
|
+
className: "cls_confirm_action_button",
|
|
6609
|
+
onClick: handle_confirm,
|
|
6610
|
+
disabled: is_loading || disabled,
|
|
6611
|
+
style: confirm_button_styles,
|
|
6612
|
+
children: [
|
|
6613
|
+
is_loading && /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
|
|
6614
|
+
resolved_confirm_label
|
|
6615
|
+
]
|
|
6616
|
+
}
|
|
6617
|
+
)
|
|
6618
|
+
] })
|
|
6619
|
+
]
|
|
6620
|
+
}
|
|
6621
|
+
)
|
|
6622
|
+
] }) });
|
|
6623
|
+
}
|
|
6450
6624
|
|
|
6451
|
-
export { CommandNodeExtension, CommandPill, CommandPopover, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiFlexInput, HazoUiFlexRadio, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiRte, HazoUiTextarea, HazoUiTextbox, create_command_suggestion_extension, get_hazo_ui_config, parse_commands_from_text, reset_hazo_ui_config, set_hazo_ui_config, text_to_tiptap_content };
|
|
6625
|
+
export { CommandNodeExtension, CommandPill, CommandPopover, HazoUiConfirmDialog, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiFlexInput, HazoUiFlexRadio, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiRte, HazoUiTextarea, HazoUiTextbox, create_command_suggestion_extension, get_hazo_ui_config, parse_commands_from_text, reset_hazo_ui_config, set_hazo_ui_config, text_to_tiptap_content };
|
|
6452
6626
|
//# sourceMappingURL=index.js.map
|
|
6453
6627
|
//# sourceMappingURL=index.js.map
|