@dashspec/renderer 0.1.37 → 0.1.39
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 +19 -0
- package/dist/{chunk-7II42B2U.js → chunk-UL6VRMFZ.js} +2 -2
- package/dist/{chunk-7II42B2U.js.map → chunk-UL6VRMFZ.js.map} +1 -1
- package/dist/{core-CMrDMelI.d.ts → core-B6Up94OI.d.ts} +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/index.d.ts +98 -3
- package/dist/index.js +142 -49
- package/dist/index.js.map +1 -1
- package/docs/theming.md +32 -0
- package/package.json +1 -1
package/docs/theming.md
CHANGED
|
@@ -276,3 +276,35 @@ 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: 15, weight: 600, color: "#111827" },
|
|
291
|
+
meta: { font: "body", size: 12, color: "#6b7280" }, // header side text, live badge, legends, pagers
|
|
292
|
+
label: { font: "body", size: 12, color: "#6b7280" }, // KPI and tile labels
|
|
293
|
+
value: { font: "data", size: 30, weight: 700, lineHeight: 36 },
|
|
294
|
+
unit: { size: 11, color: "#9ca3af" },
|
|
295
|
+
caption: { size: 12, color: "#9ca3af" },
|
|
296
|
+
empty: { size: 13, color: "#9ca3af", padding: "16px 0" },
|
|
297
|
+
tableHead: { size: 12, weight: 600 }, tableCell: { size: 13 },
|
|
298
|
+
header: { align: "start" },
|
|
299
|
+
kpiCard: { padding: 16, radius: 8, gap: 6, minHeight: 120 },
|
|
300
|
+
tile: { padding: 12, radius: 8, gap: 6, spacing: 12, border: "#e5e7eb", activeLabel: { weight: 600 } },
|
|
301
|
+
table: { cellPadding: "10px 12px", rowBorder: "#f3f4f6", footBackground: "#f9fafb", footWeight: 600 },
|
|
302
|
+
liveDot: { size: 8, color: "#16a34a" },
|
|
303
|
+
legend: { gap: 12, swatch: 10, swatchRadius: 3 },
|
|
304
|
+
filterBar: { padding: "12px", radius: 12 },
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
});
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
Use `widgets` css only for what is specific to one kind or variant of your dashboards.
|