@nukleus-sports/ui-patterns 0.6.0 → 0.6.2

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/team.js CHANGED
@@ -14,6 +14,15 @@ import {
14
14
  } from "@nukleus-sports/ui-web";
15
15
  import { formatTeamName, getTeamPlaceSummaries } from "@nukleus-sports/core";
16
16
  import { jsx, jsxs } from "react/jsx-runtime";
17
+ function PlaceValueCell({ place }) {
18
+ if (!place.name) {
19
+ return /* @__PURE__ */ jsx("p", { className: "text-text-primary body-text", children: "No address available" });
20
+ }
21
+ return /* @__PURE__ */ jsxs("div", { className: "text-text-primary body-text", children: [
22
+ /* @__PURE__ */ jsx("p", { children: place.name }),
23
+ place.address ? /* @__PURE__ */ jsx("p", { children: place.address }) : /* @__PURE__ */ jsx("p", { children: "No address available" })
24
+ ] });
25
+ }
17
26
  var TAB_TRIGGER_CLASS = "flex-1 bg-card text-[13px] text-text-primary data-[state=active]:bg-card data-[state=active]:text-primary-color-nuk-text data-[state=active]:shadow-none border-b border-greys-grey-strokes-tables data-[state=active]:border-primary-color-nuk-ui-elem rounded-none px-0 pb-2 mb-[-1px] relative after:absolute after:left-0 after:-bottom-[1px] after:w-full after:h-[2px] after:content-[''] after:bg-transparent data-[state=active]:after:bg-primary-color-nuk-ui-elem";
18
27
  function TeamInfoCard({ team, resolveImageUrl, className }) {
19
28
  const teamDisplayName = formatTeamName(team.team, team.nickname) || "Team not found";
@@ -62,18 +71,12 @@ function TeamInfoCard({ team, resolveImageUrl, className }) {
62
71
  venueInfo.label,
63
72
  ":"
64
73
  ] }) }),
65
- /* @__PURE__ */ jsx("div", { className: "flex flex-col text-right", children: venueInfo.name ? /* @__PURE__ */ jsxs("div", { className: "text-text-primary body-text", children: [
66
- /* @__PURE__ */ jsx("p", { children: venueInfo.name }),
67
- venueInfo.address && /* @__PURE__ */ jsx("p", { children: venueInfo.address })
68
- ] }) : /* @__PURE__ */ jsx("p", { className: "text-text-primary body-text", children: "No address available" }) }),
74
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col text-right", children: /* @__PURE__ */ jsx(PlaceValueCell, { place: venueInfo }) }),
69
75
  /* @__PURE__ */ jsx("div", { className: "flex flex-col", children: /* @__PURE__ */ jsxs("p", { className: "text-text-primary body-text", children: [
70
76
  facilityInfo.label,
71
77
  ":"
72
78
  ] }) }),
73
- /* @__PURE__ */ jsx("div", { className: "flex flex-col text-right", children: facilityInfo.name ? /* @__PURE__ */ jsxs("div", { className: "text-text-primary body-text", children: [
74
- /* @__PURE__ */ jsx("p", { children: facilityInfo.name }),
75
- facilityInfo.address && /* @__PURE__ */ jsx("p", { children: facilityInfo.address })
76
- ] }) : /* @__PURE__ */ jsx("p", { className: "text-text-primary body-text", children: "No address available" }) }),
79
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col text-right", children: /* @__PURE__ */ jsx(PlaceValueCell, { place: facilityInfo }) }),
77
80
  /* @__PURE__ */ jsx("div", { className: "flex flex-col", children: /* @__PURE__ */ jsx("p", { className: "text-text-primary body-text", children: "Website:" }) }),
78
81
  /* @__PURE__ */ jsx("div", { className: "flex flex-col text-right", children: team.officialWebsite ? /* @__PURE__ */ jsxs(
79
82
  "a",
@@ -298,10 +301,10 @@ function TeamStaffTable({
298
301
  splitLayout: isSplitLayout,
299
302
  numberOfColumns: 1,
300
303
  splitLayoutGridCols: isCompact ? "!grid-cols-[minmax(120px,120px)_1fr]" : isSplitLayout ? "sm:!grid-cols-[minmax(220px,220px)_1fr]" : "",
301
- containerClassName: cn2("border-0 rounded-none", effectiveVirtualized && "h-full"),
304
+ containerClassName: cn2("border-0 rounded-none xl:h-full", effectiveVirtualized && "h-full"),
302
305
  className: cn2(
303
- "border-none",
304
- effectiveVirtualized && "h-full min-h-0 w-full xl:flex-1 xl:overflow-hidden",
306
+ "border-none xl:flex-1 xl:min-h-0 xl:overflow-hidden",
307
+ effectiveVirtualized && "h-full min-h-0 w-full",
305
308
  className
306
309
  ),
307
310
  bottomContent: effectiveVirtualized && hasMore ? /* @__PURE__ */ jsx2("div", { ref: sentinelRef, className: "h-px w-full" }) : null,