@moontra/moonui-pro 2.30.3 → 2.30.5

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
@@ -86152,25 +86152,31 @@ function ChartWidget2({
86152
86152
  index2
86153
86153
  );
86154
86154
  }) }),
86155
- hoveredIndex !== null && /* @__PURE__ */ jsxs(
86156
- motion.div,
86157
- {
86158
- className: "absolute bg-background border rounded-lg px-3 py-2 text-xs pointer-events-none shadow-lg",
86159
- style: {
86160
- left: `${10 + hoveredIndex / values.length * 85 + 85 / values.length / 2}%`,
86161
- bottom: `${Math.min(90, 30 + values[hoveredIndex] / maxValue * 60)}%`,
86162
- transform: "translateX(-50%)",
86163
- zIndex: 50
86164
- },
86165
- initial: { opacity: 0, y: 10 },
86166
- animate: { opacity: 1, y: 0 },
86167
- transition: { duration: 0.2 },
86168
- children: [
86169
- /* @__PURE__ */ jsx("div", { className: "font-medium", children: labels[hoveredIndex] || `Item ${hoveredIndex + 1}` }),
86170
- /* @__PURE__ */ jsx("div", { className: "text-muted-foreground", children: formatNumber2(values[hoveredIndex]) })
86171
- ]
86172
- }
86173
- ),
86155
+ hoveredIndex !== null && (() => {
86156
+ const barWidth = 85 / values.length;
86157
+ const barPosition = 10 + hoveredIndex * barWidth + barWidth / 2;
86158
+ const barHeight = values[hoveredIndex] / maxValue * 100;
86159
+ const tooltipBottom = Math.min(85, Math.max(40, 30 + barHeight * 0.7));
86160
+ return /* @__PURE__ */ jsxs(
86161
+ motion.div,
86162
+ {
86163
+ className: "absolute bg-background border rounded-lg px-3 py-2 text-xs pointer-events-none shadow-lg",
86164
+ style: {
86165
+ left: `${barPosition}%`,
86166
+ bottom: `${tooltipBottom}%`,
86167
+ transform: "translateX(-50%)",
86168
+ zIndex: 100
86169
+ },
86170
+ initial: { opacity: 0, y: -5 },
86171
+ animate: { opacity: 1, y: 0 },
86172
+ transition: { duration: 0.15 },
86173
+ children: [
86174
+ /* @__PURE__ */ jsx("div", { className: "font-medium text-foreground", children: labels[hoveredIndex] || `Item ${hoveredIndex + 1}` }),
86175
+ /* @__PURE__ */ jsx("div", { className: "text-primary font-semibold text-sm mt-0.5", children: formatNumber2(values[hoveredIndex]) })
86176
+ ]
86177
+ }
86178
+ );
86179
+ })(),
86174
86180
  /* @__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)) }),
86175
86181
  showGrid && /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 pb-6 pointer-events-none", children: [
86176
86182
  [0, 25, 50, 75, 100].map((percentage) => /* @__PURE__ */ jsx(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "2.30.3",
3
+ "version": "2.30.5",
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",