@ancatag/at-design 0.4.0 → 0.5.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.
@@ -0,0 +1,16 @@
1
+ export interface ConfirmDialogProps {
2
+ isOpen: boolean;
3
+ onClose: () => void;
4
+ onConfirm: () => void;
5
+ title: string;
6
+ description: string;
7
+ confirmText?: string;
8
+ cancelText?: string;
9
+ variant?: "default" | "danger";
10
+ }
11
+ /**
12
+ * Reusable confirmation dialog component
13
+ * Apple-style modal with backdrop blur and smooth animations
14
+ */
15
+ export declare function ConfirmDialog({ isOpen, onClose, onConfirm, title, description, confirmText, cancelText, variant, }: ConfirmDialogProps): import("react/jsx-runtime").JSX.Element | null;
16
+ //# sourceMappingURL=confirm-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../src/components/confirm-dialog.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IAClC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC7B,MAAM,EACN,OAAO,EACP,SAAS,EACT,KAAK,EACL,WAAW,EACX,WAAuB,EACvB,UAAqB,EACrB,OAAmB,GACnB,EAAE,kBAAkB,kDAsCpB"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../utils/cn";
3
+ /**
4
+ * Reusable confirmation dialog component
5
+ * Apple-style modal with backdrop blur and smooth animations
6
+ */
7
+ export function ConfirmDialog({ isOpen, onClose, onConfirm, title, description, confirmText = "Confirm", cancelText = "Cancel", variant = "default", }) {
8
+ if (!isOpen)
9
+ return null;
10
+ return (_jsx("div", { className: "fixed inset-0 z-[100] flex items-center justify-center bg-black/50 backdrop-blur-sm animate-in fade-in duration-200", children: _jsx("div", { className: "mx-4 w-full max-w-md rounded-3xl border border-border/50 bg-card p-6 shadow-2xl animate-in zoom-in-95 duration-200", children: _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx("h3", { className: "text-xl font-bold text-foreground", children: title }), _jsx("p", { className: "text-sm text-muted-foreground leading-relaxed", children: description })] }), _jsxs("div", { className: "flex gap-3", children: [_jsx("button", { type: "button", onClick: onClose, className: "flex-1 px-4 py-2.5 rounded-lg font-medium transition-colors border border-border hover:bg-muted text-foreground", children: cancelText }), _jsx("button", { type: "button", onClick: onConfirm, className: cn("flex-1 px-4 py-2.5 rounded-lg font-medium transition-colors", variant === "danger"
11
+ ? "bg-red-600 hover:bg-red-700 text-white"
12
+ : "bg-primary hover:bg-primary/90 text-primary-foreground"), children: confirmText })] })] }) }) }));
13
+ }
14
+ //# sourceMappingURL=confirm-dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"confirm-dialog.js","sourceRoot":"","sources":["../../src/components/confirm-dialog.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAajC;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,EAC7B,MAAM,EACN,OAAO,EACP,SAAS,EACT,KAAK,EACL,WAAW,EACX,WAAW,GAAG,SAAS,EACvB,UAAU,GAAG,QAAQ,EACrB,OAAO,GAAG,SAAS,GACC;IACpB,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,OAAO,CACN,cAAK,SAAS,EAAC,qHAAqH,YACnI,cAAK,SAAS,EAAC,oHAAoH,YAClI,eAAK,SAAS,EAAC,WAAW,aACzB,eAAK,SAAS,EAAC,WAAW,aACzB,aAAI,SAAS,EAAC,mCAAmC,YAAE,KAAK,GAAM,EAC9D,YAAG,SAAS,EAAC,+CAA+C,YAC1D,WAAW,GACT,IACC,EACN,eAAK,SAAS,EAAC,YAAY,aAC1B,iBACC,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,iHAAiH,YAE1H,UAAU,GACH,EACT,iBACC,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,SAAS,EAClB,SAAS,EAAE,EAAE,CACZ,6DAA6D,EAC7D,OAAO,KAAK,QAAQ;oCACnB,CAAC,CAAC,wCAAwC;oCAC1C,CAAC,CAAC,wDAAwD,CAC3D,YAEA,WAAW,GACJ,IACJ,IACD,GACD,GACD,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,13 @@
1
+ export interface MetricCardProps {
2
+ icon: string;
3
+ label: string;
4
+ value: string | number;
5
+ description?: string;
6
+ className?: string;
7
+ }
8
+ /**
9
+ * Reusable metric card component for displaying statistics
10
+ * Clean, minimal design with icon, label, value, and optional description
11
+ */
12
+ export declare function MetricCard({ icon, label, value, description, className, }: MetricCardProps): import("react/jsx-runtime").JSX.Element;
13
+ //# sourceMappingURL=stats-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stats-card.d.ts","sourceRoot":"","sources":["../../src/components/stats-card.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EAC1B,IAAI,EACJ,KAAK,EACL,KAAK,EACL,WAAW,EACX,SAAS,GACT,EAAE,eAAe,2CAoBjB"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "../utils/cn";
3
+ /**
4
+ * Reusable metric card component for displaying statistics
5
+ * Clean, minimal design with icon, label, value, and optional description
6
+ */
7
+ export function MetricCard({ icon, label, value, description, className, }) {
8
+ return (_jsxs("div", { className: cn("rounded-xl border border-border bg-card p-5 shadow-sm", className), children: [_jsxs("div", { className: "mb-2 flex items-center gap-2", children: [_jsx("span", { className: "text-2xl", children: icon }), _jsx("span", { className: "text-sm font-medium text-muted-foreground", children: label })] }), _jsx("div", { className: "text-2xl font-bold text-foreground", children: value }), description && (_jsx("div", { className: "mt-1 text-xs text-muted-foreground", children: description }))] }));
9
+ }
10
+ //# sourceMappingURL=stats-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stats-card.js","sourceRoot":"","sources":["../../src/components/stats-card.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAUjC;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,EAC1B,IAAI,EACJ,KAAK,EACL,KAAK,EACL,WAAW,EACX,SAAS,GACQ;IACjB,OAAO,CACN,eACC,SAAS,EAAE,EAAE,CACZ,uDAAuD,EACvD,SAAS,CACT,aAED,eAAK,SAAS,EAAC,8BAA8B,aAC5C,eAAM,SAAS,EAAC,UAAU,YAAE,IAAI,GAAQ,EACxC,eAAM,SAAS,EAAC,2CAA2C,YACzD,KAAK,GACA,IACF,EACN,cAAK,SAAS,EAAC,oCAAoC,YAAE,KAAK,GAAO,EAChE,WAAW,IAAI,CACf,cAAK,SAAS,EAAC,oCAAoC,YAAE,WAAW,GAAO,CACvE,IACI,CACN,CAAC;AACH,CAAC"}
@@ -1,6 +1,30 @@
1
- import type React from "react";
2
- import { Toaster as Sonner } from "sonner";
3
- type ToasterProps = React.ComponentProps<typeof Sonner>;
4
- declare const Toaster: ({ ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
5
- export { Toaster };
1
+ export interface ToastMessage {
2
+ id: string;
3
+ type: "error" | "warning" | "info" | "success";
4
+ message: string;
5
+ description?: string;
6
+ duration?: number;
7
+ }
8
+ interface ToastContainerProps {
9
+ toasts: ToastMessage[];
10
+ onClose: (id: string) => void;
11
+ }
12
+ /**
13
+ * Toast notification container
14
+ * Displays multiple toast notifications with proper positioning and animations
15
+ */
16
+ export declare function ToastContainer({ toasts, onClose }: ToastContainerProps): import("react/jsx-runtime").JSX.Element;
17
+ /**
18
+ * Toast manager hook for easy toast notifications
19
+ */
20
+ export declare function useToast(): {
21
+ toasts: ToastMessage[];
22
+ showToast: (message: string, type?: ToastMessage["type"], description?: string, duration?: number) => string;
23
+ closeToast: (id: string) => void;
24
+ error: (message: string, description?: string, duration?: number) => string;
25
+ warning: (message: string, description?: string, duration?: number) => string;
26
+ success: (message: string, description?: string, duration?: number) => string;
27
+ info: (message: string, description?: string, duration?: number) => string;
28
+ };
29
+ export {};
6
30
  //# sourceMappingURL=toast.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../src/components/toast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE3C,KAAK,YAAY,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;AAExD,QAAA,MAAM,OAAO,GAAI,cAAc,YAAY,4CAkB1C,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../src/components/toast.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,YAAY;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AA0ED,UAAU,mBAAmB;IAC5B,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,mBAAmB,2CAQtE;AAED;;GAEG;AACH,wBAAgB,QAAQ;;yBAKZ,MAAM,SACT,YAAY,CAAC,MAAM,CAAC,gBACZ,MAAM,aACT,MAAM;qBAiBuB,MAAM;qBAKrC,MAAM,gBAAgB,MAAM,aAAa,MAAM;uBAM/C,MAAM,gBAAgB,MAAM,aAAa,MAAM;uBAM/C,MAAM,gBAAgB,MAAM,aAAa,MAAM;oBAM/C,MAAM,gBAAgB,MAAM,aAAa,MAAM;EAiB1D"}
@@ -1,14 +1,80 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Toaster as Sonner } from "sonner";
3
- const Toaster = ({ ...props }) => {
4
- return (_jsx(Sonner, { className: "toaster group", toastOptions: {
5
- classNames: {
6
- toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
7
- description: "group-[.toast]:text-muted-foreground",
8
- actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
9
- cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
10
- },
11
- }, ...props }));
12
- };
13
- export { Toaster };
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { cn } from "../utils/cn";
4
+ import { X } from "lucide-react";
5
+ function Toast({ toast, onClose }) {
6
+ React.useEffect(() => {
7
+ const duration = toast.duration || 5000;
8
+ const timer = setTimeout(() => {
9
+ onClose(toast.id);
10
+ }, duration);
11
+ return () => clearTimeout(timer);
12
+ }, [toast.id, toast.duration, onClose]);
13
+ const getIcon = () => {
14
+ switch (toast.type) {
15
+ case "error":
16
+ return "❌";
17
+ case "warning":
18
+ return "⚠️";
19
+ case "success":
20
+ return "✅";
21
+ default:
22
+ return "ℹ️";
23
+ }
24
+ };
25
+ const getBorderColor = () => {
26
+ switch (toast.type) {
27
+ case "error":
28
+ return "border-l-destructive";
29
+ case "warning":
30
+ return "border-l-yellow-500";
31
+ case "success":
32
+ return "border-l-green-500";
33
+ case "info":
34
+ return "border-l-primary";
35
+ }
36
+ };
37
+ return (_jsxs("div", { className: cn("flex items-start gap-3 p-4 rounded-lg bg-card border border-border", "border-l-2 min-w-[280px] animate-in slide-in-from-right duration-300", getBorderColor()), children: [_jsx("div", { className: "text-lg shrink-0", children: getIcon() }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("div", { className: "font-medium text-sm text-foreground mb-1", children: toast.message }), toast.description && (_jsx("div", { className: "text-xs text-muted-foreground leading-snug", children: toast.description }))] }), _jsx("button", { type: "button", className: "text-muted-foreground hover:text-foreground transition-colors text-lg leading-none shrink-0 p-1 -m-1", onClick: () => onClose(toast.id), "aria-label": "Close notification", children: _jsx(X, { className: "h-4 w-4" }) })] }));
38
+ }
39
+ /**
40
+ * Toast notification container
41
+ * Displays multiple toast notifications with proper positioning and animations
42
+ */
43
+ export function ToastContainer({ toasts, onClose }) {
44
+ return (_jsx("div", { className: "fixed top-4 right-4 z-50 flex flex-col gap-3 max-w-md", children: toasts.map((toast) => (_jsx(Toast, { toast: toast, onClose: onClose }, toast.id))) }));
45
+ }
46
+ /**
47
+ * Toast manager hook for easy toast notifications
48
+ */
49
+ export function useToast() {
50
+ const [toasts, setToasts] = React.useState([]);
51
+ const showToast = React.useCallback((message, type = "info", description, duration) => {
52
+ const id = `toast-${Date.now()}-${Math.random()}`;
53
+ const newToast = {
54
+ id,
55
+ type,
56
+ message,
57
+ description,
58
+ duration,
59
+ };
60
+ setToasts((prev) => [...prev, newToast]);
61
+ return id;
62
+ }, []);
63
+ const closeToast = React.useCallback((id) => {
64
+ setToasts((prev) => prev.filter((toast) => toast.id !== id));
65
+ }, []);
66
+ const error = React.useCallback((message, description, duration) => showToast(message, "error", description, duration), [showToast]);
67
+ const warning = React.useCallback((message, description, duration) => showToast(message, "warning", description, duration), [showToast]);
68
+ const success = React.useCallback((message, description, duration) => showToast(message, "success", description, duration), [showToast]);
69
+ const info = React.useCallback((message, description, duration) => showToast(message, "info", description, duration), [showToast]);
70
+ return React.useMemo(() => ({
71
+ toasts,
72
+ showToast,
73
+ closeToast,
74
+ error,
75
+ warning,
76
+ success,
77
+ info,
78
+ }), [toasts, showToast, closeToast, error, warning, success, info]);
79
+ }
14
80
  //# sourceMappingURL=toast.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toast.js","sourceRoot":"","sources":["../../src/components/toast.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,QAAQ,CAAC;AAI3C,MAAM,OAAO,GAAG,CAAC,EAAE,GAAG,KAAK,EAAgB,EAAE,EAAE;IAC9C,OAAO,CACN,KAAC,MAAM,IACN,SAAS,EAAC,eAAe,EACzB,YAAY,EAAE;YACb,UAAU,EAAE;gBACX,KAAK,EACJ,uIAAuI;gBACxI,WAAW,EAAE,sCAAsC;gBACnD,YAAY,EACX,kEAAkE;gBACnE,YAAY,EACX,8DAA8D;aAC/D;SACD,KACG,KAAK,GACR,CACF,CAAC;AACH,CAAC,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"toast.js","sourceRoot":"","sources":["../../src/components/toast.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAejC,SAAS,KAAK,CAAC,EAAE,KAAK,EAAE,OAAO,EAAc;IAC5C,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACpB,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C9D,CAAC;AACH,CAAC"}
package/dist/index.d.ts CHANGED
@@ -22,11 +22,13 @@ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScro
22
22
  export { Skeleton } from "./components/skeleton";
23
23
  export { Slider } from "./components/slider";
24
24
  export { StatCard, type StatCardProps } from "./components/stat-card";
25
+ export { MetricCard, type MetricCardProps } from "./components/stats-card";
25
26
  export { Switch } from "./components/switch";
26
27
  export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from "./components/table";
27
28
  export { Tabs, TabsContent, TabsList, TabsTrigger } from "./components/tabs";
28
29
  export { Textarea, type TextareaProps } from "./components/textarea";
29
- export { Toaster } from "./components/toast";
30
+ export { ConfirmDialog, type ConfirmDialogProps } from "./components/confirm-dialog";
31
+ export { ToastContainer, useToast, type ToastMessage } from "./components/toast";
30
32
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "./components/tooltip";
31
33
  export { cn } from "./utils/cn";
32
34
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EACN,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,GAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,MAAM,EAAE,KAAK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AAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EACN,OAAO,EACP,cAAc,EACd,eAAe,EACf,cAAc,GACd,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -28,12 +28,14 @@ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScro
28
28
  export { Skeleton } from "./components/skeleton";
29
29
  export { Slider } from "./components/slider";
30
30
  export { StatCard } from "./components/stat-card";
31
+ export { MetricCard } from "./components/stats-card";
31
32
  export { Switch } from "./components/switch";
32
33
  export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from "./components/table";
33
34
  // Navigation & Layout Components
34
35
  export { Tabs, TabsContent, TabsList, TabsTrigger } from "./components/tabs";
35
36
  export { Textarea } from "./components/textarea";
36
- export { Toaster } from "./components/toast";
37
+ export { ConfirmDialog } from "./components/confirm-dialog";
38
+ export { ToastContainer, useToast } from "./components/toast";
37
39
  export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "./components/tooltip";
38
40
  // Utilities
39
41
  export { cn } from "./utils/cn";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAElB,sBAAsB;AACtB,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EACN,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,gBA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AC;AAC7E,OAAO,EAAE,QAAQ,EAAsB,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,aAAa,EAA2B,MAAM,6BAA6B,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAqB,MAAM,oBAAoB,CAAC;AACjF,OAAO,EACN,OAAO,EACP,cAAc,EACd,eAAe,EACf,cAAc,GACd,MAAM,sBAAsB,CAAC;AAE9B,YAAY;AACZ,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ancatag/at-design",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "A shared design system package providing reusable UI components with theme-agnostic styling",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,66 @@
1
+ import * as React from "react";
2
+ import { cn } from "../utils/cn";
3
+
4
+ export interface ConfirmDialogProps {
5
+ isOpen: boolean;
6
+ onClose: () => void;
7
+ onConfirm: () => void;
8
+ title: string;
9
+ description: string;
10
+ confirmText?: string;
11
+ cancelText?: string;
12
+ variant?: "default" | "danger";
13
+ }
14
+
15
+ /**
16
+ * Reusable confirmation dialog component
17
+ * Apple-style modal with backdrop blur and smooth animations
18
+ */
19
+ export function ConfirmDialog({
20
+ isOpen,
21
+ onClose,
22
+ onConfirm,
23
+ title,
24
+ description,
25
+ confirmText = "Confirm",
26
+ cancelText = "Cancel",
27
+ variant = "default",
28
+ }: ConfirmDialogProps) {
29
+ if (!isOpen) return null;
30
+
31
+ return (
32
+ <div className="fixed inset-0 z-[100] flex items-center justify-center bg-black/50 backdrop-blur-sm animate-in fade-in duration-200">
33
+ <div className="mx-4 w-full max-w-md rounded-3xl border border-border/50 bg-card p-6 shadow-2xl animate-in zoom-in-95 duration-200">
34
+ <div className="space-y-4">
35
+ <div className="space-y-2">
36
+ <h3 className="text-xl font-bold text-foreground">{title}</h3>
37
+ <p className="text-sm text-muted-foreground leading-relaxed">
38
+ {description}
39
+ </p>
40
+ </div>
41
+ <div className="flex gap-3">
42
+ <button
43
+ type="button"
44
+ onClick={onClose}
45
+ className="flex-1 px-4 py-2.5 rounded-lg font-medium transition-colors border border-border hover:bg-muted text-foreground"
46
+ >
47
+ {cancelText}
48
+ </button>
49
+ <button
50
+ type="button"
51
+ onClick={onConfirm}
52
+ className={cn(
53
+ "flex-1 px-4 py-2.5 rounded-lg font-medium transition-colors",
54
+ variant === "danger"
55
+ ? "bg-red-600 hover:bg-red-700 text-white"
56
+ : "bg-primary hover:bg-primary/90 text-primary-foreground"
57
+ )}
58
+ >
59
+ {confirmText}
60
+ </button>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ );
66
+ }
@@ -0,0 +1,42 @@
1
+ import * as React from "react";
2
+ import { cn } from "../utils/cn";
3
+
4
+ export interface MetricCardProps {
5
+ icon: string;
6
+ label: string;
7
+ value: string | number;
8
+ description?: string;
9
+ className?: string;
10
+ }
11
+
12
+ /**
13
+ * Reusable metric card component for displaying statistics
14
+ * Clean, minimal design with icon, label, value, and optional description
15
+ */
16
+ export function MetricCard({
17
+ icon,
18
+ label,
19
+ value,
20
+ description,
21
+ className,
22
+ }: MetricCardProps) {
23
+ return (
24
+ <div
25
+ className={cn(
26
+ "rounded-xl border border-border bg-card p-5 shadow-sm",
27
+ className,
28
+ )}
29
+ >
30
+ <div className="mb-2 flex items-center gap-2">
31
+ <span className="text-2xl">{icon}</span>
32
+ <span className="text-sm font-medium text-muted-foreground">
33
+ {label}
34
+ </span>
35
+ </div>
36
+ <div className="text-2xl font-bold text-foreground">{value}</div>
37
+ {description && (
38
+ <div className="mt-1 text-xs text-muted-foreground">{description}</div>
39
+ )}
40
+ </div>
41
+ );
42
+ }
@@ -1,26 +1,172 @@
1
- import type React from "react";
2
- import { Toaster as Sonner } from "sonner";
1
+ import * as React from "react";
2
+ import { cn } from "../utils/cn";
3
+ import { X } from "lucide-react";
3
4
 
4
- type ToasterProps = React.ComponentProps<typeof Sonner>;
5
+ export interface ToastMessage {
6
+ id: string;
7
+ type: "error" | "warning" | "info" | "success";
8
+ message: string;
9
+ description?: string;
10
+ duration?: number;
11
+ }
12
+
13
+ interface ToastProps {
14
+ toast: ToastMessage;
15
+ onClose: (id: string) => void;
16
+ }
17
+
18
+ function Toast({ toast, onClose }: ToastProps) {
19
+ React.useEffect(() => {
20
+ const duration = toast.duration || 5000;
21
+ const timer = setTimeout(() => {
22
+ onClose(toast.id);
23
+ }, duration);
24
+
25
+ return () => clearTimeout(timer);
26
+ }, [toast.id, toast.duration, onClose]);
27
+
28
+ const getIcon = () => {
29
+ switch (toast.type) {
30
+ case "error":
31
+ return "❌";
32
+ case "warning":
33
+ return "⚠️";
34
+ case "success":
35
+ return "✅";
36
+ default:
37
+ return "ℹ️";
38
+ }
39
+ };
40
+
41
+ const getBorderColor = () => {
42
+ switch (toast.type) {
43
+ case "error":
44
+ return "border-l-destructive";
45
+ case "warning":
46
+ return "border-l-yellow-500";
47
+ case "success":
48
+ return "border-l-green-500";
49
+ case "info":
50
+ return "border-l-primary";
51
+ }
52
+ };
5
53
 
6
- const Toaster = ({ ...props }: ToasterProps) => {
7
54
  return (
8
- <Sonner
9
- className="toaster group"
10
- toastOptions={{
11
- classNames: {
12
- toast:
13
- "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
14
- description: "group-[.toast]:text-muted-foreground",
15
- actionButton:
16
- "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
17
- cancelButton:
18
- "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
19
- },
20
- }}
21
- {...props}
22
- />
23
- );
24
- };
25
-
26
- export { Toaster };
55
+ <div
56
+ className={cn(
57
+ "flex items-start gap-3 p-4 rounded-lg bg-card border border-border",
58
+ "border-l-2 min-w-[280px] animate-in slide-in-from-right duration-300",
59
+ getBorderColor(),
60
+ )}
61
+ >
62
+ <div className="text-lg shrink-0">{getIcon()}</div>
63
+ <div className="flex-1 min-w-0">
64
+ <div className="font-medium text-sm text-foreground mb-1">
65
+ {toast.message}
66
+ </div>
67
+ {toast.description && (
68
+ <div className="text-xs text-muted-foreground leading-snug">
69
+ {toast.description}
70
+ </div>
71
+ )}
72
+ </div>
73
+ <button
74
+ type="button"
75
+ className="text-muted-foreground hover:text-foreground transition-colors text-lg leading-none shrink-0 p-1 -m-1"
76
+ onClick={() => onClose(toast.id)}
77
+ aria-label="Close notification"
78
+ >
79
+ <X className="h-4 w-4" />
80
+ </button>
81
+ </div>
82
+ );
83
+ }
84
+
85
+ interface ToastContainerProps {
86
+ toasts: ToastMessage[];
87
+ onClose: (id: string) => void;
88
+ }
89
+
90
+ /**
91
+ * Toast notification container
92
+ * Displays multiple toast notifications with proper positioning and animations
93
+ */
94
+ export function ToastContainer({ toasts, onClose }: ToastContainerProps) {
95
+ return (
96
+ <div className="fixed top-4 right-4 z-50 flex flex-col gap-3 max-w-md">
97
+ {toasts.map((toast) => (
98
+ <Toast key={toast.id} toast={toast} onClose={onClose} />
99
+ ))}
100
+ </div>
101
+ );
102
+ }
103
+
104
+ /**
105
+ * Toast manager hook for easy toast notifications
106
+ */
107
+ export function useToast() {
108
+ const [toasts, setToasts] = React.useState<ToastMessage[]>([]);
109
+
110
+ const showToast = React.useCallback(
111
+ (
112
+ message: string,
113
+ type: ToastMessage["type"] = "info",
114
+ description?: string,
115
+ duration?: number,
116
+ ) => {
117
+ const id = `toast-${Date.now()}-${Math.random()}`;
118
+ const newToast: ToastMessage = {
119
+ id,
120
+ type,
121
+ message,
122
+ description,
123
+ duration,
124
+ };
125
+
126
+ setToasts((prev) => [...prev, newToast]);
127
+ return id;
128
+ },
129
+ [],
130
+ );
131
+
132
+ const closeToast = React.useCallback((id: string) => {
133
+ setToasts((prev) => prev.filter((toast) => toast.id !== id));
134
+ }, []);
135
+
136
+ const error = React.useCallback(
137
+ (message: string, description?: string, duration?: number) =>
138
+ showToast(message, "error", description, duration),
139
+ [showToast],
140
+ );
141
+
142
+ const warning = React.useCallback(
143
+ (message: string, description?: string, duration?: number) =>
144
+ showToast(message, "warning", description, duration),
145
+ [showToast],
146
+ );
147
+
148
+ const success = React.useCallback(
149
+ (message: string, description?: string, duration?: number) =>
150
+ showToast(message, "success", description, duration),
151
+ [showToast],
152
+ );
153
+
154
+ const info = React.useCallback(
155
+ (message: string, description?: string, duration?: number) =>
156
+ showToast(message, "info", description, duration),
157
+ [showToast],
158
+ );
159
+
160
+ return React.useMemo(
161
+ () => ({
162
+ toasts,
163
+ showToast,
164
+ closeToast,
165
+ error,
166
+ warning,
167
+ success,
168
+ info,
169
+ }),
170
+ [toasts, showToast, closeToast, error, warning, success, info],
171
+ );
172
+ }
package/src/index.ts CHANGED
@@ -110,6 +110,7 @@ export {
110
110
  export { Skeleton } from "./components/skeleton";
111
111
  export { Slider } from "./components/slider";
112
112
  export { StatCard, type StatCardProps } from "./components/stat-card";
113
+ export { MetricCard, type MetricCardProps } from "./components/stats-card";
113
114
  export { Switch } from "./components/switch";
114
115
  export {
115
116
  Table,
@@ -124,7 +125,8 @@ export {
124
125
  // Navigation & Layout Components
125
126
  export { Tabs, TabsContent, TabsList, TabsTrigger } from "./components/tabs";
126
127
  export { Textarea, type TextareaProps } from "./components/textarea";
127
- export { Toaster } from "./components/toast";
128
+ export { ConfirmDialog, type ConfirmDialogProps } from "./components/confirm-dialog";
129
+ export { ToastContainer, useToast, type ToastMessage } from "./components/toast";
128
130
  export {
129
131
  Tooltip,
130
132
  TooltipContent,