@pubuduth-aplicy/chat-ui 2.1.50 → 2.1.52

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.
@@ -1,8 +1,9 @@
1
1
  .grid-container {
2
2
  display: grid;
3
3
  overflow: hidden;
4
- grid-template-columns: repeat(1, minmax(0, 1fr));
4
+ /* grid-template-columns: repeat(12, minmax(0, 1fr)); */
5
5
  border-radius: 0.5rem;
6
+ width: '100%';
6
7
  background-clip: padding-box;
7
8
  /* background-color: #9CA3AF; */
8
9
  --bg-opacity: 0;
@@ -10,14 +11,14 @@
10
11
  }
11
12
 
12
13
  .sidebarContainer {
13
- grid-column: span 3;
14
- overflow-y: auto;
14
+ /* grid-column: span 3; */
15
+ /* overflow-y: auto; */
15
16
  border: 1px solid #ddd;
16
17
  max-height: 100vh;
17
18
  }
18
19
 
19
20
  .messageContainer {
20
- grid-column: span 4;
21
+ /* grid-column: span 4; */
21
22
  /* border: 1px solid; */
22
23
  max-height: 100vh;
23
24
  overflow-y: auto;
@@ -51,7 +52,7 @@
51
52
  padding-bottom: 0.5rem;
52
53
  padding-left: 1rem;
53
54
  padding-right: 1rem;
54
- flex-basis: 0px;
55
+ /* flex-basis: 0px; */
55
56
  shrink: 1;
56
57
  gap: 1rem;
57
58
  justify-content: flex-start;
@@ -80,8 +81,8 @@ line-height: 1.5rem;
80
81
  font-weight: 400;
81
82
  border: 1px solid #ccc;
82
83
  width: 100%; /* Ensure full width */
83
- min-width: 400px; /* Set minimum horizontal length */
84
- max-width: 600px; /* Optional: Set maximum width if needed */
84
+ /* min-width: 400px; */
85
+ max-width: 600px;
85
86
  }
86
87
 
87
88
  .chatSidebarInput:focus {
@@ -452,7 +453,7 @@ font-size: 12px;
452
453
  color: blue;
453
454
  }
454
455
 
455
- @media (min-width: 640px) {
456
+ /* @media (min-width: 640px) {
456
457
  .grid-container {
457
458
  height: 450px;
458
459
  }
@@ -471,22 +472,22 @@ color: blue;
471
472
  padding-right: 1.5rem;
472
473
  }
473
474
 
474
- }
475
+ } */
475
476
 
476
477
  @media (min-width: 768px) {
477
478
  .grid-container {
478
- height: 550px;
479
+ /* height: 550px; */
479
480
  grid-template-columns: repeat(9, minmax(0, 1fr));
480
481
  }
481
482
 
482
483
  .sidebarContainer {
483
- display: grid;
484
- grid-column: span 3 / span 3;
484
+ /* display: grid; */
485
+ grid-column: span 4 ;
485
486
  }
486
487
 
487
488
  .messageContainer {
488
489
  display: grid;
489
- grid-column: span 4 / span 4;
490
+ grid-column: span 5;
490
491
  }
491
492
 
492
493
  .chatMessageContainerInnerDiv_button {
@@ -819,3 +820,157 @@ background-color: #ccc;
819
820
  opacity: 1;
820
821
  }
821
822
  }
823
+
824
+
825
+ /* chat input medial */
826
+
827
+
828
+
829
+ .message-input-container {
830
+ width: 100%;
831
+ padding: 10px;
832
+ position: sticky;
833
+ bottom: 0;
834
+ background: #fff;
835
+ border-top: 1px solid #eaeaea;
836
+ }
837
+
838
+ .attachments-preview {
839
+ display: flex;
840
+ flex-wrap: wrap;
841
+ gap: 10px;
842
+ margin-bottom: 10px;
843
+ }
844
+
845
+ .file-preview {
846
+ position: relative;
847
+ width: 120px;
848
+ height: 120px;
849
+ border-radius: 8px;
850
+ overflow: hidden;
851
+ background: #f5f5f5;
852
+ border: 1px solid #eaeaea;
853
+ }
854
+
855
+ .file-preview-content {
856
+ width: 100%;
857
+ height: 100%;
858
+ display: flex;
859
+ flex-direction: column;
860
+ }
861
+
862
+ .file-preview-image {
863
+ width: 100%;
864
+ height: 80px;
865
+ object-fit: cover;
866
+ }
867
+
868
+ .file-preview-video {
869
+ width: 100%;
870
+ height: 80px;
871
+ background: #000;
872
+ }
873
+
874
+ .file-preview-document {
875
+ display: flex;
876
+ flex-direction: column;
877
+ align-items: center;
878
+ justify-content: center;
879
+ height: 80px;
880
+ padding: 10px;
881
+ }
882
+
883
+ .file-preview-document svg {
884
+ width: 40px;
885
+ height: 40px;
886
+ color: #555;
887
+ }
888
+
889
+ .file-info {
890
+ padding: 5px;
891
+ font-size: 12px;
892
+ overflow: hidden;
893
+ text-overflow: ellipsis;
894
+ white-space: nowrap;
895
+ }
896
+
897
+ .file-name {
898
+ display: block;
899
+ overflow: hidden;
900
+ text-overflow: ellipsis;
901
+ }
902
+
903
+ .file-size {
904
+ color: #777;
905
+ }
906
+
907
+ .remove-file {
908
+ position: absolute;
909
+ top: 5px;
910
+ right: 5px;
911
+ width: 20px;
912
+ height: 20px;
913
+ border-radius: 50%;
914
+ background: rgba(0, 0, 0, 0.5);
915
+ color: white;
916
+ border: none;
917
+ cursor: pointer;
918
+ display: flex;
919
+ align-items: center;
920
+ justify-content: center;
921
+ font-size: 12px;
922
+ }
923
+
924
+ .remove-file:hover {
925
+ background: rgba(0, 0, 0, 0.7);
926
+ }
927
+
928
+ .upload-progress {
929
+ width: 100%;
930
+ height: 4px;
931
+ background: #eaeaea;
932
+ position: absolute;
933
+ bottom: 0;
934
+ }
935
+
936
+ .progress-bar {
937
+ height: 100%;
938
+ background: #4CAF50;
939
+ transition: width 0.3s;
940
+ }
941
+
942
+ .upload-error {
943
+ color: #f44336;
944
+ font-size: 12px;
945
+ padding: 5px;
946
+ text-align: center;
947
+ }
948
+
949
+ .attachment-options {
950
+ position: absolute;
951
+ bottom: 100%;
952
+ left: 0;
953
+ background-color: white;
954
+ border-radius: 8px;
955
+ box-shadow: 0 2px 10px rgba(0,0,0,0.2);
956
+ padding: 8px;
957
+ z-index: 1000;
958
+ display: flex;
959
+ flex-direction: column;
960
+ gap: 4px;
961
+ }
962
+
963
+ .attachment-options button {
964
+ display: flex;
965
+ align-items: center;
966
+ gap: 8px;
967
+ padding: 8px;
968
+ background: none;
969
+ border: none;
970
+ cursor: pointer;
971
+ border-radius: 4px;
972
+ }
973
+
974
+ .attachment-options button:hover {
975
+ background: #f5f5f5;
976
+ }
package/src/types/type.ts CHANGED
@@ -69,4 +69,4 @@ export interface ConversationProps {
69
69
  lastIdx: boolean;
70
70
  }
71
71
 
72
- export type MessageStatus = 'sent' | 'delivered' | 'read';
72
+ export type MessageStatus = 'sent' | 'delivered' | 'read' | 'sending' | 'failed';