@moontra/moonui-pro 2.20.2 → 2.20.3

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 +176 -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,349 +0,0 @@
1
- "use client"
2
-
3
- import React from 'react'
4
- import { motion, AnimatePresence } from 'framer-motion'
5
- import { Card, CardContent, CardHeader, CardTitle } from '../../ui/card'
6
- import { Button } from '../../ui/button'
7
- import { Avatar, AvatarFallback, AvatarImage } from '../../ui/avatar'
8
- import { Badge } from '../../ui/badge'
9
- import { cn } from '../../../lib/utils'
10
- import {
11
- Activity,
12
- Info,
13
- CheckCircle,
14
- AlertCircle,
15
- XCircle,
16
- Clock,
17
- MoreHorizontal,
18
- Filter,
19
- RefreshCw,
20
- Bell,
21
- BellOff
22
- } from 'lucide-react'
23
- import { ActivityItem } from '../types'
24
- import { formatDistanceToNow } from 'date-fns'
25
- import {
26
- DropdownMenu,
27
- DropdownMenuContent,
28
- DropdownMenuItem,
29
- DropdownMenuSeparator,
30
- DropdownMenuTrigger,
31
- } from '../../ui/dropdown-menu'
32
- import { ScrollArea } from '../../ui/scroll-area'
33
-
34
- interface ActivityFeedProps {
35
- items: ActivityItem[]
36
- title?: string
37
- className?: string
38
- height?: number
39
- onItemClick?: (item: ActivityItem) => void
40
- onAction?: (action: string, data?: any) => void
41
- loading?: boolean
42
- showFilters?: boolean
43
- showNotifications?: boolean
44
- glassmorphism?: boolean
45
- realtime?: boolean
46
- }
47
-
48
- export function ActivityFeed({
49
- items,
50
- title = "Activity Feed",
51
- className,
52
- height = 400,
53
- onItemClick,
54
- onAction,
55
- loading = false,
56
- showFilters = true,
57
- showNotifications = true,
58
- glassmorphism = false,
59
- realtime = false
60
- }: ActivityFeedProps) {
61
- const [filter, setFilter] = React.useState<'all' | 'info' | 'success' | 'warning' | 'error'>('all')
62
- const [notificationsEnabled, setNotificationsEnabled] = React.useState(true)
63
- const [newItems, setNewItems] = React.useState<ActivityItem[]>([])
64
- const [isMounted, setIsMounted] = React.useState(false)
65
-
66
- React.useEffect(() => {
67
- setIsMounted(true)
68
- }, [])
69
-
70
- // Simüle edilmiş real-time güncellemeler
71
- React.useEffect(() => {
72
- if (!realtime) return
73
-
74
- const interval = setInterval(() => {
75
- const randomItem: ActivityItem = {
76
- id: `new-${Date.now()}`,
77
- type: ['info', 'success', 'warning', 'error'][Math.floor(Math.random() * 4)] as any,
78
- title: 'New activity',
79
- description: 'Something happened just now',
80
- timestamp: new Date(),
81
- user: {
82
- name: 'System',
83
- avatar: undefined
84
- }
85
- }
86
-
87
- setNewItems(prev => [randomItem, ...prev].slice(0, 3))
88
-
89
- setTimeout(() => {
90
- setNewItems(prev => prev.filter(item => item.id !== randomItem.id))
91
- }, 5000)
92
- }, 10000)
93
-
94
- return () => clearInterval(interval)
95
- }, [realtime])
96
-
97
- // Tip ikonları
98
- const getTypeIcon = (type: ActivityItem['type']) => {
99
- switch (type) {
100
- case 'info':
101
- return <Info className="h-4 w-4" />
102
- case 'success':
103
- return <CheckCircle className="h-4 w-4" />
104
- case 'warning':
105
- return <AlertCircle className="h-4 w-4" />
106
- case 'error':
107
- return <XCircle className="h-4 w-4" />
108
- }
109
- }
110
-
111
- // Tip renkleri
112
- const getTypeColor = (type: ActivityItem['type']) => {
113
- switch (type) {
114
- case 'info':
115
- return 'text-blue-500 bg-blue-100 dark:bg-blue-900/20'
116
- case 'success':
117
- return 'text-green-500 bg-green-100 dark:bg-green-900/20'
118
- case 'warning':
119
- return 'text-yellow-500 bg-yellow-100 dark:bg-yellow-900/20'
120
- case 'error':
121
- return 'text-red-500 bg-red-100 dark:bg-red-900/20'
122
- }
123
- }
124
-
125
- // Filtrelenmiş öğeler
126
- const filteredItems = [...newItems, ...items].filter(item =>
127
- filter === 'all' || item.type === filter
128
- )
129
-
130
- // Activity item renderer
131
- const renderActivityItem = (item: ActivityItem, isNew: boolean = false) => (
132
- <motion.div
133
- key={item.id}
134
- layout
135
- initial={{ opacity: 0, x: -20 }}
136
- animate={{ opacity: 1, x: 0 }}
137
- exit={{ opacity: 0, x: 20 }}
138
- whileHover={{ x: 4 }}
139
- transition={{ duration: 0.2 }}
140
- className={cn(
141
- "group relative flex gap-3 p-3 rounded-lg cursor-pointer transition-colors",
142
- "hover:bg-muted/50",
143
- isNew && "bg-primary/5 border-l-2 border-primary"
144
- )}
145
- onClick={() => onItemClick?.(item)}
146
- >
147
- {/* Timeline çizgisi */}
148
- <div className="absolute left-7 top-12 bottom-0 w-px bg-border" />
149
-
150
- {/* İkon veya Avatar */}
151
- <div className="relative z-10 flex-shrink-0">
152
- {item.user?.avatar ? (
153
- <Avatar className="h-8 w-8">
154
- <AvatarImage src={item.user.avatar} />
155
- <AvatarFallback>{item.user.name[0]}</AvatarFallback>
156
- </Avatar>
157
- ) : (
158
- <div className={cn(
159
- "h-8 w-8 rounded-full flex items-center justify-center",
160
- getTypeColor(item.type)
161
- )}>
162
- {item.icon || getTypeIcon(item.type)}
163
- </div>
164
- )}
165
- </div>
166
-
167
- {/* İçerik */}
168
- <div className="flex-1 min-w-0">
169
- <div className="flex items-start justify-between gap-2">
170
- <div className="flex-1 min-w-0">
171
- <p className="text-sm font-medium leading-tight">
172
- {item.user?.name && (
173
- <span className="text-foreground">{item.user.name} </span>
174
- )}
175
- <span className="text-muted-foreground">{item.title}</span>
176
- </p>
177
- {item.description && (
178
- <p className="text-sm text-muted-foreground mt-0.5 line-clamp-2">
179
- {item.description}
180
- </p>
181
- )}
182
- </div>
183
-
184
- {/* Zaman damgası */}
185
- <div className="flex items-center gap-1 text-xs text-muted-foreground whitespace-nowrap">
186
- <Clock className="h-3 w-3" />
187
- {isMounted ? formatDistanceToNow(item.timestamp, { addSuffix: true }) : 'Loading...'}
188
- </div>
189
- </div>
190
-
191
- {/* Yeni öğe badge'i */}
192
- {isNew && (
193
- <motion.div
194
- initial={{ scale: 0 }}
195
- animate={{ scale: 1 }}
196
- className="inline-block mt-1"
197
- >
198
- <Badge variant="secondary" className="text-xs">New</Badge>
199
- </motion.div>
200
- )}
201
- </div>
202
-
203
- {/* Hover aksiyonları */}
204
- <div className="opacity-0 group-hover:opacity-100 transition-opacity">
205
- <Button
206
- variant="ghost"
207
- size="sm"
208
- className="h-6 w-6 p-0"
209
- onClick={(e) => {
210
- e.stopPropagation()
211
- onAction?.('more', item)
212
- }}
213
- >
214
- <MoreHorizontal className="h-3 w-3" />
215
- </Button>
216
- </div>
217
- </motion.div>
218
- )
219
-
220
- return (
221
- <Card className={cn(
222
- "relative overflow-hidden",
223
- glassmorphism && "bg-background/60 backdrop-blur-md border-white/10",
224
- className
225
- )}>
226
- {/* Header */}
227
- <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-3">
228
- <div className="flex items-center gap-2">
229
- <Activity className="h-4 w-4 text-muted-foreground" />
230
- <CardTitle className="text-base font-semibold">{title}</CardTitle>
231
- {realtime && (
232
- <Badge variant="secondary" className="text-xs">
233
- <span className="mr-1 h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse" />
234
- Live
235
- </Badge>
236
- )}
237
- </div>
238
-
239
- {/* Aksiyonlar */}
240
- <div className="flex items-center gap-1">
241
- {showFilters && (
242
- <DropdownMenu>
243
- <DropdownMenuTrigger asChild>
244
- <Button variant="ghost" size="sm" className="h-8 px-2">
245
- <Filter className="h-4 w-4 mr-1" />
246
- {filter !== 'all' && <Badge variant="secondary" className="ml-1">{filter}</Badge>}
247
- </Button>
248
- </DropdownMenuTrigger>
249
- <DropdownMenuContent align="end">
250
- <DropdownMenuItem onClick={() => setFilter('all')}>
251
- All Activities
252
- </DropdownMenuItem>
253
- <DropdownMenuSeparator />
254
- <DropdownMenuItem onClick={() => setFilter('info')}>
255
- <Info className="mr-2 h-4 w-4 text-blue-500" />
256
- Information
257
- </DropdownMenuItem>
258
- <DropdownMenuItem onClick={() => setFilter('success')}>
259
- <CheckCircle className="mr-2 h-4 w-4 text-green-500" />
260
- Success
261
- </DropdownMenuItem>
262
- <DropdownMenuItem onClick={() => setFilter('warning')}>
263
- <AlertCircle className="mr-2 h-4 w-4 text-yellow-500" />
264
- Warning
265
- </DropdownMenuItem>
266
- <DropdownMenuItem onClick={() => setFilter('error')}>
267
- <XCircle className="mr-2 h-4 w-4 text-red-500" />
268
- Error
269
- </DropdownMenuItem>
270
- </DropdownMenuContent>
271
- </DropdownMenu>
272
- )}
273
-
274
- {showNotifications && (
275
- <Button
276
- variant="ghost"
277
- size="sm"
278
- className="h-8 w-8 p-0"
279
- onClick={() => {
280
- setNotificationsEnabled(!notificationsEnabled)
281
- onAction?.('notifications', { enabled: !notificationsEnabled })
282
- }}
283
- >
284
- {notificationsEnabled ? (
285
- <Bell className="h-4 w-4" />
286
- ) : (
287
- <BellOff className="h-4 w-4 text-muted-foreground" />
288
- )}
289
- </Button>
290
- )}
291
-
292
- <Button
293
- variant="ghost"
294
- size="sm"
295
- className="h-8 w-8 p-0"
296
- onClick={() => onAction?.('refresh')}
297
- >
298
- <RefreshCw className="h-4 w-4" />
299
- </Button>
300
- </div>
301
- </CardHeader>
302
-
303
- {/* İçerik */}
304
- <CardContent className="p-0">
305
- <ScrollArea className="px-4 pb-4" style={{ height }}>
306
- <AnimatePresence mode="popLayout">
307
- {loading ? (
308
- <motion.div
309
- key="loading"
310
- initial={{ opacity: 0 }}
311
- animate={{ opacity: 1 }}
312
- exit={{ opacity: 0 }}
313
- className="space-y-3"
314
- >
315
- {[...Array(5)].map((_, i) => (
316
- <div key={i} className="flex gap-3">
317
- <div className="h-8 w-8 rounded-full bg-muted animate-pulse" />
318
- <div className="flex-1 space-y-2">
319
- <div className="h-4 bg-muted rounded animate-pulse" />
320
- <div className="h-3 bg-muted rounded w-3/4 animate-pulse" />
321
- </div>
322
- </div>
323
- ))}
324
- </motion.div>
325
- ) : filteredItems.length === 0 ? (
326
- <motion.div
327
- key="empty"
328
- initial={{ opacity: 0 }}
329
- animate={{ opacity: 1 }}
330
- className="flex flex-col items-center justify-center py-12 text-muted-foreground"
331
- >
332
- <Activity className="h-8 w-8 mb-2" />
333
- <p className="text-sm">No activities to show</p>
334
- </motion.div>
335
- ) : (
336
- <div className="space-y-1">
337
- {filteredItems.map(item =>
338
- renderActivityItem(item, newItems.some(newItem => newItem.id === item.id))
339
- )}
340
- </div>
341
- )}
342
- </AnimatePresence>
343
- </ScrollArea>
344
- </CardContent>
345
- </Card>
346
- )
347
- }
348
-
349
- export default ActivityFeed