@dashspec/renderer 0.1.25 → 0.1.26

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.
@@ -5,6 +5,25 @@
5
5
  They are part of the public contract: a name listed here is not renamed or removed within a major version
6
6
  (`test/css-hooks.test.ts` fails if one disappears from the source). Anything not listed is internal.
7
7
 
8
+ ## Two ways to write `css`
9
+
10
+ ```ts
11
+ widgets: {
12
+ // A string: plain CSS, `&` is the panel.
13
+ "Kpi": { css: "& .ds-kpi-label { text-transform: uppercase; }" },
14
+ // An object: your editor suggests every "& .ds-…" selector below and type-checks the properties.
15
+ "Kpi:hero": {
16
+ css: {
17
+ "& .ds-kpi-label": { textTransform: "uppercase", fontSize: 12 }, // numbers become px
18
+ "&:hover": { boxShadow: "var(--ds-shadow-md)", "--ds-space-md": "8px" },
19
+ },
20
+ },
21
+ }
22
+ ```
23
+
24
+ Any other selector still works in the object (`"& td:nth-child(2)"`). `DS_CLASSES` and the `DsClass` type are
25
+ exported if you need the list in code.
26
+
8
27
  ## Attributes on every panel
9
28
 
10
29
  | Attribute | Value |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashspec/renderer",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "description": "Draws a dashboard from DashSpec JSON: widgets, data, events, state.",
5
5
  "keywords": [
6
6
  "dashboard",