@design.estate/dees-catalog 21.26.1 → 21.28.0

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.
@@ -18,6 +18,11 @@ export const chartFrameStyles = css `
18
18
  dees-tile::part(outer) { border-color: var(--dees-color-border-subtle); }
19
19
  .chartHeader { ${tileHeaderBar} }
20
20
  .chartLabel { flex: 1; min-width: 0; margin: 0; font: inherit; overflow-wrap: anywhere; }
21
+ /* The meta text at the end of the header's line, muted as a table's subtitle; where the tile is
22
+ too narrow for both it wraps under the title, at its start, and the bar grows by that line. */
23
+ .chartHeader.hasMeta { flex-wrap: wrap; gap: var(--dees-spacing-2xs) var(--dees-spacing-md); }
24
+ .chartHeader.hasMeta .chartLabel { flex: 1 1 auto; }
25
+ .chartMeta { min-width: 0; color: var(--dees-color-text-muted); font-weight: 400; overflow-wrap: anywhere; }
21
26
  .chartLegend { ${tileFooterBar} }
22
27
  .chartContainer { position: absolute; inset: 0; }
23
28
  .chartState { position: absolute; inset: 0; display: grid; place-content: center; padding: 24px; text-align: center; color: var(--dees-color-text-muted); background: var(--dees-color-bg-primary); }
@@ -28,15 +33,23 @@ export const chartFrameStyles = css `
28
33
  @media (pointer: coarse) { .expandBtn { width: var(--dees-control-height-touch); height: var(--dees-control-height-touch); } }
29
34
  `;
30
35
  /**
31
- * The element ECharts draws into fills the frame, whatever position ECharts writes on it. ECharts
32
- * insets its plot by 16px itself; under a region inset the frame adds the rest, so axes and
33
- * labels line up with the header.
36
+ * The tile's content is a column: the host's rows above, the plot, the host's rows below. The rows
37
+ * keep their height and sit at the tile's inset, the header's; the plot takes the rest of the
38
+ * host's height, or, while the host's height is `auto`, `--dees-chart-plot-height`.
39
+ *
40
+ * The element ECharts draws into fills the plot's frame, whatever position ECharts writes on it.
41
+ * ECharts insets its plot by 16px itself; under a region inset the frame adds the rest, so axes
42
+ * and labels line up with the header.
34
43
  */
35
44
  const echartsPlotStyles = css `
45
+ dees-tile::part(content) { display: flex; flex-direction: column; }
46
+ .chartArea { position: relative; flex: 1 1 var(--dees-chart-plot-height, 320px); min-height: 0; }
47
+ .chartRows { flex: none; display: flex; flex-direction: column; gap: var(--dees-spacing-md); padding: var(--dees-spacing-md) var(--chart-inset-inline, var(--dees-spacing-lg)); }
48
+ .chartRows.empty { display: none; }
36
49
  .chartContainer { inset-inline: calc(var(--chart-inset-inline, 16px) - 16px); }
37
50
  .chartPlot { width: 100%; height: 100%; }
38
51
  `;
39
52
  export const echartsBaseStyles = [
40
53
  themeDefaultStyles, cssManager.defaultStyles, chartInsetStyles, chartFrameStyles, echartsPlotStyles,
41
54
  ];
42
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVlcy1jaGFydC1lY2hhcnRzLXN0eWxlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3RzX3dlYi9lbGVtZW50cy8wMGdyb3VwLWNoYXJ0L2RlZXMtY2hhcnQtZWNoYXJ0cy1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEdBQUcsRUFBRSxVQUFVLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUM5RCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDdEUsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ3hELE9BQU8sRUFBRSxhQUFhLEVBQUUsYUFBYSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFL0Q7OztHQUdHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sZ0JBQWdCLEdBQUcsaUJBQWlCLENBQUMsc0JBQXNCLENBQUMsQ0FBQztBQUUxRSwyRkFBMkY7QUFDM0YsTUFBTSxDQUFDLE1BQU0sZ0JBQWdCLEdBQUcsR0FBRyxDQUFBOzs7Ozs7OzttQkFRaEIsYUFBYTs7bUJBRWIsYUFBYTs7O29CQUdaLGNBQWM7Ozs7O0NBS2pDLENBQUM7QUFDRjs7OztHQUlHO0FBQ0gsTUFBTSxpQkFBaUIsR0FBRyxHQUFHLENBQUE7OztDQUc1QixDQUFDO0FBQ0YsTUFBTSxDQUFDLE1BQU0saUJBQWlCLEdBQUc7SUFDL0Isa0JBQWtCLEVBQUUsVUFBVSxDQUFDLGFBQWEsRUFBRSxnQkFBZ0IsRUFBRSxnQkFBZ0IsRUFBRSxpQkFBaUI7Q0FDcEcsQ0FBQyJ9
55
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVlcy1jaGFydC1lY2hhcnRzLXN0eWxlcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3RzX3dlYi9lbGVtZW50cy8wMGdyb3VwLWNoYXJ0L2RlZXMtY2hhcnQtZWNoYXJ0cy1zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEdBQUcsRUFBRSxVQUFVLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUM5RCxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDdEUsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ3hELE9BQU8sRUFBRSxhQUFhLEVBQUUsYUFBYSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFL0Q7OztHQUdHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sZ0JBQWdCLEdBQUcsaUJBQWlCLENBQUMsc0JBQXNCLENBQUMsQ0FBQztBQUUxRSwyRkFBMkY7QUFDM0YsTUFBTSxDQUFDLE1BQU0sZ0JBQWdCLEdBQUcsR0FBRyxDQUFBOzs7Ozs7OzttQkFRaEIsYUFBYTs7Ozs7OzttQkFPYixhQUFhOzs7b0JBR1osY0FBYzs7Ozs7Q0FLakMsQ0FBQztBQUNGOzs7Ozs7OztHQVFHO0FBQ0gsTUFBTSxpQkFBaUIsR0FBRyxHQUFHLENBQUE7Ozs7Ozs7Q0FPNUIsQ0FBQztBQUNGLE1BQU0sQ0FBQyxNQUFNLGlCQUFpQixHQUFHO0lBQy9CLGtCQUFrQixFQUFFLFVBQVUsQ0FBQyxhQUFhLEVBQUUsZ0JBQWdCLEVBQUUsZ0JBQWdCLEVBQUUsaUJBQWlCO0NBQ3BHLENBQUMifQ==
@@ -59,6 +59,7 @@ export interface IBottomBarAction {
59
59
  onClick: () => void | Promise<void>;
60
60
  /** Whether action is disabled */
61
61
  disabled?: boolean;
62
+ loading?: boolean;
62
63
  /** Position: 'left' or 'right' (default) */
63
64
  position?: 'left' | 'right';
64
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@design.estate/dees-catalog",
3
- "version": "21.26.1",
3
+ "version": "21.28.0",
4
4
  "private": false,
5
5
  "description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
6
6
  "main": "dist_ts_web/index.js",
@@ -59,6 +59,7 @@
59
59
  "@design.estate/wcctools": "^7.1.1",
60
60
  "@git.zone/tsbuild": "^6.0.2",
61
61
  "@git.zone/tsbundle": "^3.2.1",
62
+ "@git.zone/tsrun": "^3.0.3",
62
63
  "@git.zone/tstest": "^7.2.0",
63
64
  "@git.zone/tswatch": "^7.1.1",
64
65
  "@push.rocks/projectinfo": "^5.1.0",
package/readme.md CHANGED
@@ -3040,9 +3040,27 @@ appui.bottomBar.removeAction('refresh');
3040
3040
  appui.setBottomBarVisible(false);
3041
3041
  ```
3042
3042
 
3043
+ Bottom bar actions accept `loading: true`: their existing icon spins, the native
3044
+ button is disabled, and `aria-busy` announces that work is in progress. Loading
3045
+ blocks clicks even when `disabled` is omitted. With `loading: false`, the explicit
3046
+ `disabled` flag still applies. The caller owns the loading state; returning a
3047
+ promise from `onClick` does not set it automatically. To change an action, call
3048
+ `bottomBar.addAction()` again with the same `id` and the updated descriptor.
3049
+
3050
+ ```typescript
3051
+ appui.bottomBar.addAction({
3052
+ id: 'resync',
3053
+ iconName: 'lucide:refresh-cw',
3054
+ tooltip: 'Resyncing…',
3055
+ loading: true,
3056
+ onClick: resync,
3057
+ });
3058
+ ```
3059
+
3043
3060
  **Key Features:**
3044
3061
  - Configurable status widgets with icons, labels, and colored status indicators
3045
3062
  - Loading spinner state for widgets
3063
+ - Loading actions spin their icon, disable activation and expose their busy state
3046
3064
  - Contextual actions with icon buttons
3047
3065
  - Left/right positioning for both widgets and actions
3048
3066
  - Tooltips on hover
@@ -3823,6 +3841,29 @@ with their container and recreate their engines when reattached. Assign a bounde
3823
3841
  height when embedding in a dashboard. Every chart, `dees-chart-log` included, accepts
3824
3842
  [`frameless`](#frameless-components) when the dashboard cell or panel owns the frame.
3825
3843
 
3844
+ An ECharts chart (`dees-chart-line`, `-bar`, `-donut`, `-gauge`, `-radar`) also carries what a
3845
+ host would otherwise wrap it in a tile for. `meta` is a short text at the end of the header bar,
3846
+ beside the `label`: what the figures cover, or the terms they are stated in. It is muted, as a
3847
+ table's `heading2`, in the header's size, and where the bar is too narrow for both it wraps under
3848
+ the title at its start and the bar grows. The host's own rows go into the tile around the plot:
3849
+ an element with `slot="above"` sits between the header and the plot, one with `slot="below"`
3850
+ between the plot and the legend, both at the header's inset, framed or frameless. The legend
3851
+ stays the tile's last row, at its full width. The host's height holds the whole tile (400px by
3852
+ default) and the plot takes what the header, the rows and the legend leave; a chart whose rows
3853
+ vary takes `height: auto`, and its plot is then `--dees-chart-plot-height` tall (320px by
3854
+ default; a donut keeps its own plot height). `dees-chart-area` and `dees-chart-log` have frames
3855
+ of their own and take neither.
3856
+
3857
+ ```typescript
3858
+ html`<dees-chart-line label="Bank balances" meta="as each bank statement states them"
3859
+ style="height: auto; --dees-chart-plot-height: 240px"
3860
+ .series=${balances}
3861
+ >
3862
+ <dees-hint slot="above" type="warning" text="Two statements for 30 September state different balances."></dees-hint>
3863
+ <ul slot="below"><li>Savings: 6,000.00 € on 31 July, its latest statement</li></ul>
3864
+ </dees-chart-line>`;
3865
+ ```
3866
+
3826
3867
  A series or a slice says what it stands for with `tone` — `'neutral'`, `'accent'`,
3827
3868
  `'success'`, `'warning'` or `'danger'` — and is drawn in the theme's colour for it, in the
3828
3869
  bright and the dark theme alike, so a host never passes a hex for "paid" or "overdue". An
@@ -5871,6 +5912,7 @@ interface IBottomBarAction {
5871
5912
  tooltip?: string;
5872
5913
  onClick: () => void | Promise<void>;
5873
5914
  disabled?: boolean;
5915
+ loading?: boolean;
5874
5916
  position?: 'left' | 'right';
5875
5917
  }
5876
5918
 
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@design.estate/dees-catalog',
6
- version: '21.26.1',
6
+ version: '21.28.0',
7
7
  description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
8
8
  }
@@ -5,6 +5,7 @@ import { operationsDemoStyles } from './operations.js';
5
5
  import { themeDefaultStyles } from '../elements/00theme.js';
6
6
  import { getChartPalette } from '../elements/00group-chart/dees-chart-echarts-theme.js';
7
7
  import '../elements/00group-button/dees-button/dees-button.js';
8
+ import '../elements/00group-feedback/dees-hint/dees-hint.js';
8
9
 
9
10
  export const chartSamples = (step = 0, sampledAt = Date.now()) => {
10
11
  const offset = [0, 8, -4, 12][step % 4];
@@ -74,10 +75,10 @@ type TChartDemo = 'area' | 'bar' | 'donut' | 'gauge' | 'line' | 'radar';
74
75
  const languages = [{ key: 'en', label: 'English' }, { key: 'de', label: 'Deutsch' }];
75
76
  const descriptions = {
76
77
  area: ['Activity over time', 'Follow a service through the latest sample. Drag across the plot to inspect a time range. Below, the host states throughput unrounded: hovering shows each value in full, while the axis keeps the width of its own labels.'],
77
- bar: ['Compare traffic', 'Compare requests and cache hits across the week. Switch orientation or stack related series. Below, each month has two columns that reach both ways from zero: money in above, money out below, and the operating column marks its surplus or deficit at its end.'],
78
+ bar: ['Compare traffic', 'Compare requests and cache hits across the week. Switch orientation or stack related series. Below, each month has two columns that reach both ways from zero: money in above, money out below, and the operating column marks its surplus or deficit at its end. Its header states what the chart covers beside the title, and a line of the host\'s own under the plot, at the header\'s inset, names what the chart leaves out: the legend stays the tile\'s last row.'],
78
79
  donut: ['Traffic distribution', 'Understand the share of requests from each region. Labels and legends remain optional. Below, three months of spending: each donut keeps one size whatever its legend holds, and the host\'s own list draws its dots in the charts\' palette.'],
79
80
  gauge: ['Capacity', 'See used capacity against a defined range and warning thresholds.'],
80
- line: ['Stated balances', 'Balances where the statements state them, on an axis proportional to time. A quarterly statement sits three months after the one before. With lines, an area can tint each course down to zero, and the legend can state each account\'s latest balance. The time axis labels whole days, months or years that differ and keep apart at any width: two statements a day apart are labelled by their days, and a year of month ends month by month where there is room. The value axis of the balances states whole euros, while hovering, the legend and the text summary keep the cents. A year of daily balances crowds its line with a dot a day: with markers hidden, lines and steps draw the course alone, hovering marks and reads out the day nearest the pointer, and a value with no neighbour, such as the single savings statement, keeps its dot.'],
81
+ line: ['Stated balances', 'Balances where the statements state them, on an axis proportional to time. A quarterly statement sits three months after the one before. With lines, an area can tint each course down to zero, and the legend can state each account\'s latest balance. The time axis labels whole days, months or years that differ and keep apart at any width: two statements a day apart are labelled by their days, and a year of month ends month by month where there is room. The value axis of the balances states whole euros, while hovering, the legend and the text summary keep the cents. A year of daily balances crowds its line with a dot a day: with markers hidden, lines and steps draw the course alone, hovering marks and reads out the day nearest the pointer, and a value with no neighbour, such as the single savings statement, keeps its dot. The balances state their terms beside the title, with a notice of the host\'s own over the plot and the balances the course does not end on under it, at the header\'s inset: the chart grows with these rows, its plot keeping 240 px, and the legend stays the tile\'s last row.'],
81
82
  radar: ['Service profile', 'Compare the current service with its targets across five dimensions.'],
82
83
  };
83
84
 
@@ -110,6 +111,10 @@ export class DeesDemoChartWorkspace extends DeesElement {
110
111
  .key .dot { width: 8px; height: 8px; border-radius: 50%; }
111
112
  .key strong { color: var(--dees-color-text-primary); font-weight: 500; font-variant-numeric: tabular-nums; }
112
113
  .widths dees-chart-line { height: 320px; }
114
+ /* Rows of the host's own in a chart: it grows with them, its plot keeping its height. */
115
+ .withRows { height: auto; --dees-chart-plot-height: 240px; }
116
+ .note, .rowList { margin: 0; color: var(--dees-color-text-secondary); font: var(--dees-font-caption1-size)/var(--dees-font-caption1-line) var(--dees-font-family); }
117
+ .rowList { padding: 0; list-style: none; }
113
118
  .wide { width: 1440px; }
114
119
  .narrow { width: 420px; }
115
120
  `];
@@ -166,13 +171,21 @@ export class DeesDemoChartWorkspace extends DeesElement {
166
171
  </div>
167
172
  <div class="options" role="group" aria-label="Language of the charts">${languages.map(({ key, label }) => toggle(label, this.language === key, () => { void this.setLanguage(key); }))}</div>
168
173
  ${this.kind === 'bar' ? html`<dees-chart-bar label="Requests and cache hits" .categories=${data.categories} .series=${this.empty ? [] : data.series} .horizontal=${this.alternate} .stacked=${this.secondary} .valueFormatter=${(value: number) => `${Math.round(value)}k`}></dees-chart-bar>
169
- <dees-chart-bar label="Month by month, as booked" .categories=${data.bookings.categories} .series=${this.empty ? [] : data.bookings.series} .stacks=${data.bookings.stacks} .nets=${data.bookings.nets} .horizontal=${this.alternate} .valueFormatter=${this.euro(2)} .netLabelFormatter=${this.compactEuro()}></dees-chart-bar>` : ''}
174
+ <dees-chart-bar label="Month by month, as booked" meta="Fiscal year 2026 to date · net of VAT" .categories=${data.bookings.categories} .series=${this.empty ? [] : data.bookings.series} .stacks=${data.bookings.stacks} .nets=${data.bookings.nets} .horizontal=${this.alternate} .valueFormatter=${this.euro(2)} .netLabelFormatter=${this.compactEuro()}>
175
+ <p slot="below" class="note">Left out: 0480 Office equipment and 1800 Private withdrawals, which are none of these parts.</p>
176
+ </dees-chart-bar>` : ''}
170
177
  ${this.kind === 'area' ? html`<dees-chart-area label="Requests per minute" .series=${this.empty ? [] : data.timeline} .yAxisFormatter=${(value: number) => `${Math.round(value)}k`} .legendStats=${['latest', 'min', 'max']} .chartLines=${[]} .rangeSelectionEnabled=${true}></dees-chart-area>
171
178
  <dees-chart-area label="Network throughput" .series=${this.empty ? [] : data.throughput} .yAxisFormatter=${(value: number) => `${value} Mbit/s`} .legendStats=${['latest', 'max']}></dees-chart-area>` : ''}
172
179
  ${this.kind === 'donut' ? html`<dees-chart-donut label="Requests by region" .data=${this.empty ? [] : data.regions} .showLabels=${!this.alternate} .showLegend=${!this.secondary} .valueFormatter=${(value: number) => `${Math.round(value)}k`}></dees-chart-donut>
173
180
  ${this.renderSpending(data)}` : ''}
174
181
  ${this.kind === 'gauge' ? html`<dees-chart-gauge label="Queue capacity" .value=${data.capacity} .showTicks=${this.alternate} .thresholds=${[{value:60,tone:'success'},{value:80,tone:'warning'},{value:100,tone:'danger'}]}></dees-chart-gauge>` : ''}
175
- ${this.kind === 'line' ? html`<dees-chart-line label="Account balances" .series=${this.empty ? [] : data.statements} .presentation=${presentation} .fillArea=${this.filled} .showMarkers=${!this.dotless} .showLatestValue=${this.latest} .valueFormatter=${this.euro(2)} .axisValueFormatter=${wholeEuro}></dees-chart-line>
182
+ ${this.kind === 'line' ? html`<dees-chart-line class="withRows" label="Account balances" meta="as each bank statement states them" .series=${this.empty ? [] : data.statements} .presentation=${presentation} .fillArea=${this.filled} .showMarkers=${!this.dotless} .showLatestValue=${this.latest} .valueFormatter=${this.euro(2)} .axisValueFormatter=${wholeEuro}>
183
+ <dees-hint slot="above" type="warning" text="Two statements of the current account for 30 September 2026 state different balances: 2,246.86 € and 2,264.86 €."></dees-hint>
184
+ <ul slot="below" class="rowList">
185
+ <li>Savings: 6,000.00 € on 31 July 2026, its latest statement</li>
186
+ <li>Credit card: no statement states a balance</li>
187
+ </ul>
188
+ </dees-chart-line>
176
189
  <dees-chart-line label="Stated a day apart" .series=${this.empty ? [] : data.dayApart} .presentation=${presentation} .fillArea=${this.filled} .showMarkers=${!this.dotless} .showLatestValue=${this.latest} .valueFormatter=${(value: number) => `$${this.i18n.format.number(value, 'integer')}`}></dees-chart-line>
177
190
  <dees-chart-line label="A year of daily balances" .series=${this.empty ? [] : data.daily} .presentation=${presentation} .fillArea=${this.filled} .showMarkers=${!this.dotless} .showLatestValue=${this.latest} .valueFormatter=${this.euro(2)} .axisValueFormatter=${wholeEuro}></dees-chart-line>
178
191
  <div class="widths" role="group" aria-label="A year of month ends at two widths">
@@ -1,5 +1,6 @@
1
1
  import { html } from '@design.estate/dees-element';
2
2
  import type { DeesAppuiBottombar } from './dees-appui-bottombar.js';
3
+ import type { IBottomBarAction } from '../../interfaces/appconfig.js';
3
4
  import '@design.estate/dees-element/demotools';
4
5
 
5
6
  export const demoFunc = () => {
@@ -11,7 +12,7 @@ export const demoFunc = () => {
11
12
  flex-direction: column;
12
13
  gap: 24px;
13
14
  padding: 24px;
14
- background: #1a1a1a;
15
+ background: var(--dees-color-bg-canvas);
15
16
  }
16
17
 
17
18
  .demo-section {
@@ -22,17 +23,42 @@ export const demoFunc = () => {
22
23
 
23
24
  .demo-label {
24
25
  font-size: 12px;
25
- color: #737373;
26
+ color: var(--dees-color-text-muted);
26
27
  font-family: 'Geist Sans', sans-serif;
27
28
  }
28
29
 
29
30
  .demo-bottombar-wrapper {
30
- border: 1px solid hsl(0 0% 20%);
31
+ border: 1px solid var(--dees-color-border-subtle);
31
32
  border-radius: 4px;
32
33
  overflow: hidden;
33
34
  }
34
35
  </style>
35
36
  <div class="demo-container">
37
+ <div class="demo-section">
38
+ <div class="demo-label">Action states (light and dark theme)</div>
39
+ ${[
40
+ { id: 'ready', label: 'Ready to resync', loading: false, disabled: false },
41
+ { id: 'loading', label: 'Resyncing: spinning and disabled', loading: true, disabled: false },
42
+ { id: 'disabled', label: 'Resync unavailable', loading: false, disabled: true },
43
+ ].map(preview => html`
44
+ <div class="demo-bottombar-wrapper">
45
+ <dees-appui-bottombar
46
+ data-action-state=${preview.id}
47
+ .widgets=${[{ id: preview.id, label: preview.label }]}
48
+ .actions=${[{
49
+ id: 'resync',
50
+ iconName: 'lucide:refresh-cw',
51
+ tooltip: preview.label,
52
+ loading: preview.loading,
53
+ disabled: preview.disabled,
54
+ position: 'right',
55
+ onClick: () => alert('Resync requested'),
56
+ }] satisfies IBottomBarAction[]}
57
+ ></dees-appui-bottombar>
58
+ </div>
59
+ `)}
60
+ </div>
61
+
36
62
  <div class="demo-section">
37
63
  <div class="demo-label">Bottom bar with status widgets and actions</div>
38
64
  <div class="demo-bottombar-wrapper">
@@ -69,7 +69,6 @@ export class DeesAppuiBottombar extends DeesElement implements IBottomBarAPI {
69
69
  .widget:not([role="button"]) { cursor: default; }
70
70
  .bottom-bar { overflow-x: auto; }
71
71
  .widget, .action-button { flex-shrink: 0; }
72
- @media (prefers-reduced-motion: reduce) { .spinning { animation: none; } .widget, .action-button { transition: none; } }
73
72
 
74
73
  .bottom-bar {
75
74
  height: 24px;
@@ -136,6 +135,8 @@ export class DeesAppuiBottombar extends DeesElement implements IBottomBarAPI {
136
135
  animation: spin 1s linear infinite;
137
136
  }
138
137
 
138
+ @media (prefers-reduced-motion: reduce) { .spinning { animation: none; } .widget, .action-button { transition: none; } }
139
+
139
140
  .spacer {
140
141
  flex: 1;
141
142
  }
@@ -269,18 +270,21 @@ export class DeesAppuiBottombar extends DeesElement implements IBottomBarAPI {
269
270
 
270
271
  private renderAction(action: IBottomBarAction): TemplateResult {
271
272
  const iconName = normalizeIconName(action.iconName);
273
+ const disabled = !!(action.disabled || action.loading);
272
274
 
273
275
  return html`
274
276
  <button type="button"
275
- class="action-button ${action.disabled ? 'disabled' : ''}"
276
- ?disabled=${action.disabled}
277
+ class="action-button ${disabled ? 'disabled' : ''}"
278
+ ?disabled=${disabled}
279
+ aria-busy=${action.loading ? 'true' : 'false'}
277
280
  aria-label=${action.tooltip || action.id}
278
281
  title="${action.tooltip || ''}"
279
- @click=${() => !action.disabled && action.onClick?.()}
282
+ @click=${() => !action.disabled && !action.loading && action.onClick?.()}
280
283
  >
281
284
  <dees-icon
282
285
  .icon=${iconName}
283
286
  iconSize="12"
287
+ class="${action.loading ? 'spinning' : ''}"
284
288
  ></dees-icon>
285
289
  </button>
286
290
  `;
@@ -11,6 +11,10 @@ export const donutStyles = [
11
11
  :host {
12
12
  height: auto;
13
13
  }
14
+ /* The plot's frame below sizes the plot, not --dees-chart-plot-height. */
15
+ .chartArea {
16
+ flex-basis: auto;
17
+ }
14
18
  .chartContainer {
15
19
  position: relative;
16
20
  inset: auto;
@@ -20,11 +20,20 @@ import { dcLocalize } from '../../i18n/localize.js';
20
20
  * Handles library loading, chart lifecycle, resize observation, and theme switching.
21
21
  * Subclasses implement `buildOption()` to define their chart configuration.
22
22
  *
23
- * A chart is a tile (`dees-tile`): its `label` heads it in the standard header bar and its legend,
24
- * a `dees-legend` whose items switch their series, is in the standard footer bar. One header per
25
- * tile: a chart in a pane that heads it already hands its title to the pane's header and leaves
26
- * `label` empty, and then draws no header row of its own; `summary` still names it to a screen
23
+ * A chart is a tile (`dees-tile`): its `label` heads it in the standard header bar, with `meta` at
24
+ * the bar's end, and its legend, a `dees-legend` whose items switch their series, is in the
25
+ * standard footer bar. Rows of the host's own about the chart (a notice, what the chart leaves out,
26
+ * figures it does not end on) go into the slots `above` and `below`, over and under the plot: at
27
+ * the tile's inset, the header's, with the legend still the tile's last row at its full width. A
28
+ * host so needs no tile of its own around a chart: the chart is the tile. One header per tile: a
29
+ * chart in a pane that heads it already hands its title to the pane's header and leaves `label`
30
+ * and `meta` empty, and then draws no header row of its own; `summary` still names it to a screen
27
31
  * reader.
32
+ *
33
+ * The host's height holds the whole tile (400px by default): the header, the rows, the plot and the
34
+ * legend, the plot taking what the rest leaves. A chart whose rows vary takes `height: auto`, and
35
+ * its plot is then `--dees-chart-plot-height` tall (320px by default, what the default height
36
+ * leaves the plot under a header and a legend of one row).
28
37
  */
29
38
  export abstract class DeesChartEchartsBase extends DeesElement {
30
39
  /** The chart's words and formats, in the reader's language. */
@@ -38,6 +47,14 @@ export abstract class DeesChartEchartsBase extends DeesElement {
38
47
  @property({ reflect: true })
39
48
  accessor label: string = '';
40
49
 
50
+ /**
51
+ * A short text at the end of the header bar, beside `label`: what the chart covers or in which
52
+ * terms ("Fiscal year 2026 to date · net of VAT"). Muted, as a table's `heading2`; where the tile
53
+ * is too narrow for both it wraps under the label, at its start, and the bar grows by that line.
54
+ */
55
+ @property({ reflect: true })
56
+ accessor meta: string = '';
57
+
41
58
  /** Drop the chart's outer frame and surface: the host already owns the surface. */
42
59
  @property({ type: Boolean, reflect: true })
43
60
  accessor frameless: boolean = false;
@@ -139,18 +156,34 @@ export abstract class DeesChartEchartsBase extends DeesElement {
139
156
  off: !this.legendShown(item.name),
140
157
  }));
141
158
  return html`<dees-tile .frameless=${this.frameless}>
142
- ${this.label ? html`<div slot="header" class="chartHeader"><h2 class="chartLabel">${this.label}</h2></div>` : ''}
143
- <div class="chartContainer" aria-hidden="true"><div class="chartPlot"></div></div>
159
+ ${this.label || this.meta ? html`<div slot="header" class="chartHeader ${this.meta ? 'hasMeta' : ''}">${this.label
160
+ ? html`<h2 class="chartLabel">${this.label}</h2>`
161
+ : ''}${this.meta ? html`<span class="chartMeta">${this.meta}</span>` : ''}</div>` : ''}
162
+ ${this.renderRows('above')}
163
+ <div class="chartArea">
164
+ <div class="chartContainer" aria-hidden="true"><div class="chartPlot"></div></div>
165
+ ${message ? html`<div class="chartState" role="status">${message}</div>` : ''}
166
+ </div>
167
+ ${this.renderRows('below')}
144
168
  <p class="chartSummary">${this.summary || this.dataSummary()}</p>
145
169
  ${legend.length ? html`<div slot="footer" class="chartLegend"><dees-legend interactive label=${this.t('chart.series')} .items=${legend} @item-toggle=${(event: CustomEvent<IDeesLegendToggleDetail>) => {
146
170
  const hidden = new Set(this.hiddenSeries);
147
171
  if (event.detail.on) hidden.delete(event.detail.item.label); else hidden.add(event.detail.item.label);
148
172
  this.hiddenSeries = hidden; this.updateChart();
149
173
  }}></dees-legend></div>` : ''}
150
- ${message ? html`<div class="chartState" role="status">${message}</div>` : ''}
151
174
  </dees-tile>`;
152
175
  }
153
176
 
177
+ /**
178
+ * The host's rows over or under the plot, from the slot `above` or `below`; no row, and no room,
179
+ * while nothing is slotted there. Read from the light DOM as each render runs, so the first frame
180
+ * already has them; a `slotchange` renders again.
181
+ */
182
+ private renderRows(placeArg: 'above' | 'below'): TemplateResult {
183
+ const slotted = this.querySelector(`:scope > [slot="${placeArg}"]`) !== null;
184
+ return html`<div class="chartRows ${placeArg} ${slotted ? '' : 'empty'}"><slot name=${placeArg} @slotchange=${() => this.requestUpdate()}></slot></div>`;
185
+ }
186
+
154
187
  public async updated(changedProperties: Map<PropertyKey, unknown>) {
155
188
  super.updated(changedProperties);
156
189
  if (changedProperties.has('goBright') && this.chartInstance) {
@@ -20,6 +20,11 @@ export const chartFrameStyles = css`
20
20
  dees-tile::part(outer) { border-color: var(--dees-color-border-subtle); }
21
21
  .chartHeader { ${tileHeaderBar} }
22
22
  .chartLabel { flex: 1; min-width: 0; margin: 0; font: inherit; overflow-wrap: anywhere; }
23
+ /* The meta text at the end of the header's line, muted as a table's subtitle; where the tile is
24
+ too narrow for both it wraps under the title, at its start, and the bar grows by that line. */
25
+ .chartHeader.hasMeta { flex-wrap: wrap; gap: var(--dees-spacing-2xs) var(--dees-spacing-md); }
26
+ .chartHeader.hasMeta .chartLabel { flex: 1 1 auto; }
27
+ .chartMeta { min-width: 0; color: var(--dees-color-text-muted); font-weight: 400; overflow-wrap: anywhere; }
23
28
  .chartLegend { ${tileFooterBar} }
24
29
  .chartContainer { position: absolute; inset: 0; }
25
30
  .chartState { position: absolute; inset: 0; display: grid; place-content: center; padding: 24px; text-align: center; color: var(--dees-color-text-muted); background: var(--dees-color-bg-primary); }
@@ -30,11 +35,19 @@ export const chartFrameStyles = css`
30
35
  @media (pointer: coarse) { .expandBtn { width: var(--dees-control-height-touch); height: var(--dees-control-height-touch); } }
31
36
  `;
32
37
  /**
33
- * The element ECharts draws into fills the frame, whatever position ECharts writes on it. ECharts
34
- * insets its plot by 16px itself; under a region inset the frame adds the rest, so axes and
35
- * labels line up with the header.
38
+ * The tile's content is a column: the host's rows above, the plot, the host's rows below. The rows
39
+ * keep their height and sit at the tile's inset, the header's; the plot takes the rest of the
40
+ * host's height, or, while the host's height is `auto`, `--dees-chart-plot-height`.
41
+ *
42
+ * The element ECharts draws into fills the plot's frame, whatever position ECharts writes on it.
43
+ * ECharts insets its plot by 16px itself; under a region inset the frame adds the rest, so axes
44
+ * and labels line up with the header.
36
45
  */
37
46
  const echartsPlotStyles = css`
47
+ dees-tile::part(content) { display: flex; flex-direction: column; }
48
+ .chartArea { position: relative; flex: 1 1 var(--dees-chart-plot-height, 320px); min-height: 0; }
49
+ .chartRows { flex: none; display: flex; flex-direction: column; gap: var(--dees-spacing-md); padding: var(--dees-spacing-md) var(--chart-inset-inline, var(--dees-spacing-lg)); }
50
+ .chartRows.empty { display: none; }
38
51
  .chartContainer { inset-inline: calc(var(--chart-inset-inline, 16px) - 16px); }
39
52
  .chartPlot { width: 100%; height: 100%; }
40
53
  `;
@@ -67,6 +67,7 @@ export interface IBottomBarAction {
67
67
  onClick: () => void | Promise<void>;
68
68
  /** Whether action is disabled */
69
69
  disabled?: boolean;
70
+ loading?: boolean;
70
71
  /** Position: 'left' or 'right' (default) */
71
72
  position?: 'left' | 'right';
72
73
  }