@mdxui/tremor 6.0.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.
Files changed (35) hide show
  1. package/README.md +255 -0
  2. package/dist/dashboard/components/index.d.ts +355 -0
  3. package/dist/dashboard/components/index.js +549 -0
  4. package/dist/dashboard/components/index.js.map +1 -0
  5. package/dist/dashboard/index.d.ts +275 -0
  6. package/dist/dashboard/index.js +1062 -0
  7. package/dist/dashboard/index.js.map +1 -0
  8. package/dist/database/index.d.ts +334 -0
  9. package/dist/database/index.js +474 -0
  10. package/dist/database/index.js.map +1 -0
  11. package/dist/index.d.ts +9 -0
  12. package/dist/index.js +1089 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/insights/components/index.d.ts +362 -0
  15. package/dist/insights/components/index.js +1397 -0
  16. package/dist/insights/components/index.js.map +1 -0
  17. package/dist/insights/index.d.ts +360 -0
  18. package/dist/insights/index.js +1815 -0
  19. package/dist/insights/index.js.map +1 -0
  20. package/dist/overview/components/index.d.ts +86 -0
  21. package/dist/overview/components/index.js +775 -0
  22. package/dist/overview/components/index.js.map +1 -0
  23. package/dist/overview/index.d.ts +301 -0
  24. package/dist/overview/index.js +1077 -0
  25. package/dist/overview/index.js.map +1 -0
  26. package/dist/shared/index.d.ts +296 -0
  27. package/dist/shared/index.js +395 -0
  28. package/dist/shared/index.js.map +1 -0
  29. package/dist/solar/components/index.d.ts +341 -0
  30. package/dist/solar/components/index.js +831 -0
  31. package/dist/solar/components/index.js.map +1 -0
  32. package/dist/solar/index.d.ts +301 -0
  33. package/dist/solar/index.js +1130 -0
  34. package/dist/solar/index.js.map +1 -0
  35. package/package.json +135 -0
@@ -0,0 +1,275 @@
1
+ import { Shell, ShellSidebarLeft, ShellTopNav, Sidebar } from './components/index.js';
2
+ export { MobileSidebar, MobileSidebarProps, ShellNavItem, ShellProps, ShellSidebarLeftProps, ShellTopNavProps, ShellUser, ShellVariant, ShellWorkspace, SidebarNavItem, SidebarProps, SidebarShortcutItem, SidebarUser, SidebarWorkspace, UserProfile, WorkspaceSwitcher } from './components/index.js';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import { AppProps, DashboardProps, AppHeaderProps, SettingsProps } from 'mdxui';
5
+ import { ReactNode } from 'react';
6
+ import { ClassNameValue } from 'tailwind-merge';
7
+
8
+ interface DashboardAppProps extends AppProps {
9
+ /** App display name */
10
+ name: string;
11
+ /** Child content */
12
+ children?: any;
13
+ /** Authentication configuration (inherited from AppProps) */
14
+ auth?: AppProps["auth"];
15
+ }
16
+ /**
17
+ * DashboardApp - Root wrapper component for the Dashboard template
18
+ *
19
+ * Provides the root application wrapper with providers and theme setup.
20
+ * In the Dashboard template, this wraps the entire application.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <DashboardApp name="My SaaS">
25
+ * <DashboardShell>
26
+ * <Dashboard />
27
+ * </DashboardShell>
28
+ * </DashboardApp>
29
+ * ```
30
+ */
31
+ declare function DashboardApp({ name, children }: DashboardAppProps): react_jsx_runtime.JSX.Element;
32
+
33
+ interface DashboardViewProps extends DashboardProps {
34
+ /** Dashboard title */
35
+ title?: string;
36
+ /** Optional description text */
37
+ description?: string;
38
+ /** Metrics to display */
39
+ metrics?: Array<{
40
+ label: string;
41
+ value: string | number;
42
+ change?: number;
43
+ trend?: "up" | "down" | "neutral";
44
+ }>;
45
+ /** Action buttons or controls to render on the right */
46
+ actions?: ReactNode;
47
+ /** Main content area */
48
+ children?: any;
49
+ /** Additional className for the container */
50
+ className?: string;
51
+ }
52
+ /**
53
+ * DashboardView - Main dashboard view component for the Dashboard template
54
+ *
55
+ * Provides a consistent layout structure for dashboard pages:
56
+ * - Title and description header
57
+ * - Optional metrics bar
58
+ * - Optional action buttons area
59
+ * - Divider
60
+ * - Main content area
61
+ *
62
+ * @example
63
+ * ```tsx
64
+ * <DashboardView
65
+ * title="Analytics Dashboard"
66
+ * description="Real-time monitoring of key metrics"
67
+ * metrics={[
68
+ * { label: 'Revenue', value: '$12,345', change: 12, trend: 'up' },
69
+ * { label: 'Users', value: '1,234', change: -5, trend: 'down' },
70
+ * ]}
71
+ * actions={<Button>Export</Button>}
72
+ * >
73
+ * <Charts />
74
+ * <DataTable />
75
+ * </DashboardView>
76
+ * ```
77
+ */
78
+ declare function DashboardView({ title, description, metrics, actions, children, className, }: DashboardViewProps): react_jsx_runtime.JSX.Element;
79
+
80
+ interface Breadcrumb {
81
+ label: string;
82
+ href?: string;
83
+ }
84
+ interface DashboardHeaderProps extends Omit<AppHeaderProps, "showSearch" | "showNotifications"> {
85
+ /** Current user */
86
+ user?: {
87
+ name: string;
88
+ email: string;
89
+ avatar?: string;
90
+ };
91
+ /** Show search */
92
+ showSearch?: boolean;
93
+ /** Show notifications */
94
+ showNotifications?: boolean;
95
+ /** Breadcrumbs */
96
+ breadcrumbs?: Breadcrumb[];
97
+ /** Logo component */
98
+ logo?: ReactNode;
99
+ /** Notifications component */
100
+ notifications?: ReactNode;
101
+ /** User profile component */
102
+ userProfile?: ReactNode;
103
+ /** Additional className */
104
+ className?: string;
105
+ }
106
+ /**
107
+ * DashboardHeader - Top header bar for the Dashboard template
108
+ *
109
+ * Provides a header bar with logo, user profile, and notifications.
110
+ * This is typically used inside the Shell but can be used standalone.
111
+ *
112
+ * @example
113
+ * ```tsx
114
+ * <DashboardHeader
115
+ * user={{ name: 'John Doe', email: 'john@example.com.ai' }}
116
+ * showSearch={true}
117
+ * showNotifications={true}
118
+ * />
119
+ * ```
120
+ */
121
+ declare function DashboardHeader({ user, showSearch, showNotifications, breadcrumbs, logo, notifications, userProfile, className, }: DashboardHeaderProps): react_jsx_runtime.JSX.Element;
122
+
123
+ /**
124
+ * User information for pre-filling forms
125
+ */
126
+ interface SettingsUser {
127
+ name?: string;
128
+ email?: string;
129
+ avatar?: string;
130
+ }
131
+ /**
132
+ * Extended Settings props with user information
133
+ */
134
+ interface DashboardSettingsProps extends Partial<SettingsProps> {
135
+ /** User info for pre-filling form fields */
136
+ user?: SettingsUser;
137
+ /** Children to render inside the settings page */
138
+ children?: ReactNode;
139
+ }
140
+ /**
141
+ * Settings Page Component
142
+ *
143
+ * A comprehensive settings page with profile, notifications, security,
144
+ * and account sections. Implements the SettingsProps interface from mdxui.
145
+ *
146
+ * @example
147
+ * ```tsx
148
+ * // Basic usage
149
+ * <Settings />
150
+ *
151
+ * // With pre-filled user data
152
+ * <Settings user={{ name: 'John', email: 'john@example.com.ai' }} />
153
+ *
154
+ * // With specific sections
155
+ * <Settings sections={['profile', 'security']} />
156
+ * ```
157
+ */
158
+ declare function Settings({ sections, user, children, }: DashboardSettingsProps): react_jsx_runtime.JSX.Element;
159
+
160
+ /**
161
+ * Dashboard Template Utilities
162
+ *
163
+ * Shared utility functions and style constants for the dashboard template.
164
+ */
165
+
166
+ /**
167
+ * Merge class names with Tailwind CSS class conflict resolution
168
+ */
169
+ declare function cx(...args: ClassNameValue[]): string;
170
+ /**
171
+ * Focus input ring styles (for form inputs)
172
+ */
173
+ declare const focusInput: string;
174
+ /**
175
+ * Focus ring styles (for buttons and interactive elements)
176
+ */
177
+ declare const focusRing: string;
178
+
179
+ /**
180
+ * Dashboard Template - General SaaS Dashboard
181
+ *
182
+ * Implements AppComponents interface for general-purpose SaaS dashboards.
183
+ * Based on Tremor dashboard template patterns.
184
+ *
185
+ * @example
186
+ * ```tsx
187
+ * import { AppComponents, ShellSidebarLeft, Sidebar, Settings } from '@mdxui/tremor/dashboard'
188
+ *
189
+ * // Use AppComponents interface
190
+ * const { App, Shell, Sidebar, Header, Dashboard, Settings } = AppComponents
191
+ *
192
+ * // Or use variant exports directly
193
+ * <ShellSidebarLeft sidebar={<Sidebar {...sidebarProps} />}>
194
+ * <Settings sections={['profile', 'security']} />
195
+ * </ShellSidebarLeft>
196
+ * ```
197
+ *
198
+ * @example Using with MDX
199
+ * ```tsx
200
+ * import { AppComponents } from '@mdxui/tremor/dashboard'
201
+ *
202
+ * <MDXProvider components={AppComponents}>
203
+ * <App>
204
+ * <Shell>
205
+ * <Dashboard title="Analytics">
206
+ * {content}
207
+ * </Dashboard>
208
+ * </Shell>
209
+ * </App>
210
+ * </MDXProvider>
211
+ * ```
212
+ */
213
+
214
+ /**
215
+ * Legacy components object (deprecated - use AppComponents instead)
216
+ *
217
+ * @deprecated Use AppComponents for conformance with mdxui interface
218
+ */
219
+ declare const components: {
220
+ readonly Shell: typeof Shell;
221
+ readonly ShellSidebarLeft: typeof ShellSidebarLeft;
222
+ readonly ShellTopNav: typeof ShellTopNav;
223
+ readonly Sidebar: typeof Sidebar;
224
+ readonly Settings: typeof Settings;
225
+ };
226
+ type DashboardComponents = typeof components;
227
+ /**
228
+ * AppComponents implementation for the Dashboard template.
229
+ *
230
+ * This object provides all required components for the mdxui AppComponents interface.
231
+ * Use this when you need a complete set of components for a Dashboard-style application.
232
+ *
233
+ * The Dashboard template provides:
234
+ * - Flexible shell layouts (sidebar-left, top-nav variants)
235
+ * - Navigation sidebar with workspace switcher and user profile
236
+ * - Header bar with search, notifications, and user profile
237
+ * - Dashboard page layout with metrics and content areas
238
+ * - Settings page with multiple sections
239
+ *
240
+ * @example
241
+ * ```tsx
242
+ * import { AppComponents } from '@mdxui/tremor/dashboard'
243
+ *
244
+ * // Use with mdxui
245
+ * <MDXProvider components={AppComponents}>
246
+ * <App>
247
+ * <Shell>
248
+ * <Dashboard title="Analytics">
249
+ * {content}
250
+ * </Dashboard>
251
+ * </Shell>
252
+ * </App>
253
+ * </MDXProvider>
254
+ * ```
255
+ */
256
+ declare const AppComponents: {
257
+ /** Root application wrapper */
258
+ readonly App: typeof DashboardApp;
259
+ /** Flexible shell layout */
260
+ readonly Shell: typeof Shell;
261
+ /** Navigation sidebar */
262
+ readonly Sidebar: typeof Sidebar;
263
+ /** Header bar component */
264
+ readonly Header: typeof DashboardHeader;
265
+ /** Dashboard page layout */
266
+ readonly Dashboard: typeof DashboardView;
267
+ /** Settings page layout */
268
+ readonly Settings: typeof Settings;
269
+ /** Sidebar-left shell variant */
270
+ readonly ShellSidebarLeft: typeof ShellSidebarLeft;
271
+ /** Top-nav shell variant */
272
+ readonly ShellTopNav: typeof ShellTopNav;
273
+ };
274
+
275
+ export { AppComponents, type Breadcrumb, DashboardApp, type DashboardAppProps, type DashboardComponents, DashboardHeader, type DashboardHeaderProps, type DashboardSettingsProps, DashboardView, type DashboardViewProps, Settings, Shell, ShellSidebarLeft, ShellTopNav, Sidebar, components, cx, focusInput, focusRing };