@thebuoyant-tsdev/mui-ts-library 2.3.0 → 2.6.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.
- package/README.de.md +53 -5
- package/README.md +54 -6
- package/dist/components/chord-chart/ChordChart.d.ts +1 -1
- package/dist/components/chord-chart/ChordChart.types.d.ts +15 -0
- package/dist/components/circle-packing-chart/CirclePackingChart.d.ts +5 -0
- package/dist/components/circle-packing-chart/CirclePackingChart.types.d.ts +104 -0
- package/dist/components/horizontal-tree-chart/HorizontalTreeChart.d.ts +5 -0
- package/dist/components/horizontal-tree-chart/HorizontalTreeChart.types.d.ts +95 -0
- package/dist/components/radial-tree-chart/RadialTreeChart.d.ts +5 -0
- package/dist/components/radial-tree-chart/RadialTreeChart.types.d.ts +94 -0
- package/dist/components/sunburst-chart/SunburstChart.d.ts +1 -1
- package/dist/components/sunburst-chart/SunburstChart.types.d.ts +8 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +2400 -1062
- package/package.json +62 -24
package/README.de.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
Eine typsichere React-Komponentenbibliothek auf Basis von **TypeScript** und **MUI (Material UI v9)**. Die Komponenten folgen MUI's Design-Sprache, unterstützen Dark Mode und Theming von Haus aus und werden mit vollständigen TypeScript-Typen, Storybook-Stories und Unit-Tests ausgeliefert.
|
|
6
6
|
|
|
7
|
+
**[→ Live-Storybook](https://thebuoyant.github.io/mui-ts-library/)** — alle Komponenten interaktiv erkunden, ohne Installation.
|
|
8
|
+
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
## Komponenten
|
|
@@ -11,14 +13,17 @@ Eine typsichere React-Komponentenbibliothek auf Basis von **TypeScript** und **M
|
|
|
11
13
|
| Komponente | Beschreibung | Docs |
|
|
12
14
|
|---|---|---|
|
|
13
15
|
| [`ConfirmDialog`](#confirmdialog) | Deklarativer Async-Bestätigungs-Dialog — `await confirm({ title, severity })` von überall in der App. Unterstützt Countdown-Auto-Confirm und `Enter` = Bestätigen. | [Vollständiges Manual →](user-manuals/ConfirmDialog.de.md) |
|
|
14
|
-
| [`GanttChart`](#ganttchart) | Projekt-Timeline mit hierarchischen Aufgaben, Meilensteinen, Drag & Drop, Ctrl
|
|
16
|
+
| [`GanttChart`](#ganttchart) | Projekt-Timeline mit hierarchischen Aufgaben, Meilensteinen, Drag & Drop, Ctrl / Cmd ⌘+Scroll-Zoom, Heute-Chip und integrierten CRUD-Dialogen | [Vollständiges Manual →](user-manuals/GanttChart.de.md) |
|
|
15
17
|
| [`TagSelection`](#tagselection) | Multi-Tag-Auswahlfeld mit Autocomplete, freier Tag-Erstellung, Overflow-Chips und MUI-Theme-Farben | [Vollständiges Manual →](user-manuals/TagSelection.de.md) |
|
|
16
18
|
| [`PasswordStrengthMeter`](#passwordstrengthmeter) | Passwort-Eingabe mit animiertem Stärke-Meter, segmentierter Balkenanzeige, eigenen Anforderungen und Anforderungsliste | [Vollständiges Manual →](user-manuals/PasswordStrengthMeter.de.md) |
|
|
17
19
|
| [`RichTextEditor`](#richtexteditor) | WYSIWYG-Editor (TipTap v3) mit Toolbar, Link-Dialog, Textfarbe, Hervorhebung, Wörter-Zähler, Vollbild-Modus, Markdown-Einfügen, Tabellen-Bearbeitung, Bild-Embed und Emoji-Picker | [Vollständiges Manual →](user-manuals/RichTextEditor.de.md) |
|
|
18
20
|
| [`SqlEditor`](#sqleditor) | SQL-Code-Editor (CodeMirror 6) mit Syntax-Highlighting, Multi-Dialekt, Autocomplete, Linting und `Cmd+Enter`-Ausführen-Shortcut | [Vollständiges Manual →](user-manuals/SqlEditor.de.md) |
|
|
19
21
|
| [`JsonEditor`](#jsoneditor) | JSON-Code-Editor (CodeMirror 6) mit Echtzeit-Validierung, Format- und Komprimieren-Schaltfläche sowie optionaler Minimap | [Vollständiges Manual →](user-manuals/JsonEditor.de.md) |
|
|
20
|
-
| [`SunburstChart`](#sunburstchart) | D3 v7 hierarchisches Chart — konzentrische Ringe, Ctrl
|
|
21
|
-
| [`ChordChart`](#chordchart) | D3 v7 Fluss-Chart — Arc-Gruppen
|
|
22
|
+
| [`SunburstChart`](#sunburstchart) | D3 v7 hierarchisches Chart — konzentrische Ringe, Ctrl / Cmd ⌘+Click Drill-Down, Ctrl / Cmd ⌘+Scroll Zoom, Donut-Modus, eigene Farben, MUI-Theme-Integration. Erste der D3-Chart-Familie. | [Vollständiges Manual →](user-manuals/SunburstChart.de.md) |
|
|
23
|
+
| [`ChordChart`](#chordchart) | D3 v7 Fluss-Chart — Arc-Gruppen, Bänder, Hover-Highlight, Ctrl / Cmd ⌘+Scroll-Zoom, gerichtet/ungerichtet, MUI-Theme-Integration | [Vollständiges Manual →](user-manuals/ChordChart.de.md) |
|
|
24
|
+
| [`RadialTreeChart`](#radialtreedchart) | D3 v7 radialer Baum — Knoten auf konzentrischen Ringen, MUI-Icons, Ctrl / Cmd ⌘+Click Drill-Down, Ctrl / Cmd ⌘+Scroll Zoom, MUI-Theme-Integration | [Vollständiges Manual →](user-manuals/RadialTreeChart.de.md) |
|
|
25
|
+
| [`CirclePackingChart`](#circlepackingchart) | D3 v7 Circle Packing — verschachtelte Kreise, animierter D3-Zoom, Ctrl / Cmd ⌘+Scroll-Zoom, Tiefen-Gradient oder Palette, MUI-Theme-Integration | [Vollständiges Manual →](user-manuals/CirclePackingChart.de.md) |
|
|
26
|
+
| [`HorizontalTreeChart`](#horizontaltreechart) | D3 v7 Baum-Chart — 4 Orientierungen (LR/RL/TB/BT), geschwungene Links, Drill-Down, Ctrl / Cmd ⌘+Scroll-Zoom, MUI-Icons und Theme-Integration | [Vollständiges Manual →](user-manuals/HorizontalTreeChart.de.md) |
|
|
22
27
|
|
|
23
28
|
---
|
|
24
29
|
|
|
@@ -76,7 +81,7 @@ if (ok) handleDelete();
|
|
|
76
81
|
|
|
77
82
|
### GanttChart
|
|
78
83
|
|
|
79
|
-
Interaktive Projekt-Timeline für Planung und Aufgaben-Tracking. Einsetzbar in Projektmanagement-Dashboards, Sprint-Planern und Ressourcenansichten — mit Drag & Drop, Größenänderung, Ctrl
|
|
84
|
+
Interaktive Projekt-Timeline für Planung und Aufgaben-Tracking. Einsetzbar in Projektmanagement-Dashboards, Sprint-Planern und Ressourcenansichten — mit Drag & Drop, Größenänderung, Ctrl / Cmd ⌘+Scroll-Zoom, Meilensteinen, Abhängigkeiten und Heute-Chip.
|
|
80
85
|
|
|
81
86
|
```tsx
|
|
82
87
|
import { GanttChart } from '@thebuoyant-tsdev/mui-ts-library';
|
|
@@ -213,7 +218,7 @@ const data: SunburstChartData = {
|
|
|
213
218
|
/>
|
|
214
219
|
```
|
|
215
220
|
|
|
216
|
-
**Zoom:** `Ctrl+Click` → Drill-down · `Ctrl
|
|
221
|
+
**Zoom:** `Ctrl+Click` → Drill-down · `Ctrl / Cmd ⌘+Doppelklick` → Zoom out · `Escape` → Reset
|
|
217
222
|
|
|
218
223
|
→ [Vollständige Dokumentation](user-manuals/SunburstChart.de.md)
|
|
219
224
|
|
|
@@ -245,6 +250,40 @@ const data: ChordChartData[] = [
|
|
|
245
250
|
|
|
246
251
|
---
|
|
247
252
|
|
|
253
|
+
### RadialTreeChart
|
|
254
|
+
|
|
255
|
+
Hierarchische Daten als radialer Baum — Knoten auf konzentrischen Ringen, verbunden durch geschwungene Links. Ideal für Org-Charts, Skill-Taxonomien und Abhängigkeitsbäume. `Ctrl / Cmd ⌘+Click` bohrt in Teilbäume, `Ctrl / Cmd ⌘+Scroll` zoomt.
|
|
256
|
+
|
|
257
|
+
```tsx
|
|
258
|
+
import { RadialTreeChart } from '@thebuoyant-tsdev/mui-ts-library';
|
|
259
|
+
import type { RadialTreeChartData } from '@thebuoyant-tsdev/mui-ts-library';
|
|
260
|
+
|
|
261
|
+
const data: RadialTreeChartData = {
|
|
262
|
+
id: 'ceo', name: 'CEO', subname: 'Führung',
|
|
263
|
+
children: [
|
|
264
|
+
{ id: 'cto', name: 'CTO', subname: 'Technologie',
|
|
265
|
+
children: [
|
|
266
|
+
{ id: 'fe', name: 'Frontend Lead' },
|
|
267
|
+
{ id: 'be', name: 'Backend Lead' },
|
|
268
|
+
]},
|
|
269
|
+
{ id: 'cpo', name: 'CPO', subname: 'Produkt' },
|
|
270
|
+
],
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
<RadialTreeChart
|
|
274
|
+
data={data}
|
|
275
|
+
size={600}
|
|
276
|
+
drillable // Ctrl / Cmd ⌘+Click zum Drill-in, DblClick zurück
|
|
277
|
+
zoomable // Ctrl / Cmd ⌘+Scroll zum Zoomen
|
|
278
|
+
showNodePopover
|
|
279
|
+
onNodeClick={(info) => console.log(info.name, info.depth)}
|
|
280
|
+
/>
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
→ [Vollständige Dokumentation](user-manuals/RadialTreeChart.de.md)
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
248
287
|
## TypeScript
|
|
249
288
|
|
|
250
289
|
Alle Typen und Defaults werden direkt exportiert — kein separates `@types/...`-Paket nötig.
|
|
@@ -277,6 +316,15 @@ import type {
|
|
|
277
316
|
|
|
278
317
|
// ChordChart
|
|
279
318
|
ChordChartData, ChordGroupInfo, ChordInfo, ChordSortBy,
|
|
319
|
+
|
|
320
|
+
// RadialTreeChart
|
|
321
|
+
RadialTreeChartData, RadialTreeNodeInfo, RadialTreeNodeIconSpec, RadialTreeSortBy,
|
|
322
|
+
|
|
323
|
+
// CirclePackingChart
|
|
324
|
+
CirclePackingData, CirclePackingNodeInfo, CirclePackingZoomInfo, CirclePackingSortBy,
|
|
325
|
+
|
|
326
|
+
// HorizontalTreeChart
|
|
327
|
+
HorizontalTreeData, HorizontalTreeNodeInfo, HorizontalTreeOrientation,
|
|
280
328
|
} from '@thebuoyant-tsdev/mui-ts-library';
|
|
281
329
|
```
|
|
282
330
|
|
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
A type-safe React component library built on **TypeScript** and **MUI (Material UI v9)**. Components follow MUI's design language, support dark mode and theming out of the box, and ship with complete TypeScript types, Storybook stories, and unit tests.
|
|
6
6
|
|
|
7
|
+
**[→ Live Storybook](https://thebuoyant.github.io/mui-ts-library/)** — explore all components interactively, no installation needed.
|
|
8
|
+
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
## Components
|
|
@@ -11,14 +13,17 @@ A type-safe React component library built on **TypeScript** and **MUI (Material
|
|
|
11
13
|
| Component | Description | Docs |
|
|
12
14
|
|---|---|---|
|
|
13
15
|
| [`ConfirmDialog`](#confirmdialog) | Declarative async confirmation dialog — `await confirm({ title, severity })` from anywhere in the app. Supports countdown auto-confirm and `Enter` = confirm shortcut. | [Full Manual →](user-manuals/ConfirmDialog.md) |
|
|
14
|
-
| [`GanttChart`](#ganttchart) | Project timeline with hierarchical tasks, milestones, drag & drop, Ctrl
|
|
16
|
+
| [`GanttChart`](#ganttchart) | Project timeline with hierarchical tasks, milestones, drag & drop, Ctrl / Cmd ⌘+Scroll zoom, today chip, and built-in CRUD dialogs | [Full Manual →](user-manuals/GanttChart.md) |
|
|
15
17
|
| [`TagSelection`](#tagselection) | Multi-tag selector with autocomplete, free tag creation, overflow chips, and MUI theme colors | [Full Manual →](user-manuals/TagSelection.md) |
|
|
16
18
|
| [`PasswordStrengthMeter`](#passwordstrengthmeter) | Password input with animated strength meter, segmented bar, custom requirements, and requirements checklist | [Full Manual →](user-manuals/PasswordStrengthMeter.md) |
|
|
17
19
|
| [`RichTextEditor`](#richtexteditor) | WYSIWYG editor (TipTap v3) with toolbar, link dialog, text color, highlight, word count, fullscreen mode, Markdown paste, table editing, image embed, and emoji picker | [Full Manual →](user-manuals/RichTextEditor.md) |
|
|
18
20
|
| [`SqlEditor`](#sqleditor) | SQL code editor (CodeMirror 6) with syntax highlighting, multi-dialect, autocomplete, linting, and `Cmd+Enter` execute shortcut | [Full Manual →](user-manuals/SqlEditor.md) |
|
|
19
21
|
| [`JsonEditor`](#jsoneditor) | JSON code editor (CodeMirror 6) with real-time validation, Format, Compact buttons, and optional minimap | [Full Manual →](user-manuals/JsonEditor.md) |
|
|
20
|
-
| [`SunburstChart`](#sunburstchart) | D3 v7 hierarchical chart — concentric rings, Ctrl
|
|
21
|
-
| [`ChordChart`](#chordchart) | D3 v7 flow chart — arc groups
|
|
22
|
+
| [`SunburstChart`](#sunburstchart) | D3 v7 hierarchical chart — concentric rings, Ctrl / Cmd ⌘+Click drill-down, Ctrl / Cmd ⌘+Scroll zoom, donut mode, MUI theme integration | [Full Manual →](user-manuals/SunburstChart.md) |
|
|
23
|
+
| [`ChordChart`](#chordchart) | D3 v7 flow chart — arc groups, ribbons, hover highlight, Ctrl / Cmd ⌘+Scroll zoom, directed/undirected, MUI theme integration | [Full Manual →](user-manuals/ChordChart.md) |
|
|
24
|
+
| [`RadialTreeChart`](#radialtreedchart) | D3 v7 radial tree — hierarchical nodes on concentric rings, MUI icons, Ctrl / Cmd ⌘+Click drill-down, Ctrl / Cmd ⌘+Scroll zoom, MUI theme integration | [Full Manual →](user-manuals/RadialTreeChart.md) |
|
|
25
|
+
| [`CirclePackingChart`](#circlepackingchart) | D3 v7 circle packing — nested circles, animated D3 zoom, Ctrl / Cmd ⌘+Scroll zoom, depth gradient or palette, MUI theme integration | [Full Manual →](user-manuals/CirclePackingChart.md) |
|
|
26
|
+
| [`HorizontalTreeChart`](#horizontaltreechart) | D3 v7 tree chart — 4 orientations (LR/RL/TB/BT), curved links, drill-down, Ctrl / Cmd ⌘+Scroll zoom, MUI icons and theme integration | [Full Manual →](user-manuals/HorizontalTreeChart.md) |
|
|
22
27
|
|
|
23
28
|
---
|
|
24
29
|
|
|
@@ -76,7 +81,7 @@ if (ok) handleDelete();
|
|
|
76
81
|
|
|
77
82
|
### GanttChart
|
|
78
83
|
|
|
79
|
-
An interactive project timeline for planning and tracking tasks. Use it in project management dashboards, sprint planners, or resource views where teams need to see schedules, milestones, dependencies, and progress at a glance — with drag & drop, resize, and Ctrl
|
|
84
|
+
An interactive project timeline for planning and tracking tasks. Use it in project management dashboards, sprint planners, or resource views where teams need to see schedules, milestones, dependencies, and progress at a glance — with drag & drop, resize, and Ctrl / Cmd ⌘+Scroll zoom built in.
|
|
80
85
|
|
|
81
86
|
```tsx
|
|
82
87
|
import { GanttChart } from '@thebuoyant-tsdev/mui-ts-library';
|
|
@@ -189,7 +194,7 @@ import { JsonEditor } from '@thebuoyant-tsdev/mui-ts-library';
|
|
|
189
194
|
|
|
190
195
|
### SunburstChart
|
|
191
196
|
|
|
192
|
-
Hierarchical data visualization as concentric rings — root at the center, each depth level forms one ring. Perfect for budget breakdowns, org charts, file system usage, and any data that is both hierarchical and proportional. Ctrl
|
|
197
|
+
Hierarchical data visualization as concentric rings — root at the center, each depth level forms one ring. Perfect for budget breakdowns, org charts, file system usage, and any data that is both hierarchical and proportional. `Ctrl / Cmd ⌘+Click` to drill down, `Ctrl / Cmd ⌘+Scroll` to zoom.
|
|
193
198
|
|
|
194
199
|
```tsx
|
|
195
200
|
import { SunburstChart } from '@thebuoyant-tsdev/mui-ts-library';
|
|
@@ -213,7 +218,7 @@ const data: SunburstChartData = {
|
|
|
213
218
|
/>
|
|
214
219
|
```
|
|
215
220
|
|
|
216
|
-
**
|
|
221
|
+
**Drill-down:** `Ctrl+Click` / `Cmd ⌘+Click` · **Zoom out:** `Ctrl+DblClick` / `Cmd ⌘+DblClick` · **Reset:** `Escape`
|
|
217
222
|
|
|
218
223
|
→ [Full documentation](user-manuals/SunburstChart.md)
|
|
219
224
|
|
|
@@ -245,6 +250,40 @@ const data: ChordChartData[] = [
|
|
|
245
250
|
|
|
246
251
|
---
|
|
247
252
|
|
|
253
|
+
### RadialTreeChart
|
|
254
|
+
|
|
255
|
+
Hierarchical data as a radial tree — nodes on concentric rings connected by curved links. Use `RadialTreeChart` for org charts, skill taxonomies, dependency trees, or any hierarchy where you want both structure and spatial layout. Hover for a tooltip, click for a popover with node details. `Ctrl / Cmd ⌘+Click` drills into subtrees, `Ctrl / Cmd ⌘+Scroll` zooms.
|
|
256
|
+
|
|
257
|
+
```tsx
|
|
258
|
+
import { RadialTreeChart } from '@thebuoyant-tsdev/mui-ts-library';
|
|
259
|
+
import type { RadialTreeChartData } from '@thebuoyant-tsdev/mui-ts-library';
|
|
260
|
+
|
|
261
|
+
const data: RadialTreeChartData = {
|
|
262
|
+
id: 'ceo', name: 'CEO', subname: 'Leadership',
|
|
263
|
+
children: [
|
|
264
|
+
{ id: 'cto', name: 'CTO', subname: 'Technology',
|
|
265
|
+
children: [
|
|
266
|
+
{ id: 'fe', name: 'Frontend Lead' },
|
|
267
|
+
{ id: 'be', name: 'Backend Lead' },
|
|
268
|
+
]},
|
|
269
|
+
{ id: 'cpo', name: 'CPO', subname: 'Product' },
|
|
270
|
+
],
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
<RadialTreeChart
|
|
274
|
+
data={data}
|
|
275
|
+
size={600}
|
|
276
|
+
drillable // Ctrl / Cmd ⌘+Click to drill in, DblClick to go back
|
|
277
|
+
zoomable // Ctrl / Cmd ⌘+Scroll to zoom
|
|
278
|
+
showNodePopover
|
|
279
|
+
onNodeClick={(info) => console.log(info.name, info.depth)}
|
|
280
|
+
/>
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
→ [Full documentation](user-manuals/RadialTreeChart.md)
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
248
287
|
## TypeScript
|
|
249
288
|
|
|
250
289
|
All types and defaults are exported directly — no separate `@types/...` package needed.
|
|
@@ -277,6 +316,15 @@ import type {
|
|
|
277
316
|
|
|
278
317
|
// ChordChart
|
|
279
318
|
ChordChartData, ChordGroupInfo, ChordInfo, ChordSortBy,
|
|
319
|
+
|
|
320
|
+
// RadialTreeChart
|
|
321
|
+
RadialTreeChartData, RadialTreeNodeInfo, RadialTreeNodeIconSpec, RadialTreeSortBy,
|
|
322
|
+
|
|
323
|
+
// CirclePackingChart
|
|
324
|
+
CirclePackingData, CirclePackingNodeInfo, CirclePackingZoomInfo, CirclePackingSortBy,
|
|
325
|
+
|
|
326
|
+
// HorizontalTreeChart
|
|
327
|
+
HorizontalTreeData, HorizontalTreeNodeInfo, HorizontalTreeOrientation,
|
|
280
328
|
} from '@thebuoyant-tsdev/mui-ts-library';
|
|
281
329
|
```
|
|
282
330
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ChordChartProps } from "./ChordChart.types";
|
|
2
|
-
export declare function ChordChart({ data, size, innerRadius, ringThickness, padAngle, ribbonPadAngle, sortSubgroups, sortChords, chartColors, showGroupLabels, labelOffset, ribbonOpacity, ribbonBlendMode, directed, valueDecimalCount, valueDecimalSeparator, valueThousandsSeparator, onGroupClick, onChordClick, disabled, }: ChordChartProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function ChordChart({ data, size, innerRadius, ringThickness, padAngle, ribbonPadAngle, sortSubgroups, sortChords, chartColors, groupColorConfigs, showGroupLabels, labelOffset, ribbonOpacity, ribbonBlendMode, directed, valueDecimalCount, valueDecimalSeparator, valueThousandsSeparator, onGroupClick, onChordClick, zoomable, disabled, }: ChordChartProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare namespace ChordChart {
|
|
4
4
|
var displayName: string;
|
|
5
5
|
}
|
|
@@ -5,6 +5,17 @@ export type ChordChartData = {
|
|
|
5
5
|
target: string;
|
|
6
6
|
value: number;
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Per-group color overrides for ChordChart.
|
|
10
|
+
* Key = group name (same as `source` / `target` in the data).
|
|
11
|
+
* Value = color config — null / omit keys = use chart default palette.
|
|
12
|
+
* Example: `{ Engineering: { fill: '#1565C0' }, Sales: { fill: '#6A1B9A' } }`
|
|
13
|
+
*/
|
|
14
|
+
export type ChordGroupColorConfigs = Record<string, {
|
|
15
|
+
fill?: string;
|
|
16
|
+
textColor?: string;
|
|
17
|
+
stroke?: string;
|
|
18
|
+
} | null>;
|
|
8
19
|
/** Callback payload for a click on a group arc */
|
|
9
20
|
export type ChordGroupInfo = {
|
|
10
21
|
/** Group name */
|
|
@@ -53,6 +64,8 @@ export type ChordChartProps = {
|
|
|
53
64
|
sortChords?: ChordSortBy;
|
|
54
65
|
/** Custom color palette — falls back to MUI theme palette when omitted */
|
|
55
66
|
chartColors?: string[];
|
|
67
|
+
/** Per-group color overrides keyed by group name — overrides `chartColors` for specific groups */
|
|
68
|
+
groupColorConfigs?: ChordGroupColorConfigs;
|
|
56
69
|
/** Show group name labels outside the arc ring (default: true) */
|
|
57
70
|
showGroupLabels?: boolean;
|
|
58
71
|
/** Gap between arc outer edge and label text in px (default: 6) */
|
|
@@ -73,6 +86,8 @@ export type ChordChartProps = {
|
|
|
73
86
|
onGroupClick?: (info: ChordGroupInfo, event: React.MouseEvent<SVGGElement>) => void;
|
|
74
87
|
/** Fired on click of a ribbon */
|
|
75
88
|
onChordClick?: (info: ChordInfo, event: React.MouseEvent<SVGPathElement>) => void;
|
|
89
|
+
/** Enable Ctrl / Cmd ⌘ + Scroll visual zoom — clips content at `size` boundary (default: false) */
|
|
90
|
+
zoomable?: boolean;
|
|
76
91
|
/** Disables all interactions (default: false) */
|
|
77
92
|
disabled?: boolean;
|
|
78
93
|
/** Override translation strings */
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type CirclePackingChartProps } from "./CirclePackingChart.types";
|
|
2
|
+
export declare function CirclePackingChart({ data, size, padding, sortBy, showLabels, showAllLabels, labelFontSize, innerLabelFontSize, labelColor, chartColors, depthColorStart, depthColorEnd, background, duration, zoomable, disabled, onCircleClick, onZoomChange, }: CirclePackingChartProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare namespace CirclePackingChart {
|
|
4
|
+
var displayName: string;
|
|
5
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-node color overrides — takes priority over the chart's depth palette.
|
|
3
|
+
* Set any key to override; omit or set to null to fall back to chart defaults.
|
|
4
|
+
* Shared across all D3 charts (SunburstChart, ChordChart, RadialTreeChart, CirclePackingChart).
|
|
5
|
+
*/
|
|
6
|
+
export type NodeColorConfig = {
|
|
7
|
+
/** Fill / background color of the circle or arc segment */
|
|
8
|
+
fill?: string;
|
|
9
|
+
/** Label text color (overrides chart-level `labelColor`) */
|
|
10
|
+
textColor?: string;
|
|
11
|
+
/** Stroke / border color */
|
|
12
|
+
stroke?: string;
|
|
13
|
+
};
|
|
14
|
+
export type CirclePackingData = {
|
|
15
|
+
/** Optional ID for backend linking */
|
|
16
|
+
id?: string;
|
|
17
|
+
name: string;
|
|
18
|
+
value?: number;
|
|
19
|
+
/** Per-node color overrides — null / omit = use chart default palette */
|
|
20
|
+
colorConfig?: NodeColorConfig | null;
|
|
21
|
+
children?: CirclePackingData[];
|
|
22
|
+
};
|
|
23
|
+
export type CirclePackingSortBy = 'value' | 'name';
|
|
24
|
+
/** Clean callback payload — no D3 types exposed */
|
|
25
|
+
export type CirclePackingNodeInfo = {
|
|
26
|
+
/** Node id — same as data.id when provided */
|
|
27
|
+
id: string | null;
|
|
28
|
+
name: string;
|
|
29
|
+
/** D3 aggregate value — sum of all descendant leaf values */
|
|
30
|
+
value: number | null;
|
|
31
|
+
/** Percentage of root total — (value / root.value) * 100 */
|
|
32
|
+
percentage: number;
|
|
33
|
+
depth: number;
|
|
34
|
+
/** Breadcrumb from root to this node — array of names */
|
|
35
|
+
path: string[];
|
|
36
|
+
childrenCount: number;
|
|
37
|
+
data: CirclePackingData;
|
|
38
|
+
};
|
|
39
|
+
export type CirclePackingZoomInfo = {
|
|
40
|
+
previousName: string;
|
|
41
|
+
currentName: string;
|
|
42
|
+
currentDepth: number;
|
|
43
|
+
/** true when zoomed back to root */
|
|
44
|
+
isRoot: boolean;
|
|
45
|
+
};
|
|
46
|
+
export type CirclePackingTranslation = {
|
|
47
|
+
noData: string;
|
|
48
|
+
};
|
|
49
|
+
export declare const DEFAULT_CIRCLE_PACKING_TRANSLATION: CirclePackingTranslation;
|
|
50
|
+
export type CirclePackingChartProps = {
|
|
51
|
+
/** Root node of the hierarchy */
|
|
52
|
+
data: CirclePackingData;
|
|
53
|
+
/** Width and height of the SVG in pixels — always square (default: 600) */
|
|
54
|
+
size?: number;
|
|
55
|
+
/** Padding between nested circles in px (default: 3) */
|
|
56
|
+
padding?: number;
|
|
57
|
+
/** Sort children by value or alphabetically (default: 'value') */
|
|
58
|
+
sortBy?: CirclePackingSortBy;
|
|
59
|
+
/** Show name labels on the outer (focused) ring circles (default: true) */
|
|
60
|
+
showLabels?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Show labels on ALL visible inner circles too — truncated with "…" when the
|
|
63
|
+
* text doesn't fit inside the circle. Outer-ring labels stay bold; inner labels
|
|
64
|
+
* use a smaller font. (default: false)
|
|
65
|
+
*/
|
|
66
|
+
showAllLabels?: boolean;
|
|
67
|
+
/** Outer-ring label font size in px (default: 13, bold) */
|
|
68
|
+
labelFontSize?: number;
|
|
69
|
+
/** Inner circle label font size in px — used when `showAllLabels` is true (default: 9) */
|
|
70
|
+
innerLabelFontSize?: number;
|
|
71
|
+
/** Label text color — defaults to `theme.palette.text.primary` */
|
|
72
|
+
labelColor?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Custom depth-based color palette — overrides the default MUI theme palette.
|
|
75
|
+
* colors[depth % length] per node. Falls back to MUI palette when not set.
|
|
76
|
+
*/
|
|
77
|
+
chartColors?: string[];
|
|
78
|
+
/**
|
|
79
|
+
* HCL gradient start color — when set together with `depthColorEnd`,
|
|
80
|
+
* overrides `chartColors` and the MUI palette with a smooth gradient.
|
|
81
|
+
*/
|
|
82
|
+
depthColorStart?: string;
|
|
83
|
+
/**
|
|
84
|
+
* HCL gradient end color — see `depthColorStart`.
|
|
85
|
+
*/
|
|
86
|
+
depthColorEnd?: string;
|
|
87
|
+
/** SVG background fill. Default: `theme.palette.background.default` */
|
|
88
|
+
background?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Zoom animation duration in ms (default: 750).
|
|
91
|
+
* Alt+Ctrl / Alt+Cmd+Click uses 10× for slow-motion demos.
|
|
92
|
+
*/
|
|
93
|
+
duration?: number;
|
|
94
|
+
/** Enable Ctrl / Cmd ⌘ + Scroll visual zoom — clips content at `size` boundary (default: false) */
|
|
95
|
+
zoomable?: boolean;
|
|
96
|
+
/** Disables all interactions (default: false) */
|
|
97
|
+
disabled?: boolean;
|
|
98
|
+
/** Fires on regular click — immediately, no delay */
|
|
99
|
+
onCircleClick?: (info: CirclePackingNodeInfo, event: React.MouseEvent<SVGCircleElement>) => void;
|
|
100
|
+
/** Fires when the zoom focus changes */
|
|
101
|
+
onZoomChange?: (zoom: CirclePackingZoomInfo) => void;
|
|
102
|
+
/** Override translation strings */
|
|
103
|
+
translation?: Partial<CirclePackingTranslation>;
|
|
104
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type HorizontalTreeChartProps } from "./HorizontalTreeChart.types";
|
|
2
|
+
export declare function HorizontalTreeChart({ data, orientation, width, height, levelSpacing, nodeRadius, sortBy, showLabels, labelFontSize, labelColor, showIcons, chartColors, linkStrokeOpacity, linkStrokeWidth, linkColor, zoomable, drillable, onFocusChange, showNodePopover, renderNodePopoverContent, onNodeClick, disabled, translation, }: HorizontalTreeChartProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare namespace HorizontalTreeChart {
|
|
4
|
+
var displayName: string;
|
|
5
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/** Tree orientation — defines the direction the tree grows */
|
|
2
|
+
export type HorizontalTreeOrientation = 'LR' | 'RL' | 'TB' | 'BT';
|
|
3
|
+
export type HorizontalTreeData = {
|
|
4
|
+
id?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
subname?: string;
|
|
7
|
+
value?: number;
|
|
8
|
+
specialValueA?: string | number;
|
|
9
|
+
specialValueB?: string | number;
|
|
10
|
+
/** Per-node color overrides */
|
|
11
|
+
colorConfig?: {
|
|
12
|
+
fill?: string;
|
|
13
|
+
textColor?: string;
|
|
14
|
+
stroke?: string;
|
|
15
|
+
} | null;
|
|
16
|
+
children?: HorizontalTreeData[];
|
|
17
|
+
};
|
|
18
|
+
/** Clean callback payload — no D3 types exposed */
|
|
19
|
+
export type HorizontalTreeNodeInfo = {
|
|
20
|
+
id: string | null;
|
|
21
|
+
name: string;
|
|
22
|
+
subname: string | null;
|
|
23
|
+
value: number | null;
|
|
24
|
+
specialValueA: string | number | null;
|
|
25
|
+
specialValueB: string | number | null;
|
|
26
|
+
depth: number;
|
|
27
|
+
/** Breadcrumb from root */
|
|
28
|
+
path: string[];
|
|
29
|
+
childrenCount: number;
|
|
30
|
+
data: HorizontalTreeData;
|
|
31
|
+
};
|
|
32
|
+
export type HorizontalTreeZoomInfo = {
|
|
33
|
+
focusedNode: HorizontalTreeNodeInfo;
|
|
34
|
+
isRoot: boolean;
|
|
35
|
+
};
|
|
36
|
+
export type HorizontalTreeTranslation = {
|
|
37
|
+
noData: string;
|
|
38
|
+
specialValueA?: string;
|
|
39
|
+
specialValueB?: string;
|
|
40
|
+
};
|
|
41
|
+
export declare const DEFAULT_HORIZONTAL_TREE_TRANSLATION: HorizontalTreeTranslation;
|
|
42
|
+
export type HorizontalTreeChartProps = {
|
|
43
|
+
/** Root node of the hierarchy */
|
|
44
|
+
data: HorizontalTreeData;
|
|
45
|
+
/**
|
|
46
|
+
* Tree growth direction (default: 'LR')
|
|
47
|
+
* - 'LR' left → right
|
|
48
|
+
* - 'RL' right → left
|
|
49
|
+
* - 'TB' top → bottom
|
|
50
|
+
* - 'BT' bottom → top
|
|
51
|
+
*/
|
|
52
|
+
orientation?: HorizontalTreeOrientation;
|
|
53
|
+
/** Chart width in px (default: 800) */
|
|
54
|
+
width?: number;
|
|
55
|
+
/** Chart height in px (default: 500) */
|
|
56
|
+
height?: number;
|
|
57
|
+
/** Horizontal distance between depth levels in px (default: 200) */
|
|
58
|
+
levelSpacing?: number;
|
|
59
|
+
/** Node circle radius in px (default: 10) */
|
|
60
|
+
nodeRadius?: number;
|
|
61
|
+
/** Sort children alphabetically or by value (default: 'name') */
|
|
62
|
+
sortBy?: 'name' | 'value';
|
|
63
|
+
/** Show name labels on nodes (default: true) */
|
|
64
|
+
showLabels?: boolean;
|
|
65
|
+
/** Label font size in px (default: 12) */
|
|
66
|
+
labelFontSize?: number;
|
|
67
|
+
/** Label color — defaults to theme.palette.text.primary */
|
|
68
|
+
labelColor?: string;
|
|
69
|
+
/** Show icons inside node circles (default: true) */
|
|
70
|
+
showIcons?: boolean;
|
|
71
|
+
/** Per-depth color palette — falls back to MUI theme palette */
|
|
72
|
+
chartColors?: string[];
|
|
73
|
+
/** Link stroke opacity (default: 0.4) */
|
|
74
|
+
linkStrokeOpacity?: number;
|
|
75
|
+
/** Link stroke width in px (default: 1.5) */
|
|
76
|
+
linkStrokeWidth?: number;
|
|
77
|
+
/** Link color — defaults to theme.palette.text.secondary */
|
|
78
|
+
linkColor?: string;
|
|
79
|
+
/** Enable Ctrl / Cmd ⌘ + Scroll visual zoom (default: false) */
|
|
80
|
+
zoomable?: boolean;
|
|
81
|
+
/** Enable Ctrl / Cmd ⌘ + Click drill-down into subtrees (default: false) */
|
|
82
|
+
drillable?: boolean;
|
|
83
|
+
/** Fires when drill-down focus changes */
|
|
84
|
+
onFocusChange?: (info: HorizontalTreeZoomInfo) => void;
|
|
85
|
+
/** Show built-in MUI Popover on node click (default: false) */
|
|
86
|
+
showNodePopover?: boolean;
|
|
87
|
+
/** Custom popover content */
|
|
88
|
+
renderNodePopoverContent?: (info: HorizontalTreeNodeInfo) => React.ReactNode;
|
|
89
|
+
/** Fires on every node click */
|
|
90
|
+
onNodeClick?: (info: HorizontalTreeNodeInfo, event: React.MouseEvent<SVGGElement>) => void;
|
|
91
|
+
/** Disables all interactions (default: false) */
|
|
92
|
+
disabled?: boolean;
|
|
93
|
+
/** Override translation strings */
|
|
94
|
+
translation?: Partial<HorizontalTreeTranslation>;
|
|
95
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type RadialTreeChartProps } from "./RadialTreeChart.types";
|
|
2
|
+
export declare function RadialTreeChart({ data, size, autoFit, sortBy, showLabels, showIcons, chartColors, rootNodeRadius, branchNodeRadius, leafNodeRadius, linkColor, linkStrokeOpacity, linkStrokeWidth, labelFontSize, labelColor, separationSibling, separationCousin, zoomable, drillable, onFocusChange, showNodePopover, renderNodePopoverContent, onNodeClick, disabled, translation, }: RadialTreeChartProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare namespace RadialTreeChart {
|
|
4
|
+
var displayName: string;
|
|
5
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
export type RadialTreeSortBy = 'name' | 'value';
|
|
2
|
+
export type RadialTreeChartData = {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
/** Subtitle shown below the name in the built-in node popover */
|
|
6
|
+
subname?: string;
|
|
7
|
+
value?: number;
|
|
8
|
+
/** Custom field A — shown in the built-in node popover */
|
|
9
|
+
specialValueA?: string | number;
|
|
10
|
+
/** Custom field B — shown in the built-in node popover */
|
|
11
|
+
specialValueB?: string | number;
|
|
12
|
+
/** Per-node color overrides — null / omit = use chart default palette */
|
|
13
|
+
colorConfig?: {
|
|
14
|
+
fill?: string;
|
|
15
|
+
textColor?: string;
|
|
16
|
+
stroke?: string;
|
|
17
|
+
} | null;
|
|
18
|
+
children?: RadialTreeChartData[];
|
|
19
|
+
};
|
|
20
|
+
/** Clean payload passed to `onNodeClick` — no D3 or Fluent UI types exposed */
|
|
21
|
+
export type RadialTreeNodeInfo = {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
subname: string | null;
|
|
25
|
+
value: number | null;
|
|
26
|
+
specialValueA: string | number | null;
|
|
27
|
+
specialValueB: string | number | null;
|
|
28
|
+
depth: number;
|
|
29
|
+
/** Breadcrumb from root to this node */
|
|
30
|
+
path: string[];
|
|
31
|
+
childrenCount: number;
|
|
32
|
+
data: RadialTreeChartData;
|
|
33
|
+
};
|
|
34
|
+
export type RadialTreeChartTranslation = {
|
|
35
|
+
/** Shown when data is empty */
|
|
36
|
+
noData: string;
|
|
37
|
+
/** Label for specialValueA in the built-in node popover */
|
|
38
|
+
specialValueA?: string;
|
|
39
|
+
/** Label for specialValueB in the built-in node popover */
|
|
40
|
+
specialValueB?: string;
|
|
41
|
+
};
|
|
42
|
+
export declare const DEFAULT_RADIAL_TREE_CHART_TRANSLATION: RadialTreeChartTranslation;
|
|
43
|
+
export type RadialTreeChartProps = {
|
|
44
|
+
/** Root node of the hierarchy */
|
|
45
|
+
data: RadialTreeChartData;
|
|
46
|
+
/** Width and height of the SVG in pixels (default: 600) */
|
|
47
|
+
size?: number;
|
|
48
|
+
/** Auto-fit viewBox to the rendered content (default: true) */
|
|
49
|
+
autoFit?: boolean;
|
|
50
|
+
/** Sort child nodes alphabetically ('name') or by value ('value') — default: 'name' */
|
|
51
|
+
sortBy?: RadialTreeSortBy;
|
|
52
|
+
/** Show node name labels (default: true) */
|
|
53
|
+
showLabels?: boolean;
|
|
54
|
+
/** Per-depth node colors — falls back to MUI theme palette when omitted */
|
|
55
|
+
chartColors?: string[];
|
|
56
|
+
/** Root node circle radius in px (default: 22) */
|
|
57
|
+
rootNodeRadius?: number;
|
|
58
|
+
/** Branch node circle radius in px (default: 16) */
|
|
59
|
+
branchNodeRadius?: number;
|
|
60
|
+
/** Leaf node circle radius in px (default: 11) */
|
|
61
|
+
leafNodeRadius?: number;
|
|
62
|
+
/** Link line color — defaults to `theme.palette.text.secondary` */
|
|
63
|
+
linkColor?: string;
|
|
64
|
+
/** Link line opacity — 0 to 1 (default: 1) */
|
|
65
|
+
linkStrokeOpacity?: number;
|
|
66
|
+
/** Link line width in px (default: 1.5) */
|
|
67
|
+
linkStrokeWidth?: number;
|
|
68
|
+
/** Label font size in px (default: 12) */
|
|
69
|
+
labelFontSize?: number;
|
|
70
|
+
/** Label text color — defaults to `theme.palette.text.primary` */
|
|
71
|
+
labelColor?: string;
|
|
72
|
+
/** Separation factor between sibling nodes (default: 1) */
|
|
73
|
+
separationSibling?: number;
|
|
74
|
+
/** Separation factor between cousin nodes (default: 2) */
|
|
75
|
+
separationCousin?: number;
|
|
76
|
+
/** Show white icons (folder/person) inside the node circles (default: true) */
|
|
77
|
+
showIcons?: boolean;
|
|
78
|
+
/** Show a built-in MUI Popover with node details on click (default: false) */
|
|
79
|
+
showNodePopover?: boolean;
|
|
80
|
+
/** Render custom content inside the built-in node popover */
|
|
81
|
+
renderNodePopoverContent?: (info: RadialTreeNodeInfo) => React.ReactNode;
|
|
82
|
+
/** Fired on every node click */
|
|
83
|
+
onNodeClick?: (info: RadialTreeNodeInfo, event: React.MouseEvent<SVGGElement>) => void;
|
|
84
|
+
/** Enable Ctrl+Scroll zoom — Ctrl+Wheel zooms in/out, Escape resets (default: false) */
|
|
85
|
+
zoomable?: boolean;
|
|
86
|
+
/** Enable Ctrl+Click drill-down into subtrees, Ctrl+DblClick zoom out (default: false) */
|
|
87
|
+
drillable?: boolean;
|
|
88
|
+
/** Fired when drill-down focus changes — null when reset to root */
|
|
89
|
+
onFocusChange?: (focusedNode: RadialTreeNodeInfo | null) => void;
|
|
90
|
+
/** Disables all interactions (default: false) */
|
|
91
|
+
disabled?: boolean;
|
|
92
|
+
/** Override translation strings */
|
|
93
|
+
translation?: Partial<RadialTreeChartTranslation>;
|
|
94
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SunburstChartProps } from "./SunburstChart.types";
|
|
2
|
-
export declare function SunburstChart({ data, size, showSegmentLabels, innerRadius, sortBy, chartColors, showRootLabel, onSegmentClick, onZoomChange, valueDecimalCount, valueDecimalSeparator, valueThousandsSeparator, disabled, }: SunburstChartProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function SunburstChart({ data, size, showSegmentLabels, innerRadius, sortBy, chartColors, showRootLabel, onSegmentClick, onZoomChange, valueDecimalCount, valueDecimalSeparator, valueThousandsSeparator, zoomable, disabled, }: SunburstChartProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare namespace SunburstChart {
|
|
4
4
|
var displayName: string;
|
|
5
5
|
}
|
|
@@ -3,6 +3,12 @@ export type SunburstChartData = {
|
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
value?: number;
|
|
6
|
+
/** Per-node color overrides — null / omit = use chart default palette */
|
|
7
|
+
colorConfig?: {
|
|
8
|
+
fill?: string;
|
|
9
|
+
textColor?: string;
|
|
10
|
+
stroke?: string;
|
|
11
|
+
} | null;
|
|
6
12
|
children?: SunburstChartData[];
|
|
7
13
|
};
|
|
8
14
|
export type SunburstSegmentInfo = {
|
|
@@ -58,6 +64,8 @@ export type SunburstChartProps = {
|
|
|
58
64
|
valueDecimalSeparator?: string;
|
|
59
65
|
/** Thousands separator for values (default: ',') */
|
|
60
66
|
valueThousandsSeparator?: string;
|
|
67
|
+
/** Enable Ctrl+Scroll zoom — content outside `size` is clipped (default: false) */
|
|
68
|
+
zoomable?: boolean;
|
|
61
69
|
/** Disables all interactions (default: false) */
|
|
62
70
|
disabled?: boolean;
|
|
63
71
|
/** Override any translation string */
|