@nexub/mcp 5.5.0 → 5.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/dist/skill/references/components/alert-dialog.md +32 -0
- package/dist/skill/references/components/empty-state.md +19 -0
- package/dist/skill/references/components/otp-input.md +49 -0
- package/dist/skill/references/components.md +3 -2
- package/dist/skill/references/tokens.md +1 -1
- package/package.json +1 -1
|
@@ -19,6 +19,7 @@ Confirmation dialog that requires an explicit user action before proceeding.
|
|
|
19
19
|
| `AlertDialog.Description` | `compound` | | Supporting description text for the dialog. |
|
|
20
20
|
| `AlertDialog.Action` | `compound` | | Confirms the destructive or affirmative action and closes the dialog. |
|
|
21
21
|
| `AlertDialog.Cancel` | `compound` | | Cancels the action and closes the dialog. |
|
|
22
|
+
| `AlertDialog.Confirm text` | `string` | | Type-to-confirm (5.6): the Action stays disabled until this text is typed. For irreversible actions on named resources. |
|
|
22
23
|
|
|
23
24
|
## Example: Default
|
|
24
25
|
|
|
@@ -50,3 +51,34 @@ export default function Example() {
|
|
|
50
51
|
);
|
|
51
52
|
}
|
|
52
53
|
```
|
|
54
|
+
|
|
55
|
+
## Example: Type to confirm
|
|
56
|
+
|
|
57
|
+
Deleting a workspace asks for its name first.
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
'use client';
|
|
61
|
+
|
|
62
|
+
import { AlertDialog, Button } from '@nexub/react';
|
|
63
|
+
|
|
64
|
+
export default function Example() {
|
|
65
|
+
return (
|
|
66
|
+
<AlertDialog.Root>
|
|
67
|
+
<AlertDialog.Trigger asChild>
|
|
68
|
+
<Button variant="destructive">Delete workspace</Button>
|
|
69
|
+
</AlertDialog.Trigger>
|
|
70
|
+
<AlertDialog.Content>
|
|
71
|
+
<AlertDialog.Header>
|
|
72
|
+
<AlertDialog.Title>Delete acme-prod?</AlertDialog.Title>
|
|
73
|
+
<AlertDialog.Description>All projects, members and billing history go with it. This can’t be undone.</AlertDialog.Description>
|
|
74
|
+
</AlertDialog.Header>
|
|
75
|
+
<AlertDialog.Confirm text="acme-prod" />
|
|
76
|
+
<AlertDialog.Footer>
|
|
77
|
+
<AlertDialog.Cancel>Cancel</AlertDialog.Cancel>
|
|
78
|
+
<AlertDialog.Action>Delete workspace</AlertDialog.Action>
|
|
79
|
+
</AlertDialog.Footer>
|
|
80
|
+
</AlertDialog.Content>
|
|
81
|
+
</AlertDialog.Root>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
```
|
|
@@ -15,6 +15,8 @@ Placeholder UI shown when a list or page has no content.
|
|
|
15
15
|
| `EmptyState.Title children` (required) | `React.ReactNode` | | Primary heading text for the empty state. |
|
|
16
16
|
| `EmptyState.Description children` | `React.ReactNode` | | Supporting text providing more context or guidance. |
|
|
17
17
|
| `EmptyState.Actions children` | `React.ReactNode` | | One or more action buttons rendered below the description. |
|
|
18
|
+
| `EmptyStatePreset kind` (required) | `'noData' \| 'noResults' \| 'noAccess' \| 'serverError' \| 'offline'` | | Ready-made icon, title and description (5.6). serverError and offline are announced as alerts. |
|
|
19
|
+
| `EmptyStatePreset title / description / actions` | `ReactNode` | | Override the localised text; add buttons such as Retry. |
|
|
18
20
|
|
|
19
21
|
## Example: Default
|
|
20
22
|
|
|
@@ -65,3 +67,20 @@ export default function Example() {
|
|
|
65
67
|
);
|
|
66
68
|
}
|
|
67
69
|
```
|
|
70
|
+
|
|
71
|
+
## Example: Presets
|
|
72
|
+
|
|
73
|
+
`EmptyStatePreset` for no data, no results, no access (403), server error (500) and offline.
|
|
74
|
+
|
|
75
|
+
```tsx
|
|
76
|
+
import { Button, EmptyStatePreset } from '@nexub/react';
|
|
77
|
+
|
|
78
|
+
export default function Example() {
|
|
79
|
+
return (
|
|
80
|
+
<div className="grid w-full gap-4 sm:grid-cols-2">
|
|
81
|
+
<EmptyStatePreset kind="noResults" actions={<Button variant="outline" size="sm">Clear filters</Button>} />
|
|
82
|
+
<EmptyStatePreset kind="serverError" actions={<Button size="sm">Retry</Button>} />
|
|
83
|
+
</div>
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# OTP Input
|
|
2
|
+
|
|
3
|
+
One box per digit for verification codes, with paste and one-time-code autofill.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Form Controls · Status: beta
|
|
6
|
+
- Import: `import { OtpInput } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/otp-input
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `length` | `number` | `6` | Number of boxes. |
|
|
14
|
+
| `value / defaultValue / onValueChange` | `string` | | The code so far, without gaps. |
|
|
15
|
+
| `onComplete` | `(code: string) => void` | | Called when every box is filled; submit or verify here. |
|
|
16
|
+
| `mode` | `'numeric' \| 'alphanumeric'` | `'numeric'` | Numeric shows the number keypad on phones. |
|
|
17
|
+
| `invalid / disabled` | `boolean` | | Error styling (pair with a FormError) and the disabled state. |
|
|
18
|
+
| `name` | `string` | | Submits the code with a form. |
|
|
19
|
+
| `aria-label` | `string` | `'Verification code'` | Group name; each box reads "Digit N of M". |
|
|
20
|
+
|
|
21
|
+
## Example: Verification code
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
'use client';
|
|
25
|
+
|
|
26
|
+
import * as React from 'react';
|
|
27
|
+
import { OTPInput } from '@nexub/react';
|
|
28
|
+
|
|
29
|
+
export default function Example() {
|
|
30
|
+
const [status, setStatus] = React.useState('');
|
|
31
|
+
return (
|
|
32
|
+
<div className="flex flex-col items-start gap-3">
|
|
33
|
+
<OTPInput onComplete={(code) => setStatus(code === '123456' ? 'Verified' : 'That code didn’t work')} onValueChange={() => setStatus('')} />
|
|
34
|
+
<p aria-live="polite" className="text-body-sm text-[var(--color-on-surface-muted)]">
|
|
35
|
+
{status || 'Try 123456'}
|
|
36
|
+
</p>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Accessibility
|
|
43
|
+
|
|
44
|
+
- `Type`: Fills the box and moves to the next.
|
|
45
|
+
- `Backspace`: Clears the box, or the previous one when empty.
|
|
46
|
+
- `ArrowLeft / ArrowRight`: Moves between boxes.
|
|
47
|
+
- The first box has `autocomplete="one-time-code"`, so the code from an SMS fills every box.
|
|
48
|
+
|
|
49
|
+
Related: [input](input.md), [password-input](password-input.md)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Component index
|
|
2
2
|
|
|
3
|
-
Nexub DS v5.
|
|
3
|
+
Nexub DS v5.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
|
|
@@ -85,6 +85,7 @@ Never use a component marked deprecated.
|
|
|
85
85
|
- [Combobox](components/combobox.md) `@nexub/react`: Command-palette style searchable dropdown built on cmdk.
|
|
86
86
|
- [Filter Builder](components/filter-builder.md) `@nexub/react`: Build AND/OR filter queries with nested groups. The output is plain JSON your app runs.
|
|
87
87
|
- [Multi Select](components/multi-select.md) `@nexub/react`: Pick several options as chips, with search, "+N more" and an optional create option.
|
|
88
|
+
- [OTP Input](components/otp-input.md) `@nexub/react`: One box per digit for verification codes, with paste and one-time-code autofill.
|
|
88
89
|
- [Radio Card](components/radio-card.md) `@nexub/react`: A radio group where each option is a whole card: title, description and optional icon, one choice.
|
|
89
90
|
- [Radio Group](components/radio-group.md) `@nexub/react`: Group of mutually exclusive radio inputs.
|
|
90
91
|
- [Select](components/select.md) `@nexub/react`: Accessible dropdown select built on Radix UI. Supports groups and search.
|
|
@@ -227,5 +228,5 @@ Never use a component marked deprecated.
|
|
|
227
228
|
|
|
228
229
|
These exist; read their TypeScript props in `node_modules/<package>/dist/index.d.ts`.
|
|
229
230
|
|
|
230
|
-
- `@nexub/react`: AgentKit, AppShell, AspectRatio, Chart, CheckList, Code, CommandPalette, Container, ContextMenu, CountryBadge, DataTableVirtual, DropdownMenu, FileUpload, Flag, FormError, KeyboardShortcut, Logo, Menubar, Motion, NavigationMenu, NexubProvider, PageHeader, Section, Sidebar, ThemeProvider, Toolbar, TopNav, VisuallyHidden
|
|
231
|
+
- `@nexub/react`: AgentKit, AppShell, AspectRatio, Chart, CheckList, Code, CommandPalette, Container, ContextMenu, CountryBadge, DataTableVirtual, DropdownMenu, FileUpload, Flag, FormError, KeyboardShortcut, Logo, Menubar, Motion, NavigationMenu, NexubProvider, OTPInput, PageHeader, Section, Sidebar, ThemeProvider, Toolbar, TopNav, VisuallyHidden
|
|
231
232
|
- `@nexub/patterns`: ActivityPage, AppHeader, AppLauncher, ChatPage, CheckoutPage, DashboardPage, PageFrame, PaywallPage, SettingsLayout, SettingsPage, SignInPage, TransactionDetailPage
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Tokens
|
|
2
2
|
|
|
3
|
-
Nexub DS v5.
|
|
3
|
+
Nexub DS v5.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": "5.
|
|
3
|
+
"version": "5.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",
|