@nexub/mcp 6.3.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.
@@ -0,0 +1,48 @@
1
+ # Action Bar
2
+
3
+ Save and cancel that stay in view at the bottom of a long form.
4
+
5
+ - Package: `@nexub/react` · Category: Form & Input · Status: beta
6
+ - Import: `import { ActionBar } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/action-bar
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `message` | `ReactNode` | | Status on the start side, e.g. "Unsaved changes"; announced politely and names the region. |
14
+ | `children` (required) | `ReactNode` | | The actions, primary last. |
15
+
16
+ ## Example: Unsaved changes
17
+
18
+ ```tsx
19
+ 'use client';
20
+
21
+ import * as React from 'react';
22
+ import { ActionBar, Button, Input, useUnsavedChanges } from '@nexub/react';
23
+
24
+ export default function Example() {
25
+ const [saved, setSaved] = React.useState('Acme');
26
+ const [name, setName] = React.useState('Acme');
27
+ const dirty = name !== saved;
28
+ useUnsavedChanges(dirty);
29
+ return (
30
+ <div className="flex w-full max-w-lg flex-col gap-4">
31
+ <Input aria-label="Company name" value={name} onChange={(e) => setName(e.target.value)} />
32
+ {dirty && (
33
+ <ActionBar message="Unsaved changes">
34
+ <Button variant="text" onClick={() => setName(saved)}>Discard</Button>
35
+ <Button onClick={() => setSaved(name)}>Save</Button>
36
+ </ActionBar>
37
+ )}
38
+ </div>
39
+ );
40
+ }
41
+ ```
42
+
43
+ ## Accessibility
44
+
45
+ - A region named by its message. Sticky at the bottom of its scrolling parent, so put it last in the form.
46
+ - Pair with `useUnsavedChanges(dirty)` to warn before leaving the page.
47
+
48
+ Related: [form](form.md), [data-table](data-table.md)
@@ -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,45 @@
1
+ # Resizable Panels
2
+
3
+ Panels with draggable separators, for list–detail and editor layouts.
4
+
5
+ - Package: `@nexub/react` · Category: Layout · Status: beta
6
+ - Import: `import { ResizablePanels } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/resizable-panels
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `children` (required) | `ReactNode` | | The panels; a separator goes between each pair. |
14
+ | `direction` | `'horizontal' \| 'vertical'` | `'horizontal'` | Side by side or stacked. |
15
+ | `sizes / defaultSizes / onSizesChange` | `number[]` | | One percentage per panel, adding up to 100. Save them (localStorage, user settings) to restore the layout. |
16
+ | `minSizes` | `number[]` | `10 each` | Smallest size per panel, in percent. |
17
+ | `handleLabel` | `string` | `"Resize panels"` | Names the separators. |
18
+
19
+ ## Example: List and detail
20
+
21
+ ```tsx
22
+ import { ResizablePanels } from '@nexub/react';
23
+
24
+ export default function Example() {
25
+ return (
26
+ <ResizablePanels defaultSizes={[35, 65]} minSizes={[20, 30]} className="h-64 w-full rounded-shape-container border border-[var(--color-outline-variant)]">
27
+ <ul className="flex flex-col gap-2 p-4 text-body-md">
28
+ <li>Quarterly report</li>
29
+ <li>Launch checklist</li>
30
+ <li>Hiring plan</li>
31
+ </ul>
32
+ <div className="p-4 text-body-md">Drag the line, or focus it with Tab and use the arrow keys.</div>
33
+ </ResizablePanels>
34
+ );
35
+ }
36
+ ```
37
+
38
+ ## Accessibility
39
+
40
+ - Roles: separator (focusable, with aria-valuenow / min / max and aria-controls)
41
+ - `Arrow keys`: Move the focused separator by 5%. Mirrored in RTL.
42
+ - `Home / End`: To the smallest or largest size.
43
+ - `Enter`: Back to the default split.
44
+
45
+ Related: [sidebar](sidebar.md), [app-shell](app-shell.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)
@@ -0,0 +1,65 @@
1
+ # Stepper
2
+
3
+ Progress through a multi-step flow, with clickable steps that follow the order you allow.
4
+
5
+ - Package: `@nexub/react` · Category: Navigation · Status: beta
6
+ - Import: `import { Stepper } from '@nexub/react';`
7
+ - Docs: https://nexub-ds-docs.pages.dev/components/stepper
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | --- | --- | --- | --- |
13
+ | `steps` (required) | `{ id, label, description? }[]` | | The steps in order. |
14
+ | `current` (required) | `number` | | Index of the step being shown. |
15
+ | `completed` | `number[]` | | Finished steps. Defaults to every step before `current`. |
16
+ | `onStepChange` | `(index) => void` | | Makes reachable steps buttons: finished ones and the first unfinished one. |
17
+ | `nonLinear` | `boolean` | | Every step is reachable. |
18
+ | `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Vertical suits side columns and narrow screens. |
19
+ | `aria-label` | `string` | | Names the navigation landmark, e.g. "Setup steps". |
20
+
21
+ ## Example: Wizard with a form per step
22
+
23
+ ```tsx
24
+ 'use client';
25
+
26
+ import * as React from 'react';
27
+ import { Button, Form, FormField, Input, Stepper } from '@nexub/react';
28
+
29
+ const steps = [
30
+ { id: 'account', label: 'Account' },
31
+ { id: 'workspace', label: 'Workspace' },
32
+ { id: 'done', label: 'Done' },
33
+ ];
34
+
35
+ export default function Example() {
36
+ const [current, setCurrent] = React.useState(0);
37
+ return (
38
+ <div className="flex w-full max-w-lg flex-col gap-6">
39
+ <Stepper aria-label="Sign-up steps" steps={steps} current={current} onStepChange={setCurrent} />
40
+ {current < 2 ? (
41
+ <Form key={current} onSubmit={() => setCurrent(current + 1)}>
42
+ <FormField.Root name={current === 0 ? 'email' : 'workspace'} required>
43
+ <FormField.Label>{current === 0 ? 'Work email' : 'Workspace name'}</FormField.Label>
44
+ <FormField.Control>
45
+ <Input type={current === 0 ? 'email' : 'text'} />
46
+ </FormField.Control>
47
+ <FormField.Error />
48
+ </FormField.Root>
49
+ <Button type="submit" className="self-start">Continue</Button>
50
+ </Form>
51
+ ) : (
52
+ <p className="text-body-md">All set.</p>
53
+ )}
54
+ </div>
55
+ );
56
+ }
57
+ ```
58
+
59
+ ## Accessibility
60
+
61
+ - A `nav` with an ordered list; the current step has `aria-current="step"`.
62
+ - Each step reads "Step 2 of 4: Billing", plus "completed" when finished.
63
+ - Validate each step with a Form and move `current` on its submit.
64
+
65
+ Related: [form](form.md), [tabs](tabs.md)
@@ -1,6 +1,6 @@
1
1
  # Component index
2
2
 
3
- Nexub DS v6.3.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
 
@@ -66,6 +68,7 @@ Never use a component marked deprecated.
66
68
 
67
69
  ## Components — Form & Input
68
70
 
71
+ - [Action Bar](components/action-bar.md) `@nexub/react`: Save and cancel that stay in view at the bottom of a long form.
69
72
  - [Date Picker](components/date-picker.md) `@nexub/react`: Calendar date picker with text input.
70
73
  - [Date Range Picker](components/date-range-picker.md) `@nexub/react`: Dual-calendar date range selector.
71
74
  - [Date Time Picker](components/date-time-picker.md) `@nexub/react`: A DatePicker and a TimePicker that edit one Date, with an optional time-zone label.
@@ -131,6 +134,7 @@ Never use a component marked deprecated.
131
134
  - [Flex](components/flex.md) `@nexub/react`: Flexbox layout primitive.
132
135
  - [Grid](components/grid.md) `@nexub/react`: CSS Grid layout primitive.
133
136
  - [Media Card](components/media-card.md) `@nexub/react`: An image card with a glass caption over a soft scrim. With `href`, the whole card is one link.
137
+ - [Resizable Panels](components/resizable-panels.md) `@nexub/react`: Panels with draggable separators, for list–detail and editor layouts.
134
138
  - [Stack](components/stack.md) `@nexub/react`: Vertical stack layout with configurable gap.
135
139
 
136
140
  ## Components — Loading States
@@ -156,6 +160,7 @@ Never use a component marked deprecated.
156
160
  - [Navigation Rail](components/navigation-rail.md) `@nexub/react`: Navigation for medium-width windows: icons over labels, with an active pill behind the icon.
157
161
  - [Pagination](components/pagination.md) `@nexub/react`: Page navigation control with prev/next and page number buttons.
158
162
  - [Saved Views](components/saved-views.md) `@nexub/react`: A menu to switch, save, update and delete saved filter views. Your app stores them.
163
+ - [Stepper](components/stepper.md) `@nexub/react`: Progress through a multi-step flow, with clickable steps that follow the order you allow.
159
164
  - [Tabs](components/tabs.md) `@nexub/react`: Layered content panels switched by tab triggers. Built on Radix UI Tabs.
160
165
  - [Tree View](components/tree-view.md) `@nexub/react`: A keyboard-friendly hierarchy (ARIA tree) with lazy children and tri-state checkboxes.
161
166
 
@@ -1,6 +1,6 @@
1
1
  # Tokens
2
2
 
3
- Nexub DS v6.3.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.3.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",