@sensiblestats/widget-react 0.48.6 → 0.48.8

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @sensiblestats/widget-react
2
2
 
3
+ ## 0.48.8
4
+
5
+ ### Patch Changes
6
+
7
+ - 324f7eb: Injuries card: order columns by home/away (home left, away right).
8
+ - Updated dependencies [324f7eb]
9
+ - @sensiblestats/widget-sdk@0.35.2
10
+
11
+ ## 0.48.7
12
+
13
+ ### Patch Changes
14
+
15
+ - df7d101: Greeting discovery tiles now tint the live panel color instead of hardcoding light pastels, so an operator with a dark custom `surface` (or a dark theme) gets readable tinted-dark cards rather than near-white text on fixed light pastel backgrounds.
16
+
3
17
  ## 0.48.6
4
18
 
5
19
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -2687,17 +2687,19 @@ function InjuriesCard({ card, ui }) {
2687
2687
  const limit = expanded ? void 0 : SHOWN;
2688
2688
  const showMore = ui?.showMore ?? ((n) => `Show ${n} more`);
2689
2689
  const showLess = ui?.showLess ?? "Show less";
2690
+ const homeCol = data.oursIsHome ? { name: data.oursName, crest: data.oursCrestUrl, rows: data.ours } : { name: data.theirsName, crest: data.theirsCrestUrl, rows: data.theirs };
2691
+ const awayCol = data.oursIsHome ? { name: data.theirsName, crest: data.theirsCrestUrl, rows: data.theirs } : { name: data.oursName, crest: data.oursCrestUrl, rows: data.ours };
2690
2692
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "ss-w-fandash-card ss-w-fandash-injuries", children: [
2691
2693
  card.title ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "ss-w-fandash-eyebrow", children: card.title }) : null,
2692
2694
  /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "ss-w-fandash-injuries-cols", children: [
2693
2695
  /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "ss-w-fandash-injuries-col", children: [
2694
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ColHead, { name: data.oursName, crestUrl: data.oursCrestUrl }),
2695
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InjuryList, { rows: data.ours, emptyLabel: data.emptyLabel, limit })
2696
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ColHead, { name: homeCol.name, crestUrl: homeCol.crest }),
2697
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InjuryList, { rows: homeCol.rows, emptyLabel: data.emptyLabel, limit })
2696
2698
  ] }),
2697
2699
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "ss-w-fandash-injuries-divider" }),
2698
2700
  /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "ss-w-fandash-injuries-col", children: [
2699
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ColHead, { name: data.theirsName, crestUrl: data.theirsCrestUrl }),
2700
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InjuryList, { rows: data.theirs, emptyLabel: data.emptyLabel, limit })
2701
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ColHead, { name: awayCol.name, crestUrl: awayCol.crest }),
2702
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(InjuryList, { rows: awayCol.rows, emptyLabel: data.emptyLabel, limit })
2701
2703
  ] })
2702
2704
  ] }),
2703
2705
  hidden > 0 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
@@ -4335,10 +4337,13 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
4335
4337
  .ss-w-dash--discovery .ss-w-dash-tile--full .ss-w-dash-tile-icon { align-self: center; }
4336
4338
  .ss-w-dash--discovery .ss-w-dash-tile-meta { flex-wrap: nowrap; }
4337
4339
  .ss-w-dash--discovery .ss-w-dash-tile-crest { width: 22px; height: 22px; }
4338
- .ss-w-dash--discovery .ss-w-dash-tile:nth-child(1) { background: #eef8f1; }
4339
- .ss-w-dash--discovery .ss-w-dash-tile:nth-child(2) { background: #eef3fb; }
4340
- .ss-w-dash--discovery .ss-w-dash-tile:nth-child(3) { background: #fdf6ec; }
4341
- .ss-w-dash--discovery .ss-w-dash-tile:nth-child(4) { background: #f5eefb; }
4340
+ /* Tints mix a hue into the live panel rather than hardcoding a light pastel, so a dark
4341
+ operator surface (e.g. --ss-w-panel set from a navy \`surface\` brand color) yields a
4342
+ readable tinted-dark card instead of near-white ink on a fixed light pastel. */
4343
+ .ss-w-dash--discovery .ss-w-dash-tile:nth-child(1) { background: color-mix(in srgb, #34c759 10%, var(--ss-w-panel)); }
4344
+ .ss-w-dash--discovery .ss-w-dash-tile:nth-child(2) { background: color-mix(in srgb, #3a82f6 10%, var(--ss-w-panel)); }
4345
+ .ss-w-dash--discovery .ss-w-dash-tile:nth-child(3) { background: color-mix(in srgb, #f5a623 10%, var(--ss-w-panel)); }
4346
+ .ss-w-dash--discovery .ss-w-dash-tile:nth-child(4) { background: color-mix(in srgb, #a855f7 10%, var(--ss-w-panel)); }
4342
4347
 
4343
4348
  /* club fan pre-match dashboard */
4344
4349
  .ss-w-fandash { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }