@nukleus-sports/ui-patterns 0.6.0 → 0.6.3
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.cjs +44 -32
- package/dist/team.cjs.map +1 -1
- package/dist/team.js +44 -32
- package/dist/team.js.map +1 -1
- package/package.json +2 -2
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:
|
|
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:
|
|
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
|
|
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,
|
|
@@ -2052,9 +2055,9 @@ function ScheduleBody({
|
|
|
2052
2055
|
if (!seasons || seasons.years.length === 0) {
|
|
2053
2056
|
return /* @__PURE__ */ jsx16("div", { className: "text-center py-8", children: /* @__PURE__ */ jsx16("p", { className: "text-text-primary", children: isSeasonsError ? "Couldn't load seasons. Please try again." : "No seasons found" }) });
|
|
2054
2057
|
}
|
|
2055
|
-
return /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-3", children: [
|
|
2056
|
-
/* @__PURE__ */ jsx16(SeasonSelector, { ...seasons, className: "gap-2 min-[360px]:gap-3" }),
|
|
2057
|
-
/* @__PURE__ */ jsx16("div", { children: /* @__PURE__ */ jsx16(
|
|
2058
|
+
return /* @__PURE__ */ jsxs16("div", { className: "flex flex-col gap-3 xl:flex-1 xl:min-h-0 xl:overflow-hidden", children: [
|
|
2059
|
+
/* @__PURE__ */ jsx16(SeasonSelector, { ...seasons, className: "gap-2 min-[360px]:gap-3 xl:shrink-0" }),
|
|
2060
|
+
/* @__PURE__ */ jsx16("div", { className: "xl:flex-1 xl:min-h-0 xl:overflow-hidden", children: /* @__PURE__ */ jsx16(
|
|
2058
2061
|
BaseTable4,
|
|
2059
2062
|
{
|
|
2060
2063
|
columns,
|
|
@@ -2064,7 +2067,7 @@ function ScheduleBody({
|
|
|
2064
2067
|
splitLayoutGridCols: isSm ? "sm:!grid-cols-[minmax(232px,auto)_1fr]" : "!grid-cols-[minmax(117px,auto)_1fr]",
|
|
2065
2068
|
loading: gamesLoading,
|
|
2066
2069
|
containerClassName: "border-0 rounded-none h-full",
|
|
2067
|
-
className: "h-full border-none",
|
|
2070
|
+
className: "h-full min-h-0 border-none xl:flex-1 xl:overflow-hidden",
|
|
2068
2071
|
numberOfColumns: 2,
|
|
2069
2072
|
emptyMessage: isGamesError ? "Couldn't load games. Please try again." : "No games found for this season"
|
|
2070
2073
|
}
|
|
@@ -2106,23 +2109,32 @@ function TeamScheduleTable({
|
|
|
2106
2109
|
/* @__PURE__ */ jsx16("p", { className: "text-text-secondary", children: "Loading team information..." })
|
|
2107
2110
|
] }) });
|
|
2108
2111
|
}
|
|
2109
|
-
return /* @__PURE__ */ jsxs16(
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2112
|
+
return /* @__PURE__ */ jsxs16(
|
|
2113
|
+
Card8,
|
|
2114
|
+
{
|
|
2115
|
+
className: cn14(
|
|
2116
|
+
"border-none p-4 flex flex-col gap-3 xl:h-full xl:min-h-0 xl:flex-1 xl:overflow-hidden",
|
|
2117
|
+
className
|
|
2118
|
+
),
|
|
2119
|
+
children: [
|
|
2120
|
+
/* @__PURE__ */ jsx16(CardHeader7, { className: "p-0 flex flex-row items-center justify-between space-y-0", children: /* @__PURE__ */ jsx16(CardTitle7, { children: "Schedule" }) }),
|
|
2121
|
+
/* @__PURE__ */ jsx16(CardContent8, { className: "space-y-0 p-0 flex flex-col gap-3 xl:flex-1 xl:min-h-0 xl:overflow-hidden", children: /* @__PURE__ */ jsx16(
|
|
2122
|
+
ScheduleBody,
|
|
2123
|
+
{
|
|
2124
|
+
seasonsLoading,
|
|
2125
|
+
seasons,
|
|
2126
|
+
isSeasonsError,
|
|
2127
|
+
columns,
|
|
2128
|
+
games,
|
|
2129
|
+
gamesLoading,
|
|
2130
|
+
isGamesError,
|
|
2131
|
+
isSm,
|
|
2132
|
+
isSmallLaptop
|
|
2133
|
+
}
|
|
2134
|
+
) })
|
|
2135
|
+
]
|
|
2136
|
+
}
|
|
2137
|
+
);
|
|
2126
2138
|
}
|
|
2127
2139
|
export {
|
|
2128
2140
|
EmptyValue,
|