@underverse-ui/underverse 1.0.7 → 1.0.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.cjs CHANGED
@@ -6616,6 +6616,7 @@ function Calendar2({
6616
6616
  highlightWeekends = false,
6617
6617
  cellMode = "compact",
6618
6618
  maxEventsPerDay = 3,
6619
+ showEventCount = true,
6619
6620
  onEventClick,
6620
6621
  renderEvent,
6621
6622
  enableEventSheet,
@@ -6772,10 +6773,10 @@ function Calendar2({
6772
6773
  };
6773
6774
  const sz = SIZE_STYLES3[size];
6774
6775
  const CELL_EVENT_STYLES = {
6775
- sm: { cell: dense ? "min-h-20 p-1.5" : "min-h-24 p-2", day: "text-[12px]" },
6776
- md: { cell: dense ? "min-h-28 p-2" : "min-h-32 p-2.5", day: "text-sm" },
6777
- lg: { cell: dense ? "min-h-36 p-2.5" : "min-h-40 p-3", day: "text-base" },
6778
- xl: { cell: dense ? "min-h-44 p-3" : "min-h-52 p-3.5", day: "text-lg" }
6776
+ sm: { cell: dense ? "min-h-24" : "min-h-28", day: "text-sm" },
6777
+ md: { cell: dense ? "min-h-32" : "min-h-36", day: "text-base" },
6778
+ lg: { cell: dense ? "min-h-40" : "min-h-44", day: "text-lg" },
6779
+ xl: { cell: dense ? "min-h-48" : "min-h-52", day: "text-xl" }
6779
6780
  };
6780
6781
  const cellSz = CELL_EVENT_STYLES[size];
6781
6782
  const VARIANT_STYLES2 = {
@@ -6812,82 +6813,58 @@ function Calendar2({
6812
6813
  "div",
6813
6814
  {
6814
6815
  className: cn(
6815
- "rounded-3xl border border-border/50 overflow-hidden",
6816
- "bg-linear-to-br from-background via-background to-background/90",
6817
- "transition-all duration-300",
6818
- "hover:shadow-lg hover:border-border/70",
6819
- animate && "will-change-transform",
6816
+ "rounded-2xl border border-border/40 overflow-hidden",
6817
+ "bg-card/50 backdrop-blur-sm",
6818
+ "transition-all duration-200",
6819
+ "hover:border-border/60 hover:shadow-sm",
6820
6820
  cellSz.cell,
6821
- !inMonth && "opacity-50",
6822
- disabled && "opacity-40 cursor-not-allowed",
6823
- highlightWeekends && isWeekend && "bg-linear-to-br from-destructive/5 via-destructive/3 to-background/90",
6824
- isToday2 && !selectedDay && "ring-2 ring-primary/50 border-primary/30 shadow-md",
6825
- selectedDay && "border-primary/60 bg-linear-to-br from-primary/10 via-primary/5 to-background/90 shadow-md",
6826
- !disabled && "backdrop-blur-sm"
6821
+ !inMonth && "opacity-40",
6822
+ disabled && "opacity-30 cursor-not-allowed",
6823
+ highlightWeekends && isWeekend && "bg-destructive/5",
6824
+ isToday2 && !selectedDay && "ring-2 ring-primary/40 border-primary/50",
6825
+ selectedDay && "border-primary/60 bg-primary/5"
6827
6826
  ),
6828
6827
  children: [
6829
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center justify-between gap-2 px-3 py-2 border-b border-border/30 bg-muted/20", children: [
6828
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center justify-between px-2.5 py-1.5", children: [
6830
6829
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
6831
- "button",
6830
+ "span",
6832
6831
  {
6833
- type: "button",
6834
- onClick: () => !disabled && handleClickDay(d),
6835
- disabled,
6836
6832
  className: cn(
6837
- "inline-flex items-center justify-center rounded-xl px-2.5 py-1 font-semibold",
6838
- "transition-all duration-200",
6839
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",
6833
+ "font-semibold tabular-nums",
6840
6834
  cellSz.day,
6841
- selectedDay ? "bg-linear-to-br from-primary to-primary/90 text-primary-foreground shadow-sm" : "hover:bg-accent hover:text-accent-foreground hover:scale-105 active:scale-95",
6842
- disabled && "cursor-not-allowed hover:bg-transparent hover:scale-100",
6843
- isToday2 && !selectedDay && "ring-1 ring-primary/40 bg-primary/5"
6835
+ isToday2 && "text-primary",
6836
+ selectedDay && "text-primary",
6837
+ !inMonth && "text-muted-foreground/50"
6844
6838
  ),
6845
- title: d.toDateString(),
6846
6839
  children: d.getDate()
6847
6840
  }
6848
6841
  ),
6849
- dayEvents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
6850
- "span",
6851
- {
6852
- className: cn(
6853
- "text-[11px] tabular-nums px-2 py-0.5 rounded-full font-medium",
6854
- "bg-primary/10 text-primary",
6855
- dayEvents.length > 5 && "bg-destructive/10 text-destructive"
6856
- ),
6857
- children: dayEvents.length
6858
- }
6859
- )
6842
+ dayEvents.length > 0 && showEventCount && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-[10px] px-1.5 py-0.5 rounded-md bg-muted/60 text-muted-foreground font-medium", children: dayEvents.length })
6860
6843
  ] }),
6861
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cn("space-y-1.5 p-2", dense ? "p-1.5" : "p-2"), children: [
6844
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-1 px-2 pb-2", children: [
6862
6845
  visibleEvents.map((e, i) => {
6863
6846
  const key = e.id ?? `${k}-${i}`;
6864
6847
  const node = renderEvent?.({ event: e, date: d });
6865
6848
  if (node) return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { children: node }, String(key));
6866
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
6849
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
6867
6850
  "button",
6868
6851
  {
6869
6852
  type: "button",
6870
6853
  onClick: () => handleEventActivate(e, d, k, i),
6871
6854
  className: cn(
6872
- "group w-full text-left rounded-xl px-2.5 py-2",
6873
- "transition-all duration-200",
6874
- "hover:bg-accent/80 hover:shadow-sm hover:scale-[1.02] active:scale-[0.98]",
6875
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",
6876
- "text-xs flex items-center gap-2.5",
6877
- "border border-transparent hover:border-border/30"
6855
+ "group w-full text-left rounded-lg px-2.5 py-1.5",
6856
+ "transition-all duration-150",
6857
+ "hover:bg-accent/50 hover:shadow-sm hover:-translate-y-0.5",
6858
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",
6859
+ "text-sm font-medium",
6860
+ "border-l-[3px] bg-card/80"
6878
6861
  ),
6862
+ style: { borderLeftColor: e.color || "hsl(var(--primary))" },
6879
6863
  title: e.title,
6880
- children: [
6881
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
6882
- "span",
6883
- {
6884
- className: "h-2 w-2 rounded-full shrink-0 transition-transform duration-200 group-hover:scale-125",
6885
- style: { backgroundColor: e.color || "hsl(var(--primary))" }
6886
- }
6887
- ),
6888
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "truncate flex-1 font-medium group-hover:text-foreground", children: e.title ?? "Event" }),
6889
- showEventBadges && e.badge && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "shrink-0 rounded-full bg-muted/80 px-2 py-0.5 text-[10px] text-muted-foreground font-medium backdrop-blur-sm", children: e.badge })
6890
- ]
6864
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center gap-2", children: [
6865
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "truncate flex-1", children: e.title ?? "Event" }),
6866
+ showEventBadges && e.badge && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "shrink-0 text-[10px] px-1.5 py-0.5 rounded bg-muted/60 text-muted-foreground", children: e.badge })
6867
+ ] })
6891
6868
  },
6892
6869
  String(key)
6893
6870
  );
@@ -7015,80 +6992,45 @@ function Calendar2({
7015
6992
  "div",
7016
6993
  {
7017
6994
  className: cn(
7018
- "rounded-3xl border border-border/50 overflow-hidden",
7019
- "bg-linear-to-br from-background via-background to-background/90",
7020
- "transition-all duration-300",
7021
- "hover:shadow-lg hover:border-border/70",
6995
+ "rounded-2xl border border-border/40 overflow-hidden",
6996
+ "bg-card/50 backdrop-blur-sm",
6997
+ "transition-all duration-200",
6998
+ "hover:border-border/60 hover:shadow-sm",
7022
6999
  cellSz.cell,
7023
- disabled && "opacity-40 cursor-not-allowed",
7024
- highlightWeekends && isWeekend && "bg-linear-to-br from-destructive/5 via-destructive/3 to-background/90",
7025
- isToday2 && !selectedDay && "ring-2 ring-primary/50 border-primary/30 shadow-md",
7026
- selectedDay && "border-primary/60 bg-linear-to-br from-primary/10 via-primary/5 to-background/90 shadow-md",
7027
- !disabled && "backdrop-blur-sm"
7000
+ disabled && "opacity-30 cursor-not-allowed",
7001
+ highlightWeekends && isWeekend && "bg-destructive/5",
7002
+ isToday2 && !selectedDay && "ring-2 ring-primary/40 border-primary/50",
7003
+ selectedDay && "border-primary/60 bg-primary/5"
7028
7004
  ),
7029
7005
  children: [
7030
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center justify-between gap-2 px-3 py-2 border-b border-border/30 bg-muted/20", children: [
7031
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7032
- "button",
7033
- {
7034
- type: "button",
7035
- onClick: () => !disabled && handleClickDay(d),
7036
- disabled,
7037
- className: cn(
7038
- "inline-flex items-center justify-center rounded-xl px-2.5 py-1 font-semibold",
7039
- "transition-all duration-200",
7040
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",
7041
- cellSz.day,
7042
- selectedDay ? "bg-linear-to-br from-primary to-primary/90 text-primary-foreground shadow-sm" : "hover:bg-accent hover:text-accent-foreground hover:scale-105 active:scale-95",
7043
- disabled && "cursor-not-allowed hover:bg-transparent hover:scale-100",
7044
- isToday2 && !selectedDay && "ring-1 ring-primary/40 bg-primary/5"
7045
- ),
7046
- title: d.toDateString(),
7047
- children: d.getDate()
7048
- }
7049
- ),
7050
- dayEvents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7051
- "span",
7052
- {
7053
- className: cn(
7054
- "text-[11px] tabular-nums px-2 py-0.5 rounded-full font-medium",
7055
- "bg-primary/10 text-primary",
7056
- dayEvents.length > 5 && "bg-destructive/10 text-destructive"
7057
- ),
7058
- children: dayEvents.length
7059
- }
7060
- )
7006
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center justify-between px-2.5 py-1.5", children: [
7007
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: cn("font-semibold tabular-nums", cellSz.day, isToday2 && "text-primary", selectedDay && "text-primary"), children: d.getDate() }),
7008
+ dayEvents.length > 0 && showEventCount && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "text-[10px] px-1.5 py-0.5 rounded-md bg-muted/60 text-muted-foreground font-medium", children: dayEvents.length })
7061
7009
  ] }),
7062
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cn("space-y-1.5 p-2", dense ? "p-1.5" : "p-2"), children: [
7010
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-1 px-2 pb-2", children: [
7063
7011
  visibleEvents.map((e, i) => {
7064
7012
  const key = e.id ?? `${k}-${i}`;
7065
7013
  const node = renderEvent?.({ event: e, date: d });
7066
7014
  if (node) return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { children: node }, String(key));
7067
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
7015
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7068
7016
  "button",
7069
7017
  {
7070
7018
  type: "button",
7071
7019
  onClick: () => handleEventActivate(e, d, k, i),
7072
7020
  className: cn(
7073
- "group w-full text-left rounded-xl px-2.5 py-2",
7074
- "transition-all duration-200",
7075
- "hover:bg-accent/80 hover:shadow-sm hover:scale-[1.02] active:scale-[0.98]",
7076
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",
7077
- "text-xs flex items-center gap-2.5",
7078
- "border border-transparent hover:border-border/30"
7021
+ "group w-full text-left rounded-lg px-2.5 py-1.5",
7022
+ "transition-all duration-150",
7023
+ "hover:bg-accent/50 hover:shadow-sm hover:-translate-y-0.5",
7024
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",
7025
+ "text-sm font-medium",
7026
+ "border-l-[3px] bg-card/80"
7079
7027
  ),
7028
+ style: { borderLeftColor: e.color || "hsl(var(--primary))" },
7080
7029
  title: e.title,
7081
- children: [
7082
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
7083
- "span",
7084
- {
7085
- className: "h-2 w-2 rounded-full shrink-0 transition-transform duration-200 group-hover:scale-125",
7086
- style: { backgroundColor: e.color || "hsl(var(--primary))" }
7087
- }
7088
- ),
7089
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "truncate flex-1 font-medium group-hover:text-foreground", children: e.title ?? "Event" }),
7090
- showEventBadges && e.badge && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "shrink-0 rounded-full bg-muted/80 px-2 py-0.5 text-[10px] text-muted-foreground font-medium backdrop-blur-sm", children: e.badge })
7091
- ]
7030
+ children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center gap-2", children: [
7031
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "truncate flex-1", children: e.title ?? "Event" }),
7032
+ showEventBadges && e.badge && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "shrink-0 text-[10px] px-1.5 py-0.5 rounded bg-muted/60 text-muted-foreground", children: e.badge })
7033
+ ] })
7092
7034
  },
7093
7035
  String(key)
7094
7036
  );