@moontra/moonui-pro 2.36.0 → 2.36.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/index.css +1 -1
- package/dist/cdn/index.css.map +1 -1
- package/dist/cdn/index.global.js +211 -211
- package/dist/cdn/index.global.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.mjs +489 -166
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { clsx } from 'clsx';
|
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
8
|
-
import { Loader2, Play, ExternalLink, ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Minus, Clock, ChevronUp, Search, Mic, MicOff, Settings, RefreshCw, Zap, ChevronRight, Crown, Circle, ChevronLeft, Plus, Lock, Sparkles, ZoomOut, ZoomIn, Pause, VolumeX, Volume2, Download, Maximize2, Filter, Image as Image$1, Video, RotateCw, Minimize2, BarChart3, Menu, Bell, CheckCheck, CheckCircle, Palette, User, Settings2, LogOut, Edit3, LayoutGrid, Upload, Share2, Save, Phone, Globe, Eye, CheckCircle2, RotateCcw, Copy, Share, Trash2, CreditCard, XCircle, HelpCircle, Flame, Gem, Award, Shield, Heart, Star, TrendingUp, Target, Calendar as Calendar$1, Map as Map$1, Table as Table$1, Activity, DollarSign, Users, CalendarIcon, MoreVertical, BellOff, ArrowUpRight, ArrowDownRight, MapPin, Navigation, ArrowUp, ArrowDown, ArrowUpDown, Music, FileText, Archive, File, Grip, Unlock, GripVertical, 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, Highlighter, Link2, Undo, Redo, Edit, Wand2, Maximize, Briefcase, MessageSquare, GraduationCap, Languages, Lightbulb, FileSpreadsheet, FileJson, FileDown, ChevronsLeft, ChevronsRight, TrendingDown, Grid, MousePointer, Layers, Waves as Waves$1, Cpu, Focus, Monitor, Wind, Blend, Droplets, CircleDot, Shapes, Move3D, Repeat, Move, EyeOff, Timer, Square, GitBranch,
|
|
8
|
+
import { Loader2, Play, ExternalLink, ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Minus, Clock, ChevronUp, Search, Mic, MicOff, Settings, RefreshCw, Zap, ChevronRight, Crown, Circle, ChevronLeft, Plus, Lock, Sparkles, ZoomOut, ZoomIn, Pause, VolumeX, Volume2, Download, Maximize2, Filter, Image as Image$1, Video, RotateCw, Minimize2, BarChart3, Menu, Bell, CheckCheck, CheckCircle, Palette, User, Settings2, LogOut, Edit3, LayoutGrid, Upload, Share2, Save, Phone, Globe, Eye, CheckCircle2, RotateCcw, Copy, Share, Trash2, CreditCard, XCircle, HelpCircle, Flame, Gem, Award, Shield, Heart, Star, TrendingUp, Target, Calendar as Calendar$1, Map as Map$1, Table as Table$1, Activity, DollarSign, Users, CalendarIcon, MoreVertical, BellOff, ArrowUpRight, ArrowDownRight, MapPin, Navigation, ArrowUp, ArrowDown, ArrowUpDown, Music, FileText, Archive, File, Grip, Unlock, GripVertical, 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, Highlighter, Link2, Undo, Redo, Edit, Wand2, Maximize, Briefcase, MessageSquare, GraduationCap, Languages, Lightbulb, FileSpreadsheet, FileJson, FileDown, ChevronsLeft, ChevronsRight, TrendingDown, Grid, MousePointer, Layers, Waves as Waves$1, Cpu, Focus, Monitor, Wind, Blend, Droplets, CircleDot, Shapes, Move3D, Repeat, Move, EyeOff, Timer, Square, GitBranch, Package, Trash, ArrowRight, MessageCircle, Paperclip, Printer, Github, Server, MemoryStick, HardDrive, Network, PlusCircle, Columns, Pin, Sun, Moon, Home, Trophy, ShoppingBag, Wifi, WifiOff, Flag, Send, Tag, PoundSterling, Euro, Database, GitFork, ShoppingCart, Thermometer } from 'lucide-react';
|
|
9
9
|
import { cva } from 'class-variance-authority';
|
|
10
10
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
11
11
|
import { endOfDay, startOfDay, endOfWeek, startOfWeek, endOfMonth, startOfMonth, subDays, format, addMonths, formatDistanceToNow, subMonths, eachDayOfInterval, getDay, isSameMonth, isToday, isSameDay } from 'date-fns';
|
|
@@ -63422,6 +63422,9 @@ var SwipeableCard = React61__default.forwardRef(
|
|
|
63422
63422
|
);
|
|
63423
63423
|
SwipeableCard.displayName = "SwipeableCard";
|
|
63424
63424
|
init_use_subscription();
|
|
63425
|
+
|
|
63426
|
+
// src/components/timeline/timeline.css
|
|
63427
|
+
styleInject("@keyframes gradient {\n 0% {\n background-position: 0% 50%;\n }\n 50% {\n background-position: 100% 50%;\n }\n 100% {\n background-position: 0% 50%;\n }\n}\n@keyframes gradient-vertical {\n 0% {\n background-position: 50% 0%;\n }\n 50% {\n background-position: 50% 100%;\n }\n 100% {\n background-position: 50% 0%;\n }\n}\n.animate-gradient {\n animation: gradient 3s ease infinite;\n}\n.animate-gradient-vertical {\n animation: gradient-vertical 3s ease infinite;\n}\n");
|
|
63425
63428
|
var timelineVariants = cva("w-full", {
|
|
63426
63429
|
variants: {
|
|
63427
63430
|
theme: {
|
|
@@ -63511,6 +63514,14 @@ function TimelineInternal({
|
|
|
63511
63514
|
parallaxEffect = false,
|
|
63512
63515
|
gradientConnectors = false,
|
|
63513
63516
|
animatedProgress = false,
|
|
63517
|
+
nodeSize: nodeSize2 = "md",
|
|
63518
|
+
nodeStyle = "simple",
|
|
63519
|
+
cardStyle = "minimal",
|
|
63520
|
+
connectorStyle = "line",
|
|
63521
|
+
showPhaseNumbers = false,
|
|
63522
|
+
pulseAnimation = false,
|
|
63523
|
+
cardGradient = false,
|
|
63524
|
+
enhancedMetadata = false,
|
|
63514
63525
|
ariaLabel = "Timeline of events",
|
|
63515
63526
|
keyboardNavigation = true,
|
|
63516
63527
|
...props
|
|
@@ -63724,8 +63735,12 @@ function TimelineInternal({
|
|
|
63724
63735
|
"div",
|
|
63725
63736
|
{
|
|
63726
63737
|
className: cn(
|
|
63727
|
-
"absolute h-1
|
|
63728
|
-
|
|
63738
|
+
"absolute h-1",
|
|
63739
|
+
connectorStyle === "line" && "bg-border",
|
|
63740
|
+
connectorStyle === "dots" && "border-t-2 border-dotted border-border",
|
|
63741
|
+
connectorStyle === "gradient" && "bg-gradient-to-r from-primary/60 via-primary/30 to-transparent",
|
|
63742
|
+
connectorStyle === "animated" && "animate-gradient-vertical bg-gradient-to-r from-purple-500 via-pink-500 to-orange-500 bg-[length:200%_200%]",
|
|
63743
|
+
gradientConnectors && "bg-gradient-to-r from-primary/60 via-primary/30 to-transparent"
|
|
63729
63744
|
),
|
|
63730
63745
|
style: {
|
|
63731
63746
|
width: "100%",
|
|
@@ -63737,8 +63752,12 @@ function TimelineInternal({
|
|
|
63737
63752
|
);
|
|
63738
63753
|
}
|
|
63739
63754
|
const baseClasses = cn(
|
|
63740
|
-
"absolute
|
|
63741
|
-
|
|
63755
|
+
"absolute left-1/2 -ml-0.5 transform -translate-x-1/2",
|
|
63756
|
+
connectorStyle === "line" && "w-1 bg-border",
|
|
63757
|
+
connectorStyle === "dots" && "w-0 border-l-2 border-dotted border-border",
|
|
63758
|
+
connectorStyle === "gradient" && "w-1 bg-gradient-to-b from-primary/60 via-primary/30 to-transparent",
|
|
63759
|
+
connectorStyle === "animated" && "w-1 animate-gradient-vertical bg-gradient-to-b from-purple-500 via-pink-500 to-orange-500 bg-[length:200%_200%]",
|
|
63760
|
+
gradientConnectors && "w-1 bg-gradient-to-b from-primary/60 via-primary/30 to-transparent"
|
|
63742
63761
|
);
|
|
63743
63762
|
return /* @__PURE__ */ jsx(
|
|
63744
63763
|
"div",
|
|
@@ -63753,9 +63772,12 @@ function TimelineInternal({
|
|
|
63753
63772
|
}
|
|
63754
63773
|
}
|
|
63755
63774
|
);
|
|
63756
|
-
}, [connectorRenderer, layout, gradientConnectors]);
|
|
63775
|
+
}, [connectorRenderer, layout, connectorStyle, gradientConnectors]);
|
|
63757
63776
|
const renderEvent = useCallback((event, index2, isLast = false) => {
|
|
63758
|
-
const
|
|
63777
|
+
const customMeta = event.metadata?.custom;
|
|
63778
|
+
const eventColor = customMeta?.color ? `bg-gradient-to-br ${customMeta.color}` : event.color || colorScheme[event.type] || DEFAULT_COLORS[event.type];
|
|
63779
|
+
const borderColor = customMeta?.borderColor || "";
|
|
63780
|
+
const phaseNumber = customMeta?.phase || (showPhaseNumbers ? String(index2 + 1).padStart(2, "0") : null);
|
|
63759
63781
|
TEXT_COLORS[event.type] || TEXT_COLORS.custom;
|
|
63760
63782
|
const isSelected = selectedEvents.has(event.id);
|
|
63761
63783
|
const isExpanded = expandedEvents.has(event.id);
|
|
@@ -63766,6 +63788,217 @@ function TimelineInternal({
|
|
|
63766
63788
|
const isRangeEvent = "endDate" in event;
|
|
63767
63789
|
const isNestedEvent = "subEvents" in event;
|
|
63768
63790
|
const isMilestoneEvent = "milestone" in event;
|
|
63791
|
+
if (layout === "alternating" || layout === "centered") {
|
|
63792
|
+
const isLeft = index2 % 2 === 0;
|
|
63793
|
+
return /* @__PURE__ */ jsxs(
|
|
63794
|
+
"div",
|
|
63795
|
+
{
|
|
63796
|
+
ref: (el) => {
|
|
63797
|
+
if (el) eventRefs.current.set(event.id, el);
|
|
63798
|
+
},
|
|
63799
|
+
className: "relative",
|
|
63800
|
+
children: [
|
|
63801
|
+
/* @__PURE__ */ jsx("div", { className: "hidden lg:flex absolute left-1/2 transform -translate-x-1/2 z-20 items-center justify-center", children: /* @__PURE__ */ jsxs(
|
|
63802
|
+
motion.div,
|
|
63803
|
+
{
|
|
63804
|
+
initial: { scale: 0 },
|
|
63805
|
+
whileInView: { scale: 1 },
|
|
63806
|
+
viewport: { once: true },
|
|
63807
|
+
transition: {
|
|
63808
|
+
delay: index2 * 0.15,
|
|
63809
|
+
type: "spring",
|
|
63810
|
+
stiffness: 200
|
|
63811
|
+
},
|
|
63812
|
+
className: cn(
|
|
63813
|
+
"relative rounded-full shadow-2xl border-4 border-background flex items-center justify-center group hover:scale-110 transition-transform duration-300",
|
|
63814
|
+
customMeta?.color ? "w-20 h-20" : nodeSize2 === "sm" ? "w-8 h-8" : nodeSize2 === "md" ? isMilestoneEvent ? "w-12 h-12" : "w-10 h-10" : nodeSize2 === "lg" ? "w-14 h-14" : nodeSize2 === "xl" ? "w-16 h-16" : "w-20 h-20",
|
|
63815
|
+
customMeta?.color ? `bg-gradient-to-br ${customMeta.color}` : nodeStyle === "gradient" ? "bg-gradient-to-br from-primary/90 to-primary/60" : nodeStyle === "glassmorphic" ? "backdrop-blur-xl bg-white/20 dark:bg-white/10" : nodeStyle === "animated" ? "animate-gradient bg-gradient-to-r from-purple-500 via-pink-500 to-orange-500 bg-[length:200%_200%]" : nodeStyle === "simple" ? eventColor : "bg-gradient-to-br from-primary to-primary/80"
|
|
63816
|
+
),
|
|
63817
|
+
children: [
|
|
63818
|
+
phaseNumber && /* @__PURE__ */ jsx("span", { className: "absolute -top-3 -right-3 bg-background text-xs font-bold w-10 h-10 rounded-full border-2 border-primary flex items-center justify-center shadow-lg", children: phaseNumber }),
|
|
63819
|
+
/* @__PURE__ */ jsx("div", { className: "group-hover:scale-110 transition-transform duration-300", children: renderEventIcon(event) }),
|
|
63820
|
+
customMeta?.color && /* @__PURE__ */ jsx("div", { className: cn(
|
|
63821
|
+
"absolute inset-0 rounded-full animate-ping opacity-20",
|
|
63822
|
+
`bg-gradient-to-br ${customMeta.color}`
|
|
63823
|
+
) })
|
|
63824
|
+
]
|
|
63825
|
+
}
|
|
63826
|
+
) }),
|
|
63827
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
63828
|
+
"lg:flex lg:items-center",
|
|
63829
|
+
isLeft ? "lg:justify-start" : "lg:justify-end"
|
|
63830
|
+
), children: /* @__PURE__ */ jsx("div", { className: "w-full lg:w-[calc(50%-6rem)]", children: /* @__PURE__ */ jsx(
|
|
63831
|
+
motion.div,
|
|
63832
|
+
{
|
|
63833
|
+
initial: { opacity: 0, y: 50 },
|
|
63834
|
+
whileInView: { opacity: 1, y: 0 },
|
|
63835
|
+
viewport: { once: true },
|
|
63836
|
+
transition: { delay: index2 * 0.15 },
|
|
63837
|
+
children: /* @__PURE__ */ jsxs(
|
|
63838
|
+
MoonUICardPro,
|
|
63839
|
+
{
|
|
63840
|
+
className: cn(
|
|
63841
|
+
"relative overflow-hidden transition-all duration-300 cursor-pointer",
|
|
63842
|
+
isSelected && "ring-2 ring-primary",
|
|
63843
|
+
borderColor ? `${borderColor} border-2` : "",
|
|
63844
|
+
customMeta?.color ? "bg-gradient-to-br from-card/95 to-card/80 backdrop-blur-lg shadow-xl hover:shadow-2xl" : cardStyle === "minimal" ? "shadow-none border-0 bg-transparent" : cardStyle === "bordered" ? "shadow-sm hover:shadow-md border-2" : cardStyle === "elevated" ? "shadow-lg hover:shadow-xl bg-card/90" : cardStyle === "glassmorphic" ? "backdrop-blur-xl bg-white/10 dark:bg-black/10 border border-white/20 shadow-2xl" : "shadow-sm",
|
|
63845
|
+
cardGradient && "bg-gradient-to-br from-card via-card/90 to-card/80 dark:from-card dark:via-card/95 dark:to-card/90"
|
|
63846
|
+
),
|
|
63847
|
+
onClick: () => handleEventClick(event),
|
|
63848
|
+
tabIndex: keyboardNavigation ? 0 : -1,
|
|
63849
|
+
onFocus: () => setFocusedEventId(event.id),
|
|
63850
|
+
role: "button",
|
|
63851
|
+
"aria-label": `Event: ${event.title}`,
|
|
63852
|
+
"aria-expanded": isNestedEvent ? isExpanded : void 0,
|
|
63853
|
+
children: [
|
|
63854
|
+
customMeta?.color && /* @__PURE__ */ jsx("div", { className: cn(
|
|
63855
|
+
"h-2 bg-gradient-to-r",
|
|
63856
|
+
customMeta.color
|
|
63857
|
+
) }),
|
|
63858
|
+
/* @__PURE__ */ jsxs(MoonUICardContentPro, { className: cn(
|
|
63859
|
+
"p-6",
|
|
63860
|
+
customMeta?.color && "pt-4"
|
|
63861
|
+
), children: [
|
|
63862
|
+
/* @__PURE__ */ jsxs("div", { className: "lg:hidden flex items-center gap-3 mb-4", children: [
|
|
63863
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
63864
|
+
"w-14 h-14 rounded-2xl shadow-lg flex items-center justify-center",
|
|
63865
|
+
customMeta?.color ? `bg-gradient-to-br ${customMeta.color}` : "bg-gradient-to-br from-primary to-primary/80"
|
|
63866
|
+
), children: renderEventIcon(event) }),
|
|
63867
|
+
phaseNumber && /* @__PURE__ */ jsxs(MoonUIBadgePro, { variant: "outline", className: "text-xs font-bold", children: [
|
|
63868
|
+
"Phase ",
|
|
63869
|
+
phaseNumber
|
|
63870
|
+
] })
|
|
63871
|
+
] }),
|
|
63872
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
63873
|
+
/* @__PURE__ */ jsxs("h3", { className: "text-2xl font-bold mb-2 bg-gradient-to-r from-foreground to-foreground/70 bg-clip-text text-transparent", children: [
|
|
63874
|
+
event.title,
|
|
63875
|
+
isMilestoneEvent && /* @__PURE__ */ jsx(
|
|
63876
|
+
MoonUIBadgePro,
|
|
63877
|
+
{
|
|
63878
|
+
variant: "secondary",
|
|
63879
|
+
className: "ml-2 text-xs",
|
|
63880
|
+
leftIcon: /* @__PURE__ */ jsx(Target, { className: "h-3 w-3" }),
|
|
63881
|
+
children: "Milestone"
|
|
63882
|
+
}
|
|
63883
|
+
)
|
|
63884
|
+
] }),
|
|
63885
|
+
event.description && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: event.description })
|
|
63886
|
+
] }),
|
|
63887
|
+
(customMeta?.duration || event.metadata?.tags) && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-2 mb-4", children: [
|
|
63888
|
+
customMeta?.duration && /* @__PURE__ */ jsx(
|
|
63889
|
+
MoonUIBadgePro,
|
|
63890
|
+
{
|
|
63891
|
+
variant: "secondary",
|
|
63892
|
+
leftIcon: /* @__PURE__ */ jsx(Clock, { className: "w-3 h-3" }),
|
|
63893
|
+
children: customMeta.duration
|
|
63894
|
+
}
|
|
63895
|
+
),
|
|
63896
|
+
event.metadata?.tags?.map((tag) => /* @__PURE__ */ jsx(MoonUIBadgePro, { variant: "outline", children: tag }, tag))
|
|
63897
|
+
] }),
|
|
63898
|
+
event.metadata?.progress !== void 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
63899
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between text-xs text-muted-foreground mb-1", children: [
|
|
63900
|
+
/* @__PURE__ */ jsx("span", { children: "Progress" }),
|
|
63901
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
63902
|
+
event.metadata.progress,
|
|
63903
|
+
"%"
|
|
63904
|
+
] })
|
|
63905
|
+
] }),
|
|
63906
|
+
/* @__PURE__ */ jsx("div", { className: "h-2 bg-muted rounded-full overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
63907
|
+
motion.div,
|
|
63908
|
+
{
|
|
63909
|
+
initial: { width: 0 },
|
|
63910
|
+
whileInView: { width: `${event.metadata.progress}%` },
|
|
63911
|
+
viewport: { once: true },
|
|
63912
|
+
transition: { duration: 1, delay: index2 * 0.2 },
|
|
63913
|
+
className: cn(
|
|
63914
|
+
"h-full",
|
|
63915
|
+
customMeta?.color ? `bg-gradient-to-r ${customMeta.color}` : "bg-gradient-to-r from-primary to-primary/80"
|
|
63916
|
+
)
|
|
63917
|
+
}
|
|
63918
|
+
) })
|
|
63919
|
+
] }),
|
|
63920
|
+
customMeta?.activities && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
63921
|
+
/* @__PURE__ */ jsxs("h4", { className: "text-sm font-semibold mb-2 flex items-center gap-1", children: [
|
|
63922
|
+
/* @__PURE__ */ jsx(CheckCircle2, { className: "w-4 h-4 text-primary" }),
|
|
63923
|
+
"Key Activities"
|
|
63924
|
+
] }),
|
|
63925
|
+
/* @__PURE__ */ jsxs("ul", { className: "space-y-1", children: [
|
|
63926
|
+
customMeta.activities.slice(0, 3).map((activity, i) => /* @__PURE__ */ jsxs(
|
|
63927
|
+
motion.li,
|
|
63928
|
+
{
|
|
63929
|
+
initial: { opacity: 0, x: -10 },
|
|
63930
|
+
whileInView: { opacity: 1, x: 0 },
|
|
63931
|
+
viewport: { once: true },
|
|
63932
|
+
transition: { delay: index2 * 0.1 + i * 0.05 },
|
|
63933
|
+
className: "flex items-start gap-2 text-sm text-muted-foreground",
|
|
63934
|
+
children: [
|
|
63935
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "w-3 h-3 mt-0.5 text-primary/60 flex-shrink-0" }),
|
|
63936
|
+
/* @__PURE__ */ jsx("span", { children: activity })
|
|
63937
|
+
]
|
|
63938
|
+
},
|
|
63939
|
+
i
|
|
63940
|
+
)),
|
|
63941
|
+
customMeta.activities.length > 3 && /* @__PURE__ */ jsxs("li", { className: "text-sm text-muted-foreground/60 pl-5", children: [
|
|
63942
|
+
"+",
|
|
63943
|
+
customMeta.activities.length - 3,
|
|
63944
|
+
" more..."
|
|
63945
|
+
] })
|
|
63946
|
+
] })
|
|
63947
|
+
] }),
|
|
63948
|
+
customMeta?.deliverables && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
63949
|
+
/* @__PURE__ */ jsxs("h4", { className: "text-sm font-semibold mb-2 flex items-center gap-1", children: [
|
|
63950
|
+
/* @__PURE__ */ jsx(Package, { className: "w-4 h-4 text-primary" }),
|
|
63951
|
+
"Deliverables"
|
|
63952
|
+
] }),
|
|
63953
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: customMeta.deliverables.map((deliverable, i) => /* @__PURE__ */ jsx(
|
|
63954
|
+
MoonUIBadgePro,
|
|
63955
|
+
{
|
|
63956
|
+
variant: "secondary",
|
|
63957
|
+
className: "bg-primary/10 hover:bg-primary/20 transition-colors",
|
|
63958
|
+
children: deliverable
|
|
63959
|
+
},
|
|
63960
|
+
i
|
|
63961
|
+
)) })
|
|
63962
|
+
] }),
|
|
63963
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mt-4 pt-4 border-t", children: [
|
|
63964
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-4 text-sm text-muted-foreground", children: showRelativeTime && event.date ? /* @__PURE__ */ jsx("span", { children: getRelativeTime(event.date) }) : /* @__PURE__ */ jsx("span", { children: event.date?.toLocaleDateString() }) }),
|
|
63965
|
+
(editable || onEventEdit || onEventDelete) && /* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
63966
|
+
onEventEdit && /* @__PURE__ */ jsx(
|
|
63967
|
+
MoonUIButtonPro,
|
|
63968
|
+
{
|
|
63969
|
+
variant: "ghost",
|
|
63970
|
+
size: "sm",
|
|
63971
|
+
onClick: (e) => {
|
|
63972
|
+
e.stopPropagation();
|
|
63973
|
+
onEventEdit(event);
|
|
63974
|
+
},
|
|
63975
|
+
children: /* @__PURE__ */ jsx(Edit, { className: "h-3 w-3" })
|
|
63976
|
+
}
|
|
63977
|
+
),
|
|
63978
|
+
onEventDelete && /* @__PURE__ */ jsx(
|
|
63979
|
+
MoonUIButtonPro,
|
|
63980
|
+
{
|
|
63981
|
+
variant: "ghost",
|
|
63982
|
+
size: "sm",
|
|
63983
|
+
onClick: (e) => {
|
|
63984
|
+
e.stopPropagation();
|
|
63985
|
+
onEventDelete(event);
|
|
63986
|
+
},
|
|
63987
|
+
children: /* @__PURE__ */ jsx(Trash, { className: "h-3 w-3" })
|
|
63988
|
+
}
|
|
63989
|
+
)
|
|
63990
|
+
] })
|
|
63991
|
+
] })
|
|
63992
|
+
] })
|
|
63993
|
+
]
|
|
63994
|
+
}
|
|
63995
|
+
)
|
|
63996
|
+
}
|
|
63997
|
+
) }) })
|
|
63998
|
+
]
|
|
63999
|
+
}
|
|
64000
|
+
);
|
|
64001
|
+
}
|
|
63769
64002
|
const eventContent = /* @__PURE__ */ jsxs(
|
|
63770
64003
|
"div",
|
|
63771
64004
|
{
|
|
@@ -63776,7 +64009,6 @@ function TimelineInternal({
|
|
|
63776
64009
|
className: cn(
|
|
63777
64010
|
"relative flex gap-6",
|
|
63778
64011
|
compactMode ? "pb-4" : "pb-10",
|
|
63779
|
-
layout === "alternating" && index2 % 2 === 0 && "flex-row-reverse",
|
|
63780
64012
|
layout === "horizontal" && "flex-col items-center pb-0 mr-8",
|
|
63781
64013
|
"transition-all duration-200",
|
|
63782
64014
|
isFocused && "scale-[1.02]",
|
|
@@ -63795,15 +64027,25 @@ function TimelineInternal({
|
|
|
63795
64027
|
motion.div,
|
|
63796
64028
|
{
|
|
63797
64029
|
className: cn(
|
|
63798
|
-
"flex items-center justify-center rounded-full border-4
|
|
63799
|
-
|
|
63800
|
-
|
|
63801
|
-
|
|
64030
|
+
"flex items-center justify-center rounded-full border-4 z-10 shadow-2xl relative",
|
|
64031
|
+
// Node size variants with custom meta override
|
|
64032
|
+
customMeta?.color ? "w-20 h-20" : nodeSize2 === "sm" ? "w-8 h-8" : nodeSize2 === "md" ? isMilestoneEvent ? "w-12 h-12" : "w-10 h-10" : nodeSize2 === "lg" ? "w-14 h-14" : nodeSize2 === "xl" ? "w-16 h-16" : "w-10 h-10",
|
|
64033
|
+
// Node style variants with custom override
|
|
64034
|
+
customMeta?.color ? `bg-gradient-to-br ${customMeta.color} border-background` : nodeStyle === "gradient" ? "bg-gradient-to-br from-primary/90 to-primary/60 border-primary/20" : nodeStyle === "glassmorphic" ? "backdrop-blur-xl bg-white/20 dark:bg-white/10 border-white/20" : nodeStyle === "animated" ? "animate-gradient bg-gradient-to-r from-purple-500 via-pink-500 to-orange-500 bg-[length:200%_200%]" : nodeStyle === "simple" ? eventColor : eventColor,
|
|
64035
|
+
// Pulse animation
|
|
64036
|
+
pulseAnimation && !customMeta?.color && "animate-pulse",
|
|
64037
|
+
isSelected && "ring-4 ring-ring ring-offset-2",
|
|
64038
|
+
"group hover:scale-110 transition-transform duration-300"
|
|
63802
64039
|
),
|
|
63803
64040
|
whileHover: { scale: 1.15 },
|
|
63804
64041
|
whileTap: { scale: 0.95 },
|
|
63805
64042
|
children: [
|
|
63806
|
-
|
|
64043
|
+
phaseNumber && /* @__PURE__ */ jsx("span", { className: "absolute -top-3 -right-3 bg-background text-xs font-bold w-10 h-10 rounded-full border-2 border-primary flex items-center justify-center shadow-lg", children: phaseNumber }),
|
|
64044
|
+
/* @__PURE__ */ jsx("div", { className: "group-hover:scale-110 transition-transform duration-300", children: renderEventIcon(event) }),
|
|
64045
|
+
customMeta?.color && /* @__PURE__ */ jsx("div", { className: cn(
|
|
64046
|
+
"absolute inset-0 rounded-full animate-ping opacity-20",
|
|
64047
|
+
`bg-gradient-to-br ${customMeta.color}`
|
|
64048
|
+
) }),
|
|
63807
64049
|
!isLast && layout === "horizontal" && /* @__PURE__ */ jsx(
|
|
63808
64050
|
"div",
|
|
63809
64051
|
{
|
|
@@ -63827,180 +64069,253 @@ function TimelineInternal({
|
|
|
63827
64069
|
),
|
|
63828
64070
|
!isLast && layout !== "horizontal" && renderConnector(event, events[index2 + 1], isLast)
|
|
63829
64071
|
] }),
|
|
63830
|
-
/* @__PURE__ */
|
|
64072
|
+
/* @__PURE__ */ jsxs(
|
|
63831
64073
|
MoonUICardPro,
|
|
63832
64074
|
{
|
|
63833
64075
|
className: cn(
|
|
63834
64076
|
layout === "horizontal" ? "w-64" : "flex-1 min-w-0",
|
|
63835
|
-
"
|
|
63836
|
-
layout === "alternating" && index2 % 2 === 0 && "text-right",
|
|
64077
|
+
"transition-all duration-300 cursor-pointer overflow-hidden",
|
|
63837
64078
|
isSelected && "ring-2 ring-primary",
|
|
63838
|
-
|
|
64079
|
+
// Card style variants with custom border
|
|
64080
|
+
borderColor ? `${borderColor} border-2` : "",
|
|
64081
|
+
customMeta?.color ? "bg-gradient-to-br from-card/95 to-card/80 backdrop-blur-lg shadow-xl hover:shadow-2xl" : cardStyle === "minimal" ? "shadow-none border-0 bg-transparent" : cardStyle === "bordered" ? "shadow-sm hover:shadow-md border-2" : cardStyle === "elevated" ? "shadow-lg hover:shadow-xl bg-card/90" : cardStyle === "glassmorphic" ? "backdrop-blur-xl bg-white/10 dark:bg-black/10 border border-white/20 shadow-2xl" : "shadow-sm",
|
|
64082
|
+
// Card gradient
|
|
64083
|
+
cardGradient && "bg-gradient-to-br from-card via-card/90 to-card/80 dark:from-card dark:via-card/95 dark:to-card/90"
|
|
63839
64084
|
),
|
|
63840
64085
|
onClick: () => handleEventClick(event),
|
|
63841
|
-
children:
|
|
63842
|
-
/* @__PURE__ */
|
|
63843
|
-
|
|
63844
|
-
|
|
63845
|
-
|
|
63846
|
-
|
|
63847
|
-
|
|
63848
|
-
|
|
63849
|
-
|
|
63850
|
-
|
|
63851
|
-
|
|
63852
|
-
|
|
63853
|
-
|
|
63854
|
-
|
|
63855
|
-
|
|
63856
|
-
|
|
63857
|
-
|
|
64086
|
+
children: [
|
|
64087
|
+
customMeta?.color && /* @__PURE__ */ jsx("div", { className: cn(
|
|
64088
|
+
"h-2 bg-gradient-to-r",
|
|
64089
|
+
customMeta.color
|
|
64090
|
+
) }),
|
|
64091
|
+
/* @__PURE__ */ jsxs(MoonUICardContentPro, { className: cn(
|
|
64092
|
+
"p-6",
|
|
64093
|
+
customMeta?.color && "pt-4"
|
|
64094
|
+
), children: [
|
|
64095
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2 mb-2", children: [
|
|
64096
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
64097
|
+
/* @__PURE__ */ jsxs("h4", { className: cn(
|
|
64098
|
+
"font-semibold",
|
|
64099
|
+
compactMode ? "text-sm" : "text-base",
|
|
64100
|
+
isMilestoneEvent && "text-lg"
|
|
64101
|
+
), children: [
|
|
64102
|
+
event.title,
|
|
64103
|
+
isMilestoneEvent && /* @__PURE__ */ jsx(MoonUIBadgePro, { variant: "secondary", className: "ml-2 bg-purple-500", children: "Milestone" })
|
|
64104
|
+
] }),
|
|
64105
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mt-1 text-xs text-muted-foreground", children: [
|
|
64106
|
+
/* @__PURE__ */ jsx(Clock, { className: "h-3 w-3" }),
|
|
64107
|
+
showRelativeTime ? /* @__PURE__ */ jsx("span", { children: getRelativeTime(event.date) }) : /* @__PURE__ */ jsx("span", { children: formatTime2(event.date) }),
|
|
64108
|
+
isRangeEvent && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
64109
|
+
/* @__PURE__ */ jsx(ArrowRight, { className: "h-3 w-3" }),
|
|
64110
|
+
/* @__PURE__ */ jsx("span", { children: formatTime2(event.endDate) })
|
|
64111
|
+
] })
|
|
63858
64112
|
] })
|
|
63859
|
-
] })
|
|
63860
|
-
|
|
63861
|
-
|
|
63862
|
-
|
|
63863
|
-
|
|
63864
|
-
|
|
63865
|
-
|
|
63866
|
-
|
|
63867
|
-
|
|
64113
|
+
] }),
|
|
64114
|
+
(editable || event.metadata?.externalLink) && /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
64115
|
+
/* @__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" }) }) }),
|
|
64116
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuContentPro, { align: "end", children: [
|
|
64117
|
+
editable && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
64118
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => onEventEdit?.(event), children: [
|
|
64119
|
+
/* @__PURE__ */ jsx(Edit, { className: "mr-2 h-4 w-4" }),
|
|
64120
|
+
"Edit"
|
|
64121
|
+
] }),
|
|
64122
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => onEventDelete?.(event), children: [
|
|
64123
|
+
/* @__PURE__ */ jsx(Trash, { className: "mr-2 h-4 w-4" }),
|
|
64124
|
+
"Delete"
|
|
64125
|
+
] }),
|
|
64126
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuSeparatorPro, {})
|
|
63868
64127
|
] }),
|
|
63869
|
-
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () =>
|
|
63870
|
-
/* @__PURE__ */ jsx(
|
|
63871
|
-
"
|
|
64128
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => navigator.clipboard.writeText(event.title), children: [
|
|
64129
|
+
/* @__PURE__ */ jsx(Copy, { className: "mr-2 h-4 w-4" }),
|
|
64130
|
+
"Copy"
|
|
63872
64131
|
] }),
|
|
63873
|
-
/* @__PURE__ */
|
|
63874
|
-
|
|
63875
|
-
|
|
63876
|
-
|
|
63877
|
-
"
|
|
63878
|
-
|
|
63879
|
-
|
|
63880
|
-
|
|
63881
|
-
"Share"
|
|
63882
|
-
] }),
|
|
63883
|
-
event.metadata?.externalLink && /* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => window.open(event.metadata?.externalLink, "_blank"), children: [
|
|
63884
|
-
/* @__PURE__ */ jsx(ExternalLink, { className: "mr-2 h-4 w-4" }),
|
|
63885
|
-
"View Details"
|
|
64132
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { children: [
|
|
64133
|
+
/* @__PURE__ */ jsx(Share, { className: "mr-2 h-4 w-4" }),
|
|
64134
|
+
"Share"
|
|
64135
|
+
] }),
|
|
64136
|
+
event.metadata?.externalLink && /* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => window.open(event.metadata?.externalLink, "_blank"), children: [
|
|
64137
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "mr-2 h-4 w-4" }),
|
|
64138
|
+
"View Details"
|
|
64139
|
+
] })
|
|
63886
64140
|
] })
|
|
63887
64141
|
] })
|
|
63888
|
-
] })
|
|
63889
|
-
] }),
|
|
63890
|
-
event.description && /* @__PURE__ */ jsx("p", { className: cn(
|
|
63891
|
-
"text-muted-foreground mb-2",
|
|
63892
|
-
compactMode ? "text-xs" : "text-sm"
|
|
63893
|
-
), children: event.description }),
|
|
63894
|
-
isMilestoneEvent && event.milestone && /* @__PURE__ */ jsxs("div", { className: "bg-purple-50 dark:bg-purple-950/20 rounded-md p-3 mb-2", children: [
|
|
63895
|
-
event.milestone.target && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
63896
|
-
/* @__PURE__ */ jsx(Target, { className: "h-4 w-4 text-purple-600" }),
|
|
63897
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium", children: "Target:" }),
|
|
63898
|
-
/* @__PURE__ */ jsx("span", { children: event.milestone.target })
|
|
63899
64142
|
] }),
|
|
63900
|
-
event.
|
|
63901
|
-
|
|
63902
|
-
|
|
63903
|
-
|
|
63904
|
-
|
|
63905
|
-
|
|
63906
|
-
|
|
63907
|
-
|
|
63908
|
-
|
|
63909
|
-
|
|
63910
|
-
|
|
63911
|
-
"
|
|
64143
|
+
event.description && /* @__PURE__ */ jsx("p", { className: cn(
|
|
64144
|
+
"text-muted-foreground mb-2",
|
|
64145
|
+
compactMode ? "text-xs" : "text-sm"
|
|
64146
|
+
), children: event.description }),
|
|
64147
|
+
isMilestoneEvent && event.milestone && /* @__PURE__ */ jsxs("div", { className: "bg-purple-50 dark:bg-purple-950/20 rounded-md p-3 mb-2", children: [
|
|
64148
|
+
event.milestone.target && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
64149
|
+
/* @__PURE__ */ jsx(Target, { className: "h-4 w-4 text-purple-600" }),
|
|
64150
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: "Target:" }),
|
|
64151
|
+
/* @__PURE__ */ jsx("span", { children: event.milestone.target })
|
|
64152
|
+
] }),
|
|
64153
|
+
event.milestone.achievement && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm mt-1", children: [
|
|
64154
|
+
/* @__PURE__ */ jsx(TrendingUp, { className: "h-4 w-4 text-purple-600" }),
|
|
64155
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: "Achievement:" }),
|
|
64156
|
+
/* @__PURE__ */ jsx("span", { children: event.milestone.achievement })
|
|
63912
64157
|
] })
|
|
63913
64158
|
] }),
|
|
63914
|
-
/* @__PURE__ */
|
|
63915
|
-
|
|
63916
|
-
|
|
63917
|
-
|
|
63918
|
-
|
|
63919
|
-
|
|
63920
|
-
|
|
63921
|
-
}
|
|
63922
|
-
|
|
63923
|
-
|
|
63924
|
-
|
|
63925
|
-
|
|
63926
|
-
|
|
63927
|
-
|
|
64159
|
+
event.metadata?.progress !== void 0 && /* @__PURE__ */ jsxs("div", { className: "mb-2", children: [
|
|
64160
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between text-xs mb-1", children: [
|
|
64161
|
+
/* @__PURE__ */ jsx("span", { children: "Progress" }),
|
|
64162
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
64163
|
+
event.metadata.progress,
|
|
64164
|
+
"%"
|
|
64165
|
+
] })
|
|
64166
|
+
] }),
|
|
64167
|
+
/* @__PURE__ */ jsx("div", { className: "w-full bg-muted rounded-full h-2 overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
64168
|
+
motion.div,
|
|
64169
|
+
{
|
|
64170
|
+
className: "h-full bg-primary",
|
|
64171
|
+
initial: { width: 0 },
|
|
64172
|
+
animate: { width: `${event.metadata.progress}%` },
|
|
64173
|
+
transition: { duration: 0.5, ease: "easeOut" }
|
|
64174
|
+
}
|
|
64175
|
+
) })
|
|
63928
64176
|
] }),
|
|
63929
|
-
/* @__PURE__ */ jsxs("div", { className: "flex
|
|
63930
|
-
/* @__PURE__ */
|
|
63931
|
-
|
|
63932
|
-
|
|
63933
|
-
|
|
63934
|
-
|
|
63935
|
-
|
|
63936
|
-
|
|
63937
|
-
|
|
64177
|
+
showUserInfo && event.user && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
64178
|
+
/* @__PURE__ */ jsxs(MoonUIAvatarPro, { className: "h-6 w-6", children: [
|
|
64179
|
+
/* @__PURE__ */ jsx(MoonUIAvatarImagePro, { src: event.user.avatar }),
|
|
64180
|
+
/* @__PURE__ */ jsx(MoonUIAvatarFallbackPro, { className: "text-xs", children: getInitials4(event.user.name) })
|
|
64181
|
+
] }),
|
|
64182
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
64183
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: event.user.name }),
|
|
64184
|
+
event.user.role && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: event.user.role })
|
|
64185
|
+
] })
|
|
63938
64186
|
] }),
|
|
63939
|
-
|
|
63940
|
-
/* @__PURE__ */
|
|
63941
|
-
|
|
64187
|
+
customMeta?.activities && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
64188
|
+
/* @__PURE__ */ jsxs("h4", { className: "text-sm font-semibold mb-2 flex items-center gap-1", children: [
|
|
64189
|
+
/* @__PURE__ */ jsx(CheckCircle2, { className: "w-4 h-4 text-primary" }),
|
|
64190
|
+
"Key Activities"
|
|
64191
|
+
] }),
|
|
64192
|
+
/* @__PURE__ */ jsxs("ul", { className: "space-y-1", children: [
|
|
64193
|
+
customMeta.activities.slice(0, 3).map((activity, i) => /* @__PURE__ */ jsxs(
|
|
64194
|
+
motion.li,
|
|
64195
|
+
{
|
|
64196
|
+
initial: { opacity: 0, x: -10 },
|
|
64197
|
+
whileInView: { opacity: 1, x: 0 },
|
|
64198
|
+
viewport: { once: true },
|
|
64199
|
+
transition: { delay: index2 * 0.1 + i * 0.05 },
|
|
64200
|
+
className: "flex items-start gap-2 text-sm text-muted-foreground",
|
|
64201
|
+
children: [
|
|
64202
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "w-3 h-3 mt-0.5 text-primary/60 flex-shrink-0" }),
|
|
64203
|
+
/* @__PURE__ */ jsx("span", { children: activity })
|
|
64204
|
+
]
|
|
64205
|
+
},
|
|
64206
|
+
i
|
|
64207
|
+
)),
|
|
64208
|
+
customMeta.activities.length > 3 && /* @__PURE__ */ jsxs("li", { className: "text-sm text-muted-foreground/60 pl-5", children: [
|
|
64209
|
+
"+",
|
|
64210
|
+
customMeta.activities.length - 3,
|
|
64211
|
+
" more..."
|
|
64212
|
+
] })
|
|
64213
|
+
] })
|
|
63942
64214
|
] }),
|
|
63943
|
-
|
|
63944
|
-
/* @__PURE__ */
|
|
63945
|
-
|
|
64215
|
+
customMeta?.deliverables && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
64216
|
+
/* @__PURE__ */ jsxs("h4", { className: "text-sm font-semibold mb-2 flex items-center gap-1", children: [
|
|
64217
|
+
/* @__PURE__ */ jsx(Package, { className: "w-4 h-4 text-primary" }),
|
|
64218
|
+
"Deliverables"
|
|
64219
|
+
] }),
|
|
64220
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: customMeta.deliverables.map((deliverable, i) => /* @__PURE__ */ jsx(
|
|
64221
|
+
MoonUIBadgePro,
|
|
64222
|
+
{
|
|
64223
|
+
variant: "secondary",
|
|
64224
|
+
className: "bg-primary/10 hover:bg-primary/20 transition-colors",
|
|
64225
|
+
children: deliverable
|
|
64226
|
+
},
|
|
64227
|
+
i
|
|
64228
|
+
)) })
|
|
63946
64229
|
] }),
|
|
63947
|
-
|
|
63948
|
-
|
|
63949
|
-
|
|
64230
|
+
showMetadata && event.metadata && !customMeta && /* @__PURE__ */ jsxs("div", { className: cn(
|
|
64231
|
+
"flex flex-wrap items-center gap-3 text-xs",
|
|
64232
|
+
enhancedMetadata ? "text-foreground" : "text-muted-foreground"
|
|
64233
|
+
), children: [
|
|
64234
|
+
event.metadata.duration && /* @__PURE__ */ jsxs("div", { className: cn(
|
|
64235
|
+
"flex items-center gap-1",
|
|
64236
|
+
enhancedMetadata && "px-2 py-1 rounded-md bg-muted/50"
|
|
64237
|
+
), children: [
|
|
64238
|
+
/* @__PURE__ */ jsx(Clock, { className: cn("h-3 w-3", enhancedMetadata && "text-primary") }),
|
|
64239
|
+
/* @__PURE__ */ jsx("span", { children: event.metadata.duration })
|
|
64240
|
+
] }),
|
|
64241
|
+
event.metadata.location && /* @__PURE__ */ jsxs("div", { className: cn(
|
|
64242
|
+
"flex items-center gap-1",
|
|
64243
|
+
enhancedMetadata && "px-2 py-1 rounded-md bg-muted/50"
|
|
64244
|
+
), children: [
|
|
64245
|
+
/* @__PURE__ */ jsx(Calendar$1, { className: cn("h-3 w-3", enhancedMetadata && "text-primary") }),
|
|
64246
|
+
/* @__PURE__ */ jsx("span", { children: event.metadata.location })
|
|
64247
|
+
] }),
|
|
64248
|
+
event.metadata.comments !== void 0 && event.metadata.comments > 0 && /* @__PURE__ */ jsxs("div", { className: cn(
|
|
64249
|
+
"flex items-center gap-1",
|
|
64250
|
+
enhancedMetadata && "px-2 py-1 rounded-md bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400"
|
|
64251
|
+
), children: [
|
|
64252
|
+
/* @__PURE__ */ jsx(MessageCircle, { className: "h-3 w-3" }),
|
|
64253
|
+
/* @__PURE__ */ jsx("span", { children: event.metadata.comments })
|
|
64254
|
+
] }),
|
|
64255
|
+
event.metadata.attachments !== void 0 && event.metadata.attachments > 0 && /* @__PURE__ */ jsxs("div", { className: cn(
|
|
64256
|
+
"flex items-center gap-1",
|
|
64257
|
+
enhancedMetadata && "px-2 py-1 rounded-md bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400"
|
|
64258
|
+
), children: [
|
|
64259
|
+
/* @__PURE__ */ jsx(Paperclip, { className: "h-3 w-3" }),
|
|
64260
|
+
/* @__PURE__ */ jsx("span", { children: event.metadata.attachments })
|
|
64261
|
+
] }),
|
|
64262
|
+
event.metadata.priority && /* @__PURE__ */ jsx(
|
|
64263
|
+
MoonUIBadgePro,
|
|
64264
|
+
{
|
|
64265
|
+
variant: event.metadata.priority === "high" ? "destructive" : event.metadata.priority === "medium" ? "outline" : "secondary",
|
|
64266
|
+
className: cn(
|
|
64267
|
+
"text-xs",
|
|
64268
|
+
enhancedMetadata && "font-semibold"
|
|
64269
|
+
),
|
|
64270
|
+
children: event.metadata.priority
|
|
64271
|
+
}
|
|
64272
|
+
)
|
|
63950
64273
|
] }),
|
|
63951
|
-
event.metadata.
|
|
63952
|
-
|
|
64274
|
+
event.metadata?.tags && event.metadata.tags.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 mt-2", children: event.metadata.tags.map((tag, tagIndex) => /* @__PURE__ */ jsx(MoonUIBadgePro, { variant: "outline", className: "text-xs", children: tag }, tagIndex)) }),
|
|
64275
|
+
isNestedEvent && isExpanded && event.subEvents && /* @__PURE__ */ jsx("div", { className: "mt-3 ml-4 pl-4 border-l-2 border-muted", children: event.subEvents.map((subEvent, subIndex) => /* @__PURE__ */ jsx("div", { className: "mb-2 last:mb-0", children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
|
|
64276
|
+
/* @__PURE__ */ jsx("div", { className: cn(
|
|
64277
|
+
"w-2 h-2 rounded-full mt-1.5",
|
|
64278
|
+
colorScheme[subEvent.type] || DEFAULT_COLORS[subEvent.type]
|
|
64279
|
+
) }),
|
|
64280
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
64281
|
+
/* @__PURE__ */ jsx("h5", { className: "text-sm font-medium", children: subEvent.title }),
|
|
64282
|
+
subEvent.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: subEvent.description }),
|
|
64283
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: getRelativeTime(subEvent.date) })
|
|
64284
|
+
] })
|
|
64285
|
+
] }) }, subEvent.id)) }),
|
|
64286
|
+
isNestedEvent && event.subEvents && event.subEvents.length > 0 && /* @__PURE__ */ jsx(
|
|
64287
|
+
MoonUIButtonPro,
|
|
63953
64288
|
{
|
|
63954
|
-
variant:
|
|
63955
|
-
|
|
63956
|
-
|
|
64289
|
+
variant: "ghost",
|
|
64290
|
+
size: "sm",
|
|
64291
|
+
className: "mt-2 h-6 text-xs",
|
|
64292
|
+
onClick: (e) => {
|
|
64293
|
+
e.stopPropagation();
|
|
64294
|
+
setExpandedEvents((prev) => {
|
|
64295
|
+
const newSet = new Set(prev);
|
|
64296
|
+
if (newSet.has(event.id)) {
|
|
64297
|
+
newSet.delete(event.id);
|
|
64298
|
+
} else {
|
|
64299
|
+
newSet.add(event.id);
|
|
64300
|
+
}
|
|
64301
|
+
return newSet;
|
|
64302
|
+
});
|
|
64303
|
+
},
|
|
64304
|
+
children: isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
64305
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "mr-1 h-3 w-3" }),
|
|
64306
|
+
"Hide ",
|
|
64307
|
+
event.subEvents.length,
|
|
64308
|
+
" sub-events"
|
|
64309
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
64310
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "mr-1 h-3 w-3" }),
|
|
64311
|
+
"Show ",
|
|
64312
|
+
event.subEvents.length,
|
|
64313
|
+
" sub-events"
|
|
64314
|
+
] })
|
|
63957
64315
|
}
|
|
63958
64316
|
)
|
|
63959
|
-
] })
|
|
63960
|
-
|
|
63961
|
-
isNestedEvent && isExpanded && event.subEvents && /* @__PURE__ */ jsx("div", { className: "mt-3 ml-4 pl-4 border-l-2 border-muted", children: event.subEvents.map((subEvent, subIndex) => /* @__PURE__ */ jsx("div", { className: "mb-2 last:mb-0", children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
|
|
63962
|
-
/* @__PURE__ */ jsx("div", { className: cn(
|
|
63963
|
-
"w-2 h-2 rounded-full mt-1.5",
|
|
63964
|
-
colorScheme[subEvent.type] || DEFAULT_COLORS[subEvent.type]
|
|
63965
|
-
) }),
|
|
63966
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
63967
|
-
/* @__PURE__ */ jsx("h5", { className: "text-sm font-medium", children: subEvent.title }),
|
|
63968
|
-
subEvent.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: subEvent.description }),
|
|
63969
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: getRelativeTime(subEvent.date) })
|
|
63970
|
-
] })
|
|
63971
|
-
] }) }, subEvent.id)) }),
|
|
63972
|
-
isNestedEvent && event.subEvents && event.subEvents.length > 0 && /* @__PURE__ */ jsx(
|
|
63973
|
-
MoonUIButtonPro,
|
|
63974
|
-
{
|
|
63975
|
-
variant: "ghost",
|
|
63976
|
-
size: "sm",
|
|
63977
|
-
className: "mt-2 h-6 text-xs",
|
|
63978
|
-
onClick: (e) => {
|
|
63979
|
-
e.stopPropagation();
|
|
63980
|
-
setExpandedEvents((prev) => {
|
|
63981
|
-
const newSet = new Set(prev);
|
|
63982
|
-
if (newSet.has(event.id)) {
|
|
63983
|
-
newSet.delete(event.id);
|
|
63984
|
-
} else {
|
|
63985
|
-
newSet.add(event.id);
|
|
63986
|
-
}
|
|
63987
|
-
return newSet;
|
|
63988
|
-
});
|
|
63989
|
-
},
|
|
63990
|
-
children: isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
63991
|
-
/* @__PURE__ */ jsx(ChevronDown, { className: "mr-1 h-3 w-3" }),
|
|
63992
|
-
"Hide ",
|
|
63993
|
-
event.subEvents.length,
|
|
63994
|
-
" sub-events"
|
|
63995
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
63996
|
-
/* @__PURE__ */ jsx(ChevronRight, { className: "mr-1 h-3 w-3" }),
|
|
63997
|
-
"Show ",
|
|
63998
|
-
event.subEvents.length,
|
|
63999
|
-
" sub-events"
|
|
64000
|
-
] })
|
|
64001
|
-
}
|
|
64002
|
-
)
|
|
64003
|
-
] })
|
|
64317
|
+
] })
|
|
64318
|
+
]
|
|
64004
64319
|
}
|
|
64005
64320
|
)
|
|
64006
64321
|
]
|
|
@@ -64056,7 +64371,15 @@ function TimelineInternal({
|
|
|
64056
64371
|
showMetadata,
|
|
64057
64372
|
draggable,
|
|
64058
64373
|
onEventsReorder,
|
|
64059
|
-
animation
|
|
64374
|
+
animation,
|
|
64375
|
+
nodeSize2,
|
|
64376
|
+
nodeStyle,
|
|
64377
|
+
cardStyle,
|
|
64378
|
+
connectorStyle,
|
|
64379
|
+
showPhaseNumbers,
|
|
64380
|
+
pulseAnimation,
|
|
64381
|
+
cardGradient,
|
|
64382
|
+
enhancedMetadata
|
|
64060
64383
|
]);
|
|
64061
64384
|
const renderGroupedEvents = useCallback(() => {
|
|
64062
64385
|
const groups = groupEventsByDate(filteredAndSortedEvents);
|
|
@@ -64121,7 +64444,7 @@ function TimelineInternal({
|
|
|
64121
64444
|
layout === "horizontal" && "flex flex-row overflow-x-auto gap-0 pb-4 items-start",
|
|
64122
64445
|
layout === "alternating" && "relative"
|
|
64123
64446
|
), children: [
|
|
64124
|
-
layout === "alternating" && /* @__PURE__ */ jsx("div", { className: "absolute left-1/2 -
|
|
64447
|
+
(layout === "alternating" || layout === "centered") && /* @__PURE__ */ jsx("div", { className: "hidden lg:block absolute left-1/2 transform -translate-x-1/2 w-1 h-full bg-gradient-to-b from-primary/60 via-primary/30 to-primary/10" }),
|
|
64125
64448
|
filteredAndSortedEvents.map(
|
|
64126
64449
|
(event, index2) => renderEvent(event, index2, index2 === filteredAndSortedEvents.length - 1)
|
|
64127
64450
|
)
|