@moontra/moonui-pro 2.20.2 → 2.20.4
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/package.json +8 -3
- package/plugin/index.d.ts +86 -0
- package/plugin/index.js +308 -0
- package/scripts/postinstall.js +191 -23
- package/src/components/advanced-chart/index.tsx +0 -1246
- package/src/components/advanced-forms/index.tsx +0 -585
- package/src/components/animated-button/index.tsx +0 -385
- package/src/components/calendar/event-dialog.tsx +0 -377
- package/src/components/calendar/index.tsx +0 -1220
- package/src/components/calendar-pro/index.tsx +0 -1697
- package/src/components/color-picker/index.tsx +0 -432
- package/src/components/credit-card-input/index.tsx +0 -406
- package/src/components/dashboard/dashboard-grid.tsx +0 -480
- package/src/components/dashboard/demo.tsx +0 -425
- package/src/components/dashboard/index.tsx +0 -1046
- package/src/components/dashboard/time-range-picker.tsx +0 -336
- package/src/components/dashboard/types.ts +0 -225
- package/src/components/dashboard/widgets/activity-feed.tsx +0 -349
- package/src/components/dashboard/widgets/chart-widget.tsx +0 -418
- package/src/components/dashboard/widgets/comparison-widget.tsx +0 -177
- package/src/components/dashboard/widgets/index.ts +0 -5
- package/src/components/dashboard/widgets/metric-card.tsx +0 -363
- package/src/components/dashboard/widgets/progress-widget.tsx +0 -113
- package/src/components/data-table/data-table-bulk-actions.tsx +0 -204
- package/src/components/data-table/data-table-column-toggle.tsx +0 -169
- package/src/components/data-table/data-table-export.ts +0 -156
- package/src/components/data-table/data-table-filter-drawer.tsx +0 -448
- package/src/components/data-table/index.tsx +0 -845
- package/src/components/draggable-list/index.tsx +0 -100
- package/src/components/error-boundary/index.tsx +0 -232
- package/src/components/file-upload/index.tsx +0 -1660
- package/src/components/floating-action-button/index.tsx +0 -206
- package/src/components/form-wizard/form-wizard-context.tsx +0 -335
- package/src/components/form-wizard/form-wizard-navigation.tsx +0 -118
- package/src/components/form-wizard/form-wizard-progress.tsx +0 -329
- package/src/components/form-wizard/form-wizard-step.tsx +0 -111
- package/src/components/form-wizard/index.tsx +0 -102
- package/src/components/form-wizard/types.ts +0 -77
- package/src/components/gesture-drawer/index.tsx +0 -551
- package/src/components/github-stars/github-api.ts +0 -426
- package/src/components/github-stars/hooks.ts +0 -517
- package/src/components/github-stars/index.tsx +0 -375
- package/src/components/github-stars/types.ts +0 -148
- package/src/components/github-stars/variants.tsx +0 -515
- package/src/components/health-check/index.tsx +0 -439
- package/src/components/hover-card-3d/index.tsx +0 -529
- package/src/components/index.ts +0 -130
- package/src/components/internal/index.ts +0 -78
- package/src/components/kanban/add-card-modal.tsx +0 -502
- package/src/components/kanban/card-detail-modal.tsx +0 -761
- package/src/components/kanban/index.ts +0 -13
- package/src/components/kanban/kanban.tsx +0 -1689
- package/src/components/kanban/types.ts +0 -168
- package/src/components/lazy-component/index.tsx +0 -823
- package/src/components/license-error/index.tsx +0 -31
- package/src/components/magnetic-button/index.tsx +0 -216
- package/src/components/memory-efficient-data/index.tsx +0 -1018
- package/src/components/moonui-quiz-form/index.tsx +0 -817
- package/src/components/navbar/index.tsx +0 -781
- package/src/components/optimized-image/index.tsx +0 -425
- package/src/components/performance-debugger/index.tsx +0 -613
- package/src/components/performance-monitor/index.tsx +0 -808
- package/src/components/phone-number-input/index.tsx +0 -343
- package/src/components/phone-number-input/phone-number-input-simple.tsx +0 -167
- package/src/components/pinch-zoom/index.tsx +0 -566
- package/src/components/quiz-form/index.tsx +0 -479
- package/src/components/rich-text-editor/index.tsx +0 -2322
- package/src/components/rich-text-editor/slash-commands-extension.ts +0 -230
- package/src/components/rich-text-editor/slash-commands.css +0 -35
- package/src/components/rich-text-editor/table-styles.css +0 -65
- package/src/components/sidebar/index.tsx +0 -884
- package/src/components/spotlight-card/index.tsx +0 -191
- package/src/components/swipeable-card/index.tsx +0 -100
- package/src/components/timeline/index.tsx +0 -1183
- package/src/components/ui/accordion.tsx +0 -581
- package/src/components/ui/alert-dialog.tsx +0 -141
- package/src/components/ui/alert.tsx +0 -141
- package/src/components/ui/aspect-ratio.tsx +0 -245
- package/src/components/ui/avatar.tsx +0 -155
- package/src/components/ui/badge.tsx +0 -230
- package/src/components/ui/breadcrumb.tsx +0 -216
- package/src/components/ui/button.tsx +0 -228
- package/src/components/ui/calendar.tsx +0 -387
- package/src/components/ui/card.tsx +0 -216
- package/src/components/ui/checkbox.tsx +0 -259
- package/src/components/ui/collapsible.tsx +0 -631
- package/src/components/ui/color-picker.tsx +0 -97
- package/src/components/ui/command.tsx +0 -948
- package/src/components/ui/dialog.tsx +0 -752
- package/src/components/ui/dropdown-menu.tsx +0 -706
- package/src/components/ui/gesture-drawer.tsx +0 -11
- package/src/components/ui/hover-card.tsx +0 -29
- package/src/components/ui/index.ts +0 -222
- package/src/components/ui/input.tsx +0 -224
- package/src/components/ui/label.tsx +0 -29
- package/src/components/ui/lightbox.tsx +0 -606
- package/src/components/ui/magnetic-button.tsx +0 -129
- package/src/components/ui/media-gallery.tsx +0 -611
- package/src/components/ui/navigation-menu.tsx +0 -130
- package/src/components/ui/pagination.tsx +0 -125
- package/src/components/ui/popover.tsx +0 -185
- package/src/components/ui/progress.tsx +0 -30
- package/src/components/ui/radio-group.tsx +0 -257
- package/src/components/ui/scroll-area.tsx +0 -47
- package/src/components/ui/select.tsx +0 -378
- package/src/components/ui/separator.tsx +0 -145
- package/src/components/ui/sheet.tsx +0 -139
- package/src/components/ui/skeleton.tsx +0 -20
- package/src/components/ui/slider.tsx +0 -354
- package/src/components/ui/spotlight-card.tsx +0 -119
- package/src/components/ui/switch.tsx +0 -86
- package/src/components/ui/table.tsx +0 -331
- package/src/components/ui/tabs-pro.tsx +0 -542
- package/src/components/ui/tabs.tsx +0 -54
- package/src/components/ui/textarea.tsx +0 -28
- package/src/components/ui/toast.tsx +0 -317
- package/src/components/ui/toggle.tsx +0 -119
- package/src/components/ui/tooltip.tsx +0 -151
- package/src/components/virtual-list/index.tsx +0 -668
- package/src/hooks/use-chart.ts +0 -205
- package/src/hooks/use-data-table.ts +0 -182
- package/src/hooks/use-docs-pro-access.ts +0 -13
- package/src/hooks/use-license-check.ts +0 -65
- package/src/hooks/use-subscription.ts +0 -19
- package/src/hooks/use-toast.ts +0 -15
- package/src/index.ts +0 -22
- package/src/lib/ai-providers.ts +0 -377
- package/src/lib/component-metadata.ts +0 -18
- package/src/lib/micro-interactions.ts +0 -255
- package/src/lib/paddle.ts +0 -17
- package/src/lib/utils.ts +0 -6
- package/src/patterns/login-form/index.tsx +0 -276
- package/src/patterns/login-form/types.ts +0 -67
- package/src/setupTests.ts +0 -41
- package/src/styles/advanced-chart.css +0 -239
- package/src/styles/calendar.css +0 -35
- package/src/styles/design-system.css +0 -363
- package/src/styles/index.css +0 -681
- package/src/styles/tailwind.css +0 -7
- package/src/styles/tokens.css +0 -455
- package/src/types/next-auth.d.ts +0 -21
- package/src/use-intersection-observer.tsx +0 -154
- package/src/use-local-storage.tsx +0 -71
- package/src/use-paddle.ts +0 -138
- package/src/use-performance-optimizer.ts +0 -389
- package/src/use-pro-access.ts +0 -141
- package/src/use-scroll-animation.ts +0 -219
- package/src/use-subscription.ts +0 -37
- package/src/use-toast.ts +0 -32
- package/src/utils/chart-helpers.ts +0 -357
- package/src/utils/cn.ts +0 -6
- package/src/utils/data-processing.ts +0 -151
- package/src/utils/license-validator.tsx +0 -183
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import React from 'react'
|
|
4
|
-
import { cn } from '../../lib/utils'
|
|
5
|
-
|
|
6
|
-
interface LicenseErrorProps {
|
|
7
|
-
className?: string
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function LicenseError({ className }: LicenseErrorProps) {
|
|
11
|
-
return (
|
|
12
|
-
<div className={cn(
|
|
13
|
-
"flex flex-col items-center justify-center p-8 text-center border-2 border-dashed border-red-500/20 rounded-lg bg-red-50/5",
|
|
14
|
-
className
|
|
15
|
-
)}>
|
|
16
|
-
<div className="text-red-500 mb-4">
|
|
17
|
-
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
18
|
-
<path d="M12 2L2 7V12C2 16.5 4.23 20.68 7.62 23.47L12 22L16.38 23.47C19.77 20.68 22 16.5 22 12V7L12 2Z" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
19
|
-
<path d="M12 9V13" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
20
|
-
<circle cx="12" cy="17" r="1" fill="currentColor"/>
|
|
21
|
-
</svg>
|
|
22
|
-
</div>
|
|
23
|
-
<h3 className="text-lg font-semibold text-red-600 mb-2">License Required</h3>
|
|
24
|
-
<p className="text-sm text-muted-foreground max-w-md">
|
|
25
|
-
This is a Pro component. Please ensure you have a valid MoonUI Pro license to use this component.
|
|
26
|
-
</p>
|
|
27
|
-
</div>
|
|
28
|
-
)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export default LicenseError
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import React, { useRef, useState } from "react"
|
|
4
|
-
import { motion, useMotionValue, useSpring, useTransform } from "framer-motion"
|
|
5
|
-
import { cn } from "../../lib/utils"
|
|
6
|
-
import { cva, type VariantProps } from "class-variance-authority"
|
|
7
|
-
import { Card, CardContent } from "../ui/card"
|
|
8
|
-
import { Button } from "../ui/button"
|
|
9
|
-
import { Lock, Sparkles } from "lucide-react"
|
|
10
|
-
import { useSubscription } from "../../hooks/use-subscription"
|
|
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> {
|
|
51
|
-
strength?: number
|
|
52
|
-
range?: number
|
|
53
|
-
springConfig?: {
|
|
54
|
-
stiffness?: number
|
|
55
|
-
damping?: number
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const MagneticButtonInternal = React.forwardRef<HTMLButtonElement, MagneticButtonProps>(
|
|
60
|
-
({
|
|
61
|
-
children,
|
|
62
|
-
className,
|
|
63
|
-
variant,
|
|
64
|
-
size,
|
|
65
|
-
radius,
|
|
66
|
-
strength = 0.3,
|
|
67
|
-
range = 100,
|
|
68
|
-
springConfig = { stiffness: 200, damping: 15 },
|
|
69
|
-
...props
|
|
70
|
-
}, ref) => {
|
|
71
|
-
const buttonRef = useRef<HTMLButtonElement>(null)
|
|
72
|
-
const [isHovered, setIsHovered] = useState(false)
|
|
73
|
-
|
|
74
|
-
const x = useMotionValue(0)
|
|
75
|
-
const y = useMotionValue(0)
|
|
76
|
-
|
|
77
|
-
const springX = useSpring(x, springConfig)
|
|
78
|
-
const springY = useSpring(y, springConfig)
|
|
79
|
-
|
|
80
|
-
const rotateX = useTransform(springY, [-range, range], [5, -5])
|
|
81
|
-
const rotateY = useTransform(springX, [-range, range], [-5, 5])
|
|
82
|
-
|
|
83
|
-
const handleMouseMove = (e: React.MouseEvent) => {
|
|
84
|
-
if (!buttonRef.current) return
|
|
85
|
-
|
|
86
|
-
const rect = buttonRef.current.getBoundingClientRect()
|
|
87
|
-
const centerX = rect.left + rect.width / 2
|
|
88
|
-
const centerY = rect.top + rect.height / 2
|
|
89
|
-
|
|
90
|
-
const deltaX = e.clientX - centerX
|
|
91
|
-
const deltaY = e.clientY - centerY
|
|
92
|
-
|
|
93
|
-
const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY)
|
|
94
|
-
|
|
95
|
-
if (distance < range) {
|
|
96
|
-
x.set(deltaX * strength)
|
|
97
|
-
y.set(deltaY * strength)
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const handleMouseLeave = () => {
|
|
102
|
-
setIsHovered(false)
|
|
103
|
-
x.set(0)
|
|
104
|
-
y.set(0)
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const handleMouseEnter = () => {
|
|
108
|
-
setIsHovered(true)
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return (
|
|
112
|
-
<motion.button
|
|
113
|
-
ref={(node) => {
|
|
114
|
-
buttonRef.current = node
|
|
115
|
-
if (typeof ref === "function") {
|
|
116
|
-
ref(node)
|
|
117
|
-
} else if (ref) {
|
|
118
|
-
ref.current = node
|
|
119
|
-
}
|
|
120
|
-
}}
|
|
121
|
-
className={cn(
|
|
122
|
-
magneticButtonVariants({ variant, size, radius }),
|
|
123
|
-
className
|
|
124
|
-
)}
|
|
125
|
-
onMouseMove={handleMouseMove}
|
|
126
|
-
onMouseLeave={handleMouseLeave}
|
|
127
|
-
onMouseEnter={handleMouseEnter}
|
|
128
|
-
style={{
|
|
129
|
-
x: springX,
|
|
130
|
-
y: springY,
|
|
131
|
-
rotateX,
|
|
132
|
-
rotateY,
|
|
133
|
-
transformPerspective: 1000,
|
|
134
|
-
}}
|
|
135
|
-
whileHover={{ scale: 1.05 }}
|
|
136
|
-
whileTap={{ scale: 0.95 }}
|
|
137
|
-
animate={{
|
|
138
|
-
rotateX: isHovered ? rotateX.get() : 0,
|
|
139
|
-
rotateY: isHovered ? rotateY.get() : 0,
|
|
140
|
-
}}
|
|
141
|
-
transition={{ duration: 0.3 }}
|
|
142
|
-
>
|
|
143
|
-
<motion.div
|
|
144
|
-
className="relative z-10 flex items-center justify-center"
|
|
145
|
-
animate={{
|
|
146
|
-
scale: isHovered ? 1.02 : 1,
|
|
147
|
-
}}
|
|
148
|
-
transition={{ duration: 0.2 }}
|
|
149
|
-
>
|
|
150
|
-
{children}
|
|
151
|
-
</motion.div>
|
|
152
|
-
|
|
153
|
-
{/* Glow effect */}
|
|
154
|
-
<motion.div
|
|
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
|
-
)}
|
|
165
|
-
animate={{
|
|
166
|
-
opacity: isHovered ? 0.8 : 0,
|
|
167
|
-
scale: isHovered ? 1.1 : 1,
|
|
168
|
-
}}
|
|
169
|
-
transition={{ duration: 0.3 }}
|
|
170
|
-
/>
|
|
171
|
-
</motion.button>
|
|
172
|
-
)
|
|
173
|
-
}
|
|
174
|
-
)
|
|
175
|
-
|
|
176
|
-
MagneticButtonInternal.displayName = "MagneticButtonInternal"
|
|
177
|
-
|
|
178
|
-
export const MagneticButton = React.forwardRef<HTMLButtonElement, MagneticButtonProps>(
|
|
179
|
-
({ className, ...props }, ref) => {
|
|
180
|
-
// Check if we're in docs mode or have pro access
|
|
181
|
-
const { hasProAccess, isLoading } = useSubscription()
|
|
182
|
-
|
|
183
|
-
// In docs mode, always show the component
|
|
184
|
-
|
|
185
|
-
// If not in docs mode and no pro access, show upgrade prompt
|
|
186
|
-
if (!isLoading && !hasProAccess) {
|
|
187
|
-
return (
|
|
188
|
-
<Card className={cn("w-fit", className)}>
|
|
189
|
-
<CardContent className="py-6 text-center">
|
|
190
|
-
<div className="space-y-4">
|
|
191
|
-
<div className="rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto">
|
|
192
|
-
<Lock className="h-6 w-6 text-purple-600 dark:text-purple-400" />
|
|
193
|
-
</div>
|
|
194
|
-
<div>
|
|
195
|
-
<h3 className="font-semibold text-sm mb-2">Pro Feature</h3>
|
|
196
|
-
<p className="text-muted-foreground text-xs mb-4">
|
|
197
|
-
Magnetic Button is available exclusively to MoonUI Pro subscribers.
|
|
198
|
-
</p>
|
|
199
|
-
<a href="/pricing">
|
|
200
|
-
<Button size="sm">
|
|
201
|
-
<Sparkles className="mr-2 h-4 w-4" />
|
|
202
|
-
Upgrade to Pro
|
|
203
|
-
</Button>
|
|
204
|
-
</a>
|
|
205
|
-
</div>
|
|
206
|
-
</div>
|
|
207
|
-
</CardContent>
|
|
208
|
-
</Card>
|
|
209
|
-
)
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
return <MagneticButtonInternal className={className} ref={ref} {...props} />
|
|
213
|
-
}
|
|
214
|
-
)
|
|
215
|
-
|
|
216
|
-
MagneticButton.displayName = "MagneticButton"
|