@nexub/mcp 2.7.0 → 2.9.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/accordion.md +40 -45
- package/dist/skill/references/components/activity-feed.md +13 -12
- package/dist/skill/references/components/alert-dialog.md +26 -22
- package/dist/skill/references/components/alert.md +26 -8
- package/dist/skill/references/components/amount.md +15 -3
- package/dist/skill/references/components/auth-card.md +22 -11
- package/dist/skill/references/components/autocomplete.md +42 -21
- package/dist/skill/references/components/avatar-group.md +13 -6
- package/dist/skill/references/components/avatar.md +31 -10
- package/dist/skill/references/components/badge.md +37 -16
- package/dist/skill/references/components/banner.md +18 -7
- package/dist/skill/references/components/bento-grid.md +33 -11
- package/dist/skill/references/components/box.md +21 -9
- package/dist/skill/references/components/breadcrumb.md +32 -34
- package/dist/skill/references/components/button-group.md +32 -14
- package/dist/skill/references/components/button.md +57 -32
- package/dist/skill/references/components/callout.md +10 -2
- package/dist/skill/references/components/card.md +54 -22
- package/dist/skill/references/components/checkbox-card.md +23 -8
- package/dist/skill/references/components/checkbox.md +32 -19
- package/dist/skill/references/components/chip.md +22 -10
- package/dist/skill/references/components/citation.md +18 -10
- package/dist/skill/references/components/code-inline.md +20 -2
- package/dist/skill/references/components/collapsible.md +38 -33
- package/dist/skill/references/components/combobox.md +18 -16
- package/dist/skill/references/components/conversation.md +23 -11
- package/dist/skill/references/components/data-table.md +40 -36
- package/dist/skill/references/components/date-picker.md +21 -17
- package/dist/skill/references/components/date-range-picker.md +11 -5
- package/dist/skill/references/components/dialog.md +26 -22
- package/dist/skill/references/components/drawer.md +66 -44
- package/dist/skill/references/components/empty-state.md +40 -50
- package/dist/skill/references/components/error-state.md +22 -10
- package/dist/skill/references/components/error-summary.md +20 -14
- package/dist/skill/references/components/eyebrow-chip.md +15 -5
- package/dist/skill/references/components/filter-bar.md +18 -14
- package/dist/skill/references/components/filter-chip.md +12 -5
- package/dist/skill/references/components/flex.md +31 -15
- package/dist/skill/references/components/form-field.md +11 -5
- package/dist/skill/references/components/gradient-divider.md +5 -1
- package/dist/skill/references/components/grid.md +22 -14
- package/dist/skill/references/components/heading.md +30 -14
- package/dist/skill/references/components/helper-text.md +17 -7
- package/dist/skill/references/components/hover-card.md +21 -12
- package/dist/skill/references/components/icon-button.md +19 -17
- package/dist/skill/references/components/info-list.md +15 -6
- package/dist/skill/references/components/input.md +32 -12
- package/dist/skill/references/components/kbd.md +21 -19
- package/dist/skill/references/components/label.md +20 -6
- package/dist/skill/references/components/link.md +21 -7
- package/dist/skill/references/components/list-detail.md +27 -6
- package/dist/skill/references/components/media-card.md +55 -16
- package/dist/skill/references/components/message-bubble.md +30 -13
- package/dist/skill/references/components/money-input.md +10 -2
- package/dist/skill/references/components/motion-collapse.md +22 -22
- package/dist/skill/references/components/motion-fade.md +19 -15
- package/dist/skill/references/components/motion-scale.md +13 -20
- package/dist/skill/references/components/motion-slide.md +13 -25
- package/dist/skill/references/components/navigation-rail.md +14 -5
- package/dist/skill/references/components/notification-item.md +10 -6
- package/dist/skill/references/components/number-input.md +10 -2
- package/dist/skill/references/components/number-ticker.md +27 -6
- package/dist/skill/references/components/pagination.md +11 -20
- package/dist/skill/references/components/password-input.md +13 -2
- package/dist/skill/references/components/plan-card.md +17 -9
- package/dist/skill/references/components/popover.md +31 -21
- package/dist/skill/references/components/progress.md +22 -8
- package/dist/skill/references/components/prompt-input.md +57 -29
- package/dist/skill/references/components/radio-card.md +41 -22
- package/dist/skill/references/components/radio-group.md +32 -28
- package/dist/skill/references/components/rating.md +23 -7
- package/dist/skill/references/components/scroll-area.md +30 -29
- package/dist/skill/references/components/search-input.md +5 -1
- package/dist/skill/references/components/segmented-control.md +26 -19
- package/dist/skill/references/components/select.md +16 -8
- package/dist/skill/references/components/separator.md +16 -6
- package/dist/skill/references/components/settings-section.md +19 -10
- package/dist/skill/references/components/sheet.md +25 -22
- package/dist/skill/references/components/skeleton.md +29 -12
- package/dist/skill/references/components/slider.md +10 -2
- package/dist/skill/references/components/spinner.md +17 -8
- package/dist/skill/references/components/split-button.md +26 -15
- package/dist/skill/references/components/stack.md +22 -10
- package/dist/skill/references/components/stat-card.md +34 -15
- package/dist/skill/references/components/status-pill.md +18 -12
- package/dist/skill/references/components/step-indicator.md +10 -9
- package/dist/skill/references/components/streaming-text.md +21 -12
- package/dist/skill/references/components/switch.md +10 -9
- package/dist/skill/references/components/table.md +66 -60
- package/dist/skill/references/components/tabs.md +24 -16
- package/dist/skill/references/components/tag.md +13 -5
- package/dist/skill/references/components/text-gradient.md +14 -5
- package/dist/skill/references/components/text.md +29 -12
- package/dist/skill/references/components/textarea.md +21 -7
- package/dist/skill/references/components/thinking-indicator.md +16 -4
- package/dist/skill/references/components/toast.md +41 -64
- package/dist/skill/references/components/toggle-group.md +22 -10
- package/dist/skill/references/components/toggle.md +15 -5
- package/dist/skill/references/components/tooltip.md +22 -9
- package/dist/skill/references/components/user-card.md +9 -5
- package/dist/skill/references/components.md +1 -1
- package/dist/skill/references/tokens.md +1 -1
- package/package.json +1 -1
|
@@ -19,59 +19,49 @@ Placeholder UI shown when a list or page has no content.
|
|
|
19
19
|
## Example: Default
|
|
20
20
|
|
|
21
21
|
```tsx
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
Try adjusting your search or filters to find what you're looking for.
|
|
42
|
-
</EmptyState.Description>
|
|
43
|
-
<EmptyState.Actions>
|
|
44
|
-
<Button variant="primary">Clear filters</Button>
|
|
45
|
-
<Button variant="outline">Browse all</Button>
|
|
46
|
-
</EmptyState.Actions>
|
|
47
|
-
</EmptyState.Root>
|
|
22
|
+
import { EmptyState, Button } from '@nexub/react';
|
|
23
|
+
|
|
24
|
+
export default function Example() {
|
|
25
|
+
return (
|
|
26
|
+
<EmptyState.Root>
|
|
27
|
+
<EmptyState.Illustration>
|
|
28
|
+
<svg width="48" height="48" viewBox="0 0 48 48" fill="none">
|
|
29
|
+
<rect x="8" y="8" width="32" height="32" rx="4" stroke="var(--color-outline-variant)" strokeWidth="2" />
|
|
30
|
+
<path d="M18 24h12M24 18v12" stroke="var(--color-on-surface-muted)" strokeWidth="2" strokeLinecap="round" />
|
|
31
|
+
</svg>
|
|
32
|
+
</EmptyState.Illustration>
|
|
33
|
+
<EmptyState.Title>No results found</EmptyState.Title>
|
|
34
|
+
<EmptyState.Description>Try adjusting your search or filters to find what you're looking for.</EmptyState.Description>
|
|
35
|
+
<EmptyState.Actions>
|
|
36
|
+
<Button variant="primary" size="sm">Clear filters</Button>
|
|
37
|
+
</EmptyState.Actions>
|
|
38
|
+
</EmptyState.Root>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
48
41
|
```
|
|
49
42
|
|
|
50
43
|
## Example: Custom illustration
|
|
51
44
|
|
|
52
45
|
```tsx
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<Button variant="primary">Upload document</Button>
|
|
75
|
-
</EmptyState.Actions>
|
|
76
|
-
</EmptyState.Root>
|
|
46
|
+
import { EmptyState, Button } from '@nexub/react';
|
|
47
|
+
|
|
48
|
+
export default function Example() {
|
|
49
|
+
return (
|
|
50
|
+
<EmptyState.Root>
|
|
51
|
+
<EmptyState.Illustration>
|
|
52
|
+
<svg width="80" height="80" viewBox="0 0 80 80" fill="none" aria-hidden="true">
|
|
53
|
+
<rect width="80" height="80" rx="40" fill="var(--color-surface-container-low)" />
|
|
54
|
+
<rect x="24" y="28" width="32" height="24" rx="4" stroke="var(--color-outline)" strokeWidth="2" />
|
|
55
|
+
<path d="M24 36h32" stroke="var(--color-outline)" strokeWidth="2" />
|
|
56
|
+
<circle cx="40" cy="48" r="4" fill="color-mix(in srgb, var(--color-on-surface) 38%, transparent)" />
|
|
57
|
+
</svg>
|
|
58
|
+
</EmptyState.Illustration>
|
|
59
|
+
<EmptyState.Title>No documents yet</EmptyState.Title>
|
|
60
|
+
<EmptyState.Description>Upload your first document to get started.</EmptyState.Description>
|
|
61
|
+
<EmptyState.Actions>
|
|
62
|
+
<Button variant="primary">Upload document</Button>
|
|
63
|
+
</EmptyState.Actions>
|
|
64
|
+
</EmptyState.Root>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
77
67
|
```
|
|
@@ -19,19 +19,31 @@ Full-page or section error view with retry action.
|
|
|
19
19
|
## Example: Default
|
|
20
20
|
|
|
21
21
|
```tsx
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
import { ErrorState } from '@nexub/react';
|
|
23
|
+
|
|
24
|
+
export default function Example() {
|
|
25
|
+
return (
|
|
26
|
+
<ErrorState
|
|
27
|
+
title="Something went wrong"
|
|
28
|
+
description="We could not load the data. Please try again."
|
|
29
|
+
onRetry={() => {}}
|
|
30
|
+
/>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
27
33
|
```
|
|
28
34
|
|
|
29
35
|
## Example: Warning
|
|
30
36
|
|
|
31
37
|
```tsx
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
import { ErrorState } from '@nexub/react';
|
|
39
|
+
|
|
40
|
+
export default function Example() {
|
|
41
|
+
return (
|
|
42
|
+
<ErrorState
|
|
43
|
+
tone="warning"
|
|
44
|
+
title="Connection issue"
|
|
45
|
+
description="Check your network and try again."
|
|
46
|
+
/>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
37
49
|
```
|
|
@@ -33,28 +33,34 @@ Lists a form’s errors after a failed submit, with a link to each field. useFor
|
|
|
33
33
|
Submit empty to see the summary. A new map per submit moves focus to the summary; links jump to each field.
|
|
34
34
|
|
|
35
35
|
```tsx
|
|
36
|
-
|
|
36
|
+
import * as React from 'react';
|
|
37
|
+
import { type FormErrorMap, useFormErrors, ErrorSummary } from '@nexub/patterns';
|
|
38
|
+
import { Label, Input, FormError, Button } from '@nexub/react';
|
|
39
|
+
|
|
40
|
+
export default function Example() {
|
|
37
41
|
const [submitted, setSubmitted] = React.useState<FormErrorMap>({});
|
|
38
42
|
const { errors, fieldProps, errorProps } = useFormErrors(submitted);
|
|
39
|
-
|
|
40
|
-
function submit(e: React.FormEvent<HTMLFormElement>) {
|
|
43
|
+
const submit = (e: React.FormEvent<HTMLFormElement>) => {
|
|
41
44
|
e.preventDefault();
|
|
42
45
|
const data = new FormData(e.currentTarget);
|
|
43
46
|
setSubmitted({
|
|
44
|
-
name: String(data.get('name')).trim() ? undefined : 'Enter your name',
|
|
45
|
-
email: /^\S+@\S+\.\S+$/.test(String(data.get('email'))) ? undefined : 'Enter an email address, like name@example.com',
|
|
47
|
+
'es-name': String(data.get('name')).trim() ? undefined : 'Enter your name',
|
|
48
|
+
'es-email': /^\S+@\S+\.\S+$/.test(String(data.get('email'))) ? undefined : 'Enter an email address, like name@example.com',
|
|
46
49
|
});
|
|
47
|
-
}
|
|
48
|
-
|
|
50
|
+
};
|
|
49
51
|
return (
|
|
50
|
-
<form noValidate onSubmit={submit}>
|
|
52
|
+
<form noValidate onSubmit={submit} className="flex flex-col gap-3 items-stretch w-[340px]">
|
|
51
53
|
<ErrorSummary errors={errors} />
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
<div className="flex flex-col gap-1 items-stretch">
|
|
55
|
+
<Label htmlFor="es-name">Name</Label>
|
|
56
|
+
<Input name="name" {...fieldProps('es-name')} invalid={Boolean(submitted['es-name'])} />
|
|
57
|
+
{submitted['es-name'] && <FormError {...errorProps('es-name')}>{submitted['es-name']}</FormError>}
|
|
58
|
+
</div>
|
|
59
|
+
<div className="flex flex-col gap-1 items-stretch">
|
|
60
|
+
<Label htmlFor="es-email">Email</Label>
|
|
61
|
+
<Input name="email" type="email" {...fieldProps('es-email')} invalid={Boolean(submitted['es-email'])} />
|
|
62
|
+
{submitted['es-email'] && <FormError {...errorProps('es-email')}>{submitted['es-email']}</FormError>}
|
|
63
|
+
</div>
|
|
58
64
|
<Button type="submit">Create account</Button>
|
|
59
65
|
</form>
|
|
60
66
|
);
|
|
@@ -15,14 +15,24 @@ A compact eyebrow label, typically used above headings.
|
|
|
15
15
|
## Example: Default
|
|
16
16
|
|
|
17
17
|
```tsx
|
|
18
|
-
|
|
18
|
+
import { EyebrowChip } from '@nexub/react';
|
|
19
|
+
|
|
20
|
+
export default function Example() {
|
|
21
|
+
return <EyebrowChip>New release</EyebrowChip>;
|
|
22
|
+
}
|
|
19
23
|
```
|
|
20
24
|
|
|
21
25
|
## Example: Usage
|
|
22
26
|
|
|
23
27
|
```tsx
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
import { EyebrowChip } from '@nexub/react';
|
|
29
|
+
|
|
30
|
+
export default function Example() {
|
|
31
|
+
return (
|
|
32
|
+
<div className="flex flex-col gap-2 items-start">
|
|
33
|
+
<EyebrowChip>Now available</EyebrowChip>
|
|
34
|
+
<h2 className="m-0 text-[1.5rem] font-bold text-[var(--color-on-surface)]">Version 2.0</h2>
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
28
38
|
```
|
|
@@ -19,18 +19,22 @@ Search + filter toolbar pattern for data-heavy list or table views.
|
|
|
19
19
|
## Example: Default
|
|
20
20
|
|
|
21
21
|
```tsx
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
import { FilterBar } from '@nexub/patterns';
|
|
23
|
+
import { Badge } from '@nexub/react';
|
|
24
|
+
|
|
25
|
+
export default function Example() {
|
|
26
|
+
return (
|
|
27
|
+
<div className="w-full max-w-[480px]">
|
|
28
|
+
<FilterBar
|
|
29
|
+
searchPlaceholder="Search users…"
|
|
30
|
+
filters={
|
|
31
|
+
<div className="flex gap-2 flex-wrap items-center justify-center">
|
|
32
|
+
<Badge tone="neutral">Status: All</Badge>
|
|
33
|
+
<Badge tone="neutral">Plan: All</Badge>
|
|
34
|
+
</div>
|
|
35
|
+
}
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
36
40
|
```
|
|
@@ -18,9 +18,16 @@ Interactive chip for filtering, supports selected/unselected state.
|
|
|
18
18
|
## Example: Default
|
|
19
19
|
|
|
20
20
|
```tsx
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
import { FilterChip } from '@nexub/react';
|
|
22
|
+
|
|
23
|
+
export default function Example() {
|
|
24
|
+
return (
|
|
25
|
+
<div className="flex gap-2 flex-wrap items-center justify-center">
|
|
26
|
+
<FilterChip>All</FilterChip>
|
|
27
|
+
<FilterChip selected>Active</FilterChip>
|
|
28
|
+
<FilterChip>Archived</FilterChip>
|
|
29
|
+
<FilterChip>Draft</FilterChip>
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
26
33
|
```
|
|
@@ -19,29 +19,45 @@ Flexbox layout primitive.
|
|
|
19
19
|
## Example: Default
|
|
20
20
|
|
|
21
21
|
```tsx
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
import { Flex, Button } from '@nexub/react';
|
|
23
|
+
|
|
24
|
+
export default function Example() {
|
|
25
|
+
return (
|
|
26
|
+
<Flex gap="md" align="center">
|
|
27
|
+
<Button variant="primary">Action</Button>
|
|
28
|
+
<Button variant="outline">Cancel</Button>
|
|
29
|
+
</Flex>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
26
32
|
```
|
|
27
33
|
|
|
28
34
|
## Example: Space between
|
|
29
35
|
|
|
30
36
|
```tsx
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
import { Flex, Badge } from '@nexub/react';
|
|
38
|
+
|
|
39
|
+
export default function Example() {
|
|
40
|
+
return (
|
|
41
|
+
<Flex justify="between" className="w-full max-w-[320px]">
|
|
42
|
+
<Badge tone="success">Active</Badge>
|
|
43
|
+
<Badge tone="neutral">Draft</Badge>
|
|
44
|
+
</Flex>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
35
47
|
```
|
|
36
48
|
|
|
37
49
|
## Example: Wrap
|
|
38
50
|
|
|
39
51
|
```tsx
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</
|
|
52
|
+
import { Flex, Badge } from '@nexub/react';
|
|
53
|
+
|
|
54
|
+
export default function Example() {
|
|
55
|
+
return (
|
|
56
|
+
<Flex gap="sm" wrap className="max-w-[260px]">
|
|
57
|
+
{['React', 'TypeScript', 'Tailwind', 'Radix UI', 'Storybook'].map((t) => (
|
|
58
|
+
<Badge key={t} tone="info">{t}</Badge>
|
|
59
|
+
))}
|
|
60
|
+
</Flex>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
47
63
|
```
|
|
@@ -18,9 +18,15 @@ Wraps Label, Input, HelperText and FormError into a single accessible group.
|
|
|
18
18
|
## Example: Default
|
|
19
19
|
|
|
20
20
|
```tsx
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
import { Label, Input, HelperText } from '@nexub/react';
|
|
22
|
+
|
|
23
|
+
export default function Example() {
|
|
24
|
+
return (
|
|
25
|
+
<div className="flex flex-col gap-1 items-start w-[280px]">
|
|
26
|
+
<Label htmlFor="field-name" required>Full name</Label>
|
|
27
|
+
<Input id="field-name" placeholder="Jane Smith" />
|
|
28
|
+
<HelperText>Enter your legal name.</HelperText>
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
26
32
|
```
|
|
@@ -9,5 +9,9 @@ A decorative gradient-faded horizontal rule.
|
|
|
9
9
|
## Example: Default
|
|
10
10
|
|
|
11
11
|
```tsx
|
|
12
|
-
|
|
12
|
+
import { GradientDivider } from '@nexub/react';
|
|
13
|
+
|
|
14
|
+
export default function Example() {
|
|
15
|
+
return <div className="w-[280px]"><GradientDivider /></div>;
|
|
16
|
+
}
|
|
13
17
|
```
|
|
@@ -17,23 +17,31 @@ CSS Grid layout primitive.
|
|
|
17
17
|
## Example: 2-column
|
|
18
18
|
|
|
19
19
|
```tsx
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
import { Grid, Card, Text } from '@nexub/react';
|
|
21
|
+
|
|
22
|
+
export default function Example() {
|
|
23
|
+
return (
|
|
24
|
+
<Grid cols={2} gap="md" className="w-full max-w-[400px]">
|
|
25
|
+
{[1, 2, 3, 4].map((n) => (
|
|
26
|
+
<Card key={n}><Text size="body-sm" tone="muted">Card {n}</Text></Card>
|
|
27
|
+
))}
|
|
28
|
+
</Grid>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
26
31
|
```
|
|
27
32
|
|
|
28
33
|
## Example: 3-column
|
|
29
34
|
|
|
30
35
|
```tsx
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
import { Grid, Card, Text } from '@nexub/react';
|
|
37
|
+
|
|
38
|
+
export default function Example() {
|
|
39
|
+
return (
|
|
40
|
+
<Grid cols={3} gap="sm" className="w-full max-w-[480px]">
|
|
41
|
+
{[1, 2, 3, 4, 5, 6].map((n) => (
|
|
42
|
+
<Card key={n}><Text size="caption" tone="muted">Item {n}</Text></Card>
|
|
43
|
+
))}
|
|
44
|
+
</Grid>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
39
47
|
```
|
|
@@ -19,28 +19,44 @@ Semantic heading component with size, weight, and tone control.
|
|
|
19
19
|
## Example: Default
|
|
20
20
|
|
|
21
21
|
```tsx
|
|
22
|
-
|
|
22
|
+
import { Heading } from '@nexub/react';
|
|
23
|
+
|
|
24
|
+
export default function Example() {
|
|
25
|
+
return <Heading>The quick brown fox</Heading>;
|
|
26
|
+
}
|
|
23
27
|
```
|
|
24
28
|
|
|
25
29
|
## Example: Scale
|
|
26
30
|
|
|
27
31
|
```tsx
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</
|
|
32
|
+
import { Heading } from '@nexub/react';
|
|
33
|
+
|
|
34
|
+
export default function Example() {
|
|
35
|
+
return (
|
|
36
|
+
<div className="flex flex-col gap-2 items-start">
|
|
37
|
+
<Heading size="h1">Heading 1</Heading>
|
|
38
|
+
<Heading size="h2">Heading 2</Heading>
|
|
39
|
+
<Heading size="h3">Heading 3</Heading>
|
|
40
|
+
<Heading size="h4">Heading 4</Heading>
|
|
41
|
+
<Heading size="h5">Heading 5</Heading>
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
35
45
|
```
|
|
36
46
|
|
|
37
47
|
## Example: Tones
|
|
38
48
|
|
|
39
49
|
```tsx
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
</
|
|
50
|
+
import { Heading } from '@nexub/react';
|
|
51
|
+
|
|
52
|
+
export default function Example() {
|
|
53
|
+
return (
|
|
54
|
+
<div className="flex flex-col gap-2 items-start">
|
|
55
|
+
<Heading tone="info">Info tone</Heading>
|
|
56
|
+
<Heading tone="success">Success tone</Heading>
|
|
57
|
+
<Heading tone="warning">Warning tone</Heading>
|
|
58
|
+
<Heading tone="danger">Danger tone</Heading>
|
|
59
|
+
</div>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
46
62
|
```
|
|
@@ -16,16 +16,26 @@ Small supporting text placed beneath a form field to provide hints or validation
|
|
|
16
16
|
## Example: Default
|
|
17
17
|
|
|
18
18
|
```tsx
|
|
19
|
-
|
|
19
|
+
import { HelperText } from '@nexub/react';
|
|
20
|
+
|
|
21
|
+
export default function Example() {
|
|
22
|
+
return <HelperText>We will never share your email with anyone else.</HelperText>;
|
|
23
|
+
}
|
|
20
24
|
```
|
|
21
25
|
|
|
22
26
|
## Example: Tones
|
|
23
27
|
|
|
24
28
|
```tsx
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
import { HelperText } from '@nexub/react';
|
|
30
|
+
|
|
31
|
+
export default function Example() {
|
|
32
|
+
return (
|
|
33
|
+
<div className="flex flex-col gap-1.5 items-start">
|
|
34
|
+
<HelperText tone="info">Sync runs every 10 minutes.</HelperText>
|
|
35
|
+
<HelperText tone="success">Your account is verified.</HelperText>
|
|
36
|
+
<HelperText tone="warning">This action cannot be reversed.</HelperText>
|
|
37
|
+
<HelperText tone="danger">Required field is missing.</HelperText>
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
31
41
|
```
|
|
@@ -19,16 +19,25 @@ Rich tooltip card revealed on hover.
|
|
|
19
19
|
## Example: Default
|
|
20
20
|
|
|
21
21
|
```tsx
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
import { HoverCard, Link, Avatar, Text } from '@nexub/react';
|
|
23
|
+
|
|
24
|
+
export default function Example() {
|
|
25
|
+
return (
|
|
26
|
+
<HoverCard.Root>
|
|
27
|
+
<HoverCard.Trigger asChild>
|
|
28
|
+
<Link href="#">@alex_johnson</Link>
|
|
29
|
+
</HoverCard.Trigger>
|
|
30
|
+
<HoverCard.Content>
|
|
31
|
+
<div className="flex flex-col gap-2 items-start">
|
|
32
|
+
<Avatar name="Alex Johnson" size="lg" />
|
|
33
|
+
<div>
|
|
34
|
+
<Text weight="semibold">Alex Johnson</Text>
|
|
35
|
+
<Text size="body-sm" tone="muted">Product Designer</Text>
|
|
36
|
+
</div>
|
|
37
|
+
<Text size="body-sm" tone="secondary">Building design systems and making developers happy.</Text>
|
|
38
|
+
</div>
|
|
39
|
+
</HoverCard.Content>
|
|
40
|
+
</HoverCard.Root>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
34
43
|
```
|
|
@@ -19,26 +19,28 @@ A square button designed to hold a single icon, with an accessible label.
|
|
|
19
19
|
## Example: Default
|
|
20
20
|
|
|
21
21
|
```tsx
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
import { IconButton } from '@nexub/react';
|
|
23
|
+
|
|
24
|
+
export default function Example() {
|
|
25
|
+
const icon = <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><path d="M12 5v14M5 12h14" /></svg>;
|
|
26
|
+
return <IconButton variant="ghost" label="Add item">{icon}</IconButton>;
|
|
27
|
+
}
|
|
25
28
|
```
|
|
26
29
|
|
|
27
30
|
## Example: Variants
|
|
28
31
|
|
|
29
32
|
```tsx
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<div
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</div>
|
|
33
|
+
import { IconButton } from '@nexub/react';
|
|
34
|
+
|
|
35
|
+
export default function Example() {
|
|
36
|
+
const icon = <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"><path d="M12 5v14M5 12h14" /></svg>;
|
|
37
|
+
return (
|
|
38
|
+
<div className="flex gap-2 flex-wrap items-center justify-center">
|
|
39
|
+
<IconButton variant="ghost" label="Ghost">{icon}</IconButton>
|
|
40
|
+
<IconButton variant="solid" label="Solid">{icon}</IconButton>
|
|
41
|
+
<IconButton variant="outline" label="Outline">{icon}</IconButton>
|
|
42
|
+
<IconButton variant="subtle" label="Subtle">{icon}</IconButton>
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
44
46
|
```
|
|
@@ -16,10 +16,19 @@ Key–value list for displaying structured metadata or details.
|
|
|
16
16
|
## Example: Default
|
|
17
17
|
|
|
18
18
|
```tsx
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
import { InfoList } from '@nexub/patterns';
|
|
20
|
+
import { Badge } from '@nexub/react';
|
|
21
|
+
|
|
22
|
+
export default function Example() {
|
|
23
|
+
return (
|
|
24
|
+
<div className="w-[280px]">
|
|
25
|
+
<InfoList.Root>
|
|
26
|
+
<InfoList.Item label="Plan" value="Pro" />
|
|
27
|
+
<InfoList.Item label="Seats" value="12 / 50" />
|
|
28
|
+
<InfoList.Item label="Renewal" value="Jan 15, 2026" />
|
|
29
|
+
<InfoList.Item label="Status" value={<Badge tone="success" size="sm">Active</Badge>} />
|
|
30
|
+
</InfoList.Root>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
25
34
|
```
|