-
Notifications
You must be signed in to change notification settings - Fork 298
Expand file tree
/
Copy pathMessageComposer.scss
More file actions
426 lines (396 loc) Β· 14.7 KB
/
MessageComposer.scss
File metadata and controls
426 lines (396 loc) Β· 14.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
@use '../../../styling/utils';
.str-chat {
/*
* MessageInput theme variables (ported from stream-chat-css v2 MessageInput theme),
* set to match the current React SDK MessageComposer styling.
*
* Note: React's "composer" uses different class names than v2's `str-chat__message-input`,
* so we apply layer overrides to the closest equivalents in this file.
*/
--str-chat__message-input-border-radius: var(--radius-3xl);
--str-chat__message-input-color: var(--input-text-default);
--str-chat__message-input-background-color: var(--composer-bg);
--str-chat__message-input-border-block-start: 1px solid var(--border-core-default);
--str-chat__message-input-border-block-end: 1px solid var(--border-core-default);
--str-chat__message-input-border-inline-start: 1px solid var(--border-core-default);
--str-chat__message-input-border-inline-end: 1px solid var(--border-core-default);
--str-chat__message-input-box-shadow: none;
--str-chat__message-textarea-border-radius: 0;
--str-chat__message-textarea-color: var(--input-text-default);
--str-chat__message-textarea-background-color: transparent;
--str-chat__message-textarea-border-block-start: 0;
--str-chat__message-textarea-border-block-end: 0;
--str-chat__message-textarea-border-inline-start: 0;
--str-chat__message-textarea-border-inline-end: 0;
--str-chat__message-textarea-box-shadow: none;
--str-chat__cooldown-border-radius: var(--button-radius-full);
--str-chat__cooldown-color: var(--text-disabled);
--str-chat__cooldown-background-color: var(--background-core-disabled);
--str-chat__cooldown-border-block-start: 0;
--str-chat__cooldown-border-block-end: 0;
--str-chat__cooldown-border-inline-start: 0;
--str-chat__cooldown-border-inline-end: 0;
--str-chat__cooldown-box-shadow: none;
--str-chat__message-composer-max-width: 768px;
--str-chat__message-composer-padding: var(--spacing-md);
.str-chat__message-composer-container {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
gap: var(--spacing-xs);
justify-content: center;
padding: var(--str-chat__message-composer-padding);
min-width: 0;
}
.str-chat__message-composer {
display: flex;
align-items: end;
width: 100%;
max-width: var(--str-chat__message-composer-max-width);
gap: var(--spacing-xs);
min-width: 0;
flex-shrink: 1;
}
.str-chat__message-composer-compose-area {
display: flex;
flex-direction: column;
width: 100%;
min-width: 0;
@include utils.component-layer-overrides('message-input');
}
.str-chat__message-composer-previews {
display: flex;
flex-direction: column;
width: 100%;
padding: var(--spacing-xs) var(--spacing-xs) 0;
gap: var(--spacing-xxs);
min-width: 0;
}
.str-chat__message-composer-controls {
display: flex;
align-items: end;
width: 100%;
gap: var(--spacing-xs);
padding: var(--spacing-sm);
$controls-containers-min-height: 26px;
.str-chat__message-composer__actions,
.str-chat__message-composer__additional-actions {
height: $controls-containers-min-height;
display: flex;
align-items: center;
}
.str-chat__textarea {
flex: 1;
position: relative;
display: flex;
align-items: center;
margin-inline: var(--spacing-xxs) var(--spacing-xs);
textarea {
@include utils.component-layer-overrides('message-textarea');
resize: none;
border: none;
box-shadow: none;
outline: none;
width: 100%;
font-size: var(--typography-font-size-md);
}
}
.str-chat__emoji-picker-button {
display: flex;
cursor: pointer;
svg {
height: var(--icon-size-md);
width: var(--icon-size-md);
}
}
.str-chat__start-recording-audio-button {
.str-chat__icon--microphone {
height: var(--icon-size-md);
width: var(--icon-size-md);
}
}
.str-chat__send-button {
.str-chat__icon--paper-plane {
height: var(--icon-size-md);
width: var(--icon-size-md);
}
}
// todo: we need designs for this - I am hard-coding the dimensions
.str-chat__stop-ai-generation-button {
width: 30px;
height: 28px;
cursor: pointer;
background-image: var(--str-chat__circle-stop-icon);
background-color: transparent;
border-width: 0;
}
.str-chat__message-input-cooldown {
@include utils.component-layer-overrides('cooldown');
display: flex;
align-items: center;
justify-content: center;
height: var(--button-visual-height-md);
width: var(--button-visual-height-md);
border-radius: var(--str-chat__cooldown-border-radius);
}
[dir='rtl'] .str-chat__send-button,
[dir='rtl'] .str-chat__start-recording-audio-button {
svg {
transform: scale(-1, 1);
}
}
}
// todo: need designs? what kind of action buttons to use on modals?
.str-chat__recording-permission-denied-notification {
max-width: 100%;
padding: var(--spacing-md);
font-size: var(--typography-font-size-sm);
line-height: var(--typography-line-height-tight);
.str-chat__recording-permission-denied-notification__heading {
font-weight: var(--typography-font-weight-semi-bold);
}
.str-chat__recording-permission-denied-notification__message {
margin: var(--spacing-xs) 0 0;
font-weight: var(--typography-font-weight-regular, 400);
}
}
// todo: need designs?
.str-chat__send-to-channel-checkbox__container {
width: 100%;
display: flex;
align-items: flex-start;
padding-inline: 0.75rem;
max-width: var(--str-chat__message-composer-max-width);
.str-chat__send-to-channel-checkbox__field {
display: flex;
align-items: center;
* {
cursor: pointer;
}
label {
padding-inline: 0.5rem;
color: var(--str-chat__text-low-emphasis-color);
font: var(--str-chat__body-text);
}
input {
margin: 0;
}
}
}
}
//
//
//// theme
//
//.str-chat {
// /* The border radius of the component */
// --str-chat__message-input-border-radius: 0;
//
// /* The text/icon color of the component */
// --str-chat__message-input-color: var(--str-chat__text-color);
//
// /* The background color of the component */
// --str-chat__message-input-background-color: var(--str-chat__secondary-background-color);
//
// /* Top border of the component */
// --str-chat__message-input-border-block-start: none;
//
// /* Bottom border of the component */
// --str-chat__message-input-border-block-end: none;
//
// /* Left (right in RTL layout) border of the component */
// --str-chat__message-input-border-inline-start: none;
//
// /* Right (left in RTL layout) border of the component */
// --str-chat__message-input-border-inline-end: none;
//
// /* Box shadow applied to the component */
// --str-chat__message-input-box-shadow: none;
//
// /* The border radius used for the borders of the textarea */
// --str-chat__message-textarea-border-radius: var(--str-chat__border-radius-md);
//
// /* The text/icon color of the textarea */
// --str-chat__message-textarea-color: var(--str-chat__text-color);
//
// /* The background color of the textarea */
// --str-chat__message-textarea-background-color: transparent;
//
// /* Top border of the textarea */
// --str-chat__message-textarea-border-block-start: 1px solid var(--str-chat__surface-color);
//
// /* Bottom border of the textarea */
// --str-chat__message-textarea-border-block-end: 1px solid var(--str-chat__surface-color);
//
// /* Left (right in RTL layout) border of the textarea */
// --str-chat__message-textarea-border-inline-start: 1px solid var(--str-chat__surface-color);
//
// /* Right (left in RTL layout) border of the textarea */
// --str-chat__message-textarea-border-inline-end: 1px solid var(--str-chat__surface-color);
//
// /* Box shadow applied to the textarea */
// --str-chat__message-textarea-box-shadow: none;
//
// /* The border radius used for the borders of the send button */
// --str-chat__message-send-border-radius: var(--str-chat__border-radius-circle);
//
// /* The text/icon color of the send button */
// --str-chat__message-send-color: var(--str-chat__primary-color);
//
// /* The background color of the send button */
// --str-chat__message-send-background-color: transparent;
//
// /* Top border of the send button */
// --str-chat__message-send-border-block-start: 0;
//
// /* Bottom border of the send button */
// --str-chat__message-send-border-block-end: 0;
//
// /* Left (right in RTL layout) border of the send button */
// --str-chat__message-send-border-inline-start: 0;
//
// /* Right (left in RTL layout) border of the send button */
// --str-chat__message-send-border-inline-end: 0;
//
// /* Box shadow applied to the send button */
// --str-chat__message-send-box-shadow: none;
//
// /* The color of the send button in disabled state */
// --str-chat__message-send-disabled-color: var(--str-chat__disabled-color);
//
// /* The background color of the send button in disabled state */
// --str-chat__message-send-disabled-background-color: var(--str-chat__disabled-color);
//
// /* The border radius used for the borders of the audio recording button */
// --str-chat__start-recording-audio-button-border-radius: var(--str-chat__border-radius-circle);
//
// /* The text/icon color of the audio recording button */
// --str-chat__start-recording-audio-button-color: var(--str-chat__text-low-emphasis-color);
//
// /* The background color of the audio recording button */
// --str-chat__start-recording-audio-button-background-color: transparent;
//
// /* Top border of the audio recording button */
// --str-chat__start-recording-audio-button-border-block-start: 0;
//
// /* Bottom border of the audio recording button */
// --str-chat__start-recording-audio-button-border-block-end: 0;
//
// /* Left (right in RTL layout) border of the audio recording button */
// --str-chat__start-recording-audio-button-border-inline-start: 0;
//
// /* Right (left in RTL layout) border of the audio recording button */
// --str-chat__start-recording-audio-button-border-inline-end: 0;
//
// /* Box shadow applied to the audio recording button */
// --str-chat__start-recording-audio-button-box-shadow: none;
//
// /* The color of the audio recording button in disabled state */
// --str-chat__start-recording-audio-button-disabled-color: var(--str-chat__disabled-color);
//
// /* The background color of the audio recording button in disabled state */
// --str-chat__start-recording-audio-button-disabled-background-color: transparent;
//
// /* The border radius used for the borders of the tool buttons of the message input (such as attachment upload button) */
// --str-chat__message-input-tools-border-radius: var(--str-chat__border-radius-circle);
//
// /* The text/icon color of the tool buttons of the message input (such as attachment upload button) */
// --str-chat__message-input-tools-color: var(--str-chat__text-low-emphasis-color);
//
// /* The background color of the tool buttons of the message input (such as attachment upload button) */
// --str-chat__message-input-tools-background-color: transparent;
//
// /* Top border of the tool buttons of the message input (such as attachment upload button) */
// --str-chat__message-input-tools-border-block-start: 0;
//
// /* Bottom border of the tool buttons of the message input (such as attachment upload button) */
// --str-chat__message-input-tools-border-block-end: 0;
//
// /* Left (right in RTL layout) border of the tool buttons of the message input (such as attachment upload button) */
// --str-chat__message-input-tools-border-inline-start: 0;
//
// /* Right (left in RTL layout) border of the tool buttons of the message input (such as attachment upload button) */
// --str-chat__message-input-tools-border-inline-end: 0;
//
// /* Box shadow applied to the tool buttons of the message input (such as attachment upload button) */
// --str-chat__message-input-tools-box-shadow: none;
//
//
// /* Color applied to an icon in a button that opens attachment selector */
// --str-chat__attachment-selector-button-icon-color: var(--str-chat__text-low-emphasis-color);
//
// /* Color applied to an icon in a button that opens attachment selector when hovered over */
// --str-chat__attachment-selector-button-icon-color-hover: var(--str-chat__primary-color);
//
// /* Color applied to an attachment selector menu item icon when hovered over */
// --str-chat__attachment-selector-actions-menu-button-icon-color: var(--str-chat__primary-color);
//
// /* Color applied to an attachment selector menu item icon when hovered over or focused */
// --str-chat__attachment-selector-actions-menu-button-icon-color-active: var(
// --str-chat__primary-color
// );
//}
//
//.str-chat__message-input {
// @include utils.component-layer-overrides('message-input');
//
// .str-chat__file-input-container {
// --str-chat-icon-color: var(--str-chat__message-input-tools-color);
// @include utils.component-layer-overrides('message-input-tools');
//
// svg path {
// fill: var(--str-chat__message-input-tools-color);
// }
// }
//
// .str-chat__attachment-preview-image-error {
// svg path {
// fill: var(--str-chat__primary-color);
// }
// }
//
//
//
//.str-chat__attachment-selector-actions-menu {
// .str-chat__attachment-selector-actions-menu__button {
// color: var(--str-chat__text-low-emphasis-color);
//
// .str-chat__context-menu__button-icon {
// background-color: var(--str-chat__attachment-selector-actions-menu-button-icon-color);
// }
//
// &:hover,
// &:focus {
// color: var(--str-chat__text-color);
//
// .str-chat__context-menu__button-icon {
// background-color: var(
// --str-chat__attachment-selector-actions-menu-button-icon-color-active
// );
// }
// }
// }
//
// .str-chat__attachment-selector-actions-menu__upload-file-button {
// .str-chat__context-menu__button-icon {
// -webkit-mask: var(--str-chat__folder-icon) no-repeat center / contain;
// mask: var(--str-chat__folder-icon) no-repeat center / contain;
// }
// }
//
// .str-chat__attachment-selector-actions-menu__create-poll-button {
// .str-chat__context-menu__button-icon {
// -webkit-mask: var(--str-chat__poll-icon) no-repeat center / contain;
// mask: var(--str-chat__poll-icon) no-repeat center / contain;
// }
// }
//
// .str-chat__attachment-selector-actions-menu__add-location-button {
// .str-chat__context-menu__button-icon {
// -webkit-mask: var(--str-chat__location-icon) no-repeat center / contain;
// mask: var(--str-chat__location-icon) no-repeat center / contain;
// }
// }
//}
//