@moontra/moonui-pro 2.19.0 → 2.20.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 (47) hide show
  1. package/dist/index.d.ts +3251 -0
  2. package/dist/index.mjs +2410 -1545
  3. package/package.json +137 -136
  4. package/src/__tests__/use-local-storage.test.tsx +2 -2
  5. package/src/components/advanced-chart/index.tsx +6 -6
  6. package/src/components/calendar/event-dialog.tsx +1 -1
  7. package/src/components/calendar/index.tsx +1 -1
  8. package/src/components/calendar-pro/index.tsx +2 -4
  9. package/src/components/dashboard/demo.tsx +2 -2
  10. package/src/components/dashboard/widgets/activity-feed.tsx +1 -1
  11. package/src/components/dashboard/widgets/metric-card.tsx +1 -1
  12. package/src/components/enhanced/button.tsx +13 -13
  13. package/src/components/file-upload/file-upload.test.tsx +20 -19
  14. package/src/components/form-wizard/form-wizard-progress.tsx +7 -7
  15. package/src/components/gesture-drawer/index.tsx +551 -0
  16. package/src/components/github-stars/hooks.ts +1 -1
  17. package/src/components/github-stars/index.tsx +1 -1
  18. package/src/components/github-stars/types.ts +1 -0
  19. package/src/components/health-check/index.tsx +2 -2
  20. package/src/components/hover-card-3d/index.tsx +437 -74
  21. package/src/components/index.ts +10 -1
  22. package/src/components/lazy-component/index.tsx +4 -2
  23. package/src/components/license-error/index.tsx +29 -0
  24. package/src/components/memory-efficient-data/index.tsx +1 -1
  25. package/src/components/pinch-zoom/index.tsx +438 -42
  26. package/src/components/rich-text-editor/index.tsx +12 -12
  27. package/src/components/timeline/index.tsx +2 -2
  28. package/src/components/ui/aspect-ratio.tsx +186 -22
  29. package/src/components/ui/button.tsx +47 -50
  30. package/src/components/ui/card.tsx +98 -30
  31. package/src/components/ui/gesture-drawer.tsx +11 -0
  32. package/src/components/ui/index.ts +17 -5
  33. package/src/components/ui/lightbox.tsx +606 -0
  34. package/src/components/ui/media-gallery.tsx +612 -0
  35. package/src/components/ui/select.tsx +134 -35
  36. package/src/components/ui/toggle.tsx +78 -15
  37. package/src/components/virtual-list/index.tsx +7 -7
  38. package/src/index.ts +4 -4
  39. package/src/lib/component-metadata.ts +18 -0
  40. package/src/lib/paddle.ts +17 -0
  41. package/src/patterns/login-form/index.tsx +1 -1
  42. package/src/patterns/login-form/types.ts +6 -6
  43. package/src/styles/index.css +14 -4
  44. package/src/types/next-auth.d.ts +21 -0
  45. package/src/use-local-storage.tsx +3 -3
  46. package/src/use-scroll-animation.ts +3 -5
  47. package/src/components/ui/hover-card-3d.tsx +0 -472
@@ -0,0 +1,612 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { cva, type VariantProps } from "class-variance-authority"
5
+ import { motion, AnimatePresence } from "framer-motion"
6
+ import { Grid3x3, LayoutGrid, Square, Columns, Filter, SortAsc, Image as ImageIcon, Video, X, Loader2 } from "lucide-react"
7
+
8
+ import { cn } from "../../lib/utils"
9
+ import {
10
+ MoonUILightboxProviderPro,
11
+ MoonUILightboxTriggerPro,
12
+ MoonUILightboxContentPro,
13
+ type MediaItem
14
+ } from "./lightbox"
15
+
16
+ /**
17
+ * Premium Media Gallery Component
18
+ *
19
+ * Advanced gallery component for displaying images and videos in responsive layouts
20
+ * with filtering, sorting, lightbox integration, and smooth animations.
21
+ * Perfect for portfolios, product galleries, and media showcases.
22
+ */
23
+
24
+ const galleryVariants = cva(
25
+ "w-full",
26
+ {
27
+ variants: {
28
+ layout: {
29
+ grid: "grid gap-4",
30
+ masonry: "",
31
+ horizontal: "flex overflow-x-auto gap-4 pb-4 snap-x snap-mandatory [&>*]:snap-center",
32
+ justified: "flex flex-wrap gap-2",
33
+ },
34
+ columns: {
35
+ 1: "grid-cols-1",
36
+ 2: "grid-cols-1 sm:grid-cols-2",
37
+ 3: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3",
38
+ 4: "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",
39
+ 5: "grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5",
40
+ 6: "grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6",
41
+ },
42
+ },
43
+ defaultVariants: {
44
+ layout: "grid",
45
+ columns: 3,
46
+ },
47
+ }
48
+ )
49
+
50
+ const galleryItemVariants = cva(
51
+ "relative overflow-hidden cursor-pointer group",
52
+ {
53
+ variants: {
54
+ variant: {
55
+ default: "rounded-lg",
56
+ card: "rounded-lg shadow-sm border border-border bg-card",
57
+ ghost: "rounded-lg hover:bg-accent/50",
58
+ outline: "rounded-lg border-2 border-transparent hover:border-primary",
59
+ glass: "rounded-lg backdrop-blur-md bg-white/10 border border-white/20",
60
+ },
61
+ aspectRatio: {
62
+ square: "aspect-square",
63
+ video: "aspect-video",
64
+ portrait: "aspect-[3/4]",
65
+ auto: "",
66
+ },
67
+ hover: {
68
+ none: "",
69
+ zoom: "transition-transform duration-300 hover:scale-105",
70
+ lift: "transition-all duration-300 hover:-translate-y-1 hover:shadow-lg",
71
+ glow: "transition-all duration-300 hover:shadow-lg hover:shadow-primary/20",
72
+ },
73
+ },
74
+ defaultVariants: {
75
+ variant: "default",
76
+ aspectRatio: "square",
77
+ hover: "zoom",
78
+ },
79
+ }
80
+ )
81
+
82
+ interface GalleryCategory {
83
+ id: string
84
+ label: string
85
+ icon?: React.ReactNode
86
+ }
87
+
88
+ interface GallerySortOption {
89
+ id: string
90
+ label: string
91
+ compareFn: (a: MediaItem, b: MediaItem) => number
92
+ }
93
+
94
+ interface MoonUIMediaGalleryProProps
95
+ extends React.HTMLAttributes<HTMLDivElement>,
96
+ VariantProps<typeof galleryVariants> {
97
+ items: MediaItem[]
98
+ variant?: VariantProps<typeof galleryItemVariants>["variant"]
99
+ aspectRatio?: VariantProps<typeof galleryItemVariants>["aspectRatio"]
100
+ hover?: VariantProps<typeof galleryItemVariants>["hover"]
101
+ enableLightbox?: boolean
102
+ enableFiltering?: boolean
103
+ enableSorting?: boolean
104
+ categories?: GalleryCategory[]
105
+ sortOptions?: GallerySortOption[]
106
+ defaultCategory?: string
107
+ defaultSort?: string
108
+ showItemType?: boolean
109
+ showOverlay?: boolean
110
+ overlayContent?: (item: MediaItem, index: number) => React.ReactNode
111
+ loadingState?: boolean
112
+ skeletonCount?: number
113
+ emptyState?: React.ReactNode
114
+ onItemClick?: (item: MediaItem, index: number) => void
115
+ lazyLoad?: boolean
116
+ infiniteScroll?: boolean
117
+ onLoadMore?: () => void
118
+ hasMore?: boolean
119
+ lightboxProps?: Partial<React.ComponentProps<typeof MoonUILightboxContentPro>>
120
+ }
121
+
122
+ const MoonUIMediaGalleryPro = React.forwardRef<
123
+ HTMLDivElement,
124
+ MoonUIMediaGalleryProProps
125
+ >(({
126
+ className,
127
+ items,
128
+ layout,
129
+ columns,
130
+ variant,
131
+ aspectRatio,
132
+ hover,
133
+ enableLightbox = true,
134
+ enableFiltering = false,
135
+ enableSorting = false,
136
+ categories = [],
137
+ sortOptions = [],
138
+ defaultCategory = "all",
139
+ defaultSort = "default",
140
+ showItemType = true,
141
+ showOverlay = true,
142
+ overlayContent,
143
+ loadingState = false,
144
+ skeletonCount = 6,
145
+ emptyState,
146
+ onItemClick,
147
+ lazyLoad = true,
148
+ infiniteScroll = false,
149
+ onLoadMore,
150
+ hasMore = false,
151
+ lightboxProps,
152
+ ...props
153
+ }, ref) => {
154
+ const [activeCategory, setActiveCategory] = React.useState(defaultCategory)
155
+ const [activeSort, setActiveSort] = React.useState(defaultSort)
156
+ const [showFilters, setShowFilters] = React.useState(false)
157
+ const [loadedImages, setLoadedImages] = React.useState<Set<number>>(new Set())
158
+ const observerRef = React.useRef<IntersectionObserver | null>(null)
159
+ const loadMoreRef = React.useRef<HTMLDivElement>(null)
160
+
161
+ // Filter items by category
162
+ const filteredItems = React.useMemo(() => {
163
+ if (!enableFiltering || activeCategory === "all") return items
164
+
165
+ return items.filter(item => {
166
+ // Check if item has category property
167
+ if ('category' in item && typeof item.category === 'string') {
168
+ return item.category === activeCategory
169
+ }
170
+ // Fallback to type-based filtering
171
+ if (activeCategory === "image") return item.type === "image"
172
+ if (activeCategory === "video") return item.type === "video"
173
+ return true
174
+ })
175
+ }, [items, activeCategory, enableFiltering])
176
+
177
+ // Sort items
178
+ const sortedItems = React.useMemo(() => {
179
+ if (!enableSorting || activeSort === "default") return filteredItems
180
+
181
+ const sortOption = sortOptions.find(opt => opt.id === activeSort)
182
+ if (!sortOption) return filteredItems
183
+
184
+ return [...filteredItems].sort(sortOption.compareFn)
185
+ }, [filteredItems, activeSort, enableSorting, sortOptions])
186
+
187
+ // Default categories if none provided
188
+ const defaultCategories: GalleryCategory[] = [
189
+ { id: "all", label: "All" },
190
+ { id: "image", label: "Images", icon: <ImageIcon className="h-4 w-4" /> },
191
+ { id: "video", label: "Videos", icon: <Video className="h-4 w-4" /> },
192
+ ]
193
+
194
+ const finalCategories = categories.length > 0 ? categories : defaultCategories
195
+
196
+ // Lazy loading
197
+ React.useEffect(() => {
198
+ if (!lazyLoad) return
199
+
200
+ observerRef.current = new IntersectionObserver(
201
+ (entries) => {
202
+ entries.forEach((entry) => {
203
+ if (entry.isIntersecting) {
204
+ const index = parseInt(entry.target.getAttribute("data-index") || "0")
205
+ setLoadedImages(prev => new Set(prev).add(index))
206
+ }
207
+ })
208
+ },
209
+ { rootMargin: "50px" }
210
+ )
211
+
212
+ return () => {
213
+ observerRef.current?.disconnect()
214
+ }
215
+ }, [lazyLoad])
216
+
217
+ // Infinite scroll
218
+ React.useEffect(() => {
219
+ if (!infiniteScroll || !onLoadMore || !hasMore) return
220
+
221
+ const observer = new IntersectionObserver(
222
+ (entries) => {
223
+ if (entries[0].isIntersecting) {
224
+ onLoadMore()
225
+ }
226
+ },
227
+ { rootMargin: "100px" }
228
+ )
229
+
230
+ if (loadMoreRef.current) {
231
+ observer.observe(loadMoreRef.current)
232
+ }
233
+
234
+ return () => observer.disconnect()
235
+ }, [infiniteScroll, onLoadMore, hasMore])
236
+
237
+ const handleItemClick = (item: MediaItem, index: number) => {
238
+ if (onItemClick) {
239
+ onItemClick(item, index)
240
+ }
241
+ }
242
+
243
+ const renderGalleryItem = (item: MediaItem, index: number) => {
244
+ const isLoaded = !lazyLoad || loadedImages.has(index)
245
+
246
+ const itemContent = (
247
+ <motion.div
248
+ key={index}
249
+ className={cn(
250
+ galleryItemVariants({
251
+ variant,
252
+ aspectRatio: layout === "masonry" || layout === "justified" ? "auto" : aspectRatio,
253
+ hover
254
+ }),
255
+ layout === "masonry" && "break-inside-avoid mb-4 inline-block w-full",
256
+ layout === "justified" && "flex-grow"
257
+ )}
258
+ style={layout === "justified" ? { flexBasis: "200px", maxWidth: "400px" } : undefined}
259
+ initial={{ opacity: 0, scale: 0.9 }}
260
+ animate={{ opacity: 1, scale: 1 }}
261
+ transition={{ duration: 0.3, delay: index * 0.05 }}
262
+ data-index={index}
263
+ ref={(el) => {
264
+ if (el && observerRef.current && !loadedImages.has(index)) {
265
+ observerRef.current.observe(el)
266
+ }
267
+ }}
268
+ onClick={() => handleItemClick(item, index)}
269
+ >
270
+ {item.type === "image" ? (
271
+ <div className={cn(
272
+ "relative w-full",
273
+ layout === "masonry" || layout === "justified" ? "" : "h-full"
274
+ )}>
275
+ <img
276
+ src={item.thumbnail || item.src}
277
+ alt={item.alt || `Gallery item ${index + 1}`}
278
+ className={cn(
279
+ "w-full object-cover",
280
+ layout === "masonry" ? "h-auto" : "h-full",
281
+ isLoaded ? "opacity-100" : "opacity-0",
282
+ "transition-opacity duration-300"
283
+ )}
284
+ loading={lazyLoad ? "lazy" : undefined}
285
+ onLoad={() => setLoadedImages(prev => new Set(prev).add(index))}
286
+ />
287
+ {!isLoaded && (
288
+ <div className={cn(
289
+ "absolute inset-0 w-full bg-muted animate-pulse",
290
+ layout === "masonry" ? "h-64" : "h-full",
291
+ layout === "masonry" && "aspect-[3/4]"
292
+ )} />
293
+ )}
294
+ </div>
295
+ ) : (
296
+ <div className={cn(
297
+ "relative w-full bg-black",
298
+ layout === "masonry" ? "" : "h-full"
299
+ )}>
300
+ {isLoaded && (item.thumbnail || item.poster) && (
301
+ <img
302
+ src={item.thumbnail || item.poster}
303
+ alt={item.alt || `Video thumbnail ${index + 1}`}
304
+ className={cn(
305
+ "w-full object-cover",
306
+ layout === "masonry" ? "h-auto" : "h-full"
307
+ )}
308
+ loading={lazyLoad ? "lazy" : undefined}
309
+ />
310
+ )}
311
+ <div className="absolute inset-0 flex items-center justify-center">
312
+ <div className="w-12 h-12 bg-black/70 rounded-full flex items-center justify-center">
313
+ <Video className="h-6 w-6 text-white" />
314
+ </div>
315
+ </div>
316
+ </div>
317
+ )}
318
+
319
+ {/* Overlay */}
320
+ {showOverlay && (
321
+ <div className="absolute inset-0 bg-gradient-to-t from-black/70 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300">
322
+ {overlayContent ? (
323
+ overlayContent(item, index)
324
+ ) : (
325
+ <div className="absolute bottom-0 left-0 right-0 p-4 text-white">
326
+ {item.title && (
327
+ <h3 className="text-sm font-semibold mb-1">{item.title}</h3>
328
+ )}
329
+ {item.description && (
330
+ <p className="text-xs opacity-90 line-clamp-2">{item.description}</p>
331
+ )}
332
+ </div>
333
+ )}
334
+
335
+ {showItemType && (
336
+ <div className="absolute top-2 right-2">
337
+ <div className="w-8 h-8 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center">
338
+ {item.type === "image" ? (
339
+ <ImageIcon className="h-4 w-4 text-white" />
340
+ ) : (
341
+ <Video className="h-4 w-4 text-white" />
342
+ )}
343
+ </div>
344
+ </div>
345
+ )}
346
+ </div>
347
+ )}
348
+ </motion.div>
349
+ )
350
+
351
+ // If lightbox is enabled and we're in the main gallery content, wrap with trigger
352
+ if (enableLightbox) {
353
+ return (
354
+ <MoonUILightboxTriggerPro key={index} index={index}>
355
+ {itemContent}
356
+ </MoonUILightboxTriggerPro>
357
+ )
358
+ }
359
+
360
+ return itemContent
361
+ }
362
+
363
+ const renderSkeleton = () => (
364
+ <div className={cn(galleryItemVariants({ variant, aspectRatio }))}>
365
+ <div className="w-full h-full bg-muted animate-pulse" />
366
+ </div>
367
+ )
368
+
369
+ const galleryContent = (
370
+ <>
371
+ {/* Filters and Sorting */}
372
+ {(enableFiltering || enableSorting) && (
373
+ <div className="mb-6">
374
+ <div className="flex items-center justify-between mb-4">
375
+ <div className="flex items-center gap-4">
376
+ {enableFiltering && (
377
+ <button
378
+ onClick={() => setShowFilters(!showFilters)}
379
+ className={cn(
380
+ "flex items-center gap-2 px-4 py-2 rounded-lg border transition-colors",
381
+ showFilters
382
+ ? "bg-primary text-primary-foreground border-primary"
383
+ : "bg-background border-border hover:bg-accent"
384
+ )}
385
+ >
386
+ <Filter className="h-4 w-4" />
387
+ Filters
388
+ </button>
389
+ )}
390
+ {enableSorting && sortOptions.length > 0 && (
391
+ <select
392
+ value={activeSort}
393
+ onChange={(e) => setActiveSort(e.target.value)}
394
+ className="px-4 py-2 rounded-lg border bg-background"
395
+ >
396
+ <option value="default">Default order</option>
397
+ {sortOptions.map(option => (
398
+ <option key={option.id} value={option.id}>
399
+ {option.label}
400
+ </option>
401
+ ))}
402
+ </select>
403
+ )}
404
+ </div>
405
+ <div className="text-sm text-muted-foreground">
406
+ {sortedItems.length} items
407
+ </div>
408
+ </div>
409
+
410
+ {/* Category filters */}
411
+ <AnimatePresence>
412
+ {showFilters && enableFiltering && (
413
+ <motion.div
414
+ initial={{ height: 0, opacity: 0 }}
415
+ animate={{ height: "auto", opacity: 1 }}
416
+ exit={{ height: 0, opacity: 0 }}
417
+ transition={{ duration: 0.2 }}
418
+ className="overflow-hidden"
419
+ >
420
+ <div className="flex flex-wrap gap-2 pb-4">
421
+ {finalCategories.map(category => (
422
+ <button
423
+ key={category.id}
424
+ onClick={() => setActiveCategory(category.id)}
425
+ className={cn(
426
+ "flex items-center gap-2 px-3 py-1.5 rounded-full text-sm transition-colors",
427
+ activeCategory === category.id
428
+ ? "bg-primary text-primary-foreground"
429
+ : "bg-muted hover:bg-accent"
430
+ )}
431
+ >
432
+ {category.icon}
433
+ {category.label}
434
+ </button>
435
+ ))}
436
+ </div>
437
+ </motion.div>
438
+ )}
439
+ </AnimatePresence>
440
+ </div>
441
+ )}
442
+
443
+ {/* Gallery */}
444
+ <div
445
+ ref={ref}
446
+ className={cn(
447
+ layout === "masonry"
448
+ ? "columns-1 sm:columns-2 md:columns-3 lg:columns-4 gap-4"
449
+ : galleryVariants({ layout, columns }),
450
+ className
451
+ )}
452
+ style={layout === "masonry" ? { columnGap: "1rem" } : undefined}
453
+ {...props}
454
+ >
455
+ {loadingState ? (
456
+ <>
457
+ {Array.from({ length: skeletonCount }).map((_, i) => (
458
+ <React.Fragment key={i}>{renderSkeleton()}</React.Fragment>
459
+ ))}
460
+ </>
461
+ ) : sortedItems.length > 0 ? (
462
+ sortedItems.map((item, index) => renderGalleryItem(item, index))
463
+ ) : (
464
+ emptyState || (
465
+ <div className="col-span-full flex flex-col items-center justify-center py-12 text-center">
466
+ <ImageIcon className="h-12 w-12 text-muted-foreground mb-4" />
467
+ <p className="text-muted-foreground">No media items found</p>
468
+ </div>
469
+ )
470
+ )}
471
+ </div>
472
+
473
+ {/* Load more trigger */}
474
+ {infiniteScroll && hasMore && (
475
+ <div ref={loadMoreRef} className="flex justify-center py-8">
476
+ <Loader2 className="h-6 w-6 animate-spin text-muted-foreground" />
477
+ </div>
478
+ )}
479
+ </>
480
+ )
481
+
482
+ if (enableLightbox) {
483
+ return (
484
+ <MoonUILightboxProviderPro items={sortedItems}>
485
+ {galleryContent}
486
+ <MoonUILightboxContentPro showThumbnails showNavigation backdrop="blur" {...lightboxProps} />
487
+ </MoonUILightboxProviderPro>
488
+ )
489
+ }
490
+
491
+ return galleryContent
492
+ })
493
+ MoonUIMediaGalleryPro.displayName = "MoonUIMediaGalleryPro"
494
+
495
+ // Gallery item component for custom layouts
496
+ interface MoonUIGalleryItemProProps
497
+ extends React.HTMLAttributes<HTMLDivElement>,
498
+ VariantProps<typeof galleryItemVariants> {
499
+ item: MediaItem
500
+ index?: number
501
+ showType?: boolean
502
+ showOverlay?: boolean
503
+ overlayContent?: React.ReactNode
504
+ onLoad?: () => void
505
+ }
506
+
507
+ const MoonUIGalleryItemPro = React.forwardRef<
508
+ HTMLDivElement,
509
+ MoonUIGalleryItemProProps
510
+ >(({
511
+ className,
512
+ item,
513
+ index = 0,
514
+ variant,
515
+ aspectRatio,
516
+ hover,
517
+ showType = true,
518
+ showOverlay = true,
519
+ overlayContent,
520
+ onLoad,
521
+ ...props
522
+ }, ref) => {
523
+ const [isLoaded, setIsLoaded] = React.useState(false)
524
+
525
+ const handleLoad = () => {
526
+ setIsLoaded(true)
527
+ onLoad?.()
528
+ }
529
+
530
+ return (
531
+ <div
532
+ ref={ref}
533
+ className={cn(galleryItemVariants({ variant, aspectRatio, hover }), className)}
534
+ {...props}
535
+ >
536
+ {item.type === "image" ? (
537
+ <img
538
+ src={item.src}
539
+ alt={item.alt || `Gallery item ${index + 1}`}
540
+ className={cn(
541
+ "w-full h-full object-cover transition-opacity duration-300",
542
+ isLoaded ? "opacity-100" : "opacity-0"
543
+ )}
544
+ onLoad={handleLoad}
545
+ />
546
+ ) : (
547
+ <div className="relative w-full h-full bg-black">
548
+ {item.poster && (
549
+ <img
550
+ src={item.poster}
551
+ alt={item.alt || `Video thumbnail ${index + 1}`}
552
+ className="w-full h-full object-cover"
553
+ onLoad={handleLoad}
554
+ />
555
+ )}
556
+ <div className="absolute inset-0 flex items-center justify-center">
557
+ <div className="w-12 h-12 bg-black/70 rounded-full flex items-center justify-center">
558
+ <Video className="h-6 w-6 text-white" />
559
+ </div>
560
+ </div>
561
+ </div>
562
+ )}
563
+
564
+ {!isLoaded && (
565
+ <div className="absolute inset-0 bg-muted animate-pulse" />
566
+ )}
567
+
568
+ {showOverlay && isLoaded && (
569
+ <div className="absolute inset-0 bg-gradient-to-t from-black/70 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300">
570
+ {overlayContent || (
571
+ <div className="absolute bottom-0 left-0 right-0 p-4 text-white">
572
+ {item.title && (
573
+ <h3 className="text-sm font-semibold mb-1">{item.title}</h3>
574
+ )}
575
+ {item.description && (
576
+ <p className="text-xs opacity-90 line-clamp-2">{item.description}</p>
577
+ )}
578
+ </div>
579
+ )}
580
+
581
+ {showType && (
582
+ <div className="absolute top-2 right-2">
583
+ <div className="w-8 h-8 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center">
584
+ {item.type === "image" ? (
585
+ <ImageIcon className="h-4 w-4 text-white" />
586
+ ) : (
587
+ <Video className="h-4 w-4 text-white" />
588
+ )}
589
+ </div>
590
+ </div>
591
+ )}
592
+ </div>
593
+ )}
594
+ </div>
595
+ )
596
+ })
597
+ MoonUIGalleryItemPro.displayName = "MoonUIGalleryItemPro"
598
+
599
+ export {
600
+ MoonUIMediaGalleryPro,
601
+ MoonUIGalleryItemPro,
602
+ galleryVariants,
603
+ galleryItemVariants,
604
+ type GalleryCategory,
605
+ type GallerySortOption,
606
+ }
607
+
608
+ // Clean exports
609
+ export {
610
+ MoonUIMediaGalleryPro as MediaGallery,
611
+ MoonUIGalleryItemPro as GalleryItem,
612
+ }