mr-chat-bird 1.0.12 → 1.0.14

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.css CHANGED
@@ -41,25 +41,26 @@
41
41
  margin: 0 4px 0 3px;
42
42
  }
43
43
  .mrchat-mainActionEmojiIcon svg {
44
- padding: 2.3px;
44
+ padding: 2px;
45
+ color: var(--mantine-color-text);
45
46
  }
46
- .mrchat-mainActionAddIcon svg,
47
- .mrchat-mainTextFormatIcon svg,
48
- .mrchat-mainActionEmojiIcon svg {
49
- fill: #495057;
47
+ .mrchat-mainActionAddIcon svg {
48
+ color: var(--mantine-color-text);
50
49
  }
51
50
  .mrchat-mainTextFormatIcon svg {
52
51
  position: relative;
53
52
  top: 1.2px;
53
+ padding: 0.7px;
54
+ color: var(--mantine-color-text);
54
55
  }
55
56
  .mrchat-mainSendMsgIcon {
56
57
  position: absolute;
57
58
  right: 6px;
58
59
  }
59
60
  .mrchat-customToolActionItem {
60
- background-color: var(--mantine-color-white);
61
- border-color: var(--mantine-color-gray-4);
62
- color: var(--mantine-color-gray-7);
61
+ background-color: var(--mantine-color-body);
62
+ border-color: var(--mantine-color-default-border);
63
+ color: var(--mantine-color-text);
63
64
  border-radius: 0px;
64
65
  height: 26px;
65
66
  min-height: 26px;
@@ -77,6 +78,9 @@
77
78
  display: none;
78
79
  }
79
80
  }
81
+ :where([data-mantine-color-scheme=dark]) .mantine-RichTextEditor-control {
82
+ background-color: var(--mantine-color-body);
83
+ }
80
84
 
81
85
  /* src/components/UserProfile/UserProfileDrawer.css */
82
86
  .mrchat-overlay {
@@ -92,7 +96,8 @@
92
96
  width: 100%;
93
97
  max-width: 400px;
94
98
  height: 100%;
95
- background: #fff;
99
+ background: var(--mantine-color-body);
100
+ color: var(--mantine-color-text);
96
101
  display: flex;
97
102
  flex-direction: column;
98
103
  }
@@ -124,16 +129,17 @@
124
129
  align-items: center;
125
130
  gap: 15px;
126
131
  padding: 0 16px;
127
- border-bottom: 1px solid #eee;
132
+ border-bottom: 1px solid var(--mantine-color-default-border);
128
133
  }
129
134
  .mrchat-backBtn {
130
135
  cursor: pointer;
131
136
  display: flex;
132
137
  align-items: center;
138
+ color: var(--mantine-color-text);
133
139
  }
134
140
  .mrchat-profileSection {
135
141
  padding: 30px 20px;
136
- border-bottom: 1px solid #f0f0f0;
142
+ border-bottom: 1px solid var(--mantine-color-default-border);
137
143
  display: flex;
138
144
  flex-direction: column;
139
145
  align-items: center;
@@ -149,15 +155,16 @@
149
155
  padding: 14px;
150
156
  border-radius: 10px;
151
157
  cursor: pointer;
158
+ color: var(--mantine-color-text);
152
159
  }
153
160
  .mrchat-item:hover {
154
- background: #f5f5f5;
161
+ background: var(--mantine-color-default-hover);
155
162
  }
156
163
  .mrchat-itemDanger {
157
- color: #fa5252;
164
+ color: var(--mantine-color-red-filled);
158
165
  }
159
166
  .mrchat-itemDanger:hover {
160
- background: rgba(250, 82, 82, 0.1);
167
+ background-color: color-mix(in srgb, var(--mantine-color-red-filled) 12%, transparent);
161
168
  }
162
169
  .mrchat-imagePreview {
163
170
  position: fixed;
@@ -179,31 +186,34 @@
179
186
  display: flex;
180
187
  flex-direction: column;
181
188
  align-items: center;
182
- height: 100vh;
183
- background: #f1f3f5;
189
+ min-height: 500px;
190
+ height: 100%;
191
+ flex: 1;
192
+ background-color: var(--mantine-color-body);
193
+ color: var(--mantine-color-text);
184
194
  }
185
195
  .mrchat-chatContainer {
186
196
  display: flex;
187
197
  width: 100%;
188
198
  max-width: 1260px;
189
- background: white;
190
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
191
- border-radius: 8px;
199
+ min-height: 500px;
200
+ height: 100%;
201
+ flex: 1;
192
202
  overflow: hidden;
203
+ border-radius: 8px;
204
+ background-color: var(--mantine-color-body);
205
+ border: 1px solid color-mix(in srgb, var(--mantine-color-text) 12%, transparent);
193
206
  }
194
207
  .mrchat-sidebar {
195
208
  width: 280px;
196
209
  display: flex;
197
210
  flex-direction: column;
198
- height: 100vh;
199
- border-right: 1px solid #eee;
200
- background-color: #fff;
211
+ min-height: 0;
212
+ height: 100%;
213
+ flex-shrink: 0;
214
+ border-right: 1px solid color-mix(in srgb, var(--mantine-color-text) 12%, transparent);
201
215
  padding-top: 12px;
202
- }
203
- @media (max-width: 760px) {
204
- .mrchat-sidebar {
205
- width: 180px;
206
- }
216
+ background-color: var(--mantine-color-body);
207
217
  }
208
218
  .mrchat-sidebarTop {
209
219
  padding: 0 12px;
@@ -221,11 +231,20 @@
221
231
  .mrchat-scrollWrapper {
222
232
  flex: 1;
223
233
  min-height: 0;
224
- overflow: hidden;
234
+ height: 100%;
235
+ overflow-y: auto;
236
+ }
237
+ .mrchat-mainAreaWrapper {
238
+ flex: 1;
239
+ display: flex;
240
+ min-height: 0;
241
+ }
242
+ .mrchat-hiddenOnMobile {
243
+ display: none !important;
225
244
  }
226
245
  .mrchat-scrollArea {
227
246
  flex: 1;
228
- height: 100%;
247
+ min-height: 0;
229
248
  overflow-y: auto;
230
249
  }
231
250
  .mrchat-scrollArea .mantine-ScrollArea-content {
@@ -241,12 +260,14 @@
241
260
  flex: 1;
242
261
  display: flex;
243
262
  flex-direction: column;
263
+ min-height: 0;
244
264
  }
245
265
  .mrchat-messageArea {
246
266
  flex: 1;
247
267
  padding: 16px;
248
268
  overflow-y: auto;
249
269
  padding-bottom: 10px;
270
+ min-height: 0;
250
271
  }
251
272
  .mrchat-messageBubble {
252
273
  max-width: fit-content;
@@ -255,19 +276,42 @@
255
276
  position: relative;
256
277
  }
257
278
  .mrchat-outgoing {
258
- color: white;
259
- background-color: #366ca4;
279
+ color: var(--mantine-color-white);
280
+ background-color: var(--mantine-primary-color-filled);
260
281
  margin-left: auto;
261
282
  }
262
283
  .mrchat-incoming {
263
- background-color: #eeeeee;
284
+ background-color: var(--mantine-color-default-hover);
285
+ color: var(--mantine-color-text);
264
286
  margin-right: auto;
265
287
  }
266
288
  .mrchat-inputBar {
267
289
  display: flex;
268
290
  align-items: end;
269
291
  gap: 8px;
270
- padding: 0px 16px 16px;
292
+ padding: 0px 12px 12px;
293
+ }
294
+ @media (max-width: 599px) {
295
+ .mrchat-chatContainer {
296
+ flex-direction: column;
297
+ min-height: 100%;
298
+ }
299
+ .mrchat-sidebar {
300
+ width: 100%;
301
+ height: 100%;
302
+ border-right: none;
303
+ border-bottom: 1px solid color-mix(in srgb, var(--mantine-color-text) 12%, transparent);
304
+ border-radius: 0;
305
+ }
306
+ .mrchat-chatItem {
307
+ margin: 2px 0;
308
+ }
309
+ .mrchat-messageArea {
310
+ padding: 12px;
311
+ }
312
+ .mrchat-mainArea {
313
+ min-height: calc(100vh - 74px);
314
+ }
271
315
  }
272
316
  .mrchat-chatItem {
273
317
  display: flex;
@@ -278,24 +322,28 @@
278
322
  transition: background 0.2s;
279
323
  margin: 2px 4px;
280
324
  border-radius: 6px;
325
+ color: var(--mantine-color-text);
281
326
  }
282
327
  .mrchat-chatItem:hover {
283
- background-color: #f6f6f6;
328
+ background-color: var(--mantine-color-default-hover);
284
329
  }
285
330
  .mrchat-chatLabelItem {
286
331
  font-size: 15px;
287
332
  }
288
333
  .mrchat-chatHeader {
289
334
  display: flex;
290
- justify-content: space-between;
335
+ justify-content: flex-start;
291
336
  align-items: center;
292
337
  padding: 12px 16px;
293
- border-bottom: 1px solid #eee;
294
- background-color: #f8f9fa;
338
+ border-bottom: 1px solid color-mix(in srgb, var(--mantine-color-text) 12%, transparent);
295
339
  position: sticky;
296
340
  top: 0;
297
341
  z-index: 2;
298
342
  min-height: 63px;
343
+ gap: 10px;
344
+ }
345
+ .mrchat-backButton {
346
+ padding: 4px;
299
347
  }
300
348
  .mrchat-receiverInfo {
301
349
  display: flex;
@@ -315,13 +363,12 @@
315
363
  gap: 6px;
316
364
  padding: 6px 10px;
317
365
  border-radius: 12px;
318
- background: rgba(0, 0, 0, 0.04);
319
- color: #666;
366
+ background: var(--mantine-color-default-hover);
367
+ color: var(--mantine-color-dimmed);
320
368
  font-size: 12px;
321
369
  }
322
370
  .mrchat-encryptionText {
323
371
  font-size: 16px;
324
- color: #666;
325
372
  margin-left: 3px;
326
373
  }
327
374
  .mrchat-messageContent {
@@ -335,10 +382,10 @@
335
382
  padding: 0;
336
383
  }
337
384
  .mrchat-activeChatItem {
338
- background-color: #eee;
385
+ background-color: var(--mantine-color-default-hover);
339
386
  }
340
387
  .mrchat-chatItem:hover {
341
- background-color: #eee;
388
+ background-color: var(--mantine-color-default-hover);
342
389
  }
343
390
  .mrchat-messageTime {
344
391
  font-size: 11px;
@@ -372,8 +419,8 @@
372
419
  right: 0;
373
420
  }
374
421
  .mrchat-unreadBadge {
375
- background: #366ca4;
376
- color: white;
422
+ background: var(--mantine-primary-color-filled);
423
+ color: var(--mantine-color-white);
377
424
  font-size: 10px;
378
425
  border-radius: 50%;
379
426
  padding: 3px 5px;
package/dist/index.d.mts CHANGED
@@ -1,5 +1,19 @@
1
1
  import React from 'react';
2
2
 
3
- declare function MrChat(props: any): React.JSX.Element;
3
+ type UserData = {
4
+ userId: string;
5
+ username: string;
6
+ displayName?: string;
7
+ avatar?: string;
8
+ };
9
+ type ChatUserListProps = {
10
+ currentUser?: UserData;
11
+ onSearchUsers?: (query: string) => UserData[] | Promise<UserData[]>;
12
+ colorScheme?: "light" | "dark";
13
+ primaryColor?: string;
14
+ darkColor?: string;
15
+ };
16
+
17
+ declare function MrChat({ colorScheme, primaryColor, darkColor, ...props }: ChatUserListProps): React.JSX.Element;
4
18
 
5
19
  export { MrChat };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,19 @@
1
1
  import React from 'react';
2
2
 
3
- declare function MrChat(props: any): React.JSX.Element;
3
+ type UserData = {
4
+ userId: string;
5
+ username: string;
6
+ displayName?: string;
7
+ avatar?: string;
8
+ };
9
+ type ChatUserListProps = {
10
+ currentUser?: UserData;
11
+ onSearchUsers?: (query: string) => UserData[] | Promise<UserData[]>;
12
+ colorScheme?: "light" | "dark";
13
+ primaryColor?: string;
14
+ darkColor?: string;
15
+ };
16
+
17
+ declare function MrChat({ colorScheme, primaryColor, darkColor, ...props }: ChatUserListProps): React.JSX.Element;
4
18
 
5
19
  export { MrChat };