@product7/feedback-sdk 1.2.7 → 1.3.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.
@@ -0,0 +1,574 @@
1
+ export const feedbackStyles = `
2
+ .feedback-widget-button {
3
+ position: fixed;
4
+ z-index: 999999;
5
+ }
6
+
7
+ .feedback-widget-button.position-bottom-right {
8
+ bottom: 20px;
9
+ right: 20px;
10
+ }
11
+
12
+ .feedback-widget-button.position-bottom-left {
13
+ bottom: 20px;
14
+ left: 20px;
15
+ }
16
+
17
+ .feedback-widget-button.position-top-right {
18
+ top: 20px;
19
+ right: 20px;
20
+ }
21
+
22
+ .feedback-widget-button.position-top-left {
23
+ top: 20px;
24
+ left: 20px;
25
+ }
26
+
27
+ .feedback-trigger-btn {
28
+ position: relative;
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: center;
32
+ gap: 8px;
33
+ height: 48px;
34
+ overflow: visible;
35
+ border-radius: 9999px;
36
+ border: none;
37
+ padding: 12px 20px;
38
+ font-size: 14px;
39
+ font-weight: 500;
40
+ font-family: inherit;
41
+ cursor: pointer;
42
+ transition: all 0.3s ease;
43
+ color: white;
44
+ background: #155EEF;
45
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
46
+ width: fit-content;
47
+ }
48
+
49
+ .feedback-trigger-btn:hover:not(:disabled) {
50
+ transform: translateY(-2px);
51
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
52
+ }
53
+
54
+ .feedback-trigger-btn:disabled {
55
+ opacity: 0.7;
56
+ cursor: not-allowed;
57
+ }
58
+
59
+ .feedback-trigger-btn:focus-visible {
60
+ outline: 2px solid #155EEF;
61
+ outline-offset: 2px;
62
+ }
63
+
64
+ .feedback-icon {
65
+ flex-shrink: 0;
66
+ }
67
+
68
+ .feedback-minimize-icon,
69
+ .feedback-expand-icon {
70
+ position: absolute;
71
+ top: -6px;
72
+ right: -6px;
73
+ width: 24px;
74
+ height: 24px;
75
+ padding: 4px;
76
+ display: flex;
77
+ align-items: center;
78
+ justify-content: center;
79
+ background: white;
80
+ border-radius: 50%;
81
+ opacity: 0;
82
+ transition: opacity 0.2s ease;
83
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
84
+ cursor: pointer;
85
+ }
86
+
87
+ .feedback-minimize-icon svg,
88
+ .feedback-expand-icon svg {
89
+ width: 16px;
90
+ height: 16px;
91
+ display: block;
92
+ fill: #155EEF;
93
+ }
94
+
95
+ .feedback-widget-button:not(.minimized) .feedback-trigger-btn:hover .feedback-minimize-icon {
96
+ opacity: 1;
97
+ }
98
+
99
+ .feedback-widget-button.minimized .feedback-trigger-btn {
100
+ padding: 12px;
101
+ width: 48px;
102
+ height: 48px;
103
+ justify-content: center;
104
+ }
105
+
106
+ .feedback-widget-button.minimized .feedback-text {
107
+ display: none;
108
+ }
109
+
110
+ .feedback-widget-button.minimized .feedback-minimize-icon {
111
+ display: none;
112
+ }
113
+
114
+ .feedback-widget-button.minimized .feedback-trigger-btn:hover .feedback-expand-icon {
115
+ opacity: 1;
116
+ }
117
+
118
+ .feedback-panel {
119
+ position: fixed;
120
+ bottom: 80px;
121
+ right: 24px;
122
+ width: 420px;
123
+ max-height: 500px;
124
+ z-index: 1000000;
125
+ transform: translateX(calc(100% + 24px));
126
+ transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
127
+ font-family: inherit;
128
+ }
129
+
130
+ .feedback-panel.open {
131
+ transform: translateX(0);
132
+ }
133
+
134
+ .feedback-panel-backdrop {
135
+ position: fixed;
136
+ top: 0;
137
+ left: 0;
138
+ right: 0;
139
+ bottom: 0;
140
+ background: rgba(0, 0, 0, 0.1);
141
+ opacity: 0;
142
+ transition: opacity 0.3s ease;
143
+ pointer-events: none;
144
+ z-index: 999999;
145
+ animation: fadeIn 0.3s ease;
146
+ }
147
+
148
+ .feedback-panel-backdrop.show {
149
+ opacity: 1;
150
+ pointer-events: auto;
151
+ }
152
+
153
+ .feedback-panel-content {
154
+ background: white;
155
+ height: 100%;
156
+ display: flex;
157
+ flex-direction: column;
158
+ border-radius: 16px;
159
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
160
+ 0 10px 10px -5px rgba(0, 0, 0, 0.04),
161
+ 0 0 0 1px rgba(0, 0, 0, 0.05);
162
+ }
163
+
164
+ .feedback-panel.theme-dark .feedback-panel-content {
165
+ background: #1F2937;
166
+ color: white;
167
+ }
168
+
169
+ .feedback-panel-header {
170
+ display: flex;
171
+ align-items: center;
172
+ justify-content: space-between;
173
+ padding: 24px;
174
+ border-bottom: 1px solid #E5E7EB;
175
+ flex-shrink: 0;
176
+ }
177
+
178
+ .feedback-panel.theme-dark .feedback-panel-header {
179
+ border-bottom-color: #374151;
180
+ }
181
+
182
+ .feedback-panel-header h3 {
183
+ margin: 0;
184
+ font-size: 18px;
185
+ font-weight: 600;
186
+ color: #111827;
187
+ }
188
+
189
+ .feedback-panel.theme-dark .feedback-panel-header h3 {
190
+ color: white;
191
+ }
192
+
193
+ .feedback-panel-close {
194
+ background: none;
195
+ border: none;
196
+ font-size: 24px;
197
+ cursor: pointer;
198
+ color: #6B7280;
199
+ padding: 4px;
200
+ width: 32px;
201
+ height: 32px;
202
+ display: flex;
203
+ align-items: center;
204
+ justify-content: center;
205
+ border-radius: 6px;
206
+ transition: all 0.2s ease;
207
+ }
208
+
209
+ .feedback-panel-close:hover {
210
+ background: #F3F4F6;
211
+ color: #111827;
212
+ }
213
+
214
+ .feedback-panel-close:focus-visible {
215
+ outline: 2px solid #155EEF;
216
+ outline-offset: 2px;
217
+ }
218
+
219
+ .feedback-panel.theme-dark .feedback-panel-close {
220
+ color: #9CA3AF;
221
+ }
222
+
223
+ .feedback-panel.theme-dark .feedback-panel-close:hover {
224
+ background: #374151;
225
+ color: white;
226
+ }
227
+
228
+ .feedback-panel-body {
229
+ flex: 1;
230
+ overflow-y: auto;
231
+ padding: 24px;
232
+ }
233
+
234
+ .feedback-form {
235
+ display: flex;
236
+ flex-direction: column;
237
+ height: 100%;
238
+ }
239
+
240
+ .feedback-form-group {
241
+ display: flex;
242
+ flex-direction: column;
243
+ gap: 8px;
244
+ margin-bottom: 20px;
245
+ }
246
+
247
+ .feedback-form-group:last-child {
248
+ margin-bottom: 0;
249
+ }
250
+
251
+ .feedback-form-group label {
252
+ font-size: 14px;
253
+ font-weight: 500;
254
+ line-height: 1.25;
255
+ color: #374151;
256
+ }
257
+
258
+ .feedback-panel.theme-dark .feedback-form-group label {
259
+ color: #D1D5DB;
260
+ }
261
+
262
+ .feedback-form-group input {
263
+ height: 44px;
264
+ width: 100%;
265
+ border-radius: 8px;
266
+ border: 1px solid #D1D5DB;
267
+ padding: 10px 14px;
268
+ font-size: 15px;
269
+ font-weight: 400;
270
+ line-height: 1.5;
271
+ color: #1F2937;
272
+ font-family: inherit;
273
+ outline: none;
274
+ transition: all 0.2s ease;
275
+ }
276
+
277
+ .feedback-form-group input::placeholder {
278
+ font-size: 15px;
279
+ color: #9CA3AF;
280
+ }
281
+
282
+ .feedback-form-group input:focus {
283
+ border-color: #155EEF;
284
+ box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
285
+ }
286
+
287
+ .feedback-form-group input:focus-visible {
288
+ outline: none;
289
+ }
290
+
291
+ .feedback-form-group textarea {
292
+ min-height: 200px;
293
+ width: 100%;
294
+ resize: vertical;
295
+ border-radius: 8px;
296
+ border: 1px solid #D1D5DB;
297
+ padding: 10px 14px;
298
+ font-size: 15px;
299
+ font-weight: 400;
300
+ line-height: 1.5;
301
+ color: #1F2937;
302
+ font-family: inherit;
303
+ outline: none;
304
+ transition: all 0.2s ease;
305
+ }
306
+
307
+ .feedback-form-group textarea::placeholder {
308
+ font-size: 15px;
309
+ color: #9CA3AF;
310
+ }
311
+
312
+ .feedback-form-group textarea:focus {
313
+ border-color: #155EEF;
314
+ box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
315
+ }
316
+
317
+ .feedback-form-group textarea:focus-visible {
318
+ outline: none;
319
+ }
320
+
321
+ .feedback-panel.theme-dark .feedback-form-group input,
322
+ .feedback-panel.theme-dark .feedback-form-group textarea {
323
+ background: #374151;
324
+ border-color: #4B5563;
325
+ color: white;
326
+ }
327
+
328
+ .feedback-panel.theme-dark .feedback-form-group input::placeholder,
329
+ .feedback-panel.theme-dark .feedback-form-group textarea::placeholder {
330
+ color: #6B7280;
331
+ }
332
+
333
+ .feedback-btn {
334
+ position: relative;
335
+ display: inline-flex;
336
+ align-items: center;
337
+ justify-content: center;
338
+ overflow: hidden;
339
+ border-radius: 8px;
340
+ border: none;
341
+ height: 44px;
342
+ padding: 10px 18px;
343
+ font-size: 15px;
344
+ font-weight: 500;
345
+ font-family: inherit;
346
+ cursor: pointer;
347
+ transition: all 0.2s ease;
348
+ }
349
+
350
+ .feedback-btn:disabled {
351
+ opacity: 0.6;
352
+ cursor: not-allowed;
353
+ }
354
+
355
+ .feedback-btn:focus-visible {
356
+ outline: 2px solid #155EEF;
357
+ outline-offset: 2px;
358
+ }
359
+
360
+ .feedback-btn-submit {
361
+ background: #155EEF;
362
+ color: white;
363
+ width: 100%;
364
+ }
365
+
366
+ .feedback-btn-submit:hover:not(:disabled) {
367
+ background: #4338ca;
368
+ }
369
+
370
+ .feedback-btn-submit:active:not(:disabled) {
371
+ background: #3730a3;
372
+ }
373
+
374
+ .feedback-btn-cancel {
375
+ background: transparent;
376
+ color: #6B7280;
377
+ border: 1px solid #D1D5DB;
378
+ }
379
+
380
+ .feedback-btn-cancel:hover:not(:disabled) {
381
+ background: #F9FAFB;
382
+ border-color: #9CA3AF;
383
+ color: #374151;
384
+ }
385
+
386
+ .feedback-panel.theme-dark .feedback-btn-cancel {
387
+ color: #D1D5DB;
388
+ border-color: #4B5563;
389
+ }
390
+
391
+ .feedback-panel.theme-dark .feedback-btn-cancel:hover:not(:disabled) {
392
+ background: #374151;
393
+ }
394
+
395
+ .feedback-form-actions {
396
+ display: flex;
397
+ flex-direction: column;
398
+ gap: 12px;
399
+ margin-top: auto;
400
+ padding-top: 24px;
401
+ }
402
+
403
+ .feedback-error {
404
+ color: #DC2626;
405
+ font-size: 14px;
406
+ font-weight: 400;
407
+ margin-top: 8px;
408
+ padding: 12px;
409
+ background: #FEE2E2;
410
+ border: 1px solid #FECACA;
411
+ border-radius: 8px;
412
+ display: none;
413
+ }
414
+
415
+ .feedback-error.show {
416
+ display: block;
417
+ }
418
+
419
+ .feedback-panel.theme-dark .feedback-error {
420
+ background: #7F1D1D;
421
+ border-color: #991B1B;
422
+ color: #FCA5A5;
423
+ }
424
+
425
+ /* ==================== SUCCESS NOTIFICATION ==================== */
426
+ .feedback-success-notification {
427
+ position: fixed;
428
+ top: 24px;
429
+ right: 24px;
430
+ z-index: 1000002;
431
+ background: white;
432
+ border: 1px solid #D1FAE5;
433
+ border-radius: 12px;
434
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
435
+ animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
436
+ min-width: 320px;
437
+ }
438
+
439
+ .feedback-success-content {
440
+ display: flex;
441
+ align-items: center;
442
+ padding: 16px 20px;
443
+ gap: 12px;
444
+ }
445
+
446
+ .feedback-success-icon {
447
+ width: 20px;
448
+ height: 20px;
449
+ border-radius: 50%;
450
+ background: #10B981;
451
+ color: white;
452
+ display: flex;
453
+ align-items: center;
454
+ justify-content: center;
455
+ font-size: 12px;
456
+ font-weight: 600;
457
+ flex-shrink: 0;
458
+ }
459
+
460
+ .feedback-success-content span {
461
+ color: #065F46;
462
+ font-weight: 500;
463
+ font-size: 14px;
464
+ flex: 1;
465
+ }
466
+
467
+ .feedback-success-close {
468
+ background: none;
469
+ border: none;
470
+ color: #6B7280;
471
+ cursor: pointer;
472
+ font-size: 20px;
473
+ padding: 0;
474
+ width: 24px;
475
+ height: 24px;
476
+ display: flex;
477
+ align-items: center;
478
+ justify-content: center;
479
+ transition: all 0.2s ease;
480
+ border-radius: 4px;
481
+ flex-shrink: 0;
482
+ }
483
+
484
+ .feedback-success-close:hover {
485
+ background: #F3F4F6;
486
+ color: #374151;
487
+ }
488
+
489
+ .feedback-success-close:focus-visible {
490
+ outline: 2px solid #155EEF;
491
+ outline-offset: 2px;
492
+ }
493
+
494
+ @media (max-width: 768px) {
495
+ .feedback-widget-button {
496
+ bottom: 16px;
497
+ right: 16px;
498
+ }
499
+
500
+ .feedback-widget-button.position-bottom-left {
501
+ left: 16px;
502
+ }
503
+
504
+ .feedback-minimize-icon,
505
+ .feedback-expand-icon {
506
+ top: -4px;
507
+ right: -4px;
508
+ width: 20px;
509
+ height: 20px;
510
+ }
511
+
512
+ .feedback-minimize-icon svg,
513
+ .feedback-expand-icon svg {
514
+ width: 14px;
515
+ height: 14px;
516
+ }
517
+
518
+ .feedback-panel {
519
+ width: 100%;
520
+ top: auto;
521
+ bottom: 0;
522
+ right: 0;
523
+ left: 0;
524
+ height: 85vh;
525
+ max-height: 85vh;
526
+ transform: translateY(100%);
527
+ border-radius: 20px 20px 0 0;
528
+ }
529
+
530
+ .feedback-panel.open {
531
+ transform: translateY(0);
532
+ }
533
+
534
+ .feedback-panel-content {
535
+ border-radius: 20px 20px 0 0;
536
+ }
537
+
538
+ .feedback-panel-header {
539
+ padding: 20px;
540
+ position: relative;
541
+ }
542
+
543
+ .feedback-panel-header::before {
544
+ content: '';
545
+ position: absolute;
546
+ top: 8px;
547
+ left: 50%;
548
+ transform: translateX(-50%);
549
+ width: 40px;
550
+ height: 4px;
551
+ background: #D1D5DB;
552
+ border-radius: 2px;
553
+ }
554
+
555
+ .feedback-panel.theme-dark .feedback-panel-header::before {
556
+ background: #4B5563;
557
+ }
558
+
559
+ .feedback-panel-body {
560
+ padding: 20px;
561
+ }
562
+
563
+ .feedback-form-group textarea {
564
+ min-height: 150px;
565
+ }
566
+
567
+ .feedback-success-notification {
568
+ top: 16px;
569
+ right: 16px;
570
+ left: 16px;
571
+ min-width: auto;
572
+ }
573
+ }
574
+ `;