@moontra/moonui 2.1.0 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +435 -2027
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +200 -1898
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
- package/src/components/ui/accordion.tsx +11 -8
- package/src/components/ui/alert.tsx +13 -10
- package/src/components/ui/aspect-ratio.tsx +9 -6
- package/src/components/ui/avatar.tsx +10 -7
- package/src/components/ui/badge.tsx +7 -4
- package/src/components/ui/breadcrumb.tsx +31 -29
- package/src/components/ui/calendar.tsx +9 -6
- package/src/components/ui/card.tsx +21 -18
- package/src/components/ui/checkbox.tsx +8 -5
- package/src/components/ui/collapsible.tsx +12 -10
- package/src/components/ui/color-picker.tsx +2 -2
- package/src/components/ui/command.tsx +28 -26
- package/src/components/ui/data-table.tsx +2 -2
- package/src/components/ui/date-picker.tsx +8 -8
- package/src/components/ui/dialog.tsx +23 -21
- package/src/components/ui/dropdown-menu.tsx +36 -34
- package/src/components/ui/file-upload.tsx +3 -3
- package/src/components/ui/input.tsx +9 -6
- package/src/components/ui/label.tsx +7 -4
- package/src/components/ui/locked-component.tsx +1 -1
- package/src/components/ui/moon-logo.tsx +1 -1
- package/src/components/ui/pagination.tsx +7 -5
- package/src/components/ui/popover.tsx +11 -9
- package/src/components/ui/progress.tsx +9 -6
- package/src/components/ui/radio-group.tsx +10 -7
- package/src/components/ui/select.tsx +23 -21
- package/src/components/ui/separator.tsx +8 -5
- package/src/components/ui/simple-editor.tsx +4 -4
- package/src/components/ui/skeleton.tsx +10 -7
- package/src/components/ui/slider.tsx +8 -5
- package/src/components/ui/switch.tsx +6 -3
- package/src/components/ui/table.tsx +31 -29
- package/src/components/ui/tabs.tsx +12 -9
- package/src/components/ui/textarea.tsx +7 -4
- package/src/components/ui/toast.tsx +9 -7
- package/src/components/ui/toggle.tsx +7 -4
- package/src/components/ui/tooltip.tsx +13 -11
- package/src/use-performance-optimizer.ts +1 -1
|
@@ -38,11 +38,11 @@ const commandVariants = cva(
|
|
|
38
38
|
)
|
|
39
39
|
|
|
40
40
|
// Command bileşeni - cmdk primitive wrapper
|
|
41
|
-
interface
|
|
41
|
+
interface MoonUICommandProps
|
|
42
42
|
extends React.ComponentProps<typeof CommandPrimitive>,
|
|
43
43
|
VariantProps<typeof commandVariants> {}
|
|
44
44
|
|
|
45
|
-
const
|
|
45
|
+
const MoonUICommand = React.forwardRef<
|
|
46
46
|
React.ElementRef<typeof CommandPrimitive>,
|
|
47
47
|
CommandProps
|
|
48
48
|
>(({ className, variant, size, ...props }, ref) => (
|
|
@@ -81,10 +81,10 @@ const CommandDialog = ({
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
// CommandInput bileşeni
|
|
84
|
-
interface
|
|
84
|
+
interface MoonUICommandInputProps
|
|
85
85
|
extends React.ComponentProps<typeof CommandPrimitive.Input> {}
|
|
86
86
|
|
|
87
|
-
const
|
|
87
|
+
const MoonUICommandInput = React.forwardRef<
|
|
88
88
|
React.ElementRef<typeof CommandPrimitive.Input>,
|
|
89
89
|
CommandInputProps
|
|
90
90
|
>(({ className, ...props }, ref) => (
|
|
@@ -103,10 +103,10 @@ const CommandInput = React.forwardRef<
|
|
|
103
103
|
CommandInput.displayName = CommandPrimitive.Input.displayName
|
|
104
104
|
|
|
105
105
|
// CommandList bileşeni
|
|
106
|
-
interface
|
|
106
|
+
interface MoonUICommandListProps
|
|
107
107
|
extends React.ComponentProps<typeof CommandPrimitive.List> {}
|
|
108
108
|
|
|
109
|
-
const
|
|
109
|
+
const MoonUICommandList = React.forwardRef<
|
|
110
110
|
React.ElementRef<typeof CommandPrimitive.List>,
|
|
111
111
|
CommandListProps
|
|
112
112
|
>(({ className, ...props }, ref) => (
|
|
@@ -119,10 +119,10 @@ const CommandList = React.forwardRef<
|
|
|
119
119
|
CommandList.displayName = CommandPrimitive.List.displayName
|
|
120
120
|
|
|
121
121
|
// CommandEmpty bileşeni
|
|
122
|
-
interface
|
|
122
|
+
interface MoonUICommandEmptyProps
|
|
123
123
|
extends React.ComponentProps<typeof CommandPrimitive.Empty> {}
|
|
124
124
|
|
|
125
|
-
const
|
|
125
|
+
const MoonUICommandEmpty = React.forwardRef<
|
|
126
126
|
React.ElementRef<typeof CommandPrimitive.Empty>,
|
|
127
127
|
CommandEmptyProps
|
|
128
128
|
>(({ className, ...props }, ref) => (
|
|
@@ -135,10 +135,10 @@ const CommandEmpty = React.forwardRef<
|
|
|
135
135
|
CommandEmpty.displayName = CommandPrimitive.Empty.displayName
|
|
136
136
|
|
|
137
137
|
// CommandGroup bileşeni
|
|
138
|
-
interface
|
|
138
|
+
interface MoonUICommandGroupProps
|
|
139
139
|
extends React.ComponentProps<typeof CommandPrimitive.Group> {}
|
|
140
140
|
|
|
141
|
-
const
|
|
141
|
+
const MoonUICommandGroup = React.forwardRef<
|
|
142
142
|
React.ElementRef<typeof CommandPrimitive.Group>,
|
|
143
143
|
CommandGroupProps
|
|
144
144
|
>(({ className, ...props }, ref) => (
|
|
@@ -154,10 +154,10 @@ const CommandGroup = React.forwardRef<
|
|
|
154
154
|
CommandGroup.displayName = CommandPrimitive.Group.displayName
|
|
155
155
|
|
|
156
156
|
// CommandSeparator bileşeni
|
|
157
|
-
interface
|
|
157
|
+
interface MoonUICommandSeparatorProps
|
|
158
158
|
extends React.ComponentProps<typeof CommandPrimitive.Separator> {}
|
|
159
159
|
|
|
160
|
-
const
|
|
160
|
+
const MoonUICommandSeparator = React.forwardRef<
|
|
161
161
|
React.ElementRef<typeof CommandPrimitive.Separator>,
|
|
162
162
|
CommandSeparatorProps
|
|
163
163
|
>(({ className, ...props }, ref) => (
|
|
@@ -170,10 +170,10 @@ const CommandSeparator = React.forwardRef<
|
|
|
170
170
|
CommandSeparator.displayName = CommandPrimitive.Separator.displayName
|
|
171
171
|
|
|
172
172
|
// CommandItem bileşeni
|
|
173
|
-
interface
|
|
173
|
+
interface MoonUICommandItemProps
|
|
174
174
|
extends React.ComponentProps<typeof CommandPrimitive.Item> {}
|
|
175
175
|
|
|
176
|
-
const
|
|
176
|
+
const MoonUICommandItem = React.forwardRef<
|
|
177
177
|
React.ElementRef<typeof CommandPrimitive.Item>,
|
|
178
178
|
CommandItemProps
|
|
179
179
|
>(({ className, ...props }, ref) => (
|
|
@@ -189,7 +189,7 @@ const CommandItem = React.forwardRef<
|
|
|
189
189
|
CommandItem.displayName = CommandPrimitive.Item.displayName
|
|
190
190
|
|
|
191
191
|
// CommandShortcut bileşeni - utility component
|
|
192
|
-
const
|
|
192
|
+
const MoonUICommandShortcut = ({
|
|
193
193
|
className,
|
|
194
194
|
...props
|
|
195
195
|
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
@@ -203,16 +203,18 @@ const CommandShortcut = ({
|
|
|
203
203
|
/>
|
|
204
204
|
)
|
|
205
205
|
}
|
|
206
|
-
|
|
206
|
+
MoonUICommandShortcut.displayName = "MoonUICommandShortcut"
|
|
207
207
|
|
|
208
|
-
export {
|
|
209
|
-
Command,
|
|
208
|
+
export { MoonUICommand,
|
|
210
209
|
CommandDialog,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}
|
|
210
|
+
MoonUICommandInput,
|
|
211
|
+
MoonUICommandList,
|
|
212
|
+
MoonUICommandEmpty,
|
|
213
|
+
MoonUICommandGroup,
|
|
214
|
+
MoonUICommandItem,
|
|
215
|
+
MoonUICommandShortcut,
|
|
216
|
+
MoonUICommandSeparator,
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
// Backward compatibility exports
|
|
220
|
+
export { MoonUICommand as Command, MoonUIDialog as Dialog, MoonUIInput as Input, MoonUISeparator as Separator, MoonUICommandInput as CommandInput, MoonUICommandEmpty as CommandEmpty, MoonUICommandGroup as CommandGroup, MoonUICommandItem as CommandItem, MoonUICommandList as CommandList, MoonUICommandSeparator as CommandSeparator, MoonUICommandShortcut as CommandShortcut }
|
|
@@ -99,7 +99,7 @@ const dataTableVariants = cva(
|
|
|
99
99
|
}
|
|
100
100
|
);
|
|
101
101
|
|
|
102
|
-
interface
|
|
102
|
+
interface MoonUIDataTableProps<TData, TValue>
|
|
103
103
|
extends VariantProps<typeof dataTableVariants> {
|
|
104
104
|
/**
|
|
105
105
|
* The table columns definition
|
|
@@ -620,4 +620,4 @@ export function createFilterableColumn<TData, TValue>(
|
|
|
620
620
|
}
|
|
621
621
|
|
|
622
622
|
// Export utilities
|
|
623
|
-
export { type ColumnDef
|
|
623
|
+
export { type ColumnDef } from "@tanstack/react-table";
|
|
@@ -4,16 +4,16 @@ import * as React from "react";
|
|
|
4
4
|
import { format, isValid } from "date-fns";
|
|
5
5
|
import { Calendar as CalendarIcon, Clock } from "lucide-react";
|
|
6
6
|
import { cn } from "../../lib/utils";
|
|
7
|
-
import { Button } from "./button";
|
|
8
|
-
import { Calendar } from "./calendar";
|
|
7
|
+
import { MoonUIButton as Button } from "./button";
|
|
8
|
+
import { MoonUICalendar as Calendar } from "./calendar";
|
|
9
9
|
import {
|
|
10
|
-
Popover,
|
|
11
|
-
PopoverContent,
|
|
12
|
-
PopoverTrigger,
|
|
10
|
+
MoonUIPopover as Popover,
|
|
11
|
+
MoonUIPopoverContent as PopoverContent,
|
|
12
|
+
MoonUIPopoverTrigger as PopoverTrigger,
|
|
13
13
|
} from "./popover";
|
|
14
14
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
15
15
|
import { motion, AnimatePresence } from "framer-motion";
|
|
16
|
-
import { microInteractionVariants } from "
|
|
16
|
+
import { microInteractionVariants } from "../../lib/micro-interactions";
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* DatePicker Component
|
|
@@ -52,7 +52,7 @@ const datePickerVariants = cva(
|
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
54
|
|
|
55
|
-
export interface
|
|
55
|
+
export interface MoonUIDatePickerProps
|
|
56
56
|
extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange">,
|
|
57
57
|
VariantProps<typeof datePickerVariants> {
|
|
58
58
|
/**
|
|
@@ -597,7 +597,7 @@ export function MonthPicker({
|
|
|
597
597
|
}
|
|
598
598
|
|
|
599
599
|
// Re-export utilities
|
|
600
|
-
export { format
|
|
600
|
+
export { format } from "date-fns";
|
|
601
601
|
|
|
602
602
|
// Import ChevronLeft and ChevronRight for MonthPicker
|
|
603
603
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
@@ -15,10 +15,10 @@ import { cn } from "../../lib/utils";
|
|
|
15
15
|
* Provides a premium appearance with dark and light mode compatibility and fluid animations.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
const
|
|
19
|
-
const
|
|
18
|
+
const MoonUIDialog = DialogPrimitive.Root;
|
|
19
|
+
const MoonUIDialogTrigger = DialogPrimitive.Trigger;
|
|
20
20
|
const DialogPortal = DialogPrimitive.Portal;
|
|
21
|
-
const
|
|
21
|
+
const MoonUIDialogClose = DialogPrimitive.Close;
|
|
22
22
|
|
|
23
23
|
const overlayVariants = cva(
|
|
24
24
|
"fixed inset-0 z-50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
@@ -111,7 +111,7 @@ const dialogContentVariants = cva(
|
|
|
111
111
|
}
|
|
112
112
|
);
|
|
113
113
|
|
|
114
|
-
interface
|
|
114
|
+
interface MoonUIDialogContentProps
|
|
115
115
|
extends Omit<React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, 'title'>,
|
|
116
116
|
VariantProps<typeof dialogContentVariants> {
|
|
117
117
|
/** X butonunu gizle */
|
|
@@ -134,7 +134,7 @@ interface DialogContentProps
|
|
|
134
134
|
onClose?: () => void;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
const
|
|
137
|
+
const MoonUIDialogContent = React.forwardRef<
|
|
138
138
|
React.ElementRef<typeof DialogPrimitive.Content>,
|
|
139
139
|
DialogContentProps
|
|
140
140
|
>(
|
|
@@ -245,7 +245,7 @@ const DialogContent = React.forwardRef<
|
|
|
245
245
|
);
|
|
246
246
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
247
247
|
|
|
248
|
-
const
|
|
248
|
+
const MoonUIDialogHeader = ({
|
|
249
249
|
className,
|
|
250
250
|
...props
|
|
251
251
|
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
@@ -257,9 +257,9 @@ const DialogHeader = ({
|
|
|
257
257
|
{...props}
|
|
258
258
|
/>
|
|
259
259
|
);
|
|
260
|
-
|
|
260
|
+
MoonUIDialogHeader.displayName = "MoonUIDialogHeader";
|
|
261
261
|
|
|
262
|
-
const
|
|
262
|
+
const MoonUIDialogFooter = ({
|
|
263
263
|
className,
|
|
264
264
|
...props
|
|
265
265
|
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
@@ -271,9 +271,9 @@ const DialogFooter = ({
|
|
|
271
271
|
{...props}
|
|
272
272
|
/>
|
|
273
273
|
);
|
|
274
|
-
|
|
274
|
+
MoonUIDialogFooter.displayName = "MoonUIDialogFooter";
|
|
275
275
|
|
|
276
|
-
const
|
|
276
|
+
const MoonUIDialogTitle = React.forwardRef<
|
|
277
277
|
React.ElementRef<typeof DialogPrimitive.Title>,
|
|
278
278
|
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>
|
|
279
279
|
>(({ className, ...props }, ref) => (
|
|
@@ -288,7 +288,7 @@ const DialogTitle = React.forwardRef<
|
|
|
288
288
|
));
|
|
289
289
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
290
290
|
|
|
291
|
-
const
|
|
291
|
+
const MoonUIDialogDescription = React.forwardRef<
|
|
292
292
|
React.ElementRef<typeof DialogPrimitive.Description>,
|
|
293
293
|
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>
|
|
294
294
|
>(({ className, ...props }, ref) => (
|
|
@@ -319,14 +319,16 @@ const DialogForm = React.forwardRef<
|
|
|
319
319
|
));
|
|
320
320
|
DialogForm.displayName = "DialogForm";
|
|
321
321
|
|
|
322
|
-
export {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
DialogClose,
|
|
322
|
+
export { MoonUIDialog,
|
|
323
|
+
MoonUIDialogTrigger,
|
|
324
|
+
MoonUIDialogContent,
|
|
325
|
+
MoonUIDialogHeader,
|
|
326
|
+
MoonUIDialogFooter,
|
|
327
|
+
MoonUIDialogTitle,
|
|
328
|
+
MoonUIDialogDescription,
|
|
329
|
+
MoonUIDialogClose,
|
|
331
330
|
DialogForm,
|
|
332
|
-
};
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
// Backward compatibility exports
|
|
334
|
+
export { MoonUIDialog as Dialog, MoonUIDialogContent as DialogContent, MoonUIDialogHeader as DialogHeader, MoonUIDialogFooter as DialogFooter, MoonUIDialogTitle as DialogTitle, MoonUIDialogDescription as DialogDescription, MoonUIDialogTrigger as DialogTrigger, MoonUIDialogClose as DialogClose };
|
|
@@ -6,19 +6,19 @@ import { Check, ChevronRight, Circle } from "lucide-react"
|
|
|
6
6
|
|
|
7
7
|
import { cn } from "../../lib/utils"
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const MoonUIDropdownMenu = DropdownMenuPrimitive.Root
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const MoonUIDropdownMenuTrigger = DropdownMenuPrimitive.Trigger
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const MoonUIDropdownMenuGroup = DropdownMenuPrimitive.Group
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const MoonUIDropdownMenuPortal = DropdownMenuPrimitive.Portal
|
|
16
16
|
|
|
17
|
-
const
|
|
17
|
+
const MoonUIDropdownMenuSub = DropdownMenuPrimitive.Sub
|
|
18
18
|
|
|
19
|
-
const
|
|
19
|
+
const MoonUIDropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup
|
|
20
20
|
|
|
21
|
-
const
|
|
21
|
+
const MoonUIDropdownMenuSubTrigger = React.forwardRef<
|
|
22
22
|
React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
|
|
23
23
|
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
24
24
|
inset?: boolean
|
|
@@ -40,7 +40,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
|
|
|
40
40
|
DropdownMenuSubTrigger.displayName =
|
|
41
41
|
DropdownMenuPrimitive.SubTrigger.displayName
|
|
42
42
|
|
|
43
|
-
const
|
|
43
|
+
const MoonUIDropdownMenuSubContent = React.forwardRef<
|
|
44
44
|
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
|
|
45
45
|
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
|
|
46
46
|
>(({ className, ...props }, ref) => (
|
|
@@ -56,7 +56,7 @@ const DropdownMenuSubContent = React.forwardRef<
|
|
|
56
56
|
DropdownMenuSubContent.displayName =
|
|
57
57
|
DropdownMenuPrimitive.SubContent.displayName
|
|
58
58
|
|
|
59
|
-
const
|
|
59
|
+
const MoonUIDropdownMenuContent = React.forwardRef<
|
|
60
60
|
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
|
61
61
|
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
|
|
62
62
|
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
@@ -74,7 +74,7 @@ const DropdownMenuContent = React.forwardRef<
|
|
|
74
74
|
))
|
|
75
75
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName
|
|
76
76
|
|
|
77
|
-
const
|
|
77
|
+
const MoonUIDropdownMenuItem = React.forwardRef<
|
|
78
78
|
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
|
|
79
79
|
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
|
|
80
80
|
inset?: boolean
|
|
@@ -92,7 +92,7 @@ const DropdownMenuItem = React.forwardRef<
|
|
|
92
92
|
))
|
|
93
93
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName
|
|
94
94
|
|
|
95
|
-
const
|
|
95
|
+
const MoonUIDropdownMenuCheckboxItem = React.forwardRef<
|
|
96
96
|
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
|
|
97
97
|
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
|
|
98
98
|
>(({ className, children, checked, ...props }, ref) => (
|
|
@@ -116,7 +116,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
|
|
|
116
116
|
DropdownMenuCheckboxItem.displayName =
|
|
117
117
|
DropdownMenuPrimitive.CheckboxItem.displayName
|
|
118
118
|
|
|
119
|
-
const
|
|
119
|
+
const MoonUIDropdownMenuRadioItem = React.forwardRef<
|
|
120
120
|
React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
|
|
121
121
|
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
|
|
122
122
|
>(({ className, children, ...props }, ref) => (
|
|
@@ -138,7 +138,7 @@ const DropdownMenuRadioItem = React.forwardRef<
|
|
|
138
138
|
))
|
|
139
139
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName
|
|
140
140
|
|
|
141
|
-
const
|
|
141
|
+
const MoonUIDropdownMenuLabel = React.forwardRef<
|
|
142
142
|
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
|
|
143
143
|
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
|
|
144
144
|
inset?: boolean
|
|
@@ -156,7 +156,7 @@ const DropdownMenuLabel = React.forwardRef<
|
|
|
156
156
|
))
|
|
157
157
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName
|
|
158
158
|
|
|
159
|
-
const
|
|
159
|
+
const MoonUIDropdownMenuSeparator = React.forwardRef<
|
|
160
160
|
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
|
|
161
161
|
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
|
|
162
162
|
>(({ className, ...props }, ref) => (
|
|
@@ -168,7 +168,7 @@ const DropdownMenuSeparator = React.forwardRef<
|
|
|
168
168
|
))
|
|
169
169
|
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName
|
|
170
170
|
|
|
171
|
-
const
|
|
171
|
+
const MoonUIDropdownMenuShortcut = ({
|
|
172
172
|
className,
|
|
173
173
|
...props
|
|
174
174
|
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
|
@@ -179,22 +179,24 @@ const DropdownMenuShortcut = ({
|
|
|
179
179
|
/>
|
|
180
180
|
)
|
|
181
181
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
export {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
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 }
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
Loader2
|
|
20
20
|
} from 'lucide-react'
|
|
21
21
|
|
|
22
|
-
export interface
|
|
22
|
+
export interface MoonUIFileUploadProps {
|
|
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
|
|
138
|
+
export const MoonUIFileUpload = React.forwardRef<HTMLDivElement, MoonUIFileUploadProps>(
|
|
139
139
|
({
|
|
140
140
|
accept = "*",
|
|
141
141
|
multiple = true,
|
|
@@ -397,4 +397,4 @@ export const FileUpload = React.forwardRef<HTMLDivElement, FileUploadProps>(
|
|
|
397
397
|
}
|
|
398
398
|
)
|
|
399
399
|
|
|
400
|
-
|
|
400
|
+
MoonUIFileUpload.displayName = "MoonUIFileUpload"
|
|
@@ -26,7 +26,7 @@ const inputWrapperVariants = cva(
|
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
28
|
|
|
29
|
-
const
|
|
29
|
+
const moonUIInputVariants = 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 inputVariants = cva(
|
|
|
85
85
|
}
|
|
86
86
|
);
|
|
87
87
|
|
|
88
|
-
export interface
|
|
88
|
+
export interface MoonUIInputProps
|
|
89
89
|
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">,
|
|
90
|
-
Omit<VariantProps<typeof
|
|
90
|
+
Omit<VariantProps<typeof moonUIInputVariants>, "isDisabled" | "hasLeftIcon" | "hasRightIcon" | "hasRightButton"> {
|
|
91
91
|
/** Hata mesajı */
|
|
92
92
|
error?: string;
|
|
93
93
|
/** Başarı mesajı */
|
|
@@ -122,7 +122,7 @@ export interface InputProps
|
|
|
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
|
|
125
|
+
const MoonUIInput = React.forwardRef<HTMLInputElement, MoonUIInputProps>(
|
|
126
126
|
({
|
|
127
127
|
className,
|
|
128
128
|
wrapperClassName,
|
|
@@ -214,6 +214,9 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
216
|
);
|
|
217
|
-
|
|
217
|
+
MoonUIInput.displayName = "MoonUIInput";
|
|
218
218
|
|
|
219
|
-
export {
|
|
219
|
+
export { MoonUIInput };
|
|
220
|
+
|
|
221
|
+
// Backward compatibility exports
|
|
222
|
+
export { MoonUIInput as 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
|
|
9
|
+
const moonUILabelVariants = 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
|
|
13
|
+
const MoonUILabel = React.forwardRef<
|
|
14
14
|
React.ElementRef<typeof LabelPrimitive.Root>,
|
|
15
15
|
React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &
|
|
16
|
-
VariantProps<typeof
|
|
16
|
+
VariantProps<typeof moonUILabelVariants>
|
|
17
17
|
>(({ className, ...props }, ref) => (
|
|
18
18
|
<LabelPrimitive.Root
|
|
19
19
|
ref={ref}
|
|
@@ -23,4 +23,7 @@ const Label = React.forwardRef<
|
|
|
23
23
|
))
|
|
24
24
|
Label.displayName = LabelPrimitive.Root.displayName
|
|
25
25
|
|
|
26
|
-
export {
|
|
26
|
+
export { MoonUILabel };
|
|
27
|
+
|
|
28
|
+
// Backward compatibility exports
|
|
29
|
+
export { MoonUILabel as Label }
|
|
@@ -9,7 +9,7 @@ import { Lock, Crown, Zap } from 'lucide-react'
|
|
|
9
9
|
import Link from 'next/link'
|
|
10
10
|
import { useComponentAccess } from '../../use-pro-access'
|
|
11
11
|
|
|
12
|
-
interface
|
|
12
|
+
interface MoonUILockedComponentProps {
|
|
13
13
|
children: React.ReactNode
|
|
14
14
|
componentName: string
|
|
15
15
|
className?: string
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from "react"
|
|
4
4
|
import { cn } from "../../lib/utils"
|
|
5
5
|
|
|
6
|
-
interface
|
|
6
|
+
interface MoonUIMoonLogoProps 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
|
|
6
|
+
const MoonUIPagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
|
|
7
7
|
<nav
|
|
8
8
|
role="navigation"
|
|
9
9
|
aria-label="pagination"
|
|
@@ -11,7 +11,7 @@ const Pagination = ({ className, ...props }: React.ComponentProps<"nav">) => (
|
|
|
11
11
|
{...props}
|
|
12
12
|
/>
|
|
13
13
|
)
|
|
14
|
-
|
|
14
|
+
MoonUIPagination.displayName = "MoonUIPagination"
|
|
15
15
|
|
|
16
16
|
const PaginationContent = React.forwardRef<
|
|
17
17
|
HTMLUListElement,
|
|
@@ -105,12 +105,14 @@ const PaginationEllipsis = ({
|
|
|
105
105
|
)
|
|
106
106
|
PaginationEllipsis.displayName = "PaginationEllipsis"
|
|
107
107
|
|
|
108
|
-
export {
|
|
109
|
-
Pagination,
|
|
108
|
+
export { MoonUIPagination,
|
|
110
109
|
PaginationContent,
|
|
111
110
|
PaginationEllipsis,
|
|
112
111
|
PaginationItem,
|
|
113
112
|
PaginationLink,
|
|
114
113
|
PaginationNext,
|
|
115
114
|
PaginationPrevious,
|
|
116
|
-
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
// Backward compatibility exports
|
|
118
|
+
export { MoonUIPagination as Pagination }
|
|
@@ -63,11 +63,11 @@ const popoverContentVariants = cva(
|
|
|
63
63
|
}
|
|
64
64
|
);
|
|
65
65
|
|
|
66
|
-
const
|
|
67
|
-
const
|
|
66
|
+
const MoonUIPopover = PopoverPrimitive.Root;
|
|
67
|
+
const MoonUIPopoverTrigger = PopoverPrimitive.Trigger;
|
|
68
68
|
const PopoverAnchor = PopoverPrimitive.Anchor;
|
|
69
69
|
|
|
70
|
-
export interface
|
|
70
|
+
export interface MoonUIPopoverContentProps
|
|
71
71
|
extends Omit<React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>, 'side'>,
|
|
72
72
|
VariantProps<typeof popoverContentVariants> {
|
|
73
73
|
/**
|
|
@@ -84,7 +84,7 @@ export interface PopoverContentProps
|
|
|
84
84
|
overlayBackdrop?: boolean;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
const
|
|
87
|
+
const MoonUIPopoverContent = React.forwardRef<
|
|
88
88
|
React.ElementRef<typeof PopoverPrimitive.Content>,
|
|
89
89
|
PopoverContentProps
|
|
90
90
|
>(({
|
|
@@ -170,14 +170,16 @@ const PopoverFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElem
|
|
|
170
170
|
);
|
|
171
171
|
PopoverFooter.displayName = "PopoverFooter";
|
|
172
172
|
|
|
173
|
-
export {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
PopoverContent,
|
|
173
|
+
export { MoonUIPopover,
|
|
174
|
+
MoonUIPopoverTrigger,
|
|
175
|
+
MoonUIPopoverContent,
|
|
177
176
|
PopoverAnchor,
|
|
178
177
|
PopoverClose,
|
|
179
178
|
PopoverSeparator,
|
|
180
179
|
PopoverHeader,
|
|
181
180
|
PopoverFooter,
|
|
182
181
|
popoverContentVariants,
|
|
183
|
-
};
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
// Backward compatibility exports
|
|
185
|
+
export { MoonUIPopover as Popover, MoonUISeparator as Separator, MoonUIPopoverTrigger as PopoverTrigger, MoonUIPopoverContent as PopoverContent };
|
|
@@ -12,7 +12,7 @@ import { cn } from "../../lib/utils";
|
|
|
12
12
|
* Yükleme işlemleri, form gönderimi ve diğer zaman alan işlemleri göstermek için kullanılır.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const moonUIProgressVariants = cva(
|
|
16
16
|
"relative overflow-hidden bg-muted",
|
|
17
17
|
{
|
|
18
18
|
variants: {
|
|
@@ -81,9 +81,9 @@ const progressIndicatorVariants = cva(
|
|
|
81
81
|
}
|
|
82
82
|
);
|
|
83
83
|
|
|
84
|
-
export interface
|
|
84
|
+
export interface MoonUIProgressProps
|
|
85
85
|
extends React.HTMLAttributes<HTMLDivElement>,
|
|
86
|
-
VariantProps<typeof
|
|
86
|
+
VariantProps<typeof moonUIProgressVariants> {
|
|
87
87
|
/**
|
|
88
88
|
* İlerleme çubuğu değeri (0-100)
|
|
89
89
|
*/
|
|
@@ -114,7 +114,7 @@ export interface ProgressProps
|
|
|
114
114
|
max?: number;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
const
|
|
117
|
+
const MoonUIProgress = React.forwardRef<
|
|
118
118
|
HTMLDivElement,
|
|
119
119
|
ProgressProps
|
|
120
120
|
>(({
|
|
@@ -173,10 +173,13 @@ const Progress = React.forwardRef<
|
|
|
173
173
|
</>
|
|
174
174
|
);
|
|
175
175
|
});
|
|
176
|
-
|
|
176
|
+
MoonUIProgress.displayName = "MoonUIProgress";
|
|
177
177
|
|
|
178
178
|
// Not: Belirsiz ilerleme animasyonu için CSS keyframe styles.css veya Tailwind config içinde tanımlanmalı
|
|
179
179
|
// @keyframes indeterminate-progress içeren bir tanımlama yapılmalıdır
|
|
180
180
|
// .animate-indeterminate-progress sınıfı da bu animasyonu kullanmalıdır
|
|
181
181
|
|
|
182
|
-
export {
|
|
182
|
+
export { MoonUIProgress, moonUIProgressVariants };
|
|
183
|
+
|
|
184
|
+
// Backward compatibility exports
|
|
185
|
+
export { MoonUIProgress as Progress, moonUIProgressVariants as progressVariants };
|