@product7/feedback-sdk 1.7.6 → 1.7.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@product7/feedback-sdk",
3
- "version": "1.7.6",
3
+ "version": "1.7.7",
4
4
  "description": "JavaScript SDK for integrating Product7 feedback widgets into any website",
5
5
  "main": "dist/feedback-sdk.js",
6
6
  "module": "src/index.js",
@@ -299,6 +299,38 @@ export const surveyStyles = `
299
299
  color: var(--color-white);
300
300
  }
301
301
 
302
+ .feedback-survey-ces-list {
303
+ display: flex;
304
+ flex-direction: column;
305
+ gap: var(--spacing-2);
306
+ }
307
+
308
+ .feedback-survey-ces-list-btn {
309
+ width: 100%;
310
+ padding: var(--spacing-3) var(--spacing-4);
311
+ border: 1px solid var(--color-border);
312
+ border-radius: var(--radius-md);
313
+ background: var(--color-surface);
314
+ cursor: pointer;
315
+ font-size: var(--font-size-base);
316
+ font-weight: var(--font-weight-medium);
317
+ color: var(--color-text-primary);
318
+ transition: all var(--transition-fast);
319
+ font-family: inherit;
320
+ text-align: left;
321
+ }
322
+
323
+ .feedback-survey-ces-list-btn:hover {
324
+ background: var(--color-neutral-100);
325
+ border-color: var(--color-border);
326
+ }
327
+
328
+ .feedback-survey-ces-list-btn.selected {
329
+ background: var(--color-primary);
330
+ border-color: var(--color-primary);
331
+ color: var(--color-white);
332
+ }
333
+
302
334
  .feedback-survey-rating-scale {
303
335
  display: flex;
304
336
  gap: 0;
@@ -476,12 +476,12 @@ export class SurveyWidget extends BaseWidget {
476
476
  if (ratingType === 'ces') {
477
477
  const cesLabels = ['Very Difficult', 'Difficult', 'Neutral', 'Easy', 'Very Easy'];
478
478
  return `
479
- <div class="feedback-survey-ces" data-page-id="${pageId}">
479
+ <div class="feedback-survey-ces-list" data-page-id="${pageId}">
480
480
  ${cesLabels
481
481
  .map((label, i) => {
482
482
  const score = i + 1;
483
483
  const selected = currentRating === score ? ' selected' : '';
484
- return `<button class="feedback-survey-page-rating-btn feedback-survey-ces-btn${selected}" data-page-id="${pageId}" data-score="${score}">${label}</button>`;
484
+ return `<button class="feedback-survey-page-rating-btn feedback-survey-ces-list-btn${selected}" data-page-id="${pageId}" data-score="${score}">${label}</button>`;
485
485
  })
486
486
  .join('')}
487
487
  </div>