@nexub/mcp 4.2.0 → 4.3.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.
|
@@ -32,6 +32,7 @@ Triggers an action or event. Supports multiple variants, sizes, and semantic ton
|
|
|
32
32
|
| `successLabel` | `string` | `'Done'` | Announced on `success`. When set, it also replaces the visible label (with a check) instead of showing the check alone. |
|
|
33
33
|
| `errorLabel` | `string` | `'Something went wrong'` | Announced on `error`. |
|
|
34
34
|
| `disabled` | `boolean` | `false` | Disables the button. |
|
|
35
|
+
| `magnetic` | `boolean` | `false` | 4.3: drifts a few pixels toward the pointer on hover. For one key action per screen. Off for touch and reduced motion. |
|
|
35
36
|
| `fullWidth` | `boolean` | `false` | Stretches the button to fill its container. |
|
|
36
37
|
| `leadingIcon` | `React.ReactNode` | | Icon rendered before the label. |
|
|
37
38
|
| `trailingIcon` | `React.ReactNode` | | Icon rendered after the label. |
|
|
@@ -145,6 +146,18 @@ export default function Example() {
|
|
|
145
146
|
}
|
|
146
147
|
```
|
|
147
148
|
|
|
149
|
+
## Example: Magnetic
|
|
150
|
+
|
|
151
|
+
`magnetic` (4.3): drifts toward the pointer. Use it for one key action per screen.
|
|
152
|
+
|
|
153
|
+
```tsx
|
|
154
|
+
import { Button } from '@nexub/react';
|
|
155
|
+
|
|
156
|
+
export default function Example() {
|
|
157
|
+
return <Button magnetic size="lg">Start free trial</Button>;
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
148
161
|
## Accessibility
|
|
149
162
|
|
|
150
163
|
- Roles: button
|
|
@@ -12,7 +12,7 @@ Surface container for grouping related content. Supports flat, surface, and inte
|
|
|
12
12
|
| --- | --- | --- | --- |
|
|
13
13
|
| `variant` | `'flat' \| 'surface' \| 'interactive' \| 'showcase'` | `'flat'` | `interactive` lifts 2px on hover (spatial spring, elevation 1 → 2), sinks to 0.99 on press and adds a state layer. Use it for cards that are links or buttons. `showcase` is the marketing-mode card (24px corners, soft shadow, hover lift); a flat card outside `data-mode="marketing"`. |
|
|
14
14
|
| `accent` | `'leap' \| 'bookub' \| 'payub' \| 'founderub'` | | With `variant="showcase"`: a product-coloured top edge and tint in marketing mode. Sets `data-product` on the card. Only for product-specific content. |
|
|
15
|
-
| `effect` | `'none' \| 'sheen'` | `'none'` | Opt-in. `sheen` is a soft light that follows the pointer, with a brighter rim near the edge. Off for touch, reduced motion and reduced transparency. |
|
|
15
|
+
| `effect` | `'none' \| 'sheen' \| 'tilt'` | `'none'` | Opt-in. `sheen` is a soft light that follows the pointer, with a brighter rim near the edge. `tilt` (4.3) also leans the card toward the pointer in 3D. Off for touch, reduced motion and reduced transparency. |
|
|
16
16
|
| `tone` | `ToneValue` | `undefined` | Applies a semantic left-border accent. |
|
|
17
17
|
| `asChild` | `boolean` | `false` | Merges props onto the immediate child element. |
|
|
18
18
|
| `surface` | `'solid' \| 'glass'` | `'solid'` | Liquid-glass material treatment — see Foundations → Materials. |
|
|
@@ -122,6 +122,27 @@ export default function Example() {
|
|
|
122
122
|
}
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
+
## Example: Tilt
|
|
126
|
+
|
|
127
|
+
`effect="tilt"` (4.3): the card leans toward the pointer and the sheen catches the light. Hover with a mouse.
|
|
128
|
+
|
|
129
|
+
```tsx
|
|
130
|
+
import { Card } from '@nexub/react';
|
|
131
|
+
|
|
132
|
+
export default function Example() {
|
|
133
|
+
return (
|
|
134
|
+
<div className="grid w-full grid-cols-2 gap-4">
|
|
135
|
+
{['Revenue', 'Customers'].map((t) => (
|
|
136
|
+
<Card key={t} variant="interactive" effect="tilt" className="p-6">
|
|
137
|
+
<p className="m-0 text-label-md text-[var(--color-on-surface-variant)]">{t}</p>
|
|
138
|
+
<p className="m-0 text-title-lg">{t === 'Revenue' ? '$68,420' : '1,204'}</p>
|
|
139
|
+
</Card>
|
|
140
|
+
))}
|
|
141
|
+
</div>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
125
146
|
## Accessibility
|
|
126
147
|
|
|
127
148
|
- Roles: region (when used as a landmark)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Celebrate
|
|
2
|
+
|
|
3
|
+
A short confetti burst for a real win, such as a first payment or finishing onboarding.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: Feedback · Status: beta
|
|
6
|
+
- Import: `import { Celebrate } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/celebrate
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- A rare, real win the user worked for: first payment received, onboarding finished, a goal reached.
|
|
12
|
+
|
|
13
|
+
## When not to use
|
|
14
|
+
|
|
15
|
+
- Routine saves or every success; use the Button success state or a Toast.
|
|
16
|
+
- As the only feedback: say what happened in text too.
|
|
17
|
+
|
|
18
|
+
## Props
|
|
19
|
+
|
|
20
|
+
| Prop | Type | Default | Description |
|
|
21
|
+
| --- | --- | --- | --- |
|
|
22
|
+
| `active` (required) | `boolean` | | Bursts each time this goes from false to true. |
|
|
23
|
+
| `count` | `number` | `28` | Number of pieces. |
|
|
24
|
+
|
|
25
|
+
## Example: On a win
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
'use client';
|
|
29
|
+
|
|
30
|
+
import * as React from 'react';
|
|
31
|
+
import { Button, Celebrate } from '@nexub/react';
|
|
32
|
+
|
|
33
|
+
export default function Example() {
|
|
34
|
+
const [paid, setPaid] = React.useState(false);
|
|
35
|
+
return (
|
|
36
|
+
<div className="relative flex flex-col items-center gap-3 py-10">
|
|
37
|
+
<Celebrate active={paid} />
|
|
38
|
+
<Button magnetic status={paid ? 'success' : 'idle'} successLabel="Paid" onClick={() => setPaid((p) => !p)}>
|
|
39
|
+
Pay $1,250
|
|
40
|
+
</Button>
|
|
41
|
+
<p role="status" className="m-0 min-h-5 text-body-sm text-[var(--color-on-surface-variant)]">{paid ? 'Payment sent. Your first one!' : ''}</p>
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Accessibility
|
|
48
|
+
|
|
49
|
+
- Decorative (`aria-hidden`). Announce the win in text, for example in a Toast or a status message.
|
|
50
|
+
- Hidden under reduced motion.
|
|
51
|
+
|
|
52
|
+
Related: [toast](toast.md), [button](button.md)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Component index
|
|
2
2
|
|
|
3
|
-
Nexub DS v4.
|
|
3
|
+
Nexub DS v4.3.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
|
|
@@ -50,6 +50,7 @@ Never use a component marked deprecated.
|
|
|
50
50
|
## Components — Feedback
|
|
51
51
|
|
|
52
52
|
- [Alert](components/alert.md) `@nexub/react`: Inline contextual message with optional title, icon, and dismiss action.
|
|
53
|
+
- [Celebrate](components/celebrate.md) `@nexub/react`: A short confetti burst for a real win, such as a first payment or finishing onboarding.
|
|
53
54
|
- [Spinner](components/spinner.md) `@nexub/react`: Animated loading indicator. Inherits color from context.
|
|
54
55
|
- [Toast](components/toast.md) `@nexub/react`: Imperative toast notifications using the toast object. Render <Toaster /> once in your layout.
|
|
55
56
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Tokens
|
|
2
2
|
|
|
3
|
-
Nexub DS v4.
|
|
3
|
+
Nexub DS v4.3.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.3.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",
|