@moontra/moonui 2.1.0 → 2.1.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 (43) hide show
  1. package/dist/index.js +433 -2025
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +198 -1896
  4. package/dist/index.mjs.map +1 -1
  5. package/package.json +3 -2
  6. package/src/components/ui/accordion.tsx +9 -6
  7. package/src/components/ui/alert.tsx +13 -10
  8. package/src/components/ui/aspect-ratio.tsx +9 -6
  9. package/src/components/ui/avatar.tsx +10 -7
  10. package/src/components/ui/badge.tsx +7 -4
  11. package/src/components/ui/breadcrumb.tsx +31 -29
  12. package/src/components/ui/calendar.tsx +9 -6
  13. package/src/components/ui/card.tsx +21 -18
  14. package/src/components/ui/checkbox.tsx +8 -5
  15. package/src/components/ui/collapsible.tsx +12 -10
  16. package/src/components/ui/color-picker.tsx +2 -2
  17. package/src/components/ui/command.tsx +28 -26
  18. package/src/components/ui/data-table.tsx +2 -2
  19. package/src/components/ui/date-picker.tsx +8 -8
  20. package/src/components/ui/dialog.tsx +23 -21
  21. package/src/components/ui/dropdown-menu.tsx +36 -34
  22. package/src/components/ui/file-upload.tsx +3 -3
  23. package/src/components/ui/input.tsx +9 -6
  24. package/src/components/ui/label.tsx +7 -4
  25. package/src/components/ui/locked-component.tsx +1 -1
  26. package/src/components/ui/moon-logo.tsx +1 -1
  27. package/src/components/ui/pagination.tsx +7 -5
  28. package/src/components/ui/popover.tsx +11 -9
  29. package/src/components/ui/progress.tsx +9 -6
  30. package/src/components/ui/radio-group.tsx +10 -7
  31. package/src/components/ui/select.tsx +23 -21
  32. package/src/components/ui/separator.tsx +8 -5
  33. package/src/components/ui/simple-editor.tsx +4 -4
  34. package/src/components/ui/skeleton.tsx +10 -7
  35. package/src/components/ui/slider.tsx +8 -5
  36. package/src/components/ui/switch.tsx +6 -3
  37. package/src/components/ui/table.tsx +31 -29
  38. package/src/components/ui/tabs.tsx +12 -9
  39. package/src/components/ui/textarea.tsx +7 -4
  40. package/src/components/ui/toast.tsx +9 -7
  41. package/src/components/ui/toggle.tsx +7 -4
  42. package/src/components/ui/tooltip.tsx +13 -11
  43. package/src/use-performance-optimizer.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "description": "Premium React component library with modern design and customization",
5
5
  "author": "MoonUI",
6
6
  "license": "MIT",
@@ -88,7 +88,8 @@
88
88
  "clsx": "^2.0.0",
89
89
  "framer-motion": "^12.23.6",
90
90
  "lucide-react": "^0.525.0",
91
- "tailwind-merge": "^2.5.0"
91
+ "tailwind-merge": "^2.5.0",
92
+ "date-fns": "^3.3.1"
92
93
  },
93
94
  "devDependencies": {
94
95
  "@types/node": "^18.16.0",
@@ -6,9 +6,9 @@ import { ChevronDown } from "lucide-react"
6
6
 
7
7
  import { cn } from "../../lib/utils"
8
8
 
9
- const Accordion = AccordionPrimitive.Root
9
+ const MoonUIAccordion = AccordionPrimitive.Root
10
10
 
11
- const AccordionItem = React.forwardRef<
11
+ const MoonUIAccordionItem = React.forwardRef<
12
12
  React.ElementRef<typeof AccordionPrimitive.Item>,
13
13
  React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
14
14
  >(({ className, ...props }, ref) => (
@@ -18,9 +18,9 @@ const AccordionItem = React.forwardRef<
18
18
  {...props}
19
19
  />
20
20
  ))
21
- AccordionItem.displayName = "AccordionItem"
21
+ MoonUIAccordionItem.displayName = "MoonUIAccordionItem"
22
22
 
23
- const AccordionTrigger = React.forwardRef<
23
+ const MoonUIAccordionTrigger = React.forwardRef<
24
24
  React.ElementRef<typeof AccordionPrimitive.Trigger>,
25
25
  React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
26
26
  >(({ className, children, ...props }, ref) => (
@@ -42,7 +42,7 @@ const AccordionTrigger = React.forwardRef<
42
42
  ))
43
43
  AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName
44
44
 
45
- const AccordionContent = React.forwardRef<
45
+ const MoonUIAccordionContent = React.forwardRef<
46
46
  React.ElementRef<typeof AccordionPrimitive.Content>,
47
47
  React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
48
48
  >(({ className, children, ...props }, ref) => (
@@ -60,4 +60,7 @@ const AccordionContent = React.forwardRef<
60
60
  ))
61
61
  AccordionContent.displayName = AccordionPrimitive.Content.displayName
62
62
 
63
- export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }
63
+ export { MoonUIAccordion, MoonUIAccordionItem, MoonUIAccordionTrigger, MoonUIAccordionContent };
64
+
65
+ // Backward compatibility exports
66
+ export { MoonUIAccordion as Accordion, MoonUIAccordionItem as AccordionItem, MoonUIAccordionTrigger as AccordionTrigger, MoonUIAccordionContent as AccordionContent }
@@ -13,7 +13,7 @@ import { cn } from "../../lib/utils";
13
13
  * Bildirim, uyarı ve dikkat çekmek gereken içerikler için kullanılır.
14
14
  */
15
15
 
16
- const alertVariants = cva(
16
+ const moonUIAlertVariants = cva(
17
17
  "relative w-full flex items-center gap-3 p-4 border text-foreground [&>svg]:shrink-0",
18
18
  {
19
19
  variants: {
@@ -50,9 +50,9 @@ const alertVariants = cva(
50
50
  }
51
51
  );
52
52
 
53
- export interface AlertProps
53
+ export interface MoonUIAlertProps
54
54
  extends React.HTMLAttributes<HTMLDivElement>,
55
- VariantProps<typeof alertVariants> {
55
+ VariantProps<typeof moonUIAlertVariants> {
56
56
  /** Alert ikonunu gizler */
57
57
  hideIcon?: boolean;
58
58
  /** Kapatma butonu ekler */
@@ -61,7 +61,7 @@ export interface AlertProps
61
61
  onClose?: () => void;
62
62
  }
63
63
 
64
- const Alert = React.forwardRef<HTMLDivElement, AlertProps>(
64
+ const MoonUIAlert = React.forwardRef<HTMLDivElement, MoonUIAlertProps>(
65
65
  ({ className, variant = "default", size, radius, hideIcon = false, closable = false, onClose, children, ...props }, ref) => {
66
66
  // Alert türüne göre ikon belirleme
67
67
  const Icon = React.useMemo(() => {
@@ -101,9 +101,9 @@ const Alert = React.forwardRef<HTMLDivElement, AlertProps>(
101
101
  );
102
102
  }
103
103
  );
104
- Alert.displayName = "Alert";
104
+ MoonUIAlert.displayName = "MoonUIAlert";
105
105
 
106
- const AlertTitle = React.forwardRef<
106
+ const MoonUIAlertTitle = React.forwardRef<
107
107
  HTMLParagraphElement,
108
108
  React.HTMLAttributes<HTMLHeadingElement>
109
109
  >(({ className, ...props }, ref) => (
@@ -113,9 +113,9 @@ const AlertTitle = React.forwardRef<
113
113
  {...props}
114
114
  />
115
115
  ));
116
- AlertTitle.displayName = "AlertTitle";
116
+ MoonUIAlertTitle.displayName = "MoonUIAlertTitle";
117
117
 
118
- const AlertDescription = React.forwardRef<
118
+ const MoonUIAlertDescription = React.forwardRef<
119
119
  HTMLParagraphElement,
120
120
  React.HTMLAttributes<HTMLParagraphElement>
121
121
  >(({ className, ...props }, ref) => (
@@ -125,6 +125,9 @@ const AlertDescription = React.forwardRef<
125
125
  {...props}
126
126
  />
127
127
  ));
128
- AlertDescription.displayName = "AlertDescription";
128
+ MoonUIAlertDescription.displayName = "MoonUIAlertDescription";
129
129
 
130
- export { Alert, AlertTitle, AlertDescription };
130
+ export { MoonUIAlert, MoonUIAlertTitle, MoonUIAlertDescription };
131
+
132
+ // Backward compatibility exports
133
+ export { MoonUIAlert as Alert, MoonUIAlertTitle as AlertTitle, MoonUIAlertDescription as AlertDescription };
@@ -13,7 +13,7 @@ import { cn } from "../../lib/utils"
13
13
  * Fully integrated with the theme system, accessible and customizable.
14
14
  */
15
15
 
16
- const aspectRatioVariants = cva(
16
+ const moonUIAspectRatioVariants = cva(
17
17
  "relative overflow-hidden",
18
18
  {
19
19
  variants: {
@@ -37,9 +37,9 @@ const aspectRatioVariants = cva(
37
37
  }
38
38
  )
39
39
 
40
- interface AspectRatioProps
40
+ interface MoonUIAspectRatioProps
41
41
  extends React.HTMLAttributes<HTMLDivElement>,
42
- VariantProps<typeof aspectRatioVariants> {
42
+ VariantProps<typeof moonUIAspectRatioVariants> {
43
43
  /**
44
44
  * Aspect ratio (width/height). For example 16/9, 4/3, 1/1 etc.
45
45
  * @default 16/9
@@ -47,7 +47,7 @@ interface AspectRatioProps
47
47
  ratio?: number
48
48
  }
49
49
 
50
- const AspectRatio = React.forwardRef<
50
+ const MoonUIAspectRatio = React.forwardRef<
51
51
  HTMLDivElement,
52
52
  AspectRatioProps
53
53
  >(({ className, variant, radius, ratio = 16 / 9, style, children, ...props }, ref) => (
@@ -66,7 +66,10 @@ const AspectRatio = React.forwardRef<
66
66
  </div>
67
67
  </div>
68
68
  ))
69
- AspectRatio.displayName = "AspectRatio"
69
+ MoonUIAspectRatio.displayName = "MoonUIAspectRatio"
70
70
 
71
- export { AspectRatio, aspectRatioVariants }
71
+ export { MoonUIAspectRatio, moonUIAspectRatioVariants };
72
+
73
+ // Backward compatibility exports
74
+ export { MoonUIAspectRatio as AspectRatio, moonUIAspectRatioVariants as aspectRatioVariants }
72
75
  export type { AspectRatioProps }
@@ -4,7 +4,7 @@ import { cva, type VariantProps } from "class-variance-authority";
4
4
 
5
5
  import { cn } from "../../lib/utils";
6
6
 
7
- const avatarVariants = cva(
7
+ const moonUIAvatarVariants = cva(
8
8
  "relative flex shrink-0 overflow-hidden",
9
9
  {
10
10
  variants: {
@@ -39,11 +39,11 @@ const avatarVariants = cva(
39
39
  }
40
40
  );
41
41
 
42
- export interface AvatarProps
42
+ export interface MoonUIAvatarProps
43
43
  extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>,
44
- VariantProps<typeof avatarVariants> {}
44
+ VariantProps<typeof moonUIAvatarVariants> {}
45
45
 
46
- const Avatar = React.forwardRef<
46
+ const MoonUIAvatar = React.forwardRef<
47
47
  React.ElementRef<typeof AvatarPrimitive.Root>,
48
48
  AvatarProps
49
49
  >(({ className, size, radius, variant, ...props }, ref) => (
@@ -55,7 +55,7 @@ const Avatar = React.forwardRef<
55
55
  ));
56
56
  Avatar.displayName = AvatarPrimitive.Root.displayName;
57
57
 
58
- const AvatarImage = React.forwardRef<
58
+ const MoonUIAvatarImage = React.forwardRef<
59
59
  React.ElementRef<typeof AvatarPrimitive.Image>,
60
60
  React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>
61
61
  >(({ className, ...props }, ref) => (
@@ -67,7 +67,7 @@ const AvatarImage = React.forwardRef<
67
67
  ));
68
68
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
69
69
 
70
- const AvatarFallback = React.forwardRef<
70
+ const MoonUIAvatarFallback = React.forwardRef<
71
71
  React.ElementRef<typeof AvatarPrimitive.Fallback>,
72
72
  React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>
73
73
  >(({ className, ...props }, ref) => (
@@ -132,4 +132,7 @@ const AvatarGroup = React.forwardRef<HTMLDivElement, AvatarGroupProps>(
132
132
  );
133
133
  AvatarGroup.displayName = "AvatarGroup";
134
134
 
135
- export { Avatar, AvatarImage, AvatarFallback, AvatarGroup };
135
+ export { MoonUIAvatar, MoonUIAvatarImage, MoonUIAvatarFallback, AvatarGroup };
136
+
137
+ // Backward compatibility exports
138
+ export { MoonUIAvatar as Avatar, MoonUIAvatarImage as AvatarImage, MoonUIAvatarFallback as AvatarFallback };
@@ -9,7 +9,7 @@ import { cn } from "../../lib/utils";
9
9
  * Dark ve light modda uyumlu, erişilebilir ve çeşitli varyantlar sunar.
10
10
  */
11
11
 
12
- const badgeVariants = cva(
12
+ const moonUIBadgeVariants = cva(
13
13
  ["inline-flex items-center gap-1.5",
14
14
  "font-medium transition-colors duration-200",
15
15
  "border focus:outline-none",
@@ -94,9 +94,9 @@ const badgeVariants = cva(
94
94
  }
95
95
  );
96
96
 
97
- export interface BadgeProps
97
+ export interface MoonUIBadgeProps
98
98
  extends React.HTMLAttributes<HTMLDivElement>,
99
- Omit<VariantProps<typeof badgeVariants>, 'variant'> {
99
+ Omit<VariantProps<typeof moonUIBadgeVariants>, 'variant'> {
100
100
  withDot?: boolean;
101
101
  dotColor?: string;
102
102
  removable?: boolean;
@@ -222,4 +222,7 @@ function Badge({
222
222
  );
223
223
  }
224
224
 
225
- export { Badge, badgeVariants };
225
+ export { MoonUIBadge, moonUIBadgeVariants };
226
+
227
+ // Backward compatibility exports
228
+ export { MoonUIBadge as Badge, moonUIBadgeVariants as badgeVariants };
@@ -26,35 +26,35 @@ const breadcrumbVariants = cva(
26
26
  }
27
27
  );
28
28
 
29
- interface BreadcrumbProps
29
+ interface MoonUIBreadcrumbProps
30
30
  extends React.HTMLAttributes<HTMLElement>,
31
31
  VariantProps<typeof breadcrumbVariants> {
32
32
  separator?: React.ReactNode;
33
33
  showHomeIcon?: boolean;
34
34
  }
35
35
 
36
- interface BreadcrumbListProps extends React.HTMLAttributes<HTMLOListElement> {
36
+ interface MoonUIBreadcrumbListProps extends React.HTMLAttributes<HTMLOListElement> {
37
37
  collapsed?: boolean;
38
38
  collapsedWidth?: number;
39
39
  }
40
40
 
41
- interface BreadcrumbItemProps extends React.HTMLAttributes<HTMLLIElement> {
41
+ interface MoonUIBreadcrumbItemProps extends React.HTMLAttributes<HTMLLIElement> {
42
42
  isCurrent?: boolean;
43
43
  href?: string;
44
44
  asChild?: boolean;
45
45
  }
46
46
 
47
- interface BreadcrumbSeparatorProps extends React.HTMLAttributes<HTMLSpanElement> {
47
+ interface MoonUIBreadcrumbSeparatorProps extends React.HTMLAttributes<HTMLSpanElement> {
48
48
  /** Custom separator icon or text */
49
49
  icon?: React.ReactNode;
50
50
  }
51
51
 
52
- interface BreadcrumbEllipsisProps extends React.HTMLAttributes<HTMLSpanElement> {
52
+ interface MoonUIBreadcrumbEllipsisProps extends React.HTMLAttributes<HTMLSpanElement> {
53
53
  /** Custom ellipsis icon */
54
54
  icon?: React.ReactNode;
55
55
  }
56
56
 
57
- const Breadcrumb = React.forwardRef<HTMLElement, BreadcrumbProps>(
57
+ const MoonUIBreadcrumb = React.forwardRef<HTMLElement, MoonUIBreadcrumbProps>(
58
58
  ({ className, variant, size, ...props }, ref) => (
59
59
  <nav
60
60
  ref={ref}
@@ -64,9 +64,9 @@ const Breadcrumb = React.forwardRef<HTMLElement, BreadcrumbProps>(
64
64
  />
65
65
  )
66
66
  );
67
- Breadcrumb.displayName = "Breadcrumb";
67
+ MoonUIBreadcrumb.displayName = "MoonUIBreadcrumb";
68
68
 
69
- const BreadcrumbList = React.forwardRef<HTMLOListElement, BreadcrumbListProps>(
69
+ const MoonUIBreadcrumbList = React.forwardRef<HTMLOListElement, MoonUIBreadcrumbListProps>(
70
70
  ({ className, collapsed, collapsedWidth = 3, ...props }, ref) => {
71
71
  const childrenArray = React.Children.toArray(props.children).filter(Boolean);
72
72
  const childCount = childrenArray.length;
@@ -104,9 +104,9 @@ const BreadcrumbList = React.forwardRef<HTMLOListElement, BreadcrumbListProps>(
104
104
  );
105
105
  }
106
106
  );
107
- BreadcrumbList.displayName = "BreadcrumbList";
107
+ MoonUIBreadcrumbList.displayName = "MoonUIBreadcrumbList";
108
108
 
109
- const BreadcrumbItem = React.forwardRef<HTMLLIElement, BreadcrumbItemProps>(
109
+ const MoonUIBreadcrumbItem = React.forwardRef<HTMLLIElement, MoonUIBreadcrumbItemProps>(
110
110
  ({ className, isCurrent, href, asChild = false, ...props }, ref) => {
111
111
  const Comp = asChild ? React.Fragment : href ? "a" : "span";
112
112
  const itemProps = asChild ? {} : href ? { href } : {};
@@ -133,9 +133,9 @@ const BreadcrumbItem = React.forwardRef<HTMLLIElement, BreadcrumbItemProps>(
133
133
  );
134
134
  }
135
135
  );
136
- BreadcrumbItem.displayName = "BreadcrumbItem";
136
+ MoonUIBreadcrumbItem.displayName = "MoonUIBreadcrumbItem";
137
137
 
138
- const BreadcrumbSeparator = ({
138
+ const MoonUIBreadcrumbSeparator = ({
139
139
  children,
140
140
  className,
141
141
  ...props
@@ -149,9 +149,9 @@ const BreadcrumbSeparator = ({
149
149
  {children || <ChevronRight className="h-3.5 w-3.5" />}
150
150
  </span>
151
151
  );
152
- BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
152
+ MoonUIBreadcrumbSeparator.displayName = "MoonUIBreadcrumbSeparator";
153
153
 
154
- const BreadcrumbEllipsis = ({
154
+ const MoonUIBreadcrumbEllipsis = ({
155
155
  className,
156
156
  ...props
157
157
  }: BreadcrumbEllipsisProps) => (
@@ -165,9 +165,9 @@ const BreadcrumbEllipsis = ({
165
165
  <span className="sr-only">More pages</span>
166
166
  </span>
167
167
  );
168
- BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
168
+ MoonUIBreadcrumbEllipsis.displayName = "MoonUIBreadcrumbEllipsis";
169
169
 
170
- const BreadcrumbLink = React.forwardRef<HTMLAnchorElement, React.AnchorHTMLAttributes<HTMLAnchorElement>>(
170
+ const MoonUIBreadcrumbLink = React.forwardRef<HTMLAnchorElement, React.AnchorHTMLAttributes<HTMLAnchorElement>>(
171
171
  ({ className, href, ...props }, ref) => (
172
172
  <a
173
173
  ref={ref}
@@ -180,9 +180,9 @@ const BreadcrumbLink = React.forwardRef<HTMLAnchorElement, React.AnchorHTMLAttri
180
180
  />
181
181
  )
182
182
  );
183
- BreadcrumbLink.displayName = "BreadcrumbLink";
183
+ MoonUIBreadcrumbLink.displayName = "MoonUIBreadcrumbLink";
184
184
 
185
- const BreadcrumbPage = React.forwardRef<HTMLSpanElement, React.HTMLAttributes<HTMLSpanElement>>(
185
+ const MoonUIBreadcrumbPage = React.forwardRef<HTMLSpanElement, React.HTMLAttributes<HTMLSpanElement>>(
186
186
  ({ className, ...props }, ref) => (
187
187
  <span
188
188
  ref={ref}
@@ -194,14 +194,16 @@ const BreadcrumbPage = React.forwardRef<HTMLSpanElement, React.HTMLAttributes<HT
194
194
  />
195
195
  )
196
196
  );
197
- BreadcrumbPage.displayName = "BreadcrumbPage";
198
-
199
- export {
200
- Breadcrumb,
201
- BreadcrumbList,
202
- BreadcrumbItem,
203
- BreadcrumbLink,
204
- BreadcrumbPage,
205
- BreadcrumbSeparator,
206
- BreadcrumbEllipsis,
207
- };
197
+ MoonUIBreadcrumbPage.displayName = "MoonUIBreadcrumbPage";
198
+
199
+ export { MoonUIBreadcrumb,
200
+ MoonUIBreadcrumbList,
201
+ MoonUIBreadcrumbItem,
202
+ MoonUIBreadcrumbLink,
203
+ MoonUIBreadcrumbPage,
204
+ MoonUIBreadcrumbSeparator,
205
+ MoonUIBreadcrumbEllipsis,
206
+ };
207
+
208
+ // Backward compatibility exports
209
+ export { MoonUIBreadcrumb as Breadcrumb, MoonUISeparator as Separator, MoonUIBreadcrumbList as BreadcrumbList, MoonUIBreadcrumbItem as BreadcrumbItem, MoonUIBreadcrumbLink as BreadcrumbLink, MoonUIBreadcrumbPage as BreadcrumbPage, MoonUIBreadcrumbSeparator as BreadcrumbSeparator, MoonUIBreadcrumbEllipsis as BreadcrumbEllipsis };
@@ -3,7 +3,7 @@
3
3
  import * as React from "react";
4
4
  import { ChevronLeft, ChevronRight } from "lucide-react";
5
5
  import { cn } from "../../lib/utils";
6
- import { buttonVariants } from "./button";
6
+ import { moonUIButtonVariants as buttonVariants } from "./button";
7
7
  import {
8
8
  format,
9
9
  startOfMonth,
@@ -19,7 +19,7 @@ import {
19
19
  endOfWeek
20
20
  } from "date-fns";
21
21
 
22
- export interface CalendarProps {
22
+ export interface MoonUICalendarProps {
23
23
  mode?: "single" | "range" | "multiple";
24
24
  selected?: Date | Date[] | { from?: Date; to?: Date } | undefined;
25
25
  onSelect?: (date: Date | Date[] | { from?: Date; to?: Date } | undefined) => void;
@@ -32,7 +32,7 @@ export interface CalendarProps {
32
32
  initialFocus?: boolean;
33
33
  }
34
34
 
35
- function Calendar({
35
+ function MoonUICalendar({
36
36
  mode = "single",
37
37
  selected,
38
38
  onSelect,
@@ -43,7 +43,7 @@ function Calendar({
43
43
  numberOfMonths = 1,
44
44
  defaultMonth,
45
45
  ...props
46
- }: CalendarProps) {
46
+ }: MoonUICalendarProps) {
47
47
  const [currentMonth, setCurrentMonth] = React.useState(
48
48
  defaultMonth || (selected && (selected as Date)) || new Date()
49
49
  );
@@ -257,6 +257,9 @@ function Calendar({
257
257
  );
258
258
  }
259
259
 
260
- Calendar.displayName = "Calendar";
260
+ MoonUICalendar.displayName = "MoonUICalendar";
261
261
 
262
- export { Calendar };
262
+ export { MoonUICalendar };
263
+
264
+ // Backward compatibility exports
265
+ export { MoonUICalendar as Calendar };
@@ -2,9 +2,9 @@ import * as React from "react";
2
2
  import { cva, type VariantProps } from "class-variance-authority";
3
3
  import { motion, type HTMLMotionProps } from "framer-motion";
4
4
  import { cn } from "../../lib/utils";
5
- import { microInteractionVariants, hoverAnimations, tapAnimations } from "@/lib/micro-interactions";
5
+ import { microInteractionVariants, hoverAnimations, tapAnimations } from "../../lib/micro-interactions";
6
6
 
7
- const cardVariants = cva(
7
+ const moonUICardVariants = cva(
8
8
  "rounded-lg border bg-card text-card-foreground shadow-sm dark:shadow-gray-900/20 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 transition-all duration-200",
9
9
  {
10
10
  variants: {
@@ -42,14 +42,14 @@ const cardVariants = cva(
42
42
  }
43
43
  );
44
44
 
45
- export interface CardProps
45
+ export interface MoonUICardProps
46
46
  extends React.HTMLAttributes<HTMLDivElement>,
47
- VariantProps<typeof cardVariants> {
47
+ VariantProps<typeof moonUICardVariants> {
48
48
  asChild?: boolean;
49
49
  microInteraction?: "lift" | "glow" | "scale" | "none";
50
50
  }
51
51
 
52
- const Card = React.forwardRef<HTMLDivElement, CardProps>(
52
+ const MoonUICard = React.forwardRef<HTMLDivElement, MoonUICardProps>(
53
53
  ({ className, variant, size, radius, interactive, microInteraction = "lift", ...props }, ref) => {
54
54
  // Interactive özelliği varsa motion.div, yoksa normal div kullan
55
55
  if (interactive && microInteraction !== "none") {
@@ -63,7 +63,7 @@ const Card = React.forwardRef<HTMLDivElement, CardProps>(
63
63
  return (
64
64
  <motion.div
65
65
  ref={ref}
66
- className={cn(cardVariants({ variant, size, radius, interactive, className }))}
66
+ className={cn(moonUICardVariants({ variant, size, radius, interactive, className }))}
67
67
  {...interactionProps}
68
68
  {...props}
69
69
  />
@@ -80,9 +80,9 @@ const Card = React.forwardRef<HTMLDivElement, CardProps>(
80
80
  );
81
81
  }
82
82
  );
83
- Card.displayName = "Card";
83
+ MoonUICard.displayName = "MoonUICard";
84
84
 
85
- const CardHeader = React.forwardRef<
85
+ const MoonUICardHeader = React.forwardRef<
86
86
  HTMLDivElement,
87
87
  React.HTMLAttributes<HTMLDivElement>
88
88
  >(({ className, ...props }, ref) => (
@@ -92,9 +92,9 @@ const CardHeader = React.forwardRef<
92
92
  {...props}
93
93
  />
94
94
  ));
95
- CardHeader.displayName = "CardHeader";
95
+ MoonUICardHeader.displayName = "MoonUICardHeader";
96
96
 
97
- const CardTitle = React.forwardRef<
97
+ const MoonUICardTitle = React.forwardRef<
98
98
  HTMLHeadingElement,
99
99
  React.HTMLAttributes<HTMLHeadingElement>
100
100
  >(({ className, ...props }, ref) => (
@@ -104,9 +104,9 @@ const CardTitle = React.forwardRef<
104
104
  {...props}
105
105
  />
106
106
  ));
107
- CardTitle.displayName = "CardTitle";
107
+ MoonUICardTitle.displayName = "MoonUICardTitle";
108
108
 
109
- const CardDescription = React.forwardRef<
109
+ const MoonUICardDescription = React.forwardRef<
110
110
  HTMLParagraphElement,
111
111
  React.HTMLAttributes<HTMLParagraphElement>
112
112
  >(({ className, ...props }, ref) => (
@@ -116,17 +116,17 @@ const CardDescription = React.forwardRef<
116
116
  {...props}
117
117
  />
118
118
  ));
119
- CardDescription.displayName = "CardDescription";
119
+ MoonUICardDescription.displayName = "MoonUICardDescription";
120
120
 
121
- const CardContent = React.forwardRef<
121
+ const MoonUICardContent = React.forwardRef<
122
122
  HTMLDivElement,
123
123
  React.HTMLAttributes<HTMLDivElement>
124
124
  >(({ className, ...props }, ref) => (
125
125
  <div ref={ref} className={cn("pt-0", className)} {...props} />
126
126
  ));
127
- CardContent.displayName = "CardContent";
127
+ MoonUICardContent.displayName = "MoonUICardContent";
128
128
 
129
- const CardFooter = React.forwardRef<
129
+ const MoonUICardFooter = React.forwardRef<
130
130
  HTMLDivElement,
131
131
  React.HTMLAttributes<HTMLDivElement>
132
132
  >(({ className, ...props }, ref) => (
@@ -136,6 +136,9 @@ const CardFooter = React.forwardRef<
136
136
  {...props}
137
137
  />
138
138
  ));
139
- CardFooter.displayName = "CardFooter";
139
+ MoonUICardFooter.displayName = "MoonUICardFooter";
140
140
 
141
- export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
141
+ export { MoonUICard, MoonUICardHeader, MoonUICardFooter, MoonUICardTitle, MoonUICardDescription, MoonUICardContent };
142
+
143
+ // Backward compatibility exports
144
+ export { MoonUICard as Card, MoonUICardHeader as CardHeader, MoonUICardFooter as CardFooter, MoonUICardTitle as CardTitle, MoonUICardDescription as CardDescription, MoonUICardContent as CardContent };
@@ -14,7 +14,7 @@ import { cn } from "../../lib/utils";
14
14
  * Form elemanları ve seçim listeleri için kullanılır.
15
15
  */
16
16
 
17
- const checkboxVariants = cva(
17
+ const moonUICheckboxVariants = cva(
18
18
  "peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground",
19
19
  {
20
20
  variants: {
@@ -53,9 +53,9 @@ const checkboxVariants = cva(
53
53
  }
54
54
  );
55
55
 
56
- export interface CheckboxProps
56
+ export interface MoonUICheckboxProps
57
57
  extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,
58
- VariantProps<typeof checkboxVariants> {
58
+ VariantProps<typeof moonUICheckboxVariants> {
59
59
  /**
60
60
  * İndeterminate durumu - grup seçimlerinde bazı öğeler seçilmişse kullanılır
61
61
  */
@@ -66,7 +66,7 @@ export interface CheckboxProps
66
66
  icon?: React.ReactNode;
67
67
  }
68
68
 
69
- const Checkbox = React.forwardRef<
69
+ const MoonUICheckbox = React.forwardRef<
70
70
  React.ElementRef<typeof CheckboxPrimitive.Root>,
71
71
  CheckboxProps
72
72
  >(({
@@ -253,4 +253,7 @@ const CheckboxWithLabel = React.forwardRef<
253
253
  });
254
254
  CheckboxWithLabel.displayName = "CheckboxWithLabel";
255
255
 
256
- export { Checkbox, CheckboxGroup, CheckboxLabel, CheckboxWithLabel };
256
+ export { MoonUICheckbox, CheckboxGroup, CheckboxLabel, CheckboxWithLabel };
257
+
258
+ // Backward compatibility exports
259
+ export { MoonUICheckbox as Checkbox, MoonUILabel as Label };
@@ -14,7 +14,7 @@ import { cn } from "../../lib/utils"
14
14
  * Tema sistemiyle tam entegre, erişilebilir ve özelleştirilebilir.
15
15
  */
16
16
 
17
- const Collapsible = CollapsiblePrimitive.Root
17
+ const MoonUICollapsible = CollapsiblePrimitive.Root
18
18
 
19
19
  const collapsibleTriggerVariants = cva(
20
20
  "flex w-full items-center justify-between transition-all",
@@ -39,11 +39,11 @@ const collapsibleTriggerVariants = cva(
39
39
  }
40
40
  )
41
41
 
42
- interface CollapsibleTriggerProps
42
+ interface MoonUICollapsibleTriggerProps
43
43
  extends React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Trigger>,
44
44
  VariantProps<typeof collapsibleTriggerVariants> {}
45
45
 
46
- const CollapsibleTrigger = React.forwardRef<
46
+ const MoonUICollapsibleTrigger = React.forwardRef<
47
47
  React.ElementRef<typeof CollapsiblePrimitive.Trigger>,
48
48
  CollapsibleTriggerProps
49
49
  >(({ className, children, variant, size, asChild, ...props }, ref) => {
@@ -97,11 +97,11 @@ const collapsibleContentVariants = cva(
97
97
  }
98
98
  )
99
99
 
100
- interface CollapsibleContentProps
100
+ interface MoonUICollapsibleContentProps
101
101
  extends React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Content>,
102
102
  VariantProps<typeof collapsibleContentVariants> {}
103
103
 
104
- const CollapsibleContent = React.forwardRef<
104
+ const MoonUICollapsibleContent = React.forwardRef<
105
105
  React.ElementRef<typeof CollapsiblePrimitive.Content>,
106
106
  CollapsibleContentProps
107
107
  >(({ className, children, variant, size, ...props }, ref) => (
@@ -115,13 +115,15 @@ const CollapsibleContent = React.forwardRef<
115
115
  ))
116
116
  CollapsibleContent.displayName = CollapsiblePrimitive.Content.displayName
117
117
 
118
- export {
119
- Collapsible,
120
- CollapsibleTrigger,
121
- CollapsibleContent,
118
+ export { MoonUICollapsible,
119
+ MoonUICollapsibleTrigger,
120
+ MoonUICollapsibleContent,
122
121
  collapsibleTriggerVariants,
123
122
  collapsibleContentVariants,
124
- }
123
+ };
124
+
125
+ // Backward compatibility exports
126
+ export { MoonUICollapsible as Collapsible, MoonUICollapsibleTrigger as CollapsibleTrigger, MoonUICollapsibleContent as CollapsibleContent }
125
127
 
126
128
  export type {
127
129
  CollapsibleTriggerProps,
@@ -131,7 +131,7 @@ function hslToHex(h: number, s: number, l: number): string {
131
131
  );
132
132
  }
133
133
 
134
- export interface ColorPickerProps
134
+ export interface MoonUIColorPickerProps
135
135
  extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onChange" | "value">,
136
136
  VariantProps<typeof colorPickerVariants> {
137
137
  /**
@@ -661,4 +661,4 @@ export function GradientPicker({
661
661
  }
662
662
 
663
663
  // Re-export icons used
664
- export { Palette, Pipette } from "lucide-react";
664
+ export { Palette, Pipette } from "lucide-react";