@sensiblestats/widget-react 0.13.1 → 0.14.1

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/styles.css CHANGED
@@ -250,3 +250,71 @@
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: 28px; height: 28px; font-size: 22px; }
274
+ .ss-w-dash-emoji { line-height: 1; }
275
+ .ss-w-dash-tile-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
276
+ .ss-w-dash-tile-title { min-width: 0; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
277
+ .ss-w-dash-tile-subtitle { min-width: 0; font-size: 11.5px; color: var(--ss-w-faint); overflow-wrap: anywhere; }
278
+ .ss-w-dash-tile-chevron { flex: none; margin-left: auto; width: 14px; height: 14px; color: var(--ss-w-faint); }
279
+
280
+ /* Badge + crests share their own row, below the title -- NOT the icon/chevron row. A
281
+ nowrap badge (~70px) sitting beside icon+chevron in a ~180px half-span tile left the
282
+ title column at ~22px wide, wrapping every title character-by-character. Here the row
283
+ gets the body's full width, so a badge this size is comfortably inside it. */
284
+ .ss-w-dash-tile-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
285
+ .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; }
286
+
287
+ .ss-w-dash-tile-crests { flex: none; display: flex; align-items: center; }
288
+ .ss-w-dash-tile-crest {
289
+ width: 18px; height: 18px; border-radius: 50%;
290
+ background-size: cover; background-position: center; background-color: var(--ss-w-bubble);
291
+ margin-left: -6px; border: 2px solid var(--ss-w-panel); /* overlapping stack, capped at 3 in DashboardTile */
292
+ }
293
+ .ss-w-dash-tile-crest:first-child { margin-left: 0; }
294
+
295
+ /* Market: default 2-column grid, tiles get the same accent rail as the other card
296
+ families (.ss-w-binsight, .ss-w-mocard, .ss-w-omcard) so a market tile reads as
297
+ part of that visual language rather than a plain unstyled button. */
298
+ .ss-w-dash--market .ss-w-dash-tile { border-left: 3px solid var(--ss-w-accent); }
299
+
300
+ /* Goal: one column of pill rows. */
301
+ .ss-w-dash--goal .ss-w-dash-grid { grid-template-columns: 1fr; }
302
+ .ss-w-dash--goal .ss-w-dash-tile { border-radius: 999px; padding: 10px 14px; }
303
+
304
+ /* Discovery: tinted bento cards. Stacked (icon over text) so a two- or three-word title gets
305
+ the tile's full width instead of the ~100px left of a horizontal icon+chevron -- that narrow
306
+ column was wrapping "Most interesting angles" onto three lines. The chevron is dropped (the
307
+ whole card is the tap target) and the badge + crest row is forced onto one line. */
308
+ .ss-w-dash--discovery .ss-w-dash-tile { flex-direction: column; align-items: stretch; gap: 8px; }
309
+ .ss-w-dash--discovery .ss-w-dash-tile-icon { align-self: flex-start; width: 32px; height: 32px; font-size: 26px; }
310
+ .ss-w-dash--discovery .ss-w-dash-tile-chevron { display: none; }
311
+ /* The full-span trends tile has the whole panel width, so its icon and title sit on one row
312
+ (horizontal, centre-aligned) rather than stacking like the narrow half tiles. */
313
+ .ss-w-dash--discovery .ss-w-dash-tile--full { flex-direction: row; align-items: center; }
314
+ .ss-w-dash--discovery .ss-w-dash-tile--full .ss-w-dash-tile-icon { align-self: center; }
315
+ .ss-w-dash--discovery .ss-w-dash-tile-meta { flex-wrap: nowrap; }
316
+ .ss-w-dash--discovery .ss-w-dash-tile-crest { width: 22px; height: 22px; }
317
+ .ss-w-dash--discovery .ss-w-dash-tile:nth-child(1) { background: #eef8f1; }
318
+ .ss-w-dash--discovery .ss-w-dash-tile:nth-child(2) { background: #eef3fb; }
319
+ .ss-w-dash--discovery .ss-w-dash-tile:nth-child(3) { background: #fdf6ec; }
320
+ .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.13.1",
3
+ "version": "0.14.1",
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.11.0",
40
+ "@sensiblestats/widget-sdk": "^0.12.0",
41
41
  "react-markdown": "^9.0.1",
42
42
  "remark-gfm": "^4.0.0"
43
43
  },