@moontra/moonui 2.2.0 → 2.2.2

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 (44) hide show
  1. package/dist/index.d.mts +91 -14
  2. package/dist/index.d.ts +91 -14
  3. package/dist/index.js +1714 -369
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +1546 -371
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/components/ui/alert.tsx +123 -93
  9. package/src/components/ui/avatar.tsx +2 -0
  10. package/src/components/ui/badge.tsx +19 -17
  11. package/src/components/ui/breadcrumb.tsx +2 -0
  12. package/src/components/ui/button.stories.tsx +4 -2
  13. package/src/components/ui/button.tsx +39 -33
  14. package/src/components/ui/calendar.tsx +1 -1
  15. package/src/components/ui/card-input.tsx +231 -0
  16. package/src/components/ui/card.stories.tsx +2 -0
  17. package/src/components/ui/card.tsx +2 -0
  18. package/src/components/ui/data-table.stories.tsx +4 -2
  19. package/src/components/ui/data-table.tsx +7 -7
  20. package/src/components/ui/date-picker.stories.tsx +2 -0
  21. package/src/components/ui/date-picker.tsx +18 -9
  22. package/src/components/ui/draggable-list.tsx +2 -0
  23. package/src/components/ui/index.ts +357 -44
  24. package/src/components/ui/input.stories.tsx +2 -0
  25. package/src/components/ui/input.tsx +2 -0
  26. package/src/components/ui/locked-component.tsx +222 -0
  27. package/src/components/ui/pagination.tsx +2 -0
  28. package/src/components/ui/phone-input.tsx +172 -0
  29. package/src/components/ui/popover-pro.tsx +424 -0
  30. package/src/components/ui/rich-text-editor/index.tsx +2 -1
  31. package/src/components/ui/scroll-area.tsx +48 -0
  32. package/src/components/ui/select.tsx +5 -1
  33. package/src/components/ui/separator.tsx +2 -2
  34. package/src/components/ui/swipeable-card.tsx +2 -0
  35. package/src/components/ui/table.tsx +2 -0
  36. package/src/components/ui/tabs.tsx +2 -0
  37. package/src/components/ui/tags-input.tsx +130 -0
  38. package/src/components/ui/textarea.tsx +2 -0
  39. package/src/components/ui/toast.tsx +2 -0
  40. package/src/index.tsx +4 -46
  41. package/src/lib/performance-profiler.ts +79 -0
  42. package/src/styles/index.css +315 -2
  43. package/src/use-performance-optimizer.ts +26 -26
  44. package/src/use-scroll-animation.ts +5 -7
@@ -1,44 +1,357 @@
1
- // Core UI Components Export
2
- // Premium components with advanced features
3
-
4
- export * from "./accordion"
5
- export * from "./alert"
6
- export * from "./aspect-ratio"
7
- export * from "./avatar"
8
- export * from "./badge"
9
- export * from "./breadcrumb"
10
- export * from "./button"
11
- export * from "./card"
12
- export * from "./checkbox"
13
- export * from "./collapsible"
14
- export * from "./color-picker"
15
- export * from "./command"
16
- export * from "./data-table"
17
- export * from "./date-picker"
18
- export * from "./dialog"
19
- export * from "./draggable-list"
20
- export * from "./dropdown-menu"
21
- export * from "./file-upload"
22
- export * from "./gesture-drawer"
23
- export * from "./github-stars"
24
- export * from "./input"
25
- export * from "./label"
26
- export * from "./moon-logo"
27
- export * from "./pagination"
28
- export * from "./popover"
29
- export * from "./progress"
30
- export * from "./radio-group"
31
- export * from "./rich-text-editor"
32
- export * from "./select"
33
- export * from "./separator"
34
- export * from "./simple-editor"
35
- export * from "./skeleton"
36
- export * from "./slider"
37
- export * from "./swipeable-card"
38
- export * from "./switch"
39
- export * from "./table"
40
- export * from "./tabs"
41
- export * from "./textarea"
42
- export * from "./toast"
43
- export * from "./toggle"
44
- export * from "./tooltip"
1
+ // Free Components Export - Local Files
2
+ // This is the index for packages/moonui/src/components/ui/
3
+ // All exports use MoonUI prefix for consistency
4
+
5
+ // Accordion
6
+ export {
7
+ Accordion as MoonUIAccordion,
8
+ AccordionItem as MoonUIAccordionItem,
9
+ AccordionTrigger as MoonUIAccordionTrigger,
10
+ AccordionContent as MoonUIAccordionContent,
11
+ } from "./accordion";
12
+
13
+ // Alert
14
+ export {
15
+ Alert as MoonUIAlert,
16
+ AlertTitle as MoonUIAlertTitle,
17
+ AlertDescription as MoonUIAlertDescription,
18
+ } from "./alert";
19
+
20
+ // AspectRatio
21
+ export { AspectRatio as MoonUIAspectRatio } from "./aspect-ratio";
22
+
23
+ // Avatar
24
+ export {
25
+ Avatar as MoonUIAvatar,
26
+ AvatarImage as MoonUIAvatarImage,
27
+ AvatarFallback as MoonUIAvatarFallback,
28
+ AvatarGroup as MoonUIAvatarGroup,
29
+ } from "./avatar";
30
+
31
+ // Badge
32
+ export {
33
+ Badge as MoonUIBadge,
34
+ badgeVariants as moonUIBadgeVariants,
35
+ } from "./badge";
36
+
37
+ // Breadcrumb
38
+ export {
39
+ Breadcrumb as MoonUIBreadcrumb,
40
+ BreadcrumbList as MoonUIBreadcrumbList,
41
+ BreadcrumbItem as MoonUIBreadcrumbItem,
42
+ BreadcrumbLink as MoonUIBreadcrumbLink,
43
+ BreadcrumbPage as MoonUIBreadcrumbPage,
44
+ BreadcrumbSeparator as MoonUIBreadcrumbSeparator,
45
+ BreadcrumbEllipsis as MoonUIBreadcrumbEllipsis,
46
+ } from "./breadcrumb";
47
+
48
+ // Button
49
+ export {
50
+ Button as MoonUIButton,
51
+ buttonVariants as moonUIButtonVariants,
52
+ } from "./button";
53
+
54
+ // Card
55
+ export {
56
+ Card as MoonUICard,
57
+ CardHeader as MoonUICardHeader,
58
+ CardFooter as MoonUICardFooter,
59
+ CardTitle as MoonUICardTitle,
60
+ CardDescription as MoonUICardDescription,
61
+ CardContent as MoonUICardContent,
62
+ } from "./card";
63
+
64
+ // Card Input
65
+ export {
66
+ CardNumberInput as MoonUICardNumberInput,
67
+ CardExpiryInput as MoonUICardExpiryInput,
68
+ CardCVCInput as MoonUICardCVCInput,
69
+ CardZipInput as MoonUICardZipInput,
70
+ } from "./card-input";
71
+
72
+ // Checkbox
73
+ export {
74
+ Checkbox as MoonUICheckbox,
75
+ CheckboxWithLabel as MoonUICheckboxWithLabel,
76
+ CheckboxGroup as MoonUICheckboxGroup,
77
+ CheckboxLabel as MoonUICheckboxLabel,
78
+ } from "./checkbox";
79
+
80
+ // Collapsible
81
+ export {
82
+ Collapsible as MoonUICollapsible,
83
+ CollapsibleTrigger as MoonUICollapsibleTrigger,
84
+ CollapsibleContent as MoonUICollapsibleContent,
85
+ } from "./collapsible";
86
+
87
+ // ColorPicker
88
+ export {
89
+ ColorPicker as MoonUIColorPicker,
90
+ SimpleColorPicker as MoonUISimpleColorPicker,
91
+ GradientPicker as MoonUIGradientPicker,
92
+ } from "./color-picker";
93
+
94
+ // Command
95
+ export {
96
+ Command as MoonUICommand,
97
+ CommandDialog as MoonUICommandDialog,
98
+ CommandInput as MoonUICommandInput,
99
+ CommandList as MoonUICommandList,
100
+ CommandEmpty as MoonUICommandEmpty,
101
+ CommandGroup as MoonUICommandGroup,
102
+ CommandItem as MoonUICommandItem,
103
+ CommandShortcut as MoonUICommandShortcut,
104
+ CommandSeparator as MoonUICommandSeparator,
105
+ } from "./command";
106
+
107
+ // DataTable
108
+ export { DataTable as MoonUIDataTable } from "./data-table";
109
+
110
+ // DatePicker
111
+ export {
112
+ DatePicker as MoonUIDatePicker,
113
+ DateRangePicker as MoonUIDateRangePicker,
114
+ DateTimePicker as MoonUIDateTimePicker,
115
+ MonthPicker as MoonUIMonthPicker,
116
+ } from "./date-picker";
117
+
118
+ // Dialog
119
+ export {
120
+ Dialog as MoonUIDialog,
121
+ DialogClose as MoonUIDialogClose,
122
+ DialogTrigger as MoonUIDialogTrigger,
123
+ DialogContent as MoonUIDialogContent,
124
+ DialogHeader as MoonUIDialogHeader,
125
+ DialogFooter as MoonUIDialogFooter,
126
+ DialogTitle as MoonUIDialogTitle,
127
+ DialogDescription as MoonUIDialogDescription,
128
+ } from "./dialog";
129
+
130
+ // DraggableList
131
+ export { DraggableList as MoonUIDraggableList } from "./draggable-list";
132
+
133
+ // DropdownMenu
134
+ export {
135
+ DropdownMenu as MoonUIDropdownMenu,
136
+ DropdownMenuTrigger as MoonUIDropdownMenuTrigger,
137
+ DropdownMenuContent as MoonUIDropdownMenuContent,
138
+ DropdownMenuItem as MoonUIDropdownMenuItem,
139
+ DropdownMenuCheckboxItem as MoonUIDropdownMenuCheckboxItem,
140
+ DropdownMenuRadioItem as MoonUIDropdownMenuRadioItem,
141
+ DropdownMenuLabel as MoonUIDropdownMenuLabel,
142
+ DropdownMenuSeparator as MoonUIDropdownMenuSeparator,
143
+ DropdownMenuShortcut as MoonUIDropdownMenuShortcut,
144
+ DropdownMenuGroup as MoonUIDropdownMenuGroup,
145
+ DropdownMenuPortal as MoonUIDropdownMenuPortal,
146
+ DropdownMenuSub as MoonUIDropdownMenuSub,
147
+ DropdownMenuSubContent as MoonUIDropdownMenuSubContent,
148
+ DropdownMenuSubTrigger as MoonUIDropdownMenuSubTrigger,
149
+ DropdownMenuRadioGroup as MoonUIDropdownMenuRadioGroup,
150
+ } from "./dropdown-menu";
151
+
152
+ // FileUpload
153
+ export { FileUpload as MoonUIFileUpload } from "./file-upload";
154
+
155
+ // GestureDrawer
156
+ export { GestureDrawer as MoonUIGestureDrawer } from "./gesture-drawer";
157
+
158
+ // GitHubStars
159
+ export { GitHubStars as MoonUIGitHubStars } from "./github-stars";
160
+
161
+ // Input
162
+ export { Input as MoonUIInput } from "./input";
163
+
164
+ // Label
165
+ export { Label as MoonUILabel } from "./label";
166
+
167
+ // LockedComponent
168
+ export {
169
+ LockedComponent as MoonUILockedComponent,
170
+ ProComponentWrapper as MoonUIProComponentWrapper,
171
+ ProBadge as MoonUIProBadge,
172
+ FreeBadge as MoonUIFreeBadge,
173
+ } from "./locked-component";
174
+
175
+ // MoonLogo
176
+ export { MoonLogo as MoonUIMoonLogo } from "./moon-logo";
177
+
178
+ // Pagination
179
+ export {
180
+ Pagination as MoonUIPagination,
181
+ PaginationContent as MoonUIPaginationContent,
182
+ PaginationEllipsis as MoonUIPaginationEllipsis,
183
+ PaginationItem as MoonUIPaginationItem,
184
+ PaginationLink as MoonUIPaginationLink,
185
+ PaginationNext as MoonUIPaginationNext,
186
+ PaginationPrevious as MoonUIPaginationPrevious,
187
+ } from "./pagination";
188
+
189
+ // PhoneInput
190
+ export { PhoneInput as MoonUIPhoneInput } from "./phone-input";
191
+
192
+ // Popover
193
+ export {
194
+ Popover as MoonUIPopover,
195
+ PopoverTrigger as MoonUIPopoverTrigger,
196
+ PopoverContent as MoonUIPopoverContent,
197
+ } from "./popover";
198
+
199
+ // Progress
200
+ export { Progress as MoonUIProgress } from "./progress";
201
+
202
+ // RadioGroup
203
+ export {
204
+ RadioGroup as MoonUIRadioGroup,
205
+ RadioGroupItem as MoonUIRadioGroupItem,
206
+ RadioLabel as MoonUIRadioLabel,
207
+ RadioItemWithLabel as MoonUIRadioItemWithLabel,
208
+ } from "./radio-group";
209
+
210
+ // RichTextEditor
211
+ export { RichTextEditor as MoonUIRichTextEditor } from "./rich-text-editor";
212
+
213
+ // ScrollArea
214
+ export {
215
+ ScrollArea as MoonUIScrollArea,
216
+ ScrollBar as MoonUIScrollBar,
217
+ } from "./scroll-area";
218
+
219
+ // Select
220
+ export {
221
+ Select as MoonUISelect,
222
+ SelectGroup as MoonUISelectGroup,
223
+ SelectValue as MoonUISelectValue,
224
+ SelectTrigger as MoonUISelectTrigger,
225
+ SelectContent as MoonUISelectContent,
226
+ SelectLabel as MoonUISelectLabel,
227
+ SelectItem as MoonUISelectItem,
228
+ SelectSeparator as MoonUISelectSeparator,
229
+ SelectScrollUpButton as MoonUISelectScrollUpButton,
230
+ SelectScrollDownButton as MoonUISelectScrollDownButton,
231
+ } from "./select";
232
+
233
+ // Separator
234
+ export { Separator as MoonUISeparator } from "./separator";
235
+
236
+ // SimpleEditor
237
+ export { SimpleEditor as MoonUISimpleEditor } from "./simple-editor";
238
+
239
+ // Skeleton
240
+ export {
241
+ Skeleton as MoonUISkeleton,
242
+ SkeletonText as MoonUISkeletonText,
243
+ SkeletonAvatar as MoonUISkeletonAvatar,
244
+ SkeletonCard as MoonUISkeletonCard,
245
+ skeletonVariants as moonUISkeletonVariants,
246
+ } from "./skeleton";
247
+
248
+ // Slider
249
+ export { Slider as MoonUISlider } from "./slider";
250
+
251
+ // SwipeableCard
252
+ export { SwipeableCard as MoonUISwipeableCard } from "./swipeable-card";
253
+
254
+ // Switch
255
+ export { Switch as MoonUISwitch } from "./switch";
256
+
257
+ // Table
258
+ export {
259
+ Table as MoonUITable,
260
+ TableHeader as MoonUITableHeader,
261
+ TableBody as MoonUITableBody,
262
+ TableFooter as MoonUITableFooter,
263
+ TableHead as MoonUITableHead,
264
+ TableRow as MoonUITableRow,
265
+ TableCell as MoonUITableCell,
266
+ TableCaption as MoonUITableCaption,
267
+ } from "./table";
268
+
269
+ // Tabs
270
+ export {
271
+ Tabs as MoonUITabs,
272
+ TabsList as MoonUITabsList,
273
+ TabsTrigger as MoonUITabsTrigger,
274
+ TabsContent as MoonUITabsContent,
275
+ } from "./tabs";
276
+
277
+ // TagsInput
278
+ export { TagsInput as MoonUITagsInput } from "./tags-input";
279
+
280
+ // Textarea
281
+ export { Textarea as MoonUITextarea } from "./textarea";
282
+
283
+ // Toast
284
+ export {
285
+ Toast as MoonUIToast,
286
+ ToastAction as MoonUIToastAction,
287
+ ToastClose as MoonUIToastClose,
288
+ ToastDescription as MoonUIToastDescription,
289
+ ToastProvider as MoonUIToastProvider,
290
+ ToastTitle as MoonUIToastTitle,
291
+ ToastViewport as MoonUIToastViewport,
292
+ Toaster as MoonUIToaster,
293
+ toast,
294
+ useToast,
295
+ } from "./toast";
296
+
297
+ // Toggle
298
+ export {
299
+ Toggle as MoonUIToggle,
300
+ toggleVariants as moonUIToggleVariants,
301
+ } from "./toggle";
302
+
303
+ // Tooltip
304
+ export {
305
+ Tooltip as MoonUITooltip,
306
+ TooltipTrigger as MoonUITooltipTrigger,
307
+ TooltipContent as MoonUITooltipContent,
308
+ TooltipProvider as MoonUITooltipProvider,
309
+ } from "./tooltip";
310
+
311
+ // Also export without MoonUI prefix for backward compatibility
312
+ export * from "./accordion";
313
+ export * from "./alert";
314
+ export * from "./aspect-ratio";
315
+ export * from "./avatar";
316
+ export * from "./badge";
317
+ export * from "./breadcrumb";
318
+ export * from "./button";
319
+ export * from "./card";
320
+ export * from "./card-input";
321
+ export * from "./checkbox";
322
+ export * from "./collapsible";
323
+ export * from "./color-picker";
324
+ export * from "./command";
325
+ export * from "./data-table";
326
+ export * from "./date-picker";
327
+ export * from "./dialog";
328
+ export * from "./draggable-list";
329
+ export * from "./dropdown-menu";
330
+ export * from "./file-upload";
331
+ export * from "./gesture-drawer";
332
+ export * from "./github-stars";
333
+ export * from "./input";
334
+ export * from "./label";
335
+ export * from "./locked-component";
336
+ export * from "./moon-logo";
337
+ export * from "./pagination";
338
+ export * from "./phone-input";
339
+ export * from "./popover";
340
+ export * from "./progress";
341
+ export * from "./radio-group";
342
+ export * from "./rich-text-editor";
343
+ export * from "./scroll-area";
344
+ export * from "./select";
345
+ export * from "./separator";
346
+ export * from "./simple-editor";
347
+ export * from "./skeleton";
348
+ export * from "./slider";
349
+ export * from "./swipeable-card";
350
+ export * from "./switch";
351
+ export * from "./table";
352
+ export * from "./tabs";
353
+ export * from "./tags-input";
354
+ export * from "./textarea";
355
+ export * from "./toast";
356
+ export * from "./toggle";
357
+ export * from "./tooltip";
@@ -1,3 +1,5 @@
1
+ "use client"
2
+
1
3
  import type { Meta, StoryObj } from '@storybook/react';
2
4
  import { Input } from './input';
3
5
  import { Label } from './label';
@@ -1,3 +1,5 @@
1
+ "use client"
2
+
1
3
  import * as React from "react";
2
4
  import { cva, type VariantProps } from "class-variance-authority";
3
5
  import { cn } from "../../lib/utils";
@@ -0,0 +1,222 @@
1
+ "use client"
2
+
3
+ // Locked Component UI
4
+ // Pro componentlerin locked state'ini gösteren wrapper component
5
+
6
+ import React, { useState } from 'react'
7
+ import { cn } from '../../lib/utils'
8
+ import { Button } from './button'
9
+ import { Badge } from './badge'
10
+ import { Lock, Crown, Zap } from 'lucide-react'
11
+
12
+ interface LockedComponentProps {
13
+ children: React.ReactNode
14
+ componentName: string
15
+ className?: string
16
+ showPreview?: boolean
17
+ previewDuration?: number // ms
18
+ }
19
+
20
+ export function LockedComponent({
21
+ children,
22
+ componentName,
23
+ className,
24
+ showPreview = true,
25
+ previewDuration = 2000
26
+ }: LockedComponentProps) {
27
+ const [isPreviewActive, setIsPreviewActive] = useState(false)
28
+ const [previewTimeout, setPreviewTimeout] = useState<NodeJS.Timeout | null>(null)
29
+
30
+ const handleMouseEnter = () => {
31
+ if (!showPreview) return
32
+
33
+ setIsPreviewActive(true)
34
+
35
+ // Clear existing timeout
36
+ if (previewTimeout) {
37
+ clearTimeout(previewTimeout)
38
+ }
39
+
40
+ // Set new timeout
41
+ const timeout = setTimeout(() => {
42
+ setIsPreviewActive(false)
43
+ }, previewDuration)
44
+
45
+ setPreviewTimeout(timeout)
46
+ }
47
+
48
+ const handleMouseLeave = () => {
49
+ if (previewTimeout) {
50
+ clearTimeout(previewTimeout)
51
+ setPreviewTimeout(null)
52
+ }
53
+ setIsPreviewActive(false)
54
+ }
55
+
56
+ return (
57
+ <div
58
+ className={cn(
59
+ "relative group cursor-pointer transition-all duration-300",
60
+ className
61
+ )}
62
+ onMouseEnter={handleMouseEnter}
63
+ onMouseLeave={handleMouseLeave}
64
+ >
65
+ {/* Component Content */}
66
+ <div
67
+ className={cn(
68
+ "transition-all duration-300",
69
+ !isPreviewActive && "blur-sm grayscale-[0.3] opacity-60"
70
+ )}
71
+ >
72
+ {children}
73
+ </div>
74
+
75
+ {/* Overlay */}
76
+ <div
77
+ className={cn(
78
+ "absolute inset-0 bg-gradient-to-br from-amber-500/10 via-transparent to-purple-500/10",
79
+ "border-2 border-dashed border-amber-400/30 rounded-lg",
80
+ "flex items-center justify-center",
81
+ "transition-all duration-300",
82
+ isPreviewActive ? "opacity-0" : "opacity-100"
83
+ )}
84
+ >
85
+ <div className="text-center space-y-3 p-6">
86
+ {/* Pro Badge */}
87
+ <div className="flex justify-center">
88
+ <Badge
89
+ variant="secondary"
90
+ className="bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 px-3 py-1"
91
+ >
92
+ <Crown className="w-3 h-3 mr-1" />
93
+ PRO ONLY
94
+ </Badge>
95
+ </div>
96
+
97
+ {/* Lock Icon */}
98
+ <div className="flex justify-center">
99
+ <div className="p-3 rounded-full bg-amber-100 dark:bg-amber-900/30">
100
+ <Lock className="w-6 h-6 text-amber-600 dark:text-amber-400" />
101
+ </div>
102
+ </div>
103
+
104
+ {/* Component Name */}
105
+ <h3 className="font-semibold text-gray-900 dark:text-gray-100">
106
+ {componentName}
107
+ </h3>
108
+
109
+ {/* Description */}
110
+ <p className="text-sm text-gray-600 dark:text-gray-400 max-w-xs">
111
+ This premium component is available with Pro subscription
112
+ </p>
113
+
114
+ {/* Upgrade Button */}
115
+ <Button
116
+ size="sm"
117
+ className="bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 border-0"
118
+ onClick={() => {
119
+ if (typeof window !== 'undefined') {
120
+ window.location.href = '/pricing'
121
+ }
122
+ }}
123
+ >
124
+ <Zap className="w-4 h-4 mr-2" />
125
+ Upgrade to Pro
126
+ </Button>
127
+ </div>
128
+ </div>
129
+
130
+ {/* Preview Hint */}
131
+ {showPreview && !isPreviewActive && (
132
+ <div className="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200">
133
+ <div className="bg-black/80 text-white text-xs px-2 py-1 rounded">
134
+ Hover to preview
135
+ </div>
136
+ </div>
137
+ )}
138
+ </div>
139
+ )
140
+ }
141
+
142
+ // Pro Component Wrapper - Otomatik erişim kontrolü ile
143
+ interface ProComponentWrapperProps {
144
+ children: React.ReactNode
145
+ componentId: string
146
+ componentName?: string
147
+ className?: string
148
+ fallback?: React.ReactNode
149
+ }
150
+
151
+ export function ProComponentWrapper({
152
+ children,
153
+ componentId,
154
+ componentName,
155
+ className,
156
+ fallback
157
+ }: ProComponentWrapperProps) {
158
+ // For now, always show the component (no access control)
159
+ // This can be updated later when proper access control is implemented
160
+ const canUse = true
161
+ const isLocked = false
162
+ const isLoading = false
163
+
164
+ // Loading state
165
+ if (isLoading) {
166
+ return (
167
+ <div className={cn("animate-pulse bg-gray-200 dark:bg-gray-800 rounded-lg h-32", className)}>
168
+ <div className="flex items-center justify-center h-full">
169
+ <div className="text-sm text-gray-500">Loading...</div>
170
+ </div>
171
+ </div>
172
+ )
173
+ }
174
+
175
+ // Unlocked - show actual component
176
+ if (canUse) {
177
+ return <div className={className}>{children}</div>
178
+ }
179
+
180
+ // Locked - show locked state
181
+ if (isLocked) {
182
+ return (
183
+ <LockedComponent
184
+ componentName={componentName || componentId}
185
+ className={className}
186
+ >
187
+ {fallback || children}
188
+ </LockedComponent>
189
+ )
190
+ }
191
+
192
+ // Default fallback
193
+ return <div className={className}>{children}</div>
194
+ }
195
+
196
+ // Pro Badge Component
197
+ export function ProBadge({ className }: { className?: string }) {
198
+ return (
199
+ <Badge
200
+ variant="secondary"
201
+ className={cn(
202
+ "bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 text-xs",
203
+ className
204
+ )}
205
+ >
206
+ <Crown className="w-3 h-3 mr-1" />
207
+ PRO
208
+ </Badge>
209
+ )
210
+ }
211
+
212
+ // Free Badge Component
213
+ export function FreeBadge({ className }: { className?: string }) {
214
+ return (
215
+ <Badge
216
+ variant="outline"
217
+ className={cn("border-green-500 text-green-600 dark:text-green-400 text-xs", className)}
218
+ >
219
+ FREE
220
+ </Badge>
221
+ )
222
+ }
@@ -1,3 +1,5 @@
1
+ "use client"
2
+
1
3
  import * as React from "react"
2
4
  import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react"
3
5
  import { cn } from "../../lib/utils"