@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.
- package/dist/index.cjs +6593 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +3375 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +1138 -0
- package/dist/index.d.ts +1138 -0
- package/dist/index.mjs +6500 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +42 -0
- package/src/components/Avatar.tsx +102 -0
- package/src/components/Channel.tsx +77 -0
- package/src/components/ChannelHeader.tsx +85 -0
- package/src/components/ChannelInfo/AddMemberModal.tsx +204 -0
- package/src/components/ChannelInfo/ChannelInfo.tsx +455 -0
- package/src/components/ChannelInfo/ChannelInfoTabs.tsx +282 -0
- package/src/components/ChannelInfo/ChannelSettingsPanel.tsx +479 -0
- package/src/components/ChannelInfo/EditChannelModal.tsx +272 -0
- package/src/components/ChannelInfo/FileListItem.tsx +49 -0
- package/src/components/ChannelInfo/LinkListItem.tsx +62 -0
- package/src/components/ChannelInfo/MediaGridItem.tsx +90 -0
- package/src/components/ChannelInfo/MemberListItem.tsx +85 -0
- package/src/components/ChannelInfo/MessageSearchPanel.tsx +333 -0
- package/src/components/ChannelInfo/States.tsx +36 -0
- package/src/components/ChannelInfo/index.ts +10 -0
- package/src/components/ChannelInfo/utils.tsx +49 -0
- package/src/components/ChannelList.tsx +395 -0
- package/src/components/Dropdown.tsx +120 -0
- package/src/components/EditPreview.tsx +102 -0
- package/src/components/FilesPreview.tsx +108 -0
- package/src/components/ForwardMessageModal.tsx +234 -0
- package/src/components/MentionSuggestions.tsx +59 -0
- package/src/components/MessageActionsBox.tsx +186 -0
- package/src/components/MessageInput.tsx +513 -0
- package/src/components/MessageInputDefaults.tsx +50 -0
- package/src/components/MessageItem.tsx +218 -0
- package/src/components/MessageQuickReactions.tsx +73 -0
- package/src/components/MessageReactions.tsx +59 -0
- package/src/components/MessageRenderers.tsx +565 -0
- package/src/components/Modal.tsx +58 -0
- package/src/components/Panel.tsx +64 -0
- package/src/components/PinnedMessages.tsx +165 -0
- package/src/components/QuotedMessagePreview.tsx +55 -0
- package/src/components/ReadReceipts.tsx +80 -0
- package/src/components/ReplyPreview.tsx +98 -0
- package/src/components/TypingIndicator.tsx +57 -0
- package/src/components/VirtualMessageList.tsx +425 -0
- package/src/context/ChatProvider.tsx +73 -0
- package/src/hooks/useBannedState.ts +48 -0
- package/src/hooks/useBlockedState.ts +55 -0
- package/src/hooks/useChannel.ts +18 -0
- package/src/hooks/useChannelCapabilities.ts +42 -0
- package/src/hooks/useChannelData.ts +55 -0
- package/src/hooks/useChannelListUpdates.ts +224 -0
- package/src/hooks/useChannelMessages.ts +159 -0
- package/src/hooks/useChannelRowUpdates.ts +78 -0
- package/src/hooks/useChatClient.ts +11 -0
- package/src/hooks/useEmojiPicker.ts +53 -0
- package/src/hooks/useFileUpload.ts +128 -0
- package/src/hooks/useLoadMessages.ts +178 -0
- package/src/hooks/useMentions.ts +287 -0
- package/src/hooks/useMessageActions.ts +87 -0
- package/src/hooks/useMessageSend.ts +164 -0
- package/src/hooks/usePendingState.ts +63 -0
- package/src/hooks/useScrollToMessage.ts +155 -0
- package/src/hooks/useTypingIndicator.ts +86 -0
- package/src/index.ts +129 -0
- package/src/styles/_add-member-modal.css +122 -0
- package/src/styles/_base.css +32 -0
- package/src/styles/_channel-info.css +941 -0
- package/src/styles/_channel-list.css +217 -0
- package/src/styles/_dropdown.css +69 -0
- package/src/styles/_forward-modal.css +191 -0
- package/src/styles/_mentions.css +102 -0
- package/src/styles/_message-actions.css +61 -0
- package/src/styles/_message-bubble.css +656 -0
- package/src/styles/_message-input.css +389 -0
- package/src/styles/_message-list.css +416 -0
- package/src/styles/_message-quick-reactions.css +62 -0
- package/src/styles/_message-reactions.css +67 -0
- package/src/styles/_modal.css +113 -0
- package/src/styles/_panel.css +69 -0
- package/src/styles/_pinned-messages.css +140 -0
- package/src/styles/_search-panel.css +219 -0
- package/src/styles/_tokens.css +92 -0
- package/src/styles/_typing-indicator.css +59 -0
- package/src/styles/index.css +24 -0
- package/src/types.ts +955 -0
- package/src/utils.ts +242 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/* ----------------------------------------------------------
|
|
2
|
+
Pinned Messages
|
|
3
|
+
---------------------------------------------------------- */
|
|
4
|
+
.ermis-pinned-messages {
|
|
5
|
+
border-bottom: 1px solid var(--ermis-border);
|
|
6
|
+
background-color: var(--ermis-bg-secondary);
|
|
7
|
+
font-family: var(--ermis-font-family);
|
|
8
|
+
position: relative;
|
|
9
|
+
flex-shrink: 0;
|
|
10
|
+
z-index: 50;
|
|
11
|
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ermis-pinned-messages__header {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: var(--ermis-spacing-xs);
|
|
18
|
+
padding: var(--ermis-spacing-xs) var(--ermis-spacing-md);
|
|
19
|
+
font-size: var(--ermis-font-size-xs);
|
|
20
|
+
color: var(--ermis-text-secondary);
|
|
21
|
+
cursor: pointer; /* make header clickable to toggle */
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ermis-pinned-messages__icon {
|
|
25
|
+
color: var(--ermis-accent);
|
|
26
|
+
flex-shrink: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ermis-pinned-messages__label {
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
color: var(--ermis-text-primary);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ermis-pinned-messages__toggle {
|
|
35
|
+
margin-left: auto;
|
|
36
|
+
background: none;
|
|
37
|
+
border: none;
|
|
38
|
+
color: var(--ermis-accent);
|
|
39
|
+
font-size: var(--ermis-font-size-xs);
|
|
40
|
+
font-weight: 600;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
padding: 2px 6px;
|
|
43
|
+
border-radius: var(--ermis-radius-sm);
|
|
44
|
+
transition: background-color var(--ermis-transition);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ermis-pinned-messages__toggle:hover {
|
|
48
|
+
background-color: var(--ermis-bg-hover);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Accordion transition for the list */
|
|
52
|
+
.ermis-pinned-messages__list {
|
|
53
|
+
padding: 0 var(--ermis-spacing-md);
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
gap: 2px;
|
|
57
|
+
max-height: 0;
|
|
58
|
+
overflow-y: auto;
|
|
59
|
+
transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
|
|
60
|
+
scrollbar-width: thin;
|
|
61
|
+
/* Overlay on top of VList instead of pushing it down */
|
|
62
|
+
position: absolute;
|
|
63
|
+
top: 100%;
|
|
64
|
+
left: 0;
|
|
65
|
+
right: 0;
|
|
66
|
+
background-color: var(--ermis-bg-secondary);
|
|
67
|
+
z-index: 49;
|
|
68
|
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ermis-pinned-messages--expanded .ermis-pinned-messages__list {
|
|
72
|
+
max-height: 300px;
|
|
73
|
+
padding-bottom: var(--ermis-spacing-xs);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ermis-pinned-messages__item {
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: var(--ermis-spacing-sm);
|
|
80
|
+
padding: var(--ermis-spacing-xs) var(--ermis-spacing-sm);
|
|
81
|
+
border-radius: var(--ermis-radius-sm);
|
|
82
|
+
cursor: pointer;
|
|
83
|
+
transition: background-color var(--ermis-transition);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.ermis-pinned-messages__item:hover {
|
|
87
|
+
background-color: var(--ermis-bg-hover);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ermis-pinned-messages__item-content {
|
|
91
|
+
flex: 1;
|
|
92
|
+
min-width: 0;
|
|
93
|
+
display: flex;
|
|
94
|
+
flex-direction: column;
|
|
95
|
+
gap: 1px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.ermis-pinned-messages__item-user {
|
|
99
|
+
font-size: var(--ermis-font-size-xs);
|
|
100
|
+
font-weight: 600;
|
|
101
|
+
color: var(--ermis-text-primary);
|
|
102
|
+
white-space: nowrap;
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
text-overflow: ellipsis;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.ermis-pinned-messages__item-text {
|
|
108
|
+
font-size: var(--ermis-font-size-xs);
|
|
109
|
+
color: var(--ermis-text-secondary);
|
|
110
|
+
white-space: nowrap;
|
|
111
|
+
overflow: hidden;
|
|
112
|
+
text-overflow: ellipsis;
|
|
113
|
+
min-width: 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* --- Unpin button --- */
|
|
117
|
+
.ermis-pinned-messages__unpin-btn {
|
|
118
|
+
display: inline-flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
justify-content: center;
|
|
121
|
+
width: 26px;
|
|
122
|
+
height: 26px;
|
|
123
|
+
border: none;
|
|
124
|
+
background: none;
|
|
125
|
+
border-radius: var(--ermis-radius-sm);
|
|
126
|
+
color: var(--ermis-text-muted);
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
flex-shrink: 0;
|
|
129
|
+
transition: color var(--ermis-transition), background-color var(--ermis-transition);
|
|
130
|
+
opacity: 0;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.ermis-pinned-messages__item:hover .ermis-pinned-messages__unpin-btn {
|
|
134
|
+
opacity: 1;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.ermis-pinned-messages__unpin-btn:hover {
|
|
138
|
+
color: var(--ermis-accent);
|
|
139
|
+
background-color: var(--ermis-bg-hover);
|
|
140
|
+
}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
MessageSearchPanel — Search overlay inside ChannelInfo
|
|
3
|
+
========================================================================== */
|
|
4
|
+
|
|
5
|
+
/* Search box inside panel body */
|
|
6
|
+
.ermis-search-panel__search-box {
|
|
7
|
+
padding: 12px 16px;
|
|
8
|
+
border-bottom: 1px solid var(--ermis-border, rgba(0, 0, 0, 0.08));
|
|
9
|
+
flex-shrink: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ermis-search-panel__input-wrap {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 8px;
|
|
16
|
+
padding: 6px 12px;
|
|
17
|
+
background: var(--ermis-bg-secondary, #f5f5f5);
|
|
18
|
+
border-radius: 20px;
|
|
19
|
+
transition: background 0.15s;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.ermis-search-panel__input-wrap:focus-within {
|
|
23
|
+
background: var(--ermis-bg-hover, #ebebeb);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.ermis-search-panel__input-icon {
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
color: var(--ermis-text-secondary);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ermis-search-panel__input {
|
|
32
|
+
flex: 1;
|
|
33
|
+
border: none;
|
|
34
|
+
background: none;
|
|
35
|
+
outline: none;
|
|
36
|
+
font-size: 14px;
|
|
37
|
+
color: var(--ermis-text-primary);
|
|
38
|
+
line-height: 1.4;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ermis-search-panel__input::placeholder {
|
|
42
|
+
color: var(--ermis-text-tertiary, #999);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ermis-search-panel__input-clear {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
width: 20px;
|
|
50
|
+
height: 20px;
|
|
51
|
+
border: none;
|
|
52
|
+
background: var(--ermis-text-tertiary, #999);
|
|
53
|
+
color: #fff;
|
|
54
|
+
border-radius: 50%;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
flex-shrink: 0;
|
|
57
|
+
padding: 0;
|
|
58
|
+
transition: background 0.15s;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ermis-search-panel__input-clear:hover {
|
|
62
|
+
background: var(--ermis-text-secondary);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Results container */
|
|
66
|
+
.ermis-search-panel__results {
|
|
67
|
+
flex: 1;
|
|
68
|
+
overflow-y: auto;
|
|
69
|
+
overflow-x: hidden;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Idle state (no query) */
|
|
73
|
+
.ermis-search-panel__idle {
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
gap: 12px;
|
|
79
|
+
padding: 48px 16px;
|
|
80
|
+
color: var(--ermis-text-tertiary, #999);
|
|
81
|
+
text-align: center;
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Loading state */
|
|
86
|
+
.ermis-search-panel__loading {
|
|
87
|
+
display: flex;
|
|
88
|
+
flex-direction: column;
|
|
89
|
+
align-items: center;
|
|
90
|
+
justify-content: center;
|
|
91
|
+
gap: 12px;
|
|
92
|
+
padding: 48px 16px;
|
|
93
|
+
color: var(--ermis-text-secondary);
|
|
94
|
+
font-size: 14px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Spinner */
|
|
98
|
+
.ermis-search-panel__spinner {
|
|
99
|
+
width: 24px;
|
|
100
|
+
height: 24px;
|
|
101
|
+
border: 2.5px solid var(--ermis-border, rgba(0, 0, 0, 0.08));
|
|
102
|
+
border-top-color: var(--ermis-color-primary, #005fff);
|
|
103
|
+
border-radius: 50%;
|
|
104
|
+
animation: ermis-spin 0.7s linear infinite;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.ermis-search-panel__spinner--small {
|
|
108
|
+
width: 18px;
|
|
109
|
+
height: 18px;
|
|
110
|
+
border-width: 2px;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@keyframes ermis-spin {
|
|
114
|
+
to { transform: rotate(360deg); }
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Empty state */
|
|
118
|
+
.ermis-search-panel__empty {
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
justify-content: center;
|
|
122
|
+
padding: 48px 16px;
|
|
123
|
+
color: var(--ermis-text-tertiary, #999);
|
|
124
|
+
font-size: 14px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Result item */
|
|
128
|
+
.ermis-search-panel__result-item {
|
|
129
|
+
display: flex;
|
|
130
|
+
align-items: flex-start;
|
|
131
|
+
gap: 12px;
|
|
132
|
+
width: 100%;
|
|
133
|
+
padding: 12px 16px;
|
|
134
|
+
border: none;
|
|
135
|
+
background: none;
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
text-align: left;
|
|
138
|
+
transition: background 0.12s;
|
|
139
|
+
border-bottom: 1px solid var(--ermis-border, rgba(0, 0, 0, 0.04));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.ermis-search-panel__result-item:hover {
|
|
143
|
+
background: var(--ermis-bg-hover, rgba(0, 0, 0, 0.04));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.ermis-search-panel__result-item:active {
|
|
147
|
+
background: var(--ermis-bg-active, rgba(0, 0, 0, 0.07));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.ermis-search-panel__result-body {
|
|
151
|
+
flex: 1;
|
|
152
|
+
min-width: 0;
|
|
153
|
+
display: flex;
|
|
154
|
+
flex-direction: column;
|
|
155
|
+
gap: 2px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.ermis-search-panel__result-meta {
|
|
159
|
+
display: flex;
|
|
160
|
+
align-items: center;
|
|
161
|
+
justify-content: space-between;
|
|
162
|
+
gap: 8px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.ermis-search-panel__result-name {
|
|
166
|
+
font-size: 13px;
|
|
167
|
+
font-weight: 600;
|
|
168
|
+
color: var(--ermis-text-primary);
|
|
169
|
+
white-space: nowrap;
|
|
170
|
+
overflow: hidden;
|
|
171
|
+
text-overflow: ellipsis;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.ermis-search-panel__result-time {
|
|
175
|
+
font-size: 11px;
|
|
176
|
+
color: var(--ermis-text-tertiary, #999);
|
|
177
|
+
white-space: nowrap;
|
|
178
|
+
flex-shrink: 0;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.ermis-search-panel__result-text {
|
|
182
|
+
margin: 0;
|
|
183
|
+
font-size: 13px;
|
|
184
|
+
color: var(--ermis-text-secondary);
|
|
185
|
+
line-height: 1.4;
|
|
186
|
+
display: -webkit-box;
|
|
187
|
+
-webkit-line-clamp: 2;
|
|
188
|
+
line-clamp: 2;
|
|
189
|
+
-webkit-box-orient: vertical;
|
|
190
|
+
overflow: hidden;
|
|
191
|
+
word-break: break-word;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* Highlight matching text */
|
|
195
|
+
.ermis-search-panel__highlight {
|
|
196
|
+
background: rgba(255, 210, 0, 0.35);
|
|
197
|
+
color: var(--ermis-text-primary);
|
|
198
|
+
border-radius: 2px;
|
|
199
|
+
padding: 0 1px;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* Loading more indicator */
|
|
203
|
+
.ermis-search-panel__loading-more {
|
|
204
|
+
display: flex;
|
|
205
|
+
align-items: center;
|
|
206
|
+
justify-content: center;
|
|
207
|
+
padding: 12px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* End of results indicator */
|
|
211
|
+
.ermis-search-panel__end-indicator {
|
|
212
|
+
display: flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
justify-content: center;
|
|
215
|
+
padding: 24px 16px;
|
|
216
|
+
color: var(--ermis-text-tertiary, #999);
|
|
217
|
+
font-size: 13px;
|
|
218
|
+
text-align: center;
|
|
219
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/* ============================================================
|
|
2
|
+
Ermis Chat React – Design Tokens
|
|
3
|
+
BEM naming: .ermis-{block}__{element}--{modifier}
|
|
4
|
+
============================================================ */
|
|
5
|
+
|
|
6
|
+
/* ----------------------------------------------------------
|
|
7
|
+
Design Tokens – Dark (default)
|
|
8
|
+
---------------------------------------------------------- */
|
|
9
|
+
.ermis-chat,
|
|
10
|
+
.ermis-chat--dark {
|
|
11
|
+
--ermis-bg-primary: #0a0a0f;
|
|
12
|
+
--ermis-bg-secondary: #111118;
|
|
13
|
+
--ermis-bg-hover: rgba(255, 255, 255, 0.04);
|
|
14
|
+
--ermis-bg-active: rgba(99, 102, 241, 0.12);
|
|
15
|
+
--ermis-border: rgba(255, 255, 255, 0.08);
|
|
16
|
+
--ermis-accent: #6366f1;
|
|
17
|
+
--ermis-accent-hover: #818cf8;
|
|
18
|
+
--ermis-text-primary: #e5e7eb;
|
|
19
|
+
--ermis-text-secondary: #9ca3af;
|
|
20
|
+
--ermis-text-muted: #6b7280;
|
|
21
|
+
|
|
22
|
+
/* Message bubbles */
|
|
23
|
+
--ermis-bubble-own-bg: var(--ermis-accent);
|
|
24
|
+
--ermis-bubble-own-text: #ffffff;
|
|
25
|
+
--ermis-bubble-other-bg: #1e1e2a;
|
|
26
|
+
--ermis-bubble-other-text: var(--ermis-text-primary);
|
|
27
|
+
|
|
28
|
+
/* Quote message */
|
|
29
|
+
--ermis-quote-other-bg: rgba(99, 102, 241, 0.1);
|
|
30
|
+
--ermis-quote-other-bg-hover: rgba(99, 102, 241, 0.18);
|
|
31
|
+
--ermis-quote-own-bg: rgba(99, 102, 241, 0.2);
|
|
32
|
+
--ermis-quote-own-bg-hover: rgba(99, 102, 241, 0.3);
|
|
33
|
+
--ermis-quote-own-border: rgba(255, 255, 255, 0.4);
|
|
34
|
+
--ermis-quote-own-author: rgba(255, 255, 255, 0.9);
|
|
35
|
+
--ermis-quote-own-text: rgba(255, 255, 255, 0.65);
|
|
36
|
+
|
|
37
|
+
/* Typography */
|
|
38
|
+
--ermis-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
|
|
39
|
+
'Helvetica Neue', sans-serif;
|
|
40
|
+
--ermis-font-size-xs: 0.75rem;
|
|
41
|
+
--ermis-font-size-sm: 0.875rem;
|
|
42
|
+
--ermis-font-size-base: 1rem;
|
|
43
|
+
|
|
44
|
+
/* Spacing */
|
|
45
|
+
--ermis-spacing-xs: 0.25rem;
|
|
46
|
+
--ermis-spacing-sm: 0.5rem;
|
|
47
|
+
--ermis-spacing-md: 0.75rem;
|
|
48
|
+
--ermis-spacing-lg: 1rem;
|
|
49
|
+
|
|
50
|
+
/* Radius */
|
|
51
|
+
--ermis-radius-sm: 0.375rem;
|
|
52
|
+
--ermis-radius-md: 0.5rem;
|
|
53
|
+
--ermis-radius-lg: 0.75rem;
|
|
54
|
+
--ermis-radius-full: 9999px;
|
|
55
|
+
|
|
56
|
+
/* Transitions */
|
|
57
|
+
--ermis-transition: 150ms ease;
|
|
58
|
+
|
|
59
|
+
color: var(--ermis-text-primary);
|
|
60
|
+
font-family: var(--ermis-font-family);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* ----------------------------------------------------------
|
|
64
|
+
Design Tokens – Light
|
|
65
|
+
---------------------------------------------------------- */
|
|
66
|
+
.ermis-chat--light {
|
|
67
|
+
--ermis-bg-primary: #ffffff;
|
|
68
|
+
--ermis-bg-secondary: #f9fafb;
|
|
69
|
+
--ermis-bg-hover: rgba(0, 0, 0, 0.04);
|
|
70
|
+
--ermis-bg-active: rgba(99, 102, 241, 0.08);
|
|
71
|
+
--ermis-border: rgba(0, 0, 0, 0.08);
|
|
72
|
+
--ermis-accent: #6366f1;
|
|
73
|
+
--ermis-accent-hover: #4f46e5;
|
|
74
|
+
--ermis-text-primary: #111827;
|
|
75
|
+
--ermis-text-secondary: #6b7280;
|
|
76
|
+
--ermis-text-muted: #9ca3af;
|
|
77
|
+
|
|
78
|
+
/* Message bubbles */
|
|
79
|
+
--ermis-bubble-own-bg: var(--ermis-accent);
|
|
80
|
+
--ermis-bubble-own-text: #ffffff;
|
|
81
|
+
--ermis-bubble-other-bg: #f3f4f6;
|
|
82
|
+
--ermis-bubble-other-text: var(--ermis-text-primary);
|
|
83
|
+
|
|
84
|
+
/* Quote message */
|
|
85
|
+
--ermis-quote-other-bg: rgba(99, 102, 241, 0.08);
|
|
86
|
+
--ermis-quote-other-bg-hover: rgba(99, 102, 241, 0.14);
|
|
87
|
+
--ermis-quote-own-bg: rgba(0, 0, 0, 0.25);
|
|
88
|
+
--ermis-quote-own-bg-hover: rgba(0, 0, 0, 0.4);
|
|
89
|
+
--ermis-quote-own-border: rgba(255, 255, 255, 0.6);
|
|
90
|
+
--ermis-quote-own-author: rgba(255, 255, 255, 0.95);
|
|
91
|
+
--ermis-quote-own-text: rgba(255, 255, 255, 0.8);
|
|
92
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* ============================================================
|
|
2
|
+
Typing Indicator
|
|
3
|
+
============================================================ */
|
|
4
|
+
|
|
5
|
+
/* Container always rendered with fixed height to prevent layout shifts */
|
|
6
|
+
.ermis-typing-indicator {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: 6px;
|
|
10
|
+
padding: 0 16px;
|
|
11
|
+
height: 24px;
|
|
12
|
+
font-size: 12px;
|
|
13
|
+
color: var(--ermis-color-text-secondary, #8e8e93);
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ermis-typing-indicator__dots {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: 3px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ermis-typing-indicator__dot {
|
|
24
|
+
width: 5px;
|
|
25
|
+
height: 5px;
|
|
26
|
+
border-radius: 50%;
|
|
27
|
+
background-color: var(--ermis-color-text-secondary, #8e8e93);
|
|
28
|
+
animation: ermis-typing-bounce 1.4s infinite ease-in-out both;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ermis-typing-indicator__dot:nth-child(1) {
|
|
32
|
+
animation-delay: -0.32s;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ermis-typing-indicator__dot:nth-child(2) {
|
|
36
|
+
animation-delay: -0.16s;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ermis-typing-indicator__dot:nth-child(3) {
|
|
40
|
+
animation-delay: 0s;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@keyframes ermis-typing-bounce {
|
|
44
|
+
0%, 80%, 100% {
|
|
45
|
+
transform: scale(0.6);
|
|
46
|
+
opacity: 0.4;
|
|
47
|
+
}
|
|
48
|
+
40% {
|
|
49
|
+
transform: scale(1);
|
|
50
|
+
opacity: 1;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ermis-typing-indicator__text {
|
|
55
|
+
font-style: italic;
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
text-overflow: ellipsis;
|
|
59
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* ============================================================
|
|
2
|
+
Ermis Chat React – Default Styles
|
|
3
|
+
BEM naming: .ermis-{block}__{element}--{modifier}
|
|
4
|
+
============================================================ */
|
|
5
|
+
|
|
6
|
+
@import './_tokens.css';
|
|
7
|
+
@import './_base.css';
|
|
8
|
+
@import './_dropdown.css';
|
|
9
|
+
@import './_modal.css';
|
|
10
|
+
@import './_panel.css';
|
|
11
|
+
@import './_channel-list.css';
|
|
12
|
+
@import './_message-list.css';
|
|
13
|
+
@import './_message-bubble.css';
|
|
14
|
+
@import './_message-input.css';
|
|
15
|
+
@import './_mentions.css';
|
|
16
|
+
@import './_pinned-messages.css';
|
|
17
|
+
@import './_message-actions.css';
|
|
18
|
+
@import './_forward-modal.css';
|
|
19
|
+
@import './_typing-indicator.css';
|
|
20
|
+
@import './_message-reactions.css';
|
|
21
|
+
@import './_message-quick-reactions.css';
|
|
22
|
+
@import './_channel-info.css';
|
|
23
|
+
@import './_add-member-modal.css';
|
|
24
|
+
@import './_search-panel.css';
|