@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
|
@@ -6,7 +6,7 @@ import { cva, type VariantProps } from "class-variance-authority"
|
|
|
6
6
|
|
|
7
7
|
import { cn } from "../../lib/utils"
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const moonUISeparatorVariantsPro = cva(
|
|
10
10
|
"shrink-0 bg-border",
|
|
11
11
|
{
|
|
12
12
|
variants: {
|
|
@@ -104,11 +104,11 @@ const separatorVariants = cva(
|
|
|
104
104
|
}
|
|
105
105
|
)
|
|
106
106
|
|
|
107
|
-
export interface
|
|
107
|
+
export interface MoonUISeparatorProProps
|
|
108
108
|
extends React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>,
|
|
109
|
-
VariantProps<typeof
|
|
109
|
+
VariantProps<typeof moonUISeparatorVariantsPro> {}
|
|
110
110
|
|
|
111
|
-
const
|
|
111
|
+
const MoonUISeparatorPro = React.forwardRef<
|
|
112
112
|
React.ElementRef<typeof SeparatorPrimitive.Root>,
|
|
113
113
|
SeparatorProps
|
|
114
114
|
>(
|
|
@@ -135,6 +135,9 @@ const Separator = React.forwardRef<
|
|
|
135
135
|
/>
|
|
136
136
|
)
|
|
137
137
|
)
|
|
138
|
-
|
|
138
|
+
MoonUISeparator.displayName = SeparatorPrimitive.Root.displayName
|
|
139
139
|
|
|
140
|
-
export {
|
|
140
|
+
export { MoonUISeparatorPro, moonUISeparatorVariantsPro };
|
|
141
|
+
|
|
142
|
+
// Backward compatibility exports
|
|
143
|
+
export { MoonUISeparatorPro as Separator, moonUISeparatorVariantsPro as separatorVariants }
|
|
@@ -2,16 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
import { cn } from "../../lib/utils"
|
|
4
4
|
|
|
5
|
-
interface
|
|
5
|
+
interface MoonUISkeletonProProps extends React.HTMLAttributes<HTMLDivElement> {}
|
|
6
6
|
|
|
7
|
-
export function
|
|
7
|
+
export function MoonUISkeleton({
|
|
8
8
|
className,
|
|
9
9
|
...props
|
|
10
|
-
}:
|
|
10
|
+
}: MoonUISkeletonProProps) {
|
|
11
11
|
return (
|
|
12
12
|
<div
|
|
13
13
|
className={cn("animate-pulse rounded-md bg-muted", className)}
|
|
14
14
|
{...props}
|
|
15
15
|
/>
|
|
16
16
|
)
|
|
17
|
-
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Backward compatibility export
|
|
20
|
+
export { MoonUISkeleton as Skeleton }
|
|
@@ -12,7 +12,7 @@ import { cn } from "../../lib/utils"
|
|
|
12
12
|
* Used for value ranges like volume, brightness, price ranges.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const moonUISliderVariantsPro = cva(
|
|
16
16
|
"relative flex w-full touch-none select-none items-center",
|
|
17
17
|
{
|
|
18
18
|
variants: {
|
|
@@ -153,7 +153,7 @@ type SliderBaseProps = {
|
|
|
153
153
|
/**
|
|
154
154
|
* Slider size
|
|
155
155
|
*/
|
|
156
|
-
size?: VariantProps<typeof
|
|
156
|
+
size?: VariantProps<typeof moonUISliderVariantsPro>["size"];
|
|
157
157
|
/**
|
|
158
158
|
* Disabled state
|
|
159
159
|
*/
|
|
@@ -163,7 +163,7 @@ type SliderBaseProps = {
|
|
|
163
163
|
// Merge HTML properties without defaultValue conflicts
|
|
164
164
|
type SliderProps = SliderBaseProps & Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue'>
|
|
165
165
|
|
|
166
|
-
const
|
|
166
|
+
const MoonUISliderPro = React.forwardRef<
|
|
167
167
|
HTMLDivElement,
|
|
168
168
|
SliderProps
|
|
169
169
|
>(({
|
|
@@ -346,6 +346,9 @@ const Slider = React.forwardRef<
|
|
|
346
346
|
)
|
|
347
347
|
})
|
|
348
348
|
|
|
349
|
-
|
|
349
|
+
MoonUISliderPro.displayName = "MoonUISliderPro"
|
|
350
350
|
|
|
351
|
-
export {
|
|
351
|
+
export { MoonUISliderPro };
|
|
352
|
+
|
|
353
|
+
// Backward compatibility exports
|
|
354
|
+
export { MoonUISliderPro as Slider }
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { motion, useMotionValue, useSpring } from "framer-motion";
|
|
5
|
-
import { cn } from "
|
|
5
|
+
import { cn } from "../../lib/utils";
|
|
6
6
|
|
|
7
7
|
export interface SpotlightCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
8
|
children: React.ReactNode;
|
|
@@ -8,7 +8,7 @@ import { cn } from "../../lib/utils"
|
|
|
8
8
|
type SwitchSize = "sm" | "md" | "lg";
|
|
9
9
|
type SwitchVariant = "primary" | "success" | "warning" | "danger" | "secondary";
|
|
10
10
|
|
|
11
|
-
export interface
|
|
11
|
+
export interface MoonUISwitchProProps extends React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root> {
|
|
12
12
|
/** Switch boyutu */
|
|
13
13
|
size?: SwitchSize;
|
|
14
14
|
/** Switch renk varyantı */
|
|
@@ -23,7 +23,7 @@ export interface SwitchProps extends React.ComponentPropsWithoutRef<typeof Switc
|
|
|
23
23
|
description?: string;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
const
|
|
26
|
+
const MoonUISwitchPro = React.forwardRef<
|
|
27
27
|
React.ElementRef<typeof SwitchPrimitives.Root>,
|
|
28
28
|
SwitchProps
|
|
29
29
|
>(({ className, size = "md", variant = "primary", loading, leftIcon, rightIcon, description, ...props }, ref) => (
|
|
@@ -77,7 +77,10 @@ const Switch = React.forwardRef<
|
|
|
77
77
|
{description && <span className="text-sm text-muted-foreground">{description}</span>}
|
|
78
78
|
</div>
|
|
79
79
|
))
|
|
80
|
-
|
|
80
|
+
MoonUISwitch.displayName = SwitchPrimitives.Root.displayName
|
|
81
81
|
|
|
82
|
-
export {
|
|
82
|
+
export { MoonUISwitchPro };
|
|
83
|
+
|
|
84
|
+
// Backward compatibility exports
|
|
85
|
+
export { MoonUISwitchPro as Switch }
|
|
83
86
|
export type { SwitchSize, SwitchVariant }
|
|
@@ -7,12 +7,12 @@ import { cn } from "../../lib/utils";
|
|
|
7
7
|
/* -------------------------------------------------------------------------------------------------
|
|
8
8
|
* Tabs Root
|
|
9
9
|
* -----------------------------------------------------------------------------------------------*/
|
|
10
|
-
interface
|
|
10
|
+
interface MoonUITabsProProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root> {
|
|
11
11
|
/** Mobil görünümde dikey düzen için */
|
|
12
12
|
vertical?: boolean;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const MoonUITabsPro = React.forwardRef<
|
|
16
16
|
React.ElementRef<typeof TabsPrimitive.Root>,
|
|
17
17
|
TabsProps
|
|
18
18
|
>(({ vertical = false, ...props }, ref) => (
|
|
@@ -23,7 +23,7 @@ const Tabs = React.forwardRef<
|
|
|
23
23
|
/>
|
|
24
24
|
));
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
MoonUITabs.displayName = TabsPrimitive.Root.displayName;
|
|
27
27
|
|
|
28
28
|
/* -------------------------------------------------------------------------------------------------
|
|
29
29
|
* TabsList
|
|
@@ -55,14 +55,14 @@ const tabsListVariants = cva(
|
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
|
|
58
|
-
interface
|
|
58
|
+
interface MoonUITabsListProProps
|
|
59
59
|
extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>,
|
|
60
60
|
VariantProps<typeof tabsListVariants> {
|
|
61
61
|
/** Dikey düzende göster */
|
|
62
62
|
orientation?: "horizontal" | "vertical";
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
const
|
|
65
|
+
const MoonUITabsListPro = React.forwardRef<
|
|
66
66
|
React.ElementRef<typeof TabsPrimitive.List>,
|
|
67
67
|
TabsListProps
|
|
68
68
|
>(({ className, variant, orientation, fullWidth, ...props }, ref) => (
|
|
@@ -73,7 +73,7 @@ const TabsList = React.forwardRef<
|
|
|
73
73
|
/>
|
|
74
74
|
));
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
MoonUITabsList.displayName = TabsPrimitive.List.displayName;
|
|
77
77
|
|
|
78
78
|
/* -------------------------------------------------------------------------------------------------
|
|
79
79
|
* TabsTrigger
|
|
@@ -111,7 +111,7 @@ const tabsTriggerVariants = cva(
|
|
|
111
111
|
}
|
|
112
112
|
);
|
|
113
113
|
|
|
114
|
-
interface
|
|
114
|
+
interface MoonUITabsTriggerProProps
|
|
115
115
|
extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>,
|
|
116
116
|
VariantProps<typeof tabsTriggerVariants> {
|
|
117
117
|
/** İkon konumu */
|
|
@@ -126,7 +126,7 @@ interface TabsTriggerProps
|
|
|
126
126
|
orientation?: "horizontal" | "vertical";
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
const
|
|
129
|
+
const MoonUITabsTriggerPro = React.forwardRef<
|
|
130
130
|
React.ElementRef<typeof TabsPrimitive.Trigger>,
|
|
131
131
|
TabsTriggerProps
|
|
132
132
|
>(({
|
|
@@ -164,18 +164,18 @@ const TabsTrigger = React.forwardRef<
|
|
|
164
164
|
</TabsPrimitive.Trigger>
|
|
165
165
|
));
|
|
166
166
|
|
|
167
|
-
|
|
167
|
+
MoonUITabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
168
168
|
|
|
169
169
|
/* -------------------------------------------------------------------------------------------------
|
|
170
170
|
* TabsContent
|
|
171
171
|
* -----------------------------------------------------------------------------------------------*/
|
|
172
|
-
interface
|
|
172
|
+
interface MoonUITabsContentProProps
|
|
173
173
|
extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content> {
|
|
174
174
|
/** İçerik animasyonu */
|
|
175
175
|
animated?: boolean;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
const
|
|
178
|
+
const MoonUITabsContentPro = React.forwardRef<
|
|
179
179
|
React.ElementRef<typeof TabsPrimitive.Content>,
|
|
180
180
|
TabsContentProps
|
|
181
181
|
>(({ className, animated = false, ...props }, ref) => (
|
|
@@ -190,6 +190,9 @@ const TabsContent = React.forwardRef<
|
|
|
190
190
|
/>
|
|
191
191
|
));
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
MoonUITabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
194
194
|
|
|
195
|
-
export {
|
|
195
|
+
export { MoonUITabsPro, MoonUITabsListPro, MoonUITabsTriggerPro, MoonUITabsContentPro };
|
|
196
|
+
|
|
197
|
+
// Backward compatibility exports
|
|
198
|
+
export { MoonUITabsPro as Tabs, MoonUITabsListPro as TabsList, MoonUITabsTriggerPro as TabsTrigger, MoonUITabsContentPro as TabsContent };
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import React from "react"
|
|
4
4
|
import { cn } from "../../lib/utils"
|
|
5
5
|
|
|
6
|
-
export interface
|
|
6
|
+
export interface MoonUITextareaProProps
|
|
7
7
|
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const MoonUITextareaPro = React.forwardRef<HTMLTextAreaElement, MoonUITextareaProProps>(
|
|
10
10
|
({ className, ...props }, ref) => {
|
|
11
11
|
return (
|
|
12
12
|
<textarea
|
|
@@ -20,6 +20,9 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
|
|
20
20
|
)
|
|
21
21
|
}
|
|
22
22
|
)
|
|
23
|
-
|
|
23
|
+
MoonUITextareaPro.displayName = "MoonUITextareaPro"
|
|
24
24
|
|
|
25
|
-
export {
|
|
25
|
+
export { MoonUITextareaPro };
|
|
26
|
+
|
|
27
|
+
// Backward compatibility exports
|
|
28
|
+
export { MoonUITextareaPro as Textarea }
|
|
@@ -8,7 +8,7 @@ import { cn } from "../../lib/utils";
|
|
|
8
8
|
|
|
9
9
|
const ToastProvider = ToastPrimitives.Provider;
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const MoonUIToastViewport = React.forwardRef<
|
|
12
12
|
React.ElementRef<typeof ToastPrimitives.Viewport>,
|
|
13
13
|
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>
|
|
14
14
|
>(({ className, ...props }, ref) => (
|
|
@@ -21,9 +21,9 @@ const ToastViewport = React.forwardRef<
|
|
|
21
21
|
{...props}
|
|
22
22
|
/>
|
|
23
23
|
));
|
|
24
|
-
|
|
24
|
+
MoonUIToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
25
25
|
|
|
26
|
-
const
|
|
26
|
+
const moonUIToastVariantsPro = cva(
|
|
27
27
|
"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-8 shadow-sm transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
28
28
|
{
|
|
29
29
|
variants: {
|
|
@@ -46,11 +46,11 @@ const toastVariants = cva(
|
|
|
46
46
|
);
|
|
47
47
|
|
|
48
48
|
type ToastProps = React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &
|
|
49
|
-
VariantProps<typeof
|
|
49
|
+
VariantProps<typeof moonUIToastVariantsPro>;
|
|
50
50
|
|
|
51
51
|
type ToastActionElement = React.ReactElement<typeof ToastAction>;
|
|
52
52
|
|
|
53
|
-
const
|
|
53
|
+
const MoonUIToastPro = React.forwardRef<
|
|
54
54
|
React.ElementRef<typeof ToastPrimitives.Root>,
|
|
55
55
|
ToastProps
|
|
56
56
|
>(({ className, variant, ...props }, ref) => {
|
|
@@ -62,9 +62,9 @@ const Toast = React.forwardRef<
|
|
|
62
62
|
/>
|
|
63
63
|
);
|
|
64
64
|
});
|
|
65
|
-
|
|
65
|
+
MoonUIToast.displayName = ToastPrimitives.Root.displayName;
|
|
66
66
|
|
|
67
|
-
const
|
|
67
|
+
const MoonUIToastAction = React.forwardRef<
|
|
68
68
|
React.ElementRef<typeof ToastPrimitives.Action>,
|
|
69
69
|
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>
|
|
70
70
|
>(({ className, ...props }, ref) => (
|
|
@@ -77,9 +77,9 @@ const ToastAction = React.forwardRef<
|
|
|
77
77
|
{...props}
|
|
78
78
|
/>
|
|
79
79
|
));
|
|
80
|
-
|
|
80
|
+
MoonUIToastAction.displayName = ToastPrimitives.Action.displayName;
|
|
81
81
|
|
|
82
|
-
const
|
|
82
|
+
const MoonUIToastClose = React.forwardRef<
|
|
83
83
|
React.ElementRef<typeof ToastPrimitives.Close>,
|
|
84
84
|
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>
|
|
85
85
|
>(({ className, ...props }, ref) => (
|
|
@@ -95,9 +95,9 @@ const ToastClose = React.forwardRef<
|
|
|
95
95
|
<X className="h-4 w-4" />
|
|
96
96
|
</ToastPrimitives.Close>
|
|
97
97
|
));
|
|
98
|
-
|
|
98
|
+
MoonUIToastClose.displayName = ToastPrimitives.Close.displayName;
|
|
99
99
|
|
|
100
|
-
const
|
|
100
|
+
const MoonUIToastTitle = React.forwardRef<
|
|
101
101
|
React.ElementRef<typeof ToastPrimitives.Title>,
|
|
102
102
|
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>
|
|
103
103
|
>(({ className, ...props }, ref) => (
|
|
@@ -107,9 +107,9 @@ const ToastTitle = React.forwardRef<
|
|
|
107
107
|
{...props}
|
|
108
108
|
/>
|
|
109
109
|
));
|
|
110
|
-
|
|
110
|
+
MoonUIToastTitle.displayName = ToastPrimitives.Title.displayName;
|
|
111
111
|
|
|
112
|
-
const
|
|
112
|
+
const MoonUIToastDescription = React.forwardRef<
|
|
113
113
|
React.ElementRef<typeof ToastPrimitives.Description>,
|
|
114
114
|
React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>
|
|
115
115
|
>(({ className, ...props }, ref) => (
|
|
@@ -119,7 +119,7 @@ const ToastDescription = React.forwardRef<
|
|
|
119
119
|
{...props}
|
|
120
120
|
/>
|
|
121
121
|
));
|
|
122
|
-
|
|
122
|
+
MoonUIToastDescription.displayName = ToastPrimitives.Description.displayName;
|
|
123
123
|
|
|
124
124
|
type ToastData = {
|
|
125
125
|
id: string;
|
|
@@ -297,12 +297,11 @@ function Toaster() {
|
|
|
297
297
|
);
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
export {
|
|
301
|
-
type ToastProps,
|
|
300
|
+
export { type ToastProps,
|
|
302
301
|
type ToastActionElement,
|
|
303
302
|
ToastProvider,
|
|
304
303
|
ToastViewport,
|
|
305
|
-
|
|
304
|
+
MoonUIToastPro,
|
|
306
305
|
ToastTitle,
|
|
307
306
|
ToastDescription,
|
|
308
307
|
ToastAction,
|
|
@@ -310,4 +309,7 @@ export {
|
|
|
310
309
|
Toaster,
|
|
311
310
|
toast,
|
|
312
311
|
useToast,
|
|
313
|
-
};
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
// Backward compatibility exports
|
|
315
|
+
export { MoonUIToastPro as Toast };
|
|
@@ -6,7 +6,7 @@ import { cva, type VariantProps } from "class-variance-authority"
|
|
|
6
6
|
|
|
7
7
|
import { cn } from "../../lib/utils"
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const MoonUITooltipProviderPro = TooltipPrimitive.Provider
|
|
10
10
|
|
|
11
11
|
const tooltipVariants = cva(
|
|
12
12
|
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
@@ -33,11 +33,11 @@ const tooltipVariants = cva(
|
|
|
33
33
|
}
|
|
34
34
|
)
|
|
35
35
|
|
|
36
|
-
const
|
|
36
|
+
const MoonUITooltipPro = TooltipPrimitive.Root
|
|
37
37
|
|
|
38
|
-
const
|
|
38
|
+
const MoonUITooltipTriggerPro = TooltipPrimitive.Trigger
|
|
39
39
|
|
|
40
|
-
const
|
|
40
|
+
const MoonUITooltipArrow = React.forwardRef<
|
|
41
41
|
React.ElementRef<typeof TooltipPrimitive.Arrow>,
|
|
42
42
|
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow>
|
|
43
43
|
>(({ className, ...props }, ref) => (
|
|
@@ -47,15 +47,15 @@ const TooltipArrow = React.forwardRef<
|
|
|
47
47
|
{...props}
|
|
48
48
|
/>
|
|
49
49
|
))
|
|
50
|
-
|
|
50
|
+
MoonUITooltipArrow.displayName = TooltipPrimitive.Arrow.displayName
|
|
51
51
|
|
|
52
|
-
export interface
|
|
52
|
+
export interface MoonUITooltipContentProProps
|
|
53
53
|
extends React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>,
|
|
54
54
|
VariantProps<typeof tooltipVariants> {
|
|
55
55
|
showArrow?: boolean
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
const
|
|
58
|
+
const MoonUITooltipContentPro = React.forwardRef<
|
|
59
59
|
React.ElementRef<typeof TooltipPrimitive.Content>,
|
|
60
60
|
TooltipContentProps
|
|
61
61
|
>(({ className, variant, size, showArrow = false, sideOffset = 4, ...props }, ref) => (
|
|
@@ -69,7 +69,7 @@ const TooltipContent = React.forwardRef<
|
|
|
69
69
|
{showArrow && <TooltipArrow />}
|
|
70
70
|
</TooltipPrimitive.Content>
|
|
71
71
|
))
|
|
72
|
-
|
|
72
|
+
MoonUITooltipContent.displayName = TooltipPrimitive.Content.displayName
|
|
73
73
|
|
|
74
74
|
// Simplified Tooltip component for easy usage
|
|
75
75
|
interface SimpleTooltipProps {
|
|
@@ -89,7 +89,7 @@ interface SimpleTooltipProps {
|
|
|
89
89
|
onOpenChange?: (open: boolean) => void
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
const
|
|
92
|
+
const MoonUISimpleTooltip = React.forwardRef<
|
|
93
93
|
React.ElementRef<typeof TooltipPrimitive.Content>,
|
|
94
94
|
SimpleTooltipProps
|
|
95
95
|
>(
|
|
@@ -139,14 +139,16 @@ const SimpleTooltip = React.forwardRef<
|
|
|
139
139
|
)
|
|
140
140
|
}
|
|
141
141
|
)
|
|
142
|
-
|
|
142
|
+
MoonUISimpleTooltip.displayName = "SimpleTooltip"
|
|
143
143
|
|
|
144
|
-
export {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
TooltipContent,
|
|
144
|
+
export { MoonUITooltipPro,
|
|
145
|
+
MoonUITooltipProviderPro,
|
|
146
|
+
MoonUITooltipTriggerPro,
|
|
147
|
+
MoonUITooltipContentPro,
|
|
149
148
|
TooltipArrow,
|
|
150
149
|
SimpleTooltip,
|
|
151
150
|
tooltipVariants,
|
|
152
|
-
}
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
// Backward compatibility exports
|
|
154
|
+
export { MoonUITooltipPro as Tooltip, MoonUITooltipTriggerPro as TooltipTrigger, MoonUITooltipContentPro as TooltipContent, MoonUITooltipProviderPro as TooltipProvider }
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
|
|
4
|
+
// Performance profiler implementation
|
|
5
|
+
const performanceProfiler = {
|
|
6
|
+
getPerformanceSummary: () => ({}),
|
|
7
|
+
getMeasurements: (type: string) => [] as any[],
|
|
8
|
+
measureComponent: (name: string, callback: () => void) => {
|
|
9
|
+
const start = performance.now();
|
|
10
|
+
callback();
|
|
11
|
+
const duration = performance.now() - start;
|
|
12
|
+
return { name, duration };
|
|
13
|
+
}
|
|
14
|
+
};
|
|
5
15
|
|
|
6
16
|
// Performance optimization hooks
|
|
7
17
|
export function usePerformanceOptimizer() {
|