@moontra/moonui-pro 2.28.9 → 2.28.10

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
@@ -85715,6 +85715,15 @@ function WidgetBase({
85715
85715
  cyan: "from-cyan-500/10 via-cyan-500/5 to-transparent border-cyan-500/20 dark:from-cyan-400/10 dark:via-cyan-400/5 dark:border-cyan-400/20",
85716
85716
  neutral: "from-gray-500/10 via-gray-500/5 to-transparent border-gray-500/20 dark:from-gray-400/10 dark:via-gray-400/5 dark:border-gray-400/20"
85717
85717
  };
85718
+ const colorSchemeClassesColored = {
85719
+ blue: "from-blue-500/20 via-blue-500/10 to-transparent border-blue-500/30 dark:from-blue-400/20 dark:via-blue-400/10 dark:border-blue-400/30",
85720
+ green: "from-green-500/20 via-green-500/10 to-transparent border-green-500/30 dark:from-green-400/20 dark:via-green-400/10 dark:border-green-400/30",
85721
+ purple: "from-purple-500/20 via-purple-500/10 to-transparent border-purple-500/30 dark:from-purple-400/20 dark:via-purple-400/10 dark:border-purple-400/30",
85722
+ orange: "from-orange-500/20 via-orange-500/10 to-transparent border-orange-500/30 dark:from-orange-400/20 dark:via-orange-400/10 dark:border-orange-400/30",
85723
+ pink: "from-pink-500/20 via-pink-500/10 to-transparent border-pink-500/30 dark:from-pink-400/20 dark:via-pink-400/10 dark:border-pink-400/30",
85724
+ cyan: "from-cyan-500/20 via-cyan-500/10 to-transparent border-cyan-500/30 dark:from-cyan-400/20 dark:via-cyan-400/10 dark:border-cyan-400/30",
85725
+ neutral: "from-gray-500/20 via-gray-500/10 to-transparent border-gray-500/30 dark:from-gray-400/20 dark:via-gray-400/10 dark:border-gray-400/30"
85726
+ };
85718
85727
  const roundedClasses = {
85719
85728
  none: "rounded-none",
85720
85729
  sm: "rounded-sm",
@@ -85773,7 +85782,7 @@ function WidgetBase({
85773
85782
  glass: "bg-background/60 backdrop-blur-md border-white/10",
85774
85783
  bordered: "border-2 bg-card",
85775
85784
  gradient: `${gradientDirectionClasses[gradientDirection]} ${colorSchemeClasses[colorScheme]}`,
85776
- colored: `${gradientDirectionClasses[gradientDirection]} ${colorSchemeClasses[colorScheme]} border-2`,
85785
+ colored: `${gradientDirectionClasses[gradientDirection]} ${colorSchemeClassesColored[colorScheme]} border-2`,
85777
85786
  overlay: "bg-card border relative overflow-hidden",
85778
85787
  floating: "bg-card border-0 shadow-2xl hover:shadow-3xl transform hover:-translate-y-1 transition-all duration-300 ring-1 ring-gray-200/50 dark:ring-gray-700/50"
85779
85788
  };
@@ -86075,29 +86084,27 @@ function ChartWidget2({
86075
86084
  const renderBarChart = () => {
86076
86085
  const values = data.values || [];
86077
86086
  const labels = data.labels || data.categories || [];
86078
- console.log("ChartWidget Debug:", { values, maxValue, labels });
86079
- return /* @__PURE__ */ jsxs("div", { className: "relative h-full", children: [
86080
- /* @__PURE__ */ jsx("div", { className: "flex items-end justify-between gap-1 pl-12 pr-4", style: { height: "200px" }, children: values.map((value, index2) => {
86087
+ return /* @__PURE__ */ jsxs("div", { className: "relative h-full overflow-hidden", children: [
86088
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-end justify-between gap-1 pl-10 pr-2 pb-6", children: values.map((value, index2) => {
86081
86089
  const percentage = value / maxValue * 100;
86082
86090
  const isHovered = hoveredIndex === index2;
86083
- console.log(`Bar ${index2}:`, { value, percentage, maxValue });
86084
86091
  return /* @__PURE__ */ jsxs(
86085
86092
  motion.div,
86086
86093
  {
86087
- className: "flex flex-col items-center justify-end gap-2 min-w-0",
86088
- style: { height: "100%", flex: "1 1 0", position: "relative", zIndex: 2 },
86094
+ className: "relative flex flex-col items-center justify-end min-w-0",
86095
+ style: { height: "calc(100% - 24px)", flex: "1 1 0" },
86089
86096
  onMouseEnter: () => setHoveredIndex(index2),
86090
86097
  onMouseLeave: () => setHoveredIndex(null),
86091
86098
  initial: { opacity: 0, y: 20 },
86092
86099
  animate: { opacity: 1, y: 0 },
86093
86100
  transition: { delay: index2 * 0.05 },
86094
86101
  children: [
86095
- showDataLabels && /* @__PURE__ */ jsx(
86102
+ showDataLabels && isHovered && /* @__PURE__ */ jsx(
86096
86103
  motion.span,
86097
86104
  {
86098
- className: "text-xs font-medium",
86105
+ className: "absolute text-xs font-medium -top-5",
86099
86106
  initial: { opacity: 0 },
86100
- animate: { opacity: isHovered ? 1 : 0 },
86107
+ animate: { opacity: 1 },
86101
86108
  children: formatNumber2(value)
86102
86109
  }
86103
86110
  ),
@@ -86110,7 +86117,7 @@ function ChartWidget2({
86110
86117
  ),
86111
86118
  style: {
86112
86119
  backgroundColor: chartColors[index2 % chartColors.length],
86113
- minHeight: "4px"
86120
+ minHeight: "2px"
86114
86121
  },
86115
86122
  initial: { height: 0 },
86116
86123
  animate: { height: `${percentage}%` },
@@ -86121,22 +86128,30 @@ function ChartWidget2({
86121
86128
  },
86122
86129
  onClick: () => onDataPointClick?.({ label: labels[index2], value })
86123
86130
  }
86124
- ) }),
86125
- labels[index2] && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground truncate max-w-full", children: labels[index2] })
86131
+ ) })
86126
86132
  ]
86127
86133
  },
86128
86134
  index2
86129
86135
  );
86130
86136
  }) }),
86131
- showGrid && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 pointer-events-none", style: { zIndex: 1 }, children: [0, 25, 50, 75, 100].map((percentage) => /* @__PURE__ */ jsx(
86132
- "div",
86133
- {
86134
- className: "absolute w-full border-b border-muted/30",
86135
- style: { bottom: `${percentage}%`, left: 0, right: 0 },
86136
- children: /* @__PURE__ */ jsx("span", { className: "absolute -left-12 text-xs text-muted-foreground -translate-y-1/2 bg-background px-1 rounded", children: Math.round(percentage / 100 * maxValue).toLocaleString() })
86137
- },
86138
- percentage
86139
- )) })
86137
+ /* @__PURE__ */ jsx("div", { className: "absolute bottom-0 left-10 right-0 flex justify-between gap-1 pr-2 h-6", children: labels.map((label, index2) => /* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground truncate", children: label }) }, index2)) }),
86138
+ showGrid && /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 pb-6 pointer-events-none", children: [
86139
+ [0, 25, 50, 75, 100].map((percentage) => /* @__PURE__ */ jsx(
86140
+ "div",
86141
+ {
86142
+ className: "absolute left-10 right-0 border-b border-muted/20",
86143
+ style: { bottom: `calc(24px + ${percentage}% * (100% - 24px) / 100)` }
86144
+ },
86145
+ percentage
86146
+ )),
86147
+ /* @__PURE__ */ jsxs("div", { className: "absolute left-0 top-0 bottom-6 w-9 flex flex-col justify-between text-xs text-muted-foreground pr-1", children: [
86148
+ /* @__PURE__ */ jsx("span", { className: "text-right", children: formatNumber2(maxValue) }),
86149
+ /* @__PURE__ */ jsx("span", { className: "text-right", children: formatNumber2(maxValue * 0.75) }),
86150
+ /* @__PURE__ */ jsx("span", { className: "text-right", children: formatNumber2(maxValue * 0.5) }),
86151
+ /* @__PURE__ */ jsx("span", { className: "text-right", children: formatNumber2(maxValue * 0.25) }),
86152
+ /* @__PURE__ */ jsx("span", { className: "text-right", children: "0" })
86153
+ ] })
86154
+ ] })
86140
86155
  ] });
86141
86156
  };
86142
86157
  const renderLineChart = () => {
@@ -86150,7 +86165,7 @@ function ChartWidget2({
86150
86165
  return { x, y, value, label: labels[index2] };
86151
86166
  });
86152
86167
  const pathData = points.map((point, index2) => `${index2 === 0 ? "M" : "L"} ${point.x} ${point.y}`).join(" ");
86153
- return /* @__PURE__ */ jsxs("div", { className: "relative h-full", children: [
86168
+ return /* @__PURE__ */ jsxs("div", { className: "relative h-full overflow-hidden", children: [
86154
86169
  /* @__PURE__ */ jsxs(
86155
86170
  "svg",
86156
86171
  {
@@ -86214,10 +86229,10 @@ function ChartWidget2({
86214
86229
  showTooltip && hoveredIndex !== null && points[hoveredIndex] && /* @__PURE__ */ jsxs(
86215
86230
  "div",
86216
86231
  {
86217
- className: "absolute bg-background border rounded px-2 py-1 text-xs pointer-events-none",
86232
+ className: "absolute bg-background border rounded px-2 py-1 text-xs pointer-events-none z-10",
86218
86233
  style: {
86219
- left: `${points[hoveredIndex].x}%`,
86220
- top: `${points[hoveredIndex].y}%`,
86234
+ left: `${Math.min(90, Math.max(10, points[hoveredIndex].x))}%`,
86235
+ top: `${Math.min(85, Math.max(5, points[hoveredIndex].y))}%`,
86221
86236
  transform: "translate(-50%, -150%)"
86222
86237
  },
86223
86238
  children: [
@@ -86233,8 +86248,8 @@ function ChartWidget2({
86233
86248
  const labels = data.labels || data.categories || [];
86234
86249
  const total = values.reduce((sum, val) => sum + val, 0);
86235
86250
  let currentAngle = -90;
86236
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
86237
- /* @__PURE__ */ jsxs("div", { className: "relative w-48 h-48", children: [
86251
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4 h-full overflow-hidden", children: [
86252
+ /* @__PURE__ */ jsxs("div", { className: "relative w-32 h-32 lg:w-40 lg:h-40 flex-shrink-0", children: [
86238
86253
  /* @__PURE__ */ jsxs("svg", { className: "w-full h-full transform", viewBox: "0 0 100 100", children: [
86239
86254
  values.map((value, index2) => {
86240
86255
  const percentage = value / total * 100;
@@ -86275,7 +86290,7 @@ function ChartWidget2({
86275
86290
  /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: "Total" })
86276
86291
  ] })
86277
86292
  ] }),
86278
- showLegend && /* @__PURE__ */ jsx("div", { className: "space-y-2", children: values.map((value, index2) => {
86293
+ showLegend && /* @__PURE__ */ jsx("div", { className: "space-y-1 overflow-y-auto flex-1 min-w-0", children: values.map((value, index2) => {
86279
86294
  const percentage = (value / total * 100).toFixed(1);
86280
86295
  return /* @__PURE__ */ jsxs(
86281
86296
  "div",
@@ -86290,11 +86305,11 @@ function ChartWidget2({
86290
86305
  /* @__PURE__ */ jsx(
86291
86306
  "div",
86292
86307
  {
86293
- className: "w-3 h-3 rounded",
86308
+ className: "w-2 h-2 rounded flex-shrink-0",
86294
86309
  style: { backgroundColor: chartColors[index2 % chartColors.length] }
86295
86310
  }
86296
86311
  ),
86297
- /* @__PURE__ */ jsx("span", { className: "text-sm", children: labels[index2] }),
86312
+ /* @__PURE__ */ jsx("span", { className: "text-xs truncate", children: labels[index2] }),
86298
86313
  /* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground ml-auto", children: [
86299
86314
  percentage,
86300
86315
  "%"
@@ -86356,7 +86371,7 @@ function ChartWidget2({
86356
86371
  ] })
86357
86372
  ] })
86358
86373
  ] }),
86359
- /* @__PURE__ */ jsx("div", { style: { height: `${height}px` }, children: renderChart() })
86374
+ /* @__PURE__ */ jsx("div", { className: "overflow-hidden", style: { height: `${height}px` }, children: renderChart() })
86360
86375
  ] })
86361
86376
  }
86362
86377
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "2.28.9",
3
+ "version": "2.28.10",
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",