@appsocom/react 0.0.0-stage → 0.5.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/styles.css ADDED
@@ -0,0 +1,360 @@
1
+ /* @appsocom/react default styles. Theme by overriding the variables on .sfk-conference (or :root). */
2
+ :root {
3
+ --sfk-bg: #111318;
4
+ --sfk-surface: #1d2028;
5
+ --sfk-surface-2: #2a2e39;
6
+ --sfk-text: #f2f3f5;
7
+ --sfk-muted: #a3a8b5;
8
+ --sfk-accent: #4f8cff;
9
+ --sfk-danger: #e5484d;
10
+ --sfk-speaking: #3ecf8e;
11
+ --sfk-radius: 12px;
12
+ --sfk-gap: 8px;
13
+ --sfk-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
14
+ }
15
+
16
+ .sfk-conference {
17
+ display: flex;
18
+ flex-direction: column;
19
+ height: 100%;
20
+ min-height: 0;
21
+ background: var(--sfk-bg);
22
+ color: var(--sfk-text);
23
+ font-family: var(--sfk-font);
24
+ position: relative;
25
+ }
26
+ .sfk-stage {
27
+ flex: 1;
28
+ display: flex;
29
+ min-height: 0;
30
+ gap: var(--sfk-gap);
31
+ padding: var(--sfk-gap);
32
+ }
33
+
34
+ /* grid */
35
+ .sfk-grid {
36
+ flex: 1;
37
+ display: grid;
38
+ gap: var(--sfk-gap);
39
+ grid-template-columns: repeat(var(--sfk-cols, 1), minmax(0, 1fr));
40
+ grid-auto-rows: minmax(0, 1fr);
41
+ min-height: 0;
42
+ }
43
+ .sfk-grid-focus {
44
+ display: flex;
45
+ flex-direction: column;
46
+ }
47
+ .sfk-focus {
48
+ flex: 1;
49
+ display: grid;
50
+ gap: var(--sfk-gap);
51
+ grid-template-columns: repeat(var(--sfk-cols, 1), minmax(0, 1fr));
52
+ min-height: 0;
53
+ }
54
+ .sfk-strip {
55
+ display: flex;
56
+ gap: var(--sfk-gap);
57
+ height: 120px;
58
+ overflow-x: auto;
59
+ flex: none;
60
+ }
61
+ .sfk-strip .sfk-tile {
62
+ flex: 0 0 auto;
63
+ width: 180px;
64
+ }
65
+ @media (max-width: 640px) {
66
+ .sfk-grid:not(.sfk-grid-focus) {
67
+ grid-template-columns: repeat(min(var(--sfk-cols, 1), 2), minmax(0, 1fr));
68
+ }
69
+ .sfk-strip {
70
+ height: 90px;
71
+ }
72
+ .sfk-strip .sfk-tile {
73
+ width: 130px;
74
+ }
75
+ }
76
+
77
+ /* tile */
78
+ .sfk-tile {
79
+ position: relative;
80
+ overflow: hidden;
81
+ border-radius: var(--sfk-radius);
82
+ background: var(--sfk-surface);
83
+ min-height: 0;
84
+ aspect-ratio: auto;
85
+ outline: 2px solid transparent;
86
+ transition: outline-color 0.15s;
87
+ }
88
+ .sfk-tile.sfk-speaking {
89
+ outline-color: var(--sfk-speaking);
90
+ }
91
+ .sfk-video {
92
+ width: 100%;
93
+ height: 100%;
94
+ display: block;
95
+ background: #000;
96
+ }
97
+ .sfk-mirror {
98
+ transform: scaleX(-1);
99
+ }
100
+ .sfk-avatar {
101
+ width: 100%;
102
+ height: 100%;
103
+ min-height: 80px;
104
+ display: flex;
105
+ align-items: center;
106
+ justify-content: center;
107
+ }
108
+ .sfk-avatar span {
109
+ display: inline-flex;
110
+ align-items: center;
111
+ justify-content: center;
112
+ min-width: 64px;
113
+ height: 64px;
114
+ padding: 0 12px;
115
+ border-radius: 32px;
116
+ background: var(--sfk-surface-2);
117
+ font-size: 22px;
118
+ font-weight: 600;
119
+ }
120
+ .sfk-tile-bar {
121
+ position: absolute;
122
+ left: 8px;
123
+ bottom: 8px;
124
+ right: 8px;
125
+ display: flex;
126
+ align-items: center;
127
+ gap: 6px;
128
+ font-size: 13px;
129
+ pointer-events: none;
130
+ }
131
+ .sfk-tile-bar > * {
132
+ background: rgba(0, 0, 0, 0.55);
133
+ border-radius: 6px;
134
+ padding: 2px 6px;
135
+ }
136
+ .sfk-name {
137
+ overflow: hidden;
138
+ text-overflow: ellipsis;
139
+ white-space: nowrap;
140
+ }
141
+ .sfk-role {
142
+ text-transform: capitalize;
143
+ color: var(--sfk-muted);
144
+ }
145
+ .sfk-muted {
146
+ color: var(--sfk-danger);
147
+ display: inline-flex;
148
+ }
149
+ .sfk-quality {
150
+ display: inline-flex;
151
+ gap: 2px;
152
+ align-items: flex-end;
153
+ height: 18px;
154
+ margin-left: auto;
155
+ }
156
+ .sfk-quality i {
157
+ width: 3px;
158
+ background: var(--sfk-muted);
159
+ opacity: 0.4;
160
+ }
161
+ .sfk-quality i:nth-child(1) { height: 5px; }
162
+ .sfk-quality i:nth-child(2) { height: 8px; }
163
+ .sfk-quality i:nth-child(3) { height: 11px; }
164
+ .sfk-quality i.on { opacity: 1; background: var(--sfk-speaking); }
165
+ .sfk-quality-poor i.on { background: #f5a524; }
166
+ .sfk-quality-lost i { background: var(--sfk-danger); }
167
+
168
+ /* moderation menu */
169
+ .sfk-mod {
170
+ position: absolute;
171
+ top: 6px;
172
+ right: 6px;
173
+ }
174
+ .sfk-mod-btn {
175
+ background: rgba(0, 0, 0, 0.55);
176
+ color: var(--sfk-text);
177
+ border: 0;
178
+ border-radius: 6px;
179
+ padding: 2px 8px;
180
+ cursor: pointer;
181
+ font-size: 16px;
182
+ }
183
+ .sfk-menu {
184
+ position: absolute;
185
+ right: 0;
186
+ top: 100%;
187
+ margin-top: 4px;
188
+ background: var(--sfk-surface-2);
189
+ border-radius: 8px;
190
+ padding: 4px;
191
+ display: flex;
192
+ flex-direction: column;
193
+ min-width: 160px;
194
+ z-index: 5;
195
+ }
196
+ .sfk-menu button {
197
+ background: none;
198
+ border: 0;
199
+ color: var(--sfk-text);
200
+ text-align: left;
201
+ padding: 6px 10px;
202
+ border-radius: 6px;
203
+ cursor: pointer;
204
+ font: inherit;
205
+ }
206
+ .sfk-menu button:hover { background: var(--sfk-surface); }
207
+ .sfk-menu .sfk-danger { color: var(--sfk-danger); }
208
+
209
+ /* controls */
210
+ .sfk-controls {
211
+ display: flex;
212
+ justify-content: center;
213
+ flex-wrap: wrap;
214
+ gap: 10px;
215
+ padding: 12px;
216
+ }
217
+ .sfk-btn {
218
+ width: 48px;
219
+ height: 48px;
220
+ border-radius: 24px;
221
+ border: 0;
222
+ background: var(--sfk-surface-2);
223
+ color: var(--sfk-text);
224
+ display: inline-flex;
225
+ align-items: center;
226
+ justify-content: center;
227
+ cursor: pointer;
228
+ }
229
+ .sfk-btn:hover { filter: brightness(1.15); }
230
+ .sfk-btn:focus-visible, .sfk-join:focus-visible { outline: 2px solid var(--sfk-accent); outline-offset: 2px; }
231
+ .sfk-btn.sfk-off { background: var(--sfk-danger); }
232
+ .sfk-btn.sfk-active { background: var(--sfk-accent); }
233
+ .sfk-leave { background: var(--sfk-danger); width: 64px; }
234
+ .sfk-devices-wrap { position: relative; }
235
+ .sfk-popover {
236
+ position: absolute;
237
+ bottom: 100%;
238
+ left: 50%;
239
+ transform: translateX(-50%);
240
+ margin-bottom: 8px;
241
+ background: var(--sfk-surface-2);
242
+ border-radius: var(--sfk-radius);
243
+ padding: 12px;
244
+ display: flex;
245
+ flex-direction: column;
246
+ gap: 8px;
247
+ width: min(300px, 90vw);
248
+ z-index: 5;
249
+ }
250
+
251
+ /* devices / forms */
252
+ .sfk-device {
253
+ display: flex;
254
+ flex-direction: column;
255
+ gap: 4px;
256
+ font-size: 13px;
257
+ color: var(--sfk-muted);
258
+ }
259
+ .sfk-device select, .sfk-device input, .sfk-chat-form input {
260
+ background: var(--sfk-surface);
261
+ color: var(--sfk-text);
262
+ border: 1px solid var(--sfk-surface-2);
263
+ border-radius: 8px;
264
+ padding: 8px;
265
+ font: inherit;
266
+ min-width: 0;
267
+ }
268
+ .sfk-check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
269
+
270
+ /* prejoin */
271
+ .sfk-prejoin {
272
+ margin: auto;
273
+ width: min(480px, 100%);
274
+ padding: 16px;
275
+ display: flex;
276
+ flex-direction: column;
277
+ gap: 12px;
278
+ box-sizing: border-box;
279
+ }
280
+ .sfk-prejoin-preview {
281
+ position: relative;
282
+ aspect-ratio: 16 / 9;
283
+ border-radius: var(--sfk-radius);
284
+ overflow: hidden;
285
+ background: var(--sfk-surface);
286
+ }
287
+ .sfk-prejoin-toggles {
288
+ position: absolute;
289
+ bottom: 12px;
290
+ left: 0;
291
+ right: 0;
292
+ display: flex;
293
+ justify-content: center;
294
+ gap: 10px;
295
+ }
296
+ .sfk-level {
297
+ position: absolute;
298
+ left: 12px;
299
+ right: 12px;
300
+ top: 12px;
301
+ height: 4px;
302
+ background: rgba(255, 255, 255, 0.15);
303
+ border-radius: 2px;
304
+ overflow: hidden;
305
+ }
306
+ .sfk-level i { display: block; height: 100%; background: var(--sfk-speaking); transition: width 0.1s; }
307
+ .sfk-join {
308
+ background: var(--sfk-accent);
309
+ color: #fff;
310
+ border: 0;
311
+ border-radius: 10px;
312
+ padding: 12px;
313
+ font: inherit;
314
+ font-weight: 600;
315
+ cursor: pointer;
316
+ }
317
+ .sfk-error { color: var(--sfk-danger); margin: 0; }
318
+
319
+ /* chat */
320
+ .sfk-chat {
321
+ width: 300px;
322
+ flex: none;
323
+ display: flex;
324
+ flex-direction: column;
325
+ background: var(--sfk-surface);
326
+ border-radius: var(--sfk-radius);
327
+ min-height: 0;
328
+ }
329
+ .sfk-chat-list { flex: 1; overflow-y: auto; padding: 10px; font-size: 14px; }
330
+ .sfk-chat-msg { margin-bottom: 6px; overflow-wrap: anywhere; }
331
+ .sfk-chat-form { padding: 8px; display: flex; }
332
+ .sfk-chat-form input { flex: 1; }
333
+ @media (max-width: 640px) {
334
+ .sfk-stage { flex-direction: column; }
335
+ .sfk-chat { width: auto; height: 40%; }
336
+ }
337
+
338
+ /* status */
339
+ .sfk-banner {
340
+ position: absolute;
341
+ top: 8px;
342
+ left: 50%;
343
+ transform: translateX(-50%);
344
+ background: #f5a524;
345
+ color: #111;
346
+ padding: 6px 14px;
347
+ border-radius: 16px;
348
+ font-size: 14px;
349
+ z-index: 10;
350
+ }
351
+ .sfk-connecting, .sfk-ended {
352
+ display: flex;
353
+ flex-direction: column;
354
+ align-items: center;
355
+ justify-content: center;
356
+ gap: 12px;
357
+ flex: 1;
358
+ color: var(--sfk-muted);
359
+ }
360
+ .sfk-data-usage { font-size: 12px; opacity: 0.8; white-space: nowrap; }