@nexub/mcp 4.4.0 → 4.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.
@@ -0,0 +1,46 @@
1
+ # Chart Toggle
2
+
3
+ A legend whose entries switch series on and off, wrapped around any chart.
4
+
5
+ - Package: `@nexub/react` · Category: Data Display · Status: beta
6
+ - Import: `import { ChartToggle } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/chart-toggle
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `series` (required) | `ChartSeries[]` | | The same series the chart takes. |
14
+ | `children` (required) | `(visible: ChartSeries[]) => ReactNode` | | Renders the chart with the series that are on. Colours stay stable. |
15
+ | `label` | `string` | `'Series'` | Accessible name for the group of toggles. |
16
+
17
+ ## Example: Toggle series
18
+
19
+ ```tsx
20
+ 'use client';
21
+
22
+ import { ChartToggle, LineChart } from '@nexub/react';
23
+
24
+ const data = [
25
+ { m: 'May', web: 120, ios: 80, android: 60 },
26
+ { m: 'Jun', web: 140, ios: 95, android: 72 },
27
+ { m: 'Jul', web: 150, ios: 110, android: 90 },
28
+ { m: 'Aug', web: 170, ios: 128, android: 101 },
29
+ ];
30
+ const series = [{ key: 'web', label: 'Web' }, { key: 'ios', label: 'iOS' }, { key: 'android', label: 'Android' }];
31
+
32
+ export default function Example() {
33
+ return (
34
+ <ChartToggle series={series} className="w-full">
35
+ {(visible) => <LineChart legend={false} title="Signups by platform" data={data} index="m" series={visible} />}
36
+ </ChartToggle>
37
+ );
38
+ }
39
+ ```
40
+
41
+ ## Accessibility
42
+
43
+ - `Tab / Space`: Move between series and switch one on or off.
44
+ - Each series is a toggle button with `aria-pressed`. The last visible series cannot be switched off.
45
+
46
+ Related: [bar-chart](bar-chart.md), [line-chart](line-chart.md)
@@ -0,0 +1,36 @@
1
+ # Funnel
2
+
3
+ Drop-off through ordered steps, with conversion from the first step.
4
+
5
+ - Package: `@nexub/react` · Category: Data Display · Status: beta
6
+ - Import: `import { Funnel } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/funnel
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `data` (required) | `{ label: string; value: number }[]` | | Steps in order, largest first. |
14
+ | `title` (required) | `string` | | Accessible name and table caption. |
15
+
16
+ ## Example: Signup funnel
17
+
18
+ ```tsx
19
+ import { Funnel } from '@nexub/react';
20
+
21
+ export default function Example() {
22
+ return (
23
+ <Funnel
24
+ className="w-full"
25
+ title="Signup funnel, October"
26
+ data={[{ label: 'Visited', value: 12400 }, { label: 'Started signup', value: 4100 }, { label: 'Verified email', value: 2900 }, { label: 'First payment', value: 1240 }]}
27
+ />
28
+ );
29
+ }
30
+ ```
31
+
32
+ ## Accessibility
33
+
34
+ - The drawing is hidden from assistive tech; a visually hidden table or caption carries every value.
35
+
36
+ Related: [bar-chart](bar-chart.md), [line-chart](line-chart.md)
@@ -0,0 +1,33 @@
1
+ # Gauge
2
+
3
+ Progress toward a target on a 270° arc.
4
+
5
+ - Package: `@nexub/react` · Category: Data Display · Status: beta
6
+ - Import: `import { Gauge } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/gauge
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `value` (required) | `number` | | Current value. |
14
+ | `max` | `number` | `100` | Target. |
15
+ | `title` (required) | `string` | | Accessible name. |
16
+ | `label` | `ReactNode` | | Centre text; defaults to the percentage. |
17
+ | `color` | `ChartColor` | `1` | Palette colour, 1–8. |
18
+
19
+ ## Example: Storage used
20
+
21
+ ```tsx
22
+ import { Gauge } from '@nexub/react';
23
+
24
+ export default function Example() {
25
+ return <Gauge title="Storage used" value={68} max={100} label="68 GB" color={2} />;
26
+ }
27
+ ```
28
+
29
+ ## Accessibility
30
+
31
+ - The drawing is hidden from assistive tech; a visually hidden table or caption carries every value.
32
+
33
+ Related: [bar-chart](bar-chart.md), [line-chart](line-chart.md)
@@ -0,0 +1,35 @@
1
+ # Heatmap
2
+
3
+ Intensity over a grid, such as activity by weekday and week, in seven sequential steps.
4
+
5
+ - Package: `@nexub/react` · Category: Data Display · Status: beta
6
+ - Import: `import { Heatmap } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/heatmap
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `data` (required) | `number[][]` | | Rows of values. |
14
+ | `rowLabels` (required) | `string[]` | | One label per row. |
15
+ | `columnLabels` | `string[]` | | Used in the hover text. |
16
+ | `title` (required) | `string` | | Accessible name and table caption. |
17
+
18
+ ## Example: Weekly activity
19
+
20
+ ```tsx
21
+ import { Heatmap } from '@nexub/react';
22
+
23
+ const days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'];
24
+ const data = days.map((_, d) => Array.from({ length: 16 }, (_, w) => ((d * 7 + w * 3) % 11) + (w > 10 ? 4 : 0)));
25
+
26
+ export default function Example() {
27
+ return <Heatmap className="w-full" title="Payments sent per day, last 16 weeks" rowLabels={days} data={data} />;
28
+ }
29
+ ```
30
+
31
+ ## Accessibility
32
+
33
+ - The drawing is hidden from assistive tech; a visually hidden table or caption carries every value.
34
+
35
+ Related: [bar-chart](bar-chart.md), [line-chart](line-chart.md)
@@ -0,0 +1,39 @@
1
+ # KPI Tile
2
+
3
+ A headline number with its change versus last period and a trend line.
4
+
5
+ - Package: `@nexub/react` · Category: Data Display · Status: beta
6
+ - Import: `import { KpiTile } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/kpi-tile
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `label` (required) | `string` | | What the number is. |
14
+ | `value` (required) | `ReactNode` | | The formatted number. |
15
+ | `change` | `number` | | Change as a fraction, e.g. 0.114 for +11.4%. |
16
+ | `invert` | `boolean` | `false` | Down is good (churn, costs): flips the colour. |
17
+ | `trend` | `number[]` | | Recent values for the sparkline, oldest first. |
18
+
19
+ ## Example: Dashboard row
20
+
21
+ ```tsx
22
+ import { KpiTile } from '@nexub/react';
23
+
24
+ export default function Example() {
25
+ return (
26
+ <div className="grid w-full gap-3 sm:grid-cols-3">
27
+ <KpiTile label="Monthly revenue" value="$68,420" change={0.114} trend={[42, 48, 45, 56, 61, 68]} />
28
+ <KpiTile label="Customers" value="1,204" change={0.032} trend={[1080, 1100, 1150, 1170, 1190, 1204]} />
29
+ <KpiTile label="Churn" value="2.1%" change={0.004} invert trend={[1.8, 1.9, 2.0, 1.9, 2.0, 2.1]} />
30
+ </div>
31
+ );
32
+ }
33
+ ```
34
+
35
+ ## Accessibility
36
+
37
+ - The drawing is hidden from assistive tech; a visually hidden table or caption carries every value.
38
+
39
+ Related: [bar-chart](bar-chart.md), [line-chart](line-chart.md)
@@ -1,6 +1,6 @@
1
1
  # Component index
2
2
 
3
- Nexub DS v4.4.0. Open `components/<slug>.md` for props, examples and accessibility notes.
3
+ Nexub DS v4.6.0. Open `components/<slug>.md` for props, examples and accessibility notes.
4
4
  Never use a component marked deprecated.
5
5
 
6
6
  ## Components — Actions
@@ -27,10 +27,15 @@ Never use a component marked deprecated.
27
27
 
28
28
  - [Amount](components/amount.md) `@nexub/react`: Honest money: Intl formatting, tabular numerals, the currency’s minor unit and a true minus sign.
29
29
  - [Bar Chart](components/bar-chart.md) `@nexub/react`: Compare values across categories, grouped or stacked. Server-rendered SVG on the chart palette.
30
+ - [Chart Toggle](components/chart-toggle.md) `@nexub/react`: A legend whose entries switch series on and off, wrapped around any chart.
30
31
  - [Data Table](components/data-table.md) `@nexub/react`: Feature-rich data table with sorting and row selection powered by TanStack Table.
31
32
  - [Donut Chart](components/donut-chart.md) `@nexub/react`: Parts of a whole, with an optional total in the hole. Keep it to six slices or fewer.
32
33
  - [Empty State](components/empty-state.md) `@nexub/react`: Placeholder UI shown when a list or page has no content.
33
34
  - [Error State](components/error-state.md) `@nexub/react`: Full-page or section error view with retry action.
35
+ - [Funnel](components/funnel.md) `@nexub/react`: Drop-off through ordered steps, with conversion from the first step.
36
+ - [Gauge](components/gauge.md) `@nexub/react`: Progress toward a target on a 270° arc.
37
+ - [Heatmap](components/heatmap.md) `@nexub/react`: Intensity over a grid, such as activity by weekday and week, in seven sequential steps.
38
+ - [KPI Tile](components/kpi-tile.md) `@nexub/react`: A headline number with its change versus last period and a trend line.
34
39
  - [Line Chart](components/line-chart.md) `@nexub/react`: Show a trend over ordered categories such as time. Server-rendered SVG on the chart palette.
35
40
  - [Number Ticker](components/number-ticker.md) `@nexub/react`: A number whose digits roll to new values on the spatial spring. The first render never animates.
36
41
  - [Sparkline](components/sparkline.md) `@nexub/react`: A tiny trend line with no axes, for stat cards and table cells.
@@ -1,6 +1,6 @@
1
1
  # Tokens
2
2
 
3
- Nexub DS v4.4.0. Every token is a CSS custom property from `@nexub/tokens/css` (loaded by `@nexub/themes/base`).
3
+ Nexub DS v4.6.0. Every token is a CSS custom property from `@nexub/tokens/css` (loaded by `@nexub/themes/base`).
4
4
  The Tailwind preset (`@nexub/tokens/tailwind`) maps them to utilities. Never hardcode a hex, px spacing or shadow that a token covers.
5
5
 
6
6
  ## Color roles
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexub/mcp",
3
- "version": "4.4.0",
3
+ "version": "4.6.0",
4
4
  "description": "MCP server for Nexub Design System: gives Claude, Cursor and any MCP client the components, patterns, tokens and design rules of the installed release.",
5
5
  "type": "module",
6
6
  "license": "MIT",