@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,7 +1,13 @@
|
|
|
1
1
|
// Core UI Components - Only MoonUI*Pro exports to avoid conflicts
|
|
2
2
|
export {
|
|
3
3
|
MoonUIAccordionPro, MoonUIAccordionItemPro, MoonUIAccordionTriggerPro, MoonUIAccordionContentPro,
|
|
4
|
-
Accordion, AccordionItem, AccordionTrigger, AccordionContent
|
|
4
|
+
Accordion, AccordionItem, AccordionTrigger, AccordionContent,
|
|
5
|
+
useAccordionAnalytics,
|
|
6
|
+
type AccordionSize, type AccordionVariant, type AnimationMode,
|
|
7
|
+
type MoonUIAccordionProProps, type MoonUIAccordionProBaseProps,
|
|
8
|
+
type MoonUIAccordionProSingleProps, type MoonUIAccordionProMultipleProps,
|
|
9
|
+
type MoonUIAccordionItemProProps, type MoonUIAccordionTriggerProProps,
|
|
10
|
+
type MoonUIAccordionContentProProps
|
|
5
11
|
} from './accordion';
|
|
6
12
|
|
|
7
13
|
export {
|
|
@@ -50,7 +56,10 @@ export {
|
|
|
50
56
|
|
|
51
57
|
export {
|
|
52
58
|
MoonUICollapsiblePro, MoonUIcollapsibleTriggerVariantsPro, MoonUICollapsibleTriggerPro, MoonUIcollapsibleContentVariantsPro, MoonUICollapsibleContentPro,
|
|
53
|
-
Collapsible, collapsibleTriggerVariants, CollapsibleTrigger, collapsibleContentVariants, CollapsibleContent
|
|
59
|
+
Collapsible, collapsibleTriggerVariants, CollapsibleTrigger, collapsibleContentVariants, CollapsibleContent,
|
|
60
|
+
useCollapsibleAnalytics,
|
|
61
|
+
type MoonUICollapsibleProProps, type MoonUICollapsibleTriggerProProps, type MoonUICollapsibleContentProProps,
|
|
62
|
+
type CollapsibleSize, type CollapsibleVariant, type AnimationMode as CollapsibleAnimationMode, type BadgeVariant
|
|
54
63
|
} from './collapsible';
|
|
55
64
|
|
|
56
65
|
export {
|
|
@@ -59,10 +68,11 @@ export {
|
|
|
59
68
|
} from './color-picker';
|
|
60
69
|
|
|
61
70
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
71
|
+
MoonUICommandPro, MoonUICommandDialogPro, MoonUICommandInputPro, MoonUICommandListPro, MoonUICommandEmptyPro, MoonUICommandGroupPro, MoonUICommandItemPro, MoonUICommandShortcutPro, MoonUICommandSeparatorPro,
|
|
72
|
+
commandVariantsPro, Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator
|
|
64
73
|
} from './command';
|
|
65
74
|
|
|
75
|
+
|
|
66
76
|
export {
|
|
67
77
|
MoonUIDialogPro, MoonUIDialogContentPro, MoonUIDialogHeaderPro, MoonUIDialogFooterPro, MoonUIDialogTitlePro, MoonUIDialogDescriptionPro, MoonUIDialogTriggerPro, MoonUIDialogClosePro,
|
|
68
78
|
Dialog, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, DialogTrigger, DialogClose
|
|
@@ -142,10 +152,20 @@ export {
|
|
|
142
152
|
} from './table';
|
|
143
153
|
|
|
144
154
|
export {
|
|
145
|
-
MoonUITabsPro, MoonUITabsListPro, MoonUITabsTriggerPro, MoonUITabsContentPro,
|
|
146
155
|
Tabs, TabsList, TabsTrigger, TabsContent
|
|
147
156
|
} from './tabs';
|
|
148
157
|
|
|
158
|
+
export {
|
|
159
|
+
MoonUITabsPro as MoonUITabsEnhanced, // Backward compatibility
|
|
160
|
+
MoonUITabsPro,
|
|
161
|
+
MoonUITabsListPro,
|
|
162
|
+
MoonUITabsTriggerPro,
|
|
163
|
+
MoonUITabsContentPro,
|
|
164
|
+
type TabItem,
|
|
165
|
+
type MoonUITabsProProps,
|
|
166
|
+
type MoonUITabsProProps as MoonUITabsEnhancedProps // Backward compatibility
|
|
167
|
+
} from './tabs-pro';
|
|
168
|
+
|
|
149
169
|
export {
|
|
150
170
|
MoonUITextareaPro,
|
|
151
171
|
Textarea
|
|
@@ -170,6 +190,18 @@ export {
|
|
|
170
190
|
HoverCard, HoverCardTrigger, HoverCardContent
|
|
171
191
|
} from './hover-card';
|
|
172
192
|
|
|
193
|
+
export {
|
|
194
|
+
NavigationMenu,
|
|
195
|
+
NavigationMenuList,
|
|
196
|
+
NavigationMenuItem,
|
|
197
|
+
NavigationMenuContent,
|
|
198
|
+
NavigationMenuTrigger,
|
|
199
|
+
NavigationMenuLink,
|
|
200
|
+
NavigationMenuIndicator,
|
|
201
|
+
NavigationMenuViewport,
|
|
202
|
+
navigationMenuTriggerStyle
|
|
203
|
+
} from './navigation-menu';
|
|
204
|
+
|
|
173
205
|
// HoverCard3D is exported from components/hover-card-3d/index.tsx
|
|
174
206
|
|
|
175
207
|
// Note: Micro-interaction components are exported from their individual directories
|
|
@@ -110,7 +110,7 @@ const MagneticButton = React.forwardRef<HTMLButtonElement, MagneticButtonProps>(
|
|
|
110
110
|
whileHover={{ scale: 1.05 }}
|
|
111
111
|
whileTap={{ scale: 0.95 }}
|
|
112
112
|
transition={{ type: "spring", stiffness: 400, damping: 17 }}
|
|
113
|
-
{...props}
|
|
113
|
+
{...(props as any)}
|
|
114
114
|
>
|
|
115
115
|
<motion.span
|
|
116
116
|
style={{ x: useTransform(x, (value) => value * 0.2), y: useTransform(y, (value) => value * 0.2) }}
|
|
@@ -241,7 +241,7 @@ const MoonUIMediaGalleryPro = React.forwardRef<
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
const renderGalleryItem = (item: MediaItem, index: number) => {
|
|
244
|
-
const isLoaded = !lazyLoad || loadedImages.has(index)
|
|
244
|
+
const isLoaded = !lazyLoad || loadedImages.has(index) || (item.thumbnail && item.thumbnail.endsWith('.svg'))
|
|
245
245
|
|
|
246
246
|
const itemContent = (
|
|
247
247
|
<motion.div
|
|
@@ -450,7 +450,6 @@ const MoonUIMediaGalleryPro = React.forwardRef<
|
|
|
450
450
|
className
|
|
451
451
|
)}
|
|
452
452
|
style={layout === "masonry" ? { columnGap: "1rem" } : undefined}
|
|
453
|
-
{...props}
|
|
454
453
|
>
|
|
455
454
|
{loadingState ? (
|
|
456
455
|
<>
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu"
|
|
5
|
+
import { cva } from "class-variance-authority"
|
|
6
|
+
import { ChevronDown } from "lucide-react"
|
|
7
|
+
|
|
8
|
+
import { cn } from "../../lib/utils"
|
|
9
|
+
|
|
10
|
+
const NavigationMenu = React.forwardRef<
|
|
11
|
+
React.ElementRef<typeof NavigationMenuPrimitive.Root>,
|
|
12
|
+
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>
|
|
13
|
+
>(({ className, children, ...props }, ref) => (
|
|
14
|
+
<NavigationMenuPrimitive.Root
|
|
15
|
+
ref={ref}
|
|
16
|
+
className={cn(
|
|
17
|
+
"relative z-10 flex max-w-max flex-1 items-center justify-center",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...props}
|
|
21
|
+
>
|
|
22
|
+
{children}
|
|
23
|
+
<NavigationMenuViewport />
|
|
24
|
+
</NavigationMenuPrimitive.Root>
|
|
25
|
+
))
|
|
26
|
+
NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName
|
|
27
|
+
|
|
28
|
+
const NavigationMenuList = React.forwardRef<
|
|
29
|
+
React.ElementRef<typeof NavigationMenuPrimitive.List>,
|
|
30
|
+
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>
|
|
31
|
+
>(({ className, ...props }, ref) => (
|
|
32
|
+
<NavigationMenuPrimitive.List
|
|
33
|
+
ref={ref}
|
|
34
|
+
className={cn(
|
|
35
|
+
"group flex flex-1 list-none items-center justify-center space-x-1",
|
|
36
|
+
className
|
|
37
|
+
)}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
))
|
|
41
|
+
NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName
|
|
42
|
+
|
|
43
|
+
const NavigationMenuItem = NavigationMenuPrimitive.Item
|
|
44
|
+
|
|
45
|
+
const navigationMenuTriggerStyle = cva(
|
|
46
|
+
"group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
const NavigationMenuTrigger = React.forwardRef<
|
|
50
|
+
React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,
|
|
51
|
+
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>
|
|
52
|
+
>(({ className, children, ...props }, ref) => (
|
|
53
|
+
<NavigationMenuPrimitive.Trigger
|
|
54
|
+
ref={ref}
|
|
55
|
+
className={cn(navigationMenuTriggerStyle(), "group", className)}
|
|
56
|
+
{...props}
|
|
57
|
+
>
|
|
58
|
+
{children}{" "}
|
|
59
|
+
<ChevronDown
|
|
60
|
+
className="relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180"
|
|
61
|
+
aria-hidden="true"
|
|
62
|
+
/>
|
|
63
|
+
</NavigationMenuPrimitive.Trigger>
|
|
64
|
+
))
|
|
65
|
+
NavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName
|
|
66
|
+
|
|
67
|
+
const NavigationMenuContent = React.forwardRef<
|
|
68
|
+
React.ElementRef<typeof NavigationMenuPrimitive.Content>,
|
|
69
|
+
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>
|
|
70
|
+
>(({ className, ...props }, ref) => (
|
|
71
|
+
<NavigationMenuPrimitive.Content
|
|
72
|
+
ref={ref}
|
|
73
|
+
className={cn(
|
|
74
|
+
"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",
|
|
75
|
+
className
|
|
76
|
+
)}
|
|
77
|
+
{...props}
|
|
78
|
+
/>
|
|
79
|
+
))
|
|
80
|
+
NavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName
|
|
81
|
+
|
|
82
|
+
const NavigationMenuLink = NavigationMenuPrimitive.Link
|
|
83
|
+
|
|
84
|
+
const NavigationMenuViewport = React.forwardRef<
|
|
85
|
+
React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,
|
|
86
|
+
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>
|
|
87
|
+
>(({ className, ...props }, ref) => (
|
|
88
|
+
<div className={cn("absolute left-0 top-full flex justify-center")}>
|
|
89
|
+
<NavigationMenuPrimitive.Viewport
|
|
90
|
+
className={cn(
|
|
91
|
+
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
92
|
+
className
|
|
93
|
+
)}
|
|
94
|
+
ref={ref}
|
|
95
|
+
{...props}
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
98
|
+
))
|
|
99
|
+
NavigationMenuViewport.displayName =
|
|
100
|
+
NavigationMenuPrimitive.Viewport.displayName
|
|
101
|
+
|
|
102
|
+
const NavigationMenuIndicator = React.forwardRef<
|
|
103
|
+
React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,
|
|
104
|
+
React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>
|
|
105
|
+
>(({ className, ...props }, ref) => (
|
|
106
|
+
<NavigationMenuPrimitive.Indicator
|
|
107
|
+
ref={ref}
|
|
108
|
+
className={cn(
|
|
109
|
+
"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
|
|
110
|
+
className
|
|
111
|
+
)}
|
|
112
|
+
{...props}
|
|
113
|
+
>
|
|
114
|
+
<div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
|
|
115
|
+
</NavigationMenuPrimitive.Indicator>
|
|
116
|
+
))
|
|
117
|
+
NavigationMenuIndicator.displayName =
|
|
118
|
+
NavigationMenuPrimitive.Indicator.displayName
|
|
119
|
+
|
|
120
|
+
export {
|
|
121
|
+
navigationMenuTriggerStyle,
|
|
122
|
+
NavigationMenu,
|
|
123
|
+
NavigationMenuList,
|
|
124
|
+
NavigationMenuItem,
|
|
125
|
+
NavigationMenuContent,
|
|
126
|
+
NavigationMenuTrigger,
|
|
127
|
+
NavigationMenuLink,
|
|
128
|
+
NavigationMenuIndicator,
|
|
129
|
+
NavigationMenuViewport,
|
|
130
|
+
}
|
|
@@ -162,7 +162,7 @@ interface MoonUISelectContentProProps extends React.ComponentPropsWithoutRef<typ
|
|
|
162
162
|
const MoonUISelectContentPro = React.forwardRef<
|
|
163
163
|
React.ElementRef<typeof SelectPrimitive.Content>,
|
|
164
164
|
MoonUISelectContentProProps
|
|
165
|
-
>(({ className, children, position = "popper", enableSearch, searchPlaceholder = "Search...", noResultsText = "No results found", searchLoading, searchIcon, ...props }, ref) => {
|
|
165
|
+
>(({ className, children, position = "popper", side = "bottom", align = "start", enableSearch, searchPlaceholder = "Search...", noResultsText = "No results found", searchLoading, searchIcon, ...props }, ref) => {
|
|
166
166
|
const [searchValue, setSearchValue] = React.useState("");
|
|
167
167
|
|
|
168
168
|
// Filter children based on search
|
|
@@ -207,7 +207,11 @@ const MoonUISelectContentPro = React.forwardRef<
|
|
|
207
207
|
className
|
|
208
208
|
)}
|
|
209
209
|
position={position}
|
|
210
|
-
|
|
210
|
+
side={side}
|
|
211
|
+
align={align}
|
|
212
|
+
sideOffset={4}
|
|
213
|
+
avoidCollisions={true}
|
|
214
|
+
collisionPadding={10}
|
|
211
215
|
{...props}
|
|
212
216
|
>
|
|
213
217
|
{enableSearch && (
|
|
@@ -74,7 +74,7 @@ const SpotlightCard = React.forwardRef<HTMLDivElement, SpotlightCardProps>(
|
|
|
74
74
|
onMouseLeave={handleMouseLeave}
|
|
75
75
|
whileHover={{ scale: 1.02 }}
|
|
76
76
|
transition={{ type: "spring", stiffness: 400, damping: 25 }}
|
|
77
|
-
{...props}
|
|
77
|
+
{...(props as any)}
|
|
78
78
|
>
|
|
79
79
|
{/* Spotlight overlay */}
|
|
80
80
|
<motion.div
|