@moontra/moonui-pro 2.20.0 → 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 +7419 -4935
- 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 +13 -13
- 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
package/src/components/index.ts
CHANGED
|
@@ -30,9 +30,8 @@ export * from "./spotlight-card"
|
|
|
30
30
|
|
|
31
31
|
// Calendar component (Advanced version with events)
|
|
32
32
|
export { Calendar as AdvancedCalendar } from "./calendar"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export * from "./calendar-pro"
|
|
33
|
+
export { Calendar as CalendarPro } from "./calendar"
|
|
34
|
+
export type { CalendarEvent } from "./calendar"
|
|
36
35
|
|
|
37
36
|
// Kanban
|
|
38
37
|
export { Kanban } from "./kanban"
|
|
@@ -94,6 +93,9 @@ export * from "./data-table"
|
|
|
94
93
|
// Sidebar
|
|
95
94
|
export * from "./sidebar"
|
|
96
95
|
|
|
96
|
+
// Navbar
|
|
97
|
+
export * from "./navbar"
|
|
98
|
+
|
|
97
99
|
// Form Wizard
|
|
98
100
|
export * from "./form-wizard"
|
|
99
101
|
|
|
@@ -380,12 +380,14 @@ const KanbanCardComponent = ({
|
|
|
380
380
|
|
|
381
381
|
{/* Progress bar */}
|
|
382
382
|
{cardShowProgress && (card.progress !== undefined || card.checklist) && (
|
|
383
|
-
<div className="mb-3">
|
|
383
|
+
<div className="mb-3 px-2">
|
|
384
384
|
<div className="flex justify-between text-xs text-muted-foreground mb-1">
|
|
385
385
|
<span>Progress</span>
|
|
386
386
|
<span>{Math.round(card.progress || checklistProgress)}%</span>
|
|
387
387
|
</div>
|
|
388
|
-
<
|
|
388
|
+
<div className="flex items-center">
|
|
389
|
+
<Progress value={card.progress || checklistProgress} className="h-1.5 w-full" />
|
|
390
|
+
</div>
|
|
389
391
|
</div>
|
|
390
392
|
)}
|
|
391
393
|
|
|
@@ -1044,7 +1046,7 @@ export function Kanban({
|
|
|
1044
1046
|
<div className={cn("w-full", className)}>
|
|
1045
1047
|
{/* Header with search and filters */}
|
|
1046
1048
|
{(showSearch || showFilters) && (
|
|
1047
|
-
<div className="mb-6 space-y-4">
|
|
1049
|
+
<div className="mb-6 p-4 bg-muted/30 rounded-lg space-y-4">
|
|
1048
1050
|
<div className="flex items-center justify-between gap-4">
|
|
1049
1051
|
{/* Search */}
|
|
1050
1052
|
{showSearch && (
|
|
@@ -1055,13 +1057,13 @@ export function Kanban({
|
|
|
1055
1057
|
placeholder="Search cards..."
|
|
1056
1058
|
value={searchQuery}
|
|
1057
1059
|
onChange={(e) => setSearchQuery(e.target.value)}
|
|
1058
|
-
className="pl-9"
|
|
1060
|
+
className="pl-9 bg-background"
|
|
1059
1061
|
/>
|
|
1060
1062
|
</div>
|
|
1061
1063
|
)}
|
|
1062
1064
|
|
|
1063
1065
|
{/* Actions */}
|
|
1064
|
-
<div className="flex items-center gap-2">
|
|
1066
|
+
<div className="flex items-center gap-2 flex-shrink-0">
|
|
1065
1067
|
{/* Filters */}
|
|
1066
1068
|
{showFilters && filters.length > 0 && (
|
|
1067
1069
|
<DropdownMenu>
|
|
@@ -1168,14 +1170,15 @@ export function Kanban({
|
|
|
1168
1170
|
)}
|
|
1169
1171
|
|
|
1170
1172
|
{/* Kanban board */}
|
|
1171
|
-
<div
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1173
|
+
<div className="w-full overflow-x-auto py-6">
|
|
1174
|
+
<div
|
|
1175
|
+
ref={scrollRef}
|
|
1176
|
+
className="flex min-w-fit mx-auto px-4"
|
|
1177
|
+
style={{ gap: `${columnGap}px` }}
|
|
1178
|
+
onDragOver={(e) => e.preventDefault()}
|
|
1179
|
+
>
|
|
1180
|
+
<AnimatePresence mode="sync">
|
|
1181
|
+
{filteredColumns.map((column) => {
|
|
1179
1182
|
const isOverLimit = column.limit && column.cards.length >= column.limit
|
|
1180
1183
|
const isDraggedOver = draggedOverColumn === column.id
|
|
1181
1184
|
|
|
@@ -1191,8 +1194,9 @@ export function Kanban({
|
|
|
1191
1194
|
isDraggedOver && "scale-105"
|
|
1192
1195
|
)}
|
|
1193
1196
|
style={{
|
|
1194
|
-
width: columnWidth === 'auto' ? 'auto' : (columnWidth ||
|
|
1195
|
-
minWidth: columnWidth === 'auto' ? '
|
|
1197
|
+
width: columnWidth === 'auto' ? 'auto' : (columnWidth || 360) + 'px',
|
|
1198
|
+
minWidth: columnWidth === 'auto' ? '320px' : undefined,
|
|
1199
|
+
flexShrink: 0,
|
|
1196
1200
|
transitionDuration: enableAnimations ? `${animationDuration}s` : '0s'
|
|
1197
1201
|
}}
|
|
1198
1202
|
onDragOver={(e) => handleDragOver(e, column.id)}
|
|
@@ -1467,10 +1471,10 @@ export function Kanban({
|
|
|
1467
1471
|
</motion.div>
|
|
1468
1472
|
)
|
|
1469
1473
|
})}
|
|
1470
|
-
|
|
1474
|
+
</AnimatePresence>
|
|
1471
1475
|
|
|
1472
|
-
|
|
1473
|
-
|
|
1476
|
+
{/* Add column */}
|
|
1477
|
+
{showAddColumn && onAddColumn && (
|
|
1474
1478
|
<motion.div
|
|
1475
1479
|
initial={{ opacity: 0 }}
|
|
1476
1480
|
animate={{ opacity: 1 }}
|
|
@@ -1569,6 +1573,7 @@ export function Kanban({
|
|
|
1569
1573
|
)}
|
|
1570
1574
|
</motion.div>
|
|
1571
1575
|
)}
|
|
1576
|
+
</div>
|
|
1572
1577
|
</div>
|
|
1573
1578
|
|
|
1574
1579
|
{/* Modals */}
|
|
@@ -3,12 +3,51 @@
|
|
|
3
3
|
import React, { useRef, useState } from "react"
|
|
4
4
|
import { motion, useMotionValue, useSpring, useTransform } from "framer-motion"
|
|
5
5
|
import { cn } from "../../lib/utils"
|
|
6
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
6
7
|
import { Card, CardContent } from "../ui/card"
|
|
7
8
|
import { Button } from "../ui/button"
|
|
8
9
|
import { Lock, Sparkles } from "lucide-react"
|
|
9
10
|
import { useSubscription } from "../../hooks/use-subscription"
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
const magneticButtonVariants = cva(
|
|
13
|
+
"relative inline-flex items-center justify-center whitespace-nowrap text-sm font-medium 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",
|
|
14
|
+
{
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
18
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
19
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
20
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
21
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
22
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
23
|
+
gradient: "bg-gradient-to-r from-purple-600 to-pink-600 text-white shadow-lg hover:from-purple-700 hover:to-pink-700",
|
|
24
|
+
},
|
|
25
|
+
size: {
|
|
26
|
+
default: "h-10 px-4 py-2",
|
|
27
|
+
sm: "h-9 px-3",
|
|
28
|
+
lg: "h-11 px-8",
|
|
29
|
+
icon: "h-10 w-10",
|
|
30
|
+
},
|
|
31
|
+
radius: {
|
|
32
|
+
none: "rounded-none",
|
|
33
|
+
sm: "rounded-sm",
|
|
34
|
+
md: "rounded-md",
|
|
35
|
+
lg: "rounded-lg",
|
|
36
|
+
xl: "rounded-xl",
|
|
37
|
+
full: "rounded-full",
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
defaultVariants: {
|
|
41
|
+
variant: "default",
|
|
42
|
+
size: "default",
|
|
43
|
+
radius: "md",
|
|
44
|
+
},
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
export interface MagneticButtonProps
|
|
49
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
50
|
+
VariantProps<typeof magneticButtonVariants> {
|
|
12
51
|
strength?: number
|
|
13
52
|
range?: number
|
|
14
53
|
springConfig?: {
|
|
@@ -20,7 +59,10 @@ export interface MagneticButtonProps extends React.ButtonHTMLAttributes<HTMLButt
|
|
|
20
59
|
const MagneticButtonInternal = React.forwardRef<HTMLButtonElement, MagneticButtonProps>(
|
|
21
60
|
({
|
|
22
61
|
children,
|
|
23
|
-
className,
|
|
62
|
+
className,
|
|
63
|
+
variant,
|
|
64
|
+
size,
|
|
65
|
+
radius,
|
|
24
66
|
strength = 0.3,
|
|
25
67
|
range = 100,
|
|
26
68
|
springConfig = { stiffness: 200, damping: 15 },
|
|
@@ -77,9 +119,7 @@ const MagneticButtonInternal = React.forwardRef<HTMLButtonElement, MagneticButto
|
|
|
77
119
|
}
|
|
78
120
|
}}
|
|
79
121
|
className={cn(
|
|
80
|
-
|
|
81
|
-
"bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
82
|
-
"h-9 px-4 py-2",
|
|
122
|
+
magneticButtonVariants({ variant, size, radius }),
|
|
83
123
|
className
|
|
84
124
|
)}
|
|
85
125
|
onMouseMove={handleMouseMove}
|
|
@@ -101,7 +141,7 @@ const MagneticButtonInternal = React.forwardRef<HTMLButtonElement, MagneticButto
|
|
|
101
141
|
transition={{ duration: 0.3 }}
|
|
102
142
|
>
|
|
103
143
|
<motion.div
|
|
104
|
-
className="relative z-10"
|
|
144
|
+
className="relative z-10 flex items-center justify-center"
|
|
105
145
|
animate={{
|
|
106
146
|
scale: isHovered ? 1.02 : 1,
|
|
107
147
|
}}
|
|
@@ -112,7 +152,16 @@ const MagneticButtonInternal = React.forwardRef<HTMLButtonElement, MagneticButto
|
|
|
112
152
|
|
|
113
153
|
{/* Glow effect */}
|
|
114
154
|
<motion.div
|
|
115
|
-
className=
|
|
155
|
+
className={cn(
|
|
156
|
+
"absolute inset-0 bg-primary/20 blur-md",
|
|
157
|
+
radius === "none" && "rounded-none",
|
|
158
|
+
radius === "sm" && "rounded-sm",
|
|
159
|
+
radius === "md" && "rounded-md",
|
|
160
|
+
radius === "lg" && "rounded-lg",
|
|
161
|
+
radius === "xl" && "rounded-xl",
|
|
162
|
+
radius === "full" && "rounded-full",
|
|
163
|
+
!radius && "rounded-md"
|
|
164
|
+
)}
|
|
116
165
|
animate={{
|
|
117
166
|
opacity: isHovered ? 0.8 : 0,
|
|
118
167
|
scale: isHovered ? 1.1 : 1,
|