@moontra/moonui 2.1.5 → 2.1.7

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 (53) hide show
  1. package/dist/index.js +8251 -2872
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +8100 -2653
  4. package/dist/index.mjs.map +1 -1
  5. package/package.json +1 -1
  6. package/src/components/ui/accordion.tsx +8 -11
  7. package/src/components/ui/alert.tsx +10 -13
  8. package/src/components/ui/analyze-components.txt +4 -0
  9. package/src/components/ui/aspect-ratio.tsx +6 -9
  10. package/src/components/ui/avatar.tsx +18 -21
  11. package/src/components/ui/badge.tsx +5 -8
  12. package/src/components/ui/breadcrumb.tsx +29 -31
  13. package/src/components/ui/button.tsx +11 -15
  14. package/src/components/ui/calendar.tsx +6 -9
  15. package/src/components/ui/card.tsx +19 -22
  16. package/src/components/ui/checkbox.tsx +12 -15
  17. package/src/components/ui/collapsible.tsx +12 -14
  18. package/src/components/ui/color-picker.tsx +2 -2
  19. package/src/components/ui/command.tsx +33 -35
  20. package/src/components/ui/component-analysis-report.md +118 -0
  21. package/src/components/ui/data-table.tsx +2 -2
  22. package/src/components/ui/date-picker.tsx +9 -9
  23. package/src/components/ui/dialog.tsx +29 -31
  24. package/src/components/ui/draggable-list.tsx +81 -0
  25. package/src/components/ui/dropdown-menu.tsx +42 -44
  26. package/src/components/ui/file-upload.tsx +3 -3
  27. package/src/components/ui/gesture-drawer.tsx +146 -0
  28. package/src/components/ui/index.ts +43 -9
  29. package/src/components/ui/input.tsx +6 -9
  30. package/src/components/ui/label.tsx +5 -8
  31. package/src/components/ui/moon-logo.tsx +1 -1
  32. package/src/components/ui/pagination.tsx +17 -19
  33. package/src/components/ui/popover.tsx +16 -18
  34. package/src/components/ui/progress.tsx +6 -9
  35. package/src/components/ui/radio-group.tsx +11 -14
  36. package/src/components/ui/rich-text-editor/index.tsx +71 -0
  37. package/src/components/ui/select.tsx +30 -32
  38. package/src/components/ui/separator.tsx +6 -9
  39. package/src/components/ui/simple-editor.tsx +4 -4
  40. package/src/components/ui/skeleton.tsx +13 -16
  41. package/src/components/ui/slider.tsx +5 -8
  42. package/src/components/ui/swipeable-card.tsx +69 -0
  43. package/src/components/ui/switch.tsx +4 -7
  44. package/src/components/ui/table.tsx +29 -31
  45. package/src/components/ui/tabs.tsx +13 -16
  46. package/src/components/ui/textarea.tsx +4 -7
  47. package/src/components/ui/toast.tsx +18 -20
  48. package/src/components/ui/toggle.tsx +5 -8
  49. package/src/components/ui/tooltip.tsx +16 -18
  50. package/src/index.tsx +13 -7
  51. package/src/lib/utils.ts +2 -65
  52. package/src/components/ui/locked-component.tsx +0 -215
  53. package/src/use-pro-access.ts +0 -141
@@ -0,0 +1,81 @@
1
+ // Basic Draggable List - Free Version
2
+ "use client"
3
+
4
+ import * as React from "react"
5
+ import { cn } from "../../lib/utils"
6
+
7
+ export interface DraggableListProps<T> {
8
+ items: T[]
9
+ onReorder: (items: T[]) => void
10
+ renderItem: (item: T, index: number) => React.ReactNode
11
+ keyExtractor: (item: T) => string
12
+ className?: string
13
+ disabled?: boolean
14
+ }
15
+
16
+ export function DraggableList<T>({
17
+ items,
18
+ onReorder,
19
+ renderItem,
20
+ keyExtractor,
21
+ className,
22
+ disabled = false
23
+ }: DraggableListProps<T>) {
24
+ const [draggedIndex, setDraggedIndex] = React.useState<number | null>(null)
25
+
26
+ const handleDragStart = (e: React.DragEvent, index: number) => {
27
+ if (disabled) return
28
+ setDraggedIndex(index)
29
+ e.dataTransfer.effectAllowed = "move"
30
+ }
31
+
32
+ const handleDragOver = (e: React.DragEvent) => {
33
+ e.preventDefault()
34
+ e.dataTransfer.dropEffect = "move"
35
+ }
36
+
37
+ const handleDrop = (e: React.DragEvent, dropIndex: number) => {
38
+ e.preventDefault()
39
+
40
+ if (disabled || draggedIndex === null || draggedIndex === dropIndex) {
41
+ setDraggedIndex(null)
42
+ return
43
+ }
44
+
45
+ const newItems = [...items]
46
+ const draggedItem = newItems[draggedIndex]
47
+
48
+ newItems.splice(draggedIndex, 1)
49
+ newItems.splice(dropIndex, 0, draggedItem)
50
+
51
+ onReorder(newItems)
52
+ setDraggedIndex(null)
53
+ }
54
+
55
+ const handleDragEnd = () => {
56
+ setDraggedIndex(null)
57
+ }
58
+
59
+ return (
60
+ <div className={cn("space-y-2", className)}>
61
+ {items.map((item, index) => (
62
+ <div
63
+ key={keyExtractor(item)}
64
+ draggable={!disabled}
65
+ onDragStart={(e) => handleDragStart(e, index)}
66
+ onDragOver={handleDragOver}
67
+ onDrop={(e) => handleDrop(e, index)}
68
+ onDragEnd={handleDragEnd}
69
+ className={cn(
70
+ "transition-opacity duration-200",
71
+ !disabled && "cursor-move hover:opacity-80",
72
+ draggedIndex === index && "opacity-50",
73
+ disabled && "cursor-not-allowed"
74
+ )}
75
+ >
76
+ {renderItem(item, index)}
77
+ </div>
78
+ ))}
79
+ </div>
80
+ )
81
+ }
@@ -6,19 +6,19 @@ import { Check, ChevronRight, Circle } from "lucide-react"
6
6
 
7
7
  import { cn } from "../../lib/utils"
8
8
 
9
- const MoonUIDropdownMenu = DropdownMenuPrimitive.Root
9
+ const DropdownMenu = DropdownMenuPrimitive.Root
10
10
 
11
- const MoonUIDropdownMenuTrigger = DropdownMenuPrimitive.Trigger
11
+ const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger
12
12
 
13
- const MoonUIDropdownMenuGroup = DropdownMenuPrimitive.Group
13
+ const DropdownMenuGroup = DropdownMenuPrimitive.Group
14
14
 
15
- const MoonUIDropdownMenuPortal = DropdownMenuPrimitive.Portal
15
+ const DropdownMenuPortal = DropdownMenuPrimitive.Portal
16
16
 
17
- const MoonUIDropdownMenuSub = DropdownMenuPrimitive.Sub
17
+ const DropdownMenuSub = DropdownMenuPrimitive.Sub
18
18
 
19
- const MoonUIDropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup
19
+ const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup
20
20
 
21
- const MoonUIDropdownMenuSubTrigger = React.forwardRef<
21
+ const DropdownMenuSubTrigger = React.forwardRef<
22
22
  React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
23
23
  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
24
24
  inset?: boolean
@@ -37,10 +37,10 @@ const MoonUIDropdownMenuSubTrigger = React.forwardRef<
37
37
  <ChevronRight className="ml-auto h-4 w-4" />
38
38
  </DropdownMenuPrimitive.SubTrigger>
39
39
  ))
40
- MoonUIDropdownMenuSubTrigger.displayName =
40
+ DropdownMenuSubTrigger.displayName =
41
41
  DropdownMenuPrimitive.SubTrigger.displayName
42
42
 
43
- const MoonUIDropdownMenuSubContent = React.forwardRef<
43
+ const DropdownMenuSubContent = React.forwardRef<
44
44
  React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
45
45
  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
46
46
  >(({ className, ...props }, ref) => (
@@ -53,10 +53,10 @@ const MoonUIDropdownMenuSubContent = React.forwardRef<
53
53
  {...props}
54
54
  />
55
55
  ))
56
- MoonUIDropdownMenuSubContent.displayName =
56
+ DropdownMenuSubContent.displayName =
57
57
  DropdownMenuPrimitive.SubContent.displayName
58
58
 
59
- const MoonUIDropdownMenuContent = React.forwardRef<
59
+ const DropdownMenuContent = React.forwardRef<
60
60
  React.ElementRef<typeof DropdownMenuPrimitive.Content>,
61
61
  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
62
62
  >(({ className, sideOffset = 4, ...props }, ref) => (
@@ -72,9 +72,9 @@ const MoonUIDropdownMenuContent = React.forwardRef<
72
72
  />
73
73
  </DropdownMenuPrimitive.Portal>
74
74
  ))
75
- MoonUIDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName
75
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName
76
76
 
77
- const MoonUIDropdownMenuItem = React.forwardRef<
77
+ const DropdownMenuItem = React.forwardRef<
78
78
  React.ElementRef<typeof DropdownMenuPrimitive.Item>,
79
79
  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
80
80
  inset?: boolean
@@ -90,9 +90,9 @@ const MoonUIDropdownMenuItem = React.forwardRef<
90
90
  {...props}
91
91
  />
92
92
  ))
93
- MoonUIDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName
93
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName
94
94
 
95
- const MoonUIDropdownMenuCheckboxItem = React.forwardRef<
95
+ const DropdownMenuCheckboxItem = React.forwardRef<
96
96
  React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
97
97
  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
98
98
  >(({ className, children, checked, ...props }, ref) => (
@@ -113,10 +113,10 @@ const MoonUIDropdownMenuCheckboxItem = React.forwardRef<
113
113
  {children}
114
114
  </DropdownMenuPrimitive.CheckboxItem>
115
115
  ))
116
- MoonUIDropdownMenuCheckboxItem.displayName =
116
+ DropdownMenuCheckboxItem.displayName =
117
117
  DropdownMenuPrimitive.CheckboxItem.displayName
118
118
 
119
- const MoonUIDropdownMenuRadioItem = React.forwardRef<
119
+ const DropdownMenuRadioItem = React.forwardRef<
120
120
  React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
121
121
  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
122
122
  >(({ className, children, ...props }, ref) => (
@@ -136,9 +136,9 @@ const MoonUIDropdownMenuRadioItem = React.forwardRef<
136
136
  {children}
137
137
  </DropdownMenuPrimitive.RadioItem>
138
138
  ))
139
- MoonUIDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName
139
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName
140
140
 
141
- const MoonUIDropdownMenuLabel = React.forwardRef<
141
+ const DropdownMenuLabel = React.forwardRef<
142
142
  React.ElementRef<typeof DropdownMenuPrimitive.Label>,
143
143
  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
144
144
  inset?: boolean
@@ -154,9 +154,9 @@ const MoonUIDropdownMenuLabel = React.forwardRef<
154
154
  {...props}
155
155
  />
156
156
  ))
157
- MoonUIDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName
157
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName
158
158
 
159
- const MoonUIDropdownMenuSeparator = React.forwardRef<
159
+ const DropdownMenuSeparator = React.forwardRef<
160
160
  React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
161
161
  React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
162
162
  >(({ className, ...props }, ref) => (
@@ -166,9 +166,9 @@ const MoonUIDropdownMenuSeparator = React.forwardRef<
166
166
  {...props}
167
167
  />
168
168
  ))
169
- MoonUIDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName
169
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName
170
170
 
171
- const MoonUIDropdownMenuShortcut = ({
171
+ const DropdownMenuShortcut = ({
172
172
  className,
173
173
  ...props
174
174
  }: React.HTMLAttributes<HTMLSpanElement>) => {
@@ -179,24 +179,22 @@ const MoonUIDropdownMenuShortcut = ({
179
179
  />
180
180
  )
181
181
  }
182
- MoonUIDropdownMenuShortcut.displayName = "MoonUIDropdownMenuShortcut"
183
-
184
- export { MoonUIDropdownMenu,
185
- MoonUIDropdownMenuTrigger,
186
- MoonUIDropdownMenuContent,
187
- MoonUIDropdownMenuItem,
188
- MoonUIDropdownMenuCheckboxItem,
189
- MoonUIDropdownMenuRadioItem,
190
- MoonUIDropdownMenuLabel,
191
- MoonUIDropdownMenuSeparator,
192
- MoonUIDropdownMenuShortcut,
193
- MoonUIDropdownMenuGroup,
194
- MoonUIDropdownMenuPortal,
195
- MoonUIDropdownMenuSub,
196
- MoonUIDropdownMenuSubContent,
197
- MoonUIDropdownMenuSubTrigger,
198
- MoonUIDropdownMenuRadioGroup,
199
- };
200
-
201
- // Backward compatibility exports
202
- export { MoonUICheckbox as Checkbox, MoonUIDropdownMenu as DropdownMenu, MoonUILabel as Label, MoonUIRadioGroup as RadioGroup, MoonUISeparator as Separator, MoonUIDropdownMenuTrigger as DropdownMenuTrigger, MoonUIDropdownMenuContent as DropdownMenuContent, MoonUIDropdownMenuItem as DropdownMenuItem, MoonUIDropdownMenuCheckboxItem as DropdownMenuCheckboxItem, MoonUIDropdownMenuRadioItem as DropdownMenuRadioItem, MoonUIDropdownMenuLabel as DropdownMenuLabel, MoonUIDropdownMenuSeparator as DropdownMenuSeparator, MoonUIDropdownMenuShortcut as DropdownMenuShortcut, MoonUIDropdownMenuGroup as DropdownMenuGroup, MoonUIDropdownMenuPortal as DropdownMenuPortal, MoonUIDropdownMenuSub as DropdownMenuSub, MoonUIDropdownMenuSubContent as DropdownMenuSubContent, MoonUIDropdownMenuSubTrigger as DropdownMenuSubTrigger, MoonUIDropdownMenuRadioGroup as DropdownMenuRadioGroup }
182
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut"
183
+
184
+ export {
185
+ DropdownMenu,
186
+ DropdownMenuTrigger,
187
+ DropdownMenuContent,
188
+ DropdownMenuItem,
189
+ DropdownMenuCheckboxItem,
190
+ DropdownMenuRadioItem,
191
+ DropdownMenuLabel,
192
+ DropdownMenuSeparator,
193
+ DropdownMenuShortcut,
194
+ DropdownMenuGroup,
195
+ DropdownMenuPortal,
196
+ DropdownMenuSub,
197
+ DropdownMenuSubContent,
198
+ DropdownMenuSubTrigger,
199
+ DropdownMenuRadioGroup,
200
+ }
@@ -19,7 +19,7 @@ import {
19
19
  Loader2
20
20
  } from 'lucide-react'
21
21
 
22
- export interface MoonUIFileUploadProps {
22
+ export interface FileUploadProps {
23
23
  accept?: string
24
24
  multiple?: boolean
25
25
  maxSize?: number // in bytes
@@ -135,7 +135,7 @@ const FileItem = ({
135
135
  )
136
136
  }
137
137
 
138
- export const MoonUIFileUpload = React.forwardRef<HTMLDivElement, MoonUIFileUploadProps>(
138
+ export const FileUpload = React.forwardRef<HTMLDivElement, FileUploadProps>(
139
139
  ({
140
140
  accept = "*",
141
141
  multiple = true,
@@ -397,4 +397,4 @@ export const MoonUIFileUpload = React.forwardRef<HTMLDivElement, MoonUIFileUploa
397
397
  }
398
398
  )
399
399
 
400
- MoonUIFileUpload.displayName = "MoonUIFileUpload"
400
+ FileUpload.displayName = "FileUpload"
@@ -0,0 +1,146 @@
1
+ "use client"
2
+
3
+ import React, { useState, useRef, useEffect } from "react"
4
+ import { motion, useMotionValue, useTransform, animate, PanInfo } from "framer-motion"
5
+ import { cn } from "../../lib/utils"
6
+
7
+ export interface GestureDrawerProps {
8
+ children: React.ReactNode
9
+ isOpen: boolean
10
+ onOpenChange: (open: boolean) => void
11
+ direction?: "up" | "down" | "left" | "right"
12
+ threshold?: number
13
+ className?: string
14
+ overlayClassName?: string
15
+ enableSwipeToClose?: boolean
16
+ }
17
+
18
+ export const GestureDrawer = React.forwardRef<HTMLDivElement, GestureDrawerProps>(
19
+ ({
20
+ children,
21
+ isOpen,
22
+ onOpenChange,
23
+ direction = "up",
24
+ threshold = 50,
25
+ className,
26
+ overlayClassName,
27
+ enableSwipeToClose = true,
28
+ ...props
29
+ }, ref) => {
30
+ const y = useMotionValue(0)
31
+ const x = useMotionValue(0)
32
+
33
+ const isVertical = direction === "up" || direction === "down"
34
+ const motionValue = isVertical ? y : x
35
+
36
+ const opacity = useTransform(motionValue, [0, threshold], [1, 0.5])
37
+
38
+ const handleDragEnd = (event: any, info: PanInfo) => {
39
+ if (!enableSwipeToClose) return
40
+
41
+ const offset = isVertical ? info.offset.y : info.offset.x
42
+ const velocity = isVertical ? info.velocity.y : info.velocity.x
43
+
44
+ let shouldClose = false
45
+
46
+ switch (direction) {
47
+ case "up":
48
+ shouldClose = offset > threshold || velocity > 500
49
+ break
50
+ case "down":
51
+ shouldClose = offset < -threshold || velocity < -500
52
+ break
53
+ case "left":
54
+ shouldClose = offset > threshold || velocity > 500
55
+ break
56
+ case "right":
57
+ shouldClose = offset < -threshold || velocity < -500
58
+ break
59
+ }
60
+
61
+ if (shouldClose) {
62
+ onOpenChange(false)
63
+ } else {
64
+ animate(motionValue, 0, { type: "spring", stiffness: 300, damping: 20 })
65
+ }
66
+ }
67
+
68
+ const getInitialPosition = () => {
69
+ switch (direction) {
70
+ case "up":
71
+ return { y: "100%" }
72
+ case "down":
73
+ return { y: "-100%" }
74
+ case "left":
75
+ return { x: "100%" }
76
+ case "right":
77
+ return { x: "-100%" }
78
+ default:
79
+ return { y: "100%" }
80
+ }
81
+ }
82
+
83
+ const getAnimatePosition = () => {
84
+ return isVertical ? { y: 0 } : { x: 0 }
85
+ }
86
+
87
+ if (!isOpen) return null
88
+
89
+ return (
90
+ <div className="fixed inset-0 z-50">
91
+ {/* Overlay */}
92
+ <motion.div
93
+ initial={{ opacity: 0 }}
94
+ animate={{ opacity: 1 }}
95
+ exit={{ opacity: 0 }}
96
+ onClick={() => onOpenChange(false)}
97
+ className={cn("absolute inset-0 bg-black/50", overlayClassName)}
98
+ />
99
+
100
+ {/* Drawer */}
101
+ <motion.div
102
+ ref={ref}
103
+ drag={enableSwipeToClose ? (isVertical ? "y" : "x") : false}
104
+ dragConstraints={{
105
+ top: direction === "up" ? 0 : undefined,
106
+ bottom: direction === "down" ? 0 : undefined,
107
+ left: direction === "left" ? 0 : undefined,
108
+ right: direction === "right" ? 0 : undefined
109
+ }}
110
+ dragElastic={0.2}
111
+ onDragEnd={handleDragEnd}
112
+ style={{
113
+ [isVertical ? "y" : "x"]: motionValue,
114
+ opacity
115
+ }}
116
+ initial={getInitialPosition()}
117
+ animate={getAnimatePosition()}
118
+ exit={getInitialPosition()}
119
+ transition={{ type: "spring", damping: 30, stiffness: 300 }}
120
+ className={cn(
121
+ "absolute bg-background border shadow-lg",
122
+ {
123
+ "bottom-0 left-0 right-0 rounded-t-lg": direction === "up",
124
+ "top-0 left-0 right-0 rounded-b-lg": direction === "down",
125
+ "top-0 bottom-0 right-0 rounded-l-lg": direction === "left",
126
+ "top-0 bottom-0 left-0 rounded-r-lg": direction === "right"
127
+ },
128
+ className
129
+ )}
130
+ {...props}
131
+ >
132
+ {/* Drag Handle */}
133
+ {(direction === "up" || direction === "down") && (
134
+ <div className="flex justify-center p-2">
135
+ <div className="w-12 h-1 bg-muted rounded-full" />
136
+ </div>
137
+ )}
138
+
139
+ {children}
140
+ </motion.div>
141
+ </div>
142
+ )
143
+ }
144
+ )
145
+
146
+ GestureDrawer.displayName = "GestureDrawer"
@@ -1,12 +1,46 @@
1
- // FREE UI Components - Source of Truth: @moontra/moonui NPM package
2
- // Ana proje artık NPM paketlerini kullanır (wrapper pattern)
1
+ // Core UI Components Export
2
+ // Premium components with advanced features
3
3
 
4
- // All FREE components from @moontra/moonui package
5
- export * from "@moontra/moonui"
6
-
7
- // Local development-only components (not in package)
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 "./calendar"
12
+ export * from "./card"
13
+ export * from "./checkbox"
14
+ export * from "./collapsible"
15
+ export * from "./color-picker"
16
+ export * from "./command"
17
+ export * from "./data-table"
18
+ export * from "./date-picker"
19
+ export * from "./dialog"
20
+ export * from "./draggable-list"
21
+ export * from "./dropdown-menu"
22
+ export * from "./file-upload"
23
+ export * from "./gesture-drawer"
24
+ export * from "./github-stars"
25
+ export * from "./input"
26
+ export * from "./label"
8
27
  export * from "./locked-component"
9
28
  export * from "./moon-logo"
10
-
11
- // Pro Components - Available via @moontra/moonui-pro package
12
- // Import Pro components via: import { Component } from "@/components/pro"
29
+ export * from "./pagination"
30
+ export * from "./popover"
31
+ export * from "./progress"
32
+ export * from "./radio-group"
33
+ export * from "./rich-text-editor"
34
+ export * from "./select"
35
+ export * from "./separator"
36
+ export * from "./simple-editor"
37
+ export * from "./skeleton"
38
+ export * from "./slider"
39
+ export * from "./swipeable-card"
40
+ export * from "./switch"
41
+ export * from "./table"
42
+ export * from "./tabs"
43
+ export * from "./textarea"
44
+ export * from "./toast"
45
+ export * from "./toggle"
46
+ export * from "./tooltip"
@@ -26,7 +26,7 @@ const inputWrapperVariants = cva(
26
26
  }
27
27
  );
28
28
 
29
- const moonUIInputVariants = cva(
29
+ const inputVariants = cva(
30
30
  [
31
31
  "w-full bg-background transition-all duration-200",
32
32
  "text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500",
@@ -85,9 +85,9 @@ const moonUIInputVariants = cva(
85
85
  }
86
86
  );
87
87
 
88
- export interface MoonUIInputProps
88
+ export interface InputProps
89
89
  extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">,
90
- Omit<VariantProps<typeof moonUIInputVariants>, "isDisabled" | "hasLeftIcon" | "hasRightIcon" | "hasRightButton"> {
90
+ Omit<VariantProps<typeof inputVariants>, "isDisabled" | "hasLeftIcon" | "hasRightIcon" | "hasRightButton"> {
91
91
  /** Hata mesajı */
92
92
  error?: string;
93
93
  /** Başarı mesajı */
@@ -122,7 +122,7 @@ export interface MoonUIInputProps
122
122
  * @param props.rightButton - Sağ tarafta gösterilecek buton
123
123
  * @param props.alwaysShowMessage - Mesajın her zaman görünür olması
124
124
  */
125
- const MoonUIInput = React.forwardRef<HTMLInputElement, MoonUIInputProps>(
125
+ const Input = React.forwardRef<HTMLInputElement, InputProps>(
126
126
  ({
127
127
  className,
128
128
  wrapperClassName,
@@ -214,9 +214,6 @@ const MoonUIInput = React.forwardRef<HTMLInputElement, MoonUIInputProps>(
214
214
  );
215
215
  }
216
216
  );
217
- MoonUIInput.displayName = "MoonUIInput";
217
+ Input.displayName = "Input";
218
218
 
219
- export { MoonUIInput };
220
-
221
- // Backward compatibility exports
222
- export { MoonUIInput as Input };
219
+ export { Input };
@@ -6,14 +6,14 @@ import { cva, type VariantProps } from "class-variance-authority"
6
6
 
7
7
  import { cn } from "../../lib/utils"
8
8
 
9
- const moonUILabelVariants = cva(
9
+ const labelVariants = cva(
10
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
11
  )
12
12
 
13
- const MoonUILabel = React.forwardRef<
13
+ const Label = React.forwardRef<
14
14
  React.ElementRef<typeof LabelPrimitive.Root>,
15
15
  React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
16
- VariantProps<typeof moonUILabelVariants>
16
+ VariantProps<typeof labelVariants>
17
17
  >(({ className, ...props }, ref) => (
18
18
  <LabelPrimitive.Root
19
19
  ref={ref}
@@ -21,9 +21,6 @@ const MoonUILabel = React.forwardRef<
21
21
  {...props}
22
22
  />
23
23
  ))
24
- MoonUILabel.displayName = LabelPrimitive.Root.displayName
24
+ Label.displayName = LabelPrimitive.Root.displayName
25
25
 
26
- export { MoonUILabel };
27
-
28
- // Backward compatibility exports
29
- export { MoonUILabel as Label }
26
+ export { Label }
@@ -3,7 +3,7 @@
3
3
  import * as React from "react"
4
4
  import { cn } from "../../lib/utils"
5
5
 
6
- interface MoonUIMoonLogoProps extends React.SVGProps<SVGSVGElement> {
6
+ interface MoonLogoProps extends React.SVGProps<SVGSVGElement> {
7
7
  variant?: "default" | "monochrome" | "gradient"
8
8
  showText?: boolean
9
9
  }
@@ -3,7 +3,7 @@ import { ChevronLeft, ChevronRight, MoreHorizontal } from "lucide-react"
3
3
  import { cn } from "../../lib/utils"
4
4
  import { ButtonProps, buttonVariants } from "./button"
5
5
 
6
- const MoonUIPagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
6
+ const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
7
7
  <nav
8
8
  role="navigation"
9
9
  aria-label="pagination"
@@ -11,9 +11,9 @@ const MoonUIPagination = ({ className, ...props }: React.ComponentProps<"nav">)
11
11
  {...props}
12
12
  />
13
13
  )
14
- MoonUIPagination.displayName = "MoonUIPagination"
14
+ Pagination.displayName = "Pagination"
15
15
 
16
- const MoonUIPaginationContent = React.forwardRef<
16
+ const PaginationContent = React.forwardRef<
17
17
  HTMLUListElement,
18
18
  React.ComponentProps<"ul">
19
19
  >(({ className, ...props }, ref) => (
@@ -23,22 +23,22 @@ const MoonUIPaginationContent = React.forwardRef<
23
23
  {...props}
24
24
  />
25
25
  ))
26
- MoonUIPaginationContent.displayName = "PaginationContent"
26
+ PaginationContent.displayName = "PaginationContent"
27
27
 
28
- const MoonUIPaginationItem = React.forwardRef<
28
+ const PaginationItem = React.forwardRef<
29
29
  HTMLLIElement,
30
30
  React.ComponentProps<"li">
31
31
  >(({ className, ...props }, ref) => (
32
32
  <li ref={ref} className={cn("", className)} {...props} />
33
33
  ))
34
- MoonUIPaginationItem.displayName = "PaginationItem"
34
+ PaginationItem.displayName = "PaginationItem"
35
35
 
36
36
  type PaginationLinkProps = {
37
37
  isActive?: boolean
38
38
  } & Pick<ButtonProps, "size"> &
39
39
  React.ComponentProps<"a">
40
40
 
41
- const MoonUIPaginationLink = ({
41
+ const PaginationLink = ({
42
42
  className,
43
43
  isActive,
44
44
  size = "icon",
@@ -56,9 +56,9 @@ const MoonUIPaginationLink = ({
56
56
  {...props}
57
57
  />
58
58
  )
59
- MoonUIPaginationLink.displayName = "PaginationLink"
59
+ PaginationLink.displayName = "PaginationLink"
60
60
 
61
- const MoonUIPaginationPrevious = ({
61
+ const PaginationPrevious = ({
62
62
  className,
63
63
  ...props
64
64
  }: React.ComponentProps<typeof PaginationLink>) => (
@@ -72,9 +72,9 @@ const MoonUIPaginationPrevious = ({
72
72
  <span>Previous</span>
73
73
  </PaginationLink>
74
74
  )
75
- MoonUIPaginationPrevious.displayName = "PaginationPrevious"
75
+ PaginationPrevious.displayName = "PaginationPrevious"
76
76
 
77
- const MoonUIPaginationNext = ({
77
+ const PaginationNext = ({
78
78
  className,
79
79
  ...props
80
80
  }: React.ComponentProps<typeof PaginationLink>) => (
@@ -88,9 +88,9 @@ const MoonUIPaginationNext = ({
88
88
  <ChevronRight className="h-4 w-4" />
89
89
  </PaginationLink>
90
90
  )
91
- MoonUIPaginationNext.displayName = "PaginationNext"
91
+ PaginationNext.displayName = "PaginationNext"
92
92
 
93
- const MoonUIPaginationEllipsis = ({
93
+ const PaginationEllipsis = ({
94
94
  className,
95
95
  ...props
96
96
  }: React.ComponentProps<"span">) => (
@@ -103,16 +103,14 @@ const MoonUIPaginationEllipsis = ({
103
103
  <span className="sr-only">More pages</span>
104
104
  </span>
105
105
  )
106
- MoonUIPaginationEllipsis.displayName = "PaginationEllipsis"
106
+ PaginationEllipsis.displayName = "PaginationEllipsis"
107
107
 
108
- export { MoonUIPagination,
108
+ export {
109
+ Pagination,
109
110
  PaginationContent,
110
111
  PaginationEllipsis,
111
112
  PaginationItem,
112
113
  PaginationLink,
113
114
  PaginationNext,
114
115
  PaginationPrevious,
115
- };
116
-
117
- // Backward compatibility exports
118
- export { MoonUIPagination as Pagination }
116
+ }