@nexub/mcp 2.7.0 → 2.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/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,39 +19,40 @@ Scrollable container with custom styled scrollbars.
|
|
|
19
19
|
## Example: Default
|
|
20
20
|
|
|
21
21
|
```tsx
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
import { ScrollArea } from '@nexub/react';
|
|
23
|
+
|
|
24
|
+
export default function Example() {
|
|
25
|
+
return (
|
|
26
|
+
<ScrollArea className="h-[200px] w-[280px] border border-[var(--color-outline-variant)] rounded-shape-field p-3">
|
|
27
|
+
{Array.from({ length: 20 }, (_, i) => (
|
|
28
|
+
<div key={i} className="py-1 px-0 text-body-sm text-[var(--color-on-surface-variant)]">
|
|
29
|
+
List item {i + 1}
|
|
30
|
+
</div>
|
|
31
|
+
))}
|
|
32
|
+
</ScrollArea>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
29
35
|
```
|
|
30
36
|
|
|
31
37
|
## Example: Horizontal
|
|
32
38
|
|
|
33
39
|
```tsx
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
color: 'var(--color-text-secondary)',
|
|
49
|
-
flexShrink: 0,
|
|
50
|
-
}}
|
|
51
|
-
>
|
|
52
|
-
Card {i + 1}
|
|
40
|
+
import { ScrollArea } from '@nexub/react';
|
|
41
|
+
|
|
42
|
+
export default function Example() {
|
|
43
|
+
return (
|
|
44
|
+
<ScrollArea orientation="horizontal" className="w-[320px] border border-[var(--color-outline-variant)] rounded-shape-field p-3">
|
|
45
|
+
<div className="flex gap-2 w-max">
|
|
46
|
+
{Array.from({ length: 12 }, (_, i) => (
|
|
47
|
+
<div
|
|
48
|
+
key={i}
|
|
49
|
+
className="w-[80px] h-[80px] bg-[var(--color-surface-container-low)] rounded-shape-tooltip flex items-center justify-center text-label-sm text-[var(--color-on-surface-variant)] shrink-0"
|
|
50
|
+
>
|
|
51
|
+
Card {i + 1}
|
|
52
|
+
</div>
|
|
53
|
+
))}
|
|
53
54
|
</div>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
</ScrollArea>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
57
58
|
```
|
|
@@ -18,5 +18,9 @@ A text input pre-wired with a search icon and a clear button for filtering conte
|
|
|
18
18
|
## Example: Default
|
|
19
19
|
|
|
20
20
|
```tsx
|
|
21
|
-
|
|
21
|
+
import { SearchInput } from '@nexub/react';
|
|
22
|
+
|
|
23
|
+
export default function Example() {
|
|
24
|
+
return <div className="w-[280px]"><SearchInput placeholder="Search…" /></div>;
|
|
25
|
+
}
|
|
22
26
|
```
|
|
@@ -17,28 +17,35 @@ Tab-style control for mutually exclusive selections.
|
|
|
17
17
|
## Example: Default
|
|
18
18
|
|
|
19
19
|
```tsx
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
import { SegmentedControl } from '@nexub/react';
|
|
21
|
+
|
|
22
|
+
export default function Example() {
|
|
23
|
+
return (
|
|
24
|
+
<SegmentedControl.Root defaultValue="month">
|
|
25
|
+
<SegmentedControl.Item value="day">Day</SegmentedControl.Item>
|
|
26
|
+
<SegmentedControl.Item value="week">Week</SegmentedControl.Item>
|
|
27
|
+
<SegmentedControl.Item value="month">Month</SegmentedControl.Item>
|
|
28
|
+
</SegmentedControl.Root>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
25
31
|
```
|
|
26
32
|
|
|
27
33
|
## Example: Sizes
|
|
28
34
|
|
|
29
35
|
```tsx
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
import { SegmentedControl } from '@nexub/react';
|
|
37
|
+
|
|
38
|
+
export default function Example() {
|
|
39
|
+
return (
|
|
40
|
+
<div className="flex flex-col gap-3 items-start">
|
|
41
|
+
{(['sm', 'md', 'lg'] as const).map((s) => (
|
|
42
|
+
<SegmentedControl.Root key={s} size={s} defaultValue="a">
|
|
43
|
+
<SegmentedControl.Item value="a">A</SegmentedControl.Item>
|
|
44
|
+
<SegmentedControl.Item value="b">B</SegmentedControl.Item>
|
|
45
|
+
<SegmentedControl.Item value="c">C</SegmentedControl.Item>
|
|
46
|
+
</SegmentedControl.Root>
|
|
47
|
+
))}
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
44
51
|
```
|
|
@@ -32,12 +32,20 @@ Accessible dropdown select built on Radix UI. Supports groups and search.
|
|
|
32
32
|
## Example: Default
|
|
33
33
|
|
|
34
34
|
```tsx
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
import { Select } from '@nexub/react';
|
|
36
|
+
|
|
37
|
+
export default function Example() {
|
|
38
|
+
return (
|
|
39
|
+
<div className="w-[220px]">
|
|
40
|
+
<Select.Root>
|
|
41
|
+
<Select.Trigger><Select.Value placeholder="Select an option…" /></Select.Trigger>
|
|
42
|
+
<Select.Content>
|
|
43
|
+
<Select.Item value="option-1">Option 1</Select.Item>
|
|
44
|
+
<Select.Item value="option-2">Option 2</Select.Item>
|
|
45
|
+
<Select.Item value="option-3">Option 3</Select.Item>
|
|
46
|
+
</Select.Content>
|
|
47
|
+
</Select.Root>
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
43
51
|
```
|
|
@@ -16,15 +16,25 @@ A horizontal or vertical visual divider.
|
|
|
16
16
|
## Example: Default
|
|
17
17
|
|
|
18
18
|
```tsx
|
|
19
|
-
|
|
19
|
+
import { Separator } from '@nexub/react';
|
|
20
|
+
|
|
21
|
+
export default function Example() {
|
|
22
|
+
return <div className="w-[280px]"><Separator /></div>;
|
|
23
|
+
}
|
|
20
24
|
```
|
|
21
25
|
|
|
22
26
|
## Example: Vertical
|
|
23
27
|
|
|
24
28
|
```tsx
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
import { Separator } from '@nexub/react';
|
|
30
|
+
|
|
31
|
+
export default function Example() {
|
|
32
|
+
return (
|
|
33
|
+
<div className="flex h-[32px] items-center gap-4">
|
|
34
|
+
<span className="text-[var(--color-on-surface-variant)] text-body-sm">Left</span>
|
|
35
|
+
<Separator orientation="vertical" />
|
|
36
|
+
<span className="text-[var(--color-on-surface-variant)] text-body-sm">Right</span>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
30
40
|
```
|
|
@@ -18,14 +18,23 @@ Grouped settings panel with title, description, and action area.
|
|
|
18
18
|
## Example: Default
|
|
19
19
|
|
|
20
20
|
```tsx
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
import { SettingsSection } from '@nexub/patterns';
|
|
22
|
+
import { Switch } from '@nexub/react';
|
|
23
|
+
|
|
24
|
+
export default function Example() {
|
|
25
|
+
return (
|
|
26
|
+
<div className="w-full max-w-[560px]">
|
|
27
|
+
<SettingsSection title="Notifications" description="Control how and when you receive notifications.">
|
|
28
|
+
<div className="flex flex-col gap-3 items-start">
|
|
29
|
+
{['Email alerts', 'Push notifications'].map((item) => (
|
|
30
|
+
<div key={item} className="flex items-center justify-between">
|
|
31
|
+
<span className="text-body-sm text-[var(--color-on-surface)]">{item}</span>
|
|
32
|
+
<Switch defaultChecked />
|
|
33
|
+
</div>
|
|
34
|
+
))}
|
|
35
|
+
</div>
|
|
36
|
+
</SettingsSection>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
31
40
|
```
|
|
@@ -26,26 +26,29 @@ Alias for Drawer — slide-in sheet panel.
|
|
|
26
26
|
## Example: Default
|
|
27
27
|
|
|
28
28
|
```tsx
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<Sheet
|
|
37
|
-
|
|
38
|
-
<Sheet.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</Sheet.Root>
|
|
29
|
+
import * as React from 'react';
|
|
30
|
+
import { Button, Sheet, Text } from '@nexub/react';
|
|
31
|
+
|
|
32
|
+
export default function Example() {
|
|
33
|
+
const [open, setOpen] = React.useState(false);
|
|
34
|
+
return (
|
|
35
|
+
<>
|
|
36
|
+
<Button variant="outline" onClick={() => setOpen(true)}>Open Sheet</Button>
|
|
37
|
+
<Sheet.Root open={open} onOpenChange={setOpen}>
|
|
38
|
+
<Sheet.Portal>
|
|
39
|
+
<Sheet.Overlay />
|
|
40
|
+
<Sheet.Content side="right">
|
|
41
|
+
<Sheet.Header>
|
|
42
|
+
<Sheet.Title>Notifications</Sheet.Title>
|
|
43
|
+
<Sheet.Description>Your recent activity</Sheet.Description>
|
|
44
|
+
</Sheet.Header>
|
|
45
|
+
<div className="p-4 flex-1">
|
|
46
|
+
<Text size="body-sm" tone="muted">No new notifications.</Text>
|
|
47
|
+
</div>
|
|
48
|
+
</Sheet.Content>
|
|
49
|
+
</Sheet.Portal>
|
|
50
|
+
</Sheet.Root>
|
|
51
|
+
</>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
51
54
|
```
|
|
@@ -18,21 +18,38 @@ Placeholder loading animation that mimics content layout.
|
|
|
18
18
|
## Example: Default
|
|
19
19
|
|
|
20
20
|
```tsx
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
import { Skeleton } from '@nexub/react';
|
|
22
|
+
|
|
23
|
+
export default function Example() {
|
|
24
|
+
return (
|
|
25
|
+
<div className="flex flex-col gap-2 items-start w-[280px]">
|
|
26
|
+
<Skeleton shape="line" width="60%" />
|
|
27
|
+
<Skeleton shape="line" width="100%" />
|
|
28
|
+
<Skeleton shape="line" width="80%" />
|
|
29
|
+
<div className="flex gap-2 flex-nowrap items-center justify-center">
|
|
30
|
+
<Skeleton shape="circle" width={40} height={40} />
|
|
31
|
+
<div className="flex flex-col gap-1.5 items-start flex-1">
|
|
32
|
+
<Skeleton shape="line" width="70%" />
|
|
33
|
+
<Skeleton shape="line" width="50%" />
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
28
39
|
```
|
|
29
40
|
|
|
30
41
|
## Example: Shapes
|
|
31
42
|
|
|
32
43
|
```tsx
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
44
|
+
import { Skeleton } from '@nexub/react';
|
|
45
|
+
|
|
46
|
+
export default function Example() {
|
|
47
|
+
return (
|
|
48
|
+
<div className="flex gap-4 flex-wrap items-center justify-center">
|
|
49
|
+
<Skeleton shape="line" width={80} />
|
|
50
|
+
<Skeleton shape="rect" width={80} height={40} />
|
|
51
|
+
<Skeleton shape="circle" width={40} height={40} />
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
38
55
|
```
|
|
@@ -21,11 +21,19 @@ Range slider built on Radix UI Slider.
|
|
|
21
21
|
## Example: Default
|
|
22
22
|
|
|
23
23
|
```tsx
|
|
24
|
-
|
|
24
|
+
import { Slider } from '@nexub/react';
|
|
25
|
+
|
|
26
|
+
export default function Example() {
|
|
27
|
+
return <div className="w-[240px]"><Slider defaultValue={[50]} min={0} max={100} /></div>;
|
|
28
|
+
}
|
|
25
29
|
```
|
|
26
30
|
|
|
27
31
|
## Example: Range
|
|
28
32
|
|
|
29
33
|
```tsx
|
|
30
|
-
|
|
34
|
+
import { Slider } from '@nexub/react';
|
|
35
|
+
|
|
36
|
+
export default function Example() {
|
|
37
|
+
return <div className="w-[240px]"><Slider defaultValue={[20, 80]} min={0} max={100} /></div>;
|
|
38
|
+
}
|
|
31
39
|
```
|
|
@@ -16,17 +16,26 @@ Animated loading indicator. Inherits color from context.
|
|
|
16
16
|
## Example: Sizes
|
|
17
17
|
|
|
18
18
|
```tsx
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<Spinner size="md"
|
|
23
|
-
|
|
24
|
-
<Spinner size="xl" />
|
|
25
|
-
</div>
|
|
19
|
+
import { Spinner } from '@nexub/react';
|
|
20
|
+
|
|
21
|
+
export default function Example() {
|
|
22
|
+
return <div className="flex gap-5 flex-wrap items-center justify-center"><Spinner size="sm" /><Spinner size="md" /><Spinner size="lg" /><Spinner size="xl" /></div>;
|
|
23
|
+
}
|
|
26
24
|
```
|
|
27
25
|
|
|
28
26
|
## Example: Inside button
|
|
29
27
|
|
|
30
28
|
```tsx
|
|
31
|
-
|
|
29
|
+
import { Spinner } from '@nexub/react';
|
|
30
|
+
|
|
31
|
+
export default function Example() {
|
|
32
|
+
return (
|
|
33
|
+
<div className="flex gap-5 flex-wrap items-center justify-center">
|
|
34
|
+
<Spinner size="md" tone="info" />
|
|
35
|
+
<Spinner size="md" tone="success" />
|
|
36
|
+
<Spinner size="md" tone="warning" />
|
|
37
|
+
<Spinner size="md" tone="danger" />
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
32
41
|
```
|
|
@@ -18,26 +18,37 @@ A primary action with related secondary actions behind a chevron, as one connect
|
|
|
18
18
|
## Example: Default
|
|
19
19
|
|
|
20
20
|
```tsx
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
>
|
|
31
|
-
|
|
32
|
-
|
|
21
|
+
import { SplitButton, DropdownMenu } from '@nexub/react';
|
|
22
|
+
|
|
23
|
+
export default function Example() {
|
|
24
|
+
return (
|
|
25
|
+
<SplitButton
|
|
26
|
+
menuLabel="More save options"
|
|
27
|
+
menu={
|
|
28
|
+
<>
|
|
29
|
+
<DropdownMenu.Item>Save as draft</DropdownMenu.Item>
|
|
30
|
+
<DropdownMenu.Item>Save a copy</DropdownMenu.Item>
|
|
31
|
+
</>
|
|
32
|
+
}
|
|
33
|
+
>
|
|
34
|
+
Save
|
|
35
|
+
</SplitButton>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
33
38
|
```
|
|
34
39
|
|
|
35
40
|
## Example: Outlined
|
|
36
41
|
|
|
37
42
|
```tsx
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
import { SplitButton, DropdownMenu } from '@nexub/react';
|
|
44
|
+
|
|
45
|
+
export default function Example() {
|
|
46
|
+
return (
|
|
47
|
+
<SplitButton variant="outlined" menuLabel="More export options" menu={<DropdownMenu.Item>CSV</DropdownMenu.Item>}>
|
|
48
|
+
Export
|
|
49
|
+
</SplitButton>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
41
52
|
```
|
|
42
53
|
|
|
43
54
|
Related: [button](button.md), [button-group](button-group.md), [dropdown-menu](dropdown-menu.md)
|
|
@@ -17,19 +17,31 @@ Vertical stack layout with configurable gap.
|
|
|
17
17
|
## Example: Default
|
|
18
18
|
|
|
19
19
|
```tsx
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
import { Stack, Button } from '@nexub/react';
|
|
21
|
+
|
|
22
|
+
export default function Example() {
|
|
23
|
+
return (
|
|
24
|
+
<Stack gap="md">
|
|
25
|
+
<Button variant="outline">Item 1</Button>
|
|
26
|
+
<Button variant="outline">Item 2</Button>
|
|
27
|
+
<Button variant="outline">Item 3</Button>
|
|
28
|
+
</Stack>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
25
31
|
```
|
|
26
32
|
|
|
27
33
|
## Example: With dividers
|
|
28
34
|
|
|
29
35
|
```tsx
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
import { Stack, Separator, Text } from '@nexub/react';
|
|
37
|
+
|
|
38
|
+
export default function Example() {
|
|
39
|
+
return (
|
|
40
|
+
<Stack gap="md" divider={<Separator />} className="w-[220px]">
|
|
41
|
+
<Text size="body-sm">First item</Text>
|
|
42
|
+
<Text size="body-sm">Second item</Text>
|
|
43
|
+
<Text size="body-sm">Third item</Text>
|
|
44
|
+
</Stack>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
35
47
|
```
|
|
@@ -22,29 +22,48 @@ Metric display card showing a KPI value, label, optional delta, and icon.
|
|
|
22
22
|
## Example: Default
|
|
23
23
|
|
|
24
24
|
```tsx
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
import { StatCard } from '@nexub/patterns';
|
|
26
|
+
|
|
27
|
+
export default function Example() {
|
|
28
|
+
return (
|
|
29
|
+
<div className="w-[240px]">
|
|
30
|
+
<StatCard label="Total Revenue" value="$48,295" delta="+12.5%" deltaType="increase" description="vs last month" />
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
32
34
|
```
|
|
33
35
|
|
|
34
36
|
## Example: With icon
|
|
35
37
|
|
|
36
38
|
```tsx
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/>
|
|
39
|
+
import { StatCard } from '@nexub/patterns';
|
|
40
|
+
|
|
41
|
+
export default function Example() {
|
|
42
|
+
return (
|
|
43
|
+
<div className="flex gap-3 flex-wrap items-center justify-center">
|
|
44
|
+
<StatCard label="Users" value="2,841" delta="+8.3%" deltaType="increase" />
|
|
45
|
+
<StatCard label="Churn" value="3.2%" delta="-0.4%" deltaType="decrease" />
|
|
46
|
+
</div>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
44
49
|
```
|
|
45
50
|
|
|
46
51
|
## Example: Animated
|
|
47
52
|
|
|
48
53
|
```tsx
|
|
49
|
-
|
|
54
|
+
import * as React from 'react';
|
|
55
|
+
import { StatCard } from '@nexub/patterns';
|
|
56
|
+
import { Button } from '@nexub/react';
|
|
57
|
+
|
|
58
|
+
export default function Example() {
|
|
59
|
+
const [orders, setOrders] = React.useState(1284);
|
|
60
|
+
return (
|
|
61
|
+
<div className="flex flex-col gap-3 items-stretch w-[240px]">
|
|
62
|
+
<StatCard label="Orders today" value={orders.toLocaleString('en-US')} animate />
|
|
63
|
+
<Button size="sm" variant="outlined" onClick={() => setOrders((o) => o + Math.ceil(Math.random() * 40))}>
|
|
64
|
+
New orders
|
|
65
|
+
</Button>
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
50
69
|
```
|
|
@@ -17,21 +17,27 @@
|
|
|
17
17
|
## Example: Default
|
|
18
18
|
|
|
19
19
|
```tsx
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
import { StatusPill } from '@nexub/react';
|
|
21
|
+
|
|
22
|
+
export default function Example() {
|
|
23
|
+
return (
|
|
24
|
+
<div className="flex gap-2 flex-wrap items-center justify-center">
|
|
25
|
+
<StatusPill tone="success" label="Active" />
|
|
26
|
+
<StatusPill tone="warning" label="Pending" />
|
|
27
|
+
<StatusPill tone="danger" label="Error" />
|
|
28
|
+
<StatusPill tone="neutral" label="Draft" />
|
|
29
|
+
<StatusPill tone="info" label="Syncing" />
|
|
30
|
+
</div>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
27
33
|
```
|
|
28
34
|
|
|
29
35
|
## Example: With dot
|
|
30
36
|
|
|
31
37
|
```tsx
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<StatusPill tone="
|
|
36
|
-
|
|
38
|
+
import { StatusPill } from '@nexub/react';
|
|
39
|
+
|
|
40
|
+
export default function Example() {
|
|
41
|
+
return <StatusPill tone="success" dot label="Live" />;
|
|
42
|
+
}
|
|
37
43
|
```
|
|
@@ -17,13 +17,14 @@ Visual progress indicator for multi-step flows like onboarding or checkout.
|
|
|
17
17
|
## Example: Default
|
|
18
18
|
|
|
19
19
|
```tsx
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
import { StepIndicator } from '@nexub/patterns';
|
|
21
|
+
|
|
22
|
+
export default function Example() {
|
|
23
|
+
return (
|
|
24
|
+
<StepIndicator
|
|
25
|
+
currentStep={1}
|
|
26
|
+
steps={[{ label: 'Account' }, { label: 'Profile' }, { label: 'Billing' }, { label: 'Done' }]}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
29
30
|
```
|