@banbox/chat 1.0.1 → 1.0.2

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.
@@ -149,7 +149,7 @@ const BusinessCardDropup = ({
149
149
  role="dialog"
150
150
  aria-label="Business card"
151
151
  className={cn(
152
- "z-9999 relative rounded-[12px] border border-[#EFEFEF] bg-white",
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>
@@ -1,37 +1,42 @@
1
- // components/chat/ui/chat/types.ts
2
- import type { ChatAudio, ChatFile } from "./ChatMessageItem";
3
-
4
- export type MessageRef = {
5
- id: string;
6
- author: string | { name: string };
7
- time?: string;
8
- text?: string;
9
- images?: string[];
10
- files?: ChatFile[];
11
- audio?: ChatAudio;
12
- };
13
-
14
- export type BusinessCard = {
15
- avatarSrc: string;
16
- name: string;
17
- country: string; // e.g. "Bangladesh"
18
- flag?: string; // emoji or small image URL; default 🏳️ if not given
19
- company: string;
20
- email: string;
21
- phone: string;
22
- };
23
-
24
- export type AddressCard = {
25
- name: string;
26
- label?: "Home" | "Office";
27
- businessName?: string;
28
- mobileNumber: string;
29
- country: string;
30
- district?: string | null;
31
- policeStation?: string | null;
32
- state?: string | null;
33
- city?: string | null;
34
- postalCode?: string;
35
- addressLine: string;
36
- landMark?: string | null;
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
+ };