@moontra/moonui-pro 2.20.1 → 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 (162) hide show
  1. package/dist/index.d.ts +691 -261
  2. package/dist/index.mjs +7418 -4934
  3. package/package.json +11 -5
  4. package/plugin/index.d.ts +86 -0
  5. package/plugin/index.js +308 -0
  6. package/scripts/postbuild.js +27 -0
  7. package/scripts/postinstall.js +176 -23
  8. package/src/__tests__/use-intersection-observer.test.tsx +0 -216
  9. package/src/__tests__/use-local-storage.test.tsx +0 -174
  10. package/src/__tests__/use-pro-access.test.tsx +0 -183
  11. package/src/components/advanced-chart/advanced-chart.test.tsx +0 -281
  12. package/src/components/advanced-chart/index.tsx +0 -1242
  13. package/src/components/advanced-forms/index.tsx +0 -426
  14. package/src/components/animated-button/index.tsx +0 -385
  15. package/src/components/calendar/event-dialog.tsx +0 -372
  16. package/src/components/calendar/index.tsx +0 -1073
  17. package/src/components/calendar-pro/index.tsx +0 -1697
  18. package/src/components/color-picker/index.tsx +0 -432
  19. package/src/components/credit-card-input/index.tsx +0 -406
  20. package/src/components/dashboard/dashboard-grid.tsx +0 -462
  21. package/src/components/dashboard/demo.tsx +0 -425
  22. package/src/components/dashboard/index.tsx +0 -1046
  23. package/src/components/dashboard/time-range-picker.tsx +0 -336
  24. package/src/components/dashboard/types.ts +0 -222
  25. package/src/components/dashboard/widgets/activity-feed.tsx +0 -344
  26. package/src/components/dashboard/widgets/chart-widget.tsx +0 -418
  27. package/src/components/dashboard/widgets/metric-card.tsx +0 -343
  28. package/src/components/data-table/data-table-bulk-actions.tsx +0 -204
  29. package/src/components/data-table/data-table-column-toggle.tsx +0 -169
  30. package/src/components/data-table/data-table-export.ts +0 -156
  31. package/src/components/data-table/data-table-filter-drawer.tsx +0 -448
  32. package/src/components/data-table/data-table.test.tsx +0 -187
  33. package/src/components/data-table/index.tsx +0 -845
  34. package/src/components/draggable-list/index.tsx +0 -100
  35. package/src/components/enhanced/badge.tsx +0 -191
  36. package/src/components/enhanced/button.tsx +0 -362
  37. package/src/components/enhanced/card.tsx +0 -266
  38. package/src/components/enhanced/dialog.tsx +0 -246
  39. package/src/components/enhanced/index.ts +0 -4
  40. package/src/components/error-boundary/index.tsx +0 -109
  41. package/src/components/file-upload/file-upload.test.tsx +0 -243
  42. package/src/components/file-upload/index.tsx +0 -1660
  43. package/src/components/floating-action-button/index.tsx +0 -206
  44. package/src/components/form-wizard/form-wizard-context.tsx +0 -307
  45. package/src/components/form-wizard/form-wizard-navigation.tsx +0 -118
  46. package/src/components/form-wizard/form-wizard-progress.tsx +0 -298
  47. package/src/components/form-wizard/form-wizard-step.tsx +0 -111
  48. package/src/components/form-wizard/index.tsx +0 -102
  49. package/src/components/form-wizard/types.ts +0 -76
  50. package/src/components/gesture-drawer/index.tsx +0 -551
  51. package/src/components/github-stars/github-api.ts +0 -426
  52. package/src/components/github-stars/hooks.ts +0 -516
  53. package/src/components/github-stars/index.tsx +0 -375
  54. package/src/components/github-stars/types.ts +0 -148
  55. package/src/components/github-stars/variants.tsx +0 -513
  56. package/src/components/health-check/index.tsx +0 -439
  57. package/src/components/hover-card-3d/index.tsx +0 -530
  58. package/src/components/index.ts +0 -128
  59. package/src/components/internal/index.ts +0 -78
  60. package/src/components/kanban/add-card-modal.tsx +0 -502
  61. package/src/components/kanban/card-detail-modal.tsx +0 -761
  62. package/src/components/kanban/index.ts +0 -13
  63. package/src/components/kanban/kanban.tsx +0 -1684
  64. package/src/components/kanban/types.ts +0 -168
  65. package/src/components/lazy-component/index.tsx +0 -823
  66. package/src/components/license-error/index.tsx +0 -29
  67. package/src/components/magnetic-button/index.tsx +0 -167
  68. package/src/components/memory-efficient-data/index.tsx +0 -1016
  69. package/src/components/moonui-quiz-form/index.tsx +0 -817
  70. package/src/components/optimized-image/index.tsx +0 -425
  71. package/src/components/performance-debugger/index.tsx +0 -589
  72. package/src/components/performance-monitor/index.tsx +0 -794
  73. package/src/components/phone-number-input/index.tsx +0 -338
  74. package/src/components/pinch-zoom/index.tsx +0 -566
  75. package/src/components/quiz-form/index.tsx +0 -479
  76. package/src/components/rich-text-editor/index-old-backup.tsx +0 -437
  77. package/src/components/rich-text-editor/index.tsx +0 -2324
  78. package/src/components/rich-text-editor/slash-commands-extension.ts +0 -220
  79. package/src/components/rich-text-editor/slash-commands.css +0 -35
  80. package/src/components/rich-text-editor/table-styles.css +0 -65
  81. package/src/components/sidebar/index.tsx +0 -865
  82. package/src/components/spotlight-card/index.tsx +0 -191
  83. package/src/components/swipeable-card/index.tsx +0 -100
  84. package/src/components/timeline/index.tsx +0 -1148
  85. package/src/components/ui/accordion.tsx +0 -73
  86. package/src/components/ui/alert-dialog.tsx +0 -141
  87. package/src/components/ui/alert.tsx +0 -141
  88. package/src/components/ui/aspect-ratio.tsx +0 -245
  89. package/src/components/ui/avatar.tsx +0 -153
  90. package/src/components/ui/badge.tsx +0 -228
  91. package/src/components/ui/breadcrumb.tsx +0 -214
  92. package/src/components/ui/button.tsx +0 -222
  93. package/src/components/ui/calendar.tsx +0 -387
  94. package/src/components/ui/card.tsx +0 -214
  95. package/src/components/ui/checkbox.tsx +0 -259
  96. package/src/components/ui/collapsible.tsx +0 -135
  97. package/src/components/ui/color-picker.tsx +0 -97
  98. package/src/components/ui/command.tsx +0 -225
  99. package/src/components/ui/dialog.tsx +0 -334
  100. package/src/components/ui/dropdown-menu.tsx +0 -218
  101. package/src/components/ui/gesture-drawer.tsx +0 -11
  102. package/src/components/ui/hover-card.tsx +0 -29
  103. package/src/components/ui/index.ts +0 -190
  104. package/src/components/ui/input.tsx +0 -222
  105. package/src/components/ui/label.tsx +0 -29
  106. package/src/components/ui/lightbox.tsx +0 -606
  107. package/src/components/ui/magnetic-button.tsx +0 -129
  108. package/src/components/ui/media-gallery.tsx +0 -612
  109. package/src/components/ui/pagination.tsx +0 -123
  110. package/src/components/ui/popover.tsx +0 -185
  111. package/src/components/ui/progress.tsx +0 -30
  112. package/src/components/ui/radio-group.tsx +0 -257
  113. package/src/components/ui/scroll-area.tsx +0 -47
  114. package/src/components/ui/select.tsx +0 -374
  115. package/src/components/ui/separator.tsx +0 -145
  116. package/src/components/ui/sheet.tsx +0 -139
  117. package/src/components/ui/skeleton.tsx +0 -20
  118. package/src/components/ui/slider.tsx +0 -354
  119. package/src/components/ui/spotlight-card.tsx +0 -119
  120. package/src/components/ui/switch.tsx +0 -86
  121. package/src/components/ui/table.tsx +0 -329
  122. package/src/components/ui/tabs.tsx +0 -198
  123. package/src/components/ui/textarea.tsx +0 -28
  124. package/src/components/ui/toast.tsx +0 -317
  125. package/src/components/ui/toggle.tsx +0 -119
  126. package/src/components/ui/tooltip.tsx +0 -151
  127. package/src/components/virtual-list/index.tsx +0 -668
  128. package/src/hooks/use-chart.ts +0 -205
  129. package/src/hooks/use-data-table.ts +0 -182
  130. package/src/hooks/use-docs-pro-access.ts +0 -13
  131. package/src/hooks/use-license-check.ts +0 -65
  132. package/src/hooks/use-subscription.ts +0 -19
  133. package/src/hooks/use-toast.ts +0 -15
  134. package/src/index.ts +0 -14
  135. package/src/lib/ai-providers.ts +0 -377
  136. package/src/lib/component-metadata.ts +0 -18
  137. package/src/lib/micro-interactions.ts +0 -255
  138. package/src/lib/paddle.ts +0 -17
  139. package/src/lib/utils.ts +0 -6
  140. package/src/patterns/login-form/index.tsx +0 -276
  141. package/src/patterns/login-form/types.ts +0 -67
  142. package/src/setupTests.ts +0 -41
  143. package/src/styles/advanced-chart.css +0 -239
  144. package/src/styles/calendar.css +0 -35
  145. package/src/styles/design-system.css +0 -363
  146. package/src/styles/index.css +0 -85
  147. package/src/styles/tailwind.css +0 -7
  148. package/src/styles/tokens.css +0 -455
  149. package/src/types/moonui.d.ts +0 -22
  150. package/src/types/next-auth.d.ts +0 -21
  151. package/src/use-intersection-observer.tsx +0 -154
  152. package/src/use-local-storage.tsx +0 -71
  153. package/src/use-paddle.ts +0 -138
  154. package/src/use-performance-optimizer.ts +0 -389
  155. package/src/use-pro-access.ts +0 -141
  156. package/src/use-scroll-animation.ts +0 -219
  157. package/src/use-subscription.ts +0 -37
  158. package/src/use-toast.ts +0 -32
  159. package/src/utils/chart-helpers.ts +0 -357
  160. package/src/utils/cn.ts +0 -6
  161. package/src/utils/data-processing.ts +0 -151
  162. package/src/utils/license-validator.tsx +0 -183
@@ -1,344 +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
-
65
- // Simüle edilmiş real-time güncellemeler
66
- React.useEffect(() => {
67
- if (!realtime) return
68
-
69
- const interval = setInterval(() => {
70
- const randomItem: ActivityItem = {
71
- id: `new-${Date.now()}`,
72
- type: ['info', 'success', 'warning', 'error'][Math.floor(Math.random() * 4)] as any,
73
- title: 'New activity',
74
- description: 'Something happened just now',
75
- timestamp: new Date(),
76
- user: {
77
- name: 'System',
78
- avatar: undefined
79
- }
80
- }
81
-
82
- setNewItems(prev => [randomItem, ...prev].slice(0, 3))
83
-
84
- setTimeout(() => {
85
- setNewItems(prev => prev.filter(item => item.id !== randomItem.id))
86
- }, 5000)
87
- }, 10000)
88
-
89
- return () => clearInterval(interval)
90
- }, [realtime])
91
-
92
- // Tip ikonları
93
- const getTypeIcon = (type: ActivityItem['type']) => {
94
- switch (type) {
95
- case 'info':
96
- return <Info className="h-4 w-4" />
97
- case 'success':
98
- return <CheckCircle className="h-4 w-4" />
99
- case 'warning':
100
- return <AlertCircle className="h-4 w-4" />
101
- case 'error':
102
- return <XCircle className="h-4 w-4" />
103
- }
104
- }
105
-
106
- // Tip renkleri
107
- const getTypeColor = (type: ActivityItem['type']) => {
108
- switch (type) {
109
- case 'info':
110
- return 'text-blue-500 bg-blue-100 dark:bg-blue-900/20'
111
- case 'success':
112
- return 'text-green-500 bg-green-100 dark:bg-green-900/20'
113
- case 'warning':
114
- return 'text-yellow-500 bg-yellow-100 dark:bg-yellow-900/20'
115
- case 'error':
116
- return 'text-red-500 bg-red-100 dark:bg-red-900/20'
117
- }
118
- }
119
-
120
- // Filtrelenmiş öğeler
121
- const filteredItems = [...newItems, ...items].filter(item =>
122
- filter === 'all' || item.type === filter
123
- )
124
-
125
- // Activity item renderer
126
- const renderActivityItem = (item: ActivityItem, isNew: boolean = false) => (
127
- <motion.div
128
- key={item.id}
129
- layout
130
- initial={{ opacity: 0, x: -20 }}
131
- animate={{ opacity: 1, x: 0 }}
132
- exit={{ opacity: 0, x: 20 }}
133
- whileHover={{ x: 4 }}
134
- transition={{ duration: 0.2 }}
135
- className={cn(
136
- "group relative flex gap-3 p-3 rounded-lg cursor-pointer transition-colors",
137
- "hover:bg-muted/50",
138
- isNew && "bg-primary/5 border-l-2 border-primary"
139
- )}
140
- onClick={() => onItemClick?.(item)}
141
- >
142
- {/* Timeline çizgisi */}
143
- <div className="absolute left-7 top-12 bottom-0 w-px bg-border" />
144
-
145
- {/* İkon veya Avatar */}
146
- <div className="relative z-10 flex-shrink-0">
147
- {item.user?.avatar ? (
148
- <Avatar className="h-8 w-8">
149
- <AvatarImage src={item.user.avatar} />
150
- <AvatarFallback>{item.user.name[0]}</AvatarFallback>
151
- </Avatar>
152
- ) : (
153
- <div className={cn(
154
- "h-8 w-8 rounded-full flex items-center justify-center",
155
- getTypeColor(item.type)
156
- )}>
157
- {item.icon || getTypeIcon(item.type)}
158
- </div>
159
- )}
160
- </div>
161
-
162
- {/* İçerik */}
163
- <div className="flex-1 min-w-0">
164
- <div className="flex items-start justify-between gap-2">
165
- <div className="flex-1 min-w-0">
166
- <p className="text-sm font-medium leading-tight">
167
- {item.user?.name && (
168
- <span className="text-foreground">{item.user.name} </span>
169
- )}
170
- <span className="text-muted-foreground">{item.title}</span>
171
- </p>
172
- {item.description && (
173
- <p className="text-sm text-muted-foreground mt-0.5 line-clamp-2">
174
- {item.description}
175
- </p>
176
- )}
177
- </div>
178
-
179
- {/* Zaman damgası */}
180
- <div className="flex items-center gap-1 text-xs text-muted-foreground whitespace-nowrap">
181
- <Clock className="h-3 w-3" />
182
- {formatDistanceToNow(item.timestamp, { addSuffix: true })}
183
- </div>
184
- </div>
185
-
186
- {/* Yeni öğe badge'i */}
187
- {isNew && (
188
- <motion.div
189
- initial={{ scale: 0 }}
190
- animate={{ scale: 1 }}
191
- className="inline-block mt-1"
192
- >
193
- <Badge variant="secondary" className="text-xs">New</Badge>
194
- </motion.div>
195
- )}
196
- </div>
197
-
198
- {/* Hover aksiyonları */}
199
- <div className="opacity-0 group-hover:opacity-100 transition-opacity">
200
- <Button
201
- variant="ghost"
202
- size="sm"
203
- className="h-6 w-6 p-0"
204
- onClick={(e) => {
205
- e.stopPropagation()
206
- onAction?.('more', item)
207
- }}
208
- >
209
- <MoreHorizontal className="h-3 w-3" />
210
- </Button>
211
- </div>
212
- </motion.div>
213
- )
214
-
215
- return (
216
- <Card className={cn(
217
- "relative overflow-hidden",
218
- glassmorphism && "bg-background/60 backdrop-blur-md border-white/10",
219
- className
220
- )}>
221
- {/* Header */}
222
- <CardHeader className="flex flex-row items-center justify-between space-y-0 pb-3">
223
- <div className="flex items-center gap-2">
224
- <Activity className="h-4 w-4 text-muted-foreground" />
225
- <CardTitle className="text-base font-semibold">{title}</CardTitle>
226
- {realtime && (
227
- <Badge variant="secondary" className="text-xs">
228
- <span className="mr-1 h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse" />
229
- Live
230
- </Badge>
231
- )}
232
- </div>
233
-
234
- {/* Aksiyonlar */}
235
- <div className="flex items-center gap-1">
236
- {showFilters && (
237
- <DropdownMenu>
238
- <DropdownMenuTrigger asChild>
239
- <Button variant="ghost" size="sm" className="h-8 px-2">
240
- <Filter className="h-4 w-4 mr-1" />
241
- {filter !== 'all' && <Badge variant="secondary" className="ml-1">{filter}</Badge>}
242
- </Button>
243
- </DropdownMenuTrigger>
244
- <DropdownMenuContent align="end">
245
- <DropdownMenuItem onClick={() => setFilter('all')}>
246
- All Activities
247
- </DropdownMenuItem>
248
- <DropdownMenuSeparator />
249
- <DropdownMenuItem onClick={() => setFilter('info')}>
250
- <Info className="mr-2 h-4 w-4 text-blue-500" />
251
- Information
252
- </DropdownMenuItem>
253
- <DropdownMenuItem onClick={() => setFilter('success')}>
254
- <CheckCircle className="mr-2 h-4 w-4 text-green-500" />
255
- Success
256
- </DropdownMenuItem>
257
- <DropdownMenuItem onClick={() => setFilter('warning')}>
258
- <AlertCircle className="mr-2 h-4 w-4 text-yellow-500" />
259
- Warning
260
- </DropdownMenuItem>
261
- <DropdownMenuItem onClick={() => setFilter('error')}>
262
- <XCircle className="mr-2 h-4 w-4 text-red-500" />
263
- Error
264
- </DropdownMenuItem>
265
- </DropdownMenuContent>
266
- </DropdownMenu>
267
- )}
268
-
269
- {showNotifications && (
270
- <Button
271
- variant="ghost"
272
- size="sm"
273
- className="h-8 w-8 p-0"
274
- onClick={() => {
275
- setNotificationsEnabled(!notificationsEnabled)
276
- onAction?.('notifications', { enabled: !notificationsEnabled })
277
- }}
278
- >
279
- {notificationsEnabled ? (
280
- <Bell className="h-4 w-4" />
281
- ) : (
282
- <BellOff className="h-4 w-4 text-muted-foreground" />
283
- )}
284
- </Button>
285
- )}
286
-
287
- <Button
288
- variant="ghost"
289
- size="sm"
290
- className="h-8 w-8 p-0"
291
- onClick={() => onAction?.('refresh')}
292
- >
293
- <RefreshCw className="h-4 w-4" />
294
- </Button>
295
- </div>
296
- </CardHeader>
297
-
298
- {/* İçerik */}
299
- <CardContent className="p-0">
300
- <ScrollArea className="px-4 pb-4" style={{ height }}>
301
- <AnimatePresence mode="popLayout">
302
- {loading ? (
303
- <motion.div
304
- key="loading"
305
- initial={{ opacity: 0 }}
306
- animate={{ opacity: 1 }}
307
- exit={{ opacity: 0 }}
308
- className="space-y-3"
309
- >
310
- {[...Array(5)].map((_, i) => (
311
- <div key={i} className="flex gap-3">
312
- <div className="h-8 w-8 rounded-full bg-muted animate-pulse" />
313
- <div className="flex-1 space-y-2">
314
- <div className="h-4 bg-muted rounded animate-pulse" />
315
- <div className="h-3 bg-muted rounded w-3/4 animate-pulse" />
316
- </div>
317
- </div>
318
- ))}
319
- </motion.div>
320
- ) : filteredItems.length === 0 ? (
321
- <motion.div
322
- key="empty"
323
- initial={{ opacity: 0 }}
324
- animate={{ opacity: 1 }}
325
- className="flex flex-col items-center justify-center py-12 text-muted-foreground"
326
- >
327
- <Activity className="h-8 w-8 mb-2" />
328
- <p className="text-sm">No activities to show</p>
329
- </motion.div>
330
- ) : (
331
- <div className="space-y-1">
332
- {filteredItems.map(item =>
333
- renderActivityItem(item, newItems.some(newItem => newItem.id === item.id))
334
- )}
335
- </div>
336
- )}
337
- </AnimatePresence>
338
- </ScrollArea>
339
- </CardContent>
340
- </Card>
341
- )
342
- }
343
-
344
- export default ActivityFeed