@dashspec/renderer 0.1.37 → 0.1.38

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/docs/theming.md CHANGED
@@ -276,3 +276,34 @@ The class names and attributes you can target in `css` are listed in [styling-ho
276
276
 
277
277
  `ui.icons` replaces DashSpec's own icons: `filterBar` (the filter bar icon), `previous` and `next` (stepper arrows).
278
278
  Define the object once, outside your components, so it stays the same between renders.
279
+
280
+
281
+ ### Parts every widget shares (`scale.parts`)
282
+
283
+ Restyle what all widgets have in common with values, no CSS or class names. Every part is optional; one you leave
284
+ out keeps DashSpec's look.
285
+
286
+ ```ts
287
+ createTheme({
288
+ scale: {
289
+ parts: {
290
+ title: { font: "heading", size: 14, weight: 700, color: "#0d0d0d" },
291
+ meta: { font: "heading", size: 12, color: "#666666" }, // header side text, live badge, legends, pagers
292
+ label: { font: "heading", size: 12, color: "#666666" }, // KPI and tile labels
293
+ value: { font: "body", size: 28, weight: 700, lineHeight: 32 },
294
+ unit: { font: "heading", size: 10, color: "#808080" },
295
+ caption: { font: "heading", size: 12, color: "#808080" },
296
+ empty: { font: "heading", size: 12, color: "#808080", padding: "24px 0" },
297
+ tableHead: { size: 12, weight: 600 }, tableCell: { font: "heading", size: 12 },
298
+ header: { align: "start" },
299
+ kpiCard: { padding: 14, radius: 12, gap: 8, minHeight: 112 },
300
+ tile: { padding: 14, radius: 10, gap: 8, spacing: 16, border: "#cccccc", activeLabel: { weight: 700 } },
301
+ table: { cellPadding: "14px 16px", rowBorder: "#eeeeee", footBackground: "#f2f2f2", footWeight: 700 },
302
+ liveDot: { size: 6, color: "#2ba24c" },
303
+ legend: { gap: 16, swatch: 8, swatchRadius: 2 },
304
+ },
305
+ },
306
+ });
307
+ ```
308
+
309
+ Use `widgets` css only for what is specific to one kind or variant of your dashboards.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashspec/renderer",
3
- "version": "0.1.37",
3
+ "version": "0.1.38",
4
4
  "description": "Draws a dashboard from DashSpec JSON: widgets, data, events, state.",
5
5
  "keywords": [
6
6
  "dashboard",