UNPKG

aura-glass

Version:

A comprehensive glassmorphism design system for React applications with 142+ production-ready components

98 lines 2.34 kB
import React from "react"; export interface DashboardWidget { id: string; title: string; type: "metric" | "chart" | "table" | "text" | "custom"; size: { cols: 1 | 2 | 3 | 4 | 6 | 12; rows: 1 | 2 | 3 | 4; }; position: { x: number; y: number; }; data?: any; config?: Record<string, any>; component?: React.ComponentType<any>; editable?: boolean; removable?: boolean; resizable?: boolean; } export interface DashboardLayout { id: string; name: string; widgets: DashboardWidget[]; cols: number; gap: "sm" | "md" | "lg"; } export interface GlassDashboardProps extends React.HTMLAttributes<HTMLDivElement> { /** * Dashboard title */ title?: string; /** * Dashboard description */ description?: string; /** * Dashboard layout */ layout?: DashboardLayout; /** * Available widget types for adding */ availableWidgets?: Array<{ type: string; title: string; icon: React.ReactNode; defaultSize: DashboardWidget["size"]; }>; /** * Whether dashboard is in edit mode */ editMode?: boolean; /** * Edit mode change handler */ onEditModeChange?: (editMode: boolean) => void; /** * Layout change handler */ onLayoutChange?: (layout: DashboardLayout) => void; /** * Widget add handler */ onWidgetAdd?: (widget: Partial<DashboardWidget>) => void; /** * Widget remove handler */ onWidgetRemove?: (widgetId: string) => void; /** * Widget update handler */ onWidgetUpdate?: (widgetId: string, updates: Partial<DashboardWidget>) => void; /** * Drag and drop enabled */ dragEnabled?: boolean; /** * Custom widget renderers */ widgetRenderers?: Record<string, React.ComponentType<{ widget: DashboardWidget; }>>; /** * Dashboard actions */ actions?: React.ReactNode; /** * Loading state */ loading?: boolean; /** * Empty state component */ emptyState?: React.ReactNode; } export declare const GlassDashboard: React.ForwardRefExoticComponent<GlassDashboardProps & React.RefAttributes<HTMLDivElement>>; //# sourceMappingURL=GlassDashboard.d.ts.map