@nexub/mcp 6.4.0 → 6.5.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.
@@ -14,6 +14,8 @@ Feature-rich data table with sorting and row selection powered by TanStack Table
14
14
  | `data` (required) | `TData[]` | | Array of row data objects to render. |
15
15
  | `getSubRows` | `(row, index) => TData[] \| undefined` | | Nested rows (a tree table). The first column gets an expand toggle (`aria-expanded`) and indents each level; sorting sorts within each level. |
16
16
  | `expanded / defaultExpanded / onExpandedChange` | `ExpandedState` | | Expanded rows by row id (see `getRowId`), or `true` for all. |
17
+ | `onRowOrderChange` | `(data: TData[]) => void` | | Adds a handle column: drag rows, or Alt+ArrowUp/Down on a handle. Hidden while a column is sorted. |
18
+ | `getRowLabel` | `(row) => string` | | Names a row in "Move ‹label›" and the move announcements. |
17
19
  | `caption` | `ReactNode` | | Names the table for assistive tech (and its scroll region). Shown below the table; add `captionHidden` to keep it screen-reader only. |
18
20
  | `enableSorting` | `boolean` | `false` | Click a header to sort; Shift+click adds more columns, numbered 1, 2… (5.3). |
19
21
  | `enableRowSelection` | `boolean` | `false` | Turns on row selection state. |
@@ -0,0 +1,57 @@
1
+ # Kanban
2
+
3
+ Columns of cards people move by dragging or with Alt+Arrow keys.
4
+
5
+ - Package: `@nexub/react` · Category: Data Display · Status: beta
6
+ - Import: `import { Kanban } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/kanban
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `columns` (required) | `{ id, title, items: T[] }[]` | | The board. |
14
+ | `getId / getLabel` (required) | `(item) => string` | | Stable key and the name read when it moves. |
15
+ | `onChange` (required) | `(columns) => void` | | Called with the columns after a move; store them (and save to your server). |
16
+ | `renderCard` (required) | `(item) => ReactNode` | | The card’s content. |
17
+
18
+ ## Example: Task board
19
+
20
+ ```tsx
21
+ 'use client';
22
+
23
+ import * as React from 'react';
24
+ import { Badge, Kanban, type KanbanColumn } from '@nexub/react';
25
+
26
+ type Task = { id: string; title: string; tag?: string };
27
+
28
+ export default function Example() {
29
+ const [columns, setColumns] = React.useState<KanbanColumn<Task>[]>([
30
+ { id: 'todo', title: 'To do', items: [{ id: '1', title: 'Write release notes', tag: 'Docs' }, { id: '2', title: 'Update pricing page' }] },
31
+ { id: 'doing', title: 'In progress', items: [{ id: '3', title: 'Billing migration', tag: 'Backend' }] },
32
+ { id: 'done', title: 'Done', items: [{ id: '4', title: 'Hire designer' }] },
33
+ ]);
34
+ return (
35
+ <Kanban
36
+ columns={columns}
37
+ getId={(t) => t.id}
38
+ getLabel={(t) => t.title}
39
+ onChange={setColumns}
40
+ renderCard={(t) => (
41
+ <div className="flex flex-col items-start gap-1">
42
+ {t.title}
43
+ {t.tag && <Badge>{t.tag}</Badge>}
44
+ </div>
45
+ )}
46
+ />
47
+ );
48
+ }
49
+ ```
50
+
51
+ ## Accessibility
52
+
53
+ - `Alt+ArrowUp / Alt+ArrowDown`: On a handle: moves the card within its column.
54
+ - `Alt+ArrowLeft / Alt+ArrowRight`: Moves the card to the previous or next column. Mirrored in RTL.
55
+ - Each column is a region named by its heading. Moves are announced: "Bravo moved to Done, position 2 of 2".
56
+
57
+ Related: [sortable](sortable.md)
@@ -0,0 +1,44 @@
1
+ # Sortable
2
+
3
+ A list people reorder by dragging or with Alt+Arrow keys on a handle.
4
+
5
+ - Package: `@nexub/react` · Category: Data Display · Status: beta
6
+ - Import: `import { Sortable } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/sortable
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `items` (required) | `T[]` | | The list, in order. |
14
+ | `getId / getLabel` (required) | `(item) => string` | | Stable key, and the name read in "Move ‹label›" and the move announcements. |
15
+ | `onReorder` (required) | `(items: T[]) => void` | | Called with the new order; store it. |
16
+ | `children` (required) | `(item) => ReactNode` | | The item’s content; the handle sits before it. |
17
+ | `aria-label` | `string` | | Names the list. |
18
+
19
+ ## Example: Widget order
20
+
21
+ ```tsx
22
+ 'use client';
23
+
24
+ import * as React from 'react';
25
+ import { Sortable } from '@nexub/react';
26
+
27
+ export default function Example() {
28
+ const [widgets, setWidgets] = React.useState(['Revenue', 'Active users', 'Churn', 'Support tickets']);
29
+ return (
30
+ <Sortable aria-label="Dashboard widgets" items={widgets} getId={(w) => w} getLabel={(w) => w} onReorder={setWidgets} className="w-full max-w-sm">
31
+ {(w) => w}
32
+ </Sortable>
33
+ );
34
+ }
35
+ ```
36
+
37
+ ## Accessibility
38
+
39
+ - `Alt+ArrowUp / Alt+ArrowDown`: On a handle: moves the item; focus stays on its handle.
40
+ - Every handle is a button named "Move ‹label›", described by the key hint.
41
+ - Moves are announced: "Alpha moved to position 3 of 5".
42
+ - Mouse drag uses the native drag-and-drop API, so there is no extra dependency.
43
+
44
+ Related: [kanban](kanban.md), [data-table](data-table.md)
@@ -1,6 +1,6 @@
1
1
  # Component index
2
2
 
3
- Nexub DS v6.4.0. Open `components/<slug>.md` for props, examples and accessibility notes.
3
+ Nexub DS v6.5.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
@@ -40,9 +40,11 @@ Never use a component marked deprecated.
40
40
  - [Funnel](components/funnel.md) `@nexub/react`: Drop-off through ordered steps, with conversion from the first step.
41
41
  - [Gauge](components/gauge.md) `@nexub/react`: Progress toward a target on a 270° arc.
42
42
  - [Heatmap](components/heatmap.md) `@nexub/react`: Intensity over a grid, such as activity by weekday and week, in seven sequential steps.
43
+ - [Kanban](components/kanban.md) `@nexub/react`: Columns of cards people move by dragging or with Alt+Arrow keys.
43
44
  - [KPI Tile](components/kpi-tile.md) `@nexub/react`: A headline number with its change versus last period and a trend line.
44
45
  - [Line Chart](components/line-chart.md) `@nexub/react`: Show a trend over ordered categories such as time. Server-rendered SVG on the chart palette.
45
46
  - [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.
47
+ - [Sortable](components/sortable.md) `@nexub/react`: A list people reorder by dragging or with Alt+Arrow keys on a handle.
46
48
  - [Sparkline](components/sparkline.md) `@nexub/react`: A tiny trend line with no axes, for stat cards and table cells.
47
49
  - [Table](components/table.md) `@nexub/react`: Semantic HTML table with styled variants.
48
50
 
@@ -1,6 +1,6 @@
1
1
  # Tokens
2
2
 
3
- Nexub DS v6.4.0. Every token is a CSS custom property from `@nexub/tokens/css` (loaded by `@nexub/themes/base`).
3
+ Nexub DS v6.5.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": "6.4.0",
3
+ "version": "6.5.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",