@moontra/moonui-pro 2.2.0 → 2.2.1
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.mjs +520 -520
- package/package.json +1 -1
- package/src/components/advanced-forms/index.tsx +3 -3
- package/src/components/calendar/index.tsx +1 -1
- package/src/components/dashboard/index.tsx +1 -1
- package/src/components/file-upload/index.tsx +1 -1
- package/src/components/github-stars/index.tsx +1 -1
- package/src/components/health-check/index.tsx +1 -1
- package/src/components/kanban/index.tsx +1 -1
- package/src/components/optimized-image/index.tsx +1 -1
- package/src/components/performance-debugger/index.tsx +1 -1
- package/src/components/performance-monitor/index.tsx +1 -1
- package/src/components/rich-text-editor/index.tsx +1 -1
- package/src/components/timeline/index.tsx +1 -1
- package/src/components/ui/animated-button.tsx +1 -1
- package/src/components/ui/avatar.tsx +10 -7
- package/src/components/ui/badge.tsx +10 -7
- package/src/components/ui/card.tsx +19 -16
- package/src/components/ui/checkbox.tsx +8 -5
- package/src/components/ui/color-picker.tsx +6 -4
- package/src/components/ui/dialog.tsx +23 -21
- package/src/components/ui/dropdown-menu.tsx +36 -34
- package/src/components/ui/hover-card-3d.tsx +1 -1
- package/src/components/ui/input.tsx +9 -6
- package/src/components/ui/label.tsx +7 -4
- package/src/components/ui/magnetic-button.tsx +1 -1
- package/src/components/ui/popover.tsx +11 -9
- package/src/components/ui/progress.tsx +5 -2
- package/src/components/ui/select.tsx +23 -21
- package/src/components/ui/separator.tsx +8 -5
- package/src/components/ui/skeleton.tsx +1 -1
- package/src/components/ui/slider.tsx +8 -5
- package/src/components/ui/spotlight-card.tsx +1 -1
- package/src/components/ui/switch.tsx +6 -3
- 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/tooltip.tsx +13 -11
- package/src/use-performance-optimizer.ts +11 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -11,7 +11,7 @@ import { Textarea } from "../ui/textarea"
|
|
|
11
11
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../ui/select"
|
|
12
12
|
import { Checkbox } from "../ui/checkbox"
|
|
13
13
|
import { Switch } from "../ui/switch"
|
|
14
|
-
import { Badge } from "../ui/badge"
|
|
14
|
+
import { MoonUIBadgePro as Badge } from "../ui/badge"
|
|
15
15
|
import { cn } from "../../lib/utils"
|
|
16
16
|
import { Lock, Sparkles, CheckCircle, AlertCircle, Eye, EyeOff, Upload, X } from "lucide-react"
|
|
17
17
|
import { useSubscription } from "../../hooks/use-subscription"
|
|
@@ -239,7 +239,7 @@ const AdvancedFormsInternal: React.FC<AdvancedFormsProps> = ({
|
|
|
239
239
|
<Checkbox
|
|
240
240
|
id={field.name}
|
|
241
241
|
{...register(field.name)}
|
|
242
|
-
onCheckedChange={(checked) => setValue(field.name, checked)}
|
|
242
|
+
onCheckedChange={(checked: boolean) => setValue(field.name, checked)}
|
|
243
243
|
/>
|
|
244
244
|
<Label htmlFor={field.name} className="text-sm">
|
|
245
245
|
{field.placeholder || "Check this option"}
|
|
@@ -252,7 +252,7 @@ const AdvancedFormsInternal: React.FC<AdvancedFormsProps> = ({
|
|
|
252
252
|
<Switch
|
|
253
253
|
id={field.name}
|
|
254
254
|
{...register(field.name)}
|
|
255
|
-
onCheckedChange={(checked) => setValue(field.name, checked)}
|
|
255
|
+
onCheckedChange={(checked: boolean) => setValue(field.name, checked)}
|
|
256
256
|
/>
|
|
257
257
|
<Label htmlFor={field.name} className="text-sm">
|
|
258
258
|
{field.placeholder || "Toggle this option"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../ui/card'
|
|
5
5
|
import { Button } from '../ui/button'
|
|
6
|
-
import { Badge } from '../ui/badge'
|
|
6
|
+
import { MoonUIBadgePro as Badge } from '../ui/badge'
|
|
7
7
|
import {
|
|
8
8
|
ChevronLeft,
|
|
9
9
|
ChevronRight,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../ui/card'
|
|
5
|
-
import { Badge } from '../ui/badge'
|
|
5
|
+
import { MoonUIBadgePro as Badge } from '../ui/badge'
|
|
6
6
|
import { Button } from '../ui/button'
|
|
7
7
|
import {
|
|
8
8
|
TrendingUp,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../ui/card'
|
|
5
5
|
import { Button } from '../ui/button'
|
|
6
|
-
import { Badge } from '../ui/badge'
|
|
6
|
+
import { MoonUIBadgePro as Badge } from '../ui/badge'
|
|
7
7
|
import {
|
|
8
8
|
Upload,
|
|
9
9
|
File,
|
|
@@ -4,7 +4,7 @@ import React, { useState, useEffect } from "react"
|
|
|
4
4
|
import { motion, AnimatePresence } from "framer-motion"
|
|
5
5
|
import { Card, CardContent } from "../ui/card"
|
|
6
6
|
import { Button } from "../ui/button"
|
|
7
|
-
import { Badge } from "../ui/badge"
|
|
7
|
+
import { MoonUIBadgePro as Badge } from "../ui/badge"
|
|
8
8
|
import { Skeleton } from "../ui/skeleton"
|
|
9
9
|
import { cn } from "../../lib/utils"
|
|
10
10
|
import { Star, GitFork, Eye, Users, ExternalLink, Github, Lock, Sparkles, RefreshCw } from "lucide-react"
|
|
@@ -4,7 +4,7 @@ import React, { useState, useEffect, useCallback } from "react"
|
|
|
4
4
|
import { motion, AnimatePresence } from "framer-motion"
|
|
5
5
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../ui/card"
|
|
6
6
|
import { Button } from "../ui/button"
|
|
7
|
-
import { Badge } from "../ui/badge"
|
|
7
|
+
import { MoonUIBadgePro as Badge } from "../ui/badge"
|
|
8
8
|
import { Progress } from "../ui/progress"
|
|
9
9
|
import { cn } from "../../lib/utils"
|
|
10
10
|
import {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../ui/card'
|
|
5
5
|
import { Button } from '../ui/button'
|
|
6
|
-
import { Badge } from '../ui/badge'
|
|
6
|
+
import { MoonUIBadgePro as Badge } from '../ui/badge'
|
|
7
7
|
import { Avatar, AvatarFallback, AvatarImage } from '../ui/avatar'
|
|
8
8
|
import {
|
|
9
9
|
Plus,
|
|
@@ -4,7 +4,7 @@ import React, { useState, useRef, useEffect } from "react"
|
|
|
4
4
|
import { motion, AnimatePresence } from "framer-motion"
|
|
5
5
|
import { Card, CardContent } from "../ui/card"
|
|
6
6
|
import { Button } from "../ui/button"
|
|
7
|
-
import { Badge } from "../ui/badge"
|
|
7
|
+
import { MoonUIBadgePro as Badge } from "../ui/badge"
|
|
8
8
|
import { Skeleton } from "../ui/skeleton"
|
|
9
9
|
import { cn } from "../../lib/utils"
|
|
10
10
|
import {
|
|
@@ -4,7 +4,7 @@ import React, { useState, useEffect, useRef, useCallback } from "react"
|
|
|
4
4
|
import { motion, AnimatePresence } from "framer-motion"
|
|
5
5
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../ui/card"
|
|
6
6
|
import { Button } from "../ui/button"
|
|
7
|
-
import { Badge } from "../ui/badge"
|
|
7
|
+
import { MoonUIBadgePro as Badge } from "../ui/badge"
|
|
8
8
|
import { Progress } from "../ui/progress"
|
|
9
9
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../ui/tabs"
|
|
10
10
|
import { cn } from "../../lib/utils"
|
|
@@ -4,7 +4,7 @@ import React, { useState, useEffect, useRef, useCallback } from "react"
|
|
|
4
4
|
import { motion, AnimatePresence } from "framer-motion"
|
|
5
5
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../ui/card"
|
|
6
6
|
import { Button } from "../ui/button"
|
|
7
|
-
import { Badge } from "../ui/badge"
|
|
7
|
+
import { MoonUIBadgePro as Badge } from "../ui/badge"
|
|
8
8
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../ui/tabs"
|
|
9
9
|
import { cn } from "../../lib/utils"
|
|
10
10
|
import {
|
|
@@ -91,7 +91,7 @@ import { Label } from '../ui/label';
|
|
|
91
91
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../ui/select';
|
|
92
92
|
import { Separator } from '../ui/separator';
|
|
93
93
|
import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover';
|
|
94
|
-
import { ColorPicker } from '../ui/color-picker';
|
|
94
|
+
import { MoonUIColorPickerPro as ColorPicker } from '../ui/color-picker';
|
|
95
95
|
import { Slider } from '../ui/slider';
|
|
96
96
|
import { toast } from '../ui/toast';
|
|
97
97
|
// Note: AI providers should be handled by consuming application
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react'
|
|
4
4
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../ui/card'
|
|
5
|
-
import { Badge } from '../ui/badge'
|
|
5
|
+
import { MoonUIBadgePro as Badge } from '../ui/badge'
|
|
6
6
|
import { Avatar, AvatarFallback, AvatarImage } from '../ui/avatar'
|
|
7
7
|
import { Button } from '../ui/button'
|
|
8
8
|
import {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { motion, AnimatePresence } from "framer-motion";
|
|
5
5
|
import { Check, X, Loader2 } from "lucide-react";
|
|
6
|
-
import { cn } from "
|
|
6
|
+
import { cn } from "../../lib/utils";
|
|
7
7
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
8
8
|
|
|
9
9
|
const animatedButtonVariants = cva(
|
|
@@ -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
|
|
7
|
+
const moonUIAvatarVariantsPro = 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
|
|
42
|
+
export interface MoonUIAvatarProProps
|
|
43
43
|
extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>,
|
|
44
|
-
VariantProps<typeof
|
|
44
|
+
VariantProps<typeof moonUIAvatarVariantsPro> {}
|
|
45
45
|
|
|
46
|
-
const
|
|
46
|
+
const MoonUIAvatarPro = 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
|
|
58
|
+
const MoonUIAvatarImagePro = 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
|
|
70
|
+
const MoonUIAvatarFallbackPro = 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 {
|
|
135
|
+
export { MoonUIAvatarPro, MoonUIAvatarImagePro, MoonUIAvatarFallbackPro, AvatarGroup };
|
|
136
|
+
|
|
137
|
+
// Backward compatibility exports
|
|
138
|
+
export { MoonUIAvatarPro as Avatar, MoonUIAvatarImagePro as AvatarImage, MoonUIAvatarFallbackPro 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
|
|
12
|
+
const moonUIBadgeVariantsPro = 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
|
|
97
|
+
export interface MoonUIBadgeProProps
|
|
98
98
|
extends React.HTMLAttributes<HTMLDivElement>,
|
|
99
|
-
Omit<VariantProps<typeof
|
|
99
|
+
Omit<VariantProps<typeof moonUIBadgeVariantsPro>, 'variant'> {
|
|
100
100
|
withDot?: boolean;
|
|
101
101
|
dotColor?: string;
|
|
102
102
|
removable?: boolean;
|
|
@@ -120,7 +120,7 @@ export interface BadgeProps
|
|
|
120
120
|
* @param props.leftIcon - Badge'in solunda görüntülenecek ikon
|
|
121
121
|
* @param props.rightIcon - Badge'in sağında görüntülenecek ikon
|
|
122
122
|
*/
|
|
123
|
-
function
|
|
123
|
+
function MoonUIBadgePro({
|
|
124
124
|
className,
|
|
125
125
|
variant,
|
|
126
126
|
size,
|
|
@@ -133,7 +133,7 @@ function Badge({
|
|
|
133
133
|
rightIcon,
|
|
134
134
|
children,
|
|
135
135
|
...props
|
|
136
|
-
}:
|
|
136
|
+
}: MoonUIBadgeProProps) {
|
|
137
137
|
// Auto-assign icons and content for special variants
|
|
138
138
|
let autoLeftIcon = leftIcon;
|
|
139
139
|
let autoChildren = children;
|
|
@@ -162,7 +162,7 @@ function Badge({
|
|
|
162
162
|
|
|
163
163
|
return (
|
|
164
164
|
<div
|
|
165
|
-
className={cn(
|
|
165
|
+
className={cn(moonUIBadgeVariantsPro({ variant, size, radius }), className)}
|
|
166
166
|
data-removable={removable ? "" : undefined}
|
|
167
167
|
{...props}
|
|
168
168
|
>
|
|
@@ -222,4 +222,7 @@ function Badge({
|
|
|
222
222
|
);
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
export {
|
|
225
|
+
export { MoonUIBadgePro, moonUIBadgeVariantsPro };
|
|
226
|
+
|
|
227
|
+
// Backward compatibility exports
|
|
228
|
+
export { MoonUIBadgePro as Badge, moonUIBadgeVariantsPro as badgeVariants };
|
|
@@ -4,7 +4,7 @@ import { motion, type HTMLMotionProps } from "framer-motion";
|
|
|
4
4
|
import { cn } from "../../lib/utils";
|
|
5
5
|
import { microInteractionVariants, hoverAnimations, tapAnimations } from "../../lib/micro-interactions";
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const moonUICardVariantsPro = 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
|
|
45
|
+
export interface MoonUICardProProps
|
|
46
46
|
extends React.HTMLAttributes<HTMLDivElement>,
|
|
47
|
-
VariantProps<typeof
|
|
47
|
+
VariantProps<typeof moonUICardVariantsPro> {
|
|
48
48
|
asChild?: boolean;
|
|
49
49
|
microInteraction?: "lift" | "glow" | "scale" | "none";
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
const
|
|
52
|
+
const MoonUICardPro = React.forwardRef<HTMLDivElement, MoonUICardProProps>(
|
|
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") {
|
|
@@ -80,9 +80,9 @@ const Card = React.forwardRef<HTMLDivElement, CardProps>(
|
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
82
|
);
|
|
83
|
-
|
|
83
|
+
MoonUICardPro.displayName = "MoonUICardPro";
|
|
84
84
|
|
|
85
|
-
const
|
|
85
|
+
const MoonUICardHeaderPro = 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
|
-
|
|
95
|
+
MoonUICardHeaderPro.displayName = "MoonUICardHeaderPro";
|
|
96
96
|
|
|
97
|
-
const
|
|
97
|
+
const MoonUICardTitlePro = 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
|
-
|
|
107
|
+
MoonUICardTitlePro.displayName = "MoonUICardTitlePro";
|
|
108
108
|
|
|
109
|
-
const
|
|
109
|
+
const MoonUICardDescriptionPro = 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
|
-
|
|
119
|
+
MoonUICardDescriptionPro.displayName = "MoonUICardDescriptionPro";
|
|
120
120
|
|
|
121
|
-
const
|
|
121
|
+
const MoonUICardContentPro = 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
|
-
|
|
127
|
+
MoonUICardContentPro.displayName = "MoonUICardContentPro";
|
|
128
128
|
|
|
129
|
-
const
|
|
129
|
+
const MoonUICardFooterPro = 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
|
-
|
|
139
|
+
MoonUICardFooterPro.displayName = "MoonUICardFooterPro";
|
|
140
140
|
|
|
141
|
-
export {
|
|
141
|
+
export { MoonUICardPro, MoonUICardHeaderPro, MoonUICardFooterPro, MoonUICardTitlePro, MoonUICardDescriptionPro, MoonUICardContentPro };
|
|
142
|
+
|
|
143
|
+
// Backward compatibility exports
|
|
144
|
+
export { MoonUICardPro as Card, MoonUICardHeaderPro as CardHeader, MoonUICardFooterPro as CardFooter, MoonUICardTitlePro as CardTitle, MoonUICardDescriptionPro as CardDescription, MoonUICardContentPro 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
|
|
17
|
+
const moonUICheckboxVariantsPro = 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
|
|
56
|
+
export interface MoonUICheckboxProProps
|
|
57
57
|
extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>,
|
|
58
|
-
VariantProps<typeof
|
|
58
|
+
VariantProps<typeof moonUICheckboxVariantsPro> {
|
|
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
|
|
69
|
+
const MoonUICheckboxPro = 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 {
|
|
256
|
+
export { MoonUICheckboxPro, CheckboxGroup, CheckboxLabel, CheckboxWithLabel };
|
|
257
|
+
|
|
258
|
+
// Backward compatibility exports
|
|
259
|
+
export { MoonUICheckboxPro as Checkbox, MoonUILabelPro as Label };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React, { useState } from "react"
|
|
4
4
|
import { cn } from "../../lib/utils"
|
|
5
5
|
|
|
6
|
-
interface
|
|
6
|
+
interface MoonUIColorPickerProProps {
|
|
7
7
|
value?: string
|
|
8
8
|
onChange?: (color: string) => void
|
|
9
9
|
className?: string
|
|
@@ -21,7 +21,7 @@ const defaultColors = [
|
|
|
21
21
|
]
|
|
22
22
|
|
|
23
23
|
// React 19 compatible - removed forwardRef
|
|
24
|
-
export const
|
|
24
|
+
export const MoonUIColorPickerPro = ({
|
|
25
25
|
value = "#000000",
|
|
26
26
|
onChange,
|
|
27
27
|
className,
|
|
@@ -29,7 +29,7 @@ export const ColorPicker = ({
|
|
|
29
29
|
showPresets = true,
|
|
30
30
|
size = "default",
|
|
31
31
|
presets = defaultColors
|
|
32
|
-
}:
|
|
32
|
+
}: MoonUIColorPickerProProps) => {
|
|
33
33
|
const [currentColor, setCurrentColor] = useState(value)
|
|
34
34
|
|
|
35
35
|
const handleColorChange = (color: string) => {
|
|
@@ -92,4 +92,6 @@ export const ColorPicker = ({
|
|
|
92
92
|
)
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
// Backward compatibility exports
|
|
96
|
+
export { MoonUIColorPickerPro as ColorPicker }
|
|
97
|
+
export default MoonUIColorPickerPro
|
|
@@ -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 MoonUIDialogPro = DialogPrimitive.Root;
|
|
19
|
+
const MoonUIDialogTriggerPro = DialogPrimitive.Trigger;
|
|
20
20
|
const DialogPortal = DialogPrimitive.Portal;
|
|
21
|
-
const
|
|
21
|
+
const MoonUIDialogClosePro = 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 MoonUIDialogContentProProps
|
|
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 MoonUIDialogContentPro = 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 MoonUIDialogHeaderPro = ({
|
|
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
|
+
MoonUIDialogHeaderPro.displayName = "MoonUIDialogHeaderPro";
|
|
261
261
|
|
|
262
|
-
const
|
|
262
|
+
const MoonUIDialogFooterPro = ({
|
|
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
|
+
MoonUIDialogFooterPro.displayName = "MoonUIDialogFooterPro";
|
|
275
275
|
|
|
276
|
-
const
|
|
276
|
+
const MoonUIDialogTitlePro = 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 MoonUIDialogDescriptionPro = 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 { MoonUIDialogPro,
|
|
323
|
+
MoonUIDialogTriggerPro,
|
|
324
|
+
MoonUIDialogContentPro,
|
|
325
|
+
MoonUIDialogHeaderPro,
|
|
326
|
+
MoonUIDialogFooterPro,
|
|
327
|
+
MoonUIDialogTitlePro,
|
|
328
|
+
MoonUIDialogDescriptionPro,
|
|
329
|
+
MoonUIDialogClosePro,
|
|
331
330
|
DialogForm,
|
|
332
|
-
};
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
// Backward compatibility exports
|
|
334
|
+
export { MoonUIDialogPro as Dialog, MoonUIDialogContentPro as DialogContent, MoonUIDialogHeaderPro as DialogHeader, MoonUIDialogFooterPro as DialogFooter, MoonUIDialogTitlePro as DialogTitle, MoonUIDialogDescriptionPro as DialogDescription, MoonUIDialogTriggerPro as DialogTrigger, MoonUIDialogClosePro as DialogClose };
|