@nexub/mcp 0.0.0-stage → 1.8.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/README.md +40 -2
- package/dist/skill/SKILL.md +97 -0
- package/dist/skill/references/components/accordion.md +77 -0
- package/dist/skill/references/components/activity-feed.md +33 -0
- package/dist/skill/references/components/alert-dialog.md +48 -0
- package/dist/skill/references/components/alert.md +54 -0
- package/dist/skill/references/components/amount.md +34 -0
- package/dist/skill/references/components/auth-card.md +33 -0
- package/dist/skill/references/components/autocomplete.md +54 -0
- package/dist/skill/references/components/avatar-group.md +26 -0
- package/dist/skill/references/components/avatar.md +48 -0
- package/dist/skill/references/components/badge.md +71 -0
- package/dist/skill/references/components/banner.md +32 -0
- package/dist/skill/references/components/bento-grid.md +42 -0
- package/dist/skill/references/components/box.md +35 -0
- package/dist/skill/references/components/breadcrumb.md +61 -0
- package/dist/skill/references/components/button-group.md +43 -0
- package/dist/skill/references/components/button.md +118 -0
- package/dist/skill/references/components/callout.md +27 -0
- package/dist/skill/references/components/card.md +74 -0
- package/dist/skill/references/components/checkbox-card.md +49 -0
- package/dist/skill/references/components/checkbox.md +51 -0
- package/dist/skill/references/components/chip.md +35 -0
- package/dist/skill/references/components/citation.md +61 -0
- package/dist/skill/references/components/code-inline.md +25 -0
- package/dist/skill/references/components/collapsible.md +71 -0
- package/dist/skill/references/components/combobox.md +40 -0
- package/dist/skill/references/components/conversation.md +100 -0
- package/dist/skill/references/components/data-table.md +70 -0
- package/dist/skill/references/components/date-picker.md +56 -0
- package/dist/skill/references/components/date-range-picker.md +48 -0
- package/dist/skill/references/components/dialog.md +57 -0
- package/dist/skill/references/components/drawer.md +79 -0
- package/dist/skill/references/components/empty-state.md +77 -0
- package/dist/skill/references/components/error-state.md +37 -0
- package/dist/skill/references/components/error-summary.md +71 -0
- package/dist/skill/references/components/eyebrow-chip.md +28 -0
- package/dist/skill/references/components/filter-bar.md +36 -0
- package/dist/skill/references/components/filter-chip.md +26 -0
- package/dist/skill/references/components/flex.md +47 -0
- package/dist/skill/references/components/form-field.md +26 -0
- package/dist/skill/references/components/gradient-divider.md +13 -0
- package/dist/skill/references/components/grid.md +39 -0
- package/dist/skill/references/components/heading.md +46 -0
- package/dist/skill/references/components/helper-text.md +31 -0
- package/dist/skill/references/components/hover-card.md +34 -0
- package/dist/skill/references/components/icon-button.md +44 -0
- package/dist/skill/references/components/info-list.md +25 -0
- package/dist/skill/references/components/input.md +78 -0
- package/dist/skill/references/components/kbd.md +42 -0
- package/dist/skill/references/components/label.md +37 -0
- package/dist/skill/references/components/link.md +38 -0
- package/dist/skill/references/components/list-detail.md +27 -0
- package/dist/skill/references/components/media-card.md +61 -0
- package/dist/skill/references/components/message-bubble.md +68 -0
- package/dist/skill/references/components/money-input.md +30 -0
- package/dist/skill/references/components/motion-collapse.md +57 -0
- package/dist/skill/references/components/motion-fade.md +64 -0
- package/dist/skill/references/components/motion-scale.md +54 -0
- package/dist/skill/references/components/motion-slide.md +60 -0
- package/dist/skill/references/components/navigation-rail.md +29 -0
- package/dist/skill/references/components/notification-item.md +29 -0
- package/dist/skill/references/components/number-input.md +30 -0
- package/dist/skill/references/components/number-ticker.md +44 -0
- package/dist/skill/references/components/pagination.md +52 -0
- package/dist/skill/references/components/password-input.md +28 -0
- package/dist/skill/references/components/plan-card.md +34 -0
- package/dist/skill/references/components/popover.md +53 -0
- package/dist/skill/references/components/progress.md +39 -0
- package/dist/skill/references/components/prompt-input.md +95 -0
- package/dist/skill/references/components/radio-card.md +83 -0
- package/dist/skill/references/components/radio-group.md +57 -0
- package/dist/skill/references/components/rating.md +39 -0
- package/dist/skill/references/components/scroll-area.md +57 -0
- package/dist/skill/references/components/search-input.md +22 -0
- package/dist/skill/references/components/segmented-control.md +44 -0
- package/dist/skill/references/components/select.md +43 -0
- package/dist/skill/references/components/separator.md +30 -0
- package/dist/skill/references/components/settings-section.md +31 -0
- package/dist/skill/references/components/sheet.md +51 -0
- package/dist/skill/references/components/skeleton.md +38 -0
- package/dist/skill/references/components/slider.md +31 -0
- package/dist/skill/references/components/spinner.md +32 -0
- package/dist/skill/references/components/split-button.md +43 -0
- package/dist/skill/references/components/stack.md +35 -0
- package/dist/skill/references/components/stat-card.md +50 -0
- package/dist/skill/references/components/status-pill.md +37 -0
- package/dist/skill/references/components/step-indicator.md +29 -0
- package/dist/skill/references/components/streaming-text.md +53 -0
- package/dist/skill/references/components/switch.md +36 -0
- package/dist/skill/references/components/table.md +89 -0
- package/dist/skill/references/components/tabs.md +51 -0
- package/dist/skill/references/components/tag.md +25 -0
- package/dist/skill/references/components/text-gradient.md +30 -0
- package/dist/skill/references/components/text.md +45 -0
- package/dist/skill/references/components/textarea.md +40 -0
- package/dist/skill/references/components/thinking-indicator.md +50 -0
- package/dist/skill/references/components/toast.md +141 -0
- package/dist/skill/references/components/toggle-group.md +35 -0
- package/dist/skill/references/components/toggle.md +32 -0
- package/dist/skill/references/components/tooltip.md +34 -0
- package/dist/skill/references/components/user-card.md +27 -0
- package/dist/skill/references/components.md +192 -0
- package/dist/skill/references/tokens.md +234 -0
- package/package.json +41 -3
- package/src/cli.js +9 -0
- package/src/server.js +98 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Text
|
|
2
|
+
|
|
3
|
+
Paragraph text component with size, tone, and weight variants.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Typography · Status: stable
|
|
6
|
+
- Import: `import { Text } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/text
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `size` | `'body-lg' \| 'body' \| 'body-sm' \| 'caption' \| 'label'` | `'body'` | Controls the font size and line height. |
|
|
14
|
+
| `tone` | `'default' \| 'secondary' \| 'muted' \| 'subtle' \| 'inverse'` | | Color tone applied to the text. |
|
|
15
|
+
| `weight` | `'regular' \| 'medium' \| 'semibold' \| 'bold'` | | Font weight of the text. |
|
|
16
|
+
| `truncate` | `boolean` | | Truncates text with an ellipsis when it overflows. |
|
|
17
|
+
| `lineClamp` | `number` | | Clamps the text to a maximum number of lines. |
|
|
18
|
+
| `asChild` | `boolean` | | Merges props onto the immediate child element (Radix Slot). |
|
|
19
|
+
|
|
20
|
+
## Example: Default
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
<Text>The Nexub design system provides accessible, token-driven components.</Text>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Example: Sizes
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
|
30
|
+
<Text size="body-lg">Body large — ideal for introductory paragraphs.</Text>
|
|
31
|
+
<Text size="body">Body — the default reading size.</Text>
|
|
32
|
+
<Text size="body-sm">Body small — secondary content and descriptions.</Text>
|
|
33
|
+
<Text size="caption">Caption — metadata and timestamps.</Text>
|
|
34
|
+
</div>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Example: Tones
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
|
41
|
+
<Text tone="default">Default tone</Text>
|
|
42
|
+
<Text tone="secondary">Secondary tone</Text>
|
|
43
|
+
<Text tone="muted">Muted tone</Text>
|
|
44
|
+
</div>
|
|
45
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Textarea
|
|
2
|
+
|
|
3
|
+
A multi-line text input with configurable resize behaviour, size, and validation states.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Form & Input · Status: stable
|
|
6
|
+
- Import: `import { Textarea } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/textarea
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `placeholder` | `string` | | Placeholder text shown when the field is empty. |
|
|
14
|
+
| `disabled` | `boolean` | | Disables the textarea. |
|
|
15
|
+
| `invalid` | `boolean` | | Applies error styling to indicate a validation failure. |
|
|
16
|
+
| `rows` | `number` | | Initial visible row count. |
|
|
17
|
+
| `resize` | `'none' \| 'vertical' \| 'horizontal' \| 'both'` | `'vertical'` | Controls resize handle visibility. |
|
|
18
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Controls font size and padding. |
|
|
19
|
+
|
|
20
|
+
## Example: Default
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
<Textarea placeholder="Enter your message…" />
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Example: Sizes
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '12px' }}>
|
|
30
|
+
<Textarea size="sm" placeholder="Small textarea" />
|
|
31
|
+
<Textarea size="md" placeholder="Medium textarea" />
|
|
32
|
+
<Textarea size="lg" placeholder="Large textarea" />
|
|
33
|
+
</div>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Example: Invalid
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
<Textarea invalid placeholder="This field has an error" />
|
|
40
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Thinking Indicator
|
|
2
|
+
|
|
3
|
+
Shows the assistant is working before the first token arrives: a morphing shape and a shimmering label.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: AI · Status: beta
|
|
6
|
+
- Import: `import { ThinkingIndicator } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/thinking-indicator
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- The gap between sending a prompt and the first token of the reply.
|
|
12
|
+
- Tool calls or retrieval steps inside a reply, with a label naming the step.
|
|
13
|
+
|
|
14
|
+
## When not to use
|
|
15
|
+
|
|
16
|
+
- Once text is streaming: StreamingText’s caret already shows progress. Replace the indicator, don’t stack them.
|
|
17
|
+
- General loading outside AI surfaces: use Spinner or Skeleton.
|
|
18
|
+
|
|
19
|
+
## Props
|
|
20
|
+
|
|
21
|
+
| Prop | Type | Default | Description |
|
|
22
|
+
| --- | --- | --- | --- |
|
|
23
|
+
| `label` | `ReactNode \| null` | `messages.thinking ('Thinking')` | Visible text. `null` hides it; "Thinking" is still announced. |
|
|
24
|
+
| `size` | `'sm' \| 'md'` | `'md'` | Shape and text size. |
|
|
25
|
+
| `messages` | `Partial<{ thinking: string }>` | | Local override for the default text. |
|
|
26
|
+
|
|
27
|
+
## Example: Default
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
<ThinkingIndicator />
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Example: Custom label and sizes
|
|
34
|
+
|
|
35
|
+
Name the step when you know it. `label={null}` keeps only the shape.
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
<ThinkingIndicator label="Searching 4 sources" />
|
|
39
|
+
<ThinkingIndicator size="sm" />
|
|
40
|
+
<ThinkingIndicator size="sm" label={null} />
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Accessibility
|
|
44
|
+
|
|
45
|
+
- Roles: status
|
|
46
|
+
- A polite live region: the label is announced once when it mounts. Changing the label announces the new step.
|
|
47
|
+
- Render it only while waiting and remove it when tokens start, so it is not announced again.
|
|
48
|
+
- With reduced motion the shape and shimmer are static.
|
|
49
|
+
|
|
50
|
+
Related: [streaming-text](streaming-text.md), [spinner](spinner.md), [conversation](conversation.md)
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Toast
|
|
2
|
+
|
|
3
|
+
Imperative toast notifications using the toast object. Render <Toaster /> once in your layout.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Feedback · Status: stable
|
|
6
|
+
- Import: `import { Toast } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/toast
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- Confirming a non-blocking action (file saved, message sent)
|
|
12
|
+
- Reporting a background event the user should know about
|
|
13
|
+
- Providing brief feedback that disappears automatically
|
|
14
|
+
- Offering an undo action immediately after a destructive operation
|
|
15
|
+
|
|
16
|
+
## When not to use
|
|
17
|
+
|
|
18
|
+
- Critical errors that block the user — use Alert or AlertDialog
|
|
19
|
+
- Information the user must read and acknowledge — use Dialog
|
|
20
|
+
- Persistent status that should remain visible — use Banner or Alert
|
|
21
|
+
- Long messages with multiple lines of text
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
| Prop | Type | Default | Description |
|
|
26
|
+
| --- | --- | --- | --- |
|
|
27
|
+
| `Toaster expand` | `boolean` | `false` | Always show toasts as a list. By default they collapse into a stack that fans out on hover or focus, which also pauses their timers. |
|
|
28
|
+
| `Toaster visibleToasts` | `number` | `3` | How many toasts show at once. Older ones are hidden visually but stay in the live region. |
|
|
29
|
+
| `toast.success(title, opts?)` (required) | `string` | | Show a success toast with an optional options object. |
|
|
30
|
+
| `toast.error(title, opts?)` (required) | `string` | | Show an error toast. |
|
|
31
|
+
| `toast.warning(title, opts?)` (required) | `string` | | Show a warning toast. |
|
|
32
|
+
| `toast.info(title, opts?)` (required) | `string` | | Show an info toast. |
|
|
33
|
+
| `toast.custom(title, opts?)` (required) | `string` | | Show a default/custom toast. |
|
|
34
|
+
| `toast.undoable(title, opts)` (required) | `UndoableToastOptions` | | A toast with an Undo action (beta, 1.7.0). Undo calls `opts.onUndo`; any other close (timer, swipe, close button, `toast.dismiss`) calls `opts.onCommit`, exactly once. Returns the toast id. |
|
|
35
|
+
| `undoable opts` | `{ onUndo; onCommit?; undoLabel?; description?; duration? }` | | `undoLabel` defaults to the `undo` message ("Undo"). Commit the change in `onCommit`, not before showing the toast. |
|
|
36
|
+
| `opts.description` | `string` | | Secondary supporting text below the title. |
|
|
37
|
+
| `opts.duration` | `number` | `5000` | Time in ms before auto-dismiss. Use Infinity to persist. |
|
|
38
|
+
| `opts.action` | `{ label: string; onClick: () => void }` | | Renders an action button inside the toast. |
|
|
39
|
+
|
|
40
|
+
## Example: Default
|
|
41
|
+
|
|
42
|
+
```tsx
|
|
43
|
+
function DefaultToast() {
|
|
44
|
+
return (
|
|
45
|
+
<>
|
|
46
|
+
<Toaster />
|
|
47
|
+
<Button
|
|
48
|
+
variant="outline"
|
|
49
|
+
onClick={() => toast.custom('Changes saved', { description: 'Your profile has been updated.' })}
|
|
50
|
+
>
|
|
51
|
+
Show toast
|
|
52
|
+
</Button>
|
|
53
|
+
</>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Example: Variants
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
function ToastVariants() {
|
|
62
|
+
return (
|
|
63
|
+
<>
|
|
64
|
+
<Toaster />
|
|
65
|
+
<div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap' }}>
|
|
66
|
+
<Button variant="outline" onClick={() => toast.custom('Default notification')}>
|
|
67
|
+
Default
|
|
68
|
+
</Button>
|
|
69
|
+
<Button variant="outline" onClick={() => toast.success('Saved successfully')}>
|
|
70
|
+
Success
|
|
71
|
+
</Button>
|
|
72
|
+
<Button variant="outline" onClick={() => toast.error('Something went wrong')}>
|
|
73
|
+
Error
|
|
74
|
+
</Button>
|
|
75
|
+
<Button variant="outline" onClick={() => toast.warning('Proceed with caution')}>
|
|
76
|
+
Warning
|
|
77
|
+
</Button>
|
|
78
|
+
<Button variant="outline" onClick={() => toast.info('New update available')}>
|
|
79
|
+
Info
|
|
80
|
+
</Button>
|
|
81
|
+
</div>
|
|
82
|
+
</>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Example: With action
|
|
88
|
+
|
|
89
|
+
```tsx
|
|
90
|
+
function ToastWithAction() {
|
|
91
|
+
return (
|
|
92
|
+
<>
|
|
93
|
+
<Toaster />
|
|
94
|
+
<Button
|
|
95
|
+
variant="outline"
|
|
96
|
+
onClick={() =>
|
|
97
|
+
toast.custom('Message sent', {
|
|
98
|
+
description: 'Your message has been delivered to the team.',
|
|
99
|
+
action: {
|
|
100
|
+
label: 'Undo',
|
|
101
|
+
onClick: () => {},
|
|
102
|
+
},
|
|
103
|
+
})
|
|
104
|
+
}
|
|
105
|
+
>
|
|
106
|
+
Send message
|
|
107
|
+
</Button>
|
|
108
|
+
</>
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Example: Undoable delete
|
|
114
|
+
|
|
115
|
+
Hide the item right away; delete it for real only when the toast closes without Undo.
|
|
116
|
+
|
|
117
|
+
```tsx
|
|
118
|
+
function UndoableDelete() {
|
|
119
|
+
const [hidden, setHidden] = React.useState(false);
|
|
120
|
+
|
|
121
|
+
function remove() {
|
|
122
|
+
setHidden(true);
|
|
123
|
+
toast.undoable('Invoice deleted', {
|
|
124
|
+
description: 'INV-2041',
|
|
125
|
+
onUndo: () => setHidden(false),
|
|
126
|
+
onCommit: () => deleteInvoice('INV-2041'),
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return (
|
|
131
|
+
<>
|
|
132
|
+
<Toaster />
|
|
133
|
+
{hidden ? (
|
|
134
|
+
<Button variant="text" onClick={() => setHidden(false)}>Restore demo</Button>
|
|
135
|
+
) : (
|
|
136
|
+
<Button variant="outline" tone="danger" onClick={remove}>Delete INV-2041</Button>
|
|
137
|
+
)}
|
|
138
|
+
</>
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Toggle Group
|
|
2
|
+
|
|
3
|
+
Group of toggle buttons where one or many can be active.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Interactive · Status: stable
|
|
6
|
+
- Import: `import { ToggleGroup } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/toggle-group
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `type` (required) | `'single' \| 'multiple'` | | Controls whether one or multiple items can be active at a time. |
|
|
14
|
+
| `value` | `string \| string[]` | | The controlled active value(s). |
|
|
15
|
+
| `variant` | `'default' \| 'outline'` | | Visual style applied to all toggle items in the group. |
|
|
16
|
+
|
|
17
|
+
## Example: Single
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
<ToggleGroup.Root type="single" defaultValue="left">
|
|
21
|
+
<ToggleGroup.Item value="left">Left</ToggleGroup.Item>
|
|
22
|
+
<ToggleGroup.Item value="center">Center</ToggleGroup.Item>
|
|
23
|
+
<ToggleGroup.Item value="right">Right</ToggleGroup.Item>
|
|
24
|
+
</ToggleGroup.Root>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Example: Multiple
|
|
28
|
+
|
|
29
|
+
```tsx
|
|
30
|
+
<ToggleGroup.Root type="multiple" defaultValue={["bold", "italic"]}>
|
|
31
|
+
<ToggleGroup.Item value="bold">Bold</ToggleGroup.Item>
|
|
32
|
+
<ToggleGroup.Item value="italic">Italic</ToggleGroup.Item>
|
|
33
|
+
<ToggleGroup.Item value="underline">Underline</ToggleGroup.Item>
|
|
34
|
+
</ToggleGroup.Root>
|
|
35
|
+
```
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Toggle
|
|
2
|
+
|
|
3
|
+
Pressable toggle button built on Radix UI Toggle.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Interactive · Status: stable
|
|
6
|
+
- Import: `import { Toggle } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/toggle
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `pressed` | `boolean` | | The controlled pressed state. |
|
|
14
|
+
| `defaultPressed` | `boolean` | | The initial pressed state when uncontrolled. |
|
|
15
|
+
| `variant` | `'default' \| 'outline'` | | Visual style of the toggle button. |
|
|
16
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | | Size of the toggle button. |
|
|
17
|
+
| `disabled` | `boolean` | | Disables the toggle when true. |
|
|
18
|
+
|
|
19
|
+
## Example: Default
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
<Toggle>Bold</Toggle>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Example: Outline variants
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
<div style={{ display: 'flex', gap: '8px' }}>
|
|
29
|
+
<Toggle variant="outline">Unpressed</Toggle>
|
|
30
|
+
<Toggle variant="outline" defaultPressed>Pressed</Toggle>
|
|
31
|
+
</div>
|
|
32
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Tooltip
|
|
2
|
+
|
|
3
|
+
Floating label that appears on hover. Built on Radix UI Tooltip.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Overlays · Status: stable
|
|
6
|
+
- Import: `import { Tooltip } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/tooltip
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `content` (required) | `React.ReactNode` | | Content shown inside the tooltip. |
|
|
14
|
+
| `side` | `'top' \| 'right' \| 'bottom' \| 'left'` | `'top'` | Preferred side to open. |
|
|
15
|
+
| `delayDuration` | `number` | `700` | Delay in ms before tooltip opens. |
|
|
16
|
+
|
|
17
|
+
## Example: Default
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
<Tooltip content="This is a tooltip">
|
|
21
|
+
<Button variant="outline">Hover me</Button>
|
|
22
|
+
</Tooltip>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Example: Sides
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
<div style={{ display: 'flex', gap: '12px' }}>
|
|
29
|
+
<Tooltip content="Top" side="top"><Button size="sm">Top</Button></Tooltip>
|
|
30
|
+
<Tooltip content="Right" side="right"><Button size="sm">Right</Button></Tooltip>
|
|
31
|
+
<Tooltip content="Bottom" side="bottom"><Button size="sm">Bottom</Button></Tooltip>
|
|
32
|
+
<Tooltip content="Left" side="left"><Button size="sm">Left</Button></Tooltip>
|
|
33
|
+
</div>
|
|
34
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# UserCard
|
|
2
|
+
|
|
3
|
+
User profile card displaying avatar, name, role, and optional actions.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/patterns` · Category: People · Status: stable
|
|
6
|
+
- Import: `import { UserCard } from '@nexub/patterns';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/patterns/user-card
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `name` (required) | `string` | | User display name. |
|
|
14
|
+
| `email` | `string` | | User email address. |
|
|
15
|
+
| `role` | `string` | | Job title or role label. |
|
|
16
|
+
| `avatar` | `string` | | URL for avatar image. |
|
|
17
|
+
| `actions` | `React.ReactNode` | | Action buttons or menu. |
|
|
18
|
+
|
|
19
|
+
## Example: Default
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
<UserCard
|
|
23
|
+
name="Alex Morgan"
|
|
24
|
+
email="alex@nexub.io"
|
|
25
|
+
role="Design Lead"
|
|
26
|
+
/>
|
|
27
|
+
```
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Component index
|
|
2
|
+
|
|
3
|
+
Nexub DS v1.8.0. Open `components/<slug>.md` for props, examples and accessibility notes.
|
|
4
|
+
Never use a component marked deprecated.
|
|
5
|
+
|
|
6
|
+
## Components — Actions
|
|
7
|
+
|
|
8
|
+
- [Button](components/button.md) `@nexub/react`: Triggers an action or event. Supports multiple variants, sizes, and semantic tones.
|
|
9
|
+
- [Button Group](components/button-group.md) `@nexub/react`: Groups related buttons together with optional attachment and orientation.
|
|
10
|
+
- [Icon Button](components/icon-button.md) `@nexub/react`: A square button designed to hold a single icon, with an accessible label.
|
|
11
|
+
- [Split Button](components/split-button.md) `@nexub/react`: A primary action with related secondary actions behind a chevron, as one connected control.
|
|
12
|
+
|
|
13
|
+
## Components — AI
|
|
14
|
+
|
|
15
|
+
- [Citation](components/citation.md) `@nexub/react`: Numbered source markers for running text, with a hover preview, plus SourceChip and SourceList for the sources under a reply.
|
|
16
|
+
- [Message Bubble](components/message-bubble.md) `@nexub/react`: One message in a conversation. User messages sit in a bubble at the end; assistant replies run full width. MessageActions adds copy, feedback and regenerate.
|
|
17
|
+
- [Prompt Input](components/prompt-input.md) `@nexub/react`: The composer for a chat: an auto-growing text field with Send, which turns into Stop while a reply streams.
|
|
18
|
+
- [Streaming Text](components/streaming-text.md) `@nexub/react`: Assistant text as it arrives: new chunks fade in, text already shown stays still, and a caret marks the end.
|
|
19
|
+
- [Thinking Indicator](components/thinking-indicator.md) `@nexub/react`: Shows the assistant is working before the first token arrives: a morphing shape and a shimmering label.
|
|
20
|
+
|
|
21
|
+
## Components — Avatar
|
|
22
|
+
|
|
23
|
+
- [Avatar](components/avatar.md) `@nexub/react`: Displays a user's profile picture with initials fallback.
|
|
24
|
+
- [Avatar Group](components/avatar-group.md) `@nexub/react`: Stacked group of avatars with overflow count.
|
|
25
|
+
|
|
26
|
+
## Components — Data Display
|
|
27
|
+
|
|
28
|
+
- [Amount](components/amount.md) `@nexub/react`: Honest money: Intl formatting, tabular numerals, the currency’s minor unit and a true minus sign.
|
|
29
|
+
- [Data Table](components/data-table.md) `@nexub/react`: Feature-rich data table with sorting and row selection powered by TanStack Table.
|
|
30
|
+
- [Empty State](components/empty-state.md) `@nexub/react`: Placeholder UI shown when a list or page has no content.
|
|
31
|
+
- [Error State](components/error-state.md) `@nexub/react`: Full-page or section error view with retry action.
|
|
32
|
+
- [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.
|
|
33
|
+
- [Table](components/table.md) `@nexub/react`: Semantic HTML table with styled variants.
|
|
34
|
+
|
|
35
|
+
## Components — Disclosure
|
|
36
|
+
|
|
37
|
+
- [Accordion](components/accordion.md) `@nexub/react`: Vertically stacked list of collapsible sections.
|
|
38
|
+
- [Collapsible](components/collapsible.md) `@nexub/react`: Toggle visibility of content with smooth animation.
|
|
39
|
+
- [Scroll Area](components/scroll-area.md) `@nexub/react`: Scrollable container with custom styled scrollbars.
|
|
40
|
+
|
|
41
|
+
## Components — Dividers
|
|
42
|
+
|
|
43
|
+
- [Gradient Divider](components/gradient-divider.md) `@nexub/react`: A decorative gradient-faded horizontal rule.
|
|
44
|
+
- [Separator](components/separator.md) `@nexub/react`: A horizontal or vertical visual divider.
|
|
45
|
+
|
|
46
|
+
## Components — Feedback
|
|
47
|
+
|
|
48
|
+
- [Alert](components/alert.md) `@nexub/react`: Inline contextual message with optional title, icon, and dismiss action.
|
|
49
|
+
- [Banner](components/banner.md) `@nexub/react` **(deprecated)**: Deprecated — use Alert. Full-width announcement banner, typically used at the top of a page.
|
|
50
|
+
- [Callout](components/callout.md) `@nexub/react` **(deprecated)**: Deprecated — use Alert. Highlighted content block for tips, warnings, or notes.
|
|
51
|
+
- [Spinner](components/spinner.md) `@nexub/react`: Animated loading indicator. Inherits color from context.
|
|
52
|
+
- [Toast](components/toast.md) `@nexub/react`: Imperative toast notifications using the toast object. Render <Toaster /> once in your layout.
|
|
53
|
+
|
|
54
|
+
## Components — Form & Input
|
|
55
|
+
|
|
56
|
+
- [Date Picker](components/date-picker.md) `@nexub/react`: Calendar date picker with text input.
|
|
57
|
+
- [Date Range Picker](components/date-range-picker.md) `@nexub/react`: Dual-calendar date range selector.
|
|
58
|
+
- [Form Field](components/form-field.md) `@nexub/react`: Wraps Label, Input, HelperText and FormError into a single accessible group.
|
|
59
|
+
- [Helper Text](components/helper-text.md) `@nexub/react`: Small supporting text placed beneath a form field to provide hints or validation feedback.
|
|
60
|
+
- [Input](components/input.md) `@nexub/react`: Text input field for forms. Supports size variants, icons, addons, and validation states.
|
|
61
|
+
- [Label](components/label.md) `@nexub/react`: An accessible form label that optionally shows a required asterisk and links to an input via htmlFor.
|
|
62
|
+
- [Money Input](components/money-input.md) `@nexub/react`: An amount field: locale-aware parsing as you type, grouped on blur, the currency symbol leading.
|
|
63
|
+
- [Number Input](components/number-input.md) `@nexub/react`: A numeric input with increment and decrement controls, supporting min/max clamping and step.
|
|
64
|
+
- [Password Input](components/password-input.md) `@nexub/react`: A password field with a built-in toggle to reveal or hide the entered value.
|
|
65
|
+
- [Search Input](components/search-input.md) `@nexub/react`: A text input pre-wired with a search icon and a clear button for filtering content.
|
|
66
|
+
- [Textarea](components/textarea.md) `@nexub/react`: A multi-line text input with configurable resize behaviour, size, and validation states.
|
|
67
|
+
|
|
68
|
+
## Components — Form Controls
|
|
69
|
+
|
|
70
|
+
- [Autocomplete](components/autocomplete.md) `@nexub/react`: Type-to-search input with matching options dropdown.
|
|
71
|
+
- [Checkbox](components/checkbox.md) `@nexub/react`: Binary checkbox input built on Radix UI.
|
|
72
|
+
- [Checkbox Card](components/checkbox-card.md) `@nexub/react`: A checkbox drawn as a whole card: title, description and optional icon. Pick any number.
|
|
73
|
+
- [Combobox](components/combobox.md) `@nexub/react`: Command-palette style searchable dropdown built on cmdk.
|
|
74
|
+
- [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.
|
|
75
|
+
- [Radio Group](components/radio-group.md) `@nexub/react`: Group of mutually exclusive radio inputs.
|
|
76
|
+
- [Select](components/select.md) `@nexub/react`: Accessible dropdown select built on Radix UI. Supports groups and search.
|
|
77
|
+
- [Switch](components/switch.md) `@nexub/react`: Toggle control for binary on/off settings. Built on Radix UI Switch.
|
|
78
|
+
|
|
79
|
+
## Components — Inline Primitives
|
|
80
|
+
|
|
81
|
+
- [Code](components/code-inline.md) `@nexub/react`: Inline code span for technical terms and short code snippets.
|
|
82
|
+
- [Kbd](components/kbd.md) `@nexub/react`: Keyboard key display — renders a styled <kbd> element.
|
|
83
|
+
- [Link](components/link.md) `@nexub/react`: Styled anchor link with variant and external support.
|
|
84
|
+
- [Text Gradient](components/text-gradient.md) `@nexub/react`: Renders text with a brand gradient fill.
|
|
85
|
+
|
|
86
|
+
## Components — Interactive
|
|
87
|
+
|
|
88
|
+
- [Rating](components/rating.md) `@nexub/react`: Star rating input, supports controlled and read-only modes.
|
|
89
|
+
- [Segmented Control](components/segmented-control.md) `@nexub/react`: Tab-style control for mutually exclusive selections.
|
|
90
|
+
- [Slider](components/slider.md) `@nexub/react`: Range slider built on Radix UI Slider.
|
|
91
|
+
- [Toggle](components/toggle.md) `@nexub/react`: Pressable toggle button built on Radix UI Toggle.
|
|
92
|
+
- [Toggle Group](components/toggle-group.md) `@nexub/react`: Group of toggle buttons where one or many can be active.
|
|
93
|
+
|
|
94
|
+
## Components — Labels & Badges
|
|
95
|
+
|
|
96
|
+
- [Badge](components/badge.md) `@nexub/react`: Small status indicator or label. Communicates state, category, or count.
|
|
97
|
+
- [Chip](components/chip.md) `@nexub/react`: Compact label chip, optionally dismissible.
|
|
98
|
+
- [Eyebrow Chip](components/eyebrow-chip.md) `@nexub/react`: A compact eyebrow label, typically used above headings.
|
|
99
|
+
- [Filter Chip](components/filter-chip.md) `@nexub/react`: Interactive chip for filtering, supports selected/unselected state.
|
|
100
|
+
- [Status Pill](components/status-pill.md) `@nexub/react` **(deprecated)**: Deprecated — use Badge. A pill indicator for status values like active, pending, error.
|
|
101
|
+
- [Tag](components/tag.md) `@nexub/react` **(deprecated)**: Deprecated — use Badge. Non-interactive label tag for categorisation.
|
|
102
|
+
|
|
103
|
+
## Components — Layout
|
|
104
|
+
|
|
105
|
+
- [Box](components/box.md) `@nexub/react`: Generic container primitive with style token props.
|
|
106
|
+
- [Card](components/card.md) `@nexub/react`: Surface container for grouping related content. Supports flat, surface, and interactive variants.
|
|
107
|
+
- [Flex](components/flex.md) `@nexub/react`: Flexbox layout primitive.
|
|
108
|
+
- [Grid](components/grid.md) `@nexub/react`: CSS Grid layout primitive.
|
|
109
|
+
- [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.
|
|
110
|
+
- [Stack](components/stack.md) `@nexub/react`: Vertical stack layout with configurable gap.
|
|
111
|
+
|
|
112
|
+
## Components — Loading States
|
|
113
|
+
|
|
114
|
+
- [Progress](components/progress.md) `@nexub/react`: Horizontal progress bar with optional tone and animation.
|
|
115
|
+
- [Skeleton](components/skeleton.md) `@nexub/react`: Placeholder loading animation that mimics content layout.
|
|
116
|
+
|
|
117
|
+
## Components — Motion
|
|
118
|
+
|
|
119
|
+
- [Collapse](components/motion-collapse.md) `@nexub/react`: Expands and collapses content along the block axis.
|
|
120
|
+
- [Fade](components/motion-fade.md) `@nexub/react`: Animates opacity between 0 and 1 based on the `in` prop.
|
|
121
|
+
- [Scale](components/motion-scale.md) `@nexub/react`: Scales content in/out from its center.
|
|
122
|
+
- [Slide](components/motion-slide.md) `@nexub/react`: Slides content in from a direction based on the `in` prop.
|
|
123
|
+
|
|
124
|
+
## Components — Navigation
|
|
125
|
+
|
|
126
|
+
- [Breadcrumb](components/breadcrumb.md) `@nexub/react`: Hierarchical navigation trail showing page location.
|
|
127
|
+
- [Navigation Rail](components/navigation-rail.md) `@nexub/react`: Navigation for medium-width windows: icons over labels, with an active pill behind the icon.
|
|
128
|
+
- [Pagination](components/pagination.md) `@nexub/react`: Page navigation control with prev/next and page number buttons.
|
|
129
|
+
- [Tabs](components/tabs.md) `@nexub/react`: Layered content panels switched by tab triggers. Built on Radix UI Tabs.
|
|
130
|
+
|
|
131
|
+
## Components — Overlays
|
|
132
|
+
|
|
133
|
+
- [Alert Dialog](components/alert-dialog.md) `@nexub/react`: Confirmation dialog that requires an explicit user action before proceeding.
|
|
134
|
+
- [Dialog](components/dialog.md) `@nexub/react`: Modal dialog built on Radix UI. Fully accessible with focus trapping and ARIA roles.
|
|
135
|
+
- [Drawer](components/drawer.md) `@nexub/react`: Slide-in panel from any edge of the screen.
|
|
136
|
+
- [Hover Card](components/hover-card.md) `@nexub/react`: Rich tooltip card revealed on hover.
|
|
137
|
+
- [Popover](components/popover.md) `@nexub/react`: Floating content panel anchored to a trigger element.
|
|
138
|
+
- [Sheet](components/sheet.md) `@nexub/react`: Alias for Drawer — slide-in sheet panel.
|
|
139
|
+
- [Tooltip](components/tooltip.md) `@nexub/react`: Floating label that appears on hover. Built on Radix UI Tooltip.
|
|
140
|
+
|
|
141
|
+
## Components — Typography
|
|
142
|
+
|
|
143
|
+
- [Heading](components/heading.md) `@nexub/react`: Semantic heading component with size, weight, and tone control.
|
|
144
|
+
- [Text](components/text.md) `@nexub/react`: Paragraph text component with size, tone, and weight variants.
|
|
145
|
+
|
|
146
|
+
## Patterns — AI
|
|
147
|
+
|
|
148
|
+
- [Conversation](components/conversation.md) `@nexub/patterns`: Chat layout: a scrolling message list that follows new content, with a sticky composer underneath.
|
|
149
|
+
|
|
150
|
+
## Patterns — Auth
|
|
151
|
+
|
|
152
|
+
- [AuthCard](components/auth-card.md) `@nexub/patterns`: Authentication layout pattern. Wraps sign-in, sign-up, and reset flows in a centered card.
|
|
153
|
+
|
|
154
|
+
## Patterns — Data
|
|
155
|
+
|
|
156
|
+
- [ActivityFeed](components/activity-feed.md) `@nexub/patterns`: Chronological list of activity events with avatar, description, and timestamp.
|
|
157
|
+
- [FilterBar](components/filter-bar.md) `@nexub/patterns`: Search + filter toolbar pattern for data-heavy list or table views.
|
|
158
|
+
- [InfoList](components/info-list.md) `@nexub/patterns`: Key–value list for displaying structured metadata or details.
|
|
159
|
+
- [StatCard](components/stat-card.md) `@nexub/patterns`: Metric display card showing a KPI value, label, optional delta, and icon.
|
|
160
|
+
|
|
161
|
+
## Patterns — Feedback
|
|
162
|
+
|
|
163
|
+
- [NotificationItem](components/notification-item.md) `@nexub/patterns`: Single notification row for notification panels or dropdowns.
|
|
164
|
+
|
|
165
|
+
## Patterns — Forms
|
|
166
|
+
|
|
167
|
+
- [Error Summary](components/error-summary.md) `@nexub/patterns`: Lists a form’s errors after a failed submit, with a link to each field. useFormErrors wires the fields to their messages.
|
|
168
|
+
|
|
169
|
+
## Patterns — Layout
|
|
170
|
+
|
|
171
|
+
- [Bento Grid](components/bento-grid.md) `@nexub/patterns`: A grid of card tiles in mixed sizes. Responds to its own width: 1 column, 2 at 480px, 4 at 768px.
|
|
172
|
+
- [List Detail](components/list-detail.md) `@nexub/patterns`: The list-detail layout: side by side at 720px+ of its own width (a container query), one pane at a time below.
|
|
173
|
+
- [SettingsSection](components/settings-section.md) `@nexub/patterns`: Grouped settings panel with title, description, and action area.
|
|
174
|
+
|
|
175
|
+
## Patterns — Marketing
|
|
176
|
+
|
|
177
|
+
- [PlanCard](components/plan-card.md) `@nexub/patterns`: Pricing plan card with feature checklist, badge, and CTA button.
|
|
178
|
+
|
|
179
|
+
## Patterns — Navigation
|
|
180
|
+
|
|
181
|
+
- [StepIndicator](components/step-indicator.md) `@nexub/patterns`: Visual progress indicator for multi-step flows like onboarding or checkout.
|
|
182
|
+
|
|
183
|
+
## Patterns — People
|
|
184
|
+
|
|
185
|
+
- [UserCard](components/user-card.md) `@nexub/patterns`: User profile card displaying avatar, name, role, and optional actions.
|
|
186
|
+
|
|
187
|
+
## Exported without a reference page
|
|
188
|
+
|
|
189
|
+
These exist; read their TypeScript props in `node_modules/<package>/dist/index.d.ts`.
|
|
190
|
+
|
|
191
|
+
- `@nexub/react`: AppShell, AspectRatio, CheckList, Code, CommandPalette, Container, ContextMenu, CountryBadge, DropdownMenu, FileUpload, Flag, FormError, KeyboardShortcut, Logo, Menubar, Motion, NavigationMenu, NexubProvider, PageHeader, Section, Sidebar, ThemeProvider, Toolbar, TopNav, VisuallyHidden
|
|
192
|
+
- `@nexub/patterns`: AppHeader, AppLauncher, SettingsLayout
|