@moontra/moonui-pro 2.20.1 → 2.20.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.d.ts +691 -261
- package/dist/index.mjs +7418 -4934
- package/package.json +4 -3
- package/scripts/postbuild.js +27 -0
- package/src/components/advanced-chart/index.tsx +5 -1
- package/src/components/advanced-forms/index.tsx +175 -16
- package/src/components/calendar/event-dialog.tsx +18 -13
- package/src/components/calendar/index.tsx +197 -50
- package/src/components/dashboard/dashboard-grid.tsx +21 -3
- package/src/components/dashboard/types.ts +3 -0
- package/src/components/dashboard/widgets/activity-feed.tsx +6 -1
- package/src/components/dashboard/widgets/comparison-widget.tsx +177 -0
- package/src/components/dashboard/widgets/index.ts +5 -0
- package/src/components/dashboard/widgets/metric-card.tsx +21 -1
- package/src/components/dashboard/widgets/progress-widget.tsx +113 -0
- package/src/components/error-boundary/index.tsx +160 -37
- package/src/components/form-wizard/form-wizard-context.tsx +54 -26
- package/src/components/form-wizard/form-wizard-progress.tsx +33 -2
- package/src/components/form-wizard/types.ts +2 -1
- package/src/components/github-stars/hooks.ts +1 -0
- package/src/components/github-stars/variants.tsx +3 -1
- package/src/components/health-check/index.tsx +14 -14
- package/src/components/hover-card-3d/index.tsx +2 -3
- package/src/components/index.ts +5 -3
- package/src/components/kanban/kanban.tsx +23 -18
- package/src/components/license-error/index.tsx +2 -0
- package/src/components/magnetic-button/index.tsx +56 -7
- package/src/components/memory-efficient-data/index.tsx +117 -115
- package/src/components/navbar/index.tsx +781 -0
- package/src/components/performance-debugger/index.tsx +62 -38
- package/src/components/performance-monitor/index.tsx +47 -33
- package/src/components/phone-number-input/index.tsx +32 -27
- package/src/components/phone-number-input/phone-number-input-simple.tsx +167 -0
- package/src/components/rich-text-editor/index.tsx +26 -28
- package/src/components/rich-text-editor/slash-commands-extension.ts +15 -5
- package/src/components/sidebar/index.tsx +32 -13
- package/src/components/timeline/index.tsx +84 -49
- package/src/components/ui/accordion.tsx +550 -42
- package/src/components/ui/avatar.tsx +2 -0
- package/src/components/ui/badge.tsx +2 -0
- package/src/components/ui/breadcrumb.tsx +2 -0
- package/src/components/ui/button.tsx +39 -33
- package/src/components/ui/card.tsx +2 -0
- package/src/components/ui/collapsible.tsx +546 -50
- package/src/components/ui/command.tsx +790 -67
- package/src/components/ui/dialog.tsx +510 -92
- package/src/components/ui/dropdown-menu.tsx +540 -52
- package/src/components/ui/index.ts +37 -5
- package/src/components/ui/input.tsx +2 -0
- package/src/components/ui/magnetic-button.tsx +1 -1
- package/src/components/ui/media-gallery.tsx +1 -2
- package/src/components/ui/navigation-menu.tsx +130 -0
- package/src/components/ui/pagination.tsx +2 -0
- package/src/components/ui/select.tsx +6 -2
- package/src/components/ui/spotlight-card.tsx +1 -1
- package/src/components/ui/table.tsx +2 -0
- package/src/components/ui/tabs-pro.tsx +542 -0
- package/src/components/ui/tabs.tsx +23 -167
- package/src/components/ui/toggle.tsx +12 -12
- package/src/index.ts +11 -3
- package/src/styles/index.css +596 -0
- package/src/use-performance-optimizer.ts +1 -1
- package/src/utils/chart-helpers.ts +1 -1
- package/src/__tests__/use-intersection-observer.test.tsx +0 -216
- package/src/__tests__/use-local-storage.test.tsx +0 -174
- package/src/__tests__/use-pro-access.test.tsx +0 -183
- package/src/components/advanced-chart/advanced-chart.test.tsx +0 -281
- package/src/components/data-table/data-table.test.tsx +0 -187
- package/src/components/enhanced/badge.tsx +0 -191
- package/src/components/enhanced/button.tsx +0 -362
- package/src/components/enhanced/card.tsx +0 -266
- package/src/components/enhanced/dialog.tsx +0 -246
- package/src/components/enhanced/index.ts +0 -4
- package/src/components/file-upload/file-upload.test.tsx +0 -243
- package/src/components/rich-text-editor/index-old-backup.tsx +0 -437
- package/src/types/moonui.d.ts +0 -22
|
@@ -1,198 +1,54 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
1
3
|
import * as React from "react";
|
|
2
4
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
|
-
import { cva, type VariantProps } from "class-variance-authority";
|
|
4
|
-
|
|
5
5
|
import { cn } from "../../lib/utils";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
* Tabs Root
|
|
9
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
10
|
-
interface MoonUITabsProProps extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root> {
|
|
11
|
-
/** Mobil görünümde dikey düzen için */
|
|
12
|
-
vertical?: boolean;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const MoonUITabsPro = React.forwardRef<
|
|
16
|
-
React.ElementRef<typeof TabsPrimitive.Root>,
|
|
17
|
-
MoonUITabsProProps
|
|
18
|
-
>(({ vertical = false, ...props }, ref) => (
|
|
19
|
-
<TabsPrimitive.Root
|
|
20
|
-
ref={ref}
|
|
21
|
-
orientation={vertical ? "vertical" : "horizontal"}
|
|
22
|
-
{...props}
|
|
23
|
-
/>
|
|
24
|
-
));
|
|
25
|
-
|
|
26
|
-
MoonUITabsPro.displayName = TabsPrimitive.Root.displayName;
|
|
27
|
-
|
|
28
|
-
/* -------------------------------------------------------------------------------------------------
|
|
29
|
-
* TabsList
|
|
30
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
31
|
-
const tabsListVariants = cva(
|
|
32
|
-
"flex items-center justify-start transition-all duration-200",
|
|
33
|
-
{
|
|
34
|
-
variants: {
|
|
35
|
-
variant: {
|
|
36
|
-
default: "bg-muted rounded-md p-1 text-muted-foreground dark:bg-gray-800/80 dark:text-gray-400",
|
|
37
|
-
pills: "bg-transparent gap-2 p-0 dark:text-gray-400",
|
|
38
|
-
underline: "bg-transparent border-b border-border dark:border-gray-700 gap-4 dark:text-gray-400",
|
|
39
|
-
cards: "bg-transparent gap-2 p-0 dark:text-gray-400",
|
|
40
|
-
minimal: "bg-transparent gap-1 p-0 dark:text-gray-400",
|
|
41
|
-
},
|
|
42
|
-
orientation: {
|
|
43
|
-
horizontal: "flex-row",
|
|
44
|
-
vertical: "flex-col items-start gap-1"
|
|
45
|
-
},
|
|
46
|
-
fullWidth: {
|
|
47
|
-
true: "w-full"
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
defaultVariants: {
|
|
51
|
-
variant: "default",
|
|
52
|
-
orientation: "horizontal",
|
|
53
|
-
fullWidth: false
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
);
|
|
7
|
+
const Tabs = TabsPrimitive.Root;
|
|
57
8
|
|
|
58
|
-
|
|
59
|
-
extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>,
|
|
60
|
-
VariantProps<typeof tabsListVariants> {
|
|
61
|
-
/** Dikey düzende göster */
|
|
62
|
-
orientation?: "horizontal" | "vertical";
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const MoonUITabsListPro = React.forwardRef<
|
|
9
|
+
const TabsList = React.forwardRef<
|
|
66
10
|
React.ElementRef<typeof TabsPrimitive.List>,
|
|
67
|
-
|
|
68
|
-
>(({ className,
|
|
11
|
+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>
|
|
12
|
+
>(({ className, ...props }, ref) => (
|
|
69
13
|
<TabsPrimitive.List
|
|
70
14
|
ref={ref}
|
|
71
|
-
className={cn(
|
|
15
|
+
className={cn(
|
|
16
|
+
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
72
19
|
{...props}
|
|
73
20
|
/>
|
|
74
21
|
));
|
|
22
|
+
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
75
23
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
/* -------------------------------------------------------------------------------------------------
|
|
79
|
-
* TabsTrigger
|
|
80
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
81
|
-
const tabsTriggerVariants = cva(
|
|
82
|
-
"inline-flex items-center justify-center whitespace-nowrap font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
83
|
-
{
|
|
84
|
-
variants: {
|
|
85
|
-
variant: {
|
|
86
|
-
default: "rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/10",
|
|
87
|
-
underline: "rounded-none border-b-2 border-transparent pb-2 data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground dark:data-[state=active]:border-primary/80 dark:data-[state=active]:text-gray-100",
|
|
88
|
-
pills: "rounded-full bg-muted hover:bg-muted/80 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground dark:bg-gray-800 dark:hover:bg-gray-700 dark:data-[state=active]:bg-primary/90 dark:data-[state=active]:text-white",
|
|
89
|
-
cards: "rounded-md bg-muted/50 hover:bg-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-md dark:bg-gray-800/50 dark:hover:bg-gray-700/50 dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/20",
|
|
90
|
-
minimal: "rounded-sm bg-transparent hover:bg-muted/30 data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:underline data-[state=active]:underline-offset-4 dark:hover:bg-gray-800/30 dark:data-[state=active]:text-gray-200",
|
|
91
|
-
},
|
|
92
|
-
size: {
|
|
93
|
-
sm: "h-7 px-2 text-xs",
|
|
94
|
-
md: "h-9 px-3 py-1.5 text-sm",
|
|
95
|
-
lg: "h-10 px-4 py-2 text-base",
|
|
96
|
-
},
|
|
97
|
-
orientation: {
|
|
98
|
-
horizontal: "",
|
|
99
|
-
vertical: "justify-start w-full text-left"
|
|
100
|
-
},
|
|
101
|
-
fullWidth: {
|
|
102
|
-
true: "w-full"
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
defaultVariants: {
|
|
106
|
-
variant: "default",
|
|
107
|
-
size: "md",
|
|
108
|
-
orientation: "horizontal",
|
|
109
|
-
fullWidth: false
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
interface MoonUITabsTriggerProProps
|
|
115
|
-
extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>,
|
|
116
|
-
VariantProps<typeof tabsTriggerVariants> {
|
|
117
|
-
/** İkon konumu */
|
|
118
|
-
iconPosition?: "left" | "right" | "none";
|
|
119
|
-
/** İkon */
|
|
120
|
-
icon?: React.ReactNode;
|
|
121
|
-
/** Badge içeriği */
|
|
122
|
-
badge?: React.ReactNode;
|
|
123
|
-
/** Aktif olmayan durumda yarı saydam */
|
|
124
|
-
fadeTabs?: boolean;
|
|
125
|
-
/** Dikey düzende göster */
|
|
126
|
-
orientation?: "horizontal" | "vertical";
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
const MoonUITabsTriggerPro = React.forwardRef<
|
|
24
|
+
const TabsTrigger = React.forwardRef<
|
|
130
25
|
React.ElementRef<typeof TabsPrimitive.Trigger>,
|
|
131
|
-
|
|
132
|
-
>(({
|
|
133
|
-
className,
|
|
134
|
-
variant,
|
|
135
|
-
size,
|
|
136
|
-
icon,
|
|
137
|
-
iconPosition = "left",
|
|
138
|
-
badge,
|
|
139
|
-
fadeTabs = false,
|
|
140
|
-
orientation,
|
|
141
|
-
fullWidth,
|
|
142
|
-
children,
|
|
143
|
-
...props
|
|
144
|
-
}, ref) => (
|
|
26
|
+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>
|
|
27
|
+
>(({ className, ...props }, ref) => (
|
|
145
28
|
<TabsPrimitive.Trigger
|
|
146
29
|
ref={ref}
|
|
147
30
|
className={cn(
|
|
148
|
-
|
|
149
|
-
fadeTabs && "data-[state=inactive]:opacity-60",
|
|
31
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
150
32
|
className
|
|
151
33
|
)}
|
|
152
34
|
{...props}
|
|
153
|
-
|
|
154
|
-
{icon && iconPosition === "left" && (
|
|
155
|
-
<span className="mr-2">{icon}</span>
|
|
156
|
-
)}
|
|
157
|
-
{children}
|
|
158
|
-
{icon && iconPosition === "right" && (
|
|
159
|
-
<span className="ml-2">{icon}</span>
|
|
160
|
-
)}
|
|
161
|
-
{badge && (
|
|
162
|
-
<span className="ml-2">{badge}</span>
|
|
163
|
-
)}
|
|
164
|
-
</TabsPrimitive.Trigger>
|
|
35
|
+
/>
|
|
165
36
|
));
|
|
37
|
+
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
166
38
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
/* -------------------------------------------------------------------------------------------------
|
|
170
|
-
* TabsContent
|
|
171
|
-
* -----------------------------------------------------------------------------------------------*/
|
|
172
|
-
interface MoonUITabsContentProProps
|
|
173
|
-
extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content> {
|
|
174
|
-
/** İçerik animasyonu */
|
|
175
|
-
animated?: boolean;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
const MoonUITabsContentPro = React.forwardRef<
|
|
39
|
+
const TabsContent = React.forwardRef<
|
|
179
40
|
React.ElementRef<typeof TabsPrimitive.Content>,
|
|
180
|
-
|
|
181
|
-
>(({ className,
|
|
41
|
+
React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>
|
|
42
|
+
>(({ className, ...props }, ref) => (
|
|
182
43
|
<TabsPrimitive.Content
|
|
183
44
|
ref={ref}
|
|
184
45
|
className={cn(
|
|
185
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
186
|
-
animated && "data-[state=active]:animate-fadeIn data-[state=inactive]:animate-fadeOut",
|
|
46
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
187
47
|
className
|
|
188
48
|
)}
|
|
189
49
|
{...props}
|
|
190
50
|
/>
|
|
191
51
|
));
|
|
52
|
+
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
192
53
|
|
|
193
|
-
|
|
194
|
-
|
|
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 };
|
|
54
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent };
|
|
@@ -11,23 +11,23 @@ const MoonUItoggleVariantsPro = cva(
|
|
|
11
11
|
{
|
|
12
12
|
variants: {
|
|
13
13
|
variant: {
|
|
14
|
-
default: "
|
|
14
|
+
default: "moonui-toggle-default bg-transparent hover:bg-muted hover:text-muted-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
15
15
|
outline: "border border-input bg-transparent hover:bg-accent hover:text-accent-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:border-input dark:hover:bg-accent dark:hover:text-accent-foreground dark:data-[state=on]:bg-accent dark:data-[state=on]:text-accent-foreground",
|
|
16
16
|
ghost: "hover:bg-accent hover:text-accent-foreground data-[state=on]:bg-transparent data-[state=on]:text-accent-foreground dark:hover:bg-accent dark:hover:text-accent-foreground dark:data-[state=on]:text-accent-foreground",
|
|
17
17
|
primary: "bg-transparent hover:bg-primary/10 hover:text-primary data-[state=on]:bg-primary data-[state=on]:text-primary-foreground dark:hover:bg-primary/20 dark:hover:text-primary dark:data-[state=on]:bg-primary dark:data-[state=on]:text-primary-foreground",
|
|
18
|
-
secondary: "bg-transparent hover:bg-secondary/10 hover:text-secondary data-[state=on]:bg-secondary data-[state=on]:text-secondary-foreground
|
|
18
|
+
secondary: "moonui-toggle-secondary bg-transparent hover:bg-secondary/10 hover:text-secondary data-[state=on]:bg-secondary data-[state=on]:text-secondary-foreground",
|
|
19
19
|
success: "bg-transparent hover:bg-success/10 hover:text-success data-[state=on]:bg-success data-[state=on]:text-success-foreground dark:hover:bg-success/20 dark:hover:text-success dark:data-[state=on]:bg-success dark:data-[state=on]:text-success-foreground",
|
|
20
20
|
warning: "bg-transparent hover:bg-warning/10 hover:text-warning data-[state=on]:bg-warning data-[state=on]:text-warning-foreground dark:hover:bg-warning/20 dark:hover:text-warning dark:data-[state=on]:bg-warning dark:data-[state=on]:text-warning-foreground",
|
|
21
21
|
danger: "bg-transparent hover:bg-destructive/10 hover:text-destructive data-[state=on]:bg-destructive data-[state=on]:text-destructive-foreground dark:hover:bg-destructive/20 dark:hover:text-destructive dark:data-[state=on]:bg-destructive dark:data-[state=on]:text-destructive-foreground",
|
|
22
22
|
gradient: "bg-transparent hover:bg-gradient-to-r hover:from-purple-500/10 hover:to-pink-500/10 hover:text-purple-600 data-[state=on]:bg-gradient-to-r data-[state=on]:from-purple-600 data-[state=on]:to-pink-600 data-[state=on]:text-white dark:hover:from-purple-500/20 dark:hover:to-pink-500/20 dark:hover:text-purple-400 dark:data-[state=on]:from-purple-600 dark:data-[state=on]:to-pink-600 dark:data-[state=on]:text-white",
|
|
23
23
|
},
|
|
24
24
|
size: {
|
|
25
|
-
xs: "h-7 px-2 text-xs",
|
|
26
|
-
sm: "h-8 px-2.5 text-xs",
|
|
27
|
-
default: "h-9 px-3",
|
|
28
|
-
md: "h-10 px-4",
|
|
29
|
-
lg: "h-11 px-6",
|
|
30
|
-
xl: "h-12 px-8 text-base",
|
|
25
|
+
xs: "min-h-7 px-2 py-1 text-xs",
|
|
26
|
+
sm: "min-h-8 px-2.5 py-1.5 text-xs",
|
|
27
|
+
default: "min-h-9 px-3 py-2",
|
|
28
|
+
md: "min-h-10 px-4 py-2.5",
|
|
29
|
+
lg: "min-h-11 px-6 py-3",
|
|
30
|
+
xl: "min-h-12 px-8 py-3.5 text-base",
|
|
31
31
|
},
|
|
32
32
|
shape: {
|
|
33
33
|
default: "rounded-md",
|
|
@@ -76,14 +76,14 @@ const MoonUITogglePro = React.forwardRef<
|
|
|
76
76
|
{...props}
|
|
77
77
|
>
|
|
78
78
|
{loading ? (
|
|
79
|
-
<div className="flex items-center gap-2">
|
|
79
|
+
<div className="flex items-center justify-center gap-2">
|
|
80
80
|
<div className="h-3 w-3 animate-spin rounded-full border-2 border-current border-t-transparent" />
|
|
81
|
-
{children && <span>{children}</span>}
|
|
81
|
+
{children && <span className="text-center">{children}</span>}
|
|
82
82
|
</div>
|
|
83
83
|
) : (
|
|
84
|
-
<div className="flex items-center gap-2">
|
|
84
|
+
<div className="flex items-center justify-center gap-2">
|
|
85
85
|
{icon && iconPosition === "left" && <span className="flex-shrink-0">{icon}</span>}
|
|
86
|
-
{children && <span>{children}</span>}
|
|
86
|
+
{children && <span className="text-center">{children}</span>}
|
|
87
87
|
{icon && iconPosition === "right" && <span className="flex-shrink-0">{icon}</span>}
|
|
88
88
|
{badge !== undefined && (
|
|
89
89
|
<span className={cn(
|
package/src/index.ts
CHANGED
|
@@ -7,8 +7,16 @@ import "./styles/index.css";
|
|
|
7
7
|
// Utilities
|
|
8
8
|
export { cn } from "./lib/utils";
|
|
9
9
|
|
|
10
|
+
// AI Providers
|
|
11
|
+
export {
|
|
12
|
+
createAIProvider,
|
|
13
|
+
type AIProvider,
|
|
14
|
+
type AIProviderConfig,
|
|
15
|
+
type AIResponse,
|
|
16
|
+
OpenAIProvider,
|
|
17
|
+
ClaudeProvider,
|
|
18
|
+
GeminiProvider
|
|
19
|
+
} from "./lib/ai-providers";
|
|
20
|
+
|
|
10
21
|
// Pro Components (Commercial License) - from packages/moonui-pro
|
|
11
22
|
export * from "./components";
|
|
12
|
-
|
|
13
|
-
// Enhanced Components - Premium animations and effects
|
|
14
|
-
// export * from "./components/enhanced"
|