@product7/feedback-sdk 1.4.7 → 1.4.8

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.
@@ -2165,6 +2165,7 @@
2165
2165
  constructor(options) {
2166
2166
  super({ ...options, type: 'button' });
2167
2167
  this.isMinimized = false;
2168
+ this._hiddenForOpenPanel = false;
2168
2169
  }
2169
2170
 
2170
2171
  _render() {
@@ -2251,6 +2252,28 @@
2251
2252
  this.element.classList.remove('minimized');
2252
2253
  }
2253
2254
 
2255
+ openPanel() {
2256
+ if (!this.state.isOpen) {
2257
+ this._hiddenForOpenPanel = true;
2258
+ this.hide();
2259
+ }
2260
+ super.openPanel();
2261
+ }
2262
+
2263
+ closePanel() {
2264
+ const shouldRestoreButton = this._hiddenForOpenPanel;
2265
+ super.closePanel();
2266
+
2267
+ if (shouldRestoreButton) {
2268
+ setTimeout(() => {
2269
+ if (!this.destroyed) {
2270
+ this.show();
2271
+ }
2272
+ this._hiddenForOpenPanel = false;
2273
+ }, 320);
2274
+ }
2275
+ }
2276
+
2254
2277
  mount(container) {
2255
2278
  super.mount(container);
2256
2279
  }
@@ -9094,44 +9117,30 @@
9094
9117
  }
9095
9118
 
9096
9119
  .feedback-panel {
9097
- width: 100%;
9120
+ width: min(420px, calc(100vw - (var(--spacing-4) * 2)));
9121
+ max-height: min(500px, calc(100vh - 88px));
9098
9122
  top: auto;
9099
- bottom: 0;
9100
- right: 0;
9101
- left: 0;
9102
- height: 85vh;
9103
- max-height: 85vh;
9104
- transform: translateY(100%);
9105
- border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
9123
+ bottom: 72px;
9124
+ right: var(--spacing-4);
9125
+ left: auto;
9126
+ transform: translateX(calc(100% + 24px));
9127
+ border-radius: var(--radius-2xl);
9106
9128
  }
9107
9129
 
9108
9130
  .feedback-panel.open {
9109
- transform: translateY(0);
9131
+ transform: translateX(0);
9110
9132
  }
9111
9133
 
9112
9134
  .feedback-panel-header {
9113
- padding: var(--spacing-5);
9114
- position: relative;
9115
- }
9116
-
9117
- .feedback-panel-header::before {
9118
- content: '';
9119
- position: absolute;
9120
- top: var(--spacing-2);
9121
- left: 50%;
9122
- transform: translateX(-50%);
9123
- width: 40px;
9124
- height: 4px;
9125
- background: var(--color-neutral-300);
9126
- border-radius: 2px;
9135
+ padding: var(--spacing-4) var(--spacing-6);
9127
9136
  }
9128
9137
 
9129
9138
  .feedback-panel-body {
9130
- padding: var(--spacing-5);
9139
+ padding: var(--spacing-6);
9131
9140
  }
9132
9141
 
9133
9142
  .feedback-form-group textarea {
9134
- min-height: 150px;
9143
+ min-height: 120px;
9135
9144
  }
9136
9145
  }
9137
9146
  `;