@algenium/blocks 1.17.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +20 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7678,6 +7678,10 @@ var statusToneClasses = {
|
|
|
7678
7678
|
info: "bg-primary/10 text-primary border-primary/20",
|
|
7679
7679
|
neutral: "bg-muted text-muted-foreground border-border"
|
|
7680
7680
|
};
|
|
7681
|
+
var roomTypeIconClasses = {
|
|
7682
|
+
client_agent: "bg-blue-500/10 text-blue-600 dark:text-blue-400",
|
|
7683
|
+
dealer_agent: "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400"
|
|
7684
|
+
};
|
|
7681
7685
|
function ChatSidebar({
|
|
7682
7686
|
currentUserId,
|
|
7683
7687
|
config,
|
|
@@ -7793,7 +7797,7 @@ function ChatSidebar({
|
|
|
7793
7797
|
{
|
|
7794
7798
|
className: "rounded-lg border bg-card shadow-sm",
|
|
7795
7799
|
children: [
|
|
7796
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-2 border-b px-3 py-2.5", children: [
|
|
7800
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-2 border-b bg-muted/40 px-3 py-2.5", children: [
|
|
7797
7801
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
7798
7802
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
7799
7803
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground truncate", children: conv.caseNumber }),
|
|
@@ -7818,25 +7822,36 @@ function ChatSidebar({
|
|
|
7818
7822
|
}
|
|
7819
7823
|
)
|
|
7820
7824
|
] }),
|
|
7821
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "divide-y", children: conv.rooms.map((room) => {
|
|
7825
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-1 divide-y", children: conv.rooms.map((room) => {
|
|
7822
7826
|
const RoomIcon = room.type === "dealer_agent" ? lucideReact.Store : lucideReact.User;
|
|
7823
7827
|
const unread = room.unreadCount ?? 0;
|
|
7828
|
+
const iconClasses = roomTypeIconClasses[room.type] ?? "bg-muted text-muted-foreground";
|
|
7824
7829
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7825
7830
|
"button",
|
|
7826
7831
|
{
|
|
7827
7832
|
type: "button",
|
|
7828
7833
|
onClick: () => selectRoom(room.id, conv.caseId),
|
|
7829
7834
|
className: cn(
|
|
7830
|
-
"flex w-full items-center gap-2.5
|
|
7835
|
+
"flex w-full items-center gap-2.5 py-2.5 pl-4 pr-3 text-left transition-colors hover:bg-accent/60",
|
|
7831
7836
|
activeRoomId === room.id && "bg-accent"
|
|
7832
7837
|
),
|
|
7833
7838
|
children: [
|
|
7834
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7839
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7840
|
+
"div",
|
|
7841
|
+
{
|
|
7842
|
+
className: cn(
|
|
7843
|
+
"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full",
|
|
7844
|
+
iconClasses
|
|
7845
|
+
),
|
|
7846
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(RoomIcon, { className: "h-3.5 w-3.5" })
|
|
7847
|
+
}
|
|
7848
|
+
),
|
|
7835
7849
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
7836
7850
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium truncate", children: getRoomTypeLabel(room.type) }),
|
|
7837
7851
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[11px] text-muted-foreground", children: room.lastMessageAt ? formatRelativeTime(room.lastMessageAt) : labels.noMessagesShort ?? "No messages" })
|
|
7838
7852
|
] }),
|
|
7839
|
-
unread > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-5 min-w-5 flex-shrink-0 items-center justify-center rounded-full bg-primary px-1.5 text-[10px] font-semibold text-primary-foreground", children: unread > 99 ? "99+" : unread })
|
|
7853
|
+
unread > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-5 min-w-5 flex-shrink-0 items-center justify-center rounded-full bg-primary px-1.5 text-[10px] font-semibold text-primary-foreground", children: unread > 99 ? "99+" : unread }),
|
|
7854
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4 flex-shrink-0 text-muted-foreground" })
|
|
7840
7855
|
]
|
|
7841
7856
|
},
|
|
7842
7857
|
room.id
|