@sensiblestats/widget-react 0.79.0 → 0.81.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 +23 -0
- package/dist/index.cjs +1501 -1033
- 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 +1494 -1026
- package/dist/index.js.map +1 -1
- package/dist/styles.css +58 -8
- package/package.json +2 -2
package/dist/styles.css
CHANGED
|
@@ -585,6 +585,10 @@
|
|
|
585
585
|
|
|
586
586
|
/* input */
|
|
587
587
|
.ss-w-input { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--ss-w-line); }
|
|
588
|
+
.ss-w-limit { padding: 10px 12px; border-top: 1px solid var(--ss-w-line); font-size: 13px; line-height: 1.4; color: var(--ss-w-ink); overflow-wrap: anywhere; }
|
|
589
|
+
.ss-w-limit:empty { padding: 0; border-top: 0; }
|
|
590
|
+
.ss-w-limit:focus { outline: none; }
|
|
591
|
+
.ss-w-limit:not(:empty) + .ss-w-input { border-top: none; }
|
|
588
592
|
.ss-w-textarea { flex: 1; resize: none; border: 1px solid var(--ss-w-line); border-radius: 12px; padding: 8px 10px; font: inherit; color: inherit; background: var(--ss-w-panel); max-height: 96px; }
|
|
589
593
|
.ss-w-textarea:disabled { opacity: .55; cursor: not-allowed; }
|
|
590
594
|
/* iOS Safari zooms the page when a focused field's font-size is < 16px. Bump it
|
|
@@ -1183,14 +1187,60 @@
|
|
|
1183
1187
|
.ss-w-sec-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ss-w-neg); flex: none; }
|
|
1184
1188
|
.ss-w-today-live { display: flex; flex-direction: column; gap: 2px; }
|
|
1185
1189
|
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
.ss-w-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
.ss-w-
|
|
1190
|
+
/* Today tab root (Task 7): position: relative so the grid's own star/unstar toast (absolute,
|
|
1191
|
+
top-centre) anchors here rather than to some unrelated positioned ancestor. */
|
|
1192
|
+
/* Non-scrolling anchor for .ss-w-today-toast (position: absolute; top: 0): .ss-w-mon-list below is
|
|
1193
|
+
the overflow-y: auto scroller, so a toast parented to IT would scroll out of view with the
|
|
1194
|
+
content that moved it. This wrapper sits outside that scroller, inside .ss-w-panel's fixed-size
|
|
1195
|
+
flex column, so top: 0 always lands at the visible top of the Today tab. min-height: 0 is
|
|
1196
|
+
required: without it this flex item defaults to min-height: auto (its content height), .ss-w-panel's
|
|
1197
|
+
overflow: hidden then clips it, and .ss-w-mon-list inside never gets a bounded height to scroll within. */
|
|
1198
|
+
.ss-w-today-root { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
|
|
1199
|
+
|
|
1200
|
+
/* Section header for "Your leagues"/"Top leagues"/"All leagues" (Task 7) -- same visual
|
|
1201
|
+
treatment as .ss-w-sec-head (the live-band header), kept as a separate class so a kept test
|
|
1202
|
+
asserting .ss-w-sec-head is absent when nothing is live cannot see this header too. */
|
|
1203
|
+
.ss-w-today-sec { display: flex; align-items: center; gap: 7px; padding: 2px 2px 0; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--ss-w-faint); }
|
|
1204
|
+
.ss-w-today-sec::after { content: ""; flex: 1; height: 1px; background: var(--ss-w-line); }
|
|
1205
|
+
.ss-w-today-sec-sub { text-transform: none; letter-spacing: normal; font-weight: 600; }
|
|
1206
|
+
.ss-w-today-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
|
1207
|
+
.ss-w-today-empty { font-size: 12px; color: var(--ss-w-faint); padding: 10px 2px; }
|
|
1208
|
+
|
|
1209
|
+
/* League tile (Task 5): a flat row (crest + name as the open target, star as a separate sibling
|
|
1210
|
+
button) rather than a disclosure header -- opening is Task 6's LeagueDetail, not an inline
|
|
1211
|
+
expansion. Same border/radius language .ss-w-grp used to carry, before Task 7 deleted it. */
|
|
1212
|
+
.ss-w-today-tile { display: flex; align-items: center; gap: 6px; border: 1px solid var(--ss-w-line); border-radius: 12px; overflow: hidden; background: var(--ss-w-bubble); }
|
|
1213
|
+
.ss-w-today-tile-body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px 9px; background: none; border: none; font: inherit; color: var(--ss-w-ink); cursor: pointer; text-align: left; }
|
|
1214
|
+
.ss-w-today-tile-body:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
|
|
1215
|
+
.ss-w-today-tile-name { font-size: 12px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1216
|
+
.ss-w-today-tile-country { font-weight: 600; color: var(--ss-w-faint); }
|
|
1217
|
+
.ss-w-today-tile-star { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin: 0 6px; background: none; border: none; border-radius: 8px; color: var(--ss-w-faint); cursor: pointer; }
|
|
1218
|
+
.ss-w-today-tile-star:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
|
|
1219
|
+
.ss-w-today-tile-star[aria-pressed="true"] { color: var(--ss-w-accent); }
|
|
1220
|
+
.ss-w-today-tile-star:disabled { cursor: default; opacity: .4; }
|
|
1221
|
+
.ss-w-today-tile-star svg { width: 18px; height: 18px; }
|
|
1222
|
+
|
|
1223
|
+
/* League detail (Task 6): the drill-in view opened from a tile. Its header star is always
|
|
1224
|
+
enabled (spec §3/§7's one exception to the tile rule), so it carries no :disabled styling. */
|
|
1225
|
+
.ss-w-today-detail { position: relative; display: flex; flex-direction: column; gap: 10px; }
|
|
1226
|
+
.ss-w-today-detail-head { display: flex; align-items: center; gap: 8px; }
|
|
1227
|
+
.ss-w-today-detail-back { flex: none; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: none; border: none; border-radius: 8px; color: var(--ss-w-ink); cursor: pointer; transform: scaleX(-1); }
|
|
1228
|
+
.ss-w-today-detail-back:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
|
|
1229
|
+
.ss-w-today-detail-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1230
|
+
.ss-w-today-detail-star { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: none; border: none; border-radius: 8px; color: var(--ss-w-faint); cursor: pointer; }
|
|
1231
|
+
.ss-w-today-detail-star:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
|
|
1232
|
+
.ss-w-today-detail-star[aria-pressed="true"] { color: var(--ss-w-accent); }
|
|
1233
|
+
.ss-w-today-detail-star svg { width: 18px; height: 18px; }
|
|
1234
|
+
.ss-w-today-detail-nav { display: flex; align-items: center; justify-content: center; gap: 10px; }
|
|
1235
|
+
.ss-w-today-detail-prev, .ss-w-today-detail-next { flex: none; display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; background: none; border: none; border-radius: 8px; color: var(--ss-w-faint); cursor: pointer; }
|
|
1236
|
+
.ss-w-today-detail-prev:focus-visible, .ss-w-today-detail-next:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: -2px; }
|
|
1237
|
+
.ss-w-today-detail-prev { transform: scaleX(-1); }
|
|
1238
|
+
.ss-w-today-detail-pos { font-size: 10.5px; font-weight: 700; color: var(--ss-w-faint); font-variant-numeric: tabular-nums; }
|
|
1239
|
+
.ss-w-today-detail-body { display: flex; flex-direction: column; }
|
|
1240
|
+
.ss-w-today-detail-count { align-self: flex-end; flex: none; font-size: 10.5px; font-weight: 700; color: var(--ss-w-faint); background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
|
|
1241
|
+
/* aria-live status region, not a modal -- pointer-events: none so the header/nav above stay
|
|
1242
|
+
clickable while it is showing. */
|
|
1243
|
+
.ss-w-today-toast { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 1; pointer-events: none; width: max-content; max-width: 220px; font-size: 11px; font-weight: 560; color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 14%, var(--ss-w-panel)); border: 1px solid color-mix(in srgb, var(--ss-w-accent) 30%, var(--ss-w-line)); border-radius: 10px; padding: 5px 10px; box-shadow: 0 4px 14px rgba(0,0,0,.14); }
|
|
1194
1244
|
|
|
1195
1245
|
.ss-w-drow { display: grid; grid-template-columns: 42px minmax(0,1fr) 22px; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--ss-w-line); }
|
|
1196
1246
|
.ss-w-drow:last-child { border-bottom: none; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sensiblestats/widget-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.81.0",
|
|
4
4
|
"description": "Embeddable SensibleStats chat widget for React.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"prepublishOnly": "yarn build"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@sensiblestats/widget-sdk": "^0.
|
|
40
|
+
"@sensiblestats/widget-sdk": "^0.52.0",
|
|
41
41
|
"react-markdown": "^9.0.1",
|
|
42
42
|
"remark-gfm": "^4.0.0"
|
|
43
43
|
},
|