@ids-group-ltd/ids-design-system 0.13.2 → 0.13.3

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +265 -0
  2. package/components.md +12 -16
  3. package/docs/agent/INDEX.md +1 -2
  4. package/docs/agent/charts/ds-column-chart.md +3 -2
  5. package/docs/agent/feedback/ds-bar.md +13 -0
  6. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +9 -10
  7. package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
  8. package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs +95 -0
  9. package/fesm2022/ids-group-ltd-ids-design-system-components-bar.mjs.map +1 -0
  10. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +70 -41
  11. package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
  12. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs +973 -0
  13. package/fesm2022/ids-group-ltd-ids-design-system-components-chart.mjs.map +1 -0
  14. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +141 -120
  15. package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
  16. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +42 -11
  17. package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +1 -1
  18. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +16 -7
  19. package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
  20. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +14 -83
  21. package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
  22. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
  23. package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
  24. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +163 -21
  25. package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
  26. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +1 -1
  27. package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
  28. package/fesm2022/ids-group-ltd-ids-design-system.mjs +2 -2
  29. package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
  30. package/migrations/0.13.3.json +211 -0
  31. package/package.json +17 -17
  32. package/styles/_chart-frame.scss +16 -6
  33. package/styles/_tokens-charts.scss +29 -5
  34. package/styles/_tokens.scss +1 -1
  35. package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +2 -1
  36. package/types/ids-group-ltd-ids-design-system-components-bar.d.ts +63 -0
  37. package/types/ids-group-ltd-ids-design-system-components-button.d.ts +2 -2
  38. package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +7 -4
  39. package/types/ids-group-ltd-ids-design-system-components-chart.d.ts +543 -0
  40. package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +95 -38
  41. package/types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts +15 -2
  42. package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +6 -1
  43. package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +8 -18
  44. package/types/ids-group-ltd-ids-design-system-components.d.ts +58 -9
  45. package/types/ids-group-ltd-ids-design-system-core.d.ts +55 -4
  46. package/types/ids-group-ltd-ids-design-system.d.ts +4 -4
  47. package/docs/agent/feedback/ds-meter.md +0 -11
  48. package/docs/agent/feedback/ds-progress.md +0 -10
  49. package/fesm2022/ids-group-ltd-ids-design-system-components-meter.mjs +0 -61
  50. package/fesm2022/ids-group-ltd-ids-design-system-components-meter.mjs.map +0 -1
  51. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs +0 -65
  52. package/fesm2022/ids-group-ltd-ids-design-system-components-progress.mjs.map +0 -1
  53. package/types/ids-group-ltd-ids-design-system-components-meter.d.ts +0 -36
  54. package/types/ids-group-ltd-ids-design-system-components-progress.d.ts +0 -40
package/CHANGELOG.md CHANGED
@@ -1,5 +1,270 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 0.13.3 — 2026-09-17
4
+
5
+ ### Breaking
6
+
7
+ - **`ds-progress` and `ds-meter` are one component, `ds-bar`.** They were the same drawing — the
8
+ same 6px pill track, the same fill, the same clamping — under two names, and the only thing that
9
+ genuinely differed between them is now an input. `ds-meter` shipped in `0.13.2` and existed for
10
+ that one release.
11
+
12
+ ```html
13
+ <ds-bar [value]="68" ariaLabel="Manifest upload progress" />
14
+ ```
15
+
16
+ **For a progress bar the rename is the whole upgrade.** `value`, `max`, `variant`,
17
+ `indeterminate`, `target` and `ariaLabel` keep their names and their defaults, and `semantics`
18
+ defaults to `'progress'` — so a renamed `ds-progress` behaves exactly as it did.
19
+ `ProgressComponent` and `MeterComponent` are both `BarComponent`, and `ProgressVariant` is
20
+ `BarVariant` — all from `@ids-group-ltd/ids-design-system/components/bar`. A subclass of either
21
+ old class stops building; there is one class to extend now, and it carries every member both of
22
+ them had.
23
+
24
+ **A renamed `ds-meter` needs one more edit.** It was `aria-hidden` unless `ariaLabel` named it;
25
+ `ds-bar` announces as a progress bar by default. Add `semantics="none"` where the figure is
26
+ printed beside the bar, or `semantics="meter"` where the bar is the only place the measurement
27
+ appears. Nothing errors and nothing looks different — the change is entirely in what a screen
28
+ reader says, which is what the input exists to control.
29
+
30
+ **`ds-bar-chart` is a different component and is NOT renamed.** `ds-bar` is a prefix of it, so a
31
+ find-and-replace without a word boundary will corrupt every chart in the app.
32
+
33
+ - **The `--ds-progress-*` and `--ds-meter-*` tokens are `--ds-bar-*`.** `-height`,
34
+ `-track-color`, `-target-color`, `-target-width` and `-min-width` keep their suffix.
35
+ `--ds-progress-bar-color` and its `-success` / `-warning` / `-error` siblings became
36
+ `--ds-bar-fill-color` and siblings, because `--ds-bar-bar-color` stutters. The global
37
+ `--progress-h` is `--bar-h` — same 6px, under a name that still describes the component.
38
+
39
+ An override of a name nothing reads still parses, so a missed rename reports nothing and the bar
40
+ simply returns to its default look.
41
+
42
+ - **`valueFormat` on `ds-column-chart` and `ds-line-chart` now receives a second argument,
43
+ `location`.** The axis tick and the annex table used to share one call with no way to tell them
44
+ apart, so a custom formatter that spelled a value out in full also spelled it out on the axis,
45
+ where a fixed-width column has room for `1.2M` and not `1,248,392`. The callback is
46
+ `(value: number, location: ChartFormatLocation) => string` now, called with `'tick'` for the axis
47
+ label and `'tooltip'` everywhere else a value is printed in full (the annex table, the generated
48
+ description, the value beside a mark).
49
+
50
+ ```ts
51
+ valueFormat: ChartValueFormat = (value, location) =>
52
+ location === 'tick' ? compact(value) : spelled(value);
53
+ ```
54
+
55
+ An existing one-argument callback still compiles and still runs, because JavaScript ignores an
56
+ argument nothing reads. It cannot tell the two locations apart, though, so it prints the same
57
+ string for both, which is un-abbreviated on the axis wherever the built-in default used to
58
+ abbreviate for it.
59
+
60
+ **The built-in default changed too, with no callback involved.** It used to pick one suffix for
61
+ the whole axis, from the axis's own step, so `800K` and `1600K` shared a unit even past a million.
62
+ It now compacts each tick by that tick's own magnitude, so the same axis prints `800K` beside
63
+ `1.6M`. An axis whose ticks cross a thousand, million or billion boundary renders differently.
64
+
65
+ ### Added
66
+
67
+ - **`ds-chart` is importable, with the marks that draw inside it.** The container the column and
68
+ line charts are built inside now ships as its own entry point,
69
+ `@ids-group-ltd/ids-design-system/components/chart`, for a plot the five presets do not cover - a
70
+ combo of columns and a cumulative line being the case that asked for it. It owns the frame, the
71
+ axes, the gridlines, the caption, the legend slot, the annex table and the generated description;
72
+ what is drawn against its scales is projected in.
73
+
74
+ ```html
75
+ <ds-chart [categories]="months" secondaryAxisMode="rounded">
76
+ <svg:g dsColumnSeries [data]="billed" />
77
+ <svg:g dsLineSeries [data]="cumulative" axis="secondary" />
78
+ </ds-chart>
79
+ ```
80
+
81
+ The entry point carries the container, the two series marks, the reference line and label marks,
82
+ their data types, the scales token and the two geometry helpers. A mark is an ATTRIBUTE selector
83
+ on a real `<svg:g>`, never an element of its own: an element the SVG specification does not know
84
+ renders nothing, its children included. Write `<svg:g dsColumnSeries>`, not `<ds-column-series>`.
85
+
86
+ **Reach for a preset first.** `ds-bar-chart`, `ds-column-chart`, `ds-donut-chart`,
87
+ `ds-funnel-chart` and `ds-line-chart` carry the accessible defaults, and the container is the
88
+ escape hatch for the plot none of them draws. It is not re-exported from the package facade, so it
89
+ is imported by its own path. The marks are Angular components, so nothing projected from React or
90
+ from `@angular/elements` can draw inside the canvas.
91
+
92
+ - **A column chart can carry several named series per category.** Hand `data` a list of
93
+ `ColumnChartSeries` instead of a flat list of points and every category carries one column per
94
+ series, keyed by a `ds-chart-legend` under the plot. `stack` decides how they share the band:
95
+ `'none'` (the default) and `'grouped'` stand them side by side, `'stacked'` puts each on top of
96
+ the one before it, and `'normalized'` stacks then divides by the category's own total, so every
97
+ band is full and the axis reads in shares.
98
+
99
+ ```html
100
+ <ds-column-chart stack="grouped" [data]="[
101
+ { id: 'billed', label: 'Billed', data: months },
102
+ { id: 'committed', label: 'Committed', fill: 'hatched', data: forecast },
103
+ ]" />
104
+ ```
105
+
106
+ A series takes one colour for all of its marks and a series-wide `fill` paints every one of its
107
+ columns, where a flat list of points still colours each mark by its own position — the marks of a
108
+ single-series chart ARE the categories and the marks of a grouped one are not. A flat list still
109
+ takes the whole band, so a chart that was passing one stays exactly as it was. Stacked segments
110
+ are separated by a 2px gap in the surface colour rather than a drawn rule, which survives print
111
+ and colour-vision deficiency. `stack="stacked"` and `ds-line-chart`'s `axisMode="stacked"` are
112
+ different things: series on top of each other, against two plots one above the other.
113
+
114
+ - **`ds-donut-chart` takes `partOfWhole`, so its percentages can be turned off.** A ring always
115
+ printed each slice's share and there was no way to stop it. The input defaults to `true`, which is
116
+ what the ring already did, so nothing changes without asking; `[partOfWhole]="false"` drops the
117
+ percentage from the legend, the tooltip and the data table alike.
118
+
119
+ It starts `true` here and `false` on every other chart on purpose: a ring IS parts of one whole, so
120
+ a share of the total is a real quantity whatever the data, while a column chart's categories often
121
+ sum to a number nobody can point at.
122
+
123
+ - **A column can be drawn as a projection rather than a reading.** A `ColumnChartPoint` that sets
124
+ `fill: 'hatched'` keeps its colour and takes a striped texture over it, which is what separates a
125
+ forecast from a settled figure without spending a second hue on it.
126
+
127
+ ```html
128
+ <ds-column-chart [data]="[
129
+ { label: 'Jun', value: 3020 },
130
+ { label: 'Jul', value: 3400, fill: 'hatched' },
131
+ ]" />
132
+ ```
133
+
134
+ Texture is the encoding that survives greyscale, print and colour-vision deficiency, so it carries
135
+ the distinction where a lighter tint of the same colour would not. The chart reads nothing into the
136
+ flag: which columns are projections is a fact only the caller has. `--ds-chart-hatch-color` and
137
+ `--ds-chart-hatch-width` tune the stripes.
138
+
139
+ - **A second value axis on `ds-chart`, and a line series to draw against it.** A plot can now carry
140
+ two quantities at two magnitudes - a figure per month on the left axis, the running total of
141
+ those months on the right - instead of flattening one of them against the other's scale.
142
+
143
+ `secondaryAxisMode` takes the same four words `ds-line-chart`'s `yAxisMode` does:
144
+ `'rounded'` (the default) hangs the second scale on the first's own gridlines at a round step,
145
+ `'exact'` ends it on its largest reading, `'independent'` scales and grids it on its own, and
146
+ `'stacked'` draws two plots one above the other over a shared category axis. `ChartAxisMode` and
147
+ `ChartAxis` are exported from the core entry point, and `LineChartAxisMode` is now an alias of
148
+ the first.
149
+
150
+ `axisColor` and `secondaryAxisColor` paint each axis's tick labels in the colour of the marks
151
+ measured against it, which on a two-scale plot is the only thing that says which numbers a mark
152
+ is read against. They are inert while the plot has one axis.
153
+
154
+ `--ds-chart-area-opacity` sets how solid the band a line series fills down to its baseline is.
155
+
156
+ - **Reference lines and bands on `ds-column-chart`.** `thresholds` draws a target, a budget or an
157
+ SLA across the plot, behind the columns.
158
+
159
+ ```ts
160
+ thresholds: ChartThreshold[] = [
161
+ { value: 85, label: 'Target' },
162
+ { value: 73, label: 'Escalation', dash: 'dotted' },
163
+ ];
164
+ ```
165
+
166
+ Each entry is ONE number, not a coordinate pair: `value`, plus an optional `label`, `color` and
167
+ `dash` (`'solid' | 'dashed' | 'dotted'`, default `'dashed'`). `to` turns the same object into a
168
+ band filled between two readings instead of a line, written in either order.
169
+
170
+ A threshold widens the value axis to hold it, so a target above every column still lands on the
171
+ plot rather than off it. It is also named in the generated description - "Target at 85, 2 of 5
172
+ points above" - so the line reaches a reader who cannot see it.
173
+
174
+ Four tokens set the default look: `--ds-chart-threshold-color`,
175
+ `--ds-chart-threshold-band-opacity`, `--ds-chart-threshold-dashed-pattern` and
176
+ `--ds-chart-threshold-dotted-pattern`. A threshold's own `color` overrides the first.
177
+
178
+ ### Changed
179
+
180
+ - **Hovering a legend item behaves as hovering the mark it names.** On `ds-donut-chart` the panel
181
+ opened over the legend row rather than over the arc, so the reader was pointed at the label
182
+ instead of the slice; on `ds-funnel-chart` the stage rows did nothing at all. Both now open the
183
+ same panel over the MARK and dim the rest of the plot, identical to pointing at the arc or the bar
184
+ directly, and the keyboard route follows wherever the legend carries it.
185
+
186
+ - **A chart tooltip opens against its mark, not against the row that holds it.** `ds-bar-chart`
187
+ anchored the panel to the whole row — label, value and track — so it opened a row-height above
188
+ the bar it was about: 46.7px from the mark where the gap asks for 6. It anchors to the bar now.
189
+ The gap itself went from 12px to 6px on every chart, because a panel a finger's width off its
190
+ mark reads as floating free of it.
191
+
192
+ - **`ds-column-chart`'s `data` input accepts a second shape.** It was
193
+ `readonly ColumnChartPoint[]` and is now
194
+ `readonly ColumnChartPoint[] | readonly ColumnChartSeries[]`. Passing one is unaffected; reading
195
+ the signal back or overriding it is not. `chart.data()[0].value` stops type-checking without a
196
+ narrowing test, because a `ColumnChartSeries` has no `value`, and a subclass redeclaring `data`
197
+ fails on TS2416 since an input signal's type is invariant. Narrow on the shape —
198
+ `'data' in entry` — wherever the values are read back.
199
+
200
+ - **Exported class member surface moved — only matters if you SUBCLASS one of these.**
201
+ `ProgressComponent` and `MeterComponent` are gone; `BarComponent` carries every member both of
202
+ them had. `ChartTooltipDirective`, internal and not exported from the package root, gains
203
+ `dsChartTooltipPreferBelow`. `ColumnChartComponent` moved its drawing into the shared container
204
+ and took several series, so it gained `thresholds`, `categories`, `geometry`, `tableRows`,
205
+ `viewHeightPx`, `skeletonHeightPx`, `stack`, `resolvedSeries`, `seriesRefs`, `pinnedSeries`,
206
+ `slotCount`, `offsets`, `offsetsFor`, `multiSeries`, `legendItems` and `axisFormat`, and lost the
207
+ members that used to draw its marks. `DonutChartComponent` gained
208
+ `partOfWhole`, `arcAt`, `isDimmed` and three legend handlers; `FunnelChartComponent` gained
209
+ `isDimmed` and `onRowEnter`. A subclass declaring any of those names collides: rename yours, or
210
+ add `override` where it genuinely means the same thing.
211
+
212
+ - **A held mark opens its panel BELOW itself.** The Unpin control sits at the plot's top edge, and
213
+ a panel opening upward from a mark in the upper half landed on top of it. No z-index fixes that
214
+ — the panel is portaled to the body, and an app layout that isolates its stacking context traps
215
+ the chart's own chrome underneath whatever number it carries. Below-first while pinned keeps the
216
+ two apart; the other three fallbacks still catch a mark with no room under it.
217
+
218
+ - **Moving a pin from one mark to another no longer blinks.** The press that re-aimed it cleared
219
+ the pin first and the click set it again, so the Unpin control and the held mark's styling
220
+ unmounted for a frame between the two marks. A press that lands on another mark of the same
221
+ chart is a re-aim now, and `pinned` never goes false across it.
222
+
223
+ - **The pin glyph is a drawing pin seen from the side.** Head-on it read as a lamp or a bell at the
224
+ 14px the charts badge it at.
225
+
226
+ - **A focused mark wears the app's own focus colour.** The ring was white with a dark halo, which
227
+ on a coloured band read as an artefact rather than as a focus indicator. It is
228
+ `--focus-ring-color` with a light keyline around it now — the keyline is what separates it from
229
+ a mark of the same hue family, which is why the indicator is two tones either way.
230
+ `--ds-chart-focus-ring-color` and `--ds-chart-focus-halo-color` still set both.
231
+
232
+ - **A chart with nothing to draw keeps its axes.** `ds-line-chart` and `ds-column-chart` render
233
+ the value axis and the category axis behind the empty, error and no-visible-series messages, so
234
+ the message stands in a plot rather than in a blank card. Without ticks or labels: there is no
235
+ data to scale them against. The charts with no axes — donut, funnel, bar — are unchanged.
236
+
237
+ - **`ds-bar` cannot collapse to nothing in a content-sized cell.** It carries
238
+ `min-inline-size: 3rem`, overridable through `--ds-bar-min-width`. A box sized to its content —
239
+ a `width: 'content'` table column, a shrink-to-fit flex or grid item — is sized by what its
240
+ contents contribute intrinsically, and a bar that is 100% of its cell contributes nothing: one
241
+ alone in such a cell measures 0px wide. `ds-progress` had no floor, so a bar that used to
242
+ disappear there is now visible; set the property to `0` for the old behaviour.
243
+
244
+ - **`indeterminate` is ignored unless `semantics` is `'progress'`.** Only a task has an unknown
245
+ duration. Nothing that set it on `ds-progress` is affected, because that is the default.
246
+
247
+ ### Fixed
248
+
249
+ - **A pinned tooltip survives a scroll.** Every chart tore its panel down on any scroll of the page,
250
+ and because a pinned mark deliberately stops answering the pointer, nothing brought it back: the
251
+ pin badge and the Unpin control were left sitting over a reading that was no longer on screen.
252
+ The panel repositions now instead of closing. An unpinned tooltip still goes away on both a scroll
253
+ and the pointer leaving, as it always did.
254
+
255
+ - **A column chart plots a domain that reaches below zero.** Every scale clamped its floor at zero,
256
+ so a negative reading drew nothing at all and a P&L series rendered as a flat baseline with no
257
+ warning. The axis now spans the data, the zero line is drawn where it falls inside the plot, and a
258
+ negative column grows downward from it with its value label at its own tip. Room for that label is
259
+ reserved only when the domain actually reaches below zero, so an all-positive chart keeps its
260
+ height.
261
+
262
+ - **The value axis fits its own labels.** The gutter was a fixed width, which an SVG canvas CLIPS
263
+ rather than overflows, so a locale whose compact numbers are wider than an English `3.5k` lost the
264
+ leading digit of every tick - `3,5 тыс.` printed as `,5 тыс.`. The gutter is measured from the
265
+ widest label that actually rendered, and `axisGutter` is the floor it will not go below.
266
+
267
+
3
268
  ## 0.13.2 — 2026-09-15
4
269
 
5
270
  ### Added
package/components.md CHANGED
@@ -284,20 +284,15 @@ Inputs: `size: 'xs' | 'sm' | 'md' | 'lg' = 'md'`, `initials: string = ''`, `imag
284
284
  Inputs: `max: number = 4` (visible avatars before "+N" overflow), `total: number | null = null` (used to compute the overflow count; without `total` no overflow chip renders).
285
285
  Content: project `<ds-avatar>` children.
286
286
 
287
- #### `<ds-progress>` — `ProgressComponent`
288
- Linear progress bar (no circular variant).
289
- Inputs: `value: number = 0` (in units of `max`, clamped), `max: number = 100`, `variant: 'default' | 'success' | 'warning' | 'error' = 'default'`, `indeterminate: boolean = false`, `target: number | null = null`, `ariaLabel: string | null = null`.
290
- `max` is the scale `value` and `target` are read against; left at 100 they are percentages. Set it to the real total — `[value]="37" [max]="80"` — and `aria-valuenow`/`aria-valuemax` carry "37 of 80" instead of a percentage the caller had to compute. Zero or less falls back to 100.
291
- `target` is a second point on the same scale, drawn as a hairline across the track — a goal or baseline to read `value` against. Clamped like `value` and ignored while `indeterminate`. `role="progressbar"` announces one value, so name the comparison in `ariaLabel` ("Resolved 62% against a 75% target"); the mark alone reaches nobody using a screen reader.
292
- Tokens: `--ds-progress-height`, `--ds-progress-track-color`, `--ds-progress-bar-color`, `--ds-progress-bar-color-success`, `--ds-progress-bar-color-warning`, `--ds-progress-bar-color-error`, `--ds-progress-target-color`, `--ds-progress-target-width`.
293
-
294
- #### `<ds-meter>` — `MeterComponent`
295
- One track and one fill, for a measurement inside a table cell — no caption, no legend, no annex table.
296
- Inputs: `value: number = 0` (in units of `max`, clamped), `max: number = 100` (zero or less falls back to 100), `color: string | null = null`, `ariaLabel: string | null = null`.
297
- Not `<ds-progress>`: that reports how far a task has got and says so with `role="progressbar"`, which a table of two hundred measurements would announce two hundred times. Here the mark is `aria-hidden` unless `ariaLabel` names it — leave it unset where the cell prints the figure beside the bar, set it where the bar is the only place the number appears.
298
- `max` is usually the column's own largest value, so the longest bar fills its track and the rest are its share.
299
- The meter fills whatever box it is in, so the column decides the bar's width. A box sized to its content — `width: 'content'` on `ds-table`, or a shrink-to-fit flex or grid item — is sized by what its contents contribute intrinsically, and a bar that is 100% of its cell contributes nothing, so the host carries a `min-inline-size` of `3rem`. Give it a width of your own where the bar should be a fixed size.
300
- Tokens: `--ds-meter-height`, `--ds-meter-min-width`, `--ds-meter-track-color`, `--ds-meter-radius`, `--ds-meter-fill-color`.
287
+ #### `<ds-bar>` — `BarComponent`
288
+ One horizontal track with one fill: a task's completion, or a measurement on a known scale. No circular variant.
289
+ Inputs: `value: number = 0` (in units of `max`, clamped), `max: number = 100`, `semantics: 'progress' | 'meter' | 'none' = 'progress'`, `variant: 'default' | 'success' | 'warning' | 'error' = 'default'`, `indeterminate: boolean = false`, `color: string | null = null`, `target: number | null = null`, `ariaLabel: string | null = null`.
290
+ `semantics` is the claim the bar makes, and it decides the role: `'progress'` is how far a task has got (`role="progressbar"`), `'meter'` is a measurement on a known scale with no beginning and no completion — a rate, a score, a count against a ceiling (`role="meter"`), `'none'` draws it and hides it from assistive technology. Use `'none'` for a bar in a table cell whose figure is printed beside it: left at the default, a table of two hundred rows announces two hundred progress bars.
291
+ `max` is the scale `value` and `target` are read against; left at 100 they are percentages. Set it to the real total — `[value]="37" [max]="80"` — and `aria-valuenow`/`aria-valuemax` carry "37 of 80" instead of a percentage the caller had to compute. For a column of measurements it is usually the column's own largest value. Zero or less falls back to 100.
292
+ `target` is a second point on the same scale, drawn as a hairline across the track — a goal, a baseline or a threshold. Clamped like `value` and ignored while `indeterminate`. The role announces one value, so name the comparison in `ariaLabel` ("Resolved 62% against a 75% target").
293
+ `indeterminate` is ignored unless `semantics` is `'progress'`: only a task has an unknown duration.
294
+ The bar fills its box, so the column decides its width. A box sized to its content is sized by what its contents contribute intrinsically and a `100%`-wide child contributes nothing, so the host carries a `min-inline-size` of `3rem`.
295
+ Tokens: `--ds-bar-height`, `--ds-bar-min-width`, `--ds-bar-track-color`, `--ds-bar-fill-color`, `--ds-bar-fill-color-success`, `--ds-bar-fill-color-warning`, `--ds-bar-fill-color-error`, `--ds-bar-target-color`, `--ds-bar-target-width`.
301
296
 
302
297
  #### `<ds-spinner>` — `SpinnerComponent`
303
298
  Input: `size: 'sm' | 'md' | 'lg' = 'md'`. Pure-CSS spinner, `role="status"` with built-in `aria-label`.
@@ -484,14 +479,15 @@ Tokens: `--ds-bar-chart-track-color`, `--ds-bar-chart-track-height`, `--ds-bar-c
484
479
 
485
480
  #### `<ds-column-chart>` — `ColumnChartComponent`
486
481
  Vertical columns for a short series read left to right — months, stages, teams — measured against one value axis whose ticks snap to round numbers.
487
- Inputs: `data: readonly ColumnChartPoint[]` (required), `showValues: boolean = true` (each column prints its own value above itself), `tickCount: number = 5` (a hint: ticks snap to a round step, so an axis asked for three ends up with five and one asked for ten stops at eight), `caption: string | null = null`, `summary: string | null = null`, `dataTable: 'toggle' | 'visible' | 'none' = 'toggle'`, `loading: boolean = false`, `emptyText: string = 'No data'`, `error: boolean = false`, `errorText: string = 'Could not load the data'`, `valueFormat: (value: number) => string`, `interactive: boolean = false`, `tooltip: 'item' | 'none' = 'item'`, `staggerMs: number = 0`
482
+ Inputs: `data: readonly ColumnChartPoint[]` (required), `showValues: boolean = true` (each column prints its own value above itself), `tickCount: number = 5` (a hint: ticks snap to a round step, so an axis asked for three ends up with five and one asked for ten stops at eight), `caption: string | null = null`, `summary: string | null = null`, `dataTable: 'toggle' | 'visible' | 'none' = 'toggle'`, `loading: boolean = false`, `emptyText: string = 'No data'`, `error: boolean = false`, `errorText: string = 'Could not load the data'`, `valueFormat: (value: number) => string`, `interactive: boolean = false`, `tooltip: 'item' | 'none' = 'item'`, `staggerMs: number = 0`, `thresholds: readonly ChartThreshold[] = []`
488
483
  Output: `(pointClicked): ColumnChartPoint` — same contract as `ds-bar-chart`'s `rowClicked`.
489
484
  Interaction: `interactive: boolean = false` turns on the affordance — pointer cursor, hover tint and the keyboard route. `dimOthers: boolean = false` is a SEPARATE opt-in that fades every other mark while one is hovered or focused; off by default, because the fade costs the separation between the faded marks (dE 14.8 -> 2.1 at the default dim opacity) — it buys loudness for one mark and pays for it with the rest. The output fires whether or not it is set. The keyboard route is ONE tab stop for the whole chart, not one per mark: arrows walk the marks, Home and End reach the extremes, and the ends wrap. `tooltip: 'item' | 'none' = 'item'` opens a panel for the hovered, tapped or focused mark; a tap latches it until the next tap outside. Project an `<ng-template #dsChartTooltip let-tip>` to replace its contents — `tip` is `{ category: string; entries: { label, value, formatted, color }[] }`.
490
485
  Motion: marks that leave finish leaving before marks that arrive start. `staggerMs: number = 0` spaces the arrivals; `40` is the documented step and the total is capped at 300ms. Every duration is a `--ds-motion-chart-*` role, so `prefers-reduced-motion` zeroes them with nothing per chart.
491
486
  States: `loading` draws skeleton marks at the real count; `error` shows `errorText` in place of the plot, which is a different claim from an empty `data` showing `emptyText`.
492
487
  Point: `ColumnChartPoint = { label: string; value: number; color?: string }`
488
+ Thresholds: `ChartThreshold = { value: number; label?: string; color?: string; to?: number; dash?: 'solid' | 'dashed' | 'dotted' }` draws a target, a budget or an SLA across the plot, behind the columns. ONE number, not a coordinate pair; `to` makes the same object a band between two readings, in either order; `dash` defaults to `'dashed'`. A threshold widens the value axis to hold it, and is named in the generated description, so a target above every column is neither drawn off the plot nor left unsaid.
493
489
  Colour: the categorical palette by position — `--ds-chart-series-1-color` onward. Set `color` on a column that carries a meaning its position does not, such as `var(--ds-chart-series-accent-color)` on the period the reader should land on. This is the one chart where the default is a judgement call rather than a rule: columns often ARE separate things (revenue by region), and where they are one quantity over time, `color` puts every column on `--ds-chart-series-default-color` in one pass.
494
- Tokens: `--ds-column-chart-plot-height`, `--ds-column-chart-column-width` (share of its own cell), `--ds-column-chart-column-max-width` (the cap that stops a five-column chart drawing slabs wider than their labels), `--ds-column-chart-column-gap`, `--ds-column-chart-grid-line-color`, `--ds-column-chart-value-space` (headroom for the value printed above a full-height column), `--ds-column-chart-axis-width` (the tick-label column; widen it for a `valueFormat` that prints longer ticks, which are clipped rather than wrapped).
490
+ Tokens: `--ds-column-chart-plot-height`, `--ds-column-chart-column-width` (share of its own cell), `--ds-column-chart-column-max-width` (the cap that stops a five-column chart drawing slabs wider than their labels), `--ds-column-chart-column-gap`, `--ds-column-chart-grid-line-color`, `--ds-column-chart-value-space` (headroom for the value printed above a full-height column), `--ds-column-chart-axis-width` (the tick-label column; widen it for a `valueFormat` that prints longer ticks, which are clipped rather than wrapped). Reference lines take `--ds-chart-threshold-color`, `--ds-chart-threshold-band-opacity`, `--ds-chart-threshold-dashed-pattern` and `--ds-chart-threshold-dotted-pattern`.
495
491
 
496
492
  #### `<ds-donut-chart>` — `DonutChartComponent`
497
493
  A ring that splits one total into its parts, with the middle free for the total or a headline figure of your own.
@@ -39,8 +39,7 @@ and token names.** These leaves are for orientation and usage.
39
39
  - [<ds-tag> — TagComponent](feedback/ds-tag.md) — Content: label.
40
40
  - [<ds-avatar> — AvatarComponent](feedback/ds-avatar.md) — Inputs: size: 'xs' | 'sm' | 'md' | 'lg' = 'md', initials: string = '', imageUrl: string | null = null, tint: {
41
41
  - [<ds-avatar-group> — AvatarGroupComponent](feedback/ds-avatar-group.md) — Content: project <ds-avatar> children.
42
- - [<ds-progress> — ProgressComponent](feedback/ds-progress.md) — Linear progress bar (no circular variant).
43
- - [<ds-meter> — MeterComponent](feedback/ds-meter.md) — One track and one fill, for a measurement inside a table cell — no caption, no legend, no annex table.
42
+ - [<ds-bar> — BarComponent](feedback/ds-bar.md) — One horizontal track with one fill: a task's completion, or a measurement on a known scale. No circular varian
44
43
  - [<ds-spinner> — SpinnerComponent](feedback/ds-spinner.md) — Input: size: 'sm' | 'md' | 'lg' = 'md'. Pure-CSS spinner, role="status" with built-in aria-label.
45
44
  - [<ds-skeleton> — SkeletonComponent](feedback/ds-skeleton.md) — Inputs: width?: string, height?: string, circle: boolean = false, inline: boolean = false. Shimmer animation r
46
45
  - [<ds-stat> — StatComponent](feedback/ds-stat.md) — Delta direction is derived from the sign of delta: positive → up (arrow + green), negative → down (arrow + red
@@ -4,11 +4,12 @@
4
4
  Group: Charts
5
5
 
6
6
  Vertical columns for a short series read left to right — months, stages, teams — measured against one value axis whose ticks snap to round numbers.
7
- Inputs: `data: readonly ColumnChartPoint[]` (required), `showValues: boolean = true` (each column prints its own value above itself), `tickCount: number = 5` (a hint: ticks snap to a round step, so an axis asked for three ends up with five and one asked for ten stops at eight), `caption: string | null = null`, `summary: string | null = null`, `dataTable: 'toggle' | 'visible' | 'none' = 'toggle'`, `loading: boolean = false`, `emptyText: string = 'No data'`, `error: boolean = false`, `errorText: string = 'Could not load the data'`, `valueFormat: (value: number) => string`, `interactive: boolean = false`, `tooltip: 'item' | 'none' = 'item'`, `staggerMs: number = 0`
7
+ Inputs: `data: readonly ColumnChartPoint[]` (required), `showValues: boolean = true` (each column prints its own value above itself), `tickCount: number = 5` (a hint: ticks snap to a round step, so an axis asked for three ends up with five and one asked for ten stops at eight), `caption: string | null = null`, `summary: string | null = null`, `dataTable: 'toggle' | 'visible' | 'none' = 'toggle'`, `loading: boolean = false`, `emptyText: string = 'No data'`, `error: boolean = false`, `errorText: string = 'Could not load the data'`, `valueFormat: (value: number) => string`, `interactive: boolean = false`, `tooltip: 'item' | 'none' = 'item'`, `staggerMs: number = 0`, `thresholds: readonly ChartThreshold[] = []`
8
8
  Output: `(pointClicked): ColumnChartPoint` — same contract as `ds-bar-chart`'s `rowClicked`.
9
9
  Interaction: `interactive: boolean = false` turns on the affordance — pointer cursor, hover tint and the keyboard route. `dimOthers: boolean = false` is a SEPARATE opt-in that fades every other mark while one is hovered or focused; off by default, because the fade costs the separation between the faded marks (dE 14.8 -> 2.1 at the default dim opacity) — it buys loudness for one mark and pays for it with the rest. The output fires whether or not it is set. The keyboard route is ONE tab stop for the whole chart, not one per mark: arrows walk the marks, Home and End reach the extremes, and the ends wrap. `tooltip: 'item' | 'none' = 'item'` opens a panel for the hovered, tapped or focused mark; a tap latches it until the next tap outside. Project an `<ng-template #dsChartTooltip let-tip>` to replace its contents — `tip` is `{ category: string; entries: { label, value, formatted, color }[] }`.
10
10
  Motion: marks that leave finish leaving before marks that arrive start. `staggerMs: number = 0` spaces the arrivals; `40` is the documented step and the total is capped at 300ms. Every duration is a `--ds-motion-chart-*` role, so `prefers-reduced-motion` zeroes them with nothing per chart.
11
11
  States: `loading` draws skeleton marks at the real count; `error` shows `errorText` in place of the plot, which is a different claim from an empty `data` showing `emptyText`.
12
12
  Point: `ColumnChartPoint = { label: string; value: number; color?: string }`
13
+ Thresholds: `ChartThreshold = { value: number; label?: string; color?: string; to?: number; dash?: 'solid' | 'dashed' | 'dotted' }` draws a target, a budget or an SLA across the plot, behind the columns. ONE number, not a coordinate pair; `to` makes the same object a band between two readings, in either order; `dash` defaults to `'dashed'`. A threshold widens the value axis to hold it, and is named in the generated description, so a target above every column is neither drawn off the plot nor left unsaid.
13
14
  Colour: the categorical palette by position — `--ds-chart-series-1-color` onward. Set `color` on a column that carries a meaning its position does not, such as `var(--ds-chart-series-accent-color)` on the period the reader should land on. This is the one chart where the default is a judgement call rather than a rule: columns often ARE separate things (revenue by region), and where they are one quantity over time, `color` puts every column on `--ds-chart-series-default-color` in one pass.
14
- Tokens: `--ds-column-chart-plot-height`, `--ds-column-chart-column-width` (share of its own cell), `--ds-column-chart-column-max-width` (the cap that stops a five-column chart drawing slabs wider than their labels), `--ds-column-chart-column-gap`, `--ds-column-chart-grid-line-color`, `--ds-column-chart-value-space` (headroom for the value printed above a full-height column), `--ds-column-chart-axis-width` (the tick-label column; widen it for a `valueFormat` that prints longer ticks, which are clipped rather than wrapped).
15
+ Tokens: `--ds-column-chart-plot-height`, `--ds-column-chart-column-width` (share of its own cell), `--ds-column-chart-column-max-width` (the cap that stops a five-column chart drawing slabs wider than their labels), `--ds-column-chart-column-gap`, `--ds-column-chart-grid-line-color`, `--ds-column-chart-value-space` (headroom for the value printed above a full-height column), `--ds-column-chart-axis-width` (the tick-label column; widen it for a `valueFormat` that prints longer ticks, which are clipped rather than wrapped). Reference lines take `--ds-chart-threshold-color`, `--ds-chart-threshold-band-opacity`, `--ds-chart-threshold-dashed-pattern` and `--ds-chart-threshold-dotted-pattern`.
@@ -0,0 +1,13 @@
1
+ <!-- GENERATED by tools/split-agent-catalogue.mjs from components.md. Do not edit. -->
2
+ # `<ds-bar>` — `BarComponent`
3
+
4
+ Group: Display & feedback
5
+
6
+ One horizontal track with one fill: a task's completion, or a measurement on a known scale. No circular variant.
7
+ Inputs: `value: number = 0` (in units of `max`, clamped), `max: number = 100`, `semantics: 'progress' | 'meter' | 'none' = 'progress'`, `variant: 'default' | 'success' | 'warning' | 'error' = 'default'`, `indeterminate: boolean = false`, `color: string | null = null`, `target: number | null = null`, `ariaLabel: string | null = null`.
8
+ `semantics` is the claim the bar makes, and it decides the role: `'progress'` is how far a task has got (`role="progressbar"`), `'meter'` is a measurement on a known scale with no beginning and no completion — a rate, a score, a count against a ceiling (`role="meter"`), `'none'` draws it and hides it from assistive technology. Use `'none'` for a bar in a table cell whose figure is printed beside it: left at the default, a table of two hundred rows announces two hundred progress bars.
9
+ `max` is the scale `value` and `target` are read against; left at 100 they are percentages. Set it to the real total — `[value]="37" [max]="80"` — and `aria-valuenow`/`aria-valuemax` carry "37 of 80" instead of a percentage the caller had to compute. For a column of measurements it is usually the column's own largest value. Zero or less falls back to 100.
10
+ `target` is a second point on the same scale, drawn as a hairline across the track — a goal, a baseline or a threshold. Clamped like `value` and ignored while `indeterminate`. The role announces one value, so name the comparison in `ariaLabel` ("Resolved 62% against a 75% target").
11
+ `indeterminate` is ignored unless `semantics` is `'progress'`: only a task has an unknown duration.
12
+ The bar fills its box, so the column decides its width. A box sized to its content is sized by what its contents contribute intrinsically and a `100%`-wide child contributes nothing, so the host carries a `min-inline-size` of `3rem`.
13
+ Tokens: `--ds-bar-height`, `--ds-bar-min-width`, `--ds-bar-track-color`, `--ds-bar-fill-color`, `--ds-bar-fill-color-success`, `--ds-bar-fill-color-warning`, `--ds-bar-fill-color-error`, `--ds-bar-target-color`, `--ds-bar-target-width`.