@amogads/ui 1.1.0 → 1.1.1
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/README.md +295 -295
- package/dist/index.js +2393 -766
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2448 -768
- package/dist/index.mjs.map +1 -1
- package/dist/pages.js +5920 -5767
- package/dist/pages.js.map +1 -1
- package/dist/pages.mjs +5931 -5722
- package/dist/pages.mjs.map +1 -1
- package/package.json +257 -257
package/dist/index.mjs
CHANGED
|
@@ -8919,151 +8919,381 @@ async function downloadQrCode(value, filename, size = 400) {
|
|
|
8919
8919
|
}
|
|
8920
8920
|
|
|
8921
8921
|
// src/design-system/components/chat/chat-bubble.tsx
|
|
8922
|
-
import {
|
|
8923
|
-
|
|
8922
|
+
import {
|
|
8923
|
+
Check as Check3,
|
|
8924
|
+
CheckCheck,
|
|
8925
|
+
Clock,
|
|
8926
|
+
AlertCircle,
|
|
8927
|
+
Download,
|
|
8928
|
+
FileText,
|
|
8929
|
+
MapPin,
|
|
8930
|
+
Eye as Eye2,
|
|
8931
|
+
MoreHorizontal as MoreHorizontal2,
|
|
8932
|
+
CornerUpLeft,
|
|
8933
|
+
CornerUpRight,
|
|
8934
|
+
Pin,
|
|
8935
|
+
Star,
|
|
8936
|
+
Heart,
|
|
8937
|
+
Flag,
|
|
8938
|
+
Archive,
|
|
8939
|
+
Bell,
|
|
8940
|
+
Trash2,
|
|
8941
|
+
ChevronRight as ChevronRight4,
|
|
8942
|
+
ThumbsUp,
|
|
8943
|
+
ThumbsDown,
|
|
8944
|
+
Copy,
|
|
8945
|
+
Share2
|
|
8946
|
+
} from "lucide-react";
|
|
8947
|
+
import { jsx as jsx77, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
8924
8948
|
function ChatBubble({
|
|
8925
8949
|
id,
|
|
8926
8950
|
content,
|
|
8927
8951
|
isOwn = false,
|
|
8928
|
-
senderName,
|
|
8952
|
+
senderName = "Mohammed Aman",
|
|
8929
8953
|
senderAvatar,
|
|
8930
8954
|
time,
|
|
8931
|
-
status
|
|
8955
|
+
status,
|
|
8932
8956
|
attachments = [],
|
|
8933
8957
|
location,
|
|
8934
8958
|
reactions = [],
|
|
8935
8959
|
replyTo,
|
|
8936
8960
|
isHighlighted = false,
|
|
8961
|
+
showActions = true,
|
|
8937
8962
|
className,
|
|
8938
8963
|
bubbleClassName,
|
|
8939
8964
|
onReply,
|
|
8965
|
+
onForward,
|
|
8966
|
+
onPin,
|
|
8967
|
+
onStar,
|
|
8968
|
+
onFavorite,
|
|
8969
|
+
onFlag,
|
|
8970
|
+
onArchive,
|
|
8971
|
+
onActionThis,
|
|
8972
|
+
onDelete,
|
|
8973
|
+
onThumbsUp,
|
|
8974
|
+
onThumbsDown,
|
|
8975
|
+
onCopy,
|
|
8976
|
+
onShare,
|
|
8940
8977
|
onActionClick,
|
|
8941
8978
|
onAttachmentClick,
|
|
8979
|
+
onAttachmentPreview,
|
|
8942
8980
|
onLocationClick,
|
|
8943
8981
|
children
|
|
8944
8982
|
}) {
|
|
8945
8983
|
const formattedTime = time instanceof Date ? time.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : time;
|
|
8946
8984
|
const renderStatusIcon = () => {
|
|
8985
|
+
if (!status) return null;
|
|
8947
8986
|
switch (status) {
|
|
8948
8987
|
case "sending":
|
|
8949
|
-
return /* @__PURE__ */ jsx77(Clock, { className: "h-3 w-3 text-muted-foreground animate-spin" });
|
|
8988
|
+
return /* @__PURE__ */ jsx77(Clock, { className: "h-3.5 w-3.5 text-muted-foreground animate-spin shrink-0" });
|
|
8950
8989
|
case "sent":
|
|
8951
|
-
return /* @__PURE__ */ jsx77(Check3, { className: "h-3 w-3 text-muted-foreground" });
|
|
8990
|
+
return /* @__PURE__ */ jsx77(Check3, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" });
|
|
8952
8991
|
case "delivered":
|
|
8953
|
-
return /* @__PURE__ */ jsx77(CheckCheck, { className: "h-3 w-3 text-muted-foreground" });
|
|
8992
|
+
return /* @__PURE__ */ jsx77(CheckCheck, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" });
|
|
8954
8993
|
case "read":
|
|
8955
|
-
return /* @__PURE__ */ jsx77(CheckCheck, { className: "h-3 w-3 text-
|
|
8994
|
+
return /* @__PURE__ */ jsx77(CheckCheck, { className: "h-3.5 w-3.5 text-sky-500 shrink-0" });
|
|
8956
8995
|
case "failed":
|
|
8957
|
-
return /* @__PURE__ */ jsx77(AlertCircle, { className: "h-3 w-3 text-destructive" });
|
|
8996
|
+
return /* @__PURE__ */ jsx77(AlertCircle, { className: "h-3.5 w-3.5 text-destructive shrink-0" });
|
|
8958
8997
|
default:
|
|
8959
8998
|
return null;
|
|
8960
8999
|
}
|
|
8961
9000
|
};
|
|
9001
|
+
const handleCopy = () => {
|
|
9002
|
+
if (content) {
|
|
9003
|
+
navigator.clipboard?.writeText(content);
|
|
9004
|
+
}
|
|
9005
|
+
onCopy?.();
|
|
9006
|
+
};
|
|
9007
|
+
const imageAttachments = attachments.filter((att) => att.type === "image" || att.url?.match(/\.(jpeg|jpg|gif|png|webp)/i));
|
|
9008
|
+
const fileAttachments = attachments.filter((att) => att.type !== "image" && !att.url?.match(/\.(jpeg|jpg|gif|png|webp)/i));
|
|
9009
|
+
const initials = senderName.split(" ").map((n) => n[0]).join("").slice(0, 2).toUpperCase() || "MO";
|
|
8962
9010
|
return /* @__PURE__ */ jsxs40(
|
|
8963
9011
|
"div",
|
|
8964
9012
|
{
|
|
8965
9013
|
id: id ? `chat-bubble-${id}` : void 0,
|
|
8966
9014
|
className: cn(
|
|
8967
|
-
"group relative flex w-full gap-
|
|
8968
|
-
|
|
8969
|
-
isHighlighted && "bg-primary/5 rounded-lg px-2",
|
|
9015
|
+
"group relative flex w-full gap-3 py-2 transition-colors duration-150",
|
|
9016
|
+
isHighlighted && "bg-primary/5 rounded-xl px-2",
|
|
8970
9017
|
className
|
|
8971
9018
|
),
|
|
8972
9019
|
children: [
|
|
8973
|
-
|
|
8974
|
-
senderAvatar && /* @__PURE__ */ jsx77(AvatarImage, { src: senderAvatar, alt: senderName
|
|
8975
|
-
/* @__PURE__ */ jsx77(AvatarFallback, { className: "text-xs
|
|
9020
|
+
/* @__PURE__ */ jsxs40(Avatar, { className: "h-9 w-9 flex-shrink-0 mt-0.5 bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-300 font-semibold border border-border/50 rounded-full", children: [
|
|
9021
|
+
senderAvatar && /* @__PURE__ */ jsx77(AvatarImage, { src: senderAvatar, alt: senderName }),
|
|
9022
|
+
/* @__PURE__ */ jsx77(AvatarFallback, { className: "text-xs font-semibold", children: initials })
|
|
8976
9023
|
] }),
|
|
8977
|
-
/* @__PURE__ */ jsxs40("div", { className:
|
|
8978
|
-
|
|
9024
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex flex-col min-w-0 flex-1 items-start relative", children: [
|
|
9025
|
+
senderName && /* @__PURE__ */ jsx77("span", { className: "text-xs font-semibold text-foreground/85 mb-1", children: senderName }),
|
|
8979
9026
|
replyTo && /* @__PURE__ */ jsxs40(
|
|
8980
9027
|
"div",
|
|
8981
9028
|
{
|
|
8982
9029
|
onClick: onReply,
|
|
8983
|
-
className:
|
|
8984
|
-
"mb-1 cursor-pointer rounded-md border-l-2 p-1.5 text-xs transition-opacity hover:opacity-80",
|
|
8985
|
-
isOwn ? "border-primary-foreground/40 bg-primary/20 text-primary-foreground/90" : "border-primary bg-muted/60 text-muted-foreground"
|
|
8986
|
-
),
|
|
9030
|
+
className: "mb-1 cursor-pointer rounded-lg border-l-2 border-indigo-600 bg-muted/60 p-1.5 text-xs transition-opacity hover:opacity-80",
|
|
8987
9031
|
children: [
|
|
8988
9032
|
/* @__PURE__ */ jsx77("div", { className: "font-medium text-[10px]", children: replyTo.senderName || "Replying to message" }),
|
|
8989
|
-
/* @__PURE__ */ jsx77("div", { className: "line-clamp-1 text-[11px]", children: replyTo.content })
|
|
9033
|
+
/* @__PURE__ */ jsx77("div", { className: "line-clamp-1 text-[11px] text-muted-foreground", children: replyTo.content })
|
|
8990
9034
|
]
|
|
8991
9035
|
}
|
|
8992
9036
|
),
|
|
8993
|
-
/* @__PURE__ */ jsxs40(
|
|
8994
|
-
"
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
] })
|
|
9020
|
-
] }),
|
|
9021
|
-
/* @__PURE__ */ jsx77(Download, { className: "h-3.5 w-3.5 shrink-0 opacity-70 hover:opacity-100" })
|
|
9022
|
-
]
|
|
9023
|
-
},
|
|
9024
|
-
att.id || idx
|
|
9025
|
-
)) }),
|
|
9026
|
-
location && /* @__PURE__ */ jsxs40(
|
|
9027
|
-
"div",
|
|
9028
|
-
{
|
|
9029
|
-
onClick: () => onLocationClick?.(location),
|
|
9030
|
-
className: cn(
|
|
9031
|
-
"mt-2 flex items-center gap-2 rounded-lg p-2 transition cursor-pointer",
|
|
9032
|
-
isOwn ? "bg-primary-foreground/10" : "bg-background border border-border/40"
|
|
9033
|
-
),
|
|
9034
|
-
children: [
|
|
9035
|
-
/* @__PURE__ */ jsx77(MapPin, { className: "h-4 w-4 shrink-0 text-red-500" }),
|
|
9036
|
-
/* @__PURE__ */ jsxs40("div", { className: "text-xs truncate", children: [
|
|
9037
|
-
/* @__PURE__ */ jsx77("p", { className: "font-medium", children: "Location Shared" }),
|
|
9038
|
-
/* @__PURE__ */ jsx77("p", { className: "text-[10px] opacity-75", children: location.address || `${location.latitude.toFixed(4)}, ${location.longitude.toFixed(4)}` })
|
|
9039
|
-
] })
|
|
9040
|
-
]
|
|
9041
|
-
}
|
|
9042
|
-
)
|
|
9043
|
-
] }),
|
|
9044
|
-
/* @__PURE__ */ jsxs40(
|
|
9045
|
-
"div",
|
|
9046
|
-
{
|
|
9047
|
-
className: cn(
|
|
9048
|
-
"mt-1 flex items-center justify-end gap-1 text-[10px] select-none",
|
|
9049
|
-
isOwn ? "text-primary-foreground/75" : "text-muted-foreground"
|
|
9037
|
+
children ? children : /* @__PURE__ */ jsxs40("div", { className: "space-y-2 w-full", children: [
|
|
9038
|
+
content && /* @__PURE__ */ jsx77("p", { className: "text-sm font-medium text-foreground whitespace-pre-wrap leading-relaxed", children: content }),
|
|
9039
|
+
fileAttachments.map((att, idx) => /* @__PURE__ */ jsxs40(
|
|
9040
|
+
"div",
|
|
9041
|
+
{
|
|
9042
|
+
className: "w-full max-w-[340px] rounded-2xl border border-border/80 bg-background p-3.5 flex items-center justify-between gap-3 shadow-2xs hover:border-border transition-all duration-150",
|
|
9043
|
+
children: [
|
|
9044
|
+
/* @__PURE__ */ jsx77("div", { className: "flex h-11 w-11 items-center justify-center rounded-xl bg-amber-500/10 text-amber-600 dark:bg-amber-950/40 dark:text-amber-400 shrink-0", children: /* @__PURE__ */ jsx77(FileText, { className: "h-5 w-5" }) }),
|
|
9045
|
+
/* @__PURE__ */ jsxs40("div", { className: "min-w-0 flex-1", children: [
|
|
9046
|
+
/* @__PURE__ */ jsx77("h5", { className: "truncate text-xs font-bold text-foreground", children: att.name }),
|
|
9047
|
+
/* @__PURE__ */ jsxs40("p", { className: "text-[11px] text-muted-foreground", children: [
|
|
9048
|
+
att.size ? `${(att.size / 1024).toFixed(0)} KB \u2022 ` : "",
|
|
9049
|
+
att.type?.toUpperCase() || "PDF"
|
|
9050
|
+
] }),
|
|
9051
|
+
att.statusText && /* @__PURE__ */ jsx77("span", { className: "inline-block text-[11px] font-semibold text-emerald-600 dark:text-emerald-400", children: att.statusText })
|
|
9052
|
+
] }),
|
|
9053
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-1 shrink-0 text-muted-foreground", children: [
|
|
9054
|
+
/* @__PURE__ */ jsx77(
|
|
9055
|
+
"button",
|
|
9056
|
+
{
|
|
9057
|
+
type: "button",
|
|
9058
|
+
onClick: () => onAttachmentPreview?.(att),
|
|
9059
|
+
className: "p-1 rounded-md hover:bg-muted hover:text-foreground transition-colors cursor-pointer",
|
|
9060
|
+
title: "Preview",
|
|
9061
|
+
children: /* @__PURE__ */ jsx77(Eye2, { className: "h-4 w-4" })
|
|
9062
|
+
}
|
|
9050
9063
|
),
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
|
|
9064
|
+
/* @__PURE__ */ jsx77(
|
|
9065
|
+
"button",
|
|
9066
|
+
{
|
|
9067
|
+
type: "button",
|
|
9068
|
+
onClick: () => onAttachmentClick?.(att),
|
|
9069
|
+
className: "p-1 rounded-md hover:bg-muted hover:text-foreground transition-colors cursor-pointer",
|
|
9070
|
+
title: "Download",
|
|
9071
|
+
children: /* @__PURE__ */ jsx77(Download, { className: "h-4 w-4" })
|
|
9072
|
+
}
|
|
9073
|
+
)
|
|
9074
|
+
] })
|
|
9075
|
+
]
|
|
9076
|
+
},
|
|
9077
|
+
att.id || idx
|
|
9078
|
+
)),
|
|
9079
|
+
location && /* @__PURE__ */ jsxs40(
|
|
9080
|
+
"div",
|
|
9081
|
+
{
|
|
9082
|
+
onClick: () => onLocationClick?.(location),
|
|
9083
|
+
className: "w-full max-w-[340px] rounded-2xl border border-border/80 bg-background overflow-hidden shadow-2xs cursor-pointer hover:border-border transition-all duration-150",
|
|
9084
|
+
children: [
|
|
9085
|
+
/* @__PURE__ */ jsxs40("div", { className: "relative h-36 w-full bg-slate-100 dark:bg-slate-900 flex items-center justify-center overflow-hidden", children: [
|
|
9086
|
+
/* @__PURE__ */ jsx77("div", { className: "absolute inset-0 bg-[radial-gradient(#cbd5e1_1px,transparent_1px)] dark:bg-[radial-gradient(#334155_1px,transparent_1px)] [background-size:16px_16px] opacity-70" }),
|
|
9087
|
+
/* @__PURE__ */ jsx77("div", { className: "relative z-10 flex h-10 w-10 items-center justify-center rounded-full bg-emerald-600 text-white shadow-md", children: /* @__PURE__ */ jsx77(MapPin, { className: "h-5 w-5 fill-white text-emerald-600" }) }),
|
|
9088
|
+
/* @__PURE__ */ jsx77("div", { className: "absolute bottom-1 left-2 rounded bg-background/80 px-1.5 py-0.5 text-[9px] text-muted-foreground backdrop-blur-xs", children: "\xA9 CARTO, \xA9 OpenStreetMap" })
|
|
9089
|
+
] }),
|
|
9090
|
+
/* @__PURE__ */ jsxs40("div", { className: "p-3 flex items-start gap-2.5 bg-muted/30", children: [
|
|
9091
|
+
/* @__PURE__ */ jsx77("div", { className: "flex h-6 w-6 items-center justify-center rounded-full bg-emerald-500/10 text-emerald-600 shrink-0 mt-0.5", children: /* @__PURE__ */ jsx77(MapPin, { className: "h-3.5 w-3.5 text-emerald-600" }) }),
|
|
9092
|
+
/* @__PURE__ */ jsxs40("div", { className: "min-w-0 flex-1", children: [
|
|
9093
|
+
/* @__PURE__ */ jsx77("h5", { className: "text-xs font-bold text-foreground", children: location.title || "Current Location" }),
|
|
9094
|
+
/* @__PURE__ */ jsx77("p", { className: "text-[11px] text-muted-foreground truncate", children: location.address || `${location.latitude.toFixed(4)}, ${location.longitude.toFixed(4)}` })
|
|
9095
|
+
] })
|
|
9096
|
+
] })
|
|
9097
|
+
]
|
|
9098
|
+
}
|
|
9099
|
+
),
|
|
9100
|
+
imageAttachments.map((img, idx) => /* @__PURE__ */ jsx77(
|
|
9101
|
+
"div",
|
|
9102
|
+
{
|
|
9103
|
+
onClick: () => onAttachmentClick?.(img),
|
|
9104
|
+
className: "w-full max-w-[340px] rounded-2xl overflow-hidden border border-border/80 bg-background shadow-2xs cursor-pointer group/img",
|
|
9105
|
+
children: img.url ? /* @__PURE__ */ jsx77(
|
|
9106
|
+
"img",
|
|
9107
|
+
{
|
|
9108
|
+
src: img.url,
|
|
9109
|
+
alt: img.name,
|
|
9110
|
+
className: "w-full h-44 object-cover transition-transform duration-200 group-hover/img:scale-[1.02]"
|
|
9055
9111
|
}
|
|
9056
|
-
)
|
|
9057
|
-
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
|
|
9112
|
+
) : /* @__PURE__ */ jsx77("div", { className: "w-full h-44 bg-slate-900 flex items-center justify-center text-white text-xs", children: img.name })
|
|
9113
|
+
},
|
|
9114
|
+
img.id || idx
|
|
9115
|
+
))
|
|
9116
|
+
] }),
|
|
9117
|
+
/* @__PURE__ */ jsxs40("div", { className: "mt-1 flex items-center gap-1 text-[11px] text-muted-foreground select-none", children: [
|
|
9118
|
+
formattedTime && /* @__PURE__ */ jsx77("span", { children: formattedTime }),
|
|
9119
|
+
renderStatusIcon()
|
|
9120
|
+
] }),
|
|
9121
|
+
showActions && /* @__PURE__ */ jsx77("div", { className: "mt-1 opacity-0 group-hover:opacity-100 transition-opacity", children: /* @__PURE__ */ jsxs40("div", { className: "inline-flex items-center gap-2.5 rounded-full border border-border/80 bg-background/95 backdrop-blur-xs px-3 py-1 shadow-md", children: [
|
|
9122
|
+
/* @__PURE__ */ jsx77(
|
|
9123
|
+
"button",
|
|
9124
|
+
{
|
|
9125
|
+
type: "button",
|
|
9126
|
+
onClick: onThumbsUp,
|
|
9127
|
+
className: "p-0.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
9128
|
+
title: "Like",
|
|
9129
|
+
children: /* @__PURE__ */ jsx77(ThumbsUp, { className: "h-3.5 w-3.5" })
|
|
9130
|
+
}
|
|
9131
|
+
),
|
|
9132
|
+
/* @__PURE__ */ jsx77(
|
|
9133
|
+
"button",
|
|
9134
|
+
{
|
|
9135
|
+
type: "button",
|
|
9136
|
+
onClick: onThumbsDown,
|
|
9137
|
+
className: "p-0.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
9138
|
+
title: "Dislike",
|
|
9139
|
+
children: /* @__PURE__ */ jsx77(ThumbsDown, { className: "h-3.5 w-3.5" })
|
|
9140
|
+
}
|
|
9141
|
+
),
|
|
9142
|
+
/* @__PURE__ */ jsx77(
|
|
9143
|
+
"button",
|
|
9144
|
+
{
|
|
9145
|
+
type: "button",
|
|
9146
|
+
onClick: handleCopy,
|
|
9147
|
+
className: "p-0.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
9148
|
+
title: "Copy",
|
|
9149
|
+
children: /* @__PURE__ */ jsx77(Copy, { className: "h-3.5 w-3.5" })
|
|
9150
|
+
}
|
|
9151
|
+
),
|
|
9152
|
+
/* @__PURE__ */ jsx77(
|
|
9153
|
+
"button",
|
|
9154
|
+
{
|
|
9155
|
+
type: "button",
|
|
9156
|
+
onClick: onShare,
|
|
9157
|
+
className: "p-0.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
9158
|
+
title: "Share",
|
|
9159
|
+
children: /* @__PURE__ */ jsx77(Share2, { className: "h-3.5 w-3.5" })
|
|
9160
|
+
}
|
|
9161
|
+
),
|
|
9162
|
+
/* @__PURE__ */ jsxs40(DropdownMenu, { children: [
|
|
9163
|
+
/* @__PURE__ */ jsx77(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx77(
|
|
9164
|
+
"button",
|
|
9165
|
+
{
|
|
9166
|
+
type: "button",
|
|
9167
|
+
className: "p-0.5 text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
9168
|
+
title: "More actions",
|
|
9169
|
+
children: /* @__PURE__ */ jsx77(MoreHorizontal2, { className: "h-3.5 w-3.5" })
|
|
9170
|
+
}
|
|
9171
|
+
) }),
|
|
9172
|
+
/* @__PURE__ */ jsxs40(
|
|
9173
|
+
DropdownMenuContent,
|
|
9174
|
+
{
|
|
9175
|
+
align: "start",
|
|
9176
|
+
side: "top",
|
|
9177
|
+
sideOffset: 8,
|
|
9178
|
+
className: "w-48 rounded-2xl p-1.5 shadow-2xl border border-border/80 bg-background text-foreground space-y-0.5",
|
|
9179
|
+
children: [
|
|
9180
|
+
/* @__PURE__ */ jsxs40(
|
|
9181
|
+
DropdownMenuItem,
|
|
9182
|
+
{
|
|
9183
|
+
onClick: onReply,
|
|
9184
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9185
|
+
children: [
|
|
9186
|
+
/* @__PURE__ */ jsx77(CornerUpLeft, { className: "h-4 w-4 text-blue-600 shrink-0" }),
|
|
9187
|
+
/* @__PURE__ */ jsx77("span", { children: "Reply" })
|
|
9188
|
+
]
|
|
9189
|
+
}
|
|
9190
|
+
),
|
|
9191
|
+
/* @__PURE__ */ jsxs40(
|
|
9192
|
+
DropdownMenuItem,
|
|
9193
|
+
{
|
|
9194
|
+
onClick: onForward,
|
|
9195
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9196
|
+
children: [
|
|
9197
|
+
/* @__PURE__ */ jsx77(CornerUpRight, { className: "h-4 w-4 text-sky-500 shrink-0" }),
|
|
9198
|
+
/* @__PURE__ */ jsx77("span", { children: "Forward" })
|
|
9199
|
+
]
|
|
9200
|
+
}
|
|
9201
|
+
),
|
|
9202
|
+
/* @__PURE__ */ jsxs40(
|
|
9203
|
+
DropdownMenuItem,
|
|
9204
|
+
{
|
|
9205
|
+
onClick: onPin,
|
|
9206
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9207
|
+
children: [
|
|
9208
|
+
/* @__PURE__ */ jsx77(Pin, { className: "h-4 w-4 text-purple-600 shrink-0" }),
|
|
9209
|
+
/* @__PURE__ */ jsx77("span", { children: "Pin Message" })
|
|
9210
|
+
]
|
|
9211
|
+
}
|
|
9212
|
+
),
|
|
9213
|
+
/* @__PURE__ */ jsxs40(
|
|
9214
|
+
DropdownMenuItem,
|
|
9215
|
+
{
|
|
9216
|
+
onClick: onStar,
|
|
9217
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9218
|
+
children: [
|
|
9219
|
+
/* @__PURE__ */ jsx77(Star, { className: "h-4 w-4 text-amber-500 shrink-0" }),
|
|
9220
|
+
/* @__PURE__ */ jsx77("span", { children: "Star" })
|
|
9221
|
+
]
|
|
9222
|
+
}
|
|
9223
|
+
),
|
|
9224
|
+
/* @__PURE__ */ jsxs40(
|
|
9225
|
+
DropdownMenuItem,
|
|
9226
|
+
{
|
|
9227
|
+
onClick: onFavorite,
|
|
9228
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9229
|
+
children: [
|
|
9230
|
+
/* @__PURE__ */ jsx77(Heart, { className: "h-4 w-4 text-rose-500 shrink-0" }),
|
|
9231
|
+
/* @__PURE__ */ jsx77("span", { children: "Favorite" })
|
|
9232
|
+
]
|
|
9233
|
+
}
|
|
9234
|
+
),
|
|
9235
|
+
/* @__PURE__ */ jsxs40(
|
|
9236
|
+
DropdownMenuItem,
|
|
9237
|
+
{
|
|
9238
|
+
onClick: onFlag,
|
|
9239
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9240
|
+
children: [
|
|
9241
|
+
/* @__PURE__ */ jsx77(Flag, { className: "h-4 w-4 text-red-600 shrink-0" }),
|
|
9242
|
+
/* @__PURE__ */ jsx77("span", { children: "Flag" })
|
|
9243
|
+
]
|
|
9244
|
+
}
|
|
9245
|
+
),
|
|
9246
|
+
/* @__PURE__ */ jsxs40(
|
|
9247
|
+
DropdownMenuItem,
|
|
9248
|
+
{
|
|
9249
|
+
onClick: onArchive,
|
|
9250
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9251
|
+
children: [
|
|
9252
|
+
/* @__PURE__ */ jsx77(Archive, { className: "h-4 w-4 text-indigo-600 shrink-0" }),
|
|
9253
|
+
/* @__PURE__ */ jsx77("span", { children: "Archive" })
|
|
9254
|
+
]
|
|
9255
|
+
}
|
|
9256
|
+
),
|
|
9257
|
+
/* @__PURE__ */ jsxs40(
|
|
9258
|
+
DropdownMenuItem,
|
|
9259
|
+
{
|
|
9260
|
+
onClick: onActionThis,
|
|
9261
|
+
className: "flex items-center justify-between py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9262
|
+
children: [
|
|
9263
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-2.5", children: [
|
|
9264
|
+
/* @__PURE__ */ jsx77(Bell, { className: "h-4 w-4 text-orange-500 shrink-0" }),
|
|
9265
|
+
/* @__PURE__ */ jsx77("span", { children: "Action This" })
|
|
9266
|
+
] }),
|
|
9267
|
+
/* @__PURE__ */ jsx77(ChevronRight4, { className: "h-3.5 w-3.5 text-muted-foreground" })
|
|
9268
|
+
]
|
|
9269
|
+
}
|
|
9270
|
+
),
|
|
9271
|
+
/* @__PURE__ */ jsxs40(
|
|
9272
|
+
DropdownMenuItem,
|
|
9273
|
+
{
|
|
9274
|
+
onClick: onDelete,
|
|
9275
|
+
className: "flex items-center justify-between py-1.5 px-2 text-xs font-semibold text-rose-500 hover:text-rose-600 hover:bg-rose-50 dark:hover:bg-rose-950/30 cursor-pointer rounded-xl",
|
|
9276
|
+
children: [
|
|
9277
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-2.5", children: [
|
|
9278
|
+
/* @__PURE__ */ jsx77(Trash2, { className: "h-4 w-4 text-rose-500 shrink-0" }),
|
|
9279
|
+
/* @__PURE__ */ jsx77("span", { children: "Delete" })
|
|
9280
|
+
] }),
|
|
9281
|
+
/* @__PURE__ */ jsx77(ChevronRight4, { className: "h-3.5 w-3.5 text-rose-400" })
|
|
9282
|
+
]
|
|
9283
|
+
}
|
|
9284
|
+
)
|
|
9285
|
+
]
|
|
9286
|
+
}
|
|
9287
|
+
)
|
|
9288
|
+
] })
|
|
9289
|
+
] }) }),
|
|
9290
|
+
reactions.length > 0 && /* @__PURE__ */ jsx77("div", { className: "mt-1 flex flex-wrap gap-1", children: reactions.map((react, i) => /* @__PURE__ */ jsxs40(
|
|
9061
9291
|
"span",
|
|
9062
9292
|
{
|
|
9063
|
-
className: "inline-flex items-center gap-1 rounded-full border border-border/60 bg-background px-
|
|
9293
|
+
className: "inline-flex items-center gap-1 rounded-full border border-border/60 bg-background px-2 py-0.5 text-xs shadow-2xs cursor-pointer hover:bg-muted",
|
|
9064
9294
|
children: [
|
|
9065
9295
|
/* @__PURE__ */ jsx77("span", { children: react.emoji }),
|
|
9066
|
-
/* @__PURE__ */ jsx77("span", { className: "font-
|
|
9296
|
+
/* @__PURE__ */ jsx77("span", { className: "font-semibold text-[10px] text-muted-foreground", children: react.count })
|
|
9067
9297
|
]
|
|
9068
9298
|
},
|
|
9069
9299
|
i
|
|
@@ -9075,28 +9305,48 @@ function ChatBubble({
|
|
|
9075
9305
|
}
|
|
9076
9306
|
|
|
9077
9307
|
// src/design-system/components/chat/chat-input.tsx
|
|
9078
|
-
import { useRef as useRef3, useEffect as useEffect9 } from "react";
|
|
9079
|
-
import {
|
|
9308
|
+
import { useRef as useRef3, useEffect as useEffect9, useState as useState9 } from "react";
|
|
9309
|
+
import {
|
|
9310
|
+
Send,
|
|
9311
|
+
Paperclip,
|
|
9312
|
+
Smile,
|
|
9313
|
+
Mic,
|
|
9314
|
+
Camera,
|
|
9315
|
+
X as X2,
|
|
9316
|
+
ImagePlus,
|
|
9317
|
+
Video,
|
|
9318
|
+
FileText as FileText2,
|
|
9319
|
+
MapPin as MapPin2,
|
|
9320
|
+
FileImage,
|
|
9321
|
+
RefreshCw,
|
|
9322
|
+
Scan,
|
|
9323
|
+
ScanLine,
|
|
9324
|
+
FileCode2
|
|
9325
|
+
} from "lucide-react";
|
|
9080
9326
|
import { jsx as jsx78, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
9081
9327
|
function ChatInput({
|
|
9082
9328
|
value,
|
|
9083
9329
|
onChange,
|
|
9084
9330
|
onSend,
|
|
9085
|
-
placeholder = "
|
|
9331
|
+
placeholder = "Message",
|
|
9086
9332
|
disabled = false,
|
|
9087
9333
|
isLoading = false,
|
|
9088
9334
|
maxLength,
|
|
9089
9335
|
replyMessage,
|
|
9090
9336
|
showAttachments = true,
|
|
9091
9337
|
showEmoji = true,
|
|
9092
|
-
|
|
9338
|
+
showCamera = true,
|
|
9339
|
+
showVoice = true,
|
|
9093
9340
|
onAttachmentClick,
|
|
9341
|
+
onSelectAttachmentType,
|
|
9094
9342
|
onEmojiClick,
|
|
9343
|
+
onCameraClick,
|
|
9095
9344
|
onVoiceClick,
|
|
9096
9345
|
customActions,
|
|
9097
9346
|
className
|
|
9098
9347
|
}) {
|
|
9099
9348
|
const textareaRef = useRef3(null);
|
|
9349
|
+
const [isAttachOpen, setIsAttachOpen] = useState9(false);
|
|
9100
9350
|
const handleKeyDown = (e) => {
|
|
9101
9351
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
9102
9352
|
e.preventDefault();
|
|
@@ -9108,11 +9358,19 @@ function ChatInput({
|
|
|
9108
9358
|
useEffect9(() => {
|
|
9109
9359
|
if (textareaRef.current) {
|
|
9110
9360
|
textareaRef.current.style.height = "auto";
|
|
9111
|
-
textareaRef.current.style.height = `${Math.min(textareaRef.current.scrollHeight,
|
|
9361
|
+
textareaRef.current.style.height = `${Math.min(textareaRef.current.scrollHeight, 120)}px`;
|
|
9112
9362
|
}
|
|
9113
9363
|
}, [value]);
|
|
9114
|
-
|
|
9115
|
-
|
|
9364
|
+
const hasText = value.trim().length > 0;
|
|
9365
|
+
const handleSelectOption = (type) => {
|
|
9366
|
+
setIsAttachOpen(false);
|
|
9367
|
+
onSelectAttachmentType?.(type);
|
|
9368
|
+
if (type === "images" || type === "documents") {
|
|
9369
|
+
onAttachmentClick?.();
|
|
9370
|
+
}
|
|
9371
|
+
};
|
|
9372
|
+
return /* @__PURE__ */ jsxs41("div", { className: cn("flex flex-col gap-1 w-full", className), children: [
|
|
9373
|
+
replyMessage && /* @__PURE__ */ jsxs41("div", { className: "flex items-center justify-between rounded-t-xl border border-b-0 border-border/60 bg-muted/40 px-3 py-1.5 text-xs text-muted-foreground", children: [
|
|
9116
9374
|
/* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-1.5 truncate", children: [
|
|
9117
9375
|
/* @__PURE__ */ jsxs41("span", { className: "font-medium text-foreground", children: [
|
|
9118
9376
|
"Replying to ",
|
|
@@ -9125,40 +9383,13 @@ function ChatInput({
|
|
|
9125
9383
|
"button",
|
|
9126
9384
|
{
|
|
9127
9385
|
onClick: replyMessage.onClear,
|
|
9128
|
-
className: "ml-2 rounded-sm p-0.5 hover:bg-muted text-muted-foreground hover:text-foreground",
|
|
9386
|
+
className: "ml-2 rounded-sm p-0.5 hover:bg-muted text-muted-foreground hover:text-foreground cursor-pointer",
|
|
9129
9387
|
children: /* @__PURE__ */ jsx78(X2, { className: "h-3.5 w-3.5" })
|
|
9130
9388
|
}
|
|
9131
9389
|
)
|
|
9132
9390
|
] }),
|
|
9133
|
-
/* @__PURE__ */ jsxs41("div", { className: "flex items-
|
|
9134
|
-
|
|
9135
|
-
Button,
|
|
9136
|
-
{
|
|
9137
|
-
type: "button",
|
|
9138
|
-
variant: "ghost",
|
|
9139
|
-
size: "icon",
|
|
9140
|
-
onClick: onAttachmentClick,
|
|
9141
|
-
disabled: disabled || isLoading,
|
|
9142
|
-
className: "h-8 w-8 text-muted-foreground hover:text-foreground shrink-0 rounded-lg",
|
|
9143
|
-
children: /* @__PURE__ */ jsx78(Paperclip, { className: "h-4 w-4" })
|
|
9144
|
-
}
|
|
9145
|
-
),
|
|
9146
|
-
/* @__PURE__ */ jsx78(
|
|
9147
|
-
"textarea",
|
|
9148
|
-
{
|
|
9149
|
-
ref: textareaRef,
|
|
9150
|
-
value,
|
|
9151
|
-
onChange: (e) => onChange(e.target.value),
|
|
9152
|
-
onKeyDown: handleKeyDown,
|
|
9153
|
-
placeholder,
|
|
9154
|
-
disabled: disabled || isLoading,
|
|
9155
|
-
maxLength,
|
|
9156
|
-
rows: 1,
|
|
9157
|
-
className: "max-h-40 min-h-[36px] w-full resize-none bg-transparent px-2 py-1.5 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"
|
|
9158
|
-
}
|
|
9159
|
-
),
|
|
9160
|
-
/* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
9161
|
-
customActions,
|
|
9391
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-2", children: [
|
|
9392
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex flex-1 items-center gap-1.5 rounded-full border border-border/80 bg-background px-3 py-1.5 shadow-2xs transition-all focus-within:border-indigo-500/60 focus-within:ring-1 focus-within:ring-indigo-500/30", children: [
|
|
9162
9393
|
showEmoji && /* @__PURE__ */ jsx78(
|
|
9163
9394
|
Button,
|
|
9164
9395
|
{
|
|
@@ -9167,250 +9398,1685 @@ function ChatInput({
|
|
|
9167
9398
|
size: "icon",
|
|
9168
9399
|
onClick: onEmojiClick,
|
|
9169
9400
|
disabled: disabled || isLoading,
|
|
9170
|
-
className: "h-8 w-8 text-muted-foreground hover:text-foreground rounded-
|
|
9171
|
-
children: /* @__PURE__ */ jsx78(Smile, { className: "h-4 w-4" })
|
|
9401
|
+
className: "h-8 w-8 text-muted-foreground hover:text-foreground rounded-full shrink-0",
|
|
9402
|
+
children: /* @__PURE__ */ jsx78(Smile, { className: "h-4.5 w-4.5" })
|
|
9172
9403
|
}
|
|
9173
9404
|
),
|
|
9174
|
-
|
|
9175
|
-
|
|
9405
|
+
/* @__PURE__ */ jsx78(
|
|
9406
|
+
"textarea",
|
|
9176
9407
|
{
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9408
|
+
ref: textareaRef,
|
|
9409
|
+
value,
|
|
9410
|
+
onChange: (e) => onChange(e.target.value),
|
|
9411
|
+
onKeyDown: handleKeyDown,
|
|
9412
|
+
placeholder,
|
|
9181
9413
|
disabled: disabled || isLoading,
|
|
9182
|
-
|
|
9183
|
-
|
|
9414
|
+
maxLength,
|
|
9415
|
+
rows: 1,
|
|
9416
|
+
className: "max-h-28 min-h-[24px] w-full resize-none bg-transparent px-1 py-1 text-sm outline-none placeholder:text-muted-foreground/80 disabled:cursor-not-allowed disabled:opacity-50 leading-normal"
|
|
9184
9417
|
}
|
|
9185
9418
|
),
|
|
9186
|
-
/* @__PURE__ */
|
|
9419
|
+
showAttachments && /* @__PURE__ */ jsxs41(DropdownMenu, { open: isAttachOpen, onOpenChange: setIsAttachOpen, children: [
|
|
9420
|
+
/* @__PURE__ */ jsx78(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx78(
|
|
9421
|
+
Button,
|
|
9422
|
+
{
|
|
9423
|
+
type: "button",
|
|
9424
|
+
variant: "ghost",
|
|
9425
|
+
size: "icon",
|
|
9426
|
+
disabled: disabled || isLoading,
|
|
9427
|
+
className: "h-8 w-8 text-muted-foreground hover:text-foreground rounded-full shrink-0",
|
|
9428
|
+
title: "Attachments",
|
|
9429
|
+
children: /* @__PURE__ */ jsx78(Paperclip, { className: "h-4.5 w-4.5" })
|
|
9430
|
+
}
|
|
9431
|
+
) }),
|
|
9432
|
+
/* @__PURE__ */ jsxs41(DropdownMenuContent, { align: "end", side: "top", sideOffset: 8, className: "w-56 rounded-2xl p-1.5 shadow-xl border border-border/80 bg-background text-foreground", children: [
|
|
9433
|
+
/* @__PURE__ */ jsxs41(
|
|
9434
|
+
DropdownMenuItem,
|
|
9435
|
+
{
|
|
9436
|
+
onClick: () => handleSelectOption("images"),
|
|
9437
|
+
className: "gap-3 py-2 px-2.5 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9438
|
+
children: [
|
|
9439
|
+
/* @__PURE__ */ jsx78(ImagePlus, { className: "h-4 w-4 text-slate-600 dark:text-slate-400 shrink-0" }),
|
|
9440
|
+
/* @__PURE__ */ jsx78("span", { children: "Images" })
|
|
9441
|
+
]
|
|
9442
|
+
}
|
|
9443
|
+
),
|
|
9444
|
+
/* @__PURE__ */ jsxs41(
|
|
9445
|
+
DropdownMenuItem,
|
|
9446
|
+
{
|
|
9447
|
+
onClick: () => handleSelectOption("videos"),
|
|
9448
|
+
className: "gap-3 py-2 px-2.5 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9449
|
+
children: [
|
|
9450
|
+
/* @__PURE__ */ jsx78(Video, { className: "h-4 w-4 text-slate-600 dark:text-slate-400 shrink-0" }),
|
|
9451
|
+
/* @__PURE__ */ jsx78("span", { children: "Videos" })
|
|
9452
|
+
]
|
|
9453
|
+
}
|
|
9454
|
+
),
|
|
9455
|
+
/* @__PURE__ */ jsxs41(
|
|
9456
|
+
DropdownMenuItem,
|
|
9457
|
+
{
|
|
9458
|
+
onClick: () => handleSelectOption("documents"),
|
|
9459
|
+
className: "gap-3 py-2 px-2.5 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9460
|
+
children: [
|
|
9461
|
+
/* @__PURE__ */ jsx78(FileText2, { className: "h-4 w-4 text-slate-600 dark:text-slate-400 shrink-0" }),
|
|
9462
|
+
/* @__PURE__ */ jsx78("span", { children: "Documents" })
|
|
9463
|
+
]
|
|
9464
|
+
}
|
|
9465
|
+
),
|
|
9466
|
+
/* @__PURE__ */ jsxs41(
|
|
9467
|
+
DropdownMenuItem,
|
|
9468
|
+
{
|
|
9469
|
+
onClick: () => handleSelectOption("location"),
|
|
9470
|
+
className: "gap-3 py-2 px-2.5 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9471
|
+
children: [
|
|
9472
|
+
/* @__PURE__ */ jsx78(MapPin2, { className: "h-4 w-4 text-slate-600 dark:text-slate-400 shrink-0" }),
|
|
9473
|
+
/* @__PURE__ */ jsx78("span", { children: "Location" })
|
|
9474
|
+
]
|
|
9475
|
+
}
|
|
9476
|
+
),
|
|
9477
|
+
/* @__PURE__ */ jsxs41(
|
|
9478
|
+
DropdownMenuItem,
|
|
9479
|
+
{
|
|
9480
|
+
onClick: () => handleSelectOption("image-converter"),
|
|
9481
|
+
className: "gap-3 py-2 px-2.5 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9482
|
+
children: [
|
|
9483
|
+
/* @__PURE__ */ jsx78(FileImage, { className: "h-4 w-4 text-slate-600 dark:text-slate-400 shrink-0" }),
|
|
9484
|
+
/* @__PURE__ */ jsx78("span", { children: "Image Converter" })
|
|
9485
|
+
]
|
|
9486
|
+
}
|
|
9487
|
+
),
|
|
9488
|
+
/* @__PURE__ */ jsxs41(
|
|
9489
|
+
DropdownMenuItem,
|
|
9490
|
+
{
|
|
9491
|
+
onClick: () => handleSelectOption("doc-converter"),
|
|
9492
|
+
className: "gap-3 py-2 px-2.5 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9493
|
+
children: [
|
|
9494
|
+
/* @__PURE__ */ jsx78(RefreshCw, { className: "h-4 w-4 text-slate-600 dark:text-slate-400 shrink-0" }),
|
|
9495
|
+
/* @__PURE__ */ jsx78("span", { children: "Doc Converter" })
|
|
9496
|
+
]
|
|
9497
|
+
}
|
|
9498
|
+
),
|
|
9499
|
+
/* @__PURE__ */ jsxs41(
|
|
9500
|
+
DropdownMenuItem,
|
|
9501
|
+
{
|
|
9502
|
+
onClick: () => handleSelectOption("doc-scanner"),
|
|
9503
|
+
className: "gap-3 py-2 px-2.5 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9504
|
+
children: [
|
|
9505
|
+
/* @__PURE__ */ jsx78(Scan, { className: "h-4 w-4 text-slate-600 dark:text-slate-400 shrink-0" }),
|
|
9506
|
+
/* @__PURE__ */ jsx78("span", { children: "Doc Scanner" })
|
|
9507
|
+
]
|
|
9508
|
+
}
|
|
9509
|
+
),
|
|
9510
|
+
/* @__PURE__ */ jsxs41(
|
|
9511
|
+
DropdownMenuItem,
|
|
9512
|
+
{
|
|
9513
|
+
onClick: () => handleSelectOption("scan-document"),
|
|
9514
|
+
className: "gap-3 py-2 px-2.5 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9515
|
+
children: [
|
|
9516
|
+
/* @__PURE__ */ jsx78(ScanLine, { className: "h-4 w-4 text-slate-600 dark:text-slate-400 shrink-0" }),
|
|
9517
|
+
/* @__PURE__ */ jsx78("span", { children: "Scan Document" })
|
|
9518
|
+
]
|
|
9519
|
+
}
|
|
9520
|
+
),
|
|
9521
|
+
/* @__PURE__ */ jsxs41(
|
|
9522
|
+
DropdownMenuItem,
|
|
9523
|
+
{
|
|
9524
|
+
onClick: () => handleSelectOption("extract-text"),
|
|
9525
|
+
className: "gap-3 py-2 px-2.5 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9526
|
+
children: [
|
|
9527
|
+
/* @__PURE__ */ jsx78(FileCode2, { className: "h-4 w-4 text-slate-600 dark:text-slate-400 shrink-0" }),
|
|
9528
|
+
/* @__PURE__ */ jsx78("span", { children: "Extract Text" })
|
|
9529
|
+
]
|
|
9530
|
+
}
|
|
9531
|
+
)
|
|
9532
|
+
] })
|
|
9533
|
+
] }),
|
|
9534
|
+
showCamera && /* @__PURE__ */ jsx78(
|
|
9187
9535
|
Button,
|
|
9188
9536
|
{
|
|
9189
9537
|
type: "button",
|
|
9538
|
+
variant: "ghost",
|
|
9190
9539
|
size: "icon",
|
|
9191
|
-
onClick:
|
|
9192
|
-
disabled:
|
|
9193
|
-
className: "h-8 w-8
|
|
9194
|
-
|
|
9540
|
+
onClick: onCameraClick,
|
|
9541
|
+
disabled: disabled || isLoading,
|
|
9542
|
+
className: "h-8 w-8 text-muted-foreground hover:text-foreground rounded-full shrink-0",
|
|
9543
|
+
title: "Camera",
|
|
9544
|
+
children: /* @__PURE__ */ jsx78(Camera, { className: "h-4.5 w-4.5" })
|
|
9195
9545
|
}
|
|
9196
|
-
)
|
|
9197
|
-
|
|
9546
|
+
),
|
|
9547
|
+
customActions
|
|
9548
|
+
] }),
|
|
9549
|
+
hasText ? /* @__PURE__ */ jsx78(
|
|
9550
|
+
"button",
|
|
9551
|
+
{
|
|
9552
|
+
type: "button",
|
|
9553
|
+
onClick: onSend,
|
|
9554
|
+
disabled: disabled || isLoading,
|
|
9555
|
+
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-emerald-600 hover:bg-emerald-700 text-white shadow-md transition-transform active:scale-95 cursor-pointer disabled:opacity-50",
|
|
9556
|
+
title: "Send message",
|
|
9557
|
+
children: /* @__PURE__ */ jsx78(Send, { className: "h-4.5 w-4.5" })
|
|
9558
|
+
}
|
|
9559
|
+
) : showVoice ? /* @__PURE__ */ jsx78(
|
|
9560
|
+
"button",
|
|
9561
|
+
{
|
|
9562
|
+
type: "button",
|
|
9563
|
+
onClick: onVoiceClick,
|
|
9564
|
+
disabled: disabled || isLoading,
|
|
9565
|
+
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-emerald-600 hover:bg-emerald-700 text-white shadow-md transition-transform active:scale-95 cursor-pointer disabled:opacity-50",
|
|
9566
|
+
title: "Voice message",
|
|
9567
|
+
children: /* @__PURE__ */ jsx78(Mic, { className: "h-4.5 w-4.5" })
|
|
9568
|
+
}
|
|
9569
|
+
) : /* @__PURE__ */ jsx78(
|
|
9570
|
+
"button",
|
|
9571
|
+
{
|
|
9572
|
+
type: "button",
|
|
9573
|
+
onClick: onSend,
|
|
9574
|
+
disabled: true,
|
|
9575
|
+
className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-emerald-600/50 text-white shadow-md cursor-not-allowed",
|
|
9576
|
+
children: /* @__PURE__ */ jsx78(Send, { className: "h-4.5 w-4.5" })
|
|
9577
|
+
}
|
|
9578
|
+
)
|
|
9198
9579
|
] })
|
|
9199
9580
|
] });
|
|
9200
9581
|
}
|
|
9201
9582
|
|
|
9202
9583
|
// src/design-system/components/chat/chat-header.tsx
|
|
9584
|
+
import {
|
|
9585
|
+
Bell as Bell2,
|
|
9586
|
+
Flag as Flag2,
|
|
9587
|
+
MoreVertical,
|
|
9588
|
+
CornerUpLeft as CornerUpLeft2,
|
|
9589
|
+
CornerUpRight as CornerUpRight2,
|
|
9590
|
+
Pin as Pin2,
|
|
9591
|
+
Star as Star2,
|
|
9592
|
+
Heart as Heart2,
|
|
9593
|
+
Archive as Archive2,
|
|
9594
|
+
Trash2 as Trash22,
|
|
9595
|
+
ChevronRight as ChevronRight5
|
|
9596
|
+
} from "lucide-react";
|
|
9203
9597
|
import { jsx as jsx79, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
9204
9598
|
function ChatHeader({
|
|
9205
|
-
title,
|
|
9206
|
-
subtitle,
|
|
9599
|
+
title = "Mohammed Aman",
|
|
9600
|
+
subtitle = "Last seen today at 04:58 PM",
|
|
9601
|
+
avatarUrl,
|
|
9602
|
+
status = "online",
|
|
9603
|
+
isGroup = false,
|
|
9604
|
+
memberCount,
|
|
9605
|
+
actions,
|
|
9606
|
+
showDefaultActions = true,
|
|
9607
|
+
onAvatarClick,
|
|
9608
|
+
onNotificationClick,
|
|
9609
|
+
onFlagClick,
|
|
9610
|
+
onReply,
|
|
9611
|
+
onForward,
|
|
9612
|
+
onPin,
|
|
9613
|
+
onStar,
|
|
9614
|
+
onFavorite,
|
|
9615
|
+
onArchive,
|
|
9616
|
+
onActionThis,
|
|
9617
|
+
onDelete,
|
|
9618
|
+
className
|
|
9619
|
+
}) {
|
|
9620
|
+
const getStatusColor = () => {
|
|
9621
|
+
switch (status) {
|
|
9622
|
+
case "online":
|
|
9623
|
+
return "bg-emerald-500";
|
|
9624
|
+
case "away":
|
|
9625
|
+
return "bg-amber-500";
|
|
9626
|
+
case "busy":
|
|
9627
|
+
return "bg-red-500";
|
|
9628
|
+
default:
|
|
9629
|
+
return "bg-slate-400";
|
|
9630
|
+
}
|
|
9631
|
+
};
|
|
9632
|
+
const initials = title.split(" ").map((n) => n[0]).join("").slice(0, 2).toUpperCase() || "MO";
|
|
9633
|
+
return /* @__PURE__ */ jsxs42(
|
|
9634
|
+
"div",
|
|
9635
|
+
{
|
|
9636
|
+
className: cn(
|
|
9637
|
+
"flex items-center justify-between border-b border-border/80 bg-background/95 px-4 py-3 backdrop-blur-xs select-none",
|
|
9638
|
+
className
|
|
9639
|
+
),
|
|
9640
|
+
children: [
|
|
9641
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
9642
|
+
/* @__PURE__ */ jsxs42("div", { className: "relative cursor-pointer", onClick: onAvatarClick, children: [
|
|
9643
|
+
/* @__PURE__ */ jsxs42(Avatar, { className: "h-10 w-10 border border-border/60 shadow-2xs rounded-full", children: [
|
|
9644
|
+
avatarUrl && /* @__PURE__ */ jsx79(AvatarImage, { src: avatarUrl, alt: title }),
|
|
9645
|
+
/* @__PURE__ */ jsx79(AvatarFallback, { className: "bg-slate-100 dark:bg-slate-800 text-slate-700 dark:text-slate-200 text-xs font-bold", children: initials })
|
|
9646
|
+
] }),
|
|
9647
|
+
!isGroup && /* @__PURE__ */ jsx79(
|
|
9648
|
+
"span",
|
|
9649
|
+
{
|
|
9650
|
+
className: cn(
|
|
9651
|
+
"absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full ring-2 ring-background",
|
|
9652
|
+
getStatusColor()
|
|
9653
|
+
)
|
|
9654
|
+
}
|
|
9655
|
+
)
|
|
9656
|
+
] }),
|
|
9657
|
+
/* @__PURE__ */ jsxs42("div", { className: "min-w-0 flex-1", children: [
|
|
9658
|
+
/* @__PURE__ */ jsx79("h2", { className: "truncate text-sm font-bold text-foreground tracking-tight leading-snug", children: title }),
|
|
9659
|
+
/* @__PURE__ */ jsx79("p", { className: "truncate text-xs text-muted-foreground", children: subtitle ? subtitle : isGroup ? `${memberCount || 0} members` : /* @__PURE__ */ jsx79("span", { className: "capitalize", children: status }) })
|
|
9660
|
+
] })
|
|
9661
|
+
] }),
|
|
9662
|
+
/* @__PURE__ */ jsx79("div", { className: "flex items-center gap-1.5 shrink-0", children: actions ? actions : showDefaultActions ? /* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-1", children: [
|
|
9663
|
+
/* @__PURE__ */ jsx79(
|
|
9664
|
+
"button",
|
|
9665
|
+
{
|
|
9666
|
+
type: "button",
|
|
9667
|
+
onClick: onNotificationClick,
|
|
9668
|
+
className: "flex h-8 w-8 items-center justify-center rounded-full text-amber-500 hover:bg-amber-500/10 transition-colors cursor-pointer",
|
|
9669
|
+
title: "Notifications",
|
|
9670
|
+
children: /* @__PURE__ */ jsx79(Bell2, { className: "h-4 w-4 fill-amber-500/20 text-amber-500" })
|
|
9671
|
+
}
|
|
9672
|
+
),
|
|
9673
|
+
/* @__PURE__ */ jsx79(
|
|
9674
|
+
"button",
|
|
9675
|
+
{
|
|
9676
|
+
type: "button",
|
|
9677
|
+
onClick: onFlagClick,
|
|
9678
|
+
className: "flex h-8 w-8 items-center justify-center rounded-full text-muted-foreground hover:text-red-500 hover:bg-red-500/10 transition-colors cursor-pointer",
|
|
9679
|
+
title: "Flag",
|
|
9680
|
+
children: /* @__PURE__ */ jsx79(Flag2, { className: "h-4 w-4" })
|
|
9681
|
+
}
|
|
9682
|
+
),
|
|
9683
|
+
/* @__PURE__ */ jsxs42(DropdownMenu, { children: [
|
|
9684
|
+
/* @__PURE__ */ jsx79(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx79(
|
|
9685
|
+
"button",
|
|
9686
|
+
{
|
|
9687
|
+
type: "button",
|
|
9688
|
+
className: "flex h-8 w-8 items-center justify-center rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors cursor-pointer",
|
|
9689
|
+
title: "More actions",
|
|
9690
|
+
children: /* @__PURE__ */ jsx79(MoreVertical, { className: "h-4 w-4" })
|
|
9691
|
+
}
|
|
9692
|
+
) }),
|
|
9693
|
+
/* @__PURE__ */ jsxs42(
|
|
9694
|
+
DropdownMenuContent,
|
|
9695
|
+
{
|
|
9696
|
+
align: "end",
|
|
9697
|
+
sideOffset: 6,
|
|
9698
|
+
className: "w-48 rounded-2xl p-1.5 shadow-2xl border border-border/80 bg-background text-foreground space-y-0.5",
|
|
9699
|
+
children: [
|
|
9700
|
+
/* @__PURE__ */ jsxs42(
|
|
9701
|
+
DropdownMenuItem,
|
|
9702
|
+
{
|
|
9703
|
+
onClick: onReply,
|
|
9704
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9705
|
+
children: [
|
|
9706
|
+
/* @__PURE__ */ jsx79(CornerUpLeft2, { className: "h-4 w-4 text-blue-600 shrink-0" }),
|
|
9707
|
+
/* @__PURE__ */ jsx79("span", { children: "Reply" })
|
|
9708
|
+
]
|
|
9709
|
+
}
|
|
9710
|
+
),
|
|
9711
|
+
/* @__PURE__ */ jsxs42(
|
|
9712
|
+
DropdownMenuItem,
|
|
9713
|
+
{
|
|
9714
|
+
onClick: onForward,
|
|
9715
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9716
|
+
children: [
|
|
9717
|
+
/* @__PURE__ */ jsx79(CornerUpRight2, { className: "h-4 w-4 text-sky-500 shrink-0" }),
|
|
9718
|
+
/* @__PURE__ */ jsx79("span", { children: "Forward" })
|
|
9719
|
+
]
|
|
9720
|
+
}
|
|
9721
|
+
),
|
|
9722
|
+
/* @__PURE__ */ jsxs42(
|
|
9723
|
+
DropdownMenuItem,
|
|
9724
|
+
{
|
|
9725
|
+
onClick: onPin,
|
|
9726
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9727
|
+
children: [
|
|
9728
|
+
/* @__PURE__ */ jsx79(Pin2, { className: "h-4 w-4 text-purple-600 shrink-0" }),
|
|
9729
|
+
/* @__PURE__ */ jsx79("span", { children: "Pin Message" })
|
|
9730
|
+
]
|
|
9731
|
+
}
|
|
9732
|
+
),
|
|
9733
|
+
/* @__PURE__ */ jsxs42(
|
|
9734
|
+
DropdownMenuItem,
|
|
9735
|
+
{
|
|
9736
|
+
onClick: onStar,
|
|
9737
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9738
|
+
children: [
|
|
9739
|
+
/* @__PURE__ */ jsx79(Star2, { className: "h-4 w-4 text-amber-500 shrink-0" }),
|
|
9740
|
+
/* @__PURE__ */ jsx79("span", { children: "Star" })
|
|
9741
|
+
]
|
|
9742
|
+
}
|
|
9743
|
+
),
|
|
9744
|
+
/* @__PURE__ */ jsxs42(
|
|
9745
|
+
DropdownMenuItem,
|
|
9746
|
+
{
|
|
9747
|
+
onClick: onFavorite,
|
|
9748
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9749
|
+
children: [
|
|
9750
|
+
/* @__PURE__ */ jsx79(Heart2, { className: "h-4 w-4 text-rose-500 shrink-0" }),
|
|
9751
|
+
/* @__PURE__ */ jsx79("span", { children: "Favorite" })
|
|
9752
|
+
]
|
|
9753
|
+
}
|
|
9754
|
+
),
|
|
9755
|
+
/* @__PURE__ */ jsxs42(
|
|
9756
|
+
DropdownMenuItem,
|
|
9757
|
+
{
|
|
9758
|
+
onClick: onArchive,
|
|
9759
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9760
|
+
children: [
|
|
9761
|
+
/* @__PURE__ */ jsx79(Archive2, { className: "h-4 w-4 text-indigo-600 shrink-0" }),
|
|
9762
|
+
/* @__PURE__ */ jsx79("span", { children: "Archive" })
|
|
9763
|
+
]
|
|
9764
|
+
}
|
|
9765
|
+
),
|
|
9766
|
+
/* @__PURE__ */ jsxs42(
|
|
9767
|
+
DropdownMenuItem,
|
|
9768
|
+
{
|
|
9769
|
+
onClick: onActionThis,
|
|
9770
|
+
className: "flex items-center justify-between py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
9771
|
+
children: [
|
|
9772
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-2.5", children: [
|
|
9773
|
+
/* @__PURE__ */ jsx79(Bell2, { className: "h-4 w-4 text-orange-500 shrink-0" }),
|
|
9774
|
+
/* @__PURE__ */ jsx79("span", { children: "Action This" })
|
|
9775
|
+
] }),
|
|
9776
|
+
/* @__PURE__ */ jsx79(ChevronRight5, { className: "h-3.5 w-3.5 text-muted-foreground" })
|
|
9777
|
+
]
|
|
9778
|
+
}
|
|
9779
|
+
),
|
|
9780
|
+
/* @__PURE__ */ jsxs42(
|
|
9781
|
+
DropdownMenuItem,
|
|
9782
|
+
{
|
|
9783
|
+
onClick: onDelete,
|
|
9784
|
+
className: "flex items-center justify-between py-1.5 px-2 text-xs font-semibold text-rose-500 hover:text-rose-600 hover:bg-rose-50 dark:hover:bg-rose-950/30 cursor-pointer rounded-xl",
|
|
9785
|
+
children: [
|
|
9786
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-2.5", children: [
|
|
9787
|
+
/* @__PURE__ */ jsx79(Trash22, { className: "h-4 w-4 text-rose-500 shrink-0" }),
|
|
9788
|
+
/* @__PURE__ */ jsx79("span", { children: "Delete" })
|
|
9789
|
+
] }),
|
|
9790
|
+
/* @__PURE__ */ jsx79(ChevronRight5, { className: "h-3.5 w-3.5 text-rose-400" })
|
|
9791
|
+
]
|
|
9792
|
+
}
|
|
9793
|
+
)
|
|
9794
|
+
]
|
|
9795
|
+
}
|
|
9796
|
+
)
|
|
9797
|
+
] })
|
|
9798
|
+
] }) : null })
|
|
9799
|
+
]
|
|
9800
|
+
}
|
|
9801
|
+
);
|
|
9802
|
+
}
|
|
9803
|
+
|
|
9804
|
+
// src/design-system/components/chat/typing-indicator.tsx
|
|
9805
|
+
import { jsx as jsx80, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
9806
|
+
function TypingIndicator({ label = "Typing...", avatarUrl, className }) {
|
|
9807
|
+
return /* @__PURE__ */ jsxs43("div", { className: cn("flex items-center gap-2 px-3 py-1.5 text-xs text-muted-foreground", className), children: [
|
|
9808
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-1 rounded-full bg-muted/80 px-2.5 py-1.5 border border-border/50", children: [
|
|
9809
|
+
/* @__PURE__ */ jsx80("span", { className: "h-1.5 w-1.5 rounded-full bg-primary/70 animate-bounce [animation-delay:-0.3s]" }),
|
|
9810
|
+
/* @__PURE__ */ jsx80("span", { className: "h-1.5 w-1.5 rounded-full bg-primary/70 animate-bounce [animation-delay:-0.15s]" }),
|
|
9811
|
+
/* @__PURE__ */ jsx80("span", { className: "h-1.5 w-1.5 rounded-full bg-primary/70 animate-bounce" })
|
|
9812
|
+
] }),
|
|
9813
|
+
label && /* @__PURE__ */ jsx80("span", { className: "text-[11px] font-normal italic", children: label })
|
|
9814
|
+
] });
|
|
9815
|
+
}
|
|
9816
|
+
|
|
9817
|
+
// src/design-system/components/chat/chat-empty-state.tsx
|
|
9818
|
+
import { MessageSquareDashed } from "lucide-react";
|
|
9819
|
+
import { jsx as jsx81, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
9820
|
+
function ChatEmptyState({
|
|
9821
|
+
title = "No conversation selected",
|
|
9822
|
+
description = "Choose a chat from the sidebar or start a new conversation to begin messaging.",
|
|
9823
|
+
icon,
|
|
9824
|
+
action,
|
|
9825
|
+
className
|
|
9826
|
+
}) {
|
|
9827
|
+
return /* @__PURE__ */ jsxs44("div", { className: cn("flex flex-1 flex-col items-center justify-center p-8 text-center bg-muted/20", className), children: [
|
|
9828
|
+
/* @__PURE__ */ jsx81("div", { className: "flex h-16 w-16 items-center justify-center rounded-2xl bg-muted/80 text-muted-foreground mb-4 shadow-xs", children: icon || /* @__PURE__ */ jsx81(MessageSquareDashed, { className: "h-8 w-8 text-primary/70" }) }),
|
|
9829
|
+
/* @__PURE__ */ jsx81("h3", { className: "text-base font-semibold text-foreground tracking-tight mb-1", children: title }),
|
|
9830
|
+
/* @__PURE__ */ jsx81("p", { className: "text-xs text-muted-foreground max-w-sm leading-relaxed mb-4", children: description }),
|
|
9831
|
+
action && /* @__PURE__ */ jsx81("div", { children: action })
|
|
9832
|
+
] });
|
|
9833
|
+
}
|
|
9834
|
+
|
|
9835
|
+
// src/design-system/components/chat/chat-card-item.tsx
|
|
9836
|
+
import { Users, MoreHorizontal as MoreHorizontal3 } from "lucide-react";
|
|
9837
|
+
import { jsx as jsx82, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
9838
|
+
function ChatCardItem({
|
|
9839
|
+
id,
|
|
9840
|
+
title,
|
|
9841
|
+
badgeLabel = "Chat",
|
|
9842
|
+
lastMessage,
|
|
9843
|
+
time,
|
|
9844
|
+
membersCount = 2,
|
|
9845
|
+
onlineCount = 0,
|
|
9846
|
+
unreadCount = 0,
|
|
9847
|
+
isActive = false,
|
|
9848
|
+
isGroup = false,
|
|
9849
|
+
onClick,
|
|
9850
|
+
onMoreClick,
|
|
9851
|
+
className
|
|
9852
|
+
}) {
|
|
9853
|
+
const formattedTime = time instanceof Date ? time.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : time;
|
|
9854
|
+
return /* @__PURE__ */ jsxs45(
|
|
9855
|
+
"div",
|
|
9856
|
+
{
|
|
9857
|
+
onClick,
|
|
9858
|
+
className: cn(
|
|
9859
|
+
"group relative flex flex-col gap-1 rounded-xl p-3 cursor-pointer transition-all duration-150 select-none border",
|
|
9860
|
+
isActive ? "bg-indigo-500/10 border-indigo-200/60 dark:bg-indigo-950/30 dark:border-indigo-900/50 shadow-2xs" : "bg-background hover:bg-muted/40 border-transparent hover:border-border/40",
|
|
9861
|
+
unreadCount > 0 && !isActive && "bg-primary/5",
|
|
9862
|
+
className
|
|
9863
|
+
),
|
|
9864
|
+
children: [
|
|
9865
|
+
isActive && /* @__PURE__ */ jsx82("div", { className: "absolute top-1.5 bottom-1.5 left-0 w-1 rounded-l-md bg-indigo-600 dark:bg-indigo-500" }),
|
|
9866
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex items-center justify-between gap-2", children: [
|
|
9867
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-1.5 min-w-0", children: [
|
|
9868
|
+
/* @__PURE__ */ jsx82("h4", { className: cn("truncate text-sm font-semibold tracking-tight text-foreground"), children: title }),
|
|
9869
|
+
badgeLabel && /* @__PURE__ */ jsxs45(Badge, { className: "h-4.5 rounded-full border border-emerald-200/40 bg-emerald-500/10 dark:bg-emerald-950/40 px-1.5 py-0 text-[10px] font-medium text-emerald-600 dark:text-emerald-400 gap-1 shrink-0", children: [
|
|
9870
|
+
/* @__PURE__ */ jsx82("span", { className: "text-[9px]", children: "\u{1F4AC}" }),
|
|
9871
|
+
/* @__PURE__ */ jsx82("span", { children: badgeLabel })
|
|
9872
|
+
] })
|
|
9873
|
+
] }),
|
|
9874
|
+
formattedTime && /* @__PURE__ */ jsx82("span", { className: "text-[11px] text-muted-foreground whitespace-nowrap shrink-0", children: formattedTime })
|
|
9875
|
+
] }),
|
|
9876
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground/80", children: [
|
|
9877
|
+
/* @__PURE__ */ jsx82(Users, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
9878
|
+
/* @__PURE__ */ jsxs45("span", { className: "truncate", children: [
|
|
9879
|
+
membersCount,
|
|
9880
|
+
" Members \u2022 ",
|
|
9881
|
+
onlineCount,
|
|
9882
|
+
" Online"
|
|
9883
|
+
] })
|
|
9884
|
+
] }),
|
|
9885
|
+
lastMessage && /* @__PURE__ */ jsx82("p", { className: "line-clamp-1 text-xs text-muted-foreground/70 truncate", children: lastMessage }),
|
|
9886
|
+
onMoreClick && /* @__PURE__ */ jsx82(
|
|
9887
|
+
"button",
|
|
9888
|
+
{
|
|
9889
|
+
type: "button",
|
|
9890
|
+
onClick: (e) => {
|
|
9891
|
+
e.stopPropagation();
|
|
9892
|
+
onMoreClick(e);
|
|
9893
|
+
},
|
|
9894
|
+
className: "absolute top-2.5 right-2 opacity-0 group-hover:opacity-100 transition-opacity p-1 rounded-md hover:bg-muted text-muted-foreground",
|
|
9895
|
+
children: /* @__PURE__ */ jsx82(MoreHorizontal3, { className: "h-3.5 w-3.5" })
|
|
9896
|
+
}
|
|
9897
|
+
)
|
|
9898
|
+
]
|
|
9899
|
+
}
|
|
9900
|
+
);
|
|
9901
|
+
}
|
|
9902
|
+
|
|
9903
|
+
// src/design-system/components/chat/chat-message-list.tsx
|
|
9904
|
+
import React14, { useRef as useRef4, useEffect as useEffect10 } from "react";
|
|
9905
|
+
import { Loader2 } from "lucide-react";
|
|
9906
|
+
import { jsx as jsx83, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
9907
|
+
function ChatMessageList({
|
|
9908
|
+
children,
|
|
9909
|
+
isLoadingMore = false,
|
|
9910
|
+
onLoadMore,
|
|
9911
|
+
autoScrollToBottom = true,
|
|
9912
|
+
emptyState,
|
|
9913
|
+
className
|
|
9914
|
+
}) {
|
|
9915
|
+
const bottomRef = useRef4(null);
|
|
9916
|
+
const containerRef = useRef4(null);
|
|
9917
|
+
useEffect10(() => {
|
|
9918
|
+
if (autoScrollToBottom && bottomRef.current) {
|
|
9919
|
+
bottomRef.current.scrollIntoView({ behavior: "smooth" });
|
|
9920
|
+
}
|
|
9921
|
+
}, [children, autoScrollToBottom]);
|
|
9922
|
+
const hasChildren = React14.Children.count(children) > 0;
|
|
9923
|
+
return /* @__PURE__ */ jsxs46(
|
|
9924
|
+
"div",
|
|
9925
|
+
{
|
|
9926
|
+
ref: containerRef,
|
|
9927
|
+
className: cn("flex flex-1 flex-col overflow-y-auto p-4 space-y-2", className),
|
|
9928
|
+
children: [
|
|
9929
|
+
isLoadingMore && /* @__PURE__ */ jsxs46("div", { className: "flex items-center justify-center py-2 text-muted-foreground", children: [
|
|
9930
|
+
/* @__PURE__ */ jsx83(Loader2, { className: "h-4 w-4 animate-spin text-primary mr-1.5" }),
|
|
9931
|
+
/* @__PURE__ */ jsx83("span", { className: "text-xs", children: "Loading older messages..." })
|
|
9932
|
+
] }),
|
|
9933
|
+
hasChildren ? children : emptyState ? /* @__PURE__ */ jsx83("div", { className: "flex flex-1 items-center justify-center h-full", children: emptyState }) : null,
|
|
9934
|
+
/* @__PURE__ */ jsx83("div", { ref: bottomRef, className: "h-0 w-0" })
|
|
9935
|
+
]
|
|
9936
|
+
}
|
|
9937
|
+
);
|
|
9938
|
+
}
|
|
9939
|
+
|
|
9940
|
+
// src/design-system/components/chat/chat-sidebar.tsx
|
|
9941
|
+
import { Search as Search2, MessageSquare as MessageSquare2 } from "lucide-react";
|
|
9942
|
+
import { jsx as jsx84, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
9943
|
+
function ChatSidebar({
|
|
9944
|
+
title = "Chats",
|
|
9945
|
+
searchValue = "",
|
|
9946
|
+
onSearchChange,
|
|
9947
|
+
searchPlaceholder = "Search...",
|
|
9948
|
+
tabs = [
|
|
9949
|
+
{ id: "chats", label: "Chats" },
|
|
9950
|
+
{ id: "contact", label: "Contact" },
|
|
9951
|
+
{ id: "groups", label: "Groups" },
|
|
9952
|
+
{ id: "folder", label: "Folder" }
|
|
9953
|
+
],
|
|
9954
|
+
activeTab = "chats",
|
|
9955
|
+
onTabChange,
|
|
9956
|
+
sectionLabel = "CHATS",
|
|
9957
|
+
sectionCount = 2,
|
|
9958
|
+
actions,
|
|
9959
|
+
onNewChat,
|
|
9960
|
+
children,
|
|
9961
|
+
footer,
|
|
9962
|
+
className
|
|
9963
|
+
}) {
|
|
9964
|
+
return /* @__PURE__ */ jsxs47(
|
|
9965
|
+
"aside",
|
|
9966
|
+
{
|
|
9967
|
+
className: cn(
|
|
9968
|
+
"flex flex-col h-full w-full md:w-80 lg:w-[340px] border-r border-border/70 bg-background/95 select-none",
|
|
9969
|
+
className
|
|
9970
|
+
),
|
|
9971
|
+
children: [
|
|
9972
|
+
/* @__PURE__ */ jsx84("div", { className: "flex items-center gap-4 px-4 pt-3 pb-1 border-b border-border/40 overflow-x-auto no-scrollbar", children: tabs.map((tab) => {
|
|
9973
|
+
const isSelected = activeTab === tab.id;
|
|
9974
|
+
return /* @__PURE__ */ jsxs47(
|
|
9975
|
+
"button",
|
|
9976
|
+
{
|
|
9977
|
+
onClick: () => onTabChange?.(tab.id),
|
|
9978
|
+
className: cn(
|
|
9979
|
+
"relative pb-2 text-sm font-medium transition-all shrink-0 cursor-pointer",
|
|
9980
|
+
isSelected ? "text-indigo-600 dark:text-indigo-400 font-semibold" : "text-muted-foreground hover:text-foreground"
|
|
9981
|
+
),
|
|
9982
|
+
children: [
|
|
9983
|
+
/* @__PURE__ */ jsx84("span", { children: tab.label }),
|
|
9984
|
+
isSelected && /* @__PURE__ */ jsx84("span", { className: "absolute bottom-0 left-0 right-0 h-0.5 rounded-full bg-indigo-600 dark:bg-indigo-400" })
|
|
9985
|
+
]
|
|
9986
|
+
},
|
|
9987
|
+
tab.id
|
|
9988
|
+
);
|
|
9989
|
+
}) }),
|
|
9990
|
+
/* @__PURE__ */ jsx84("div", { className: "p-3", children: /* @__PURE__ */ jsxs47("div", { className: "relative", children: [
|
|
9991
|
+
/* @__PURE__ */ jsx84(Search2, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
|
|
9992
|
+
/* @__PURE__ */ jsx84(
|
|
9993
|
+
Input,
|
|
9994
|
+
{
|
|
9995
|
+
type: "search",
|
|
9996
|
+
value: searchValue,
|
|
9997
|
+
onChange: (e) => onSearchChange?.(e.target.value),
|
|
9998
|
+
placeholder: searchPlaceholder,
|
|
9999
|
+
className: "pl-9 h-9 text-xs rounded-xl bg-background border-border/80 focus-visible:ring-1 focus-visible:ring-indigo-500/50"
|
|
10000
|
+
}
|
|
10001
|
+
)
|
|
10002
|
+
] }) }),
|
|
10003
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex items-center px-4 py-1.5 gap-2", children: [
|
|
10004
|
+
/* @__PURE__ */ jsx84(MessageSquare2, { className: "h-3.5 w-3.5 text-emerald-600 dark:text-emerald-400 shrink-0" }),
|
|
10005
|
+
/* @__PURE__ */ jsx84("span", { className: "text-[11px] font-bold tracking-wider text-muted-foreground uppercase", children: sectionLabel }),
|
|
10006
|
+
/* @__PURE__ */ jsx84("div", { className: "flex-1 h-[1px] bg-border/60 mx-1" }),
|
|
10007
|
+
typeof sectionCount === "number" && /* @__PURE__ */ jsx84("span", { className: "text-xs font-medium text-muted-foreground shrink-0", children: sectionCount })
|
|
10008
|
+
] }),
|
|
10009
|
+
/* @__PURE__ */ jsx84("div", { className: "flex-1 overflow-y-auto px-2 py-1 space-y-1", children }),
|
|
10010
|
+
footer && /* @__PURE__ */ jsx84("div", { className: "p-3 border-t border-border/60 bg-muted/20", children: footer })
|
|
10011
|
+
]
|
|
10012
|
+
}
|
|
10013
|
+
);
|
|
10014
|
+
}
|
|
10015
|
+
|
|
10016
|
+
// src/design-system/components/chat/contact-manager.tsx
|
|
10017
|
+
import { useState as useState10 } from "react";
|
|
10018
|
+
import { Users as Users2, Search as Search3, Plus as Plus2, MessageSquare as MessageSquare3, Pencil, Trash2 as Trash23 } from "lucide-react";
|
|
10019
|
+
import { jsx as jsx85, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
10020
|
+
function ContactManager({
|
|
10021
|
+
contacts = [],
|
|
10022
|
+
title = "Contact Manager",
|
|
10023
|
+
description = "Manage your saved contacts and start direct chat conversations.",
|
|
10024
|
+
searchPlaceholder = "Search contacts by name or email...",
|
|
10025
|
+
onChatClick,
|
|
10026
|
+
onToggleStatus,
|
|
10027
|
+
onEditClick,
|
|
10028
|
+
onDeleteClick,
|
|
10029
|
+
onAddContact,
|
|
10030
|
+
className
|
|
10031
|
+
}) {
|
|
10032
|
+
const [searchQuery, setSearchQuery] = useState10("");
|
|
10033
|
+
const [isAddOpen, setIsAddOpen] = useState10(false);
|
|
10034
|
+
const [newName, setNewName] = useState10("");
|
|
10035
|
+
const [newEmail, setNewEmail] = useState10("");
|
|
10036
|
+
const filteredContacts = contacts.filter(
|
|
10037
|
+
(c) => c.name.toLowerCase().includes(searchQuery.toLowerCase()) || c.email.toLowerCase().includes(searchQuery.toLowerCase())
|
|
10038
|
+
);
|
|
10039
|
+
const handleAddSubmit = (e) => {
|
|
10040
|
+
e.preventDefault();
|
|
10041
|
+
if (!newEmail.trim()) return;
|
|
10042
|
+
onAddContact?.({
|
|
10043
|
+
name: newName.trim() || newEmail.split("@")[0],
|
|
10044
|
+
email: newEmail.trim()
|
|
10045
|
+
});
|
|
10046
|
+
setNewName("");
|
|
10047
|
+
setNewEmail("");
|
|
10048
|
+
setIsAddOpen(false);
|
|
10049
|
+
};
|
|
10050
|
+
const getInitials = (contact) => {
|
|
10051
|
+
if (contact.initials) return contact.initials;
|
|
10052
|
+
return contact.name.split(" ").map((n) => n[0]).join("").slice(0, 2).toUpperCase() || "U";
|
|
10053
|
+
};
|
|
10054
|
+
return /* @__PURE__ */ jsxs48(
|
|
10055
|
+
"div",
|
|
10056
|
+
{
|
|
10057
|
+
className: cn(
|
|
10058
|
+
"w-full rounded-2xl border border-border/80 bg-background p-6 shadow-sm space-y-5",
|
|
10059
|
+
className
|
|
10060
|
+
),
|
|
10061
|
+
children: [
|
|
10062
|
+
/* @__PURE__ */ jsxs48("div", { className: "space-y-1", children: [
|
|
10063
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex items-center gap-2", children: [
|
|
10064
|
+
/* @__PURE__ */ jsx85(Users2, { className: "h-5 w-5 text-indigo-600 dark:text-indigo-400" }),
|
|
10065
|
+
/* @__PURE__ */ jsx85("h3", { className: "text-lg font-bold tracking-tight text-foreground", children: title })
|
|
10066
|
+
] }),
|
|
10067
|
+
/* @__PURE__ */ jsx85("p", { className: "text-xs text-muted-foreground", children: description })
|
|
10068
|
+
] }),
|
|
10069
|
+
/* @__PURE__ */ jsxs48("div", { className: "relative", children: [
|
|
10070
|
+
/* @__PURE__ */ jsx85(Search3, { className: "absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
|
|
10071
|
+
/* @__PURE__ */ jsx85(
|
|
10072
|
+
Input,
|
|
10073
|
+
{
|
|
10074
|
+
type: "search",
|
|
10075
|
+
value: searchQuery,
|
|
10076
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
10077
|
+
placeholder: searchPlaceholder,
|
|
10078
|
+
className: "pl-10 h-10 text-xs rounded-xl bg-background border-border/80 focus-visible:ring-1 focus-visible:ring-indigo-500/50"
|
|
10079
|
+
}
|
|
10080
|
+
)
|
|
10081
|
+
] }),
|
|
10082
|
+
/* @__PURE__ */ jsx85("div", { className: "space-y-2.5 max-h-[380px] overflow-y-auto pr-1", children: filteredContacts.length === 0 ? /* @__PURE__ */ jsx85("div", { className: "py-8 text-center text-xs text-muted-foreground", children: "No contacts found matching your search." }) : filteredContacts.map((contact) => /* @__PURE__ */ jsxs48(
|
|
10083
|
+
"div",
|
|
10084
|
+
{
|
|
10085
|
+
className: "flex items-center justify-between gap-3 rounded-2xl border border-border/70 bg-background/50 p-3 hover:border-border transition-all duration-150 shadow-2xs",
|
|
10086
|
+
children: [
|
|
10087
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
10088
|
+
/* @__PURE__ */ jsxs48(Avatar, { className: "h-10 w-10 rounded-xl bg-blue-100 dark:bg-blue-950/60 text-blue-600 dark:text-blue-400 font-bold border border-blue-200/50 dark:border-blue-900/40", children: [
|
|
10089
|
+
contact.avatarUrl && /* @__PURE__ */ jsx85(AvatarImage, { src: contact.avatarUrl, alt: contact.name }),
|
|
10090
|
+
/* @__PURE__ */ jsx85(AvatarFallback, { className: "bg-transparent text-xs", children: getInitials(contact) })
|
|
10091
|
+
] }),
|
|
10092
|
+
/* @__PURE__ */ jsxs48("div", { className: "min-w-0", children: [
|
|
10093
|
+
/* @__PURE__ */ jsx85("h4", { className: "truncate text-sm font-semibold text-foreground tracking-tight", children: contact.name }),
|
|
10094
|
+
/* @__PURE__ */ jsx85("p", { className: "truncate text-xs text-muted-foreground", children: contact.email })
|
|
10095
|
+
] })
|
|
10096
|
+
] }),
|
|
10097
|
+
/* @__PURE__ */ jsxs48("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
10098
|
+
/* @__PURE__ */ jsx85(
|
|
10099
|
+
Button,
|
|
10100
|
+
{
|
|
10101
|
+
variant: "ghost",
|
|
10102
|
+
size: "icon",
|
|
10103
|
+
onClick: () => onChatClick?.(contact),
|
|
10104
|
+
className: "h-8 w-8 text-indigo-600 dark:text-indigo-400 hover:bg-indigo-50 dark:hover:bg-indigo-950/40 rounded-lg",
|
|
10105
|
+
title: "Open Chat",
|
|
10106
|
+
children: /* @__PURE__ */ jsx85(MessageSquare3, { className: "h-4 w-4" })
|
|
10107
|
+
}
|
|
10108
|
+
),
|
|
10109
|
+
/* @__PURE__ */ jsx85(
|
|
10110
|
+
Switch,
|
|
10111
|
+
{
|
|
10112
|
+
checked: contact.isEnabled !== false,
|
|
10113
|
+
onCheckedChange: (checked) => onToggleStatus?.(contact, checked),
|
|
10114
|
+
className: "data-[state=checked]:bg-slate-800 dark:data-[state=checked]:bg-slate-200"
|
|
10115
|
+
}
|
|
10116
|
+
),
|
|
10117
|
+
/* @__PURE__ */ jsx85(
|
|
10118
|
+
Button,
|
|
10119
|
+
{
|
|
10120
|
+
variant: "ghost",
|
|
10121
|
+
size: "icon",
|
|
10122
|
+
onClick: () => onEditClick?.(contact),
|
|
10123
|
+
className: "h-8 w-8 text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-950/40 rounded-lg",
|
|
10124
|
+
title: "Edit Contact",
|
|
10125
|
+
children: /* @__PURE__ */ jsx85(Pencil, { className: "h-3.5 w-3.5" })
|
|
10126
|
+
}
|
|
10127
|
+
),
|
|
10128
|
+
/* @__PURE__ */ jsx85(
|
|
10129
|
+
Button,
|
|
10130
|
+
{
|
|
10131
|
+
variant: "ghost",
|
|
10132
|
+
size: "icon",
|
|
10133
|
+
onClick: () => onDeleteClick?.(contact),
|
|
10134
|
+
className: "h-8 w-8 text-rose-500 hover:bg-rose-50 dark:hover:bg-rose-950/40 rounded-lg",
|
|
10135
|
+
title: "Delete Contact",
|
|
10136
|
+
children: /* @__PURE__ */ jsx85(Trash23, { className: "h-3.5 w-3.5" })
|
|
10137
|
+
}
|
|
10138
|
+
)
|
|
10139
|
+
] })
|
|
10140
|
+
]
|
|
10141
|
+
},
|
|
10142
|
+
contact.id
|
|
10143
|
+
)) }),
|
|
10144
|
+
/* @__PURE__ */ jsxs48(
|
|
10145
|
+
Button,
|
|
10146
|
+
{
|
|
10147
|
+
onClick: () => setIsAddOpen(true),
|
|
10148
|
+
className: "w-full h-10 rounded-xl bg-indigo-600 hover:bg-indigo-700 text-white font-medium text-xs shadow-xs transition-transform active:scale-[0.99] gap-1.5",
|
|
10149
|
+
children: [
|
|
10150
|
+
/* @__PURE__ */ jsx85(Plus2, { className: "h-4 w-4" }),
|
|
10151
|
+
/* @__PURE__ */ jsx85("span", { children: "Add New Contact" })
|
|
10152
|
+
]
|
|
10153
|
+
}
|
|
10154
|
+
),
|
|
10155
|
+
/* @__PURE__ */ jsx85(Dialog, { open: isAddOpen, onOpenChange: setIsAddOpen, children: /* @__PURE__ */ jsxs48(DialogContent, { className: "sm:max-w-md rounded-2xl", children: [
|
|
10156
|
+
/* @__PURE__ */ jsxs48(DialogHeader, { children: [
|
|
10157
|
+
/* @__PURE__ */ jsx85(DialogTitle, { children: "Add New Contact" }),
|
|
10158
|
+
/* @__PURE__ */ jsx85(DialogDescription, { children: "Enter contact details to start messaging directly." })
|
|
10159
|
+
] }),
|
|
10160
|
+
/* @__PURE__ */ jsxs48("form", { onSubmit: handleAddSubmit, className: "space-y-3 py-2", children: [
|
|
10161
|
+
/* @__PURE__ */ jsxs48("div", { className: "space-y-1", children: [
|
|
10162
|
+
/* @__PURE__ */ jsx85("label", { className: "text-xs font-medium text-foreground", children: "Name (Optional)" }),
|
|
10163
|
+
/* @__PURE__ */ jsx85(
|
|
10164
|
+
Input,
|
|
10165
|
+
{
|
|
10166
|
+
value: newName,
|
|
10167
|
+
onChange: (e) => setNewName(e.target.value),
|
|
10168
|
+
placeholder: "e.g. Aman",
|
|
10169
|
+
className: "h-9 text-xs rounded-xl"
|
|
10170
|
+
}
|
|
10171
|
+
)
|
|
10172
|
+
] }),
|
|
10173
|
+
/* @__PURE__ */ jsxs48("div", { className: "space-y-1", children: [
|
|
10174
|
+
/* @__PURE__ */ jsx85("label", { className: "text-xs font-medium text-foreground", children: "Email Address *" }),
|
|
10175
|
+
/* @__PURE__ */ jsx85(
|
|
10176
|
+
Input,
|
|
10177
|
+
{
|
|
10178
|
+
type: "email",
|
|
10179
|
+
required: true,
|
|
10180
|
+
value: newEmail,
|
|
10181
|
+
onChange: (e) => setNewEmail(e.target.value),
|
|
10182
|
+
placeholder: "e.g. aman@example.com",
|
|
10183
|
+
className: "h-9 text-xs rounded-xl"
|
|
10184
|
+
}
|
|
10185
|
+
)
|
|
10186
|
+
] }),
|
|
10187
|
+
/* @__PURE__ */ jsxs48(DialogFooter, { className: "pt-2", children: [
|
|
10188
|
+
/* @__PURE__ */ jsx85(
|
|
10189
|
+
Button,
|
|
10190
|
+
{
|
|
10191
|
+
type: "button",
|
|
10192
|
+
variant: "outline",
|
|
10193
|
+
onClick: () => setIsAddOpen(false),
|
|
10194
|
+
className: "rounded-xl text-xs",
|
|
10195
|
+
children: "Cancel"
|
|
10196
|
+
}
|
|
10197
|
+
),
|
|
10198
|
+
/* @__PURE__ */ jsx85(Button, { type: "submit", className: "rounded-xl bg-indigo-600 hover:bg-indigo-700 text-white text-xs", children: "Save Contact" })
|
|
10199
|
+
] })
|
|
10200
|
+
] })
|
|
10201
|
+
] }) })
|
|
10202
|
+
]
|
|
10203
|
+
}
|
|
10204
|
+
);
|
|
10205
|
+
}
|
|
10206
|
+
|
|
10207
|
+
// src/design-system/components/chat/group-manager.tsx
|
|
10208
|
+
import { useState as useState11 } from "react";
|
|
10209
|
+
import { Users as Users3, Search as Search4, Plus as Plus3, MessageSquare as MessageSquare4, Pencil as Pencil2, Trash2 as Trash24 } from "lucide-react";
|
|
10210
|
+
import { jsx as jsx86, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
10211
|
+
function GroupManager({
|
|
10212
|
+
groups = [],
|
|
10213
|
+
title = "Groups Manager",
|
|
10214
|
+
description = "Manage your group channels and start team conversations.",
|
|
10215
|
+
searchPlaceholder = "Search groups...",
|
|
10216
|
+
onChatClick,
|
|
10217
|
+
onToggleStatus,
|
|
10218
|
+
onEditClick,
|
|
10219
|
+
onDeleteClick,
|
|
10220
|
+
onAddGroup,
|
|
10221
|
+
className
|
|
10222
|
+
}) {
|
|
10223
|
+
const [searchQuery, setSearchQuery] = useState11("");
|
|
10224
|
+
const [isAddOpen, setIsAddOpen] = useState11(false);
|
|
10225
|
+
const [groupName, setGroupName] = useState11("");
|
|
10226
|
+
const [groupDesc, setGroupDesc] = useState11("");
|
|
10227
|
+
const filteredGroups = groups.filter(
|
|
10228
|
+
(g) => g.name.toLowerCase().includes(searchQuery.toLowerCase()) || g.ownerEmail && g.ownerEmail.toLowerCase().includes(searchQuery.toLowerCase())
|
|
10229
|
+
);
|
|
10230
|
+
const handleAddSubmit = (e) => {
|
|
10231
|
+
e.preventDefault();
|
|
10232
|
+
if (!groupName.trim()) return;
|
|
10233
|
+
onAddGroup?.({
|
|
10234
|
+
name: groupName.trim(),
|
|
10235
|
+
description: groupDesc.trim() || void 0
|
|
10236
|
+
});
|
|
10237
|
+
setGroupName("");
|
|
10238
|
+
setGroupDesc("");
|
|
10239
|
+
setIsAddOpen(false);
|
|
10240
|
+
};
|
|
10241
|
+
return /* @__PURE__ */ jsxs49(
|
|
10242
|
+
"div",
|
|
10243
|
+
{
|
|
10244
|
+
className: cn(
|
|
10245
|
+
"w-full rounded-2xl border border-border/80 bg-background p-6 shadow-sm space-y-5",
|
|
10246
|
+
className
|
|
10247
|
+
),
|
|
10248
|
+
children: [
|
|
10249
|
+
/* @__PURE__ */ jsxs49("div", { className: "space-y-1", children: [
|
|
10250
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-2", children: [
|
|
10251
|
+
/* @__PURE__ */ jsx86(Users3, { className: "h-5 w-5 text-indigo-600 dark:text-indigo-400" }),
|
|
10252
|
+
/* @__PURE__ */ jsx86("h3", { className: "text-lg font-bold tracking-tight text-foreground", children: title })
|
|
10253
|
+
] }),
|
|
10254
|
+
/* @__PURE__ */ jsx86("p", { className: "text-xs text-muted-foreground", children: description })
|
|
10255
|
+
] }),
|
|
10256
|
+
/* @__PURE__ */ jsxs49("div", { className: "relative", children: [
|
|
10257
|
+
/* @__PURE__ */ jsx86(Search4, { className: "absolute left-3.5 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" }),
|
|
10258
|
+
/* @__PURE__ */ jsx86(
|
|
10259
|
+
Input,
|
|
10260
|
+
{
|
|
10261
|
+
type: "search",
|
|
10262
|
+
value: searchQuery,
|
|
10263
|
+
onChange: (e) => setSearchQuery(e.target.value),
|
|
10264
|
+
placeholder: searchPlaceholder,
|
|
10265
|
+
className: "pl-10 h-10 text-xs rounded-xl bg-background border-border/80 focus-visible:ring-1 focus-visible:ring-indigo-500/50"
|
|
10266
|
+
}
|
|
10267
|
+
)
|
|
10268
|
+
] }),
|
|
10269
|
+
/* @__PURE__ */ jsx86("div", { className: "space-y-2.5 max-h-[380px] overflow-y-auto pr-1", children: filteredGroups.length === 0 ? /* @__PURE__ */ jsx86("div", { className: "py-8 text-center text-xs text-muted-foreground", children: "No group channels found matching your search." }) : filteredGroups.map((group) => /* @__PURE__ */ jsxs49(
|
|
10270
|
+
"div",
|
|
10271
|
+
{
|
|
10272
|
+
className: "flex items-center justify-between gap-3 rounded-2xl border border-border/70 bg-background/50 p-3 hover:border-border transition-all duration-150 shadow-2xs",
|
|
10273
|
+
children: [
|
|
10274
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
10275
|
+
/* @__PURE__ */ jsxs49(Avatar, { className: "h-10 w-10 rounded-xl bg-slate-800 text-white font-bold border border-border/60 overflow-hidden", children: [
|
|
10276
|
+
group.avatarUrl && /* @__PURE__ */ jsx86(AvatarImage, { src: group.avatarUrl, alt: group.name, className: "object-cover" }),
|
|
10277
|
+
/* @__PURE__ */ jsx86(AvatarFallback, { className: "bg-slate-800 text-xs font-semibold text-white", children: group.name.slice(0, 2).toUpperCase() })
|
|
10278
|
+
] }),
|
|
10279
|
+
/* @__PURE__ */ jsxs49("div", { className: "min-w-0", children: [
|
|
10280
|
+
/* @__PURE__ */ jsx86("h4", { className: "truncate text-sm font-semibold text-foreground tracking-tight", children: group.name }),
|
|
10281
|
+
/* @__PURE__ */ jsxs49("p", { className: "truncate text-xs text-muted-foreground", children: [
|
|
10282
|
+
group.membersCount || 1,
|
|
10283
|
+
" members ",
|
|
10284
|
+
group.ownerEmail ? `\u2022 ${group.ownerEmail}` : ""
|
|
10285
|
+
] })
|
|
10286
|
+
] })
|
|
10287
|
+
] }),
|
|
10288
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
10289
|
+
/* @__PURE__ */ jsx86(
|
|
10290
|
+
Button,
|
|
10291
|
+
{
|
|
10292
|
+
variant: "ghost",
|
|
10293
|
+
size: "icon",
|
|
10294
|
+
onClick: () => onChatClick?.(group),
|
|
10295
|
+
className: "h-8 w-8 text-indigo-600 dark:text-indigo-400 hover:bg-indigo-50 dark:hover:bg-indigo-950/40 rounded-lg",
|
|
10296
|
+
title: "Open Group Chat",
|
|
10297
|
+
children: /* @__PURE__ */ jsx86(MessageSquare4, { className: "h-4 w-4" })
|
|
10298
|
+
}
|
|
10299
|
+
),
|
|
10300
|
+
/* @__PURE__ */ jsx86(
|
|
10301
|
+
Switch,
|
|
10302
|
+
{
|
|
10303
|
+
checked: group.isEnabled !== false,
|
|
10304
|
+
onCheckedChange: (checked) => onToggleStatus?.(group, checked),
|
|
10305
|
+
className: "data-[state=checked]:bg-slate-800 dark:data-[state=checked]:bg-slate-200"
|
|
10306
|
+
}
|
|
10307
|
+
),
|
|
10308
|
+
/* @__PURE__ */ jsx86(
|
|
10309
|
+
Button,
|
|
10310
|
+
{
|
|
10311
|
+
variant: "ghost",
|
|
10312
|
+
size: "icon",
|
|
10313
|
+
onClick: () => onEditClick?.(group),
|
|
10314
|
+
className: "h-8 w-8 text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-950/40 rounded-lg",
|
|
10315
|
+
title: "Edit Group",
|
|
10316
|
+
children: /* @__PURE__ */ jsx86(Pencil2, { className: "h-3.5 w-3.5" })
|
|
10317
|
+
}
|
|
10318
|
+
),
|
|
10319
|
+
/* @__PURE__ */ jsx86(
|
|
10320
|
+
Button,
|
|
10321
|
+
{
|
|
10322
|
+
variant: "ghost",
|
|
10323
|
+
size: "icon",
|
|
10324
|
+
onClick: () => onDeleteClick?.(group),
|
|
10325
|
+
className: "h-8 w-8 text-rose-500 hover:bg-rose-50 dark:hover:bg-rose-950/40 rounded-lg",
|
|
10326
|
+
title: "Delete Group",
|
|
10327
|
+
children: /* @__PURE__ */ jsx86(Trash24, { className: "h-3.5 w-3.5" })
|
|
10328
|
+
}
|
|
10329
|
+
)
|
|
10330
|
+
] })
|
|
10331
|
+
]
|
|
10332
|
+
},
|
|
10333
|
+
group.id
|
|
10334
|
+
)) }),
|
|
10335
|
+
/* @__PURE__ */ jsxs49(
|
|
10336
|
+
Button,
|
|
10337
|
+
{
|
|
10338
|
+
onClick: () => setIsAddOpen(true),
|
|
10339
|
+
className: "w-full h-10 rounded-xl bg-indigo-600 hover:bg-indigo-700 text-white font-medium text-xs shadow-xs transition-transform active:scale-[0.99] gap-1.5",
|
|
10340
|
+
children: [
|
|
10341
|
+
/* @__PURE__ */ jsx86(Plus3, { className: "h-4 w-4" }),
|
|
10342
|
+
/* @__PURE__ */ jsx86("span", { children: "Add New Group" })
|
|
10343
|
+
]
|
|
10344
|
+
}
|
|
10345
|
+
),
|
|
10346
|
+
/* @__PURE__ */ jsx86(Dialog, { open: isAddOpen, onOpenChange: setIsAddOpen, children: /* @__PURE__ */ jsxs49(DialogContent, { className: "sm:max-w-md rounded-2xl", children: [
|
|
10347
|
+
/* @__PURE__ */ jsxs49(DialogHeader, { children: [
|
|
10348
|
+
/* @__PURE__ */ jsx86(DialogTitle, { children: "Create New Group" }),
|
|
10349
|
+
/* @__PURE__ */ jsx86(DialogDescription, { children: "Create a group channel to collaborate and chat with multiple members." })
|
|
10350
|
+
] }),
|
|
10351
|
+
/* @__PURE__ */ jsxs49("form", { onSubmit: handleAddSubmit, className: "space-y-3 py-2", children: [
|
|
10352
|
+
/* @__PURE__ */ jsxs49("div", { className: "space-y-1", children: [
|
|
10353
|
+
/* @__PURE__ */ jsx86("label", { className: "text-xs font-medium text-foreground", children: "Group Name *" }),
|
|
10354
|
+
/* @__PURE__ */ jsx86(
|
|
10355
|
+
Input,
|
|
10356
|
+
{
|
|
10357
|
+
required: true,
|
|
10358
|
+
value: groupName,
|
|
10359
|
+
onChange: (e) => setGroupName(e.target.value),
|
|
10360
|
+
placeholder: "e.g. Design Team Hub",
|
|
10361
|
+
className: "h-9 text-xs rounded-xl"
|
|
10362
|
+
}
|
|
10363
|
+
)
|
|
10364
|
+
] }),
|
|
10365
|
+
/* @__PURE__ */ jsxs49("div", { className: "space-y-1", children: [
|
|
10366
|
+
/* @__PURE__ */ jsx86("label", { className: "text-xs font-medium text-foreground", children: "Description (Optional)" }),
|
|
10367
|
+
/* @__PURE__ */ jsx86(
|
|
10368
|
+
Input,
|
|
10369
|
+
{
|
|
10370
|
+
value: groupDesc,
|
|
10371
|
+
onChange: (e) => setGroupDesc(e.target.value),
|
|
10372
|
+
placeholder: "e.g. Core team discussions",
|
|
10373
|
+
className: "h-9 text-xs rounded-xl"
|
|
10374
|
+
}
|
|
10375
|
+
)
|
|
10376
|
+
] }),
|
|
10377
|
+
/* @__PURE__ */ jsxs49(DialogFooter, { className: "pt-2", children: [
|
|
10378
|
+
/* @__PURE__ */ jsx86(
|
|
10379
|
+
Button,
|
|
10380
|
+
{
|
|
10381
|
+
type: "button",
|
|
10382
|
+
variant: "outline",
|
|
10383
|
+
onClick: () => setIsAddOpen(false),
|
|
10384
|
+
className: "rounded-xl text-xs",
|
|
10385
|
+
children: "Cancel"
|
|
10386
|
+
}
|
|
10387
|
+
),
|
|
10388
|
+
/* @__PURE__ */ jsx86(Button, { type: "submit", className: "rounded-xl bg-indigo-600 hover:bg-indigo-700 text-white text-xs", children: "Create Group" })
|
|
10389
|
+
] })
|
|
10390
|
+
] })
|
|
10391
|
+
] }) })
|
|
10392
|
+
]
|
|
10393
|
+
}
|
|
10394
|
+
);
|
|
10395
|
+
}
|
|
10396
|
+
|
|
10397
|
+
// src/design-system/components/ai-chat/ai-model-selector.tsx
|
|
10398
|
+
import { ChevronDown, Check as Check4 } from "lucide-react";
|
|
10399
|
+
import { jsx as jsx87, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
10400
|
+
var DEFAULT_AI_MODELS = [
|
|
10401
|
+
{ id: "google/gemini-2.5-flash", name: "Gemini 2.5 Flash" },
|
|
10402
|
+
{ id: "openai/gpt-4o", name: "GPT-4o" },
|
|
10403
|
+
{ id: "anthropic/claude-3.5-sonnet", name: "Claude 3.5 Sonnet" },
|
|
10404
|
+
{ id: "deepseek/deepseek-chat", name: "DeepSeek Chat" },
|
|
10405
|
+
{ id: "meta-llama/llama-3.3-70b-instruct", name: "Llama 3.3 70B" }
|
|
10406
|
+
];
|
|
10407
|
+
function AiModelSelector({
|
|
10408
|
+
model = "google/gemini-2.5-flash",
|
|
10409
|
+
models = DEFAULT_AI_MODELS,
|
|
10410
|
+
onModelChange,
|
|
10411
|
+
disabled = false,
|
|
10412
|
+
className
|
|
10413
|
+
}) {
|
|
10414
|
+
const currentModel = models.find((m) => m.id === model) || models[0];
|
|
10415
|
+
return /* @__PURE__ */ jsxs50(DropdownMenu, { children: [
|
|
10416
|
+
/* @__PURE__ */ jsx87(DropdownMenuTrigger, { asChild: true, disabled, children: /* @__PURE__ */ jsxs50(
|
|
10417
|
+
"button",
|
|
10418
|
+
{
|
|
10419
|
+
type: "button",
|
|
10420
|
+
className: cn(
|
|
10421
|
+
"flex items-center gap-1.5 px-3 py-1 rounded-full border border-border/80 bg-background hover:bg-muted text-xs font-medium text-foreground transition-all cursor-pointer shadow-2xs focus:outline-none select-none",
|
|
10422
|
+
className
|
|
10423
|
+
),
|
|
10424
|
+
children: [
|
|
10425
|
+
/* @__PURE__ */ jsx87("span", { className: "truncate max-w-[130px] font-semibold", children: currentModel?.name || "Select Model" }),
|
|
10426
|
+
/* @__PURE__ */ jsx87(ChevronDown, { className: "h-3 w-3 text-muted-foreground shrink-0" })
|
|
10427
|
+
]
|
|
10428
|
+
}
|
|
10429
|
+
) }),
|
|
10430
|
+
/* @__PURE__ */ jsx87(
|
|
10431
|
+
DropdownMenuContent,
|
|
10432
|
+
{
|
|
10433
|
+
align: "start",
|
|
10434
|
+
side: "top",
|
|
10435
|
+
sideOffset: 6,
|
|
10436
|
+
className: "w-48 rounded-2xl p-1 shadow-2xl border border-border/80 bg-background text-foreground space-y-0.5",
|
|
10437
|
+
children: models.map((m) => {
|
|
10438
|
+
const isSelected = m.id === model;
|
|
10439
|
+
return /* @__PURE__ */ jsxs50(
|
|
10440
|
+
DropdownMenuItem,
|
|
10441
|
+
{
|
|
10442
|
+
onClick: () => onModelChange?.(m.id),
|
|
10443
|
+
className: cn(
|
|
10444
|
+
"flex items-center justify-between py-2 px-3 text-xs font-semibold rounded-xl cursor-pointer transition-colors",
|
|
10445
|
+
isSelected ? "bg-slate-900 text-white dark:bg-slate-900 dark:text-white focus:bg-slate-900 focus:text-white" : "text-foreground hover:bg-muted/70 focus:bg-muted/70"
|
|
10446
|
+
),
|
|
10447
|
+
children: [
|
|
10448
|
+
/* @__PURE__ */ jsx87("span", { className: "truncate", children: m.name }),
|
|
10449
|
+
isSelected && /* @__PURE__ */ jsx87(Check4, { className: "h-3.5 w-3.5 shrink-0 text-white" })
|
|
10450
|
+
]
|
|
10451
|
+
},
|
|
10452
|
+
m.id
|
|
10453
|
+
);
|
|
10454
|
+
})
|
|
10455
|
+
}
|
|
10456
|
+
)
|
|
10457
|
+
] });
|
|
10458
|
+
}
|
|
10459
|
+
|
|
10460
|
+
// src/design-system/components/ai-chat/ai-tool-selector.tsx
|
|
10461
|
+
import { ChevronDown as ChevronDown2, Check as Check5 } from "lucide-react";
|
|
10462
|
+
import { jsx as jsx88, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
10463
|
+
var DEFAULT_AI_TOOLS = [
|
|
10464
|
+
{ id: "chat", name: "AI Chat", icon: "" },
|
|
10465
|
+
{ id: "web-search", name: "Web Search", icon: "\u{1F310}" },
|
|
10466
|
+
{ id: "ui-render", name: "UI Render", icon: "\u{1F3A8}" }
|
|
10467
|
+
];
|
|
10468
|
+
function AiToolSelector({
|
|
10469
|
+
tool = "chat",
|
|
10470
|
+
tools = DEFAULT_AI_TOOLS,
|
|
10471
|
+
onToolChange,
|
|
10472
|
+
disabled = false,
|
|
10473
|
+
className
|
|
10474
|
+
}) {
|
|
10475
|
+
const currentTool = tools.find((t) => t.id === tool) || tools[0];
|
|
10476
|
+
return /* @__PURE__ */ jsxs51(DropdownMenu, { children: [
|
|
10477
|
+
/* @__PURE__ */ jsx88(DropdownMenuTrigger, { asChild: true, disabled, children: /* @__PURE__ */ jsxs51(
|
|
10478
|
+
"button",
|
|
10479
|
+
{
|
|
10480
|
+
type: "button",
|
|
10481
|
+
className: cn(
|
|
10482
|
+
"flex items-center gap-1.5 px-3 py-1 rounded-full border border-border/80 bg-background hover:bg-muted text-xs font-medium text-foreground transition-all cursor-pointer shadow-2xs focus:outline-none select-none",
|
|
10483
|
+
className
|
|
10484
|
+
),
|
|
10485
|
+
children: [
|
|
10486
|
+
/* @__PURE__ */ jsx88("span", { className: "text-muted-foreground", children: "Tool:" }),
|
|
10487
|
+
/* @__PURE__ */ jsxs51("span", { className: "flex items-center gap-1 font-semibold", children: [
|
|
10488
|
+
currentTool.icon && /* @__PURE__ */ jsx88("span", { children: currentTool.icon }),
|
|
10489
|
+
/* @__PURE__ */ jsx88("span", { children: currentTool?.name || "Select Tool" })
|
|
10490
|
+
] }),
|
|
10491
|
+
/* @__PURE__ */ jsx88(ChevronDown2, { className: "h-3 w-3 text-muted-foreground shrink-0" })
|
|
10492
|
+
]
|
|
10493
|
+
}
|
|
10494
|
+
) }),
|
|
10495
|
+
/* @__PURE__ */ jsx88(
|
|
10496
|
+
DropdownMenuContent,
|
|
10497
|
+
{
|
|
10498
|
+
align: "start",
|
|
10499
|
+
side: "top",
|
|
10500
|
+
sideOffset: 6,
|
|
10501
|
+
className: "w-48 rounded-2xl p-1 shadow-2xl border border-border/80 bg-background text-foreground space-y-0.5",
|
|
10502
|
+
children: tools.map((t) => {
|
|
10503
|
+
const isSelected = t.id === tool;
|
|
10504
|
+
return /* @__PURE__ */ jsxs51(
|
|
10505
|
+
DropdownMenuItem,
|
|
10506
|
+
{
|
|
10507
|
+
onClick: () => onToolChange?.(t.id),
|
|
10508
|
+
className: cn(
|
|
10509
|
+
"flex items-center justify-between py-2 px-3 text-xs font-semibold rounded-xl cursor-pointer transition-colors",
|
|
10510
|
+
isSelected ? "bg-slate-900 text-white dark:bg-slate-900 dark:text-white focus:bg-slate-900 focus:text-white" : "text-foreground hover:bg-muted/70 focus:bg-muted/70"
|
|
10511
|
+
),
|
|
10512
|
+
children: [
|
|
10513
|
+
/* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-2", children: [
|
|
10514
|
+
t.icon && /* @__PURE__ */ jsx88("span", { className: "text-sm shrink-0", children: t.icon }),
|
|
10515
|
+
/* @__PURE__ */ jsx88("span", { className: "truncate", children: t.name })
|
|
10516
|
+
] }),
|
|
10517
|
+
isSelected && /* @__PURE__ */ jsx88(Check5, { className: "h-3.5 w-3.5 shrink-0 text-white" })
|
|
10518
|
+
]
|
|
10519
|
+
},
|
|
10520
|
+
t.id
|
|
10521
|
+
);
|
|
10522
|
+
})
|
|
10523
|
+
}
|
|
10524
|
+
)
|
|
10525
|
+
] });
|
|
10526
|
+
}
|
|
10527
|
+
|
|
10528
|
+
// src/design-system/components/ai-chat/ai-chat-input.tsx
|
|
10529
|
+
import { useRef as useRef5, useEffect as useEffect11 } from "react";
|
|
10530
|
+
import { ArrowUp, Mic as Mic2, History, Plus as Plus4 } from "lucide-react";
|
|
10531
|
+
import { jsx as jsx89, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
10532
|
+
function AiChatInput({
|
|
10533
|
+
value,
|
|
10534
|
+
onChange,
|
|
10535
|
+
onSend,
|
|
10536
|
+
placeholder = "Ask a question about your data...",
|
|
10537
|
+
disabled = false,
|
|
10538
|
+
isLoading = false,
|
|
10539
|
+
model = "google/gemini-2.5-flash",
|
|
10540
|
+
onModelChange,
|
|
10541
|
+
models,
|
|
10542
|
+
tool = "chat",
|
|
10543
|
+
onToolChange,
|
|
10544
|
+
tools,
|
|
10545
|
+
isListening = false,
|
|
10546
|
+
onVoiceToggle,
|
|
10547
|
+
onHistoryClick,
|
|
10548
|
+
onNewChatClick,
|
|
10549
|
+
className
|
|
10550
|
+
}) {
|
|
10551
|
+
const textareaRef = useRef5(null);
|
|
10552
|
+
const handleKeyDown = (e) => {
|
|
10553
|
+
if (e.key === "Enter" && !e.shiftKey) {
|
|
10554
|
+
e.preventDefault();
|
|
10555
|
+
if (value.trim() && !disabled && !isLoading) {
|
|
10556
|
+
onSend();
|
|
10557
|
+
}
|
|
10558
|
+
}
|
|
10559
|
+
};
|
|
10560
|
+
useEffect11(() => {
|
|
10561
|
+
if (textareaRef.current) {
|
|
10562
|
+
textareaRef.current.style.height = "auto";
|
|
10563
|
+
textareaRef.current.style.height = `${Math.min(textareaRef.current.scrollHeight, 140)}px`;
|
|
10564
|
+
}
|
|
10565
|
+
}, [value]);
|
|
10566
|
+
const hasText = value.trim().length > 0;
|
|
10567
|
+
return /* @__PURE__ */ jsxs52(
|
|
10568
|
+
"div",
|
|
10569
|
+
{
|
|
10570
|
+
className: cn(
|
|
10571
|
+
"w-full rounded-3xl border border-border/80 bg-background p-3 flex flex-col gap-2 shadow-xs transition-all focus-within:border-indigo-500/60 focus-within:ring-1 focus-within:ring-indigo-500/20",
|
|
10572
|
+
className
|
|
10573
|
+
),
|
|
10574
|
+
children: [
|
|
10575
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-2 px-1", children: [
|
|
10576
|
+
/* @__PURE__ */ jsx89(
|
|
10577
|
+
"textarea",
|
|
10578
|
+
{
|
|
10579
|
+
ref: textareaRef,
|
|
10580
|
+
value,
|
|
10581
|
+
onChange: (e) => onChange(e.target.value),
|
|
10582
|
+
onKeyDown: handleKeyDown,
|
|
10583
|
+
placeholder: isListening ? "\u{1F3A4} Listening... Speak now" : isLoading ? "Thinking..." : placeholder,
|
|
10584
|
+
disabled: disabled || isLoading,
|
|
10585
|
+
rows: 1,
|
|
10586
|
+
className: "max-h-32 min-h-[26px] w-full resize-none bg-transparent text-sm sm:text-base outline-none placeholder:text-muted-foreground/80 disabled:cursor-not-allowed disabled:opacity-50 leading-relaxed"
|
|
10587
|
+
}
|
|
10588
|
+
),
|
|
10589
|
+
onVoiceToggle && /* @__PURE__ */ jsx89(
|
|
10590
|
+
"button",
|
|
10591
|
+
{
|
|
10592
|
+
type: "button",
|
|
10593
|
+
onClick: onVoiceToggle,
|
|
10594
|
+
disabled: disabled || isLoading,
|
|
10595
|
+
className: cn(
|
|
10596
|
+
"flex h-8 w-8 shrink-0 items-center justify-center rounded-full transition-all cursor-pointer",
|
|
10597
|
+
isListening ? "bg-rose-500 text-white animate-pulse" : "text-muted-foreground hover:text-foreground hover:bg-muted"
|
|
10598
|
+
),
|
|
10599
|
+
title: "Voice input",
|
|
10600
|
+
children: /* @__PURE__ */ jsx89(Mic2, { className: "h-4.5 w-4.5" })
|
|
10601
|
+
}
|
|
10602
|
+
),
|
|
10603
|
+
/* @__PURE__ */ jsx89(
|
|
10604
|
+
"button",
|
|
10605
|
+
{
|
|
10606
|
+
type: "button",
|
|
10607
|
+
onClick: onSend,
|
|
10608
|
+
disabled: !hasText || disabled || isLoading,
|
|
10609
|
+
className: cn(
|
|
10610
|
+
"flex h-9 w-9 shrink-0 items-center justify-center rounded-full transition-all cursor-pointer shadow-xs",
|
|
10611
|
+
hasText && !disabled && !isLoading ? "bg-slate-800 hover:bg-slate-900 text-white dark:bg-slate-200 dark:text-slate-900 active:scale-95" : "bg-muted text-muted-foreground opacity-50 cursor-not-allowed"
|
|
10612
|
+
),
|
|
10613
|
+
title: "Send",
|
|
10614
|
+
children: /* @__PURE__ */ jsx89(ArrowUp, { className: "h-4.5 w-4.5" })
|
|
10615
|
+
}
|
|
10616
|
+
)
|
|
10617
|
+
] }),
|
|
10618
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex items-center justify-between gap-2 pt-1 border-t border-border/40 overflow-x-auto no-scrollbar", children: [
|
|
10619
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-1.5 shrink-0", children: [
|
|
10620
|
+
/* @__PURE__ */ jsx89(
|
|
10621
|
+
AiModelSelector,
|
|
10622
|
+
{
|
|
10623
|
+
model,
|
|
10624
|
+
models,
|
|
10625
|
+
onModelChange,
|
|
10626
|
+
disabled: disabled || isLoading
|
|
10627
|
+
}
|
|
10628
|
+
),
|
|
10629
|
+
/* @__PURE__ */ jsx89(
|
|
10630
|
+
AiToolSelector,
|
|
10631
|
+
{
|
|
10632
|
+
tool,
|
|
10633
|
+
tools,
|
|
10634
|
+
onToolChange,
|
|
10635
|
+
disabled: disabled || isLoading
|
|
10636
|
+
}
|
|
10637
|
+
)
|
|
10638
|
+
] }),
|
|
10639
|
+
/* @__PURE__ */ jsxs52("div", { className: "flex items-center gap-1.5 shrink-0", children: [
|
|
10640
|
+
onHistoryClick && /* @__PURE__ */ jsx89(
|
|
10641
|
+
"button",
|
|
10642
|
+
{
|
|
10643
|
+
type: "button",
|
|
10644
|
+
onClick: onHistoryClick,
|
|
10645
|
+
disabled: disabled || isLoading,
|
|
10646
|
+
className: "flex h-7 w-7 items-center justify-center rounded-full border border-border/70 hover:bg-muted text-muted-foreground hover:text-foreground transition-all cursor-pointer shadow-2xs",
|
|
10647
|
+
title: "Prompt History",
|
|
10648
|
+
children: /* @__PURE__ */ jsx89(History, { className: "h-3.5 w-3.5" })
|
|
10649
|
+
}
|
|
10650
|
+
),
|
|
10651
|
+
onNewChatClick && /* @__PURE__ */ jsx89(
|
|
10652
|
+
"button",
|
|
10653
|
+
{
|
|
10654
|
+
type: "button",
|
|
10655
|
+
onClick: onNewChatClick,
|
|
10656
|
+
disabled: disabled || isLoading,
|
|
10657
|
+
className: "flex h-7 w-7 items-center justify-center rounded-full border border-border/70 hover:bg-muted text-muted-foreground hover:text-foreground transition-all cursor-pointer shadow-2xs",
|
|
10658
|
+
title: "New Chat",
|
|
10659
|
+
children: /* @__PURE__ */ jsx89(Plus4, { className: "h-3.5 w-3.5" })
|
|
10660
|
+
}
|
|
10661
|
+
)
|
|
10662
|
+
] })
|
|
10663
|
+
] })
|
|
10664
|
+
]
|
|
10665
|
+
}
|
|
10666
|
+
);
|
|
10667
|
+
}
|
|
10668
|
+
|
|
10669
|
+
// src/design-system/components/ai-chat/ai-message-bubble.tsx
|
|
10670
|
+
import ReactMarkdown from "react-markdown";
|
|
10671
|
+
import remarkGfm from "remark-gfm";
|
|
10672
|
+
import { Bot as Bot2, User, Sparkles, Globe } from "lucide-react";
|
|
10673
|
+
import { jsx as jsx90, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
10674
|
+
function AiMessageBubble({
|
|
10675
|
+
id,
|
|
10676
|
+
role,
|
|
10677
|
+
content,
|
|
10678
|
+
senderName,
|
|
10679
|
+
modelName,
|
|
9207
10680
|
avatarUrl,
|
|
9208
|
-
|
|
9209
|
-
|
|
9210
|
-
|
|
9211
|
-
|
|
9212
|
-
|
|
10681
|
+
sources = [],
|
|
10682
|
+
images = [],
|
|
10683
|
+
isLoading = false,
|
|
10684
|
+
showPreviewBtn = false,
|
|
10685
|
+
onOpenPreview,
|
|
10686
|
+
onImageClick,
|
|
9213
10687
|
className
|
|
9214
10688
|
}) {
|
|
9215
|
-
const
|
|
9216
|
-
|
|
9217
|
-
|
|
9218
|
-
|
|
9219
|
-
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
10689
|
+
const isUser = role === "user";
|
|
10690
|
+
const authorLabel = senderName || (isUser ? "You" : "AI Assistant");
|
|
10691
|
+
return /* @__PURE__ */ jsxs53(
|
|
10692
|
+
"div",
|
|
10693
|
+
{
|
|
10694
|
+
id: id ? `ai-bubble-${id}` : void 0,
|
|
10695
|
+
className: cn("flex w-full gap-3 py-2 justify-start select-text", className),
|
|
10696
|
+
children: [
|
|
10697
|
+
/* @__PURE__ */ jsx90("div", { className: "shrink-0 mt-0.5", children: isUser ? /* @__PURE__ */ jsx90("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-slate-800 text-white dark:bg-slate-200 dark:text-slate-900 shadow-2xs font-semibold text-xs", children: /* @__PURE__ */ jsx90(User, { className: "h-4 w-4" }) }) : /* @__PURE__ */ jsx90("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-indigo-50 dark:bg-indigo-950/50 text-indigo-600 dark:text-indigo-400 border border-indigo-200/60 dark:border-indigo-900/40 shadow-2xs", children: /* @__PURE__ */ jsx90(Bot2, { className: "h-4 w-4" }) }) }),
|
|
10698
|
+
/* @__PURE__ */ jsxs53("div", { className: "flex flex-col min-w-0 flex-1 items-start gap-1", children: [
|
|
10699
|
+
/* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2", children: [
|
|
10700
|
+
/* @__PURE__ */ jsx90(
|
|
10701
|
+
"span",
|
|
10702
|
+
{
|
|
10703
|
+
className: cn(
|
|
10704
|
+
"text-xs font-semibold",
|
|
10705
|
+
isUser ? "text-muted-foreground/90" : "text-indigo-600 dark:text-indigo-400"
|
|
10706
|
+
),
|
|
10707
|
+
children: authorLabel
|
|
10708
|
+
}
|
|
10709
|
+
),
|
|
10710
|
+
!isUser && modelName && /* @__PURE__ */ jsxs53("span", { className: "text-[10px] text-muted-foreground font-normal", children: [
|
|
10711
|
+
"\u2022 ",
|
|
10712
|
+
modelName
|
|
10713
|
+
] })
|
|
10714
|
+
] }),
|
|
10715
|
+
/* @__PURE__ */ jsxs53("div", { className: "text-sm sm:text-base text-foreground w-full leading-relaxed", children: [
|
|
10716
|
+
isLoading ? /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-1.5 py-1 text-xs text-muted-foreground", children: [
|
|
10717
|
+
/* @__PURE__ */ jsx90("span", { className: "h-2 w-2 rounded-full bg-indigo-600 animate-pulse" }),
|
|
10718
|
+
/* @__PURE__ */ jsx90("span", { className: "h-2 w-2 rounded-full bg-indigo-600 animate-pulse delay-75" }),
|
|
10719
|
+
/* @__PURE__ */ jsx90("span", { className: "h-2 w-2 rounded-full bg-indigo-600 animate-pulse delay-150" }),
|
|
10720
|
+
/* @__PURE__ */ jsx90("span", { className: "ml-1", children: "Thinking..." })
|
|
10721
|
+
] }) : isUser ? /* @__PURE__ */ jsx90("div", { className: "whitespace-pre-wrap", children: content }) : /* @__PURE__ */ jsx90("div", { className: "prose prose-sm dark:prose-invert max-w-none leading-relaxed break-words prose-p:leading-relaxed prose-pre:bg-muted/80 prose-pre:border prose-pre:border-border/50 prose-pre:rounded-xl prose-code:text-indigo-600 dark:prose-code:text-indigo-400 prose-code:font-mono prose-code:bg-muted prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:before:content-none prose-code:after:content-none", children: /* @__PURE__ */ jsx90(ReactMarkdown, { remarkPlugins: [remarkGfm], children: content }) }),
|
|
10722
|
+
!isUser && showPreviewBtn && onOpenPreview && /* @__PURE__ */ jsx90("div", { className: "mt-3 flex justify-start", children: /* @__PURE__ */ jsxs53(
|
|
10723
|
+
"button",
|
|
10724
|
+
{
|
|
10725
|
+
type: "button",
|
|
10726
|
+
onClick: onOpenPreview,
|
|
10727
|
+
className: "flex items-center gap-1.5 px-3 py-1.5 rounded-xl border border-indigo-200 dark:border-indigo-900/50 bg-indigo-50/50 dark:bg-indigo-950/20 text-xs font-bold text-indigo-600 dark:text-indigo-400 hover:bg-indigo-50 dark:hover:bg-indigo-950/40 hover:shadow-xs transition-all cursor-pointer",
|
|
10728
|
+
children: [
|
|
10729
|
+
/* @__PURE__ */ jsx90(Sparkles, { className: "h-3.5 w-3.5" }),
|
|
10730
|
+
/* @__PURE__ */ jsx90("span", { children: "Open Preview Panel" })
|
|
10731
|
+
]
|
|
10732
|
+
}
|
|
10733
|
+
) }),
|
|
10734
|
+
!isUser && sources.length > 0 && /* @__PURE__ */ jsxs53("div", { className: "mt-3 space-y-1.5", children: [
|
|
10735
|
+
/* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-1 text-[11px] font-semibold text-muted-foreground uppercase tracking-wider", children: [
|
|
10736
|
+
/* @__PURE__ */ jsx90(Globe, { className: "h-3.5 w-3.5 text-blue-500" }),
|
|
10737
|
+
/* @__PURE__ */ jsx90("span", { children: "Sources" })
|
|
10738
|
+
] }),
|
|
10739
|
+
/* @__PURE__ */ jsx90("div", { className: "flex flex-wrap gap-2", children: sources.map((src, i) => /* @__PURE__ */ jsx90(
|
|
10740
|
+
"a",
|
|
10741
|
+
{
|
|
10742
|
+
href: src.url,
|
|
10743
|
+
target: "_blank",
|
|
10744
|
+
rel: "noreferrer",
|
|
10745
|
+
className: "inline-flex items-center gap-1.5 px-2.5 py-1 rounded-xl border border-border/80 bg-background hover:bg-muted text-xs text-foreground transition-colors shadow-2xs",
|
|
10746
|
+
children: /* @__PURE__ */ jsx90("span", { className: "truncate max-w-[180px]", children: src.title })
|
|
10747
|
+
},
|
|
10748
|
+
i
|
|
10749
|
+
)) })
|
|
10750
|
+
] }),
|
|
10751
|
+
!isUser && images.length > 0 && /* @__PURE__ */ jsx90("div", { className: "mt-3 flex flex-wrap gap-2", children: images.map((img, idx) => /* @__PURE__ */ jsx90(
|
|
10752
|
+
"img",
|
|
10753
|
+
{
|
|
10754
|
+
src: img,
|
|
10755
|
+
alt: `AI generated ${idx}`,
|
|
10756
|
+
onClick: () => onImageClick?.(img),
|
|
10757
|
+
className: "h-28 w-28 rounded-xl object-cover border border-border/80 cursor-pointer hover:opacity-90 transition-opacity"
|
|
10758
|
+
},
|
|
10759
|
+
idx
|
|
10760
|
+
)) })
|
|
10761
|
+
] })
|
|
10762
|
+
] })
|
|
10763
|
+
]
|
|
9225
10764
|
}
|
|
9226
|
-
|
|
9227
|
-
return /* @__PURE__ */ jsxs42("div", { className: cn("flex items-center justify-between border-b border-border/80 bg-background/95 px-4 py-3 backdrop-blur-sm", className), children: [
|
|
9228
|
-
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
9229
|
-
/* @__PURE__ */ jsxs42("div", { className: "relative cursor-pointer", onClick: onAvatarClick, children: [
|
|
9230
|
-
/* @__PURE__ */ jsxs42(Avatar, { className: "h-10 w-10 border border-border/60 shadow-xs", children: [
|
|
9231
|
-
avatarUrl && /* @__PURE__ */ jsx79(AvatarImage, { src: avatarUrl, alt: title }),
|
|
9232
|
-
/* @__PURE__ */ jsx79(AvatarFallback, { className: "bg-primary/10 text-primary font-medium", children: title.slice(0, 2).toUpperCase() })
|
|
9233
|
-
] }),
|
|
9234
|
-
!isGroup && /* @__PURE__ */ jsx79(
|
|
9235
|
-
"span",
|
|
9236
|
-
{
|
|
9237
|
-
className: cn(
|
|
9238
|
-
"absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full ring-2 ring-background",
|
|
9239
|
-
getStatusColor()
|
|
9240
|
-
)
|
|
9241
|
-
}
|
|
9242
|
-
)
|
|
9243
|
-
] }),
|
|
9244
|
-
/* @__PURE__ */ jsxs42("div", { className: "min-w-0 flex-1", children: [
|
|
9245
|
-
/* @__PURE__ */ jsx79("h2", { className: "truncate text-sm font-semibold text-foreground tracking-tight", children: title }),
|
|
9246
|
-
/* @__PURE__ */ jsx79("p", { className: "truncate text-xs text-muted-foreground", children: subtitle ? subtitle : isGroup ? `${memberCount || 0} members` : /* @__PURE__ */ jsx79("span", { className: "capitalize", children: status }) })
|
|
9247
|
-
] })
|
|
9248
|
-
] }),
|
|
9249
|
-
actions && /* @__PURE__ */ jsx79("div", { className: "flex items-center gap-1 shrink-0", children: actions })
|
|
9250
|
-
] });
|
|
10765
|
+
);
|
|
9251
10766
|
}
|
|
9252
10767
|
|
|
9253
|
-
// src/design-system/components/chat/
|
|
9254
|
-
import {
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
10768
|
+
// src/design-system/components/ai-chat/ai-message-list.tsx
|
|
10769
|
+
import { useRef as useRef6, useEffect as useEffect12 } from "react";
|
|
10770
|
+
|
|
10771
|
+
// src/design-system/components/ai-chat/ai-prompt-suggestions.tsx
|
|
10772
|
+
import { Palette as Palette2, Search as Search5, Code, FormInput, Sparkles as Sparkles2 } from "lucide-react";
|
|
10773
|
+
import { jsx as jsx91, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
10774
|
+
var DEFAULT_AI_PROMPTS = [
|
|
10775
|
+
{
|
|
10776
|
+
title: "Explain React 19 features",
|
|
10777
|
+
description: "Deep dive into server actions, useActionState, and use() hook.",
|
|
10778
|
+
prompt: "Explain the new features of React 19 with examples of Server Actions and the use() hook.",
|
|
10779
|
+
tool: "chat",
|
|
10780
|
+
icon: /* @__PURE__ */ jsx91(Code, { className: "h-4 w-4 text-sky-500" })
|
|
10781
|
+
},
|
|
10782
|
+
{
|
|
10783
|
+
title: "Design user profile card",
|
|
10784
|
+
description: "Generates a rich, interactive UI card showing stats, avatar, and badges.",
|
|
10785
|
+
prompt: "Design a beautiful user profile card with follower count, location, badges and actions.",
|
|
10786
|
+
tool: "ui-render",
|
|
10787
|
+
icon: /* @__PURE__ */ jsx91(Palette2, { className: "h-4 w-4 text-indigo-500" })
|
|
10788
|
+
},
|
|
10789
|
+
{
|
|
10790
|
+
title: "Search latest Tech news",
|
|
10791
|
+
description: "Searches the web for recent announcements in AI and technology.",
|
|
10792
|
+
prompt: "What are the key announcements from the latest tech conferences and AI releases this month?",
|
|
10793
|
+
tool: "web-search",
|
|
10794
|
+
icon: /* @__PURE__ */ jsx91(Search5, { className: "h-4 w-4 text-emerald-500" })
|
|
10795
|
+
},
|
|
10796
|
+
{
|
|
10797
|
+
title: "Create feedback form",
|
|
10798
|
+
description: "Renders a beautiful form with textareas, ratings, and submittable actions.",
|
|
10799
|
+
prompt: "Build a premium user feedback form with input fields for name, email, rating select, and submit button.",
|
|
10800
|
+
tool: "ui-render",
|
|
10801
|
+
icon: /* @__PURE__ */ jsx91(FormInput, { className: "h-4 w-4 text-amber-500" })
|
|
10802
|
+
}
|
|
10803
|
+
];
|
|
10804
|
+
function AiPromptSuggestions({
|
|
10805
|
+
suggestions = DEFAULT_AI_PROMPTS,
|
|
10806
|
+
onSelectPrompt,
|
|
10807
|
+
title = "How can I help you today?",
|
|
10808
|
+
subtitle = "Choose a prompt below or start typing your question.",
|
|
10809
|
+
className
|
|
10810
|
+
}) {
|
|
10811
|
+
return /* @__PURE__ */ jsxs54("div", { className: cn("flex flex-col items-center justify-center p-6 text-center max-w-2xl mx-auto space-y-6", className), children: [
|
|
10812
|
+
/* @__PURE__ */ jsxs54("div", { className: "space-y-2", children: [
|
|
10813
|
+
/* @__PURE__ */ jsx91("div", { className: "inline-flex p-3 rounded-2xl bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 mb-1", children: /* @__PURE__ */ jsx91(Sparkles2, { className: "h-6 w-6" }) }),
|
|
10814
|
+
/* @__PURE__ */ jsx91("h2", { className: "text-xl sm:text-2xl font-bold tracking-tight text-foreground", children: title }),
|
|
10815
|
+
/* @__PURE__ */ jsx91("p", { className: "text-xs text-muted-foreground", children: subtitle })
|
|
9261
10816
|
] }),
|
|
9262
|
-
|
|
10817
|
+
/* @__PURE__ */ jsx91("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 w-full text-left", children: suggestions.map((item, idx) => /* @__PURE__ */ jsxs54(
|
|
10818
|
+
"div",
|
|
10819
|
+
{
|
|
10820
|
+
onClick: () => onSelectPrompt?.(item.prompt, item.tool),
|
|
10821
|
+
className: "p-3.5 rounded-2xl border border-border/80 bg-background hover:bg-muted/40 hover:border-indigo-500/50 transition-all cursor-pointer shadow-2xs group flex flex-col justify-between gap-2",
|
|
10822
|
+
children: [
|
|
10823
|
+
/* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-2", children: [
|
|
10824
|
+
/* @__PURE__ */ jsx91("div", { className: "p-1.5 rounded-lg bg-muted/60 shrink-0", children: item.icon }),
|
|
10825
|
+
/* @__PURE__ */ jsx91("h4", { className: "text-xs font-bold text-foreground group-hover:text-indigo-600 dark:group-hover:text-indigo-400 transition-colors", children: item.title })
|
|
10826
|
+
] }),
|
|
10827
|
+
/* @__PURE__ */ jsx91("p", { className: "text-[11px] text-muted-foreground line-clamp-2", children: item.description })
|
|
10828
|
+
]
|
|
10829
|
+
},
|
|
10830
|
+
idx
|
|
10831
|
+
)) })
|
|
9263
10832
|
] });
|
|
9264
10833
|
}
|
|
9265
10834
|
|
|
9266
|
-
// src/design-system/components/chat/
|
|
9267
|
-
import {
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9272
|
-
|
|
9273
|
-
|
|
10835
|
+
// src/design-system/components/ai-chat/ai-message-list.tsx
|
|
10836
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
10837
|
+
function AiMessageList({
|
|
10838
|
+
children,
|
|
10839
|
+
isEmpty = false,
|
|
10840
|
+
suggestions,
|
|
10841
|
+
onSelectPrompt,
|
|
10842
|
+
autoScrollToBottom = true,
|
|
9274
10843
|
className
|
|
9275
10844
|
}) {
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
|
|
9279
|
-
|
|
9280
|
-
|
|
9281
|
-
]
|
|
10845
|
+
const scrollRef = useRef6(null);
|
|
10846
|
+
useEffect12(() => {
|
|
10847
|
+
if (autoScrollToBottom && scrollRef.current) {
|
|
10848
|
+
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
10849
|
+
}
|
|
10850
|
+
}, [children, autoScrollToBottom]);
|
|
10851
|
+
return /* @__PURE__ */ jsx92(
|
|
10852
|
+
"div",
|
|
10853
|
+
{
|
|
10854
|
+
ref: scrollRef,
|
|
10855
|
+
className: cn(
|
|
10856
|
+
"flex-1 w-full overflow-y-auto px-4 py-4 space-y-4 no-scrollbar",
|
|
10857
|
+
className
|
|
10858
|
+
),
|
|
10859
|
+
children: isEmpty ? /* @__PURE__ */ jsx92(
|
|
10860
|
+
AiPromptSuggestions,
|
|
10861
|
+
{
|
|
10862
|
+
suggestions,
|
|
10863
|
+
onSelectPrompt
|
|
10864
|
+
}
|
|
10865
|
+
) : children
|
|
10866
|
+
}
|
|
10867
|
+
);
|
|
9282
10868
|
}
|
|
9283
10869
|
|
|
9284
|
-
// src/design-system/components/chat/ai-chat-
|
|
9285
|
-
import {
|
|
9286
|
-
|
|
9287
|
-
|
|
9288
|
-
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
|
|
10870
|
+
// src/design-system/components/ai-chat/ai-chat-header.tsx
|
|
10871
|
+
import {
|
|
10872
|
+
Sparkles as Sparkles3,
|
|
10873
|
+
Bot as Bot3,
|
|
10874
|
+
ArrowLeft as ArrowLeft2,
|
|
10875
|
+
Bell as Bell3,
|
|
10876
|
+
Flag as Flag3,
|
|
10877
|
+
MoreVertical as MoreVertical2,
|
|
10878
|
+
CornerUpLeft as CornerUpLeft3,
|
|
10879
|
+
CornerUpRight as CornerUpRight3,
|
|
10880
|
+
Pin as Pin3,
|
|
10881
|
+
Star as Star3,
|
|
10882
|
+
Heart as Heart3,
|
|
10883
|
+
Archive as Archive3,
|
|
10884
|
+
Trash2 as Trash25,
|
|
10885
|
+
ChevronRight as ChevronRight6
|
|
10886
|
+
} from "lucide-react";
|
|
10887
|
+
import { jsx as jsx93, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
10888
|
+
function AiChatHeader({
|
|
10889
|
+
title = "AI Assistant",
|
|
10890
|
+
subtitle = "Powered by AI \u2022 Ask anything",
|
|
9292
10891
|
modelName,
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
10892
|
+
showSparkles = true,
|
|
10893
|
+
showDefaultActions = true,
|
|
10894
|
+
onBack,
|
|
10895
|
+
actions,
|
|
10896
|
+
onNotificationClick,
|
|
10897
|
+
onFlagClick,
|
|
10898
|
+
onReply,
|
|
10899
|
+
onForward,
|
|
10900
|
+
onPin,
|
|
10901
|
+
onStar,
|
|
10902
|
+
onFavorite,
|
|
10903
|
+
onArchive,
|
|
10904
|
+
onActionThis,
|
|
10905
|
+
onDelete,
|
|
10906
|
+
className
|
|
9302
10907
|
}) {
|
|
9303
|
-
|
|
9304
|
-
const [copied, setCopied] = useState9(false);
|
|
9305
|
-
const [liked, setLiked] = useState9(null);
|
|
9306
|
-
const handleCopy = () => {
|
|
9307
|
-
navigator.clipboard.writeText(content);
|
|
9308
|
-
setCopied(true);
|
|
9309
|
-
onCopy?.();
|
|
9310
|
-
setTimeout(() => setCopied(false), 2e3);
|
|
9311
|
-
};
|
|
9312
|
-
return /* @__PURE__ */ jsxs45(
|
|
10908
|
+
return /* @__PURE__ */ jsxs55(
|
|
9313
10909
|
"div",
|
|
9314
10910
|
{
|
|
9315
|
-
id: id ? `ai-bubble-${id}` : void 0,
|
|
9316
10911
|
className: cn(
|
|
9317
|
-
"
|
|
9318
|
-
isAssistant ? "bg-muted/30" : "bg-transparent",
|
|
10912
|
+
"flex items-center justify-between px-4 py-3 border-b border-border/80 bg-background/95 backdrop-blur-xs select-none",
|
|
9319
10913
|
className
|
|
9320
10914
|
),
|
|
9321
10915
|
children: [
|
|
9322
|
-
/* @__PURE__ */
|
|
9323
|
-
|
|
9324
|
-
|
|
9325
|
-
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
|
|
9329
|
-
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
|
|
9335
|
-
|
|
9336
|
-
{
|
|
9337
|
-
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
variant: "ghost",
|
|
9367
|
-
size: "icon",
|
|
9368
|
-
onClick: onRegenerate,
|
|
9369
|
-
className: "h-7 w-7 text-muted-foreground hover:text-foreground rounded-md",
|
|
9370
|
-
children: /* @__PURE__ */ jsx82(RefreshCw, { className: "h-3.5 w-3.5" })
|
|
9371
|
-
}
|
|
9372
|
-
),
|
|
9373
|
-
/* @__PURE__ */ jsx82(
|
|
9374
|
-
Button,
|
|
10916
|
+
/* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
10917
|
+
onBack && /* @__PURE__ */ jsx93(
|
|
10918
|
+
"button",
|
|
10919
|
+
{
|
|
10920
|
+
type: "button",
|
|
10921
|
+
onClick: onBack,
|
|
10922
|
+
className: "flex h-8 w-8 items-center justify-center rounded-xl hover:bg-muted text-muted-foreground hover:text-foreground transition-colors cursor-pointer",
|
|
10923
|
+
title: "Back",
|
|
10924
|
+
children: /* @__PURE__ */ jsx93(ArrowLeft2, { className: "h-4 w-4" })
|
|
10925
|
+
}
|
|
10926
|
+
),
|
|
10927
|
+
/* @__PURE__ */ jsx93("div", { className: "flex h-10 w-10 items-center justify-center rounded-2xl bg-indigo-50 dark:bg-indigo-950/50 text-indigo-600 dark:text-indigo-400 border border-indigo-200/60 dark:border-indigo-900/40 shrink-0 shadow-2xs", children: /* @__PURE__ */ jsx93(Bot3, { className: "h-5 w-5" }) }),
|
|
10928
|
+
/* @__PURE__ */ jsxs55("div", { className: "min-w-0", children: [
|
|
10929
|
+
/* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-1.5", children: [
|
|
10930
|
+
/* @__PURE__ */ jsx93("h3", { className: "truncate text-sm font-bold text-foreground tracking-tight leading-snug", children: title }),
|
|
10931
|
+
showSparkles && /* @__PURE__ */ jsx93(Sparkles3, { className: "h-3.5 w-3.5 text-indigo-500 shrink-0" })
|
|
10932
|
+
] }),
|
|
10933
|
+
/* @__PURE__ */ jsx93("p", { className: "truncate text-xs text-muted-foreground", children: subtitle ? subtitle : modelName ? `Powered by ${modelName}` : "Powered by AI \u2022 Ask anything" })
|
|
10934
|
+
] })
|
|
10935
|
+
] }),
|
|
10936
|
+
/* @__PURE__ */ jsx93("div", { className: "flex items-center gap-1.5 shrink-0", children: actions ? actions : showDefaultActions ? /* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-1", children: [
|
|
10937
|
+
/* @__PURE__ */ jsx93(
|
|
10938
|
+
"button",
|
|
10939
|
+
{
|
|
10940
|
+
type: "button",
|
|
10941
|
+
onClick: onNotificationClick,
|
|
10942
|
+
className: "flex h-8 w-8 items-center justify-center rounded-full text-amber-500 hover:bg-amber-500/10 transition-colors cursor-pointer",
|
|
10943
|
+
title: "Notifications",
|
|
10944
|
+
children: /* @__PURE__ */ jsx93(Bell3, { className: "h-4 w-4 fill-amber-500/20 text-amber-500" })
|
|
10945
|
+
}
|
|
10946
|
+
),
|
|
10947
|
+
/* @__PURE__ */ jsx93(
|
|
10948
|
+
"button",
|
|
10949
|
+
{
|
|
10950
|
+
type: "button",
|
|
10951
|
+
onClick: onFlagClick,
|
|
10952
|
+
className: "flex h-8 w-8 items-center justify-center rounded-full text-muted-foreground hover:text-red-500 hover:bg-red-500/10 transition-colors cursor-pointer",
|
|
10953
|
+
title: "Flag",
|
|
10954
|
+
children: /* @__PURE__ */ jsx93(Flag3, { className: "h-4 w-4" })
|
|
10955
|
+
}
|
|
10956
|
+
),
|
|
10957
|
+
/* @__PURE__ */ jsxs55(DropdownMenu, { children: [
|
|
10958
|
+
/* @__PURE__ */ jsx93(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx93(
|
|
10959
|
+
"button",
|
|
9375
10960
|
{
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
onThumbsUp?.();
|
|
9381
|
-
},
|
|
9382
|
-
className: cn(
|
|
9383
|
-
"h-7 w-7 text-muted-foreground hover:text-foreground rounded-md",
|
|
9384
|
-
liked === true && "text-emerald-500 bg-emerald-500/10"
|
|
9385
|
-
),
|
|
9386
|
-
children: /* @__PURE__ */ jsx82(ThumbsUp, { className: "h-3.5 w-3.5" })
|
|
10961
|
+
type: "button",
|
|
10962
|
+
className: "flex h-8 w-8 items-center justify-center rounded-full text-muted-foreground hover:text-foreground hover:bg-muted transition-colors cursor-pointer",
|
|
10963
|
+
title: "More actions",
|
|
10964
|
+
children: /* @__PURE__ */ jsx93(MoreVertical2, { className: "h-4 w-4" })
|
|
9387
10965
|
}
|
|
9388
|
-
),
|
|
9389
|
-
/* @__PURE__ */
|
|
9390
|
-
|
|
10966
|
+
) }),
|
|
10967
|
+
/* @__PURE__ */ jsxs55(
|
|
10968
|
+
DropdownMenuContent,
|
|
9391
10969
|
{
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
10970
|
+
align: "end",
|
|
10971
|
+
sideOffset: 6,
|
|
10972
|
+
className: "w-48 rounded-2xl p-1.5 shadow-2xl border border-border/80 bg-background text-foreground space-y-0.5",
|
|
10973
|
+
children: [
|
|
10974
|
+
/* @__PURE__ */ jsxs55(
|
|
10975
|
+
DropdownMenuItem,
|
|
10976
|
+
{
|
|
10977
|
+
onClick: onReply,
|
|
10978
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
10979
|
+
children: [
|
|
10980
|
+
/* @__PURE__ */ jsx93(CornerUpLeft3, { className: "h-4 w-4 text-blue-600 shrink-0" }),
|
|
10981
|
+
/* @__PURE__ */ jsx93("span", { children: "Reply" })
|
|
10982
|
+
]
|
|
10983
|
+
}
|
|
10984
|
+
),
|
|
10985
|
+
/* @__PURE__ */ jsxs55(
|
|
10986
|
+
DropdownMenuItem,
|
|
10987
|
+
{
|
|
10988
|
+
onClick: onForward,
|
|
10989
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
10990
|
+
children: [
|
|
10991
|
+
/* @__PURE__ */ jsx93(CornerUpRight3, { className: "h-4 w-4 text-sky-500 shrink-0" }),
|
|
10992
|
+
/* @__PURE__ */ jsx93("span", { children: "Forward" })
|
|
10993
|
+
]
|
|
10994
|
+
}
|
|
10995
|
+
),
|
|
10996
|
+
/* @__PURE__ */ jsxs55(
|
|
10997
|
+
DropdownMenuItem,
|
|
10998
|
+
{
|
|
10999
|
+
onClick: onPin,
|
|
11000
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
11001
|
+
children: [
|
|
11002
|
+
/* @__PURE__ */ jsx93(Pin3, { className: "h-4 w-4 text-purple-600 shrink-0" }),
|
|
11003
|
+
/* @__PURE__ */ jsx93("span", { children: "Pin Message" })
|
|
11004
|
+
]
|
|
11005
|
+
}
|
|
11006
|
+
),
|
|
11007
|
+
/* @__PURE__ */ jsxs55(
|
|
11008
|
+
DropdownMenuItem,
|
|
11009
|
+
{
|
|
11010
|
+
onClick: onStar,
|
|
11011
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
11012
|
+
children: [
|
|
11013
|
+
/* @__PURE__ */ jsx93(Star3, { className: "h-4 w-4 text-amber-500 shrink-0" }),
|
|
11014
|
+
/* @__PURE__ */ jsx93("span", { children: "Star" })
|
|
11015
|
+
]
|
|
11016
|
+
}
|
|
11017
|
+
),
|
|
11018
|
+
/* @__PURE__ */ jsxs55(
|
|
11019
|
+
DropdownMenuItem,
|
|
11020
|
+
{
|
|
11021
|
+
onClick: onFavorite,
|
|
11022
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
11023
|
+
children: [
|
|
11024
|
+
/* @__PURE__ */ jsx93(Heart3, { className: "h-4 w-4 text-rose-500 shrink-0" }),
|
|
11025
|
+
/* @__PURE__ */ jsx93("span", { children: "Favorite" })
|
|
11026
|
+
]
|
|
11027
|
+
}
|
|
11028
|
+
),
|
|
11029
|
+
/* @__PURE__ */ jsxs55(
|
|
11030
|
+
DropdownMenuItem,
|
|
11031
|
+
{
|
|
11032
|
+
onClick: onArchive,
|
|
11033
|
+
className: "gap-2.5 py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
11034
|
+
children: [
|
|
11035
|
+
/* @__PURE__ */ jsx93(Archive3, { className: "h-4 w-4 text-indigo-600 shrink-0" }),
|
|
11036
|
+
/* @__PURE__ */ jsx93("span", { children: "Archive" })
|
|
11037
|
+
]
|
|
11038
|
+
}
|
|
11039
|
+
),
|
|
11040
|
+
/* @__PURE__ */ jsxs55(
|
|
11041
|
+
DropdownMenuItem,
|
|
11042
|
+
{
|
|
11043
|
+
onClick: onActionThis,
|
|
11044
|
+
className: "flex items-center justify-between py-1.5 px-2 text-xs font-semibold cursor-pointer rounded-xl hover:bg-muted",
|
|
11045
|
+
children: [
|
|
11046
|
+
/* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-2.5", children: [
|
|
11047
|
+
/* @__PURE__ */ jsx93(Bell3, { className: "h-4 w-4 text-orange-500 shrink-0" }),
|
|
11048
|
+
/* @__PURE__ */ jsx93("span", { children: "Action This" })
|
|
11049
|
+
] }),
|
|
11050
|
+
/* @__PURE__ */ jsx93(ChevronRight6, { className: "h-3.5 w-3.5 text-muted-foreground" })
|
|
11051
|
+
]
|
|
11052
|
+
}
|
|
11053
|
+
),
|
|
11054
|
+
/* @__PURE__ */ jsxs55(
|
|
11055
|
+
DropdownMenuItem,
|
|
11056
|
+
{
|
|
11057
|
+
onClick: onDelete,
|
|
11058
|
+
className: "flex items-center justify-between py-1.5 px-2 text-xs font-semibold text-rose-500 hover:text-rose-600 hover:bg-rose-50 dark:hover:bg-rose-950/30 cursor-pointer rounded-xl",
|
|
11059
|
+
children: [
|
|
11060
|
+
/* @__PURE__ */ jsxs55("div", { className: "flex items-center gap-2.5", children: [
|
|
11061
|
+
/* @__PURE__ */ jsx93(Trash25, { className: "h-4 w-4 text-rose-500 shrink-0" }),
|
|
11062
|
+
/* @__PURE__ */ jsx93("span", { children: "Delete" })
|
|
11063
|
+
] }),
|
|
11064
|
+
/* @__PURE__ */ jsx93(ChevronRight6, { className: "h-3.5 w-3.5 text-rose-400" })
|
|
11065
|
+
]
|
|
11066
|
+
}
|
|
11067
|
+
)
|
|
11068
|
+
]
|
|
9403
11069
|
}
|
|
9404
11070
|
)
|
|
9405
11071
|
] })
|
|
9406
|
-
] })
|
|
11072
|
+
] }) : null })
|
|
9407
11073
|
]
|
|
9408
11074
|
}
|
|
9409
11075
|
);
|
|
9410
11076
|
}
|
|
9411
11077
|
|
|
9412
11078
|
// src/design-system/templates/list-template.tsx
|
|
9413
|
-
import { jsx as
|
|
11079
|
+
import { jsx as jsx94, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
9414
11080
|
function ListTemplate({
|
|
9415
11081
|
title,
|
|
9416
11082
|
description,
|
|
@@ -9430,8 +11096,8 @@ function ListTemplate({
|
|
|
9430
11096
|
...props
|
|
9431
11097
|
}) {
|
|
9432
11098
|
const hasFilterBar = Boolean(onSearchChange) || Boolean(filters) || activeFilters && activeFilters.length > 0 || Boolean(filterActions);
|
|
9433
|
-
return /* @__PURE__ */
|
|
9434
|
-
/* @__PURE__ */
|
|
11099
|
+
return /* @__PURE__ */ jsxs56("div", { className: cn("flex flex-col gap-6 p-4 sm:p-6 md:p-8", className), ...props, children: [
|
|
11100
|
+
/* @__PURE__ */ jsx94(
|
|
9435
11101
|
PageHeader,
|
|
9436
11102
|
{
|
|
9437
11103
|
title,
|
|
@@ -9441,7 +11107,7 @@ function ListTemplate({
|
|
|
9441
11107
|
actions
|
|
9442
11108
|
}
|
|
9443
11109
|
),
|
|
9444
|
-
hasFilterBar && /* @__PURE__ */
|
|
11110
|
+
hasFilterBar && /* @__PURE__ */ jsx94(
|
|
9445
11111
|
FilterBar,
|
|
9446
11112
|
{
|
|
9447
11113
|
searchPlaceholder,
|
|
@@ -9453,14 +11119,14 @@ function ListTemplate({
|
|
|
9453
11119
|
actions: filterActions
|
|
9454
11120
|
}
|
|
9455
11121
|
),
|
|
9456
|
-
/* @__PURE__ */
|
|
9457
|
-
footer && /* @__PURE__ */
|
|
11122
|
+
/* @__PURE__ */ jsx94("div", { className: "flex-1", children }),
|
|
11123
|
+
footer && /* @__PURE__ */ jsx94("div", { className: "pt-2", children: footer })
|
|
9458
11124
|
] });
|
|
9459
11125
|
}
|
|
9460
11126
|
|
|
9461
11127
|
// src/design-system/templates/detail-template.tsx
|
|
9462
|
-
import { ArrowLeft as
|
|
9463
|
-
import { jsx as
|
|
11128
|
+
import { ArrowLeft as ArrowLeft3 } from "lucide-react";
|
|
11129
|
+
import { jsx as jsx95, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
9464
11130
|
function DetailTemplate({
|
|
9465
11131
|
title,
|
|
9466
11132
|
description,
|
|
@@ -9475,9 +11141,9 @@ function DetailTemplate({
|
|
|
9475
11141
|
className,
|
|
9476
11142
|
...props
|
|
9477
11143
|
}) {
|
|
9478
|
-
return /* @__PURE__ */
|
|
9479
|
-
/* @__PURE__ */
|
|
9480
|
-
onBack && /* @__PURE__ */
|
|
11144
|
+
return /* @__PURE__ */ jsxs57("div", { className: cn("flex flex-col gap-6 p-4 sm:p-6 md:p-8", className), ...props, children: [
|
|
11145
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex flex-col gap-2", children: [
|
|
11146
|
+
onBack && /* @__PURE__ */ jsxs57(
|
|
9481
11147
|
Button,
|
|
9482
11148
|
{
|
|
9483
11149
|
variant: "ghost",
|
|
@@ -9485,12 +11151,12 @@ function DetailTemplate({
|
|
|
9485
11151
|
onClick: onBack,
|
|
9486
11152
|
className: "w-fit gap-1.5 px-0 text-xs text-muted-foreground hover:bg-transparent hover:text-foreground",
|
|
9487
11153
|
children: [
|
|
9488
|
-
/* @__PURE__ */
|
|
11154
|
+
/* @__PURE__ */ jsx95(ArrowLeft3, { className: "h-3.5 w-3.5" }),
|
|
9489
11155
|
backLabel
|
|
9490
11156
|
]
|
|
9491
11157
|
}
|
|
9492
11158
|
),
|
|
9493
|
-
/* @__PURE__ */
|
|
11159
|
+
/* @__PURE__ */ jsx95(
|
|
9494
11160
|
PageHeader,
|
|
9495
11161
|
{
|
|
9496
11162
|
title,
|
|
@@ -9501,8 +11167,8 @@ function DetailTemplate({
|
|
|
9501
11167
|
}
|
|
9502
11168
|
)
|
|
9503
11169
|
] }),
|
|
9504
|
-
highlights && /* @__PURE__ */
|
|
9505
|
-
/* @__PURE__ */
|
|
11170
|
+
highlights && /* @__PURE__ */ jsx95("div", { className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4", children: highlights }),
|
|
11171
|
+
/* @__PURE__ */ jsxs57(
|
|
9506
11172
|
"div",
|
|
9507
11173
|
{
|
|
9508
11174
|
className: cn(
|
|
@@ -9510,8 +11176,8 @@ function DetailTemplate({
|
|
|
9510
11176
|
sidebar ? "grid-cols-1 lg:grid-cols-3" : "grid-cols-1"
|
|
9511
11177
|
),
|
|
9512
11178
|
children: [
|
|
9513
|
-
/* @__PURE__ */
|
|
9514
|
-
sidebar && /* @__PURE__ */
|
|
11179
|
+
/* @__PURE__ */ jsx95("div", { className: cn(sidebar ? "lg:col-span-2 space-y-6" : "space-y-6"), children }),
|
|
11180
|
+
sidebar && /* @__PURE__ */ jsx95("aside", { className: "space-y-6 lg:col-span-1", children: sidebar })
|
|
9515
11181
|
]
|
|
9516
11182
|
}
|
|
9517
11183
|
)
|
|
@@ -9519,8 +11185,8 @@ function DetailTemplate({
|
|
|
9519
11185
|
}
|
|
9520
11186
|
|
|
9521
11187
|
// src/design-system/templates/form-template.tsx
|
|
9522
|
-
import { ArrowLeft as
|
|
9523
|
-
import { jsx as
|
|
11188
|
+
import { ArrowLeft as ArrowLeft4 } from "lucide-react";
|
|
11189
|
+
import { jsx as jsx96, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
9524
11190
|
function FormTemplate({
|
|
9525
11191
|
title,
|
|
9526
11192
|
description,
|
|
@@ -9539,9 +11205,9 @@ function FormTemplate({
|
|
|
9539
11205
|
onSubmit,
|
|
9540
11206
|
...props
|
|
9541
11207
|
}) {
|
|
9542
|
-
return /* @__PURE__ */
|
|
9543
|
-
/* @__PURE__ */
|
|
9544
|
-
onBack && /* @__PURE__ */
|
|
11208
|
+
return /* @__PURE__ */ jsxs58("div", { className: "flex flex-col gap-6 p-4 sm:p-6 md:p-8", children: [
|
|
11209
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex flex-col gap-2", children: [
|
|
11210
|
+
onBack && /* @__PURE__ */ jsxs58(
|
|
9545
11211
|
Button,
|
|
9546
11212
|
{
|
|
9547
11213
|
type: "button",
|
|
@@ -9550,12 +11216,12 @@ function FormTemplate({
|
|
|
9550
11216
|
onClick: onBack,
|
|
9551
11217
|
className: "w-fit gap-1.5 px-0 text-xs text-muted-foreground hover:bg-transparent hover:text-foreground",
|
|
9552
11218
|
children: [
|
|
9553
|
-
/* @__PURE__ */
|
|
11219
|
+
/* @__PURE__ */ jsx96(ArrowLeft4, { className: "h-3.5 w-3.5" }),
|
|
9554
11220
|
backLabel
|
|
9555
11221
|
]
|
|
9556
11222
|
}
|
|
9557
11223
|
),
|
|
9558
|
-
/* @__PURE__ */
|
|
11224
|
+
/* @__PURE__ */ jsx96(
|
|
9559
11225
|
PageHeader,
|
|
9560
11226
|
{
|
|
9561
11227
|
title,
|
|
@@ -9565,9 +11231,9 @@ function FormTemplate({
|
|
|
9565
11231
|
}
|
|
9566
11232
|
)
|
|
9567
11233
|
] }),
|
|
9568
|
-
/* @__PURE__ */
|
|
9569
|
-
/* @__PURE__ */
|
|
9570
|
-
/* @__PURE__ */
|
|
11234
|
+
/* @__PURE__ */ jsxs58("form", { onSubmit, className: cn("space-y-8", className), ...props, children: [
|
|
11235
|
+
/* @__PURE__ */ jsx96("div", { className: "space-y-6", children }),
|
|
11236
|
+
/* @__PURE__ */ jsxs58(
|
|
9571
11237
|
"div",
|
|
9572
11238
|
{
|
|
9573
11239
|
className: cn(
|
|
@@ -9575,9 +11241,9 @@ function FormTemplate({
|
|
|
9575
11241
|
stickyFooter && "sticky bottom-0 -mx-4 -mb-4 bg-background/95 p-4 backdrop-blur border-t sm:-mx-6 sm:-mb-6 sm:p-6 md:-mx-8 md:-mb-8 md:p-8"
|
|
9576
11242
|
),
|
|
9577
11243
|
children: [
|
|
9578
|
-
/* @__PURE__ */
|
|
9579
|
-
/* @__PURE__ */
|
|
9580
|
-
onCancel && /* @__PURE__ */
|
|
11244
|
+
/* @__PURE__ */ jsx96("div", { children: secondaryActions }),
|
|
11245
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex items-center gap-3", children: [
|
|
11246
|
+
onCancel && /* @__PURE__ */ jsx96(
|
|
9581
11247
|
Button,
|
|
9582
11248
|
{
|
|
9583
11249
|
type: "button",
|
|
@@ -9587,7 +11253,7 @@ function FormTemplate({
|
|
|
9587
11253
|
children: cancelLabel
|
|
9588
11254
|
}
|
|
9589
11255
|
),
|
|
9590
|
-
/* @__PURE__ */
|
|
11256
|
+
/* @__PURE__ */ jsx96(Button, { type: "submit", disabled: isSubmitting, children: isSubmitting ? "Saving..." : submitLabel })
|
|
9591
11257
|
] })
|
|
9592
11258
|
]
|
|
9593
11259
|
}
|
|
@@ -9597,8 +11263,8 @@ function FormTemplate({
|
|
|
9597
11263
|
}
|
|
9598
11264
|
|
|
9599
11265
|
// src/design-system/templates/wizard-template.tsx
|
|
9600
|
-
import { Check as
|
|
9601
|
-
import { jsx as
|
|
11266
|
+
import { Check as Check7, ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight7 } from "lucide-react";
|
|
11267
|
+
import { jsx as jsx97, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
9602
11268
|
function WizardTemplate({
|
|
9603
11269
|
title,
|
|
9604
11270
|
description,
|
|
@@ -9619,18 +11285,18 @@ function WizardTemplate({
|
|
|
9619
11285
|
}) {
|
|
9620
11286
|
const isLastStep = currentStepIndex === steps.length - 1;
|
|
9621
11287
|
const isFirstStep = currentStepIndex === 0;
|
|
9622
|
-
return /* @__PURE__ */
|
|
9623
|
-
/* @__PURE__ */
|
|
9624
|
-
/* @__PURE__ */
|
|
11288
|
+
return /* @__PURE__ */ jsxs59("div", { className: cn("flex flex-col gap-6 p-4 sm:p-6 md:p-8", className), ...props, children: [
|
|
11289
|
+
/* @__PURE__ */ jsx97(PageHeader, { title, description }),
|
|
11290
|
+
/* @__PURE__ */ jsx97("nav", { "aria-label": "Wizard Progress", className: "py-2", children: /* @__PURE__ */ jsx97("ol", { className: "flex items-center justify-between gap-2 overflow-x-auto pb-2", children: steps.map((step, idx) => {
|
|
9625
11291
|
const isCompleted = idx < currentStepIndex;
|
|
9626
11292
|
const isCurrent = idx === currentStepIndex;
|
|
9627
11293
|
const isClickable = onStepChange && idx < currentStepIndex;
|
|
9628
|
-
return /* @__PURE__ */
|
|
11294
|
+
return /* @__PURE__ */ jsxs59(
|
|
9629
11295
|
"li",
|
|
9630
11296
|
{
|
|
9631
11297
|
className: "flex flex-1 items-center gap-2.5 min-w-[120px]",
|
|
9632
11298
|
children: [
|
|
9633
|
-
/* @__PURE__ */
|
|
11299
|
+
/* @__PURE__ */ jsxs59(
|
|
9634
11300
|
"button",
|
|
9635
11301
|
{
|
|
9636
11302
|
type: "button",
|
|
@@ -9641,7 +11307,7 @@ function WizardTemplate({
|
|
|
9641
11307
|
isClickable && "cursor-pointer hover:opacity-80"
|
|
9642
11308
|
),
|
|
9643
11309
|
children: [
|
|
9644
|
-
/* @__PURE__ */
|
|
11310
|
+
/* @__PURE__ */ jsx97(
|
|
9645
11311
|
"span",
|
|
9646
11312
|
{
|
|
9647
11313
|
className: cn(
|
|
@@ -9650,10 +11316,10 @@ function WizardTemplate({
|
|
|
9650
11316
|
isCurrent && "border-2 border-primary bg-primary/10 text-primary font-bold",
|
|
9651
11317
|
!isCompleted && !isCurrent && "border border-border bg-muted text-muted-foreground"
|
|
9652
11318
|
),
|
|
9653
|
-
children: isCompleted ? /* @__PURE__ */
|
|
11319
|
+
children: isCompleted ? /* @__PURE__ */ jsx97(Check7, { className: "h-4 w-4" }) : idx + 1
|
|
9654
11320
|
}
|
|
9655
11321
|
),
|
|
9656
|
-
/* @__PURE__ */
|
|
11322
|
+
/* @__PURE__ */ jsx97("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsx97(
|
|
9657
11323
|
"div",
|
|
9658
11324
|
{
|
|
9659
11325
|
className: cn(
|
|
@@ -9666,7 +11332,7 @@ function WizardTemplate({
|
|
|
9666
11332
|
]
|
|
9667
11333
|
}
|
|
9668
11334
|
),
|
|
9669
|
-
idx < steps.length - 1 && /* @__PURE__ */
|
|
11335
|
+
idx < steps.length - 1 && /* @__PURE__ */ jsx97(
|
|
9670
11336
|
"div",
|
|
9671
11337
|
{
|
|
9672
11338
|
className: cn(
|
|
@@ -9680,9 +11346,9 @@ function WizardTemplate({
|
|
|
9680
11346
|
step.id
|
|
9681
11347
|
);
|
|
9682
11348
|
}) }) }),
|
|
9683
|
-
/* @__PURE__ */
|
|
9684
|
-
/* @__PURE__ */
|
|
9685
|
-
/* @__PURE__ */
|
|
11349
|
+
/* @__PURE__ */ jsx97("div", { className: "flex-1 rounded-lg border bg-card p-4 sm:p-6", children }),
|
|
11350
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center justify-between pt-2", children: [
|
|
11351
|
+
/* @__PURE__ */ jsxs59(
|
|
9686
11352
|
Button,
|
|
9687
11353
|
{
|
|
9688
11354
|
type: "button",
|
|
@@ -9690,12 +11356,12 @@ function WizardTemplate({
|
|
|
9690
11356
|
disabled: isFirstStep || isSubmitting,
|
|
9691
11357
|
onClick: onPrevious,
|
|
9692
11358
|
children: [
|
|
9693
|
-
/* @__PURE__ */
|
|
11359
|
+
/* @__PURE__ */ jsx97(ChevronLeft2, { className: "mr-1 h-4 w-4" }),
|
|
9694
11360
|
previousLabel
|
|
9695
11361
|
]
|
|
9696
11362
|
}
|
|
9697
11363
|
),
|
|
9698
|
-
isLastStep ? /* @__PURE__ */
|
|
11364
|
+
isLastStep ? /* @__PURE__ */ jsx97(
|
|
9699
11365
|
Button,
|
|
9700
11366
|
{
|
|
9701
11367
|
type: "button",
|
|
@@ -9703,7 +11369,7 @@ function WizardTemplate({
|
|
|
9703
11369
|
onClick: onSubmit,
|
|
9704
11370
|
children: isSubmitting ? "Submitting..." : submitLabel
|
|
9705
11371
|
}
|
|
9706
|
-
) : /* @__PURE__ */
|
|
11372
|
+
) : /* @__PURE__ */ jsxs59(
|
|
9707
11373
|
Button,
|
|
9708
11374
|
{
|
|
9709
11375
|
type: "button",
|
|
@@ -9711,7 +11377,7 @@ function WizardTemplate({
|
|
|
9711
11377
|
onClick: onNext,
|
|
9712
11378
|
children: [
|
|
9713
11379
|
nextLabel,
|
|
9714
|
-
/* @__PURE__ */
|
|
11380
|
+
/* @__PURE__ */ jsx97(ChevronRight7, { className: "ml-1 h-4 w-4" })
|
|
9715
11381
|
]
|
|
9716
11382
|
}
|
|
9717
11383
|
)
|
|
@@ -9720,7 +11386,7 @@ function WizardTemplate({
|
|
|
9720
11386
|
}
|
|
9721
11387
|
|
|
9722
11388
|
// src/design-system/templates/dashboard-template.tsx
|
|
9723
|
-
import { jsx as
|
|
11389
|
+
import { jsx as jsx98, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
9724
11390
|
function DashboardTemplate({
|
|
9725
11391
|
title,
|
|
9726
11392
|
description,
|
|
@@ -9734,8 +11400,8 @@ function DashboardTemplate({
|
|
|
9734
11400
|
className,
|
|
9735
11401
|
...props
|
|
9736
11402
|
}) {
|
|
9737
|
-
return /* @__PURE__ */
|
|
9738
|
-
/* @__PURE__ */
|
|
11403
|
+
return /* @__PURE__ */ jsxs60("div", { className: cn("flex flex-col gap-6 p-4 sm:p-6 md:p-8", className), ...props, children: [
|
|
11404
|
+
/* @__PURE__ */ jsx98(
|
|
9739
11405
|
PageHeader,
|
|
9740
11406
|
{
|
|
9741
11407
|
title,
|
|
@@ -9745,15 +11411,15 @@ function DashboardTemplate({
|
|
|
9745
11411
|
actions
|
|
9746
11412
|
}
|
|
9747
11413
|
),
|
|
9748
|
-
metrics && /* @__PURE__ */
|
|
9749
|
-
charts && /* @__PURE__ */
|
|
9750
|
-
activity && /* @__PURE__ */
|
|
9751
|
-
children && /* @__PURE__ */
|
|
11414
|
+
metrics && /* @__PURE__ */ jsx98("section", { "aria-label": "Key Metrics", className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4", children: metrics }),
|
|
11415
|
+
charts && /* @__PURE__ */ jsx98("section", { "aria-label": "Charts and Visualizations", className: "grid gap-4 md:grid-cols-2 lg:grid-cols-7", children: charts }),
|
|
11416
|
+
activity && /* @__PURE__ */ jsx98("section", { "aria-label": "Recent Activity", className: "space-y-4", children: activity }),
|
|
11417
|
+
children && /* @__PURE__ */ jsx98("div", { className: "space-y-6", children })
|
|
9752
11418
|
] });
|
|
9753
11419
|
}
|
|
9754
11420
|
|
|
9755
11421
|
// src/design-system/templates/workspace-template.tsx
|
|
9756
|
-
import { jsx as
|
|
11422
|
+
import { jsx as jsx99, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
9757
11423
|
function WorkspaceTemplate({
|
|
9758
11424
|
header,
|
|
9759
11425
|
leftSidebar,
|
|
@@ -9763,7 +11429,7 @@ function WorkspaceTemplate({
|
|
|
9763
11429
|
className,
|
|
9764
11430
|
...props
|
|
9765
11431
|
}) {
|
|
9766
|
-
return /* @__PURE__ */
|
|
11432
|
+
return /* @__PURE__ */ jsxs61(
|
|
9767
11433
|
"div",
|
|
9768
11434
|
{
|
|
9769
11435
|
className: cn(
|
|
@@ -9772,29 +11438,29 @@ function WorkspaceTemplate({
|
|
|
9772
11438
|
),
|
|
9773
11439
|
...props,
|
|
9774
11440
|
children: [
|
|
9775
|
-
header && /* @__PURE__ */
|
|
9776
|
-
/* @__PURE__ */
|
|
9777
|
-
leftSidebar && /* @__PURE__ */
|
|
9778
|
-
/* @__PURE__ */
|
|
9779
|
-
rightSidebar && /* @__PURE__ */
|
|
11441
|
+
header && /* @__PURE__ */ jsx99("header", { className: "flex h-14 shrink-0 items-center border-b px-4 bg-background z-10", children: header }),
|
|
11442
|
+
/* @__PURE__ */ jsxs61("div", { className: "flex flex-1 overflow-hidden", children: [
|
|
11443
|
+
leftSidebar && /* @__PURE__ */ jsx99("aside", { className: "hidden md:flex w-64 shrink-0 flex-col border-r bg-sidebar p-3 overflow-y-auto", children: leftSidebar }),
|
|
11444
|
+
/* @__PURE__ */ jsx99("main", { className: "flex flex-1 flex-col overflow-y-auto p-4 sm:p-6 bg-muted/20", children }),
|
|
11445
|
+
rightSidebar && /* @__PURE__ */ jsx99("aside", { className: "hidden lg:flex w-80 shrink-0 flex-col border-l bg-background p-4 overflow-y-auto", children: rightSidebar })
|
|
9780
11446
|
] }),
|
|
9781
|
-
footer && /* @__PURE__ */
|
|
11447
|
+
footer && /* @__PURE__ */ jsx99("footer", { className: "flex h-10 shrink-0 items-center border-t px-4 text-xs text-muted-foreground bg-background", children: footer })
|
|
9782
11448
|
]
|
|
9783
11449
|
}
|
|
9784
11450
|
);
|
|
9785
11451
|
}
|
|
9786
11452
|
|
|
9787
11453
|
// src/design-system/templates/app-header.tsx
|
|
9788
|
-
import { useEffect as
|
|
9789
|
-
import { Bell } from "lucide-react";
|
|
11454
|
+
import { useEffect as useEffect14 } from "react";
|
|
11455
|
+
import { Bell as Bell4 } from "lucide-react";
|
|
9790
11456
|
import { useRouter as useRouter2 } from "next/navigation";
|
|
9791
11457
|
|
|
9792
11458
|
// src/components/layout/header.tsx
|
|
9793
|
-
import { useEffect as
|
|
9794
|
-
import { jsx as
|
|
11459
|
+
import { useEffect as useEffect13, useState as useState12 } from "react";
|
|
11460
|
+
import { jsx as jsx100, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
9795
11461
|
function Header({ className, fixed, children, ...props }) {
|
|
9796
|
-
const [offset, setOffset] =
|
|
9797
|
-
|
|
11462
|
+
const [offset, setOffset] = useState12(0);
|
|
11463
|
+
useEffect13(() => {
|
|
9798
11464
|
const onScroll = () => {
|
|
9799
11465
|
setOffset(document.body.scrollTop || document.documentElement.scrollTop);
|
|
9800
11466
|
};
|
|
@@ -9803,7 +11469,7 @@ function Header({ className, fixed, children, ...props }) {
|
|
|
9803
11469
|
}, []);
|
|
9804
11470
|
return (
|
|
9805
11471
|
// Page header container: fixed mode me top par sticky behavior deta hai.
|
|
9806
|
-
/* @__PURE__ */
|
|
11472
|
+
/* @__PURE__ */ jsx100(
|
|
9807
11473
|
"header",
|
|
9808
11474
|
{
|
|
9809
11475
|
className: cn(
|
|
@@ -9813,7 +11479,7 @@ function Header({ className, fixed, children, ...props }) {
|
|
|
9813
11479
|
className
|
|
9814
11480
|
),
|
|
9815
11481
|
...props,
|
|
9816
|
-
children: /* @__PURE__ */
|
|
11482
|
+
children: /* @__PURE__ */ jsxs62(
|
|
9817
11483
|
"div",
|
|
9818
11484
|
{
|
|
9819
11485
|
className: cn(
|
|
@@ -9822,7 +11488,7 @@ function Header({ className, fixed, children, ...props }) {
|
|
|
9822
11488
|
offset > 10 && fixed && "after:absolute after:inset-0 after:-z-10 after:bg-background/20 after:backdrop-blur-lg"
|
|
9823
11489
|
),
|
|
9824
11490
|
children: [
|
|
9825
|
-
/* @__PURE__ */
|
|
11491
|
+
/* @__PURE__ */ jsx100(AppLogo, { className: "shrink-0 md:hidden" }),
|
|
9826
11492
|
children
|
|
9827
11493
|
]
|
|
9828
11494
|
}
|
|
@@ -9834,8 +11500,8 @@ function Header({ className, fixed, children, ...props }) {
|
|
|
9834
11500
|
|
|
9835
11501
|
// src/components/search.tsx
|
|
9836
11502
|
import { SearchIcon as SearchIcon5 } from "lucide-react";
|
|
9837
|
-
import { jsx as
|
|
9838
|
-
function
|
|
11503
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
11504
|
+
function Search6({
|
|
9839
11505
|
className = "",
|
|
9840
11506
|
placeholder = "Search",
|
|
9841
11507
|
iconOnly = true,
|
|
@@ -9847,7 +11513,7 @@ function Search2({
|
|
|
9847
11513
|
search.setOpen(true);
|
|
9848
11514
|
}
|
|
9849
11515
|
};
|
|
9850
|
-
return /* @__PURE__ */
|
|
11516
|
+
return /* @__PURE__ */ jsx101(
|
|
9851
11517
|
Button,
|
|
9852
11518
|
{
|
|
9853
11519
|
...props,
|
|
@@ -9857,7 +11523,7 @@ function Search2({
|
|
|
9857
11523
|
"aria-label": "Search",
|
|
9858
11524
|
"aria-keyshortcuts": "Meta+K Control+K",
|
|
9859
11525
|
onClick: openSearch,
|
|
9860
|
-
children: /* @__PURE__ */
|
|
11526
|
+
children: /* @__PURE__ */ jsx101(SearchIcon5, { className: "size-5", "aria-hidden": "true" })
|
|
9861
11527
|
}
|
|
9862
11528
|
);
|
|
9863
11529
|
}
|
|
@@ -10026,7 +11692,7 @@ var useNotificationStore = create2((set, get) => ({
|
|
|
10026
11692
|
}));
|
|
10027
11693
|
|
|
10028
11694
|
// src/design-system/templates/app-header.tsx
|
|
10029
|
-
import { Fragment as
|
|
11695
|
+
import { Fragment as Fragment3, jsx as jsx102, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
10030
11696
|
function AppHeader({
|
|
10031
11697
|
title,
|
|
10032
11698
|
fixed = true,
|
|
@@ -10036,7 +11702,7 @@ function AppHeader({
|
|
|
10036
11702
|
const router = useRouter2();
|
|
10037
11703
|
const currentUser = useAuthStore((state) => state.auth.user);
|
|
10038
11704
|
const { unreadCount, fetchNotifications, subscribeToNotifications, unsubscribe } = useNotificationStore();
|
|
10039
|
-
|
|
11705
|
+
useEffect14(() => {
|
|
10040
11706
|
if (currentUser) {
|
|
10041
11707
|
fetchNotifications(currentUser.accountNo);
|
|
10042
11708
|
subscribeToNotifications(currentUser.accountNo);
|
|
@@ -10045,12 +11711,12 @@ function AppHeader({
|
|
|
10045
11711
|
unsubscribe();
|
|
10046
11712
|
};
|
|
10047
11713
|
}, [currentUser, fetchNotifications, subscribeToNotifications, unsubscribe]);
|
|
10048
|
-
return /* @__PURE__ */
|
|
10049
|
-
/* @__PURE__ */
|
|
10050
|
-
/* @__PURE__ */
|
|
10051
|
-
/* @__PURE__ */
|
|
11714
|
+
return /* @__PURE__ */ jsx102(Header, { fixed, className: "border-b bg-background", children: /* @__PURE__ */ jsx102("div", { className: "flex flex-1 items-center justify-between w-full", children: iconsPosition === "left" ? /* @__PURE__ */ jsxs63("div", { className: "flex items-center gap-2 sm:gap-3 min-w-0", children: [
|
|
11715
|
+
/* @__PURE__ */ jsx102("h1", { className: "min-w-0 truncate text-base font-semibold sm:text-lg", children: title }),
|
|
11716
|
+
/* @__PURE__ */ jsxs63("div", { className: "flex items-center gap-1 sm:gap-2 shrink-0 ml-1", children: [
|
|
11717
|
+
/* @__PURE__ */ jsx102(Search6, { iconOnly: true }),
|
|
10052
11718
|
children,
|
|
10053
|
-
/* @__PURE__ */
|
|
11719
|
+
/* @__PURE__ */ jsxs63(
|
|
10054
11720
|
Button,
|
|
10055
11721
|
{
|
|
10056
11722
|
variant: "ghost",
|
|
@@ -10059,18 +11725,18 @@ function AppHeader({
|
|
|
10059
11725
|
"aria-label": "Notifications",
|
|
10060
11726
|
onClick: () => router.push("/notification"),
|
|
10061
11727
|
children: [
|
|
10062
|
-
/* @__PURE__ */
|
|
10063
|
-
unreadCount > 0 && /* @__PURE__ */
|
|
11728
|
+
/* @__PURE__ */ jsx102(Bell4, { className: "size-5" }),
|
|
11729
|
+
unreadCount > 0 && /* @__PURE__ */ jsx102("span", { className: "absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-medium text-white shadow-xs", children: unreadCount > 5 ? "5+" : unreadCount })
|
|
10064
11730
|
]
|
|
10065
11731
|
}
|
|
10066
11732
|
)
|
|
10067
11733
|
] })
|
|
10068
|
-
] }) : /* @__PURE__ */
|
|
10069
|
-
/* @__PURE__ */
|
|
10070
|
-
/* @__PURE__ */
|
|
10071
|
-
/* @__PURE__ */
|
|
11734
|
+
] }) : /* @__PURE__ */ jsxs63(Fragment3, { children: [
|
|
11735
|
+
/* @__PURE__ */ jsx102("h1", { className: "min-w-0 truncate text-base font-semibold sm:text-lg", children: title }),
|
|
11736
|
+
/* @__PURE__ */ jsxs63("div", { className: "ml-auto flex items-center gap-2 sm:gap-3", children: [
|
|
11737
|
+
/* @__PURE__ */ jsx102(Search6, { iconOnly: true }),
|
|
10072
11738
|
children,
|
|
10073
|
-
/* @__PURE__ */
|
|
11739
|
+
/* @__PURE__ */ jsxs63(
|
|
10074
11740
|
Button,
|
|
10075
11741
|
{
|
|
10076
11742
|
variant: "ghost",
|
|
@@ -10079,8 +11745,8 @@ function AppHeader({
|
|
|
10079
11745
|
"aria-label": "Notifications",
|
|
10080
11746
|
onClick: () => router.push("/notification"),
|
|
10081
11747
|
children: [
|
|
10082
|
-
/* @__PURE__ */
|
|
10083
|
-
unreadCount > 0 && /* @__PURE__ */
|
|
11748
|
+
/* @__PURE__ */ jsx102(Bell4, { className: "size-5" }),
|
|
11749
|
+
unreadCount > 0 && /* @__PURE__ */ jsx102("span", { className: "absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red-500 px-1 text-[10px] font-medium text-white shadow-xs", children: unreadCount > 5 ? "5+" : unreadCount })
|
|
10084
11750
|
]
|
|
10085
11751
|
}
|
|
10086
11752
|
)
|
|
@@ -10094,7 +11760,7 @@ import {
|
|
|
10094
11760
|
HelpCircle as HelpCircle2,
|
|
10095
11761
|
Settings as Settings2,
|
|
10096
11762
|
Command as Command3,
|
|
10097
|
-
Bot as
|
|
11763
|
+
Bot as Bot4,
|
|
10098
11764
|
SearchIcon as SearchIcon6,
|
|
10099
11765
|
ChartArea as ChartArea2,
|
|
10100
11766
|
Map as Map3,
|
|
@@ -10142,7 +11808,7 @@ var sidebarData2 = {
|
|
|
10142
11808
|
{
|
|
10143
11809
|
title: "AI Chat",
|
|
10144
11810
|
url: "/ai_chat",
|
|
10145
|
-
icon:
|
|
11811
|
+
icon: Bot4
|
|
10146
11812
|
},
|
|
10147
11813
|
{
|
|
10148
11814
|
title: "AI Search",
|
|
@@ -10192,12 +11858,12 @@ var sidebarData2 = {
|
|
|
10192
11858
|
};
|
|
10193
11859
|
|
|
10194
11860
|
// src/design-system/templates/app-logo.tsx
|
|
10195
|
-
import { jsx as
|
|
11861
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
10196
11862
|
function AppLogo({ className }) {
|
|
10197
11863
|
const { toggleSidebar } = useSidebar();
|
|
10198
11864
|
const team = sidebarData2.teams[0];
|
|
10199
11865
|
const Logo = team.logo;
|
|
10200
|
-
return /* @__PURE__ */
|
|
11866
|
+
return /* @__PURE__ */ jsx103(
|
|
10201
11867
|
Button,
|
|
10202
11868
|
{
|
|
10203
11869
|
type: "button",
|
|
@@ -10208,14 +11874,14 @@ function AppLogo({ className }) {
|
|
|
10208
11874
|
className
|
|
10209
11875
|
),
|
|
10210
11876
|
"aria-label": "Open sidebar menu",
|
|
10211
|
-
children: /* @__PURE__ */
|
|
11877
|
+
children: /* @__PURE__ */ jsx103("div", { className: "flex size-full items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ jsx103(Logo, { className: "size-4" }) })
|
|
10212
11878
|
}
|
|
10213
11879
|
);
|
|
10214
11880
|
}
|
|
10215
11881
|
|
|
10216
11882
|
// src/context/layout-provider.tsx
|
|
10217
|
-
import { createContext as createContext9, useContext as useContext10, useState as
|
|
10218
|
-
import { jsx as
|
|
11883
|
+
import { createContext as createContext9, useContext as useContext10, useState as useState13 } from "react";
|
|
11884
|
+
import { jsx as jsx104 } from "react/jsx-runtime";
|
|
10219
11885
|
var LAYOUT_COLLAPSIBLE_COOKIE_NAME = "layout_collapsible";
|
|
10220
11886
|
var LAYOUT_VARIANT_COOKIE_NAME = "layout_variant";
|
|
10221
11887
|
var LAYOUT_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
@@ -10223,15 +11889,15 @@ var DEFAULT_VARIANT = "inset";
|
|
|
10223
11889
|
var DEFAULT_COLLAPSIBLE = "icon";
|
|
10224
11890
|
var LayoutContext = createContext9(null);
|
|
10225
11891
|
function LayoutProvider({ children }) {
|
|
10226
|
-
const [collapsible, _setCollapsible] =
|
|
11892
|
+
const [collapsible, _setCollapsible] = useState13(() => {
|
|
10227
11893
|
const saved = getCookie(LAYOUT_COLLAPSIBLE_COOKIE_NAME);
|
|
10228
11894
|
return saved || DEFAULT_COLLAPSIBLE;
|
|
10229
11895
|
});
|
|
10230
|
-
const [variant, _setVariant] =
|
|
11896
|
+
const [variant, _setVariant] = useState13(() => {
|
|
10231
11897
|
const saved = getCookie(LAYOUT_VARIANT_COOKIE_NAME);
|
|
10232
11898
|
return saved || DEFAULT_VARIANT;
|
|
10233
11899
|
});
|
|
10234
|
-
const [showInlineNotFound, setShowInlineNotFound] =
|
|
11900
|
+
const [showInlineNotFound, setShowInlineNotFound] = useState13(false);
|
|
10235
11901
|
const setCollapsible = (newCollapsible) => {
|
|
10236
11902
|
_setCollapsible(newCollapsible);
|
|
10237
11903
|
setCookie(
|
|
@@ -10259,7 +11925,7 @@ function LayoutProvider({ children }) {
|
|
|
10259
11925
|
showInlineNotFound,
|
|
10260
11926
|
setShowInlineNotFound
|
|
10261
11927
|
};
|
|
10262
|
-
return /* @__PURE__ */
|
|
11928
|
+
return /* @__PURE__ */ jsx104(LayoutContext, { value: contextValue, children });
|
|
10263
11929
|
}
|
|
10264
11930
|
function useLayout() {
|
|
10265
11931
|
const context = useContext10(LayoutContext);
|
|
@@ -10286,13 +11952,13 @@ function useLayout() {
|
|
|
10286
11952
|
// src/design-system/templates/nav-group.tsx
|
|
10287
11953
|
import Link3 from "next/link";
|
|
10288
11954
|
import { usePathname } from "next/navigation";
|
|
10289
|
-
import { ChevronRight as
|
|
10290
|
-
import { jsx as
|
|
11955
|
+
import { ChevronRight as ChevronRight8, X as X4 } from "lucide-react";
|
|
11956
|
+
import { jsx as jsx105, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
10291
11957
|
function NavGroup({ title, items }) {
|
|
10292
11958
|
const { state, isMobile, openMobile, setOpenMobile } = useSidebar();
|
|
10293
11959
|
const href = usePathname();
|
|
10294
|
-
return /* @__PURE__ */
|
|
10295
|
-
/* @__PURE__ */
|
|
11960
|
+
return /* @__PURE__ */ jsxs64(SidebarGroup, { className: cn(title === "Menu" && "pt-0"), children: [
|
|
11961
|
+
/* @__PURE__ */ jsxs64(
|
|
10296
11962
|
SidebarGroupLabel,
|
|
10297
11963
|
{
|
|
10298
11964
|
className: cn(
|
|
@@ -10300,8 +11966,8 @@ function NavGroup({ title, items }) {
|
|
|
10300
11966
|
title === "Menu" && state !== "collapsed" && "sticky top-0 z-20 bg-sidebar py-1.5"
|
|
10301
11967
|
),
|
|
10302
11968
|
children: [
|
|
10303
|
-
/* @__PURE__ */
|
|
10304
|
-
title === "Menu" && !isMobile && /* @__PURE__ */
|
|
11969
|
+
/* @__PURE__ */ jsx105("span", { children: title }),
|
|
11970
|
+
title === "Menu" && !isMobile && /* @__PURE__ */ jsx105(
|
|
10305
11971
|
SidebarTrigger,
|
|
10306
11972
|
{
|
|
10307
11973
|
variant: "ghost",
|
|
@@ -10309,7 +11975,7 @@ function NavGroup({ title, items }) {
|
|
|
10309
11975
|
"aria-label": "Toggle sidebar"
|
|
10310
11976
|
}
|
|
10311
11977
|
),
|
|
10312
|
-
title === "Menu" && isMobile && openMobile && /* @__PURE__ */
|
|
11978
|
+
title === "Menu" && isMobile && openMobile && /* @__PURE__ */ jsx105(
|
|
10313
11979
|
Button,
|
|
10314
11980
|
{
|
|
10315
11981
|
type: "button",
|
|
@@ -10318,37 +11984,37 @@ function NavGroup({ title, items }) {
|
|
|
10318
11984
|
className: "size-6 shrink-0",
|
|
10319
11985
|
"aria-label": "Close sidebar",
|
|
10320
11986
|
onClick: () => setOpenMobile(false),
|
|
10321
|
-
children: /* @__PURE__ */
|
|
11987
|
+
children: /* @__PURE__ */ jsx105(X4, { className: "size-4", "aria-hidden": "true" })
|
|
10322
11988
|
}
|
|
10323
11989
|
)
|
|
10324
11990
|
]
|
|
10325
11991
|
}
|
|
10326
11992
|
),
|
|
10327
|
-
/* @__PURE__ */
|
|
11993
|
+
/* @__PURE__ */ jsx105(SidebarMenu, { children: items.map((item) => {
|
|
10328
11994
|
const key = `${item.title}-${item.url}`;
|
|
10329
11995
|
if (!item.items)
|
|
10330
|
-
return /* @__PURE__ */
|
|
11996
|
+
return /* @__PURE__ */ jsx105(SidebarMenuLink, { item, href }, key);
|
|
10331
11997
|
if (item.title === "Settings" && item.items.length === 0)
|
|
10332
|
-
return /* @__PURE__ */
|
|
11998
|
+
return /* @__PURE__ */ jsx105(SidebarMenuSettings, { item }, key);
|
|
10333
11999
|
if (state === "collapsed" && !isMobile)
|
|
10334
|
-
return /* @__PURE__ */
|
|
10335
|
-
return /* @__PURE__ */
|
|
12000
|
+
return /* @__PURE__ */ jsx105(SidebarMenuCollapsedDropdown, { item, href }, key);
|
|
12001
|
+
return /* @__PURE__ */ jsx105(SidebarMenuCollapsible, { item, href }, key);
|
|
10336
12002
|
}) })
|
|
10337
12003
|
] });
|
|
10338
12004
|
}
|
|
10339
12005
|
function NavBadge({ children }) {
|
|
10340
|
-
return /* @__PURE__ */
|
|
12006
|
+
return /* @__PURE__ */ jsx105(Badge, { className: "rounded-full px-1 py-0 text-xs", children });
|
|
10341
12007
|
}
|
|
10342
12008
|
function SidebarMenuLink({ item, href }) {
|
|
10343
12009
|
const { setOpenMobile } = useSidebar();
|
|
10344
12010
|
const { setShowInlineNotFound } = useLayout();
|
|
10345
|
-
return /* @__PURE__ */
|
|
12011
|
+
return /* @__PURE__ */ jsx105(SidebarMenuItem, { children: /* @__PURE__ */ jsx105(
|
|
10346
12012
|
SidebarMenuButton,
|
|
10347
12013
|
{
|
|
10348
12014
|
asChild: true,
|
|
10349
12015
|
isActive: checkIsActive(href, item),
|
|
10350
12016
|
tooltip: item.title,
|
|
10351
|
-
children: /* @__PURE__ */
|
|
12017
|
+
children: /* @__PURE__ */ jsxs64(
|
|
10352
12018
|
Link3,
|
|
10353
12019
|
{
|
|
10354
12020
|
href: item.url,
|
|
@@ -10357,9 +12023,9 @@ function SidebarMenuLink({ item, href }) {
|
|
|
10357
12023
|
setOpenMobile(false);
|
|
10358
12024
|
},
|
|
10359
12025
|
children: [
|
|
10360
|
-
item.icon && /* @__PURE__ */
|
|
10361
|
-
/* @__PURE__ */
|
|
10362
|
-
item.badge && /* @__PURE__ */
|
|
12026
|
+
item.icon && /* @__PURE__ */ jsx105(item.icon, {}),
|
|
12027
|
+
/* @__PURE__ */ jsx105("span", { children: item.title }),
|
|
12028
|
+
item.badge && /* @__PURE__ */ jsx105(NavBadge, { children: item.badge })
|
|
10363
12029
|
]
|
|
10364
12030
|
}
|
|
10365
12031
|
)
|
|
@@ -10369,7 +12035,7 @@ function SidebarMenuLink({ item, href }) {
|
|
|
10369
12035
|
function SidebarMenuSettings({ item }) {
|
|
10370
12036
|
const { setOpenMobile } = useSidebar();
|
|
10371
12037
|
const { showInlineNotFound, setShowInlineNotFound } = useLayout();
|
|
10372
|
-
return /* @__PURE__ */
|
|
12038
|
+
return /* @__PURE__ */ jsx105(SidebarMenuItem, { children: /* @__PURE__ */ jsxs64(
|
|
10373
12039
|
SidebarMenuButton,
|
|
10374
12040
|
{
|
|
10375
12041
|
tooltip: item.title,
|
|
@@ -10379,8 +12045,8 @@ function SidebarMenuSettings({ item }) {
|
|
|
10379
12045
|
setOpenMobile(false);
|
|
10380
12046
|
},
|
|
10381
12047
|
children: [
|
|
10382
|
-
item.icon && /* @__PURE__ */
|
|
10383
|
-
/* @__PURE__ */
|
|
12048
|
+
item.icon && /* @__PURE__ */ jsx105(item.icon, {}),
|
|
12049
|
+
/* @__PURE__ */ jsx105("span", { children: item.title })
|
|
10384
12050
|
]
|
|
10385
12051
|
}
|
|
10386
12052
|
) });
|
|
@@ -10391,25 +12057,25 @@ function SidebarMenuCollapsible({
|
|
|
10391
12057
|
}) {
|
|
10392
12058
|
const { setOpenMobile } = useSidebar();
|
|
10393
12059
|
const { setShowInlineNotFound } = useLayout();
|
|
10394
|
-
return /* @__PURE__ */
|
|
12060
|
+
return /* @__PURE__ */ jsx105(
|
|
10395
12061
|
Collapsible,
|
|
10396
12062
|
{
|
|
10397
12063
|
asChild: true,
|
|
10398
12064
|
defaultOpen: checkIsActive(href, item, true),
|
|
10399
12065
|
className: "group/collapsible",
|
|
10400
|
-
children: /* @__PURE__ */
|
|
10401
|
-
/* @__PURE__ */
|
|
10402
|
-
item.icon && /* @__PURE__ */
|
|
10403
|
-
/* @__PURE__ */
|
|
10404
|
-
item.badge && /* @__PURE__ */
|
|
10405
|
-
/* @__PURE__ */
|
|
12066
|
+
children: /* @__PURE__ */ jsxs64(SidebarMenuItem, { children: [
|
|
12067
|
+
/* @__PURE__ */ jsx105(CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ jsxs64(SidebarMenuButton, { tooltip: item.title, children: [
|
|
12068
|
+
item.icon && /* @__PURE__ */ jsx105(item.icon, {}),
|
|
12069
|
+
/* @__PURE__ */ jsx105("span", { children: item.title }),
|
|
12070
|
+
item.badge && /* @__PURE__ */ jsx105(NavBadge, { children: item.badge }),
|
|
12071
|
+
/* @__PURE__ */ jsx105(ChevronRight8, { className: "ms-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90 rtl:rotate-180" })
|
|
10406
12072
|
] }) }),
|
|
10407
|
-
/* @__PURE__ */
|
|
12073
|
+
/* @__PURE__ */ jsx105(CollapsibleContent, { className: "CollapsibleContent", children: /* @__PURE__ */ jsx105(SidebarMenuSub, { children: item.items.map((subItem) => /* @__PURE__ */ jsx105(SidebarMenuSubItem, { children: /* @__PURE__ */ jsx105(
|
|
10408
12074
|
SidebarMenuSubButton,
|
|
10409
12075
|
{
|
|
10410
12076
|
asChild: true,
|
|
10411
12077
|
isActive: checkIsActive(href, subItem),
|
|
10412
|
-
children: /* @__PURE__ */
|
|
12078
|
+
children: /* @__PURE__ */ jsxs64(
|
|
10413
12079
|
Link3,
|
|
10414
12080
|
{
|
|
10415
12081
|
href: subItem.url,
|
|
@@ -10418,9 +12084,9 @@ function SidebarMenuCollapsible({
|
|
|
10418
12084
|
setOpenMobile(false);
|
|
10419
12085
|
},
|
|
10420
12086
|
children: [
|
|
10421
|
-
subItem.icon && /* @__PURE__ */
|
|
10422
|
-
/* @__PURE__ */
|
|
10423
|
-
subItem.badge && /* @__PURE__ */
|
|
12087
|
+
subItem.icon && /* @__PURE__ */ jsx105(subItem.icon, {}),
|
|
12088
|
+
/* @__PURE__ */ jsx105("span", { children: subItem.title }),
|
|
12089
|
+
subItem.badge && /* @__PURE__ */ jsx105(NavBadge, { children: subItem.badge })
|
|
10424
12090
|
]
|
|
10425
12091
|
}
|
|
10426
12092
|
)
|
|
@@ -10434,36 +12100,36 @@ function SidebarMenuCollapsedDropdown({
|
|
|
10434
12100
|
item,
|
|
10435
12101
|
href
|
|
10436
12102
|
}) {
|
|
10437
|
-
return /* @__PURE__ */
|
|
10438
|
-
/* @__PURE__ */
|
|
12103
|
+
return /* @__PURE__ */ jsx105(SidebarMenuItem, { children: /* @__PURE__ */ jsxs64(DropdownMenu, { children: [
|
|
12104
|
+
/* @__PURE__ */ jsx105(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs64(
|
|
10439
12105
|
SidebarMenuButton,
|
|
10440
12106
|
{
|
|
10441
12107
|
tooltip: item.title,
|
|
10442
12108
|
isActive: checkIsActive(href, item),
|
|
10443
12109
|
children: [
|
|
10444
|
-
item.icon && /* @__PURE__ */
|
|
10445
|
-
/* @__PURE__ */
|
|
10446
|
-
item.badge && /* @__PURE__ */
|
|
10447
|
-
/* @__PURE__ */
|
|
12110
|
+
item.icon && /* @__PURE__ */ jsx105(item.icon, {}),
|
|
12111
|
+
/* @__PURE__ */ jsx105("span", { children: item.title }),
|
|
12112
|
+
item.badge && /* @__PURE__ */ jsx105(NavBadge, { children: item.badge }),
|
|
12113
|
+
/* @__PURE__ */ jsx105(ChevronRight8, { className: "ms-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
|
|
10448
12114
|
]
|
|
10449
12115
|
}
|
|
10450
12116
|
) }),
|
|
10451
|
-
/* @__PURE__ */
|
|
10452
|
-
/* @__PURE__ */
|
|
12117
|
+
/* @__PURE__ */ jsxs64(DropdownMenuContent, { side: "right", align: "start", sideOffset: 4, children: [
|
|
12118
|
+
/* @__PURE__ */ jsxs64(DropdownMenuLabel, { children: [
|
|
10453
12119
|
item.title,
|
|
10454
12120
|
" ",
|
|
10455
12121
|
item.badge ? `(${item.badge})` : ""
|
|
10456
12122
|
] }),
|
|
10457
|
-
/* @__PURE__ */
|
|
10458
|
-
item.items.map((sub) => /* @__PURE__ */
|
|
12123
|
+
/* @__PURE__ */ jsx105(DropdownMenuSeparator, {}),
|
|
12124
|
+
item.items.map((sub) => /* @__PURE__ */ jsx105(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs64(
|
|
10459
12125
|
Link3,
|
|
10460
12126
|
{
|
|
10461
12127
|
href: sub.url,
|
|
10462
12128
|
className: `${checkIsActive(href, sub) ? "bg-secondary" : ""}`,
|
|
10463
12129
|
children: [
|
|
10464
|
-
sub.icon && /* @__PURE__ */
|
|
10465
|
-
/* @__PURE__ */
|
|
10466
|
-
sub.badge && /* @__PURE__ */
|
|
12130
|
+
sub.icon && /* @__PURE__ */ jsx105(sub.icon, {}),
|
|
12131
|
+
/* @__PURE__ */ jsx105("span", { className: "max-w-52 text-wrap", children: sub.title }),
|
|
12132
|
+
sub.badge && /* @__PURE__ */ jsx105("span", { className: "ms-auto text-xs", children: sub.badge })
|
|
10467
12133
|
]
|
|
10468
12134
|
}
|
|
10469
12135
|
) }, `${sub.title}-${sub.url}`))
|
|
@@ -10478,20 +12144,20 @@ function checkIsActive(href, item, mainNav = false) {
|
|
|
10478
12144
|
}
|
|
10479
12145
|
|
|
10480
12146
|
// src/design-system/templates/team-switcher.tsx
|
|
10481
|
-
import { jsx as
|
|
12147
|
+
import { jsx as jsx106, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
10482
12148
|
function TeamSwitcher({ teams }) {
|
|
10483
12149
|
useSidebar();
|
|
10484
12150
|
const activeTeam = teams[0];
|
|
10485
|
-
return /* @__PURE__ */
|
|
12151
|
+
return /* @__PURE__ */ jsx106(SidebarMenu, { children: /* @__PURE__ */ jsx106(SidebarMenuItem, { children: /* @__PURE__ */ jsxs65(
|
|
10486
12152
|
SidebarMenuButton,
|
|
10487
12153
|
{
|
|
10488
12154
|
size: "lg",
|
|
10489
12155
|
className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
|
|
10490
12156
|
children: [
|
|
10491
|
-
/* @__PURE__ */
|
|
10492
|
-
/* @__PURE__ */
|
|
10493
|
-
/* @__PURE__ */
|
|
10494
|
-
/* @__PURE__ */
|
|
12157
|
+
/* @__PURE__ */ jsx106("div", { className: "flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground", children: /* @__PURE__ */ jsx106(activeTeam.logo, { className: "size-4" }) }),
|
|
12158
|
+
/* @__PURE__ */ jsxs65("div", { className: "grid flex-1 text-start text-sm leading-tight", children: [
|
|
12159
|
+
/* @__PURE__ */ jsx106("span", { className: "truncate font-semibold", children: activeTeam.name }),
|
|
12160
|
+
/* @__PURE__ */ jsx106("span", { className: "truncate text-xs", children: activeTeam.plan })
|
|
10495
12161
|
] })
|
|
10496
12162
|
]
|
|
10497
12163
|
}
|
|
@@ -10503,26 +12169,26 @@ import {
|
|
|
10503
12169
|
ChevronsUpDown,
|
|
10504
12170
|
LogOut,
|
|
10505
12171
|
Settings as Settings4,
|
|
10506
|
-
Palette as
|
|
12172
|
+
Palette as Palette3
|
|
10507
12173
|
} from "lucide-react";
|
|
10508
12174
|
|
|
10509
12175
|
// src/hooks/use-dialog-state.tsx
|
|
10510
|
-
import { useState as
|
|
12176
|
+
import { useState as useState14 } from "react";
|
|
10511
12177
|
function useDialogState(initialState2 = null) {
|
|
10512
|
-
const [open, _setOpen] =
|
|
12178
|
+
const [open, _setOpen] = useState14(initialState2);
|
|
10513
12179
|
const setOpen = (str) => _setOpen((prev) => prev === str ? null : str);
|
|
10514
12180
|
return [open, setOpen];
|
|
10515
12181
|
}
|
|
10516
12182
|
|
|
10517
12183
|
// src/components/config-drawer.tsx
|
|
10518
|
-
import { useState as
|
|
12184
|
+
import { useState as useState15 } from "react";
|
|
10519
12185
|
import { Root as Radio, Item as Item2 } from "@radix-ui/react-radio-group";
|
|
10520
|
-
import { Check as
|
|
12186
|
+
import { Check as Check8, CircleCheck, RotateCcw, Search as Search7, Settings as Settings3 } from "lucide-react";
|
|
10521
12187
|
|
|
10522
12188
|
// src/assets/custom/icon-theme-dark.tsx
|
|
10523
|
-
import { jsx as
|
|
12189
|
+
import { jsx as jsx107, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
10524
12190
|
function IconThemeDark(props) {
|
|
10525
|
-
return /* @__PURE__ */
|
|
12191
|
+
return /* @__PURE__ */ jsxs66(
|
|
10526
12192
|
"svg",
|
|
10527
12193
|
{
|
|
10528
12194
|
"data-name": "icon-theme-dark",
|
|
@@ -10530,27 +12196,27 @@ function IconThemeDark(props) {
|
|
|
10530
12196
|
viewBox: "0 0 79.86 51.14",
|
|
10531
12197
|
...props,
|
|
10532
12198
|
children: [
|
|
10533
|
-
/* @__PURE__ */
|
|
10534
|
-
/* @__PURE__ */
|
|
10535
|
-
/* @__PURE__ */
|
|
12199
|
+
/* @__PURE__ */ jsxs66("g", { fill: "#1d2b3f", children: [
|
|
12200
|
+
/* @__PURE__ */ jsx107("rect", { x: 0.53, y: 0.5, width: 78.83, height: 50.14, rx: 3.5, ry: 3.5 }),
|
|
12201
|
+
/* @__PURE__ */ jsx107("path", { d: "M75.86 1c1.65 0 3 1.35 3 3v43.14c0 1.65-1.35 3-3 3H4.03c-1.65 0-3-1.35-3-3V4c0-1.65 1.35-3 3-3h71.83m0-1H4.03c-2.21 0-4 1.79-4 4v43.14c0 2.21 1.79 4 4 4h71.83c2.21 0 4-1.79 4-4V4c0-2.21-1.79-4-4-4z" })
|
|
10536
12202
|
] }),
|
|
10537
|
-
/* @__PURE__ */
|
|
12203
|
+
/* @__PURE__ */ jsx107(
|
|
10538
12204
|
"path",
|
|
10539
12205
|
{
|
|
10540
12206
|
d: "M22.88 0h52.97c2.21 0 4 1.79 4 4v43.14c0 2.21-1.79 4-4 4H22.88V0z",
|
|
10541
12207
|
fill: "#0d1628"
|
|
10542
12208
|
}
|
|
10543
12209
|
),
|
|
10544
|
-
/* @__PURE__ */
|
|
10545
|
-
/* @__PURE__ */
|
|
12210
|
+
/* @__PURE__ */ jsx107("circle", { cx: 6.7, cy: 7.04, r: 3.54, fill: "#426187" }),
|
|
12211
|
+
/* @__PURE__ */ jsx107(
|
|
10546
12212
|
"path",
|
|
10547
12213
|
{
|
|
10548
12214
|
d: "M18.12 6.39h-5.87c-.6 0-1.09-.45-1.09-1s.49-1 1.09-1h5.87c.6 0 1.09.45 1.09 1s-.49 1-1.09 1zM16.55 9.77h-4.24c-.55 0-1-.45-1-1s.45-1 1-1h4.24c.55 0 1 .45 1 1s-.45 1-1 1zM18.32 17.37H4.59c-.69 0-1.25-.47-1.25-1.05s.56-1.05 1.25-1.05h13.73c.69 0 1.25.47 1.25 1.05s-.56 1.05-1.25 1.05zM15.34 21.26h-11c-.55 0-1-.41-1-.91s.45-.91 1-.91h11c.55 0 1 .41 1 .91s-.45.91-1 .91zM16.46 25.57H4.43c-.6 0-1.09-.44-1.09-.98s.49-.98 1.09-.98h12.03c.6 0 1.09.44 1.09.98s-.49.98-1.09.98z",
|
|
10549
12215
|
fill: "#426187"
|
|
10550
12216
|
}
|
|
10551
12217
|
),
|
|
10552
|
-
/* @__PURE__ */
|
|
10553
|
-
/* @__PURE__ */
|
|
12218
|
+
/* @__PURE__ */ jsxs66("g", { fill: "#2a62bc", children: [
|
|
12219
|
+
/* @__PURE__ */ jsx107(
|
|
10554
12220
|
"rect",
|
|
10555
12221
|
{
|
|
10556
12222
|
x: 33.36,
|
|
@@ -10562,7 +12228,7 @@ function IconThemeDark(props) {
|
|
|
10562
12228
|
opacity: 0.32
|
|
10563
12229
|
}
|
|
10564
12230
|
),
|
|
10565
|
-
/* @__PURE__ */
|
|
12231
|
+
/* @__PURE__ */ jsx107(
|
|
10566
12232
|
"rect",
|
|
10567
12233
|
{
|
|
10568
12234
|
x: 29.64,
|
|
@@ -10574,7 +12240,7 @@ function IconThemeDark(props) {
|
|
|
10574
12240
|
opacity: 0.44
|
|
10575
12241
|
}
|
|
10576
12242
|
),
|
|
10577
|
-
/* @__PURE__ */
|
|
12243
|
+
/* @__PURE__ */ jsx107(
|
|
10578
12244
|
"rect",
|
|
10579
12245
|
{
|
|
10580
12246
|
x: 37.16,
|
|
@@ -10586,7 +12252,7 @@ function IconThemeDark(props) {
|
|
|
10586
12252
|
opacity: 0.53
|
|
10587
12253
|
}
|
|
10588
12254
|
),
|
|
10589
|
-
/* @__PURE__ */
|
|
12255
|
+
/* @__PURE__ */ jsx107(
|
|
10590
12256
|
"rect",
|
|
10591
12257
|
{
|
|
10592
12258
|
x: 41.19,
|
|
@@ -10599,8 +12265,8 @@ function IconThemeDark(props) {
|
|
|
10599
12265
|
}
|
|
10600
12266
|
)
|
|
10601
12267
|
] }),
|
|
10602
|
-
/* @__PURE__ */
|
|
10603
|
-
/* @__PURE__ */
|
|
12268
|
+
/* @__PURE__ */ jsx107("circle", { cx: 62.74, cy: 16.32, r: 8, fill: "#2f5491", opacity: 0.5 }),
|
|
12269
|
+
/* @__PURE__ */ jsx107(
|
|
10604
12270
|
"path",
|
|
10605
12271
|
{
|
|
10606
12272
|
d: "M62.74 16.32l4.1-6.87c1.19.71 2.18 1.72 2.86 2.92s1.04 2.57 1.04 3.95h-8z",
|
|
@@ -10608,7 +12274,7 @@ function IconThemeDark(props) {
|
|
|
10608
12274
|
opacity: 0.74
|
|
10609
12275
|
}
|
|
10610
12276
|
),
|
|
10611
|
-
/* @__PURE__ */
|
|
12277
|
+
/* @__PURE__ */ jsx107(
|
|
10612
12278
|
"rect",
|
|
10613
12279
|
{
|
|
10614
12280
|
x: 29.64,
|
|
@@ -10626,9 +12292,9 @@ function IconThemeDark(props) {
|
|
|
10626
12292
|
}
|
|
10627
12293
|
|
|
10628
12294
|
// src/assets/custom/icon-theme-light.tsx
|
|
10629
|
-
import { jsx as
|
|
12295
|
+
import { jsx as jsx108, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
10630
12296
|
function IconThemeLight(props) {
|
|
10631
|
-
return /* @__PURE__ */
|
|
12297
|
+
return /* @__PURE__ */ jsxs67(
|
|
10632
12298
|
"svg",
|
|
10633
12299
|
{
|
|
10634
12300
|
"data-name": "icon-theme-light",
|
|
@@ -10636,27 +12302,27 @@ function IconThemeLight(props) {
|
|
|
10636
12302
|
viewBox: "0 0 79.86 51.14",
|
|
10637
12303
|
...props,
|
|
10638
12304
|
children: [
|
|
10639
|
-
/* @__PURE__ */
|
|
10640
|
-
/* @__PURE__ */
|
|
10641
|
-
/* @__PURE__ */
|
|
12305
|
+
/* @__PURE__ */ jsxs67("g", { fill: "#d9d9d9", children: [
|
|
12306
|
+
/* @__PURE__ */ jsx108("rect", { x: 0.53, y: 0.5, width: 78.83, height: 50.14, rx: 3.5, ry: 3.5 }),
|
|
12307
|
+
/* @__PURE__ */ jsx108("path", { d: "M75.86 1c1.65 0 3 1.35 3 3v43.14c0 1.65-1.35 3-3 3H4.03c-1.65 0-3-1.35-3-3V4c0-1.65 1.35-3 3-3h71.83m0-1H4.03c-2.21 0-4 1.79-4 4v43.14c0 2.21 1.79 4 4 4h71.83c2.21 0 4-1.79 4-4V4c0-2.21-1.79-4-4-4z" })
|
|
10642
12308
|
] }),
|
|
10643
|
-
/* @__PURE__ */
|
|
12309
|
+
/* @__PURE__ */ jsx108(
|
|
10644
12310
|
"path",
|
|
10645
12311
|
{
|
|
10646
12312
|
d: "M22.88 0h52.97c2.21 0 4 1.79 4 4v43.14c0 2.21-1.79 4-4 4H22.88V0z",
|
|
10647
12313
|
fill: "#ecedef"
|
|
10648
12314
|
}
|
|
10649
12315
|
),
|
|
10650
|
-
/* @__PURE__ */
|
|
10651
|
-
/* @__PURE__ */
|
|
12316
|
+
/* @__PURE__ */ jsx108("circle", { cx: 6.7, cy: 7.04, r: 3.54, fill: "#fff" }),
|
|
12317
|
+
/* @__PURE__ */ jsx108(
|
|
10652
12318
|
"path",
|
|
10653
12319
|
{
|
|
10654
12320
|
d: "M18.12 6.39h-5.87c-.6 0-1.09-.45-1.09-1s.49-1 1.09-1h5.87c.6 0 1.09.45 1.09 1s-.49 1-1.09 1zM16.55 9.77h-4.24c-.55 0-1-.45-1-1s.45-1 1-1h4.24c.55 0 1 .45 1 1s-.45 1-1 1zM18.32 17.37H4.59c-.69 0-1.25-.47-1.25-1.05s.56-1.05 1.25-1.05h13.73c.69 0 1.25.47 1.25 1.05s-.56 1.05-1.25 1.05zM15.34 21.26h-11c-.55 0-1-.41-1-.91s.45-.91 1-.91h11c.55 0 1 .41 1 .91s-.45.91-1 .91zM16.46 25.57H4.43c-.6 0-1.09-.44-1.09-.98s.49-.98 1.09-.98h12.03c.6 0 1.09.44 1.09.98s-.49.98-1.09.98z",
|
|
10655
12321
|
fill: "#fff"
|
|
10656
12322
|
}
|
|
10657
12323
|
),
|
|
10658
|
-
/* @__PURE__ */
|
|
10659
|
-
/* @__PURE__ */
|
|
12324
|
+
/* @__PURE__ */ jsxs67("g", { fill: "#c0c4c4", children: [
|
|
12325
|
+
/* @__PURE__ */ jsx108(
|
|
10660
12326
|
"rect",
|
|
10661
12327
|
{
|
|
10662
12328
|
x: 33.36,
|
|
@@ -10668,7 +12334,7 @@ function IconThemeLight(props) {
|
|
|
10668
12334
|
opacity: 0.32
|
|
10669
12335
|
}
|
|
10670
12336
|
),
|
|
10671
|
-
/* @__PURE__ */
|
|
12337
|
+
/* @__PURE__ */ jsx108(
|
|
10672
12338
|
"rect",
|
|
10673
12339
|
{
|
|
10674
12340
|
x: 29.64,
|
|
@@ -10680,7 +12346,7 @@ function IconThemeLight(props) {
|
|
|
10680
12346
|
opacity: 0.44
|
|
10681
12347
|
}
|
|
10682
12348
|
),
|
|
10683
|
-
/* @__PURE__ */
|
|
12349
|
+
/* @__PURE__ */ jsx108(
|
|
10684
12350
|
"rect",
|
|
10685
12351
|
{
|
|
10686
12352
|
x: 37.16,
|
|
@@ -10692,7 +12358,7 @@ function IconThemeLight(props) {
|
|
|
10692
12358
|
opacity: 0.53
|
|
10693
12359
|
}
|
|
10694
12360
|
),
|
|
10695
|
-
/* @__PURE__ */
|
|
12361
|
+
/* @__PURE__ */ jsx108(
|
|
10696
12362
|
"rect",
|
|
10697
12363
|
{
|
|
10698
12364
|
x: 41.19,
|
|
@@ -10705,12 +12371,12 @@ function IconThemeLight(props) {
|
|
|
10705
12371
|
}
|
|
10706
12372
|
)
|
|
10707
12373
|
] }),
|
|
10708
|
-
/* @__PURE__ */
|
|
10709
|
-
/* @__PURE__ */
|
|
10710
|
-
/* @__PURE__ */
|
|
10711
|
-
/* @__PURE__ */
|
|
12374
|
+
/* @__PURE__ */ jsx108("circle", { cx: 62.74, cy: 16.32, r: 8, fill: "#fff" }),
|
|
12375
|
+
/* @__PURE__ */ jsxs67("g", { fill: "#d9d9d9", children: [
|
|
12376
|
+
/* @__PURE__ */ jsx108("path", { d: "M63.62 15.82L67 10.15c.93.64 1.7 1.48 2.26 2.47.56.98.89 2.08.96 3.21h-6.6z" }),
|
|
12377
|
+
/* @__PURE__ */ jsx108("path", { d: "M67.14 10.88a6.977 6.977 0 012.52 4.44h-5.17l2.65-4.44m-.31-1.43l-4.1 6.87h8c0-1.39-.36-2.75-1.04-3.95s-1.67-2.21-2.86-2.92z" })
|
|
10712
12378
|
] }),
|
|
10713
|
-
/* @__PURE__ */
|
|
12379
|
+
/* @__PURE__ */ jsx108(
|
|
10714
12380
|
"rect",
|
|
10715
12381
|
{
|
|
10716
12382
|
x: 29.64,
|
|
@@ -10728,12 +12394,12 @@ function IconThemeLight(props) {
|
|
|
10728
12394
|
}
|
|
10729
12395
|
|
|
10730
12396
|
// src/assets/custom/icon-theme-system.tsx
|
|
10731
|
-
import { jsx as
|
|
12397
|
+
import { jsx as jsx109, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
10732
12398
|
function IconThemeSystem({
|
|
10733
12399
|
className,
|
|
10734
12400
|
...props
|
|
10735
12401
|
}) {
|
|
10736
|
-
return /* @__PURE__ */
|
|
12402
|
+
return /* @__PURE__ */ jsxs68(
|
|
10737
12403
|
"svg",
|
|
10738
12404
|
{
|
|
10739
12405
|
"data-name": "icon-theme-system",
|
|
@@ -10746,8 +12412,8 @@ function IconThemeSystem({
|
|
|
10746
12412
|
),
|
|
10747
12413
|
...props,
|
|
10748
12414
|
children: [
|
|
10749
|
-
/* @__PURE__ */
|
|
10750
|
-
/* @__PURE__ */
|
|
12415
|
+
/* @__PURE__ */ jsx109("path", { opacity: 0.2, d: "M0 0.03H22.88V51.17H0z" }),
|
|
12416
|
+
/* @__PURE__ */ jsx109(
|
|
10751
12417
|
"circle",
|
|
10752
12418
|
{
|
|
10753
12419
|
cx: 6.7,
|
|
@@ -10760,7 +12426,7 @@ function IconThemeSystem({
|
|
|
10760
12426
|
strokeMiterlimit: 10
|
|
10761
12427
|
}
|
|
10762
12428
|
),
|
|
10763
|
-
/* @__PURE__ */
|
|
12429
|
+
/* @__PURE__ */ jsx109(
|
|
10764
12430
|
"path",
|
|
10765
12431
|
{
|
|
10766
12432
|
d: "M18.12 6.39h-5.87c-.6 0-1.09-.45-1.09-1s.49-1 1.09-1h5.87c.6 0 1.09.45 1.09 1s-.49 1-1.09 1zM16.55 9.77h-4.24c-.55 0-1-.45-1-1s.45-1 1-1h4.24c.55 0 1 .45 1 1s-.45 1-1 1z",
|
|
@@ -10769,7 +12435,7 @@ function IconThemeSystem({
|
|
|
10769
12435
|
opacity: 0.75
|
|
10770
12436
|
}
|
|
10771
12437
|
),
|
|
10772
|
-
/* @__PURE__ */
|
|
12438
|
+
/* @__PURE__ */ jsx109(
|
|
10773
12439
|
"path",
|
|
10774
12440
|
{
|
|
10775
12441
|
d: "M18.32 17.37H4.59c-.69 0-1.25-.47-1.25-1.05s.56-1.05 1.25-1.05h13.73c.69 0 1.25.47 1.25 1.05s-.56 1.05-1.25 1.05z",
|
|
@@ -10778,7 +12444,7 @@ function IconThemeSystem({
|
|
|
10778
12444
|
opacity: 0.72
|
|
10779
12445
|
}
|
|
10780
12446
|
),
|
|
10781
|
-
/* @__PURE__ */
|
|
12447
|
+
/* @__PURE__ */ jsx109(
|
|
10782
12448
|
"path",
|
|
10783
12449
|
{
|
|
10784
12450
|
d: "M15.34 21.26h-11c-.55 0-1-.41-1-.91s.45-.91 1-.91h11c.55 0 1 .41 1 .91s-.45.91-1 .91z",
|
|
@@ -10787,7 +12453,7 @@ function IconThemeSystem({
|
|
|
10787
12453
|
opacity: 0.55
|
|
10788
12454
|
}
|
|
10789
12455
|
),
|
|
10790
|
-
/* @__PURE__ */
|
|
12456
|
+
/* @__PURE__ */ jsx109(
|
|
10791
12457
|
"path",
|
|
10792
12458
|
{
|
|
10793
12459
|
d: "M16.46 25.57H4.43c-.6 0-1.09-.44-1.09-.98s.49-.98 1.09-.98h12.03c.6 0 1.09.44 1.09.98s-.49.98-1.09.98z",
|
|
@@ -10796,7 +12462,7 @@ function IconThemeSystem({
|
|
|
10796
12462
|
opacity: 0.67
|
|
10797
12463
|
}
|
|
10798
12464
|
),
|
|
10799
|
-
/* @__PURE__ */
|
|
12465
|
+
/* @__PURE__ */ jsx109(
|
|
10800
12466
|
"rect",
|
|
10801
12467
|
{
|
|
10802
12468
|
x: 33.36,
|
|
@@ -10809,7 +12475,7 @@ function IconThemeSystem({
|
|
|
10809
12475
|
stroke: "none"
|
|
10810
12476
|
}
|
|
10811
12477
|
),
|
|
10812
|
-
/* @__PURE__ */
|
|
12478
|
+
/* @__PURE__ */ jsx109(
|
|
10813
12479
|
"rect",
|
|
10814
12480
|
{
|
|
10815
12481
|
x: 29.64,
|
|
@@ -10822,7 +12488,7 @@ function IconThemeSystem({
|
|
|
10822
12488
|
stroke: "none"
|
|
10823
12489
|
}
|
|
10824
12490
|
),
|
|
10825
|
-
/* @__PURE__ */
|
|
12491
|
+
/* @__PURE__ */ jsx109(
|
|
10826
12492
|
"rect",
|
|
10827
12493
|
{
|
|
10828
12494
|
x: 37.16,
|
|
@@ -10835,7 +12501,7 @@ function IconThemeSystem({
|
|
|
10835
12501
|
stroke: "none"
|
|
10836
12502
|
}
|
|
10837
12503
|
),
|
|
10838
|
-
/* @__PURE__ */
|
|
12504
|
+
/* @__PURE__ */ jsx109(
|
|
10839
12505
|
"rect",
|
|
10840
12506
|
{
|
|
10841
12507
|
x: 41.19,
|
|
@@ -10848,9 +12514,9 @@ function IconThemeSystem({
|
|
|
10848
12514
|
stroke: "none"
|
|
10849
12515
|
}
|
|
10850
12516
|
),
|
|
10851
|
-
/* @__PURE__ */
|
|
10852
|
-
/* @__PURE__ */
|
|
10853
|
-
/* @__PURE__ */
|
|
12517
|
+
/* @__PURE__ */ jsxs68("g", { children: [
|
|
12518
|
+
/* @__PURE__ */ jsx109("circle", { cx: 62.74, cy: 16.32, r: 8, opacity: 0.25 }),
|
|
12519
|
+
/* @__PURE__ */ jsx109(
|
|
10854
12520
|
"path",
|
|
10855
12521
|
{
|
|
10856
12522
|
d: "M62.74 16.32l4.1-6.87c1.19.71 2.18 1.72 2.86 2.92s1.04 2.57 1.04 3.95h-8z",
|
|
@@ -10858,7 +12524,7 @@ function IconThemeSystem({
|
|
|
10858
12524
|
}
|
|
10859
12525
|
)
|
|
10860
12526
|
] }),
|
|
10861
|
-
/* @__PURE__ */
|
|
12527
|
+
/* @__PURE__ */ jsx109(
|
|
10862
12528
|
"rect",
|
|
10863
12529
|
{
|
|
10864
12530
|
x: 29.64,
|
|
@@ -10879,7 +12545,7 @@ function IconThemeSystem({
|
|
|
10879
12545
|
}
|
|
10880
12546
|
|
|
10881
12547
|
// src/components/config-drawer.tsx
|
|
10882
|
-
import { jsx as
|
|
12548
|
+
import { jsx as jsx110, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
10883
12549
|
function ConfigDrawer({
|
|
10884
12550
|
trigger
|
|
10885
12551
|
}) {
|
|
@@ -10889,27 +12555,27 @@ function ConfigDrawer({
|
|
|
10889
12555
|
resetTheme();
|
|
10890
12556
|
resetColorTheme();
|
|
10891
12557
|
};
|
|
10892
|
-
return /* @__PURE__ */
|
|
10893
|
-
/* @__PURE__ */
|
|
12558
|
+
return /* @__PURE__ */ jsxs69(Sheet, { children: [
|
|
12559
|
+
/* @__PURE__ */ jsx110(SheetTrigger, { asChild: true, children: trigger ?? /* @__PURE__ */ jsx110(
|
|
10894
12560
|
Button,
|
|
10895
12561
|
{
|
|
10896
12562
|
size: "icon",
|
|
10897
12563
|
variant: "ghost",
|
|
10898
12564
|
"aria-label": "Open theme settings",
|
|
10899
12565
|
className: "rounded-full",
|
|
10900
|
-
children: /* @__PURE__ */
|
|
12566
|
+
children: /* @__PURE__ */ jsx110(Settings3, { "aria-hidden": "true" })
|
|
10901
12567
|
}
|
|
10902
12568
|
) }),
|
|
10903
|
-
/* @__PURE__ */
|
|
10904
|
-
/* @__PURE__ */
|
|
10905
|
-
/* @__PURE__ */
|
|
10906
|
-
/* @__PURE__ */
|
|
12569
|
+
/* @__PURE__ */ jsxs69(SheetContent, { className: "flex flex-col", children: [
|
|
12570
|
+
/* @__PURE__ */ jsxs69(SheetHeader, { className: "pb-0 text-start", children: [
|
|
12571
|
+
/* @__PURE__ */ jsx110(SheetTitle, { children: "Theme Settings" }),
|
|
12572
|
+
/* @__PURE__ */ jsx110(SheetDescription, { children: "Customize the look and feel of your dashboard." })
|
|
10907
12573
|
] }),
|
|
10908
|
-
/* @__PURE__ */
|
|
10909
|
-
/* @__PURE__ */
|
|
10910
|
-
/* @__PURE__ */
|
|
12574
|
+
/* @__PURE__ */ jsxs69("div", { className: "flex flex-1 flex-col gap-6 overflow-hidden px-4", children: [
|
|
12575
|
+
/* @__PURE__ */ jsx110(ThemeConfig, {}),
|
|
12576
|
+
/* @__PURE__ */ jsx110(ThemeListSelector, {})
|
|
10911
12577
|
] }),
|
|
10912
|
-
/* @__PURE__ */
|
|
12578
|
+
/* @__PURE__ */ jsx110(SheetFooter, { className: "gap-2", children: /* @__PURE__ */ jsx110(
|
|
10913
12579
|
Button,
|
|
10914
12580
|
{
|
|
10915
12581
|
variant: "destructive",
|
|
@@ -10927,7 +12593,7 @@ function SectionTitle({
|
|
|
10927
12593
|
resetAriaLabel,
|
|
10928
12594
|
className
|
|
10929
12595
|
}) {
|
|
10930
|
-
return /* @__PURE__ */
|
|
12596
|
+
return /* @__PURE__ */ jsxs69(
|
|
10931
12597
|
"div",
|
|
10932
12598
|
{
|
|
10933
12599
|
className: cn(
|
|
@@ -10936,7 +12602,7 @@ function SectionTitle({
|
|
|
10936
12602
|
),
|
|
10937
12603
|
children: [
|
|
10938
12604
|
title,
|
|
10939
|
-
showReset && onReset && /* @__PURE__ */
|
|
12605
|
+
showReset && onReset && /* @__PURE__ */ jsx110(
|
|
10940
12606
|
Button,
|
|
10941
12607
|
{
|
|
10942
12608
|
type: "button",
|
|
@@ -10945,7 +12611,7 @@ function SectionTitle({
|
|
|
10945
12611
|
className: "size-4 rounded-full",
|
|
10946
12612
|
onClick: onReset,
|
|
10947
12613
|
"aria-label": resetAriaLabel,
|
|
10948
|
-
children: /* @__PURE__ */
|
|
12614
|
+
children: /* @__PURE__ */ jsx110(RotateCcw, { className: "size-3" })
|
|
10949
12615
|
}
|
|
10950
12616
|
)
|
|
10951
12617
|
]
|
|
@@ -10956,7 +12622,7 @@ function RadioGroupItem2({
|
|
|
10956
12622
|
item,
|
|
10957
12623
|
isTheme = false
|
|
10958
12624
|
}) {
|
|
10959
|
-
return /* @__PURE__ */
|
|
12625
|
+
return /* @__PURE__ */ jsxs69(
|
|
10960
12626
|
Item2,
|
|
10961
12627
|
{
|
|
10962
12628
|
value: item.value,
|
|
@@ -10964,7 +12630,7 @@ function RadioGroupItem2({
|
|
|
10964
12630
|
"aria-label": `Select ${item.label.toLowerCase()}`,
|
|
10965
12631
|
"aria-describedby": `${item.value}-description`,
|
|
10966
12632
|
children: [
|
|
10967
|
-
/* @__PURE__ */
|
|
12633
|
+
/* @__PURE__ */ jsxs69(
|
|
10968
12634
|
"div",
|
|
10969
12635
|
{
|
|
10970
12636
|
className: cn(
|
|
@@ -10976,7 +12642,7 @@ function RadioGroupItem2({
|
|
|
10976
12642
|
"aria-hidden": "false",
|
|
10977
12643
|
"aria-label": `${item.label} option preview`,
|
|
10978
12644
|
children: [
|
|
10979
|
-
/* @__PURE__ */
|
|
12645
|
+
/* @__PURE__ */ jsx110(
|
|
10980
12646
|
CircleCheck,
|
|
10981
12647
|
{
|
|
10982
12648
|
className: cn(
|
|
@@ -10987,7 +12653,7 @@ function RadioGroupItem2({
|
|
|
10987
12653
|
"aria-hidden": "true"
|
|
10988
12654
|
}
|
|
10989
12655
|
),
|
|
10990
|
-
/* @__PURE__ */
|
|
12656
|
+
/* @__PURE__ */ jsx110(
|
|
10991
12657
|
item.icon,
|
|
10992
12658
|
{
|
|
10993
12659
|
className: cn(
|
|
@@ -10999,7 +12665,7 @@ function RadioGroupItem2({
|
|
|
10999
12665
|
]
|
|
11000
12666
|
}
|
|
11001
12667
|
),
|
|
11002
|
-
/* @__PURE__ */
|
|
12668
|
+
/* @__PURE__ */ jsx110(
|
|
11003
12669
|
"div",
|
|
11004
12670
|
{
|
|
11005
12671
|
className: "mt-1 text-xs",
|
|
@@ -11014,8 +12680,8 @@ function RadioGroupItem2({
|
|
|
11014
12680
|
}
|
|
11015
12681
|
function ThemeConfig() {
|
|
11016
12682
|
const { defaultTheme, theme, setTheme } = useTheme2();
|
|
11017
|
-
return /* @__PURE__ */
|
|
11018
|
-
/* @__PURE__ */
|
|
12683
|
+
return /* @__PURE__ */ jsxs69("div", { children: [
|
|
12684
|
+
/* @__PURE__ */ jsx110(
|
|
11019
12685
|
SectionTitle,
|
|
11020
12686
|
{
|
|
11021
12687
|
title: "Theme",
|
|
@@ -11024,7 +12690,7 @@ function ThemeConfig() {
|
|
|
11024
12690
|
resetAriaLabel: "Reset theme preference to default"
|
|
11025
12691
|
}
|
|
11026
12692
|
),
|
|
11027
|
-
/* @__PURE__ */
|
|
12693
|
+
/* @__PURE__ */ jsx110(
|
|
11028
12694
|
Radio,
|
|
11029
12695
|
{
|
|
11030
12696
|
value: theme,
|
|
@@ -11048,20 +12714,20 @@ function ThemeConfig() {
|
|
|
11048
12714
|
label: "Dark",
|
|
11049
12715
|
icon: IconThemeDark
|
|
11050
12716
|
}
|
|
11051
|
-
].map((item) => /* @__PURE__ */
|
|
12717
|
+
].map((item) => /* @__PURE__ */ jsx110(RadioGroupItem2, { item, isTheme: true }, item.value))
|
|
11052
12718
|
}
|
|
11053
12719
|
),
|
|
11054
|
-
/* @__PURE__ */
|
|
12720
|
+
/* @__PURE__ */ jsx110("div", { id: "theme-description", className: "sr-only", children: "Choose between system preference, light mode, or dark mode" })
|
|
11055
12721
|
] });
|
|
11056
12722
|
}
|
|
11057
12723
|
function ThemeListSelector() {
|
|
11058
|
-
const [search, setSearch] =
|
|
12724
|
+
const [search, setSearch] = useState15("");
|
|
11059
12725
|
const { colorTheme, setColorTheme } = useColorTheme();
|
|
11060
12726
|
const filtered = colorThemes.filter(
|
|
11061
12727
|
(t) => t.label.toLowerCase().includes(search.toLowerCase())
|
|
11062
12728
|
);
|
|
11063
|
-
return /* @__PURE__ */
|
|
11064
|
-
/* @__PURE__ */
|
|
12729
|
+
return /* @__PURE__ */ jsxs69("div", { className: "flex min-h-0 flex-1 flex-col", children: [
|
|
12730
|
+
/* @__PURE__ */ jsx110(
|
|
11065
12731
|
SectionTitle,
|
|
11066
12732
|
{
|
|
11067
12733
|
title: "Color Theme",
|
|
@@ -11070,9 +12736,9 @@ function ThemeListSelector() {
|
|
|
11070
12736
|
resetAriaLabel: "Reset color theme to default"
|
|
11071
12737
|
}
|
|
11072
12738
|
),
|
|
11073
|
-
/* @__PURE__ */
|
|
11074
|
-
/* @__PURE__ */
|
|
11075
|
-
/* @__PURE__ */
|
|
12739
|
+
/* @__PURE__ */ jsxs69("div", { className: "relative mb-2.5", children: [
|
|
12740
|
+
/* @__PURE__ */ jsx110(Search7, { className: "pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
|
|
12741
|
+
/* @__PURE__ */ jsx110(
|
|
11076
12742
|
"input",
|
|
11077
12743
|
{
|
|
11078
12744
|
type: "text",
|
|
@@ -11088,21 +12754,21 @@ function ThemeListSelector() {
|
|
|
11088
12754
|
}
|
|
11089
12755
|
)
|
|
11090
12756
|
] }),
|
|
11091
|
-
/* @__PURE__ */
|
|
12757
|
+
/* @__PURE__ */ jsxs69("p", { className: "mb-2 text-xs text-muted-foreground font-medium", children: [
|
|
11092
12758
|
filtered.length,
|
|
11093
12759
|
" theme",
|
|
11094
12760
|
filtered.length !== 1 ? "s" : "",
|
|
11095
12761
|
" available"
|
|
11096
12762
|
] }),
|
|
11097
|
-
/* @__PURE__ */
|
|
12763
|
+
/* @__PURE__ */ jsxs69(
|
|
11098
12764
|
"div",
|
|
11099
12765
|
{
|
|
11100
12766
|
className: "flex-1 space-y-1 overflow-y-auto rounded-lg pr-1",
|
|
11101
12767
|
role: "radiogroup",
|
|
11102
12768
|
"aria-label": "Select color theme",
|
|
11103
12769
|
children: [
|
|
11104
|
-
filtered.length === 0 && /* @__PURE__ */
|
|
11105
|
-
filtered.map((ct) => /* @__PURE__ */
|
|
12770
|
+
filtered.length === 0 && /* @__PURE__ */ jsx110("p", { className: "py-8 text-center text-sm text-muted-foreground", children: "No themes found" }),
|
|
12771
|
+
filtered.map((ct) => /* @__PURE__ */ jsxs69(
|
|
11106
12772
|
"button",
|
|
11107
12773
|
{
|
|
11108
12774
|
onClick: () => setColorTheme(ct.name),
|
|
@@ -11114,7 +12780,7 @@ function ThemeListSelector() {
|
|
|
11114
12780
|
colorTheme === ct.name ? "bg-primary text-primary-foreground shadow-md" : "hover:bg-accent/80 hover:text-foreground border border-transparent hover:border-border/40"
|
|
11115
12781
|
),
|
|
11116
12782
|
children: [
|
|
11117
|
-
/* @__PURE__ */
|
|
12783
|
+
/* @__PURE__ */ jsx110("div", { className: "flex gap-1.5 shrink-0", children: ct.colors.map((color, i) => /* @__PURE__ */ jsx110(
|
|
11118
12784
|
"span",
|
|
11119
12785
|
{
|
|
11120
12786
|
className: cn(
|
|
@@ -11125,9 +12791,9 @@ function ThemeListSelector() {
|
|
|
11125
12791
|
},
|
|
11126
12792
|
i
|
|
11127
12793
|
)) }),
|
|
11128
|
-
/* @__PURE__ */
|
|
11129
|
-
/* @__PURE__ */
|
|
11130
|
-
ct.category === "tweakcn" && /* @__PURE__ */
|
|
12794
|
+
/* @__PURE__ */ jsxs69("div", { className: "flex items-center gap-1.5 truncate", children: [
|
|
12795
|
+
/* @__PURE__ */ jsx110("span", { className: "text-sm font-medium truncate", children: ct.label }),
|
|
12796
|
+
ct.category === "tweakcn" && /* @__PURE__ */ jsx110(
|
|
11131
12797
|
"span",
|
|
11132
12798
|
{
|
|
11133
12799
|
className: cn(
|
|
@@ -11137,7 +12803,7 @@ function ThemeListSelector() {
|
|
|
11137
12803
|
}
|
|
11138
12804
|
)
|
|
11139
12805
|
] }),
|
|
11140
|
-
colorTheme === ct.name && /* @__PURE__ */
|
|
12806
|
+
colorTheme === ct.name && /* @__PURE__ */ jsx110(Check8, { className: "ml-auto size-4 shrink-0", strokeWidth: 3 })
|
|
11141
12807
|
]
|
|
11142
12808
|
},
|
|
11143
12809
|
ct.name
|
|
@@ -11149,7 +12815,7 @@ function ThemeListSelector() {
|
|
|
11149
12815
|
}
|
|
11150
12816
|
|
|
11151
12817
|
// src/design-system/templates/nav-user.tsx
|
|
11152
|
-
import { Fragment as
|
|
12818
|
+
import { Fragment as Fragment4, jsx as jsx111, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
11153
12819
|
function NavUser({ user: fallbackUser }) {
|
|
11154
12820
|
const { isMobile } = useSidebar();
|
|
11155
12821
|
const [open, setOpen] = useDialogState();
|
|
@@ -11158,28 +12824,28 @@ function NavUser({ user: fallbackUser }) {
|
|
|
11158
12824
|
const userEmail = auth.user?.email || fallbackUser.email;
|
|
11159
12825
|
const userAvatar = auth.user?.picture || fallbackUser.avatar;
|
|
11160
12826
|
const userInitials = userName.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2);
|
|
11161
|
-
return /* @__PURE__ */
|
|
11162
|
-
/* @__PURE__ */
|
|
11163
|
-
/* @__PURE__ */
|
|
12827
|
+
return /* @__PURE__ */ jsxs70(Fragment4, { children: [
|
|
12828
|
+
/* @__PURE__ */ jsx111(SidebarMenu, { children: /* @__PURE__ */ jsx111(SidebarMenuItem, { children: /* @__PURE__ */ jsxs70(DropdownMenu, { modal: false, children: [
|
|
12829
|
+
/* @__PURE__ */ jsx111(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs70(
|
|
11164
12830
|
SidebarMenuButton,
|
|
11165
12831
|
{
|
|
11166
12832
|
size: "lg",
|
|
11167
12833
|
tooltip: userName,
|
|
11168
12834
|
className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
|
|
11169
12835
|
children: [
|
|
11170
|
-
/* @__PURE__ */
|
|
11171
|
-
/* @__PURE__ */
|
|
11172
|
-
/* @__PURE__ */
|
|
12836
|
+
/* @__PURE__ */ jsxs70(Avatar, { className: "h-8 w-8 rounded-lg", children: [
|
|
12837
|
+
/* @__PURE__ */ jsx111(AvatarImage, { src: userAvatar, alt: userName }),
|
|
12838
|
+
/* @__PURE__ */ jsx111(AvatarFallback, { className: "rounded-lg", children: userInitials })
|
|
11173
12839
|
] }),
|
|
11174
|
-
/* @__PURE__ */
|
|
11175
|
-
/* @__PURE__ */
|
|
11176
|
-
/* @__PURE__ */
|
|
12840
|
+
/* @__PURE__ */ jsxs70("div", { className: "grid flex-1 text-start text-sm leading-tight", children: [
|
|
12841
|
+
/* @__PURE__ */ jsx111("span", { className: "truncate font-semibold", children: userName }),
|
|
12842
|
+
/* @__PURE__ */ jsx111("span", { className: "truncate text-xs text-muted-foreground", children: userEmail })
|
|
11177
12843
|
] }),
|
|
11178
|
-
/* @__PURE__ */
|
|
12844
|
+
/* @__PURE__ */ jsx111(ChevronsUpDown, { className: "ml-auto size-4 shrink-0" })
|
|
11179
12845
|
]
|
|
11180
12846
|
}
|
|
11181
12847
|
) }),
|
|
11182
|
-
/* @__PURE__ */
|
|
12848
|
+
/* @__PURE__ */ jsxs70(
|
|
11183
12849
|
DropdownMenuContent,
|
|
11184
12850
|
{
|
|
11185
12851
|
className: "w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg",
|
|
@@ -11187,43 +12853,43 @@ function NavUser({ user: fallbackUser }) {
|
|
|
11187
12853
|
align: "end",
|
|
11188
12854
|
sideOffset: 4,
|
|
11189
12855
|
children: [
|
|
11190
|
-
/* @__PURE__ */
|
|
11191
|
-
/* @__PURE__ */
|
|
11192
|
-
/* @__PURE__ */
|
|
11193
|
-
/* @__PURE__ */
|
|
12856
|
+
/* @__PURE__ */ jsx111(DropdownMenuLabel, { className: "p-0 font-normal", children: /* @__PURE__ */ jsxs70("div", { className: "flex items-center gap-2 px-1 py-1.5 text-start text-sm", children: [
|
|
12857
|
+
/* @__PURE__ */ jsxs70(Avatar, { className: "h-8 w-8 rounded-lg", children: [
|
|
12858
|
+
/* @__PURE__ */ jsx111(AvatarImage, { src: userAvatar, alt: userName }),
|
|
12859
|
+
/* @__PURE__ */ jsx111(AvatarFallback, { className: "rounded-lg", children: userInitials })
|
|
11194
12860
|
] }),
|
|
11195
|
-
/* @__PURE__ */
|
|
11196
|
-
/* @__PURE__ */
|
|
11197
|
-
/* @__PURE__ */
|
|
12861
|
+
/* @__PURE__ */ jsxs70("div", { className: "grid flex-1 text-start text-sm leading-tight", children: [
|
|
12862
|
+
/* @__PURE__ */ jsx111("span", { className: "truncate font-semibold", children: userName }),
|
|
12863
|
+
/* @__PURE__ */ jsx111("span", { className: "truncate text-xs text-muted-foreground", children: userEmail })
|
|
11198
12864
|
] })
|
|
11199
12865
|
] }) }),
|
|
11200
|
-
/* @__PURE__ */
|
|
11201
|
-
/* @__PURE__ */
|
|
12866
|
+
/* @__PURE__ */ jsx111(DropdownMenuSeparator, {}),
|
|
12867
|
+
/* @__PURE__ */ jsx111(
|
|
11202
12868
|
ConfigDrawer,
|
|
11203
12869
|
{
|
|
11204
|
-
trigger: /* @__PURE__ */
|
|
11205
|
-
/* @__PURE__ */
|
|
12870
|
+
trigger: /* @__PURE__ */ jsxs70(DropdownMenuItem, { onSelect: (e) => e.preventDefault(), children: [
|
|
12871
|
+
/* @__PURE__ */ jsx111(Palette3, { className: "mr-2 h-4 w-4" }),
|
|
11206
12872
|
"Theme"
|
|
11207
12873
|
] })
|
|
11208
12874
|
}
|
|
11209
12875
|
),
|
|
11210
|
-
/* @__PURE__ */
|
|
12876
|
+
/* @__PURE__ */ jsx111(
|
|
11211
12877
|
ConfigDrawer,
|
|
11212
12878
|
{
|
|
11213
|
-
trigger: /* @__PURE__ */
|
|
11214
|
-
/* @__PURE__ */
|
|
12879
|
+
trigger: /* @__PURE__ */ jsxs70(DropdownMenuItem, { onSelect: (e) => e.preventDefault(), children: [
|
|
12880
|
+
/* @__PURE__ */ jsx111(Settings4, { className: "mr-2 h-4 w-4" }),
|
|
11215
12881
|
"Setting"
|
|
11216
12882
|
] })
|
|
11217
12883
|
}
|
|
11218
12884
|
),
|
|
11219
|
-
/* @__PURE__ */
|
|
11220
|
-
/* @__PURE__ */
|
|
12885
|
+
/* @__PURE__ */ jsx111(DropdownMenuSeparator, {}),
|
|
12886
|
+
/* @__PURE__ */ jsxs70(
|
|
11221
12887
|
DropdownMenuItem,
|
|
11222
12888
|
{
|
|
11223
12889
|
variant: "destructive",
|
|
11224
12890
|
onClick: () => setOpen(true),
|
|
11225
12891
|
children: [
|
|
11226
|
-
/* @__PURE__ */
|
|
12892
|
+
/* @__PURE__ */ jsx111(LogOut, { className: "mr-2 h-4 w-4" }),
|
|
11227
12893
|
"Sign out"
|
|
11228
12894
|
]
|
|
11229
12895
|
}
|
|
@@ -11232,19 +12898,19 @@ function NavUser({ user: fallbackUser }) {
|
|
|
11232
12898
|
}
|
|
11233
12899
|
)
|
|
11234
12900
|
] }) }) }),
|
|
11235
|
-
/* @__PURE__ */
|
|
12901
|
+
/* @__PURE__ */ jsx111(SignOutDialog, { open: !!open, onOpenChange: setOpen })
|
|
11236
12902
|
] });
|
|
11237
12903
|
}
|
|
11238
12904
|
|
|
11239
12905
|
// src/design-system/templates/app-sidebar.tsx
|
|
11240
|
-
import { jsx as
|
|
12906
|
+
import { jsx as jsx112, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
11241
12907
|
function AppSidebar() {
|
|
11242
12908
|
const { collapsible } = useLayout();
|
|
11243
|
-
return /* @__PURE__ */
|
|
11244
|
-
/* @__PURE__ */
|
|
11245
|
-
/* @__PURE__ */
|
|
11246
|
-
/* @__PURE__ */
|
|
11247
|
-
/* @__PURE__ */
|
|
12909
|
+
return /* @__PURE__ */ jsxs71(Sidebar, { collapsible, variant: "sidebar", children: [
|
|
12910
|
+
/* @__PURE__ */ jsxs71(SidebarHeader, { className: "p-2 pb-1", children: [
|
|
12911
|
+
/* @__PURE__ */ jsxs71("div", { className: "flex items-center justify-between gap-1", children: [
|
|
12912
|
+
/* @__PURE__ */ jsx112("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx112(TeamSwitcher, { teams: sidebarData2.teams }) }),
|
|
12913
|
+
/* @__PURE__ */ jsx112("div", { className: "group-data-[collapsible=icon]:hidden shrink-0", children: /* @__PURE__ */ jsx112(
|
|
11248
12914
|
SidebarTrigger,
|
|
11249
12915
|
{
|
|
11250
12916
|
variant: "ghost",
|
|
@@ -11253,7 +12919,7 @@ function AppSidebar() {
|
|
|
11253
12919
|
}
|
|
11254
12920
|
) })
|
|
11255
12921
|
] }),
|
|
11256
|
-
/* @__PURE__ */
|
|
12922
|
+
/* @__PURE__ */ jsx112("div", { className: "hidden group-data-[collapsible=icon]:flex justify-center pt-2 pb-1", children: /* @__PURE__ */ jsx112(
|
|
11257
12923
|
SidebarTrigger,
|
|
11258
12924
|
{
|
|
11259
12925
|
variant: "ghost",
|
|
@@ -11262,37 +12928,37 @@ function AppSidebar() {
|
|
|
11262
12928
|
}
|
|
11263
12929
|
) })
|
|
11264
12930
|
] }),
|
|
11265
|
-
/* @__PURE__ */
|
|
11266
|
-
/* @__PURE__ */
|
|
12931
|
+
/* @__PURE__ */ jsx112(SidebarContent, { children: sidebarData2.navGroups.map((props) => /* @__PURE__ */ jsx112(NavGroup, { ...props }, props.title)) }),
|
|
12932
|
+
/* @__PURE__ */ jsx112(SidebarFooter, { children: /* @__PURE__ */ jsx112(NavUser, { user: sidebarData2.user }) })
|
|
11267
12933
|
] });
|
|
11268
12934
|
}
|
|
11269
12935
|
|
|
11270
12936
|
// src/design-system/templates/app-title.tsx
|
|
11271
12937
|
import Link4 from "next/link";
|
|
11272
|
-
import { Menu, X as
|
|
11273
|
-
import { jsx as
|
|
12938
|
+
import { Menu, X as X5 } from "lucide-react";
|
|
12939
|
+
import { jsx as jsx113, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
11274
12940
|
function AppTitle() {
|
|
11275
12941
|
const { setOpenMobile } = useSidebar();
|
|
11276
|
-
return /* @__PURE__ */
|
|
12942
|
+
return /* @__PURE__ */ jsx113(SidebarMenu, { children: /* @__PURE__ */ jsx113(SidebarMenuItem, { children: /* @__PURE__ */ jsx113(
|
|
11277
12943
|
SidebarMenuButton,
|
|
11278
12944
|
{
|
|
11279
12945
|
size: "lg",
|
|
11280
12946
|
className: "gap-0 py-0 hover:bg-transparent active:bg-transparent",
|
|
11281
12947
|
asChild: true,
|
|
11282
|
-
children: /* @__PURE__ */
|
|
11283
|
-
/* @__PURE__ */
|
|
12948
|
+
children: /* @__PURE__ */ jsxs72("div", { children: [
|
|
12949
|
+
/* @__PURE__ */ jsxs72(
|
|
11284
12950
|
Link4,
|
|
11285
12951
|
{
|
|
11286
12952
|
href: "/",
|
|
11287
12953
|
onClick: () => setOpenMobile(false),
|
|
11288
12954
|
className: "grid flex-1 text-start text-sm leading-tight",
|
|
11289
12955
|
children: [
|
|
11290
|
-
/* @__PURE__ */
|
|
11291
|
-
/* @__PURE__ */
|
|
12956
|
+
/* @__PURE__ */ jsx113("span", { className: "truncate font-bold", children: "Shadcn-Admin" }),
|
|
12957
|
+
/* @__PURE__ */ jsx113("span", { className: "truncate text-xs", children: "Vite + ShadcnUI" })
|
|
11292
12958
|
]
|
|
11293
12959
|
}
|
|
11294
12960
|
),
|
|
11295
|
-
/* @__PURE__ */
|
|
12961
|
+
/* @__PURE__ */ jsx113(ToggleSidebar, {})
|
|
11296
12962
|
] })
|
|
11297
12963
|
}
|
|
11298
12964
|
) }) });
|
|
@@ -11303,7 +12969,7 @@ function ToggleSidebar({
|
|
|
11303
12969
|
...props
|
|
11304
12970
|
}) {
|
|
11305
12971
|
const { toggleSidebar } = useSidebar();
|
|
11306
|
-
return /* @__PURE__ */
|
|
12972
|
+
return /* @__PURE__ */ jsxs72(
|
|
11307
12973
|
Button,
|
|
11308
12974
|
{
|
|
11309
12975
|
"data-sidebar": "trigger",
|
|
@@ -11317,31 +12983,31 @@ function ToggleSidebar({
|
|
|
11317
12983
|
},
|
|
11318
12984
|
...props,
|
|
11319
12985
|
children: [
|
|
11320
|
-
/* @__PURE__ */
|
|
11321
|
-
/* @__PURE__ */
|
|
11322
|
-
/* @__PURE__ */
|
|
12986
|
+
/* @__PURE__ */ jsx113(X5, { className: "md:hidden" }),
|
|
12987
|
+
/* @__PURE__ */ jsx113(Menu, { className: "max-md:hidden" }),
|
|
12988
|
+
/* @__PURE__ */ jsx113("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
11323
12989
|
]
|
|
11324
12990
|
}
|
|
11325
12991
|
);
|
|
11326
12992
|
}
|
|
11327
12993
|
|
|
11328
12994
|
// src/design-system/templates/authenticated-layout.tsx
|
|
11329
|
-
import { useEffect as
|
|
12995
|
+
import { useEffect as useEffect16, useState as useState16 } from "react";
|
|
11330
12996
|
import { usePathname as usePathname3 } from "next/navigation";
|
|
11331
12997
|
|
|
11332
12998
|
// src/components/layout/app-sidebar.tsx
|
|
11333
|
-
import { useEffect as
|
|
12999
|
+
import { useEffect as useEffect15 } from "react";
|
|
11334
13000
|
|
|
11335
13001
|
// src/components/layout/nav-group.tsx
|
|
11336
13002
|
import Link5 from "next/link";
|
|
11337
13003
|
import { usePathname as usePathname2 } from "next/navigation";
|
|
11338
|
-
import { ChevronRight as
|
|
11339
|
-
import { jsx as
|
|
13004
|
+
import { ChevronRight as ChevronRight9, X as X6 } from "lucide-react";
|
|
13005
|
+
import { jsx as jsx114, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
11340
13006
|
function NavGroup2({ title, items }) {
|
|
11341
13007
|
const { state, isMobile, openMobile, setOpenMobile } = useSidebar();
|
|
11342
13008
|
const href = usePathname2();
|
|
11343
|
-
return /* @__PURE__ */
|
|
11344
|
-
/* @__PURE__ */
|
|
13009
|
+
return /* @__PURE__ */ jsxs73(SidebarGroup, { className: cn(title === "Menu" && "pt-0"), children: [
|
|
13010
|
+
/* @__PURE__ */ jsxs73(
|
|
11345
13011
|
SidebarGroupLabel,
|
|
11346
13012
|
{
|
|
11347
13013
|
className: cn(
|
|
@@ -11349,8 +13015,8 @@ function NavGroup2({ title, items }) {
|
|
|
11349
13015
|
title === "Menu" && state !== "collapsed" && "sticky top-0 z-20 bg-sidebar py-1.5"
|
|
11350
13016
|
),
|
|
11351
13017
|
children: [
|
|
11352
|
-
/* @__PURE__ */
|
|
11353
|
-
title === "Menu" && !isMobile && /* @__PURE__ */
|
|
13018
|
+
/* @__PURE__ */ jsx114("span", { children: title }),
|
|
13019
|
+
title === "Menu" && !isMobile && /* @__PURE__ */ jsx114(
|
|
11354
13020
|
SidebarTrigger,
|
|
11355
13021
|
{
|
|
11356
13022
|
variant: "ghost",
|
|
@@ -11358,7 +13024,7 @@ function NavGroup2({ title, items }) {
|
|
|
11358
13024
|
"aria-label": "Toggle sidebar"
|
|
11359
13025
|
}
|
|
11360
13026
|
),
|
|
11361
|
-
title === "Menu" && isMobile && openMobile && /* @__PURE__ */
|
|
13027
|
+
title === "Menu" && isMobile && openMobile && /* @__PURE__ */ jsx114(
|
|
11362
13028
|
Button,
|
|
11363
13029
|
{
|
|
11364
13030
|
type: "button",
|
|
@@ -11367,37 +13033,37 @@ function NavGroup2({ title, items }) {
|
|
|
11367
13033
|
className: "size-6 shrink-0",
|
|
11368
13034
|
"aria-label": "Close sidebar",
|
|
11369
13035
|
onClick: () => setOpenMobile(false),
|
|
11370
|
-
children: /* @__PURE__ */
|
|
13036
|
+
children: /* @__PURE__ */ jsx114(X6, { className: "size-4", "aria-hidden": "true" })
|
|
11371
13037
|
}
|
|
11372
13038
|
)
|
|
11373
13039
|
]
|
|
11374
13040
|
}
|
|
11375
13041
|
),
|
|
11376
|
-
/* @__PURE__ */
|
|
13042
|
+
/* @__PURE__ */ jsx114(SidebarMenu, { children: items.map((item) => {
|
|
11377
13043
|
const key = `${item.title}-${item.url}`;
|
|
11378
13044
|
if (!item.items)
|
|
11379
|
-
return /* @__PURE__ */
|
|
13045
|
+
return /* @__PURE__ */ jsx114(SidebarMenuLink2, { item, href }, key);
|
|
11380
13046
|
if (item.title === "Settings" && item.items.length === 0)
|
|
11381
|
-
return /* @__PURE__ */
|
|
13047
|
+
return /* @__PURE__ */ jsx114(SidebarMenuSettings2, { item }, key);
|
|
11382
13048
|
if (state === "collapsed" && !isMobile)
|
|
11383
|
-
return /* @__PURE__ */
|
|
11384
|
-
return /* @__PURE__ */
|
|
13049
|
+
return /* @__PURE__ */ jsx114(SidebarMenuCollapsedDropdown2, { item, href }, key);
|
|
13050
|
+
return /* @__PURE__ */ jsx114(SidebarMenuCollapsible2, { item, href }, key);
|
|
11385
13051
|
}) })
|
|
11386
13052
|
] });
|
|
11387
13053
|
}
|
|
11388
13054
|
function NavBadge2({ children }) {
|
|
11389
|
-
return /* @__PURE__ */
|
|
13055
|
+
return /* @__PURE__ */ jsx114(Badge, { className: "rounded-full px-1 py-0 text-xs", children });
|
|
11390
13056
|
}
|
|
11391
13057
|
function SidebarMenuLink2({ item, href }) {
|
|
11392
13058
|
const { setOpenMobile } = useSidebar();
|
|
11393
13059
|
const { setShowInlineNotFound } = useLayout();
|
|
11394
|
-
return /* @__PURE__ */
|
|
13060
|
+
return /* @__PURE__ */ jsx114(SidebarMenuItem, { children: /* @__PURE__ */ jsx114(
|
|
11395
13061
|
SidebarMenuButton,
|
|
11396
13062
|
{
|
|
11397
13063
|
asChild: true,
|
|
11398
13064
|
isActive: checkIsActive2(href, item),
|
|
11399
13065
|
tooltip: item.title,
|
|
11400
|
-
children: /* @__PURE__ */
|
|
13066
|
+
children: /* @__PURE__ */ jsxs73(
|
|
11401
13067
|
Link5,
|
|
11402
13068
|
{
|
|
11403
13069
|
href: item.url,
|
|
@@ -11406,9 +13072,9 @@ function SidebarMenuLink2({ item, href }) {
|
|
|
11406
13072
|
setOpenMobile(false);
|
|
11407
13073
|
},
|
|
11408
13074
|
children: [
|
|
11409
|
-
item.icon && /* @__PURE__ */
|
|
11410
|
-
/* @__PURE__ */
|
|
11411
|
-
item.badge && /* @__PURE__ */
|
|
13075
|
+
item.icon && /* @__PURE__ */ jsx114(item.icon, {}),
|
|
13076
|
+
/* @__PURE__ */ jsx114("span", { children: item.title }),
|
|
13077
|
+
item.badge && /* @__PURE__ */ jsx114(NavBadge2, { children: item.badge })
|
|
11412
13078
|
]
|
|
11413
13079
|
}
|
|
11414
13080
|
)
|
|
@@ -11418,7 +13084,7 @@ function SidebarMenuLink2({ item, href }) {
|
|
|
11418
13084
|
function SidebarMenuSettings2({ item }) {
|
|
11419
13085
|
const { setOpenMobile } = useSidebar();
|
|
11420
13086
|
const { showInlineNotFound, setShowInlineNotFound } = useLayout();
|
|
11421
|
-
return /* @__PURE__ */
|
|
13087
|
+
return /* @__PURE__ */ jsx114(SidebarMenuItem, { children: /* @__PURE__ */ jsxs73(
|
|
11422
13088
|
SidebarMenuButton,
|
|
11423
13089
|
{
|
|
11424
13090
|
tooltip: item.title,
|
|
@@ -11428,8 +13094,8 @@ function SidebarMenuSettings2({ item }) {
|
|
|
11428
13094
|
setOpenMobile(false);
|
|
11429
13095
|
},
|
|
11430
13096
|
children: [
|
|
11431
|
-
item.icon && /* @__PURE__ */
|
|
11432
|
-
/* @__PURE__ */
|
|
13097
|
+
item.icon && /* @__PURE__ */ jsx114(item.icon, {}),
|
|
13098
|
+
/* @__PURE__ */ jsx114("span", { children: item.title })
|
|
11433
13099
|
]
|
|
11434
13100
|
}
|
|
11435
13101
|
) });
|
|
@@ -11440,25 +13106,25 @@ function SidebarMenuCollapsible2({
|
|
|
11440
13106
|
}) {
|
|
11441
13107
|
const { setOpenMobile } = useSidebar();
|
|
11442
13108
|
const { setShowInlineNotFound } = useLayout();
|
|
11443
|
-
return /* @__PURE__ */
|
|
13109
|
+
return /* @__PURE__ */ jsx114(
|
|
11444
13110
|
Collapsible,
|
|
11445
13111
|
{
|
|
11446
13112
|
asChild: true,
|
|
11447
13113
|
defaultOpen: checkIsActive2(href, item, true),
|
|
11448
13114
|
className: "group/collapsible",
|
|
11449
|
-
children: /* @__PURE__ */
|
|
11450
|
-
/* @__PURE__ */
|
|
11451
|
-
item.icon && /* @__PURE__ */
|
|
11452
|
-
/* @__PURE__ */
|
|
11453
|
-
item.badge && /* @__PURE__ */
|
|
11454
|
-
/* @__PURE__ */
|
|
13115
|
+
children: /* @__PURE__ */ jsxs73(SidebarMenuItem, { children: [
|
|
13116
|
+
/* @__PURE__ */ jsx114(CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ jsxs73(SidebarMenuButton, { tooltip: item.title, children: [
|
|
13117
|
+
item.icon && /* @__PURE__ */ jsx114(item.icon, {}),
|
|
13118
|
+
/* @__PURE__ */ jsx114("span", { children: item.title }),
|
|
13119
|
+
item.badge && /* @__PURE__ */ jsx114(NavBadge2, { children: item.badge }),
|
|
13120
|
+
/* @__PURE__ */ jsx114(ChevronRight9, { className: "ms-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90 rtl:rotate-180" })
|
|
11455
13121
|
] }) }),
|
|
11456
|
-
/* @__PURE__ */
|
|
13122
|
+
/* @__PURE__ */ jsx114(CollapsibleContent, { className: "CollapsibleContent", children: /* @__PURE__ */ jsx114(SidebarMenuSub, { children: item.items.map((subItem) => /* @__PURE__ */ jsx114(SidebarMenuSubItem, { children: /* @__PURE__ */ jsx114(
|
|
11457
13123
|
SidebarMenuSubButton,
|
|
11458
13124
|
{
|
|
11459
13125
|
asChild: true,
|
|
11460
13126
|
isActive: checkIsActive2(href, subItem),
|
|
11461
|
-
children: /* @__PURE__ */
|
|
13127
|
+
children: /* @__PURE__ */ jsxs73(
|
|
11462
13128
|
Link5,
|
|
11463
13129
|
{
|
|
11464
13130
|
href: subItem.url,
|
|
@@ -11467,9 +13133,9 @@ function SidebarMenuCollapsible2({
|
|
|
11467
13133
|
setOpenMobile(false);
|
|
11468
13134
|
},
|
|
11469
13135
|
children: [
|
|
11470
|
-
subItem.icon && /* @__PURE__ */
|
|
11471
|
-
/* @__PURE__ */
|
|
11472
|
-
subItem.badge && /* @__PURE__ */
|
|
13136
|
+
subItem.icon && /* @__PURE__ */ jsx114(subItem.icon, {}),
|
|
13137
|
+
/* @__PURE__ */ jsx114("span", { children: subItem.title }),
|
|
13138
|
+
subItem.badge && /* @__PURE__ */ jsx114(NavBadge2, { children: subItem.badge })
|
|
11473
13139
|
]
|
|
11474
13140
|
}
|
|
11475
13141
|
)
|
|
@@ -11483,36 +13149,36 @@ function SidebarMenuCollapsedDropdown2({
|
|
|
11483
13149
|
item,
|
|
11484
13150
|
href
|
|
11485
13151
|
}) {
|
|
11486
|
-
return /* @__PURE__ */
|
|
11487
|
-
/* @__PURE__ */
|
|
13152
|
+
return /* @__PURE__ */ jsx114(SidebarMenuItem, { children: /* @__PURE__ */ jsxs73(DropdownMenu, { children: [
|
|
13153
|
+
/* @__PURE__ */ jsx114(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs73(
|
|
11488
13154
|
SidebarMenuButton,
|
|
11489
13155
|
{
|
|
11490
13156
|
tooltip: item.title,
|
|
11491
13157
|
isActive: checkIsActive2(href, item),
|
|
11492
13158
|
children: [
|
|
11493
|
-
item.icon && /* @__PURE__ */
|
|
11494
|
-
/* @__PURE__ */
|
|
11495
|
-
item.badge && /* @__PURE__ */
|
|
11496
|
-
/* @__PURE__ */
|
|
13159
|
+
item.icon && /* @__PURE__ */ jsx114(item.icon, {}),
|
|
13160
|
+
/* @__PURE__ */ jsx114("span", { children: item.title }),
|
|
13161
|
+
item.badge && /* @__PURE__ */ jsx114(NavBadge2, { children: item.badge }),
|
|
13162
|
+
/* @__PURE__ */ jsx114(ChevronRight9, { className: "ms-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
|
|
11497
13163
|
]
|
|
11498
13164
|
}
|
|
11499
13165
|
) }),
|
|
11500
|
-
/* @__PURE__ */
|
|
11501
|
-
/* @__PURE__ */
|
|
13166
|
+
/* @__PURE__ */ jsxs73(DropdownMenuContent, { side: "right", align: "start", sideOffset: 4, children: [
|
|
13167
|
+
/* @__PURE__ */ jsxs73(DropdownMenuLabel, { children: [
|
|
11502
13168
|
item.title,
|
|
11503
13169
|
" ",
|
|
11504
13170
|
item.badge ? `(${item.badge})` : ""
|
|
11505
13171
|
] }),
|
|
11506
|
-
/* @__PURE__ */
|
|
11507
|
-
item.items.map((sub) => /* @__PURE__ */
|
|
13172
|
+
/* @__PURE__ */ jsx114(DropdownMenuSeparator, {}),
|
|
13173
|
+
item.items.map((sub) => /* @__PURE__ */ jsx114(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs73(
|
|
11508
13174
|
Link5,
|
|
11509
13175
|
{
|
|
11510
13176
|
href: sub.url,
|
|
11511
13177
|
className: `${checkIsActive2(href, sub) ? "bg-secondary" : ""}`,
|
|
11512
13178
|
children: [
|
|
11513
|
-
sub.icon && /* @__PURE__ */
|
|
11514
|
-
/* @__PURE__ */
|
|
11515
|
-
sub.badge && /* @__PURE__ */
|
|
13179
|
+
sub.icon && /* @__PURE__ */ jsx114(sub.icon, {}),
|
|
13180
|
+
/* @__PURE__ */ jsx114("span", { className: "max-w-52 text-wrap", children: sub.title }),
|
|
13181
|
+
sub.badge && /* @__PURE__ */ jsx114("span", { className: "ms-auto text-xs", children: sub.badge })
|
|
11516
13182
|
]
|
|
11517
13183
|
}
|
|
11518
13184
|
) }, `${sub.title}-${sub.url}`))
|
|
@@ -11531,15 +13197,15 @@ import {
|
|
|
11531
13197
|
ChevronsUpDown as ChevronsUpDown2,
|
|
11532
13198
|
LogOut as LogOut2,
|
|
11533
13199
|
User as User2,
|
|
11534
|
-
Bell as
|
|
13200
|
+
Bell as Bell5,
|
|
11535
13201
|
MessageCircle,
|
|
11536
13202
|
CreditCard,
|
|
11537
13203
|
ShoppingBag,
|
|
11538
13204
|
Settings as Settings5,
|
|
11539
|
-
Palette as
|
|
13205
|
+
Palette as Palette4
|
|
11540
13206
|
} from "lucide-react";
|
|
11541
13207
|
import Link6 from "next/link";
|
|
11542
|
-
import { Fragment as
|
|
13208
|
+
import { Fragment as Fragment5, jsx as jsx115, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
11543
13209
|
function NavUser2({ user: fallbackUser }) {
|
|
11544
13210
|
const { isMobile } = useSidebar();
|
|
11545
13211
|
const [open, setOpen] = useDialogState();
|
|
@@ -11549,28 +13215,28 @@ function NavUser2({ user: fallbackUser }) {
|
|
|
11549
13215
|
const userEmail = auth.user?.email || fallbackUser.email;
|
|
11550
13216
|
const userAvatar = auth.user?.picture || fallbackUser.avatar;
|
|
11551
13217
|
const userInitials = userName.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2);
|
|
11552
|
-
return /* @__PURE__ */
|
|
11553
|
-
/* @__PURE__ */
|
|
11554
|
-
/* @__PURE__ */
|
|
13218
|
+
return /* @__PURE__ */ jsxs74(Fragment5, { children: [
|
|
13219
|
+
/* @__PURE__ */ jsx115(SidebarMenu, { children: /* @__PURE__ */ jsx115(SidebarMenuItem, { children: /* @__PURE__ */ jsxs74(DropdownMenu, { modal: false, children: [
|
|
13220
|
+
/* @__PURE__ */ jsx115(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs74(
|
|
11555
13221
|
SidebarMenuButton,
|
|
11556
13222
|
{
|
|
11557
13223
|
size: "lg",
|
|
11558
13224
|
tooltip: userName,
|
|
11559
13225
|
className: "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground",
|
|
11560
13226
|
children: [
|
|
11561
|
-
/* @__PURE__ */
|
|
11562
|
-
/* @__PURE__ */
|
|
11563
|
-
/* @__PURE__ */
|
|
13227
|
+
/* @__PURE__ */ jsxs74(Avatar, { className: "h-8 w-8 rounded-lg", children: [
|
|
13228
|
+
/* @__PURE__ */ jsx115(AvatarImage, { src: userAvatar, alt: userName }),
|
|
13229
|
+
/* @__PURE__ */ jsx115(AvatarFallback, { className: "rounded-lg", children: userInitials })
|
|
11564
13230
|
] }),
|
|
11565
|
-
/* @__PURE__ */
|
|
11566
|
-
/* @__PURE__ */
|
|
11567
|
-
/* @__PURE__ */
|
|
13231
|
+
/* @__PURE__ */ jsxs74("div", { className: "grid flex-1 text-start text-sm leading-tight", children: [
|
|
13232
|
+
/* @__PURE__ */ jsx115("span", { className: "truncate font-semibold", children: userName }),
|
|
13233
|
+
/* @__PURE__ */ jsx115("span", { className: "truncate text-xs text-muted-foreground", children: userEmail })
|
|
11568
13234
|
] }),
|
|
11569
|
-
/* @__PURE__ */
|
|
13235
|
+
/* @__PURE__ */ jsx115(ChevronsUpDown2, { className: "ml-auto size-4 shrink-0" })
|
|
11570
13236
|
]
|
|
11571
13237
|
}
|
|
11572
13238
|
) }),
|
|
11573
|
-
/* @__PURE__ */
|
|
13239
|
+
/* @__PURE__ */ jsxs74(
|
|
11574
13240
|
DropdownMenuContent,
|
|
11575
13241
|
{
|
|
11576
13242
|
className: "w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg",
|
|
@@ -11578,59 +13244,59 @@ function NavUser2({ user: fallbackUser }) {
|
|
|
11578
13244
|
align: "end",
|
|
11579
13245
|
sideOffset: 4,
|
|
11580
13246
|
children: [
|
|
11581
|
-
/* @__PURE__ */
|
|
11582
|
-
/* @__PURE__ */
|
|
11583
|
-
/* @__PURE__ */
|
|
11584
|
-
/* @__PURE__ */
|
|
13247
|
+
/* @__PURE__ */ jsx115(DropdownMenuLabel, { className: "p-0 font-normal", children: /* @__PURE__ */ jsxs74("div", { className: "flex items-center gap-2 px-1 py-1.5 text-start text-sm", children: [
|
|
13248
|
+
/* @__PURE__ */ jsxs74(Avatar, { className: "h-8 w-8 rounded-lg", children: [
|
|
13249
|
+
/* @__PURE__ */ jsx115(AvatarImage, { src: userAvatar, alt: userName }),
|
|
13250
|
+
/* @__PURE__ */ jsx115(AvatarFallback, { className: "rounded-lg", children: userInitials })
|
|
11585
13251
|
] }),
|
|
11586
|
-
/* @__PURE__ */
|
|
11587
|
-
/* @__PURE__ */
|
|
11588
|
-
/* @__PURE__ */
|
|
13252
|
+
/* @__PURE__ */ jsxs74("div", { className: "grid flex-1 text-start text-sm leading-tight", children: [
|
|
13253
|
+
/* @__PURE__ */ jsx115("span", { className: "truncate font-semibold", children: userName }),
|
|
13254
|
+
/* @__PURE__ */ jsx115("span", { className: "truncate text-xs text-muted-foreground", children: userEmail })
|
|
11589
13255
|
] })
|
|
11590
13256
|
] }) }),
|
|
11591
|
-
/* @__PURE__ */
|
|
11592
|
-
/* @__PURE__ */
|
|
11593
|
-
/* @__PURE__ */
|
|
13257
|
+
/* @__PURE__ */ jsx115(DropdownMenuSeparator, {}),
|
|
13258
|
+
/* @__PURE__ */ jsxs74(DropdownMenuItem, { onClick: () => setShowInlineNotFound(true), children: [
|
|
13259
|
+
/* @__PURE__ */ jsx115(User2, { className: "mr-2 h-4 w-4" }),
|
|
11594
13260
|
"My Profile"
|
|
11595
13261
|
] }),
|
|
11596
|
-
/* @__PURE__ */
|
|
11597
|
-
/* @__PURE__ */
|
|
13262
|
+
/* @__PURE__ */ jsxs74(DropdownMenuItem, { onClick: () => setShowInlineNotFound(true), children: [
|
|
13263
|
+
/* @__PURE__ */ jsx115(Bell5, { className: "mr-2 h-4 w-4" }),
|
|
11598
13264
|
"Notifications"
|
|
11599
13265
|
] }),
|
|
11600
|
-
/* @__PURE__ */
|
|
11601
|
-
/* @__PURE__ */
|
|
13266
|
+
/* @__PURE__ */ jsxs74(DropdownMenuItem, { onClick: () => setShowInlineNotFound(true), children: [
|
|
13267
|
+
/* @__PURE__ */ jsx115(MessageCircle, { className: "mr-2 h-4 w-4" }),
|
|
11602
13268
|
"Help & Support"
|
|
11603
13269
|
] }),
|
|
11604
|
-
/* @__PURE__ */
|
|
11605
|
-
/* @__PURE__ */
|
|
11606
|
-
/* @__PURE__ */
|
|
13270
|
+
/* @__PURE__ */ jsx115(DropdownMenuSeparator, {}),
|
|
13271
|
+
/* @__PURE__ */ jsxs74(DropdownMenuItem, { onClick: () => setShowInlineNotFound(true), children: [
|
|
13272
|
+
/* @__PURE__ */ jsx115(CreditCard, { className: "mr-2 h-4 w-4" }),
|
|
11607
13273
|
"Subscriptions"
|
|
11608
13274
|
] }),
|
|
11609
|
-
/* @__PURE__ */
|
|
11610
|
-
/* @__PURE__ */
|
|
13275
|
+
/* @__PURE__ */ jsx115(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs74(Link6, { href: "/apps", children: [
|
|
13276
|
+
/* @__PURE__ */ jsx115(ShoppingBag, { className: "mr-2 h-4 w-4" }),
|
|
11611
13277
|
"Buy Apps"
|
|
11612
13278
|
] }) }),
|
|
11613
|
-
/* @__PURE__ */
|
|
13279
|
+
/* @__PURE__ */ jsx115(
|
|
11614
13280
|
ConfigDrawer,
|
|
11615
13281
|
{
|
|
11616
|
-
trigger: /* @__PURE__ */
|
|
11617
|
-
/* @__PURE__ */
|
|
13282
|
+
trigger: /* @__PURE__ */ jsxs74(DropdownMenuItem, { onSelect: (e) => e.preventDefault(), children: [
|
|
13283
|
+
/* @__PURE__ */ jsx115(Palette4, { className: "mr-2 h-4 w-4" }),
|
|
11618
13284
|
"Theme Settings"
|
|
11619
13285
|
] })
|
|
11620
13286
|
}
|
|
11621
13287
|
),
|
|
11622
|
-
/* @__PURE__ */
|
|
11623
|
-
/* @__PURE__ */
|
|
13288
|
+
/* @__PURE__ */ jsxs74(DropdownMenuItem, { onClick: () => setShowInlineNotFound(true), children: [
|
|
13289
|
+
/* @__PURE__ */ jsx115(Settings5, { className: "mr-2 h-4 w-4" }),
|
|
11624
13290
|
"Settings"
|
|
11625
13291
|
] }),
|
|
11626
|
-
/* @__PURE__ */
|
|
11627
|
-
/* @__PURE__ */
|
|
13292
|
+
/* @__PURE__ */ jsx115(DropdownMenuSeparator, {}),
|
|
13293
|
+
/* @__PURE__ */ jsxs74(
|
|
11628
13294
|
DropdownMenuItem,
|
|
11629
13295
|
{
|
|
11630
13296
|
variant: "destructive",
|
|
11631
13297
|
onClick: () => setOpen(true),
|
|
11632
13298
|
children: [
|
|
11633
|
-
/* @__PURE__ */
|
|
13299
|
+
/* @__PURE__ */ jsx115(LogOut2, { className: "mr-2 h-4 w-4" }),
|
|
11634
13300
|
"Sign out"
|
|
11635
13301
|
]
|
|
11636
13302
|
}
|
|
@@ -11639,17 +13305,17 @@ function NavUser2({ user: fallbackUser }) {
|
|
|
11639
13305
|
}
|
|
11640
13306
|
)
|
|
11641
13307
|
] }) }) }),
|
|
11642
|
-
/* @__PURE__ */
|
|
13308
|
+
/* @__PURE__ */ jsx115(SignOutDialog, { open: !!open, onOpenChange: setOpen })
|
|
11643
13309
|
] });
|
|
11644
13310
|
}
|
|
11645
13311
|
|
|
11646
13312
|
// src/components/layout/app-sidebar.tsx
|
|
11647
|
-
import { jsx as
|
|
13313
|
+
import { jsx as jsx116, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
11648
13314
|
function AppSidebar2() {
|
|
11649
13315
|
const { collapsible } = useLayout();
|
|
11650
13316
|
const currentUser = useAuthStore((state) => state.auth.user);
|
|
11651
13317
|
const { unreadCount, fetchNotifications, subscribeToNotifications, unsubscribe } = useNotificationStore();
|
|
11652
|
-
|
|
13318
|
+
useEffect15(() => {
|
|
11653
13319
|
if (currentUser) {
|
|
11654
13320
|
fetchNotifications(currentUser.accountNo);
|
|
11655
13321
|
subscribeToNotifications(currentUser.accountNo);
|
|
@@ -11675,9 +13341,9 @@ function AppSidebar2() {
|
|
|
11675
13341
|
};
|
|
11676
13342
|
return (
|
|
11677
13343
|
// Sidebar ko fixed "sidebar" variant par lock kiya gaya hai (floating remove).
|
|
11678
|
-
/* @__PURE__ */
|
|
11679
|
-
/* @__PURE__ */
|
|
11680
|
-
/* @__PURE__ */
|
|
13344
|
+
/* @__PURE__ */ jsxs75(Sidebar, { collapsible, variant: "sidebar", children: [
|
|
13345
|
+
/* @__PURE__ */ jsx116(SidebarHeader, { className: "pb-0", children: /* @__PURE__ */ jsx116(TeamSwitcher, { teams: dynamicSidebarData.teams }) }),
|
|
13346
|
+
/* @__PURE__ */ jsx116("div", { className: "hidden group-data-[state=collapsed]:flex justify-center py-2", children: /* @__PURE__ */ jsx116(
|
|
11681
13347
|
SidebarTrigger,
|
|
11682
13348
|
{
|
|
11683
13349
|
variant: "ghost",
|
|
@@ -11685,16 +13351,16 @@ function AppSidebar2() {
|
|
|
11685
13351
|
"aria-label": "Toggle sidebar"
|
|
11686
13352
|
}
|
|
11687
13353
|
) }),
|
|
11688
|
-
/* @__PURE__ */
|
|
11689
|
-
/* @__PURE__ */
|
|
13354
|
+
/* @__PURE__ */ jsx116(SidebarContent, { children: dynamicSidebarData.navGroups.map((props) => /* @__PURE__ */ jsx116(NavGroup2, { ...props }, props.title)) }),
|
|
13355
|
+
/* @__PURE__ */ jsx116(SidebarFooter, { children: /* @__PURE__ */ jsx116(NavUser2, { user: dynamicSidebarData.user }) })
|
|
11690
13356
|
] })
|
|
11691
13357
|
);
|
|
11692
13358
|
}
|
|
11693
13359
|
|
|
11694
13360
|
// src/components/skip-to-main.tsx
|
|
11695
|
-
import { jsx as
|
|
13361
|
+
import { jsx as jsx117 } from "react/jsx-runtime";
|
|
11696
13362
|
function SkipToMain() {
|
|
11697
|
-
return /* @__PURE__ */
|
|
13363
|
+
return /* @__PURE__ */ jsx117(
|
|
11698
13364
|
"a",
|
|
11699
13365
|
{
|
|
11700
13366
|
className: `fixed inset-s-44 z-999 -translate-y-52 bg-primary px-4 py-2 text-sm font-medium whitespace-nowrap text-primary-foreground opacity-95 shadow-sm transition hover:bg-primary/90 focus:translate-y-3 focus:transform focus-visible:ring-1 focus-visible:ring-ring`,
|
|
@@ -11706,7 +13372,7 @@ function SkipToMain() {
|
|
|
11706
13372
|
|
|
11707
13373
|
// src/features/errors/not-found-error.tsx
|
|
11708
13374
|
import { useRouter as useRouter3 } from "next/navigation";
|
|
11709
|
-
import { jsx as
|
|
13375
|
+
import { jsx as jsx118, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
11710
13376
|
function NotFoundError({
|
|
11711
13377
|
className,
|
|
11712
13378
|
embedded = false,
|
|
@@ -11724,8 +13390,8 @@ function NotFoundError({
|
|
|
11724
13390
|
if (onDismiss) onDismiss();
|
|
11725
13391
|
router.push("/");
|
|
11726
13392
|
};
|
|
11727
|
-
return /* @__PURE__ */
|
|
11728
|
-
/* @__PURE__ */
|
|
13393
|
+
return /* @__PURE__ */ jsx118("div", { className: cn(embedded ? "min-h-96 w-full py-8" : "h-svh", className), children: /* @__PURE__ */ jsxs76("div", { className: "m-auto flex h-full w-full flex-col items-center justify-center gap-2", children: [
|
|
13394
|
+
/* @__PURE__ */ jsx118(
|
|
11729
13395
|
"h1",
|
|
11730
13396
|
{
|
|
11731
13397
|
className: cn(
|
|
@@ -11735,31 +13401,31 @@ function NotFoundError({
|
|
|
11735
13401
|
children: "404"
|
|
11736
13402
|
}
|
|
11737
13403
|
),
|
|
11738
|
-
/* @__PURE__ */
|
|
11739
|
-
/* @__PURE__ */
|
|
13404
|
+
/* @__PURE__ */ jsx118("span", { className: "font-medium", children: "Oops! Page Not Found :-(!" }),
|
|
13405
|
+
/* @__PURE__ */ jsxs76("p", { className: "text-center text-muted-foreground", children: [
|
|
11740
13406
|
"It seems like the page you're looking for ",
|
|
11741
|
-
/* @__PURE__ */
|
|
13407
|
+
/* @__PURE__ */ jsx118("br", {}),
|
|
11742
13408
|
"does not exist or might have been removed."
|
|
11743
13409
|
] }),
|
|
11744
|
-
/* @__PURE__ */
|
|
11745
|
-
/* @__PURE__ */
|
|
11746
|
-
/* @__PURE__ */
|
|
13410
|
+
/* @__PURE__ */ jsxs76("div", { className: "mt-6 flex gap-4", children: [
|
|
13411
|
+
/* @__PURE__ */ jsx118(Button, { variant: "outline", onClick: handleGoBack, children: "Go Back" }),
|
|
13412
|
+
/* @__PURE__ */ jsx118(Button, { onClick: handleGoHome, children: "Back to Home" })
|
|
11747
13413
|
] })
|
|
11748
13414
|
] }) });
|
|
11749
13415
|
}
|
|
11750
13416
|
|
|
11751
13417
|
// src/design-system/templates/authenticated-layout.tsx
|
|
11752
|
-
import { Fragment as
|
|
13418
|
+
import { Fragment as Fragment6, jsx as jsx119, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
11753
13419
|
function AuthenticatedLayoutContent({ children }) {
|
|
11754
13420
|
const { showInlineNotFound, setShowInlineNotFound } = useLayout();
|
|
11755
13421
|
const pathname = usePathname3();
|
|
11756
|
-
|
|
13422
|
+
useEffect16(() => {
|
|
11757
13423
|
setShowInlineNotFound(false);
|
|
11758
13424
|
}, [pathname, setShowInlineNotFound]);
|
|
11759
|
-
return /* @__PURE__ */
|
|
11760
|
-
/* @__PURE__ */
|
|
11761
|
-
/* @__PURE__ */
|
|
11762
|
-
/* @__PURE__ */
|
|
13425
|
+
return /* @__PURE__ */ jsxs77(Fragment6, { children: [
|
|
13426
|
+
/* @__PURE__ */ jsx119(SkipToMain, {}),
|
|
13427
|
+
/* @__PURE__ */ jsx119(AppSidebar2, {}),
|
|
13428
|
+
/* @__PURE__ */ jsx119(
|
|
11763
13429
|
SidebarInset,
|
|
11764
13430
|
{
|
|
11765
13431
|
className: cn(
|
|
@@ -11767,7 +13433,7 @@ function AuthenticatedLayoutContent({ children }) {
|
|
|
11767
13433
|
"has-[[data-layout=fixed]]:h-svh has-data-[layout=fixed]:h-svh",
|
|
11768
13434
|
"peer-data-[variant=inset]:has-data-[layout=fixed]:h-[calc(100svh-(var(--spacing)*4))]"
|
|
11769
13435
|
),
|
|
11770
|
-
children: showInlineNotFound ? /* @__PURE__ */
|
|
13436
|
+
children: showInlineNotFound ? /* @__PURE__ */ jsx119(
|
|
11771
13437
|
NotFoundError,
|
|
11772
13438
|
{
|
|
11773
13439
|
embedded: true,
|
|
@@ -11779,24 +13445,24 @@ function AuthenticatedLayoutContent({ children }) {
|
|
|
11779
13445
|
] });
|
|
11780
13446
|
}
|
|
11781
13447
|
function AuthenticatedLayout({ children }) {
|
|
11782
|
-
const [defaultOpen, setDefaultOpen] =
|
|
11783
|
-
const [isMounted, setIsMounted] =
|
|
11784
|
-
|
|
13448
|
+
const [defaultOpen, setDefaultOpen] = useState16(true);
|
|
13449
|
+
const [isMounted, setIsMounted] = useState16(false);
|
|
13450
|
+
useEffect16(() => {
|
|
11785
13451
|
setDefaultOpen(getCookie("sidebar_state") !== "false");
|
|
11786
13452
|
setIsMounted(true);
|
|
11787
13453
|
}, []);
|
|
11788
13454
|
if (!isMounted) {
|
|
11789
13455
|
return null;
|
|
11790
13456
|
}
|
|
11791
|
-
return /* @__PURE__ */
|
|
13457
|
+
return /* @__PURE__ */ jsx119(SearchProvider, { children: /* @__PURE__ */ jsx119(LayoutProvider, { children: /* @__PURE__ */ jsx119(SidebarProvider, { defaultOpen, children: /* @__PURE__ */ jsx119(AuthenticatedLayoutContent, { children }) }) }) });
|
|
11792
13458
|
}
|
|
11793
13459
|
|
|
11794
13460
|
// src/design-system/templates/header.tsx
|
|
11795
|
-
import { useEffect as
|
|
11796
|
-
import { jsx as
|
|
13461
|
+
import { useEffect as useEffect17, useState as useState17 } from "react";
|
|
13462
|
+
import { jsx as jsx120, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
11797
13463
|
function Header2({ className, fixed, children, ...props }) {
|
|
11798
|
-
const [offset, setOffset] =
|
|
11799
|
-
|
|
13464
|
+
const [offset, setOffset] = useState17(0);
|
|
13465
|
+
useEffect17(() => {
|
|
11800
13466
|
const onScroll = () => {
|
|
11801
13467
|
setOffset(document.body.scrollTop || document.documentElement.scrollTop);
|
|
11802
13468
|
};
|
|
@@ -11805,7 +13471,7 @@ function Header2({ className, fixed, children, ...props }) {
|
|
|
11805
13471
|
}, []);
|
|
11806
13472
|
return (
|
|
11807
13473
|
// Page header container: fixed mode me top par sticky behavior deta hai.
|
|
11808
|
-
/* @__PURE__ */
|
|
13474
|
+
/* @__PURE__ */ jsx120(
|
|
11809
13475
|
"header",
|
|
11810
13476
|
{
|
|
11811
13477
|
className: cn(
|
|
@@ -11815,7 +13481,7 @@ function Header2({ className, fixed, children, ...props }) {
|
|
|
11815
13481
|
className
|
|
11816
13482
|
),
|
|
11817
13483
|
...props,
|
|
11818
|
-
children: /* @__PURE__ */
|
|
13484
|
+
children: /* @__PURE__ */ jsxs78(
|
|
11819
13485
|
"div",
|
|
11820
13486
|
{
|
|
11821
13487
|
className: cn(
|
|
@@ -11824,7 +13490,7 @@ function Header2({ className, fixed, children, ...props }) {
|
|
|
11824
13490
|
offset > 10 && fixed && "after:absolute after:inset-0 after:-z-10 after:bg-background/20 after:backdrop-blur-lg"
|
|
11825
13491
|
),
|
|
11826
13492
|
children: [
|
|
11827
|
-
/* @__PURE__ */
|
|
13493
|
+
/* @__PURE__ */ jsx120(AppLogo, { className: "shrink-0 md:hidden" }),
|
|
11828
13494
|
children
|
|
11829
13495
|
]
|
|
11830
13496
|
}
|
|
@@ -11835,9 +13501,9 @@ function Header2({ className, fixed, children, ...props }) {
|
|
|
11835
13501
|
}
|
|
11836
13502
|
|
|
11837
13503
|
// src/design-system/templates/main.tsx
|
|
11838
|
-
import { jsx as
|
|
13504
|
+
import { jsx as jsx121 } from "react/jsx-runtime";
|
|
11839
13505
|
function Main({ fixed, className, fluid, ...props }) {
|
|
11840
|
-
return /* @__PURE__ */
|
|
13506
|
+
return /* @__PURE__ */ jsx121(
|
|
11841
13507
|
"main",
|
|
11842
13508
|
{
|
|
11843
13509
|
"data-layout": fixed ? "fixed" : "auto",
|
|
@@ -11856,20 +13522,20 @@ function Main({ fixed, className, fluid, ...props }) {
|
|
|
11856
13522
|
|
|
11857
13523
|
// src/design-system/templates/sidebar-search.tsx
|
|
11858
13524
|
import { SearchIcon as SearchIcon7 } from "lucide-react";
|
|
11859
|
-
import { jsx as
|
|
13525
|
+
import { jsx as jsx122, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
11860
13526
|
function SidebarSearch() {
|
|
11861
13527
|
const { setOpen } = useSearch();
|
|
11862
|
-
return /* @__PURE__ */
|
|
13528
|
+
return /* @__PURE__ */ jsx122(SidebarMenu, { children: /* @__PURE__ */ jsx122(SidebarMenuItem, { children: /* @__PURE__ */ jsxs79(
|
|
11863
13529
|
SidebarMenuButton,
|
|
11864
13530
|
{
|
|
11865
13531
|
onClick: () => setOpen(true),
|
|
11866
13532
|
tooltip: "Search (\u2318K)",
|
|
11867
13533
|
className: "bg-sidebar-accent/50 hover:bg-sidebar-accent border border-sidebar-border/60 text-muted-foreground hover:text-foreground",
|
|
11868
13534
|
children: [
|
|
11869
|
-
/* @__PURE__ */
|
|
11870
|
-
/* @__PURE__ */
|
|
11871
|
-
/* @__PURE__ */
|
|
11872
|
-
/* @__PURE__ */
|
|
13535
|
+
/* @__PURE__ */ jsx122(SearchIcon7, { className: "size-4 shrink-0" }),
|
|
13536
|
+
/* @__PURE__ */ jsx122("span", { className: "flex-1 text-left text-xs font-normal group-data-[collapsible=icon]:hidden", children: "Search..." }),
|
|
13537
|
+
/* @__PURE__ */ jsxs79("kbd", { className: "pointer-events-none hidden h-4 select-none items-center gap-0.5 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 group-data-[collapsible=icon]:hidden sm:flex", children: [
|
|
13538
|
+
/* @__PURE__ */ jsx122("span", { className: "text-[10px]", children: "\u2318" }),
|
|
11873
13539
|
"K"
|
|
11874
13540
|
] })
|
|
11875
13541
|
]
|
|
@@ -11880,7 +13546,7 @@ function SidebarSearch() {
|
|
|
11880
13546
|
// src/design-system/templates/top-nav.tsx
|
|
11881
13547
|
import Link7 from "next/link";
|
|
11882
13548
|
import { Menu as Menu2 } from "lucide-react";
|
|
11883
|
-
import { Fragment as
|
|
13549
|
+
import { Fragment as Fragment7, jsx as jsx123, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
11884
13550
|
function TopNav({ className, links, ...props }) {
|
|
11885
13551
|
const renderLink = ({
|
|
11886
13552
|
title,
|
|
@@ -11891,7 +13557,7 @@ function TopNav({ className, links, ...props }) {
|
|
|
11891
13557
|
}) => {
|
|
11892
13558
|
const className2 = `text-sm font-medium transition-colors hover:text-primary ${isActive ? "" : "text-muted-foreground"}`;
|
|
11893
13559
|
if (onClick) {
|
|
11894
|
-
return /* @__PURE__ */
|
|
13560
|
+
return /* @__PURE__ */ jsx123(
|
|
11895
13561
|
"button",
|
|
11896
13562
|
{
|
|
11897
13563
|
type: "button",
|
|
@@ -11903,7 +13569,7 @@ function TopNav({ className, links, ...props }) {
|
|
|
11903
13569
|
title
|
|
11904
13570
|
);
|
|
11905
13571
|
}
|
|
11906
|
-
return /* @__PURE__ */
|
|
13572
|
+
return /* @__PURE__ */ jsx123(
|
|
11907
13573
|
Link7,
|
|
11908
13574
|
{
|
|
11909
13575
|
href,
|
|
@@ -11914,9 +13580,9 @@ function TopNav({ className, links, ...props }) {
|
|
|
11914
13580
|
title
|
|
11915
13581
|
);
|
|
11916
13582
|
};
|
|
11917
|
-
return /* @__PURE__ */
|
|
11918
|
-
/* @__PURE__ */
|
|
11919
|
-
/* @__PURE__ */
|
|
13583
|
+
return /* @__PURE__ */ jsxs80(Fragment7, { children: [
|
|
13584
|
+
/* @__PURE__ */ jsxs80(DropdownMenu, { modal: false, children: [
|
|
13585
|
+
/* @__PURE__ */ jsx123(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs80(
|
|
11920
13586
|
Button,
|
|
11921
13587
|
{
|
|
11922
13588
|
size: "icon",
|
|
@@ -11926,18 +13592,18 @@ function TopNav({ className, links, ...props }) {
|
|
|
11926
13592
|
className
|
|
11927
13593
|
),
|
|
11928
13594
|
children: [
|
|
11929
|
-
/* @__PURE__ */
|
|
11930
|
-
/* @__PURE__ */
|
|
13595
|
+
/* @__PURE__ */ jsx123(Menu2, {}),
|
|
13596
|
+
/* @__PURE__ */ jsx123("span", { className: "sr-only", children: "Toggle navigation menu" })
|
|
11931
13597
|
]
|
|
11932
13598
|
}
|
|
11933
13599
|
) }),
|
|
11934
|
-
/* @__PURE__ */
|
|
13600
|
+
/* @__PURE__ */ jsx123(DropdownMenuContent, { side: "bottom", align: "start", children: links.map((link) => /* @__PURE__ */ jsx123(
|
|
11935
13601
|
DropdownMenuItem,
|
|
11936
13602
|
{
|
|
11937
13603
|
disabled: link.disabled,
|
|
11938
13604
|
onClick: link.onClick,
|
|
11939
13605
|
asChild: !link.onClick,
|
|
11940
|
-
children: link.onClick ? /* @__PURE__ */
|
|
13606
|
+
children: link.onClick ? /* @__PURE__ */ jsx123("span", { className: !link.isActive ? "text-muted-foreground" : "", children: link.title }) : /* @__PURE__ */ jsx123(
|
|
11941
13607
|
Link7,
|
|
11942
13608
|
{
|
|
11943
13609
|
href: link.href,
|
|
@@ -11950,7 +13616,7 @@ function TopNav({ className, links, ...props }) {
|
|
|
11950
13616
|
link.title
|
|
11951
13617
|
)) })
|
|
11952
13618
|
] }),
|
|
11953
|
-
/* @__PURE__ */
|
|
13619
|
+
/* @__PURE__ */ jsx123(
|
|
11954
13620
|
"nav",
|
|
11955
13621
|
{
|
|
11956
13622
|
className: cn(
|
|
@@ -11968,7 +13634,13 @@ export {
|
|
|
11968
13634
|
AccordionContent,
|
|
11969
13635
|
AccordionItem,
|
|
11970
13636
|
AccordionTrigger,
|
|
11971
|
-
|
|
13637
|
+
AiChatHeader,
|
|
13638
|
+
AiChatInput,
|
|
13639
|
+
AiMessageBubble,
|
|
13640
|
+
AiMessageList,
|
|
13641
|
+
AiModelSelector,
|
|
13642
|
+
AiPromptSuggestions,
|
|
13643
|
+
AiToolSelector,
|
|
11972
13644
|
Alert,
|
|
11973
13645
|
AlertDescription,
|
|
11974
13646
|
AlertDialog,
|
|
@@ -12032,9 +13704,12 @@ export {
|
|
|
12032
13704
|
ChartTooltip,
|
|
12033
13705
|
ChartTooltipContent,
|
|
12034
13706
|
ChatBubble,
|
|
13707
|
+
ChatCardItem,
|
|
12035
13708
|
ChatEmptyState,
|
|
12036
13709
|
ChatHeader,
|
|
12037
13710
|
ChatInput,
|
|
13711
|
+
ChatMessageList,
|
|
13712
|
+
ChatSidebar,
|
|
12038
13713
|
Checkbox,
|
|
12039
13714
|
Collapsible,
|
|
12040
13715
|
CollapsibleContent,
|
|
@@ -12049,6 +13724,7 @@ export {
|
|
|
12049
13724
|
CommandSeparator,
|
|
12050
13725
|
CommandShortcut,
|
|
12051
13726
|
ConfirmDialog,
|
|
13727
|
+
ContactManager,
|
|
12052
13728
|
ContextMenu,
|
|
12053
13729
|
ContextMenuCheckboxItem,
|
|
12054
13730
|
ContextMenuContent,
|
|
@@ -12064,6 +13740,9 @@ export {
|
|
|
12064
13740
|
ContextMenuSubContent,
|
|
12065
13741
|
ContextMenuSubTrigger,
|
|
12066
13742
|
ContextMenuTrigger,
|
|
13743
|
+
DEFAULT_AI_MODELS,
|
|
13744
|
+
DEFAULT_AI_PROMPTS,
|
|
13745
|
+
DEFAULT_AI_TOOLS,
|
|
12067
13746
|
DashboardTemplate,
|
|
12068
13747
|
DataTable,
|
|
12069
13748
|
DatePicker2 as DatePicker,
|
|
@@ -12129,6 +13808,7 @@ export {
|
|
|
12129
13808
|
FormMessage,
|
|
12130
13809
|
FormSection,
|
|
12131
13810
|
FormTemplate,
|
|
13811
|
+
GroupManager,
|
|
12132
13812
|
Header2 as Header,
|
|
12133
13813
|
HoverCard,
|
|
12134
13814
|
HoverCardContent,
|