@moontra/moonui-pro 2.28.10 → 2.28.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.global.js +116 -108
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +86 -5
- 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, TrendingDown, Repeat, Move, EyeOff, Timer, Square, Cpu, GitBranch, ArrowRight, Trash, MessageCircle, Paperclip, Printer, Grip, Unlock, Github, Server, Monitor, MemoryStick, HardDrive, Network, Columns, PlusCircle, Pin, Sun, Moon, Home, Send, Tag, Flag, Trophy, Wifi, WifiOff, Thermometer, GitFork, Package, PoundSterling, Euro, Database, ShoppingCart } 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, TrendingDown, Repeat, Move, EyeOff, Timer, Square, Cpu, GitBranch, ArrowRight, Trash, MessageCircle, Paperclip, Printer, Grip, Unlock, Github, Server, Monitor, MemoryStick, HardDrive, Network, Columns, PlusCircle, Pin, Sun, Moon, Home, Send, Tag, Flag, Trophy, ShoppingBag, Wifi, WifiOff, Thermometer, GitFork, Package, PoundSterling, Euro, Database, ShoppingCart } 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';
|
|
@@ -86249,7 +86249,7 @@ function ChartWidget2({
|
|
|
86249
86249
|
const total = values.reduce((sum, val) => sum + val, 0);
|
|
86250
86250
|
let currentAngle = -90;
|
|
86251
86251
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4 h-full overflow-hidden", children: [
|
|
86252
|
-
/* @__PURE__ */ jsxs("div", { className: "relative w-
|
|
86252
|
+
/* @__PURE__ */ jsxs("div", { className: "relative w-48 h-48 flex-shrink-0", children: [
|
|
86253
86253
|
/* @__PURE__ */ jsxs("svg", { className: "w-full h-full transform", viewBox: "0 0 100 100", children: [
|
|
86254
86254
|
values.map((value, index2) => {
|
|
86255
86255
|
const percentage = value / total * 100;
|
|
@@ -86947,8 +86947,8 @@ function FunnelWidget({
|
|
|
86947
86947
|
children: /* @__PURE__ */ jsx("div", { style: { color }, children: icon })
|
|
86948
86948
|
}
|
|
86949
86949
|
),
|
|
86950
|
-
index2 > 0 && showDropoff && /* @__PURE__ */ jsxs(MoonUIBadgePro, { variant: "destructive", className: "text-xs", children: [
|
|
86951
|
-
/* @__PURE__ */ jsx(TrendingDown, { className: "h-3 w-3
|
|
86950
|
+
index2 > 0 && showDropoff && /* @__PURE__ */ jsxs(MoonUIBadgePro, { variant: "destructive", className: "text-xs flex items-center gap-1", children: [
|
|
86951
|
+
/* @__PURE__ */ jsx(TrendingDown, { className: "h-3 w-3" }),
|
|
86952
86952
|
formatNumber2(stage.dropoffPercentage),
|
|
86953
86953
|
"%"
|
|
86954
86954
|
] })
|
|
@@ -87323,6 +87323,87 @@ function RevenueWidget({
|
|
|
87323
87323
|
] })
|
|
87324
87324
|
] });
|
|
87325
87325
|
};
|
|
87326
|
+
const renderMetrics = () => {
|
|
87327
|
+
if (!data.customerMetrics)
|
|
87328
|
+
return null;
|
|
87329
|
+
const metrics = [
|
|
87330
|
+
{
|
|
87331
|
+
label: "ARPU (Average Revenue Per User)",
|
|
87332
|
+
value: formatCurrency(data.customerMetrics.arpu || 0),
|
|
87333
|
+
icon: /* @__PURE__ */ jsx(Users, { className: "h-4 w-4" }),
|
|
87334
|
+
description: "Average revenue generated per user"
|
|
87335
|
+
},
|
|
87336
|
+
{
|
|
87337
|
+
label: "LTV (Lifetime Value)",
|
|
87338
|
+
value: formatCurrency(data.customerMetrics.ltv || 0),
|
|
87339
|
+
icon: /* @__PURE__ */ jsx(TrendingUp, { className: "h-4 w-4" }),
|
|
87340
|
+
description: "Expected revenue from customer over their lifetime"
|
|
87341
|
+
},
|
|
87342
|
+
{
|
|
87343
|
+
label: "CAC (Customer Acquisition Cost)",
|
|
87344
|
+
value: formatCurrency(data.customerMetrics.cac || 0),
|
|
87345
|
+
icon: /* @__PURE__ */ jsx(ShoppingBag, { className: "h-4 w-4" }),
|
|
87346
|
+
description: "Cost to acquire one new customer"
|
|
87347
|
+
},
|
|
87348
|
+
{
|
|
87349
|
+
label: "Churn Rate",
|
|
87350
|
+
value: `${formatNumber2(data.customerMetrics.churnRate || 0)}%`,
|
|
87351
|
+
icon: /* @__PURE__ */ jsx(TrendingDown, { className: "h-4 w-4" }),
|
|
87352
|
+
description: "Percentage of customers lost per period"
|
|
87353
|
+
},
|
|
87354
|
+
{
|
|
87355
|
+
label: "Retention Rate",
|
|
87356
|
+
value: `${formatNumber2(data.customerMetrics.retentionRate || 0)}%`,
|
|
87357
|
+
icon: /* @__PURE__ */ jsx(Repeat, { className: "h-4 w-4" }),
|
|
87358
|
+
description: "Percentage of customers retained"
|
|
87359
|
+
}
|
|
87360
|
+
];
|
|
87361
|
+
const ltvCacRatio = (data.customerMetrics.ltv || 0) / (data.customerMetrics.cac || 1);
|
|
87362
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
87363
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: metrics.map((metric, index2) => /* @__PURE__ */ jsx(MoonUITooltipProviderPro, { children: /* @__PURE__ */ jsxs(MoonUITooltipPro, { children: [
|
|
87364
|
+
/* @__PURE__ */ jsx(MoonUITooltipTriggerPro, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
87365
|
+
motion.div,
|
|
87366
|
+
{
|
|
87367
|
+
className: "p-4 rounded-lg border bg-card hover:bg-muted/50 transition-colors cursor-help",
|
|
87368
|
+
initial: { opacity: 0, y: 20 },
|
|
87369
|
+
animate: { opacity: 1, y: 0 },
|
|
87370
|
+
transition: { delay: index2 * 0.1 },
|
|
87371
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
87372
|
+
/* @__PURE__ */ jsx("div", { className: "text-muted-foreground", children: metric.icon }),
|
|
87373
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
87374
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: metric.label }),
|
|
87375
|
+
/* @__PURE__ */ jsx("p", { className: "text-lg font-semibold", children: metric.value })
|
|
87376
|
+
] })
|
|
87377
|
+
] })
|
|
87378
|
+
}
|
|
87379
|
+
) }),
|
|
87380
|
+
/* @__PURE__ */ jsx(MoonUITooltipContentPro, { children: /* @__PURE__ */ jsx("p", { children: metric.description }) })
|
|
87381
|
+
] }) }, index2)) }),
|
|
87382
|
+
/* @__PURE__ */ jsxs("div", { className: "p-4 rounded-lg border bg-card", children: [
|
|
87383
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
87384
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
87385
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "LTV/CAC Ratio" }),
|
|
87386
|
+
/* @__PURE__ */ jsx("p", { className: "text-2xl font-bold", children: formatNumber2(ltvCacRatio) })
|
|
87387
|
+
] }),
|
|
87388
|
+
/* @__PURE__ */ jsxs("div", { className: "text-right", children: [
|
|
87389
|
+
/* @__PURE__ */ jsx(
|
|
87390
|
+
MoonUIBadgePro,
|
|
87391
|
+
{
|
|
87392
|
+
variant: ltvCacRatio >= 3 ? "primary" : ltvCacRatio >= 2 ? "secondary" : "destructive",
|
|
87393
|
+
className: "text-xs",
|
|
87394
|
+
children: ltvCacRatio >= 3 ? "Excellent" : ltvCacRatio >= 2 ? "Good" : "Needs Improvement"
|
|
87395
|
+
}
|
|
87396
|
+
),
|
|
87397
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-1", children: "Target: 3:1 or higher" })
|
|
87398
|
+
] })
|
|
87399
|
+
] }),
|
|
87400
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-3", children: [
|
|
87401
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground mb-1", children: "Ratio Progress" }),
|
|
87402
|
+
/* @__PURE__ */ jsx(MoonUIProgressPro, { value: Math.min(100, ltvCacRatio / 5 * 100), className: "h-2" })
|
|
87403
|
+
] })
|
|
87404
|
+
] })
|
|
87405
|
+
] });
|
|
87406
|
+
};
|
|
87326
87407
|
const renderContent = () => {
|
|
87327
87408
|
switch (variant) {
|
|
87328
87409
|
case "compact":
|
|
@@ -87339,7 +87420,7 @@ function RevenueWidget({
|
|
|
87339
87420
|
showBreakdown && renderBreakdown()
|
|
87340
87421
|
] }),
|
|
87341
87422
|
/* @__PURE__ */ jsx(TabsContent, { value: "streams", className: "space-y-4", children: renderStreams() }),
|
|
87342
|
-
/* @__PURE__ */ jsx(TabsContent, { value: "metrics", className: "space-y-4", children:
|
|
87423
|
+
/* @__PURE__ */ jsx(TabsContent, { value: "metrics", className: "space-y-4", children: renderMetrics() })
|
|
87343
87424
|
] });
|
|
87344
87425
|
case "dashboard":
|
|
87345
87426
|
return /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-2 gap-6", children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.28.
|
|
3
|
+
"version": "2.28.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",
|