@banbox/chat 1.0.1 → 1.0.3
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 +566 -576
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -41
- package/dist/index.d.ts +43 -41
- package/dist/index.js +488 -499
- package/dist/index.js.map +1 -1
- package/package.json +7 -3
- package/src/chat/InboxPopup.tsx +51 -46
- package/src/chat/SinglePopup.tsx +47 -58
- package/src/lottie/banbox-chat-globe.json +1 -0
- package/src/ui/chat/AttachmentPreviewStrip.tsx +63 -112
- package/src/ui/chat/ChatComposerBar.tsx +22 -38
- package/src/ui/chat/ChatFooter.tsx +1 -1
- package/src/ui/chat/ChatIdentity.tsx +152 -145
- package/src/ui/chat/ChatListHeader.tsx +60 -83
- package/src/ui/chat/ChatMessageItem.tsx +193 -214
- package/src/ui/chat/ChatThreadItem.tsx +133 -140
- package/src/ui/chat/MessageHoverActions.tsx +136 -120
- package/src/ui/chat/TypingIndicator.tsx +27 -43
- package/src/ui/chat/drop-up/BusinessCardDropup.tsx +9 -1
- package/src/ui/chat/types.ts +42 -37
|
@@ -149,7 +149,7 @@ const BusinessCardDropup = ({
|
|
|
149
149
|
role="dialog"
|
|
150
150
|
aria-label="Business card"
|
|
151
151
|
className={cn(
|
|
152
|
-
"
|
|
152
|
+
"relative rounded-[12px] border border-[#EFEFEF] bg-white",
|
|
153
153
|
"p-3 shadow-[0_8px_24px_rgba(0,0,0,0.12)]",
|
|
154
154
|
className,
|
|
155
155
|
)}
|
|
@@ -158,6 +158,7 @@ const BusinessCardDropup = ({
|
|
|
158
158
|
left: pos?.left ?? -9999,
|
|
159
159
|
top: pos?.top ?? -9999,
|
|
160
160
|
position: "fixed",
|
|
161
|
+
zIndex: 99999, // Must use inline style — Tailwind z-9999 is not a valid preset class
|
|
161
162
|
}}
|
|
162
163
|
>
|
|
163
164
|
{/* Header */}
|
|
@@ -190,6 +191,13 @@ const BusinessCardDropup = ({
|
|
|
190
191
|
<div className="h-px w-[105px] bg-black" />
|
|
191
192
|
|
|
192
193
|
<div className="mt-[6px] flex items-center gap-2">
|
|
194
|
+
<img
|
|
195
|
+
src="https://flagcdn.com/bd.svg"
|
|
196
|
+
alt="Bangladesh flag"
|
|
197
|
+
width={24}
|
|
198
|
+
height={14}
|
|
199
|
+
className="h-[14px] w-6 rounded-xs object-cover"
|
|
200
|
+
/>
|
|
193
201
|
<span className="text-xs font-medium text-[#636363]">
|
|
194
202
|
{form.country}
|
|
195
203
|
</span>
|
package/src/ui/chat/types.ts
CHANGED
|
@@ -1,37 +1,42 @@
|
|
|
1
|
-
// components/chat/ui/chat/types.ts
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
// components/chat/ui/chat/types.ts
|
|
2
|
+
import type { MessageAudio, MessageFile } from "../../types";
|
|
3
|
+
|
|
4
|
+
// Re-export global types so UI components can import from this local file
|
|
5
|
+
export type { MessageAudio as ChatAudio, MessageFile as ChatFile };
|
|
6
|
+
|
|
7
|
+
export type MessageRef = {
|
|
8
|
+
id: string;
|
|
9
|
+
author: string | { name: string };
|
|
10
|
+
time?: string;
|
|
11
|
+
text?: string;
|
|
12
|
+
images?: string[];
|
|
13
|
+
files?: MessageFile[];
|
|
14
|
+
audio?: MessageAudio;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type BusinessCard = {
|
|
18
|
+
avatarSrc?: string;
|
|
19
|
+
name: string;
|
|
20
|
+
country?: string;
|
|
21
|
+
flag?: string;
|
|
22
|
+
company?: string;
|
|
23
|
+
email?: string;
|
|
24
|
+
phone?: string;
|
|
25
|
+
[key: string]: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type AddressCard = {
|
|
29
|
+
name?: string;
|
|
30
|
+
label?: string;
|
|
31
|
+
businessName?: string;
|
|
32
|
+
mobileNumber?: string;
|
|
33
|
+
country?: string;
|
|
34
|
+
district?: string | null;
|
|
35
|
+
policeStation?: string | null;
|
|
36
|
+
state?: string | null;
|
|
37
|
+
city?: string | null;
|
|
38
|
+
postalCode?: string;
|
|
39
|
+
addressLine?: string;
|
|
40
|
+
landMark?: string | null;
|
|
41
|
+
[key: string]: string | null | undefined;
|
|
42
|
+
};
|