@ids-group-ltd/ids-design-system 0.13.0 → 0.13.1
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 +295 -3
- package/components.md +15 -6
- package/docs/agent/INDEX.md +1 -0
- package/docs/agent/charts/ds-bar-chart.md +1 -1
- package/docs/agent/charts/ds-column-chart.md +1 -1
- package/docs/agent/charts/ds-config.md +12 -0
- package/docs/agent/charts/ds-donut-chart.md +2 -2
- package/docs/agent/charts/ds-funnel-chart.md +1 -1
- package/docs/agent/charts/ds-line-chart.md +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +9 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs +30 -14
- package/fesm2022/ids-group-ltd-ids-design-system-components-bar-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-bottom-sheet.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +21 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +9 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs +39 -16
- package/fesm2022/ids-group-ltd-ids-design-system-components-column-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +9 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs +33 -21
- package/fesm2022/ids-group-ltd-ids-design-system-components-donut-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +2 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +37 -15
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs +62 -21
- package/fesm2022/ids-group-ltd-ids-design-system-components-line-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +2 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +9 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-page-header.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +9 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +9 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +56 -8
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.13.1.json +236 -0
- package/package.json +1 -1
- package/styles/_chart-frame.scss +15 -0
- package/styles/_chart-interactive.scss +17 -6
- package/styles/_chart-motion.scss +61 -18
- package/styles/_dropdown-overlay.scss +9 -3
- package/styles/_focus.scss +10 -1
- package/styles/_overlay-motion.scss +10 -1
- package/styles/_tokens-charts.scss +5 -0
- package/types/ids-group-ltd-ids-design-system-components-autocomplete.d.ts +6 -1
- package/types/ids-group-ltd-ids-design-system-components-bar-chart.d.ts +24 -9
- package/types/ids-group-ltd-ids-design-system-components-chart-tooltip.d.ts +7 -1
- package/types/ids-group-ltd-ids-design-system-components-color-picker.d.ts +6 -1
- package/types/ids-group-ltd-ids-design-system-components-column-chart.d.ts +29 -9
- package/types/ids-group-ltd-ids-design-system-components-date-picker.d.ts +6 -1
- package/types/ids-group-ltd-ids-design-system-components-donut-chart.d.ts +27 -13
- package/types/ids-group-ltd-ids-design-system-components-funnel-chart.d.ts +29 -10
- package/types/ids-group-ltd-ids-design-system-components-line-chart.d.ts +36 -9
- package/types/ids-group-ltd-ids-design-system-components-multi-select.d.ts +6 -1
- package/types/ids-group-ltd-ids-design-system-components-select.d.ts +6 -1
- package/types/ids-group-ltd-ids-design-system-components-time-picker.d.ts +6 -1
- package/types/ids-group-ltd-ids-design-system-components.d.ts +18 -2
- package/types/ids-group-ltd-ids-design-system-core.d.ts +24 -1
- package/types/ids-group-ltd-ids-design-system.d.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,296 @@
|
|
|
1
1
|
## Unreleased
|
|
2
2
|
|
|
3
|
+
## 0.13.1 — 2026-09-14
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **A picker's panel can be styled without painting every other picker's.** Each portaled pane
|
|
8
|
+
carries its own class beside the shared `ds-dropdown-panel` and `ds-overlay-pane` —
|
|
9
|
+
`ds-select-panel`, `ds-multi-select-panel`, `ds-autocomplete-panel`, `ds-color-picker-panel`,
|
|
10
|
+
`ds-date-picker-panel`, `ds-time-picker-panel` — and every one of the six also takes a
|
|
11
|
+
`panelClass` input for a class of your own:
|
|
12
|
+
|
|
13
|
+
```html
|
|
14
|
+
<ds-autocomplete panelClass="search-panel" [options]="options" />
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```scss
|
|
18
|
+
.ds-autocomplete-panel .option { font-size: 15px; }
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The panel is portaled to `document.body`, outside the host, so a class on the pane is the only
|
|
22
|
+
route a consumer stylesheet has to ONE instance of it. `panelClass` takes a string or an array.
|
|
23
|
+
|
|
24
|
+
Two panes gain `ds-dropdown-panel` that did not carry it: the date picker's and the time picker's.
|
|
25
|
+
Neither changes appearance, because neither renders any of the class names the skin styles — no
|
|
26
|
+
option rows, no option groups, no list. A rule of yours written against `.ds-dropdown-panel` now
|
|
27
|
+
matches them, though, and so do the panel's custom properties.
|
|
28
|
+
|
|
29
|
+
`SelectComponent`, `MultiSelectComponent`, `AutocompleteComponent`, `ColorPickerComponent`,
|
|
30
|
+
`DatePickerComponent` and `TimePickerComponent` each grow by this one input. A subclass of any of
|
|
31
|
+
the six that declares its own `panelClass` stops building until it renames the member or marks it
|
|
32
|
+
`override`.
|
|
33
|
+
|
|
34
|
+
- **The dropdown panel's border and shadow, and the option's type, read `--ds-*` hooks.**
|
|
35
|
+
`--ds-dropdown-panel-border-color` and `--ds-dropdown-panel-shadow` join the five box hooks the
|
|
36
|
+
panel already had; `--ds-option-weight`, `--ds-option-font-size`, `--ds-option-line-height` and
|
|
37
|
+
`--ds-option-font-family` fill the row's `font` shorthand, which carried four literal values. All
|
|
38
|
+
six forward per instance, like every other dropdown-panel hook: set one on a host and it reaches
|
|
39
|
+
that host's pane, with no global rule. Defaults are today's values, so an untouched theme is
|
|
40
|
+
unchanged.
|
|
41
|
+
|
|
42
|
+
- **`--ds-modal-title-font-family`.** The title had weight, size and colour hooks but read
|
|
43
|
+
`--font-heading` literally, so a display face had no route in that did not involve outspecifying
|
|
44
|
+
the component's own rule from outside its encapsulation. Defaults to `--font-heading`.
|
|
45
|
+
|
|
46
|
+
- **`DS_CONFIG` takes a `chart` section.** Four inputs now resolve through it, because each is one
|
|
47
|
+
decision per APP rather than per plot: `valueFormat` — a number reads one way in a product, and a
|
|
48
|
+
formatter passed per chart drifts as soon as there are two screens; `dataTable` — whether the
|
|
49
|
+
numbers behind a plot have a non-visual route is an accessibility policy, not a per-chart taste;
|
|
50
|
+
and `emptyText` / `errorText`, which is where localisation lands.
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
providers: [
|
|
54
|
+
provideDsConfig({
|
|
55
|
+
chart: {
|
|
56
|
+
valueFormat: (value) => value.toLocaleString('de-DE'),
|
|
57
|
+
dataTable: 'visible',
|
|
58
|
+
},
|
|
59
|
+
}),
|
|
60
|
+
];
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Precedence is the input, then the config, then the built-in default, so binding one on a single
|
|
64
|
+
chart still wins. The four inputs are typed `T | null` and default to `null` — that is what lets
|
|
65
|
+
a chart tell "not set" from an explicit value — and each chart exposes the settled value as
|
|
66
|
+
`dataTableResolved`, `emptyTextResolved`, `errorTextResolved` and `valueFormatResolved`. A
|
|
67
|
+
subclass that read the raw input now reads `null` until something binds it.
|
|
68
|
+
|
|
69
|
+
`ChartDataTable` and `ChartValueFormat` are exported from the package root.
|
|
70
|
+
|
|
71
|
+
The member surface of `BarChartComponent`, `ColumnChartComponent`, `DonutChartComponent`,
|
|
72
|
+
`FunnelChartComponent` and `LineChartComponent` grows by these four readbacks and by `dimOthers`,
|
|
73
|
+
all public. `ColumnChartComponent` also gains `tooltipAnchor` and the protected `onMarkEnter`,
|
|
74
|
+
`FunnelChartComponent` the protected `hitGapUnits`, and `LineChartComponent` `tooltipAnchor`, the
|
|
75
|
+
protected `cursorBottomY` and the private `readingAnchor`. `DonutChartComponent` LOSES the
|
|
76
|
+
protected `markStagger`.
|
|
77
|
+
|
|
78
|
+
A subclass that declares any of those names collides. For a public or protected member the fix is
|
|
79
|
+
`override` or a rename; for a PRIVATE one — `readingAnchor` — only a rename works, because TS2415
|
|
80
|
+
fires on the name itself and `override` does not clear it. A subclass that called `markStagger` no
|
|
81
|
+
longer compiles.
|
|
82
|
+
|
|
83
|
+
- **The tooltip is pinned to the mark, not to the cursor, and both charts that had a say now take
|
|
84
|
+
an option.** `ds-line-chart` gains `tooltipAnchor`: `'point'`, the default, pins the panel over
|
|
85
|
+
the highest reading in the category, so it stays still while the pointer travels within one band;
|
|
86
|
+
`'pointer'` follows the cursor. `ds-column-chart` gains the same input with `'mark'` and `'cell'`:
|
|
87
|
+
the box catching the pointer is the full-height category cell, so `'cell'` opened the panel at the
|
|
88
|
+
top of the plot rather than over the column it described. `'mark'` is the default and points at
|
|
89
|
+
the column.
|
|
90
|
+
|
|
91
|
+
```html
|
|
92
|
+
<ds-line-chart tooltipAnchor="pointer" [series]="series" [categories]="months" />
|
|
93
|
+
<ds-column-chart tooltipAnchor="cell" [data]="points" />
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The internal `ChartActiveMark`, which the package root does not export, takes an optional third
|
|
97
|
+
argument on `enter` to name the element inside the hit box that the panel points at. An
|
|
98
|
+
implementation that omits it still satisfies the interface.
|
|
99
|
+
|
|
100
|
+
### Changed
|
|
101
|
+
|
|
102
|
+
- **A surface no longer travels on its way in.** `ds-overlay-pane` — every picker panel, the
|
|
103
|
+
popover, the menu submenu, the tooltip, the chart tooltip — plus `ds-alert`, `ds-banner` and
|
|
104
|
+
`ds-toast` defaulted to
|
|
105
|
+
`ds-slide-in`, which offsets the panel and slides it to its place. They now default to
|
|
106
|
+
`ds-fade-in`: the same duration and easing, no travel. The travel read as the panel jumping into
|
|
107
|
+
position, and on a panel that opens UPWARD it read as jumping up from below the trigger.
|
|
108
|
+
|
|
109
|
+
`ds-drawer` and `ds-bottom-sheet` keep `ds-slide-edge-in`, because sliding in from an edge is
|
|
110
|
+
what they are, and `ds-modal` keeps `ds-scale-in`. Any surface takes its old entrance back with
|
|
111
|
+
one declaration:
|
|
112
|
+
|
|
113
|
+
```scss
|
|
114
|
+
:root { --ds-overlay-enter-keyframes: ds-slide-in; }
|
|
115
|
+
ds-toast { --ds-toast-enter-keyframes: ds-slide-in; }
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
- **A chart mark arrives by GROWING from its own baseline, not by scaling about its centre.** A
|
|
119
|
+
column grows up out of the category axis and a bar row grows out from the value axis; a ring arc,
|
|
120
|
+
a funnel band and a line have no baseline to grow from and fade instead. The uniform
|
|
121
|
+
`scale(0.94)` this replaces moved every mark's baseline and read as the whole chart zooming in.
|
|
122
|
+
|
|
123
|
+
- **The mark cap is 3px on `ds-bar-chart` and `ds-column-chart`,** through the new
|
|
124
|
+
`--ds-chart-mark-cap-radius`, with `--ds-bar-chart-cap-radius` and `--ds-column-chart-cap-radius`
|
|
125
|
+
over it. The bar's end was a full pill (half the track height) and the column's top was
|
|
126
|
+
`--radius-sm`; one soft value for both keeps the cap from reading as a change of shape while a
|
|
127
|
+
mark grows in.
|
|
128
|
+
|
|
129
|
+
- **A gap between two marks now belongs to the marks either side of it.** `ds-funnel-chart`'s
|
|
130
|
+
inter-stage gaps are claimed half by the band above and half by the band below, through a
|
|
131
|
+
transparent stroke — the gap looks exactly as it did and stops being dead space that answers
|
|
132
|
+
nothing. `ds-bar-chart`'s row gap moved from `row-gap` on the list to padding on each row, for
|
|
133
|
+
the same reason: a reader aiming between two bars used to hit neither. That last one makes the
|
|
134
|
+
bar plot one full `--ds-bar-chart-row-gap` taller — 20px at the default — because the first row
|
|
135
|
+
now carries half a gap above it and the last half a gap below.
|
|
136
|
+
|
|
137
|
+
- **A tooltip now says what the chart does not already print.** On `ds-bar-chart` and
|
|
138
|
+
`ds-column-chart` it repeated the label and the value that sit beside the mark, which told the
|
|
139
|
+
reader nothing they were not looking at. Both now carry a second line — the mark's share of the
|
|
140
|
+
total, `18.6% of total`, arithmetic the reader should not have to do — and `ds-funnel-chart`
|
|
141
|
+
carries the drop into the stage, which the shape cannot show. A mark whose value is zero or
|
|
142
|
+
negative has no share of anything visible and gets no second line at all. `ds-donut-chart` gets
|
|
143
|
+
none either: its panel and its legend both already print the percentage. A projected
|
|
144
|
+
`#dsChartTooltip` template still replaces the lot.
|
|
145
|
+
|
|
146
|
+
- **`ds-line-chart`'s crosshair moves as one object and fades on the way in and out.** The band and
|
|
147
|
+
the cursor line are one group carrying a `translateX`, so following the pointer is a single
|
|
148
|
+
transform rather than an attribute write per shape. It is not transitioned: the crosshair belongs
|
|
149
|
+
under the pointer, and easing it there makes it arrive late over readings it was never on.
|
|
150
|
+
|
|
151
|
+
- **`ds-line-chart`'s crosshair covers both plots under `yAxisMode="stacked"`.** It stopped at the
|
|
152
|
+
upper plot's baseline, so the lower plot — same category, same pointer — had nothing marked at
|
|
153
|
+
all.
|
|
154
|
+
|
|
155
|
+
- **`ds-donut-chart` fades as one ring rather than slice by slice.** Arcs share their edges, and
|
|
156
|
+
two semi-transparent shapes butting up along one let the background through the seam — which
|
|
157
|
+
reads as the slice proportions shifting slightly as the fade ends. Compositing the ring first and
|
|
158
|
+
fading the result cannot do that. `staggerMs` therefore has no effect on this chart — one object
|
|
159
|
+
arrives, not five — and the input stays only for parity with the other four.
|
|
160
|
+
|
|
161
|
+
- **A chart keeps its height in every state.** An empty `data`, a failed request, or a legend that
|
|
162
|
+
switched the last series off used to shrink the chart to a line of text, which drags the page up
|
|
163
|
+
under the reader at exactly the moment they are being told something. The message now stands in a
|
|
164
|
+
box the size of the plot it replaces, on all five. What sizes that box differs by chart:
|
|
165
|
+
`ds-column-chart` and `ds-line-chart` use their `--ds-*-plot-height`, `ds-donut-chart` its
|
|
166
|
+
`--ds-donut-chart-size`, and `ds-bar-chart` and `ds-funnel-chart` reserve three rows or stages,
|
|
167
|
+
so a chart that normally draws ten rows still shrinks to that reserve.
|
|
168
|
+
|
|
169
|
+
- **Dimming the other marks is a separate opt-in, and it is off.** `dimOthers` fades the marks that
|
|
170
|
+
are not singled out: on `ds-bar-chart`, `ds-column-chart`, `ds-donut-chart` and `ds-funnel-chart`
|
|
171
|
+
that is every mark but the hovered or focused one, and on `ds-line-chart` — which has no mark
|
|
172
|
+
between two readings to hover — it follows the legend's highlight. It used to ride along with
|
|
173
|
+
`interactive`, and it is off by default because the fade costs the separation BETWEEN the faded
|
|
174
|
+
marks: in OKLab dE ×100, the worst pair of three dimmed series falls from 14.8 at full opacity to
|
|
175
|
+
2.1 at `--ds-chart-dim-opacity`'s default. It buys loudness for one mark and pays for it with the
|
|
176
|
+
rest of the chart. A chart that had the fade gets it back with one attribute.
|
|
177
|
+
|
|
178
|
+
```html
|
|
179
|
+
<ds-donut-chart interactive dimOthers [data]="slices" />
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
- **A hidden legend row is no longer struck through.** The unchecked box says what happened and the
|
|
183
|
+
muted label agrees with it; a strike-through says the label itself is wrong.
|
|
184
|
+
|
|
185
|
+
- **A legend's colour chips arrive with the marks they name.** They used to be solid from the first
|
|
186
|
+
frame while the plot was still fading in, which reads as two objects rather than one. The chip
|
|
187
|
+
now fades on the same curve and the same delay: `ds-chart-legend`'s swatch and, where the legend
|
|
188
|
+
toggles, its checkbox; `ds-donut-chart`'s legend swatch; and `ds-funnel-chart`'s stage-table
|
|
189
|
+
swatch. Nothing in your code changes, and a screenshot test that captures a chart mid-entrance
|
|
190
|
+
will differ.
|
|
191
|
+
|
|
192
|
+
- **A `title` input no longer leaves a native browser tooltip over the component.** `title` is a
|
|
193
|
+
global HTML attribute, so `<ds-modal title="Settings">` both fed the input AND left the attribute
|
|
194
|
+
in the DOM — and the browser then raised its own tooltip over the whole component, naming it
|
|
195
|
+
rather than whatever the pointer was resting on. Eleven components drop the attribute:
|
|
196
|
+
`ds-accordion-item`, `ds-alert`, `ds-banner`, `ds-bottom-sheet`, `ds-drawer`, `ds-empty-state`,
|
|
197
|
+
`ds-list-item`, `ds-modal`, `ds-modal-card`, `ds-page-header` and `ds-toast`. Each renders the
|
|
198
|
+
title as visible text and names itself through `aria-labelledby` where it needs a name, so
|
|
199
|
+
nothing is lost to assistive technology.
|
|
200
|
+
|
|
201
|
+
This wins over a `[attr.title]` of your own on those hosts — bind it and the attribute is still
|
|
202
|
+
removed. If you want a native tooltip there, put it on a wrapper or a projected child, or use
|
|
203
|
+
`dsTooltip`.
|
|
204
|
+
|
|
205
|
+
- **A chart tooltip no longer fights the pointer that opened it.** The panel opens under the
|
|
206
|
+
cursor, and the CDK pane it is portaled into takes pointer events by default — so the panel
|
|
207
|
+
covered the plot, the plot took a `pointerleave`, the chart cleared its hover, the panel closed,
|
|
208
|
+
the pointer landed on the plot again, and the whole thing flickered for as long as the cursor sat
|
|
209
|
+
there. The pane is `pointer-events: none` now; `pointer-events` on the panel alone never reached
|
|
210
|
+
it.
|
|
211
|
+
|
|
212
|
+
- **`ds-column-chart` answers the pointer near its column, not across the whole category slot.** A
|
|
213
|
+
column is capped at `--ds-column-chart-column-max-width` while its slot is a `1fr` share of the
|
|
214
|
+
plot, so on a wide chart the hover reached well past the mark on either side. The target is
|
|
215
|
+
`--ds-column-chart-column-max-width` plus one `--ds-column-chart-column-gap` — half the gap each
|
|
216
|
+
side, the rule the funnel's bands already follow — and it spans the category cell's FULL height:
|
|
217
|
+
the plot, the axis gap under it, and the label. Split across the plot and the label alone, the
|
|
218
|
+
axis gap answered for neither, so a pointer travelling between them crossed a band where the
|
|
219
|
+
tooltip closed and reopened. It never exceeds the slot, and where the column is narrower than its
|
|
220
|
+
cap the target is wider than the column itself.
|
|
221
|
+
|
|
222
|
+
`.plot-cell` is no longer a positioned box and no longer carries the `::after` that catches the
|
|
223
|
+
pointer; `.column` is and does. A rule of yours that positioned something against `.plot-cell`
|
|
224
|
+
now resolves against `.column`.
|
|
225
|
+
|
|
226
|
+
- **The legend's checkboxes are not permanently ringed.** `ds-chart-legend` applied the focus ring
|
|
227
|
+
unconditionally instead of under `:focus-visible`, so every legend row looked focused. The
|
|
228
|
+
library's global `:where(:focus-visible)` rule already rings them, so the component needs none of
|
|
229
|
+
its own.
|
|
230
|
+
|
|
231
|
+
- **A mark's colour change eases instead of jumping,** and a dimmed line fades again. Each mark
|
|
232
|
+
animated exactly one property, because a second `transition` on the same selector REPLACES the
|
|
233
|
+
first rather than adding to it: `ds-line-chart`'s line kept `stroke-width` and lost the dim fade,
|
|
234
|
+
its marker kept `r` and lost the same, and no mark eased its paint at all. Opacity, geometry and
|
|
235
|
+
colour now travel in ONE declaration wherever they share a selector — so recolouring a row,
|
|
236
|
+
pinning a palette slot, or adding a funnel stage and re-spreading the ramp all ease. If you
|
|
237
|
+
declare your own `transition` on a chart mark, name every property it was already easing.
|
|
238
|
+
|
|
239
|
+
- **A chart tooltip closes when the page scrolls.** CDK's reposition strategy watches `window` and
|
|
240
|
+
registered `cdkScrollable`s only, so an app's own `overflow: auto` container left the panel
|
|
241
|
+
pinned in space while the chart scrolled out from under it. `ds-line-chart` reopens on the next
|
|
242
|
+
pointer move; the other four reopen when the pointer leaves a mark and enters one again.
|
|
243
|
+
|
|
244
|
+
The internal `ChartTooltipDirective`, which the package root does not export, grows one PRIVATE
|
|
245
|
+
member, `detachScrollClose`. `@ids-group-ltd/ids-design-system/components/chart-tooltip` is the
|
|
246
|
+
only specifier that reaches the class; a subclass declaring that name must rename it, because
|
|
247
|
+
TS2415 fires on the collision and `override` does not clear it for a private member.
|
|
248
|
+
|
|
249
|
+
- **The helper behind a chart tooltip's second line is renamed.** The internal `describeStanding`,
|
|
250
|
+
which returned the rank alongside the share, is the internal `describeShare` now. Neither is
|
|
251
|
+
exported from the package root, but `@ids-group-ltd/ids-design-system/components` exports them,
|
|
252
|
+
so an import of the old name stops resolving. Rename it; the signature is unchanged.
|
|
253
|
+
|
|
254
|
+
### Fixed
|
|
255
|
+
|
|
256
|
+
- **`ds-table`'s pagination footer insets per side, so the summary lines up with column one.** The
|
|
257
|
+
footer read `--ds-table-cell-pad-x` alone while the cells resolve `--ds-table-cell-pad-left` and
|
|
258
|
+
`-right` separately. A table asking for a flush first column — `--ds-table-cell-pad-left: 0`
|
|
259
|
+
with `-right` set and `-x` unset — got a footer at the 16px default while the column sat at 0.
|
|
260
|
+
The footer now walks the same per-side chain; `-x` still works as the shorthand for both.
|
|
261
|
+
|
|
262
|
+
One gap is left: `density="compact"` retunes the cells' padding on the table element itself, and
|
|
263
|
+
the footer sits outside that element rather than inside it, so a compact table with no
|
|
264
|
+
`--ds-table-cell-pad-*` of its own still has 12px cells under a 16px footer. Set
|
|
265
|
+
`--ds-table-cell-pad-x: var(--space-3)` beside `density="compact"`, or keep a local rule on the
|
|
266
|
+
footer.
|
|
267
|
+
|
|
268
|
+
- **`ds-donut-chart`'s error state holds the plot's height.** It rendered the message as a bare
|
|
269
|
+
paragraph, so a failed request collapsed the ring's 180px to one line of text and dragged the
|
|
270
|
+
page up under the reader. It now stands in the same ring-sized box the no-data state already
|
|
271
|
+
used. The message carries `empty-text is-error` where it carried `empty is-error`, so a rule of
|
|
272
|
+
yours written against `.empty.is-error` inside this chart no longer matches.
|
|
273
|
+
|
|
274
|
+
- **A role token set on an app shell no longer outranks your rule on a portaled panel.** A panel
|
|
275
|
+
sits in `document.body`, so the component copies the roles it needs onto the pane as an inline
|
|
276
|
+
style. It decided what to copy by comparing the host with `:root` — and because custom properties
|
|
277
|
+
inherit, a shell setting `--ds-radius-panel` for its own chrome made every picker under it an
|
|
278
|
+
overrider, each pinning the shell's value inline. A rule on `.ds-overlay-pane`, which is the only
|
|
279
|
+
route a stylesheet has to a portaled panel, then lost to a value nobody wrote. The comparison is
|
|
280
|
+
now against the host's PARENT, so only a role the host declares itself travels.
|
|
281
|
+
|
|
282
|
+
If you were relying on an ancestor's role reaching a panel, set it on the component instead —
|
|
283
|
+
`ds-select { --ds-radius-panel: 8px }` still forwards — or use the panel's own hook, such as
|
|
284
|
+
`--ds-dropdown-panel-radius`, which is forwarded with no such test.
|
|
285
|
+
|
|
286
|
+
### What you can now DELETE
|
|
287
|
+
|
|
288
|
+
| your workaround | why it is unnecessary | replace with |
|
|
289
|
+
| --- | --- | --- |
|
|
290
|
+
| `.ds-overlay-pane .dropdown-panel .option` — a deep rule retyping dropdown rows | the row's weight, size, line-height and family are hooks that forward per instance | `--ds-option-weight`, `--ds-option-font-size`, `--ds-option-line-height`, `--ds-option-font-family` |
|
|
291
|
+
| `ds-modal .title.title` — a rule outspecifying the modal's own title rule only to set `font-family` | the title reads a family hook, which needs no specificity at all | `--ds-modal-title-font-family` |
|
|
292
|
+
| `.pagination-footer` — a local rule re-insetting the table's footer to match a per-side gutter | the footer resolves the same left/right chain the cells do | nothing, UNLESS the table is `density="compact"` and sets no `--ds-table-cell-pad-*` — there the footer is still 4px wider than the cells and the rule is still doing work |
|
|
293
|
+
|
|
3
294
|
## 0.13.0 — 2026-09-14
|
|
4
295
|
|
|
5
296
|
### Breaking
|
|
@@ -168,9 +459,10 @@
|
|
|
168
459
|
screen together. The update phase — a mark changing size — is unchanged and still runs on
|
|
169
460
|
`--ds-motion-chart-mark-duration`.
|
|
170
461
|
|
|
171
|
-
`staggerMs` spaces the arrivals out
|
|
172
|
-
|
|
173
|
-
|
|
462
|
+
`staggerMs` spaces the arrivals out. `0` is the default and means no stagger; `40` is the
|
|
463
|
+
documented step, and the total delay is capped at 300ms so a hundred-mark series does not take
|
|
464
|
+
three seconds to appear. `ds-donut-chart` takes the input for parity and ignores it: a ring
|
|
465
|
+
arrives as one object, so there is nothing to stagger. Measured on the docs card at `staggerMs="40"`: five columns
|
|
174
466
|
resolve to 0, 40, 80, 120 and 160ms.
|
|
175
467
|
|
|
176
468
|
```html
|
package/components.md
CHANGED
|
@@ -462,7 +462,7 @@ Tokens: `--ds-table-border: var(--border-default)`, `--ds-table-radius: var(--ra
|
|
|
462
462
|
#### `<ds-bar-chart>` — `BarChartComponent`
|
|
463
463
|
Inputs: `data: readonly BarChartRow[]` (required), `max: number | null = null` (track length is relative to this; null uses the largest value, so the longest row always fills its track — a max BELOW the largest value is allowed and its bar clips at the track edge), `caption: string | null = null`, `summary: string | null = null` (accessible name; generated from the data when omitted), `dataTable: 'toggle' | 'visible' | 'none' = 'toggle'` (`'toggle'` renders a closed `<details>`; `'none'` is only correct when the same numbers are already in the DOM nearby), `showPercent: boolean = true`, `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`
|
|
464
464
|
Output: `(rowClicked): BarChartRow` — emits the clicked row.
|
|
465
|
-
Interaction: `interactive: boolean = false` turns on the affordance — pointer cursor, hover tint and the keyboard route. 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 }[] }`.
|
|
465
|
+
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 }[] }`.
|
|
466
466
|
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.
|
|
467
467
|
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`.
|
|
468
468
|
Row: `BarChartRow = { label: string; value: number; percent?: number; color?: string }`. `percent` is derived from `value / max` when omitted.
|
|
@@ -475,7 +475,7 @@ Tokens: `--ds-bar-chart-track-color`, `--ds-bar-chart-track-height`, `--ds-bar-c
|
|
|
475
475
|
Vertical columns for a short series read left to right — months, stages, teams — measured against one value axis whose ticks snap to round numbers.
|
|
476
476
|
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`
|
|
477
477
|
Output: `(pointClicked): ColumnChartPoint` — same contract as `ds-bar-chart`'s `rowClicked`.
|
|
478
|
-
Interaction: `interactive: boolean = false` turns on the affordance — pointer cursor, hover tint and the keyboard route. 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 }[] }`.
|
|
478
|
+
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 }[] }`.
|
|
479
479
|
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.
|
|
480
480
|
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`.
|
|
481
481
|
Point: `ColumnChartPoint = { label: string; value: number; color?: string }`
|
|
@@ -486,8 +486,8 @@ Tokens: `--ds-column-chart-plot-height`, `--ds-column-chart-column-width` (share
|
|
|
486
486
|
A ring that splits one total into its parts, with the middle free for the total or a headline figure of your own.
|
|
487
487
|
Inputs: `data: readonly DonutChartSlice[]` (required), `centerValue: string | null = null`, `centerLabel: string | null = null`, `legend: 'end' | 'bottom' | 'none' = 'end'`, `maxSlices: number | null = null`, `otherLabel: string = 'Other'`, `thickness: number = 0.32`, `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`
|
|
488
488
|
Output: `(sliceClicked): DonutChartSlice`
|
|
489
|
-
Interaction: `interactive: boolean = false` turns on the affordance — pointer cursor, hover tint and the keyboard route. 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
|
-
Motion:
|
|
489
|
+
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
|
+
Motion: the RING fades as one object rather than slice by slice — arcs share their edges, and fading them one at a time lets the background through every seam. `staggerMs` is accepted for parity with the other four charts and has no effect here, because there is nothing to stagger. 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
491
|
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
492
|
Slice: `DonutChartSlice = { id: string; label: string; value: number; slot?: number }`. `slot` is a 1-based palette slot: pinning a slice keeps every other slice's colour where it is when one is filtered out of `data`; left off, the colour follows the index and the whole ring repaints.
|
|
493
493
|
Colour: slices ARE different things, so this is the chart the categorical palette exists for — `--ds-chart-series-1-color` … `--ds-chart-series-8-color`.
|
|
@@ -500,7 +500,7 @@ Tokens: `--ds-donut-chart-size`, `--ds-donut-chart-gap`, `--ds-donut-chart-swatc
|
|
|
500
500
|
Stages of a journey, drawn top to bottom in the order you give them — they are never sorted, because the order is the meaning.
|
|
501
501
|
Inputs: `data: readonly FunnelChartStage[]` (required), `shape: 'taper' | 'width' | 'area' = 'area'`, `showTable: boolean = true` (the aligned stage table under the funnel: value, share of the first stage, and how much fell away since the stage above), `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`
|
|
502
502
|
Output: `(stageClicked): FunnelChartStage`
|
|
503
|
-
Interaction: `interactive: boolean = false` turns on the affordance — pointer cursor, hover tint and the keyboard route. 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 }[] }`.
|
|
503
|
+
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 }[] }`.
|
|
504
504
|
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.
|
|
505
505
|
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`.
|
|
506
506
|
Stage: `FunnelChartStage = { id: string; label: string; value: number }`
|
|
@@ -513,7 +513,7 @@ Tokens: `--ds-funnel-chart-stage-height`, `--ds-funnel-chart-stage-gap`, `--ds-f
|
|
|
513
513
|
One or more series plotted over a shared set of categories.
|
|
514
514
|
Inputs: `categories: readonly string[]` (required), `series: readonly LineChartSeries[]` (required), `yAxisMode: 'rounded' | 'exact' | 'independent' | 'stacked' = 'rounded'`, `showMarkers: boolean = true`, `gaps: 'break' | 'zero' = 'break'`, `tickCount: number = 5`, `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' | 'axis' | 'none' = 'axis'`, `patterns: boolean = false`, `staggerMs: number = 0`, `legendFilters: boolean = false`, `hiddenSeries: readonly string[] = []` (two-way), `rescaleOnHide: boolean = false`, `noVisibleSeriesText: string = 'All series are hidden'`
|
|
515
515
|
Output: `(pointClicked): LineChartPoint` — the reading that was clicked or activated. Fires whether or not `interactive` is set.
|
|
516
|
-
Interaction: a pointer moving over the plot picks the CATEGORY under it — a band paints behind every series and `tooltip="axis"`, the default here, names every series at that category. Tabbing reaches ONE marker per series; arrows walk that series' readings, and a focused marker's tooltip names its own series alone. A tap picks a category and latches the panel until the next tap outside; markers carry a transparent hit stroke of 24px, or 44px under `(pointer: coarse)`.
|
|
516
|
+
Interaction: a pointer moving over the plot picks the CATEGORY under it — a band paints behind every series and `tooltip="axis"`, the default here, names every series at that category. Tabbing reaches ONE marker per series; arrows walk that series' readings, and a focused marker's tooltip names its own series alone. A tap picks a category and latches the panel until the next tap outside; markers carry a transparent hit stroke of 24px, or 44px under `(pointer: coarse)`. `dimOthers` is the same separate opt-in as on the other four, and here it is the legend hover that drives it.
|
|
517
517
|
Legend: drawn whenever there is more than one series. `legendFilters` turns each entry into a checkbox that hides its series, `hiddenSeries` is two-way so a page can drive it from a URL parameter, and hovering an entry dims the others and thickens the one hovered. **The axis does not move when a series is hidden** unless `rescaleOnHide` says so — a silent rescale turns a period-over-period comparison into a different claim. Hiding every series replaces the plot with `noVisibleSeriesText` on a `role="status"` line, legend still rendered.
|
|
518
518
|
Second channel: `patterns` gives every series a dash of its own, in palette-slot order, with slot 1 left solid. Off by default — the shipped palette clears the colour-blind separation threshold on its own, so this is for monochrome print, a retuned palette, or a reader who asks for it.
|
|
519
519
|
Series: `LineChartSeries = { id: string; label: string; data: readonly (number | null)[]; axis?: 'primary' | 'secondary'; area?: boolean; slot?: number }`. A `null` is a missing reading and `gaps` decides what it draws — `'break'` leaves a hole in the line, `'zero'` plants a point on the baseline. `area` fills the band between the line and its axis baseline. `slot` pins a palette slot, so hiding one series leaves every other series' colour alone.
|
|
@@ -521,6 +521,15 @@ Series: `LineChartSeries = { id: string; label: string; data: readonly (number |
|
|
|
521
521
|
Colour: series ARE different things, so the categorical palette applies — `--ds-chart-series-1-color` onward, by position or by `slot`.
|
|
522
522
|
Tokens: `--ds-line-chart-plot-height`, `--ds-line-chart-line-width`, `--ds-line-chart-dot-radius`, `--ds-line-chart-area-opacity`, `--ds-line-chart-swatch-size`, `--ds-line-chart-grid-line-color`, `--ds-line-chart-axis-line-color`, `--ds-line-chart-axis-label-color`, `--ds-line-chart-axis-font-size`.
|
|
523
523
|
|
|
524
|
+
#### Chart defaults — what `DS_CONFIG` decides once
|
|
525
|
+
Four chart inputs resolve through `DS_CONFIG.chart` because they are one decision per APP, not per plot: `valueFormat` (a number reads one way in a product; a formatter passed per chart drifts as soon as there are two screens), `dataTable` (whether the numbers behind a plot have a non-visual route is an accessibility policy), `emptyText` and `errorText` (copy, and the place localisation lands). Precedence is the input, then the config, then the built-in — so binding one on a single chart still wins.
|
|
526
|
+
|
|
527
|
+
```ts
|
|
528
|
+
providers: [provideDsConfig({ chart: { valueFormat: v => v.toLocaleString('de-DE'), dataTable: 'visible' } })]
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
Everything else stays per chart: `interactive`, `tooltip`, `staggerMs`, `legend`, `tickCount` and the geometry inputs each answer a question about one plot.
|
|
532
|
+
|
|
524
533
|
#### Chart frame — the box a chart draws around itself
|
|
525
534
|
Every chart paints its own border, radius, padding and `--surface-default` background, on by default. That is unusual here — most components resist owning chrome — and a chart earns the exception because it is read as an OBJECT: a plot with axes, a legend and an annex table, whose parts run into the page without an edge. A chart that already sits inside a card drops the frame with two declarations rather than a mode flag:
|
|
526
535
|
|
package/docs/agent/INDEX.md
CHANGED
|
@@ -24,6 +24,7 @@ and token names.** These leaves are for orientation and usage.
|
|
|
24
24
|
- [<ds-donut-chart> — DonutChartComponent](charts/ds-donut-chart.md) — A ring that splits one total into its parts, with the middle free for the total or a headline figure of your o
|
|
25
25
|
- [<ds-funnel-chart> — FunnelChartComponent](charts/ds-funnel-chart.md) — Stages of a journey, drawn top to bottom in the order you give them — they are never sorted, because the order
|
|
26
26
|
- [<ds-line-chart> — LineChartComponent](charts/ds-line-chart.md) — One or more series plotted over a shared set of categories.
|
|
27
|
+
- [Chart defaults — what DS_CONFIG decides once](charts/ds-config.md) — Four chart inputs resolve through DS_CONFIG.chart because they are one decision per APP, not per plot: valueFo
|
|
27
28
|
- [Chart frame — the box a chart draws around itself](charts/chart-frame-the-box-a-chart-draws-around-itself.md) — Every chart paints its own border, radius, padding and --surface-default background, on by default. That is un
|
|
28
29
|
- [Chart colour — which palette a chart takes](charts/chart-colour-which-palette-a-chart-takes.md) — Three families, and reaching for the wrong one is the usual chart bug. Set the --ds-chart-* contract tokens, n
|
|
29
30
|
|
|
@@ -5,7 +5,7 @@ Group: Charts
|
|
|
5
5
|
|
|
6
6
|
Inputs: `data: readonly BarChartRow[]` (required), `max: number | null = null` (track length is relative to this; null uses the largest value, so the longest row always fills its track — a max BELOW the largest value is allowed and its bar clips at the track edge), `caption: string | null = null`, `summary: string | null = null` (accessible name; generated from the data when omitted), `dataTable: 'toggle' | 'visible' | 'none' = 'toggle'` (`'toggle'` renders a closed `<details>`; `'none'` is only correct when the same numbers are already in the DOM nearby), `showPercent: boolean = true`, `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
7
|
Output: `(rowClicked): BarChartRow` — emits the clicked row.
|
|
8
|
-
Interaction: `interactive: boolean = false` turns on the affordance — pointer cursor, hover tint and the keyboard route. 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 }[] }`.
|
|
8
|
+
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 }[] }`.
|
|
9
9
|
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.
|
|
10
10
|
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`.
|
|
11
11
|
Row: `BarChartRow = { label: string; value: number; percent?: number; color?: string }`. `percent` is derived from `value / max` when omitted.
|
|
@@ -6,7 +6,7 @@ Group: Charts
|
|
|
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
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`
|
|
8
8
|
Output: `(pointClicked): ColumnChartPoint` — same contract as `ds-bar-chart`'s `rowClicked`.
|
|
9
|
-
Interaction: `interactive: boolean = false` turns on the affordance — pointer cursor, hover tint and the keyboard route. 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 }[] }`.
|
|
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 }`
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!-- GENERATED by tools/split-agent-catalogue.mjs from components.md. Do not edit. -->
|
|
2
|
+
# Chart defaults — what `DS_CONFIG` decides once
|
|
3
|
+
|
|
4
|
+
Group: Charts
|
|
5
|
+
|
|
6
|
+
Four chart inputs resolve through `DS_CONFIG.chart` because they are one decision per APP, not per plot: `valueFormat` (a number reads one way in a product; a formatter passed per chart drifts as soon as there are two screens), `dataTable` (whether the numbers behind a plot have a non-visual route is an accessibility policy), `emptyText` and `errorText` (copy, and the place localisation lands). Precedence is the input, then the config, then the built-in — so binding one on a single chart still wins.
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
providers: [provideDsConfig({ chart: { valueFormat: v => v.toLocaleString('de-DE'), dataTable: 'visible' } })]
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Everything else stays per chart: `interactive`, `tooltip`, `staggerMs`, `legend`, `tickCount` and the geometry inputs each answer a question about one plot.
|
|
@@ -6,8 +6,8 @@ Group: Charts
|
|
|
6
6
|
A ring that splits one total into its parts, with the middle free for the total or a headline figure of your own.
|
|
7
7
|
Inputs: `data: readonly DonutChartSlice[]` (required), `centerValue: string | null = null`, `centerLabel: string | null = null`, `legend: 'end' | 'bottom' | 'none' = 'end'`, `maxSlices: number | null = null`, `otherLabel: string = 'Other'`, `thickness: number = 0.32`, `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`
|
|
8
8
|
Output: `(sliceClicked): DonutChartSlice`
|
|
9
|
-
Interaction: `interactive: boolean = false` turns on the affordance — pointer cursor, hover tint and the keyboard route. 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
|
-
Motion:
|
|
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
|
+
Motion: the RING fades as one object rather than slice by slice — arcs share their edges, and fading them one at a time lets the background through every seam. `staggerMs` is accepted for parity with the other four charts and has no effect here, because there is nothing to stagger. 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
|
Slice: `DonutChartSlice = { id: string; label: string; value: number; slot?: number }`. `slot` is a 1-based palette slot: pinning a slice keeps every other slice's colour where it is when one is filtered out of `data`; left off, the colour follows the index and the whole ring repaints.
|
|
13
13
|
Colour: slices ARE different things, so this is the chart the categorical palette exists for — `--ds-chart-series-1-color` … `--ds-chart-series-8-color`.
|
|
@@ -6,7 +6,7 @@ Group: Charts
|
|
|
6
6
|
Stages of a journey, drawn top to bottom in the order you give them — they are never sorted, because the order is the meaning.
|
|
7
7
|
Inputs: `data: readonly FunnelChartStage[]` (required), `shape: 'taper' | 'width' | 'area' = 'area'`, `showTable: boolean = true` (the aligned stage table under the funnel: value, share of the first stage, and how much fell away since the stage above), `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`
|
|
8
8
|
Output: `(stageClicked): FunnelChartStage`
|
|
9
|
-
Interaction: `interactive: boolean = false` turns on the affordance — pointer cursor, hover tint and the keyboard route. 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 }[] }`.
|
|
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
|
Stage: `FunnelChartStage = { id: string; label: string; value: number }`
|
|
@@ -6,7 +6,7 @@ Group: Charts
|
|
|
6
6
|
One or more series plotted over a shared set of categories.
|
|
7
7
|
Inputs: `categories: readonly string[]` (required), `series: readonly LineChartSeries[]` (required), `yAxisMode: 'rounded' | 'exact' | 'independent' | 'stacked' = 'rounded'`, `showMarkers: boolean = true`, `gaps: 'break' | 'zero' = 'break'`, `tickCount: number = 5`, `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' | 'axis' | 'none' = 'axis'`, `patterns: boolean = false`, `staggerMs: number = 0`, `legendFilters: boolean = false`, `hiddenSeries: readonly string[] = []` (two-way), `rescaleOnHide: boolean = false`, `noVisibleSeriesText: string = 'All series are hidden'`
|
|
8
8
|
Output: `(pointClicked): LineChartPoint` — the reading that was clicked or activated. Fires whether or not `interactive` is set.
|
|
9
|
-
Interaction: a pointer moving over the plot picks the CATEGORY under it — a band paints behind every series and `tooltip="axis"`, the default here, names every series at that category. Tabbing reaches ONE marker per series; arrows walk that series' readings, and a focused marker's tooltip names its own series alone. A tap picks a category and latches the panel until the next tap outside; markers carry a transparent hit stroke of 24px, or 44px under `(pointer: coarse)`.
|
|
9
|
+
Interaction: a pointer moving over the plot picks the CATEGORY under it — a band paints behind every series and `tooltip="axis"`, the default here, names every series at that category. Tabbing reaches ONE marker per series; arrows walk that series' readings, and a focused marker's tooltip names its own series alone. A tap picks a category and latches the panel until the next tap outside; markers carry a transparent hit stroke of 24px, or 44px under `(pointer: coarse)`. `dimOthers` is the same separate opt-in as on the other four, and here it is the legend hover that drives it.
|
|
10
10
|
Legend: drawn whenever there is more than one series. `legendFilters` turns each entry into a checkbox that hides its series, `hiddenSeries` is two-way so a page can drive it from a URL parameter, and hovering an entry dims the others and thickens the one hovered. **The axis does not move when a series is hidden** unless `rescaleOnHide` says so — a silent rescale turns a period-over-period comparison into a different claim. Hiding every series replaces the plot with `noVisibleSeriesText` on a `role="status"` line, legend still rendered.
|
|
11
11
|
Second channel: `patterns` gives every series a dash of its own, in palette-slot order, with slot 1 left solid. Off by default — the shipped palette clears the colour-blind separation threshold on its own, so this is for monochrome print, a retuned palette, or a reader who asks for it.
|
|
12
12
|
Series: `LineChartSeries = { id: string; label: string; data: readonly (number | null)[]; axis?: 'primary' | 'secondary'; area?: boolean; slot?: number }`. A `null` is a missing reading and `gaps` decides what it draws — `'break'` leaves a hole in the line, `'zero'` plants a point on the baseline. `area` fills the band between the line and its axis baseline. `slot` pins a palette slot, so hiding one series leaves every other series' colour alone.
|
|
@@ -38,11 +38,11 @@ class AccordionItemComponent {
|
|
|
38
38
|
this.expanded.set(false);
|
|
39
39
|
}
|
|
40
40
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AccordionItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
41
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: AccordionItemComponent, isStandalone: true, selector: "ds-accordion-item", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"head\"\n [id]=\"headId\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"bodyId\"\n [disabled]=\"disabled() || null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"toggle()\">\n <span>\n {{ title() }}\n </span>\n\n <ng-content select=\"[badge]\"></ng-content>\n\n <ds-icon\n name=\"chevronRight\"\n class=\"chev\"\n [size]=\"16\" />\n</button>\n\n<div\n class=\"body\"\n role=\"region\"\n [id]=\"bodyId\"\n [attr.aria-labelledby]=\"headId\"\n [class.is-open]=\"expanded()\"\n [attr.inert]=\"expanded() ? null : ''\">\n <div class=\"body-inner\">\n <div class=\"body-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_accordion-header-bg-color: var(--ds-accordion-header-bg-color, var(--surface-default));--_accordion-header-text-color: var(--ds-accordion-header-text-color, var(--text-primary));--_accordion-header-hover-bg-color: var(--ds-accordion-header-hover-bg-color, var(--surface-secondary));--_accordion-divider-color: var(--ds-accordion-divider-color, var(--border-divider));--_accordion-chevron-color: var(--ds-accordion-chevron-color, var(--icon-default));--_accordion-body-text-color: var(--ds-accordion-body-text-color, var(--text-secondary));display:block}:host+:host{border-top:var(--border-width-default) solid var(--_accordion-divider-color)}:host:first-of-type .head{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}:host:last-of-type .head{border-bottom-left-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}:host .head{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-3) var(--space-4);border:0;background:var(--_accordion-header-bg-color);text-align:left;cursor:pointer;font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_accordion-header-text-color)}:host .head:hover:not(:disabled){background:var(--_accordion-header-hover-bg-color)}:host .head:active:not(:disabled){background:var(--surface-muted)}:host .head:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(-1 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}:host .head .chev{margin-left:auto;transition:transform var(--duration-base) var(--ease-standard);color:var(--_accordion-chevron-color)}:host .head[aria-expanded=true] .chev{transform:rotate(90deg)}:host .head:disabled{cursor:not-allowed;color:var(--text-disabled)}:host .head:disabled .chev{color:var(--text-disabled)}:host .body{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-base) var(--ease-standard)}:host .body.is-open{grid-template-rows:1fr}@media(prefers-reduced-motion:reduce){:host .body{transition:none}}:host .body-inner{overflow:hidden;min-height:0}:host .body-content{padding:var(--space-2) var(--space-4) var(--space-4);color:var(--_accordion-body-text-color);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
41
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.22", type: AccordionItemComponent, isStandalone: true, selector: "ds-accordion-item", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { properties: { "attr.title": "null" } }, ngImport: i0, template: "<button\n type=\"button\"\n class=\"head\"\n [id]=\"headId\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"bodyId\"\n [disabled]=\"disabled() || null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"toggle()\">\n <span>\n {{ title() }}\n </span>\n\n <ng-content select=\"[badge]\"></ng-content>\n\n <ds-icon\n name=\"chevronRight\"\n class=\"chev\"\n [size]=\"16\" />\n</button>\n\n<div\n class=\"body\"\n role=\"region\"\n [id]=\"bodyId\"\n [attr.aria-labelledby]=\"headId\"\n [class.is-open]=\"expanded()\"\n [attr.inert]=\"expanded() ? null : ''\">\n <div class=\"body-inner\">\n <div class=\"body-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_accordion-header-bg-color: var(--ds-accordion-header-bg-color, var(--surface-default));--_accordion-header-text-color: var(--ds-accordion-header-text-color, var(--text-primary));--_accordion-header-hover-bg-color: var(--ds-accordion-header-hover-bg-color, var(--surface-secondary));--_accordion-divider-color: var(--ds-accordion-divider-color, var(--border-divider));--_accordion-chevron-color: var(--ds-accordion-chevron-color, var(--icon-default));--_accordion-body-text-color: var(--ds-accordion-body-text-color, var(--text-secondary));display:block}:host+:host{border-top:var(--border-width-default) solid var(--_accordion-divider-color)}:host:first-of-type .head{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}:host:last-of-type .head{border-bottom-left-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}:host .head{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-3) var(--space-4);border:0;background:var(--_accordion-header-bg-color);text-align:left;cursor:pointer;font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_accordion-header-text-color)}:host .head:hover:not(:disabled){background:var(--_accordion-header-hover-bg-color)}:host .head:active:not(:disabled){background:var(--surface-muted)}:host .head:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(-1 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}:host .head .chev{margin-left:auto;transition:transform var(--duration-base) var(--ease-standard);color:var(--_accordion-chevron-color)}:host .head[aria-expanded=true] .chev{transform:rotate(90deg)}:host .head:disabled{cursor:not-allowed;color:var(--text-disabled)}:host .head:disabled .chev{color:var(--text-disabled)}:host .body{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-base) var(--ease-standard)}:host .body.is-open{grid-template-rows:1fr}@media(prefers-reduced-motion:reduce){:host .body{transition:none}}:host .body-inner{overflow:hidden;min-height:0}:host .body-content{padding:var(--space-2) var(--space-4) var(--space-4);color:var(--_accordion-body-text-color);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans)}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ds-icon", inputs: ["name", "size", "stroke", "ariaLabel"] }] });
|
|
42
42
|
}
|
|
43
43
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: AccordionItemComponent, decorators: [{
|
|
44
44
|
type: Component,
|
|
45
|
-
args: [{ selector: 'ds-accordion-item', standalone: true, imports: [IconComponent], encapsulation: ViewEncapsulation.Emulated, template: "<button\n type=\"button\"\n class=\"head\"\n [id]=\"headId\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"bodyId\"\n [disabled]=\"disabled() || null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"toggle()\">\n <span>\n {{ title() }}\n </span>\n\n <ng-content select=\"[badge]\"></ng-content>\n\n <ds-icon\n name=\"chevronRight\"\n class=\"chev\"\n [size]=\"16\" />\n</button>\n\n<div\n class=\"body\"\n role=\"region\"\n [id]=\"bodyId\"\n [attr.aria-labelledby]=\"headId\"\n [class.is-open]=\"expanded()\"\n [attr.inert]=\"expanded() ? null : ''\">\n <div class=\"body-inner\">\n <div class=\"body-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_accordion-header-bg-color: var(--ds-accordion-header-bg-color, var(--surface-default));--_accordion-header-text-color: var(--ds-accordion-header-text-color, var(--text-primary));--_accordion-header-hover-bg-color: var(--ds-accordion-header-hover-bg-color, var(--surface-secondary));--_accordion-divider-color: var(--ds-accordion-divider-color, var(--border-divider));--_accordion-chevron-color: var(--ds-accordion-chevron-color, var(--icon-default));--_accordion-body-text-color: var(--ds-accordion-body-text-color, var(--text-secondary));display:block}:host+:host{border-top:var(--border-width-default) solid var(--_accordion-divider-color)}:host:first-of-type .head{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}:host:last-of-type .head{border-bottom-left-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}:host .head{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-3) var(--space-4);border:0;background:var(--_accordion-header-bg-color);text-align:left;cursor:pointer;font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_accordion-header-text-color)}:host .head:hover:not(:disabled){background:var(--_accordion-header-hover-bg-color)}:host .head:active:not(:disabled){background:var(--surface-muted)}:host .head:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(-1 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}:host .head .chev{margin-left:auto;transition:transform var(--duration-base) var(--ease-standard);color:var(--_accordion-chevron-color)}:host .head[aria-expanded=true] .chev{transform:rotate(90deg)}:host .head:disabled{cursor:not-allowed;color:var(--text-disabled)}:host .head:disabled .chev{color:var(--text-disabled)}:host .body{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-base) var(--ease-standard)}:host .body.is-open{grid-template-rows:1fr}@media(prefers-reduced-motion:reduce){:host .body{transition:none}}:host .body-inner{overflow:hidden;min-height:0}:host .body-content{padding:var(--space-2) var(--space-4) var(--space-4);color:var(--_accordion-body-text-color);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans)}\n"] }]
|
|
45
|
+
args: [{ selector: 'ds-accordion-item', standalone: true, imports: [IconComponent], host: { '[attr.title]': 'null' }, encapsulation: ViewEncapsulation.Emulated, template: "<button\n type=\"button\"\n class=\"head\"\n [id]=\"headId\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"bodyId\"\n [disabled]=\"disabled() || null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"toggle()\">\n <span>\n {{ title() }}\n </span>\n\n <ng-content select=\"[badge]\"></ng-content>\n\n <ds-icon\n name=\"chevronRight\"\n class=\"chev\"\n [size]=\"16\" />\n</button>\n\n<div\n class=\"body\"\n role=\"region\"\n [id]=\"bodyId\"\n [attr.aria-labelledby]=\"headId\"\n [class.is-open]=\"expanded()\"\n [attr.inert]=\"expanded() ? null : ''\">\n <div class=\"body-inner\">\n <div class=\"body-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";:where(:focus-visible){outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:var(--focus-ring-offset);animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}@keyframes ds-focus-ring-in{0%{outline-color:transparent}}:root[data-focus=ring]{--ds-field-focus-shadow: var(--focus-ring);--ds-field-focus-shadow-error: var(--focus-ring-error)}:root[data-focus=edge]{--focus-ring-offset: 0px;--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error)}[data-focus=inset]{--focus-ring-offset: calc(-1 * var(--focus-ring-width));--ds-field-focus-shadow: var(--focus-ring-inset);--ds-field-focus-shadow-error: var(--focus-ring-inset-error)}@media(forced-colors:active){:where(:focus-visible){outline:var(--focus-ring-width) solid CanvasText;outline-offset:var(--focus-ring-offset)}}:host{--_accordion-header-bg-color: var(--ds-accordion-header-bg-color, var(--surface-default));--_accordion-header-text-color: var(--ds-accordion-header-text-color, var(--text-primary));--_accordion-header-hover-bg-color: var(--ds-accordion-header-hover-bg-color, var(--surface-secondary));--_accordion-divider-color: var(--ds-accordion-divider-color, var(--border-divider));--_accordion-chevron-color: var(--ds-accordion-chevron-color, var(--icon-default));--_accordion-body-text-color: var(--ds-accordion-body-text-color, var(--text-secondary));display:block}:host+:host{border-top:var(--border-width-default) solid var(--_accordion-divider-color)}:host:first-of-type .head{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}:host:last-of-type .head{border-bottom-left-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}:host .head{display:flex;align-items:center;gap:var(--space-2);width:100%;padding:var(--space-3) var(--space-4);border:0;background:var(--_accordion-header-bg-color);text-align:left;cursor:pointer;font:var(--font-weight-medium) var(--font-size-s)/var(--line-height-flat) var(--font-sans);color:var(--_accordion-header-text-color)}:host .head:hover:not(:disabled){background:var(--_accordion-header-hover-bg-color)}:host .head:active:not(:disabled){background:var(--surface-muted)}:host .head:focus-visible{outline:var(--focus-ring-width) solid var(--focus-ring-color);outline-offset:calc(-1 * var(--focus-ring-width));animation:ds-focus-ring-in var(--duration-fast) var(--ease-standard)}:host .head .chev{margin-left:auto;transition:transform var(--duration-base) var(--ease-standard);color:var(--_accordion-chevron-color)}:host .head[aria-expanded=true] .chev{transform:rotate(90deg)}:host .head:disabled{cursor:not-allowed;color:var(--text-disabled)}:host .head:disabled .chev{color:var(--text-disabled)}:host .body{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--duration-base) var(--ease-standard)}:host .body.is-open{grid-template-rows:1fr}@media(prefers-reduced-motion:reduce){:host .body{transition:none}}:host .body-inner{overflow:hidden;min-height:0}:host .body-content{padding:var(--space-2) var(--space-4) var(--space-4);color:var(--_accordion-body-text-color);font:var(--font-weight-regular) var(--font-size-s)/var(--line-height-base) var(--font-sans)}\n"] }]
|
|
46
46
|
}], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: true }] }], expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: false }] }, { type: i0.Output, args: ["expandedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
47
47
|
|
|
48
48
|
class AccordionComponent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids-group-ltd-ids-design-system-components-accordion.mjs","sources":["../../../src/lib/components/accordion/accordion.token.ts","../../../src/lib/components/accordion/accordion-item.component.ts","../../../src/lib/components/accordion/accordion-item.component.html","../../../src/lib/components/accordion/accordion.component.ts","../../../src/lib/components/accordion/ids-group-ltd-ids-design-system-components-accordion.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/** Contract that ds-accordion-item reads from its parent ds-accordion. */\nexport interface AccordionContract {\n readonly multi: () => boolean;\n /** Called when an item opens; coordinator may close other items. */\n notifyOpen(item: AccordionItemRef): void;\n}\n\n/** Contract ds-accordion reads back from each projected item. */\nexport interface AccordionItemRef {\n /** Closes this item (sets expanded to false). */\n closeItem(): void;\n}\n\nexport const ACCORDION = new InjectionToken<AccordionContract>('ACCORDION');\n","import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n effect,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { ACCORDION, type AccordionItemRef } from './accordion.token';\n\nlet nextId = 0;\n\n@Component({\n selector: 'ds-accordion-item',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './accordion-item.component.html',\n styleUrl: './accordion-item.component.scss',\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class AccordionItemComponent implements AccordionItemRef {\n /** Header text shown in the toggle button. */\n readonly title = input.required<string>();\n /** Open state, two-way bound. */\n readonly expanded = model<boolean>(false);\n /** Disables the toggle button; state stays as-is. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n protected readonly uid = `ds-accordion-${++nextId}`;\n protected readonly headId = `${this.uid}-head`;\n protected readonly bodyId = `${this.uid}-body`;\n\n private readonly accordion = inject(ACCORDION, { optional: true });\n\n /** Tracks last expanded state so we only notify on a true open transition. */\n private previousExpanded = false;\n\n constructor() {\n effect(() => {\n const isExpanded = this.expanded();\n if (isExpanded && !this.previousExpanded) {\n this.accordion?.notifyOpen(this);\n }\n this.previousExpanded = isExpanded;\n });\n }\n\n protected toggle(): void {\n if (this.disabled()) {\n return;\n }\n this.expanded.set(!this.expanded());\n }\n\n /** Called by the accordion coordinator to enforce single-open mode. */\n closeItem(): void {\n this.expanded.set(false);\n }\n}\n","<button\n type=\"button\"\n class=\"head\"\n [id]=\"headId\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"bodyId\"\n [disabled]=\"disabled() || null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"toggle()\">\n <span>\n {{ title() }}\n </span>\n\n <ng-content select=\"[badge]\"></ng-content>\n\n <ds-icon\n name=\"chevronRight\"\n class=\"chev\"\n [size]=\"16\" />\n</button>\n\n<div\n class=\"body\"\n role=\"region\"\n [id]=\"bodyId\"\n [attr.aria-labelledby]=\"headId\"\n [class.is-open]=\"expanded()\"\n [attr.inert]=\"expanded() ? null : ''\">\n <div class=\"body-inner\">\n <div class=\"body-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n","import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n contentChildren,\n forwardRef,\n input,\n} from '@angular/core';\nimport {\n ACCORDION,\n type AccordionContract,\n type AccordionItemRef,\n} from './accordion.token';\nimport { AccordionItemComponent } from './accordion-item.component';\n\n@Component({\n selector: 'ds-accordion',\n standalone: true,\n imports: [],\n template: `<ng-content></ng-content>`,\n styles: [\n `\n :host {\n display: block;\n border: var(--border-width-default) solid var(--border-divider);\n border-radius: var(--radius-lg);\n overflow: hidden;\n }\n `,\n ],\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: ACCORDION,\n useExisting: forwardRef(() => AccordionComponent),\n },\n ],\n})\nexport class AccordionComponent implements AccordionContract {\n /** When false, opening one item automatically closes all others. */\n readonly multi = input(true, { transform: booleanAttribute });\n\n private readonly items = contentChildren(AccordionItemComponent);\n\n notifyOpen(opened: AccordionItemRef): void {\n if (this.multi()) {\n return;\n }\n for (const item of this.items() as unknown as AccordionItemRef[]) {\n if (item !== opened) {\n item.closeItem();\n }\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAea,SAAS,GAAG,IAAI,cAAc,CAAoB,WAAW;;ACH1E,IAAI,MAAM,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"ids-group-ltd-ids-design-system-components-accordion.mjs","sources":["../../../src/lib/components/accordion/accordion.token.ts","../../../src/lib/components/accordion/accordion-item.component.ts","../../../src/lib/components/accordion/accordion-item.component.html","../../../src/lib/components/accordion/accordion.component.ts","../../../src/lib/components/accordion/ids-group-ltd-ids-design-system-components-accordion.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/** Contract that ds-accordion-item reads from its parent ds-accordion. */\nexport interface AccordionContract {\n readonly multi: () => boolean;\n /** Called when an item opens; coordinator may close other items. */\n notifyOpen(item: AccordionItemRef): void;\n}\n\n/** Contract ds-accordion reads back from each projected item. */\nexport interface AccordionItemRef {\n /** Closes this item (sets expanded to false). */\n closeItem(): void;\n}\n\nexport const ACCORDION = new InjectionToken<AccordionContract>('ACCORDION');\n","import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n effect,\n inject,\n input,\n model,\n} from '@angular/core';\nimport { IconComponent } from '@ids-group-ltd/ids-design-system/icons';\nimport { ACCORDION, type AccordionItemRef } from './accordion.token';\n\nlet nextId = 0;\n\n@Component({\n selector: 'ds-accordion-item',\n standalone: true,\n imports: [IconComponent],\n templateUrl: './accordion-item.component.html',\n styleUrl: './accordion-item.component.scss',\n // A static `title=\"…\"` feeding the input below ALSO stays in the DOM as the global attribute,\n // which makes the host a native browser tooltip over everything inside it.\n host: { '[attr.title]': 'null' },\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class AccordionItemComponent implements AccordionItemRef {\n /** Header text shown in the toggle button. */\n readonly title = input.required<string>();\n /** Open state, two-way bound. */\n readonly expanded = model<boolean>(false);\n /** Disables the toggle button; state stays as-is. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n protected readonly uid = `ds-accordion-${++nextId}`;\n protected readonly headId = `${this.uid}-head`;\n protected readonly bodyId = `${this.uid}-body`;\n\n private readonly accordion = inject(ACCORDION, { optional: true });\n\n /** Tracks last expanded state so we only notify on a true open transition. */\n private previousExpanded = false;\n\n constructor() {\n effect(() => {\n const isExpanded = this.expanded();\n if (isExpanded && !this.previousExpanded) {\n this.accordion?.notifyOpen(this);\n }\n this.previousExpanded = isExpanded;\n });\n }\n\n protected toggle(): void {\n if (this.disabled()) {\n return;\n }\n this.expanded.set(!this.expanded());\n }\n\n /** Called by the accordion coordinator to enforce single-open mode. */\n closeItem(): void {\n this.expanded.set(false);\n }\n}\n","<button\n type=\"button\"\n class=\"head\"\n [id]=\"headId\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"bodyId\"\n [disabled]=\"disabled() || null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"toggle()\">\n <span>\n {{ title() }}\n </span>\n\n <ng-content select=\"[badge]\"></ng-content>\n\n <ds-icon\n name=\"chevronRight\"\n class=\"chev\"\n [size]=\"16\" />\n</button>\n\n<div\n class=\"body\"\n role=\"region\"\n [id]=\"bodyId\"\n [attr.aria-labelledby]=\"headId\"\n [class.is-open]=\"expanded()\"\n [attr.inert]=\"expanded() ? null : ''\">\n <div class=\"body-inner\">\n <div class=\"body-content\">\n <ng-content></ng-content>\n </div>\n </div>\n</div>\n","import {\n Component,\n ViewEncapsulation,\n booleanAttribute,\n contentChildren,\n forwardRef,\n input,\n} from '@angular/core';\nimport {\n ACCORDION,\n type AccordionContract,\n type AccordionItemRef,\n} from './accordion.token';\nimport { AccordionItemComponent } from './accordion-item.component';\n\n@Component({\n selector: 'ds-accordion',\n standalone: true,\n imports: [],\n template: `<ng-content></ng-content>`,\n styles: [\n `\n :host {\n display: block;\n border: var(--border-width-default) solid var(--border-divider);\n border-radius: var(--radius-lg);\n overflow: hidden;\n }\n `,\n ],\n encapsulation: ViewEncapsulation.Emulated,\n providers: [\n {\n provide: ACCORDION,\n useExisting: forwardRef(() => AccordionComponent),\n },\n ],\n})\nexport class AccordionComponent implements AccordionContract {\n /** When false, opening one item automatically closes all others. */\n readonly multi = input(true, { transform: booleanAttribute });\n\n private readonly items = contentChildren(AccordionItemComponent);\n\n notifyOpen(opened: AccordionItemRef): void {\n if (this.multi()) {\n return;\n }\n for (const item of this.items() as unknown as AccordionItemRef[]) {\n if (item !== opened) {\n item.closeItem();\n }\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAea,SAAS,GAAG,IAAI,cAAc,CAAoB,WAAW;;ACH1E,IAAI,MAAM,GAAG,CAAC;MAaD,sBAAsB,CAAA;;AAExB,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;;AAEhC,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;;IAEhC,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE9C,IAAA,GAAG,GAAG,CAAA,aAAA,EAAgB,EAAE,MAAM,EAAE;AAChC,IAAA,MAAM,GAAG,CAAA,EAAG,IAAI,CAAC,GAAG,OAAO;AAC3B,IAAA,MAAM,GAAG,CAAA,EAAG,IAAI,CAAC,GAAG,OAAO;IAE7B,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;IAG1D,gBAAgB,GAAG,KAAK;AAEhC,IAAA,WAAA,GAAA;QACE,MAAM,CAAC,MAAK;AACV,YAAA,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,EAAE;AAClC,YAAA,IAAI,UAAU,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;AACxC,gBAAA,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC;YAClC;AACA,YAAA,IAAI,CAAC,gBAAgB,GAAG,UAAU;AACpC,QAAA,CAAC,CAAC;IACJ;IAEU,MAAM,GAAA;AACd,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YACnB;QACF;QACA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;IACrC;;IAGA,SAAS,GAAA;AACP,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;IAC1B;wGArCW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,gBAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECzBnC,4uBAkCA,EAAA,MAAA,EAAA,CAAA,itGAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDjBY,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAQZ,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAXlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,EAAA,UAAA,EACjB,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,CAAC,EAAA,IAAA,EAKlB,EAAE,cAAc,EAAE,MAAM,EAAE,EAAA,aAAA,EACjB,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,4uBAAA,EAAA,MAAA,EAAA,CAAA,itGAAA,CAAA,EAAA;;;MEe9B,kBAAkB,CAAA;;IAEpB,KAAK,GAAG,KAAK,CAAC,IAAI,6EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAE5C,IAAA,KAAK,GAAG,eAAe,CAAC,sBAAsB,4EAAC;AAEhE,IAAA,UAAU,CAAC,MAAwB,EAAA;AACjC,QAAA,IAAI,IAAI,CAAC,KAAK,EAAE,EAAE;YAChB;QACF;QACA,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAmC,EAAE;AAChE,YAAA,IAAI,IAAI,KAAK,MAAM,EAAE;gBACnB,IAAI,CAAC,SAAS,EAAE;YAClB;QACF;IACF;wGAfW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EAPlB;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,kBAAkB,CAAC;AAClD,aAAA;SACF,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,OAAA,EAAA,SAAA,EAMwC,sBAAsB,6CAvBrD,CAAA,yBAAA,CAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,sIAAA,CAAA,EAAA,CAAA;;4FAmB1B,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAvB9B,SAAS;+BACE,cAAc,EAAA,UAAA,EACZ,IAAI,EAAA,OAAA,EACP,EAAE,EAAA,QAAA,EACD,2BAA2B,EAAA,aAAA,EAWtB,iBAAiB,CAAC,QAAQ,EAAA,SAAA,EAC9B;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,SAAS;AAClB,4BAAA,WAAW,EAAE,UAAU,CAAC,wBAAwB,CAAC;AAClD,yBAAA;AACF,qBAAA,EAAA,MAAA,EAAA,CAAA,sIAAA,CAAA,EAAA;uLAMwC,sBAAsB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC1CjE;;AAEG;;;;"}
|