@moontra/moonui-pro 2.20.2 → 2.20.4

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 (153) hide show
  1. package/package.json +8 -3
  2. package/plugin/index.d.ts +86 -0
  3. package/plugin/index.js +308 -0
  4. package/scripts/postinstall.js +191 -23
  5. package/src/components/advanced-chart/index.tsx +0 -1246
  6. package/src/components/advanced-forms/index.tsx +0 -585
  7. package/src/components/animated-button/index.tsx +0 -385
  8. package/src/components/calendar/event-dialog.tsx +0 -377
  9. package/src/components/calendar/index.tsx +0 -1220
  10. package/src/components/calendar-pro/index.tsx +0 -1697
  11. package/src/components/color-picker/index.tsx +0 -432
  12. package/src/components/credit-card-input/index.tsx +0 -406
  13. package/src/components/dashboard/dashboard-grid.tsx +0 -480
  14. package/src/components/dashboard/demo.tsx +0 -425
  15. package/src/components/dashboard/index.tsx +0 -1046
  16. package/src/components/dashboard/time-range-picker.tsx +0 -336
  17. package/src/components/dashboard/types.ts +0 -225
  18. package/src/components/dashboard/widgets/activity-feed.tsx +0 -349
  19. package/src/components/dashboard/widgets/chart-widget.tsx +0 -418
  20. package/src/components/dashboard/widgets/comparison-widget.tsx +0 -177
  21. package/src/components/dashboard/widgets/index.ts +0 -5
  22. package/src/components/dashboard/widgets/metric-card.tsx +0 -363
  23. package/src/components/dashboard/widgets/progress-widget.tsx +0 -113
  24. package/src/components/data-table/data-table-bulk-actions.tsx +0 -204
  25. package/src/components/data-table/data-table-column-toggle.tsx +0 -169
  26. package/src/components/data-table/data-table-export.ts +0 -156
  27. package/src/components/data-table/data-table-filter-drawer.tsx +0 -448
  28. package/src/components/data-table/index.tsx +0 -845
  29. package/src/components/draggable-list/index.tsx +0 -100
  30. package/src/components/error-boundary/index.tsx +0 -232
  31. package/src/components/file-upload/index.tsx +0 -1660
  32. package/src/components/floating-action-button/index.tsx +0 -206
  33. package/src/components/form-wizard/form-wizard-context.tsx +0 -335
  34. package/src/components/form-wizard/form-wizard-navigation.tsx +0 -118
  35. package/src/components/form-wizard/form-wizard-progress.tsx +0 -329
  36. package/src/components/form-wizard/form-wizard-step.tsx +0 -111
  37. package/src/components/form-wizard/index.tsx +0 -102
  38. package/src/components/form-wizard/types.ts +0 -77
  39. package/src/components/gesture-drawer/index.tsx +0 -551
  40. package/src/components/github-stars/github-api.ts +0 -426
  41. package/src/components/github-stars/hooks.ts +0 -517
  42. package/src/components/github-stars/index.tsx +0 -375
  43. package/src/components/github-stars/types.ts +0 -148
  44. package/src/components/github-stars/variants.tsx +0 -515
  45. package/src/components/health-check/index.tsx +0 -439
  46. package/src/components/hover-card-3d/index.tsx +0 -529
  47. package/src/components/index.ts +0 -130
  48. package/src/components/internal/index.ts +0 -78
  49. package/src/components/kanban/add-card-modal.tsx +0 -502
  50. package/src/components/kanban/card-detail-modal.tsx +0 -761
  51. package/src/components/kanban/index.ts +0 -13
  52. package/src/components/kanban/kanban.tsx +0 -1689
  53. package/src/components/kanban/types.ts +0 -168
  54. package/src/components/lazy-component/index.tsx +0 -823
  55. package/src/components/license-error/index.tsx +0 -31
  56. package/src/components/magnetic-button/index.tsx +0 -216
  57. package/src/components/memory-efficient-data/index.tsx +0 -1018
  58. package/src/components/moonui-quiz-form/index.tsx +0 -817
  59. package/src/components/navbar/index.tsx +0 -781
  60. package/src/components/optimized-image/index.tsx +0 -425
  61. package/src/components/performance-debugger/index.tsx +0 -613
  62. package/src/components/performance-monitor/index.tsx +0 -808
  63. package/src/components/phone-number-input/index.tsx +0 -343
  64. package/src/components/phone-number-input/phone-number-input-simple.tsx +0 -167
  65. package/src/components/pinch-zoom/index.tsx +0 -566
  66. package/src/components/quiz-form/index.tsx +0 -479
  67. package/src/components/rich-text-editor/index.tsx +0 -2322
  68. package/src/components/rich-text-editor/slash-commands-extension.ts +0 -230
  69. package/src/components/rich-text-editor/slash-commands.css +0 -35
  70. package/src/components/rich-text-editor/table-styles.css +0 -65
  71. package/src/components/sidebar/index.tsx +0 -884
  72. package/src/components/spotlight-card/index.tsx +0 -191
  73. package/src/components/swipeable-card/index.tsx +0 -100
  74. package/src/components/timeline/index.tsx +0 -1183
  75. package/src/components/ui/accordion.tsx +0 -581
  76. package/src/components/ui/alert-dialog.tsx +0 -141
  77. package/src/components/ui/alert.tsx +0 -141
  78. package/src/components/ui/aspect-ratio.tsx +0 -245
  79. package/src/components/ui/avatar.tsx +0 -155
  80. package/src/components/ui/badge.tsx +0 -230
  81. package/src/components/ui/breadcrumb.tsx +0 -216
  82. package/src/components/ui/button.tsx +0 -228
  83. package/src/components/ui/calendar.tsx +0 -387
  84. package/src/components/ui/card.tsx +0 -216
  85. package/src/components/ui/checkbox.tsx +0 -259
  86. package/src/components/ui/collapsible.tsx +0 -631
  87. package/src/components/ui/color-picker.tsx +0 -97
  88. package/src/components/ui/command.tsx +0 -948
  89. package/src/components/ui/dialog.tsx +0 -752
  90. package/src/components/ui/dropdown-menu.tsx +0 -706
  91. package/src/components/ui/gesture-drawer.tsx +0 -11
  92. package/src/components/ui/hover-card.tsx +0 -29
  93. package/src/components/ui/index.ts +0 -222
  94. package/src/components/ui/input.tsx +0 -224
  95. package/src/components/ui/label.tsx +0 -29
  96. package/src/components/ui/lightbox.tsx +0 -606
  97. package/src/components/ui/magnetic-button.tsx +0 -129
  98. package/src/components/ui/media-gallery.tsx +0 -611
  99. package/src/components/ui/navigation-menu.tsx +0 -130
  100. package/src/components/ui/pagination.tsx +0 -125
  101. package/src/components/ui/popover.tsx +0 -185
  102. package/src/components/ui/progress.tsx +0 -30
  103. package/src/components/ui/radio-group.tsx +0 -257
  104. package/src/components/ui/scroll-area.tsx +0 -47
  105. package/src/components/ui/select.tsx +0 -378
  106. package/src/components/ui/separator.tsx +0 -145
  107. package/src/components/ui/sheet.tsx +0 -139
  108. package/src/components/ui/skeleton.tsx +0 -20
  109. package/src/components/ui/slider.tsx +0 -354
  110. package/src/components/ui/spotlight-card.tsx +0 -119
  111. package/src/components/ui/switch.tsx +0 -86
  112. package/src/components/ui/table.tsx +0 -331
  113. package/src/components/ui/tabs-pro.tsx +0 -542
  114. package/src/components/ui/tabs.tsx +0 -54
  115. package/src/components/ui/textarea.tsx +0 -28
  116. package/src/components/ui/toast.tsx +0 -317
  117. package/src/components/ui/toggle.tsx +0 -119
  118. package/src/components/ui/tooltip.tsx +0 -151
  119. package/src/components/virtual-list/index.tsx +0 -668
  120. package/src/hooks/use-chart.ts +0 -205
  121. package/src/hooks/use-data-table.ts +0 -182
  122. package/src/hooks/use-docs-pro-access.ts +0 -13
  123. package/src/hooks/use-license-check.ts +0 -65
  124. package/src/hooks/use-subscription.ts +0 -19
  125. package/src/hooks/use-toast.ts +0 -15
  126. package/src/index.ts +0 -22
  127. package/src/lib/ai-providers.ts +0 -377
  128. package/src/lib/component-metadata.ts +0 -18
  129. package/src/lib/micro-interactions.ts +0 -255
  130. package/src/lib/paddle.ts +0 -17
  131. package/src/lib/utils.ts +0 -6
  132. package/src/patterns/login-form/index.tsx +0 -276
  133. package/src/patterns/login-form/types.ts +0 -67
  134. package/src/setupTests.ts +0 -41
  135. package/src/styles/advanced-chart.css +0 -239
  136. package/src/styles/calendar.css +0 -35
  137. package/src/styles/design-system.css +0 -363
  138. package/src/styles/index.css +0 -681
  139. package/src/styles/tailwind.css +0 -7
  140. package/src/styles/tokens.css +0 -455
  141. package/src/types/next-auth.d.ts +0 -21
  142. package/src/use-intersection-observer.tsx +0 -154
  143. package/src/use-local-storage.tsx +0 -71
  144. package/src/use-paddle.ts +0 -138
  145. package/src/use-performance-optimizer.ts +0 -389
  146. package/src/use-pro-access.ts +0 -141
  147. package/src/use-scroll-animation.ts +0 -219
  148. package/src/use-subscription.ts +0 -37
  149. package/src/use-toast.ts +0 -32
  150. package/src/utils/chart-helpers.ts +0 -357
  151. package/src/utils/cn.ts +0 -6
  152. package/src/utils/data-processing.ts +0 -151
  153. package/src/utils/license-validator.tsx +0 -183
@@ -1,425 +0,0 @@
1
- "use client"
2
-
3
- import React from 'react'
4
- import { Dashboard } from './index'
5
- import { Widget, MetricData, ChartData, ActivityItem, DashboardNotification } from './types'
6
- import { MetricCard } from './widgets/metric-card'
7
- import { ChartWidget } from './widgets/chart-widget'
8
- import { ActivityFeed } from './widgets/activity-feed'
9
- import {
10
- Users,
11
- DollarSign,
12
- ShoppingCart,
13
- TrendingUp,
14
- Package,
15
- CreditCard,
16
- Activity,
17
- AlertCircle,
18
- User,
19
- Settings2,
20
- LogOut,
21
- HelpCircle
22
- } from 'lucide-react'
23
-
24
- // Örnek metrik verileri
25
- const sampleMetrics: MetricData[] = [
26
- {
27
- id: 'revenue',
28
- title: 'Total Revenue',
29
- value: 54234,
30
- unit: '$',
31
- change: { value: 12.5, type: 'increase', period: 'last month' },
32
- icon: <DollarSign className="h-4 w-4" />,
33
- color: 'success',
34
- sparkline: [30, 40, 35, 50, 49, 60, 70, 91, 125],
35
- target: 60000,
36
- forecast: 58500
37
- },
38
- {
39
- id: 'users',
40
- title: 'Active Users',
41
- value: 2453,
42
- change: { value: 8.2, type: 'increase', period: 'last week' },
43
- icon: <Users className="h-4 w-4" />,
44
- color: 'primary',
45
- sparkline: [200, 220, 210, 230, 225, 240, 254, 260, 245]
46
- },
47
- {
48
- id: 'orders',
49
- title: 'New Orders',
50
- value: 846,
51
- change: { value: 3.1, type: 'decrease', period: 'yesterday' },
52
- icon: <ShoppingCart className="h-4 w-4" />,
53
- color: 'warning',
54
- sparkline: [80, 85, 90, 88, 85, 82, 84, 86, 84]
55
- },
56
- {
57
- id: 'conversion',
58
- title: 'Conversion Rate',
59
- value: '3.24%',
60
- change: { value: 0.5, type: 'increase', period: 'last month' },
61
- icon: <TrendingUp className="h-4 w-4" />,
62
- color: 'info',
63
- sparkline: [2.8, 2.9, 3.0, 2.95, 3.1, 3.15, 3.2, 3.22, 3.24]
64
- }
65
- ]
66
-
67
- // Örnek chart verileri
68
- const revenueChartData: ChartData = {
69
- type: 'area',
70
- data: [
71
- { name: 'Jan', revenue: 4000, profit: 2400, expenses: 1600 },
72
- { name: 'Feb', revenue: 3000, profit: 1398, expenses: 1602 },
73
- { name: 'Mar', revenue: 5000, profit: 3200, expenses: 1800 },
74
- { name: 'Apr', revenue: 4500, profit: 2900, expenses: 1600 },
75
- { name: 'May', revenue: 6000, profit: 3800, expenses: 2200 },
76
- { name: 'Jun', revenue: 5500, profit: 3400, expenses: 2100 },
77
- { name: 'Jul', revenue: 7000, profit: 4200, expenses: 2800 }
78
- ]
79
- }
80
-
81
- const salesByProductData: ChartData = {
82
- type: 'pie',
83
- data: [
84
- { name: 'Product A', value: 35 },
85
- { name: 'Product B', value: 25 },
86
- { name: 'Product C', value: 20 },
87
- { name: 'Product D', value: 15 },
88
- { name: 'Product E', value: 5 }
89
- ]
90
- }
91
-
92
- const performanceData: ChartData = {
93
- type: 'radar',
94
- data: [
95
- { subject: 'Sales', A: 120, B: 110, fullMark: 150 },
96
- { subject: 'Marketing', A: 98, B: 130, fullMark: 150 },
97
- { subject: 'Development', A: 86, B: 130, fullMark: 150 },
98
- { subject: 'Customer Support', A: 99, B: 100, fullMark: 150 },
99
- { subject: 'Technology', A: 85, B: 90, fullMark: 150 },
100
- { subject: 'HR', A: 65, B: 85, fullMark: 150 }
101
- ]
102
- }
103
-
104
- // Örnek aktivite verileri
105
- const sampleActivities: ActivityItem[] = [
106
- {
107
- id: '1',
108
- type: 'success',
109
- title: 'completed a purchase',
110
- description: 'Order #12345 - Premium Plan ($299)',
111
- timestamp: new Date(Date.now() - 1000 * 60 * 5),
112
- user: { name: 'John Doe', avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=John' },
113
- icon: <CreditCard className="h-4 w-4" />
114
- },
115
- {
116
- id: '2',
117
- type: 'info',
118
- title: 'deployed new version',
119
- description: 'v2.1.0 deployed to production',
120
- timestamp: new Date(Date.now() - 1000 * 60 * 15),
121
- user: { name: 'Sarah Chen' },
122
- icon: <Package className="h-4 w-4" />
123
- },
124
- {
125
- id: '3',
126
- type: 'warning',
127
- title: 'high server load detected',
128
- description: 'CPU usage above 80% on server-02',
129
- timestamp: new Date(Date.now() - 1000 * 60 * 30),
130
- icon: <AlertCircle className="h-4 w-4" />
131
- },
132
- {
133
- id: '4',
134
- type: 'success',
135
- title: 'new user registered',
136
- description: 'Welcome email sent',
137
- timestamp: new Date(Date.now() - 1000 * 60 * 45),
138
- user: { name: 'Mike Johnson' }
139
- },
140
- {
141
- id: '5',
142
- type: 'error',
143
- title: 'payment failed',
144
- description: 'Card declined - Order #12346',
145
- timestamp: new Date(Date.now() - 1000 * 60 * 60),
146
- user: { name: 'Emma Wilson' }
147
- }
148
- ]
149
-
150
- // Örnek widget'lar
151
- const sampleWidgets: Widget[] = [
152
- // Metrik widget'ları
153
- {
154
- id: 'metric-revenue',
155
- type: 'metric',
156
- title: 'Revenue',
157
- size: { w: 3, h: 2 },
158
- position: { x: 0, y: 0 },
159
- data: sampleMetrics[0]
160
- },
161
- {
162
- id: 'metric-users',
163
- type: 'metric',
164
- title: 'Users',
165
- size: { w: 3, h: 2 },
166
- position: { x: 3, y: 0 },
167
- data: sampleMetrics[1]
168
- },
169
- {
170
- id: 'metric-orders',
171
- type: 'metric',
172
- title: 'Orders',
173
- size: { w: 3, h: 2 },
174
- position: { x: 6, y: 0 },
175
- data: sampleMetrics[2]
176
- },
177
- {
178
- id: 'metric-conversion',
179
- type: 'metric',
180
- title: 'Conversion',
181
- size: { w: 3, h: 2 },
182
- position: { x: 9, y: 0 },
183
- data: sampleMetrics[3]
184
- },
185
- // Chart widget'ları
186
- {
187
- id: 'chart-revenue-trend',
188
- type: 'chart',
189
- title: 'Revenue Trend',
190
- description: 'Monthly revenue, profit and expenses',
191
- size: { w: 8, h: 4 },
192
- position: { x: 0, y: 2 },
193
- data: revenueChartData
194
- },
195
- {
196
- id: 'chart-sales-by-product',
197
- type: 'chart',
198
- title: 'Sales by Product',
199
- description: 'Product distribution',
200
- size: { w: 4, h: 4 },
201
- position: { x: 8, y: 2 },
202
- data: salesByProductData
203
- },
204
- {
205
- id: 'chart-performance',
206
- type: 'chart',
207
- title: 'Team Performance',
208
- description: 'Department comparison',
209
- size: { w: 6, h: 4 },
210
- position: { x: 0, y: 6 },
211
- data: performanceData
212
- },
213
- // Activity feed
214
- {
215
- id: 'activity-feed',
216
- type: 'activity',
217
- title: 'Recent Activity',
218
- size: { w: 6, h: 4 },
219
- position: { x: 6, y: 6 },
220
- data: {
221
- items: sampleActivities,
222
- realtime: true
223
- }
224
- }
225
- ]
226
-
227
- // Örnek notification verileri
228
- const sampleNotifications: DashboardNotification[] = [
229
- {
230
- id: 'notif-1',
231
- type: 'success',
232
- title: 'Payment Received',
233
- message: 'Payment of $1,250 has been processed successfully',
234
- timestamp: new Date(Date.now() - 1000 * 60 * 5), // 5 dakika önce
235
- read: false
236
- },
237
- {
238
- id: 'notif-2',
239
- type: 'warning',
240
- title: 'Low Stock Alert',
241
- message: 'Product "Premium Widget" is running low on stock',
242
- timestamp: new Date(Date.now() - 1000 * 60 * 30), // 30 dakika önce
243
- read: false
244
- },
245
- {
246
- id: 'notif-3',
247
- type: 'info',
248
- title: 'New Feature Available',
249
- message: 'Check out our new analytics dashboard features',
250
- timestamp: new Date(Date.now() - 1000 * 60 * 60 * 2), // 2 saat önce
251
- read: true
252
- },
253
- {
254
- id: 'notif-4',
255
- type: 'error',
256
- title: 'Sync Failed',
257
- message: 'Failed to sync data with external service',
258
- timestamp: new Date(Date.now() - 1000 * 60 * 60 * 24), // 1 gün önce
259
- read: true
260
- }
261
- ]
262
-
263
- // Örnek user bilgileri
264
- const sampleUser = {
265
- name: 'John Doe',
266
- email: 'john@example.com',
267
- avatar: 'https://github.com/shadcn.png',
268
- role: 'Admin'
269
- }
270
-
271
- // Örnek custom user menu items
272
- const customUserMenuItems = [
273
- {
274
- id: 'profile',
275
- label: 'My Profile',
276
- icon: <User className="h-4 w-4" />,
277
- onClick: () => console.log('Profile clicked')
278
- },
279
- {
280
- id: 'billing',
281
- label: 'Billing & Plans',
282
- icon: <CreditCard className="h-4 w-4" />,
283
- onClick: () => console.log('Billing clicked')
284
- },
285
- { id: 'sep1', label: '', separator: true },
286
- {
287
- id: 'settings',
288
- label: 'Settings',
289
- icon: <Settings2 className="h-4 w-4" />,
290
- onClick: () => console.log('Settings clicked')
291
- },
292
- {
293
- id: 'help',
294
- label: 'Help & Support',
295
- icon: <HelpCircle className="h-4 w-4" />,
296
- onClick: () => console.log('Help clicked')
297
- },
298
- { id: 'sep2', label: '', separator: true },
299
- {
300
- id: 'logout',
301
- label: 'Sign Out',
302
- icon: <LogOut className="h-4 w-4" />,
303
- onClick: () => console.log('Logout clicked')
304
- }
305
- ]
306
-
307
- export function DashboardDemo() {
308
- const [notifications, setNotifications] = React.useState(sampleNotifications)
309
-
310
- const handleNotificationMarkAsRead = (notificationId: string) => {
311
- setNotifications(prev =>
312
- prev.map(n => n.id === notificationId ? { ...n, read: true } : n)
313
- )
314
- }
315
-
316
- const handleNotificationClear = (notificationId: string) => {
317
- setNotifications(prev => prev.filter(n => n.id !== notificationId))
318
- }
319
-
320
- const handleNotificationMarkAllAsRead = () => {
321
- setNotifications(prev => prev.map(n => ({ ...n, read: true })))
322
- }
323
-
324
- const handleNotificationClearAll = () => {
325
- setNotifications([])
326
- }
327
-
328
- return (
329
- <div className="min-h-screen bg-background">
330
- <Dashboard
331
- title="Analytics Dashboard"
332
- description="Real-time insights and performance metrics"
333
- widgets={sampleWidgets}
334
- editable={true}
335
- realtime={true}
336
- glassmorphism={true}
337
- user={sampleUser}
338
- userMenuItems={customUserMenuItems}
339
- notifications={notifications}
340
- onNotificationClick={(notification) => {
341
- console.log('Notification clicked:', notification)
342
- }}
343
- onNotificationMarkAsRead={handleNotificationMarkAsRead}
344
- onNotificationMarkAllAsRead={handleNotificationMarkAllAsRead}
345
- onNotificationClear={handleNotificationClear}
346
- onNotificationClearAll={handleNotificationClearAll}
347
- onWidgetAdd={(widget) => {
348
- console.log('Widget added:', widget)
349
- }}
350
- onWidgetRemove={(widgetId) => {
351
- console.log('Widget removed:', widgetId)
352
- }}
353
- onWidgetUpdate={(widgetId, updates) => {
354
- console.log('Widget updated:', widgetId, updates)
355
- }}
356
- onExport={(format) => {
357
- console.log('Export dashboard as:', format)
358
- }}
359
- />
360
- </div>
361
- )
362
- }
363
-
364
- // Standalone widget demos
365
- export function MetricCardDemo() {
366
- return (
367
- <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 p-6">
368
- {sampleMetrics.map((metric) => (
369
- <MetricCard
370
- key={metric.id}
371
- data={metric}
372
- showSparkline={true}
373
- showForecast={true}
374
- interactive={true}
375
- glassmorphism={true}
376
- onAction={(action) => console.log('Metric action:', action)}
377
- />
378
- ))}
379
- </div>
380
- )
381
- }
382
-
383
- export function ChartWidgetDemo() {
384
- return (
385
- <div className="grid grid-cols-1 lg:grid-cols-2 gap-6 p-6">
386
- <ChartWidget
387
- id="demo-1"
388
- title="Revenue Analysis"
389
- description="Monthly revenue breakdown"
390
- data={revenueChartData}
391
- height={300}
392
- interactive={true}
393
- glassmorphism={true}
394
- onAction={(action, data) => console.log('Chart action:', action, data)}
395
- />
396
- <ChartWidget
397
- id="demo-2"
398
- title="Product Sales"
399
- description="Sales distribution by product"
400
- data={salesByProductData}
401
- height={300}
402
- interactive={true}
403
- glassmorphism={true}
404
- />
405
- </div>
406
- )
407
- }
408
-
409
- export function ActivityFeedDemo() {
410
- return (
411
- <div className="max-w-2xl mx-auto p-6">
412
- <ActivityFeed
413
- items={sampleActivities}
414
- title="System Activity"
415
- height={400}
416
- showFilters={true}
417
- showNotifications={true}
418
- glassmorphism={true}
419
- realtime={true}
420
- onItemClick={(item) => console.log('Activity clicked:', item)}
421
- onAction={(action, data) => console.log('Feed action:', action, data)}
422
- />
423
- </div>
424
- )
425
- }