@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,11 +0,0 @@
1
- "use client"
2
-
3
- export {
4
- MoonUIGestureDrawerPro,
5
- GestureDrawer,
6
- type MoonUIGestureDrawerProProps,
7
- type GestureDrawerProps,
8
- moonUIGestureDrawerProVariants
9
- } from "../gesture-drawer/index"
10
-
11
- export { MoonUIGestureDrawerPro as default } from "../gesture-drawer/index"
@@ -1,29 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as HoverCardPrimitive from "@radix-ui/react-hover-card"
5
-
6
- import { cn } from "../../lib/utils"
7
-
8
- const HoverCard = HoverCardPrimitive.Root
9
-
10
- const HoverCardTrigger = HoverCardPrimitive.Trigger
11
-
12
- const HoverCardContent = React.forwardRef<
13
- React.ElementRef<typeof HoverCardPrimitive.Content>,
14
- React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>
15
- >(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
16
- <HoverCardPrimitive.Content
17
- ref={ref}
18
- align={align}
19
- sideOffset={sideOffset}
20
- className={cn(
21
- "z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
22
- className
23
- )}
24
- {...props}
25
- />
26
- ))
27
- HoverCardContent.displayName = HoverCardPrimitive.Content.displayName
28
-
29
- export { HoverCard, HoverCardTrigger, HoverCardContent }
@@ -1,222 +0,0 @@
1
- // Core UI Components - Only MoonUI*Pro exports to avoid conflicts
2
- export {
3
- MoonUIAccordionPro, MoonUIAccordionItemPro, MoonUIAccordionTriggerPro, MoonUIAccordionContentPro,
4
- Accordion, AccordionItem, AccordionTrigger, AccordionContent,
5
- useAccordionAnalytics,
6
- type AccordionSize, type AccordionVariant, type AnimationMode,
7
- type MoonUIAccordionProProps, type MoonUIAccordionProBaseProps,
8
- type MoonUIAccordionProSingleProps, type MoonUIAccordionProMultipleProps,
9
- type MoonUIAccordionItemProProps, type MoonUIAccordionTriggerProProps,
10
- type MoonUIAccordionContentProProps
11
- } from './accordion';
12
-
13
- export {
14
- MoonUIalertVariantsPro, MoonUIAlertPro, MoonUIAlertTitlePro, MoonUIAlertDescriptionPro,
15
- alertVariants, Alert, AlertTitle, AlertDescription
16
- } from './alert';
17
-
18
- export {
19
- MoonUIaspectRatioVariantsPro, MoonUIAspectRatioPro,
20
- aspectRatioVariants, AspectRatio
21
- } from './aspect-ratio';
22
-
23
- export {
24
- MoonUIAvatarPro, MoonUIAvatarImagePro, MoonUIAvatarFallbackPro,
25
- Avatar, AvatarImage, AvatarFallback
26
- } from './avatar';
27
-
28
- export {
29
- MoonUIBadgePro, moonUIBadgeVariantsPro,
30
- Badge, badgeVariants
31
- } from './badge';
32
-
33
- export {
34
- MoonUIbreadcrumbVariantsPro, MoonUIBreadcrumbPro, MoonUIBreadcrumbListPro, MoonUIBreadcrumbItemPro, MoonUIBreadcrumbSeparatorPro, MoonUIBreadcrumbEllipsisPro, MoonUIBreadcrumbLinkPro, MoonUIBreadcrumbPagePro,
35
- breadcrumbVariants, Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbSeparator, BreadcrumbEllipsis, BreadcrumbLink, BreadcrumbPage
36
- } from './breadcrumb';
37
-
38
- export {
39
- MoonUIButtonPro, moonUIButtonProVariants,
40
- Button, buttonVariants
41
- } from './button';
42
-
43
- export {
44
- Calendar
45
- } from './calendar';
46
-
47
- export {
48
- MoonUICardPro, MoonUICardHeaderPro, MoonUICardFooterPro, MoonUICardTitlePro, MoonUICardDescriptionPro, MoonUICardContentPro,
49
- Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent
50
- } from './card';
51
-
52
- export {
53
- MoonUICheckboxPro,
54
- Checkbox
55
- } from './checkbox';
56
-
57
- export {
58
- MoonUICollapsiblePro, MoonUIcollapsibleTriggerVariantsPro, MoonUICollapsibleTriggerPro, MoonUIcollapsibleContentVariantsPro, MoonUICollapsibleContentPro,
59
- Collapsible, collapsibleTriggerVariants, CollapsibleTrigger, collapsibleContentVariants, CollapsibleContent,
60
- useCollapsibleAnalytics,
61
- type MoonUICollapsibleProProps, type MoonUICollapsibleTriggerProProps, type MoonUICollapsibleContentProProps,
62
- type CollapsibleSize, type CollapsibleVariant, type AnimationMode as CollapsibleAnimationMode, type BadgeVariant
63
- } from './collapsible';
64
-
65
- export {
66
- MoonUIColorPickerPro,
67
- ColorPicker
68
- } from './color-picker';
69
-
70
- export {
71
- MoonUICommandPro, MoonUICommandDialogPro, MoonUICommandInputPro, MoonUICommandListPro, MoonUICommandEmptyPro, MoonUICommandGroupPro, MoonUICommandItemPro, MoonUICommandShortcutPro, MoonUICommandSeparatorPro,
72
- commandVariantsPro, Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator
73
- } from './command';
74
-
75
-
76
- export {
77
- MoonUIDialogPro, MoonUIDialogContentPro, MoonUIDialogHeaderPro, MoonUIDialogFooterPro, MoonUIDialogTitlePro, MoonUIDialogDescriptionPro, MoonUIDialogTriggerPro, MoonUIDialogClosePro,
78
- Dialog, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, DialogTrigger, DialogClose
79
- } from './dialog';
80
-
81
- export {
82
- MoonUIDropdownMenuPro, MoonUIDropdownMenuTriggerPro, MoonUIDropdownMenuContentPro, MoonUIDropdownMenuItemPro, MoonUIDropdownMenuCheckboxItemPro, MoonUIDropdownMenuRadioItemPro, MoonUIDropdownMenuLabelPro, MoonUIDropdownMenuSeparatorPro, MoonUIDropdownMenuShortcutPro, MoonUIDropdownMenuGroupPro, MoonUIDropdownMenuPortalPro, MoonUIDropdownMenuSubPro, MoonUIDropdownMenuSubContentPro, MoonUIDropdownMenuSubTriggerPro, MoonUIDropdownMenuRadioGroupPro,
83
- DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup
84
- } from './dropdown-menu';
85
-
86
- export {
87
- MoonUIInputPro,
88
- Input
89
- } from './input';
90
-
91
- export {
92
- MoonUILabelPro,
93
- Label
94
- } from './label';
95
-
96
- export {
97
- MoonUIPaginationPro, MoonUIPaginationContentPro, MoonUIPaginationEllipsisPro, MoonUIPaginationItemPro, MoonUIPaginationLinkPro, MoonUIPaginationNextPro, MoonUIPaginationPreviousPro,
98
- Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious
99
- } from './pagination';
100
-
101
- export {
102
- MoonUIPopoverPro, MoonUIPopoverTriggerPro, MoonUIPopoverContentPro,
103
- Popover, PopoverTrigger, PopoverContent
104
- } from './popover';
105
-
106
- export {
107
- MoonUIProgressPro,
108
- Progress
109
- } from './progress';
110
-
111
- export {
112
- MoonUIradioGroupItemVariantsPro, MoonUIRadioGroupContextPro, MoonUIRadioGroupPro, MoonUIRadioGroupItemPro, MoonUIRadioLabelPro, MoonUIRadioItemWithLabelPro,
113
- radioGroupItemVariants, RadioGroupContext, RadioGroup, RadioGroupItem, RadioLabel, RadioItemWithLabel
114
- } from './radio-group';
115
-
116
- export {
117
- ScrollArea, ScrollBar
118
- } from './scroll-area';
119
-
120
- export {
121
- MoonUISelectPro, MoonUISelectTriggerPro, MoonUISelectContentPro, MoonUISelectItemPro, MoonUISelectValuePro, MoonUISelectGroupPro, MoonUISelectLabelPro, MoonUISelectSeparatorPro,
122
- Select, SelectTrigger, SelectContent, SelectItem, SelectValue, SelectGroup, SelectLabel, SelectSeparator
123
- } from './select';
124
-
125
- export {
126
- MoonUISeparatorPro, moonUISeparatorVariantsPro,
127
- Separator, separatorVariants
128
- } from './separator';
129
-
130
- export {
131
- Sheet, SheetTrigger, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, SheetClose, SheetPortal, SheetOverlay
132
- } from './sheet';
133
-
134
- export {
135
- MoonUISkeletonPro,
136
- Skeleton
137
- } from './skeleton';
138
-
139
- export {
140
- MoonUISliderPro,
141
- Slider
142
- } from './slider';
143
-
144
- export {
145
- MoonUISwitchPro,
146
- Switch
147
- } from './switch';
148
-
149
- export {
150
- MoonUItableVariantsPro, MoonUITablePro, MoonUITableHeaderPro, MoonUITableBodyPro, MoonUITableFooterPro, MoonUITableHeadPro, MoonUITableRowPro, MoonUITableCellPro, MoonUITableCaptionPro,
151
- tableVariants, Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption
152
- } from './table';
153
-
154
- export {
155
- Tabs, TabsList, TabsTrigger, TabsContent
156
- } from './tabs';
157
-
158
- export {
159
- MoonUITabsPro as MoonUITabsEnhanced, // Backward compatibility
160
- MoonUITabsPro,
161
- MoonUITabsListPro,
162
- MoonUITabsTriggerPro,
163
- MoonUITabsContentPro,
164
- type TabItem,
165
- type MoonUITabsProProps,
166
- type MoonUITabsProProps as MoonUITabsEnhancedProps // Backward compatibility
167
- } from './tabs-pro';
168
-
169
- export {
170
- MoonUITextareaPro,
171
- Textarea
172
- } from './textarea';
173
-
174
- export {
175
- MoonUIToastPro,
176
- Toast
177
- } from './toast';
178
-
179
- export {
180
- MoonUItoggleVariantsPro, MoonUITogglePro,
181
- toggleVariants, Toggle
182
- } from './toggle';
183
-
184
- export {
185
- MoonUITooltipPro, MoonUITooltipTriggerPro, MoonUITooltipContentPro, MoonUITooltipProviderPro,
186
- Tooltip, TooltipTrigger, TooltipContent, TooltipProvider
187
- } from './tooltip';
188
-
189
- export {
190
- HoverCard, HoverCardTrigger, HoverCardContent
191
- } from './hover-card';
192
-
193
- export {
194
- NavigationMenu,
195
- NavigationMenuList,
196
- NavigationMenuItem,
197
- NavigationMenuContent,
198
- NavigationMenuTrigger,
199
- NavigationMenuLink,
200
- NavigationMenuIndicator,
201
- NavigationMenuViewport,
202
- navigationMenuTriggerStyle
203
- } from './navigation-menu';
204
-
205
- // HoverCard3D is exported from components/hover-card-3d/index.tsx
206
-
207
- // Note: Micro-interaction components are exported from their individual directories
208
-
209
- // Gesture Drawer
210
- export {
211
- MoonUIGestureDrawerPro,
212
- GestureDrawer,
213
- type MoonUIGestureDrawerProProps,
214
- type GestureDrawerProps,
215
- moonUIGestureDrawerProVariants
216
- } from './gesture-drawer';
217
-
218
- // Lightbox
219
- export * from './lightbox';
220
-
221
- // Media Gallery
222
- export * from './media-gallery';
@@ -1,224 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react";
4
- import { cva, type VariantProps } from "class-variance-authority";
5
- import { cn } from "../../lib/utils";
6
- import { Loader2 } from "lucide-react";
7
-
8
- /**
9
- * Premium Input Component
10
- *
11
- * Erişilebilir, estetik ve işlevsel input bileşeni.
12
- * İkon desteği, hata gösterimi ve çeşitli varyantlar sunar.
13
- */
14
-
15
- const inputWrapperVariants = cva(
16
- "group relative flex items-center w-full transition-colors",
17
- {
18
- variants: {
19
- size: {
20
- sm: "",
21
- md: "",
22
- lg: "",
23
- },
24
- },
25
- defaultVariants: {
26
- size: "md",
27
- },
28
- }
29
- );
30
-
31
- const moonUIInputVariantsPro = cva(
32
- [
33
- "w-full bg-background transition-all duration-200",
34
- "text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500",
35
- "disabled:cursor-not-allowed disabled:opacity-50",
36
- "file:border-0 file:bg-transparent file:font-medium",
37
- "focus-visible:outline-none dark:text-gray-200"
38
- ],
39
- {
40
- variants: {
41
- variant: {
42
- standard: "border border-gray-300 dark:border-gray-700 rounded-md px-3 py-2 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:bg-gray-900/60 dark:shadow-inner dark:shadow-gray-950/10",
43
- filled: "border border-transparent bg-gray-100 dark:bg-gray-800/90 rounded-md px-3 py-2 hover:bg-gray-200 dark:hover:bg-gray-700/90 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 dark:shadow-inner dark:shadow-gray-950/10",
44
- ghost: "border-none bg-transparent shadow-none px-1 dark:text-gray-300 dark:placeholder:text-gray-500 hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",
45
- underline: "border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 py-2 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:text-gray-300",
46
- },
47
- size: {
48
- sm: "h-8 text-xs",
49
- md: "h-10 text-sm",
50
- lg: "h-12 text-base",
51
- },
52
- hasLeftIcon: {
53
- true: "pl-10",
54
- false: "",
55
- },
56
- hasRightIcon: {
57
- true: "pr-10",
58
- false: "",
59
- },
60
- hasRightButton: {
61
- true: "pr-10",
62
- false: "",
63
- },
64
- isError: {
65
- true: "border-error focus-visible:ring-error/30 focus-visible:border-error hover:border-error/80 dark:hover:border-error/80",
66
- false: "",
67
- },
68
- isSuccess: {
69
- true: "border-success focus-visible:ring-success/30 focus-visible:border-success hover:border-success/80 dark:hover:border-success/80",
70
- false: "",
71
- },
72
- isDisabled: {
73
- true: "opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800/50 pointer-events-none",
74
- false: "",
75
- }
76
- },
77
- defaultVariants: {
78
- variant: "standard",
79
- size: "md",
80
- isError: false,
81
- isSuccess: false,
82
- isDisabled: false,
83
- hasLeftIcon: false,
84
- hasRightIcon: false,
85
- hasRightButton: false,
86
- },
87
- }
88
- );
89
-
90
- export interface MoonUIInputProProps
91
- extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">,
92
- Omit<VariantProps<typeof moonUIInputVariantsPro>, "isDisabled" | "hasLeftIcon" | "hasRightIcon" | "hasRightButton"> {
93
- /** Hata mesajı */
94
- error?: string;
95
- /** Başarı mesajı */
96
- success?: string;
97
- /** Yükleniyor durumu */
98
- loading?: boolean;
99
- /** Sol tarafta gösterilecek ikon */
100
- leftIcon?: React.ReactNode;
101
- /** Sağ tarafta gösterilecek ikon */
102
- rightIcon?: React.ReactNode;
103
- /** Sağ tarafta gösterilecek buton (password show/hide vb. için) */
104
- rightButton?: React.ReactNode;
105
- /** Mesajın görünürlüğü (true: her zaman görünür, false: sadece hata/başarı durumunda) */
106
- alwaysShowMessage?: boolean;
107
- /** Input wrapper için ek sınıflar */
108
- wrapperClassName?: string;
109
- /** Mesaj için ek sınıflar */
110
- messageClassName?: string;
111
- }
112
-
113
- /**
114
- * Premium Input Component
115
- *
116
- * @param props - Input bileşeni özellikleri
117
- * @param props.variant - Görsel varyant (standard, filled, ghost, underline)
118
- * @param props.size - Boyut (sm, md, lg)
119
- * @param props.error - Hata mesajı
120
- * @param props.success - Başarı mesajı
121
- * @param props.loading - Yükleniyor durumu
122
- * @param props.leftIcon - Sol tarafta gösterilecek ikon
123
- * @param props.rightIcon - Sağ tarafta gösterilecek ikon
124
- * @param props.rightButton - Sağ tarafta gösterilecek buton
125
- * @param props.alwaysShowMessage - Mesajın her zaman görünür olması
126
- */
127
- const MoonUIInputPro = React.forwardRef<HTMLInputElement, MoonUIInputProProps>(
128
- ({
129
- className,
130
- wrapperClassName,
131
- messageClassName,
132
- variant,
133
- size,
134
- isError,
135
- disabled,
136
- error,
137
- success,
138
- loading,
139
- leftIcon,
140
- rightIcon,
141
- rightButton,
142
- alwaysShowMessage = false,
143
- ...props
144
- }, ref) => {
145
- // Mesajı göster/gizle
146
- const showMessage = alwaysShowMessage || error || success;
147
- const messageType = error ? "error" : success ? "success" : "normal";
148
-
149
- return (
150
- <div className="space-y-1.5 w-full">
151
- <div className={cn(inputWrapperVariants({ size }), wrapperClassName)}>
152
- {leftIcon && (
153
- <div className="absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none">
154
- {loading ? <Loader2 className="h-4 w-4 animate-spin" /> : leftIcon}
155
- </div>
156
- )}
157
-
158
- <input
159
- className={cn(
160
- moonUIInputVariantsPro({
161
- variant,
162
- size,
163
- isError: !!error || isError,
164
- isSuccess: !!success,
165
- isDisabled: disabled || loading,
166
- hasLeftIcon: !!leftIcon || loading,
167
- hasRightIcon: !!rightIcon,
168
- hasRightButton: !!rightButton,
169
- }),
170
- className
171
- )}
172
- ref={ref}
173
- disabled={disabled || loading}
174
- data-loading={loading ? "" : undefined}
175
- data-error={!!error ? "" : undefined}
176
- data-success={!!success ? "" : undefined}
177
- aria-invalid={!!error || !!isError || undefined}
178
- aria-describedby={error ? `${props.id || ''}-error` : success ? `${props.id || ''}-success` : undefined}
179
- {...props}
180
- />
181
-
182
- {rightIcon && !loading && (
183
- <div className="absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none">
184
- {rightIcon}
185
- </div>
186
- )}
187
-
188
- {rightButton && (
189
- <div className="absolute right-3">
190
- {rightButton}
191
- </div>
192
- )}
193
-
194
- {loading && !leftIcon && (
195
- <div className="absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none">
196
- <Loader2 className="h-4 w-4 animate-spin" aria-hidden="true" />
197
- </div>
198
- )}
199
- </div>
200
-
201
- {showMessage && (
202
- <p
203
- className={cn(
204
- "text-xs transition-all",
205
- messageType === "error" && "text-error",
206
- messageType === "success" && "text-success",
207
- messageType === "normal" && "text-muted-foreground",
208
- messageClassName
209
- )}
210
- id={error ? `${props.id || ''}-error` : success ? `${props.id || ''}-success` : undefined}
211
- >
212
- {error || success || ""}
213
- </p>
214
- )}
215
- </div>
216
- );
217
- }
218
- );
219
- MoonUIInputPro.displayName = "MoonUIInputPro";
220
-
221
- export { MoonUIInputPro };
222
-
223
- // Backward compatibility exports
224
- export { MoonUIInputPro as Input };
@@ -1,29 +0,0 @@
1
- "use client"
2
-
3
- import * as React from "react"
4
- import * as LabelPrimitive from "@radix-ui/react-label"
5
- import { cva, type VariantProps } from "class-variance-authority"
6
-
7
- import { cn } from "../../lib/utils"
8
-
9
- const moonUILabelVariantsPro = cva(
10
- "text-sm font-medium leading-none text-gray-900 dark:text-gray-200 peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:peer-disabled:opacity-60 transition-colors duration-200"
11
- )
12
-
13
- const MoonUILabelPro = React.forwardRef<
14
- React.ElementRef<typeof LabelPrimitive.Root>,
15
- React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
16
- VariantProps<typeof moonUILabelVariantsPro>
17
- >(({ className, ...props }, ref) => (
18
- <LabelPrimitive.Root
19
- ref={ref}
20
- className={cn(moonUILabelVariantsPro(), className)}
21
- {...props}
22
- />
23
- ))
24
- MoonUILabelPro.displayName = LabelPrimitive.Root.displayName
25
-
26
- export { MoonUILabelPro };
27
-
28
- // Backward compatibility exports
29
- export { MoonUILabelPro as Label }