@underverse-ui/underverse 0.2.117 → 0.2.119
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 +174 -90
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +176 -92
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6522,8 +6522,8 @@ var React26 = __toESM(require("react"), 1);
|
|
|
6522
6522
|
var import_lucide_react17 = require("lucide-react");
|
|
6523
6523
|
|
|
6524
6524
|
// ../../components/ui/Calendar.tsx
|
|
6525
|
-
var React24 = __toESM(require("react"), 1);
|
|
6526
6525
|
var import_lucide_react15 = require("lucide-react");
|
|
6526
|
+
var React24 = __toESM(require("react"), 1);
|
|
6527
6527
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
6528
6528
|
function startOfMonth(d) {
|
|
6529
6529
|
return new Date(d.getFullYear(), d.getMonth(), 1);
|
|
@@ -6768,9 +6768,9 @@ function Calendar2({
|
|
|
6768
6768
|
};
|
|
6769
6769
|
const cellSz = CELL_EVENT_STYLES[size];
|
|
6770
6770
|
const VARIANT_STYLES2 = {
|
|
6771
|
-
default: "border border-border rounded-2xl bg-card",
|
|
6772
|
-
bordered: "border-2 border-border rounded-2xl bg-card shadow-
|
|
6773
|
-
card: "border border-border rounded-3xl bg-card shadow-lg",
|
|
6771
|
+
default: "border border-border/60 rounded-2xl md:rounded-3xl bg-linear-to-br from-card via-card to-card/95 shadow-sm backdrop-blur-sm",
|
|
6772
|
+
bordered: "border-2 border-border/70 rounded-2xl md:rounded-3xl bg-linear-to-br from-card via-card to-card/95 shadow-md hover:shadow-lg transition-shadow duration-300",
|
|
6773
|
+
card: "border border-border/50 rounded-3xl bg-linear-to-br from-card via-background/95 to-card shadow-lg hover:shadow-xl transition-shadow duration-300 backdrop-blur-md",
|
|
6774
6774
|
minimal: "bg-transparent"
|
|
6775
6775
|
};
|
|
6776
6776
|
const weekDays = React24.useMemo(() => {
|
|
@@ -6782,7 +6782,7 @@ function Calendar2({
|
|
|
6782
6782
|
const monthLabel = labels?.month ? labels.month(monthDate) : monthDate.toLocaleDateString("en-US", { month: "long", year: "numeric" });
|
|
6783
6783
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { children: [
|
|
6784
6784
|
months > 1 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "flex items-center justify-center mb-2 text-sm font-semibold", children: monthLabel }),
|
|
6785
|
-
showWeekdays && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("grid grid-cols-7", sz.grid, "mb-
|
|
6785
|
+
showWeekdays && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("grid grid-cols-7", sz.grid, "mb-2 text-center text-muted-foreground/70 font-semibold uppercase tracking-wider"), children: weekdays.map((w) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn(sz.head, "transition-colors duration-200 hover:text-foreground"), children: w }, `${monthLabel}-${w}`)) }),
|
|
6786
6786
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("grid grid-cols-7", sz.grid), children: monthDays.map((d, idx) => {
|
|
6787
6787
|
const inMonth = d.getMonth() === monthDate.getMonth();
|
|
6788
6788
|
const isToday2 = isSameDay(d, today);
|
|
@@ -6801,18 +6801,21 @@ function Calendar2({
|
|
|
6801
6801
|
"div",
|
|
6802
6802
|
{
|
|
6803
6803
|
className: cn(
|
|
6804
|
-
"rounded-
|
|
6805
|
-
"
|
|
6804
|
+
"rounded-3xl border border-border/50 overflow-hidden",
|
|
6805
|
+
"bg-linear-to-br from-background via-background to-background/90",
|
|
6806
|
+
"transition-all duration-300",
|
|
6807
|
+
"hover:shadow-lg hover:border-border/70",
|
|
6806
6808
|
animate && "will-change-transform",
|
|
6807
6809
|
cellSz.cell,
|
|
6808
|
-
!inMonth && "opacity-
|
|
6809
|
-
disabled && "opacity-40",
|
|
6810
|
-
highlightWeekends && isWeekend && "bg-
|
|
6811
|
-
isToday2 && !selectedDay && "ring-
|
|
6812
|
-
selectedDay && "border-primary/
|
|
6810
|
+
!inMonth && "opacity-50",
|
|
6811
|
+
disabled && "opacity-40 cursor-not-allowed",
|
|
6812
|
+
highlightWeekends && isWeekend && "bg-linear-to-br from-destructive/5 via-destructive/3 to-background/90",
|
|
6813
|
+
isToday2 && !selectedDay && "ring-2 ring-primary/50 border-primary/30 shadow-md",
|
|
6814
|
+
selectedDay && "border-primary/60 bg-linear-to-br from-primary/10 via-primary/5 to-background/90 shadow-md",
|
|
6815
|
+
!disabled && "backdrop-blur-sm"
|
|
6813
6816
|
),
|
|
6814
6817
|
children: [
|
|
6815
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
6818
|
+
/* @__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: [
|
|
6816
6819
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6817
6820
|
"button",
|
|
6818
6821
|
{
|
|
@@ -6820,19 +6823,31 @@ function Calendar2({
|
|
|
6820
6823
|
onClick: () => !disabled && handleClickDay(d),
|
|
6821
6824
|
disabled,
|
|
6822
6825
|
className: cn(
|
|
6823
|
-
"inline-flex items-center justify-center rounded-
|
|
6824
|
-
"transition-
|
|
6826
|
+
"inline-flex items-center justify-center rounded-xl px-2.5 py-1 font-semibold",
|
|
6827
|
+
"transition-all duration-200",
|
|
6828
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",
|
|
6825
6829
|
cellSz.day,
|
|
6826
|
-
selectedDay ? "bg-primary text-primary-foreground" : "hover:bg-accent hover:text-accent-foreground",
|
|
6827
|
-
disabled && "cursor-not-allowed hover:bg-transparent"
|
|
6830
|
+
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",
|
|
6831
|
+
disabled && "cursor-not-allowed hover:bg-transparent hover:scale-100",
|
|
6832
|
+
isToday2 && !selectedDay && "ring-1 ring-primary/40 bg-primary/5"
|
|
6828
6833
|
),
|
|
6829
6834
|
title: d.toDateString(),
|
|
6830
6835
|
children: d.getDate()
|
|
6831
6836
|
}
|
|
6832
6837
|
),
|
|
6833
|
-
dayEvents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6838
|
+
dayEvents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6839
|
+
"span",
|
|
6840
|
+
{
|
|
6841
|
+
className: cn(
|
|
6842
|
+
"text-[11px] tabular-nums px-2 py-0.5 rounded-full font-medium",
|
|
6843
|
+
"bg-primary/10 text-primary",
|
|
6844
|
+
dayEvents.length > 5 && "bg-destructive/10 text-destructive"
|
|
6845
|
+
),
|
|
6846
|
+
children: dayEvents.length
|
|
6847
|
+
}
|
|
6848
|
+
)
|
|
6834
6849
|
] }),
|
|
6835
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cn("
|
|
6850
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cn("space-y-1.5 p-2", dense ? "p-1.5" : "p-2"), children: [
|
|
6836
6851
|
visibleEvents.map((e, i) => {
|
|
6837
6852
|
const key = e.id ?? `${k}-${i}`;
|
|
6838
6853
|
const node = renderEvent?.({ event: e, date: d });
|
|
@@ -6843,21 +6858,31 @@ function Calendar2({
|
|
|
6843
6858
|
type: "button",
|
|
6844
6859
|
onClick: () => handleEventActivate(e, d, k, i),
|
|
6845
6860
|
className: cn(
|
|
6846
|
-
"w-full text-left rounded-
|
|
6847
|
-
"transition-
|
|
6848
|
-
"
|
|
6861
|
+
"group w-full text-left rounded-xl px-2.5 py-2",
|
|
6862
|
+
"transition-all duration-200",
|
|
6863
|
+
"hover:bg-accent/80 hover:shadow-sm hover:scale-[1.02] active:scale-[0.98]",
|
|
6864
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",
|
|
6865
|
+
"text-xs flex items-center gap-2.5",
|
|
6866
|
+
"border border-transparent hover:border-border/30"
|
|
6849
6867
|
),
|
|
6850
6868
|
title: e.title,
|
|
6851
6869
|
children: [
|
|
6852
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6853
|
-
|
|
6854
|
-
|
|
6870
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6871
|
+
"span",
|
|
6872
|
+
{
|
|
6873
|
+
className: "h-2 w-2 rounded-full shrink-0 transition-transform duration-200 group-hover:scale-125",
|
|
6874
|
+
style: { backgroundColor: e.color || "hsl(var(--primary))" }
|
|
6875
|
+
}
|
|
6876
|
+
),
|
|
6877
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "truncate flex-1 font-medium group-hover:text-foreground", children: e.title ?? "Event" }),
|
|
6878
|
+
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 })
|
|
6855
6879
|
]
|
|
6856
6880
|
},
|
|
6857
6881
|
String(key)
|
|
6858
6882
|
);
|
|
6859
6883
|
}),
|
|
6860
|
-
hiddenCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "px-2 text-[11px] text-muted-foreground", children: [
|
|
6884
|
+
hiddenCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "px-2.5 py-1 text-[11px] text-muted-foreground/70 font-medium flex items-center gap-1.5", children: [
|
|
6885
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "h-1 w-1 rounded-full bg-muted-foreground/40" }),
|
|
6861
6886
|
"+",
|
|
6862
6887
|
hiddenCount,
|
|
6863
6888
|
" more"
|
|
@@ -6874,14 +6899,16 @@ function Calendar2({
|
|
|
6874
6899
|
onClick: () => handleClickDay(d),
|
|
6875
6900
|
disabled,
|
|
6876
6901
|
className: cn(
|
|
6877
|
-
"rounded-
|
|
6902
|
+
"rounded-xl flex items-center justify-center relative cursor-pointer",
|
|
6903
|
+
"transition-all duration-200 font-medium",
|
|
6904
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",
|
|
6878
6905
|
sz.day,
|
|
6879
|
-
!inMonth && "text-muted-foreground/
|
|
6906
|
+
!inMonth && "text-muted-foreground/50",
|
|
6880
6907
|
disabled && "opacity-40 cursor-not-allowed",
|
|
6881
|
-
highlightWeekends && isWeekend && "bg-
|
|
6882
|
-
isToday2 && !selectedDay && "ring-
|
|
6883
|
-
selectedDay && "bg-primary text-primary-foreground hover:
|
|
6884
|
-
!selectedDay && "hover:bg-accent hover:text-accent-foreground
|
|
6908
|
+
highlightWeekends && isWeekend && "bg-destructive/5",
|
|
6909
|
+
isToday2 && !selectedDay && "ring-2 ring-primary/60 bg-primary/5 font-bold",
|
|
6910
|
+
selectedDay && "bg-linear-to-br from-primary to-primary/90 text-primary-foreground shadow-md hover:shadow-lg hover:scale-105",
|
|
6911
|
+
!selectedDay && !disabled && "hover:bg-accent hover:text-accent-foreground hover:scale-105 active:scale-95"
|
|
6885
6912
|
),
|
|
6886
6913
|
title: d.toDateString(),
|
|
6887
6914
|
children: [
|
|
@@ -6924,24 +6951,34 @@ function Calendar2({
|
|
|
6924
6951
|
return nextStart > maxBound;
|
|
6925
6952
|
}, [display, view, weekStartsOn, maxBound]);
|
|
6926
6953
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cn("w-full", className), ...rest, children: [
|
|
6927
|
-
showHeader && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center justify-between mb-
|
|
6954
|
+
showHeader && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center justify-between mb-3 px-1", children: [
|
|
6928
6955
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6929
6956
|
"button",
|
|
6930
6957
|
{
|
|
6931
6958
|
onClick: () => goByView(-1),
|
|
6932
6959
|
disabled: prevDisabled,
|
|
6933
|
-
className: cn(
|
|
6960
|
+
className: cn(
|
|
6961
|
+
"p-2 rounded-full transition-all duration-200",
|
|
6962
|
+
"hover:bg-accent hover:shadow-sm active:scale-95",
|
|
6963
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",
|
|
6964
|
+
prevDisabled && "opacity-40 cursor-not-allowed hover:bg-transparent hover:shadow-none active:scale-100"
|
|
6965
|
+
),
|
|
6934
6966
|
"aria-label": labels?.prev || (display === "week" ? "Previous week" : "Previous month"),
|
|
6935
6967
|
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.ChevronLeft, { className: "h-4 w-4" })
|
|
6936
6968
|
}
|
|
6937
6969
|
),
|
|
6938
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "text-sm font-semibold", children: display === "week" ? `${labels?.month ? labels.month(weekDays[0]) : weekDays[0].toLocaleDateString("en-US", { month: "short" })} ${weekDays[0].getDate()} \u2013 ${labels?.month ? labels.month(weekDays[6]) : weekDays[6].toLocaleDateString("en-US", { month: "short" })} ${weekDays[6].getDate()}` : labels?.month ? labels.month(view) : view.toLocaleDateString("en-US", { month: "long", year: "numeric" }) }),
|
|
6970
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "text-sm font-semibold tracking-tight bg-linear-to-r from-foreground to-foreground/80 bg-clip-text", children: display === "week" ? `${labels?.month ? labels.month(weekDays[0]) : weekDays[0].toLocaleDateString("en-US", { month: "short" })} ${weekDays[0].getDate()} \u2013 ${labels?.month ? labels.month(weekDays[6]) : weekDays[6].toLocaleDateString("en-US", { month: "short" })} ${weekDays[6].getDate()}` : labels?.month ? labels.month(view) : view.toLocaleDateString("en-US", { month: "long", year: "numeric" }) }),
|
|
6939
6971
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6940
6972
|
"button",
|
|
6941
6973
|
{
|
|
6942
6974
|
onClick: () => goByView(1),
|
|
6943
6975
|
disabled: nextDisabled,
|
|
6944
|
-
className: cn(
|
|
6976
|
+
className: cn(
|
|
6977
|
+
"p-2 rounded-full transition-all duration-200",
|
|
6978
|
+
"hover:bg-accent hover:shadow-sm active:scale-95",
|
|
6979
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",
|
|
6980
|
+
nextDisabled && "opacity-40 cursor-not-allowed hover:bg-transparent hover:shadow-none active:scale-100"
|
|
6981
|
+
),
|
|
6945
6982
|
"aria-label": labels?.next || (display === "week" ? "Next week" : "Next month"),
|
|
6946
6983
|
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react15.ChevronRight, { className: "h-4 w-4" })
|
|
6947
6984
|
}
|
|
@@ -6967,16 +7004,19 @@ function Calendar2({
|
|
|
6967
7004
|
"div",
|
|
6968
7005
|
{
|
|
6969
7006
|
className: cn(
|
|
6970
|
-
"rounded-
|
|
6971
|
-
"
|
|
7007
|
+
"rounded-3xl border border-border/50 overflow-hidden",
|
|
7008
|
+
"bg-linear-to-br from-background via-background to-background/90",
|
|
7009
|
+
"transition-all duration-300",
|
|
7010
|
+
"hover:shadow-lg hover:border-border/70",
|
|
6972
7011
|
cellSz.cell,
|
|
6973
|
-
disabled && "opacity-40",
|
|
6974
|
-
highlightWeekends && isWeekend && "bg-
|
|
6975
|
-
isToday2 && !selectedDay && "ring-
|
|
6976
|
-
selectedDay && "border-primary/
|
|
7012
|
+
disabled && "opacity-40 cursor-not-allowed",
|
|
7013
|
+
highlightWeekends && isWeekend && "bg-linear-to-br from-destructive/5 via-destructive/3 to-background/90",
|
|
7014
|
+
isToday2 && !selectedDay && "ring-2 ring-primary/50 border-primary/30 shadow-md",
|
|
7015
|
+
selectedDay && "border-primary/60 bg-linear-to-br from-primary/10 via-primary/5 to-background/90 shadow-md",
|
|
7016
|
+
!disabled && "backdrop-blur-sm"
|
|
6977
7017
|
),
|
|
6978
7018
|
children: [
|
|
6979
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
|
|
7019
|
+
/* @__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: [
|
|
6980
7020
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
6981
7021
|
"button",
|
|
6982
7022
|
{
|
|
@@ -6984,19 +7024,31 @@ function Calendar2({
|
|
|
6984
7024
|
onClick: () => !disabled && handleClickDay(d),
|
|
6985
7025
|
disabled,
|
|
6986
7026
|
className: cn(
|
|
6987
|
-
"inline-flex items-center justify-center rounded-
|
|
6988
|
-
"transition-
|
|
7027
|
+
"inline-flex items-center justify-center rounded-xl px-2.5 py-1 font-semibold",
|
|
7028
|
+
"transition-all duration-200",
|
|
7029
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",
|
|
6989
7030
|
cellSz.day,
|
|
6990
|
-
selectedDay ? "bg-primary text-primary-foreground" : "hover:bg-accent hover:text-accent-foreground",
|
|
6991
|
-
disabled && "cursor-not-allowed hover:bg-transparent"
|
|
7031
|
+
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",
|
|
7032
|
+
disabled && "cursor-not-allowed hover:bg-transparent hover:scale-100",
|
|
7033
|
+
isToday2 && !selectedDay && "ring-1 ring-primary/40 bg-primary/5"
|
|
6992
7034
|
),
|
|
6993
7035
|
title: d.toDateString(),
|
|
6994
7036
|
children: d.getDate()
|
|
6995
7037
|
}
|
|
6996
7038
|
),
|
|
6997
|
-
dayEvents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
7039
|
+
dayEvents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
7040
|
+
"span",
|
|
7041
|
+
{
|
|
7042
|
+
className: cn(
|
|
7043
|
+
"text-[11px] tabular-nums px-2 py-0.5 rounded-full font-medium",
|
|
7044
|
+
"bg-primary/10 text-primary",
|
|
7045
|
+
dayEvents.length > 5 && "bg-destructive/10 text-destructive"
|
|
7046
|
+
),
|
|
7047
|
+
children: dayEvents.length
|
|
7048
|
+
}
|
|
7049
|
+
)
|
|
6998
7050
|
] }),
|
|
6999
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cn("
|
|
7051
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: cn("space-y-1.5 p-2", dense ? "p-1.5" : "p-2"), children: [
|
|
7000
7052
|
visibleEvents.map((e, i) => {
|
|
7001
7053
|
const key = e.id ?? `${k}-${i}`;
|
|
7002
7054
|
const node = renderEvent?.({ event: e, date: d });
|
|
@@ -7007,21 +7059,31 @@ function Calendar2({
|
|
|
7007
7059
|
type: "button",
|
|
7008
7060
|
onClick: () => handleEventActivate(e, d, k, i),
|
|
7009
7061
|
className: cn(
|
|
7010
|
-
"w-full text-left rounded-
|
|
7011
|
-
"transition-
|
|
7012
|
-
"
|
|
7062
|
+
"group w-full text-left rounded-xl px-2.5 py-2",
|
|
7063
|
+
"transition-all duration-200",
|
|
7064
|
+
"hover:bg-accent/80 hover:shadow-sm hover:scale-[1.02] active:scale-[0.98]",
|
|
7065
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",
|
|
7066
|
+
"text-xs flex items-center gap-2.5",
|
|
7067
|
+
"border border-transparent hover:border-border/30"
|
|
7013
7068
|
),
|
|
7014
7069
|
title: e.title,
|
|
7015
7070
|
children: [
|
|
7016
|
-
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
7017
|
-
|
|
7018
|
-
|
|
7071
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
7072
|
+
"span",
|
|
7073
|
+
{
|
|
7074
|
+
className: "h-2 w-2 rounded-full shrink-0 transition-transform duration-200 group-hover:scale-125",
|
|
7075
|
+
style: { backgroundColor: e.color || "hsl(var(--primary))" }
|
|
7076
|
+
}
|
|
7077
|
+
),
|
|
7078
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "truncate flex-1 font-medium group-hover:text-foreground", children: e.title ?? "Event" }),
|
|
7079
|
+
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 })
|
|
7019
7080
|
]
|
|
7020
7081
|
},
|
|
7021
7082
|
String(key)
|
|
7022
7083
|
);
|
|
7023
7084
|
}),
|
|
7024
|
-
hiddenCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "px-2 text-[11px] text-muted-foreground", children: [
|
|
7085
|
+
hiddenCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "px-2.5 py-1 text-[11px] text-muted-foreground/70 font-medium flex items-center gap-1.5", children: [
|
|
7086
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "h-1 w-1 rounded-full bg-muted-foreground/40" }),
|
|
7025
7087
|
"+",
|
|
7026
7088
|
hiddenCount,
|
|
7027
7089
|
" more"
|
|
@@ -7049,7 +7111,14 @@ function Calendar2({
|
|
|
7049
7111
|
title: d.toDateString(),
|
|
7050
7112
|
children: [
|
|
7051
7113
|
d.getDate(),
|
|
7052
|
-
dayEvents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "absolute -bottom-1 inline-flex gap-0.5", children: dayEvents.slice(0, 3).map((e, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
7114
|
+
dayEvents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "absolute -bottom-1 inline-flex gap-0.5", children: dayEvents.slice(0, 3).map((e, i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
7115
|
+
"span",
|
|
7116
|
+
{
|
|
7117
|
+
className: "h-1.5 w-1.5 rounded-full",
|
|
7118
|
+
style: { backgroundColor: e.color || "hsl(var(--primary))" }
|
|
7119
|
+
},
|
|
7120
|
+
String(e.id ?? i)
|
|
7121
|
+
)) })
|
|
7053
7122
|
]
|
|
7054
7123
|
},
|
|
7055
7124
|
`wd-${idx}`
|
|
@@ -19657,7 +19726,7 @@ var ToolbarButton = import_react44.default.forwardRef(({ onClick, onMouseDown, a
|
|
|
19657
19726
|
}
|
|
19658
19727
|
);
|
|
19659
19728
|
if (title) {
|
|
19660
|
-
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Tooltip, { content: title, placement: "top", delay: { open:
|
|
19729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Tooltip, { content: title, placement: "top", delay: { open: 200, close: 0 }, children: button });
|
|
19661
19730
|
}
|
|
19662
19731
|
return button;
|
|
19663
19732
|
});
|
|
@@ -19695,15 +19764,7 @@ var EditorToolbar = ({
|
|
|
19695
19764
|
if (variant === "minimal") {
|
|
19696
19765
|
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex items-center gap-1 p-2 border-b bg-muted/30", children: [
|
|
19697
19766
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react40.Bold, { className: "w-4 h-4" }) }),
|
|
19698
|
-
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
19699
|
-
ToolbarButton,
|
|
19700
|
-
{
|
|
19701
|
-
onClick: () => editor.chain().focus().toggleItalic().run(),
|
|
19702
|
-
active: editor.isActive("italic"),
|
|
19703
|
-
title: t("toolbar.italic"),
|
|
19704
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react40.Italic, { className: "w-4 h-4" })
|
|
19705
|
-
}
|
|
19706
|
-
),
|
|
19767
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react40.Italic, { className: "w-4 h-4" }) }),
|
|
19707
19768
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
19708
19769
|
ToolbarButton,
|
|
19709
19770
|
{
|
|
@@ -19725,7 +19786,15 @@ var EditorToolbar = ({
|
|
|
19725
19786
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react40.ChevronDown, { className: "w-3 h-3" })
|
|
19726
19787
|
] }),
|
|
19727
19788
|
children: [
|
|
19728
|
-
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
19789
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
19790
|
+
DropdownMenuItem,
|
|
19791
|
+
{
|
|
19792
|
+
icon: import_lucide_react40.Type,
|
|
19793
|
+
label: t("toolbar.normal"),
|
|
19794
|
+
onClick: () => editor.chain().focus().setParagraph().run(),
|
|
19795
|
+
active: editor.isActive("paragraph")
|
|
19796
|
+
}
|
|
19797
|
+
),
|
|
19729
19798
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
19730
19799
|
DropdownMenuItem,
|
|
19731
19800
|
{
|
|
@@ -19761,15 +19830,7 @@ var EditorToolbar = ({
|
|
|
19761
19830
|
),
|
|
19762
19831
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ToolbarDivider, {}),
|
|
19763
19832
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleBold().run(), active: editor.isActive("bold"), title: t("toolbar.bold"), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react40.Bold, { className: "w-4 h-4" }) }),
|
|
19764
|
-
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
19765
|
-
ToolbarButton,
|
|
19766
|
-
{
|
|
19767
|
-
onClick: () => editor.chain().focus().toggleItalic().run(),
|
|
19768
|
-
active: editor.isActive("italic"),
|
|
19769
|
-
title: t("toolbar.italic"),
|
|
19770
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react40.Italic, { className: "w-4 h-4" })
|
|
19771
|
-
}
|
|
19772
|
-
),
|
|
19833
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleItalic().run(), active: editor.isActive("italic"), title: t("toolbar.italic"), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react40.Italic, { className: "w-4 h-4" }) }),
|
|
19773
19834
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
19774
19835
|
ToolbarButton,
|
|
19775
19836
|
{
|
|
@@ -19779,15 +19840,7 @@ var EditorToolbar = ({
|
|
|
19779
19840
|
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react40.Underline, { className: "w-4 h-4" })
|
|
19780
19841
|
}
|
|
19781
19842
|
),
|
|
19782
|
-
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
19783
|
-
ToolbarButton,
|
|
19784
|
-
{
|
|
19785
|
-
onClick: () => editor.chain().focus().toggleStrike().run(),
|
|
19786
|
-
active: editor.isActive("strike"),
|
|
19787
|
-
title: t("toolbar.strike"),
|
|
19788
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react40.Strikethrough, { className: "w-4 h-4" })
|
|
19789
|
-
}
|
|
19790
|
-
),
|
|
19843
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleStrike().run(), active: editor.isActive("strike"), title: t("toolbar.strike"), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react40.Strikethrough, { className: "w-4 h-4" }) }),
|
|
19791
19844
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().toggleCode().run(), active: editor.isActive("code"), title: t("toolbar.code"), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react40.Code, { className: "w-4 h-4" }) }),
|
|
19792
19845
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ToolbarDivider, {}),
|
|
19793
19846
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
@@ -20020,7 +20073,14 @@ var EditorToolbar = ({
|
|
|
20020
20073
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react40.ChevronDown, { className: "w-3 h-3" })
|
|
20021
20074
|
] }),
|
|
20022
20075
|
children: [
|
|
20023
|
-
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
20076
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
20077
|
+
DropdownMenuItem,
|
|
20078
|
+
{
|
|
20079
|
+
icon: import_lucide_react40.Table,
|
|
20080
|
+
label: t("tableMenu.insert3x3"),
|
|
20081
|
+
onClick: () => editor.chain().focus().insertTable({ rows: 3, cols: 3, withHeaderRow: true }).run()
|
|
20082
|
+
}
|
|
20083
|
+
),
|
|
20024
20084
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "my-1 border-t" }),
|
|
20025
20085
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
20026
20086
|
DropdownMenuItem,
|
|
@@ -20068,7 +20128,15 @@ var EditorToolbar = ({
|
|
|
20068
20128
|
disabled: !editor.can().deleteColumn()
|
|
20069
20129
|
}
|
|
20070
20130
|
),
|
|
20071
|
-
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
20131
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
20132
|
+
DropdownMenuItem,
|
|
20133
|
+
{
|
|
20134
|
+
icon: import_lucide_react40.Trash2,
|
|
20135
|
+
label: t("tableMenu.deleteRow"),
|
|
20136
|
+
onClick: () => editor.chain().focus().deleteRow().run(),
|
|
20137
|
+
disabled: !editor.can().deleteRow()
|
|
20138
|
+
}
|
|
20139
|
+
),
|
|
20072
20140
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
20073
20141
|
DropdownMenuItem,
|
|
20074
20142
|
{
|
|
@@ -20082,8 +20150,24 @@ var EditorToolbar = ({
|
|
|
20082
20150
|
}
|
|
20083
20151
|
),
|
|
20084
20152
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ToolbarDivider, {}),
|
|
20085
|
-
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
20086
|
-
|
|
20153
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
20154
|
+
ToolbarButton,
|
|
20155
|
+
{
|
|
20156
|
+
onClick: () => editor.chain().focus().toggleSubscript().run(),
|
|
20157
|
+
active: editor.isActive("subscript"),
|
|
20158
|
+
title: t("toolbar.subscript"),
|
|
20159
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react40.Subscript, { className: "w-4 h-4" })
|
|
20160
|
+
}
|
|
20161
|
+
),
|
|
20162
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
20163
|
+
ToolbarButton,
|
|
20164
|
+
{
|
|
20165
|
+
onClick: () => editor.chain().focus().toggleSuperscript().run(),
|
|
20166
|
+
active: editor.isActive("superscript"),
|
|
20167
|
+
title: t("toolbar.superscript"),
|
|
20168
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react40.Superscript, { className: "w-4 h-4" })
|
|
20169
|
+
}
|
|
20170
|
+
),
|
|
20087
20171
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ToolbarDivider, {}),
|
|
20088
20172
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().undo().run(), disabled: !editor.can().undo(), title: t("toolbar.undo"), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react40.Undo, { className: "w-4 h-4" }) }),
|
|
20089
20173
|
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(ToolbarButton, { onClick: () => editor.chain().focus().redo().run(), disabled: !editor.can().redo(), title: t("toolbar.redo"), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_lucide_react40.Redo, { className: "w-4 h-4" }) })
|