test-chat-component-per 1.0.1

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.
@@ -0,0 +1,430 @@
1
+ /**
2
+ * DelaChat Component Styles
3
+ * Version: 1.0.0
4
+ *
5
+ * All classes prefixed with 'delachat-' to avoid conflicts
6
+ */
7
+
8
+ /* ============================================
9
+ Variables & Theme
10
+ ============================================ */
11
+ :root {
12
+ --delachat-primary: #7C3AED;
13
+ --delachat-primary-dark: #6D28D9;
14
+ --delachat-primary-light: #8B5CF6;
15
+ --delachat-text: #1F2937;
16
+ --delachat-text-light: #6B7280;
17
+ --delachat-bg: #FFFFFF;
18
+ --delachat-bg-secondary: #F9FAFB;
19
+ --delachat-border: #E5E7EB;
20
+ --delachat-user-bg: #7C3AED;
21
+ --delachat-ai-bg: #F3F4F6;
22
+ --delachat-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
23
+ }
24
+
25
+ [data-theme="dark"] {
26
+ --delachat-text: #F9FAFB;
27
+ --delachat-text-light: #D1D5DB;
28
+ --delachat-bg: #1F2937;
29
+ --delachat-bg-secondary: #111827;
30
+ --delachat-border: #374151;
31
+ --delachat-ai-bg: #374151;
32
+ }
33
+
34
+ /* ============================================
35
+ Reset & Base
36
+ ============================================ */
37
+ .delachat-window * {
38
+ box-sizing: border-box;
39
+ margin: 0;
40
+ padding: 0;
41
+ }
42
+
43
+ /* ============================================
44
+ Main Container
45
+ ============================================ */
46
+ .delachat-window {
47
+ display: flex;
48
+ flex-direction: column;
49
+ background: var(--delachat-bg);
50
+ border-radius: 12px;
51
+ box-shadow: var(--delachat-shadow);
52
+ overflow: hidden;
53
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
54
+ font-size: 14px;
55
+ color: var(--delachat-text);
56
+ }
57
+
58
+ /* ============================================
59
+ Header
60
+ ============================================ */
61
+ .delachat-header {
62
+ background: var(--delachat-primary);
63
+ color: white;
64
+ padding: 16px;
65
+ display: flex;
66
+ align-items: center;
67
+ justify-content: space-between;
68
+ flex-shrink: 0;
69
+ }
70
+
71
+ .delachat-title {
72
+ font-size: 18px;
73
+ font-weight: 600;
74
+ margin: 0;
75
+ }
76
+
77
+ .delachat-header-buttons {
78
+ display: flex;
79
+ gap: 8px;
80
+ }
81
+
82
+ .delachat-btn-icon {
83
+ background: transparent;
84
+ border: none;
85
+ color: white;
86
+ cursor: pointer;
87
+ padding: 6px;
88
+ border-radius: 6px;
89
+ transition: background 0.2s;
90
+ display: flex;
91
+ align-items: center;
92
+ justify-content: center;
93
+ width: 32px;
94
+ height: 32px;
95
+ }
96
+
97
+ .delachat-btn-icon:hover {
98
+ background: var(--delachat-primary-dark);
99
+ }
100
+
101
+ .delachat-icon {
102
+ font-size: 16px;
103
+ line-height: 1;
104
+ }
105
+
106
+ /* ============================================
107
+ Disclaimer
108
+ ============================================ */
109
+ .delachat-disclaimer {
110
+ background: #FEF3C7;
111
+ border-bottom: 1px solid #F59E0B;
112
+ padding: 12px 16px;
113
+ font-size: 13px;
114
+ color: #92400E;
115
+ }
116
+
117
+ /* ============================================
118
+ Error Message
119
+ ============================================ */
120
+ .delachat-error {
121
+ background: #FEE2E2;
122
+ border-bottom: 1px solid #EF4444;
123
+ padding: 12px 16px;
124
+ font-size: 13px;
125
+ color: #991B1B;
126
+ }
127
+
128
+ /* ============================================
129
+ Messages Area
130
+ ============================================ */
131
+ .delachat-messages {
132
+ flex: 1;
133
+ overflow-y: auto;
134
+ padding: 16px;
135
+ background: var(--delachat-bg);
136
+ display: flex;
137
+ flex-direction: column-reverse;
138
+ gap: 16px;
139
+ }
140
+
141
+ .delachat-messages::-webkit-scrollbar {
142
+ width: 6px;
143
+ }
144
+
145
+ .delachat-messages::-webkit-scrollbar-track {
146
+ background: var(--delachat-bg-secondary);
147
+ }
148
+
149
+ .delachat-messages::-webkit-scrollbar-thumb {
150
+ background: var(--delachat-border);
151
+ border-radius: 3px;
152
+ }
153
+
154
+ .delachat-messages::-webkit-scrollbar-thumb:hover {
155
+ background: var(--delachat-text-light);
156
+ }
157
+
158
+ /* ============================================
159
+ Welcome Message
160
+ ============================================ */
161
+ .delachat-welcome {
162
+ display: flex;
163
+ flex-direction: column;
164
+ align-items: center;
165
+ justify-content: center;
166
+ text-align: center;
167
+ padding: 40px 20px;
168
+ color: var(--delachat-text-light);
169
+ }
170
+
171
+ .delachat-ai-avatar-large {
172
+ width: 64px;
173
+ height: 64px;
174
+ background: var(--delachat-primary);
175
+ border-radius: 50%;
176
+ display: flex;
177
+ align-items: center;
178
+ justify-content: center;
179
+ font-size: 32px;
180
+ margin-bottom: 16px;
181
+ }
182
+
183
+ .delachat-welcome p {
184
+ max-width: 300px;
185
+ line-height: 1.5;
186
+ }
187
+
188
+ /* ============================================
189
+ Message Bubble
190
+ ============================================ */
191
+ .delachat-message {
192
+ display: flex;
193
+ gap: 12px;
194
+ align-items: flex-start;
195
+ }
196
+
197
+ .delachat-message-user {
198
+ flex-direction: row-reverse;
199
+ }
200
+
201
+ .delachat-avatar {
202
+ width: 32px;
203
+ height: 32px;
204
+ background: var(--delachat-text-light);
205
+ border-radius: 50%;
206
+ display: flex;
207
+ align-items: center;
208
+ justify-content: center;
209
+ flex-shrink: 0;
210
+ font-size: 16px;
211
+ }
212
+
213
+ .delachat-message-user .delachat-avatar {
214
+ background: var(--delachat-primary);
215
+ }
216
+
217
+ .delachat-message-content {
218
+ flex: 1;
219
+ display: flex;
220
+ flex-direction: column;
221
+ gap: 6px;
222
+ max-width: 75%;
223
+ }
224
+
225
+ .delachat-message-user .delachat-message-content {
226
+ align-items: flex-end;
227
+ }
228
+
229
+ .delachat-message-bubble {
230
+ padding: 12px 16px;
231
+ border-radius: 12px;
232
+ line-height: 1.5;
233
+ word-wrap: break-word;
234
+ white-space: pre-wrap;
235
+ }
236
+
237
+ .delachat-message-ai .delachat-message-bubble {
238
+ background: var(--delachat-ai-bg);
239
+ color: var(--delachat-text);
240
+ border-bottom-left-radius: 4px;
241
+ }
242
+
243
+ .delachat-message-user .delachat-message-bubble {
244
+ background: var(--delachat-user-bg);
245
+ color: white;
246
+ border-bottom-right-radius: 4px;
247
+ }
248
+
249
+ /* ============================================
250
+ Message Actions
251
+ ============================================ */
252
+ .delachat-message-actions {
253
+ display: flex;
254
+ gap: 8px;
255
+ padding-left: 4px;
256
+ }
257
+
258
+ .delachat-btn-action {
259
+ background: transparent;
260
+ border: none;
261
+ color: var(--delachat-text-light);
262
+ cursor: pointer;
263
+ padding: 4px 8px;
264
+ border-radius: 4px;
265
+ font-size: 12px;
266
+ transition: all 0.2s;
267
+ }
268
+
269
+ .delachat-btn-action:hover {
270
+ background: var(--delachat-bg-secondary);
271
+ color: var(--delachat-primary);
272
+ }
273
+
274
+ /* ============================================
275
+ Loading Indicator
276
+ ============================================ */
277
+ .delachat-loading {
278
+ display: flex;
279
+ align-items: center;
280
+ justify-content: center;
281
+ gap: 8px;
282
+ padding: 12px;
283
+ color: var(--delachat-text-light);
284
+ font-size: 13px;
285
+ }
286
+
287
+ .delachat-loading-dots {
288
+ display: flex;
289
+ gap: 4px;
290
+ }
291
+
292
+ .delachat-loading-dots span {
293
+ width: 6px;
294
+ height: 6px;
295
+ background: var(--delachat-primary);
296
+ border-radius: 50%;
297
+ animation: delachat-bounce 1.4s infinite ease-in-out both;
298
+ }
299
+
300
+ .delachat-loading-dots span:nth-child(1) {
301
+ animation-delay: -0.32s;
302
+ }
303
+
304
+ .delachat-loading-dots span:nth-child(2) {
305
+ animation-delay: -0.16s;
306
+ }
307
+
308
+ @keyframes delachat-bounce {
309
+ 0%, 80%, 100% {
310
+ transform: scale(0);
311
+ }
312
+ 40% {
313
+ transform: scale(1);
314
+ }
315
+ }
316
+
317
+ /* ============================================
318
+ Input Container
319
+ ============================================ */
320
+ .delachat-input-container {
321
+ padding: 16px;
322
+ background: var(--delachat-bg-secondary);
323
+ border-top: 1px solid var(--delachat-border);
324
+ flex-shrink: 0;
325
+ }
326
+
327
+ .delachat-input-wrapper {
328
+ display: flex;
329
+ gap: 8px;
330
+ align-items: flex-end;
331
+ }
332
+
333
+ .delachat-input {
334
+ flex: 1;
335
+ padding: 10px 12px;
336
+ border: 1px solid var(--delachat-border);
337
+ border-radius: 8px;
338
+ background: var(--delachat-bg);
339
+ color: var(--delachat-text);
340
+ font-family: inherit;
341
+ font-size: 14px;
342
+ line-height: 1.5;
343
+ resize: none;
344
+ max-height: 120px;
345
+ overflow-y: auto;
346
+ }
347
+
348
+ .delachat-input:focus {
349
+ outline: none;
350
+ border-color: var(--delachat-primary);
351
+ box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
352
+ }
353
+
354
+ .delachat-input::placeholder {
355
+ color: var(--delachat-text-light);
356
+ }
357
+
358
+ .delachat-input:disabled {
359
+ background: var(--delachat-bg-secondary);
360
+ cursor: not-allowed;
361
+ opacity: 0.6;
362
+ }
363
+
364
+ .delachat-btn-send {
365
+ background: var(--delachat-primary);
366
+ color: white;
367
+ border: none;
368
+ border-radius: 8px;
369
+ padding: 10px 16px;
370
+ cursor: pointer;
371
+ transition: background 0.2s;
372
+ display: flex;
373
+ align-items: center;
374
+ justify-content: center;
375
+ flex-shrink: 0;
376
+ }
377
+
378
+ .delachat-btn-send:hover:not(:disabled) {
379
+ background: var(--delachat-primary-dark);
380
+ }
381
+
382
+ .delachat-btn-send:disabled {
383
+ opacity: 0.5;
384
+ cursor: not-allowed;
385
+ }
386
+
387
+ /* ============================================
388
+ Positioning Modes
389
+ ============================================ */
390
+
391
+ /* Floating (bottom-right) */
392
+ .delachat-window[data-position="floating"] {
393
+ position: fixed;
394
+ bottom: 20px;
395
+ right: 20px;
396
+ z-index: 9999;
397
+ max-width: 400px;
398
+ max-height: 600px;
399
+ }
400
+
401
+ /* Responsive Design */
402
+ @media (max-width: 640px) {
403
+ .delachat-window {
404
+ border-radius: 0;
405
+ height: 100vh !important;
406
+ width: 100vw !important;
407
+ }
408
+
409
+ .delachat-window[data-position="floating"] {
410
+ bottom: 0;
411
+ right: 0;
412
+ max-width: 100%;
413
+ max-height: 100%;
414
+ }
415
+
416
+ .delachat-message-content {
417
+ max-width: 85%;
418
+ }
419
+ }
420
+
421
+ /* ============================================
422
+ Print Styles
423
+ ============================================ */
424
+ @media print {
425
+ .delachat-header-buttons,
426
+ .delachat-input-container,
427
+ .delachat-message-actions {
428
+ display: none !important;
429
+ }
430
+ }