@moontra/moonui-pro 2.27.6 → 2.27.9

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
@@ -2717,7 +2717,9 @@ var moonUIBadgeVariantsPro = cva(
2717
2717
  "inline-flex items-center gap-1.5",
2718
2718
  "font-medium transition-colors duration-200",
2719
2719
  "border focus:outline-none",
2720
- "focus-visible:ring-2 focus-visible:ring-offset-1"
2720
+ "focus-visible:ring-2 focus-visible:ring-offset-1",
2721
+ // Auto spacing between badges
2722
+ "mr-2 mb-2 last:mr-0"
2721
2723
  ],
2722
2724
  {
2723
2725
  variants: {
@@ -2809,6 +2811,7 @@ function MoonUIBadgePro({
2809
2811
  onRemove,
2810
2812
  leftIcon,
2811
2813
  rightIcon,
2814
+ noAutoSpacing,
2812
2815
  children,
2813
2816
  ...props
2814
2817
  }) {
@@ -2829,7 +2832,12 @@ function MoonUIBadgePro({
2829
2832
  return /* @__PURE__ */ jsxs(
2830
2833
  "div",
2831
2834
  {
2832
- className: cn(moonUIBadgeVariantsPro({ variant, size: size4, radius }), className),
2835
+ className: cn(
2836
+ moonUIBadgeVariantsPro({ variant, size: size4, radius }),
2837
+ // Remove auto-spacing if noAutoSpacing is true
2838
+ noAutoSpacing && "mr-0 mb-0",
2839
+ className
2840
+ ),
2833
2841
  "data-removable": removable ? "" : void 0,
2834
2842
  ...props,
2835
2843
  children: [
@@ -16882,7 +16890,7 @@ function CalendarInternal({
16882
16890
  return actualDay !== 0 && actualDay !== 6;
16883
16891
  });
16884
16892
  return /* @__PURE__ */ jsxs(Fragment, { children: [
16885
- /* @__PURE__ */ jsx(MoonUICardPro, { className: cn("w-full", className), style: { minHeight: height ? `${height}px` : "85vh", height: height ? `${height}px` : "auto" }, children: /* @__PURE__ */ jsxs("div", { className: "flex relative h-full", children: [
16893
+ /* @__PURE__ */ jsx(MoonUICardPro, { className: cn("w-full flex flex-col", className), style: { minHeight: height ? `${height}px` : "85vh" }, children: /* @__PURE__ */ jsxs("div", { className: "flex relative flex-1", children: [
16886
16894
  isSidebarOpen && /* @__PURE__ */ jsx(
16887
16895
  "div",
16888
16896
  {
@@ -16891,13 +16899,13 @@ function CalendarInternal({
16891
16899
  }
16892
16900
  ),
16893
16901
  /* @__PURE__ */ jsx("aside", { className: cn(
16894
- "bg-card border-r transition-all duration-300 flex-shrink-0",
16902
+ "bg-card border-r transition-all duration-300 flex-shrink-0 min-h-full",
16895
16903
  // Desktop styles - always visible on desktop
16896
- isDesktopSidebarCollapsed ? "w-0" : "w-64",
16904
+ isDesktopSidebarCollapsed ? "w-0 overflow-hidden" : "w-64",
16897
16905
  // Mobile styles - slide in/out
16898
16906
  "lg:relative",
16899
16907
  isSidebarOpen ? "absolute inset-y-0 left-0 z-50 w-64" : "hidden lg:block"
16900
- ), children: /* @__PURE__ */ jsxs("div", { className: "w-64 h-full flex flex-col", children: [
16908
+ ), children: /* @__PURE__ */ jsxs("div", { className: "w-64 min-h-full flex flex-col", children: [
16901
16909
  /* @__PURE__ */ jsx("div", { className: "p-4 border-b", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
16902
16910
  /* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm", children: "Calendar" }),
16903
16911
  /* @__PURE__ */ jsx(
@@ -17048,10 +17056,10 @@ function CalendarInternal({
17048
17056
  )
17049
17057
  ] })
17050
17058
  ] }) }),
17051
- /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "flex-1 flex flex-col overflow-auto p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col", children: [
17052
- view === "month" && /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-7 gap-1 w-full flex-1 auto-rows-fr", children: [
17053
- visibleDaysOfWeek.map((day) => /* @__PURE__ */ jsx("div", { className: "p-1 text-center text-xs font-medium text-muted-foreground", children: day }, day)),
17054
- filteredDays.map((date, index2) => {
17059
+ /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "flex-1 flex flex-col p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col", children: [
17060
+ view === "month" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-h-[600px]", children: [
17061
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 gap-1 mb-1", children: visibleDaysOfWeek.map((day) => /* @__PURE__ */ jsx("div", { className: "p-2 text-center text-sm font-semibold text-foreground bg-muted/50 rounded", children: day }, day)) }),
17062
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 gap-1 flex-1", style: { gridAutoRows: "minmax(100px, 1fr)" }, children: filteredDays.map((date, index2) => {
17055
17063
  const dayEvents = getEventsForDate(date);
17056
17064
  const isCurrentMonthDate = isCurrentMonth(date);
17057
17065
  const isTodayDate = isToday2(date);
@@ -17061,7 +17069,7 @@ function CalendarInternal({
17061
17069
  "div",
17062
17070
  {
17063
17071
  className: cn(
17064
- "h-full min-h-[100px] p-2 border border-border/50 cursor-pointer hover:bg-muted/50 transition-colors text-xs flex flex-col",
17072
+ "p-3 border border-border/50 rounded-lg cursor-pointer hover:bg-muted/50 transition-colors text-xs flex flex-col overflow-hidden",
17065
17073
  !isCurrentMonthDate && "text-muted-foreground bg-muted/20",
17066
17074
  isTodayDate && highlightToday && "bg-primary/10 border-primary/50",
17067
17075
  isSelectedDate && "bg-primary/20 border-primary",
@@ -17072,76 +17080,94 @@ function CalendarInternal({
17072
17080
  onDragOver: (e) => handleDateDragOver(date, e),
17073
17081
  onDrop: (e) => handleDateDrop(date, e),
17074
17082
  children: [
17075
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-1", children: [
17083
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
17076
17084
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
17077
17085
  /* @__PURE__ */ jsx("span", { className: cn(
17078
- "text-sm font-medium",
17079
- isTodayDate && "text-primary font-bold",
17080
- isHoliday(date) && "text-orange-600 dark:text-orange-400"
17086
+ "text-base font-bold",
17087
+ isTodayDate && "text-primary",
17088
+ isHoliday(date) && "text-orange-600 dark:text-orange-400",
17089
+ !isCurrentMonthDate && "opacity-40"
17081
17090
  ), children: date.getDate() }),
17082
17091
  isHoliday(date) && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-orange-600 dark:text-orange-400 truncate", children: getHolidayName(date) })
17083
17092
  ] }),
17084
17093
  dayEvents.length > 0 && /* @__PURE__ */ jsx(MoonUIBadgePro, { variant: "secondary", className: "text-xs px-1", children: dayEvents.length })
17085
17094
  ] }),
17086
- /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto custom-scrollbar space-y-0.5", children: dayEvents.map((event) => /* @__PURE__ */ jsxs(
17087
- "div",
17088
- {
17089
- className: cn(
17090
- "text-[11px] px-1.5 py-0.5 rounded text-white cursor-move group relative select-none block w-full truncate",
17091
- event.color || EVENT_COLORS[event.type || "event"],
17092
- event.priority && PRIORITY_COLORS[event.priority],
17093
- event.status && STATUS_STYLES[event.status]
17094
- ),
17095
- draggable: !disabled && enableDragDrop,
17096
- onClick: (e) => handleEventClick(event, e),
17097
- onDragStart: (e) => handleEventDragStart(event, e),
17098
- onDragEnd: handleEventDragEnd,
17099
- style: {
17100
- backgroundColor: event.color || void 0
17101
- },
17102
- children: [
17103
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
17104
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 flex-1 min-w-0", children: [
17105
- event.isPrivate && /* @__PURE__ */ jsx(Lock, { className: "h-3 w-3 flex-shrink-0" }),
17106
- event.recurring && /* @__PURE__ */ jsx(Repeat, { className: "h-3 w-3 flex-shrink-0" }),
17107
- /* @__PURE__ */ jsx("span", { className: "truncate", children: event.title })
17095
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-0.5", children: [
17096
+ dayEvents.slice(0, 3).map((event) => /* @__PURE__ */ jsxs(
17097
+ "div",
17098
+ {
17099
+ className: cn(
17100
+ "text-[11px] px-1.5 py-0.5 rounded text-white cursor-move group relative select-none block w-full truncate",
17101
+ event.color || EVENT_COLORS[event.type || "event"],
17102
+ event.priority && PRIORITY_COLORS[event.priority],
17103
+ event.status && STATUS_STYLES[event.status]
17104
+ ),
17105
+ draggable: !disabled && enableDragDrop,
17106
+ onClick: (e) => handleEventClick(event, e),
17107
+ onDragStart: (e) => handleEventDragStart(event, e),
17108
+ onDragEnd: handleEventDragEnd,
17109
+ style: {
17110
+ backgroundColor: event.color || void 0
17111
+ },
17112
+ children: [
17113
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
17114
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 flex-1 min-w-0", children: [
17115
+ event.isPrivate && /* @__PURE__ */ jsx(Lock, { className: "h-3 w-3 flex-shrink-0" }),
17116
+ event.recurring && /* @__PURE__ */ jsx(Repeat, { className: "h-3 w-3 flex-shrink-0" }),
17117
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: event.title })
17118
+ ] }),
17119
+ showEventDetails && /* @__PURE__ */ jsxs("div", { className: "hidden group-hover:flex items-center gap-1 ml-1", children: [
17120
+ /* @__PURE__ */ jsx(
17121
+ MoonUIButtonPro,
17122
+ {
17123
+ variant: "ghost",
17124
+ size: "sm",
17125
+ className: "h-4 w-4 p-0 text-white/80 hover:text-white",
17126
+ onClick: (e) => handleEventEdit(event, e),
17127
+ children: /* @__PURE__ */ jsx(Edit, { className: "h-3 w-3" })
17128
+ }
17129
+ ),
17130
+ /* @__PURE__ */ jsx(
17131
+ MoonUIButtonPro,
17132
+ {
17133
+ variant: "ghost",
17134
+ size: "sm",
17135
+ className: "h-4 w-4 p-0 text-white/80 hover:text-white",
17136
+ onClick: (e) => handleEventDelete(event, e),
17137
+ children: /* @__PURE__ */ jsx(Trash2, { className: "h-3 w-3" })
17138
+ }
17139
+ )
17140
+ ] })
17108
17141
  ] }),
17109
- showEventDetails && /* @__PURE__ */ jsxs("div", { className: "hidden group-hover:flex items-center gap-1 ml-1", children: [
17110
- /* @__PURE__ */ jsx(
17111
- MoonUIButtonPro,
17112
- {
17113
- variant: "ghost",
17114
- size: "sm",
17115
- className: "h-4 w-4 p-0 text-white/80 hover:text-white",
17116
- onClick: (e) => handleEventEdit(event, e),
17117
- children: /* @__PURE__ */ jsx(Edit, { className: "h-3 w-3" })
17118
- }
17119
- ),
17120
- /* @__PURE__ */ jsx(
17121
- MoonUIButtonPro,
17122
- {
17123
- variant: "ghost",
17124
- size: "sm",
17125
- className: "h-4 w-4 p-0 text-white/80 hover:text-white",
17126
- onClick: (e) => handleEventDelete(event, e),
17127
- children: /* @__PURE__ */ jsx(Trash2, { className: "h-3 w-3" })
17128
- }
17129
- )
17142
+ event.startTime && !compactMode && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 mt-1", children: [
17143
+ /* @__PURE__ */ jsx(Clock, { className: "h-3 w-3" }),
17144
+ /* @__PURE__ */ jsx("span", { className: "text-[10px]", children: formatTime2(event.startTime) })
17130
17145
  ] })
17131
- ] }),
17132
- event.startTime && !compactMode && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 mt-1", children: [
17133
- /* @__PURE__ */ jsx(Clock, { className: "h-3 w-3" }),
17134
- /* @__PURE__ */ jsx("span", { className: "text-[10px]", children: formatTime2(event.startTime) })
17135
- ] })
17136
- ]
17137
- },
17138
- event.id
17139
- )) })
17146
+ ]
17147
+ },
17148
+ event.id
17149
+ )),
17150
+ dayEvents.length > 3 && /* @__PURE__ */ jsxs(
17151
+ "div",
17152
+ {
17153
+ className: "text-[10px] text-muted-foreground hover:text-foreground cursor-pointer font-medium pl-1",
17154
+ onClick: (e) => {
17155
+ e.stopPropagation();
17156
+ handleDateClick(date);
17157
+ },
17158
+ children: [
17159
+ "+",
17160
+ dayEvents.length - 3,
17161
+ " more"
17162
+ ]
17163
+ }
17164
+ )
17165
+ ] })
17140
17166
  ]
17141
17167
  },
17142
17168
  index2
17143
17169
  );
17144
- })
17170
+ }) })
17145
17171
  ] }),
17146
17172
  view === "week" && /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col space-y-4", children: [
17147
17173
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-8 gap-2", children: [
@@ -17342,7 +17368,7 @@ function CalendarInternal({
17342
17368
  )) })
17343
17369
  ] }, i);
17344
17370
  }).filter(Boolean) }) }),
17345
- selectedDate && view === "month" && /* @__PURE__ */ jsxs("div", { className: "border rounded-lg p-4 bg-muted/50", children: [
17371
+ selectedDate && view === "month" && /* @__PURE__ */ jsxs("div", { className: "border rounded-lg p-4 bg-muted/50 mt-4", children: [
17346
17372
  /* @__PURE__ */ jsx("h4", { className: "font-medium mb-2", children: selectedDate.toLocaleDateString("en-US", {
17347
17373
  weekday: "long",
17348
17374
  year: "numeric",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "2.27.6",
3
+ "version": "2.27.9",
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",
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "dependencies": {
84
84
  "@moontra/moonui": "^2.3.6",
85
- "@moontra/moonui-pro": "^2.27.4",
85
+ "@moontra/moonui-pro": "^2.27.7",
86
86
  "@radix-ui/react-accordion": "^1.2.11",
87
87
  "@radix-ui/react-avatar": "^1.1.10",
88
88
  "@radix-ui/react-checkbox": "^1.3.2",