@nexub/mcp 4.3.0 → 4.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.
- package/dist/skill/references/components/floating-input.md +36 -0
- package/dist/skill/references/components/funnel.md +36 -0
- package/dist/skill/references/components/gauge.md +33 -0
- package/dist/skill/references/components/heatmap.md +35 -0
- package/dist/skill/references/components/kpi-tile.md +39 -0
- package/dist/skill/references/components/scroll-progress.md +34 -0
- package/dist/skill/references/components/shared-element.md +53 -0
- package/dist/skill/references/components.md +11 -1
- package/dist/skill/references/tokens.md +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Floating Input
|
|
2
|
+
|
|
3
|
+
A text field whose label sits inside and floats up on focus or input. CSS only.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Forms · Status: beta
|
|
6
|
+
- Import: `import { FloatingInput } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/floating-input
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `label` (required) | `string` | | Always visible: inside the empty field, above the value otherwise. |
|
|
14
|
+
| `...input` | `InputHTMLAttributes` | | Any input attribute except `placeholder`. Set `aria-invalid` for errors. |
|
|
15
|
+
|
|
16
|
+
## Example: Sign-in form
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
import { Button, FloatingInput } from '@nexub/react';
|
|
20
|
+
|
|
21
|
+
export default function Example() {
|
|
22
|
+
return (
|
|
23
|
+
<form className="flex w-full max-w-sm flex-col gap-3">
|
|
24
|
+
<FloatingInput label="Email" type="email" autoComplete="email" />
|
|
25
|
+
<FloatingInput label="Password" type="password" autoComplete="current-password" />
|
|
26
|
+
<Button type="submit">Sign in</Button>
|
|
27
|
+
</form>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Accessibility
|
|
33
|
+
|
|
34
|
+
- A real `<label>` tied to the input, so the name never disappears.
|
|
35
|
+
|
|
36
|
+
Related: [input](input.md), [form-field](form-field.md)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Funnel
|
|
2
|
+
|
|
3
|
+
Drop-off through ordered steps, with conversion from the first step.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Data Display · Status: beta
|
|
6
|
+
- Import: `import { Funnel } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/funnel
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `data` (required) | `{ label: string; value: number }[]` | | Steps in order, largest first. |
|
|
14
|
+
| `title` (required) | `string` | | Accessible name and table caption. |
|
|
15
|
+
|
|
16
|
+
## Example: Signup funnel
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
import { Funnel } from '@nexub/react';
|
|
20
|
+
|
|
21
|
+
export default function Example() {
|
|
22
|
+
return (
|
|
23
|
+
<Funnel
|
|
24
|
+
className="w-full"
|
|
25
|
+
title="Signup funnel, October"
|
|
26
|
+
data={[{ label: 'Visited', value: 12400 }, { label: 'Started signup', value: 4100 }, { label: 'Verified email', value: 2900 }, { label: 'First payment', value: 1240 }]}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Accessibility
|
|
33
|
+
|
|
34
|
+
- The drawing is hidden from assistive tech; a visually hidden table or caption carries every value.
|
|
35
|
+
|
|
36
|
+
Related: [bar-chart](bar-chart.md), [line-chart](line-chart.md)
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Gauge
|
|
2
|
+
|
|
3
|
+
Progress toward a target on a 270° arc.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Data Display · Status: beta
|
|
6
|
+
- Import: `import { Gauge } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/gauge
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `value` (required) | `number` | | Current value. |
|
|
14
|
+
| `max` | `number` | `100` | Target. |
|
|
15
|
+
| `title` (required) | `string` | | Accessible name. |
|
|
16
|
+
| `label` | `ReactNode` | | Centre text; defaults to the percentage. |
|
|
17
|
+
| `color` | `ChartColor` | `1` | Palette colour, 1–8. |
|
|
18
|
+
|
|
19
|
+
## Example: Storage used
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { Gauge } from '@nexub/react';
|
|
23
|
+
|
|
24
|
+
export default function Example() {
|
|
25
|
+
return <Gauge title="Storage used" value={68} max={100} label="68 GB" color={2} />;
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Accessibility
|
|
30
|
+
|
|
31
|
+
- The drawing is hidden from assistive tech; a visually hidden table or caption carries every value.
|
|
32
|
+
|
|
33
|
+
Related: [bar-chart](bar-chart.md), [line-chart](line-chart.md)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Heatmap
|
|
2
|
+
|
|
3
|
+
Intensity over a grid, such as activity by weekday and week, in seven sequential steps.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Data Display · Status: beta
|
|
6
|
+
- Import: `import { Heatmap } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/heatmap
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `data` (required) | `number[][]` | | Rows of values. |
|
|
14
|
+
| `rowLabels` (required) | `string[]` | | One label per row. |
|
|
15
|
+
| `columnLabels` | `string[]` | | Used in the hover text. |
|
|
16
|
+
| `title` (required) | `string` | | Accessible name and table caption. |
|
|
17
|
+
|
|
18
|
+
## Example: Weekly activity
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { Heatmap } from '@nexub/react';
|
|
22
|
+
|
|
23
|
+
const days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'];
|
|
24
|
+
const data = days.map((_, d) => Array.from({ length: 16 }, (_, w) => ((d * 7 + w * 3) % 11) + (w > 10 ? 4 : 0)));
|
|
25
|
+
|
|
26
|
+
export default function Example() {
|
|
27
|
+
return <Heatmap className="w-full" title="Payments sent per day, last 16 weeks" rowLabels={days} data={data} />;
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Accessibility
|
|
32
|
+
|
|
33
|
+
- The drawing is hidden from assistive tech; a visually hidden table or caption carries every value.
|
|
34
|
+
|
|
35
|
+
Related: [bar-chart](bar-chart.md), [line-chart](line-chart.md)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# KPI Tile
|
|
2
|
+
|
|
3
|
+
A headline number with its change versus last period and a trend line.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Data Display · Status: beta
|
|
6
|
+
- Import: `import { KpiTile } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/kpi-tile
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `label` (required) | `string` | | What the number is. |
|
|
14
|
+
| `value` (required) | `ReactNode` | | The formatted number. |
|
|
15
|
+
| `change` | `number` | | Change as a fraction, e.g. 0.114 for +11.4%. |
|
|
16
|
+
| `invert` | `boolean` | `false` | Down is good (churn, costs): flips the colour. |
|
|
17
|
+
| `trend` | `number[]` | | Recent values for the sparkline, oldest first. |
|
|
18
|
+
|
|
19
|
+
## Example: Dashboard row
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { KpiTile } from '@nexub/react';
|
|
23
|
+
|
|
24
|
+
export default function Example() {
|
|
25
|
+
return (
|
|
26
|
+
<div className="grid w-full gap-3 sm:grid-cols-3">
|
|
27
|
+
<KpiTile label="Monthly revenue" value="$68,420" change={0.114} trend={[42, 48, 45, 56, 61, 68]} />
|
|
28
|
+
<KpiTile label="Customers" value="1,204" change={0.032} trend={[1080, 1100, 1150, 1170, 1190, 1204]} />
|
|
29
|
+
<KpiTile label="Churn" value="2.1%" change={0.004} invert trend={[1.8, 1.9, 2.0, 1.9, 2.0, 2.1]} />
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Accessibility
|
|
36
|
+
|
|
37
|
+
- The drawing is hidden from assistive tech; a visually hidden table or caption carries every value.
|
|
38
|
+
|
|
39
|
+
Related: [bar-chart](bar-chart.md), [line-chart](line-chart.md)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Scroll Progress
|
|
2
|
+
|
|
3
|
+
A thin bar along the top that fills as the page scrolls. CSS only.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Motion · Status: beta
|
|
6
|
+
- Import: `import { ScrollProgress } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/scroll-progress
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `className` | `string` | | Position or colour overrides. Defaults to the accent (the Vivid gradient under data-expression="vivid"). |
|
|
14
|
+
|
|
15
|
+
## Example: Long page
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { ScrollProgress } from '@nexub/react';
|
|
19
|
+
|
|
20
|
+
export default function Example() {
|
|
21
|
+
return (
|
|
22
|
+
<div className="w-full text-body-sm text-[var(--color-on-surface-variant)]">
|
|
23
|
+
<ScrollProgress />
|
|
24
|
+
Scroll this page: the bar along the very top of the window fills as you read.
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Accessibility
|
|
31
|
+
|
|
32
|
+
- Decorative (`aria-hidden`); hidden under reduced motion and where scroll-driven animations are not supported.
|
|
33
|
+
|
|
34
|
+
Related: [scroll-area](scroll-area.md)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Shared Element
|
|
2
|
+
|
|
3
|
+
Morphs the same element between two states or pages inside a view transition.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Motion · Status: beta
|
|
6
|
+
- Import: `import { SharedElement } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/shared-element
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `name` (required) | `string` | | Same name on both sides, e.g. `avatar-${id}`. One element per name on screen at a time. |
|
|
14
|
+
| `children` (required) | `ReactElement` | | One element; the name is set on it. |
|
|
15
|
+
|
|
16
|
+
## Example: List to detail
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
'use client';
|
|
20
|
+
|
|
21
|
+
import * as React from 'react';
|
|
22
|
+
import { Avatar, Button, Card, SharedElement, startViewTransition } from '@nexub/react';
|
|
23
|
+
|
|
24
|
+
const people = [{ id: 'sl', name: 'Sam Lee', role: 'Finance' }, { id: 'ar', name: 'Ana Ruiz', role: 'Design' }];
|
|
25
|
+
|
|
26
|
+
export default function Example() {
|
|
27
|
+
const [open, setOpen] = React.useState<string | null>(null);
|
|
28
|
+
const person = people.find((p) => p.id === open);
|
|
29
|
+
const go = (id: string | null) => startViewTransition(() => setOpen(id));
|
|
30
|
+
return person ? (
|
|
31
|
+
<Card variant="surface" className="flex w-full flex-col items-center gap-3 p-8">
|
|
32
|
+
<SharedElement name={`avatar-${person.id}`}><Avatar size="xl" fallback={person.id.toUpperCase()} /></SharedElement>
|
|
33
|
+
<p className="m-0 text-title-lg">{person.name}</p>
|
|
34
|
+
<Button variant="outlined" onClick={() => go(null)}>Back</Button>
|
|
35
|
+
</Card>
|
|
36
|
+
) : (
|
|
37
|
+
<div className="flex w-full flex-col gap-2">
|
|
38
|
+
{people.map((p) => (
|
|
39
|
+
<button key={p.id} type="button" onClick={() => go(p.id)} className="nx-state-layer flex items-center gap-3 rounded-shape-container border border-[var(--color-outline-variant)] p-3 text-start">
|
|
40
|
+
<SharedElement name={`avatar-${p.id}`}><Avatar size="sm" fallback={p.id.toUpperCase()} /></SharedElement>
|
|
41
|
+
<span className="text-body-md">{p.name} · {p.role}</span>
|
|
42
|
+
</button>
|
|
43
|
+
))}
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Accessibility
|
|
50
|
+
|
|
51
|
+
- Visual only: run the change in `startViewTransition()` and move focus to the new view as usual.
|
|
52
|
+
|
|
53
|
+
Related: [motion-fade](motion-fade.md)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Component index
|
|
2
2
|
|
|
3
|
-
Nexub DS v4.
|
|
3
|
+
Nexub DS v4.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
|
|
@@ -31,6 +31,10 @@ Never use a component marked deprecated.
|
|
|
31
31
|
- [Donut Chart](components/donut-chart.md) `@nexub/react`: Parts of a whole, with an optional total in the hole. Keep it to six slices or fewer.
|
|
32
32
|
- [Empty State](components/empty-state.md) `@nexub/react`: Placeholder UI shown when a list or page has no content.
|
|
33
33
|
- [Error State](components/error-state.md) `@nexub/react`: Full-page or section error view with retry action.
|
|
34
|
+
- [Funnel](components/funnel.md) `@nexub/react`: Drop-off through ordered steps, with conversion from the first step.
|
|
35
|
+
- [Gauge](components/gauge.md) `@nexub/react`: Progress toward a target on a 270° arc.
|
|
36
|
+
- [Heatmap](components/heatmap.md) `@nexub/react`: Intensity over a grid, such as activity by weekday and week, in seven sequential steps.
|
|
37
|
+
- [KPI Tile](components/kpi-tile.md) `@nexub/react`: A headline number with its change versus last period and a trend line.
|
|
34
38
|
- [Line Chart](components/line-chart.md) `@nexub/react`: Show a trend over ordered categories such as time. Server-rendered SVG on the chart palette.
|
|
35
39
|
- [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.
|
|
36
40
|
- [Sparkline](components/sparkline.md) `@nexub/react`: A tiny trend line with no axes, for stat cards and table cells.
|
|
@@ -79,6 +83,10 @@ Never use a component marked deprecated.
|
|
|
79
83
|
- [Select](components/select.md) `@nexub/react`: Accessible dropdown select built on Radix UI. Supports groups and search.
|
|
80
84
|
- [Switch](components/switch.md) `@nexub/react`: Toggle control for binary on/off settings. Built on Radix UI Switch.
|
|
81
85
|
|
|
86
|
+
## Components — Forms
|
|
87
|
+
|
|
88
|
+
- [Floating Input](components/floating-input.md) `@nexub/react`: A text field whose label sits inside and floats up on focus or input. CSS only.
|
|
89
|
+
|
|
82
90
|
## Components — Inline Primitives
|
|
83
91
|
|
|
84
92
|
- [Aurora](components/aurora.md) `@nexub/react`: A decorative background of slow-drifting colour fields from the accent roles. Subtle by default, richer under data-expression="vivid".
|
|
@@ -125,6 +133,8 @@ Never use a component marked deprecated.
|
|
|
125
133
|
- [Reveal](components/motion-reveal.md) `@nexub/react`: Fades its content up as it scrolls into view, in marketing mode. CSS scroll-driven where supported, an IntersectionObserver elsewhere; content on screen at load, and every visitor without JS or with reduced motion, just sees it.
|
|
126
134
|
- [Scale](components/motion-scale.md) `@nexub/react`: Scales content in/out from its center.
|
|
127
135
|
- [Slide](components/motion-slide.md) `@nexub/react`: Slides content in from a direction based on the `in` prop.
|
|
136
|
+
- [Scroll Progress](components/scroll-progress.md) `@nexub/react`: A thin bar along the top that fills as the page scrolls. CSS only.
|
|
137
|
+
- [Shared Element](components/shared-element.md) `@nexub/react`: Morphs the same element between two states or pages inside a view transition.
|
|
128
138
|
|
|
129
139
|
## Components — Navigation
|
|
130
140
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Tokens
|
|
2
2
|
|
|
3
|
-
Nexub DS v4.
|
|
3
|
+
Nexub DS v4.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": "4.
|
|
3
|
+
"version": "4.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",
|