feedback-vos 1.0.29 → 1.0.31

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/dist/index.js CHANGED
@@ -14,8 +14,47 @@ var html2canvas__default = /*#__PURE__*/_interopDefault(html2canvas);
14
14
  var bugImageUrl = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCAzNiAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuNzUwMDcgNEM4Ljc1MDA3IDMgOC4wMDAwNyAwIDYuMzEyMDcgMEM0LjYyNDA3IDAgNC43NTAwNyAyIDUuNzUwMDcgMkM2Ljc1MDA3IDIgNi43NTAwNyA0IDYuNzUwMDcgNUM2Ljc1MDA3IDYgNy43NTAwNyA0IDcuNzUwMDcgNFpNMy41NjcwNyA1LjcyQzQuNTY3MDcgNC43MiAzLjgxNzA3IDEuNzIgMi4xMjkwNyAxLjcyQzAuNDQxMDY4IDEuNzIgMC41NjcwNjggMy43MiAxLjU2NzA3IDMuNzJDMi41NjcwNyAzLjcyIDIuNTY3MDcgNS43MiAyLjU2NzA3IDYuNzJDMi41NjcwNyA3LjcyIDMuNTY3MDcgNS43MiAzLjU2NzA3IDUuNzJaIiBmaWxsPSIjQUE4REQ4Ii8+CjxwYXRoIGQ9Ik0yOS45NDIgMzIuODU2QzMwLjEzMSAzMy42NjQgMzEuMTY5IDM1LjEzNiAzMS45NzQgMzQuOTQ3QzMyLjc4IDM0Ljc1NyAzMy4wNTEgMzIuOTc2IDMyLjg2MiAzMi4xN0MzMi42NzMgMzEuMzYyIDMxLjg2NCAzMC44NjMgMzEuMDU4IDMxLjA1M0MzMC4yNTMgMzEuMjQzIDI5Ljc1MiAzMi4wNSAyOS45NDIgMzIuODU2Wk0yNC41MDggMzMuNTA1QzI0LjUxMSAzNC4zM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zVDMC4xNjY2MjYgMTYuODU0IDIuMzQwNjMgMTkuMzIgNS4xODc2MyAxOS43ODhDNS40MDM2MyAyMy43MzcgOC42NjQ2MyAyNi44NzUgMTIuNjY2NiAyNi44NzVDMTQuODQyNiAyNi44NzUgMTYuNzk2NiAyNS45NDIgMTguMTY2NiAyNC40NjJDMTkuNTM2NiAyNS45NDIgMjEuNDg5NiAyNi44NzUgMjMuNjY2NiAyNi44NzVDMjcuODA5NiAyNi44NzUgMzEuMTY2NiAyMy41MTggMzEuMTY2NiAxOS4zNzVDMzEuMTY2NiAxOC42NjUgMzEuMDYxNiAxNy45ODEgMzAuODc3NiAxNy4zM0MzMy4zOTY2IDE2LjI3MSAzNS4xNjY2IDEzLjc4IDM1LjE2NjYgMTAuODc1WiIgZmlsbD0iIzg1QzhGOCIvPgo8cGF0aCBkPSJNNC4xNjY2MyAzMi44NzVDNS44MjM0OCAzMi44NzUgNy4xNjY2MyAzMS41MzE5IDcuMTY2NjMgMjkuODc1QzcuMTY2NjMgMjguMjE4MSA1LjgyMzQ4IDI2Ljg3NSA0LjE2NjYzIDI2Ljg3NUMuNTA5NzcgMjYuODc1IDEuMTY2NjMgMjguMjE4MSAxLjE2NjYzIDI5Ljg3NUMxLjE2NjYzIDMxLjUzMTkgMi41MDk3NyAzMi44NzUgNC4xNjY2MyAzMi44NzVaIiBmaWxsPSIjODVDOEY4Ii8+Cjwvc3ZnPg==";
17
- function CloseButton({ className = "", title = "Close feedback form" }) {
18
- return /* @__PURE__ */ jsxRuntime.jsx(react.Popover.Button, { className: `text-zinc-400 hover:text-zinc-100 ${className}`, title, children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.X, { weight: "bold", className: "w-4 h-4" }) });
17
+
18
+ // src/lib/theme.ts
19
+ function getThemeClasses(theme) {
20
+ return {
21
+ // Background colors - light mode is now softer (gray-50 instead of white)
22
+ bgPrimary: theme === "dark" ? "bg-zinc-900" : "bg-gray-50",
23
+ bgSecondary: theme === "dark" ? "bg-zinc-800" : "bg-gray-100",
24
+ bgTertiary: theme === "dark" ? "bg-zinc-700" : "bg-gray-200",
25
+ bgHover: theme === "dark" ? "hover:bg-zinc-600" : "hover:bg-gray-200",
26
+ bgHoverSecondary: theme === "dark" ? "hover:bg-zinc-700" : "hover:bg-gray-200",
27
+ // Text colors
28
+ textPrimary: theme === "dark" ? "text-zinc-100" : "text-gray-900",
29
+ textSecondary: theme === "dark" ? "text-zinc-300" : "text-gray-700",
30
+ textTertiary: theme === "dark" ? "text-zinc-400" : "text-gray-600",
31
+ textMuted: theme === "dark" ? "text-neutral-400" : "text-gray-500",
32
+ // Border colors
33
+ borderPrimary: theme === "dark" ? "border-zinc-700" : "border-gray-300",
34
+ borderSecondary: theme === "dark" ? "border-zinc-600" : "border-gray-300",
35
+ borderHover: theme === "dark" ? "hover:border-zinc-500" : "hover:border-gray-400",
36
+ // Canvas/Editor background
37
+ canvasBg: theme === "dark" ? "bg-zinc-900" : "bg-gray-200",
38
+ // Overlay
39
+ overlay: theme === "dark" ? "bg-black/80" : "bg-black/60",
40
+ // Focus ring offset
41
+ focusRingOffset: theme === "dark" ? "focus:ring-offset-zinc-900" : "focus:ring-offset-gray-50",
42
+ // Button variants
43
+ buttonSecondary: theme === "dark" ? "bg-zinc-800 hover:bg-zinc-700 text-zinc-100" : "bg-gray-200 hover:bg-gray-300 text-gray-900",
44
+ buttonTertiary: theme === "dark" ? "bg-zinc-700 hover:bg-zinc-600 text-zinc-100" : "bg-gray-300 hover:bg-gray-400 text-gray-900",
45
+ // Icon colors - make icons more visible (darker for better contrast)
46
+ iconColor: theme === "dark" ? "text-zinc-100" : "text-gray-900"
47
+ };
48
+ }
49
+ function getDefaultTheme() {
50
+ if (typeof process !== "undefined" && process.env.NEXT_PUBLIC_FEEDBACK_THEME === "light") {
51
+ return "light";
52
+ }
53
+ return "dark";
54
+ }
55
+ function CloseButton({ className = "", title = "Close feedback form", theme = "dark" }) {
56
+ const themeClasses = getThemeClasses(theme);
57
+ return /* @__PURE__ */ jsxRuntime.jsx(react.Popover.Button, { className: `${themeClasses.textTertiary} ${theme === "dark" ? "hover:text-zinc-100" : "hover:text-gray-900"} ${className}`, title, children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.X, { weight: "bold", className: "w-5 h-5" }) });
19
58
  }
20
59
 
21
60
  // src/lib/translations.ts
@@ -70,24 +109,25 @@ var translations = {
70
109
  function getTranslations(lang = "en") {
71
110
  return translations[lang];
72
111
  }
73
- function FeedbackTypeStep({ onFeedbackTypeChanged, language }) {
112
+ function FeedbackTypeStep({ onFeedbackTypeChanged, language, theme }) {
74
113
  const t = getTranslations(language);
75
114
  const feedbackTypes = getFeedbackTypes(language);
115
+ const themeClasses = getThemeClasses(theme);
76
116
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
77
117
  /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex items-center justify-between w-full gap-2", children: [
78
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xl leading-6", children: t.form.header }),
79
- /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { title: t.form.closeButton })
118
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-lg md:text-xl leading-6 ${themeClasses.textPrimary}`, children: t.form.header }),
119
+ /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { title: t.form.closeButton, theme })
80
120
  ] }),
81
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex py-8 gap-2 w-full", children: Object.entries(feedbackTypes).map(([key, value]) => {
121
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex py-6 md:py-8 gap-2 md:gap-2 w-full justify-center md:justify-start flex-wrap", children: Object.entries(feedbackTypes).map(([key, value]) => {
82
122
  return /* @__PURE__ */ jsxRuntime.jsxs(
83
123
  "button",
84
124
  {
85
- className: "bg-zinc-800 rounded py-5 w-24 flex1 flex flex-col items-center gap-2 border-2 border-transparent hover:border-brand-500 focus:border-brand-500 focus:outline-none",
125
+ className: `${themeClasses.bgSecondary} rounded py-4 md:py-5 flex-1 min-w-[80px] md:w-24 flex flex-col items-center gap-2 border-2 border-transparent hover:border-brand-500 focus:border-brand-500 focus:outline-none transition-colors`,
86
126
  type: "button",
87
127
  onClick: () => onFeedbackTypeChanged(key),
88
128
  children: [
89
- /* @__PURE__ */ jsxRuntime.jsx("img", { src: value.image.source, alt: value.image.alt }),
90
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: value.title })
129
+ /* @__PURE__ */ jsxRuntime.jsx("img", { src: value.image.source, alt: value.image.alt, className: "w-5 h-5 md:w-6 md:h-6" }),
130
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-xs md:text-sm text-center ${themeClasses.textPrimary}`, children: value.title })
91
131
  ]
92
132
  },
93
133
  key
@@ -98,41 +138,398 @@ function FeedbackTypeStep({ onFeedbackTypeChanged, language }) {
98
138
  function Loading() {
99
139
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-4 h-4 flex items-center justify-center overflow-hidden ", children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.CircleNotch, { weight: "bold", className: "w-4 h-4 animate-spin" }) });
100
140
  }
141
+ function ScreenshotEditor({
142
+ screenshot,
143
+ onSave,
144
+ onCancel,
145
+ language,
146
+ theme = "dark"
147
+ }) {
148
+ const canvasRef = react$1.useRef(null);
149
+ const [isDrawing, setIsDrawing] = react$1.useState(false);
150
+ const [color, setColor] = react$1.useState("#ef4444");
151
+ const [brushSize, setBrushSize] = react$1.useState(3);
152
+ const [image, setImage] = react$1.useState(null);
153
+ const themeClasses = getThemeClasses(theme);
154
+ const t = {
155
+ en: {
156
+ save: "Save",
157
+ cancel: "Cancel",
158
+ clear: "Clear",
159
+ undo: "Undo"
160
+ },
161
+ nl: {
162
+ save: "Opslaan",
163
+ cancel: "Annuleren",
164
+ clear: "Wissen",
165
+ undo: "Ongedaan maken"
166
+ }
167
+ }[language];
168
+ const colors = [
169
+ "#ef4444",
170
+ // red-500
171
+ "#f59e0b",
172
+ // amber-500
173
+ "#eab308",
174
+ // yellow-500
175
+ "#22c55e",
176
+ // green-500
177
+ "#3b82f6",
178
+ // blue-500
179
+ "#8b5cf6",
180
+ // violet-500
181
+ "#ec4899",
182
+ // pink-500
183
+ "#ffffff",
184
+ // white
185
+ "#000000"
186
+ // black
187
+ ];
188
+ react$1.useEffect(() => {
189
+ const img = new Image();
190
+ img.onload = () => {
191
+ setImage(img);
192
+ if (canvasRef.current) {
193
+ const canvas = canvasRef.current;
194
+ canvas.width = img.width;
195
+ canvas.height = img.height;
196
+ const ctx = canvas.getContext("2d");
197
+ if (ctx) {
198
+ ctx.drawImage(img, 0, 0);
199
+ }
200
+ }
201
+ };
202
+ img.src = screenshot;
203
+ }, [screenshot]);
204
+ const getCoordinates = react$1.useCallback((e) => {
205
+ const canvas = canvasRef.current;
206
+ if (!canvas) return { x: 0, y: 0 };
207
+ const rect = canvas.getBoundingClientRect();
208
+ const scaleX = canvas.width / rect.width;
209
+ const scaleY = canvas.height / rect.height;
210
+ if ("touches" in e) {
211
+ const touch = e.touches[0] || e.changedTouches[0];
212
+ return {
213
+ x: (touch.clientX - rect.left) * scaleX,
214
+ y: (touch.clientY - rect.top) * scaleY
215
+ };
216
+ } else {
217
+ return {
218
+ x: (e.clientX - rect.left) * scaleX,
219
+ y: (e.clientY - rect.top) * scaleY
220
+ };
221
+ }
222
+ }, []);
223
+ const startDrawing = react$1.useCallback((e) => {
224
+ e.preventDefault();
225
+ const canvas = canvasRef.current;
226
+ if (!canvas) return;
227
+ const ctx = canvas.getContext("2d");
228
+ if (!ctx) return;
229
+ const { x, y } = getCoordinates(e);
230
+ setIsDrawing(true);
231
+ ctx.beginPath();
232
+ ctx.moveTo(x, y);
233
+ ctx.strokeStyle = color;
234
+ ctx.lineWidth = brushSize;
235
+ ctx.lineCap = "round";
236
+ ctx.lineJoin = "round";
237
+ }, [color, brushSize, getCoordinates]);
238
+ const draw = react$1.useCallback((e) => {
239
+ if (!isDrawing) return;
240
+ e.preventDefault();
241
+ const canvas = canvasRef.current;
242
+ if (!canvas) return;
243
+ const ctx = canvas.getContext("2d");
244
+ if (!ctx) return;
245
+ const { x, y } = getCoordinates(e);
246
+ ctx.lineTo(x, y);
247
+ ctx.stroke();
248
+ }, [isDrawing, getCoordinates]);
249
+ const stopDrawing = react$1.useCallback(() => {
250
+ setIsDrawing(false);
251
+ }, []);
252
+ const clearCanvas = () => {
253
+ const canvas = canvasRef.current;
254
+ if (!canvas || !image) return;
255
+ const ctx = canvas.getContext("2d");
256
+ if (!ctx) return;
257
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
258
+ ctx.drawImage(image, 0, 0);
259
+ };
260
+ const undo = () => {
261
+ const canvas = canvasRef.current;
262
+ if (!canvas || !image) return;
263
+ const ctx = canvas.getContext("2d");
264
+ if (!ctx) return;
265
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
266
+ ctx.drawImage(image, 0, 0);
267
+ };
268
+ const handleSave = () => {
269
+ const canvas = canvasRef.current;
270
+ if (!canvas) return;
271
+ const editedScreenshot = canvas.toDataURL("image/png");
272
+ onSave(editedScreenshot);
273
+ };
274
+ const maxWidth = 600;
275
+ const displayWidth = image ? Math.min(maxWidth, image.width) : maxWidth;
276
+ const displayHeight = image ? displayWidth / image.width * image.height : 400;
277
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: `fixed inset-0 z-50 flex items-center justify-center ${themeClasses.overlay} p-2 md:p-4`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${themeClasses.bgSecondary} rounded-lg shadow-xl max-w-4xl w-full max-h-[95vh] md:max-h-[90vh] overflow-auto`, children: [
278
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `sticky top-0 ${themeClasses.bgSecondary} border-b ${themeClasses.borderPrimary} p-2 md:p-4 flex items-center justify-between z-10 gap-2`, children: [
279
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: `text-base md:text-lg font-semibold ${themeClasses.textPrimary} truncate`, children: language === "nl" ? "Teken op screenshot" : "Draw on screenshot" }),
280
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1 md:gap-2 flex-shrink-0", children: [
281
+ /* @__PURE__ */ jsxRuntime.jsx(
282
+ "button",
283
+ {
284
+ type: "button",
285
+ onClick: undo,
286
+ className: `p-1.5 md:p-2 ${themeClasses.buttonTertiary} rounded-md ${themeClasses.textPrimary} transition-colors touch-manipulation`,
287
+ title: t.undo,
288
+ children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.ArrowCounterClockwise, { weight: "bold", className: "w-4 h-4 md:w-5 md:h-5" })
289
+ }
290
+ ),
291
+ /* @__PURE__ */ jsxRuntime.jsx(
292
+ "button",
293
+ {
294
+ type: "button",
295
+ onClick: clearCanvas,
296
+ className: `p-1.5 md:p-2 ${themeClasses.buttonTertiary} rounded-md ${themeClasses.textPrimary} transition-colors touch-manipulation`,
297
+ title: t.clear,
298
+ children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.Trash, { weight: "bold", className: "w-4 h-4 md:w-5 md:h-5" })
299
+ }
300
+ ),
301
+ /* @__PURE__ */ jsxRuntime.jsx(
302
+ "button",
303
+ {
304
+ type: "button",
305
+ onClick: onCancel,
306
+ className: `p-1.5 md:p-2 ${themeClasses.buttonTertiary} rounded-md ${themeClasses.textPrimary} transition-colors touch-manipulation`,
307
+ title: t.cancel,
308
+ children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.X, { weight: "bold", className: "w-4 h-4 md:w-5 md:h-5" })
309
+ }
310
+ ),
311
+ /* @__PURE__ */ jsxRuntime.jsx(
312
+ "button",
313
+ {
314
+ type: "button",
315
+ onClick: handleSave,
316
+ className: "p-1.5 md:p-2 bg-brand-500 hover:bg-brand-400 rounded-md text-white transition-colors touch-manipulation",
317
+ title: t.save,
318
+ children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.Check, { weight: "bold", className: "w-4 h-4 md:w-5 md:h-5" })
319
+ }
320
+ )
321
+ ] })
322
+ ] }),
323
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 md:p-4", children: [
324
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3 md:mb-4 flex flex-col md:flex-row items-start md:items-center gap-2 md:gap-4", children: [
325
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: `text-xs md:text-sm ${themeClasses.textSecondary} whitespace-nowrap`, children: language === "nl" ? "Kleur:" : "Color:" }),
326
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1.5 md:gap-2 flex-wrap", children: colors.map((c) => /* @__PURE__ */ jsxRuntime.jsx(
327
+ "button",
328
+ {
329
+ type: "button",
330
+ onClick: () => setColor(c),
331
+ className: `w-7 h-7 md:w-8 md:h-8 rounded-full border-2 transition-all touch-manipulation ${color === c ? `${theme === "dark" ? "border-zinc-100" : "border-gray-900"} scale-110` : `${themeClasses.borderSecondary} ${themeClasses.borderHover}`}`,
332
+ style: { backgroundColor: c },
333
+ title: c
334
+ },
335
+ c
336
+ )) })
337
+ ] }),
338
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3 md:mb-4 flex flex-col md:flex-row items-start md:items-center gap-2 md:gap-4", children: [
339
+ /* @__PURE__ */ jsxRuntime.jsx("label", { className: `text-xs md:text-sm ${themeClasses.textSecondary} whitespace-nowrap`, children: language === "nl" ? "Grootte:" : "Size:" }),
340
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full md:w-auto", children: [
341
+ /* @__PURE__ */ jsxRuntime.jsx(
342
+ "input",
343
+ {
344
+ type: "range",
345
+ min: "1",
346
+ max: "10",
347
+ value: brushSize,
348
+ onChange: (e) => setBrushSize(Number(e.target.value)),
349
+ className: "flex-1 md:flex-none md:max-w-xs"
350
+ }
351
+ ),
352
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-xs md:text-sm ${themeClasses.textTertiary} w-6 md:w-8 text-right`, children: brushSize })
353
+ ] })
354
+ ] }),
355
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: `flex justify-center ${themeClasses.canvasBg} rounded-lg p-2 md:p-4 overflow-auto`, children: /* @__PURE__ */ jsxRuntime.jsx(
356
+ "canvas",
357
+ {
358
+ ref: canvasRef,
359
+ onMouseDown: startDrawing,
360
+ onMouseMove: draw,
361
+ onMouseUp: stopDrawing,
362
+ onMouseLeave: stopDrawing,
363
+ onTouchStart: startDrawing,
364
+ onTouchMove: draw,
365
+ onTouchEnd: stopDrawing,
366
+ className: `cursor-crosshair border ${themeClasses.borderPrimary} rounded touch-none`,
367
+ style: {
368
+ width: `${displayWidth}px`,
369
+ height: `${displayHeight}px`,
370
+ maxWidth: "100%",
371
+ maxHeight: "calc(95vh - 200px)"
372
+ }
373
+ }
374
+ ) })
375
+ ] })
376
+ ] }) });
377
+ }
101
378
  function ScreenshotButton({
102
379
  screenshot,
103
- onScreenshotTook
380
+ onScreenshotTook,
381
+ language = "en",
382
+ theme = "dark"
104
383
  }) {
105
384
  const [isTakenScreenshot, setIsTakenScreenShot] = react$1.useState(false);
385
+ const [showEditor, setShowEditor] = react$1.useState(false);
386
+ const [tempScreenshot, setTempScreenshot] = react$1.useState(null);
387
+ const themeClasses = getThemeClasses(theme);
106
388
  async function handleTakeScreenshot() {
107
389
  setIsTakenScreenShot(true);
108
- const canvas = await html2canvas__default.default(document.querySelector("html"));
390
+ const canvas = await html2canvas__default.default(document.querySelector("html"), {
391
+ ignoreElements: (element) => {
392
+ return element.hasAttribute("data-feedback-widget") || element.closest("[data-feedback-widget]") !== null;
393
+ }
394
+ });
109
395
  const base64image = canvas.toDataURL("image/png");
110
396
  onScreenshotTook(base64image);
111
397
  setIsTakenScreenShot(false);
112
398
  }
399
+ function handleEditorSave(editedScreenshot) {
400
+ onScreenshotTook(editedScreenshot);
401
+ setShowEditor(false);
402
+ setTempScreenshot(null);
403
+ }
404
+ function handleEditorCancel() {
405
+ setShowEditor(false);
406
+ setTempScreenshot(null);
407
+ }
408
+ function handleEditScreenshot() {
409
+ if (screenshot) {
410
+ setTempScreenshot(screenshot);
411
+ setShowEditor(true);
412
+ }
413
+ }
414
+ if (showEditor && (tempScreenshot || screenshot)) {
415
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
416
+ /* @__PURE__ */ jsxRuntime.jsx(
417
+ ScreenshotEditor,
418
+ {
419
+ screenshot: tempScreenshot || screenshot,
420
+ onSave: handleEditorSave,
421
+ onCancel: handleEditorCancel,
422
+ language,
423
+ theme
424
+ }
425
+ ),
426
+ screenshot ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
427
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative group", children: [
428
+ /* @__PURE__ */ jsxRuntime.jsx(
429
+ "div",
430
+ {
431
+ className: `p-1 w-10 h-10 rounded-md border ${themeClasses.borderSecondary} flex
432
+ justify-end items-end relative overflow-hidden`,
433
+ style: {
434
+ backgroundImage: `url(${screenshot})`,
435
+ backgroundPosition: "center",
436
+ backgroundSize: "cover"
437
+ },
438
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors rounded-md" })
439
+ }
440
+ ),
441
+ /* @__PURE__ */ jsxRuntime.jsx(
442
+ "button",
443
+ {
444
+ type: "button",
445
+ onClick: (e) => {
446
+ e.stopPropagation();
447
+ onScreenshotTook(null);
448
+ },
449
+ className: "absolute -top-1 -right-1 w-4 h-4 bg-red-500 hover:bg-red-600 rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity z-10",
450
+ title: language === "nl" ? "Verwijderen" : "Delete",
451
+ children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.X, { weight: "bold", className: "w-3 h-3 text-white" })
452
+ }
453
+ )
454
+ ] }),
455
+ /* @__PURE__ */ jsxRuntime.jsx(
456
+ "button",
457
+ {
458
+ type: "button",
459
+ onClick: handleEditScreenshot,
460
+ className: `p-2 ${themeClasses.bgSecondary} rounded-md border-transparent ${themeClasses.bgHoverSecondary}
461
+ transition-colors focus:outline-none focus:ring-2
462
+ focus:ring-offset-2 ${themeClasses.focusRingOffset} focus:ring-brand-500`,
463
+ title: language === "nl" ? "Bewerk screenshot" : "Edit screenshot",
464
+ children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.PencilSimple, { weight: "bold", className: `w-5 h-5 ${themeClasses.textPrimary}` })
465
+ }
466
+ )
467
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(
468
+ "button",
469
+ {
470
+ type: "button",
471
+ className: `p-2 ${themeClasses.bgSecondary} rounded-md border-transparent ${themeClasses.bgHoverSecondary}
472
+ transition-colors focus:outline-none focus:ring-2
473
+ focus:ring-offset-2 ${themeClasses.focusRingOffset} focus:ring-brand-500`,
474
+ onClick: handleTakeScreenshot,
475
+ children: isTakenScreenshot ? /* @__PURE__ */ jsxRuntime.jsx(Loading, {}) : /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.Camera, { weight: "bold", className: `w-6 h-6 ${themeClasses.iconColor}` })
476
+ }
477
+ )
478
+ ] });
479
+ }
113
480
  if (screenshot) {
114
- return /* @__PURE__ */ jsxRuntime.jsx(
115
- "button",
116
- {
117
- type: "button",
118
- className: "p-1 w-10 h-10 rounded-md border-transparent flex \n justify-end items-end text-zinc-400 hover:text-zinc-100 transition-colors",
119
- onClick: () => onScreenshotTook(null),
120
- style: {
121
- backgroundImage: `url(${screenshot})`,
122
- backgroundPosition: "right bottom",
123
- backgroundSize: 180
124
- },
125
- children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.Trash, { weight: "fill" })
126
- }
127
- );
481
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
482
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative group", children: [
483
+ /* @__PURE__ */ jsxRuntime.jsx(
484
+ "div",
485
+ {
486
+ className: `p-1 w-10 h-10 rounded-md border ${themeClasses.borderSecondary} flex
487
+ justify-end items-end relative overflow-hidden`,
488
+ style: {
489
+ backgroundImage: `url(${screenshot})`,
490
+ backgroundPosition: "center",
491
+ backgroundSize: "cover"
492
+ },
493
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors rounded-md" })
494
+ }
495
+ ),
496
+ /* @__PURE__ */ jsxRuntime.jsx(
497
+ "button",
498
+ {
499
+ type: "button",
500
+ onClick: (e) => {
501
+ e.stopPropagation();
502
+ onScreenshotTook(null);
503
+ },
504
+ className: "absolute -top-1 -right-1 w-4 h-4 bg-red-500 hover:bg-red-600 rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity z-10",
505
+ title: language === "nl" ? "Verwijderen" : "Delete",
506
+ children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.X, { weight: "bold", className: "w-3 h-3 text-white" })
507
+ }
508
+ )
509
+ ] }),
510
+ /* @__PURE__ */ jsxRuntime.jsx(
511
+ "button",
512
+ {
513
+ type: "button",
514
+ onClick: handleEditScreenshot,
515
+ className: `p-2 ${themeClasses.bgSecondary} rounded-md border-transparent ${themeClasses.bgHoverSecondary}
516
+ transition-colors focus:outline-none focus:ring-2
517
+ focus:ring-offset-2 ${themeClasses.focusRingOffset} focus:ring-brand-500`,
518
+ title: language === "nl" ? "Bewerk screenshot" : "Edit screenshot",
519
+ children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.PencilSimple, { weight: "bold", className: `w-5 h-5 ${themeClasses.textPrimary}` })
520
+ }
521
+ )
522
+ ] });
128
523
  }
129
524
  return /* @__PURE__ */ jsxRuntime.jsx(
130
525
  "button",
131
526
  {
132
527
  type: "button",
133
- className: "p-2 bg-zinc-800 rounded-md border-transparent hover:bg-zinc-700\n transitions-colors focus:outline-none focus:ring-2\n focus:ring-offset-2 focus:ring-offset-zinc-900 focus:ring-brand-500",
528
+ className: `p-2 ${themeClasses.bgSecondary} rounded-md border-transparent ${themeClasses.bgHoverSecondary}
529
+ transitions-colors focus:outline-none focus:ring-2
530
+ focus:ring-offset-2 ${themeClasses.focusRingOffset} focus:ring-brand-500`,
134
531
  onClick: handleTakeScreenshot,
135
- children: isTakenScreenshot ? /* @__PURE__ */ jsxRuntime.jsx(Loading, {}) : /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.Camera, { weight: "bold", className: "w-6 h-6" })
532
+ children: isTakenScreenshot ? /* @__PURE__ */ jsxRuntime.jsx(Loading, {}) : /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.Camera, { weight: "bold", className: `w-6 h-6 ${themeClasses.iconColor}` })
136
533
  }
137
534
  );
138
535
  }
@@ -144,10 +541,12 @@ function FileUploadButton({
144
541
  maxFileSize = DEFAULT_MAX_FILE_SIZE,
145
542
  maxTotalSize = DEFAULT_MAX_TOTAL_SIZE,
146
543
  acceptedTypes = "image/*,.pdf,.doc,.docx,.txt",
147
- language = "en"
544
+ language = "en",
545
+ theme = "dark"
148
546
  }) {
149
547
  const fileInputRef = react$1.useRef(null);
150
548
  const [error, setError] = react$1.useState(null);
549
+ const themeClasses = getThemeClasses(theme);
151
550
  const translations2 = {
152
551
  en: {
153
552
  upload: "Upload file",
@@ -233,10 +632,12 @@ function FileUploadButton({
233
632
  "button",
234
633
  {
235
634
  type: "button",
236
- className: "p-2 bg-zinc-800 rounded-md border-transparent hover:bg-zinc-700\n transitions-colors focus:outline-none focus:ring-2\n focus:ring-offset-2 focus:ring-offset-zinc-900 focus:ring-brand-500",
635
+ className: `p-2 ${themeClasses.bgSecondary} rounded-md border-transparent ${themeClasses.bgHoverSecondary}
636
+ transitions-colors focus:outline-none focus:ring-2
637
+ focus:ring-offset-2 ${themeClasses.focusRingOffset} focus:ring-brand-500`,
237
638
  onClick: handleButtonClick,
238
639
  title: t.upload,
239
- children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.Paperclip, { weight: "bold", className: "w-6 h-6" })
640
+ children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.Paperclip, { weight: "bold", className: `w-6 h-6 ${themeClasses.iconColor}` })
240
641
  }
241
642
  ),
242
643
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -253,25 +654,25 @@ function FileUploadButton({
253
654
  files.map((uploadedFile) => /* @__PURE__ */ jsxRuntime.jsxs(
254
655
  "div",
255
656
  {
256
- className: "flex items-center gap-1 bg-zinc-800 rounded-md px-2 py-1 text-xs",
657
+ className: `flex items-center gap-1 ${themeClasses.bgSecondary} rounded-md px-2 py-1 text-xs`,
257
658
  children: [
258
659
  uploadedFile.preview ? /* @__PURE__ */ jsxRuntime.jsx(
259
660
  "img",
260
661
  {
261
662
  src: uploadedFile.preview,
262
663
  alt: uploadedFile.file.name,
263
- className: "w-6 h-6 object-cover rounded"
664
+ className: "w-5 h-5 md:w-6 md:h-6 object-cover rounded flex-shrink-0"
264
665
  }
265
- ) : /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.Paperclip, { className: "w-4 h-4" }),
266
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-zinc-300 max-w-[100px] truncate", title: uploadedFile.file.name, children: uploadedFile.file.name }),
666
+ ) : /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.Paperclip, { className: `w-3 h-3 md:w-4 md:h-4 flex-shrink-0 ${themeClasses.iconColor}` }),
667
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${themeClasses.textSecondary} max-w-[80px] md:max-w-[100px] truncate`, title: uploadedFile.file.name, children: uploadedFile.file.name }),
267
668
  /* @__PURE__ */ jsxRuntime.jsx(
268
669
  "button",
269
670
  {
270
671
  type: "button",
271
672
  onClick: () => handleRemoveFile(uploadedFile.id),
272
- className: "text-zinc-400 hover:text-zinc-100 transition-colors",
673
+ className: `${themeClasses.textTertiary} ${theme === "dark" ? "hover:text-zinc-100" : "hover:text-gray-900"} transition-colors flex-shrink-0 touch-manipulation`,
273
674
  title: t.remove,
274
- children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.X, { weight: "bold", className: "w-4 h-4" })
675
+ children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.X, { weight: "bold", className: "w-3 h-3 md:w-4 md:h-4" })
275
676
  }
276
677
  )
277
678
  ]
@@ -280,7 +681,7 @@ function FileUploadButton({
280
681
  ))
281
682
  ] }),
282
683
  error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-red-400", children: error }),
283
- files.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs text-zinc-400", children: [
684
+ files.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: `text-xs ${themeClasses.textTertiary}`, children: [
284
685
  files.length,
285
686
  " ",
286
687
  t.files,
@@ -805,10 +1206,12 @@ function FeedbackContentStep({
805
1206
  onFeedbackSent,
806
1207
  integration,
807
1208
  githubConfig,
808
- language
1209
+ language,
1210
+ theme
809
1211
  }) {
810
1212
  const t = getTranslations(language);
811
1213
  const feedbackTypes = getFeedbackTypes(language);
1214
+ const themeClasses = getThemeClasses(theme);
812
1215
  const [screenshot, setScreenshot] = react$1.useState(null);
813
1216
  const [uploadedFiles, setUploadedFiles] = react$1.useState([]);
814
1217
  const feedbackTypeData = feedbackTypes[feedbackType];
@@ -847,34 +1250,38 @@ function FeedbackContentStep({
847
1250
  }
848
1251
  }
849
1252
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
850
- /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "relative w-full pr-8", children: [
1253
+ /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "relative w-full", children: [
851
1254
  /* @__PURE__ */ jsxRuntime.jsx(
852
1255
  "button",
853
1256
  {
854
1257
  type: "button",
855
- className: "absolute top-5 left-5 text-zinc-400 hover:text-zinc-100 z-10",
1258
+ className: `absolute top-0 left-0 ${themeClasses.textTertiary} ${theme === "dark" ? "hover:text-zinc-100" : "hover:text-gray-900"} z-10 p-2 md:p-2.5`,
856
1259
  onClick: onFeedbackRestartRequest,
857
- children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.ArrowLeft, { weight: "bold", className: "w-4 h-4" })
1260
+ children: /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.ArrowLeft, { weight: "bold", className: "w-5 h-5 md:w-5 md:h-5" })
858
1261
  }
859
1262
  ),
860
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xl leading-6 flex items-center gap-2 mt-2 pl-10", children: [
1263
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `text-lg md:text-xl leading-6 flex items-center gap-2 pl-10 md:pl-12 pr-10 md:pr-12 ${themeClasses.textPrimary}`, children: [
861
1264
  /* @__PURE__ */ jsxRuntime.jsx(
862
1265
  "img",
863
1266
  {
864
1267
  src: feedbackTypeData.image.source,
865
1268
  alt: feedbackTypeData.image.alt,
866
- className: "w-6 h-6"
1269
+ className: "w-5 h-5 md:w-6 md:h-6"
867
1270
  }
868
1271
  ),
869
1272
  feedbackTypeData.title
870
1273
  ] }),
871
- /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { className: "absolute top-5 right-5", title: t.form.closeButton })
1274
+ /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { className: "absolute top-0 right-0 p-2 md:p-2.5", title: t.form.closeButton, theme })
872
1275
  ] }),
873
- /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmitFeedback, className: "my-4 w-full", children: [
1276
+ /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmitFeedback, className: "my-3 md:my-4 w-full", children: [
874
1277
  /* @__PURE__ */ jsxRuntime.jsx(
875
1278
  "textarea",
876
1279
  {
877
- className: "min-w-[384px] w-full min-h-[112px] text-sm \n placeholder-zinc-400 text-zinc-100 border-zinc-600 bg-transparent rounded-md \n focus:border-brand-500 focus:ring-brand-500 focus:ring-1 resize-none focus:outline-none\n scrollbar-thumb-zinc-700 scrollbar-track-transparent scrollbar-thin",
1280
+ className: `w-full min-h-[100px] md:min-h-[112px] text-sm
1281
+ ${themeClasses.textPrimary} border-2 border-brand-500 bg-transparent rounded-md p-2 md:p-3
1282
+ ${theme === "dark" ? "placeholder:text-zinc-400" : "placeholder:text-gray-500"}
1283
+ focus:border-brand-500 focus:ring-brand-500 focus:ring-1 resize-none focus:outline-none
1284
+ ${theme === "dark" ? "scrollbar-thumb-zinc-700" : "scrollbar-thumb-gray-400"} scrollbar-track-transparent scrollbar-thin`,
878
1285
  placeholder: t.content.placeholder,
879
1286
  onChange: (e) => setComment(e.target.value)
880
1287
  }
@@ -884,15 +1291,18 @@ function FeedbackContentStep({
884
1291
  {
885
1292
  files: uploadedFiles,
886
1293
  onFilesChanged: setUploadedFiles,
887
- language
1294
+ language,
1295
+ theme
888
1296
  }
889
1297
  ) }),
890
- /* @__PURE__ */ jsxRuntime.jsxs("footer", { className: " flex gap-2 mt-2", children: [
1298
+ /* @__PURE__ */ jsxRuntime.jsxs("footer", { className: "flex gap-2 mt-3", children: [
891
1299
  /* @__PURE__ */ jsxRuntime.jsx(
892
1300
  ScreenshotButton,
893
1301
  {
894
1302
  screenshot,
895
- onScreenshotTook: setScreenshot
1303
+ onScreenshotTook: setScreenshot,
1304
+ language,
1305
+ theme
896
1306
  }
897
1307
  ),
898
1308
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -900,7 +1310,11 @@ function FeedbackContentStep({
900
1310
  {
901
1311
  type: "submit",
902
1312
  disabled: comment.length === 0 || isSendingFeedback,
903
- className: "p-2 bg-brand-500 rounded-md border-transparent flex-1 justify-center\n items-center text-sm hover:bg-brand-300 focus:outline-none focus:ring-2\n focus:ring-offset-2 focus:ring-offset-zinc-900 focus:ring-brand-500\n transition-colors disabled:opacity-50 disabled:cursor-not-allowed\n disabled:hover:bg-brand-500",
1313
+ className: `p-2 bg-brand-500 rounded-md border-transparent flex-1 justify-center
1314
+ items-center text-sm hover:bg-brand-300 focus:outline-none focus:ring-2
1315
+ focus:ring-offset-2 ${themeClasses.focusRingOffset} focus:ring-brand-500
1316
+ transition-colors disabled:opacity-50 disabled:cursor-not-allowed
1317
+ disabled:hover:bg-brand-500 flex text-white`,
904
1318
  children: isSendingFeedback ? /* @__PURE__ */ jsxRuntime.jsx(Loading, {}) : t.content.sendButton
905
1319
  }
906
1320
  )
@@ -908,22 +1322,23 @@ function FeedbackContentStep({
908
1322
  ] })
909
1323
  ] });
910
1324
  }
911
- function FeedbackSuccessStep({ onFeedbackRestartRequest, language }) {
1325
+ function FeedbackSuccessStep({ onFeedbackRestartRequest, language, theme }) {
912
1326
  const t = getTranslations(language);
1327
+ const themeClasses = getThemeClasses(theme);
913
1328
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
914
- /* @__PURE__ */ jsxRuntime.jsx("header", { children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { title: t.form.closeButton }) }),
915
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center py-10 w-[304px]", children: [
916
- /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "41", height: "40", viewBox: "0 0 41 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1329
+ /* @__PURE__ */ jsxRuntime.jsx("header", { children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { title: t.form.closeButton, theme }) }),
1330
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center py-8 md:py-10 w-full max-w-[304px] px-2", children: [
1331
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "41", height: "40", viewBox: "0 0 41 40", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "w-10 h-10 md:w-[41px] md:h-[40px]", children: [
917
1332
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M38.5 34C38.5 36.209 36.709 38 34.5 38H6.5C4.291 38 2.5 36.209 2.5 34V6C2.5 3.791 4.291 2 6.5 2H34.5C36.709 2 38.5 3.791 38.5 6V34Z", fill: "#77B255" }),
918
1333
  /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M31.78 8.36202C30.624 7.61102 29.076 7.94002 28.322 9.09802L17.436 25.877L12.407 21.227C11.393 20.289 9.81103 20.352 8.87403 21.365C7.93703 22.379 7.99903 23.961 9.01303 24.898L16.222 31.564C16.702 32.009 17.312 32.229 17.918 32.229C18.591 32.229 19.452 31.947 20.017 31.09C20.349 30.584 32.517 11.82 32.517 11.82C33.268 10.661 32.938 9.11302 31.78 8.36202Z", fill: "white" })
919
1334
  ] }),
920
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xl mt-2", children: t.success.message }),
1335
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `text-lg md:text-xl mt-2 text-center ${themeClasses.textPrimary}`, children: t.success.message }),
921
1336
  /* @__PURE__ */ jsxRuntime.jsx(
922
1337
  "button",
923
1338
  {
924
1339
  type: "button",
925
1340
  onClick: onFeedbackRestartRequest,
926
- className: "py-2 px-6 mt-6 bg-zinc-800 rounded-md border-transparent text-sm leading-6 hover:bg-zinc-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-zinc-900 focus:ring-brand-500 transition-colors",
1341
+ className: `py-2 px-6 mt-6 ${themeClasses.buttonSecondary} rounded-md border-transparent text-sm leading-6 focus:outline-none focus:ring-2 focus:ring-offset-2 ${themeClasses.focusRingOffset} focus:ring-brand-500 transition-colors`,
927
1342
  children: t.success.sendAnother
928
1343
  }
929
1344
  )
@@ -956,15 +1371,16 @@ function getFeedbackTypes(language = "en") {
956
1371
  }
957
1372
  };
958
1373
  }
959
- function WidgetForm({ integration, githubConfig, language }) {
1374
+ function WidgetForm({ integration, githubConfig, language, theme }) {
960
1375
  const [feedbackType, setFeedbackType] = react$1.useState(null);
961
1376
  const [feedbackSent, setFeedbackSent] = react$1.useState(false);
1377
+ const themeClasses = getThemeClasses(theme);
962
1378
  function handleRestartFeedback() {
963
1379
  setFeedbackSent(false);
964
1380
  setFeedbackType(null);
965
1381
  }
966
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-zinc-900 p-4 relative rounded-2xl mb-4 flex flex-col items-center shadow-lg w-[calc(100vw-2rem)] md:w-auto", children: [
967
- feedbackSent ? /* @__PURE__ */ jsxRuntime.jsx(FeedbackSuccessStep, { onFeedbackRestartRequest: handleRestartFeedback, language }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !feedbackType ? /* @__PURE__ */ jsxRuntime.jsx(FeedbackTypeStep, { onFeedbackTypeChanged: setFeedbackType, language }) : /* @__PURE__ */ jsxRuntime.jsx(
1382
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${themeClasses.bgPrimary} p-3 md:p-4 relative rounded-2xl mb-4 flex flex-col items-center shadow-lg w-[calc(100vw-2rem)] md:w-auto md:min-w-[384px] max-w-md`, children: [
1383
+ feedbackSent ? /* @__PURE__ */ jsxRuntime.jsx(FeedbackSuccessStep, { onFeedbackRestartRequest: handleRestartFeedback, language, theme }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: !feedbackType ? /* @__PURE__ */ jsxRuntime.jsx(FeedbackTypeStep, { onFeedbackTypeChanged: setFeedbackType, language, theme }) : /* @__PURE__ */ jsxRuntime.jsx(
968
1384
  FeedbackContentStep,
969
1385
  {
970
1386
  feedbackType,
@@ -972,10 +1388,11 @@ function WidgetForm({ integration, githubConfig, language }) {
972
1388
  onFeedbackSent: () => setFeedbackSent(true),
973
1389
  integration,
974
1390
  githubConfig,
975
- language
1391
+ language,
1392
+ theme
976
1393
  }
977
1394
  ) }),
978
- /* @__PURE__ */ jsxRuntime.jsx("footer", { className: "text-xs text-neutral-400", children: /* @__PURE__ */ jsxRuntime.jsx(
1395
+ /* @__PURE__ */ jsxRuntime.jsx("footer", { className: `text-xs ${themeClasses.textMuted} mt-2`, children: /* @__PURE__ */ jsxRuntime.jsx(
979
1396
  "a",
980
1397
  {
981
1398
  className: "underline underline-offset-2",
@@ -993,13 +1410,25 @@ function getDefaultLanguage() {
993
1410
  }
994
1411
  return "en";
995
1412
  }
1413
+ function isWidgetEnabled() {
1414
+ if (typeof process !== "undefined" && process.env.NEXT_PUBLIC_FEEDBACK_ENABLED !== void 0) {
1415
+ const enabled = process.env.NEXT_PUBLIC_FEEDBACK_ENABLED.toLowerCase();
1416
+ return enabled !== "false" && enabled !== "0";
1417
+ }
1418
+ return true;
1419
+ }
996
1420
  function Widget({
997
1421
  integration,
998
1422
  githubConfig,
999
1423
  position = "bottom-right",
1000
- language
1424
+ language,
1425
+ theme
1001
1426
  }) {
1427
+ if (!isWidgetEnabled()) {
1428
+ return null;
1429
+ }
1002
1430
  const finalLanguage = language || getDefaultLanguage();
1431
+ const finalTheme = theme || getDefaultTheme();
1003
1432
  const t = getTranslations(finalLanguage);
1004
1433
  const positionClasses = {
1005
1434
  "bottom-right": "bottom-4 right-4 md:bottom-8 md:right-8",
@@ -1007,24 +1436,28 @@ function Widget({
1007
1436
  "top-right": "top-4 right-4 md:top-8 md:right-8",
1008
1437
  "top-left": "top-4 left-4 md:top-8 md:left-4"
1009
1438
  };
1010
- const alignmentClass = position.includes("left") ? "items-start" : "items-end";
1011
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Popover, { className: `fixed ${positionClasses[position]} flex flex-col ${alignmentClass} z-50`, children: [
1012
- /* @__PURE__ */ jsxRuntime.jsx(react.Popover.Panel, { children: /* @__PURE__ */ jsxRuntime.jsx(
1439
+ const isTop = position.includes("top");
1440
+ const isLeft = position.includes("left");
1441
+ const panelPositionClass = isTop ? "absolute top-full mt-2" : "absolute bottom-full mb-2";
1442
+ const panelAlignmentClass = isLeft ? "left-0" : "right-0";
1443
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-feedback-widget": "true", className: `fixed ${positionClasses[position]} z-50`, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Popover, { className: "relative", children: [
1444
+ /* @__PURE__ */ jsxRuntime.jsx(react.Popover.Panel, { className: `${panelPositionClass} ${panelAlignmentClass}`, children: /* @__PURE__ */ jsxRuntime.jsx(
1013
1445
  WidgetForm,
1014
1446
  {
1015
1447
  integration,
1016
1448
  githubConfig,
1017
- language: finalLanguage
1449
+ language: finalLanguage,
1450
+ theme: finalTheme
1018
1451
  }
1019
1452
  ) }),
1020
- /* @__PURE__ */ jsxRuntime.jsxs(react.Popover.Button, { className: "bg-brand-500 rounded-full px-3 h-12 text-white flex items-center group focus:outline-none", children: [
1021
- /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.ChatTeardropDots, { className: "w-6 h-6" }),
1022
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "max-w-0 overflow-hidden group-hover:max-w-xs transition-all duration-500 ease-linear", children: [
1453
+ /* @__PURE__ */ jsxRuntime.jsxs(react.Popover.Button, { className: "bg-brand-500 rounded-full px-3 md:px-3 h-12 text-white flex items-center group focus:outline-none shadow-lg hover:shadow-xl transition-shadow", children: [
1454
+ /* @__PURE__ */ jsxRuntime.jsx(phosphorReact.ChatTeardropDots, { className: "w-6 h-6 flex-shrink-0" }),
1455
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "max-w-0 overflow-hidden group-hover:max-w-xs md:group-hover:max-w-xs transition-all duration-500 ease-linear hidden md:block", children: [
1023
1456
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pl-2" }),
1024
1457
  t.widget.button
1025
1458
  ] })
1026
1459
  ] })
1027
- ] });
1460
+ ] }) });
1028
1461
  }
1029
1462
 
1030
1463
  exports.Widget = Widget;