@mbpockets/shared-ui 0.2.5 → 0.2.6

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.
@@ -587,7 +587,9 @@ var BaseSearchResultCard_default = BaseSearchResultCard;
587
587
  var PlayerResultCard = ({
588
588
  result,
589
589
  onClick,
590
- tags
590
+ tags,
591
+ showEventTag,
592
+ eventTagId
591
593
  }) => {
592
594
  const firstLetter = result.title.charAt(0).toUpperCase();
593
595
  const getAvatarColor = (name) => {
@@ -629,7 +631,17 @@ var PlayerResultCard = ({
629
631
  children: !result.imageUrl && firstLetter
630
632
  }
631
633
  );
632
- return /* @__PURE__ */ jsx(BaseSearchResultCard_default, { result, onClick, icon: playerIcon, tags });
634
+ return /* @__PURE__ */ jsx(
635
+ BaseSearchResultCard_default,
636
+ {
637
+ result,
638
+ onClick,
639
+ icon: playerIcon,
640
+ tags,
641
+ showEventTag,
642
+ eventTagId
643
+ }
644
+ );
633
645
  };
634
646
  var PlayerResultCard_default = PlayerResultCard;
635
647
  var TableResultCard = ({
@@ -705,7 +717,9 @@ var TableResultCard_default = TableResultCard;
705
717
  var EventResultCard = ({
706
718
  result,
707
719
  onClick,
708
- tags
720
+ tags,
721
+ showEventTag,
722
+ eventTagId
709
723
  }) => {
710
724
  const formatDate = (dateString) => {
711
725
  const options = {
@@ -732,29 +746,40 @@ var EventResultCard = ({
732
746
  }
733
747
  }
734
748
  );
735
- return /* @__PURE__ */ jsx(BaseSearchResultCard_default, { result, onClick, icon: eventIcon, tags, children: /* @__PURE__ */ jsxs(Box8, { sx: { mb: 2 }, children: [
736
- /* @__PURE__ */ jsxs(Box8, { sx: { display: "flex", alignItems: "center", mb: 1 }, children: [
737
- /* @__PURE__ */ jsx(CalendarTodayIcon, { sx: { mr: 1, color: "primary.main" } }),
738
- /* @__PURE__ */ jsxs(Typography7, { variant: "body2", children: [
739
- /* @__PURE__ */ jsx("strong", { children: "Date:" }),
740
- " ",
741
- formattedDate
742
- ] })
743
- ] }),
744
- /* @__PURE__ */ jsxs(Box8, { sx: { display: "flex", alignItems: "center" }, children: [
745
- /* @__PURE__ */ jsx(LocationOnIcon, { sx: { mr: 1, color: "primary.main" } }),
746
- /* @__PURE__ */ jsxs(Typography7, { variant: "body2", children: [
747
- /* @__PURE__ */ jsx("strong", { children: "Location:" }),
748
- " ",
749
- location
749
+ return /* @__PURE__ */ jsx(
750
+ BaseSearchResultCard_default,
751
+ {
752
+ result,
753
+ onClick,
754
+ icon: eventIcon,
755
+ tags,
756
+ showEventTag,
757
+ eventTagId,
758
+ children: /* @__PURE__ */ jsxs(Box8, { sx: { mb: 2 }, children: [
759
+ /* @__PURE__ */ jsxs(Box8, { sx: { display: "flex", alignItems: "center", mb: 1 }, children: [
760
+ /* @__PURE__ */ jsx(CalendarTodayIcon, { sx: { mr: 1, color: "primary.main" } }),
761
+ /* @__PURE__ */ jsxs(Typography7, { variant: "body2", children: [
762
+ /* @__PURE__ */ jsx("strong", { children: "Date:" }),
763
+ " ",
764
+ formattedDate
765
+ ] })
766
+ ] }),
767
+ /* @__PURE__ */ jsxs(Box8, { sx: { display: "flex", alignItems: "center" }, children: [
768
+ /* @__PURE__ */ jsx(LocationOnIcon, { sx: { mr: 1, color: "primary.main" } }),
769
+ /* @__PURE__ */ jsxs(Typography7, { variant: "body2", children: [
770
+ /* @__PURE__ */ jsx("strong", { children: "Location:" }),
771
+ " ",
772
+ location
773
+ ] })
774
+ ] }),
775
+ result.organizer && /* @__PURE__ */ jsxs(Typography7, { variant: "body2", sx: { mt: 1 }, children: [
776
+ /* @__PURE__ */ jsx("strong", { children: "Organizer:" }),
777
+ " ",
778
+ result.organizer
779
+ ] })
750
780
  ] })
751
- ] }),
752
- result.organizer && /* @__PURE__ */ jsxs(Typography7, { variant: "body2", sx: { mt: 1 }, children: [
753
- /* @__PURE__ */ jsx("strong", { children: "Organizer:" }),
754
- " ",
755
- result.organizer
756
- ] })
757
- ] }) });
781
+ }
782
+ );
758
783
  };
759
784
  var EventResultCard_default = EventResultCard;
760
785
  var ResultsContainer = ({
@@ -801,7 +826,9 @@ var ResultsContainer = ({
801
826
  {
802
827
  result,
803
828
  onClick: onPlayerClick,
804
- tags
829
+ tags,
830
+ showEventTag,
831
+ eventTagId
805
832
  },
806
833
  result.id
807
834
  );
@@ -823,7 +850,9 @@ var ResultsContainer = ({
823
850
  {
824
851
  result,
825
852
  onClick: onEventClick,
826
- tags
853
+ tags,
854
+ showEventTag,
855
+ eventTagId
827
856
  },
828
857
  result.id
829
858
  );
@@ -873,16 +902,15 @@ var PlayersScrollableList = ({
873
902
  onResultClick
874
903
  }) => {
875
904
  const players = (results || []).filter((r) => (r == null ? void 0 : r.type) === "player");
876
- const handleClick = (id) => onResultClick == null ? void 0 : onResultClick(id);
877
905
  return /* @__PURE__ */ jsx(
878
906
  ScrollableResultsList_default,
879
907
  {
880
908
  results: players,
881
909
  tags,
882
910
  maxHeight,
883
- onResultClick: (id, type) => {
884
- if (type === "player") handleClick(id);
885
- }
911
+ onResultClick: onResultClick ? (id, type) => {
912
+ if (type === "player") onResultClick(id);
913
+ } : void 0
886
914
  }
887
915
  );
888
916
  };
@@ -1061,16 +1089,15 @@ var TablesScrollableList = ({
1061
1089
  eventTagId
1062
1090
  }) => {
1063
1091
  const tables = (results || []).filter((r) => (r == null ? void 0 : r.type) === "table");
1064
- const handleClick = (id) => onResultClick == null ? void 0 : onResultClick(id);
1065
1092
  return /* @__PURE__ */ jsx(
1066
1093
  ScrollableResultsList_default,
1067
1094
  {
1068
1095
  results: tables,
1069
1096
  tags,
1070
1097
  maxHeight,
1071
- onResultClick: (id, type) => {
1072
- if (type === "table") handleClick(id);
1073
- },
1098
+ onResultClick: onResultClick ? (id, type) => {
1099
+ if (type === "table") onResultClick(id);
1100
+ } : void 0,
1074
1101
  showEventTag,
1075
1102
  eventTagId
1076
1103
  }