@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.
package/package.json
CHANGED
package/src/styles/feedback.js
CHANGED
|
@@ -221,44 +221,30 @@ export const feedbackStyles = `
|
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
.feedback-panel {
|
|
224
|
-
width:
|
|
224
|
+
width: min(420px, calc(100vw - (var(--spacing-4) * 2)));
|
|
225
|
+
max-height: min(500px, calc(100vh - 88px));
|
|
225
226
|
top: auto;
|
|
226
|
-
bottom:
|
|
227
|
-
right:
|
|
228
|
-
left:
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
transform: translateY(100%);
|
|
232
|
-
border-radius: var(--radius-3xl) var(--radius-3xl) 0 0;
|
|
227
|
+
bottom: 72px;
|
|
228
|
+
right: var(--spacing-4);
|
|
229
|
+
left: auto;
|
|
230
|
+
transform: translateX(calc(100% + 24px));
|
|
231
|
+
border-radius: var(--radius-2xl);
|
|
233
232
|
}
|
|
234
233
|
|
|
235
234
|
.feedback-panel.open {
|
|
236
|
-
transform:
|
|
235
|
+
transform: translateX(0);
|
|
237
236
|
}
|
|
238
237
|
|
|
239
238
|
.feedback-panel-header {
|
|
240
|
-
padding: var(--spacing-
|
|
241
|
-
position: relative;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.feedback-panel-header::before {
|
|
245
|
-
content: '';
|
|
246
|
-
position: absolute;
|
|
247
|
-
top: var(--spacing-2);
|
|
248
|
-
left: 50%;
|
|
249
|
-
transform: translateX(-50%);
|
|
250
|
-
width: 40px;
|
|
251
|
-
height: 4px;
|
|
252
|
-
background: var(--color-neutral-300);
|
|
253
|
-
border-radius: 2px;
|
|
239
|
+
padding: var(--spacing-4) var(--spacing-6);
|
|
254
240
|
}
|
|
255
241
|
|
|
256
242
|
.feedback-panel-body {
|
|
257
|
-
padding: var(--spacing-
|
|
243
|
+
padding: var(--spacing-6);
|
|
258
244
|
}
|
|
259
245
|
|
|
260
246
|
.feedback-form-group textarea {
|
|
261
|
-
min-height:
|
|
247
|
+
min-height: 120px;
|
|
262
248
|
}
|
|
263
249
|
}
|
|
264
250
|
`;
|
|
@@ -4,6 +4,7 @@ export class ButtonWidget extends BaseWidget {
|
|
|
4
4
|
constructor(options) {
|
|
5
5
|
super({ ...options, type: 'button' });
|
|
6
6
|
this.isMinimized = false;
|
|
7
|
+
this._hiddenForOpenPanel = false;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
_render() {
|
|
@@ -90,6 +91,28 @@ export class ButtonWidget extends BaseWidget {
|
|
|
90
91
|
this.element.classList.remove('minimized');
|
|
91
92
|
}
|
|
92
93
|
|
|
94
|
+
openPanel() {
|
|
95
|
+
if (!this.state.isOpen) {
|
|
96
|
+
this._hiddenForOpenPanel = true;
|
|
97
|
+
this.hide();
|
|
98
|
+
}
|
|
99
|
+
super.openPanel();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
closePanel() {
|
|
103
|
+
const shouldRestoreButton = this._hiddenForOpenPanel;
|
|
104
|
+
super.closePanel();
|
|
105
|
+
|
|
106
|
+
if (shouldRestoreButton) {
|
|
107
|
+
setTimeout(() => {
|
|
108
|
+
if (!this.destroyed) {
|
|
109
|
+
this.show();
|
|
110
|
+
}
|
|
111
|
+
this._hiddenForOpenPanel = false;
|
|
112
|
+
}, 320);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
93
116
|
mount(container) {
|
|
94
117
|
super.mount(container);
|
|
95
118
|
}
|