@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.js
CHANGED
|
@@ -7645,6 +7645,10 @@ var statusToneClasses = {
|
|
|
7645
7645
|
info: "bg-primary/10 text-primary border-primary/20",
|
|
7646
7646
|
neutral: "bg-muted text-muted-foreground border-border"
|
|
7647
7647
|
};
|
|
7648
|
+
var roomTypeIconClasses = {
|
|
7649
|
+
client_agent: "bg-blue-500/10 text-blue-600 dark:text-blue-400",
|
|
7650
|
+
dealer_agent: "bg-emerald-500/10 text-emerald-600 dark:text-emerald-400"
|
|
7651
|
+
};
|
|
7648
7652
|
function ChatSidebar({
|
|
7649
7653
|
currentUserId,
|
|
7650
7654
|
config,
|
|
@@ -7760,7 +7764,7 @@ function ChatSidebar({
|
|
|
7760
7764
|
{
|
|
7761
7765
|
className: "rounded-lg border bg-card shadow-sm",
|
|
7762
7766
|
children: [
|
|
7763
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2 border-b px-3 py-2.5", children: [
|
|
7767
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2 border-b bg-muted/40 px-3 py-2.5", children: [
|
|
7764
7768
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
7765
7769
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
7766
7770
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground truncate", children: conv.caseNumber }),
|
|
@@ -7785,25 +7789,36 @@ function ChatSidebar({
|
|
|
7785
7789
|
}
|
|
7786
7790
|
)
|
|
7787
7791
|
] }),
|
|
7788
|
-
/* @__PURE__ */ jsx("div", { className: "divide-y", children: conv.rooms.map((room) => {
|
|
7792
|
+
/* @__PURE__ */ jsx("div", { className: "ml-1 divide-y", children: conv.rooms.map((room) => {
|
|
7789
7793
|
const RoomIcon = room.type === "dealer_agent" ? Store : User;
|
|
7790
7794
|
const unread = room.unreadCount ?? 0;
|
|
7795
|
+
const iconClasses = roomTypeIconClasses[room.type] ?? "bg-muted text-muted-foreground";
|
|
7791
7796
|
return /* @__PURE__ */ jsxs(
|
|
7792
7797
|
"button",
|
|
7793
7798
|
{
|
|
7794
7799
|
type: "button",
|
|
7795
7800
|
onClick: () => selectRoom(room.id, conv.caseId),
|
|
7796
7801
|
className: cn(
|
|
7797
|
-
"flex w-full items-center gap-2.5
|
|
7802
|
+
"flex w-full items-center gap-2.5 py-2.5 pl-4 pr-3 text-left transition-colors hover:bg-accent/60",
|
|
7798
7803
|
activeRoomId === room.id && "bg-accent"
|
|
7799
7804
|
),
|
|
7800
7805
|
children: [
|
|
7801
|
-
/* @__PURE__ */ jsx(
|
|
7806
|
+
/* @__PURE__ */ jsx(
|
|
7807
|
+
"div",
|
|
7808
|
+
{
|
|
7809
|
+
className: cn(
|
|
7810
|
+
"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full",
|
|
7811
|
+
iconClasses
|
|
7812
|
+
),
|
|
7813
|
+
children: /* @__PURE__ */ jsx(RoomIcon, { className: "h-3.5 w-3.5" })
|
|
7814
|
+
}
|
|
7815
|
+
),
|
|
7802
7816
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
7803
7817
|
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium truncate", children: getRoomTypeLabel(room.type) }),
|
|
7804
7818
|
/* @__PURE__ */ jsx("p", { className: "text-[11px] text-muted-foreground", children: room.lastMessageAt ? formatRelativeTime(room.lastMessageAt) : labels.noMessagesShort ?? "No messages" })
|
|
7805
7819
|
] }),
|
|
7806
|
-
unread > 0 && /* @__PURE__ */ 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 })
|
|
7820
|
+
unread > 0 && /* @__PURE__ */ 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 }),
|
|
7821
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4 flex-shrink-0 text-muted-foreground" })
|
|
7807
7822
|
]
|
|
7808
7823
|
},
|
|
7809
7824
|
room.id
|