@moontra/moonui-pro 2.4.6 → 2.5.1
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 +234 -16
- package/dist/index.mjs +2493 -187
- package/package.json +4 -1
- package/src/components/advanced-chart/index.tsx +11 -1
- package/src/components/dashboard/dashboard-grid.tsx +462 -0
- package/src/components/dashboard/demo.tsx +311 -0
- package/src/components/dashboard/index.tsx +691 -275
- package/src/components/dashboard/time-range-picker.tsx +269 -0
- package/src/components/dashboard/types.ts +222 -0
- package/src/components/dashboard/widgets/activity-feed.tsx +344 -0
- package/src/components/dashboard/widgets/chart-widget.tsx +418 -0
- package/src/components/dashboard/widgets/metric-card.tsx +343 -0
- package/src/components/index.ts +6 -3
- package/src/components/sidebar/index.tsx +579 -0
- package/src/components/ui/calendar.tsx +65 -0
- package/src/components/ui/index.ts +12 -0
- package/src/components/ui/scroll-area.tsx +47 -0
- package/src/components/ui/sheet.tsx +139 -0
- package/src/styles/index.css +69 -1
package/dist/index.mjs
CHANGED
|
@@ -3,10 +3,11 @@ import { twMerge } from 'tailwind-merge';
|
|
|
3
3
|
import * as t from 'react';
|
|
4
4
|
import t__default, { useState, useRef, useCallback, forwardRef, createContext, useContext, useMemo, useEffect, useDebugValue, Component, useLayoutEffect } from 'react';
|
|
5
5
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
6
|
-
import { ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Loader2, Minus, Search, ChevronRight, Circle, ChevronUp, Lock, Sparkles, Plus, ChevronLeft, Calendar, Edit, Trash2, Clock, MapPin, User, GripVertical, MessageCircle, Paperclip, Bold as Bold$1, Italic as Italic$1, Underline as Underline$1, Strikethrough, Code as Code$1, Type, Heading1, Heading2, Heading3, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, CheckSquare, Quote, Palette, Highlighter, Link2, Image as Image$1, Table as Table$1, Settings, Undo, Redo, Eye, RefreshCw, Wand2, Maximize, FileText, Languages, TrendingUp, TrendingDown, ZoomOut, ZoomIn, Download, FileSpreadsheet, FileJson, Maximize2, Move,
|
|
6
|
+
import { ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Loader2, Minus, Search, ChevronRight, Circle, ChevronUp, Lock, Sparkles, Plus, ChevronLeft, Calendar as Calendar$1, Edit, Trash2, Clock, MapPin, User, GripVertical, MessageCircle, Paperclip, Bold as Bold$1, Italic as Italic$1, Underline as Underline$1, Strikethrough, Code as Code$1, Type, Heading1, Heading2, Heading3, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, CheckSquare, Quote, Palette, Highlighter, Link2, Image as Image$1, Table as Table$1, Settings, Undo, Redo, Eye, RefreshCw, Wand2, Maximize, FileText, Languages, TrendingUp, TrendingDown, ZoomOut, ZoomIn, Download, FileSpreadsheet, FileJson, Maximize2, Move, Menu, Bell, Edit3, LayoutGrid, Upload, Share2, Save, CheckCircle2, Filter, FileDown, ArrowUp, ArrowDown, ArrowUpDown, ChevronsLeft, ChevronsRight, ExternalLink, CalendarIcon, DollarSign, Users, Github, Star, GitFork, Activity, Server, EyeOff, RotateCw, Zap, Monitor, Timer, Cpu, MemoryStick, HardDrive, Network, CheckCircle, BarChart3, Video, Music, Archive, File, Columns, Sun, Moon, XCircle, Grip, Unlock, Minimize2, Map as Map$1, Target, Pin, MoreVertical, BellOff, ArrowDownRight, ArrowUpRight } from 'lucide-react';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { cva } from 'class-variance-authority';
|
|
9
9
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
10
|
+
import { DayPicker } from 'react-day-picker';
|
|
10
11
|
import { motion, AnimatePresence, useMotionValue, useSpring, useTransform, animate } from 'framer-motion';
|
|
11
12
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
12
13
|
import ReactDOM3 from 'react-dom';
|
|
@@ -16,6 +17,7 @@ import { createDialogScope } from '@radix-ui/react-dialog';
|
|
|
16
17
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
17
18
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
18
19
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
20
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
19
21
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
20
22
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
21
23
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
@@ -25,6 +27,9 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
|
25
27
|
import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js';
|
|
26
28
|
import { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector.js';
|
|
27
29
|
import { ResponsiveContainer, LineChart, Line, RadialBarChart, Tooltip, Legend, RadialBar, RadarChart, PolarGrid, PolarAngleAxis, PolarRadiusAxis, Radar, ScatterChart, CartesianGrid, XAxis, YAxis, Scatter, PieChart, Pie, Cell, AreaChart, Area, ReferenceLine, Brush, BarChart, Bar, ReferenceArea } from 'recharts';
|
|
30
|
+
import { startOfDay, endOfDay, subDays, startOfWeek, endOfWeek, startOfMonth, endOfMonth, format, formatDistanceToNow } from 'date-fns';
|
|
31
|
+
import { WidthProvider, Responsive } from 'react-grid-layout';
|
|
32
|
+
import 'react-grid-layout/css/styles.css';
|
|
28
33
|
import { DragDropContext, Droppable, Draggable } from '@hello-pangea/dnd';
|
|
29
34
|
import { useForm } from 'react-hook-form';
|
|
30
35
|
import { flexRender, useReactTable, getCoreRowModel, getPaginationRowModel, getSortedRowModel, getFilteredRowModel } from '@tanstack/react-table';
|
|
@@ -1746,7 +1751,7 @@ function styleInject(css2, { insertAt } = {}) {
|
|
|
1746
1751
|
}
|
|
1747
1752
|
|
|
1748
1753
|
// src/styles/index.css
|
|
1749
|
-
styleInject(':root {\n --primary-50: 240 249 255;\n --primary-100: 224 242 254;\n --primary-200: 186 230 253;\n --primary-300: 125 211 252;\n --primary-400: 56 189 248;\n --primary-500: 14 165 233;\n --primary-600: 2 132 199;\n --primary-700: 3 105 161;\n --primary-800: 7 89 133;\n --primary-900: 12 74 110;\n --primary-950: 8 47 73;\n --secondary-50: 248 250 252;\n --secondary-100: 241 245 249;\n --secondary-200: 226 232 240;\n --secondary-300: 203 213 225;\n --secondary-400: 148 163 184;\n --secondary-500: 100 116 139;\n --secondary-600: 71 85 105;\n --secondary-700: 51 65 85;\n --secondary-800: 30 41 59;\n --secondary-900: 15 23 42;\n --secondary-950: 2 6 23;\n --success-50: 240 253 244;\n --success-100: 220 252 231;\n --success-200: 187 247 208;\n --success-300: 134 239 172;\n --success-400: 74 222 128;\n --success-500: 34 197 94;\n --success-600: 22 163 74;\n --success-700: 21 128 61;\n --success-800: 22 101 52;\n --success-900: 20 83 45;\n --success-950: 5 46 22;\n --warning-50: 254 252 232;\n --warning-100: 254 249 195;\n --warning-200: 254 240 138;\n --warning-300: 253 224 71;\n --warning-400: 250 204 21;\n --warning-500: 234 179 8;\n --warning-600: 202 138 4;\n --warning-700: 161 98 7;\n --warning-800: 133 77 14;\n --warning-900: 113 63 18;\n --warning-950: 66 32 6;\n --error-50: 254 242 242;\n --error-100: 254 226 226;\n --error-200: 254 202 202;\n --error-300: 252 165 165;\n --error-400: 248 113 113;\n --error-500: 239 68 68;\n --error-600: 220 38 38;\n --error-700: 185 28 28;\n --error-800: 153 27 27;\n --error-900: 127 29 29;\n --error-950: 69 10 10;\n --background: 0 0% 100%;\n --foreground: 222.2 47.4% 11.2%;\n --card: 0 0% 100%;\n --card-foreground: 222.2 47.4% 11.2%;\n --popover: 0 0% 100%;\n --popover-foreground: 222.2 47.4% 11.2%;\n --primary: 222.2 47.4% 11.2%;\n --primary-foreground: 210 40% 98%;\n --secondary: 210 40% 96%;\n --secondary-foreground: 222.2 47.4% 11.2%;\n --muted: 210 40% 96%;\n --muted-foreground: 215.4 16.3% 46.9%;\n --accent: 210 40% 96%;\n --accent-foreground: 222.2 47.4% 11.2%;\n --destructive: 0 100% 50%;\n --destructive-foreground: 210 40% 98%;\n --border: 214.3 31.8% 91.4%;\n --input: 214.3 31.8% 91.4%;\n --ring: 215 20.2% 65.1%;\n --chart-1: 12 76% 61%;\n --chart-2: 173 58% 39%;\n --chart-3: 197 37% 24%;\n --chart-4: 43 74% 66%;\n --chart-5: 27 87% 67%;\n --font-sans:\n "Inter",\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif;\n --font-serif:\n "Crimson Text",\n Georgia,\n "Times New Roman",\n serif;\n --font-mono:\n "JetBrains Mono",\n "Fira Code",\n "Consolas",\n monospace;\n --text-xs: 0.75rem;\n --text-sm: 0.875rem;\n --text-base: 1rem;\n --text-lg: 1.125rem;\n --text-xl: 1.25rem;\n --text-2xl: 1.5rem;\n --text-3xl: 1.875rem;\n --text-4xl: 2.25rem;\n --text-5xl: 3rem;\n --text-6xl: 3.75rem;\n --text-7xl: 4.5rem;\n --text-8xl: 6rem;\n --text-9xl: 8rem;\n --leading-none: 1;\n --leading-tight: 1.25;\n --leading-snug: 1.375;\n --leading-normal: 1.5;\n --leading-relaxed: 1.625;\n --leading-loose: 2;\n --font-thin: 100;\n --font-extralight: 200;\n --font-light: 300;\n --font-normal: 400;\n --font-medium: 500;\n --font-semibold: 600;\n --font-bold: 700;\n --font-extrabold: 800;\n --font-black: 900;\n --spacing-0: 0;\n --spacing-px: 1px;\n --spacing-0-5: 0.125rem;\n --spacing-1: 0.25rem;\n --spacing-1-5: 0.375rem;\n --spacing-2: 0.5rem;\n --spacing-2-5: 0.625rem;\n --spacing-3: 0.75rem;\n --spacing-3-5: 0.875rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-7: 1.75rem;\n --spacing-8: 2rem;\n --spacing-9: 2.25rem;\n --spacing-10: 2.5rem;\n --spacing-11: 2.75rem;\n --spacing-12: 3rem;\n --spacing-14: 3.5rem;\n --spacing-16: 4rem;\n --spacing-20: 5rem;\n --spacing-24: 6rem;\n --spacing-28: 7rem;\n --spacing-32: 8rem;\n --spacing-36: 9rem;\n --spacing-40: 10rem;\n --spacing-44: 11rem;\n --spacing-48: 12rem;\n --spacing-52: 13rem;\n --spacing-56: 14rem;\n --spacing-60: 15rem;\n --spacing-64: 16rem;\n --spacing-72: 18rem;\n --spacing-80: 20rem;\n --spacing-96: 24rem;\n --radius-none: 0;\n --radius-sm: 0.125rem;\n --radius-base: 0.25rem;\n --radius-md: 0.375rem;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-3xl: 1.5rem;\n --radius-full: 9999px;\n --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);\n --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);\n --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);\n --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);\n --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);\n --shadow-none: 0 0 #0000;\n --elevation-0: var(--shadow-none);\n --elevation-1: var(--shadow-sm);\n --elevation-2: var(--shadow-base);\n --elevation-3: var(--shadow-md);\n --elevation-4: var(--shadow-lg);\n --elevation-5: var(--shadow-xl);\n --elevation-6: var(--shadow-2xl);\n --duration-75: 75ms;\n --duration-100: 100ms;\n --duration-150: 150ms;\n --duration-200: 200ms;\n --duration-300: 300ms;\n --duration-500: 500ms;\n --duration-700: 700ms;\n --duration-1000: 1000ms;\n --ease-linear: linear;\n --ease-in: cubic-bezier(0.4, 0, 1, 1);\n --ease-out: cubic-bezier(0, 0, 0.2, 1);\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);\n --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);\n --animate-fade-in: fadeIn var(--duration-300) var(--ease-out);\n --animate-fade-out: fadeOut var(--duration-300) var(--ease-in);\n --animate-slide-in-up: slideInUp var(--duration-300) var(--ease-out);\n --animate-slide-in-down: slideInDown var(--duration-300) var(--ease-out);\n --animate-slide-in-left: slideInLeft var(--duration-300) var(--ease-out);\n --animate-slide-in-right: slideInRight var(--duration-300) var(--ease-out);\n --animate-scale-in: scaleIn var(--duration-200) var(--ease-out);\n --animate-scale-out: scaleOut var(--duration-200) var(--ease-in);\n --animate-bounce: bounce var(--duration-500) var(--ease-bounce);\n --animate-pulse: pulse var(--duration-1000) var(--ease-in-out) infinite;\n --animate-spin: spin var(--duration-1000) var(--ease-linear) infinite;\n --breakpoint-sm: 640px;\n --breakpoint-md: 768px;\n --breakpoint-lg: 1024px;\n --breakpoint-xl: 1280px;\n --breakpoint-2xl: 1536px;\n --container-sm: 640px;\n --container-md: 768px;\n --container-lg: 1024px;\n --container-xl: 1280px;\n --container-2xl: 1536px;\n --z-0: 0;\n --z-10: 10;\n --z-20: 20;\n --z-30: 30;\n --z-40: 40;\n --z-50: 50;\n --z-auto: auto;\n --z-dropdown: 1000;\n --z-sticky: 1020;\n --z-fixed: 1030;\n --z-modal-backdrop: 1040;\n --z-modal: 1050;\n --z-popover: 1060;\n --z-tooltip: 1070;\n --z-toast: 1080;\n --button-height-sm: 2rem;\n --button-height-md: 2.5rem;\n --button-height-lg: 3rem;\n --button-height-xl: 3.5rem;\n --button-padding-sm: 0.5rem 0.75rem;\n --button-padding-md: 0.625rem 1rem;\n --button-padding-lg: 0.75rem 1.25rem;\n --button-padding-xl: 1rem 1.5rem;\n --button-font-size-sm: var(--text-sm);\n --button-font-size-md: var(--text-base);\n --button-font-size-lg: var(--text-lg);\n --button-font-size-xl: var(--text-xl);\n --input-height-sm: 2rem;\n --input-height-md: 2.5rem;\n --input-height-lg: 3rem;\n --input-height-xl: 3.5rem;\n --input-padding-sm: 0.5rem 0.75rem;\n --input-padding-md: 0.625rem 1rem;\n --input-padding-lg: 0.75rem 1.25rem;\n --input-padding-xl: 1rem 1.5rem;\n --input-border-width: 1px;\n --input-border-radius: var(--radius-md);\n --input-focus-ring-width: 2px;\n --input-focus-ring-offset: 2px;\n --card-padding-sm: 1rem;\n --card-padding-md: 1.5rem;\n --card-padding-lg: 2rem;\n --card-padding-xl: 2.5rem;\n --card-border-radius: var(--radius-lg);\n --card-border-width: 1px;\n --card-shadow: var(--elevation-1);\n --card-hover-shadow: var(--elevation-2);\n}\n.dark {\n --background: 224 71% 4%;\n --foreground: 213 31% 91%;\n --card: 224 71% 4%;\n --card-foreground: 213 31% 91%;\n --popover: 224 71% 4%;\n --popover-foreground: 213 31% 91%;\n --primary: 210 40% 98%;\n --primary-foreground: 222.2 47.4% 1.2%;\n --secondary: 222.2 84% 4.9%;\n --secondary-foreground: 210 40% 98%;\n --muted: 223 47% 11%;\n --muted-foreground: 215.4 16.3% 56.9%;\n --accent: 216 34% 17%;\n --accent-foreground: 210 40% 98%;\n --destructive: 0 63% 31%;\n --destructive-foreground: 210 40% 98%;\n --border: 216 34% 17%;\n --input: 216 34% 17%;\n --ring: 216 34% 17%;\n --chart-1: 220 70% 50%;\n --chart-2: 160 60% 45%;\n --chart-3: 30 80% 55%;\n --chart-4: 280 65% 60%;\n --chart-5: 340 75% 55%;\n}\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes slideInUp {\n from {\n transform: translateY(100%);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n}\n@keyframes slideInDown {\n from {\n transform: translateY(-100%);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n}\n@keyframes slideInLeft {\n from {\n transform: translateX(-100%);\n opacity: 0;\n }\n to {\n transform: translateX(0);\n opacity: 1;\n }\n}\n@keyframes slideInRight {\n from {\n transform: translateX(100%);\n opacity: 0;\n }\n to {\n transform: translateX(0);\n opacity: 1;\n }\n}\n@keyframes scaleIn {\n from {\n transform: scale(0.95);\n opacity: 0;\n }\n to {\n transform: scale(1);\n opacity: 1;\n }\n}\n@keyframes scaleOut {\n from {\n transform: scale(1);\n opacity: 1;\n }\n to {\n transform: scale(0.95);\n opacity: 0;\n }\n}\n@keyframes bounce {\n 0%, 20%, 53%, 80%, 100% {\n transform: translate3d(0, 0, 0);\n }\n 40%, 43% {\n transform: translate3d(0, -30px, 0);\n }\n 70% {\n transform: translate3d(0, -15px, 0);\n }\n 90% {\n transform: translate3d(0, -4px, 0);\n }\n}\n@keyframes pulse {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n.animate-fade-in {\n animation: var(--animate-fade-in);\n}\n.animate-fade-out {\n animation: var(--animate-fade-out);\n}\n.animate-slide-in-up {\n animation: var(--animate-slide-in-up);\n}\n.animate-slide-in-down {\n animation: var(--animate-slide-in-down);\n}\n.animate-slide-in-left {\n animation: var(--animate-slide-in-left);\n}\n.animate-slide-in-right {\n animation: var(--animate-slide-in-right);\n}\n.animate-scale-in {\n animation: var(--animate-scale-in);\n}\n.animate-scale-out {\n animation: var(--animate-scale-out);\n}\n.animate-bounce {\n animation: var(--animate-bounce);\n}\n.animate-pulse {\n animation: var(--animate-pulse);\n}\n.animate-spin {\n animation: var(--animate-spin);\n}\n@media (max-width: 639px) {\n .container {\n max-width: 100%;\n }\n}\n@media (min-width: 640px) {\n .container {\n max-width: var(--container-sm);\n }\n}\n@media (min-width: 768px) {\n .container {\n max-width: var(--container-md);\n }\n}\n@media (min-width: 1024px) {\n .container {\n max-width: var(--container-lg);\n }\n}\n@media (min-width: 1280px) {\n .container {\n max-width: var(--container-xl);\n }\n}\n@media (min-width: 1536px) {\n .container {\n max-width: var(--container-2xl);\n }\n}\n:root {\n --bg-base: var(--background);\n --bg-subtle: var(--gray-50);\n --bg-muted: var(--gray-100);\n --bg-emphasis: var(--gray-200);\n --bg-inverse: var(--foreground);\n --surface-base: var(--background);\n --surface-overlay: var(--gray-50);\n --surface-raised: var(--background);\n --surface-sunken: var(--gray-100);\n --text-primary: var(--foreground);\n --text-secondary: var(--gray-600);\n --text-tertiary: var(--gray-500);\n --text-disabled: var(--gray-400);\n --text-inverse: var(--background);\n --text-link: var(--primary);\n --text-link-hover: var(--primary-hover);\n --brand-primary: var(--primary);\n --brand-primary-hover: var(--primary-hover);\n --brand-primary-active: var(--primary-active);\n --brand-secondary: var(--secondary);\n --state-hover: var(--gray-100);\n --state-active: var(--gray-200);\n --state-selected: var(--primary);\n --state-disabled: var(--gray-300);\n --state-focus: var(--primary);\n --feedback-success: var(--success);\n --feedback-success-light: 142 71% 95%;\n --feedback-success-dark: 142 71% 35%;\n --feedback-warning: var(--warning);\n --feedback-warning-light: 38 92% 95%;\n --feedback-warning-dark: 38 92% 40%;\n --feedback-error: var(--error);\n --feedback-error-light: 0 84% 95%;\n --feedback-error-dark: 0 84% 50%;\n --feedback-info: 217 91% 60%;\n --feedback-info-light: 217 91% 95%;\n --feedback-info-dark: 217 91% 50%;\n --border-default: var(--border);\n --border-subtle: var(--gray-200);\n --border-strong: var(--gray-400);\n --border-interactive: var(--primary);\n --border-error: var(--error);\n --border-success: var(--success);\n --border-warning: var(--warning);\n --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --shadow-primary: 0 4px 14px 0 hsl(var(--primary) / 0.3);\n --shadow-success: 0 4px 14px 0 hsl(var(--success) / 0.3);\n --shadow-error: 0 4px 14px 0 hsl(var(--error) / 0.3);\n --shadow-warning: 0 4px 14px 0 hsl(var(--warning) / 0.3);\n --shadow-inner-xs: inset 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --shadow-inner-sm: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);\n --shadow-inner-md: inset 0 4px 6px -1px rgb(0 0 0 / 0.1);\n --ease-linear: linear;\n --ease-in: cubic-bezier(0.4, 0, 1, 1);\n --ease-out: cubic-bezier(0, 0, 0.2, 1);\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);\n --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);\n --ease-back-in: cubic-bezier(0.6, -0.28, 0.735, 0.045);\n --ease-back-out: cubic-bezier(0.175, 0.885, 0.32, 1.275);\n --ease-back-in-out: cubic-bezier(0.68, -0.55, 0.265, 1.55);\n --duration-instant: 0ms;\n --duration-fast: 150ms;\n --duration-normal: 250ms;\n --duration-slow: 350ms;\n --duration-slower: 500ms;\n --duration-slowest: 750ms;\n --space-0: 0;\n --space-px: 1px;\n --space-0\\.5: 0.125rem;\n --space-1: 0.25rem;\n --space-1\\.5: 0.375rem;\n --space-2: 0.5rem;\n --space-2\\.5: 0.625rem;\n --space-3: 0.75rem;\n --space-3\\.5: 0.875rem;\n --space-4: 1rem;\n --space-5: 1.25rem;\n --space-6: 1.5rem;\n --space-7: 1.75rem;\n --space-8: 2rem;\n --space-9: 2.25rem;\n --space-10: 2.5rem;\n --space-11: 2.75rem;\n --space-12: 3rem;\n --space-14: 3.5rem;\n --space-16: 4rem;\n --space-20: 5rem;\n --space-24: 6rem;\n --space-28: 7rem;\n --space-32: 8rem;\n --space-36: 9rem;\n --space-40: 10rem;\n --space-44: 11rem;\n --space-48: 12rem;\n --space-52: 13rem;\n --space-56: 14rem;\n --space-60: 15rem;\n --space-64: 16rem;\n --space-72: 18rem;\n --space-80: 20rem;\n --space-96: 24rem;\n --text-2xs: 0.625rem;\n --text-xs: 0.75rem;\n --text-sm: 0.875rem;\n --text-base: 1rem;\n --text-lg: 1.125rem;\n --text-xl: 1.25rem;\n --text-2xl: 1.5rem;\n --text-3xl: 1.875rem;\n --text-4xl: 2.25rem;\n --text-5xl: 3rem;\n --text-6xl: 3.75rem;\n --text-7xl: 4.5rem;\n --text-8xl: 6rem;\n --text-9xl: 8rem;\n --leading-none: 1;\n --leading-tight: 1.25;\n --leading-snug: 1.375;\n --leading-normal: 1.5;\n --leading-relaxed: 1.625;\n --leading-loose: 2;\n --tracking-tighter: -0.05em;\n --tracking-tight: -0.025em;\n --tracking-normal: 0;\n --tracking-wide: 0.025em;\n --tracking-wider: 0.05em;\n --tracking-widest: 0.1em;\n --font-thin: 100;\n --font-extralight: 200;\n --font-light: 300;\n --font-normal: 400;\n --font-medium: 500;\n --font-semibold: 600;\n --font-bold: 700;\n --font-extrabold: 800;\n --font-black: 900;\n --radius-none: 0;\n --radius-sm: 0.125rem;\n --radius-base: 0.25rem;\n --radius-md: 0.375rem;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-3xl: 1.5rem;\n --radius-full: 9999px;\n --z-0: 0;\n --z-10: 10;\n --z-20: 20;\n --z-30: 30;\n --z-40: 40;\n --z-50: 50;\n --z-dropdown: 1000;\n --z-sticky: 1020;\n --z-fixed: 1030;\n --z-modal-backdrop: 1040;\n --z-modal: 1050;\n --z-popover: 1060;\n --z-tooltip: 1070;\n --z-notification: 1080;\n --blur-none: 0;\n --blur-sm: 4px;\n --blur-base: 8px;\n --blur-md: 12px;\n --blur-lg: 16px;\n --blur-xl: 24px;\n --blur-2xl: 40px;\n --blur-3xl: 64px;\n}\n.dark {\n --bg-base: var(--background);\n --bg-subtle: var(--gray-800);\n --bg-muted: var(--gray-700);\n --bg-emphasis: var(--gray-600);\n --surface-overlay: var(--gray-800);\n --surface-raised: var(--gray-800);\n --surface-sunken: var(--background);\n --text-secondary: var(--gray-400);\n --text-tertiary: var(--gray-500);\n --text-disabled: var(--gray-600);\n --state-hover: var(--gray-700);\n --state-active: var(--gray-600);\n --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.3);\n --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.3);\n --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);\n --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);\n --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.3);\n --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.5);\n}\n.shadow-xs {\n box-shadow: var(--shadow-xs);\n}\n.shadow-sm {\n box-shadow: var(--shadow-sm);\n}\n.shadow-md {\n box-shadow: var(--shadow-md);\n}\n.shadow-lg {\n box-shadow: var(--shadow-lg);\n}\n.shadow-xl {\n box-shadow: var(--shadow-xl);\n}\n.shadow-2xl {\n box-shadow: var(--shadow-2xl);\n}\n.shadow-primary {\n box-shadow: var(--shadow-primary);\n}\n.shadow-success {\n box-shadow: var(--shadow-success);\n}\n.shadow-error {\n box-shadow: var(--shadow-error);\n}\n.shadow-warning {\n box-shadow: var(--shadow-warning);\n}\n.shadow-inner-xs {\n box-shadow: var(--shadow-inner-xs);\n}\n.shadow-inner-sm {\n box-shadow: var(--shadow-inner-sm);\n}\n.shadow-inner-md {\n box-shadow: var(--shadow-inner-md);\n}\n.animate-none {\n animation: none;\n}\n.animate-spin {\n animation: spin 1s linear infinite;\n}\n.animate-ping {\n animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;\n}\n.animate-pulse {\n animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n.animate-bounce {\n animation: bounce 1s infinite;\n}\n.animate-fade-in {\n animation: fadeIn var(--duration-normal) var(--ease-out);\n}\n.animate-fade-out {\n animation: fadeOut var(--duration-normal) var(--ease-out);\n}\n.animate-slide-in {\n animation: slideIn var(--duration-normal) var(--ease-out);\n}\n.animate-scale-in {\n animation: scaleIn var(--duration-normal) var(--ease-out);\n}\n.transition-none {\n transition: none;\n}\n.transition-all {\n transition-property: all;\n}\n.transition-colors {\n transition-property:\n color,\n background-color,\n border-color,\n text-decoration-color,\n fill,\n stroke;\n}\n.transition-opacity {\n transition-property: opacity;\n}\n.transition-shadow {\n transition-property: box-shadow;\n}\n.transition-transform {\n transition-property: transform;\n}\n.duration-instant {\n transition-duration: var(--duration-instant);\n}\n.duration-fast {\n transition-duration: var(--duration-fast);\n}\n.duration-normal {\n transition-duration: var(--duration-normal);\n}\n.duration-slow {\n transition-duration: var(--duration-slow);\n}\n.duration-slower {\n transition-duration: var(--duration-slower);\n}\n.duration-slowest {\n transition-duration: var(--duration-slowest);\n}\n.ease-linear {\n transition-timing-function: var(--ease-linear);\n}\n.ease-in {\n transition-timing-function: var(--ease-in);\n}\n.ease-out {\n transition-timing-function: var(--ease-out);\n}\n.ease-in-out {\n transition-timing-function: var(--ease-in-out);\n}\n.ease-bounce {\n transition-timing-function: var(--ease-bounce);\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n@keyframes pulse {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: .5;\n }\n}\n@keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n animation-timing-function: cubic-bezier(0.8, 0, 1, 1);\n }\n 50% {\n transform: translateY(0);\n animation-timing-function: cubic-bezier(0, 0, 0.2, 1);\n }\n}\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes slideIn {\n from {\n transform: translateX(-100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@keyframes scaleIn {\n from {\n transform: scale(0.95);\n opacity: 0;\n }\n to {\n transform: scale(1);\n opacity: 1;\n }\n}\n.chart-animate-in {\n animation: chartFadeIn 0.5s ease-out;\n}\n.chart-point-pulse {\n animation: pointPulse 2s ease-in-out infinite;\n}\n.chart-gradient-shift {\n animation: gradientShift 3s ease-in-out infinite;\n}\n.recharts-tooltip-wrapper {\n outline: none !important;\n}\n.recharts-tooltip-cursor {\n fill: hsl(var(--muted) / 0.1);\n}\n.recharts-legend-item {\n cursor: pointer;\n transition: all 0.2s ease;\n}\n.recharts-legend-item:hover {\n transform: translateY(-1px);\n}\n.recharts-line-curve,\n.recharts-area-curve {\n transition: all 0.3s ease;\n}\n.recharts-bar-rectangle {\n transition: all 0.2s ease;\n}\n.recharts-bar-rectangle:hover {\n filter: brightness(1.1);\n}\n.recharts-pie-sector {\n transition: all 0.2s ease;\n cursor: pointer;\n}\n.recharts-pie-sector:hover {\n filter: brightness(1.1);\n transform: scale(1.02);\n}\n.recharts-brush {\n fill: hsl(var(--primary) / 0.1);\n stroke: hsl(var(--primary) / 0.3);\n}\n.recharts-brush-slide {\n fill: hsl(var(--primary) / 0.2);\n fill-opacity: 0.5;\n}\n.recharts-cartesian-grid-horizontal line,\n.recharts-cartesian-grid-vertical line {\n stroke-dasharray: 3 3;\n opacity: 0.3;\n}\n.recharts-xAxis .recharts-cartesian-axis-tick-value,\n.recharts-yAxis .recharts-cartesian-axis-tick-value {\n fill: hsl(var(--muted-foreground));\n font-size: 11px;\n}\n.dark .recharts-tooltip-wrapper {\n filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));\n}\n.dark .recharts-cartesian-grid-horizontal line,\n.dark .recharts-cartesian-grid-vertical line {\n opacity: 0.2;\n}\n.sparkline-chart .recharts-surface {\n overflow: visible !important;\n}\n@keyframes chartSkeletonPulse {\n 0%, 100% {\n opacity: 0.5;\n transform: scaleY(0.8);\n }\n 50% {\n opacity: 1;\n transform: scaleY(1);\n }\n}\n@keyframes chartFadeIn {\n from {\n opacity: 0;\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@keyframes pointPulse {\n 0%, 100% {\n transform: scale(1);\n opacity: 1;\n }\n 50% {\n transform: scale(1.2);\n opacity: 0.8;\n }\n}\n@keyframes gradientShift {\n 0%, 100% {\n stop-opacity: 0.8;\n }\n 50% {\n stop-opacity: 0.4;\n }\n}\n.chart-legend-item {\n position: relative;\n overflow: hidden;\n}\n.chart-legend-item::before {\n content: "";\n position: absolute;\n top: 0;\n left: -100%;\n width: 100%;\n height: 100%;\n background: linear-gradient(90deg, transparent, hsl(var(--primary) / 0.1), transparent);\n transition: left 0.5s ease;\n}\n.chart-legend-item:hover::before {\n left: 100%;\n}\n.chart-crosshair {\n stroke: hsl(var(--muted-foreground));\n stroke-width: 1;\n stroke-dasharray: 5 5;\n opacity: 0.5;\n}\n.chart-minimap {\n border: 1px solid hsl(var(--border));\n border-radius: var(--radius-md);\n background: hsl(var(--background) / 0.8);\n -webkit-backdrop-filter: blur(8px);\n backdrop-filter: blur(8px);\n}\n.chart-export-menu {\n animation: slideDown 0.2s ease-out;\n}\n@keyframes slideDown {\n from {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n.chart-zoom-indicator {\n background: hsl(var(--background) / 0.9);\n -webkit-backdrop-filter: blur(8px);\n backdrop-filter: blur(8px);\n border: 1px solid hsl(var(--border));\n border-radius: var(--radius-full);\n padding: 0.25rem 0.5rem;\n font-size: 0.75rem;\n font-weight: 500;\n}\n.recharts-surface {\n will-change: transform;\n}\n.recharts-line,\n.recharts-area,\n.recharts-bar {\n will-change: opacity, transform;\n}\n@media (max-width: 640px) {\n .recharts-wrapper {\n font-size: 0.875rem;\n }\n .recharts-legend-wrapper {\n margin-top: 1rem !important;\n }\n}\n@media print {\n .chart-controls {\n display: none !important;\n }\n .recharts-tooltip-wrapper {\n display: none !important;\n }\n}\n');
|
|
1754
|
+
styleInject(':root {\n --primary-50: 240 249 255;\n --primary-100: 224 242 254;\n --primary-200: 186 230 253;\n --primary-300: 125 211 252;\n --primary-400: 56 189 248;\n --primary-500: 14 165 233;\n --primary-600: 2 132 199;\n --primary-700: 3 105 161;\n --primary-800: 7 89 133;\n --primary-900: 12 74 110;\n --primary-950: 8 47 73;\n --secondary-50: 248 250 252;\n --secondary-100: 241 245 249;\n --secondary-200: 226 232 240;\n --secondary-300: 203 213 225;\n --secondary-400: 148 163 184;\n --secondary-500: 100 116 139;\n --secondary-600: 71 85 105;\n --secondary-700: 51 65 85;\n --secondary-800: 30 41 59;\n --secondary-900: 15 23 42;\n --secondary-950: 2 6 23;\n --success-50: 240 253 244;\n --success-100: 220 252 231;\n --success-200: 187 247 208;\n --success-300: 134 239 172;\n --success-400: 74 222 128;\n --success-500: 34 197 94;\n --success-600: 22 163 74;\n --success-700: 21 128 61;\n --success-800: 22 101 52;\n --success-900: 20 83 45;\n --success-950: 5 46 22;\n --warning-50: 254 252 232;\n --warning-100: 254 249 195;\n --warning-200: 254 240 138;\n --warning-300: 253 224 71;\n --warning-400: 250 204 21;\n --warning-500: 234 179 8;\n --warning-600: 202 138 4;\n --warning-700: 161 98 7;\n --warning-800: 133 77 14;\n --warning-900: 113 63 18;\n --warning-950: 66 32 6;\n --error-50: 254 242 242;\n --error-100: 254 226 226;\n --error-200: 254 202 202;\n --error-300: 252 165 165;\n --error-400: 248 113 113;\n --error-500: 239 68 68;\n --error-600: 220 38 38;\n --error-700: 185 28 28;\n --error-800: 153 27 27;\n --error-900: 127 29 29;\n --error-950: 69 10 10;\n --background: 0 0% 100%;\n --foreground: 222.2 47.4% 11.2%;\n --card: 0 0% 100%;\n --card-foreground: 222.2 47.4% 11.2%;\n --popover: 0 0% 100%;\n --popover-foreground: 222.2 47.4% 11.2%;\n --primary: 222.2 47.4% 11.2%;\n --primary-foreground: 210 40% 98%;\n --secondary: 210 40% 96%;\n --secondary-foreground: 222.2 47.4% 11.2%;\n --muted: 210 40% 96%;\n --muted-foreground: 215.4 16.3% 46.9%;\n --accent: 210 40% 96%;\n --accent-foreground: 222.2 47.4% 11.2%;\n --destructive: 0 100% 50%;\n --destructive-foreground: 210 40% 98%;\n --border: 214.3 31.8% 91.4%;\n --input: 214.3 31.8% 91.4%;\n --ring: 215 20.2% 65.1%;\n --chart-1: 12 76% 61%;\n --chart-2: 173 58% 39%;\n --chart-3: 197 37% 24%;\n --chart-4: 43 74% 66%;\n --chart-5: 27 87% 67%;\n --font-sans:\n "Inter",\n -apple-system,\n BlinkMacSystemFont,\n "Segoe UI",\n Roboto,\n "Helvetica Neue",\n Arial,\n sans-serif;\n --font-serif:\n "Crimson Text",\n Georgia,\n "Times New Roman",\n serif;\n --font-mono:\n "JetBrains Mono",\n "Fira Code",\n "Consolas",\n monospace;\n --text-xs: 0.75rem;\n --text-sm: 0.875rem;\n --text-base: 1rem;\n --text-lg: 1.125rem;\n --text-xl: 1.25rem;\n --text-2xl: 1.5rem;\n --text-3xl: 1.875rem;\n --text-4xl: 2.25rem;\n --text-5xl: 3rem;\n --text-6xl: 3.75rem;\n --text-7xl: 4.5rem;\n --text-8xl: 6rem;\n --text-9xl: 8rem;\n --leading-none: 1;\n --leading-tight: 1.25;\n --leading-snug: 1.375;\n --leading-normal: 1.5;\n --leading-relaxed: 1.625;\n --leading-loose: 2;\n --font-thin: 100;\n --font-extralight: 200;\n --font-light: 300;\n --font-normal: 400;\n --font-medium: 500;\n --font-semibold: 600;\n --font-bold: 700;\n --font-extrabold: 800;\n --font-black: 900;\n --spacing-0: 0;\n --spacing-px: 1px;\n --spacing-0-5: 0.125rem;\n --spacing-1: 0.25rem;\n --spacing-1-5: 0.375rem;\n --spacing-2: 0.5rem;\n --spacing-2-5: 0.625rem;\n --spacing-3: 0.75rem;\n --spacing-3-5: 0.875rem;\n --spacing-4: 1rem;\n --spacing-5: 1.25rem;\n --spacing-6: 1.5rem;\n --spacing-7: 1.75rem;\n --spacing-8: 2rem;\n --spacing-9: 2.25rem;\n --spacing-10: 2.5rem;\n --spacing-11: 2.75rem;\n --spacing-12: 3rem;\n --spacing-14: 3.5rem;\n --spacing-16: 4rem;\n --spacing-20: 5rem;\n --spacing-24: 6rem;\n --spacing-28: 7rem;\n --spacing-32: 8rem;\n --spacing-36: 9rem;\n --spacing-40: 10rem;\n --spacing-44: 11rem;\n --spacing-48: 12rem;\n --spacing-52: 13rem;\n --spacing-56: 14rem;\n --spacing-60: 15rem;\n --spacing-64: 16rem;\n --spacing-72: 18rem;\n --spacing-80: 20rem;\n --spacing-96: 24rem;\n --radius-none: 0;\n --radius-sm: 0.125rem;\n --radius-base: 0.25rem;\n --radius-md: 0.375rem;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-3xl: 1.5rem;\n --radius-full: 9999px;\n --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);\n --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);\n --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);\n --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);\n --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);\n --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);\n --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);\n --shadow-none: 0 0 #0000;\n --elevation-0: var(--shadow-none);\n --elevation-1: var(--shadow-sm);\n --elevation-2: var(--shadow-base);\n --elevation-3: var(--shadow-md);\n --elevation-4: var(--shadow-lg);\n --elevation-5: var(--shadow-xl);\n --elevation-6: var(--shadow-2xl);\n --duration-75: 75ms;\n --duration-100: 100ms;\n --duration-150: 150ms;\n --duration-200: 200ms;\n --duration-300: 300ms;\n --duration-500: 500ms;\n --duration-700: 700ms;\n --duration-1000: 1000ms;\n --ease-linear: linear;\n --ease-in: cubic-bezier(0.4, 0, 1, 1);\n --ease-out: cubic-bezier(0, 0, 0.2, 1);\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);\n --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);\n --animate-fade-in: fadeIn var(--duration-300) var(--ease-out);\n --animate-fade-out: fadeOut var(--duration-300) var(--ease-in);\n --animate-slide-in-up: slideInUp var(--duration-300) var(--ease-out);\n --animate-slide-in-down: slideInDown var(--duration-300) var(--ease-out);\n --animate-slide-in-left: slideInLeft var(--duration-300) var(--ease-out);\n --animate-slide-in-right: slideInRight var(--duration-300) var(--ease-out);\n --animate-scale-in: scaleIn var(--duration-200) var(--ease-out);\n --animate-scale-out: scaleOut var(--duration-200) var(--ease-in);\n --animate-bounce: bounce var(--duration-500) var(--ease-bounce);\n --animate-pulse: pulse var(--duration-1000) var(--ease-in-out) infinite;\n --animate-spin: spin var(--duration-1000) var(--ease-linear) infinite;\n --breakpoint-sm: 640px;\n --breakpoint-md: 768px;\n --breakpoint-lg: 1024px;\n --breakpoint-xl: 1280px;\n --breakpoint-2xl: 1536px;\n --container-sm: 640px;\n --container-md: 768px;\n --container-lg: 1024px;\n --container-xl: 1280px;\n --container-2xl: 1536px;\n --z-0: 0;\n --z-10: 10;\n --z-20: 20;\n --z-30: 30;\n --z-40: 40;\n --z-50: 50;\n --z-auto: auto;\n --z-dropdown: 1000;\n --z-sticky: 1020;\n --z-fixed: 1030;\n --z-modal-backdrop: 1040;\n --z-modal: 1050;\n --z-popover: 1060;\n --z-tooltip: 1070;\n --z-toast: 1080;\n --button-height-sm: 2rem;\n --button-height-md: 2.5rem;\n --button-height-lg: 3rem;\n --button-height-xl: 3.5rem;\n --button-padding-sm: 0.5rem 0.75rem;\n --button-padding-md: 0.625rem 1rem;\n --button-padding-lg: 0.75rem 1.25rem;\n --button-padding-xl: 1rem 1.5rem;\n --button-font-size-sm: var(--text-sm);\n --button-font-size-md: var(--text-base);\n --button-font-size-lg: var(--text-lg);\n --button-font-size-xl: var(--text-xl);\n --input-height-sm: 2rem;\n --input-height-md: 2.5rem;\n --input-height-lg: 3rem;\n --input-height-xl: 3.5rem;\n --input-padding-sm: 0.5rem 0.75rem;\n --input-padding-md: 0.625rem 1rem;\n --input-padding-lg: 0.75rem 1.25rem;\n --input-padding-xl: 1rem 1.5rem;\n --input-border-width: 1px;\n --input-border-radius: var(--radius-md);\n --input-focus-ring-width: 2px;\n --input-focus-ring-offset: 2px;\n --card-padding-sm: 1rem;\n --card-padding-md: 1.5rem;\n --card-padding-lg: 2rem;\n --card-padding-xl: 2.5rem;\n --card-border-radius: var(--radius-lg);\n --card-border-width: 1px;\n --card-shadow: var(--elevation-1);\n --card-hover-shadow: var(--elevation-2);\n}\n.dark {\n --background: 224 71% 4%;\n --foreground: 213 31% 91%;\n --card: 224 71% 4%;\n --card-foreground: 213 31% 91%;\n --popover: 224 71% 4%;\n --popover-foreground: 213 31% 91%;\n --primary: 210 40% 98%;\n --primary-foreground: 222.2 47.4% 1.2%;\n --secondary: 222.2 84% 4.9%;\n --secondary-foreground: 210 40% 98%;\n --muted: 223 47% 11%;\n --muted-foreground: 215.4 16.3% 56.9%;\n --accent: 216 34% 17%;\n --accent-foreground: 210 40% 98%;\n --destructive: 0 63% 31%;\n --destructive-foreground: 210 40% 98%;\n --border: 216 34% 17%;\n --input: 216 34% 17%;\n --ring: 216 34% 17%;\n --chart-1: 220 70% 50%;\n --chart-2: 160 60% 45%;\n --chart-3: 30 80% 55%;\n --chart-4: 280 65% 60%;\n --chart-5: 340 75% 55%;\n}\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes slideInUp {\n from {\n transform: translateY(100%);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n}\n@keyframes slideInDown {\n from {\n transform: translateY(-100%);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n}\n@keyframes slideInLeft {\n from {\n transform: translateX(-100%);\n opacity: 0;\n }\n to {\n transform: translateX(0);\n opacity: 1;\n }\n}\n@keyframes slideInRight {\n from {\n transform: translateX(100%);\n opacity: 0;\n }\n to {\n transform: translateX(0);\n opacity: 1;\n }\n}\n@keyframes scaleIn {\n from {\n transform: scale(0.95);\n opacity: 0;\n }\n to {\n transform: scale(1);\n opacity: 1;\n }\n}\n@keyframes scaleOut {\n from {\n transform: scale(1);\n opacity: 1;\n }\n to {\n transform: scale(0.95);\n opacity: 0;\n }\n}\n@keyframes bounce {\n 0%, 20%, 53%, 80%, 100% {\n transform: translate3d(0, 0, 0);\n }\n 40%, 43% {\n transform: translate3d(0, -30px, 0);\n }\n 70% {\n transform: translate3d(0, -15px, 0);\n }\n 90% {\n transform: translate3d(0, -4px, 0);\n }\n}\n@keyframes pulse {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n.animate-fade-in {\n animation: var(--animate-fade-in);\n}\n.animate-fade-out {\n animation: var(--animate-fade-out);\n}\n.animate-slide-in-up {\n animation: var(--animate-slide-in-up);\n}\n.animate-slide-in-down {\n animation: var(--animate-slide-in-down);\n}\n.animate-slide-in-left {\n animation: var(--animate-slide-in-left);\n}\n.animate-slide-in-right {\n animation: var(--animate-slide-in-right);\n}\n.animate-scale-in {\n animation: var(--animate-scale-in);\n}\n.animate-scale-out {\n animation: var(--animate-scale-out);\n}\n.animate-bounce {\n animation: var(--animate-bounce);\n}\n.animate-pulse {\n animation: var(--animate-pulse);\n}\n.animate-spin {\n animation: var(--animate-spin);\n}\n@media (max-width: 639px) {\n .container {\n max-width: 100%;\n }\n}\n@media (min-width: 640px) {\n .container {\n max-width: var(--container-sm);\n }\n}\n@media (min-width: 768px) {\n .container {\n max-width: var(--container-md);\n }\n}\n@media (min-width: 1024px) {\n .container {\n max-width: var(--container-lg);\n }\n}\n@media (min-width: 1280px) {\n .container {\n max-width: var(--container-xl);\n }\n}\n@media (min-width: 1536px) {\n .container {\n max-width: var(--container-2xl);\n }\n}\n:root {\n --bg-base: var(--background);\n --bg-subtle: var(--gray-50);\n --bg-muted: var(--gray-100);\n --bg-emphasis: var(--gray-200);\n --bg-inverse: var(--foreground);\n --surface-base: var(--background);\n --surface-overlay: var(--gray-50);\n --surface-raised: var(--background);\n --surface-sunken: var(--gray-100);\n --text-primary: var(--foreground);\n --text-secondary: var(--gray-600);\n --text-tertiary: var(--gray-500);\n --text-disabled: var(--gray-400);\n --text-inverse: var(--background);\n --text-link: var(--primary);\n --text-link-hover: var(--primary-hover);\n --brand-primary: var(--primary);\n --brand-primary-hover: var(--primary-hover);\n --brand-primary-active: var(--primary-active);\n --brand-secondary: var(--secondary);\n --state-hover: var(--gray-100);\n --state-active: var(--gray-200);\n --state-selected: var(--primary);\n --state-disabled: var(--gray-300);\n --state-focus: var(--primary);\n --feedback-success: var(--success);\n --feedback-success-light: 142 71% 95%;\n --feedback-success-dark: 142 71% 35%;\n --feedback-warning: var(--warning);\n --feedback-warning-light: 38 92% 95%;\n --feedback-warning-dark: 38 92% 40%;\n --feedback-error: var(--error);\n --feedback-error-light: 0 84% 95%;\n --feedback-error-dark: 0 84% 50%;\n --feedback-info: 217 91% 60%;\n --feedback-info-light: 217 91% 95%;\n --feedback-info-dark: 217 91% 50%;\n --border-default: var(--border);\n --border-subtle: var(--gray-200);\n --border-strong: var(--gray-400);\n --border-interactive: var(--primary);\n --border-error: var(--error);\n --border-success: var(--success);\n --border-warning: var(--warning);\n --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);\n --shadow-primary: 0 4px 14px 0 hsl(var(--primary) / 0.3);\n --shadow-success: 0 4px 14px 0 hsl(var(--success) / 0.3);\n --shadow-error: 0 4px 14px 0 hsl(var(--error) / 0.3);\n --shadow-warning: 0 4px 14px 0 hsl(var(--warning) / 0.3);\n --shadow-inner-xs: inset 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --shadow-inner-sm: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);\n --shadow-inner-md: inset 0 4px 6px -1px rgb(0 0 0 / 0.1);\n --ease-linear: linear;\n --ease-in: cubic-bezier(0.4, 0, 1, 1);\n --ease-out: cubic-bezier(0, 0, 0.2, 1);\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);\n --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);\n --ease-back-in: cubic-bezier(0.6, -0.28, 0.735, 0.045);\n --ease-back-out: cubic-bezier(0.175, 0.885, 0.32, 1.275);\n --ease-back-in-out: cubic-bezier(0.68, -0.55, 0.265, 1.55);\n --duration-instant: 0ms;\n --duration-fast: 150ms;\n --duration-normal: 250ms;\n --duration-slow: 350ms;\n --duration-slower: 500ms;\n --duration-slowest: 750ms;\n --space-0: 0;\n --space-px: 1px;\n --space-0\\.5: 0.125rem;\n --space-1: 0.25rem;\n --space-1\\.5: 0.375rem;\n --space-2: 0.5rem;\n --space-2\\.5: 0.625rem;\n --space-3: 0.75rem;\n --space-3\\.5: 0.875rem;\n --space-4: 1rem;\n --space-5: 1.25rem;\n --space-6: 1.5rem;\n --space-7: 1.75rem;\n --space-8: 2rem;\n --space-9: 2.25rem;\n --space-10: 2.5rem;\n --space-11: 2.75rem;\n --space-12: 3rem;\n --space-14: 3.5rem;\n --space-16: 4rem;\n --space-20: 5rem;\n --space-24: 6rem;\n --space-28: 7rem;\n --space-32: 8rem;\n --space-36: 9rem;\n --space-40: 10rem;\n --space-44: 11rem;\n --space-48: 12rem;\n --space-52: 13rem;\n --space-56: 14rem;\n --space-60: 15rem;\n --space-64: 16rem;\n --space-72: 18rem;\n --space-80: 20rem;\n --space-96: 24rem;\n --text-2xs: 0.625rem;\n --text-xs: 0.75rem;\n --text-sm: 0.875rem;\n --text-base: 1rem;\n --text-lg: 1.125rem;\n --text-xl: 1.25rem;\n --text-2xl: 1.5rem;\n --text-3xl: 1.875rem;\n --text-4xl: 2.25rem;\n --text-5xl: 3rem;\n --text-6xl: 3.75rem;\n --text-7xl: 4.5rem;\n --text-8xl: 6rem;\n --text-9xl: 8rem;\n --leading-none: 1;\n --leading-tight: 1.25;\n --leading-snug: 1.375;\n --leading-normal: 1.5;\n --leading-relaxed: 1.625;\n --leading-loose: 2;\n --tracking-tighter: -0.05em;\n --tracking-tight: -0.025em;\n --tracking-normal: 0;\n --tracking-wide: 0.025em;\n --tracking-wider: 0.05em;\n --tracking-widest: 0.1em;\n --font-thin: 100;\n --font-extralight: 200;\n --font-light: 300;\n --font-normal: 400;\n --font-medium: 500;\n --font-semibold: 600;\n --font-bold: 700;\n --font-extrabold: 800;\n --font-black: 900;\n --radius-none: 0;\n --radius-sm: 0.125rem;\n --radius-base: 0.25rem;\n --radius-md: 0.375rem;\n --radius-lg: 0.5rem;\n --radius-xl: 0.75rem;\n --radius-2xl: 1rem;\n --radius-3xl: 1.5rem;\n --radius-full: 9999px;\n --z-0: 0;\n --z-10: 10;\n --z-20: 20;\n --z-30: 30;\n --z-40: 40;\n --z-50: 50;\n --z-dropdown: 1000;\n --z-sticky: 1020;\n --z-fixed: 1030;\n --z-modal-backdrop: 1040;\n --z-modal: 1050;\n --z-popover: 1060;\n --z-tooltip: 1070;\n --z-notification: 1080;\n --blur-none: 0;\n --blur-sm: 4px;\n --blur-base: 8px;\n --blur-md: 12px;\n --blur-lg: 16px;\n --blur-xl: 24px;\n --blur-2xl: 40px;\n --blur-3xl: 64px;\n}\n.dark {\n --bg-base: var(--background);\n --bg-subtle: var(--gray-800);\n --bg-muted: var(--gray-700);\n --bg-emphasis: var(--gray-600);\n --surface-overlay: var(--gray-800);\n --surface-raised: var(--gray-800);\n --surface-sunken: var(--background);\n --text-secondary: var(--gray-400);\n --text-tertiary: var(--gray-500);\n --text-disabled: var(--gray-600);\n --state-hover: var(--gray-700);\n --state-active: var(--gray-600);\n --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.3);\n --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.3);\n --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);\n --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);\n --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.3);\n --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.5);\n}\n.shadow-xs {\n box-shadow: var(--shadow-xs);\n}\n.shadow-sm {\n box-shadow: var(--shadow-sm);\n}\n.shadow-md {\n box-shadow: var(--shadow-md);\n}\n.shadow-lg {\n box-shadow: var(--shadow-lg);\n}\n.shadow-xl {\n box-shadow: var(--shadow-xl);\n}\n.shadow-2xl {\n box-shadow: var(--shadow-2xl);\n}\n.shadow-primary {\n box-shadow: var(--shadow-primary);\n}\n.shadow-success {\n box-shadow: var(--shadow-success);\n}\n.shadow-error {\n box-shadow: var(--shadow-error);\n}\n.shadow-warning {\n box-shadow: var(--shadow-warning);\n}\n.shadow-inner-xs {\n box-shadow: var(--shadow-inner-xs);\n}\n.shadow-inner-sm {\n box-shadow: var(--shadow-inner-sm);\n}\n.shadow-inner-md {\n box-shadow: var(--shadow-inner-md);\n}\n.animate-none {\n animation: none;\n}\n.animate-spin {\n animation: spin 1s linear infinite;\n}\n.animate-ping {\n animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;\n}\n.animate-pulse {\n animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n.animate-bounce {\n animation: bounce 1s infinite;\n}\n.animate-fade-in {\n animation: fadeIn var(--duration-normal) var(--ease-out);\n}\n.animate-fade-out {\n animation: fadeOut var(--duration-normal) var(--ease-out);\n}\n.animate-slide-in {\n animation: slideIn var(--duration-normal) var(--ease-out);\n}\n.animate-scale-in {\n animation: scaleIn var(--duration-normal) var(--ease-out);\n}\n.transition-none {\n transition: none;\n}\n.transition-all {\n transition-property: all;\n}\n.transition-colors {\n transition-property:\n color,\n background-color,\n border-color,\n text-decoration-color,\n fill,\n stroke;\n}\n.transition-opacity {\n transition-property: opacity;\n}\n.transition-shadow {\n transition-property: box-shadow;\n}\n.transition-transform {\n transition-property: transform;\n}\n.duration-instant {\n transition-duration: var(--duration-instant);\n}\n.duration-fast {\n transition-duration: var(--duration-fast);\n}\n.duration-normal {\n transition-duration: var(--duration-normal);\n}\n.duration-slow {\n transition-duration: var(--duration-slow);\n}\n.duration-slower {\n transition-duration: var(--duration-slower);\n}\n.duration-slowest {\n transition-duration: var(--duration-slowest);\n}\n.ease-linear {\n transition-timing-function: var(--ease-linear);\n}\n.ease-in {\n transition-timing-function: var(--ease-in);\n}\n.ease-out {\n transition-timing-function: var(--ease-out);\n}\n.ease-in-out {\n transition-timing-function: var(--ease-in-out);\n}\n.ease-bounce {\n transition-timing-function: var(--ease-bounce);\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes ping {\n 75%, 100% {\n transform: scale(2);\n opacity: 0;\n }\n}\n@keyframes pulse {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: .5;\n }\n}\n@keyframes bounce {\n 0%, 100% {\n transform: translateY(-25%);\n animation-timing-function: cubic-bezier(0.8, 0, 1, 1);\n }\n 50% {\n transform: translateY(0);\n animation-timing-function: cubic-bezier(0, 0, 0.2, 1);\n }\n}\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes slideIn {\n from {\n transform: translateX(-100%);\n }\n to {\n transform: translateX(0);\n }\n}\n@keyframes scaleIn {\n from {\n transform: scale(0.95);\n opacity: 0;\n }\n to {\n transform: scale(1);\n opacity: 1;\n }\n}\n.chart-animate-in {\n animation: chartFadeIn 0.5s ease-out;\n}\n.chart-point-pulse {\n animation: pointPulse 2s ease-in-out infinite;\n}\n.chart-gradient-shift {\n animation: gradientShift 3s ease-in-out infinite;\n}\n.recharts-tooltip-wrapper {\n outline: none !important;\n}\n.recharts-tooltip-cursor {\n fill: hsl(var(--muted) / 0.1);\n}\n.recharts-legend-item {\n cursor: pointer;\n transition: all 0.2s ease;\n}\n.recharts-legend-item:hover {\n transform: translateY(-1px);\n}\n.recharts-line-curve,\n.recharts-area-curve {\n transition: all 0.3s ease;\n}\n.recharts-bar-rectangle {\n transition: all 0.2s ease;\n}\n.recharts-bar-rectangle:hover {\n filter: brightness(1.1);\n}\n.recharts-pie-sector {\n transition: all 0.2s ease;\n cursor: pointer;\n}\n.recharts-pie-sector:hover {\n filter: brightness(1.1);\n transform: scale(1.02);\n}\n.recharts-brush {\n fill: hsl(var(--primary) / 0.1);\n stroke: hsl(var(--primary) / 0.3);\n}\n.recharts-brush-slide {\n fill: hsl(var(--primary) / 0.2);\n fill-opacity: 0.5;\n}\n.recharts-cartesian-grid-horizontal line,\n.recharts-cartesian-grid-vertical line {\n stroke-dasharray: 3 3;\n opacity: 0.3;\n}\n.recharts-xAxis .recharts-cartesian-axis-tick-value,\n.recharts-yAxis .recharts-cartesian-axis-tick-value {\n fill: hsl(var(--muted-foreground));\n font-size: 11px;\n}\n.dark .recharts-tooltip-wrapper {\n filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));\n}\n.dark .recharts-cartesian-grid-horizontal line,\n.dark .recharts-cartesian-grid-vertical line {\n opacity: 0.2;\n}\n.sparkline-chart .recharts-surface {\n overflow: visible !important;\n}\n@keyframes chartSkeletonPulse {\n 0%, 100% {\n opacity: 0.5;\n transform: scaleY(0.8);\n }\n 50% {\n opacity: 1;\n transform: scaleY(1);\n }\n}\n@keyframes chartFadeIn {\n from {\n opacity: 0;\n transform: translateY(10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@keyframes pointPulse {\n 0%, 100% {\n transform: scale(1);\n opacity: 1;\n }\n 50% {\n transform: scale(1.2);\n opacity: 0.8;\n }\n}\n@keyframes gradientShift {\n 0%, 100% {\n stop-opacity: 0.8;\n }\n 50% {\n stop-opacity: 0.4;\n }\n}\n.chart-legend-item {\n position: relative;\n overflow: hidden;\n}\n.chart-legend-item::before {\n content: "";\n position: absolute;\n top: 0;\n left: -100%;\n width: 100%;\n height: 100%;\n background: linear-gradient(90deg, transparent, hsl(var(--primary) / 0.1), transparent);\n transition: left 0.5s ease;\n}\n.chart-legend-item:hover::before {\n left: 100%;\n}\n.chart-crosshair {\n stroke: hsl(var(--muted-foreground));\n stroke-width: 1;\n stroke-dasharray: 5 5;\n opacity: 0.5;\n}\n.chart-minimap {\n border: 1px solid hsl(var(--border));\n border-radius: var(--radius-md);\n background: hsl(var(--background) / 0.8);\n -webkit-backdrop-filter: blur(8px);\n backdrop-filter: blur(8px);\n}\n.chart-export-menu {\n animation: slideDown 0.2s ease-out;\n}\n@keyframes slideDown {\n from {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n.chart-zoom-indicator {\n background: hsl(var(--background) / 0.9);\n -webkit-backdrop-filter: blur(8px);\n backdrop-filter: blur(8px);\n border: 1px solid hsl(var(--border));\n border-radius: var(--radius-full);\n padding: 0.25rem 0.5rem;\n font-size: 0.75rem;\n font-weight: 500;\n}\n.recharts-surface {\n will-change: transform;\n}\n.recharts-line,\n.recharts-area,\n.recharts-bar {\n will-change: opacity, transform;\n}\n@media (max-width: 640px) {\n .recharts-wrapper {\n font-size: 0.875rem;\n }\n .recharts-legend-wrapper {\n margin-top: 1rem !important;\n }\n}\n@media print {\n .chart-controls {\n display: none !important;\n }\n .recharts-tooltip-wrapper {\n display: none !important;\n }\n}\n.react-grid-layout {\n position: relative;\n transition: height 200ms ease;\n}\n.react-grid-item {\n transition: all 200ms ease;\n transition-property:\n left,\n top,\n width,\n height;\n}\n.react-grid-item img {\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n.react-grid-item.cssTransforms {\n transition-property:\n transform,\n width,\n height;\n}\n.react-grid-item.resizing {\n transition: none;\n z-index: 1;\n will-change: width, height;\n}\n.react-grid-item.react-draggable-dragging {\n transition: none;\n z-index: 3;\n will-change: transform;\n}\n.react-grid-item.dropping {\n visibility: hidden;\n}\n.react-grid-item.react-grid-placeholder {\n background: red;\n opacity: 0.2;\n transition-duration: 100ms;\n z-index: 2;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n user-select: none;\n}\n.react-grid-item.react-grid-placeholder.placeholder-resizing {\n transition: none;\n}\n.react-grid-item > .react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n}\n.react-grid-item > .react-resizable-handle::after {\n content: "";\n position: absolute;\n right: 3px;\n bottom: 3px;\n width: 5px;\n height: 5px;\n border-right: 2px solid rgba(0, 0, 0, 0.4);\n border-bottom: 2px solid rgba(0, 0, 0, 0.4);\n}\n.react-resizable-hide > .react-resizable-handle {\n display: none;\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-w,\n.react-grid-item > .react-resizable-handle.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-n,\n.react-grid-item > .react-resizable-handle.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n}\n.react-resizable {\n position: relative;\n}\n.react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-repeat: no-repeat;\n background-origin: content-box;\n box-sizing: border-box;\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+);\n background-position: bottom right;\n padding: 0 3px 3px 0;\n}\n.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n}\n.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n}\n.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n}\n.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n}\n.react-resizable-handle-w,\n.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n}\n.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n}\n.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n}\n.react-resizable-handle-n,\n.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n}\n.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n}\n.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n}\n.react-grid-layout {\n position: relative !important;\n transition: height 200ms ease;\n}\n.react-grid-item {\n transition: all 200ms ease;\n transition-property:\n left,\n top,\n width,\n height;\n}\n.react-grid-item > div {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n.react-grid-item.cssTransforms {\n transition-property:\n transform,\n width,\n height;\n}\n.react-grid-item.resizing {\n transition: none;\n z-index: 1;\n will-change: width, height;\n}\n.react-grid-item.react-draggable-dragging {\n transition: none;\n z-index: 3;\n will-change: transform;\n}\n@media (max-width: 768px) {\n .react-grid-layout {\n overflow-x: hidden !important;\n height: auto !important;\n }\n .react-grid-item {\n position: relative !important;\n transform: none !important;\n margin-bottom: 24px !important;\n width: 100% !important;\n left: 0 !important;\n right: 0 !important;\n }\n .react-grid-item:last-child {\n margin-bottom: 0 !important;\n }\n .react-grid-item.cssTransforms {\n position: relative !important;\n transform: none !important;\n }\n .react-grid-placeholder {\n display: none !important;\n }\n}\n');
|
|
1750
1755
|
function cn(...inputs) {
|
|
1751
1756
|
return twMerge(clsx(inputs));
|
|
1752
1757
|
}
|
|
@@ -2535,6 +2540,56 @@ var MoonUIButtonPro = t.forwardRef(
|
|
|
2535
2540
|
}
|
|
2536
2541
|
);
|
|
2537
2542
|
MoonUIButtonPro.displayName = "MoonUIButtonPro";
|
|
2543
|
+
function Calendar({
|
|
2544
|
+
className,
|
|
2545
|
+
classNames,
|
|
2546
|
+
showOutsideDays = true,
|
|
2547
|
+
...props
|
|
2548
|
+
}) {
|
|
2549
|
+
return /* @__PURE__ */ jsx(
|
|
2550
|
+
DayPicker,
|
|
2551
|
+
{
|
|
2552
|
+
showOutsideDays,
|
|
2553
|
+
className: cn("p-3", className),
|
|
2554
|
+
classNames: {
|
|
2555
|
+
months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
|
|
2556
|
+
month: "space-y-4",
|
|
2557
|
+
caption: "flex justify-center pt-1 relative items-center",
|
|
2558
|
+
caption_label: "text-sm font-medium",
|
|
2559
|
+
nav: "space-x-1 flex items-center",
|
|
2560
|
+
nav_button: cn(
|
|
2561
|
+
moonUIButtonProVariants({ variant: "outline" }),
|
|
2562
|
+
"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
|
|
2563
|
+
),
|
|
2564
|
+
nav_button_previous: "absolute left-1",
|
|
2565
|
+
nav_button_next: "absolute right-1",
|
|
2566
|
+
table: "w-full border-collapse",
|
|
2567
|
+
head_row: "grid grid-cols-7",
|
|
2568
|
+
head_cell: "text-muted-foreground rounded-md w-9 h-9 font-normal text-[0.8rem] flex items-center justify-center",
|
|
2569
|
+
row: "grid grid-cols-7 gap-1 mt-1",
|
|
2570
|
+
cell: "h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",
|
|
2571
|
+
day: cn(
|
|
2572
|
+
moonUIButtonProVariants({ variant: "ghost" }),
|
|
2573
|
+
"h-9 w-9 p-0 font-normal aria-selected:opacity-100"
|
|
2574
|
+
),
|
|
2575
|
+
day_range_end: "day-range-end",
|
|
2576
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
|
|
2577
|
+
day_today: "bg-accent text-accent-foreground",
|
|
2578
|
+
day_outside: "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
|
|
2579
|
+
day_disabled: "text-muted-foreground opacity-50",
|
|
2580
|
+
day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
|
|
2581
|
+
day_hidden: "invisible",
|
|
2582
|
+
...classNames
|
|
2583
|
+
},
|
|
2584
|
+
components: {
|
|
2585
|
+
// IconLeft: () => <ChevronLeft className="h-4 w-4" />,
|
|
2586
|
+
// IconRight: () => <ChevronRight className="h-4 w-4" />,
|
|
2587
|
+
},
|
|
2588
|
+
...props
|
|
2589
|
+
}
|
|
2590
|
+
);
|
|
2591
|
+
}
|
|
2592
|
+
Calendar.displayName = "Calendar";
|
|
2538
2593
|
cva("", {
|
|
2539
2594
|
variants: {
|
|
2540
2595
|
hover: {
|
|
@@ -3791,7 +3846,7 @@ var me = t.forwardRef((r2, o) => {
|
|
|
3791
3846
|
var e;
|
|
3792
3847
|
return Array.from(((e = I.current) == null ? void 0 : e.querySelectorAll(ce)) || []);
|
|
3793
3848
|
}
|
|
3794
|
-
function
|
|
3849
|
+
function X18(e) {
|
|
3795
3850
|
let s = V()[e];
|
|
3796
3851
|
s && E.setState("value", s.getAttribute(T));
|
|
3797
3852
|
}
|
|
@@ -3806,10 +3861,10 @@ var me = t.forwardRef((r2, o) => {
|
|
|
3806
3861
|
s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce);
|
|
3807
3862
|
i ? E.setState("value", i.getAttribute(T)) : Q(e);
|
|
3808
3863
|
}
|
|
3809
|
-
let oe = () =>
|
|
3864
|
+
let oe = () => X18(V().length - 1), ie3 = (e) => {
|
|
3810
3865
|
e.preventDefault(), e.metaKey ? oe() : e.altKey ? re(1) : Q(1);
|
|
3811
3866
|
}, se = (e) => {
|
|
3812
|
-
e.preventDefault(), e.metaKey ?
|
|
3867
|
+
e.preventDefault(), e.metaKey ? X18(0) : e.altKey ? re(-1) : Q(-1);
|
|
3813
3868
|
};
|
|
3814
3869
|
return t.createElement(Primitive2.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
|
|
3815
3870
|
var s;
|
|
@@ -3836,7 +3891,7 @@ var me = t.forwardRef((r2, o) => {
|
|
|
3836
3891
|
break;
|
|
3837
3892
|
}
|
|
3838
3893
|
case "Home": {
|
|
3839
|
-
e.preventDefault(),
|
|
3894
|
+
e.preventDefault(), X18(0);
|
|
3840
3895
|
break;
|
|
3841
3896
|
}
|
|
3842
3897
|
case "End": {
|
|
@@ -5105,6 +5160,36 @@ var MoonUIRadioItemWithLabelPro = t.forwardRef(({
|
|
|
5105
5160
|
] });
|
|
5106
5161
|
});
|
|
5107
5162
|
MoonUIRadioItemWithLabelPro.displayName = "RadioItemWithLabelPro";
|
|
5163
|
+
var ScrollArea = t.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5164
|
+
ScrollAreaPrimitive.Root,
|
|
5165
|
+
{
|
|
5166
|
+
ref,
|
|
5167
|
+
className: cn("relative overflow-hidden", className),
|
|
5168
|
+
...props,
|
|
5169
|
+
children: [
|
|
5170
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
5171
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
5172
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
5173
|
+
]
|
|
5174
|
+
}
|
|
5175
|
+
));
|
|
5176
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
5177
|
+
var ScrollBar = t.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5178
|
+
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
5179
|
+
{
|
|
5180
|
+
ref,
|
|
5181
|
+
orientation,
|
|
5182
|
+
className: cn(
|
|
5183
|
+
"flex touch-none select-none transition-colors",
|
|
5184
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
5185
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
5186
|
+
className
|
|
5187
|
+
),
|
|
5188
|
+
...props,
|
|
5189
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
5190
|
+
}
|
|
5191
|
+
));
|
|
5192
|
+
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
5108
5193
|
var MoonUISelectPro = SelectPrimitive.Root;
|
|
5109
5194
|
MoonUISelectPro.displayName = "MoonUISelectPro";
|
|
5110
5195
|
var MoonUISelectGroupPro = SelectPrimitive.Group;
|
|
@@ -5379,6 +5464,103 @@ var MoonUISeparatorPro = t.forwardRef(
|
|
|
5379
5464
|
)
|
|
5380
5465
|
);
|
|
5381
5466
|
MoonUISeparatorPro.displayName = SeparatorPrimitive.Root.displayName;
|
|
5467
|
+
var Sheet = DialogPrimitive.Root;
|
|
5468
|
+
var SheetTrigger = DialogPrimitive.Trigger;
|
|
5469
|
+
var SheetClose = DialogPrimitive.Close;
|
|
5470
|
+
var SheetPortal = DialogPrimitive.Portal;
|
|
5471
|
+
var SheetOverlay = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5472
|
+
DialogPrimitive.Overlay,
|
|
5473
|
+
{
|
|
5474
|
+
className: cn(
|
|
5475
|
+
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
5476
|
+
className
|
|
5477
|
+
),
|
|
5478
|
+
...props,
|
|
5479
|
+
ref
|
|
5480
|
+
}
|
|
5481
|
+
));
|
|
5482
|
+
SheetOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
5483
|
+
var sheetVariants = cva(
|
|
5484
|
+
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
5485
|
+
{
|
|
5486
|
+
variants: {
|
|
5487
|
+
side: {
|
|
5488
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
5489
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
5490
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
|
5491
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
|
5492
|
+
}
|
|
5493
|
+
},
|
|
5494
|
+
defaultVariants: {
|
|
5495
|
+
side: "right"
|
|
5496
|
+
}
|
|
5497
|
+
}
|
|
5498
|
+
);
|
|
5499
|
+
var SheetContent = t.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
5500
|
+
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
5501
|
+
/* @__PURE__ */ jsxs(
|
|
5502
|
+
DialogPrimitive.Content,
|
|
5503
|
+
{
|
|
5504
|
+
ref,
|
|
5505
|
+
className: cn(sheetVariants({ side }), className),
|
|
5506
|
+
...props,
|
|
5507
|
+
children: [
|
|
5508
|
+
children,
|
|
5509
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
5510
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
5511
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
5512
|
+
] })
|
|
5513
|
+
]
|
|
5514
|
+
}
|
|
5515
|
+
)
|
|
5516
|
+
] }));
|
|
5517
|
+
SheetContent.displayName = DialogPrimitive.Content.displayName;
|
|
5518
|
+
var SheetHeader = ({
|
|
5519
|
+
className,
|
|
5520
|
+
...props
|
|
5521
|
+
}) => /* @__PURE__ */ jsx(
|
|
5522
|
+
"div",
|
|
5523
|
+
{
|
|
5524
|
+
className: cn(
|
|
5525
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
5526
|
+
className
|
|
5527
|
+
),
|
|
5528
|
+
...props
|
|
5529
|
+
}
|
|
5530
|
+
);
|
|
5531
|
+
SheetHeader.displayName = "SheetHeader";
|
|
5532
|
+
var SheetFooter = ({
|
|
5533
|
+
className,
|
|
5534
|
+
...props
|
|
5535
|
+
}) => /* @__PURE__ */ jsx(
|
|
5536
|
+
"div",
|
|
5537
|
+
{
|
|
5538
|
+
className: cn(
|
|
5539
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
5540
|
+
className
|
|
5541
|
+
),
|
|
5542
|
+
...props
|
|
5543
|
+
}
|
|
5544
|
+
);
|
|
5545
|
+
SheetFooter.displayName = "SheetFooter";
|
|
5546
|
+
var SheetTitle = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5547
|
+
DialogPrimitive.Title,
|
|
5548
|
+
{
|
|
5549
|
+
ref,
|
|
5550
|
+
className: cn("text-lg font-semibold text-foreground", className),
|
|
5551
|
+
...props
|
|
5552
|
+
}
|
|
5553
|
+
));
|
|
5554
|
+
SheetTitle.displayName = DialogPrimitive.Title.displayName;
|
|
5555
|
+
var SheetDescription = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5556
|
+
DialogPrimitive.Description,
|
|
5557
|
+
{
|
|
5558
|
+
ref,
|
|
5559
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
5560
|
+
...props
|
|
5561
|
+
}
|
|
5562
|
+
));
|
|
5563
|
+
SheetDescription.displayName = DialogPrimitive.Description.displayName;
|
|
5382
5564
|
function MoonUISkeletonPro({
|
|
5383
5565
|
className,
|
|
5384
5566
|
...props
|
|
@@ -6296,7 +6478,7 @@ var Toggle = t.forwardRef((props, forwardedRef) => {
|
|
|
6296
6478
|
);
|
|
6297
6479
|
});
|
|
6298
6480
|
Toggle.displayName = NAME;
|
|
6299
|
-
var
|
|
6481
|
+
var Root18 = Toggle;
|
|
6300
6482
|
var MoonUItoggleVariantsPro = cva(
|
|
6301
6483
|
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
6302
6484
|
{
|
|
@@ -6318,14 +6500,14 @@ var MoonUItoggleVariantsPro = cva(
|
|
|
6318
6500
|
}
|
|
6319
6501
|
);
|
|
6320
6502
|
var MoonUITogglePro = t.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6321
|
-
|
|
6503
|
+
Root18,
|
|
6322
6504
|
{
|
|
6323
6505
|
ref,
|
|
6324
6506
|
className: cn(MoonUItoggleVariantsPro({ variant, size, className })),
|
|
6325
6507
|
...props
|
|
6326
6508
|
}
|
|
6327
6509
|
));
|
|
6328
|
-
MoonUITogglePro.displayName =
|
|
6510
|
+
MoonUITogglePro.displayName = Root18.displayName;
|
|
6329
6511
|
var MoonUITooltipProviderPro = TooltipPrimitive.Provider;
|
|
6330
6512
|
var tooltipVariants = cva(
|
|
6331
6513
|
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
@@ -7457,7 +7639,7 @@ function EventDialog({
|
|
|
7457
7639
|
return /* @__PURE__ */ jsx(MoonUIDialogPro, { open, onOpenChange, children: /* @__PURE__ */ jsxs(MoonUIDialogContentPro, { className: "sm:max-w-[500px]", children: [
|
|
7458
7640
|
/* @__PURE__ */ jsxs(MoonUIDialogHeaderPro, { children: [
|
|
7459
7641
|
/* @__PURE__ */ jsxs(MoonUIDialogTitlePro, { className: "flex items-center gap-2", children: [
|
|
7460
|
-
/* @__PURE__ */ jsx(Calendar, { className: "w-5 h-5" }),
|
|
7642
|
+
/* @__PURE__ */ jsx(Calendar$1, { className: "w-5 h-5" }),
|
|
7461
7643
|
mode === "create" ? "Create Event" : "Edit Event"
|
|
7462
7644
|
] }),
|
|
7463
7645
|
/* @__PURE__ */ jsx(MoonUIDialogDescriptionPro, { children: mode === "create" ? "Add a new event to your calendar." : "Edit the event details." })
|
|
@@ -7659,7 +7841,7 @@ var EVENT_COLORS = {
|
|
|
7659
7841
|
reminder: "bg-yellow-500",
|
|
7660
7842
|
event: "bg-purple-500"
|
|
7661
7843
|
};
|
|
7662
|
-
function
|
|
7844
|
+
function Calendar3({
|
|
7663
7845
|
events = [],
|
|
7664
7846
|
onEventClick,
|
|
7665
7847
|
onEventAdd,
|
|
@@ -7829,7 +8011,7 @@ function Calendar2({
|
|
|
7829
8011
|
/* @__PURE__ */ jsx(MoonUICardHeaderPro, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
7830
8012
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
7831
8013
|
/* @__PURE__ */ jsxs(MoonUICardTitlePro, { className: "flex items-center gap-2", children: [
|
|
7832
|
-
/* @__PURE__ */ jsx(Calendar, { className: "h-5 w-5" }),
|
|
8014
|
+
/* @__PURE__ */ jsx(Calendar$1, { className: "h-5 w-5" }),
|
|
7833
8015
|
"Calendar"
|
|
7834
8016
|
] }),
|
|
7835
8017
|
/* @__PURE__ */ jsxs(MoonUICardDescriptionPro, { children: [
|
|
@@ -8265,7 +8447,7 @@ function Kanban({
|
|
|
8265
8447
|
"flex items-center gap-1",
|
|
8266
8448
|
isOverdue(card.dueDate) && "text-destructive"
|
|
8267
8449
|
), children: [
|
|
8268
|
-
/* @__PURE__ */ jsx(Calendar, { className: "h-3 w-3" }),
|
|
8450
|
+
/* @__PURE__ */ jsx(Calendar$1, { className: "h-3 w-3" }),
|
|
8269
8451
|
/* @__PURE__ */ jsx("span", { children: formatDate(card.dueDate) })
|
|
8270
8452
|
] })
|
|
8271
8453
|
] }),
|
|
@@ -48887,7 +49069,7 @@ function Timeline({
|
|
|
48887
49069
|
/* @__PURE__ */ jsx("span", { children: event.metadata.duration })
|
|
48888
49070
|
] }),
|
|
48889
49071
|
event.metadata.location && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
48890
|
-
/* @__PURE__ */ jsx(Calendar, { className: "h-3 w-3" }),
|
|
49072
|
+
/* @__PURE__ */ jsx(Calendar$1, { className: "h-3 w-3" }),
|
|
48891
49073
|
/* @__PURE__ */ jsx("span", { children: event.metadata.location })
|
|
48892
49074
|
] }),
|
|
48893
49075
|
event.metadata.comments && event.metadata.comments > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
@@ -49149,14 +49331,18 @@ function AdvancedChart({
|
|
|
49149
49331
|
}, [selectedTheme]);
|
|
49150
49332
|
const gradientId = t__default.useId();
|
|
49151
49333
|
const trend = t__default.useMemo(() => {
|
|
49152
|
-
if (!data.length || !series.length)
|
|
49334
|
+
if (!data || !Array.isArray(data) || !data.length || !series || !Array.isArray(series) || !series.length)
|
|
49153
49335
|
return null;
|
|
49154
49336
|
const firstSeries = series[0];
|
|
49337
|
+
if (!firstSeries || !firstSeries.dataKey)
|
|
49338
|
+
return null;
|
|
49155
49339
|
const values = data.map((d) => Number(d[firstSeries.dataKey])).filter((v) => !isNaN(v));
|
|
49156
49340
|
if (values.length < 2)
|
|
49157
49341
|
return null;
|
|
49158
49342
|
const first2 = values[0];
|
|
49159
49343
|
const last = values[values.length - 1];
|
|
49344
|
+
if (first2 === 0)
|
|
49345
|
+
return null;
|
|
49160
49346
|
const change = (last - first2) / first2 * 100;
|
|
49161
49347
|
return {
|
|
49162
49348
|
direction: change > 0 ? "up" : change < 0 ? "down" : "neutral",
|
|
@@ -49179,9 +49365,9 @@ function AdvancedChart({
|
|
|
49179
49365
|
toggleSeriesVisibility(entry.dataKey);
|
|
49180
49366
|
}
|
|
49181
49367
|
};
|
|
49182
|
-
const handleExport = (
|
|
49368
|
+
const handleExport = (format2) => {
|
|
49183
49369
|
if (onExport) {
|
|
49184
|
-
onExport(
|
|
49370
|
+
onExport(format2);
|
|
49185
49371
|
}
|
|
49186
49372
|
};
|
|
49187
49373
|
const handleZoom = (direction) => {
|
|
@@ -49210,6 +49396,9 @@ function AdvancedChart({
|
|
|
49210
49396
|
);
|
|
49211
49397
|
}) });
|
|
49212
49398
|
const renderChart = () => {
|
|
49399
|
+
if (!data || !Array.isArray(data) || !series || !Array.isArray(series)) {
|
|
49400
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full text-muted-foreground", children: "No data available" });
|
|
49401
|
+
}
|
|
49213
49402
|
const commonProps = {
|
|
49214
49403
|
data,
|
|
49215
49404
|
width: typeof width === "string" ? void 0 : width,
|
|
@@ -49998,43 +50187,147 @@ function AdvancedChart({
|
|
|
49998
50187
|
}
|
|
49999
50188
|
);
|
|
50000
50189
|
}
|
|
50001
|
-
|
|
50002
|
-
|
|
50003
|
-
|
|
50004
|
-
|
|
50005
|
-
danger: "text-red-600",
|
|
50006
|
-
info: "text-purple-600"
|
|
50007
|
-
};
|
|
50008
|
-
var WIDGET_SIZES = {
|
|
50009
|
-
sm: "col-span-1",
|
|
50010
|
-
md: "col-span-2",
|
|
50011
|
-
lg: "col-span-3",
|
|
50012
|
-
xl: "col-span-4"
|
|
50013
|
-
};
|
|
50014
|
-
function Dashboard({
|
|
50015
|
-
metrics = [],
|
|
50016
|
-
widgets = [],
|
|
50017
|
-
onMetricClick,
|
|
50018
|
-
onWidgetAction,
|
|
50190
|
+
function MetricCard({
|
|
50191
|
+
data,
|
|
50192
|
+
onClick,
|
|
50193
|
+
onAction,
|
|
50019
50194
|
className,
|
|
50020
|
-
|
|
50021
|
-
|
|
50022
|
-
|
|
50023
|
-
|
|
50024
|
-
onRefresh,
|
|
50025
|
-
loading = false
|
|
50195
|
+
showSparkline = true,
|
|
50196
|
+
showForecast = false,
|
|
50197
|
+
interactive = true,
|
|
50198
|
+
glassmorphism = false
|
|
50026
50199
|
}) {
|
|
50027
|
-
const [
|
|
50028
|
-
const
|
|
50029
|
-
|
|
50030
|
-
|
|
50031
|
-
|
|
50032
|
-
|
|
50033
|
-
|
|
50034
|
-
|
|
50035
|
-
|
|
50200
|
+
const [isHovered, setIsHovered] = t__default.useState(false);
|
|
50201
|
+
const colorClasses = {
|
|
50202
|
+
primary: "text-blue-600 dark:text-blue-400",
|
|
50203
|
+
success: "text-green-600 dark:text-green-400",
|
|
50204
|
+
warning: "text-yellow-600 dark:text-yellow-400",
|
|
50205
|
+
danger: "text-red-600 dark:text-red-400",
|
|
50206
|
+
info: "text-purple-600 dark:text-purple-400"
|
|
50207
|
+
};
|
|
50208
|
+
const getChangeColor = (type) => {
|
|
50209
|
+
switch (type) {
|
|
50210
|
+
case "increase":
|
|
50211
|
+
return "text-green-600 dark:text-green-400";
|
|
50212
|
+
case "decrease":
|
|
50213
|
+
return "text-red-600 dark:text-red-400";
|
|
50214
|
+
default:
|
|
50215
|
+
return "text-gray-600 dark:text-gray-400";
|
|
50036
50216
|
}
|
|
50037
50217
|
};
|
|
50218
|
+
const getChangeIcon = (type) => {
|
|
50219
|
+
switch (type) {
|
|
50220
|
+
case "increase":
|
|
50221
|
+
return /* @__PURE__ */ jsx(ArrowUpRight, { className: "h-4 w-4" });
|
|
50222
|
+
case "decrease":
|
|
50223
|
+
return /* @__PURE__ */ jsx(ArrowDownRight, { className: "h-4 w-4" });
|
|
50224
|
+
default:
|
|
50225
|
+
return /* @__PURE__ */ jsx(Minus, { className: "h-4 w-4" });
|
|
50226
|
+
}
|
|
50227
|
+
};
|
|
50228
|
+
const renderSparkline = () => {
|
|
50229
|
+
if (!data.sparkline || data.sparkline.length < 2)
|
|
50230
|
+
return null;
|
|
50231
|
+
const max = Math.max(...data.sparkline);
|
|
50232
|
+
const min = Math.min(...data.sparkline);
|
|
50233
|
+
const range = max - min || 1;
|
|
50234
|
+
const points = data.sparkline.map((value, index) => {
|
|
50235
|
+
const x = index / (data.sparkline.length - 1) * 100;
|
|
50236
|
+
const y = 100 - (value - min) / range * 100;
|
|
50237
|
+
return `${x},${y}`;
|
|
50238
|
+
}).join(" ");
|
|
50239
|
+
const gradientId = `gradient-${data.id}`;
|
|
50240
|
+
return /* @__PURE__ */ jsx(
|
|
50241
|
+
motion.div,
|
|
50242
|
+
{
|
|
50243
|
+
className: "absolute bottom-0 left-0 right-0 h-16 overflow-hidden rounded-b-lg opacity-20",
|
|
50244
|
+
initial: { opacity: 0 },
|
|
50245
|
+
animate: { opacity: isHovered ? 0.3 : 0.2 },
|
|
50246
|
+
transition: { duration: 0.2 },
|
|
50247
|
+
children: /* @__PURE__ */ jsxs(
|
|
50248
|
+
"svg",
|
|
50249
|
+
{
|
|
50250
|
+
className: "w-full h-full",
|
|
50251
|
+
viewBox: "0 0 100 100",
|
|
50252
|
+
preserveAspectRatio: "none",
|
|
50253
|
+
children: [
|
|
50254
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "0%", y2: "100%", children: [
|
|
50255
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "currentColor", stopOpacity: "0.3" }),
|
|
50256
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "currentColor", stopOpacity: "0" })
|
|
50257
|
+
] }) }),
|
|
50258
|
+
/* @__PURE__ */ jsx(
|
|
50259
|
+
"polyline",
|
|
50260
|
+
{
|
|
50261
|
+
fill: "none",
|
|
50262
|
+
stroke: "currentColor",
|
|
50263
|
+
strokeWidth: "2",
|
|
50264
|
+
points,
|
|
50265
|
+
className: colorClasses[data.color || "primary"]
|
|
50266
|
+
}
|
|
50267
|
+
),
|
|
50268
|
+
/* @__PURE__ */ jsx(
|
|
50269
|
+
"polygon",
|
|
50270
|
+
{
|
|
50271
|
+
fill: `url(#${gradientId})`,
|
|
50272
|
+
points: `0,100 ${points} 100,100`,
|
|
50273
|
+
className: colorClasses[data.color || "primary"]
|
|
50274
|
+
}
|
|
50275
|
+
)
|
|
50276
|
+
]
|
|
50277
|
+
}
|
|
50278
|
+
)
|
|
50279
|
+
}
|
|
50280
|
+
);
|
|
50281
|
+
};
|
|
50282
|
+
const renderProgress = () => {
|
|
50283
|
+
if (!data.target)
|
|
50284
|
+
return null;
|
|
50285
|
+
const currentValue = typeof data.value === "number" ? data.value : parseFloat(data.value);
|
|
50286
|
+
const progress = currentValue / data.target * 100;
|
|
50287
|
+
return /* @__PURE__ */ jsxs(
|
|
50288
|
+
motion.div,
|
|
50289
|
+
{
|
|
50290
|
+
className: "mt-3",
|
|
50291
|
+
initial: { opacity: 0, y: 10 },
|
|
50292
|
+
animate: { opacity: 1, y: 0 },
|
|
50293
|
+
transition: { delay: 0.1 },
|
|
50294
|
+
children: [
|
|
50295
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between text-xs text-muted-foreground mb-1", children: [
|
|
50296
|
+
/* @__PURE__ */ jsx("span", { children: "Progress to target" }),
|
|
50297
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
50298
|
+
progress.toFixed(1),
|
|
50299
|
+
"%"
|
|
50300
|
+
] })
|
|
50301
|
+
] }),
|
|
50302
|
+
/* @__PURE__ */ jsx("div", { className: "h-1.5 bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
50303
|
+
motion.div,
|
|
50304
|
+
{
|
|
50305
|
+
className: cn(
|
|
50306
|
+
"h-full rounded-full",
|
|
50307
|
+
progress >= 100 ? "bg-green-500" : "bg-primary"
|
|
50308
|
+
),
|
|
50309
|
+
initial: { width: 0 },
|
|
50310
|
+
animate: { width: `${Math.min(progress, 100)}%` },
|
|
50311
|
+
transition: { duration: 0.5, ease: "easeOut" }
|
|
50312
|
+
}
|
|
50313
|
+
) }),
|
|
50314
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between text-xs text-muted-foreground mt-1", children: [
|
|
50315
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
50316
|
+
currentValue,
|
|
50317
|
+
" ",
|
|
50318
|
+
data.unit
|
|
50319
|
+
] }),
|
|
50320
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
50321
|
+
"Target: ",
|
|
50322
|
+
data.target,
|
|
50323
|
+
" ",
|
|
50324
|
+
data.unit
|
|
50325
|
+
] })
|
|
50326
|
+
] })
|
|
50327
|
+
]
|
|
50328
|
+
}
|
|
50329
|
+
);
|
|
50330
|
+
};
|
|
50038
50331
|
const formatValue = (value) => {
|
|
50039
50332
|
if (typeof value === "number") {
|
|
50040
50333
|
if (value >= 1e6) {
|
|
@@ -50046,159 +50339,1823 @@ function Dashboard({
|
|
|
50046
50339
|
}
|
|
50047
50340
|
return value.toString();
|
|
50048
50341
|
};
|
|
50049
|
-
const
|
|
50050
|
-
|
|
50051
|
-
|
|
50052
|
-
|
|
50053
|
-
|
|
50054
|
-
|
|
50055
|
-
|
|
50056
|
-
|
|
50057
|
-
|
|
50342
|
+
const cardVariants = {
|
|
50343
|
+
initial: { opacity: 0, y: 20 },
|
|
50344
|
+
animate: {
|
|
50345
|
+
opacity: 1,
|
|
50346
|
+
y: 0,
|
|
50347
|
+
transition: { duration: 0.3, ease: "easeOut" }
|
|
50348
|
+
},
|
|
50349
|
+
hover: interactive ? {
|
|
50350
|
+
y: -2,
|
|
50351
|
+
transition: { duration: 0.2 }
|
|
50352
|
+
} : {}
|
|
50058
50353
|
};
|
|
50059
|
-
|
|
50060
|
-
|
|
50061
|
-
|
|
50062
|
-
|
|
50063
|
-
|
|
50064
|
-
|
|
50065
|
-
|
|
50066
|
-
|
|
50354
|
+
return /* @__PURE__ */ jsx(
|
|
50355
|
+
motion.div,
|
|
50356
|
+
{
|
|
50357
|
+
variants: cardVariants,
|
|
50358
|
+
initial: "initial",
|
|
50359
|
+
animate: "animate",
|
|
50360
|
+
whileHover: "hover",
|
|
50361
|
+
onHoverStart: () => setIsHovered(true),
|
|
50362
|
+
onHoverEnd: () => setIsHovered(false),
|
|
50363
|
+
children: /* @__PURE__ */ jsxs(
|
|
50364
|
+
MoonUICardPro,
|
|
50365
|
+
{
|
|
50366
|
+
className: cn(
|
|
50367
|
+
"relative overflow-hidden cursor-pointer transition-all duration-300",
|
|
50368
|
+
interactive && "hover:shadow-lg hover:shadow-primary/5",
|
|
50369
|
+
glassmorphism && "bg-background/60 backdrop-blur-md border-white/10",
|
|
50370
|
+
className
|
|
50371
|
+
),
|
|
50372
|
+
onClick,
|
|
50373
|
+
children: [
|
|
50374
|
+
glassmorphism && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-br from-primary/5 to-transparent" }),
|
|
50375
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-4 pb-2", children: [
|
|
50376
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
50377
|
+
/* @__PURE__ */ jsx(
|
|
50378
|
+
motion.div,
|
|
50379
|
+
{
|
|
50380
|
+
className: cn(
|
|
50381
|
+
"p-2 rounded-lg",
|
|
50382
|
+
glassmorphism ? "bg-white/10 backdrop-blur" : "bg-muted"
|
|
50383
|
+
),
|
|
50384
|
+
whileHover: { scale: 1.05 },
|
|
50385
|
+
whileTap: { scale: 0.95 },
|
|
50386
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("h-5 w-5", colorClasses[data.color || "primary"]), children: data.icon })
|
|
50387
|
+
}
|
|
50388
|
+
),
|
|
50389
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("h3", { className: "text-sm font-medium text-muted-foreground", children: data.title }) })
|
|
50390
|
+
] }),
|
|
50391
|
+
interactive && /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
50392
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
50393
|
+
MoonUIButtonPro,
|
|
50394
|
+
{
|
|
50395
|
+
variant: "ghost",
|
|
50396
|
+
size: "sm",
|
|
50397
|
+
className: "h-8 w-8 p-0",
|
|
50398
|
+
onClick: (e) => e.stopPropagation(),
|
|
50399
|
+
children: /* @__PURE__ */ jsx(MoreVertical, { className: "h-4 w-4" })
|
|
50400
|
+
}
|
|
50401
|
+
) }),
|
|
50402
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuContentPro, { align: "end", children: [
|
|
50403
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => onAction?.("fullscreen"), children: [
|
|
50404
|
+
/* @__PURE__ */ jsx(Maximize2, { className: "mr-2 h-4 w-4" }),
|
|
50405
|
+
"Fullscreen"
|
|
50406
|
+
] }),
|
|
50407
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => onAction?.("export"), children: [
|
|
50408
|
+
/* @__PURE__ */ jsx(Download, { className: "mr-2 h-4 w-4" }),
|
|
50409
|
+
"Export Data"
|
|
50410
|
+
] }),
|
|
50411
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => onAction?.("share"), children: [
|
|
50412
|
+
/* @__PURE__ */ jsx(Share2, { className: "mr-2 h-4 w-4" }),
|
|
50413
|
+
"Share"
|
|
50414
|
+
] })
|
|
50415
|
+
] })
|
|
50416
|
+
] })
|
|
50417
|
+
] }),
|
|
50418
|
+
/* @__PURE__ */ jsxs("div", { className: "px-4 pb-4", children: [
|
|
50419
|
+
/* @__PURE__ */ jsx(MoonUITooltipProviderPro, { children: /* @__PURE__ */ jsxs(MoonUITooltipPro, { children: [
|
|
50420
|
+
/* @__PURE__ */ jsx(MoonUITooltipTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
50421
|
+
motion.div,
|
|
50422
|
+
{
|
|
50423
|
+
className: "text-3xl font-bold tracking-tight",
|
|
50424
|
+
animate: {
|
|
50425
|
+
scale: isHovered ? 1.02 : 1
|
|
50426
|
+
},
|
|
50427
|
+
transition: { duration: 0.2 },
|
|
50428
|
+
children: [
|
|
50429
|
+
formatValue(data.value),
|
|
50430
|
+
data.unit && /* @__PURE__ */ jsx("span", { className: "text-lg ml-1 text-muted-foreground", children: data.unit })
|
|
50431
|
+
]
|
|
50432
|
+
}
|
|
50433
|
+
) }),
|
|
50434
|
+
/* @__PURE__ */ jsx(MoonUITooltipContentPro, { children: /* @__PURE__ */ jsxs("p", { children: [
|
|
50435
|
+
"Exact value: ",
|
|
50436
|
+
data.value,
|
|
50437
|
+
" ",
|
|
50438
|
+
data.unit
|
|
50439
|
+
] }) })
|
|
50440
|
+
] }) }),
|
|
50441
|
+
data.change && /* @__PURE__ */ jsxs(
|
|
50442
|
+
motion.div,
|
|
50443
|
+
{
|
|
50444
|
+
className: cn(
|
|
50445
|
+
"flex items-center gap-1 text-sm mt-2",
|
|
50446
|
+
getChangeColor(data.change.type)
|
|
50447
|
+
),
|
|
50448
|
+
initial: { opacity: 0, x: -10 },
|
|
50449
|
+
animate: { opacity: 1, x: 0 },
|
|
50450
|
+
transition: { delay: 0.1 },
|
|
50451
|
+
children: [
|
|
50452
|
+
getChangeIcon(data.change.type),
|
|
50453
|
+
/* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
|
|
50454
|
+
data.change.type === "neutral" ? "" : data.change.type === "increase" ? "+" : "-",
|
|
50455
|
+
Math.abs(data.change.value),
|
|
50456
|
+
"%"
|
|
50457
|
+
] }),
|
|
50458
|
+
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
|
|
50459
|
+
"from ",
|
|
50460
|
+
data.change.period
|
|
50461
|
+
] })
|
|
50462
|
+
]
|
|
50463
|
+
}
|
|
50464
|
+
),
|
|
50465
|
+
showForecast && data.forecast && /* @__PURE__ */ jsxs(
|
|
50466
|
+
motion.div,
|
|
50467
|
+
{
|
|
50468
|
+
className: "flex items-center gap-1 text-xs text-muted-foreground mt-1",
|
|
50469
|
+
initial: { opacity: 0 },
|
|
50470
|
+
animate: { opacity: 1 },
|
|
50471
|
+
transition: { delay: 0.2 },
|
|
50472
|
+
children: [
|
|
50473
|
+
/* @__PURE__ */ jsx(TrendingUp, { className: "h-3 w-3" }),
|
|
50474
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
50475
|
+
"Forecast: ",
|
|
50476
|
+
formatValue(data.forecast),
|
|
50477
|
+
" ",
|
|
50478
|
+
data.unit
|
|
50479
|
+
] })
|
|
50480
|
+
]
|
|
50481
|
+
}
|
|
50482
|
+
),
|
|
50483
|
+
renderProgress()
|
|
50484
|
+
] }),
|
|
50485
|
+
showSparkline && renderSparkline()
|
|
50486
|
+
]
|
|
50487
|
+
}
|
|
50488
|
+
)
|
|
50067
50489
|
}
|
|
50068
|
-
|
|
50069
|
-
|
|
50070
|
-
|
|
50490
|
+
);
|
|
50491
|
+
}
|
|
50492
|
+
var CHART_COLORS = {
|
|
50493
|
+
default: ["#3b82f6", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6", "#ec4899"],
|
|
50494
|
+
pastel: ["#93c5fd", "#86efac", "#fcd34d", "#fca5a5", "#c4b5fd", "#fbcfe8"],
|
|
50495
|
+
vibrant: ["#2563eb", "#059669", "#d97706", "#dc2626", "#7c3aed", "#db2777"],
|
|
50496
|
+
monochrome: ["#1f2937", "#374151", "#4b5563", "#6b7280", "#9ca3af", "#d1d5db"]
|
|
50497
|
+
};
|
|
50498
|
+
function ChartWidget({
|
|
50499
|
+
id,
|
|
50500
|
+
title,
|
|
50501
|
+
description,
|
|
50502
|
+
data,
|
|
50503
|
+
className,
|
|
50504
|
+
height = 300,
|
|
50505
|
+
onAction,
|
|
50506
|
+
loading = false,
|
|
50507
|
+
refreshing = false,
|
|
50508
|
+
glassmorphism = false,
|
|
50509
|
+
interactive = true
|
|
50510
|
+
}) {
|
|
50511
|
+
const [colorScheme, setColorScheme] = t__default.useState("default");
|
|
50512
|
+
const [isFullscreen, setIsFullscreen] = t__default.useState(false);
|
|
50513
|
+
const colors = CHART_COLORS[colorScheme];
|
|
50514
|
+
const CustomTooltip2 = ({ active, payload, label }) => {
|
|
50515
|
+
if (!active || !payload)
|
|
50516
|
+
return null;
|
|
50071
50517
|
return /* @__PURE__ */ jsxs(
|
|
50072
|
-
|
|
50518
|
+
motion.div,
|
|
50073
50519
|
{
|
|
50520
|
+
initial: { opacity: 0, scale: 0.9 },
|
|
50521
|
+
animate: { opacity: 1, scale: 1 },
|
|
50074
50522
|
className: cn(
|
|
50075
|
-
"
|
|
50076
|
-
|
|
50523
|
+
"p-3 rounded-lg shadow-lg",
|
|
50524
|
+
glassmorphism ? "bg-background/80 backdrop-blur-md border border-white/10" : "bg-background border"
|
|
50077
50525
|
),
|
|
50078
|
-
onClick: () => onMetricClick?.(metric),
|
|
50079
50526
|
children: [
|
|
50080
|
-
/* @__PURE__ */
|
|
50081
|
-
|
|
50082
|
-
/* @__PURE__ */ jsx(
|
|
50527
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: label }),
|
|
50528
|
+
payload.map((entry, index) => /* @__PURE__ */ jsxs("p", { className: "text-sm mt-1", children: [
|
|
50529
|
+
/* @__PURE__ */ jsx(
|
|
50530
|
+
"span",
|
|
50531
|
+
{
|
|
50532
|
+
className: "inline-block w-3 h-3 rounded-full mr-2",
|
|
50533
|
+
style: { backgroundColor: entry.color }
|
|
50534
|
+
}
|
|
50535
|
+
),
|
|
50536
|
+
entry.name,
|
|
50537
|
+
": ",
|
|
50538
|
+
entry.value
|
|
50539
|
+
] }, index))
|
|
50540
|
+
]
|
|
50541
|
+
}
|
|
50542
|
+
);
|
|
50543
|
+
};
|
|
50544
|
+
const renderChart = () => {
|
|
50545
|
+
if (!data.data || data.data.length === 0) {
|
|
50546
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full text-muted-foreground", children: "No data available" });
|
|
50547
|
+
}
|
|
50548
|
+
const chartProps = {
|
|
50549
|
+
data: data.data,
|
|
50550
|
+
margin: { top: 5, right: 30, left: 20, bottom: 5 }
|
|
50551
|
+
};
|
|
50552
|
+
switch (data.type) {
|
|
50553
|
+
case "line":
|
|
50554
|
+
return /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxs(LineChart, { ...chartProps, children: [
|
|
50555
|
+
/* @__PURE__ */ jsx(CartesianGrid, { strokeDasharray: "3 3", className: "opacity-30" }),
|
|
50556
|
+
/* @__PURE__ */ jsx(XAxis, { dataKey: "name" }),
|
|
50557
|
+
/* @__PURE__ */ jsx(YAxis, {}),
|
|
50558
|
+
/* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(CustomTooltip2, {}) }),
|
|
50559
|
+
interactive && /* @__PURE__ */ jsx(Legend, {}),
|
|
50560
|
+
Object.keys(data.data[0]).filter((key) => key !== "name").map((key, index) => /* @__PURE__ */ jsx(
|
|
50561
|
+
Line,
|
|
50562
|
+
{
|
|
50563
|
+
type: "monotone",
|
|
50564
|
+
dataKey: key,
|
|
50565
|
+
stroke: colors[index % colors.length],
|
|
50566
|
+
strokeWidth: 2,
|
|
50567
|
+
dot: { r: 4 },
|
|
50568
|
+
activeDot: { r: 6 }
|
|
50569
|
+
},
|
|
50570
|
+
key
|
|
50571
|
+
))
|
|
50572
|
+
] }) });
|
|
50573
|
+
case "bar":
|
|
50574
|
+
return /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxs(BarChart, { ...chartProps, children: [
|
|
50575
|
+
/* @__PURE__ */ jsx(CartesianGrid, { strokeDasharray: "3 3", className: "opacity-30" }),
|
|
50576
|
+
/* @__PURE__ */ jsx(XAxis, { dataKey: "name" }),
|
|
50577
|
+
/* @__PURE__ */ jsx(YAxis, {}),
|
|
50578
|
+
/* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(CustomTooltip2, {}) }),
|
|
50579
|
+
interactive && /* @__PURE__ */ jsx(Legend, {}),
|
|
50580
|
+
Object.keys(data.data[0]).filter((key) => key !== "name").map((key, index) => /* @__PURE__ */ jsx(
|
|
50581
|
+
Bar,
|
|
50582
|
+
{
|
|
50583
|
+
dataKey: key,
|
|
50584
|
+
fill: colors[index % colors.length],
|
|
50585
|
+
radius: [4, 4, 0, 0]
|
|
50586
|
+
},
|
|
50587
|
+
key
|
|
50588
|
+
))
|
|
50589
|
+
] }) });
|
|
50590
|
+
case "area":
|
|
50591
|
+
return /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxs(AreaChart, { ...chartProps, children: [
|
|
50592
|
+
/* @__PURE__ */ jsx(CartesianGrid, { strokeDasharray: "3 3", className: "opacity-30" }),
|
|
50593
|
+
/* @__PURE__ */ jsx(XAxis, { dataKey: "name" }),
|
|
50594
|
+
/* @__PURE__ */ jsx(YAxis, {}),
|
|
50595
|
+
/* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(CustomTooltip2, {}) }),
|
|
50596
|
+
interactive && /* @__PURE__ */ jsx(Legend, {}),
|
|
50597
|
+
Object.keys(data.data[0]).filter((key) => key !== "name").map((key, index) => /* @__PURE__ */ jsx(
|
|
50598
|
+
Area,
|
|
50599
|
+
{
|
|
50600
|
+
type: "monotone",
|
|
50601
|
+
dataKey: key,
|
|
50602
|
+
stroke: colors[index % colors.length],
|
|
50603
|
+
fill: colors[index % colors.length],
|
|
50604
|
+
fillOpacity: 0.2
|
|
50605
|
+
},
|
|
50606
|
+
key
|
|
50607
|
+
))
|
|
50608
|
+
] }) });
|
|
50609
|
+
case "pie":
|
|
50610
|
+
case "donut":
|
|
50611
|
+
return /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxs(PieChart, { children: [
|
|
50612
|
+
/* @__PURE__ */ jsx(
|
|
50613
|
+
Pie,
|
|
50614
|
+
{
|
|
50615
|
+
data: data.data,
|
|
50616
|
+
cx: "50%",
|
|
50617
|
+
cy: "50%",
|
|
50618
|
+
labelLine: false,
|
|
50619
|
+
label: interactive,
|
|
50620
|
+
outerRadius: data.type === "donut" ? 80 : 100,
|
|
50621
|
+
innerRadius: data.type === "donut" ? 50 : 0,
|
|
50622
|
+
fill: "#8884d8",
|
|
50623
|
+
dataKey: "value",
|
|
50624
|
+
children: data.data.map((entry, index) => /* @__PURE__ */ jsx(Cell, { fill: colors[index % colors.length] }, `cell-${index}`))
|
|
50625
|
+
}
|
|
50626
|
+
),
|
|
50627
|
+
/* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(CustomTooltip2, {}) }),
|
|
50628
|
+
interactive && /* @__PURE__ */ jsx(Legend, {})
|
|
50629
|
+
] }) });
|
|
50630
|
+
case "radar":
|
|
50631
|
+
return /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxs(RadarChart, { data: data.data, children: [
|
|
50632
|
+
/* @__PURE__ */ jsx(PolarGrid, {}),
|
|
50633
|
+
/* @__PURE__ */ jsx(PolarAngleAxis, { dataKey: "subject" }),
|
|
50634
|
+
/* @__PURE__ */ jsx(PolarRadiusAxis, {}),
|
|
50635
|
+
Object.keys(data.data[0]).filter((key) => key !== "subject").map((key, index) => /* @__PURE__ */ jsx(
|
|
50636
|
+
Radar,
|
|
50637
|
+
{
|
|
50638
|
+
name: key,
|
|
50639
|
+
dataKey: key,
|
|
50640
|
+
stroke: colors[index % colors.length],
|
|
50641
|
+
fill: colors[index % colors.length],
|
|
50642
|
+
fillOpacity: 0.3
|
|
50643
|
+
},
|
|
50644
|
+
key
|
|
50645
|
+
)),
|
|
50646
|
+
/* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx(CustomTooltip2, {}) }),
|
|
50647
|
+
interactive && /* @__PURE__ */ jsx(Legend, {})
|
|
50648
|
+
] }) });
|
|
50649
|
+
default:
|
|
50650
|
+
return null;
|
|
50651
|
+
}
|
|
50652
|
+
};
|
|
50653
|
+
const cardVariants = {
|
|
50654
|
+
initial: { opacity: 0, scale: 0.95 },
|
|
50655
|
+
animate: {
|
|
50656
|
+
opacity: 1,
|
|
50657
|
+
scale: 1,
|
|
50658
|
+
transition: { duration: 0.3, ease: "easeOut" }
|
|
50659
|
+
}
|
|
50660
|
+
};
|
|
50661
|
+
return /* @__PURE__ */ jsx(
|
|
50662
|
+
motion.div,
|
|
50663
|
+
{
|
|
50664
|
+
variants: cardVariants,
|
|
50665
|
+
initial: "initial",
|
|
50666
|
+
animate: "animate",
|
|
50667
|
+
className: cn(isFullscreen && "fixed inset-4 z-50"),
|
|
50668
|
+
children: /* @__PURE__ */ jsxs(MoonUICardPro, { className: cn(
|
|
50669
|
+
"relative overflow-hidden transition-all duration-300",
|
|
50670
|
+
glassmorphism && "bg-background/60 backdrop-blur-md border-white/10",
|
|
50671
|
+
isFullscreen && "h-full",
|
|
50672
|
+
className
|
|
50673
|
+
), children: [
|
|
50674
|
+
/* @__PURE__ */ jsxs(MoonUICardHeaderPro, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
|
|
50675
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
50676
|
+
/* @__PURE__ */ jsx(MoonUICardTitlePro, { className: "text-base font-semibold", children: title }),
|
|
50677
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1", children: description })
|
|
50083
50678
|
] }),
|
|
50084
|
-
/* @__PURE__ */ jsxs(
|
|
50085
|
-
/* @__PURE__ */ jsx(
|
|
50086
|
-
|
|
50087
|
-
|
|
50088
|
-
|
|
50089
|
-
|
|
50090
|
-
|
|
50091
|
-
|
|
50092
|
-
|
|
50093
|
-
|
|
50094
|
-
|
|
50679
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
50680
|
+
refreshing && /* @__PURE__ */ jsx(
|
|
50681
|
+
motion.div,
|
|
50682
|
+
{
|
|
50683
|
+
animate: { rotate: 360 },
|
|
50684
|
+
transition: { duration: 1, repeat: Infinity, ease: "linear" },
|
|
50685
|
+
children: /* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4 text-muted-foreground" })
|
|
50686
|
+
}
|
|
50687
|
+
),
|
|
50688
|
+
interactive && /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
50689
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "ghost", size: "sm", className: "h-8 w-8 p-0", children: /* @__PURE__ */ jsx(MoreVertical, { className: "h-4 w-4" }) }) }),
|
|
50690
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuContentPro, { align: "end", className: "w-48", children: [
|
|
50691
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => {
|
|
50692
|
+
setIsFullscreen(!isFullscreen);
|
|
50693
|
+
onAction?.("fullscreen", { fullscreen: !isFullscreen });
|
|
50694
|
+
}, children: [
|
|
50695
|
+
/* @__PURE__ */ jsx(Maximize2, { className: "mr-2 h-4 w-4" }),
|
|
50696
|
+
isFullscreen ? "Exit Fullscreen" : "Fullscreen"
|
|
50697
|
+
] }),
|
|
50698
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuSubPro, { children: [
|
|
50699
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuSubTriggerPro, { children: [
|
|
50700
|
+
/* @__PURE__ */ jsx(Palette, { className: "mr-2 h-4 w-4" }),
|
|
50701
|
+
"Color Scheme"
|
|
50702
|
+
] }),
|
|
50703
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuSubContentPro, { children: Object.keys(CHART_COLORS).map((scheme2) => /* @__PURE__ */ jsx(
|
|
50704
|
+
MoonUIDropdownMenuItemPro,
|
|
50705
|
+
{
|
|
50706
|
+
onClick: () => setColorScheme(scheme2),
|
|
50707
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
50708
|
+
/* @__PURE__ */ jsx("div", { className: "flex gap-1", children: CHART_COLORS[scheme2].slice(0, 3).map((color, i) => /* @__PURE__ */ jsx(
|
|
50709
|
+
"div",
|
|
50710
|
+
{
|
|
50711
|
+
className: "w-3 h-3 rounded-full",
|
|
50712
|
+
style: { backgroundColor: color }
|
|
50713
|
+
},
|
|
50714
|
+
i
|
|
50715
|
+
)) }),
|
|
50716
|
+
/* @__PURE__ */ jsx("span", { className: "capitalize", children: scheme2 })
|
|
50717
|
+
] })
|
|
50718
|
+
},
|
|
50719
|
+
scheme2
|
|
50720
|
+
)) })
|
|
50721
|
+
] }),
|
|
50722
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuSeparatorPro, {}),
|
|
50723
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => onAction?.("export", { format: "png" }), children: [
|
|
50724
|
+
/* @__PURE__ */ jsx(Download, { className: "mr-2 h-4 w-4" }),
|
|
50725
|
+
"Export as PNG"
|
|
50726
|
+
] }),
|
|
50727
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => onAction?.("export", { format: "csv" }), children: [
|
|
50728
|
+
/* @__PURE__ */ jsx(Download, { className: "mr-2 h-4 w-4" }),
|
|
50729
|
+
"Export Data"
|
|
50730
|
+
] }),
|
|
50731
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuSeparatorPro, {}),
|
|
50732
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => onAction?.("filter"), children: [
|
|
50733
|
+
/* @__PURE__ */ jsx(Filter, { className: "mr-2 h-4 w-4" }),
|
|
50734
|
+
"Filter Data"
|
|
50735
|
+
] }),
|
|
50736
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => onAction?.("settings"), children: [
|
|
50737
|
+
/* @__PURE__ */ jsx(Settings, { className: "mr-2 h-4 w-4" }),
|
|
50738
|
+
"Chart Settings"
|
|
50739
|
+
] })
|
|
50095
50740
|
] })
|
|
50096
|
-
] })
|
|
50097
|
-
metric.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-1", children: metric.description })
|
|
50741
|
+
] })
|
|
50098
50742
|
] })
|
|
50099
|
-
]
|
|
50100
|
-
|
|
50101
|
-
|
|
50102
|
-
|
|
50743
|
+
] }),
|
|
50744
|
+
/* @__PURE__ */ jsx(MoonUICardContentPro, { className: "p-0 px-4 pb-4", children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: loading ? /* @__PURE__ */ jsx(
|
|
50745
|
+
motion.div,
|
|
50746
|
+
{
|
|
50747
|
+
initial: { opacity: 0 },
|
|
50748
|
+
animate: { opacity: 1 },
|
|
50749
|
+
exit: { opacity: 0 },
|
|
50750
|
+
className: "flex items-center justify-center",
|
|
50751
|
+
style: { height },
|
|
50752
|
+
children: /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
50753
|
+
/* @__PURE__ */ jsx("div", { className: "animate-pulse bg-muted h-4 w-32 rounded" }),
|
|
50754
|
+
/* @__PURE__ */ jsx("div", { className: "animate-pulse bg-muted h-4 w-24 rounded" }),
|
|
50755
|
+
/* @__PURE__ */ jsx("div", { className: "animate-pulse bg-muted h-4 w-28 rounded" })
|
|
50756
|
+
] })
|
|
50757
|
+
},
|
|
50758
|
+
"loading"
|
|
50759
|
+
) : /* @__PURE__ */ jsx(
|
|
50760
|
+
motion.div,
|
|
50761
|
+
{
|
|
50762
|
+
initial: { opacity: 0, y: 10 },
|
|
50763
|
+
animate: { opacity: 1, y: 0 },
|
|
50764
|
+
exit: { opacity: 0, y: -10 },
|
|
50765
|
+
transition: { duration: 0.3 },
|
|
50766
|
+
children: renderChart()
|
|
50767
|
+
},
|
|
50768
|
+
"chart"
|
|
50769
|
+
) }) })
|
|
50770
|
+
] })
|
|
50771
|
+
}
|
|
50772
|
+
);
|
|
50773
|
+
}
|
|
50774
|
+
function ActivityFeed({
|
|
50775
|
+
items,
|
|
50776
|
+
title = "Activity Feed",
|
|
50777
|
+
className,
|
|
50778
|
+
height = 400,
|
|
50779
|
+
onItemClick,
|
|
50780
|
+
onAction,
|
|
50781
|
+
loading = false,
|
|
50782
|
+
showFilters = true,
|
|
50783
|
+
showNotifications = true,
|
|
50784
|
+
glassmorphism = false,
|
|
50785
|
+
realtime = false
|
|
50786
|
+
}) {
|
|
50787
|
+
const [filter, setFilter] = t__default.useState("all");
|
|
50788
|
+
const [notificationsEnabled, setNotificationsEnabled] = t__default.useState(true);
|
|
50789
|
+
const [newItems, setNewItems] = t__default.useState([]);
|
|
50790
|
+
t__default.useEffect(() => {
|
|
50791
|
+
if (!realtime)
|
|
50792
|
+
return;
|
|
50793
|
+
const interval = setInterval(() => {
|
|
50794
|
+
const randomItem = {
|
|
50795
|
+
id: `new-${Date.now()}`,
|
|
50796
|
+
type: ["info", "success", "warning", "error"][Math.floor(Math.random() * 4)],
|
|
50797
|
+
title: "New activity",
|
|
50798
|
+
description: "Something happened just now",
|
|
50799
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
50800
|
+
user: {
|
|
50801
|
+
name: "System",
|
|
50802
|
+
avatar: void 0
|
|
50803
|
+
}
|
|
50804
|
+
};
|
|
50805
|
+
setNewItems((prev) => [randomItem, ...prev].slice(0, 3));
|
|
50806
|
+
setTimeout(() => {
|
|
50807
|
+
setNewItems((prev) => prev.filter((item) => item.id !== randomItem.id));
|
|
50808
|
+
}, 5e3);
|
|
50809
|
+
}, 1e4);
|
|
50810
|
+
return () => clearInterval(interval);
|
|
50811
|
+
}, [realtime]);
|
|
50812
|
+
const getTypeIcon = (type) => {
|
|
50813
|
+
switch (type) {
|
|
50814
|
+
case "info":
|
|
50815
|
+
return /* @__PURE__ */ jsx(Info, { className: "h-4 w-4" });
|
|
50816
|
+
case "success":
|
|
50817
|
+
return /* @__PURE__ */ jsx(CheckCircle, { className: "h-4 w-4" });
|
|
50818
|
+
case "warning":
|
|
50819
|
+
return /* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4" });
|
|
50820
|
+
case "error":
|
|
50821
|
+
return /* @__PURE__ */ jsx(XCircle, { className: "h-4 w-4" });
|
|
50822
|
+
}
|
|
50103
50823
|
};
|
|
50104
|
-
const
|
|
50105
|
-
|
|
50106
|
-
|
|
50107
|
-
|
|
50108
|
-
|
|
50109
|
-
|
|
50110
|
-
|
|
50824
|
+
const getTypeColor = (type) => {
|
|
50825
|
+
switch (type) {
|
|
50826
|
+
case "info":
|
|
50827
|
+
return "text-blue-500 bg-blue-100 dark:bg-blue-900/20";
|
|
50828
|
+
case "success":
|
|
50829
|
+
return "text-green-500 bg-green-100 dark:bg-green-900/20";
|
|
50830
|
+
case "warning":
|
|
50831
|
+
return "text-yellow-500 bg-yellow-100 dark:bg-yellow-900/20";
|
|
50832
|
+
case "error":
|
|
50833
|
+
return "text-red-500 bg-red-100 dark:bg-red-900/20";
|
|
50834
|
+
}
|
|
50835
|
+
};
|
|
50836
|
+
const filteredItems = [...newItems, ...items].filter(
|
|
50837
|
+
(item) => filter === "all" || item.type === filter
|
|
50838
|
+
);
|
|
50839
|
+
const renderActivityItem = (item, isNew = false) => /* @__PURE__ */ jsxs(
|
|
50840
|
+
motion.div,
|
|
50841
|
+
{
|
|
50842
|
+
layout: true,
|
|
50843
|
+
initial: { opacity: 0, x: -20 },
|
|
50844
|
+
animate: { opacity: 1, x: 0 },
|
|
50845
|
+
exit: { opacity: 0, x: 20 },
|
|
50846
|
+
whileHover: { x: 4 },
|
|
50847
|
+
transition: { duration: 0.2 },
|
|
50848
|
+
className: cn(
|
|
50849
|
+
"group relative flex gap-3 p-3 rounded-lg cursor-pointer transition-colors",
|
|
50850
|
+
"hover:bg-muted/50",
|
|
50851
|
+
isNew && "bg-primary/5 border-l-2 border-primary"
|
|
50852
|
+
),
|
|
50853
|
+
onClick: () => onItemClick?.(item),
|
|
50854
|
+
children: [
|
|
50855
|
+
/* @__PURE__ */ jsx("div", { className: "absolute left-7 top-12 bottom-0 w-px bg-border" }),
|
|
50856
|
+
/* @__PURE__ */ jsx("div", { className: "relative z-10 flex-shrink-0", children: item.user?.avatar ? /* @__PURE__ */ jsxs(MoonUIAvatarPro, { className: "h-8 w-8", children: [
|
|
50857
|
+
/* @__PURE__ */ jsx(MoonUIAvatarImagePro, { src: item.user.avatar }),
|
|
50858
|
+
/* @__PURE__ */ jsx(MoonUIAvatarFallbackPro, { children: item.user.name[0] })
|
|
50859
|
+
] }) : /* @__PURE__ */ jsx("div", { className: cn(
|
|
50860
|
+
"h-8 w-8 rounded-full flex items-center justify-center",
|
|
50861
|
+
getTypeColor(item.type)
|
|
50862
|
+
), children: item.icon || getTypeIcon(item.type) }) }),
|
|
50863
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
50864
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
|
|
50865
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
50866
|
+
/* @__PURE__ */ jsxs("p", { className: "text-sm font-medium leading-tight", children: [
|
|
50867
|
+
item.user?.name && /* @__PURE__ */ jsxs("span", { className: "text-foreground", children: [
|
|
50868
|
+
item.user.name,
|
|
50869
|
+
" "
|
|
50870
|
+
] }),
|
|
50871
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: item.title })
|
|
50872
|
+
] }),
|
|
50873
|
+
item.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-0.5 line-clamp-2", children: item.description })
|
|
50874
|
+
] }),
|
|
50875
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-xs text-muted-foreground whitespace-nowrap", children: [
|
|
50876
|
+
/* @__PURE__ */ jsx(Clock, { className: "h-3 w-3" }),
|
|
50877
|
+
formatDistanceToNow(item.timestamp, { addSuffix: true })
|
|
50878
|
+
] })
|
|
50879
|
+
] }),
|
|
50880
|
+
isNew && /* @__PURE__ */ jsx(
|
|
50881
|
+
motion.div,
|
|
50882
|
+
{
|
|
50883
|
+
initial: { scale: 0 },
|
|
50884
|
+
animate: { scale: 1 },
|
|
50885
|
+
className: "inline-block mt-1",
|
|
50886
|
+
children: /* @__PURE__ */ jsx(MoonUIBadgePro, { variant: "default", className: "text-xs", children: "New" })
|
|
50887
|
+
}
|
|
50888
|
+
)
|
|
50889
|
+
] }),
|
|
50890
|
+
/* @__PURE__ */ jsx("div", { className: "opacity-0 group-hover:opacity-100 transition-opacity", children: /* @__PURE__ */ jsx(
|
|
50891
|
+
MoonUIButtonPro,
|
|
50892
|
+
{
|
|
50893
|
+
variant: "ghost",
|
|
50894
|
+
size: "sm",
|
|
50895
|
+
className: "h-6 w-6 p-0",
|
|
50896
|
+
onClick: (e) => {
|
|
50897
|
+
e.stopPropagation();
|
|
50898
|
+
onAction?.("more", item);
|
|
50899
|
+
},
|
|
50900
|
+
children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-3 w-3" })
|
|
50901
|
+
}
|
|
50902
|
+
) })
|
|
50903
|
+
]
|
|
50904
|
+
},
|
|
50905
|
+
item.id
|
|
50906
|
+
);
|
|
50907
|
+
return /* @__PURE__ */ jsxs(MoonUICardPro, { className: cn(
|
|
50908
|
+
"relative overflow-hidden",
|
|
50909
|
+
glassmorphism && "bg-background/60 backdrop-blur-md border-white/10",
|
|
50910
|
+
className
|
|
50911
|
+
), children: [
|
|
50912
|
+
/* @__PURE__ */ jsxs(MoonUICardHeaderPro, { className: "flex flex-row items-center justify-between space-y-0 pb-3", children: [
|
|
50913
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
50914
|
+
/* @__PURE__ */ jsx(Activity, { className: "h-4 w-4 text-muted-foreground" }),
|
|
50915
|
+
/* @__PURE__ */ jsx(MoonUICardTitlePro, { className: "text-base font-semibold", children: title }),
|
|
50916
|
+
realtime && /* @__PURE__ */ jsxs(MoonUIBadgePro, { variant: "secondary", className: "text-xs", children: [
|
|
50917
|
+
/* @__PURE__ */ jsx("span", { className: "mr-1 h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse" }),
|
|
50918
|
+
"Live"
|
|
50919
|
+
] })
|
|
50920
|
+
] }),
|
|
50921
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
50922
|
+
showFilters && /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
50923
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "ghost", size: "sm", className: "h-8 px-2", children: [
|
|
50924
|
+
/* @__PURE__ */ jsx(Filter, { className: "h-4 w-4 mr-1" }),
|
|
50925
|
+
filter !== "all" && /* @__PURE__ */ jsx(MoonUIBadgePro, { variant: "secondary", className: "ml-1", children: filter })
|
|
50926
|
+
] }) }),
|
|
50927
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuContentPro, { align: "end", children: [
|
|
50928
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuItemPro, { onClick: () => setFilter("all"), children: "All Activities" }),
|
|
50929
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuSeparatorPro, {}),
|
|
50930
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => setFilter("info"), children: [
|
|
50931
|
+
/* @__PURE__ */ jsx(Info, { className: "mr-2 h-4 w-4 text-blue-500" }),
|
|
50932
|
+
"Information"
|
|
50933
|
+
] }),
|
|
50934
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => setFilter("success"), children: [
|
|
50935
|
+
/* @__PURE__ */ jsx(CheckCircle, { className: "mr-2 h-4 w-4 text-green-500" }),
|
|
50936
|
+
"Success"
|
|
50937
|
+
] }),
|
|
50938
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => setFilter("warning"), children: [
|
|
50939
|
+
/* @__PURE__ */ jsx(AlertCircle, { className: "mr-2 h-4 w-4 text-yellow-500" }),
|
|
50940
|
+
"Warning"
|
|
50941
|
+
] }),
|
|
50942
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => setFilter("error"), children: [
|
|
50943
|
+
/* @__PURE__ */ jsx(XCircle, { className: "mr-2 h-4 w-4 text-red-500" }),
|
|
50944
|
+
"Error"
|
|
50945
|
+
] })
|
|
50946
|
+
] })
|
|
50111
50947
|
] }),
|
|
50948
|
+
showNotifications && /* @__PURE__ */ jsx(
|
|
50949
|
+
MoonUIButtonPro,
|
|
50950
|
+
{
|
|
50951
|
+
variant: "ghost",
|
|
50952
|
+
size: "sm",
|
|
50953
|
+
className: "h-8 w-8 p-0",
|
|
50954
|
+
onClick: () => {
|
|
50955
|
+
setNotificationsEnabled(!notificationsEnabled);
|
|
50956
|
+
onAction?.("notifications", { enabled: !notificationsEnabled });
|
|
50957
|
+
},
|
|
50958
|
+
children: notificationsEnabled ? /* @__PURE__ */ jsx(Bell, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(BellOff, { className: "h-4 w-4 text-muted-foreground" })
|
|
50959
|
+
}
|
|
50960
|
+
),
|
|
50112
50961
|
/* @__PURE__ */ jsx(
|
|
50113
50962
|
MoonUIButtonPro,
|
|
50114
50963
|
{
|
|
50115
50964
|
variant: "ghost",
|
|
50116
50965
|
size: "sm",
|
|
50117
|
-
|
|
50118
|
-
|
|
50966
|
+
className: "h-8 w-8 p-0",
|
|
50967
|
+
onClick: () => onAction?.("refresh"),
|
|
50968
|
+
children: /* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4" })
|
|
50119
50969
|
}
|
|
50120
50970
|
)
|
|
50121
|
-
] })
|
|
50122
|
-
|
|
50123
|
-
|
|
50971
|
+
] })
|
|
50972
|
+
] }),
|
|
50973
|
+
/* @__PURE__ */ jsx(MoonUICardContentPro, { className: "p-0", children: /* @__PURE__ */ jsx(ScrollArea, { className: "px-4 pb-4", style: { height }, children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", children: loading ? /* @__PURE__ */ jsx(
|
|
50974
|
+
motion.div,
|
|
50975
|
+
{
|
|
50976
|
+
initial: { opacity: 0 },
|
|
50977
|
+
animate: { opacity: 1 },
|
|
50978
|
+
exit: { opacity: 0 },
|
|
50979
|
+
className: "space-y-3",
|
|
50980
|
+
children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
|
|
50981
|
+
/* @__PURE__ */ jsx("div", { className: "h-8 w-8 rounded-full bg-muted animate-pulse" }),
|
|
50982
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-2", children: [
|
|
50983
|
+
/* @__PURE__ */ jsx("div", { className: "h-4 bg-muted rounded animate-pulse" }),
|
|
50984
|
+
/* @__PURE__ */ jsx("div", { className: "h-3 bg-muted rounded w-3/4 animate-pulse" })
|
|
50985
|
+
] })
|
|
50986
|
+
] }, i))
|
|
50987
|
+
},
|
|
50988
|
+
"loading"
|
|
50989
|
+
) : filteredItems.length === 0 ? /* @__PURE__ */ jsxs(
|
|
50990
|
+
motion.div,
|
|
50991
|
+
{
|
|
50992
|
+
initial: { opacity: 0 },
|
|
50993
|
+
animate: { opacity: 1 },
|
|
50994
|
+
className: "flex flex-col items-center justify-center py-12 text-muted-foreground",
|
|
50995
|
+
children: [
|
|
50996
|
+
/* @__PURE__ */ jsx(Activity, { className: "h-8 w-8 mb-2" }),
|
|
50997
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm", children: "No activities to show" })
|
|
50998
|
+
]
|
|
50999
|
+
},
|
|
51000
|
+
"empty"
|
|
51001
|
+
) : /* @__PURE__ */ jsx("div", { className: "space-y-1", children: filteredItems.map(
|
|
51002
|
+
(item) => renderActivityItem(item, newItems.some((newItem) => newItem.id === item.id))
|
|
51003
|
+
) }) }) }) })
|
|
51004
|
+
] });
|
|
51005
|
+
}
|
|
51006
|
+
|
|
51007
|
+
// node_modules/react-resizable/css/styles.css
|
|
51008
|
+
styleInject(".react-resizable {\n position: relative;\n}\n.react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-repeat: no-repeat;\n background-origin: content-box;\n box-sizing: border-box;\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+);\n background-position: bottom right;\n padding: 0 3px 3px 0;\n}\n.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n}\n.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n}\n.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n}\n.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n}\n.react-resizable-handle-w,\n.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n}\n.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n}\n.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n}\n.react-resizable-handle-n,\n.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n}\n.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n}\n.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n}\n");
|
|
51009
|
+
var ResponsiveGridLayout = WidthProvider(Responsive);
|
|
51010
|
+
function DashboardGrid({
|
|
51011
|
+
widgets,
|
|
51012
|
+
onLayoutChange,
|
|
51013
|
+
onWidgetRemove,
|
|
51014
|
+
onWidgetAction,
|
|
51015
|
+
editMode = false,
|
|
51016
|
+
className,
|
|
51017
|
+
glassmorphism = false,
|
|
51018
|
+
breakpoints = { lg: 1200, md: 996, sm: 768, xs: 480, xxs: 0 },
|
|
51019
|
+
cols = { lg: 12, md: 8, sm: 4, xs: 2, xxs: 1 },
|
|
51020
|
+
rowHeight = 80,
|
|
51021
|
+
margin = [16, 24],
|
|
51022
|
+
containerPadding = [0, 0]
|
|
51023
|
+
}) {
|
|
51024
|
+
const [layouts, setLayouts] = t__default.useState({});
|
|
51025
|
+
const [currentBreakpoint, setCurrentBreakpoint] = t__default.useState("lg");
|
|
51026
|
+
const [lockedWidgets, setLockedWidgets] = t__default.useState(/* @__PURE__ */ new Set());
|
|
51027
|
+
const [fullscreenWidget, setFullscreenWidget] = t__default.useState(null);
|
|
51028
|
+
const [containerWidth, setContainerWidth] = t__default.useState(1200);
|
|
51029
|
+
const containerRef = t__default.useRef(null);
|
|
51030
|
+
const [compactType, setCompactType] = t__default.useState("vertical");
|
|
51031
|
+
t__default.useEffect(() => {
|
|
51032
|
+
const updateWidth = () => {
|
|
51033
|
+
if (containerRef.current) {
|
|
51034
|
+
const width = containerRef.current.offsetWidth;
|
|
51035
|
+
setContainerWidth(width);
|
|
51036
|
+
if (width < 480) {
|
|
51037
|
+
setCurrentBreakpoint("xxs");
|
|
51038
|
+
} else if (width < 768) {
|
|
51039
|
+
setCurrentBreakpoint("xs");
|
|
51040
|
+
} else if (width < 996) {
|
|
51041
|
+
setCurrentBreakpoint("sm");
|
|
51042
|
+
} else if (width < 1200) {
|
|
51043
|
+
setCurrentBreakpoint("md");
|
|
51044
|
+
} else {
|
|
51045
|
+
setCurrentBreakpoint("lg");
|
|
51046
|
+
}
|
|
51047
|
+
}
|
|
51048
|
+
};
|
|
51049
|
+
updateWidth();
|
|
51050
|
+
window.addEventListener("resize", updateWidth);
|
|
51051
|
+
return () => window.removeEventListener("resize", updateWidth);
|
|
51052
|
+
}, []);
|
|
51053
|
+
const generateResponsiveLayouts = () => {
|
|
51054
|
+
const baseLayout = widgets.map((widget, index) => ({
|
|
51055
|
+
i: widget.id,
|
|
51056
|
+
x: widget.position?.x ?? index * 3 % 12,
|
|
51057
|
+
y: widget.position?.y ?? Math.floor(index * 3 / 12) * 3,
|
|
51058
|
+
w: widget.size?.w ?? 3,
|
|
51059
|
+
h: widget.size?.h ?? 3,
|
|
51060
|
+
minW: widget.size?.minW || 2,
|
|
51061
|
+
maxW: widget.size?.maxW || 12,
|
|
51062
|
+
minH: widget.size?.minH || 2,
|
|
51063
|
+
maxH: widget.size?.maxH || 8,
|
|
51064
|
+
isDraggable: editMode && !lockedWidgets.has(widget.id) && widget.permissions?.canMove !== false,
|
|
51065
|
+
isResizable: editMode && !lockedWidgets.has(widget.id) && widget.permissions?.canResize !== false
|
|
51066
|
+
}));
|
|
51067
|
+
const sortedLayout = [...baseLayout].sort((a, b) => {
|
|
51068
|
+
if (a.y === b.y)
|
|
51069
|
+
return a.x - b.x;
|
|
51070
|
+
return a.y - b.y;
|
|
51071
|
+
});
|
|
51072
|
+
return {
|
|
51073
|
+
lg: baseLayout,
|
|
51074
|
+
md: sortedLayout.map((item, index) => {
|
|
51075
|
+
const maxW = Math.min(item.w, 4);
|
|
51076
|
+
const row = Math.floor(index / 2);
|
|
51077
|
+
const col = index % 2 * 4;
|
|
51078
|
+
return {
|
|
51079
|
+
...item,
|
|
51080
|
+
w: maxW,
|
|
51081
|
+
x: col,
|
|
51082
|
+
y: row * 3,
|
|
51083
|
+
h: Math.min(item.h, 3)
|
|
51084
|
+
};
|
|
51085
|
+
}),
|
|
51086
|
+
sm: sortedLayout.map((item, index) => {
|
|
51087
|
+
const maxW = Math.min(item.w, 4);
|
|
51088
|
+
return {
|
|
51089
|
+
...item,
|
|
51090
|
+
w: maxW,
|
|
51091
|
+
x: 0,
|
|
51092
|
+
y: index * 3,
|
|
51093
|
+
h: Math.min(item.h, 3)
|
|
51094
|
+
};
|
|
51095
|
+
}),
|
|
51096
|
+
xs: sortedLayout.map((item, index) => ({
|
|
51097
|
+
...item,
|
|
51098
|
+
w: 2,
|
|
51099
|
+
// Full width on mobile
|
|
51100
|
+
x: 0,
|
|
51101
|
+
y: index * 2,
|
|
51102
|
+
h: Math.min(item.h, 2)
|
|
51103
|
+
})),
|
|
51104
|
+
xxs: sortedLayout.map((item, index) => ({
|
|
51105
|
+
...item,
|
|
51106
|
+
w: 1,
|
|
51107
|
+
// Full width on extra small
|
|
51108
|
+
x: 0,
|
|
51109
|
+
y: index * 2,
|
|
51110
|
+
h: Math.min(item.h, 2)
|
|
51111
|
+
}))
|
|
51112
|
+
};
|
|
50124
51113
|
};
|
|
50125
|
-
const
|
|
50126
|
-
{
|
|
50127
|
-
|
|
50128
|
-
|
|
50129
|
-
|
|
50130
|
-
|
|
50131
|
-
|
|
50132
|
-
|
|
50133
|
-
|
|
50134
|
-
|
|
50135
|
-
|
|
50136
|
-
|
|
50137
|
-
|
|
50138
|
-
|
|
50139
|
-
|
|
50140
|
-
|
|
50141
|
-
},
|
|
50142
|
-
{
|
|
50143
|
-
id: "active-sessions",
|
|
50144
|
-
title: "Active Sessions",
|
|
50145
|
-
value: 1234,
|
|
50146
|
-
change: { value: 2, type: "decrease", period: "last hour" },
|
|
50147
|
-
icon: /* @__PURE__ */ jsx(Activity, { className: "h-4 w-4" }),
|
|
50148
|
-
color: "warning"
|
|
50149
|
-
},
|
|
50150
|
-
{
|
|
50151
|
-
id: "conversion-rate",
|
|
50152
|
-
title: "Conversion Rate",
|
|
50153
|
-
value: "3.2%",
|
|
50154
|
-
change: { value: 0.3, type: "increase", period: "last week" },
|
|
50155
|
-
icon: /* @__PURE__ */ jsx(TrendingUp, { className: "h-4 w-4" }),
|
|
50156
|
-
color: "info"
|
|
51114
|
+
const toggleWidgetLock = (widgetId) => {
|
|
51115
|
+
setLockedWidgets((prev) => {
|
|
51116
|
+
const newSet = new Set(prev);
|
|
51117
|
+
if (newSet.has(widgetId)) {
|
|
51118
|
+
newSet.delete(widgetId);
|
|
51119
|
+
} else {
|
|
51120
|
+
newSet.add(widgetId);
|
|
51121
|
+
}
|
|
51122
|
+
return newSet;
|
|
51123
|
+
});
|
|
51124
|
+
};
|
|
51125
|
+
const toggleFullscreen = (widgetId) => {
|
|
51126
|
+
if (fullscreenWidget === widgetId) {
|
|
51127
|
+
setFullscreenWidget(null);
|
|
51128
|
+
} else {
|
|
51129
|
+
setFullscreenWidget(widgetId);
|
|
50157
51130
|
}
|
|
50158
|
-
|
|
50159
|
-
const
|
|
50160
|
-
|
|
50161
|
-
|
|
50162
|
-
|
|
50163
|
-
|
|
50164
|
-
|
|
50165
|
-
|
|
50166
|
-
|
|
50167
|
-
|
|
50168
|
-
|
|
50169
|
-
|
|
50170
|
-
|
|
50171
|
-
|
|
50172
|
-
|
|
50173
|
-
|
|
51131
|
+
};
|
|
51132
|
+
const renderWidget = (widget) => {
|
|
51133
|
+
const isLocked = lockedWidgets.has(widget.id);
|
|
51134
|
+
const isFullscreen = fullscreenWidget === widget.id;
|
|
51135
|
+
const widgetContent = () => {
|
|
51136
|
+
switch (widget.type) {
|
|
51137
|
+
case "metric":
|
|
51138
|
+
return /* @__PURE__ */ jsx(
|
|
51139
|
+
MetricCard,
|
|
51140
|
+
{
|
|
51141
|
+
data: widget.data,
|
|
51142
|
+
onAction: (action) => onWidgetAction?.(widget.id, action),
|
|
51143
|
+
glassmorphism
|
|
51144
|
+
}
|
|
51145
|
+
);
|
|
51146
|
+
case "chart":
|
|
51147
|
+
return /* @__PURE__ */ jsx(
|
|
51148
|
+
ChartWidget,
|
|
51149
|
+
{
|
|
51150
|
+
id: widget.id,
|
|
51151
|
+
title: widget.title,
|
|
51152
|
+
description: widget.description,
|
|
51153
|
+
data: widget.data,
|
|
51154
|
+
loading: widget.loading,
|
|
51155
|
+
glassmorphism,
|
|
51156
|
+
onAction: (action, data) => onWidgetAction?.(widget.id, action, data)
|
|
51157
|
+
}
|
|
51158
|
+
);
|
|
51159
|
+
case "activity":
|
|
51160
|
+
return /* @__PURE__ */ jsx(
|
|
51161
|
+
ActivityFeed,
|
|
51162
|
+
{
|
|
51163
|
+
items: widget.data?.items || [],
|
|
51164
|
+
title: widget.title,
|
|
51165
|
+
loading: widget.loading,
|
|
51166
|
+
glassmorphism,
|
|
51167
|
+
realtime: widget.data?.realtime,
|
|
51168
|
+
onAction: (action, data) => onWidgetAction?.(widget.id, action, data)
|
|
51169
|
+
}
|
|
51170
|
+
);
|
|
51171
|
+
case "table":
|
|
51172
|
+
case "map":
|
|
51173
|
+
case "calendar":
|
|
51174
|
+
case "progress":
|
|
51175
|
+
case "comparison":
|
|
51176
|
+
return /* @__PURE__ */ jsxs("div", { className: cn(
|
|
51177
|
+
"h-full p-4 rounded-lg border",
|
|
51178
|
+
glassmorphism ? "bg-background/60 backdrop-blur-md border-white/10" : "bg-card"
|
|
51179
|
+
), children: [
|
|
51180
|
+
/* @__PURE__ */ jsx("h3", { className: "font-semibold mb-2", children: widget.title }),
|
|
51181
|
+
widget.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-4", children: widget.description }),
|
|
51182
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-32 text-muted-foreground", children: /* @__PURE__ */ jsxs("span", { className: "text-sm", children: [
|
|
51183
|
+
widget.type,
|
|
51184
|
+
" widget content"
|
|
51185
|
+
] }) })
|
|
51186
|
+
] });
|
|
51187
|
+
default:
|
|
51188
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center h-full text-muted-foreground", children: [
|
|
51189
|
+
"Widget type not supported: ",
|
|
51190
|
+
widget.type
|
|
51191
|
+
] });
|
|
51192
|
+
}
|
|
51193
|
+
};
|
|
51194
|
+
return /* @__PURE__ */ jsxs(
|
|
51195
|
+
motion.div,
|
|
51196
|
+
{
|
|
51197
|
+
className: cn(
|
|
51198
|
+
"relative group h-full",
|
|
51199
|
+
isFullscreen && "!fixed !inset-4 !z-50 !h-auto !w-auto"
|
|
51200
|
+
),
|
|
51201
|
+
layout: !isFullscreen,
|
|
51202
|
+
transition: { duration: 0.2 },
|
|
51203
|
+
children: [
|
|
51204
|
+
/* @__PURE__ */ jsx("div", { className: "h-full", children: widgetContent() }),
|
|
51205
|
+
editMode && !isFullscreen && /* @__PURE__ */ jsx(
|
|
51206
|
+
motion.div,
|
|
51207
|
+
{
|
|
51208
|
+
initial: { opacity: 0 },
|
|
51209
|
+
animate: { opacity: 1 },
|
|
51210
|
+
className: "absolute top-2 right-2 z-10 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
51211
|
+
children: /* @__PURE__ */ jsxs("div", { className: cn(
|
|
51212
|
+
"flex items-center gap-1 p-1 rounded-lg",
|
|
51213
|
+
glassmorphism ? "bg-background/80 backdrop-blur-sm" : "bg-background/95",
|
|
51214
|
+
"border shadow-sm"
|
|
51215
|
+
), children: [
|
|
51216
|
+
!isLocked && /* @__PURE__ */ jsx("div", { className: "drag-handle cursor-move p-1 hover:bg-muted rounded", children: /* @__PURE__ */ jsx(Grip, { className: "h-4 w-4" }) }),
|
|
51217
|
+
/* @__PURE__ */ jsx(
|
|
51218
|
+
MoonUIButtonPro,
|
|
51219
|
+
{
|
|
51220
|
+
variant: "ghost",
|
|
51221
|
+
size: "sm",
|
|
51222
|
+
className: "h-6 w-6 p-0",
|
|
51223
|
+
onClick: () => toggleWidgetLock(widget.id),
|
|
51224
|
+
children: isLocked ? /* @__PURE__ */ jsx(Lock, { className: "h-3 w-3" }) : /* @__PURE__ */ jsx(Unlock, { className: "h-3 w-3" })
|
|
51225
|
+
}
|
|
51226
|
+
),
|
|
51227
|
+
/* @__PURE__ */ jsx(
|
|
51228
|
+
MoonUIButtonPro,
|
|
51229
|
+
{
|
|
51230
|
+
variant: "ghost",
|
|
51231
|
+
size: "sm",
|
|
51232
|
+
className: "h-6 w-6 p-0",
|
|
51233
|
+
onClick: () => toggleFullscreen(widget.id),
|
|
51234
|
+
children: /* @__PURE__ */ jsx(Maximize2, { className: "h-3 w-3" })
|
|
51235
|
+
}
|
|
51236
|
+
),
|
|
51237
|
+
/* @__PURE__ */ jsx(
|
|
51238
|
+
MoonUIButtonPro,
|
|
51239
|
+
{
|
|
51240
|
+
variant: "ghost",
|
|
51241
|
+
size: "sm",
|
|
51242
|
+
className: "h-6 w-6 p-0",
|
|
51243
|
+
onClick: () => onWidgetAction?.(widget.id, "settings"),
|
|
51244
|
+
children: /* @__PURE__ */ jsx(Settings, { className: "h-3 w-3" })
|
|
51245
|
+
}
|
|
51246
|
+
),
|
|
51247
|
+
widget.permissions?.canDelete !== false && /* @__PURE__ */ jsx(
|
|
51248
|
+
MoonUIButtonPro,
|
|
51249
|
+
{
|
|
51250
|
+
variant: "ghost",
|
|
51251
|
+
size: "sm",
|
|
51252
|
+
className: "h-6 w-6 p-0 text-destructive hover:text-destructive",
|
|
51253
|
+
onClick: () => onWidgetRemove?.(widget.id),
|
|
51254
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-3 w-3" })
|
|
51255
|
+
}
|
|
51256
|
+
)
|
|
51257
|
+
] })
|
|
51258
|
+
}
|
|
51259
|
+
),
|
|
51260
|
+
isFullscreen && /* @__PURE__ */ jsx(
|
|
51261
|
+
motion.div,
|
|
51262
|
+
{
|
|
51263
|
+
initial: { opacity: 0, y: -10 },
|
|
51264
|
+
animate: { opacity: 1, y: 0 },
|
|
51265
|
+
className: "absolute top-4 right-4 z-10",
|
|
51266
|
+
children: /* @__PURE__ */ jsxs(
|
|
51267
|
+
MoonUIButtonPro,
|
|
51268
|
+
{
|
|
51269
|
+
variant: "outline",
|
|
51270
|
+
size: "sm",
|
|
51271
|
+
onClick: () => toggleFullscreen(widget.id),
|
|
51272
|
+
children: [
|
|
51273
|
+
/* @__PURE__ */ jsx(Minimize2, { className: "h-4 w-4 mr-2" }),
|
|
51274
|
+
"Exit Fullscreen"
|
|
51275
|
+
]
|
|
51276
|
+
}
|
|
51277
|
+
)
|
|
51278
|
+
}
|
|
51279
|
+
)
|
|
51280
|
+
]
|
|
51281
|
+
},
|
|
51282
|
+
widget.id
|
|
51283
|
+
);
|
|
51284
|
+
};
|
|
51285
|
+
const isMobile = currentBreakpoint === "xs" || currentBreakpoint === "xxs" || currentBreakpoint === "sm";
|
|
51286
|
+
return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: cn("w-full relative", className), children: [
|
|
51287
|
+
/* @__PURE__ */ jsx(AnimatePresence, { children: fullscreenWidget ? (
|
|
51288
|
+
// Fullscreen widget
|
|
51289
|
+
/* @__PURE__ */ jsx(
|
|
51290
|
+
motion.div,
|
|
50174
51291
|
{
|
|
50175
|
-
|
|
50176
|
-
|
|
50177
|
-
|
|
50178
|
-
|
|
50179
|
-
|
|
50180
|
-
"Refresh"
|
|
50181
|
-
]
|
|
51292
|
+
initial: { opacity: 0 },
|
|
51293
|
+
animate: { opacity: 1 },
|
|
51294
|
+
exit: { opacity: 0 },
|
|
51295
|
+
className: "fixed inset-0 z-40 bg-background",
|
|
51296
|
+
children: widgets.filter((w2) => w2.id === fullscreenWidget).map(renderWidget)
|
|
50182
51297
|
}
|
|
50183
51298
|
)
|
|
51299
|
+
) : isMobile ? (
|
|
51300
|
+
// Mobile layout - Grid Layout yerine normal flex kullan
|
|
51301
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-6", children: widgets.map((widget) => /* @__PURE__ */ jsx(
|
|
51302
|
+
motion.div,
|
|
51303
|
+
{
|
|
51304
|
+
initial: { opacity: 0, y: 20 },
|
|
51305
|
+
animate: { opacity: 1, y: 0 },
|
|
51306
|
+
transition: { duration: 0.3 },
|
|
51307
|
+
className: "w-full",
|
|
51308
|
+
children: renderWidget(widget)
|
|
51309
|
+
},
|
|
51310
|
+
widget.id
|
|
51311
|
+
)) })
|
|
51312
|
+
) : (
|
|
51313
|
+
// Desktop Grid layout
|
|
51314
|
+
/* @__PURE__ */ jsx(
|
|
51315
|
+
ResponsiveGridLayout,
|
|
51316
|
+
{
|
|
51317
|
+
className: "layout",
|
|
51318
|
+
layouts: layouts.lg ? layouts : generateResponsiveLayouts(),
|
|
51319
|
+
breakpoints,
|
|
51320
|
+
cols,
|
|
51321
|
+
rowHeight: currentBreakpoint === "xs" || currentBreakpoint === "xxs" ? 60 : currentBreakpoint === "sm" ? 70 : rowHeight,
|
|
51322
|
+
margin: currentBreakpoint === "xs" || currentBreakpoint === "xxs" ? [12, 20] : margin,
|
|
51323
|
+
containerPadding: currentBreakpoint === "xs" || currentBreakpoint === "xxs" ? [8, 8] : containerPadding,
|
|
51324
|
+
onLayoutChange: (layout, allLayouts) => {
|
|
51325
|
+
setLayouts(allLayouts);
|
|
51326
|
+
onLayoutChange?.(layout);
|
|
51327
|
+
},
|
|
51328
|
+
onBreakpointChange: (breakpoint) => {
|
|
51329
|
+
setCurrentBreakpoint(breakpoint);
|
|
51330
|
+
if (breakpoint === "xs" || breakpoint === "xxs" || breakpoint === "sm") {
|
|
51331
|
+
setCompactType("vertical");
|
|
51332
|
+
} else {
|
|
51333
|
+
setCompactType("vertical");
|
|
51334
|
+
}
|
|
51335
|
+
},
|
|
51336
|
+
draggableHandle: ".drag-handle",
|
|
51337
|
+
isDraggable: editMode,
|
|
51338
|
+
isResizable: editMode,
|
|
51339
|
+
compactType,
|
|
51340
|
+
preventCollision: false,
|
|
51341
|
+
useCSSTransforms: true,
|
|
51342
|
+
transformScale: 1,
|
|
51343
|
+
isDroppable: true,
|
|
51344
|
+
autoSize: true,
|
|
51345
|
+
verticalCompact: true,
|
|
51346
|
+
children: widgets.map((widget) => /* @__PURE__ */ jsx("div", { children: renderWidget(widget) }, widget.id))
|
|
51347
|
+
}
|
|
51348
|
+
)
|
|
51349
|
+
) }),
|
|
51350
|
+
editMode && !fullscreenWidget && /* @__PURE__ */ jsx(
|
|
51351
|
+
motion.div,
|
|
51352
|
+
{
|
|
51353
|
+
initial: { opacity: 0 },
|
|
51354
|
+
animate: { opacity: 0.1 },
|
|
51355
|
+
className: "absolute inset-0 pointer-events-none",
|
|
51356
|
+
style: {
|
|
51357
|
+
backgroundImage: `
|
|
51358
|
+
repeating-linear-gradient(
|
|
51359
|
+
0deg,
|
|
51360
|
+
var(--border) 0px,
|
|
51361
|
+
transparent 1px,
|
|
51362
|
+
transparent ${rowHeight + margin[1]}px,
|
|
51363
|
+
var(--border) ${rowHeight + margin[1]}px
|
|
51364
|
+
),
|
|
51365
|
+
repeating-linear-gradient(
|
|
51366
|
+
90deg,
|
|
51367
|
+
var(--border) 0px,
|
|
51368
|
+
transparent 1px,
|
|
51369
|
+
transparent ${100 / cols[currentBreakpoint]}%,
|
|
51370
|
+
var(--border) ${100 / cols[currentBreakpoint]}%
|
|
51371
|
+
)
|
|
51372
|
+
`
|
|
51373
|
+
}
|
|
51374
|
+
}
|
|
51375
|
+
)
|
|
51376
|
+
] });
|
|
51377
|
+
}
|
|
51378
|
+
var PRESET_RANGES = [
|
|
51379
|
+
{
|
|
51380
|
+
label: "Today",
|
|
51381
|
+
value: "today",
|
|
51382
|
+
getRange: () => ({
|
|
51383
|
+
start: startOfDay(/* @__PURE__ */ new Date()),
|
|
51384
|
+
end: endOfDay(/* @__PURE__ */ new Date()),
|
|
51385
|
+
label: "Today",
|
|
51386
|
+
preset: "today"
|
|
51387
|
+
})
|
|
51388
|
+
},
|
|
51389
|
+
{
|
|
51390
|
+
label: "Yesterday",
|
|
51391
|
+
value: "yesterday",
|
|
51392
|
+
getRange: () => ({
|
|
51393
|
+
start: startOfDay(subDays(/* @__PURE__ */ new Date(), 1)),
|
|
51394
|
+
end: endOfDay(subDays(/* @__PURE__ */ new Date(), 1)),
|
|
51395
|
+
label: "Yesterday",
|
|
51396
|
+
preset: "yesterday"
|
|
51397
|
+
})
|
|
51398
|
+
},
|
|
51399
|
+
{
|
|
51400
|
+
label: "Last 7 days",
|
|
51401
|
+
value: "last7days",
|
|
51402
|
+
getRange: () => ({
|
|
51403
|
+
start: startOfDay(subDays(/* @__PURE__ */ new Date(), 6)),
|
|
51404
|
+
end: endOfDay(/* @__PURE__ */ new Date()),
|
|
51405
|
+
label: "Last 7 days",
|
|
51406
|
+
preset: "last7days"
|
|
51407
|
+
})
|
|
51408
|
+
},
|
|
51409
|
+
{
|
|
51410
|
+
label: "Last 30 days",
|
|
51411
|
+
value: "last30days",
|
|
51412
|
+
getRange: () => ({
|
|
51413
|
+
start: startOfDay(subDays(/* @__PURE__ */ new Date(), 29)),
|
|
51414
|
+
end: endOfDay(/* @__PURE__ */ new Date()),
|
|
51415
|
+
label: "Last 30 days",
|
|
51416
|
+
preset: "last30days"
|
|
51417
|
+
})
|
|
51418
|
+
},
|
|
51419
|
+
{
|
|
51420
|
+
label: "This week",
|
|
51421
|
+
value: "thisWeek",
|
|
51422
|
+
getRange: () => ({
|
|
51423
|
+
start: startOfWeek(/* @__PURE__ */ new Date()),
|
|
51424
|
+
end: endOfWeek(/* @__PURE__ */ new Date()),
|
|
51425
|
+
label: "This week",
|
|
51426
|
+
preset: "custom"
|
|
51427
|
+
})
|
|
51428
|
+
},
|
|
51429
|
+
{
|
|
51430
|
+
label: "This month",
|
|
51431
|
+
value: "thisMonth",
|
|
51432
|
+
getRange: () => ({
|
|
51433
|
+
start: startOfMonth(/* @__PURE__ */ new Date()),
|
|
51434
|
+
end: endOfMonth(/* @__PURE__ */ new Date()),
|
|
51435
|
+
label: "This month",
|
|
51436
|
+
preset: "thisMonth"
|
|
51437
|
+
})
|
|
51438
|
+
},
|
|
51439
|
+
{
|
|
51440
|
+
label: "Last month",
|
|
51441
|
+
value: "lastMonth",
|
|
51442
|
+
getRange: () => {
|
|
51443
|
+
const lastMonth = subDays(startOfMonth(/* @__PURE__ */ new Date()), 1);
|
|
51444
|
+
return {
|
|
51445
|
+
start: startOfMonth(lastMonth),
|
|
51446
|
+
end: endOfMonth(lastMonth),
|
|
51447
|
+
label: "Last month",
|
|
51448
|
+
preset: "lastMonth"
|
|
51449
|
+
};
|
|
51450
|
+
}
|
|
51451
|
+
}
|
|
51452
|
+
];
|
|
51453
|
+
function TimeRangePicker({
|
|
51454
|
+
value,
|
|
51455
|
+
onChange,
|
|
51456
|
+
className,
|
|
51457
|
+
showPresets = true,
|
|
51458
|
+
showComparison = false,
|
|
51459
|
+
glassmorphism = false
|
|
51460
|
+
}) {
|
|
51461
|
+
const [isOpen, setIsOpen] = t__default.useState(false);
|
|
51462
|
+
const [customRange, setCustomRange] = t__default.useState({});
|
|
51463
|
+
const [comparisonEnabled, setComparisonEnabled] = t__default.useState(false);
|
|
51464
|
+
const currentRange = value || PRESET_RANGES[2].getRange();
|
|
51465
|
+
const formatRange = (range) => {
|
|
51466
|
+
if (range.preset && range.preset !== "custom") {
|
|
51467
|
+
return range.label;
|
|
51468
|
+
}
|
|
51469
|
+
return `${format(range.start, "MMM d")} - ${format(range.end, "MMM d, yyyy")}`;
|
|
51470
|
+
};
|
|
51471
|
+
const handlePresetSelect = (preset) => {
|
|
51472
|
+
const range = preset.getRange();
|
|
51473
|
+
onChange?.(range);
|
|
51474
|
+
setIsOpen(false);
|
|
51475
|
+
};
|
|
51476
|
+
const handleCustomRangeSelect = () => {
|
|
51477
|
+
if (customRange.from && customRange.to) {
|
|
51478
|
+
onChange?.({
|
|
51479
|
+
start: startOfDay(customRange.from),
|
|
51480
|
+
end: endOfDay(customRange.to),
|
|
51481
|
+
label: `${format(customRange.from, "MMM d")} - ${format(customRange.to, "MMM d, yyyy")}`,
|
|
51482
|
+
preset: "custom"
|
|
51483
|
+
});
|
|
51484
|
+
setIsOpen(false);
|
|
51485
|
+
}
|
|
51486
|
+
};
|
|
51487
|
+
return /* @__PURE__ */ jsxs(MoonUIPopoverPro, { open: isOpen, onOpenChange: setIsOpen, children: [
|
|
51488
|
+
/* @__PURE__ */ jsx(MoonUIPopoverTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
51489
|
+
MoonUIButtonPro,
|
|
51490
|
+
{
|
|
51491
|
+
variant: "outline",
|
|
51492
|
+
className: cn(
|
|
51493
|
+
"justify-start text-left font-normal",
|
|
51494
|
+
glassmorphism && "bg-background/60 backdrop-blur-sm border-white/10",
|
|
51495
|
+
!value && "text-muted-foreground",
|
|
51496
|
+
className
|
|
51497
|
+
),
|
|
51498
|
+
children: [
|
|
51499
|
+
/* @__PURE__ */ jsx(CalendarIcon, { className: "mr-2 h-4 w-4" }),
|
|
51500
|
+
formatRange(currentRange),
|
|
51501
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "ml-auto h-4 w-4 opacity-50" })
|
|
51502
|
+
]
|
|
51503
|
+
}
|
|
51504
|
+
) }),
|
|
51505
|
+
/* @__PURE__ */ jsx(
|
|
51506
|
+
MoonUIPopoverContentPro,
|
|
51507
|
+
{
|
|
51508
|
+
className: cn(
|
|
51509
|
+
"w-auto p-0",
|
|
51510
|
+
glassmorphism && "bg-background/95 backdrop-blur-md border-white/10"
|
|
51511
|
+
),
|
|
51512
|
+
align: "end",
|
|
51513
|
+
side: "bottom",
|
|
51514
|
+
sideOffset: 4,
|
|
51515
|
+
children: /* @__PURE__ */ jsx(
|
|
51516
|
+
motion.div,
|
|
51517
|
+
{
|
|
51518
|
+
initial: { opacity: 0, y: -10 },
|
|
51519
|
+
animate: { opacity: 1, y: 0 },
|
|
51520
|
+
transition: { duration: 0.2 },
|
|
51521
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex", children: [
|
|
51522
|
+
showPresets && /* @__PURE__ */ jsxs("div", { className: "border-r p-3", children: [
|
|
51523
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-2 pb-2", children: [
|
|
51524
|
+
/* @__PURE__ */ jsx(Clock, { className: "h-4 w-4 text-muted-foreground" }),
|
|
51525
|
+
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium", children: "Quick Select" })
|
|
51526
|
+
] }),
|
|
51527
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: PRESET_RANGES.map((preset) => /* @__PURE__ */ jsx(
|
|
51528
|
+
motion.button,
|
|
51529
|
+
{
|
|
51530
|
+
whileHover: { x: 2 },
|
|
51531
|
+
whileTap: { scale: 0.98 },
|
|
51532
|
+
onClick: () => handlePresetSelect(preset),
|
|
51533
|
+
className: cn(
|
|
51534
|
+
"w-full text-left px-2 py-1.5 text-sm rounded-md transition-colors",
|
|
51535
|
+
"hover:bg-muted",
|
|
51536
|
+
currentRange.preset === preset.value && "bg-primary text-primary-foreground"
|
|
51537
|
+
),
|
|
51538
|
+
children: preset.label
|
|
51539
|
+
},
|
|
51540
|
+
preset.value
|
|
51541
|
+
)) }),
|
|
51542
|
+
showComparison && /* @__PURE__ */ jsx("div", { className: "mt-4 pt-4 border-t", children: /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 px-2 cursor-pointer", children: [
|
|
51543
|
+
/* @__PURE__ */ jsx(
|
|
51544
|
+
"input",
|
|
51545
|
+
{
|
|
51546
|
+
type: "checkbox",
|
|
51547
|
+
checked: comparisonEnabled,
|
|
51548
|
+
onChange: (e) => setComparisonEnabled(e.target.checked),
|
|
51549
|
+
className: "rounded"
|
|
51550
|
+
}
|
|
51551
|
+
),
|
|
51552
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm", children: "Compare to previous period" })
|
|
51553
|
+
] }) })
|
|
51554
|
+
] }),
|
|
51555
|
+
/* @__PURE__ */ jsxs("div", { className: "p-3", children: [
|
|
51556
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-2 pb-2", children: [
|
|
51557
|
+
/* @__PURE__ */ jsx(CalendarIcon, { className: "h-4 w-4 text-muted-foreground" }),
|
|
51558
|
+
/* @__PURE__ */ jsx("h4", { className: "text-sm font-medium", children: "Custom Range" })
|
|
51559
|
+
] }),
|
|
51560
|
+
/* @__PURE__ */ jsx(
|
|
51561
|
+
Calendar,
|
|
51562
|
+
{
|
|
51563
|
+
mode: "range",
|
|
51564
|
+
selected: {
|
|
51565
|
+
from: customRange.from,
|
|
51566
|
+
to: customRange.to
|
|
51567
|
+
},
|
|
51568
|
+
onSelect: (range) => setCustomRange(range || {}),
|
|
51569
|
+
numberOfMonths: 2,
|
|
51570
|
+
className: "rounded-md"
|
|
51571
|
+
}
|
|
51572
|
+
),
|
|
51573
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between pt-3 px-2", children: [
|
|
51574
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground", children: customRange.from && customRange.to && /* @__PURE__ */ jsxs("span", { children: [
|
|
51575
|
+
Math.ceil((customRange.to.getTime() - customRange.from.getTime()) / (1e3 * 60 * 60 * 24)),
|
|
51576
|
+
" days selected"
|
|
51577
|
+
] }) }),
|
|
51578
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
51579
|
+
/* @__PURE__ */ jsx(
|
|
51580
|
+
MoonUIButtonPro,
|
|
51581
|
+
{
|
|
51582
|
+
variant: "ghost",
|
|
51583
|
+
size: "sm",
|
|
51584
|
+
onClick: () => {
|
|
51585
|
+
setCustomRange({});
|
|
51586
|
+
setIsOpen(false);
|
|
51587
|
+
},
|
|
51588
|
+
children: "Cancel"
|
|
51589
|
+
}
|
|
51590
|
+
),
|
|
51591
|
+
/* @__PURE__ */ jsx(
|
|
51592
|
+
MoonUIButtonPro,
|
|
51593
|
+
{
|
|
51594
|
+
size: "sm",
|
|
51595
|
+
onClick: handleCustomRangeSelect,
|
|
51596
|
+
disabled: !customRange.from || !customRange.to,
|
|
51597
|
+
children: "Apply"
|
|
51598
|
+
}
|
|
51599
|
+
)
|
|
51600
|
+
] })
|
|
51601
|
+
] })
|
|
51602
|
+
] })
|
|
51603
|
+
] })
|
|
51604
|
+
}
|
|
51605
|
+
)
|
|
51606
|
+
}
|
|
51607
|
+
)
|
|
51608
|
+
] });
|
|
51609
|
+
}
|
|
51610
|
+
var DASHBOARD_TEMPLATES = [
|
|
51611
|
+
{
|
|
51612
|
+
id: "analytics",
|
|
51613
|
+
name: "Analytics Dashboard",
|
|
51614
|
+
description: "Comprehensive analytics with metrics and charts",
|
|
51615
|
+
category: "analytics",
|
|
51616
|
+
theme: "analytics",
|
|
51617
|
+
widgets: [
|
|
51618
|
+
{
|
|
51619
|
+
type: "metric",
|
|
51620
|
+
title: "Total Revenue",
|
|
51621
|
+
size: { w: 3, h: 2 },
|
|
51622
|
+
position: { x: 0, y: 0 },
|
|
51623
|
+
data: {
|
|
51624
|
+
id: "revenue",
|
|
51625
|
+
title: "Total Revenue",
|
|
51626
|
+
value: 125430,
|
|
51627
|
+
change: { value: 12, type: "increase", period: "last month" },
|
|
51628
|
+
color: "success",
|
|
51629
|
+
icon: /* @__PURE__ */ jsx(DollarSign, { className: "h-4 w-4" }),
|
|
51630
|
+
sparkline: [100, 120, 115, 125, 130, 128, 132],
|
|
51631
|
+
unit: "$"
|
|
51632
|
+
}
|
|
51633
|
+
},
|
|
51634
|
+
{
|
|
51635
|
+
type: "metric",
|
|
51636
|
+
title: "Active Users",
|
|
51637
|
+
size: { w: 3, h: 2 },
|
|
51638
|
+
position: { x: 3, y: 0 },
|
|
51639
|
+
data: {
|
|
51640
|
+
id: "users",
|
|
51641
|
+
title: "Active Users",
|
|
51642
|
+
value: 2543,
|
|
51643
|
+
change: { value: 8, type: "increase", period: "last week" },
|
|
51644
|
+
color: "primary",
|
|
51645
|
+
icon: /* @__PURE__ */ jsx(Users, { className: "h-4 w-4" }),
|
|
51646
|
+
sparkline: [200, 220, 210, 230, 225, 240, 254]
|
|
51647
|
+
}
|
|
51648
|
+
},
|
|
51649
|
+
{
|
|
51650
|
+
type: "chart",
|
|
51651
|
+
title: "Revenue Trend",
|
|
51652
|
+
size: { w: 6, h: 4 },
|
|
51653
|
+
position: { x: 0, y: 2 },
|
|
51654
|
+
data: {
|
|
51655
|
+
type: "area",
|
|
51656
|
+
data: [
|
|
51657
|
+
{ name: "Jan", revenue: 4e3, profit: 2400 },
|
|
51658
|
+
{ name: "Feb", revenue: 3e3, profit: 1398 },
|
|
51659
|
+
{ name: "Mar", revenue: 5e3, profit: 3200 },
|
|
51660
|
+
{ name: "Apr", revenue: 4500, profit: 2900 },
|
|
51661
|
+
{ name: "May", revenue: 6e3, profit: 3800 },
|
|
51662
|
+
{ name: "Jun", revenue: 5500, profit: 3400 }
|
|
51663
|
+
]
|
|
51664
|
+
}
|
|
51665
|
+
},
|
|
51666
|
+
{
|
|
51667
|
+
type: "activity",
|
|
51668
|
+
title: "Recent Activity",
|
|
51669
|
+
size: { w: 3, h: 6 },
|
|
51670
|
+
position: { x: 9, y: 0 },
|
|
51671
|
+
data: {
|
|
51672
|
+
realtime: true,
|
|
51673
|
+
items: [
|
|
51674
|
+
{
|
|
51675
|
+
id: "1",
|
|
51676
|
+
type: "success",
|
|
51677
|
+
title: "completed a purchase",
|
|
51678
|
+
description: "Order #12345 - $250.00",
|
|
51679
|
+
timestamp: new Date(Date.now() - 1e3 * 60 * 5),
|
|
51680
|
+
user: { name: "John Doe" }
|
|
51681
|
+
},
|
|
51682
|
+
{
|
|
51683
|
+
id: "2",
|
|
51684
|
+
type: "info",
|
|
51685
|
+
title: "signed up",
|
|
51686
|
+
description: "New user registration",
|
|
51687
|
+
timestamp: new Date(Date.now() - 1e3 * 60 * 15),
|
|
51688
|
+
user: { name: "Jane Smith" }
|
|
51689
|
+
}
|
|
51690
|
+
]
|
|
51691
|
+
}
|
|
51692
|
+
}
|
|
51693
|
+
]
|
|
51694
|
+
},
|
|
51695
|
+
{
|
|
51696
|
+
id: "sales",
|
|
51697
|
+
name: "Sales Dashboard",
|
|
51698
|
+
description: "Track sales performance and targets",
|
|
51699
|
+
category: "sales",
|
|
51700
|
+
theme: "sales",
|
|
51701
|
+
widgets: [
|
|
51702
|
+
// Sales-specific widgets
|
|
51703
|
+
]
|
|
51704
|
+
},
|
|
51705
|
+
{
|
|
51706
|
+
id: "monitoring",
|
|
51707
|
+
name: "System Monitoring",
|
|
51708
|
+
description: "Monitor system health and performance",
|
|
51709
|
+
category: "operations",
|
|
51710
|
+
theme: "monitoring",
|
|
51711
|
+
widgets: [
|
|
51712
|
+
// Monitoring widgets
|
|
51713
|
+
]
|
|
51714
|
+
}
|
|
51715
|
+
];
|
|
51716
|
+
var WIDGET_TYPE_ICONS = {
|
|
51717
|
+
metric: /* @__PURE__ */ jsx(BarChart3, { className: "h-4 w-4" }),
|
|
51718
|
+
chart: /* @__PURE__ */ jsx(Activity, { className: "h-4 w-4" }),
|
|
51719
|
+
table: /* @__PURE__ */ jsx(Table$1, { className: "h-4 w-4" }),
|
|
51720
|
+
map: /* @__PURE__ */ jsx(Map$1, { className: "h-4 w-4" }),
|
|
51721
|
+
activity: /* @__PURE__ */ jsx(Clock, { className: "h-4 w-4" }),
|
|
51722
|
+
calendar: /* @__PURE__ */ jsx(Calendar$1, { className: "h-4 w-4" }),
|
|
51723
|
+
progress: /* @__PURE__ */ jsx(Target, { className: "h-4 w-4" }),
|
|
51724
|
+
comparison: /* @__PURE__ */ jsx(TrendingUp, { className: "h-4 w-4" })
|
|
51725
|
+
};
|
|
51726
|
+
var THEME_COLORS = {
|
|
51727
|
+
analytics: "from-blue-500/10 to-purple-500/10",
|
|
51728
|
+
sales: "from-green-500/10 to-emerald-500/10",
|
|
51729
|
+
monitoring: "from-orange-500/10 to-red-500/10",
|
|
51730
|
+
finance: "from-indigo-500/10 to-blue-500/10",
|
|
51731
|
+
custom: "from-gray-500/10 to-gray-600/10"
|
|
51732
|
+
};
|
|
51733
|
+
function Dashboard({
|
|
51734
|
+
config,
|
|
51735
|
+
widgets: initialWidgets = [],
|
|
51736
|
+
templates = DASHBOARD_TEMPLATES,
|
|
51737
|
+
onConfigChange,
|
|
51738
|
+
onWidgetAdd,
|
|
51739
|
+
onWidgetRemove,
|
|
51740
|
+
onWidgetUpdate,
|
|
51741
|
+
onExport,
|
|
51742
|
+
onImport,
|
|
51743
|
+
className,
|
|
51744
|
+
showHeader = true,
|
|
51745
|
+
title = "Dashboard",
|
|
51746
|
+
description = "Real-time analytics and insights",
|
|
51747
|
+
editable = true,
|
|
51748
|
+
realtime = false,
|
|
51749
|
+
glassmorphism = true
|
|
51750
|
+
}) {
|
|
51751
|
+
const [editMode, setEditMode] = t__default.useState(false);
|
|
51752
|
+
const [widgets, setWidgets] = t__default.useState(initialWidgets);
|
|
51753
|
+
const [selectedTheme, setSelectedTheme] = t__default.useState("analytics");
|
|
51754
|
+
const [timeRange, setTimeRange] = t__default.useState();
|
|
51755
|
+
const [searchQuery, setSearchQuery] = t__default.useState("");
|
|
51756
|
+
const [showWidgetLibrary, setShowWidgetLibrary] = t__default.useState(false);
|
|
51757
|
+
const [showTemplates, setShowTemplates] = t__default.useState(false);
|
|
51758
|
+
const [refreshing, setRefreshing] = t__default.useState(false);
|
|
51759
|
+
const [notifications, setNotifications] = t__default.useState(3);
|
|
51760
|
+
t__default.useEffect(() => {
|
|
51761
|
+
setWidgets(initialWidgets);
|
|
51762
|
+
}, [initialWidgets]);
|
|
51763
|
+
t__default.useEffect(() => {
|
|
51764
|
+
if (!realtime)
|
|
51765
|
+
return;
|
|
51766
|
+
const interval = setInterval(() => {
|
|
51767
|
+
setWidgets((prev) => prev.map((widget) => {
|
|
51768
|
+
if (widget.type === "metric" && widget.data) {
|
|
51769
|
+
const newValue = typeof widget.data.value === "number" ? widget.data.value + Math.floor(Math.random() * 10 - 5) : widget.data.value;
|
|
51770
|
+
return {
|
|
51771
|
+
...widget,
|
|
51772
|
+
data: {
|
|
51773
|
+
...widget.data,
|
|
51774
|
+
value: newValue,
|
|
51775
|
+
lastUpdated: /* @__PURE__ */ new Date()
|
|
51776
|
+
}
|
|
51777
|
+
};
|
|
51778
|
+
}
|
|
51779
|
+
return widget;
|
|
51780
|
+
}));
|
|
51781
|
+
}, 5e3);
|
|
51782
|
+
return () => clearInterval(interval);
|
|
51783
|
+
}, [realtime]);
|
|
51784
|
+
const handleAddWidget = (type) => {
|
|
51785
|
+
const newWidget = {
|
|
51786
|
+
id: `widget-${Date.now()}`,
|
|
51787
|
+
type,
|
|
51788
|
+
title: `New ${type} Widget`,
|
|
51789
|
+
size: { w: 3, h: 3 },
|
|
51790
|
+
position: { x: 0, y: 0 },
|
|
51791
|
+
data: generateDefaultData(type)
|
|
51792
|
+
};
|
|
51793
|
+
setWidgets((prev) => [...prev, newWidget]);
|
|
51794
|
+
onWidgetAdd?.(newWidget);
|
|
51795
|
+
setShowWidgetLibrary(false);
|
|
51796
|
+
};
|
|
51797
|
+
const applyTemplate = (template) => {
|
|
51798
|
+
const newWidgets = template.widgets.map((w2, index) => ({
|
|
51799
|
+
...w2,
|
|
51800
|
+
id: `widget-${Date.now()}-${index}`,
|
|
51801
|
+
position: w2.position || { x: index * 3 % 12, y: Math.floor(index * 3 / 12) * 3 },
|
|
51802
|
+
size: w2.size || { w: 3, h: 3 }
|
|
51803
|
+
}));
|
|
51804
|
+
setWidgets(newWidgets);
|
|
51805
|
+
setSelectedTheme(template.theme);
|
|
51806
|
+
setShowTemplates(false);
|
|
51807
|
+
};
|
|
51808
|
+
const generateDefaultData = (type) => {
|
|
51809
|
+
switch (type) {
|
|
51810
|
+
case "metric":
|
|
51811
|
+
return {
|
|
51812
|
+
id: "new-metric",
|
|
51813
|
+
title: "New Metric",
|
|
51814
|
+
value: 0,
|
|
51815
|
+
icon: /* @__PURE__ */ jsx(BarChart3, { className: "h-4 w-4" }),
|
|
51816
|
+
color: "primary"
|
|
51817
|
+
};
|
|
51818
|
+
case "chart":
|
|
51819
|
+
return {
|
|
51820
|
+
type: "line",
|
|
51821
|
+
data: [
|
|
51822
|
+
{ name: "Mon", value: 100 },
|
|
51823
|
+
{ name: "Tue", value: 120 },
|
|
51824
|
+
{ name: "Wed", value: 110 },
|
|
51825
|
+
{ name: "Thu", value: 130 },
|
|
51826
|
+
{ name: "Fri", value: 125 }
|
|
51827
|
+
]
|
|
51828
|
+
};
|
|
51829
|
+
case "activity":
|
|
51830
|
+
return {
|
|
51831
|
+
items: [],
|
|
51832
|
+
realtime: true
|
|
51833
|
+
};
|
|
51834
|
+
default:
|
|
51835
|
+
return {};
|
|
51836
|
+
}
|
|
51837
|
+
};
|
|
51838
|
+
const WidgetLibrary = () => /* @__PURE__ */ jsx(Sheet, { open: showWidgetLibrary, onOpenChange: setShowWidgetLibrary, children: /* @__PURE__ */ jsxs(SheetContent, { className: cn(
|
|
51839
|
+
"w-[400px] sm:w-[540px]",
|
|
51840
|
+
glassmorphism && "bg-background/95 backdrop-blur-md"
|
|
51841
|
+
), children: [
|
|
51842
|
+
/* @__PURE__ */ jsxs(SheetHeader, { children: [
|
|
51843
|
+
/* @__PURE__ */ jsx(SheetTitle, { children: "Widget Library" }),
|
|
51844
|
+
/* @__PURE__ */ jsx(SheetDescription, { children: "Add widgets to customize your dashboard" })
|
|
50184
51845
|
] }),
|
|
50185
|
-
/* @__PURE__ */
|
|
50186
|
-
|
|
50187
|
-
|
|
50188
|
-
|
|
50189
|
-
|
|
50190
|
-
|
|
51846
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-6 space-y-4", children: [
|
|
51847
|
+
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
51848
|
+
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-3 h-4 w-4 text-muted-foreground" }),
|
|
51849
|
+
/* @__PURE__ */ jsx(
|
|
51850
|
+
MoonUIInputPro,
|
|
51851
|
+
{
|
|
51852
|
+
placeholder: "Search widgets...",
|
|
51853
|
+
value: searchQuery,
|
|
51854
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
51855
|
+
className: "pl-10"
|
|
51856
|
+
}
|
|
51857
|
+
)
|
|
50191
51858
|
] }),
|
|
50192
|
-
/* @__PURE__ */
|
|
50193
|
-
|
|
50194
|
-
|
|
51859
|
+
/* @__PURE__ */ jsx(ScrollArea, { className: "h-[calc(100vh-200px)]", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-4", children: Object.entries(WIDGET_TYPE_ICONS).filter(([type]) => type.toLowerCase().includes(searchQuery.toLowerCase())).map(([type, icon]) => /* @__PURE__ */ jsx(
|
|
51860
|
+
motion.div,
|
|
51861
|
+
{
|
|
51862
|
+
whileHover: { scale: 1.02 },
|
|
51863
|
+
whileTap: { scale: 0.98 },
|
|
51864
|
+
children: /* @__PURE__ */ jsxs(
|
|
51865
|
+
MoonUIButtonPro,
|
|
51866
|
+
{
|
|
51867
|
+
variant: "outline",
|
|
51868
|
+
className: "w-full h-24 flex-col gap-2",
|
|
51869
|
+
onClick: () => handleAddWidget(type),
|
|
51870
|
+
children: [
|
|
51871
|
+
/* @__PURE__ */ jsx("div", { className: "p-2 rounded-lg bg-muted", children: icon }),
|
|
51872
|
+
/* @__PURE__ */ jsx("span", { className: "capitalize text-sm", children: type })
|
|
51873
|
+
]
|
|
51874
|
+
}
|
|
51875
|
+
)
|
|
51876
|
+
},
|
|
51877
|
+
type
|
|
51878
|
+
)) }) })
|
|
51879
|
+
] })
|
|
51880
|
+
] }) });
|
|
51881
|
+
const TemplateGallery = () => /* @__PURE__ */ jsx(MoonUIDialogPro, { open: showTemplates, onOpenChange: setShowTemplates, children: /* @__PURE__ */ jsxs(MoonUIDialogContentPro, { className: cn(
|
|
51882
|
+
"max-w-4xl",
|
|
51883
|
+
glassmorphism && "bg-background/95 backdrop-blur-md"
|
|
51884
|
+
), children: [
|
|
51885
|
+
/* @__PURE__ */ jsxs(MoonUIDialogHeaderPro, { children: [
|
|
51886
|
+
/* @__PURE__ */ jsx(MoonUIDialogTitlePro, { children: "Dashboard Templates" }),
|
|
51887
|
+
/* @__PURE__ */ jsx(MoonUIDialogDescriptionPro, { children: "Start with a pre-built template or create your own" })
|
|
51888
|
+
] }),
|
|
51889
|
+
/* @__PURE__ */ jsxs(MoonUITabsPro, { defaultValue: "all", className: "mt-4", children: [
|
|
51890
|
+
/* @__PURE__ */ jsxs(MoonUITabsListPro, { children: [
|
|
51891
|
+
/* @__PURE__ */ jsx(MoonUITabsTriggerPro, { value: "all", children: "All Templates" }),
|
|
51892
|
+
/* @__PURE__ */ jsx(MoonUITabsTriggerPro, { value: "analytics", children: "Analytics" }),
|
|
51893
|
+
/* @__PURE__ */ jsx(MoonUITabsTriggerPro, { value: "sales", children: "Sales" }),
|
|
51894
|
+
/* @__PURE__ */ jsx(MoonUITabsTriggerPro, { value: "operations", children: "Operations" })
|
|
50195
51895
|
] }),
|
|
50196
|
-
/* @__PURE__ */
|
|
50197
|
-
|
|
50198
|
-
|
|
50199
|
-
|
|
51896
|
+
/* @__PURE__ */ jsx(MoonUITabsContentPro, { value: "all", className: "mt-4", children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-4", children: templates.map((template) => /* @__PURE__ */ jsx(
|
|
51897
|
+
motion.div,
|
|
51898
|
+
{
|
|
51899
|
+
whileHover: { y: -4 },
|
|
51900
|
+
className: "cursor-pointer",
|
|
51901
|
+
onClick: () => applyTemplate(template),
|
|
51902
|
+
children: /* @__PURE__ */ jsxs("div", { className: cn(
|
|
51903
|
+
"relative overflow-hidden rounded-lg border p-4 hover:shadow-lg transition-all",
|
|
51904
|
+
"bg-gradient-to-br",
|
|
51905
|
+
THEME_COLORS[template.theme]
|
|
51906
|
+
), children: [
|
|
51907
|
+
template.isPro && /* @__PURE__ */ jsx(MoonUIBadgePro, { className: "absolute top-2 right-2", variant: "secondary", children: "PRO" }),
|
|
51908
|
+
/* @__PURE__ */ jsx("h3", { className: "font-semibold mb-1", children: template.name }),
|
|
51909
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: template.description }),
|
|
51910
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-3 flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
51911
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
51912
|
+
template.widgets.length,
|
|
51913
|
+
" widgets"
|
|
51914
|
+
] }),
|
|
51915
|
+
/* @__PURE__ */ jsx("span", { children: "\u2022" }),
|
|
51916
|
+
/* @__PURE__ */ jsx("span", { className: "capitalize", children: template.category })
|
|
51917
|
+
] })
|
|
51918
|
+
] })
|
|
51919
|
+
},
|
|
51920
|
+
template.id
|
|
51921
|
+
)) }) })
|
|
50200
51922
|
] })
|
|
50201
|
-
] });
|
|
51923
|
+
] }) });
|
|
51924
|
+
return /* @__PURE__ */ jsxs(
|
|
51925
|
+
motion.div,
|
|
51926
|
+
{
|
|
51927
|
+
className: cn(
|
|
51928
|
+
"w-full min-h-screen",
|
|
51929
|
+
glassmorphism && "bg-gradient-to-br",
|
|
51930
|
+
glassmorphism && THEME_COLORS[selectedTheme],
|
|
51931
|
+
className
|
|
51932
|
+
),
|
|
51933
|
+
initial: { opacity: 0 },
|
|
51934
|
+
animate: { opacity: 1 },
|
|
51935
|
+
transition: { duration: 0.5 },
|
|
51936
|
+
children: [
|
|
51937
|
+
showHeader && /* @__PURE__ */ jsxs(
|
|
51938
|
+
motion.div,
|
|
51939
|
+
{
|
|
51940
|
+
className: cn(
|
|
51941
|
+
"sticky top-0 z-30 border-b",
|
|
51942
|
+
glassmorphism ? "bg-background/80 backdrop-blur-md" : "bg-background"
|
|
51943
|
+
),
|
|
51944
|
+
initial: { y: -50 },
|
|
51945
|
+
animate: { y: 0 },
|
|
51946
|
+
transition: { type: "spring", stiffness: 300, damping: 30 },
|
|
51947
|
+
children: [
|
|
51948
|
+
/* @__PURE__ */ jsx("div", { className: "px-6 py-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
51949
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
51950
|
+
/* @__PURE__ */ jsx(
|
|
51951
|
+
motion.div,
|
|
51952
|
+
{
|
|
51953
|
+
whileHover: { scale: 1.05 },
|
|
51954
|
+
whileTap: { scale: 0.95 },
|
|
51955
|
+
children: /* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "ghost", size: "sm", className: "lg:hidden", children: /* @__PURE__ */ jsx(Menu, { className: "h-5 w-5" }) })
|
|
51956
|
+
}
|
|
51957
|
+
),
|
|
51958
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
51959
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
51960
|
+
/* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold tracking-tight", children: title }),
|
|
51961
|
+
realtime && /* @__PURE__ */ jsxs(MoonUIBadgePro, { variant: "secondary", className: "animate-pulse", children: [
|
|
51962
|
+
/* @__PURE__ */ jsx("span", { className: "mr-1 h-1.5 w-1.5 rounded-full bg-green-500" }),
|
|
51963
|
+
"Real-time"
|
|
51964
|
+
] })
|
|
51965
|
+
] }),
|
|
51966
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description })
|
|
51967
|
+
] })
|
|
51968
|
+
] }),
|
|
51969
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
51970
|
+
/* @__PURE__ */ jsx(
|
|
51971
|
+
TimeRangePicker,
|
|
51972
|
+
{
|
|
51973
|
+
value: timeRange,
|
|
51974
|
+
onChange: setTimeRange,
|
|
51975
|
+
glassmorphism
|
|
51976
|
+
}
|
|
51977
|
+
),
|
|
51978
|
+
/* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "ghost", size: "sm", className: "relative", children: [
|
|
51979
|
+
/* @__PURE__ */ jsx(Bell, { className: "h-4 w-4" }),
|
|
51980
|
+
notifications > 0 && /* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-1 h-4 w-4 rounded-full bg-destructive text-[10px] font-medium text-destructive-foreground flex items-center justify-center", children: notifications })
|
|
51981
|
+
] }) }),
|
|
51982
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
51983
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "ghost", size: "sm", children: /* @__PURE__ */ jsx(Palette, { className: "h-4 w-4" }) }) }),
|
|
51984
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuContentPro, { align: "end", children: [
|
|
51985
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuItemPro, { onClick: () => setSelectedTheme("analytics"), children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
51986
|
+
/* @__PURE__ */ jsx("div", { className: "h-4 w-4 rounded bg-gradient-to-br from-blue-500 to-purple-500" }),
|
|
51987
|
+
"Analytics"
|
|
51988
|
+
] }) }),
|
|
51989
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuItemPro, { onClick: () => setSelectedTheme("sales"), children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
51990
|
+
/* @__PURE__ */ jsx("div", { className: "h-4 w-4 rounded bg-gradient-to-br from-green-500 to-emerald-500" }),
|
|
51991
|
+
"Sales"
|
|
51992
|
+
] }) }),
|
|
51993
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuItemPro, { onClick: () => setSelectedTheme("monitoring"), children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
51994
|
+
/* @__PURE__ */ jsx("div", { className: "h-4 w-4 rounded bg-gradient-to-br from-orange-500 to-red-500" }),
|
|
51995
|
+
"Monitoring"
|
|
51996
|
+
] }) })
|
|
51997
|
+
] })
|
|
51998
|
+
] }),
|
|
51999
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
52000
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "outline", size: "sm", children: [
|
|
52001
|
+
/* @__PURE__ */ jsx(Settings, { className: "h-4 w-4 mr-2" }),
|
|
52002
|
+
"Actions"
|
|
52003
|
+
] }) }),
|
|
52004
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuContentPro, { align: "end", className: "w-48", children: [
|
|
52005
|
+
editable && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52006
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => setEditMode(!editMode), children: [
|
|
52007
|
+
/* @__PURE__ */ jsx(Edit3, { className: "mr-2 h-4 w-4" }),
|
|
52008
|
+
editMode ? "Exit Edit Mode" : "Edit Layout"
|
|
52009
|
+
] }),
|
|
52010
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => setShowWidgetLibrary(true), children: [
|
|
52011
|
+
/* @__PURE__ */ jsx(Plus, { className: "mr-2 h-4 w-4" }),
|
|
52012
|
+
"Add Widget"
|
|
52013
|
+
] }),
|
|
52014
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => setShowTemplates(true), children: [
|
|
52015
|
+
/* @__PURE__ */ jsx(LayoutGrid, { className: "mr-2 h-4 w-4" }),
|
|
52016
|
+
"Templates"
|
|
52017
|
+
] }),
|
|
52018
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuSeparatorPro, {})
|
|
52019
|
+
] }),
|
|
52020
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuSubPro, { children: [
|
|
52021
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuSubTriggerPro, { children: [
|
|
52022
|
+
/* @__PURE__ */ jsx(Download, { className: "mr-2 h-4 w-4" }),
|
|
52023
|
+
"Export"
|
|
52024
|
+
] }),
|
|
52025
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuSubContentPro, { children: [
|
|
52026
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuItemPro, { onClick: () => onExport?.("json"), children: "As JSON" }),
|
|
52027
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuItemPro, { onClick: () => onExport?.("pdf"), children: "As PDF" }),
|
|
52028
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuItemPro, { onClick: () => onExport?.("png"), children: "As Image" })
|
|
52029
|
+
] })
|
|
52030
|
+
] }),
|
|
52031
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { children: [
|
|
52032
|
+
/* @__PURE__ */ jsx(Upload, { className: "mr-2 h-4 w-4" }),
|
|
52033
|
+
"Import"
|
|
52034
|
+
] }),
|
|
52035
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuSeparatorPro, {}),
|
|
52036
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => setRefreshing(true), children: [
|
|
52037
|
+
/* @__PURE__ */ jsx(RefreshCw, { className: "mr-2 h-4 w-4" }),
|
|
52038
|
+
"Refresh Data"
|
|
52039
|
+
] }),
|
|
52040
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { children: [
|
|
52041
|
+
/* @__PURE__ */ jsx(Share2, { className: "mr-2 h-4 w-4" }),
|
|
52042
|
+
"Share Dashboard"
|
|
52043
|
+
] })
|
|
52044
|
+
] })
|
|
52045
|
+
] })
|
|
52046
|
+
] })
|
|
52047
|
+
] }) }),
|
|
52048
|
+
/* @__PURE__ */ jsx(AnimatePresence, { children: editMode && /* @__PURE__ */ jsx(
|
|
52049
|
+
motion.div,
|
|
52050
|
+
{
|
|
52051
|
+
initial: { height: 0, opacity: 0 },
|
|
52052
|
+
animate: { height: "auto", opacity: 1 },
|
|
52053
|
+
exit: { height: 0, opacity: 0 },
|
|
52054
|
+
className: "bg-primary/10 border-t border-primary/20",
|
|
52055
|
+
children: /* @__PURE__ */ jsxs("div", { className: "px-6 py-2 flex items-center justify-between", children: [
|
|
52056
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
52057
|
+
/* @__PURE__ */ jsx(Sparkles, { className: "h-4 w-4 text-primary" }),
|
|
52058
|
+
/* @__PURE__ */ jsx("span", { children: "Edit mode enabled - Drag widgets to rearrange" })
|
|
52059
|
+
] }),
|
|
52060
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
52061
|
+
/* @__PURE__ */ jsxs(
|
|
52062
|
+
MoonUIButtonPro,
|
|
52063
|
+
{
|
|
52064
|
+
variant: "ghost",
|
|
52065
|
+
size: "sm",
|
|
52066
|
+
onClick: () => setEditMode(false),
|
|
52067
|
+
children: [
|
|
52068
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4 mr-1" }),
|
|
52069
|
+
"Cancel"
|
|
52070
|
+
]
|
|
52071
|
+
}
|
|
52072
|
+
),
|
|
52073
|
+
/* @__PURE__ */ jsxs(
|
|
52074
|
+
MoonUIButtonPro,
|
|
52075
|
+
{
|
|
52076
|
+
variant: "primary",
|
|
52077
|
+
size: "sm",
|
|
52078
|
+
onClick: () => {
|
|
52079
|
+
setEditMode(false);
|
|
52080
|
+
},
|
|
52081
|
+
children: [
|
|
52082
|
+
/* @__PURE__ */ jsx(Save, { className: "h-4 w-4 mr-1" }),
|
|
52083
|
+
"Save Changes"
|
|
52084
|
+
]
|
|
52085
|
+
}
|
|
52086
|
+
)
|
|
52087
|
+
] })
|
|
52088
|
+
] })
|
|
52089
|
+
}
|
|
52090
|
+
) })
|
|
52091
|
+
]
|
|
52092
|
+
}
|
|
52093
|
+
),
|
|
52094
|
+
/* @__PURE__ */ jsx("div", { className: "p-6", children: widgets.length === 0 ? (
|
|
52095
|
+
// Empty state
|
|
52096
|
+
/* @__PURE__ */ jsxs(
|
|
52097
|
+
motion.div,
|
|
52098
|
+
{
|
|
52099
|
+
initial: { opacity: 0, scale: 0.9 },
|
|
52100
|
+
animate: { opacity: 1, scale: 1 },
|
|
52101
|
+
className: "flex flex-col items-center justify-center min-h-[400px] text-center",
|
|
52102
|
+
children: [
|
|
52103
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
52104
|
+
"p-4 rounded-full mb-4",
|
|
52105
|
+
glassmorphism ? "bg-background/60 backdrop-blur-sm" : "bg-muted"
|
|
52106
|
+
), children: /* @__PURE__ */ jsx(LayoutGrid, { className: "h-8 w-8 text-muted-foreground" }) }),
|
|
52107
|
+
/* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-2", children: "No widgets added yet" }),
|
|
52108
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground mb-4", children: "Start by adding widgets or choosing a template" }),
|
|
52109
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
52110
|
+
/* @__PURE__ */ jsxs(MoonUIButtonPro, { onClick: () => setShowWidgetLibrary(true), children: [
|
|
52111
|
+
/* @__PURE__ */ jsx(Plus, { className: "h-4 w-4 mr-2" }),
|
|
52112
|
+
"Add Widget"
|
|
52113
|
+
] }),
|
|
52114
|
+
/* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "outline", onClick: () => setShowTemplates(true), children: [
|
|
52115
|
+
/* @__PURE__ */ jsx(LayoutGrid, { className: "h-4 w-4 mr-2" }),
|
|
52116
|
+
"Browse Templates"
|
|
52117
|
+
] })
|
|
52118
|
+
] })
|
|
52119
|
+
]
|
|
52120
|
+
}
|
|
52121
|
+
)
|
|
52122
|
+
) : (
|
|
52123
|
+
// Dashboard grid
|
|
52124
|
+
/* @__PURE__ */ jsx(
|
|
52125
|
+
DashboardGrid,
|
|
52126
|
+
{
|
|
52127
|
+
widgets,
|
|
52128
|
+
onLayoutChange: (layout) => {
|
|
52129
|
+
const updatedWidgets = widgets.map((widget) => {
|
|
52130
|
+
const layoutItem = layout.find((l) => l.i === widget.id);
|
|
52131
|
+
if (layoutItem) {
|
|
52132
|
+
return {
|
|
52133
|
+
...widget,
|
|
52134
|
+
position: { x: layoutItem.x, y: layoutItem.y },
|
|
52135
|
+
size: { ...widget.size, w: layoutItem.w, h: layoutItem.h }
|
|
52136
|
+
};
|
|
52137
|
+
}
|
|
52138
|
+
return widget;
|
|
52139
|
+
});
|
|
52140
|
+
setWidgets(updatedWidgets);
|
|
52141
|
+
},
|
|
52142
|
+
onWidgetRemove: (widgetId) => {
|
|
52143
|
+
setWidgets((prev) => prev.filter((w2) => w2.id !== widgetId));
|
|
52144
|
+
onWidgetRemove?.(widgetId);
|
|
52145
|
+
},
|
|
52146
|
+
onWidgetAction: (widgetId, action, data) => {
|
|
52147
|
+
console.log("Widget action:", widgetId, action, data);
|
|
52148
|
+
},
|
|
52149
|
+
editMode,
|
|
52150
|
+
glassmorphism
|
|
52151
|
+
}
|
|
52152
|
+
)
|
|
52153
|
+
) }),
|
|
52154
|
+
/* @__PURE__ */ jsx(WidgetLibrary, {}),
|
|
52155
|
+
/* @__PURE__ */ jsx(TemplateGallery, {})
|
|
52156
|
+
]
|
|
52157
|
+
}
|
|
52158
|
+
);
|
|
50202
52159
|
}
|
|
50203
52160
|
function DraggableList({
|
|
50204
52161
|
items,
|
|
@@ -51371,7 +53328,7 @@ var OptimizedImageInternal = ({
|
|
|
51371
53328
|
width,
|
|
51372
53329
|
height,
|
|
51373
53330
|
quality = 75,
|
|
51374
|
-
format = "auto",
|
|
53331
|
+
format: format2 = "auto",
|
|
51375
53332
|
lazy = true,
|
|
51376
53333
|
blur: blur2 = true,
|
|
51377
53334
|
priority = false,
|
|
@@ -51410,7 +53367,7 @@ var OptimizedImageInternal = ({
|
|
|
51410
53367
|
params.set("f", options.format);
|
|
51411
53368
|
return optimizedUrl;
|
|
51412
53369
|
};
|
|
51413
|
-
const optimizedSrc = getOptimizedSrc(src, { width, height, quality, format });
|
|
53370
|
+
const optimizedSrc = getOptimizedSrc(src, { width, height, quality, format: format2 });
|
|
51414
53371
|
const handleImageLoad = () => {
|
|
51415
53372
|
setIsLoaded(true);
|
|
51416
53373
|
setIsLoading(false);
|
|
@@ -51574,7 +53531,7 @@ var OptimizedImageInternal = ({
|
|
|
51574
53531
|
] }),
|
|
51575
53532
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
51576
53533
|
"Format: ",
|
|
51577
|
-
|
|
53534
|
+
format2
|
|
51578
53535
|
] })
|
|
51579
53536
|
]
|
|
51580
53537
|
}
|
|
@@ -53475,11 +55432,11 @@ function downloadFile(content, filename, mimeType) {
|
|
|
53475
55432
|
URL.revokeObjectURL(url);
|
|
53476
55433
|
}
|
|
53477
55434
|
async function exportData(data, options) {
|
|
53478
|
-
const { format, filename = "data-export", columns, includeHeaders = true } = options;
|
|
55435
|
+
const { format: format2, filename = "data-export", columns, includeHeaders = true } = options;
|
|
53479
55436
|
let content;
|
|
53480
55437
|
let mimeType;
|
|
53481
55438
|
let extension;
|
|
53482
|
-
switch (
|
|
55439
|
+
switch (format2) {
|
|
53483
55440
|
case "csv":
|
|
53484
55441
|
content = dataToCSV(data, columns, includeHeaders);
|
|
53485
55442
|
mimeType = "text/csv;charset=utf-8;";
|
|
@@ -53493,7 +55450,7 @@ async function exportData(data, options) {
|
|
|
53493
55450
|
case "xlsx":
|
|
53494
55451
|
throw new Error("XLSX export requires additional dependencies. Use CSV format instead.");
|
|
53495
55452
|
default:
|
|
53496
|
-
throw new Error(`Unsupported export format: ${
|
|
55453
|
+
throw new Error(`Unsupported export format: ${format2}`);
|
|
53497
55454
|
}
|
|
53498
55455
|
const finalFilename = `${filename}-${( new Date()).toISOString().split("T")[0]}.${extension}`;
|
|
53499
55456
|
downloadFile(content, finalFilename, mimeType);
|
|
@@ -53976,11 +55933,11 @@ function DataTable({
|
|
|
53976
55933
|
rowSelection: features.rowSelection !== false || selectable,
|
|
53977
55934
|
export: features.export !== false || exportable
|
|
53978
55935
|
});
|
|
53979
|
-
const handleExport = async (
|
|
55936
|
+
const handleExport = async (format2) => {
|
|
53980
55937
|
const selectedRows = table.getFilteredSelectedRowModel().rows;
|
|
53981
55938
|
const dataToExport = selectedRows.length > 0 ? selectedRows.map((row) => row.original) : table.getFilteredRowModel().rows.map((row) => row.original);
|
|
53982
55939
|
if (typeof exportable === "object" && exportable.onExport) {
|
|
53983
|
-
exportable.onExport(dataToExport,
|
|
55940
|
+
exportable.onExport(dataToExport, format2);
|
|
53984
55941
|
return;
|
|
53985
55942
|
}
|
|
53986
55943
|
if (onExport) {
|
|
@@ -53990,7 +55947,7 @@ function DataTable({
|
|
|
53990
55947
|
const filename = typeof exportable === "object" && exportable.filename ? exportable.filename : "data-export";
|
|
53991
55948
|
const visibleColumns = getVisibleColumns(columns, columnVisibility);
|
|
53992
55949
|
await exportData(dataToExport, {
|
|
53993
|
-
format,
|
|
55950
|
+
format: format2,
|
|
53994
55951
|
filename,
|
|
53995
55952
|
columns: visibleColumns,
|
|
53996
55953
|
includeHeaders: true
|
|
@@ -54349,6 +56306,355 @@ var TableRow2 = t__default.memo(({
|
|
|
54349
56306
|
return prevRowId === nextRowId && prevProps.isExpanded === nextProps.isExpanded && prevProps.row.getIsSelected() === nextProps.row.getIsSelected() && prevVisibilityKeys === nextVisibilityKeys && prevVisibilityValues === nextVisibilityValues;
|
|
54350
56307
|
});
|
|
54351
56308
|
TableRow2.displayName = "TableRow";
|
|
56309
|
+
function Sidebar({
|
|
56310
|
+
sections,
|
|
56311
|
+
footer,
|
|
56312
|
+
showSearch = true,
|
|
56313
|
+
searchPlaceholder = "Search...",
|
|
56314
|
+
onSearchChange,
|
|
56315
|
+
showThemeToggle = false,
|
|
56316
|
+
theme = "system",
|
|
56317
|
+
onThemeChange,
|
|
56318
|
+
branding,
|
|
56319
|
+
collapsible = true,
|
|
56320
|
+
defaultCollapsed = false,
|
|
56321
|
+
floatingActionButton = true,
|
|
56322
|
+
glassmorphism = false,
|
|
56323
|
+
animatedBackground = false,
|
|
56324
|
+
keyboardShortcuts = true,
|
|
56325
|
+
persistState = true,
|
|
56326
|
+
onStateChange,
|
|
56327
|
+
customStyles,
|
|
56328
|
+
className,
|
|
56329
|
+
activePath,
|
|
56330
|
+
onNavigate
|
|
56331
|
+
}) {
|
|
56332
|
+
const [isMobile, setIsMobile] = useState(false);
|
|
56333
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
56334
|
+
const [collapsed, setCollapsed] = useState(defaultCollapsed);
|
|
56335
|
+
const [expandedSections, setExpandedSections] = useState([]);
|
|
56336
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
56337
|
+
const [pinnedItems, setPinnedItems] = useState([]);
|
|
56338
|
+
const searchInputRef = useRef(null);
|
|
56339
|
+
const mouseX = useMotionValue(0);
|
|
56340
|
+
const mouseY = useMotionValue(0);
|
|
56341
|
+
const springX = useSpring(mouseX, { stiffness: 300, damping: 30 });
|
|
56342
|
+
const springY = useSpring(mouseY, { stiffness: 300, damping: 30 });
|
|
56343
|
+
useEffect(() => {
|
|
56344
|
+
if (persistState && typeof window !== "undefined") {
|
|
56345
|
+
const savedState = localStorage.getItem("moonui-sidebar-state");
|
|
56346
|
+
if (savedState) {
|
|
56347
|
+
const state = JSON.parse(savedState);
|
|
56348
|
+
setCollapsed(state.collapsed);
|
|
56349
|
+
setExpandedSections(state.expandedSections);
|
|
56350
|
+
setPinnedItems(state.pinnedItems || []);
|
|
56351
|
+
}
|
|
56352
|
+
}
|
|
56353
|
+
}, [persistState]);
|
|
56354
|
+
useEffect(() => {
|
|
56355
|
+
if (persistState && typeof window !== "undefined") {
|
|
56356
|
+
const state = {
|
|
56357
|
+
collapsed,
|
|
56358
|
+
expandedSections,
|
|
56359
|
+
searchQuery,
|
|
56360
|
+
pinnedItems,
|
|
56361
|
+
recentItems: []
|
|
56362
|
+
};
|
|
56363
|
+
localStorage.setItem("moonui-sidebar-state", JSON.stringify(state));
|
|
56364
|
+
onStateChange?.(state);
|
|
56365
|
+
}
|
|
56366
|
+
}, [collapsed, expandedSections, searchQuery, pinnedItems, persistState, onStateChange]);
|
|
56367
|
+
useEffect(() => {
|
|
56368
|
+
const checkMobile = () => {
|
|
56369
|
+
setIsMobile(window.innerWidth < 768);
|
|
56370
|
+
};
|
|
56371
|
+
checkMobile();
|
|
56372
|
+
window.addEventListener("resize", checkMobile);
|
|
56373
|
+
return () => window.removeEventListener("resize", checkMobile);
|
|
56374
|
+
}, []);
|
|
56375
|
+
useEffect(() => {
|
|
56376
|
+
const sectionsToExpand = sections.filter((section) => section.defaultExpanded !== false).map((section) => section.id);
|
|
56377
|
+
setExpandedSections(sectionsToExpand);
|
|
56378
|
+
}, [sections]);
|
|
56379
|
+
useEffect(() => {
|
|
56380
|
+
if (!keyboardShortcuts)
|
|
56381
|
+
return;
|
|
56382
|
+
const handleKeyDown3 = (e) => {
|
|
56383
|
+
if ((e.metaKey || e.ctrlKey) && e.key === "k") {
|
|
56384
|
+
e.preventDefault();
|
|
56385
|
+
searchInputRef.current?.focus();
|
|
56386
|
+
}
|
|
56387
|
+
if ((e.metaKey || e.ctrlKey) && e.key === "b") {
|
|
56388
|
+
e.preventDefault();
|
|
56389
|
+
if (isMobile) {
|
|
56390
|
+
setIsOpen(!isOpen);
|
|
56391
|
+
} else {
|
|
56392
|
+
setCollapsed(!collapsed);
|
|
56393
|
+
}
|
|
56394
|
+
}
|
|
56395
|
+
};
|
|
56396
|
+
document.addEventListener("keydown", handleKeyDown3);
|
|
56397
|
+
return () => document.removeEventListener("keydown", handleKeyDown3);
|
|
56398
|
+
}, [keyboardShortcuts, isMobile, isOpen, collapsed]);
|
|
56399
|
+
useEffect(() => {
|
|
56400
|
+
if (!animatedBackground)
|
|
56401
|
+
return;
|
|
56402
|
+
const handleMouseMove2 = (e) => {
|
|
56403
|
+
const rect = document.querySelector(".sidebar-container")?.getBoundingClientRect();
|
|
56404
|
+
if (rect) {
|
|
56405
|
+
mouseX.set(e.clientX - rect.left);
|
|
56406
|
+
mouseY.set(e.clientY - rect.top);
|
|
56407
|
+
}
|
|
56408
|
+
};
|
|
56409
|
+
document.addEventListener("mousemove", handleMouseMove2);
|
|
56410
|
+
return () => document.removeEventListener("mousemove", handleMouseMove2);
|
|
56411
|
+
}, [animatedBackground, mouseX, mouseY]);
|
|
56412
|
+
const toggleSection = (sectionId) => {
|
|
56413
|
+
setExpandedSections(
|
|
56414
|
+
(prev) => prev.includes(sectionId) ? prev.filter((id) => id !== sectionId) : [...prev, sectionId]
|
|
56415
|
+
);
|
|
56416
|
+
};
|
|
56417
|
+
const handleItemClick = (item) => {
|
|
56418
|
+
if (item.action) {
|
|
56419
|
+
item.action();
|
|
56420
|
+
} else if (item.href && onNavigate) {
|
|
56421
|
+
onNavigate(item.href);
|
|
56422
|
+
if (isMobile) {
|
|
56423
|
+
setIsOpen(false);
|
|
56424
|
+
}
|
|
56425
|
+
}
|
|
56426
|
+
};
|
|
56427
|
+
const filterItems = (items, query) => {
|
|
56428
|
+
if (!query)
|
|
56429
|
+
return items;
|
|
56430
|
+
return items.filter((item) => {
|
|
56431
|
+
const matchesTitle = item.title.toLowerCase().includes(query.toLowerCase());
|
|
56432
|
+
const hasMatchingChildren = item.items?.some(
|
|
56433
|
+
(child) => child.title.toLowerCase().includes(query.toLowerCase())
|
|
56434
|
+
);
|
|
56435
|
+
return matchesTitle || hasMatchingChildren;
|
|
56436
|
+
});
|
|
56437
|
+
};
|
|
56438
|
+
const renderItem = (item, depth = 0) => {
|
|
56439
|
+
const isActive2 = item.href === activePath;
|
|
56440
|
+
const isPinned = pinnedItems.includes(item.id);
|
|
56441
|
+
const hasChildren = item.items && item.items.length > 0;
|
|
56442
|
+
const isExpanded = expandedSections.includes(item.id);
|
|
56443
|
+
const ItemWrapper = item.tooltip && !collapsed ? MoonUITooltipTriggerPro : t__default.Fragment;
|
|
56444
|
+
const itemContent = /* @__PURE__ */ jsxs(
|
|
56445
|
+
"button",
|
|
56446
|
+
{
|
|
56447
|
+
onClick: () => {
|
|
56448
|
+
if (hasChildren) {
|
|
56449
|
+
toggleSection(item.id);
|
|
56450
|
+
} else {
|
|
56451
|
+
handleItemClick(item);
|
|
56452
|
+
}
|
|
56453
|
+
},
|
|
56454
|
+
className: cn(
|
|
56455
|
+
"w-full flex items-center gap-3 rounded-lg px-3 py-2 text-sm transition-all",
|
|
56456
|
+
"hover:bg-accent hover:text-accent-foreground",
|
|
56457
|
+
isActive2 && "bg-primary/10 text-primary font-medium",
|
|
56458
|
+
item.disabled && "opacity-50 cursor-not-allowed",
|
|
56459
|
+
depth > 0 && "ml-6 text-xs",
|
|
56460
|
+
collapsed && depth === 0 && "justify-center px-2",
|
|
56461
|
+
customStyles?.hover
|
|
56462
|
+
),
|
|
56463
|
+
disabled: item.disabled,
|
|
56464
|
+
children: [
|
|
56465
|
+
item.icon && /* @__PURE__ */ jsx("span", { className: cn(
|
|
56466
|
+
"flex-shrink-0",
|
|
56467
|
+
collapsed && depth === 0 && "mx-auto"
|
|
56468
|
+
), children: item.icon }),
|
|
56469
|
+
(!collapsed || depth > 0) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
56470
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 text-left truncate", children: item.title }),
|
|
56471
|
+
item.badge && /* @__PURE__ */ jsx(
|
|
56472
|
+
MoonUIBadgePro,
|
|
56473
|
+
{
|
|
56474
|
+
variant: item.badgeVariant || "secondary",
|
|
56475
|
+
className: "ml-auto flex-shrink-0",
|
|
56476
|
+
children: item.badge
|
|
56477
|
+
}
|
|
56478
|
+
),
|
|
56479
|
+
hasChildren && depth === 0 && /* @__PURE__ */ jsx(
|
|
56480
|
+
ChevronDown,
|
|
56481
|
+
{
|
|
56482
|
+
className: cn(
|
|
56483
|
+
"h-4 w-4 flex-shrink-0 transition-transform",
|
|
56484
|
+
isExpanded && "rotate-180"
|
|
56485
|
+
)
|
|
56486
|
+
}
|
|
56487
|
+
),
|
|
56488
|
+
isPinned && /* @__PURE__ */ jsx(Pin, { className: "h-3 w-3 flex-shrink-0" })
|
|
56489
|
+
] })
|
|
56490
|
+
]
|
|
56491
|
+
}
|
|
56492
|
+
);
|
|
56493
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
56494
|
+
item.tooltip && !collapsed ? /* @__PURE__ */ jsx(MoonUITooltipProviderPro, { children: /* @__PURE__ */ jsxs(MoonUITooltipPro, { children: [
|
|
56495
|
+
/* @__PURE__ */ jsx(ItemWrapper, { children: itemContent }),
|
|
56496
|
+
/* @__PURE__ */ jsx(MoonUITooltipContentPro, { side: "right", children: /* @__PURE__ */ jsx("p", { children: item.tooltip }) })
|
|
56497
|
+
] }) }) : itemContent,
|
|
56498
|
+
hasChildren && !collapsed && /* @__PURE__ */ jsx(AnimatePresence, { children: isExpanded && /* @__PURE__ */ jsx(
|
|
56499
|
+
motion.div,
|
|
56500
|
+
{
|
|
56501
|
+
initial: { height: 0, opacity: 0 },
|
|
56502
|
+
animate: { height: "auto", opacity: 1 },
|
|
56503
|
+
exit: { height: 0, opacity: 0 },
|
|
56504
|
+
transition: { duration: 0.2 },
|
|
56505
|
+
className: "overflow-hidden",
|
|
56506
|
+
children: /* @__PURE__ */ jsx("div", { className: "pt-1 space-y-1", children: filterItems(item.items, searchQuery).map(
|
|
56507
|
+
(child) => renderItem(child, depth + 1)
|
|
56508
|
+
) })
|
|
56509
|
+
}
|
|
56510
|
+
) })
|
|
56511
|
+
] }, item.id);
|
|
56512
|
+
};
|
|
56513
|
+
const SidebarContent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
56514
|
+
/* @__PURE__ */ jsxs("div", { className: cn(
|
|
56515
|
+
"flex items-center gap-3 p-4 border-b",
|
|
56516
|
+
collapsed && !isMobile && "justify-center px-2"
|
|
56517
|
+
), children: [
|
|
56518
|
+
branding && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
56519
|
+
branding.logo,
|
|
56520
|
+
(!collapsed || isMobile) && branding.title && /* @__PURE__ */ jsx("span", { className: "font-semibold text-lg", children: branding.title })
|
|
56521
|
+
] }),
|
|
56522
|
+
isMobile && /* @__PURE__ */ jsx(
|
|
56523
|
+
MoonUIButtonPro,
|
|
56524
|
+
{
|
|
56525
|
+
variant: "ghost",
|
|
56526
|
+
size: "sm",
|
|
56527
|
+
className: "ml-auto h-8 w-8 p-0",
|
|
56528
|
+
onClick: () => setIsOpen(false),
|
|
56529
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
56530
|
+
}
|
|
56531
|
+
),
|
|
56532
|
+
!isMobile && collapsible && /* @__PURE__ */ jsx(
|
|
56533
|
+
MoonUIButtonPro,
|
|
56534
|
+
{
|
|
56535
|
+
variant: "ghost",
|
|
56536
|
+
size: "sm",
|
|
56537
|
+
className: cn(
|
|
56538
|
+
"h-8 w-8 p-0",
|
|
56539
|
+
!collapsed && "ml-auto"
|
|
56540
|
+
),
|
|
56541
|
+
onClick: () => setCollapsed(!collapsed),
|
|
56542
|
+
children: collapsed ? /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
|
|
56543
|
+
}
|
|
56544
|
+
)
|
|
56545
|
+
] }),
|
|
56546
|
+
showSearch && (!collapsed || isMobile) && /* @__PURE__ */ jsx("div", { className: "p-4 border-b", children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
56547
|
+
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
|
|
56548
|
+
/* @__PURE__ */ jsx(
|
|
56549
|
+
MoonUIInputPro,
|
|
56550
|
+
{
|
|
56551
|
+
ref: searchInputRef,
|
|
56552
|
+
type: "search",
|
|
56553
|
+
placeholder: searchPlaceholder,
|
|
56554
|
+
value: searchQuery,
|
|
56555
|
+
onChange: (e) => {
|
|
56556
|
+
setSearchQuery(e.target.value);
|
|
56557
|
+
onSearchChange?.(e.target.value);
|
|
56558
|
+
},
|
|
56559
|
+
className: "pl-9 pr-9"
|
|
56560
|
+
}
|
|
56561
|
+
),
|
|
56562
|
+
keyboardShortcuts && /* @__PURE__ */ jsxs("kbd", { className: "absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 hidden sm:flex", children: [
|
|
56563
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs", children: "\u2318" }),
|
|
56564
|
+
"K"
|
|
56565
|
+
] })
|
|
56566
|
+
] }) }),
|
|
56567
|
+
pinnedItems.length > 0 && (!collapsed || isMobile) && /* @__PURE__ */ jsxs("div", { className: "p-4 border-b", children: [
|
|
56568
|
+
/* @__PURE__ */ jsx("h4", { className: "text-xs font-medium text-muted-foreground mb-2", children: "Pinned" }),
|
|
56569
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: sections.flatMap(
|
|
56570
|
+
(section) => section.items.filter((item) => pinnedItems.includes(item.id))
|
|
56571
|
+
).map((item) => renderItem(item)) })
|
|
56572
|
+
] }),
|
|
56573
|
+
/* @__PURE__ */ jsx(ScrollArea, { className: "flex-1", children: /* @__PURE__ */ jsx("div", { className: "p-4 space-y-6", children: sections.map((section, index) => {
|
|
56574
|
+
const filteredItems = filterItems(section.items, searchQuery);
|
|
56575
|
+
if (filteredItems.length === 0)
|
|
56576
|
+
return null;
|
|
56577
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
56578
|
+
section.title && (!collapsed || isMobile) && /* @__PURE__ */ jsx("h4", { className: "text-xs font-medium text-muted-foreground mb-2", children: section.title }),
|
|
56579
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: filteredItems.map((item) => renderItem(item)) }),
|
|
56580
|
+
section.showDivider && index < sections.length - 1 && /* @__PURE__ */ jsx(MoonUISeparatorPro, { className: "mt-4" })
|
|
56581
|
+
] }, section.id);
|
|
56582
|
+
}) }) }),
|
|
56583
|
+
footer && /* @__PURE__ */ jsxs("div", { className: "border-t p-4", children: [
|
|
56584
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: footer.items.map((item) => renderItem(item)) }),
|
|
56585
|
+
showThemeToggle && (!collapsed || isMobile) && /* @__PURE__ */ jsxs("div", { className: "mt-3 flex items-center justify-between", children: [
|
|
56586
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: "Theme" }),
|
|
56587
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
56588
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "ghost", size: "sm", className: "h-7 px-2", children: [
|
|
56589
|
+
theme === "light" && /* @__PURE__ */ jsx(Sun, { className: "h-3 w-3" }),
|
|
56590
|
+
theme === "dark" && /* @__PURE__ */ jsx(Moon, { className: "h-3 w-3" }),
|
|
56591
|
+
theme === "system" && /* @__PURE__ */ jsx(Monitor, { className: "h-3 w-3" })
|
|
56592
|
+
] }) }),
|
|
56593
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuContentPro, { align: "end", children: [
|
|
56594
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => onThemeChange?.("light"), children: [
|
|
56595
|
+
/* @__PURE__ */ jsx(Sun, { className: "mr-2 h-4 w-4" }),
|
|
56596
|
+
"Light"
|
|
56597
|
+
] }),
|
|
56598
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => onThemeChange?.("dark"), children: [
|
|
56599
|
+
/* @__PURE__ */ jsx(Moon, { className: "mr-2 h-4 w-4" }),
|
|
56600
|
+
"Dark"
|
|
56601
|
+
] }),
|
|
56602
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => onThemeChange?.("system"), children: [
|
|
56603
|
+
/* @__PURE__ */ jsx(Monitor, { className: "mr-2 h-4 w-4" }),
|
|
56604
|
+
"System"
|
|
56605
|
+
] })
|
|
56606
|
+
] })
|
|
56607
|
+
] })
|
|
56608
|
+
] })
|
|
56609
|
+
] })
|
|
56610
|
+
] });
|
|
56611
|
+
const sidebarClasses = cn(
|
|
56612
|
+
"flex h-screen flex-col bg-background border-r sticky top-0",
|
|
56613
|
+
glassmorphism && "bg-background/80 backdrop-blur-xl border-white/10",
|
|
56614
|
+
collapsed && !isMobile && "w-16",
|
|
56615
|
+
!collapsed && !isMobile && "w-64",
|
|
56616
|
+
customStyles?.background,
|
|
56617
|
+
customStyles?.border,
|
|
56618
|
+
className
|
|
56619
|
+
);
|
|
56620
|
+
if (isMobile) {
|
|
56621
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
56622
|
+
floatingActionButton && /* @__PURE__ */ jsx(
|
|
56623
|
+
MoonUIButtonPro,
|
|
56624
|
+
{
|
|
56625
|
+
onClick: () => setIsOpen(true),
|
|
56626
|
+
className: "fixed bottom-4 left-4 z-40 h-12 w-12 rounded-full shadow-lg md:hidden",
|
|
56627
|
+
size: "icon",
|
|
56628
|
+
children: /* @__PURE__ */ jsx(Menu, { className: "h-5 w-5" })
|
|
56629
|
+
}
|
|
56630
|
+
),
|
|
56631
|
+
/* @__PURE__ */ jsx(Sheet, { open: isOpen, onOpenChange: setIsOpen, children: /* @__PURE__ */ jsx(SheetContent, { side: "left", className: "w-80 p-0", children: /* @__PURE__ */ jsxs("div", { className: cn(sidebarClasses, "sidebar-container"), children: [
|
|
56632
|
+
animatedBackground && /* @__PURE__ */ jsx(
|
|
56633
|
+
motion.div,
|
|
56634
|
+
{
|
|
56635
|
+
className: "absolute inset-0 opacity-30",
|
|
56636
|
+
style: {
|
|
56637
|
+
background: `radial-gradient(circle at ${springX}px ${springY}px, rgba(var(--primary-rgb), 0.15), transparent 50%)`
|
|
56638
|
+
}
|
|
56639
|
+
}
|
|
56640
|
+
),
|
|
56641
|
+
/* @__PURE__ */ jsx(SidebarContent, {})
|
|
56642
|
+
] }) }) })
|
|
56643
|
+
] });
|
|
56644
|
+
}
|
|
56645
|
+
return /* @__PURE__ */ jsxs("aside", { className: cn(sidebarClasses, "sidebar-container hidden md:flex"), children: [
|
|
56646
|
+
animatedBackground && /* @__PURE__ */ jsx(
|
|
56647
|
+
motion.div,
|
|
56648
|
+
{
|
|
56649
|
+
className: "absolute inset-0 opacity-30",
|
|
56650
|
+
style: {
|
|
56651
|
+
background: `radial-gradient(circle at ${springX}px ${springY}px, rgba(var(--primary-rgb), 0.15), transparent 50%)`
|
|
56652
|
+
}
|
|
56653
|
+
}
|
|
56654
|
+
),
|
|
56655
|
+
/* @__PURE__ */ jsx(SidebarContent, {})
|
|
56656
|
+
] });
|
|
56657
|
+
}
|
|
54352
56658
|
|
|
54353
56659
|
// src/components/enhanced/index.ts
|
|
54354
56660
|
var enhanced_exports = {};
|
|
@@ -54366,7 +56672,7 @@ __export(enhanced_exports, {
|
|
|
54366
56672
|
DialogProFooter: () => DialogProFooter,
|
|
54367
56673
|
DialogProHeader: () => DialogProHeader,
|
|
54368
56674
|
DialogProTitle: () => DialogProTitle,
|
|
54369
|
-
DialogProTrigger: () =>
|
|
56675
|
+
DialogProTrigger: () => DialogTrigger2,
|
|
54370
56676
|
EnhancedCardDescription: () => EnhancedCardDescription,
|
|
54371
56677
|
EnhancedCardTitle: () => EnhancedCardTitle,
|
|
54372
56678
|
badgeVariants: () => badgeVariants,
|
|
@@ -54899,7 +57205,7 @@ var CardProFooter = t__default.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
54899
57205
|
));
|
|
54900
57206
|
CardProFooter.displayName = "CardProFooter";
|
|
54901
57207
|
var Dialog = DialogPrimitive.Root;
|
|
54902
|
-
var
|
|
57208
|
+
var DialogTrigger2 = DialogPrimitive.Trigger;
|
|
54903
57209
|
var DialogPortal = DialogPrimitive.Portal;
|
|
54904
57210
|
var DialogClose = DialogPrimitive.Close;
|
|
54905
57211
|
var DialogProOverlay = t.forwardRef(({ className, blur: blur2 = "md", variant = "default", ...props }, ref) => {
|
|
@@ -55248,4 +57554,4 @@ var BadgePro = t__default.forwardRef(({
|
|
|
55248
57554
|
});
|
|
55249
57555
|
BadgePro.displayName = "BadgePro";
|
|
55250
57556
|
|
|
55251
|
-
export { MoonUIAccordionPro as Accordion, MoonUIAccordionContentPro as AccordionContent, MoonUIAccordionItemPro as AccordionItem, MoonUIAccordionTriggerPro as AccordionTrigger, AdvancedChart, AdvancedForms, MoonUIAlertPro as Alert, MoonUIAlertDescriptionPro as AlertDescription, MoonUIAlertTitlePro as AlertTitle, AnimatedButton, MoonUIAspectRatioPro as AspectRatio, MoonUIAvatarPro as Avatar, MoonUIAvatarFallbackPro as AvatarFallback, MoonUIAvatarImagePro as AvatarImage, MoonUIBadgePro as Badge, MoonUIBreadcrumbPro as Breadcrumb, MoonUIBreadcrumbEllipsisPro as BreadcrumbEllipsis, MoonUIBreadcrumbItemPro as BreadcrumbItem, MoonUIBreadcrumbLinkPro as BreadcrumbLink, MoonUIBreadcrumbListPro as BreadcrumbList, MoonUIBreadcrumbPagePro as BreadcrumbPage, MoonUIBreadcrumbSeparatorPro as BreadcrumbSeparator, MoonUIButtonPro as Button,
|
|
57557
|
+
export { MoonUIAccordionPro as Accordion, MoonUIAccordionContentPro as AccordionContent, MoonUIAccordionItemPro as AccordionItem, MoonUIAccordionTriggerPro as AccordionTrigger, Calendar3 as AdvancedCalendar, AdvancedChart, AdvancedForms, MoonUIAlertPro as Alert, MoonUIAlertDescriptionPro as AlertDescription, MoonUIAlertTitlePro as AlertTitle, AnimatedButton, MoonUIAspectRatioPro as AspectRatio, MoonUIAvatarPro as Avatar, MoonUIAvatarFallbackPro as AvatarFallback, MoonUIAvatarImagePro as AvatarImage, MoonUIBadgePro as Badge, MoonUIBreadcrumbPro as Breadcrumb, MoonUIBreadcrumbEllipsisPro as BreadcrumbEllipsis, MoonUIBreadcrumbItemPro as BreadcrumbItem, MoonUIBreadcrumbLinkPro as BreadcrumbLink, MoonUIBreadcrumbListPro as BreadcrumbList, MoonUIBreadcrumbPagePro as BreadcrumbPage, MoonUIBreadcrumbSeparatorPro as BreadcrumbSeparator, MoonUIButtonPro as Button, Calendar, MoonUICardPro as Card, MoonUICardContentPro as CardContent, MoonUICardDescriptionPro as CardDescription, MoonUICardFooterPro as CardFooter, MoonUICardHeaderPro as CardHeader, MoonUICardTitlePro as CardTitle, MoonUICheckboxPro as Checkbox, MoonUICollapsiblePro as Collapsible, MoonUICollapsibleContentPro as CollapsibleContent, MoonUICollapsibleTriggerPro as CollapsibleTrigger, MoonUIColorPickerPro as ColorPicker, MoonUICommandPro as Command, MoonUICommandDialogPro as CommandDialog, MoonUICommandEmptyPro as CommandEmpty, MoonUICommandGroupPro as CommandGroup, MoonUICommandInputPro as CommandInput, MoonUICommandItemPro as CommandItem, MoonUICommandListPro as CommandList, MoonUICommandSeparatorPro as CommandSeparator, MoonUICommandShortcutPro as CommandShortcut, Dashboard, DataTable, MoonUIDialogPro as Dialog, MoonUIDialogClosePro as DialogClose, MoonUIDialogContentPro as DialogContent, MoonUIDialogDescriptionPro as DialogDescription, MoonUIDialogFooterPro as DialogFooter, MoonUIDialogHeaderPro as DialogHeader, MoonUIDialogTitlePro as DialogTitle, MoonUIDialogTriggerPro as DialogTrigger, DraggableList, MoonUIDropdownMenuPro as DropdownMenu, MoonUIDropdownMenuCheckboxItemPro as DropdownMenuCheckboxItem, MoonUIDropdownMenuContentPro as DropdownMenuContent, MoonUIDropdownMenuGroupPro as DropdownMenuGroup, MoonUIDropdownMenuItemPro as DropdownMenuItem, MoonUIDropdownMenuLabelPro as DropdownMenuLabel, MoonUIDropdownMenuPortalPro as DropdownMenuPortal, MoonUIDropdownMenuRadioGroupPro as DropdownMenuRadioGroup, MoonUIDropdownMenuRadioItemPro as DropdownMenuRadioItem, MoonUIDropdownMenuSeparatorPro as DropdownMenuSeparator, MoonUIDropdownMenuShortcutPro as DropdownMenuShortcut, MoonUIDropdownMenuSubPro as DropdownMenuSub, MoonUIDropdownMenuSubContentPro as DropdownMenuSubContent, MoonUIDropdownMenuSubTriggerPro as DropdownMenuSubTrigger, MoonUIDropdownMenuTriggerPro as DropdownMenuTrigger, enhanced_exports as Enhanced, ErrorBoundary, FileUpload, FloatingActionButton, GitHubStars, HealthCheck, HoverCard3D, MoonUIInputPro as Input, Kanban, MoonUILabelPro as Label, LazyComponent, LazyImage, LazyList, MagneticButton, MemoryAnalytics, MemoryEfficientData, MoonUIAccordionContentPro, MoonUIAccordionItemPro, MoonUIAccordionPro, MoonUIAccordionTriggerPro, MoonUIAlertDescriptionPro, MoonUIAlertPro, MoonUIAlertTitlePro, MoonUIAspectRatioPro, MoonUIAvatarFallbackPro, MoonUIAvatarImagePro, MoonUIAvatarPro, MoonUIBadgePro, MoonUIBreadcrumbEllipsisPro, MoonUIBreadcrumbItemPro, MoonUIBreadcrumbLinkPro, MoonUIBreadcrumbListPro, MoonUIBreadcrumbPagePro, MoonUIBreadcrumbPro, MoonUIBreadcrumbSeparatorPro, MoonUIButtonPro, MoonUICardContentPro, MoonUICardDescriptionPro, MoonUICardFooterPro, MoonUICardHeaderPro, MoonUICardPro, MoonUICardTitlePro, MoonUICheckboxPro, MoonUICollapsibleContentPro, MoonUICollapsiblePro, MoonUICollapsibleTriggerPro, MoonUIColorPickerPro, MoonUICommandDialogPro, MoonUICommandEmptyPro, MoonUICommandGroupPro, MoonUICommandInputPro, MoonUICommandItemPro, MoonUICommandListPro, MoonUICommandPro, MoonUICommandSeparatorPro, MoonUICommandShortcutPro, MoonUIDialogClosePro, MoonUIDialogContentPro, MoonUIDialogDescriptionPro, MoonUIDialogFooterPro, MoonUIDialogHeaderPro, MoonUIDialogPro, MoonUIDialogTitlePro, MoonUIDialogTriggerPro, MoonUIDropdownMenuCheckboxItemPro, MoonUIDropdownMenuContentPro, MoonUIDropdownMenuGroupPro, MoonUIDropdownMenuItemPro, MoonUIDropdownMenuLabelPro, MoonUIDropdownMenuPortalPro, MoonUIDropdownMenuPro, MoonUIDropdownMenuRadioGroupPro, MoonUIDropdownMenuRadioItemPro, MoonUIDropdownMenuSeparatorPro, MoonUIDropdownMenuShortcutPro, MoonUIDropdownMenuSubContentPro, MoonUIDropdownMenuSubPro, MoonUIDropdownMenuSubTriggerPro, MoonUIDropdownMenuTriggerPro, MoonUIInputPro, MoonUILabelPro, MoonUIPaginationContentPro, MoonUIPaginationEllipsisPro, MoonUIPaginationItemPro, MoonUIPaginationLinkPro, MoonUIPaginationNextPro, MoonUIPaginationPreviousPro, MoonUIPaginationPro, MoonUIPopoverContentPro, MoonUIPopoverPro, MoonUIPopoverTriggerPro, MoonUIProgressPro, MoonUIRadioGroupContextPro, MoonUIRadioGroupItemPro, MoonUIRadioGroupPro, MoonUIRadioItemWithLabelPro, MoonUIRadioLabelPro, MoonUISelectContentPro, MoonUISelectGroupPro, MoonUISelectItemPro, MoonUISelectLabelPro, MoonUISelectPro, MoonUISelectSeparatorPro, MoonUISelectTriggerPro, MoonUISelectValuePro, MoonUISeparatorPro, MoonUISkeletonPro, MoonUISliderPro, MoonUISwitchPro, MoonUITableBodyPro, MoonUITableCaptionPro, MoonUITableCellPro, MoonUITableFooterPro, MoonUITableHeadPro, MoonUITableHeaderPro, MoonUITablePro, MoonUITableRowPro, MoonUITabsContentPro, MoonUITabsListPro, MoonUITabsPro, MoonUITabsTriggerPro, MoonUITextareaPro, MoonUIToastPro, MoonUITogglePro, MoonUITooltipContentPro, MoonUITooltipPro, MoonUITooltipProviderPro, MoonUITooltipTriggerPro, MoonUIalertVariantsPro, MoonUIaspectRatioVariantsPro, MoonUIbreadcrumbVariantsPro, MoonUIcollapsibleContentVariantsPro, MoonUIcollapsibleTriggerVariantsPro, MoonUIcommandVariantsPro, MoonUIradioGroupItemVariantsPro, MoonUItableVariantsPro, MoonUItoggleVariantsPro, OptimizedImage, MoonUIPaginationPro as Pagination, MoonUIPaginationContentPro as PaginationContent, MoonUIPaginationEllipsisPro as PaginationEllipsis, MoonUIPaginationItemPro as PaginationItem, MoonUIPaginationLinkPro as PaginationLink, MoonUIPaginationNextPro as PaginationNext, MoonUIPaginationPreviousPro as PaginationPrevious, PerformanceDebugger, PerformanceMonitor, PinchZoom, MoonUIPopoverPro as Popover, MoonUIPopoverContentPro as PopoverContent, MoonUIPopoverTriggerPro as PopoverTrigger, MoonUIProgressPro as Progress, MoonUIRadioGroupPro as RadioGroup, MoonUIRadioGroupContextPro as RadioGroupContext, MoonUIRadioGroupItemPro as RadioGroupItem, MoonUIRadioItemWithLabelPro as RadioItemWithLabel, MoonUIRadioLabelPro as RadioLabel, RichTextEditor, ScrollArea, ScrollBar, MoonUISelectPro as Select, MoonUISelectContentPro as SelectContent, MoonUISelectGroupPro as SelectGroup, MoonUISelectItemPro as SelectItem, MoonUISelectLabelPro as SelectLabel, MoonUISelectSeparatorPro as SelectSeparator, MoonUISelectTriggerPro as SelectTrigger, MoonUISelectValuePro as SelectValue, SelectableVirtualList, MoonUISeparatorPro as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, MoonUISkeletonPro as Skeleton, MoonUISliderPro as Slider, SpotlightCard, SwipeableCard, MoonUISwitchPro as Switch, MoonUITablePro as Table, MoonUITableBodyPro as TableBody, MoonUITableCaptionPro as TableCaption, MoonUITableCellPro as TableCell, MoonUITableFooterPro as TableFooter, MoonUITableHeadPro as TableHead, MoonUITableHeaderPro as TableHeader, MoonUITableRowPro as TableRow, MoonUITabsPro as Tabs, MoonUITabsContentPro as TabsContent, MoonUITabsListPro as TabsList, MoonUITabsTriggerPro as TabsTrigger, MoonUITextareaPro as Textarea, Timeline, MoonUIToastPro as Toast, MoonUITogglePro as Toggle, MoonUITooltipPro as Tooltip, MoonUITooltipContentPro as TooltipContent, MoonUITooltipProviderPro as TooltipProvider, MoonUITooltipTriggerPro as TooltipTrigger, VirtualList, MoonUIalertVariantsPro as alertVariants, animatedButtonVariants, MoonUIaspectRatioVariantsPro as aspectRatioVariants, moonUIBadgeVariantsPro as badgeVariants, MoonUIbreadcrumbVariantsPro as breadcrumbVariants, moonUIButtonProVariants as buttonVariants, cn, MoonUIcollapsibleContentVariantsPro as collapsibleContentVariants, MoonUIcollapsibleTriggerVariantsPro as collapsibleTriggerVariants, MoonUIcommandVariantsPro as commandVariants, getExpandableColumn, moonUIBadgeVariantsPro, moonUIButtonProVariants, moonUISeparatorVariantsPro, MoonUIradioGroupItemVariantsPro as radioGroupItemVariants, moonUISeparatorVariantsPro as separatorVariants, MoonUItableVariantsPro as tableVariants, MoonUItoggleVariantsPro as toggleVariants, useExpandableRows, useStreamingData, useVirtualList };
|