@moontra/moonui-pro 2.27.5 → 2.27.7
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.d.ts +11 -11
- package/dist/index.global.js +63 -63
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +729 -486
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4838,18 +4838,27 @@ var overlayVariants = cva(
|
|
|
4838
4838
|
}
|
|
4839
4839
|
}
|
|
4840
4840
|
);
|
|
4841
|
-
var MoonUIDialogOverlayPro = React67.forwardRef(
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
className
|
|
4849
|
-
),
|
|
4841
|
+
var MoonUIDialogOverlayPro = React67.forwardRef(
|
|
4842
|
+
({
|
|
4843
|
+
className,
|
|
4844
|
+
variant,
|
|
4845
|
+
blurAmount,
|
|
4846
|
+
animation,
|
|
4847
|
+
customBackdrop = false,
|
|
4850
4848
|
...props
|
|
4851
|
-
}
|
|
4852
|
-
|
|
4849
|
+
}, ref) => /* @__PURE__ */ jsx(
|
|
4850
|
+
DialogPrimitive.Overlay,
|
|
4851
|
+
{
|
|
4852
|
+
ref,
|
|
4853
|
+
className: cn(
|
|
4854
|
+
overlayVariants({ variant, blurAmount, animation }),
|
|
4855
|
+
customBackdrop && "before:absolute before:inset-0 before:bg-gradient-to-br before:from-transparent before:via-primary/10 before:to-transparent",
|
|
4856
|
+
className
|
|
4857
|
+
),
|
|
4858
|
+
...props
|
|
4859
|
+
}
|
|
4860
|
+
)
|
|
4861
|
+
);
|
|
4853
4862
|
MoonUIDialogOverlayPro.displayName = DialogPrimitive.Overlay.displayName;
|
|
4854
4863
|
var dialogContentVariants = cva(
|
|
4855
4864
|
"fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg",
|
|
@@ -4976,14 +4985,6 @@ var MoonUIDialogContentPro = React67.forwardRef(
|
|
|
4976
4985
|
type: "tween",
|
|
4977
4986
|
duration
|
|
4978
4987
|
};
|
|
4979
|
-
{
|
|
4980
|
-
console.log("Dialog Animation Debug:", {
|
|
4981
|
-
animation,
|
|
4982
|
-
duration,
|
|
4983
|
-
enableSpringPhysics,
|
|
4984
|
-
springConfig
|
|
4985
|
-
});
|
|
4986
|
-
}
|
|
4987
4988
|
switch (animation) {
|
|
4988
4989
|
case "bounce":
|
|
4989
4990
|
return {
|
|
@@ -5008,7 +5009,10 @@ var MoonUIDialogContentPro = React67.forwardRef(
|
|
|
5008
5009
|
initial: { scale: 0, opacity: 0 },
|
|
5009
5010
|
animate: { scale: 1, opacity: 1 },
|
|
5010
5011
|
exit: { scale: 0, opacity: 0 },
|
|
5011
|
-
transition: {
|
|
5012
|
+
transition: {
|
|
5013
|
+
...springConfig,
|
|
5014
|
+
duration: duration * 0.8
|
|
5015
|
+
}
|
|
5012
5016
|
};
|
|
5013
5017
|
case "fade":
|
|
5014
5018
|
return {
|
|
@@ -5079,14 +5083,20 @@ var MoonUIDialogContentPro = React67.forwardRef(
|
|
|
5079
5083
|
initial: { rotateX: -90, opacity: 0 },
|
|
5080
5084
|
animate: { rotateX: 0, opacity: 1 },
|
|
5081
5085
|
exit: { rotateX: 90, opacity: 0 },
|
|
5082
|
-
transition: {
|
|
5086
|
+
transition: {
|
|
5087
|
+
...springConfig,
|
|
5088
|
+
duration: duration * 1.2
|
|
5089
|
+
}
|
|
5083
5090
|
};
|
|
5084
5091
|
case "swirl":
|
|
5085
5092
|
return {
|
|
5086
5093
|
initial: { rotate: -540, scale: 0, opacity: 0 },
|
|
5087
5094
|
animate: { rotate: 0, scale: 1, opacity: 1 },
|
|
5088
5095
|
exit: { rotate: 540, scale: 0, opacity: 0 },
|
|
5089
|
-
transition: {
|
|
5096
|
+
transition: {
|
|
5097
|
+
...springConfig,
|
|
5098
|
+
duration: duration * 1.5
|
|
5099
|
+
}
|
|
5090
5100
|
};
|
|
5091
5101
|
case "rotateScale":
|
|
5092
5102
|
return {
|
|
@@ -5107,7 +5117,9 @@ var MoonUIDialogContentPro = React67.forwardRef(
|
|
|
5107
5117
|
const handleClose = async () => {
|
|
5108
5118
|
if (closeAnimation) {
|
|
5109
5119
|
setIsClosing(true);
|
|
5110
|
-
await new Promise(
|
|
5120
|
+
await new Promise(
|
|
5121
|
+
(resolve) => setTimeout(resolve, animationDuration * 1e3)
|
|
5122
|
+
);
|
|
5111
5123
|
}
|
|
5112
5124
|
if (onClose) {
|
|
5113
5125
|
onClose();
|
|
@@ -5115,19 +5127,6 @@ var MoonUIDialogContentPro = React67.forwardRef(
|
|
|
5115
5127
|
};
|
|
5116
5128
|
const animationVariants2 = getAnimationVariants();
|
|
5117
5129
|
const displayIcon = confirmationType ? getConfirmationIcon() : icon;
|
|
5118
|
-
React67.useEffect(() => {
|
|
5119
|
-
if (typeof window !== "undefined" && true) {
|
|
5120
|
-
console.log("\u{1F3AD} Dialog Animation Debug:", {
|
|
5121
|
-
animation,
|
|
5122
|
-
size: size4,
|
|
5123
|
-
variant,
|
|
5124
|
-
enableSpringPhysics,
|
|
5125
|
-
animationVariants: animationVariants2,
|
|
5126
|
-
hasAnimation: !!animation,
|
|
5127
|
-
animationType: typeof animation
|
|
5128
|
-
});
|
|
5129
|
-
}
|
|
5130
|
-
}, [animation, size4, variant, enableSpringPhysics]);
|
|
5131
5130
|
return /* @__PURE__ */ jsxs(MoonUIDialogPortal, { children: [
|
|
5132
5131
|
/* @__PURE__ */ jsx(
|
|
5133
5132
|
MoonUIDialogOverlayPro,
|
|
@@ -5192,29 +5191,53 @@ var MoonUIDialogContentPro = React67.forwardRef(
|
|
|
5192
5191
|
className
|
|
5193
5192
|
),
|
|
5194
5193
|
children: [
|
|
5195
|
-
(title || description || displayIcon || loading || success) && /* @__PURE__ */ jsxs(
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5194
|
+
(title || description || displayIcon || loading || success) && /* @__PURE__ */ jsxs(
|
|
5195
|
+
MoonUIDialogHeaderPro,
|
|
5196
|
+
{
|
|
5197
|
+
className: cn(
|
|
5198
|
+
"flex gap-4",
|
|
5199
|
+
confirmationType && "items-start"
|
|
5200
|
+
),
|
|
5201
|
+
children: [
|
|
5202
|
+
(displayIcon || loading || success) && /* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center justify-center", children: [
|
|
5203
|
+
loading && /* @__PURE__ */ jsx(Loader2, { className: "h-5 w-5 animate-spin text-primary" }),
|
|
5204
|
+
success && !loading && /* @__PURE__ */ jsx(Check, { className: "h-5 w-5 text-success" }),
|
|
5205
|
+
!loading && !success && displayIcon && /* @__PURE__ */ jsx(
|
|
5206
|
+
"span",
|
|
5207
|
+
{
|
|
5208
|
+
className: cn(
|
|
5209
|
+
confirmationType ? "" : "text-primary"
|
|
5210
|
+
),
|
|
5211
|
+
children: displayIcon
|
|
5212
|
+
}
|
|
5213
|
+
)
|
|
5214
|
+
] }),
|
|
5215
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
5216
|
+
title && /* @__PURE__ */ jsx(
|
|
5217
|
+
MoonUIDialogTitlePro,
|
|
5218
|
+
{
|
|
5219
|
+
className: cn(
|
|
5220
|
+
confirmationType === "error" && "text-red-600 dark:text-red-400",
|
|
5221
|
+
confirmationType === "warning" && "text-yellow-600 dark:text-yellow-400",
|
|
5222
|
+
confirmationType === "success" && "text-green-600 dark:text-green-400",
|
|
5223
|
+
confirmationType === "info" && "text-blue-600 dark:text-blue-400"
|
|
5224
|
+
),
|
|
5225
|
+
children: title
|
|
5226
|
+
}
|
|
5227
|
+
),
|
|
5228
|
+
description && /* @__PURE__ */ jsx(MoonUIDialogDescriptionPro, { children: description })
|
|
5229
|
+
] })
|
|
5230
|
+
]
|
|
5231
|
+
}
|
|
5232
|
+
),
|
|
5216
5233
|
children,
|
|
5217
|
-
hasFormValidation && /* @__PURE__ */ jsx(
|
|
5234
|
+
hasFormValidation && /* @__PURE__ */ jsx(
|
|
5235
|
+
"div",
|
|
5236
|
+
{
|
|
5237
|
+
id: "dialog-validation-messages",
|
|
5238
|
+
className: "mt-2 min-h-[20px]"
|
|
5239
|
+
}
|
|
5240
|
+
),
|
|
5218
5241
|
!hideCloseButton && /* @__PURE__ */ jsxs(
|
|
5219
5242
|
DialogPrimitive.Close,
|
|
5220
5243
|
{
|
|
@@ -5292,28 +5315,36 @@ var MoonUIDialogDescriptionPro = React67.forwardRef(({ className, ...props }, re
|
|
|
5292
5315
|
}
|
|
5293
5316
|
));
|
|
5294
5317
|
MoonUIDialogDescriptionPro.displayName = DialogPrimitive.Description.displayName;
|
|
5295
|
-
var MoonUIDialogFormPro = React67.forwardRef(
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5318
|
+
var MoonUIDialogFormPro = React67.forwardRef(
|
|
5319
|
+
({
|
|
5320
|
+
className,
|
|
5321
|
+
enableValidation = false,
|
|
5322
|
+
onSubmit,
|
|
5323
|
+
isSubmitting = false,
|
|
5324
|
+
...props
|
|
5325
|
+
}, ref) => {
|
|
5326
|
+
const handleSubmit = async (e) => {
|
|
5327
|
+
e.preventDefault();
|
|
5328
|
+
if (onSubmit && !isSubmitting) {
|
|
5329
|
+
await onSubmit(e);
|
|
5330
|
+
}
|
|
5331
|
+
};
|
|
5332
|
+
return /* @__PURE__ */ jsx(
|
|
5333
|
+
"form",
|
|
5334
|
+
{
|
|
5335
|
+
ref,
|
|
5336
|
+
className: cn(
|
|
5337
|
+
"flex flex-col gap-4",
|
|
5338
|
+
isSubmitting && "pointer-events-none opacity-75",
|
|
5339
|
+
className
|
|
5340
|
+
),
|
|
5341
|
+
onSubmit: handleSubmit,
|
|
5342
|
+
noValidate: !enableValidation,
|
|
5343
|
+
...props
|
|
5344
|
+
}
|
|
5345
|
+
);
|
|
5346
|
+
}
|
|
5347
|
+
);
|
|
5317
5348
|
MoonUIDialogFormPro.displayName = "MoonUIDialogFormPro";
|
|
5318
5349
|
var MoonUITooltipProviderPro = TooltipPrimitive.Provider;
|
|
5319
5350
|
var tooltipVariants = cva(
|
|
@@ -16851,7 +16882,7 @@ function CalendarInternal({
|
|
|
16851
16882
|
return actualDay !== 0 && actualDay !== 6;
|
|
16852
16883
|
});
|
|
16853
16884
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16854
|
-
/* @__PURE__ */ jsx(MoonUICardPro, { className: cn("w-full", className), style: { minHeight: height ? `${height}px` : "85vh"
|
|
16885
|
+
/* @__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: [
|
|
16855
16886
|
isSidebarOpen && /* @__PURE__ */ jsx(
|
|
16856
16887
|
"div",
|
|
16857
16888
|
{
|
|
@@ -16860,13 +16891,13 @@ function CalendarInternal({
|
|
|
16860
16891
|
}
|
|
16861
16892
|
),
|
|
16862
16893
|
/* @__PURE__ */ jsx("aside", { className: cn(
|
|
16863
|
-
"bg-card border-r transition-all duration-300 flex-shrink-0",
|
|
16894
|
+
"bg-card border-r transition-all duration-300 flex-shrink-0 min-h-full",
|
|
16864
16895
|
// Desktop styles - always visible on desktop
|
|
16865
|
-
isDesktopSidebarCollapsed ? "w-0" : "w-64",
|
|
16896
|
+
isDesktopSidebarCollapsed ? "w-0 overflow-hidden" : "w-64",
|
|
16866
16897
|
// Mobile styles - slide in/out
|
|
16867
16898
|
"lg:relative",
|
|
16868
16899
|
isSidebarOpen ? "absolute inset-y-0 left-0 z-50 w-64" : "hidden lg:block"
|
|
16869
|
-
), children: /* @__PURE__ */ jsxs("div", { className: "w-64 h-full flex flex-col", children: [
|
|
16900
|
+
), children: /* @__PURE__ */ jsxs("div", { className: "w-64 min-h-full flex flex-col", children: [
|
|
16870
16901
|
/* @__PURE__ */ jsx("div", { className: "p-4 border-b", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
16871
16902
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm", children: "Calendar" }),
|
|
16872
16903
|
/* @__PURE__ */ jsx(
|
|
@@ -17017,10 +17048,10 @@ function CalendarInternal({
|
|
|
17017
17048
|
)
|
|
17018
17049
|
] })
|
|
17019
17050
|
] }) }),
|
|
17020
|
-
/* @__PURE__ */ jsx(MoonUICardContentPro, { className: "flex-1
|
|
17021
|
-
view === "month" && /* @__PURE__ */ jsxs("div", { className: "
|
|
17022
|
-
visibleDaysOfWeek.map((day) => /* @__PURE__ */ jsx("div", { className: "p-
|
|
17023
|
-
filteredDays.map((date, index2) => {
|
|
17051
|
+
/* @__PURE__ */ jsx(MoonUICardContentPro, { className: "flex-1 flex flex-col p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col", children: [
|
|
17052
|
+
view === "month" && /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-h-[600px]", children: [
|
|
17053
|
+
/* @__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)) }),
|
|
17054
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 gap-1 flex-1", style: { gridAutoRows: "minmax(100px, 1fr)" }, children: filteredDays.map((date, index2) => {
|
|
17024
17055
|
const dayEvents = getEventsForDate(date);
|
|
17025
17056
|
const isCurrentMonthDate = isCurrentMonth(date);
|
|
17026
17057
|
const isTodayDate = isToday2(date);
|
|
@@ -17030,7 +17061,7 @@ function CalendarInternal({
|
|
|
17030
17061
|
"div",
|
|
17031
17062
|
{
|
|
17032
17063
|
className: cn(
|
|
17033
|
-
"
|
|
17064
|
+
"p-3 border border-border/50 rounded-lg cursor-pointer hover:bg-muted/50 transition-colors text-xs flex flex-col overflow-hidden",
|
|
17034
17065
|
!isCurrentMonthDate && "text-muted-foreground bg-muted/20",
|
|
17035
17066
|
isTodayDate && highlightToday && "bg-primary/10 border-primary/50",
|
|
17036
17067
|
isSelectedDate && "bg-primary/20 border-primary",
|
|
@@ -17041,78 +17072,96 @@ function CalendarInternal({
|
|
|
17041
17072
|
onDragOver: (e) => handleDateDragOver(date, e),
|
|
17042
17073
|
onDrop: (e) => handleDateDrop(date, e),
|
|
17043
17074
|
children: [
|
|
17044
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-
|
|
17075
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
17045
17076
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
17046
17077
|
/* @__PURE__ */ jsx("span", { className: cn(
|
|
17047
|
-
"text-
|
|
17048
|
-
isTodayDate && "text-primary
|
|
17049
|
-
isHoliday(date) && "text-orange-600 dark:text-orange-400"
|
|
17078
|
+
"text-base font-bold",
|
|
17079
|
+
isTodayDate && "text-primary",
|
|
17080
|
+
isHoliday(date) && "text-orange-600 dark:text-orange-400",
|
|
17081
|
+
!isCurrentMonthDate && "opacity-40"
|
|
17050
17082
|
), children: date.getDate() }),
|
|
17051
17083
|
isHoliday(date) && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-orange-600 dark:text-orange-400 truncate", children: getHolidayName(date) })
|
|
17052
17084
|
] }),
|
|
17053
17085
|
dayEvents.length > 0 && /* @__PURE__ */ jsx(MoonUIBadgePro, { variant: "secondary", className: "text-xs px-1", children: dayEvents.length })
|
|
17054
17086
|
] }),
|
|
17055
|
-
/* @__PURE__ */
|
|
17056
|
-
|
|
17057
|
-
|
|
17058
|
-
|
|
17059
|
-
|
|
17060
|
-
|
|
17061
|
-
|
|
17062
|
-
|
|
17063
|
-
|
|
17064
|
-
|
|
17065
|
-
|
|
17066
|
-
|
|
17067
|
-
|
|
17068
|
-
|
|
17069
|
-
|
|
17070
|
-
|
|
17071
|
-
|
|
17072
|
-
|
|
17073
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center
|
|
17074
|
-
|
|
17075
|
-
|
|
17076
|
-
|
|
17087
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-0.5", children: [
|
|
17088
|
+
dayEvents.slice(0, 3).map((event) => /* @__PURE__ */ jsxs(
|
|
17089
|
+
"div",
|
|
17090
|
+
{
|
|
17091
|
+
className: cn(
|
|
17092
|
+
"text-[11px] px-1.5 py-0.5 rounded text-white cursor-move group relative select-none block w-full truncate",
|
|
17093
|
+
event.color || EVENT_COLORS[event.type || "event"],
|
|
17094
|
+
event.priority && PRIORITY_COLORS[event.priority],
|
|
17095
|
+
event.status && STATUS_STYLES[event.status]
|
|
17096
|
+
),
|
|
17097
|
+
draggable: !disabled && enableDragDrop,
|
|
17098
|
+
onClick: (e) => handleEventClick(event, e),
|
|
17099
|
+
onDragStart: (e) => handleEventDragStart(event, e),
|
|
17100
|
+
onDragEnd: handleEventDragEnd,
|
|
17101
|
+
style: {
|
|
17102
|
+
backgroundColor: event.color || void 0
|
|
17103
|
+
},
|
|
17104
|
+
children: [
|
|
17105
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
17106
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 flex-1 min-w-0", children: [
|
|
17107
|
+
event.isPrivate && /* @__PURE__ */ jsx(Lock, { className: "h-3 w-3 flex-shrink-0" }),
|
|
17108
|
+
event.recurring && /* @__PURE__ */ jsx(Repeat, { className: "h-3 w-3 flex-shrink-0" }),
|
|
17109
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: event.title })
|
|
17110
|
+
] }),
|
|
17111
|
+
showEventDetails && /* @__PURE__ */ jsxs("div", { className: "hidden group-hover:flex items-center gap-1 ml-1", children: [
|
|
17112
|
+
/* @__PURE__ */ jsx(
|
|
17113
|
+
MoonUIButtonPro,
|
|
17114
|
+
{
|
|
17115
|
+
variant: "ghost",
|
|
17116
|
+
size: "sm",
|
|
17117
|
+
className: "h-4 w-4 p-0 text-white/80 hover:text-white",
|
|
17118
|
+
onClick: (e) => handleEventEdit(event, e),
|
|
17119
|
+
children: /* @__PURE__ */ jsx(Edit, { className: "h-3 w-3" })
|
|
17120
|
+
}
|
|
17121
|
+
),
|
|
17122
|
+
/* @__PURE__ */ jsx(
|
|
17123
|
+
MoonUIButtonPro,
|
|
17124
|
+
{
|
|
17125
|
+
variant: "ghost",
|
|
17126
|
+
size: "sm",
|
|
17127
|
+
className: "h-4 w-4 p-0 text-white/80 hover:text-white",
|
|
17128
|
+
onClick: (e) => handleEventDelete(event, e),
|
|
17129
|
+
children: /* @__PURE__ */ jsx(Trash2, { className: "h-3 w-3" })
|
|
17130
|
+
}
|
|
17131
|
+
)
|
|
17132
|
+
] })
|
|
17077
17133
|
] }),
|
|
17078
|
-
|
|
17079
|
-
/* @__PURE__ */ jsx(
|
|
17080
|
-
|
|
17081
|
-
{
|
|
17082
|
-
variant: "ghost",
|
|
17083
|
-
size: "sm",
|
|
17084
|
-
className: "h-4 w-4 p-0 text-white/80 hover:text-white",
|
|
17085
|
-
onClick: (e) => handleEventEdit(event, e),
|
|
17086
|
-
children: /* @__PURE__ */ jsx(Edit, { className: "h-3 w-3" })
|
|
17087
|
-
}
|
|
17088
|
-
),
|
|
17089
|
-
/* @__PURE__ */ jsx(
|
|
17090
|
-
MoonUIButtonPro,
|
|
17091
|
-
{
|
|
17092
|
-
variant: "ghost",
|
|
17093
|
-
size: "sm",
|
|
17094
|
-
className: "h-4 w-4 p-0 text-white/80 hover:text-white",
|
|
17095
|
-
onClick: (e) => handleEventDelete(event, e),
|
|
17096
|
-
children: /* @__PURE__ */ jsx(Trash2, { className: "h-3 w-3" })
|
|
17097
|
-
}
|
|
17098
|
-
)
|
|
17134
|
+
event.startTime && !compactMode && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 mt-1", children: [
|
|
17135
|
+
/* @__PURE__ */ jsx(Clock, { className: "h-3 w-3" }),
|
|
17136
|
+
/* @__PURE__ */ jsx("span", { className: "text-[10px]", children: formatTime2(event.startTime) })
|
|
17099
17137
|
] })
|
|
17100
|
-
]
|
|
17101
|
-
|
|
17102
|
-
|
|
17103
|
-
|
|
17104
|
-
|
|
17105
|
-
|
|
17106
|
-
|
|
17107
|
-
|
|
17108
|
-
|
|
17138
|
+
]
|
|
17139
|
+
},
|
|
17140
|
+
event.id
|
|
17141
|
+
)),
|
|
17142
|
+
dayEvents.length > 3 && /* @__PURE__ */ jsxs(
|
|
17143
|
+
"div",
|
|
17144
|
+
{
|
|
17145
|
+
className: "text-[10px] text-muted-foreground hover:text-foreground cursor-pointer font-medium pl-1",
|
|
17146
|
+
onClick: (e) => {
|
|
17147
|
+
e.stopPropagation();
|
|
17148
|
+
handleDateClick(date);
|
|
17149
|
+
},
|
|
17150
|
+
children: [
|
|
17151
|
+
"+",
|
|
17152
|
+
dayEvents.length - 3,
|
|
17153
|
+
" more"
|
|
17154
|
+
]
|
|
17155
|
+
}
|
|
17156
|
+
)
|
|
17157
|
+
] })
|
|
17109
17158
|
]
|
|
17110
17159
|
},
|
|
17111
17160
|
index2
|
|
17112
17161
|
);
|
|
17113
|
-
})
|
|
17162
|
+
}) })
|
|
17114
17163
|
] }),
|
|
17115
|
-
view === "week" && /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
17164
|
+
view === "week" && /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col space-y-4", children: [
|
|
17116
17165
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-8 gap-2", children: [
|
|
17117
17166
|
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-muted-foreground", children: "Time" }),
|
|
17118
17167
|
Array.from({ length: 7 }, (_, i) => {
|
|
@@ -17127,7 +17176,7 @@ function CalendarInternal({
|
|
|
17127
17176
|
] }, i);
|
|
17128
17177
|
})
|
|
17129
17178
|
] }),
|
|
17130
|
-
/* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "
|
|
17179
|
+
/* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden flex-1 flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: Array.from({ length: 24 }, (_, hour) => /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-8 border-b last:border-b-0", children: [
|
|
17131
17180
|
/* @__PURE__ */ jsx("div", { className: "p-2 text-xs text-muted-foreground border-r", children: formatTime2(`${hour.toString().padStart(2, "0")}:00`) }),
|
|
17132
17181
|
Array.from({ length: 7 }, (_2, dayIndex) => {
|
|
17133
17182
|
const date = new Date(currentDate);
|
|
@@ -17167,14 +17216,14 @@ function CalendarInternal({
|
|
|
17167
17216
|
})
|
|
17168
17217
|
] }, hour)) }) })
|
|
17169
17218
|
] }),
|
|
17170
|
-
view === "day" && /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
17219
|
+
view === "day" && /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col space-y-4", children: [
|
|
17171
17220
|
/* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold", children: currentDate.toLocaleDateString(locale, {
|
|
17172
17221
|
weekday: "long",
|
|
17173
17222
|
year: "numeric",
|
|
17174
17223
|
month: "long",
|
|
17175
17224
|
day: "numeric"
|
|
17176
17225
|
}) }) }),
|
|
17177
|
-
/* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "
|
|
17226
|
+
/* @__PURE__ */ jsx("div", { className: "border rounded-lg overflow-hidden flex-1 flex flex-col", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto", children: Array.from({ length: 24 }, (_, hour) => {
|
|
17178
17227
|
const hourEvents = getEventsForDate(currentDate).filter((event) => {
|
|
17179
17228
|
if (!event.startTime)
|
|
17180
17229
|
return false;
|
|
@@ -17237,7 +17286,7 @@ function CalendarInternal({
|
|
|
17237
17286
|
] }, hour);
|
|
17238
17287
|
}) }) })
|
|
17239
17288
|
] }),
|
|
17240
|
-
view === "agenda" && /* @__PURE__ */ jsx("div", { className: "space-y-4", children: /* @__PURE__ */ jsx("div", { className: "
|
|
17289
|
+
view === "agenda" && /* @__PURE__ */ jsx("div", { className: "flex-1 flex flex-col space-y-4", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto space-y-4", children: Array.from({ length: 30 }, (_, i) => {
|
|
17241
17290
|
const date = new Date(currentDate);
|
|
17242
17291
|
date.setDate(date.getDate() + i);
|
|
17243
17292
|
const dayEvents = getEventsForDate(date);
|
|
@@ -17311,7 +17360,7 @@ function CalendarInternal({
|
|
|
17311
17360
|
)) })
|
|
17312
17361
|
] }, i);
|
|
17313
17362
|
}).filter(Boolean) }) }),
|
|
17314
|
-
selectedDate && view === "month" && /* @__PURE__ */ jsxs("div", { className: "border rounded-lg p-4 bg-muted/50", children: [
|
|
17363
|
+
selectedDate && view === "month" && /* @__PURE__ */ jsxs("div", { className: "border rounded-lg p-4 bg-muted/50 mt-4", children: [
|
|
17315
17364
|
/* @__PURE__ */ jsx("h4", { className: "font-medium mb-2", children: selectedDate.toLocaleDateString("en-US", {
|
|
17316
17365
|
weekday: "long",
|
|
17317
17366
|
year: "numeric",
|
|
@@ -75726,8 +75775,6 @@ function NavbarInternal({
|
|
|
75726
75775
|
activePath,
|
|
75727
75776
|
onNavigate
|
|
75728
75777
|
}) {
|
|
75729
|
-
console.log("Navbar sections:", sections);
|
|
75730
|
-
console.log("enableCommandAI:", enableCommandAI);
|
|
75731
75778
|
const [isMobile, setIsMobile] = useState(false);
|
|
75732
75779
|
const [isOpen, setIsOpen] = useState(false);
|
|
75733
75780
|
const [isSearchOpen, setIsSearchOpen] = useState(false);
|
|
@@ -75796,28 +75843,34 @@ function NavbarInternal({
|
|
|
75796
75843
|
document.addEventListener("keydown", handleKeyDown3);
|
|
75797
75844
|
return () => document.removeEventListener("keydown", handleKeyDown3);
|
|
75798
75845
|
}, [keyboardShortcuts, enableCommandAI, onCommandAIOpen]);
|
|
75799
|
-
const handleItemClick = useCallback(
|
|
75800
|
-
|
|
75801
|
-
item.action
|
|
75802
|
-
|
|
75803
|
-
if (
|
|
75804
|
-
|
|
75805
|
-
|
|
75806
|
-
|
|
75807
|
-
|
|
75808
|
-
onNavigate
|
|
75809
|
-
|
|
75810
|
-
|
|
75811
|
-
|
|
75812
|
-
|
|
75813
|
-
|
|
75846
|
+
const handleItemClick = useCallback(
|
|
75847
|
+
(item) => {
|
|
75848
|
+
if (item.action) {
|
|
75849
|
+
item.action();
|
|
75850
|
+
} else if (item.href) {
|
|
75851
|
+
if (enableNProgress) {
|
|
75852
|
+
NProgress.start();
|
|
75853
|
+
setTimeout(() => NProgress.done(), 500);
|
|
75854
|
+
}
|
|
75855
|
+
if (onNavigate) {
|
|
75856
|
+
onNavigate(item.href);
|
|
75857
|
+
} else {
|
|
75858
|
+
window.location.href = item.href;
|
|
75859
|
+
}
|
|
75860
|
+
if (isMobile) {
|
|
75861
|
+
setIsOpen(false);
|
|
75862
|
+
}
|
|
75814
75863
|
}
|
|
75815
|
-
}
|
|
75816
|
-
|
|
75817
|
-
|
|
75818
|
-
|
|
75819
|
-
|
|
75820
|
-
|
|
75864
|
+
},
|
|
75865
|
+
[onNavigate, isMobile, enableNProgress]
|
|
75866
|
+
);
|
|
75867
|
+
const handleSearch = useCallback(
|
|
75868
|
+
(value) => {
|
|
75869
|
+
setSearchValue(value);
|
|
75870
|
+
onSearch?.(value);
|
|
75871
|
+
},
|
|
75872
|
+
[onSearch]
|
|
75873
|
+
);
|
|
75821
75874
|
const renderMegaMenuContent = (items) => /* @__PURE__ */ jsx("div", { className: "grid gap-3 p-6 md:w-[400px] lg:w-[500px] lg:grid-cols-[.75fr_1fr]", children: items.map((item) => /* @__PURE__ */ jsxs(
|
|
75822
75875
|
NavigationMenuLink2,
|
|
75823
75876
|
{
|
|
@@ -75830,7 +75883,14 @@ function NavbarInternal({
|
|
|
75830
75883
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
75831
75884
|
item.icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: item.icon }),
|
|
75832
75885
|
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium leading-none", children: item.title }),
|
|
75833
|
-
item.badge && /* @__PURE__ */ jsx(
|
|
75886
|
+
item.badge && /* @__PURE__ */ jsx(
|
|
75887
|
+
MoonUIBadgePro,
|
|
75888
|
+
{
|
|
75889
|
+
variant: item.badgeVariant || "secondary",
|
|
75890
|
+
className: "ml-auto",
|
|
75891
|
+
children: item.badge
|
|
75892
|
+
}
|
|
75893
|
+
)
|
|
75834
75894
|
] }),
|
|
75835
75895
|
item.description && /* @__PURE__ */ jsx("p", { className: "line-clamp-2 text-sm leading-snug text-muted-foreground", children: item.description })
|
|
75836
75896
|
]
|
|
@@ -75857,7 +75917,14 @@ function NavbarInternal({
|
|
|
75857
75917
|
item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
|
|
75858
75918
|
item.title
|
|
75859
75919
|
] }),
|
|
75860
|
-
item.badge && /* @__PURE__ */ jsx(
|
|
75920
|
+
item.badge && /* @__PURE__ */ jsx(
|
|
75921
|
+
MoonUIBadgePro,
|
|
75922
|
+
{
|
|
75923
|
+
variant: item.badgeVariant || "secondary",
|
|
75924
|
+
className: "ml-auto",
|
|
75925
|
+
children: item.badge
|
|
75926
|
+
}
|
|
75927
|
+
)
|
|
75861
75928
|
]
|
|
75862
75929
|
},
|
|
75863
75930
|
item.id
|
|
@@ -75884,22 +75951,37 @@ function NavbarInternal({
|
|
|
75884
75951
|
] }),
|
|
75885
75952
|
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto p-4", children: !hideNavItems && sections.map((section) => /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
75886
75953
|
section.items.map((item) => /* @__PURE__ */ jsx("div", { children: item.items && item.items.length > 0 ? /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
75887
|
-
/* @__PURE__ */ jsx(
|
|
75888
|
-
|
|
75954
|
+
/* @__PURE__ */ jsx(
|
|
75955
|
+
MoonUIDropdownMenuTriggerPro,
|
|
75889
75956
|
{
|
|
75890
|
-
|
|
75891
|
-
|
|
75892
|
-
|
|
75893
|
-
|
|
75894
|
-
|
|
75895
|
-
|
|
75896
|
-
item.
|
|
75897
|
-
|
|
75898
|
-
|
|
75899
|
-
|
|
75957
|
+
asChild: true,
|
|
75958
|
+
children: /* @__PURE__ */ jsxs(
|
|
75959
|
+
MoonUIButtonPro,
|
|
75960
|
+
{
|
|
75961
|
+
variant: "ghost",
|
|
75962
|
+
className: "w-full justify-between",
|
|
75963
|
+
disabled: item.disabled,
|
|
75964
|
+
children: [
|
|
75965
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
75966
|
+
item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
|
|
75967
|
+
item.title
|
|
75968
|
+
] }),
|
|
75969
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
|
|
75970
|
+
]
|
|
75971
|
+
}
|
|
75972
|
+
)
|
|
75900
75973
|
}
|
|
75901
|
-
)
|
|
75902
|
-
/* @__PURE__ */ jsx(
|
|
75974
|
+
),
|
|
75975
|
+
/* @__PURE__ */ jsx(
|
|
75976
|
+
MoonUIDropdownMenuContentPro,
|
|
75977
|
+
{
|
|
75978
|
+
align: "start",
|
|
75979
|
+
className: "w-56",
|
|
75980
|
+
children: item.items && renderDropdownMenu(
|
|
75981
|
+
item.items
|
|
75982
|
+
)
|
|
75983
|
+
}
|
|
75984
|
+
)
|
|
75903
75985
|
] }) : /* @__PURE__ */ jsxs(
|
|
75904
75986
|
MoonUIButtonPro,
|
|
75905
75987
|
{
|
|
@@ -75912,7 +75994,14 @@ function NavbarInternal({
|
|
|
75912
75994
|
item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
|
|
75913
75995
|
item.title
|
|
75914
75996
|
] }),
|
|
75915
|
-
item.badge && /* @__PURE__ */ jsx(
|
|
75997
|
+
item.badge && /* @__PURE__ */ jsx(
|
|
75998
|
+
MoonUIBadgePro,
|
|
75999
|
+
{
|
|
76000
|
+
variant: item.badgeVariant || "secondary",
|
|
76001
|
+
className: "ml-auto",
|
|
76002
|
+
children: item.badge
|
|
76003
|
+
}
|
|
76004
|
+
)
|
|
75916
76005
|
]
|
|
75917
76006
|
}
|
|
75918
76007
|
) }, item.id)),
|
|
@@ -75955,257 +76044,367 @@ function NavbarInternal({
|
|
|
75955
76044
|
);
|
|
75956
76045
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
75957
76046
|
/* @__PURE__ */ jsxs("nav", { ref: navRef, className: navClasses, children: [
|
|
75958
|
-
/* @__PURE__ */ jsxs(
|
|
75959
|
-
"
|
|
75960
|
-
|
|
75961
|
-
|
|
75962
|
-
|
|
75963
|
-
|
|
75964
|
-
|
|
75965
|
-
|
|
75966
|
-
|
|
75967
|
-
|
|
75968
|
-
|
|
75969
|
-
|
|
75970
|
-
|
|
75971
|
-
|
|
75972
|
-
|
|
75973
|
-
|
|
75974
|
-
"a",
|
|
75975
|
-
{
|
|
75976
|
-
href: branding.href || "/",
|
|
75977
|
-
onClick: (e) => {
|
|
75978
|
-
if (branding.href && onNavigate) {
|
|
75979
|
-
e.preventDefault();
|
|
75980
|
-
onNavigate(branding.href);
|
|
75981
|
-
}
|
|
75982
|
-
},
|
|
75983
|
-
className: "flex items-center gap-2",
|
|
75984
|
-
children: [
|
|
75985
|
-
branding.logo,
|
|
75986
|
-
branding.title && !isMobile && /* @__PURE__ */ jsx("span", { className: "font-semibold text-lg", children: branding.title })
|
|
75987
|
-
]
|
|
75988
|
-
}
|
|
75989
|
-
)
|
|
75990
|
-
] }),
|
|
75991
|
-
!isMobile && !hideNavItems && /* @__PURE__ */ jsx(NavigationMenu2, { className: "hidden md:flex", children: /* @__PURE__ */ jsx(NavigationMenuList2, { children: sections.map((section) => /* @__PURE__ */ jsx(React67__default.Fragment, { children: section.items.map((item) => {
|
|
75992
|
-
const hasChildren = item.items && item.items.length > 0;
|
|
75993
|
-
const isActive2 = item.href === activePath;
|
|
75994
|
-
if (hasChildren) {
|
|
75995
|
-
return /* @__PURE__ */ jsxs(NavigationMenuItem2, { children: [
|
|
75996
|
-
/* @__PURE__ */ jsx(
|
|
75997
|
-
NavigationMenuTrigger2,
|
|
75998
|
-
{
|
|
75999
|
-
className: cn(
|
|
76000
|
-
isActive2 && "bg-accent text-accent-foreground",
|
|
76001
|
-
item.disabled && "opacity-50 cursor-not-allowed"
|
|
76002
|
-
),
|
|
76003
|
-
disabled: item.disabled,
|
|
76004
|
-
children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
76005
|
-
item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
|
|
76006
|
-
item.title
|
|
76007
|
-
] })
|
|
76008
|
-
}
|
|
76009
|
-
),
|
|
76010
|
-
/* @__PURE__ */ jsx(NavigationMenuContent2, { children: item.items && renderMegaMenuContent(item.items) })
|
|
76011
|
-
] }, item.id);
|
|
76012
|
-
}
|
|
76013
|
-
return /* @__PURE__ */ jsx(NavigationMenuItem2, { children: /* @__PURE__ */ jsxs(
|
|
76014
|
-
NavigationMenuLink2,
|
|
76015
|
-
{
|
|
76016
|
-
className: cn(
|
|
76017
|
-
navigationMenuTriggerStyle(),
|
|
76018
|
-
isActive2 && "bg-accent text-accent-foreground",
|
|
76019
|
-
item.disabled && "opacity-50 cursor-not-allowed"
|
|
76020
|
-
),
|
|
76021
|
-
onClick: () => !item.disabled && handleItemClick(item),
|
|
76022
|
-
children: [
|
|
76023
|
-
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
76024
|
-
item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
|
|
76025
|
-
item.title
|
|
76026
|
-
] }),
|
|
76027
|
-
item.badge && /* @__PURE__ */ jsx(MoonUIBadgePro, { variant: item.badgeVariant || "secondary", className: "ml-2", children: item.badge })
|
|
76028
|
-
]
|
|
76029
|
-
}
|
|
76030
|
-
) }, item.id);
|
|
76031
|
-
}) }, section.id)) }) }),
|
|
76032
|
-
/* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
76033
|
-
showSearch && /* @__PURE__ */ jsx(Fragment, { children: isMobile ? /* @__PURE__ */ jsx(
|
|
76034
|
-
MoonUIButtonPro,
|
|
76035
|
-
{
|
|
76036
|
-
variant: "ghost",
|
|
76037
|
-
size: "icon",
|
|
76038
|
-
onClick: () => setIsCommandOpen(true),
|
|
76039
|
-
children: /* @__PURE__ */ jsx(Search, { className: "h-5 w-5" })
|
|
76040
|
-
}
|
|
76041
|
-
) : /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
76042
|
-
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
|
|
76043
|
-
/* @__PURE__ */ jsx(
|
|
76044
|
-
MoonUIInputPro,
|
|
76045
|
-
{
|
|
76046
|
-
type: "search",
|
|
76047
|
-
placeholder: searchPlaceholder,
|
|
76048
|
-
className: "w-64 pl-9 pr-4 h-9 cursor-pointer",
|
|
76049
|
-
value: searchValue,
|
|
76050
|
-
onChange: (e) => handleSearch(e.target.value),
|
|
76051
|
-
onClick: () => {
|
|
76052
|
-
if (enableCommandAI) {
|
|
76053
|
-
setIsCommandOpen(true);
|
|
76054
|
-
onCommandAIOpen?.();
|
|
76055
|
-
}
|
|
76056
|
-
},
|
|
76057
|
-
readOnly: enableCommandAI
|
|
76058
|
-
}
|
|
76059
|
-
),
|
|
76060
|
-
(keyboardShortcuts || enableCommandAI) && /* @__PURE__ */ jsx("kbd", { className: "absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 hidden sm:flex", children: enableCommandAI ? commandAIShortcut : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
76061
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs", children: "\u2318" }),
|
|
76062
|
-
"K"
|
|
76063
|
-
] }) })
|
|
76064
|
-
] }) }),
|
|
76065
|
-
showThemeToggle && /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
76066
|
-
/* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "ghost", size: "icon", children: [
|
|
76067
|
-
theme === "light" && /* @__PURE__ */ jsx(Sun, { className: "h-5 w-5" }),
|
|
76068
|
-
theme === "dark" && /* @__PURE__ */ jsx(Moon, { className: "h-5 w-5" }),
|
|
76069
|
-
theme === "system" && /* @__PURE__ */ jsx(Monitor, { className: "h-5 w-5" })
|
|
76070
|
-
] }) }),
|
|
76071
|
-
/* @__PURE__ */ jsxs(MoonUIDropdownMenuContentPro, { align: "end", children: [
|
|
76072
|
-
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => onThemeChange?.("light"), children: [
|
|
76073
|
-
/* @__PURE__ */ jsx(Sun, { className: "mr-2 h-4 w-4" }),
|
|
76074
|
-
"Light"
|
|
76075
|
-
] }),
|
|
76076
|
-
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => onThemeChange?.("dark"), children: [
|
|
76077
|
-
/* @__PURE__ */ jsx(Moon, { className: "mr-2 h-4 w-4" }),
|
|
76078
|
-
"Dark"
|
|
76079
|
-
] }),
|
|
76080
|
-
/* @__PURE__ */ jsxs(MoonUIDropdownMenuItemPro, { onClick: () => onThemeChange?.("system"), children: [
|
|
76081
|
-
/* @__PURE__ */ jsx(Monitor, { className: "mr-2 h-4 w-4" }),
|
|
76082
|
-
"System"
|
|
76083
|
-
] })
|
|
76084
|
-
] })
|
|
76085
|
-
] }),
|
|
76086
|
-
notifications && /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
76087
|
-
/* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "ghost", size: "icon", className: "relative", children: [
|
|
76088
|
-
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5" }),
|
|
76089
|
-
notifications.count && notifications.count > 0 && /* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-1 min-w-[18px] h-[18px] rounded-full bg-red-500 text-[11px] font-medium text-white flex items-center justify-center px-1", children: notifications.count > 9 ? "9+" : notifications.count })
|
|
76090
|
-
] }) }),
|
|
76091
|
-
/* @__PURE__ */ jsxs(
|
|
76092
|
-
MoonUIDropdownMenuContentPro,
|
|
76047
|
+
/* @__PURE__ */ jsxs(
|
|
76048
|
+
"div",
|
|
76049
|
+
{
|
|
76050
|
+
className: cn(
|
|
76051
|
+
"flex items-center",
|
|
76052
|
+
getHeight(),
|
|
76053
|
+
maxWidth === "sm" && "container max-w-screen-sm",
|
|
76054
|
+
maxWidth === "md" && "container max-w-screen-md",
|
|
76055
|
+
maxWidth === "lg" && "container max-w-screen-lg",
|
|
76056
|
+
maxWidth === "xl" && "container max-w-screen-xl",
|
|
76057
|
+
maxWidth === "2xl" && "container max-w-screen-2xl",
|
|
76058
|
+
maxWidth === "full" && "w-full px-4 sm:px-6 lg:px-8"
|
|
76059
|
+
),
|
|
76060
|
+
children: [
|
|
76061
|
+
branding && /* @__PURE__ */ jsxs(
|
|
76062
|
+
"div",
|
|
76093
76063
|
{
|
|
76094
|
-
|
|
76095
|
-
|
|
76096
|
-
|
|
76064
|
+
className: cn(
|
|
76065
|
+
"flex items-center gap-2",
|
|
76066
|
+
logoPosition === "center" && !isMobile ? "absolute left-1/2 -translate-x-1/2" : "mr-4"
|
|
76067
|
+
),
|
|
76097
76068
|
children: [
|
|
76098
|
-
|
|
76099
|
-
|
|
76100
|
-
|
|
76101
|
-
notifications.count && notifications.count > 0 && /* @__PURE__ */ jsxs(
|
|
76102
|
-
MoonUIBadgePro,
|
|
76103
|
-
{
|
|
76104
|
-
variant: "secondary",
|
|
76105
|
-
className: "h-5 px-2 rounded-full bg-primary/10 text-primary border-0",
|
|
76106
|
-
children: [
|
|
76107
|
-
notifications.count,
|
|
76108
|
-
" new"
|
|
76109
|
-
]
|
|
76110
|
-
}
|
|
76111
|
-
)
|
|
76112
|
-
] }),
|
|
76113
|
-
notifications.items && notifications.items.length > 0 && /* @__PURE__ */ jsx(
|
|
76114
|
-
MoonUIButtonPro,
|
|
76115
|
-
{
|
|
76116
|
-
variant: "ghost",
|
|
76117
|
-
size: "sm",
|
|
76118
|
-
className: "text-xs h-7 px-2 text-muted-foreground hover:text-foreground",
|
|
76119
|
-
onClick: (e) => {
|
|
76120
|
-
e.preventDefault();
|
|
76121
|
-
console.log("Mark all as read");
|
|
76122
|
-
},
|
|
76123
|
-
children: "Mark all read"
|
|
76124
|
-
}
|
|
76125
|
-
)
|
|
76126
|
-
] }),
|
|
76127
|
-
/* @__PURE__ */ jsx("div", { className: "max-h-[400px] overflow-y-auto", children: notifications.items && notifications.items.length > 0 ? /* @__PURE__ */ jsx("div", { className: "py-1", children: notifications.items.map((notification, index2) => /* @__PURE__ */ jsxs("div", { children: [
|
|
76128
|
-
/* @__PURE__ */ jsx(
|
|
76129
|
-
"button",
|
|
76130
|
-
{
|
|
76131
|
-
className: cn(
|
|
76132
|
-
"w-full px-4 py-3 text-left hover:bg-muted/50 transition-colors",
|
|
76133
|
-
"focus:outline-none focus:bg-muted/50",
|
|
76134
|
-
!notification.read && "bg-primary/5 hover:bg-primary/10"
|
|
76135
|
-
),
|
|
76136
|
-
onClick: () => notifications.onNotificationClick?.(notification.id),
|
|
76137
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
|
|
76138
|
-
/* @__PURE__ */ jsx("div", { className: "mt-1.5", children: /* @__PURE__ */ jsx("div", { className: cn(
|
|
76139
|
-
"h-2 w-2 rounded-full",
|
|
76140
|
-
!notification.read ? "bg-primary" : "bg-transparent"
|
|
76141
|
-
) }) }),
|
|
76142
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-1", children: [
|
|
76143
|
-
/* @__PURE__ */ jsx("p", { className: cn(
|
|
76144
|
-
"text-sm leading-tight",
|
|
76145
|
-
!notification.read ? "font-medium" : "font-normal"
|
|
76146
|
-
), children: notification.title }),
|
|
76147
|
-
notification.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground leading-relaxed", children: notification.description }),
|
|
76148
|
-
notification.time && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 mt-1", children: notification.time })
|
|
76149
|
-
] })
|
|
76150
|
-
] })
|
|
76151
|
-
}
|
|
76152
|
-
),
|
|
76153
|
-
index2 < (notifications.items?.length || 0) - 1 && /* @__PURE__ */ jsx("div", { className: "mx-4 border-b" })
|
|
76154
|
-
] }, notification.id)) }) : /* @__PURE__ */ jsxs("div", { className: "py-12 text-center", children: [
|
|
76155
|
-
/* @__PURE__ */ jsx(Bell, { className: "h-10 w-10 mx-auto text-muted-foreground/30 mb-3" }),
|
|
76156
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-muted-foreground", children: "No new notifications" }),
|
|
76157
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 mt-1", children: "You're all caught up!" })
|
|
76158
|
-
] }) }),
|
|
76159
|
-
notifications.items && notifications.items.length > 0 && /* @__PURE__ */ jsx("div", { className: "border-t p-2", children: /* @__PURE__ */ jsx(
|
|
76160
|
-
MoonUIButtonPro,
|
|
76069
|
+
logoPosition === "left" && mobileMenuPosition === "left" && /* @__PURE__ */ jsx(MobileMenu, {}),
|
|
76070
|
+
/* @__PURE__ */ jsxs(
|
|
76071
|
+
"a",
|
|
76161
76072
|
{
|
|
76162
|
-
|
|
76163
|
-
className: "w-full h-8 text-xs text-muted-foreground hover:text-foreground",
|
|
76073
|
+
href: branding.href || "/",
|
|
76164
76074
|
onClick: (e) => {
|
|
76165
|
-
|
|
76166
|
-
|
|
76075
|
+
if (branding.href && onNavigate) {
|
|
76076
|
+
e.preventDefault();
|
|
76077
|
+
onNavigate(branding.href);
|
|
76078
|
+
}
|
|
76167
76079
|
},
|
|
76168
|
-
|
|
76080
|
+
className: "flex items-center gap-2",
|
|
76081
|
+
children: [
|
|
76082
|
+
branding.logo,
|
|
76083
|
+
branding.title && !isMobile && /* @__PURE__ */ jsx("span", { className: "font-semibold text-lg", children: branding.title })
|
|
76084
|
+
]
|
|
76169
76085
|
}
|
|
76170
|
-
)
|
|
76086
|
+
)
|
|
76171
76087
|
]
|
|
76172
76088
|
}
|
|
76173
|
-
)
|
|
76174
|
-
|
|
76175
|
-
|
|
76176
|
-
|
|
76177
|
-
|
|
76178
|
-
|
|
76179
|
-
|
|
76180
|
-
|
|
76181
|
-
|
|
76182
|
-
|
|
76183
|
-
|
|
76184
|
-
|
|
76089
|
+
),
|
|
76090
|
+
!isMobile && !hideNavItems && /* @__PURE__ */ jsx(NavigationMenu2, { className: "hidden md:flex", children: /* @__PURE__ */ jsx(NavigationMenuList2, { children: sections.map((section) => /* @__PURE__ */ jsx(React67__default.Fragment, { children: section.items.map((item) => {
|
|
76091
|
+
const hasChildren = item.items && item.items.length > 0;
|
|
76092
|
+
const isActive2 = item.href === activePath;
|
|
76093
|
+
if (hasChildren) {
|
|
76094
|
+
return /* @__PURE__ */ jsxs(
|
|
76095
|
+
NavigationMenuItem2,
|
|
76096
|
+
{
|
|
76097
|
+
children: [
|
|
76098
|
+
/* @__PURE__ */ jsx(
|
|
76099
|
+
NavigationMenuTrigger2,
|
|
76100
|
+
{
|
|
76101
|
+
className: cn(
|
|
76102
|
+
isActive2 && "bg-accent text-accent-foreground",
|
|
76103
|
+
item.disabled && "opacity-50 cursor-not-allowed"
|
|
76104
|
+
),
|
|
76105
|
+
disabled: item.disabled,
|
|
76106
|
+
children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
76107
|
+
item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
|
|
76108
|
+
item.title
|
|
76109
|
+
] })
|
|
76110
|
+
}
|
|
76111
|
+
),
|
|
76112
|
+
/* @__PURE__ */ jsx(NavigationMenuContent2, { children: item.items && renderMegaMenuContent(
|
|
76113
|
+
item.items
|
|
76114
|
+
) })
|
|
76115
|
+
]
|
|
76116
|
+
},
|
|
76117
|
+
item.id
|
|
76118
|
+
);
|
|
76119
|
+
}
|
|
76120
|
+
return /* @__PURE__ */ jsx(
|
|
76121
|
+
NavigationMenuItem2,
|
|
76122
|
+
{
|
|
76123
|
+
children: /* @__PURE__ */ jsxs(
|
|
76124
|
+
NavigationMenuLink2,
|
|
76125
|
+
{
|
|
76126
|
+
className: cn(
|
|
76127
|
+
navigationMenuTriggerStyle(),
|
|
76128
|
+
isActive2 && "bg-accent text-accent-foreground",
|
|
76129
|
+
item.disabled && "opacity-50 cursor-not-allowed"
|
|
76130
|
+
),
|
|
76131
|
+
onClick: () => !item.disabled && handleItemClick(
|
|
76132
|
+
item
|
|
76133
|
+
),
|
|
76134
|
+
children: [
|
|
76135
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
76136
|
+
item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
|
|
76137
|
+
item.title
|
|
76138
|
+
] }),
|
|
76139
|
+
item.badge && /* @__PURE__ */ jsx(
|
|
76140
|
+
MoonUIBadgePro,
|
|
76141
|
+
{
|
|
76142
|
+
variant: item.badgeVariant || "secondary",
|
|
76143
|
+
className: "ml-2",
|
|
76144
|
+
children: item.badge
|
|
76145
|
+
}
|
|
76146
|
+
)
|
|
76147
|
+
]
|
|
76148
|
+
}
|
|
76149
|
+
)
|
|
76150
|
+
},
|
|
76151
|
+
item.id
|
|
76152
|
+
);
|
|
76153
|
+
}) }, section.id)) }) }),
|
|
76154
|
+
/* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
76155
|
+
showSearch && /* @__PURE__ */ jsx(Fragment, { children: isMobile ? /* @__PURE__ */ jsx(
|
|
76156
|
+
MoonUIButtonPro,
|
|
76157
|
+
{
|
|
76158
|
+
variant: "ghost",
|
|
76159
|
+
size: "icon",
|
|
76160
|
+
onClick: () => setIsCommandOpen(true),
|
|
76161
|
+
children: /* @__PURE__ */ jsx(Search, { className: "h-5 w-5" })
|
|
76185
76162
|
}
|
|
76186
|
-
|
|
76187
|
-
|
|
76188
|
-
|
|
76189
|
-
|
|
76190
|
-
|
|
76191
|
-
|
|
76192
|
-
|
|
76193
|
-
|
|
76194
|
-
|
|
76195
|
-
|
|
76196
|
-
|
|
76197
|
-
|
|
76198
|
-
|
|
76199
|
-
|
|
76200
|
-
|
|
76201
|
-
|
|
76202
|
-
|
|
76163
|
+
) : /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
76164
|
+
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
|
|
76165
|
+
/* @__PURE__ */ jsx(
|
|
76166
|
+
MoonUIInputPro,
|
|
76167
|
+
{
|
|
76168
|
+
type: "search",
|
|
76169
|
+
placeholder: searchPlaceholder,
|
|
76170
|
+
className: "w-64 pl-9 pr-4 h-9 cursor-pointer",
|
|
76171
|
+
value: searchValue,
|
|
76172
|
+
onChange: (e) => handleSearch(e.target.value),
|
|
76173
|
+
onClick: () => {
|
|
76174
|
+
if (enableCommandAI) {
|
|
76175
|
+
setIsCommandOpen(true);
|
|
76176
|
+
onCommandAIOpen?.();
|
|
76177
|
+
}
|
|
76178
|
+
},
|
|
76179
|
+
readOnly: enableCommandAI
|
|
76180
|
+
}
|
|
76181
|
+
),
|
|
76182
|
+
(keyboardShortcuts || enableCommandAI) && /* @__PURE__ */ jsx("kbd", { className: "absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 hidden sm:flex", children: enableCommandAI ? commandAIShortcut : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
76183
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs", children: "\u2318" }),
|
|
76184
|
+
"K"
|
|
76185
|
+
] }) })
|
|
76186
|
+
] }) }),
|
|
76187
|
+
showThemeToggle && /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
76188
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "ghost", size: "icon", children: [
|
|
76189
|
+
theme === "light" && /* @__PURE__ */ jsx(Sun, { className: "h-5 w-5" }),
|
|
76190
|
+
theme === "dark" && /* @__PURE__ */ jsx(Moon, { className: "h-5 w-5" }),
|
|
76191
|
+
theme === "system" && /* @__PURE__ */ jsx(Monitor, { className: "h-5 w-5" })
|
|
76192
|
+
] }) }),
|
|
76193
|
+
/* @__PURE__ */ jsxs(MoonUIDropdownMenuContentPro, { align: "end", children: [
|
|
76194
|
+
/* @__PURE__ */ jsxs(
|
|
76195
|
+
MoonUIDropdownMenuItemPro,
|
|
76196
|
+
{
|
|
76197
|
+
onClick: () => onThemeChange?.("light"),
|
|
76198
|
+
children: [
|
|
76199
|
+
/* @__PURE__ */ jsx(Sun, { className: "mr-2 h-4 w-4" }),
|
|
76200
|
+
"Light"
|
|
76201
|
+
]
|
|
76202
|
+
}
|
|
76203
|
+
),
|
|
76204
|
+
/* @__PURE__ */ jsxs(
|
|
76205
|
+
MoonUIDropdownMenuItemPro,
|
|
76206
|
+
{
|
|
76207
|
+
onClick: () => onThemeChange?.("dark"),
|
|
76208
|
+
children: [
|
|
76209
|
+
/* @__PURE__ */ jsx(Moon, { className: "mr-2 h-4 w-4" }),
|
|
76210
|
+
"Dark"
|
|
76211
|
+
]
|
|
76212
|
+
}
|
|
76213
|
+
),
|
|
76214
|
+
/* @__PURE__ */ jsxs(
|
|
76215
|
+
MoonUIDropdownMenuItemPro,
|
|
76216
|
+
{
|
|
76217
|
+
onClick: () => onThemeChange?.("system"),
|
|
76218
|
+
children: [
|
|
76219
|
+
/* @__PURE__ */ jsx(Monitor, { className: "mr-2 h-4 w-4" }),
|
|
76220
|
+
"System"
|
|
76221
|
+
]
|
|
76222
|
+
}
|
|
76223
|
+
)
|
|
76224
|
+
] })
|
|
76225
|
+
] }),
|
|
76226
|
+
notifications && /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
76227
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
76228
|
+
MoonUIButtonPro,
|
|
76229
|
+
{
|
|
76230
|
+
variant: "ghost",
|
|
76231
|
+
size: "icon",
|
|
76232
|
+
className: "relative",
|
|
76233
|
+
children: [
|
|
76234
|
+
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5" }),
|
|
76235
|
+
notifications.count && notifications.count > 0 && /* @__PURE__ */ jsx("span", { className: "absolute -top-1 -right-1 min-w-[18px] h-[18px] rounded-full bg-red-500 text-[11px] font-medium text-white flex items-center justify-center px-1", children: notifications.count > 9 ? "9+" : notifications.count })
|
|
76236
|
+
]
|
|
76237
|
+
}
|
|
76238
|
+
) }),
|
|
76239
|
+
/* @__PURE__ */ jsxs(
|
|
76240
|
+
MoonUIDropdownMenuContentPro,
|
|
76241
|
+
{
|
|
76242
|
+
align: "end",
|
|
76243
|
+
className: "w-[380px] p-0",
|
|
76244
|
+
sideOffset: 8,
|
|
76245
|
+
children: [
|
|
76246
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-4 py-3 border-b", children: [
|
|
76247
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
76248
|
+
/* @__PURE__ */ jsx("h4", { className: "text-base font-semibold", children: "Notifications" }),
|
|
76249
|
+
notifications.count && notifications.count > 0 && /* @__PURE__ */ jsxs(
|
|
76250
|
+
MoonUIBadgePro,
|
|
76251
|
+
{
|
|
76252
|
+
variant: "secondary",
|
|
76253
|
+
className: "h-5 px-2 rounded-full bg-primary/10 text-primary border-0",
|
|
76254
|
+
children: [
|
|
76255
|
+
notifications.count,
|
|
76256
|
+
" ",
|
|
76257
|
+
"new"
|
|
76258
|
+
]
|
|
76259
|
+
}
|
|
76260
|
+
)
|
|
76261
|
+
] }),
|
|
76262
|
+
notifications.items && notifications.items.length > 0 && /* @__PURE__ */ jsx(
|
|
76263
|
+
MoonUIButtonPro,
|
|
76264
|
+
{
|
|
76265
|
+
variant: "ghost",
|
|
76266
|
+
size: "sm",
|
|
76267
|
+
className: "text-xs h-7 px-2 text-muted-foreground hover:text-foreground",
|
|
76268
|
+
onClick: (e) => {
|
|
76269
|
+
e.preventDefault();
|
|
76270
|
+
console.log(
|
|
76271
|
+
"Mark all as read"
|
|
76272
|
+
);
|
|
76273
|
+
},
|
|
76274
|
+
children: "Mark all read"
|
|
76275
|
+
}
|
|
76276
|
+
)
|
|
76277
|
+
] }),
|
|
76278
|
+
/* @__PURE__ */ jsx("div", { className: "max-h-[400px] overflow-y-auto", children: notifications.items && notifications.items.length > 0 ? /* @__PURE__ */ jsx("div", { className: "py-1", children: notifications.items.map(
|
|
76279
|
+
(notification, index2) => /* @__PURE__ */ jsxs(
|
|
76280
|
+
"div",
|
|
76281
|
+
{
|
|
76282
|
+
children: [
|
|
76283
|
+
/* @__PURE__ */ jsx(
|
|
76284
|
+
"button",
|
|
76285
|
+
{
|
|
76286
|
+
className: cn(
|
|
76287
|
+
"w-full px-4 py-3 text-left hover:bg-muted/50 transition-colors",
|
|
76288
|
+
"focus:outline-none focus:bg-muted/50",
|
|
76289
|
+
!notification.read && "bg-primary/5 hover:bg-primary/10"
|
|
76290
|
+
),
|
|
76291
|
+
onClick: () => notifications.onNotificationClick?.(
|
|
76292
|
+
notification.id
|
|
76293
|
+
),
|
|
76294
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
|
|
76295
|
+
/* @__PURE__ */ jsx("div", { className: "mt-1.5", children: /* @__PURE__ */ jsx(
|
|
76296
|
+
"div",
|
|
76297
|
+
{
|
|
76298
|
+
className: cn(
|
|
76299
|
+
"h-2 w-2 rounded-full",
|
|
76300
|
+
!notification.read ? "bg-primary" : "bg-transparent"
|
|
76301
|
+
)
|
|
76302
|
+
}
|
|
76303
|
+
) }),
|
|
76304
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-1", children: [
|
|
76305
|
+
/* @__PURE__ */ jsx(
|
|
76306
|
+
"p",
|
|
76307
|
+
{
|
|
76308
|
+
className: cn(
|
|
76309
|
+
"text-sm leading-tight",
|
|
76310
|
+
!notification.read ? "font-medium" : "font-normal"
|
|
76311
|
+
),
|
|
76312
|
+
children: notification.title
|
|
76313
|
+
}
|
|
76314
|
+
),
|
|
76315
|
+
notification.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground leading-relaxed", children: notification.description }),
|
|
76316
|
+
notification.time && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 mt-1", children: notification.time })
|
|
76317
|
+
] })
|
|
76318
|
+
] })
|
|
76319
|
+
}
|
|
76320
|
+
),
|
|
76321
|
+
index2 < (notifications.items?.length || 0) - 1 && /* @__PURE__ */ jsx("div", { className: "mx-4 border-b" })
|
|
76322
|
+
]
|
|
76323
|
+
},
|
|
76324
|
+
notification.id
|
|
76325
|
+
)
|
|
76326
|
+
) }) : /* @__PURE__ */ jsxs("div", { className: "py-12 text-center", children: [
|
|
76327
|
+
/* @__PURE__ */ jsx(Bell, { className: "h-10 w-10 mx-auto text-muted-foreground/30 mb-3" }),
|
|
76328
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-muted-foreground", children: "No new notifications" }),
|
|
76329
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground/70 mt-1", children: "You're all caught up!" })
|
|
76330
|
+
] }) }),
|
|
76331
|
+
notifications.items && notifications.items.length > 0 && /* @__PURE__ */ jsx("div", { className: "border-t p-2", children: /* @__PURE__ */ jsx(
|
|
76332
|
+
MoonUIButtonPro,
|
|
76333
|
+
{
|
|
76334
|
+
variant: "ghost",
|
|
76335
|
+
className: "w-full h-8 text-xs text-muted-foreground hover:text-foreground",
|
|
76336
|
+
onClick: (e) => {
|
|
76337
|
+
e.preventDefault();
|
|
76338
|
+
console.log(
|
|
76339
|
+
"View all notifications"
|
|
76340
|
+
);
|
|
76341
|
+
},
|
|
76342
|
+
children: "View all notifications"
|
|
76343
|
+
}
|
|
76344
|
+
) })
|
|
76345
|
+
]
|
|
76346
|
+
}
|
|
76347
|
+
)
|
|
76203
76348
|
] }),
|
|
76204
|
-
|
|
76349
|
+
cta && /* @__PURE__ */ jsx(
|
|
76350
|
+
MoonUIButtonPro,
|
|
76351
|
+
{
|
|
76352
|
+
variant: cta.variant || "primary",
|
|
76353
|
+
size: "sm",
|
|
76354
|
+
onClick: () => {
|
|
76355
|
+
if (cta.action) {
|
|
76356
|
+
cta.action();
|
|
76357
|
+
} else if (cta.href && onNavigate) {
|
|
76358
|
+
onNavigate(cta.href);
|
|
76359
|
+
}
|
|
76360
|
+
},
|
|
76361
|
+
className: !isMobile ? "ml-2" : "",
|
|
76362
|
+
children: cta.text
|
|
76363
|
+
}
|
|
76364
|
+
),
|
|
76365
|
+
userMenu && /* @__PURE__ */ jsxs(MoonUIDropdownMenuPro, { children: [
|
|
76366
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuTriggerPro, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
76367
|
+
MoonUIButtonPro,
|
|
76368
|
+
{
|
|
76369
|
+
variant: "ghost",
|
|
76370
|
+
size: "icon",
|
|
76371
|
+
className: "relative",
|
|
76372
|
+
children: /* @__PURE__ */ jsxs(MoonUIAvatarPro, { className: "h-8 w-8", children: [
|
|
76373
|
+
/* @__PURE__ */ jsx(
|
|
76374
|
+
MoonUIAvatarImagePro,
|
|
76375
|
+
{
|
|
76376
|
+
src: userMenu.user?.avatar,
|
|
76377
|
+
alt: userMenu.user?.name
|
|
76378
|
+
}
|
|
76379
|
+
),
|
|
76380
|
+
/* @__PURE__ */ jsx(MoonUIAvatarFallbackPro, { children: userMenu.user?.name?.charAt(
|
|
76381
|
+
0
|
|
76382
|
+
) || /* @__PURE__ */ jsx(User, { className: "h-4 w-4" }) })
|
|
76383
|
+
] })
|
|
76384
|
+
}
|
|
76385
|
+
) }),
|
|
76386
|
+
/* @__PURE__ */ jsxs(
|
|
76387
|
+
MoonUIDropdownMenuContentPro,
|
|
76388
|
+
{
|
|
76389
|
+
align: "end",
|
|
76390
|
+
className: "w-56",
|
|
76391
|
+
children: [
|
|
76392
|
+
userMenu.user && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
76393
|
+
/* @__PURE__ */ jsxs("div", { className: "p-2", children: [
|
|
76394
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: userMenu.user.name }),
|
|
76395
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: userMenu.user.email })
|
|
76396
|
+
] }),
|
|
76397
|
+
/* @__PURE__ */ jsx(MoonUIDropdownMenuSeparatorPro, {})
|
|
76398
|
+
] }),
|
|
76399
|
+
userMenu.items && renderDropdownMenu(userMenu.items)
|
|
76400
|
+
]
|
|
76401
|
+
}
|
|
76402
|
+
)
|
|
76403
|
+
] })
|
|
76205
76404
|
] })
|
|
76206
|
-
]
|
|
76207
|
-
|
|
76208
|
-
|
|
76405
|
+
]
|
|
76406
|
+
}
|
|
76407
|
+
),
|
|
76209
76408
|
animatedBackground && /* @__PURE__ */ jsx(
|
|
76210
76409
|
motion.div,
|
|
76211
76410
|
{
|
|
@@ -76258,70 +76457,114 @@ function NavbarInternal({
|
|
|
76258
76457
|
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-1", children: "Try searching for pages, actions, or commands" })
|
|
76259
76458
|
] }) : "No results found." }),
|
|
76260
76459
|
enableCommandAI && !searchValue && /* @__PURE__ */ jsxs(MoonUICommandGroupPro, { heading: "Quick Actions", children: [
|
|
76261
|
-
/* @__PURE__ */ jsxs(
|
|
76262
|
-
|
|
76263
|
-
|
|
76264
|
-
|
|
76265
|
-
|
|
76266
|
-
|
|
76267
|
-
|
|
76268
|
-
|
|
76269
|
-
|
|
76270
|
-
|
|
76271
|
-
|
|
76272
|
-
|
|
76273
|
-
|
|
76274
|
-
|
|
76275
|
-
|
|
76276
|
-
|
|
76277
|
-
|
|
76278
|
-
|
|
76279
|
-
|
|
76280
|
-
|
|
76281
|
-
|
|
76282
|
-
|
|
76283
|
-
|
|
76284
|
-
|
|
76285
|
-
|
|
76286
|
-
|
|
76287
|
-
|
|
76288
|
-
|
|
76289
|
-
|
|
76290
|
-
|
|
76291
|
-
|
|
76292
|
-
|
|
76293
|
-
|
|
76460
|
+
/* @__PURE__ */ jsxs(
|
|
76461
|
+
MoonUICommandItemPro,
|
|
76462
|
+
{
|
|
76463
|
+
onSelect: () => {
|
|
76464
|
+
const homeItem = {
|
|
76465
|
+
id: "home",
|
|
76466
|
+
title: "Go Home",
|
|
76467
|
+
href: "/"
|
|
76468
|
+
};
|
|
76469
|
+
onCommandAISelect?.(homeItem);
|
|
76470
|
+
handleItemClick(homeItem);
|
|
76471
|
+
setIsCommandOpen(false);
|
|
76472
|
+
},
|
|
76473
|
+
children: [
|
|
76474
|
+
/* @__PURE__ */ jsx(Home, { className: "mr-2 h-4 w-4" }),
|
|
76475
|
+
"Go Home",
|
|
76476
|
+
/* @__PURE__ */ jsx("kbd", { className: "ml-auto text-xs", children: "\u2318H" })
|
|
76477
|
+
]
|
|
76478
|
+
}
|
|
76479
|
+
),
|
|
76480
|
+
/* @__PURE__ */ jsxs(
|
|
76481
|
+
MoonUICommandItemPro,
|
|
76482
|
+
{
|
|
76483
|
+
onSelect: () => {
|
|
76484
|
+
setIsSearchOpen(true);
|
|
76485
|
+
setIsCommandOpen(false);
|
|
76486
|
+
onCommandAISelect?.({
|
|
76487
|
+
id: "search",
|
|
76488
|
+
title: "Search",
|
|
76489
|
+
action: () => setIsSearchOpen(true)
|
|
76490
|
+
});
|
|
76491
|
+
},
|
|
76492
|
+
children: [
|
|
76493
|
+
/* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4" }),
|
|
76494
|
+
"Search",
|
|
76495
|
+
/* @__PURE__ */ jsx("kbd", { className: "ml-auto text-xs", children: "\u2318S" })
|
|
76496
|
+
]
|
|
76497
|
+
}
|
|
76498
|
+
),
|
|
76499
|
+
showThemeToggle && /* @__PURE__ */ jsxs(
|
|
76500
|
+
MoonUICommandItemPro,
|
|
76501
|
+
{
|
|
76502
|
+
onSelect: () => {
|
|
76503
|
+
const newTheme = theme === "dark" ? "light" : "dark";
|
|
76504
|
+
onThemeChange?.(newTheme);
|
|
76505
|
+
setIsCommandOpen(false);
|
|
76506
|
+
},
|
|
76507
|
+
children: [
|
|
76508
|
+
theme === "dark" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
76509
|
+
/* @__PURE__ */ jsx(Sun, { className: "mr-2 h-4 w-4" }),
|
|
76510
|
+
"Switch to Light Mode"
|
|
76511
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
76512
|
+
/* @__PURE__ */ jsx(Moon, { className: "mr-2 h-4 w-4" }),
|
|
76513
|
+
"Switch to Dark Mode"
|
|
76514
|
+
] }),
|
|
76515
|
+
/* @__PURE__ */ jsx("kbd", { className: "ml-auto text-xs", children: "\u2318T" })
|
|
76516
|
+
]
|
|
76517
|
+
}
|
|
76518
|
+
)
|
|
76294
76519
|
] }),
|
|
76295
76520
|
sections && sections.length > 0 && sections.map((section) => {
|
|
76296
76521
|
if (!section || !section.items || section.items.length === 0)
|
|
76297
76522
|
return null;
|
|
76298
76523
|
const filteredItems = searchValue ? section.items.filter(
|
|
76299
|
-
(item) => item.title.toLowerCase().includes(
|
|
76524
|
+
(item) => item.title.toLowerCase().includes(
|
|
76525
|
+
searchValue.toLowerCase()
|
|
76526
|
+
) || item.description?.toLowerCase().includes(
|
|
76527
|
+
searchValue.toLowerCase()
|
|
76528
|
+
)
|
|
76300
76529
|
) : section.items;
|
|
76301
76530
|
if (filteredItems.length === 0)
|
|
76302
76531
|
return null;
|
|
76303
|
-
return /* @__PURE__ */ jsx(
|
|
76304
|
-
|
|
76532
|
+
return /* @__PURE__ */ jsx(
|
|
76533
|
+
MoonUICommandGroupPro,
|
|
76305
76534
|
{
|
|
76306
|
-
|
|
76307
|
-
|
|
76308
|
-
|
|
76309
|
-
|
|
76310
|
-
|
|
76311
|
-
|
|
76312
|
-
|
|
76313
|
-
|
|
76314
|
-
|
|
76315
|
-
|
|
76316
|
-
|
|
76317
|
-
|
|
76318
|
-
|
|
76319
|
-
|
|
76320
|
-
|
|
76321
|
-
|
|
76535
|
+
heading: section.title || section.id,
|
|
76536
|
+
children: filteredItems.map((item) => /* @__PURE__ */ jsxs(
|
|
76537
|
+
MoonUICommandItemPro,
|
|
76538
|
+
{
|
|
76539
|
+
disabled: item.disabled,
|
|
76540
|
+
onSelect: () => {
|
|
76541
|
+
if (enableCommandAI) {
|
|
76542
|
+
onCommandAISelect?.(item);
|
|
76543
|
+
}
|
|
76544
|
+
handleItemClick(item);
|
|
76545
|
+
setIsCommandOpen(false);
|
|
76546
|
+
},
|
|
76547
|
+
children: [
|
|
76548
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
76549
|
+
item.icon && /* @__PURE__ */ jsx("span", { children: item.icon }),
|
|
76550
|
+
item.title
|
|
76551
|
+
] }),
|
|
76552
|
+
item.badge && /* @__PURE__ */ jsx(
|
|
76553
|
+
MoonUIBadgePro,
|
|
76554
|
+
{
|
|
76555
|
+
variant: item.badgeVariant || "secondary",
|
|
76556
|
+
className: "ml-auto",
|
|
76557
|
+
children: item.badge
|
|
76558
|
+
}
|
|
76559
|
+
),
|
|
76560
|
+
item.description && enableCommandAI && /* @__PURE__ */ jsx("span", { className: "ml-2 text-xs text-muted-foreground", children: item.description })
|
|
76561
|
+
]
|
|
76562
|
+
},
|
|
76563
|
+
item.id
|
|
76564
|
+
))
|
|
76322
76565
|
},
|
|
76323
|
-
|
|
76324
|
-
)
|
|
76566
|
+
section.id
|
|
76567
|
+
);
|
|
76325
76568
|
}),
|
|
76326
76569
|
enableCommandAI && userMenu?.items && /* @__PURE__ */ jsx(MoonUICommandGroupPro, { heading: "Account", children: userMenu.items.map((item) => /* @__PURE__ */ jsx(
|
|
76327
76570
|
MoonUICommandItemPro,
|