@moontra/moonui-pro 2.2.0 → 2.2.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.
- package/dist/index.mjs +588 -589
- 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 +2 -2
- package/src/components/health-check/index.tsx +1 -1
- package/src/components/kanban/index.tsx +1 -1
- package/src/components/lazy-component/index.tsx +1 -1
- package/src/components/optimized-image/index.tsx +2 -2
- 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 +15 -12
- package/src/components/ui/badge.tsx +10 -7
- package/src/components/ui/card.tsx +19 -16
- package/src/components/ui/checkbox.tsx +15 -12
- package/src/components/ui/color-picker.tsx +6 -4
- package/src/components/ui/dialog.tsx +31 -29
- package/src/components/ui/dropdown-menu.tsx +44 -42
- package/src/components/ui/hover-card-3d.tsx +1 -1
- package/src/components/ui/input.tsx +9 -6
- package/src/components/ui/label.tsx +8 -5
- package/src/components/ui/magnetic-button.tsx +1 -1
- package/src/components/ui/popover.tsx +18 -16
- package/src/components/ui/progress.tsx +6 -3
- package/src/components/ui/select.tsx +32 -30
- package/src/components/ui/separator.tsx +9 -6
- package/src/components/ui/skeleton.tsx +7 -4
- package/src/components/ui/slider.tsx +8 -5
- package/src/components/ui/spotlight-card.tsx +1 -1
- package/src/components/ui/switch.tsx +7 -4
- package/src/components/ui/tabs.tsx +16 -13
- package/src/components/ui/textarea.tsx +7 -4
- package/src/components/ui/toast.tsx +20 -18
- package/src/components/ui/tooltip.tsx +18 -16
- 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.2",
|
|
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,8 +4,8 @@ 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"
|
|
8
|
-
import { Skeleton } from "../ui/skeleton"
|
|
7
|
+
import { MoonUIBadgePro as Badge } from "../ui/badge"
|
|
8
|
+
import { MoonUISkeleton as 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"
|
|
11
11
|
import { useSubscription } from "../../hooks/use-subscription"
|
|
@@ -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, useEffect, useRef, Suspense } from "react"
|
|
|
4
4
|
import { motion } from "framer-motion"
|
|
5
5
|
import { Card, CardContent } from "../ui/card"
|
|
6
6
|
import { Button } from "../ui/button"
|
|
7
|
-
import { Skeleton } from "../ui/skeleton"
|
|
7
|
+
import { MoonUISkeleton as Skeleton } from "../ui/skeleton"
|
|
8
8
|
import { cn } from "../../lib/utils"
|
|
9
9
|
import { Eye, Loader2, Lock, Sparkles, RefreshCw } from "lucide-react"
|
|
10
10
|
import { useSubscription } from "../../hooks/use-subscription"
|
|
@@ -4,8 +4,8 @@ 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"
|
|
8
|
-
import { Skeleton } from "../ui/skeleton"
|
|
7
|
+
import { MoonUIBadgePro as Badge } from "../ui/badge"
|
|
8
|
+
import { MoonUISkeleton as Skeleton } from "../ui/skeleton"
|
|
9
9
|
import { cn } from "../../lib/utils"
|
|
10
10
|
import {
|
|
11
11
|
Image as ImageIcon,
|
|
@@ -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) => (
|
|
@@ -53,9 +53,9 @@ const Avatar = React.forwardRef<
|
|
|
53
53
|
{...props}
|
|
54
54
|
/>
|
|
55
55
|
));
|
|
56
|
-
|
|
56
|
+
MoonUIAvatar.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) => (
|
|
@@ -65,9 +65,9 @@ const AvatarImage = React.forwardRef<
|
|
|
65
65
|
{...props}
|
|
66
66
|
/>
|
|
67
67
|
));
|
|
68
|
-
|
|
68
|
+
MoonUIAvatarImage.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) => (
|
|
@@ -80,7 +80,7 @@ const AvatarFallback = React.forwardRef<
|
|
|
80
80
|
{...props}
|
|
81
81
|
/>
|
|
82
82
|
));
|
|
83
|
-
|
|
83
|
+
MoonUIAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
84
84
|
|
|
85
85
|
// Avatar Group Component for displaying multiple avatars
|
|
86
86
|
interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -89,7 +89,7 @@ interface AvatarGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
89
89
|
overlapOffset?: number;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
const
|
|
92
|
+
const MoonUIAvatarGroup = React.forwardRef<HTMLDivElement, AvatarGroupProps>(
|
|
93
93
|
({ className, limit, avatars, overlapOffset = -8, ...props }, ref) => {
|
|
94
94
|
const visibleAvatars = limit ? avatars.slice(0, limit) : avatars;
|
|
95
95
|
const remainingCount = limit ? Math.max(0, avatars.length - limit) : 0;
|
|
@@ -130,6 +130,9 @@ const AvatarGroup = React.forwardRef<HTMLDivElement, AvatarGroupProps>(
|
|
|
130
130
|
);
|
|
131
131
|
}
|
|
132
132
|
);
|
|
133
|
-
|
|
133
|
+
MoonUIAvatarGroup.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
|
>(({
|
|
@@ -114,7 +114,7 @@ const Checkbox = React.forwardRef<
|
|
|
114
114
|
</CheckboxPrimitive.Root>
|
|
115
115
|
);
|
|
116
116
|
});
|
|
117
|
-
|
|
117
|
+
MoonUICheckbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
118
118
|
|
|
119
119
|
// CheckboxGroup bileşeni
|
|
120
120
|
interface CheckboxGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
@@ -132,7 +132,7 @@ interface CheckboxGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
132
132
|
children: React.ReactNode;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
const
|
|
135
|
+
const MoonUICheckboxGroup = React.forwardRef<HTMLDivElement, CheckboxGroupProps>(
|
|
136
136
|
({ className, orientation = "vertical", spacing = "1rem", children, ...props }, ref) => {
|
|
137
137
|
return (
|
|
138
138
|
<div
|
|
@@ -151,7 +151,7 @@ const CheckboxGroup = React.forwardRef<HTMLDivElement, CheckboxGroupProps>(
|
|
|
151
151
|
);
|
|
152
152
|
}
|
|
153
153
|
);
|
|
154
|
-
|
|
154
|
+
MoonUICheckboxGroup.displayName = "CheckboxGroup";
|
|
155
155
|
|
|
156
156
|
// CheckboxLabel bileşeni
|
|
157
157
|
interface CheckboxLabelProps extends React.HTMLAttributes<HTMLLabelElement> {
|
|
@@ -173,7 +173,7 @@ interface CheckboxLabelProps extends React.HTMLAttributes<HTMLLabelElement> {
|
|
|
173
173
|
disabled?: boolean;
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
const
|
|
176
|
+
const MoonUICheckboxLabel = React.forwardRef<HTMLLabelElement, CheckboxLabelProps>(
|
|
177
177
|
({ className, htmlFor, children, position = "end", disabled = false, ...props }, ref) => {
|
|
178
178
|
return (
|
|
179
179
|
<label
|
|
@@ -192,7 +192,7 @@ const CheckboxLabel = React.forwardRef<HTMLLabelElement, CheckboxLabelProps>(
|
|
|
192
192
|
);
|
|
193
193
|
}
|
|
194
194
|
);
|
|
195
|
-
|
|
195
|
+
MoonUICheckboxLabel.displayName = "CheckboxLabel";
|
|
196
196
|
|
|
197
197
|
// Checkbox ve Label içeren bileşen
|
|
198
198
|
interface CheckboxWithLabelProps extends CheckboxProps {
|
|
@@ -210,7 +210,7 @@ interface CheckboxWithLabelProps extends CheckboxProps {
|
|
|
210
210
|
labelClassName?: string;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
const
|
|
213
|
+
const MoonUICheckboxWithLabel = React.forwardRef<
|
|
214
214
|
React.ElementRef<typeof CheckboxPrimitive.Root>,
|
|
215
215
|
CheckboxWithLabelProps
|
|
216
216
|
>(({
|
|
@@ -251,6 +251,9 @@ const CheckboxWithLabel = React.forwardRef<
|
|
|
251
251
|
</div>
|
|
252
252
|
);
|
|
253
253
|
});
|
|
254
|
-
|
|
254
|
+
MoonUICheckboxWithLabel.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
|