@sensiblestats/widget-react 0.26.2 → 0.28.0
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 +12 -0
- package/dist/index.cjs +154 -125
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +154 -125
- package/dist/index.js.map +1 -1
- package/dist/styles.css +40 -34
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @sensiblestats/widget-react
|
|
2
2
|
|
|
3
|
+
## 0.28.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Betting-insight card redesigned to one action line: the fixture (team pair, or prose string, else competition) becomes the header hero, the competition and kickoff demote to the header-right meta, and market · selection · odds · Add-to-slip render together on a single action row.
|
|
8
|
+
|
|
9
|
+
## 0.27.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- Entity-card stat-strip redesign: the player/team card renders as a horizontal stat strip instead of vertical stat rows, a W-D-L stat renders as a bar with the record as its label, competition scope tabs move above the strip, and the season chip is pinned to the top-right of the header.
|
|
14
|
+
|
|
3
15
|
## 0.26.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -853,8 +853,15 @@ function initials(name) {
|
|
|
853
853
|
function shortSeason(season) {
|
|
854
854
|
return season.replace(/\d{4}/g, (year) => year.slice(2));
|
|
855
855
|
}
|
|
856
|
-
function Crest({ image }) {
|
|
857
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
856
|
+
function Crest({ image, label }) {
|
|
857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
858
|
+
"span",
|
|
859
|
+
{
|
|
860
|
+
className: "ss-w-ecard-crest",
|
|
861
|
+
style: { backgroundImage: `url(${image})` },
|
|
862
|
+
...label ? { role: "img", title: label, "aria-label": label } : { "aria-hidden": "true" }
|
|
863
|
+
}
|
|
864
|
+
);
|
|
858
865
|
}
|
|
859
866
|
function FormBar({ w, d, l }) {
|
|
860
867
|
if (w + d + l === 0) return null;
|
|
@@ -864,73 +871,73 @@ function FormBar({ w, d, l }) {
|
|
|
864
871
|
l > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ss-w-form-l", style: { flexGrow: l } }) : null
|
|
865
872
|
] });
|
|
866
873
|
}
|
|
867
|
-
function
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "ss-w-ecard-
|
|
871
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ss-w-ecard-
|
|
872
|
-
|
|
873
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ss-w-ecard-rval", children: s.value })
|
|
874
|
-
] }, s.label);
|
|
875
|
-
}) });
|
|
876
|
-
}
|
|
877
|
-
function CardBody({ c }) {
|
|
878
|
-
const [active, setActive] = (0, import_react3.useState)(0);
|
|
879
|
-
if (c.scopes.length === 0) return null;
|
|
880
|
-
const season = c.season ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ss-w-ecard-season", children: shortSeason(c.season) }) : null;
|
|
881
|
-
if (c.scopes.length === 1) {
|
|
882
|
-
const only = c.scopes[0];
|
|
883
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "ss-w-ecard-body", children: [
|
|
884
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "ss-w-ecard-tabs ss-w-ecard-tabs-static", children: [
|
|
885
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "ss-w-ecard-lead", title: only.label, children: [
|
|
886
|
-
only.image ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Crest, { image: only.image }) : null,
|
|
887
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ss-w-ecard-lead-txt", children: only.label })
|
|
888
|
-
] }),
|
|
889
|
-
season
|
|
890
|
-
] }),
|
|
891
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StatRows, { stats: only.stats })
|
|
874
|
+
function StatCellView({ s }) {
|
|
875
|
+
const m = RECORD_RE.exec(s.value);
|
|
876
|
+
if (m) {
|
|
877
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "ss-w-ecard-cell", children: [
|
|
878
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ss-w-ecard-cval", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FormBar, { w: Number(m[1]), d: Number(m[2]), l: Number(m[3]) }) }),
|
|
879
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ss-w-ecard-clabel", children: s.value })
|
|
892
880
|
] });
|
|
893
881
|
}
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "ss-w-ecard-cell", children: [
|
|
883
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ss-w-ecard-cval", children: s.value }),
|
|
884
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ss-w-ecard-clabel", children: s.label })
|
|
885
|
+
] });
|
|
886
|
+
}
|
|
887
|
+
function StatStrip({ stats }) {
|
|
888
|
+
if (stats.length === 0) return null;
|
|
889
|
+
const cols = Math.min(stats.length, 4);
|
|
890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "ss-w-ecard-strip", style: { gridTemplateColumns: `repeat(${cols}, 1fr)` }, children: stats.map((s) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StatCellView, { s }, s.label + s.value)) });
|
|
891
|
+
}
|
|
892
|
+
function CardHeader({ c, showScopeCrest }) {
|
|
893
|
+
const onlyScope = c.scopes.length === 1 ? c.scopes[0] : null;
|
|
894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "ss-w-ecard-hd", children: [
|
|
895
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
896
|
+
"span",
|
|
897
|
+
{
|
|
898
|
+
className: c.kind === "team" ? "ss-w-thumb ss-w-team" : "ss-w-thumb",
|
|
899
|
+
style: c.image ? { backgroundImage: `url(${c.image})` } : void 0,
|
|
900
|
+
children: c.image ? "" : initials(c.name)
|
|
901
|
+
}
|
|
902
|
+
),
|
|
903
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "ss-w-ecard-idtext", children: [
|
|
904
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ss-w-nm", children: c.name }),
|
|
905
|
+
c.sub ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ss-w-sub", children: c.sub }) : null
|
|
912
906
|
] }),
|
|
913
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.
|
|
907
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "ss-w-ecard-meta", children: [
|
|
908
|
+
showScopeCrest && onlyScope?.image ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Crest, { image: onlyScope.image, label: onlyScope.label }) : null,
|
|
909
|
+
c.season ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ss-w-ecard-season", children: shortSeason(c.season) }) : null
|
|
910
|
+
] })
|
|
914
911
|
] });
|
|
915
912
|
}
|
|
913
|
+
function ScopeTabs({ scopes, active, onSelect }) {
|
|
914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "ss-w-ecard-scopes", role: "tablist", children: scopes.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
915
|
+
"button",
|
|
916
|
+
{
|
|
917
|
+
type: "button",
|
|
918
|
+
role: "tab",
|
|
919
|
+
className: "ss-w-ecard-scope",
|
|
920
|
+
"aria-selected": i === active,
|
|
921
|
+
"aria-label": s.label,
|
|
922
|
+
title: s.label,
|
|
923
|
+
onClick: () => onSelect(i),
|
|
924
|
+
children: s.image ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Crest, { image: s.image }) : s.label
|
|
925
|
+
},
|
|
926
|
+
String(s.competitionId ?? "all")
|
|
927
|
+
)) });
|
|
928
|
+
}
|
|
916
929
|
function EntityCardItem({ c }) {
|
|
930
|
+
const [active, setActive] = (0, import_react3.useState)(0);
|
|
917
931
|
const hasBody = c.scopes.length > 0;
|
|
918
|
-
|
|
919
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
),
|
|
928
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "ss-w-ecard-idtext", children: [
|
|
929
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ss-w-nm", children: c.name }),
|
|
930
|
-
c.sub ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "ss-w-sub", children: c.sub }) : null
|
|
931
|
-
] })
|
|
932
|
-
] }),
|
|
933
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CardBody, { c })
|
|
932
|
+
if (!hasBody) {
|
|
933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "ss-w-ecard ss-w-ecard-bare", "data-kind": c.kind, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CardHeader, { c, showScopeCrest: false }) });
|
|
934
|
+
}
|
|
935
|
+
const multi = c.scopes.length > 1;
|
|
936
|
+
const scope = c.scopes[multi ? c.scopes[active] ? active : 0 : 0];
|
|
937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "ss-w-ecard", "data-kind": c.kind, children: [
|
|
938
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CardHeader, { c, showScopeCrest: !multi }),
|
|
939
|
+
multi ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ScopeTabs, { scopes: c.scopes, active, onSelect: setActive }) : null,
|
|
940
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StatStrip, { stats: scope.stats })
|
|
934
941
|
] });
|
|
935
942
|
}
|
|
936
943
|
function EntityCardList({ cards, disabled, showLessLabel = "Show less", showMoreLabel = (n) => `Show ${n} more` }) {
|
|
@@ -1085,7 +1092,7 @@ function Crest2({ url, name, kind }) {
|
|
|
1085
1092
|
|
|
1086
1093
|
// src/components/BettingInsightList.tsx
|
|
1087
1094
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1088
|
-
function
|
|
1095
|
+
function StatRows({ stats }) {
|
|
1089
1096
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "ss-w-bi-rows", children: stats.map((s) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ss-w-bi-row", children: [
|
|
1090
1097
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-row-lbl", children: s.label }),
|
|
1091
1098
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-row-num", children: s.value })
|
|
@@ -1096,7 +1103,7 @@ function ScopedStats({ scopes }) {
|
|
|
1096
1103
|
const current = scopes[active] ?? scopes[0] ?? { key: "", label: "", stats: [] };
|
|
1097
1104
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ss-w-bi-scoped", children: [
|
|
1098
1105
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "ss-w-bi-scopes", role: "group", children: scopes.map((s, i) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { type: "button", className: "ss-w-bi-chip", "aria-pressed": i === active, onClick: () => setActive(i), children: s.label }, s.key)) }),
|
|
1099
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1106
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(StatRows, { stats: current.stats }, current.key)
|
|
1100
1107
|
] });
|
|
1101
1108
|
}
|
|
1102
1109
|
function hasStatsContent(it) {
|
|
@@ -1113,7 +1120,7 @@ function ReasonStrip({ it, ui }) {
|
|
|
1113
1120
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-chart", "aria-hidden": "true" }),
|
|
1114
1121
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ss-w-bi-reason-body", children: [
|
|
1115
1122
|
hasText ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: `ss-w-bi-text${open ? "" : " ss-w-bi-text-clamp"}`, children: it.text }) : null,
|
|
1116
|
-
open && hasStats ? hasScopes ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ScopedStats, { scopes: it.scopes }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1123
|
+
open && hasStats ? hasScopes ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ScopedStats, { scopes: it.scopes }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(StatRows, { stats: it.stats }) : null
|
|
1117
1124
|
] }),
|
|
1118
1125
|
expandable ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1119
1126
|
"button",
|
|
@@ -1128,22 +1135,44 @@ function ReasonStrip({ it, ui }) {
|
|
|
1128
1135
|
) : null
|
|
1129
1136
|
] });
|
|
1130
1137
|
}
|
|
1138
|
+
function CardFixture({ it }) {
|
|
1139
|
+
if (it.homeTeamName && it.awayTeamName) {
|
|
1140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
1141
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Crest2, { kind: "team", url: it.homeCrest, name: it.homeTeamName }),
|
|
1142
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-team", children: it.homeTeamName }),
|
|
1143
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-vs", "aria-hidden": "true", children: "vs" }),
|
|
1144
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-team", children: it.awayTeamName }),
|
|
1145
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Crest2, { kind: "team", url: it.awayCrest, name: it.awayTeamName })
|
|
1146
|
+
] });
|
|
1147
|
+
}
|
|
1148
|
+
if (it.fixture) return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-fixture-txt", children: it.fixture });
|
|
1149
|
+
if (it.competition) {
|
|
1150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
1151
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Crest2, { kind: "comp", url: it.competitionCrest, name: it.competition }),
|
|
1152
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-comp", children: it.competition })
|
|
1153
|
+
] });
|
|
1154
|
+
}
|
|
1155
|
+
return null;
|
|
1156
|
+
}
|
|
1131
1157
|
function InsightCard({ it, ui, slip }) {
|
|
1132
1158
|
const live = it.isLive || it.phase === "live";
|
|
1133
1159
|
const kickoff = it.kickoffUtc && ui?.bettingKickoff ? ui.bettingKickoff(it.kickoffUtc) : void 0;
|
|
1134
1160
|
const hasNamedTeams = !!it.homeTeamName && !!it.awayTeamName;
|
|
1135
|
-
const
|
|
1161
|
+
const leftIsFixture = hasNamedTeams || !!it.fixture;
|
|
1162
|
+
const compInMeta = leftIsFixture && !!it.competition;
|
|
1163
|
+
const showHeader = leftIsFixture || !!it.competition || live || !!kickoff;
|
|
1136
1164
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ss-w-binsight", children: [
|
|
1137
1165
|
showHeader ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ss-w-bi-header", children: [
|
|
1138
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-header-left", children:
|
|
1139
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Crest2, { kind: "comp", url: it.competitionCrest, name: it.competition }),
|
|
1140
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-comp", children: it.competition })
|
|
1141
|
-
] }) : null }),
|
|
1166
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-header-left", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CardFixture, { it }) }),
|
|
1142
1167
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "ss-w-bi-header-right", children: [
|
|
1143
1168
|
live ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "ss-w-bi-live", children: [
|
|
1144
1169
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-live-dot", "aria-hidden": "true" }),
|
|
1145
1170
|
ui?.liveLabel ?? "Live"
|
|
1146
1171
|
] }) : null,
|
|
1172
|
+
compInMeta ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "ss-w-bi-comp-meta", children: [
|
|
1173
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Crest2, { kind: "comp", url: it.competitionCrest, name: it.competition }),
|
|
1174
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-comp", children: it.competition })
|
|
1175
|
+
] }) : null,
|
|
1147
1176
|
kickoff ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "ss-w-bi-kick", children: [
|
|
1148
1177
|
kickoff.dayLabel,
|
|
1149
1178
|
" ",
|
|
@@ -1151,28 +1180,22 @@ function InsightCard({ it, ui, slip }) {
|
|
|
1151
1180
|
] }) : null
|
|
1152
1181
|
] })
|
|
1153
1182
|
] }) : null,
|
|
1154
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ss-w-bi-
|
|
1155
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.
|
|
1156
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1157
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
] })
|
|
1162
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("
|
|
1163
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
it.odds ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "ss-w-bi-odds", children: [
|
|
1169
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("b", { children: it.odds }),
|
|
1170
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(OddsMovementBadge, { previous: it.previousOdds, current: it.odds, direction: it.movementDirection, ui }),
|
|
1171
|
-
it.bookmaker ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-book", children: it.bookmaker }) : null
|
|
1172
|
-
] }) : null,
|
|
1173
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AddToSlipButton, { it, slip, ui })
|
|
1174
|
-
] })
|
|
1183
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ss-w-bi-action-row", children: [
|
|
1184
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "ss-w-bi-pick", children: [
|
|
1185
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-market", children: it.market }),
|
|
1186
|
+
it.selection ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
1187
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-pick-dot", "aria-hidden": "true", children: "\xB7" }),
|
|
1188
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-sel", children: it.selection })
|
|
1189
|
+
] }) : null
|
|
1190
|
+
] }),
|
|
1191
|
+
it.odds ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "ss-w-bi-odds", children: [
|
|
1192
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("b", { children: it.odds }),
|
|
1193
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(OddsMovementBadge, { previous: it.previousOdds, current: it.odds, direction: it.movementDirection, ui }),
|
|
1194
|
+
it.bookmaker ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-book", children: it.bookmaker }) : null
|
|
1195
|
+
] }) : null,
|
|
1196
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(AddToSlipButton, { it, slip, ui })
|
|
1175
1197
|
] }),
|
|
1198
|
+
it.isMarketFloor ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ss-w-bi-floor", children: ui?.marketFloorLabel ?? "Market price \xB7 not a value pick" }) : null,
|
|
1176
1199
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ReasonStrip, { it, ui }),
|
|
1177
1200
|
it.disclaimer ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "ss-w-bi-disc", children: it.disclaimer }) : null
|
|
1178
1201
|
] });
|
|
@@ -2088,10 +2111,9 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
2088
2111
|
/* entity cards */
|
|
2089
2112
|
.ss-w-cards { display: flex; flex-direction: column; gap: 8px; }
|
|
2090
2113
|
|
|
2091
|
-
/*
|
|
2092
|
-
.ss-w-ecard { display:
|
|
2114
|
+
/* Entity card: identity header row over a horizontal stat strip */
|
|
2115
|
+
.ss-w-ecard { display: flex; flex-direction: column; width: 100%; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 12px; overflow: hidden; text-align: left; }
|
|
2093
2116
|
|
|
2094
|
-
.ss-w-ecard-id { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; padding: 13px 10px; border-right: 1px solid var(--ss-w-line); background: linear-gradient(158deg, var(--ss-w-bubble), color-mix(in srgb, var(--ss-w-accent) 9%, var(--ss-w-bubble))); }
|
|
2095
2117
|
.ss-w-ecard-idtext { display: flex; flex-direction: column; gap: 1px; min-width: 0; max-width: 100%; }
|
|
2096
2118
|
.ss-w-thumb { width: 54px; height: 54px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 16px; font-weight: 700; color: #fff; background-color: var(--ss-w-nav); background-size: cover; background-position: center; box-shadow: 0 1px 3px rgba(0,0,0,.14); }
|
|
2097
2119
|
.ss-w-thumb.ss-w-team { border-radius: 12px; }
|
|
@@ -2101,27 +2123,31 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
2101
2123
|
|
|
2102
2124
|
/* bare card (no stat scopes): simple avatar + name row */
|
|
2103
2125
|
.ss-w-ecard-bare { display: flex; align-items: center; }
|
|
2104
|
-
.ss-w-ecard-bare .ss-w-ecard-
|
|
2105
|
-
|
|
2106
|
-
.ss-w-ecard-
|
|
2107
|
-
|
|
2108
|
-
.ss-w-ecard-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
.ss-w-ecard-
|
|
2114
|
-
.ss-w-ecard-
|
|
2115
|
-
.ss-w-ecard-
|
|
2116
|
-
.ss-w-ecard-
|
|
2126
|
+
.ss-w-ecard-bare .ss-w-ecard-hd { padding: 10px 12px; }
|
|
2127
|
+
|
|
2128
|
+
.ss-w-ecard-hd { display: flex; align-items: center; gap: 11px; padding: 11px 13px; }
|
|
2129
|
+
.ss-w-ecard-hd .ss-w-thumb { width: 40px; height: 40px; font-size: 13px; box-shadow: none; }
|
|
2130
|
+
.ss-w-ecard-hd .ss-w-thumb.ss-w-team { border-radius: 10px; }
|
|
2131
|
+
.ss-w-ecard-meta { display: inline-flex; align-items: center; gap: 7px; flex: none; align-self: flex-start; margin-left: auto; }
|
|
2132
|
+
.ss-w-ecard-meta .ss-w-ecard-season { margin: 0; }
|
|
2133
|
+
|
|
2134
|
+
/* scope tabs: reuse the underline pattern, relocated above the strip */
|
|
2135
|
+
.ss-w-ecard-scopes { display: flex; align-items: stretch; gap: 2px; padding: 0 11px; border-top: 1px solid var(--ss-w-line); flex-wrap: wrap; }
|
|
2136
|
+
.ss-w-ecard-scope { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 620; color: var(--ss-w-faint); background: none; border: none; cursor: pointer; padding: 7px 8px; margin-bottom: -1px; border-bottom: 2px solid transparent; }
|
|
2137
|
+
.ss-w-ecard-scope[aria-selected="true"] { color: var(--ss-w-ink); border-bottom-color: var(--ss-w-accent); }
|
|
2138
|
+
.ss-w-ecard-scope .ss-w-ecard-crest { width: 14px; height: 14px; }
|
|
2139
|
+
.ss-w-ecard-scopes + .ss-w-ecard-strip { border-top: none; }
|
|
2140
|
+
|
|
2117
2141
|
.ss-w-ecard-crest { width: 15px; height: 15px; flex: none; display: block; border-radius: 4px; background-size: cover; background-position: center; }
|
|
2118
2142
|
.ss-w-ecard-season { flex: none; margin-left: auto; align-self: center; margin-bottom: 5px; font-size: 10.5px; font-weight: 700; color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 13%, var(--ss-w-panel)); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
|
|
2119
|
-
.ss-w-ecard-tabs-static .ss-w-ecard-season { margin-bottom: 4px; }
|
|
2120
2143
|
|
|
2121
|
-
|
|
2122
|
-
.ss-w-ecard-
|
|
2123
|
-
.ss-w-ecard-
|
|
2124
|
-
.ss-w-ecard-
|
|
2144
|
+
/* stat strip: 1px gap over a line-colored ground paints hairlines between cells, wrap-safe */
|
|
2145
|
+
.ss-w-ecard-strip { display: grid; gap: 1px; background: var(--ss-w-line); border-top: 1px solid var(--ss-w-line); }
|
|
2146
|
+
.ss-w-ecard-cell { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 10px 4px 11px; background: var(--ss-w-panel); }
|
|
2147
|
+
.ss-w-ecard-cval { height: 20px; display: flex; align-items: center; font-size: 17px; font-weight: 720; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
|
|
2148
|
+
.ss-w-ecard-cval .ss-w-form { width: 42px; }
|
|
2149
|
+
.ss-w-ecard-clabel { font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: var(--ss-w-faint); font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
2150
|
+
|
|
2125
2151
|
.ss-w-form { justify-self: end; display: flex; height: 6px; width: 48px; border-radius: 4px; overflow: hidden; gap: 2px; }
|
|
2126
2152
|
.ss-w-form span { display: block; border-radius: 2px; }
|
|
2127
2153
|
.ss-w-form-w { background: var(--ss-w-pos); }
|
|
@@ -2138,7 +2164,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
2138
2164
|
|
|
2139
2165
|
/* row 1: competition logo + name on the left, live badge + kickoff on the right */
|
|
2140
2166
|
.ss-w-bi-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding-bottom: 7px; border-bottom: 1px solid var(--ss-w-line); }
|
|
2141
|
-
.ss-w-bi-header-left { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
|
|
2167
|
+
.ss-w-bi-header-left { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1; font-size: 12.5px; font-weight: 650; color: var(--ss-w-ink); }
|
|
2142
2168
|
.ss-w-bi-header-right { display: inline-flex; align-items: center; gap: 8px; flex: none; }
|
|
2143
2169
|
.ss-w-bi-comp { font-size: 10.5px; color: var(--ss-w-faint); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
2144
2170
|
.ss-w-bi-kick { font-size: 10.5px; font-weight: 600; color: var(--ss-w-faint); white-space: nowrap; flex: none; }
|
|
@@ -2151,23 +2177,26 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
2151
2177
|
.ss-w-bi-crest { width: 24px; height: 24px; flex: none; display: block; border-radius: 50%; object-fit: contain; }
|
|
2152
2178
|
.ss-w-bi-crest-mono { display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 16%, var(--ss-w-panel)); }
|
|
2153
2179
|
|
|
2154
|
-
/*
|
|
2155
|
-
.ss-w-bi-body { display: flex; align-items: center; gap: 10px; }
|
|
2156
|
-
.ss-w-bi-fixture { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; font-size: 12px; font-weight: 650; color: var(--ss-w-ink); }
|
|
2180
|
+
/* header fixture atoms (team hero lives in .ss-w-bi-header-left; comp demotes to the meta) */
|
|
2157
2181
|
.ss-w-bi-team { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2158
2182
|
.ss-w-bi-vs { font-size: 10px; font-weight: 600; color: var(--ss-w-faint); flex: none; }
|
|
2159
2183
|
.ss-w-bi-fixture-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2160
|
-
.ss-w-bi-
|
|
2161
|
-
|
|
2162
|
-
.ss-w-bi-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
.ss-w-bi-
|
|
2166
|
-
.ss-w-bi-
|
|
2167
|
-
.ss-w-bi-
|
|
2184
|
+
.ss-w-bi-comp-meta { display: inline-flex; align-items: center; gap: 5px; flex: none; min-width: 0; }
|
|
2185
|
+
/* shared crest-flanked team row, still consumed by MarketOddsCardList */
|
|
2186
|
+
.ss-w-bi-fixture { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; font-size: 12px; font-weight: 650; color: var(--ss-w-ink); }
|
|
2187
|
+
|
|
2188
|
+
/* row 2: one action line -- market \xB7 selection (left, market ellipsises first), odds, slip button */
|
|
2189
|
+
.ss-w-bi-action-row { display: flex; align-items: center; gap: 9px; }
|
|
2190
|
+
.ss-w-bi-pick { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; }
|
|
2191
|
+
.ss-w-bi-market { font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--ss-w-faint); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2192
|
+
.ss-w-bi-pick-dot { flex: none; color: var(--ss-w-faint); font-weight: 700; }
|
|
2193
|
+
.ss-w-bi-sel { flex: none; font-size: 12.5px; font-weight: 700; line-height: 1.2; color: var(--ss-w-ink); white-space: nowrap; }
|
|
2168
2194
|
.ss-w-bi-odds { flex: none; display: flex; align-items: baseline; justify-content: flex-end; gap: 5px; }
|
|
2169
|
-
.ss-w-bi-odds b { font-size:
|
|
2195
|
+
.ss-w-bi-odds b { font-size: 20px; font-family: ui-monospace, monospace; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ss-w-accent); line-height: 1.05; }
|
|
2170
2196
|
.ss-w-bi-book { font-size: 9.5px; color: var(--ss-w-faint); }
|
|
2197
|
+
.ss-w-bi-action-row .ss-w-slip { flex: none; }
|
|
2198
|
+
/* let the slip toast size to its own text and anchor to the card's right edge, not the button width */
|
|
2199
|
+
.ss-w-bi-action-row .ss-w-toast { left: auto; right: 0; width: max-content; max-width: 210px; white-space: normal; }
|
|
2171
2200
|
|
|
2172
2201
|
/* row 3: bar-chart glyph + reasoning prose + stats-expander chevron, in a subtle strip */
|
|
2173
2202
|
.ss-w-bi-reason { display: flex; align-items: flex-start; gap: 8px; background: var(--ss-w-bubble); border-radius: 10px; padding: 8px 10px; }
|