@moontra/moonui-pro 2.26.2 → 2.26.3
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 +1 -0
- package/dist/index.global.js +118 -110
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +86 -15
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { twMerge } from 'tailwind-merge';
|
|
|
4
4
|
import * as t from 'react';
|
|
5
5
|
import t__default, { useState, useMemo, useCallback, useRef, useEffect, forwardRef, createContext, useContext, useLayoutEffect, useDebugValue, Component } from 'react';
|
|
6
6
|
import * as AccordionPrimitive2 from '@radix-ui/react-accordion';
|
|
7
|
-
import { Loader2, Play, ExternalLink, ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Minus, Clock, ChevronUp, Search, Mic, MicOff, Settings, RefreshCw, Zap, ChevronRight, Crown, Circle, ChevronLeft, Plus, Lock, Sparkles, ZoomOut, ZoomIn, Pause, VolumeX, Volume2, Download, Maximize2, Filter, Image as Image$1, Video, RotateCw, Minimize2, BarChart3, Menu, Bell, CheckCheck, CheckCircle, Palette, User, Settings2, LogOut, Edit3, LayoutGrid, Upload, Share2, Save, Phone, Globe, Eye, CheckCircle2, RotateCcw, Copy, Share, Trash2, CreditCard, XCircle, HelpCircle, Bold as Bold$1, Italic as Italic$1, Underline as Underline$1, Strikethrough, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, Quote, Code as Code$1, Link as Link$1, Undo, Redo, Edit, GripVertical, Type, Heading1, Heading2, Heading3, CheckSquare, Highlighter, Link2, Table as Table$1, Wand2, Maximize, FileText, Briefcase, MessageSquare, Heart, GraduationCap, Languages, Lightbulb, MoreVertical, TrendingUp, Activity, BellOff, Target, ArrowUpRight, ArrowDownRight, CalendarIcon, MapPin, Navigation, ArrowUp, ArrowDown, ArrowUpDown, Calendar as Calendar$1, DollarSign, Users, Map as Map$1, Music, Archive, File, FileSpreadsheet, FileJson, FileDown, ChevronsLeft, ChevronsRight, Star, Shield, Award, Gem, Flame, Repeat, Move, EyeOff, Timer, Square, Cpu, GitBranch, ArrowRight, Trash, MessageCircle, Paperclip, Printer, TrendingDown, Grip, Unlock, Github, Server, Monitor, MemoryStick, HardDrive, Network, Columns, PlusCircle, Pin, Sun, Moon, Send, Tag, Flag, Trophy, GitFork, Package } from 'lucide-react';
|
|
7
|
+
import { Loader2, Play, ExternalLink, ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Minus, Clock, ChevronUp, Search, Mic, MicOff, Settings, RefreshCw, Zap, ChevronRight, Crown, Circle, ChevronLeft, Plus, Lock, Sparkles, ZoomOut, ZoomIn, Pause, VolumeX, Volume2, Download, Maximize2, Filter, Image as Image$1, Video, RotateCw, Minimize2, BarChart3, Menu, Bell, CheckCheck, CheckCircle, Palette, User, Settings2, LogOut, Edit3, LayoutGrid, Upload, Share2, Save, Phone, Globe, Eye, CheckCircle2, RotateCcw, Copy, Share, Trash2, CreditCard, XCircle, HelpCircle, Bold as Bold$1, Italic as Italic$1, Underline as Underline$1, Strikethrough, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, Quote, Code as Code$1, Link as Link$1, Undo, Redo, Edit, GripVertical, Type, Heading1, Heading2, Heading3, CheckSquare, Highlighter, Link2, Table as Table$1, Wand2, Maximize, FileText, Briefcase, MessageSquare, Heart, GraduationCap, Languages, Lightbulb, MoreVertical, TrendingUp, Activity, BellOff, Target, ArrowUpRight, ArrowDownRight, CalendarIcon, MapPin, Navigation, ArrowUp, ArrowDown, ArrowUpDown, Calendar as Calendar$1, DollarSign, Users, Map as Map$1, Music, Archive, File, FileSpreadsheet, FileJson, FileDown, ChevronsLeft, ChevronsRight, Star, Shield, Award, Gem, Flame, Repeat, Move, EyeOff, Timer, Square, Cpu, GitBranch, ArrowRight, Trash, MessageCircle, Paperclip, Printer, TrendingDown, Grip, Unlock, Github, Server, Monitor, MemoryStick, HardDrive, Network, Columns, PlusCircle, Pin, Sun, Moon, Home, Send, Tag, Flag, Trophy, GitFork, Package } from 'lucide-react';
|
|
8
8
|
import { cva } from 'class-variance-authority';
|
|
9
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
10
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
@@ -75169,7 +75169,7 @@ function NavbarInternal({
|
|
|
75169
75169
|
}) {
|
|
75170
75170
|
const [isMobile, setIsMobile] = useState(false);
|
|
75171
75171
|
const [isOpen, setIsOpen] = useState(false);
|
|
75172
|
-
useState(false);
|
|
75172
|
+
const [isSearchOpen, setIsSearchOpen] = useState(false);
|
|
75173
75173
|
const [isCommandOpen, setIsCommandOpen] = useState(false);
|
|
75174
75174
|
const [searchValue, setSearchValue] = useState("");
|
|
75175
75175
|
const [scrolled, setScrolled] = useState(false);
|
|
@@ -75691,28 +75691,99 @@ function NavbarInternal({
|
|
|
75691
75691
|
}
|
|
75692
75692
|
),
|
|
75693
75693
|
/* @__PURE__ */ jsxs(MoonUICommandListPro, { children: [
|
|
75694
|
-
/* @__PURE__ */ jsx(MoonUICommandEmptyPro, { children: "
|
|
75695
|
-
|
|
75694
|
+
/* @__PURE__ */ jsx(MoonUICommandEmptyPro, { children: enableCommandAI ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center py-6", children: [
|
|
75695
|
+
/* @__PURE__ */ jsx(Sparkles, { className: "h-8 w-8 text-muted-foreground mb-2" }),
|
|
75696
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "No results found" }),
|
|
75697
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-1", children: "Try searching for pages, actions, or commands" })
|
|
75698
|
+
] }) : "No results found." }),
|
|
75699
|
+
enableCommandAI && !searchValue && /* @__PURE__ */ jsxs(MoonUICommandGroupPro, { heading: "Quick Actions", children: [
|
|
75700
|
+
/* @__PURE__ */ jsxs(MoonUICommandItemPro, { onSelect: () => {
|
|
75701
|
+
const homeItem = { id: "home", title: "Go Home", href: "/" };
|
|
75702
|
+
onCommandAISelect?.(homeItem);
|
|
75703
|
+
handleItemClick(homeItem);
|
|
75704
|
+
setIsCommandOpen(false);
|
|
75705
|
+
}, children: [
|
|
75706
|
+
/* @__PURE__ */ jsx(Home, { className: "mr-2 h-4 w-4" }),
|
|
75707
|
+
"Go Home",
|
|
75708
|
+
/* @__PURE__ */ jsx("kbd", { className: "ml-auto text-xs", children: "\u2318H" })
|
|
75709
|
+
] }),
|
|
75710
|
+
/* @__PURE__ */ jsxs(MoonUICommandItemPro, { onSelect: () => {
|
|
75711
|
+
setIsSearchOpen(true);
|
|
75712
|
+
setIsCommandOpen(false);
|
|
75713
|
+
onCommandAISelect?.({ id: "search", title: "Search", action: () => setIsSearchOpen(true) });
|
|
75714
|
+
}, children: [
|
|
75715
|
+
/* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4" }),
|
|
75716
|
+
"Search",
|
|
75717
|
+
/* @__PURE__ */ jsx("kbd", { className: "ml-auto text-xs", children: "\u2318S" })
|
|
75718
|
+
] }),
|
|
75719
|
+
showThemeToggle && /* @__PURE__ */ jsxs(MoonUICommandItemPro, { onSelect: () => {
|
|
75720
|
+
const newTheme = theme === "dark" ? "light" : "dark";
|
|
75721
|
+
onThemeChange?.(newTheme);
|
|
75722
|
+
setIsCommandOpen(false);
|
|
75723
|
+
}, children: [
|
|
75724
|
+
theme === "dark" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
75725
|
+
/* @__PURE__ */ jsx(Sun, { className: "mr-2 h-4 w-4" }),
|
|
75726
|
+
"Switch to Light Mode"
|
|
75727
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
75728
|
+
/* @__PURE__ */ jsx(Moon, { className: "mr-2 h-4 w-4" }),
|
|
75729
|
+
"Switch to Dark Mode"
|
|
75730
|
+
] }),
|
|
75731
|
+
/* @__PURE__ */ jsx("kbd", { className: "ml-auto text-xs", children: "\u2318T" })
|
|
75732
|
+
] })
|
|
75733
|
+
] }),
|
|
75734
|
+
sections.map((section) => {
|
|
75735
|
+
const filteredItems = section.items.filter(
|
|
75736
|
+
(item) => !searchValue || item.title.toLowerCase().includes(searchValue.toLowerCase()) || item.description?.toLowerCase().includes(searchValue.toLowerCase())
|
|
75737
|
+
);
|
|
75738
|
+
if (filteredItems.length === 0)
|
|
75739
|
+
return null;
|
|
75740
|
+
return /* @__PURE__ */ jsx(MoonUICommandGroupPro, { heading: enableCommandAI ? "Navigation" : section.id, children: filteredItems.map((item) => /* @__PURE__ */ jsxs(
|
|
75741
|
+
MoonUICommandItemPro,
|
|
75742
|
+
{
|
|
75743
|
+
disabled: item.disabled,
|
|
75744
|
+
onSelect: () => {
|
|
75745
|
+
if (enableCommandAI) {
|
|
75746
|
+
onCommandAISelect?.(item);
|
|
75747
|
+
}
|
|
75748
|
+
handleItemClick(item);
|
|
75749
|
+
setIsCommandOpen(false);
|
|
75750
|
+
},
|
|
75751
|
+
children: [
|
|
75752
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
75753
|
+
item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
|
|
75754
|
+
item.title
|
|
75755
|
+
] }),
|
|
75756
|
+
item.badge && /* @__PURE__ */ jsx(MoonUIBadgePro, { variant: item.badgeVariant || "secondary", className: "ml-auto", children: item.badge }),
|
|
75757
|
+
item.description && enableCommandAI && /* @__PURE__ */ jsx("span", { className: "ml-2 text-xs text-muted-foreground", children: item.description })
|
|
75758
|
+
]
|
|
75759
|
+
},
|
|
75760
|
+
item.id
|
|
75761
|
+
)) }, section.id);
|
|
75762
|
+
}),
|
|
75763
|
+
enableCommandAI && userMenu?.items && /* @__PURE__ */ jsx(MoonUICommandGroupPro, { heading: "Account", children: userMenu.items.map((item) => /* @__PURE__ */ jsx(
|
|
75696
75764
|
MoonUICommandItemPro,
|
|
75697
75765
|
{
|
|
75698
75766
|
disabled: item.disabled,
|
|
75699
75767
|
onSelect: () => {
|
|
75700
|
-
|
|
75701
|
-
|
|
75768
|
+
const commandItem = {
|
|
75769
|
+
...item,
|
|
75770
|
+
action: item.onClick || item.action
|
|
75771
|
+
};
|
|
75772
|
+
if (commandItem.action) {
|
|
75773
|
+
commandItem.action();
|
|
75774
|
+
} else if (commandItem.href) {
|
|
75775
|
+
window.location.href = commandItem.href;
|
|
75702
75776
|
}
|
|
75703
|
-
|
|
75777
|
+
onCommandAISelect?.(commandItem);
|
|
75704
75778
|
setIsCommandOpen(false);
|
|
75705
75779
|
},
|
|
75706
|
-
children: [
|
|
75707
|
-
/* @__PURE__ */
|
|
75708
|
-
|
|
75709
|
-
|
|
75710
|
-
] }),
|
|
75711
|
-
item.description && enableCommandAI && /* @__PURE__ */ jsx("span", { className: "ml-auto text-xs text-muted-foreground", children: item.description })
|
|
75712
|
-
]
|
|
75780
|
+
children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
75781
|
+
item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
|
|
75782
|
+
item.title
|
|
75783
|
+
] })
|
|
75713
75784
|
},
|
|
75714
75785
|
item.id
|
|
75715
|
-
)) }
|
|
75786
|
+
)) })
|
|
75716
75787
|
] })
|
|
75717
75788
|
]
|
|
75718
75789
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.26.
|
|
3
|
+
"version": "2.26.3",
|
|
4
4
|
"description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|