@sensiblestats/widget-react 0.13.0 → 0.14.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 +17 -0
- package/dist/index.cjs +271 -47
- 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 +319 -95
- package/dist/index.js.map +1 -1
- package/dist/styles.css +55 -0
- package/package.json +2 -2
package/dist/styles.css
CHANGED
|
@@ -250,3 +250,58 @@
|
|
|
250
250
|
@media (prefers-reduced-motion: reduce) {
|
|
251
251
|
.ss-w-abtn-shimmer { animation: none; }
|
|
252
252
|
}
|
|
253
|
+
|
|
254
|
+
/* greeting dashboard */
|
|
255
|
+
.ss-w-dash { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
|
|
256
|
+
.ss-w-dash-head { display: flex; flex-direction: column; }
|
|
257
|
+
.ss-w-dash-title { font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--ss-w-ink); }
|
|
258
|
+
.ss-w-dash-subtitle { font-size: 13px; color: var(--ss-w-faint); margin-top: 4px; }
|
|
259
|
+
.ss-w-dash-foot { font-size: 11px; color: var(--ss-w-faint); margin-top: 2px; }
|
|
260
|
+
|
|
261
|
+
.ss-w-dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
|
|
262
|
+
.ss-w-dash-tile--half { grid-column: span 1; }
|
|
263
|
+
.ss-w-dash-tile--full { grid-column: 1 / -1; }
|
|
264
|
+
|
|
265
|
+
.ss-w-dash-tile {
|
|
266
|
+
display: flex; align-items: center; gap: 10px;
|
|
267
|
+
padding: 12px; border-radius: 14px; border: 1px solid var(--ss-w-line);
|
|
268
|
+
background: var(--ss-w-panel); text-align: left; cursor: pointer; width: 100%;
|
|
269
|
+
color: inherit; font: inherit;
|
|
270
|
+
min-width: 0; /* the panel is min(400px, 100vw - 40px): without this,
|
|
271
|
+
a long Turkish title blows the column out */
|
|
272
|
+
}
|
|
273
|
+
.ss-w-dash-tile-icon { flex: none; display: grid; place-items: center; width: 20px; height: 20px; color: var(--ss-w-accent); font-size: 18px; }
|
|
274
|
+
.ss-w-dash-tile-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
|
|
275
|
+
.ss-w-dash-tile-title { min-width: 0; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
|
|
276
|
+
.ss-w-dash-tile-subtitle { min-width: 0; font-size: 11.5px; color: var(--ss-w-faint); overflow-wrap: anywhere; }
|
|
277
|
+
.ss-w-dash-tile-chevron { flex: none; margin-left: auto; width: 14px; height: 14px; color: var(--ss-w-faint); }
|
|
278
|
+
|
|
279
|
+
/* Badge + crests share their own row, below the title -- NOT the icon/chevron row. A
|
|
280
|
+
nowrap badge (~70px) sitting beside icon+chevron in a ~180px half-span tile left the
|
|
281
|
+
title column at ~22px wide, wrapping every title character-by-character. Here the row
|
|
282
|
+
gets the body's full width, so a badge this size is comfortably inside it. */
|
|
283
|
+
.ss-w-dash-tile-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
|
|
284
|
+
.ss-w-dash-tile-badge { flex: none; 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; }
|
|
285
|
+
|
|
286
|
+
.ss-w-dash-tile-crests { flex: none; display: flex; align-items: center; }
|
|
287
|
+
.ss-w-dash-tile-crest {
|
|
288
|
+
width: 18px; height: 18px; border-radius: 50%;
|
|
289
|
+
background-size: cover; background-position: center; background-color: var(--ss-w-bubble);
|
|
290
|
+
margin-left: -6px; border: 2px solid var(--ss-w-panel); /* overlapping stack, capped at 3 in DashboardTile */
|
|
291
|
+
}
|
|
292
|
+
.ss-w-dash-tile-crest:first-child { margin-left: 0; }
|
|
293
|
+
|
|
294
|
+
/* Market: default 2-column grid, tiles get the same accent rail as the other card
|
|
295
|
+
families (.ss-w-binsight, .ss-w-mocard, .ss-w-omcard) so a market tile reads as
|
|
296
|
+
part of that visual language rather than a plain unstyled button. */
|
|
297
|
+
.ss-w-dash--market .ss-w-dash-tile { border-left: 3px solid var(--ss-w-accent); }
|
|
298
|
+
|
|
299
|
+
/* Goal: one column of pill rows. */
|
|
300
|
+
.ss-w-dash--goal .ss-w-dash-grid { grid-template-columns: 1fr; }
|
|
301
|
+
.ss-w-dash--goal .ss-w-dash-tile { border-radius: 999px; padding: 10px 14px; }
|
|
302
|
+
|
|
303
|
+
/* Discovery: tinted bento cards. */
|
|
304
|
+
.ss-w-dash--discovery .ss-w-dash-tile:nth-child(1) { background: #eef8f1; }
|
|
305
|
+
.ss-w-dash--discovery .ss-w-dash-tile:nth-child(2) { background: #eef3fb; }
|
|
306
|
+
.ss-w-dash--discovery .ss-w-dash-tile:nth-child(3) { background: #fdf6ec; }
|
|
307
|
+
.ss-w-dash--discovery .ss-w-dash-tile:nth-child(4) { background: #f5eefb; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sensiblestats/widget-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.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.12.0",
|
|
41
41
|
"react-markdown": "^9.0.1",
|
|
42
42
|
"remark-gfm": "^4.0.0"
|
|
43
43
|
},
|