@stackwright-pro/display-components 0.1.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,96 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type TrendDirection = 'up' | 'down' | 'stable';
4
+ type StatusVariant = 'operational' | 'degraded' | 'outage' | 'maintenance';
5
+ interface MetricCardProps {
6
+ label: string;
7
+ value: number;
8
+ trend?: TrendDirection;
9
+ trendValue?: string;
10
+ color?: string;
11
+ icon?: React.ReactNode;
12
+ }
13
+ interface StatusBadgeProps {
14
+ status: StatusVariant;
15
+ label: string;
16
+ pulse?: boolean;
17
+ }
18
+ interface StatBarProps {
19
+ current: number;
20
+ max: number;
21
+ label?: string;
22
+ color?: string;
23
+ showPercentage?: boolean;
24
+ }
25
+ interface SparklineProps {
26
+ data: number[];
27
+ width?: number;
28
+ height?: number;
29
+ color?: string;
30
+ fill?: boolean;
31
+ }
32
+ interface ActivityItem {
33
+ id: string;
34
+ type: 'success' | 'warning' | 'error' | 'info';
35
+ title: string;
36
+ description?: string;
37
+ timestamp: Date | string;
38
+ }
39
+ interface ActivityFeedProps {
40
+ items: ActivityItem[];
41
+ maxItems?: number;
42
+ }
43
+ interface DashboardGridProps {
44
+ columns?: 1 | 2 | 3 | 4;
45
+ cards: React.ReactNode[];
46
+ gap?: number;
47
+ }
48
+ interface ColumnDef<T> {
49
+ field: keyof T;
50
+ header: string;
51
+ type?: 'text' | 'badge' | 'date' | 'number';
52
+ sortable?: boolean;
53
+ filterable?: boolean;
54
+ }
55
+ interface DataTableProps<T> {
56
+ data: T[];
57
+ columns: ColumnDef<T>[];
58
+ loading?: boolean;
59
+ emptyMessage?: string;
60
+ onRowClick?: (row: T) => void;
61
+ }
62
+ interface JsonViewerProps {
63
+ data: unknown;
64
+ collapsible?: boolean;
65
+ maxHeight?: string;
66
+ }
67
+ declare const THEME_COLORS: {
68
+ readonly primary: "#0066CC";
69
+ readonly success: "#10B981";
70
+ readonly warning: "#F59E0B";
71
+ readonly error: "#EF4444";
72
+ readonly info: "#3B82F6";
73
+ readonly background: "#FFFFFF";
74
+ readonly surface: "#F3F4F6";
75
+ readonly text: "#111827";
76
+ readonly textSecondary: "#6B7280";
77
+ };
78
+ declare const STATUS_COLORS: Record<StatusVariant, string>;
79
+
80
+ declare const MetricCard: ({ label, value, trend, trendValue, color, icon, }: MetricCardProps) => react_jsx_runtime.JSX.Element;
81
+
82
+ declare const StatusBadge: ({ status, label, pulse }: StatusBadgeProps) => react_jsx_runtime.JSX.Element;
83
+
84
+ declare const StatBar: ({ current, max, label, color, showPercentage, }: StatBarProps) => react_jsx_runtime.JSX.Element;
85
+
86
+ declare const Sparkline: ({ data, width, height, color, fill, }: SparklineProps) => react_jsx_runtime.JSX.Element | null;
87
+
88
+ declare const ActivityFeed: ({ items, maxItems }: ActivityFeedProps) => react_jsx_runtime.JSX.Element;
89
+
90
+ declare const DashboardGrid: ({ columns, cards, gap, }: DashboardGridProps) => react_jsx_runtime.JSX.Element;
91
+
92
+ declare function DataTable<T extends object>({ data, columns, loading, emptyMessage, onRowClick, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
93
+
94
+ declare const JsonViewer: ({ data, collapsible, maxHeight }: JsonViewerProps) => react_jsx_runtime.JSX.Element;
95
+
96
+ export { ActivityFeed, type ActivityFeedProps, type ActivityItem, type ColumnDef, DashboardGrid, type DashboardGridProps, DataTable, type DataTableProps, JsonViewer, type JsonViewerProps, MetricCard, type MetricCardProps, STATUS_COLORS, Sparkline, type SparklineProps, StatBar, type StatBarProps, StatusBadge, type StatusBadgeProps, type StatusVariant, THEME_COLORS, type TrendDirection };
@@ -0,0 +1,96 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type TrendDirection = 'up' | 'down' | 'stable';
4
+ type StatusVariant = 'operational' | 'degraded' | 'outage' | 'maintenance';
5
+ interface MetricCardProps {
6
+ label: string;
7
+ value: number;
8
+ trend?: TrendDirection;
9
+ trendValue?: string;
10
+ color?: string;
11
+ icon?: React.ReactNode;
12
+ }
13
+ interface StatusBadgeProps {
14
+ status: StatusVariant;
15
+ label: string;
16
+ pulse?: boolean;
17
+ }
18
+ interface StatBarProps {
19
+ current: number;
20
+ max: number;
21
+ label?: string;
22
+ color?: string;
23
+ showPercentage?: boolean;
24
+ }
25
+ interface SparklineProps {
26
+ data: number[];
27
+ width?: number;
28
+ height?: number;
29
+ color?: string;
30
+ fill?: boolean;
31
+ }
32
+ interface ActivityItem {
33
+ id: string;
34
+ type: 'success' | 'warning' | 'error' | 'info';
35
+ title: string;
36
+ description?: string;
37
+ timestamp: Date | string;
38
+ }
39
+ interface ActivityFeedProps {
40
+ items: ActivityItem[];
41
+ maxItems?: number;
42
+ }
43
+ interface DashboardGridProps {
44
+ columns?: 1 | 2 | 3 | 4;
45
+ cards: React.ReactNode[];
46
+ gap?: number;
47
+ }
48
+ interface ColumnDef<T> {
49
+ field: keyof T;
50
+ header: string;
51
+ type?: 'text' | 'badge' | 'date' | 'number';
52
+ sortable?: boolean;
53
+ filterable?: boolean;
54
+ }
55
+ interface DataTableProps<T> {
56
+ data: T[];
57
+ columns: ColumnDef<T>[];
58
+ loading?: boolean;
59
+ emptyMessage?: string;
60
+ onRowClick?: (row: T) => void;
61
+ }
62
+ interface JsonViewerProps {
63
+ data: unknown;
64
+ collapsible?: boolean;
65
+ maxHeight?: string;
66
+ }
67
+ declare const THEME_COLORS: {
68
+ readonly primary: "#0066CC";
69
+ readonly success: "#10B981";
70
+ readonly warning: "#F59E0B";
71
+ readonly error: "#EF4444";
72
+ readonly info: "#3B82F6";
73
+ readonly background: "#FFFFFF";
74
+ readonly surface: "#F3F4F6";
75
+ readonly text: "#111827";
76
+ readonly textSecondary: "#6B7280";
77
+ };
78
+ declare const STATUS_COLORS: Record<StatusVariant, string>;
79
+
80
+ declare const MetricCard: ({ label, value, trend, trendValue, color, icon, }: MetricCardProps) => react_jsx_runtime.JSX.Element;
81
+
82
+ declare const StatusBadge: ({ status, label, pulse }: StatusBadgeProps) => react_jsx_runtime.JSX.Element;
83
+
84
+ declare const StatBar: ({ current, max, label, color, showPercentage, }: StatBarProps) => react_jsx_runtime.JSX.Element;
85
+
86
+ declare const Sparkline: ({ data, width, height, color, fill, }: SparklineProps) => react_jsx_runtime.JSX.Element | null;
87
+
88
+ declare const ActivityFeed: ({ items, maxItems }: ActivityFeedProps) => react_jsx_runtime.JSX.Element;
89
+
90
+ declare const DashboardGrid: ({ columns, cards, gap, }: DashboardGridProps) => react_jsx_runtime.JSX.Element;
91
+
92
+ declare function DataTable<T extends object>({ data, columns, loading, emptyMessage, onRowClick, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
93
+
94
+ declare const JsonViewer: ({ data, collapsible, maxHeight }: JsonViewerProps) => react_jsx_runtime.JSX.Element;
95
+
96
+ export { ActivityFeed, type ActivityFeedProps, type ActivityItem, type ColumnDef, DashboardGrid, type DashboardGridProps, DataTable, type DataTableProps, JsonViewer, type JsonViewerProps, MetricCard, type MetricCardProps, STATUS_COLORS, Sparkline, type SparklineProps, StatBar, type StatBarProps, StatusBadge, type StatusBadgeProps, type StatusVariant, THEME_COLORS, type TrendDirection };