@moontra/moonui-pro 2.24.11 → 2.24.12
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 +2 -2
- package/dist/index.global.js +72 -72
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +24 -17
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4,11 +4,11 @@ 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,
|
|
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, CalendarIcon, DollarSign, Users, Map as Map$1, Calendar as Calendar$1, Target, Music, Archive, File, FileSpreadsheet, FileJson, FileDown, ArrowUp, ArrowDown, ArrowUpDown, ChevronsLeft, ChevronsRight, Star, Shield, Award, Gem, Flame, Repeat, MapPin, Move, EyeOff, Timer, Square, Cpu, GitBranch, ArrowRight, Trash, MessageCircle, Paperclip, Printer, TrendingDown, ArrowDownRight, ArrowUpRight, Grip, Unlock, Github, Server, Monitor, MemoryStick, HardDrive, Network, Columns, Pin, Sun, Moon, 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';
|
|
11
|
-
import { format, addMonths, subMonths, startOfMonth, endOfMonth, eachDayOfInterval, getDay, startOfWeek, endOfWeek, isSameMonth, isToday,
|
|
11
|
+
import { format, addMonths, subMonths, startOfMonth, endOfMonth, eachDayOfInterval, getDay, startOfWeek, endOfWeek, isSameMonth, isToday, formatDistanceToNow, startOfDay, endOfDay, subDays, isSameDay } from 'date-fns';
|
|
12
12
|
import { motion, AnimatePresence, useAnimation, useMotionValue, animate, useSpring, useTransform, Reorder, useDragControls } from 'framer-motion';
|
|
13
13
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
14
14
|
import * as ReactDOM2 from 'react-dom';
|
|
@@ -30,7 +30,7 @@ import * as TabsPrimitive2 from '@radix-ui/react-tabs';
|
|
|
30
30
|
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
31
31
|
import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js';
|
|
32
32
|
import { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector.js';
|
|
33
|
-
import { ResponsiveContainer, LineChart, Line,
|
|
33
|
+
import { ResponsiveContainer, LineChart, Line, RadarChart, PolarGrid, PolarAngleAxis, PolarRadiusAxis, Radar, Tooltip, Legend, PieChart, Pie, Cell, AreaChart, CartesianGrid, XAxis, YAxis, Area, BarChart, Bar, RadialBarChart, RadialBar, ScatterChart, Scatter, ReferenceLine, Brush, ReferenceArea } from 'recharts';
|
|
34
34
|
import { WidthProvider, Responsive } from 'react-grid-layout';
|
|
35
35
|
import 'react-grid-layout/css/styles.css';
|
|
36
36
|
import { useForm } from 'react-hook-form';
|
|
@@ -63581,7 +63581,8 @@ function ChartWidget({
|
|
|
63581
63581
|
stroke: colors[index2 % colors.length],
|
|
63582
63582
|
strokeWidth: 2,
|
|
63583
63583
|
dot: { r: 4 },
|
|
63584
|
-
activeDot: { r: 6 }
|
|
63584
|
+
activeDot: { r: 6 },
|
|
63585
|
+
isAnimationActive: false
|
|
63585
63586
|
},
|
|
63586
63587
|
key
|
|
63587
63588
|
))
|
|
@@ -63598,7 +63599,8 @@ function ChartWidget({
|
|
|
63598
63599
|
{
|
|
63599
63600
|
dataKey: key,
|
|
63600
63601
|
fill: colors[index2 % colors.length],
|
|
63601
|
-
radius: [4, 4, 0, 0]
|
|
63602
|
+
radius: [4, 4, 0, 0],
|
|
63603
|
+
isAnimationActive: false
|
|
63602
63604
|
},
|
|
63603
63605
|
key
|
|
63604
63606
|
))
|
|
@@ -63617,7 +63619,8 @@ function ChartWidget({
|
|
|
63617
63619
|
dataKey: key,
|
|
63618
63620
|
stroke: colors[index2 % colors.length],
|
|
63619
63621
|
fill: colors[index2 % colors.length],
|
|
63620
|
-
fillOpacity: 0.2
|
|
63622
|
+
fillOpacity: 0.2,
|
|
63623
|
+
isAnimationActive: false
|
|
63621
63624
|
},
|
|
63622
63625
|
key
|
|
63623
63626
|
))
|
|
@@ -63637,6 +63640,7 @@ function ChartWidget({
|
|
|
63637
63640
|
innerRadius: data.type === "donut" ? 50 : 0,
|
|
63638
63641
|
fill: "#8884d8",
|
|
63639
63642
|
dataKey: "value",
|
|
63643
|
+
isAnimationActive: false,
|
|
63640
63644
|
children: data.data.map((entry, index2) => /* @__PURE__ */ jsx(Cell, { fill: colors[index2 % colors.length] }, `cell-${index2}`))
|
|
63641
63645
|
}
|
|
63642
63646
|
),
|
|
@@ -63655,7 +63659,8 @@ function ChartWidget({
|
|
|
63655
63659
|
dataKey: key,
|
|
63656
63660
|
stroke: colors[index2 % colors.length],
|
|
63657
63661
|
fill: colors[index2 % colors.length],
|
|
63658
|
-
fillOpacity: 0.3
|
|
63662
|
+
fillOpacity: 0.3,
|
|
63663
|
+
isAnimationActive: false
|
|
63659
63664
|
},
|
|
63660
63665
|
key
|
|
63661
63666
|
)),
|
|
@@ -65026,7 +65031,7 @@ function formatRelativeTime(date) {
|
|
|
65026
65031
|
return `${Math.floor(diffInSeconds / 86400)}d ago`;
|
|
65027
65032
|
return date.toLocaleDateString();
|
|
65028
65033
|
}
|
|
65029
|
-
|
|
65034
|
+
var DashboardInternal = t__default.memo(function DashboardInternal2({
|
|
65030
65035
|
config,
|
|
65031
65036
|
widgets: initialWidgets = [],
|
|
65032
65037
|
templates = DASHBOARD_TEMPLATES,
|
|
@@ -65081,13 +65086,15 @@ function DashboardInternal({
|
|
|
65081
65086
|
const prevInitialWidgetsRef = t__default.useRef(initialWidgets);
|
|
65082
65087
|
const prevTimeRangeRef = t__default.useRef(propTimeRange);
|
|
65083
65088
|
t__default.useEffect(() => {
|
|
65084
|
-
|
|
65089
|
+
const hasChanged = JSON.stringify(prevInitialWidgetsRef.current) !== JSON.stringify(initialWidgets);
|
|
65090
|
+
if (hasChanged) {
|
|
65085
65091
|
prevInitialWidgetsRef.current = initialWidgets;
|
|
65086
65092
|
setWidgets(initialWidgets);
|
|
65087
65093
|
}
|
|
65088
65094
|
}, [initialWidgets]);
|
|
65089
65095
|
t__default.useEffect(() => {
|
|
65090
|
-
|
|
65096
|
+
const hasChanged = JSON.stringify(prevTimeRangeRef.current) !== JSON.stringify(propTimeRange);
|
|
65097
|
+
if (propTimeRange && hasChanged) {
|
|
65091
65098
|
prevTimeRangeRef.current = propTimeRange;
|
|
65092
65099
|
setTimeRange(propTimeRange);
|
|
65093
65100
|
}
|
|
@@ -65609,12 +65616,12 @@ function DashboardInternal({
|
|
|
65609
65616
|
// Children mode - use as layout wrapper
|
|
65610
65617
|
/* @__PURE__ */ jsxs("div", { className: cn("flex flex-1", contentClassName), children: [
|
|
65611
65618
|
sidebarPosition === "left" && sidebarContent && /* @__PURE__ */ jsx("div", { className: cn(
|
|
65612
|
-
"
|
|
65619
|
+
"h-full border-r",
|
|
65613
65620
|
glassmorphism ? "bg-background/60 backdrop-blur-md" : "bg-background"
|
|
65614
65621
|
), children: sidebarContent }),
|
|
65615
65622
|
/* @__PURE__ */ jsx("div", { className: "flex-1 p-6", children }),
|
|
65616
65623
|
sidebarPosition === "right" && sidebarContent && /* @__PURE__ */ jsx("div", { className: cn(
|
|
65617
|
-
"
|
|
65624
|
+
"h-full border-l",
|
|
65618
65625
|
glassmorphism ? "bg-background/60 backdrop-blur-md" : "bg-background"
|
|
65619
65626
|
), children: sidebarContent })
|
|
65620
65627
|
] })
|
|
@@ -65622,12 +65629,12 @@ function DashboardInternal({
|
|
|
65622
65629
|
// Hybrid mode - both children and widgets
|
|
65623
65630
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-1", children: [
|
|
65624
65631
|
sidebarPosition === "left" && sidebarContent && /* @__PURE__ */ jsx("div", { className: cn(
|
|
65625
|
-
"
|
|
65632
|
+
"h-full border-r",
|
|
65626
65633
|
glassmorphism ? "bg-background/60 backdrop-blur-md" : "bg-background"
|
|
65627
65634
|
), children: sidebarContent }),
|
|
65628
65635
|
/* @__PURE__ */ jsx("div", { className: "flex-1 p-6", children }),
|
|
65629
65636
|
sidebarPosition === "right" && sidebarContent && /* @__PURE__ */ jsx("div", { className: cn(
|
|
65630
|
-
"
|
|
65637
|
+
"h-full border-l",
|
|
65631
65638
|
glassmorphism ? "bg-background/60 backdrop-blur-md" : "bg-background"
|
|
65632
65639
|
), children: sidebarContent }),
|
|
65633
65640
|
/* @__PURE__ */ jsx("div", { className: cn(
|
|
@@ -65755,8 +65762,8 @@ function DashboardInternal({
|
|
|
65755
65762
|
]
|
|
65756
65763
|
}
|
|
65757
65764
|
);
|
|
65758
|
-
}
|
|
65759
|
-
|
|
65765
|
+
});
|
|
65766
|
+
var Dashboard = t__default.memo(function Dashboard2(props) {
|
|
65760
65767
|
const { hasProAccess, isLoading } = useSubscription();
|
|
65761
65768
|
if (!isLoading && !hasProAccess) {
|
|
65762
65769
|
return /* @__PURE__ */ jsx(MoonUICardPro, { className: cn("w-full", props.className), children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "py-12 text-center", children: /* @__PURE__ */ jsxs("div", { className: "max-w-md mx-auto space-y-4", children: [
|
|
@@ -65772,7 +65779,7 @@ function Dashboard(props) {
|
|
|
65772
65779
|
] }) }) });
|
|
65773
65780
|
}
|
|
65774
65781
|
return /* @__PURE__ */ jsx(DashboardInternal, { ...props });
|
|
65775
|
-
}
|
|
65782
|
+
});
|
|
65776
65783
|
var MoonUIDashboardPro = Dashboard;
|
|
65777
65784
|
function validatePhoneNumber(number) {
|
|
65778
65785
|
if (!number)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.24.
|
|
3
|
+
"version": "2.24.12",
|
|
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",
|