@nccirtu/tablefy 0.7.4 → 0.7.5

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/index.js CHANGED
@@ -14,7 +14,7 @@ var badge = require('@/components/ui/badge');
14
14
  var checkbox = require('@/components/ui/checkbox');
15
15
  var tooltip = require('@/components/ui/tooltip');
16
16
  var progress = require('@/components/ui/progress');
17
- var dialog = require('@/components/ui/dialog');
17
+ var alertDialog = require('@/components/ui/alert-dialog');
18
18
 
19
19
  function DataTableHeader({ title, description, actions = [], search, searchValue = "", onSearchChange, table, selectedCount = 0, enableColumnVisibility = false, columnVisibilityLabel = "Spalten", className, }) {
20
20
  const normalActions = actions.filter((a) => !a.bulk && !a.hidden);
@@ -1752,7 +1752,10 @@ function ConfirmProvider({ children }) {
1752
1752
  setQueue((q) => q.slice(1));
1753
1753
  }
1754
1754
  };
1755
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [children, jsxRuntime.jsx(dialog.Dialog, { open: !!currentRequest, onOpenChange: (open) => !open && handleCancel(), children: jsxRuntime.jsxs(dialog.DialogContent, { children: [jsxRuntime.jsxs(dialog.DialogHeader, { children: [jsxRuntime.jsx(dialog.DialogTitle, { children: currentRequest?.options?.title || "Bestätigung erforderlich" }), currentRequest?.options?.description && (jsxRuntime.jsx(dialog.DialogDescription, { children: currentRequest.options.description }))] }), jsxRuntime.jsxs(dialog.DialogFooter, { children: [jsxRuntime.jsx(button.Button, { variant: "outline", onClick: handleCancel, children: currentRequest?.options.cancelLabel || "Abbrechen" }), jsxRuntime.jsx(button.Button, { variant: currentRequest?.options.variant || "default", onClick: handleConfirm, children: currentRequest?.options.confirmLabel || "Bestätigen" })] })] }) })] }));
1755
+ const { title, description, confirmLabel, cancelLabel, variant, icon, image, } = currentRequest?.options || {};
1756
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [children, jsxRuntime.jsx(alertDialog.AlertDialog, { open: !!currentRequest, onOpenChange: (open) => !open && handleCancel(), children: jsxRuntime.jsxs(alertDialog.AlertDialogContent, { className: "max-w-md", children: [jsxRuntime.jsxs(alertDialog.AlertDialogHeader, { children: [image && (jsxRuntime.jsx("div", { className: "mb-4 flex justify-center", children: jsxRuntime.jsx("img", { src: image, alt: "Confirmation", className: "h-24 w-24 object-contain" }) })), icon && !image && (jsxRuntime.jsx("div", { className: "mb-4 flex justify-center text-6xl", children: icon })), jsxRuntime.jsx(alertDialog.AlertDialogTitle, { className: "text-center", children: title || "Bestätigung erforderlich" }), description && (jsxRuntime.jsx(alertDialog.AlertDialogDescription, { className: "text-center", children: description }))] }), jsxRuntime.jsxs(alertDialog.AlertDialogFooter, { className: "sm:justify-center", children: [jsxRuntime.jsx(alertDialog.AlertDialogCancel, { onClick: handleCancel, children: cancelLabel || "Abbrechen" }), jsxRuntime.jsx(alertDialog.AlertDialogAction, { onClick: handleConfirm, className: variant === "destructive"
1757
+ ? "bg-destructive text-destructive-foreground hover:bg-destructive/90"
1758
+ : "", children: confirmLabel || "Bestätigen" })] })] }) })] }));
1756
1759
  }
1757
1760
 
1758
1761
  exports.AvatarGroupColumn = AvatarGroupColumn;