@pubuduth-aplicy/chat-ui 2.1.25 → 2.1.26
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/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import React, { useState } from 'react';
|
|
|
3
3
|
import { useMessageMutation } from '../../hooks/mutations/useSendMessage';
|
|
4
4
|
import { useChatContext } from '../../providers/ChatProvider';
|
|
5
5
|
import useChatUIStore from '../../stores/Zustant';
|
|
6
|
+
import paperplane from '../../assets/icons8-send-50.png'
|
|
6
7
|
// import { PaperPlaneRight } from '@phosphor-icons/react'; // Assuming you're using icons from Phosphor Icons library
|
|
7
8
|
// import useSendMessage from '../../hooks/useSendMessage'; // Importing the useSendMessage hook
|
|
8
9
|
|
|
@@ -28,9 +29,9 @@ const MessageInput = () => {
|
|
|
28
29
|
};
|
|
29
30
|
|
|
30
31
|
return (
|
|
31
|
-
<form className='
|
|
32
|
+
<form className='chatMessageInputform' onSubmit={handleSubmit}>
|
|
32
33
|
|
|
33
|
-
<div
|
|
34
|
+
<div className='chatMessageInputdiv' >
|
|
34
35
|
<input
|
|
35
36
|
type='text'
|
|
36
37
|
className='chatMessageInput'
|
|
@@ -39,7 +40,7 @@ const MessageInput = () => {
|
|
|
39
40
|
onChange={(e) => setMessage(e.target.value)} // Update message state as the user types
|
|
40
41
|
/>
|
|
41
42
|
<button type='submit' className='chatMessageInputSubmit'>
|
|
42
|
-
send
|
|
43
|
+
<img src={paperplane} alt="send" />
|
|
43
44
|
{/* {loading ? <div className='loading loading-spinner'></div> : <PaperPlaneRight />} Show loading spinner if loading */}
|
|
44
45
|
</button>
|
|
45
46
|
</div>
|
package/src/declarations.d.ts
CHANGED
|
@@ -3,4 +3,14 @@ declare module '*.css' {
|
|
|
3
3
|
const content: string;
|
|
4
4
|
export default content;
|
|
5
5
|
}
|
|
6
|
+
|
|
7
|
+
declare module '*.png' {
|
|
8
|
+
const content: string;
|
|
9
|
+
export default content;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module '*.svg' {
|
|
13
|
+
const content: string;
|
|
14
|
+
export default content;
|
|
15
|
+
}
|
|
6
16
|
|
package/src/style/style.css
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
5
5
|
border-radius: 0.5rem;
|
|
6
6
|
background-clip: padding-box;
|
|
7
|
-
background-color: #9CA3AF;
|
|
7
|
+
/* background-color: #9CA3AF; */
|
|
8
8
|
--bg-opacity: 0;
|
|
9
9
|
backdrop-blur: blur(16px);
|
|
10
10
|
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
.messageContainer {
|
|
20
20
|
grid-column: span 4;
|
|
21
|
-
border: 1px solid;
|
|
21
|
+
/* border: 1px solid; */
|
|
22
22
|
max-height: 100vh;
|
|
23
23
|
overflow-y: auto;
|
|
24
24
|
}
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
|
|
74
74
|
.chatSidebarInput {
|
|
75
75
|
outline-style: none;
|
|
76
|
-
width: 100%;
|
|
76
|
+
/* width: 100%; */
|
|
77
77
|
padding: 8px 4px;
|
|
78
78
|
font-size: 1rem;
|
|
79
79
|
border-radius: 4px;
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
.chatSidebarConversationMain {
|
|
95
95
|
display: inline-flex;
|
|
96
96
|
padding: 0.5rem;
|
|
97
|
-
margin-top: 0.875rem;
|
|
97
|
+
margin-top: 0.875rem;
|
|
98
98
|
/* padding-top: 0.75rem;
|
|
99
99
|
padding-bottom: 0.75rem; */
|
|
100
100
|
gap: 0.75rem;
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
.chatMessageContainerOutterDiv {
|
|
205
|
-
display: inline-flex;
|
|
205
|
+
/* display: inline-flex; */
|
|
206
206
|
justify-content: flex-start;
|
|
207
207
|
align-items: center;
|
|
208
208
|
align-self: stretch;
|
|
@@ -248,19 +248,21 @@
|
|
|
248
248
|
|
|
249
249
|
.chatMessagesBubble_me {
|
|
250
250
|
float: right;
|
|
251
|
-
background-color: #
|
|
251
|
+
background-color: #12bbb5;
|
|
252
|
+
color: white;
|
|
252
253
|
}
|
|
253
254
|
|
|
254
255
|
.chatMessagesBubble_Other {
|
|
255
256
|
float: left;
|
|
256
|
-
background-color: #
|
|
257
|
+
background-color: #f3f4f6;
|
|
258
|
+
color: #374151;
|
|
257
259
|
}
|
|
258
260
|
|
|
259
261
|
.chatMessage {
|
|
260
262
|
overflow-y: auto;
|
|
261
263
|
padding-left: 2rem;
|
|
262
|
-
padding-right: 2rem;
|
|
263
|
-
padding-top:
|
|
264
|
+
/* padding-right: 2rem; */
|
|
265
|
+
padding-top: 0.5rem;
|
|
264
266
|
flex-grow: 1;
|
|
265
267
|
max-height: 100vh;
|
|
266
268
|
text-align: left;
|
|
@@ -274,35 +276,41 @@
|
|
|
274
276
|
}
|
|
275
277
|
|
|
276
278
|
.chatMessagesBubble_inner {
|
|
277
|
-
|
|
279
|
+
max-width: 250px;
|
|
280
|
+
padding: 10px 15px;
|
|
281
|
+
border-radius: 15px;
|
|
278
282
|
position: relative;
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
border-radius: 0.375rem;
|
|
284
|
-
color: #ffffff;
|
|
283
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
284
|
+
font-size: 14px;
|
|
285
|
+
display: inline-block;
|
|
286
|
+
text-align: left;
|
|
285
287
|
word-break: break-all;
|
|
286
288
|
}
|
|
287
289
|
|
|
290
|
+
|
|
288
291
|
.chatMessagesBubble_Time {
|
|
289
|
-
display:
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
line-height: 1rem;
|
|
295
|
-
opacity: 0.5;
|
|
292
|
+
display: block;
|
|
293
|
+
text-align: right;
|
|
294
|
+
font-size: 10px;
|
|
295
|
+
color: #d1d1d1;
|
|
296
|
+
margin-top: 5px;
|
|
296
297
|
}
|
|
297
298
|
|
|
298
|
-
.
|
|
299
|
+
.chatMessageInputform {
|
|
299
300
|
position: sticky;
|
|
300
301
|
bottom: 0;
|
|
302
|
+
background: #dbdbdbc0;
|
|
301
303
|
padding-left: 1rem;
|
|
302
304
|
padding-right: 1rem;
|
|
303
305
|
margin-top: 0.75rem;
|
|
304
306
|
margin-bottom: 0.75rem;
|
|
305
307
|
}
|
|
308
|
+
.chatMessageInputdiv {
|
|
309
|
+
display: flex;
|
|
310
|
+
align-items: center;
|
|
311
|
+
border-top: 1px;
|
|
312
|
+
gap: 8px;
|
|
313
|
+
}
|
|
306
314
|
|
|
307
315
|
.chatMessageInput {
|
|
308
316
|
display: block;
|
|
@@ -312,16 +320,22 @@
|
|
|
312
320
|
border-style: none;
|
|
313
321
|
outline-style: none;
|
|
314
322
|
width: 100%;
|
|
323
|
+
max-height: 11.76em;
|
|
324
|
+
min-height: 1.47em;
|
|
325
|
+
white-space: pre-wrap;
|
|
326
|
+
word-break: break-all;
|
|
315
327
|
font-size: 0.875rem;
|
|
316
328
|
line-height: 1.25rem;
|
|
317
329
|
}
|
|
318
330
|
|
|
319
331
|
.chatMessageInputSubmit {
|
|
320
|
-
display: flex;
|
|
332
|
+
/* display: flex;
|
|
321
333
|
position: absolute;
|
|
322
334
|
top: 0;
|
|
323
335
|
bottom: 0;
|
|
324
|
-
align-items: center;
|
|
336
|
+
align-items: center; */
|
|
337
|
+
padding: 8px;
|
|
338
|
+
background: #12bbb5;
|
|
325
339
|
}
|
|
326
340
|
|
|
327
341
|
@media (min-width: 640px) {
|