@ermis-network/ermis-chat-react 1.0.0

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.
Files changed (88) hide show
  1. package/dist/index.cjs +6593 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.css +3375 -0
  4. package/dist/index.css.map +1 -0
  5. package/dist/index.d.mts +1138 -0
  6. package/dist/index.d.ts +1138 -0
  7. package/dist/index.mjs +6500 -0
  8. package/dist/index.mjs.map +1 -0
  9. package/package.json +42 -0
  10. package/src/components/Avatar.tsx +102 -0
  11. package/src/components/Channel.tsx +77 -0
  12. package/src/components/ChannelHeader.tsx +85 -0
  13. package/src/components/ChannelInfo/AddMemberModal.tsx +204 -0
  14. package/src/components/ChannelInfo/ChannelInfo.tsx +455 -0
  15. package/src/components/ChannelInfo/ChannelInfoTabs.tsx +282 -0
  16. package/src/components/ChannelInfo/ChannelSettingsPanel.tsx +479 -0
  17. package/src/components/ChannelInfo/EditChannelModal.tsx +272 -0
  18. package/src/components/ChannelInfo/FileListItem.tsx +49 -0
  19. package/src/components/ChannelInfo/LinkListItem.tsx +62 -0
  20. package/src/components/ChannelInfo/MediaGridItem.tsx +90 -0
  21. package/src/components/ChannelInfo/MemberListItem.tsx +85 -0
  22. package/src/components/ChannelInfo/MessageSearchPanel.tsx +333 -0
  23. package/src/components/ChannelInfo/States.tsx +36 -0
  24. package/src/components/ChannelInfo/index.ts +10 -0
  25. package/src/components/ChannelInfo/utils.tsx +49 -0
  26. package/src/components/ChannelList.tsx +395 -0
  27. package/src/components/Dropdown.tsx +120 -0
  28. package/src/components/EditPreview.tsx +102 -0
  29. package/src/components/FilesPreview.tsx +108 -0
  30. package/src/components/ForwardMessageModal.tsx +234 -0
  31. package/src/components/MentionSuggestions.tsx +59 -0
  32. package/src/components/MessageActionsBox.tsx +186 -0
  33. package/src/components/MessageInput.tsx +513 -0
  34. package/src/components/MessageInputDefaults.tsx +50 -0
  35. package/src/components/MessageItem.tsx +218 -0
  36. package/src/components/MessageQuickReactions.tsx +73 -0
  37. package/src/components/MessageReactions.tsx +59 -0
  38. package/src/components/MessageRenderers.tsx +565 -0
  39. package/src/components/Modal.tsx +58 -0
  40. package/src/components/Panel.tsx +64 -0
  41. package/src/components/PinnedMessages.tsx +165 -0
  42. package/src/components/QuotedMessagePreview.tsx +55 -0
  43. package/src/components/ReadReceipts.tsx +80 -0
  44. package/src/components/ReplyPreview.tsx +98 -0
  45. package/src/components/TypingIndicator.tsx +57 -0
  46. package/src/components/VirtualMessageList.tsx +425 -0
  47. package/src/context/ChatProvider.tsx +73 -0
  48. package/src/hooks/useBannedState.ts +48 -0
  49. package/src/hooks/useBlockedState.ts +55 -0
  50. package/src/hooks/useChannel.ts +18 -0
  51. package/src/hooks/useChannelCapabilities.ts +42 -0
  52. package/src/hooks/useChannelData.ts +55 -0
  53. package/src/hooks/useChannelListUpdates.ts +224 -0
  54. package/src/hooks/useChannelMessages.ts +159 -0
  55. package/src/hooks/useChannelRowUpdates.ts +78 -0
  56. package/src/hooks/useChatClient.ts +11 -0
  57. package/src/hooks/useEmojiPicker.ts +53 -0
  58. package/src/hooks/useFileUpload.ts +128 -0
  59. package/src/hooks/useLoadMessages.ts +178 -0
  60. package/src/hooks/useMentions.ts +287 -0
  61. package/src/hooks/useMessageActions.ts +87 -0
  62. package/src/hooks/useMessageSend.ts +164 -0
  63. package/src/hooks/usePendingState.ts +63 -0
  64. package/src/hooks/useScrollToMessage.ts +155 -0
  65. package/src/hooks/useTypingIndicator.ts +86 -0
  66. package/src/index.ts +129 -0
  67. package/src/styles/_add-member-modal.css +122 -0
  68. package/src/styles/_base.css +32 -0
  69. package/src/styles/_channel-info.css +941 -0
  70. package/src/styles/_channel-list.css +217 -0
  71. package/src/styles/_dropdown.css +69 -0
  72. package/src/styles/_forward-modal.css +191 -0
  73. package/src/styles/_mentions.css +102 -0
  74. package/src/styles/_message-actions.css +61 -0
  75. package/src/styles/_message-bubble.css +656 -0
  76. package/src/styles/_message-input.css +389 -0
  77. package/src/styles/_message-list.css +416 -0
  78. package/src/styles/_message-quick-reactions.css +62 -0
  79. package/src/styles/_message-reactions.css +67 -0
  80. package/src/styles/_modal.css +113 -0
  81. package/src/styles/_panel.css +69 -0
  82. package/src/styles/_pinned-messages.css +140 -0
  83. package/src/styles/_search-panel.css +219 -0
  84. package/src/styles/_tokens.css +92 -0
  85. package/src/styles/_typing-indicator.css +59 -0
  86. package/src/styles/index.css +24 -0
  87. package/src/types.ts +955 -0
  88. package/src/utils.ts +242 -0
@@ -0,0 +1,941 @@
1
+ .ermis-channel-info {
2
+ position: relative;
3
+ display: flex;
4
+ flex-direction: column;
5
+ width: 100%;
6
+ height: 100%;
7
+ background: var(--ermis-bg-primary);
8
+ border-left: 1px solid var(--ermis-border-base);
9
+ overflow-y: auto;
10
+ overflow-x: hidden;
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ .ermis-channel-info__header {
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: space-between;
18
+ padding: 16px;
19
+ border-bottom: 1px solid var(--ermis-border-base);
20
+ }
21
+
22
+ .ermis-channel-info__title {
23
+ margin: 0;
24
+ font-size: 16px;
25
+ font-weight: 600;
26
+ color: var(--ermis-text-primary);
27
+ }
28
+
29
+ .ermis-channel-info__close {
30
+ background: transparent;
31
+ border: none;
32
+ cursor: pointer;
33
+ color: var(--ermis-text-secondary);
34
+ display: flex;
35
+ align-items: center;
36
+ justify-content: center;
37
+ padding: 4px;
38
+ border-radius: 4px;
39
+ transition: background-color 0.2s ease, color 0.2s ease;
40
+ }
41
+
42
+ .ermis-channel-info__close:hover {
43
+ background-color: var(--ermis-bg-hover);
44
+ color: var(--ermis-text-primary);
45
+ }
46
+
47
+ .ermis-channel-info__cover {
48
+ display: flex;
49
+ flex-direction: column;
50
+ align-items: center;
51
+ padding: 16px;
52
+ text-align: center;
53
+ }
54
+
55
+ .ermis-channel-info__avatar {
56
+ margin-bottom: 16px;
57
+ }
58
+
59
+ .ermis-channel-info__name {
60
+ margin: 0 0 8px 0;
61
+ font-size: 18px;
62
+ font-weight: 600;
63
+ color: var(--ermis-text-primary);
64
+ }
65
+
66
+ .ermis-channel-info__name-row {
67
+ display: flex;
68
+ align-items: center;
69
+ gap: 8px;
70
+ justify-content: center;
71
+ }
72
+
73
+ .ermis-channel-info__name-row .ermis-channel-info__name {
74
+ margin: 0;
75
+ }
76
+
77
+ .ermis-channel-info__cover-edit-btn {
78
+ background: transparent;
79
+ border: none;
80
+ cursor: pointer;
81
+ color: var(--ermis-text-tertiary);
82
+ display: flex;
83
+ align-items: center;
84
+ justify-content: center;
85
+ padding: 4px;
86
+ border-radius: 4px;
87
+ transition: color 0.2s ease, background-color 0.2s ease;
88
+ flex-shrink: 0;
89
+ }
90
+
91
+ .ermis-channel-info__cover-edit-btn:hover {
92
+ color: var(--ermis-color-primary, #005fff);
93
+ background-color: var(--ermis-bg-hover);
94
+ }
95
+
96
+ .ermis-channel-info__description {
97
+ margin: 0;
98
+ font-size: 14px;
99
+ color: var(--ermis-text-secondary);
100
+ line-height: 1.4;
101
+ }
102
+
103
+ .ermis-channel-info__type-badge {
104
+ display: inline-flex;
105
+ align-items: center;
106
+ gap: 4px;
107
+ padding: 2px 10px;
108
+ border-radius: 12px;
109
+ font-size: 12px;
110
+ font-weight: 500;
111
+ line-height: 1;
112
+ margin: 4px 0;
113
+ }
114
+
115
+ .ermis-channel-info__type-badge--public {
116
+ background: rgba(40, 167, 69, 0.1);
117
+ color: #28a745;
118
+ }
119
+
120
+ .ermis-channel-info__type-badge--private {
121
+ background: rgba(108, 117, 125, 0.1);
122
+ color: var(--ermis-text-secondary);
123
+ }
124
+
125
+ .ermis-channel-info__actions {
126
+ display: flex;
127
+ justify-content: space-evenly;
128
+ padding: 16px;
129
+ border-bottom: 1px solid var(--ermis-border-base);
130
+ }
131
+
132
+ .ermis-channel-info__action-btn {
133
+ background: transparent;
134
+ border: none;
135
+ display: flex;
136
+ flex-direction: column;
137
+ align-items: center;
138
+ gap: 6px;
139
+ cursor: pointer;
140
+ color: var(--ermis-text-secondary);
141
+ font-size: 13px;
142
+ font-weight: 500;
143
+ transition: color 0.2s ease;
144
+ }
145
+
146
+ .ermis-channel-info__action-btn--danger {
147
+ color: var(--ermis-color-danger, #dc3545);
148
+ }
149
+
150
+ .ermis-channel-info__action-btn:hover {
151
+ color: var(--ermis-text-primary);
152
+ }
153
+
154
+ .ermis-channel-info__action-btn--danger:hover {
155
+ color: var(--ermis-color-danger, #dc3545);
156
+ opacity: 0.8;
157
+ }
158
+
159
+ .ermis-channel-info__action-btn:disabled {
160
+ opacity: 0.35;
161
+ cursor: not-allowed;
162
+ pointer-events: none;
163
+ }
164
+
165
+ .ermis-channel-info__action-icon {
166
+ width: 36px;
167
+ height: 36px;
168
+ border-radius: 50%;
169
+ background-color: var(--ermis-bg-secondary);
170
+ display: flex;
171
+ align-items: center;
172
+ justify-content: center;
173
+ transition: background-color 0.2s ease;
174
+ }
175
+
176
+ .ermis-channel-info__action-icon svg {
177
+ width: 18px;
178
+ height: 18px;
179
+ }
180
+
181
+ .ermis-channel-info__action-btn:hover .ermis-channel-info__action-icon {
182
+ background-color: var(--ermis-bg-hover);
183
+ }
184
+
185
+ .ermis-channel-info__action-btn--danger .ermis-channel-info__action-icon {
186
+ background-color: rgba(220, 53, 69, 0.08);
187
+ }
188
+
189
+ .ermis-channel-info__action-btn--danger:hover .ermis-channel-info__action-icon {
190
+ background-color: rgba(220, 53, 69, 0.15);
191
+ }
192
+
193
+ .ermis-channel-info__section {
194
+ padding: 16px 0;
195
+ }
196
+
197
+ .ermis-channel-info__section-header {
198
+ padding: 0 16px 8px;
199
+ }
200
+
201
+ .ermis-channel-info__section-header h4 {
202
+ margin: 0;
203
+ font-size: 12px;
204
+ text-transform: uppercase;
205
+ font-weight: 600;
206
+ color: var(--ermis-text-tertiary);
207
+ letter-spacing: 0.5px;
208
+ }
209
+
210
+ .ermis-channel-info__members {
211
+ padding: 0 8px;
212
+ }
213
+
214
+ .ermis-channel-info__members-tab {
215
+ display: flex;
216
+ flex-direction: column;
217
+ height: 100%;
218
+ }
219
+
220
+ .ermis-channel-info__member-item {
221
+ display: flex;
222
+ align-items: center;
223
+ gap: 12px;
224
+ padding: 10px 16px;
225
+ cursor: pointer;
226
+ transition: background-color 0.2s ease;
227
+ min-height: 56px;
228
+ border-bottom: 1px solid var(--ermis-border-base);
229
+ box-sizing: border-box;
230
+ }
231
+
232
+ .ermis-channel-info__member-item:hover {
233
+ background-color: var(--ermis-bg-hover);
234
+ }
235
+
236
+ .ermis-channel-info__member-info {
237
+ display: flex;
238
+ flex-direction: column;
239
+ min-width: 0;
240
+ gap: 2px;
241
+ flex: 1;
242
+ }
243
+
244
+ .ermis-channel-info__member-name {
245
+ font-size: 14px;
246
+ color: var(--ermis-text-primary);
247
+ font-weight: 500;
248
+ white-space: nowrap;
249
+ overflow: hidden;
250
+ text-overflow: ellipsis;
251
+ }
252
+
253
+ .ermis-channel-info__member-role {
254
+ font-size: 10px;
255
+ text-transform: uppercase;
256
+ letter-spacing: 0.5px;
257
+ width: fit-content;
258
+ }
259
+
260
+ .ermis-channel-info__member-role--owner {
261
+ color: var(--ermis-color-danger, #ff4d4f);
262
+ }
263
+ .ermis-channel-info__member-role--moder {
264
+ color: var(--ermis-color-primary, #005fff);
265
+ }
266
+ .ermis-channel-info__member-role--member {
267
+ color: var(--ermis-text-tertiary);
268
+ }
269
+ .ermis-channel-info__member-role--pending {
270
+ color: var(--ermis-color-warning, #faad14);
271
+ }
272
+
273
+ .ermis-channel-info__add-member-wrap {
274
+ padding: 12px 16px;
275
+ border-bottom: 1px solid var(--ermis-border-base);
276
+ flex-shrink: 0;
277
+ }
278
+
279
+ .ermis-channel-info__add-member-btn {
280
+ width: 100%;
281
+ padding: 10px;
282
+ background: transparent;
283
+ border: 1px dashed var(--ermis-border-base);
284
+ border-radius: 8px;
285
+ color: var(--ermis-color-primary, #005fff);
286
+ display: flex;
287
+ align-items: center;
288
+ justify-content: center;
289
+ gap: 8px;
290
+ cursor: pointer;
291
+ font-weight: 500;
292
+ transition: background-color 0.2s ease, border-color 0.2s ease;
293
+ }
294
+
295
+ .ermis-channel-info__add-member-btn:hover {
296
+ background-color: var(--ermis-bg-hover);
297
+ border-color: var(--ermis-color-primary, #005fff);
298
+ }
299
+
300
+ /* ============================================
301
+ Media Section - Tabs
302
+ ============================================ */
303
+
304
+ .ermis-channel-info__media-section {
305
+ flex: 1;
306
+ display: flex;
307
+ flex-direction: column;
308
+ padding: 0;
309
+ border-top: 1px solid var(--ermis-border-base);
310
+ }
311
+
312
+ .ermis-channel-info__media-tabs {
313
+ display: flex;
314
+ border-bottom: 1px solid var(--ermis-border-base);
315
+ padding: 0 4px;
316
+ gap: 0;
317
+ flex-shrink: 0;
318
+ }
319
+
320
+ .ermis-channel-info__media-tab {
321
+ flex: 1;
322
+ display: flex;
323
+ align-items: center;
324
+ justify-content: center;
325
+ gap: 3px;
326
+ padding: 5px 8px;
327
+ background: transparent;
328
+ border: none;
329
+ border-bottom: 2px solid transparent;
330
+ cursor: pointer;
331
+ color: var(--ermis-text-tertiary);
332
+ font-size: 13px;
333
+ font-weight: 500;
334
+ transition: color 0.2s ease, border-color 0.2s ease;
335
+ white-space: nowrap;
336
+ }
337
+
338
+ .ermis-channel-info__media-tab:hover {
339
+ color: var(--ermis-text-secondary);
340
+ }
341
+
342
+ .ermis-channel-info__media-tab--active {
343
+ color: var(--ermis-color-primary, #005fff);
344
+ border-bottom-color: var(--ermis-color-primary, #005fff);
345
+ }
346
+
347
+ .ermis-channel-info__media-tab-label {
348
+ font-size: 13px;
349
+ }
350
+
351
+ .ermis-channel-info__media-tab-count {
352
+ font-size: 11px;
353
+ font-weight: 600;
354
+ min-width: 18px;
355
+ height: 18px;
356
+ display: inline-flex;
357
+ align-items: center;
358
+ justify-content: center;
359
+ border-radius: 9px;
360
+ background: var(--ermis-bg-secondary);
361
+ color: var(--ermis-text-secondary);
362
+ padding: 0 5px;
363
+ }
364
+
365
+ .ermis-channel-info__media-tab--active .ermis-channel-info__media-tab-count {
366
+ background: var(--ermis-color-primary, #005fff);
367
+ color: #fff;
368
+ }
369
+
370
+ /* ============================================
371
+ Media Content Container
372
+ ============================================ */
373
+
374
+ .ermis-channel-info__media-content {
375
+ flex: 1;
376
+ overflow: hidden;
377
+ min-height: 120px;
378
+ }
379
+
380
+ /* ============================================
381
+ Media Grid
382
+ ============================================ */
383
+
384
+ .ermis-channel-info__media-grid-row {
385
+ display: flex;
386
+ gap: 2px;
387
+ padding: 0 0 2px 0;
388
+ }
389
+
390
+ .ermis-channel-info__media-item {
391
+ flex: 1;
392
+ aspect-ratio: 1;
393
+ background-color: var(--ermis-bg-secondary);
394
+ overflow: hidden;
395
+ cursor: pointer;
396
+ position: relative;
397
+ }
398
+
399
+ .ermis-channel-info__media-item--empty {
400
+ cursor: default;
401
+ background: transparent;
402
+ }
403
+
404
+ .ermis-channel-info__media-item img,
405
+ .ermis-channel-info__media-item video {
406
+ width: 100%;
407
+ height: 100%;
408
+ object-fit: cover;
409
+ }
410
+
411
+ .ermis-channel-info__media-item:not(.ermis-channel-info__media-item--empty):hover img,
412
+ .ermis-channel-info__media-item:not(.ermis-channel-info__media-item--empty):hover video {
413
+ transform: scale(1.05);
414
+ }
415
+
416
+ /* Shimmer placeholder — matches ermis-attachment-shimmer */
417
+ .ermis-channel-info__media-shimmer {
418
+ position: absolute;
419
+ inset: 0;
420
+ background: linear-gradient(
421
+ 90deg,
422
+ var(--ermis-bg-secondary) 25%,
423
+ var(--ermis-bg-hover, rgba(255, 255, 255, 0.06)) 50%,
424
+ var(--ermis-bg-secondary) 75%
425
+ );
426
+ background-size: 200% 100%;
427
+ animation: ermis-ci-shimmer 1.4s ease-in-out infinite;
428
+ z-index: 1;
429
+ }
430
+
431
+ @keyframes ermis-ci-shimmer {
432
+ 0% {
433
+ background-position: 200% 0;
434
+ }
435
+ 100% {
436
+ background-position: -200% 0;
437
+ }
438
+ }
439
+
440
+ .ermis-channel-info__media-video-thumb {
441
+ width: 100%;
442
+ height: 100%;
443
+ position: relative;
444
+ }
445
+
446
+ .ermis-channel-info__media-video-thumb img,
447
+ .ermis-channel-info__media-video-thumb video {
448
+ width: 100%;
449
+ height: 100%;
450
+ object-fit: cover;
451
+ }
452
+
453
+ .ermis-channel-info__media-play-icon {
454
+ position: absolute;
455
+ top: 50%;
456
+ left: 50%;
457
+ transform: translate(-50%, -50%);
458
+ width: 32px;
459
+ height: 32px;
460
+ border-radius: 50%;
461
+ background: rgba(0, 0, 0, 0.6);
462
+ display: flex;
463
+ align-items: center;
464
+ justify-content: center;
465
+ color: #fff;
466
+ pointer-events: none;
467
+ }
468
+
469
+ .ermis-channel-info__media-play-icon svg {
470
+ margin-left: 2px;
471
+ }
472
+
473
+ /* ============================================
474
+ Links List
475
+ ============================================ */
476
+
477
+ .ermis-channel-info__links-list {
478
+ display: flex;
479
+ flex-direction: column;
480
+ }
481
+
482
+ .ermis-channel-info__link-item {
483
+ display: flex;
484
+ align-items: center;
485
+ gap: 12px;
486
+ padding: 10px 16px;
487
+ text-decoration: none;
488
+ color: inherit;
489
+ transition: background-color 0.15s ease;
490
+ border-bottom: 1px solid var(--ermis-border-base);
491
+ }
492
+
493
+ .ermis-channel-info__link-item:hover {
494
+ background-color: var(--ermis-bg-hover);
495
+ }
496
+
497
+ .ermis-channel-info__link-icon {
498
+ width: 36px;
499
+ height: 36px;
500
+ min-width: 36px;
501
+ border-radius: 8px;
502
+ background: var(--ermis-bg-secondary);
503
+ display: flex;
504
+ align-items: center;
505
+ justify-content: center;
506
+ color: var(--ermis-text-tertiary);
507
+ overflow: hidden;
508
+ }
509
+
510
+ .ermis-channel-info__link-preview-img {
511
+ width: 100%;
512
+ height: 100%;
513
+ object-fit: cover;
514
+ }
515
+
516
+ .ermis-channel-info__link-content {
517
+ flex: 1;
518
+ min-width: 0;
519
+ display: flex;
520
+ flex-direction: column;
521
+ gap: 2px;
522
+ }
523
+
524
+ .ermis-channel-info__link-title {
525
+ font-size: 13px;
526
+ font-weight: 500;
527
+ color: var(--ermis-text-primary);
528
+ white-space: nowrap;
529
+ overflow: hidden;
530
+ text-overflow: ellipsis;
531
+ }
532
+
533
+ .ermis-channel-info__link-domain {
534
+ font-size: 12px;
535
+ color: var(--ermis-text-tertiary);
536
+ white-space: nowrap;
537
+ overflow: hidden;
538
+ text-overflow: ellipsis;
539
+ }
540
+
541
+ .ermis-channel-info__link-date {
542
+ font-size: 11px;
543
+ color: var(--ermis-text-tertiary);
544
+ white-space: nowrap;
545
+ flex-shrink: 0;
546
+ }
547
+
548
+ /* ============================================
549
+ Files List
550
+ ============================================ */
551
+
552
+ .ermis-channel-info__files-list {
553
+ display: flex;
554
+ flex-direction: column;
555
+ }
556
+
557
+ .ermis-channel-info__file-item {
558
+ display: flex;
559
+ align-items: center;
560
+ gap: 12px;
561
+ padding: 10px 16px;
562
+ cursor: pointer;
563
+ transition: background-color 0.15s ease;
564
+ border-bottom: 1px solid var(--ermis-border-base);
565
+ }
566
+
567
+ .ermis-channel-info__file-item:hover {
568
+ background-color: var(--ermis-bg-hover);
569
+ }
570
+
571
+ .ermis-channel-info__file-icon {
572
+ width: 40px;
573
+ height: 40px;
574
+ min-width: 40px;
575
+ border-radius: 8px;
576
+ background: var(--ermis-bg-secondary);
577
+ display: flex;
578
+ flex-direction: column;
579
+ align-items: center;
580
+ justify-content: center;
581
+ color: var(--ermis-text-tertiary);
582
+ gap: 1px;
583
+ }
584
+
585
+ .ermis-channel-info__file-ext {
586
+ font-size: 8px;
587
+ font-weight: 700;
588
+ text-transform: uppercase;
589
+ letter-spacing: 0.3px;
590
+ color: var(--ermis-text-tertiary);
591
+ line-height: 1;
592
+ }
593
+
594
+ .ermis-channel-info__file-info {
595
+ flex: 1;
596
+ min-width: 0;
597
+ display: flex;
598
+ flex-direction: column;
599
+ gap: 2px;
600
+ }
601
+
602
+ .ermis-channel-info__file-name {
603
+ font-size: 13px;
604
+ font-weight: 500;
605
+ color: var(--ermis-text-primary);
606
+ white-space: nowrap;
607
+ overflow: hidden;
608
+ text-overflow: ellipsis;
609
+ }
610
+
611
+ .ermis-channel-info__file-meta {
612
+ display: flex;
613
+ align-items: center;
614
+ gap: 4px;
615
+ font-size: 12px;
616
+ color: var(--ermis-text-tertiary);
617
+ }
618
+
619
+ .ermis-channel-info__file-meta-dot {
620
+ color: var(--ermis-text-tertiary);
621
+ }
622
+
623
+ .ermis-channel-info__file-download {
624
+ background: transparent;
625
+ border: none;
626
+ cursor: pointer;
627
+ color: var(--ermis-text-tertiary);
628
+ padding: 6px;
629
+ border-radius: 6px;
630
+ display: flex;
631
+ align-items: center;
632
+ justify-content: center;
633
+ transition: background-color 0.15s ease, color 0.15s ease;
634
+ flex-shrink: 0;
635
+ }
636
+
637
+ .ermis-channel-info__file-download:hover {
638
+ background-color: var(--ermis-bg-secondary);
639
+ color: var(--ermis-color-primary, #005fff);
640
+ }
641
+
642
+ /* ============================================
643
+ Empty & Loading states
644
+ ============================================ */
645
+
646
+ .ermis-channel-info__media-empty {
647
+ display: flex;
648
+ flex-direction: column;
649
+ align-items: center;
650
+ justify-content: center;
651
+ padding: 40px 16px;
652
+ gap: 12px;
653
+ color: var(--ermis-text-tertiary);
654
+ font-size: 13px;
655
+ }
656
+
657
+ .ermis-channel-info__media-empty-icon {
658
+ width: 56px;
659
+ height: 56px;
660
+ border-radius: 50%;
661
+ background: var(--ermis-bg-secondary);
662
+ display: flex;
663
+ align-items: center;
664
+ justify-content: center;
665
+ color: var(--ermis-text-tertiary);
666
+ }
667
+
668
+ .ermis-channel-info__media-loading {
669
+ display: flex;
670
+ align-items: center;
671
+ justify-content: center;
672
+ padding: 40px 16px;
673
+ }
674
+
675
+ .ermis-channel-info__media-spinner {
676
+ width: 24px;
677
+ height: 24px;
678
+ border: 2px solid var(--ermis-border-base);
679
+ border-top-color: var(--ermis-color-primary, #005fff);
680
+ border-radius: 50%;
681
+ animation: ermis-spin 0.7s linear infinite;
682
+ }
683
+
684
+ @keyframes ermis-spin {
685
+ to {
686
+ transform: rotate(360deg);
687
+ }
688
+ }
689
+
690
+ /* ============================================
691
+ Edit Channel Modal — Body Content
692
+ ============================================ */
693
+
694
+ .ermis-channel-info__edit-body {
695
+ display: flex;
696
+ flex-direction: column;
697
+ gap: 16px;
698
+ }
699
+
700
+ /* Avatar section */
701
+ .ermis-channel-info__edit-avatar-section {
702
+ display: flex;
703
+ flex-direction: column;
704
+ align-items: center;
705
+ gap: 8px;
706
+ }
707
+
708
+ .ermis-channel-info__edit-avatar-wrap {
709
+ position: relative;
710
+ cursor: pointer;
711
+ border-radius: 50%;
712
+ overflow: hidden;
713
+ }
714
+
715
+ .ermis-channel-info__edit-avatar-overlay {
716
+ position: absolute;
717
+ inset: 0;
718
+ background: rgba(0, 0, 0, 0.45);
719
+ display: flex;
720
+ align-items: center;
721
+ justify-content: center;
722
+ color: #fff;
723
+ opacity: 0;
724
+ transition: opacity 0.2s ease;
725
+ border-radius: 50%;
726
+ }
727
+
728
+ .ermis-channel-info__edit-avatar-wrap:hover .ermis-channel-info__edit-avatar-overlay {
729
+ opacity: 1;
730
+ }
731
+
732
+ .ermis-channel-info__edit-avatar-btn {
733
+ background: transparent;
734
+ border: none;
735
+ cursor: pointer;
736
+ color: var(--ermis-color-primary, #005fff);
737
+ font-size: 13px;
738
+ font-weight: 500;
739
+ padding: 4px 8px;
740
+ border-radius: 4px;
741
+ transition: background-color 0.2s ease;
742
+ }
743
+
744
+ .ermis-channel-info__edit-avatar-btn:hover {
745
+ background-color: var(--ermis-bg-hover);
746
+ }
747
+
748
+ .ermis-channel-info__edit-avatar-btn:disabled {
749
+ opacity: 0.5;
750
+ cursor: not-allowed;
751
+ }
752
+
753
+ /* Form fields */
754
+ .ermis-channel-info__edit-field {
755
+ display: flex;
756
+ flex-direction: column;
757
+ gap: 6px;
758
+ }
759
+
760
+ .ermis-channel-info__edit-field--toggle {
761
+ flex-direction: row;
762
+ align-items: center;
763
+ justify-content: space-between;
764
+ padding: 8px 0;
765
+ }
766
+
767
+ .ermis-channel-info__edit-label {
768
+ font-size: 13px;
769
+ font-weight: 500;
770
+ color: var(--ermis-text-secondary);
771
+ }
772
+
773
+ .ermis-channel-info__edit-input {
774
+ background: var(--ermis-bg-secondary);
775
+ border: 1px solid var(--ermis-border-base);
776
+ border-radius: 8px;
777
+ padding: 10px 12px;
778
+ font-size: 14px;
779
+ color: var(--ermis-text-primary);
780
+ outline: none;
781
+ transition: border-color 0.2s ease, box-shadow 0.2s ease;
782
+ font-family: inherit;
783
+ }
784
+
785
+ .ermis-channel-info__edit-input:focus {
786
+ border-color: var(--ermis-color-primary, #005fff);
787
+ box-shadow: 0 0 0 2px rgba(0, 95, 255, 0.15);
788
+ }
789
+
790
+ .ermis-channel-info__edit-input:disabled {
791
+ opacity: 0.6;
792
+ cursor: not-allowed;
793
+ }
794
+
795
+ .ermis-channel-info__edit-textarea {
796
+ background: var(--ermis-bg-secondary);
797
+ border: 1px solid var(--ermis-border-base);
798
+ border-radius: 8px;
799
+ padding: 10px 12px;
800
+ font-size: 14px;
801
+ color: var(--ermis-text-primary);
802
+ outline: none;
803
+ transition: border-color 0.2s ease, box-shadow 0.2s ease;
804
+ resize: vertical;
805
+ min-height: 60px;
806
+ font-family: inherit;
807
+ }
808
+
809
+ .ermis-channel-info__edit-textarea:focus {
810
+ border-color: var(--ermis-color-primary, #005fff);
811
+ box-shadow: 0 0 0 2px rgba(0, 95, 255, 0.15);
812
+ }
813
+
814
+ .ermis-channel-info__edit-textarea:disabled {
815
+ opacity: 0.6;
816
+ cursor: not-allowed;
817
+ }
818
+
819
+ /* Toggle switch */
820
+ .ermis-channel-info__edit-toggle {
821
+ position: relative;
822
+ width: 44px;
823
+ height: 24px;
824
+ background: var(--ermis-bg-secondary);
825
+ border: 1px solid var(--ermis-border-base);
826
+ border-radius: 12px;
827
+ cursor: pointer;
828
+ transition: background-color 0.2s ease, border-color 0.2s ease;
829
+ padding: 0;
830
+ flex-shrink: 0;
831
+ }
832
+
833
+ .ermis-channel-info__edit-toggle--on {
834
+ background: var(--ermis-color-primary, #005fff);
835
+ border-color: var(--ermis-color-primary, #005fff);
836
+ }
837
+
838
+ .ermis-channel-info__edit-toggle-thumb {
839
+ position: absolute;
840
+ top: 2px;
841
+ left: 2px;
842
+ width: 18px;
843
+ height: 18px;
844
+ background: #fff;
845
+ border-radius: 50%;
846
+ transition: transform 0.2s ease;
847
+ pointer-events: none;
848
+ }
849
+
850
+ .ermis-channel-info__edit-toggle--on .ermis-channel-info__edit-toggle-thumb {
851
+ transform: translateX(20px);
852
+ }
853
+
854
+ .ermis-channel-info__edit-toggle:disabled {
855
+ opacity: 0.5;
856
+ cursor: not-allowed;
857
+ }
858
+
859
+ /* Error message */
860
+ .ermis-channel-info__edit-error {
861
+ display: flex;
862
+ align-items: center;
863
+ gap: 8px;
864
+ padding: 10px 12px;
865
+ background: rgba(220, 53, 69, 0.08);
866
+ border: 1px solid rgba(220, 53, 69, 0.2);
867
+ border-radius: 8px;
868
+ color: var(--ermis-color-danger, #dc3545);
869
+ font-size: 13px;
870
+ }
871
+
872
+ /* Footer buttons */
873
+ .ermis-channel-info__edit-footer-buttons {
874
+ display: flex;
875
+ align-items: center;
876
+ justify-content: flex-end;
877
+ gap: 8px;
878
+ width: 100%;
879
+ }
880
+
881
+ .ermis-channel-info__edit-btn {
882
+ padding: 8px 20px;
883
+ border-radius: 8px;
884
+ font-size: 14px;
885
+ font-weight: 500;
886
+ cursor: pointer;
887
+ transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
888
+ border: none;
889
+ font-family: inherit;
890
+ }
891
+
892
+ .ermis-channel-info__edit-btn:disabled {
893
+ opacity: 0.6;
894
+ cursor: not-allowed;
895
+ }
896
+
897
+ .ermis-channel-info__edit-btn--cancel {
898
+ background: transparent;
899
+ color: var(--ermis-text-secondary);
900
+ border: 1px solid var(--ermis-border-base);
901
+ }
902
+
903
+ .ermis-channel-info__edit-btn--cancel:hover:not(:disabled) {
904
+ background-color: var(--ermis-bg-hover);
905
+ color: var(--ermis-text-primary);
906
+ }
907
+
908
+ .ermis-channel-info__edit-btn--save {
909
+ background: var(--ermis-color-primary, #005fff);
910
+ color: #fff;
911
+ }
912
+
913
+ .ermis-channel-info__edit-btn--save:hover:not(:disabled) {
914
+ opacity: 0.9;
915
+ }
916
+
917
+ /* ============================================
918
+ Banned State
919
+ ============================================ */
920
+
921
+ .ermis-channel-info__banned-banner {
922
+ display: flex;
923
+ flex-direction: column;
924
+ align-items: center;
925
+ justify-content: center;
926
+ gap: 12px;
927
+ padding: 40px 16px;
928
+ text-align: center;
929
+ flex: 1;
930
+ }
931
+
932
+ .ermis-channel-info__banned-banner-icon {
933
+ color: #ef4444;
934
+ opacity: 0.5;
935
+ }
936
+
937
+ .ermis-channel-info__banned-banner-text {
938
+ font-size: 14px;
939
+ font-weight: 500;
940
+ color: var(--ermis-text-secondary);
941
+ }