@bbearai/react 0.1.6 → 0.1.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/dist/index.js CHANGED
@@ -240,6 +240,7 @@ function BugBearPanel({
240
240
  const [profilePlatforms, setProfilePlatforms] = (0, import_react2.useState)([]);
241
241
  const [savingProfile, setSavingProfile] = (0, import_react2.useState)(false);
242
242
  const [profileSaved, setProfileSaved] = (0, import_react2.useState)(false);
243
+ const [showProfileOverlay, setShowProfileOverlay] = (0, import_react2.useState)(false);
243
244
  (0, import_react2.useEffect)(() => {
244
245
  if (typeof window === "undefined") return;
245
246
  try {
@@ -376,6 +377,15 @@ function BugBearPanel({
376
377
  };
377
378
  const pendingCount = assignments.filter((a) => a.status === "pending").length;
378
379
  const inProgressCount = assignments.filter((a) => a.status === "in_progress").length;
380
+ const handleOpenProfile = () => {
381
+ if (testerInfo) {
382
+ setProfileName(testerInfo.name);
383
+ setProfileAdditionalEmails(testerInfo.additionalEmails || []);
384
+ setProfilePlatforms(testerInfo.platforms || []);
385
+ }
386
+ setProfileEditing(false);
387
+ setShowProfileOverlay(true);
388
+ };
379
389
  const handleStartEditProfile = () => {
380
390
  if (testerInfo) {
381
391
  setProfileName(testerInfo.name);
@@ -388,6 +398,11 @@ function BugBearPanel({
388
398
  setProfileEditing(false);
389
399
  setNewEmailInput("");
390
400
  };
401
+ const handleCloseProfile = () => {
402
+ setShowProfileOverlay(false);
403
+ setProfileEditing(false);
404
+ setNewEmailInput("");
405
+ };
391
406
  const handleAddEmail = () => {
392
407
  const email = newEmailInput.trim().toLowerCase();
393
408
  if (email && email.includes("@") && !profileAdditionalEmails.includes(email)) {
@@ -416,7 +431,10 @@ function BugBearPanel({
416
431
  if (result.success) {
417
432
  setProfileEditing(false);
418
433
  setProfileSaved(true);
419
- setTimeout(() => setProfileSaved(false), 2e3);
434
+ setTimeout(() => {
435
+ setProfileSaved(false);
436
+ setShowProfileOverlay(false);
437
+ }, 1500);
420
438
  }
421
439
  setSavingProfile(false);
422
440
  };
@@ -467,7 +485,17 @@ function BugBearPanel({
467
485
  "BugBear",
468
486
  draggable && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-purple-300 text-xs", title: "Drag to move, double-click to reset", children: "\u22EE\u22EE" })
469
487
  ] }),
470
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-purple-200 text-xs", children: testerInfo?.name })
488
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
489
+ "button",
490
+ {
491
+ onClick: handleOpenProfile,
492
+ className: "text-purple-200 text-xs flex items-center gap-1 hover:text-white transition-colors",
493
+ children: [
494
+ testerInfo?.name,
495
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-[10px]", children: "\u270E" })
496
+ ]
497
+ }
498
+ )
471
499
  ] })
472
500
  ] }),
473
501
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
@@ -493,14 +521,6 @@ function BugBearPanel({
493
521
  ]
494
522
  }
495
523
  ),
496
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
497
- "button",
498
- {
499
- onClick: () => setActiveTab("profile"),
500
- className: `flex-1 px-4 py-2 text-sm font-medium transition-colors ${activeTab === "profile" ? "text-purple-600 border-b-2 border-purple-600" : "text-gray-500 hover:text-gray-700"}`,
501
- children: "Profile"
502
- }
503
- ),
504
524
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
505
525
  "button",
506
526
  {
@@ -777,7 +797,74 @@ function BugBearPanel({
777
797
  ] })
778
798
  ] })
779
799
  ) : null }),
780
- activeTab === "profile" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { children: profileSaved ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "text-center py-8", children: [
800
+ activeTab === "report" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { children: submitted ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "text-center py-8", children: [
801
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-4xl", children: "\u{1F389}" }),
802
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-gray-600 mt-2 font-medium", children: "Report submitted!" })
803
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
804
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex gap-2 mb-4", children: [
805
+ { type: "bug", label: "\u{1F41B} Bug", color: "red" },
806
+ { type: "feedback", label: "\u{1F4A1} Feedback", color: "blue" },
807
+ { type: "suggestion", label: "\u2728 Idea", color: "purple" }
808
+ ].map(({ type, label, color }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
809
+ "button",
810
+ {
811
+ onClick: () => setReportType(type),
812
+ className: `flex-1 py-1.5 px-2 rounded-lg text-xs font-medium transition-colors ${reportType === type ? color === "red" ? "bg-red-100 text-red-700 ring-2 ring-red-500" : color === "blue" ? "bg-blue-100 text-blue-700 ring-2 ring-blue-500" : "bg-purple-100 text-purple-700 ring-2 ring-purple-500" : "bg-gray-100 text-gray-600 hover:bg-gray-200"}`,
813
+ children: label
814
+ },
815
+ type
816
+ )) }),
817
+ (reportType === "bug" || reportType === "test_fail") && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "mb-3", children: [
818
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: "Severity" }),
819
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex gap-1", children: ["critical", "high", "medium", "low"].map((sev) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
820
+ "button",
821
+ {
822
+ onClick: () => setSeverity(sev),
823
+ className: `flex-1 py-1 px-2 rounded text-xs font-medium capitalize transition-colors ${severity === sev ? sev === "critical" ? "bg-red-600 text-white" : sev === "high" ? "bg-orange-500 text-white" : sev === "medium" ? "bg-yellow-500 text-black" : "bg-gray-500 text-white" : "bg-gray-100 text-gray-600 hover:bg-gray-200"}`,
824
+ children: sev
825
+ },
826
+ sev
827
+ )) })
828
+ ] }),
829
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "mb-3", children: [
830
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: "What happened?" }),
831
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
832
+ "textarea",
833
+ {
834
+ value: description,
835
+ onChange: (e) => setDescription(e.target.value),
836
+ placeholder: "Describe the issue...",
837
+ rows: 3,
838
+ className: "w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500 resize-none"
839
+ }
840
+ )
841
+ ] }),
842
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
843
+ "button",
844
+ {
845
+ onClick: handleSubmitReport,
846
+ disabled: submitting || !description.trim(),
847
+ className: "w-full py-2 px-4 bg-purple-600 text-white rounded-lg font-medium text-sm hover:bg-purple-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
848
+ children: submitting ? "Submitting..." : "Submit Report"
849
+ }
850
+ )
851
+ ] }) })
852
+ ] }),
853
+ showProfileOverlay && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "absolute inset-0 bg-white z-50 flex flex-col rounded-xl overflow-hidden", children: [
854
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "bg-purple-600 text-white px-4 py-3 flex items-center justify-between", children: [
855
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
856
+ "button",
857
+ {
858
+ onClick: handleCloseProfile,
859
+ className: "text-sm text-purple-200 hover:text-white transition-colors",
860
+ children: "\u2190 Back"
861
+ }
862
+ ),
863
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "font-semibold text-sm", children: "Profile" }),
864
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "w-12" }),
865
+ " "
866
+ ] }),
867
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex-1 overflow-y-auto p-4", children: profileSaved ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "text-center py-8", children: [
781
868
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-4xl", children: "\u2705" }),
782
869
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-gray-600 mt-2 font-medium", children: "Profile saved!" })
783
870
  ] }) : profileEditing ? (
@@ -920,59 +1007,7 @@ function BugBearPanel({
920
1007
  }
921
1008
  )
922
1009
  ] })
923
- ) }),
924
- activeTab === "report" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { children: submitted ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "text-center py-8", children: [
925
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "text-4xl", children: "\u{1F389}" }),
926
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-gray-600 mt-2 font-medium", children: "Report submitted!" })
927
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
928
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex gap-2 mb-4", children: [
929
- { type: "bug", label: "\u{1F41B} Bug", color: "red" },
930
- { type: "feedback", label: "\u{1F4A1} Feedback", color: "blue" },
931
- { type: "suggestion", label: "\u2728 Idea", color: "purple" }
932
- ].map(({ type, label, color }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
933
- "button",
934
- {
935
- onClick: () => setReportType(type),
936
- className: `flex-1 py-1.5 px-2 rounded-lg text-xs font-medium transition-colors ${reportType === type ? color === "red" ? "bg-red-100 text-red-700 ring-2 ring-red-500" : color === "blue" ? "bg-blue-100 text-blue-700 ring-2 ring-blue-500" : "bg-purple-100 text-purple-700 ring-2 ring-purple-500" : "bg-gray-100 text-gray-600 hover:bg-gray-200"}`,
937
- children: label
938
- },
939
- type
940
- )) }),
941
- (reportType === "bug" || reportType === "test_fail") && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "mb-3", children: [
942
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: "Severity" }),
943
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex gap-1", children: ["critical", "high", "medium", "low"].map((sev) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
944
- "button",
945
- {
946
- onClick: () => setSeverity(sev),
947
- className: `flex-1 py-1 px-2 rounded text-xs font-medium capitalize transition-colors ${severity === sev ? sev === "critical" ? "bg-red-600 text-white" : sev === "high" ? "bg-orange-500 text-white" : sev === "medium" ? "bg-yellow-500 text-black" : "bg-gray-500 text-white" : "bg-gray-100 text-gray-600 hover:bg-gray-200"}`,
948
- children: sev
949
- },
950
- sev
951
- )) })
952
- ] }),
953
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "mb-3", children: [
954
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: "What happened?" }),
955
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
956
- "textarea",
957
- {
958
- value: description,
959
- onChange: (e) => setDescription(e.target.value),
960
- placeholder: "Describe the issue...",
961
- rows: 3,
962
- className: "w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500 resize-none"
963
- }
964
- )
965
- ] }),
966
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
967
- "button",
968
- {
969
- onClick: handleSubmitReport,
970
- disabled: submitting || !description.trim(),
971
- className: "w-full py-2 px-4 bg-purple-600 text-white rounded-lg font-medium text-sm hover:bg-purple-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
972
- children: submitting ? "Submitting..." : "Submit Report"
973
- }
974
- )
975
- ] }) })
1010
+ ) })
976
1011
  ] }),
977
1012
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "px-4 py-2 bg-gray-50 border-t border-gray-200 flex items-center justify-between text-xs text-gray-400", children: [
978
1013
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { children: [
package/dist/index.mjs CHANGED
@@ -210,6 +210,7 @@ function BugBearPanel({
210
210
  const [profilePlatforms, setProfilePlatforms] = useState2([]);
211
211
  const [savingProfile, setSavingProfile] = useState2(false);
212
212
  const [profileSaved, setProfileSaved] = useState2(false);
213
+ const [showProfileOverlay, setShowProfileOverlay] = useState2(false);
213
214
  useEffect2(() => {
214
215
  if (typeof window === "undefined") return;
215
216
  try {
@@ -346,6 +347,15 @@ function BugBearPanel({
346
347
  };
347
348
  const pendingCount = assignments.filter((a) => a.status === "pending").length;
348
349
  const inProgressCount = assignments.filter((a) => a.status === "in_progress").length;
350
+ const handleOpenProfile = () => {
351
+ if (testerInfo) {
352
+ setProfileName(testerInfo.name);
353
+ setProfileAdditionalEmails(testerInfo.additionalEmails || []);
354
+ setProfilePlatforms(testerInfo.platforms || []);
355
+ }
356
+ setProfileEditing(false);
357
+ setShowProfileOverlay(true);
358
+ };
349
359
  const handleStartEditProfile = () => {
350
360
  if (testerInfo) {
351
361
  setProfileName(testerInfo.name);
@@ -358,6 +368,11 @@ function BugBearPanel({
358
368
  setProfileEditing(false);
359
369
  setNewEmailInput("");
360
370
  };
371
+ const handleCloseProfile = () => {
372
+ setShowProfileOverlay(false);
373
+ setProfileEditing(false);
374
+ setNewEmailInput("");
375
+ };
361
376
  const handleAddEmail = () => {
362
377
  const email = newEmailInput.trim().toLowerCase();
363
378
  if (email && email.includes("@") && !profileAdditionalEmails.includes(email)) {
@@ -386,7 +401,10 @@ function BugBearPanel({
386
401
  if (result.success) {
387
402
  setProfileEditing(false);
388
403
  setProfileSaved(true);
389
- setTimeout(() => setProfileSaved(false), 2e3);
404
+ setTimeout(() => {
405
+ setProfileSaved(false);
406
+ setShowProfileOverlay(false);
407
+ }, 1500);
390
408
  }
391
409
  setSavingProfile(false);
392
410
  };
@@ -437,7 +455,17 @@ function BugBearPanel({
437
455
  "BugBear",
438
456
  draggable && /* @__PURE__ */ jsx2("span", { className: "text-purple-300 text-xs", title: "Drag to move, double-click to reset", children: "\u22EE\u22EE" })
439
457
  ] }),
440
- /* @__PURE__ */ jsx2("p", { className: "text-purple-200 text-xs", children: testerInfo?.name })
458
+ /* @__PURE__ */ jsxs(
459
+ "button",
460
+ {
461
+ onClick: handleOpenProfile,
462
+ className: "text-purple-200 text-xs flex items-center gap-1 hover:text-white transition-colors",
463
+ children: [
464
+ testerInfo?.name,
465
+ /* @__PURE__ */ jsx2("span", { className: "text-[10px]", children: "\u270E" })
466
+ ]
467
+ }
468
+ )
441
469
  ] })
442
470
  ] }),
443
471
  /* @__PURE__ */ jsx2(
@@ -463,14 +491,6 @@ function BugBearPanel({
463
491
  ]
464
492
  }
465
493
  ),
466
- /* @__PURE__ */ jsx2(
467
- "button",
468
- {
469
- onClick: () => setActiveTab("profile"),
470
- className: `flex-1 px-4 py-2 text-sm font-medium transition-colors ${activeTab === "profile" ? "text-purple-600 border-b-2 border-purple-600" : "text-gray-500 hover:text-gray-700"}`,
471
- children: "Profile"
472
- }
473
- ),
474
494
  /* @__PURE__ */ jsx2(
475
495
  "button",
476
496
  {
@@ -747,7 +767,74 @@ function BugBearPanel({
747
767
  ] })
748
768
  ] })
749
769
  ) : null }),
750
- activeTab === "profile" && /* @__PURE__ */ jsx2("div", { children: profileSaved ? /* @__PURE__ */ jsxs("div", { className: "text-center py-8", children: [
770
+ activeTab === "report" && /* @__PURE__ */ jsx2("div", { children: submitted ? /* @__PURE__ */ jsxs("div", { className: "text-center py-8", children: [
771
+ /* @__PURE__ */ jsx2("span", { className: "text-4xl", children: "\u{1F389}" }),
772
+ /* @__PURE__ */ jsx2("p", { className: "text-gray-600 mt-2 font-medium", children: "Report submitted!" })
773
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
774
+ /* @__PURE__ */ jsx2("div", { className: "flex gap-2 mb-4", children: [
775
+ { type: "bug", label: "\u{1F41B} Bug", color: "red" },
776
+ { type: "feedback", label: "\u{1F4A1} Feedback", color: "blue" },
777
+ { type: "suggestion", label: "\u2728 Idea", color: "purple" }
778
+ ].map(({ type, label, color }) => /* @__PURE__ */ jsx2(
779
+ "button",
780
+ {
781
+ onClick: () => setReportType(type),
782
+ className: `flex-1 py-1.5 px-2 rounded-lg text-xs font-medium transition-colors ${reportType === type ? color === "red" ? "bg-red-100 text-red-700 ring-2 ring-red-500" : color === "blue" ? "bg-blue-100 text-blue-700 ring-2 ring-blue-500" : "bg-purple-100 text-purple-700 ring-2 ring-purple-500" : "bg-gray-100 text-gray-600 hover:bg-gray-200"}`,
783
+ children: label
784
+ },
785
+ type
786
+ )) }),
787
+ (reportType === "bug" || reportType === "test_fail") && /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
788
+ /* @__PURE__ */ jsx2("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: "Severity" }),
789
+ /* @__PURE__ */ jsx2("div", { className: "flex gap-1", children: ["critical", "high", "medium", "low"].map((sev) => /* @__PURE__ */ jsx2(
790
+ "button",
791
+ {
792
+ onClick: () => setSeverity(sev),
793
+ className: `flex-1 py-1 px-2 rounded text-xs font-medium capitalize transition-colors ${severity === sev ? sev === "critical" ? "bg-red-600 text-white" : sev === "high" ? "bg-orange-500 text-white" : sev === "medium" ? "bg-yellow-500 text-black" : "bg-gray-500 text-white" : "bg-gray-100 text-gray-600 hover:bg-gray-200"}`,
794
+ children: sev
795
+ },
796
+ sev
797
+ )) })
798
+ ] }),
799
+ /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
800
+ /* @__PURE__ */ jsx2("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: "What happened?" }),
801
+ /* @__PURE__ */ jsx2(
802
+ "textarea",
803
+ {
804
+ value: description,
805
+ onChange: (e) => setDescription(e.target.value),
806
+ placeholder: "Describe the issue...",
807
+ rows: 3,
808
+ className: "w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500 resize-none"
809
+ }
810
+ )
811
+ ] }),
812
+ /* @__PURE__ */ jsx2(
813
+ "button",
814
+ {
815
+ onClick: handleSubmitReport,
816
+ disabled: submitting || !description.trim(),
817
+ className: "w-full py-2 px-4 bg-purple-600 text-white rounded-lg font-medium text-sm hover:bg-purple-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
818
+ children: submitting ? "Submitting..." : "Submit Report"
819
+ }
820
+ )
821
+ ] }) })
822
+ ] }),
823
+ showProfileOverlay && /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 bg-white z-50 flex flex-col rounded-xl overflow-hidden", children: [
824
+ /* @__PURE__ */ jsxs("div", { className: "bg-purple-600 text-white px-4 py-3 flex items-center justify-between", children: [
825
+ /* @__PURE__ */ jsx2(
826
+ "button",
827
+ {
828
+ onClick: handleCloseProfile,
829
+ className: "text-sm text-purple-200 hover:text-white transition-colors",
830
+ children: "\u2190 Back"
831
+ }
832
+ ),
833
+ /* @__PURE__ */ jsx2("span", { className: "font-semibold text-sm", children: "Profile" }),
834
+ /* @__PURE__ */ jsx2("div", { className: "w-12" }),
835
+ " "
836
+ ] }),
837
+ /* @__PURE__ */ jsx2("div", { className: "flex-1 overflow-y-auto p-4", children: profileSaved ? /* @__PURE__ */ jsxs("div", { className: "text-center py-8", children: [
751
838
  /* @__PURE__ */ jsx2("span", { className: "text-4xl", children: "\u2705" }),
752
839
  /* @__PURE__ */ jsx2("p", { className: "text-gray-600 mt-2 font-medium", children: "Profile saved!" })
753
840
  ] }) : profileEditing ? (
@@ -890,59 +977,7 @@ function BugBearPanel({
890
977
  }
891
978
  )
892
979
  ] })
893
- ) }),
894
- activeTab === "report" && /* @__PURE__ */ jsx2("div", { children: submitted ? /* @__PURE__ */ jsxs("div", { className: "text-center py-8", children: [
895
- /* @__PURE__ */ jsx2("span", { className: "text-4xl", children: "\u{1F389}" }),
896
- /* @__PURE__ */ jsx2("p", { className: "text-gray-600 mt-2 font-medium", children: "Report submitted!" })
897
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
898
- /* @__PURE__ */ jsx2("div", { className: "flex gap-2 mb-4", children: [
899
- { type: "bug", label: "\u{1F41B} Bug", color: "red" },
900
- { type: "feedback", label: "\u{1F4A1} Feedback", color: "blue" },
901
- { type: "suggestion", label: "\u2728 Idea", color: "purple" }
902
- ].map(({ type, label, color }) => /* @__PURE__ */ jsx2(
903
- "button",
904
- {
905
- onClick: () => setReportType(type),
906
- className: `flex-1 py-1.5 px-2 rounded-lg text-xs font-medium transition-colors ${reportType === type ? color === "red" ? "bg-red-100 text-red-700 ring-2 ring-red-500" : color === "blue" ? "bg-blue-100 text-blue-700 ring-2 ring-blue-500" : "bg-purple-100 text-purple-700 ring-2 ring-purple-500" : "bg-gray-100 text-gray-600 hover:bg-gray-200"}`,
907
- children: label
908
- },
909
- type
910
- )) }),
911
- (reportType === "bug" || reportType === "test_fail") && /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
912
- /* @__PURE__ */ jsx2("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: "Severity" }),
913
- /* @__PURE__ */ jsx2("div", { className: "flex gap-1", children: ["critical", "high", "medium", "low"].map((sev) => /* @__PURE__ */ jsx2(
914
- "button",
915
- {
916
- onClick: () => setSeverity(sev),
917
- className: `flex-1 py-1 px-2 rounded text-xs font-medium capitalize transition-colors ${severity === sev ? sev === "critical" ? "bg-red-600 text-white" : sev === "high" ? "bg-orange-500 text-white" : sev === "medium" ? "bg-yellow-500 text-black" : "bg-gray-500 text-white" : "bg-gray-100 text-gray-600 hover:bg-gray-200"}`,
918
- children: sev
919
- },
920
- sev
921
- )) })
922
- ] }),
923
- /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
924
- /* @__PURE__ */ jsx2("label", { className: "block text-xs font-medium text-gray-700 mb-1", children: "What happened?" }),
925
- /* @__PURE__ */ jsx2(
926
- "textarea",
927
- {
928
- value: description,
929
- onChange: (e) => setDescription(e.target.value),
930
- placeholder: "Describe the issue...",
931
- rows: 3,
932
- className: "w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-purple-500 resize-none"
933
- }
934
- )
935
- ] }),
936
- /* @__PURE__ */ jsx2(
937
- "button",
938
- {
939
- onClick: handleSubmitReport,
940
- disabled: submitting || !description.trim(),
941
- className: "w-full py-2 px-4 bg-purple-600 text-white rounded-lg font-medium text-sm hover:bg-purple-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
942
- children: submitting ? "Submitting..." : "Submit Report"
943
- }
944
- )
945
- ] }) })
980
+ ) })
946
981
  ] }),
947
982
  /* @__PURE__ */ jsxs("div", { className: "px-4 py-2 bg-gray-50 border-t border-gray-200 flex items-center justify-between text-xs text-gray-400", children: [
948
983
  /* @__PURE__ */ jsxs("span", { children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbearai/react",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "BugBear React components for web apps",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",