@nexub/mcp 6.3.0 → 6.4.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/dist/skill/references/components/action-bar.md +48 -0
- package/dist/skill/references/components/resizable-panels.md +45 -0
- package/dist/skill/references/components/stepper.md +65 -0
- package/dist/skill/references/components.md +4 -1
- package/dist/skill/references/tokens.md +1 -1
- package/package.json +1 -1
|
@@ -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)
|
|
@@ -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,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
|
+
Nexub DS v6.4.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
|
|
@@ -66,6 +66,7 @@ Never use a component marked deprecated.
|
|
|
66
66
|
|
|
67
67
|
## Components — Form & Input
|
|
68
68
|
|
|
69
|
+
- [Action Bar](components/action-bar.md) `@nexub/react`: Save and cancel that stay in view at the bottom of a long form.
|
|
69
70
|
- [Date Picker](components/date-picker.md) `@nexub/react`: Calendar date picker with text input.
|
|
70
71
|
- [Date Range Picker](components/date-range-picker.md) `@nexub/react`: Dual-calendar date range selector.
|
|
71
72
|
- [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 +132,7 @@ Never use a component marked deprecated.
|
|
|
131
132
|
- [Flex](components/flex.md) `@nexub/react`: Flexbox layout primitive.
|
|
132
133
|
- [Grid](components/grid.md) `@nexub/react`: CSS Grid layout primitive.
|
|
133
134
|
- [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.
|
|
135
|
+
- [Resizable Panels](components/resizable-panels.md) `@nexub/react`: Panels with draggable separators, for list–detail and editor layouts.
|
|
134
136
|
- [Stack](components/stack.md) `@nexub/react`: Vertical stack layout with configurable gap.
|
|
135
137
|
|
|
136
138
|
## Components — Loading States
|
|
@@ -156,6 +158,7 @@ Never use a component marked deprecated.
|
|
|
156
158
|
- [Navigation Rail](components/navigation-rail.md) `@nexub/react`: Navigation for medium-width windows: icons over labels, with an active pill behind the icon.
|
|
157
159
|
- [Pagination](components/pagination.md) `@nexub/react`: Page navigation control with prev/next and page number buttons.
|
|
158
160
|
- [Saved Views](components/saved-views.md) `@nexub/react`: A menu to switch, save, update and delete saved filter views. Your app stores them.
|
|
161
|
+
- [Stepper](components/stepper.md) `@nexub/react`: Progress through a multi-step flow, with clickable steps that follow the order you allow.
|
|
159
162
|
- [Tabs](components/tabs.md) `@nexub/react`: Layered content panels switched by tab triggers. Built on Radix UI Tabs.
|
|
160
163
|
- [Tree View](components/tree-view.md) `@nexub/react`: A keyboard-friendly hierarchy (ARIA tree) with lazy children and tri-state checkboxes.
|
|
161
164
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Tokens
|
|
2
2
|
|
|
3
|
-
Nexub DS v6.
|
|
3
|
+
Nexub DS v6.4.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
|
+
"version": "6.4.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",
|