@moontra/moonui-pro 2.2.6 → 2.2.7

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.mjs CHANGED
@@ -23,7 +23,6 @@ import * as ToastPrimitives from '@radix-ui/react-toast';
23
23
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
24
24
  import { useSyncExternalStore } from 'use-sync-external-store/shim/index.js';
25
25
  import { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector.js';
26
- import { cn as cn$1 } from '@moontra/moonui';
27
26
  import { ResponsiveContainer, ScatterChart, CartesianGrid, XAxis, YAxis, Tooltip as Tooltip$1, Legend, Scatter, PieChart, Pie, Cell, AreaChart, Area, ReferenceLine, Brush, BarChart, Bar, LineChart, Line, ReferenceArea } from 'recharts';
28
27
  import { DragDropContext, Droppable, Draggable } from '@hello-pangea/dnd';
29
28
  import { useForm } from 'react-hook-form';
@@ -48789,7 +48788,7 @@ function Timeline({
48789
48788
  return /* @__PURE__ */ jsxs(
48790
48789
  "div",
48791
48790
  {
48792
- className: cn$1(
48791
+ className: cn(
48793
48792
  "relative flex gap-4",
48794
48793
  compact ? "pb-4" : "pb-8",
48795
48794
  interactive && "cursor-pointer hover:bg-muted/50 rounded-lg p-2 -m-2 transition-colors"
@@ -48797,7 +48796,7 @@ function Timeline({
48797
48796
  onClick: () => handleEventClick(event),
48798
48797
  children: [
48799
48798
  orientation === "vertical" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center", children: [
48800
- /* @__PURE__ */ jsx("div", { className: cn$1(
48799
+ /* @__PURE__ */ jsx("div", { className: cn(
48801
48800
  "flex items-center justify-center w-8 h-8 rounded-full border-2 bg-background",
48802
48801
  eventColor
48803
48802
  ), children: eventIcon }),
@@ -48806,18 +48805,18 @@ function Timeline({
48806
48805
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
48807
48806
  /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
48808
48807
  /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
48809
- /* @__PURE__ */ jsx("h4", { className: cn$1(
48808
+ /* @__PURE__ */ jsx("h4", { className: cn(
48810
48809
  "font-medium text-sm",
48811
48810
  compact ? "mb-1" : "mb-2"
48812
48811
  ), children: event.title }),
48813
- event.description && /* @__PURE__ */ jsx("p", { className: cn$1(
48812
+ event.description && /* @__PURE__ */ jsx("p", { className: cn(
48814
48813
  "text-muted-foreground text-sm",
48815
48814
  compact ? "mb-1" : "mb-2"
48816
48815
  ), children: event.description })
48817
48816
  ] }),
48818
48817
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
48819
48818
  showRelativeTime ? /* @__PURE__ */ jsx("span", { children: getRelativeTime(event.date) }) : /* @__PURE__ */ jsx("span", { children: formatTime(event.date) }),
48820
- /* @__PURE__ */ jsx(MoonUIBadgePro, { variant: "outline", className: cn$1("text-xs", textColor), children: event.type })
48819
+ /* @__PURE__ */ jsx(MoonUIBadgePro, { variant: "outline", className: cn("text-xs", textColor), children: event.type })
48821
48820
  ] })
48822
48821
  ] }),
48823
48822
  showUserInfo && event.user && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
@@ -48863,7 +48862,7 @@ function Timeline({
48863
48862
  events2.map((event, index) => renderEvent(event, index, index === events2.length - 1))
48864
48863
  ] }, date));
48865
48864
  };
48866
- return /* @__PURE__ */ jsxs(MoonUICardPro, { className: cn$1("w-full", className), children: [
48865
+ return /* @__PURE__ */ jsxs(MoonUICardPro, { className: cn("w-full", className), children: [
48867
48866
  /* @__PURE__ */ jsxs(MoonUICardHeaderPro, { children: [
48868
48867
  /* @__PURE__ */ jsxs(MoonUICardTitlePro, { className: "flex items-center gap-2", children: [
48869
48868
  /* @__PURE__ */ jsx(Clock, { className: "h-5 w-5" }),
@@ -48876,7 +48875,7 @@ function Timeline({
48876
48875
  " tracked"
48877
48876
  ] })
48878
48877
  ] }),
48879
- /* @__PURE__ */ jsx(MoonUICardContentPro, { children: sortedEvents.length > 0 ? /* @__PURE__ */ jsx("div", { className: cn$1(
48878
+ /* @__PURE__ */ jsx(MoonUICardContentPro, { children: sortedEvents.length > 0 ? /* @__PURE__ */ jsx("div", { className: cn(
48880
48879
  "space-y-0",
48881
48880
  orientation === "horizontal" && "flex overflow-x-auto gap-6"
48882
48881
  ), children: groupByDate ? renderGroupedEvents() : sortedEvents.map(
@@ -49104,13 +49103,13 @@ function AdvancedChart({
49104
49103
  }
49105
49104
  };
49106
49105
  if (loading) {
49107
- return /* @__PURE__ */ jsx(MoonUICardPro, { className: cn$1("w-full", className), children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "flex items-center justify-center", style: { height }, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
49106
+ return /* @__PURE__ */ jsx(MoonUICardPro, { className: cn("w-full", className), children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "flex items-center justify-center", style: { height }, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
49108
49107
  /* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4 animate-spin" }),
49109
49108
  /* @__PURE__ */ jsx("span", { children: "Loading chart..." })
49110
49109
  ] }) }) });
49111
49110
  }
49112
49111
  if (error) {
49113
- return /* @__PURE__ */ jsx(MoonUICardPro, { className: cn$1("w-full", className), children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "flex items-center justify-center", style: { height }, children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
49112
+ return /* @__PURE__ */ jsx(MoonUICardPro, { className: cn("w-full", className), children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "flex items-center justify-center", style: { height }, children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
49114
49113
  /* @__PURE__ */ jsx("p", { className: "text-destructive mb-2", children: error }),
49115
49114
  onRefresh && /* @__PURE__ */ jsxs(MoonUIButtonPro2, { variant: "outline", onClick: onRefresh, children: [
49116
49115
  /* @__PURE__ */ jsx(RefreshCw, { className: "mr-2 h-4 w-4" }),
@@ -49118,7 +49117,7 @@ function AdvancedChart({
49118
49117
  ] })
49119
49118
  ] }) }) });
49120
49119
  }
49121
- return /* @__PURE__ */ jsxs(MoonUICardPro, { className: cn$1("w-full", className), ref: chartRef, children: [
49120
+ return /* @__PURE__ */ jsxs(MoonUICardPro, { className: cn("w-full", className), ref: chartRef, children: [
49122
49121
  /* @__PURE__ */ jsxs(MoonUICardHeaderPro, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
49123
49122
  /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
49124
49123
  /* @__PURE__ */ jsxs(MoonUICardTitlePro, { className: "text-base font-medium", children: [
@@ -49127,7 +49126,7 @@ function AdvancedChart({
49127
49126
  trend.direction === "up" && /* @__PURE__ */ jsx(TrendingUp, { className: "h-4 w-4 text-green-500" }),
49128
49127
  trend.direction === "down" && /* @__PURE__ */ jsx(TrendingDown, { className: "h-4 w-4 text-red-500" }),
49129
49128
  trend.direction === "neutral" && /* @__PURE__ */ jsx(Minus, { className: "h-4 w-4 text-gray-500" }),
49130
- /* @__PURE__ */ jsxs("span", { className: cn$1(
49129
+ /* @__PURE__ */ jsxs("span", { className: cn(
49131
49130
  "ml-1 text-sm",
49132
49131
  trend.direction === "up" && "text-green-500",
49133
49132
  trend.direction === "down" && "text-red-500",
@@ -49223,7 +49222,7 @@ function Dashboard({
49223
49222
  return /* @__PURE__ */ jsxs(
49224
49223
  MoonUICardPro,
49225
49224
  {
49226
- className: cn$1(
49225
+ className: cn(
49227
49226
  "cursor-pointer hover:shadow-md transition-shadow",
49228
49227
  onMetricClick && "hover:bg-muted/50"
49229
49228
  ),
@@ -49231,11 +49230,11 @@ function Dashboard({
49231
49230
  children: [
49232
49231
  /* @__PURE__ */ jsxs(MoonUICardHeaderPro, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
49233
49232
  /* @__PURE__ */ jsx(MoonUICardTitlePro, { className: "text-sm font-medium", children: metric.title }),
49234
- /* @__PURE__ */ jsx("div", { className: cn$1("h-4 w-4", colorClass), children: metric.icon })
49233
+ /* @__PURE__ */ jsx("div", { className: cn("h-4 w-4", colorClass), children: metric.icon })
49235
49234
  ] }),
49236
49235
  /* @__PURE__ */ jsxs(MoonUICardContentPro, { children: [
49237
49236
  /* @__PURE__ */ jsx("div", { className: "text-2xl font-bold", children: formatValue(metric.value) }),
49238
- metric.change && /* @__PURE__ */ jsxs("div", { className: cn$1(
49237
+ metric.change && /* @__PURE__ */ jsxs("div", { className: cn(
49239
49238
  "flex items-center text-xs mt-1",
49240
49239
  getChangeColor(metric.change.type)
49241
49240
  ), children: [
@@ -49255,7 +49254,7 @@ function Dashboard({
49255
49254
  };
49256
49255
  const renderWidget = (widget) => {
49257
49256
  const sizeClass = WIDGET_SIZES[widget.size || "md"];
49258
- return /* @__PURE__ */ jsxs(MoonUICardPro, { className: cn$1("h-fit", sizeClass), children: [
49257
+ return /* @__PURE__ */ jsxs(MoonUICardPro, { className: cn("h-fit", sizeClass), children: [
49259
49258
  /* @__PURE__ */ jsx(MoonUICardHeaderPro, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
49260
49259
  /* @__PURE__ */ jsxs("div", { children: [
49261
49260
  /* @__PURE__ */ jsx(MoonUICardTitlePro, { className: "text-base", children: widget.title }),
@@ -49310,12 +49309,12 @@ function Dashboard({
49310
49309
  ];
49311
49310
  const displayMetrics = metrics.length > 0 ? metrics : defaultMetrics;
49312
49311
  if (loading) {
49313
- return /* @__PURE__ */ jsx("div", { className: cn$1("w-full", className), children: /* @__PURE__ */ jsxs("div", { className: "animate-pulse space-y-4", children: [
49312
+ return /* @__PURE__ */ jsx("div", { className: cn("w-full", className), children: /* @__PURE__ */ jsxs("div", { className: "animate-pulse space-y-4", children: [
49314
49313
  /* @__PURE__ */ jsx("div", { className: "h-8 bg-muted rounded w-1/4" }),
49315
49314
  /* @__PURE__ */ jsx("div", { className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4", children: [...Array(4)].map((_, i) => /* @__PURE__ */ jsx("div", { className: "h-32 bg-muted rounded" }, i)) })
49316
49315
  ] }) });
49317
49316
  }
49318
- return /* @__PURE__ */ jsxs("div", { className: cn$1("w-full space-y-6", className), children: [
49317
+ return /* @__PURE__ */ jsxs("div", { className: cn("w-full space-y-6", className), children: [
49319
49318
  showHeader && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
49320
49319
  /* @__PURE__ */ jsxs("div", { children: [
49321
49320
  /* @__PURE__ */ jsx("h1", { className: "text-2xl font-bold tracking-tight", children: title }),
@@ -49387,7 +49386,7 @@ function DraggableList({
49387
49386
  {
49388
49387
  ...provided.droppableProps,
49389
49388
  ref: provided.innerRef,
49390
- className: cn$1(
49389
+ className: cn(
49391
49390
  "space-y-2",
49392
49391
  direction === "horizontal" && "flex space-y-0 space-x-2",
49393
49392
  snapshot.isDraggingOver && "bg-muted/50 rounded-lg",
@@ -49406,7 +49405,7 @@ function DraggableList({
49406
49405
  ref: provided2.innerRef,
49407
49406
  ...provided2.draggableProps,
49408
49407
  ...provided2.dragHandleProps,
49409
- className: cn$1(
49408
+ className: cn(
49410
49409
  "transition-all duration-200",
49411
49410
  snapshot2.isDragging && "rotate-2 scale-105 shadow-lg z-50",
49412
49411
  disabled && "cursor-not-allowed opacity-50"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "2.2.6",
3
+ "version": "2.2.7",
4
4
  "description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
@@ -36,7 +36,7 @@ import {
36
36
  Lock,
37
37
  Sparkles
38
38
  } from 'lucide-react'
39
- import { cn } from '@moontra/moonui'
39
+ import { cn } from '../../lib/utils'
40
40
 
41
41
  export type ChartType = 'line' | 'bar' | 'area' | 'pie' | 'scatter'
42
42
 
@@ -22,7 +22,7 @@ import {
22
22
  Lock,
23
23
  Sparkles
24
24
  } from 'lucide-react'
25
- import { cn } from '@moontra/moonui'
25
+ import { cn } from '../../lib/utils'
26
26
 
27
27
  interface DashboardMetric {
28
28
  id: string
@@ -2,7 +2,7 @@
2
2
 
3
3
  import React, { ReactNode } from "react"
4
4
  import { DragDropContext, Droppable, Draggable, DropResult } from "@hello-pangea/dnd"
5
- import { cn } from "@moontra/moonui"
5
+ import { cn } from '../../lib/utils'
6
6
 
7
7
  export interface DraggableListProps<T> {
8
8
  items: T[]
@@ -19,7 +19,7 @@ import {
19
19
  Lock,
20
20
  Sparkles
21
21
  } from 'lucide-react'
22
- import { cn } from '@moontra/moonui'
22
+ import { cn } from '../../lib/utils'
23
23
 
24
24
  interface TimelineEvent {
25
25
  id: string