@dashspec/renderer 0.1.27 → 0.1.29

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.
@@ -55,7 +55,7 @@ Prefer `theme.widgets` (scoped by kind/variant) over global selectors on these.
55
55
  | Atoms (Text, Value, Progress, Icon, Divider, Button) | `.ds-atom-divider`, `.ds-atom-icon`, `.ds-atom-progress`, `.ds-atom-text`, `.ds-atom-value`, `.ds-button` |
56
56
  | BarChart, LineChart, PieChart, Scatter, Gauge | `.ds-chart`, `.ds-chart-legend`, `.ds-swatch`, `.ds-swatch-line` |
57
57
  | Card, Tabs, Repeater | `.ds-card-body`, `.ds-repeater`, `.ds-repeater-item`, `.ds-slot-hint`, `.ds-state`, `.ds-tabs`, `.ds-tabs-bar`, `.ds-tabs-panel` |
58
- | Every panel (frame) | `.ds-badge`, `.ds-crumbs`, `.ds-live`, `.ds-loading`, `.ds-loading-text`, `.ds-panel`, `.ds-panel-addons`, `.ds-panel-body`, `.ds-panel-foot`, `.ds-panel-head`, `.ds-panel-meta`, `.ds-panel-title`, `.ds-panel-toolbar`, `.ds-panel-tools`, `.ds-part-selected`, `.ds-skeleton`, `.ds-state` |
58
+ | Every panel (frame) | `.ds-badge`, `.ds-crumbs`, `.ds-live`, `.ds-loading`, `.ds-loading-text`, `.ds-panel`, `.ds-panel-addons`, `.ds-panel-body`, `.ds-panel-foot`, `.ds-panel-head`, `.ds-panel-meta`, `.ds-panel-subtitle`, `.ds-panel-title`, `.ds-panel-toolbar`, `.ds-panel-tools`, `.ds-part-selected`, `.ds-skeleton`, `.ds-state` |
59
59
 
60
60
  The dashboard root is `ds-root` (`data-ds-theme="light|dark"`). Colours, fonts and sizes are better changed
61
61
  through tokens (`--ds-*` variables) than through these classes; use classes for layout and details tokens don't cover.
package/docs/theming.md CHANGED
@@ -30,7 +30,7 @@ interface Theme {
30
30
  | `scale.breakpoints` | `sm`, `md`, `lg`, `xl`, `tv` (px) |
31
31
  | `scale.density` | `"compact"`, `"comfortable"` (default) or `"spacious"`. Scales every `--ds-space-*` (×0.75, ×1, ×1.25, rounded) and sets `--ds-control-height` (30, 36, 42 px) for filters, buttons and inputs; also emitted as `--ds-density`. Your own widgets can read it with `useThemeTokens` |
32
32
  | `scale.chip` | Status chips ("On track", "Target un-defined"): `radius`, `border`, `weight`, `paddingX`, `height`, `fontSize` in px. Leave out for the default look; e.g. `{ "radius": 999, "border": 0, "weight": 700 }` for borderless pills |
33
- | `scale.control` | Filter controls, menus and buttons: `fontSize` (px, default 13), `stepBackground` (the stepper arrows), `iconSize` (the filter bar icon, px) |
33
+ | `scale.control` | Filter controls, menus and buttons: `fontSize` (px, default 13), `stepBackground` (the stepper arrows), `iconSize` (the filter bar icon, px), `valueColor` and `valueWeight` (a select without a label) |
34
34
  | `surface` | `page`, `card`, `sunken`, `overlay`, `selection`, `scrim`, `backdrop?` (page background, may be a gradient), `tableHeader?` |
35
35
  | `text` | `primary`, `secondary`, `subtle`, `disabled`, `onFill` |
36
36
  | `border` | `default`, `control`, `focus` |
package/docs/widgets.md CHANGED
@@ -27,7 +27,7 @@ Icon, Divider, Button) accepts these in `spec`:
27
27
  | `subtitle` | string | Smaller text under the title |
28
28
  | `info` | string | Help text behind an ⓘ next to the title |
29
29
  | `meta` | string | Short text on the right of the header, e.g. `"Total: ${datasources.summary.data.total}"` |
30
- | `live` | boolean | Shows "● Live, updated just now" from the datasource's last update |
30
+ | `live`, `liveText` (`{time}`, `{ago}`) | boolean | Shows "● Live, updated just now" from the datasource's last update |
31
31
  | `data` | binding | Where the data comes from (below) |
32
32
  | `options` | object | Passed to the underlying library (charts: ECharts options), merged last |
33
33
  | `highlight` | string | Hover group: widgets with the same group highlight together |
@@ -107,7 +107,7 @@ Field props such as `x`, `label` or `value` name a field of each data row; dot p
107
107
 
108
108
  | Kind | What it shows | Main props | Events |
109
109
  |---|---|---|---|
110
- | `BarChart` | Bars, grouped, stacked or horizontal | `x` (required), `y` (field or list), `seriesBy`, `labels`, `seriesColors` (colour per y field or series value), `stacked`, `normalized`, `horizontal`, `range: { low, high }`, `pageSize`, `colorBy` (`average` / `none`), `partial`, `valueLabels`, `averageLine`, `legendLabels`, `target`, `targetLabel`, `valueAxis` (`min`, `max`, `atLeast`, `step`), `tooltip` (`{ title, lines }`, templates over the hovered `row`; `**bold**` for values), `unit`, `format` | `click`, `doubleClick`, `hover`, `hoverEnd`, `legendClick`, `brush`, `datazoom` (parts `bar`, `legend`, `axis`) |
110
+ | `BarChart` | Bars, grouped, stacked or horizontal | `x` (required), `y` (field or list), `seriesBy`, `labels`, `seriesColors` (colour per y field or series value), `legendStyle` (`chart` / `html`: legend list in the header row), `hideZeroLabels`, `maxDecimals` (labels with at most n decimals, trailing zeros dropped), `stacked`, `normalized`, `horizontal`, `range: { low, high }`, `pageSize`, `colorBy` (`average` / `none`), `partial`, `valueLabels`, `averageLine`, `legendLabels`, `target`, `targetLabel`, `valueAxis` (`min`, `max`, `atLeast`, `step`, `minStep`), `tooltip` (`{ title, lines }`, templates over the hovered `row`; `**bold**` for values), `unit`, `format` | `click`, `doubleClick`, `hover`, `hoverEnd`, `legendClick`, `brush`, `datazoom` (parts `bar`, `legend`, `axis`) |
111
111
  | `LineChart` | Lines or areas over `x` | `x` (required), `y`, `seriesBy`, `area`, `gradient`, `smooth`, plus the bar chart's `labels`, `target`, `unit`, `format` | same as BarChart (parts `point`, `legend`, `axis`) |
112
112
  | `PieChart` | A pie or donut | `label`, `value` (required), `donut`, `unit`, `format`, `decimals` | `click`, `hover`, `hoverEnd`, `legendClick` (parts `slice`, `legend`) |
113
113
  | `Scatter` | Points by two numbers | `x`, `y` (required), `size`, `series`, `xLabel`, `yLabel` | `click`, `hover`, `hoverEnd`, `brush`, `legendClick` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashspec/renderer",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
4
4
  "description": "Draws a dashboard from DashSpec JSON: widgets, data, events, state.",
5
5
  "keywords": [
6
6
  "dashboard",