@nexub/mcp 4.3.0 → 4.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/floating-input.md +36 -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 +7 -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,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.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
|
|
@@ -79,6 +79,10 @@ Never use a component marked deprecated.
|
|
|
79
79
|
- [Select](components/select.md) `@nexub/react`: Accessible dropdown select built on Radix UI. Supports groups and search.
|
|
80
80
|
- [Switch](components/switch.md) `@nexub/react`: Toggle control for binary on/off settings. Built on Radix UI Switch.
|
|
81
81
|
|
|
82
|
+
## Components — Forms
|
|
83
|
+
|
|
84
|
+
- [Floating Input](components/floating-input.md) `@nexub/react`: A text field whose label sits inside and floats up on focus or input. CSS only.
|
|
85
|
+
|
|
82
86
|
## Components — Inline Primitives
|
|
83
87
|
|
|
84
88
|
- [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 +129,8 @@ Never use a component marked deprecated.
|
|
|
125
129
|
- [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
130
|
- [Scale](components/motion-scale.md) `@nexub/react`: Scales content in/out from its center.
|
|
127
131
|
- [Slide](components/motion-slide.md) `@nexub/react`: Slides content in from a direction based on the `in` prop.
|
|
132
|
+
- [Scroll Progress](components/scroll-progress.md) `@nexub/react`: A thin bar along the top that fills as the page scrolls. CSS only.
|
|
133
|
+
- [Shared Element](components/shared-element.md) `@nexub/react`: Morphs the same element between two states or pages inside a view transition.
|
|
128
134
|
|
|
129
135
|
## Components — Navigation
|
|
130
136
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Tokens
|
|
2
2
|
|
|
3
|
-
Nexub DS v4.
|
|
3
|
+
Nexub DS v4.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": "4.
|
|
3
|
+
"version": "4.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",
|