@product7/feedback-sdk 1.0.8 → 1.1.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.
@@ -970,12 +970,10 @@
970
970
  const button = document.createElement('div');
971
971
  button.className = `feedback-widget feedback-widget-button theme-${this.options.theme} position-${this.options.position}`;
972
972
  button.innerHTML = `
973
- <button class="feedback-trigger-btn" type="button">
974
- <svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor">
975
- <path d="M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z"/>
976
- <path d="M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"/>
973
+ <button class="feedback-trigger-btn" type="button" aria-label="Send feedback">
974
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
975
+ <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>
977
976
  </svg>
978
- Feedback
979
977
  </button>
980
978
  `;
981
979
 
@@ -992,23 +990,17 @@
992
990
 
993
991
  button.addEventListener('mouseenter', () => {
994
992
  if (!this.state.isSubmitting) {
995
- button.style.transform = 'translateY(-2px)';
993
+ button.style.transform = 'scale(1.1)';
996
994
  }
997
995
  });
998
996
 
999
997
  button.addEventListener('mouseleave', () => {
1000
- button.style.transform = 'translateY(0)';
998
+ button.style.transform = 'scale(1)';
1001
999
  });
1002
1000
  }
1003
1001
 
1004
1002
  updateText(text) {
1005
- const button = this.element?.querySelector('.feedback-trigger-btn');
1006
- if (button) {
1007
- const textNode = button.childNodes[button.childNodes.length - 1];
1008
- if (textNode && textNode.nodeType === Node.TEXT_NODE) {
1009
- textNode.textContent = text;
1010
- }
1011
- }
1003
+ console.warn('ButtonWidget: Text display is disabled for circular design');
1012
1004
  }
1013
1005
 
1014
1006
  updatePosition(position) {
@@ -1574,40 +1566,47 @@
1574
1566
  left: 20px;
1575
1567
  }
1576
1568
 
1569
+ /* Circular button design with white bg and blue border */
1577
1570
  .feedback-trigger-btn {
1578
- position: relative;
1571
+ width: 56px;
1572
+ height: 56px;
1573
+ border-radius: 50%;
1574
+ border: 2px solid #155eff;
1575
+ background-color: #ffffff;
1576
+ cursor: pointer;
1579
1577
  display: flex;
1580
1578
  align-items: center;
1581
1579
  justify-content: center;
1582
- gap: 12px;
1583
- height: 44px;
1584
- overflow: hidden;
1585
- border-radius: 0.5rem;
1586
- border: none;
1587
- padding: 10px 16px;
1588
- font-size: 14px;
1589
- font-weight: 500;
1590
- font-family: inherit;
1591
- cursor: pointer;
1592
- transition: all 0.3s ease;
1593
- color: white;
1594
- background: #155EEF;
1595
- box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
1580
+ box-shadow: 0 4px 12px rgba(21, 94, 255, 0.15);
1581
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
1582
+ padding: 0;
1583
+ color: #155eff; /* Icon color matches border */
1596
1584
  }
1597
1585
 
1598
- .feedback-trigger-btn:hover:not(:disabled) {
1599
- background: #004EEB;
1600
- box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.1);
1586
+ .feedback-trigger-btn:hover {
1587
+ background-color: #155eff;
1588
+ color: #ffffff;
1589
+ box-shadow: 0 6px 20px rgba(21, 94, 255, 0.3);
1601
1590
  }
1602
1591
 
1603
- .feedback-trigger-btn:disabled {
1604
- opacity: 0.7;
1605
- cursor: not-allowed;
1592
+ .feedback-trigger-btn:active {
1593
+ transform: scale(0.95);
1606
1594
  }
1607
1595
 
1608
- .feedback-trigger-btn:focus-visible {
1609
- outline: 2px solid #155EEF;
1610
- outline-offset: 2px;
1596
+ .feedback-trigger-btn svg {
1597
+ flex-shrink: 0;
1598
+ }
1599
+
1600
+ /* Dark theme support */
1601
+ .theme-dark .feedback-trigger-btn {
1602
+ background-color: #1a1a1a;
1603
+ border-color: #155eff;
1604
+ color: #155eff;
1605
+ }
1606
+
1607
+ .theme-dark .feedback-trigger-btn:hover {
1608
+ background-color: #155eff;
1609
+ color: #ffffff;
1611
1610
  }
1612
1611
 
1613
1612
  /* Side Panel Styles */