@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.cjs
CHANGED
|
@@ -275,6 +275,15 @@ function EntityAvatar({
|
|
|
275
275
|
|
|
276
276
|
// src/team/team-info-card.tsx
|
|
277
277
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
278
|
+
function PlaceValueCell({ place }) {
|
|
279
|
+
if (!place.name) {
|
|
280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-text-primary body-text", children: "No address available" });
|
|
281
|
+
}
|
|
282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "text-text-primary body-text", children: [
|
|
283
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: place.name }),
|
|
284
|
+
place.address ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: place.address }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: "No address available" })
|
|
285
|
+
] });
|
|
286
|
+
}
|
|
278
287
|
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";
|
|
279
288
|
function TeamInfoCard({ team, resolveImageUrl, className }) {
|
|
280
289
|
const teamDisplayName = (0, import_core.formatTeamName)(team.team, team.nickname) || "Team not found";
|
|
@@ -323,18 +332,12 @@ function TeamInfoCard({ team, resolveImageUrl, className }) {
|
|
|
323
332
|
venueInfo.label,
|
|
324
333
|
":"
|
|
325
334
|
] }) }),
|
|
326
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex flex-col text-right", children:
|
|
327
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: venueInfo.name }),
|
|
328
|
-
venueInfo.address && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: venueInfo.address })
|
|
329
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-text-primary body-text", children: "No address available" }) }),
|
|
335
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex flex-col text-right", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PlaceValueCell, { place: venueInfo }) }),
|
|
330
336
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("p", { className: "text-text-primary body-text", children: [
|
|
331
337
|
facilityInfo.label,
|
|
332
338
|
":"
|
|
333
339
|
] }) }),
|
|
334
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex flex-col text-right", children:
|
|
335
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: facilityInfo.name }),
|
|
336
|
-
facilityInfo.address && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: facilityInfo.address })
|
|
337
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-text-primary body-text", children: "No address available" }) }),
|
|
340
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex flex-col text-right", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PlaceValueCell, { place: facilityInfo }) }),
|
|
338
341
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "text-text-primary body-text", children: "Website:" }) }),
|
|
339
342
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "flex flex-col text-right", children: team.officialWebsite ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
340
343
|
"a",
|
|
@@ -554,10 +557,10 @@ function TeamStaffTable({
|
|
|
554
557
|
splitLayout: isSplitLayout,
|
|
555
558
|
numberOfColumns: 1,
|
|
556
559
|
splitLayoutGridCols: isCompact ? "!grid-cols-[minmax(120px,120px)_1fr]" : isSplitLayout ? "sm:!grid-cols-[minmax(220px,220px)_1fr]" : "",
|
|
557
|
-
containerClassName: (0, import_ui_web3.cn)("border-0 rounded-none", effectiveVirtualized && "h-full"),
|
|
560
|
+
containerClassName: (0, import_ui_web3.cn)("border-0 rounded-none xl:h-full", effectiveVirtualized && "h-full"),
|
|
558
561
|
className: (0, import_ui_web3.cn)(
|
|
559
|
-
"border-none",
|
|
560
|
-
effectiveVirtualized && "h-full min-h-0 w-full
|
|
562
|
+
"border-none xl:flex-1 xl:min-h-0 xl:overflow-hidden",
|
|
563
|
+
effectiveVirtualized && "h-full min-h-0 w-full",
|
|
561
564
|
className
|
|
562
565
|
),
|
|
563
566
|
bottomContent: effectiveVirtualized && hasMore ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ref: sentinelRef, className: "h-px w-full" }) : null,
|
|
@@ -2224,9 +2227,9 @@ function ScheduleBody({
|
|
|
2224
2227
|
if (!seasons || seasons.years.length === 0) {
|
|
2225
2228
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "text-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-text-primary", children: isSeasonsError ? "Couldn't load seasons. Please try again." : "No seasons found" }) });
|
|
2226
2229
|
}
|
|
2227
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
2228
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SeasonSelector, { ...seasons, className: "gap-2 min-[360px]:gap-3" }),
|
|
2229
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col gap-3 xl:flex-1 xl:min-h-0 xl:overflow-hidden", children: [
|
|
2231
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SeasonSelector, { ...seasons, className: "gap-2 min-[360px]:gap-3 xl:shrink-0" }),
|
|
2232
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "xl:flex-1 xl:min-h-0 xl:overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2230
2233
|
import_ui_web15.BaseTable,
|
|
2231
2234
|
{
|
|
2232
2235
|
columns,
|
|
@@ -2236,7 +2239,7 @@ function ScheduleBody({
|
|
|
2236
2239
|
splitLayoutGridCols: isSm ? "sm:!grid-cols-[minmax(232px,auto)_1fr]" : "!grid-cols-[minmax(117px,auto)_1fr]",
|
|
2237
2240
|
loading: gamesLoading,
|
|
2238
2241
|
containerClassName: "border-0 rounded-none h-full",
|
|
2239
|
-
className: "h-full border-none",
|
|
2242
|
+
className: "h-full min-h-0 border-none xl:flex-1 xl:overflow-hidden",
|
|
2240
2243
|
numberOfColumns: 2,
|
|
2241
2244
|
emptyMessage: isGamesError ? "Couldn't load games. Please try again." : "No games found for this season"
|
|
2242
2245
|
}
|
|
@@ -2278,23 +2281,32 @@ function TeamScheduleTable({
|
|
|
2278
2281
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-text-secondary", children: "Loading team information..." })
|
|
2279
2282
|
] }) });
|
|
2280
2283
|
}
|
|
2281
|
-
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2285
|
+
import_ui_web15.Card,
|
|
2286
|
+
{
|
|
2287
|
+
className: (0, import_ui_web15.cn)(
|
|
2288
|
+
"border-none p-4 flex flex-col gap-3 xl:h-full xl:min-h-0 xl:flex-1 xl:overflow-hidden",
|
|
2289
|
+
className
|
|
2290
|
+
),
|
|
2291
|
+
children: [
|
|
2292
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.CardHeader, { className: "p-0 flex flex-row items-center justify-between space-y-0", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.CardTitle, { children: "Schedule" }) }),
|
|
2293
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_ui_web15.CardContent, { className: "space-y-0 p-0 flex flex-col gap-3 xl:flex-1 xl:min-h-0 xl:overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2294
|
+
ScheduleBody,
|
|
2295
|
+
{
|
|
2296
|
+
seasonsLoading,
|
|
2297
|
+
seasons,
|
|
2298
|
+
isSeasonsError,
|
|
2299
|
+
columns,
|
|
2300
|
+
games,
|
|
2301
|
+
gamesLoading,
|
|
2302
|
+
isGamesError,
|
|
2303
|
+
isSm,
|
|
2304
|
+
isSmallLaptop
|
|
2305
|
+
}
|
|
2306
|
+
) })
|
|
2307
|
+
]
|
|
2308
|
+
}
|
|
2309
|
+
);
|
|
2298
2310
|
}
|
|
2299
2311
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2300
2312
|
0 && (module.exports = {
|