@collective-intelligence/ui-react 0.1.9 → 0.1.10

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.
@@ -746,11 +746,18 @@ export interface ConfirmDialogProps {
746
746
  confirmVariant?: "default" | "destructive";
747
747
  /** Label shown on the confirm button while `onConfirm` is pending. */
748
748
  pendingLabel?: string;
749
- /** Awaited before closing; the dialog stays open if it throws. */
750
- onConfirm: () => Promise<void> | void;
749
+ /** Shown between the header and the footer, for a failed confirm action. */
750
+ errorContent?: React$1.ReactNode;
751
+ /** Ignores a close request while `onConfirm` is pending. */
752
+ keepOpenWhilePending?: boolean;
753
+ /**
754
+ * Awaited before closing; the dialog stays open if it throws or resolves to
755
+ * `false`. Resolve to `false` when the caller shows the failure itself.
756
+ */
757
+ onConfirm: (() => Promise<void> | void) | (() => Promise<boolean> | boolean);
751
758
  }
752
759
  export declare const ConfirmDialog: {
753
- ({ open, onOpenChange, title, description, confirmLabel, cancelLabel, confirmVariant, pendingLabel, onConfirm }: ConfirmDialogProps): React$1.JSX.Element;
760
+ ({ open, onOpenChange, title, description, confirmLabel, cancelLabel, confirmVariant, pendingLabel, errorContent, keepOpenWhilePending, onConfirm }: ConfirmDialogProps): React$1.JSX.Element;
754
761
  displayName: string;
755
762
  };
756
763
  export interface StageHeaderProps extends React$1.HTMLAttributes<HTMLDivElement> {