@neynar/ui 0.3.0 → 0.3.1
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/.llm/a.llm.md +131 -0
- package/.llm/accordion-content.llm.md +67 -0
- package/.llm/accordion-item.llm.md +61 -0
- package/.llm/accordion-trigger.llm.md +69 -0
- package/.llm/accordion.llm.md +88 -0
- package/.llm/alert-description.llm.md +78 -0
- package/.llm/alert-dialog-action.llm.md +51 -0
- package/.llm/alert-dialog-cancel.llm.md +48 -0
- package/.llm/alert-dialog-content.llm.md +88 -0
- package/.llm/alert-dialog-description.llm.md +53 -0
- package/.llm/alert-dialog-footer.llm.md +41 -0
- package/.llm/alert-dialog-header.llm.md +39 -0
- package/.llm/alert-dialog-overlay.llm.md +44 -0
- package/.llm/alert-dialog-portal.llm.md +41 -0
- package/.llm/alert-dialog-title.llm.md +46 -0
- package/.llm/alert-dialog-trigger.llm.md +40 -0
- package/.llm/alert-dialog.llm.md +80 -0
- package/.llm/alert-title.llm.md +48 -0
- package/.llm/alert.llm.md +92 -0
- package/.llm/aspect-ratio.llm.md +41 -0
- package/.llm/avatar-fallback.llm.md +41 -0
- package/.llm/avatar-image.llm.md +48 -0
- package/.llm/avatar.llm.md +35 -0
- package/.llm/badge.llm.md +117 -0
- package/.llm/blockquote.llm.md +117 -0
- package/.llm/breadcrumb-ellipsis.llm.md +73 -0
- package/.llm/breadcrumb-item.llm.md +53 -0
- package/.llm/breadcrumb-link.llm.md +84 -0
- package/.llm/breadcrumb-list.llm.md +54 -0
- package/.llm/breadcrumb-page.llm.md +52 -0
- package/.llm/breadcrumb-separator.llm.md +60 -0
- package/.llm/breadcrumb.llm.md +110 -0
- package/.llm/button-group-separator.llm.md +53 -0
- package/.llm/button-group-text.llm.md +56 -0
- package/.llm/button-group.llm.md +81 -0
- package/.llm/button.llm.md +281 -0
- package/.llm/calendar-day-button.llm.md +57 -0
- package/.llm/calendar.llm.md +340 -0
- package/.llm/card-action.llm.md +64 -0
- package/.llm/card-content.llm.md +48 -0
- package/.llm/card-description.llm.md +46 -0
- package/.llm/card-footer.llm.md +56 -0
- package/.llm/card-header.llm.md +53 -0
- package/.llm/card-title.llm.md +43 -0
- package/.llm/card.llm.md +100 -0
- package/.llm/carousel-content.llm.md +77 -0
- package/.llm/carousel-item.llm.md +96 -0
- package/.llm/carousel-next.llm.md +95 -0
- package/.llm/carousel-previous.llm.md +95 -0
- package/.llm/carousel.llm.md +211 -0
- package/.llm/chart-config.llm.md +71 -0
- package/.llm/chart-container.llm.md +148 -0
- package/.llm/chart-legend-content.llm.md +85 -0
- package/.llm/chart-legend.llm.md +144 -0
- package/.llm/chart-style.llm.md +28 -0
- package/.llm/chart-tooltip-content.llm.md +149 -0
- package/.llm/chart-tooltip.llm.md +184 -0
- package/.llm/checkbox.llm.md +100 -0
- package/.llm/cn.llm.md +46 -0
- package/.llm/code.llm.md +103 -0
- package/.llm/collapsible-content.llm.md +109 -0
- package/.llm/collapsible-trigger.llm.md +75 -0
- package/.llm/collapsible.llm.md +109 -0
- package/.llm/combobox-option.llm.md +53 -0
- package/.llm/combobox.llm.md +208 -0
- package/.llm/command-dialog.llm.md +112 -0
- package/.llm/command-empty.llm.md +63 -0
- package/.llm/command-group.llm.md +83 -0
- package/.llm/command-input.llm.md +82 -0
- package/.llm/command-item.llm.md +97 -0
- package/.llm/command-list.llm.md +53 -0
- package/.llm/command-loading.llm.md +48 -0
- package/.llm/command-separator.llm.md +44 -0
- package/.llm/command-shortcut.llm.md +63 -0
- package/.llm/command.llm.md +147 -0
- package/.llm/container.llm.md +236 -0
- package/.llm/context-menu-checkbox-item.llm.md +97 -0
- package/.llm/context-menu-content.llm.md +91 -0
- package/.llm/context-menu-group.llm.md +61 -0
- package/.llm/context-menu-item.llm.md +94 -0
- package/.llm/context-menu-label.llm.md +60 -0
- package/.llm/context-menu-portal.llm.md +49 -0
- package/.llm/context-menu-radio-group.llm.md +66 -0
- package/.llm/context-menu-radio-item.llm.md +76 -0
- package/.llm/context-menu-separator.llm.md +51 -0
- package/.llm/context-menu-shortcut.llm.md +57 -0
- package/.llm/context-menu-sub-content.llm.md +90 -0
- package/.llm/context-menu-sub-trigger.llm.md +73 -0
- package/.llm/context-menu-sub.llm.md +61 -0
- package/.llm/context-menu-trigger.llm.md +53 -0
- package/.llm/context-menu.llm.md +103 -0
- package/.llm/date-picker.llm.md +90 -0
- package/.llm/dialog-close.llm.md +61 -0
- package/.llm/dialog-content.llm.md +128 -0
- package/.llm/dialog-description.llm.md +44 -0
- package/.llm/dialog-footer.llm.md +38 -0
- package/.llm/dialog-header.llm.md +40 -0
- package/.llm/dialog-overlay.llm.md +57 -0
- package/.llm/dialog-portal.llm.md +47 -0
- package/.llm/dialog-title.llm.md +41 -0
- package/.llm/dialog-trigger.llm.md +51 -0
- package/.llm/dialog.llm.md +113 -0
- package/.llm/drawer-close.llm.md +53 -0
- package/.llm/drawer-content.llm.md +58 -0
- package/.llm/drawer-description.llm.md +54 -0
- package/.llm/drawer-footer.llm.md +67 -0
- package/.llm/drawer-header.llm.md +60 -0
- package/.llm/drawer-overlay.llm.md +40 -0
- package/.llm/drawer-portal.llm.md +42 -0
- package/.llm/drawer-title.llm.md +51 -0
- package/.llm/drawer-trigger.llm.md +44 -0
- package/.llm/drawer.llm.md +194 -0
- package/.llm/dropdown-menu-checkbox-item.llm.md +111 -0
- package/.llm/dropdown-menu-content.llm.md +109 -0
- package/.llm/dropdown-menu-group.llm.md +38 -0
- package/.llm/dropdown-menu-item.llm.md +94 -0
- package/.llm/dropdown-menu-label.llm.md +66 -0
- package/.llm/dropdown-menu-portal.llm.md +32 -0
- package/.llm/dropdown-menu-radio-group.llm.md +73 -0
- package/.llm/dropdown-menu-radio-item.llm.md +92 -0
- package/.llm/dropdown-menu-separator.llm.md +55 -0
- package/.llm/dropdown-menu-shortcut.llm.md +74 -0
- package/.llm/dropdown-menu-sub-content.llm.md +80 -0
- package/.llm/dropdown-menu-sub-trigger.llm.md +84 -0
- package/.llm/dropdown-menu-sub.llm.md +74 -0
- package/.llm/dropdown-menu-trigger.llm.md +48 -0
- package/.llm/dropdown-menu.llm.md +120 -0
- package/.llm/empty-content.llm.md +103 -0
- package/.llm/empty-description.llm.md +70 -0
- package/.llm/empty-header.llm.md +64 -0
- package/.llm/empty-media.llm.md +81 -0
- package/.llm/empty-state.llm.md +174 -0
- package/.llm/empty-title.llm.md +54 -0
- package/.llm/empty.llm.md +158 -0
- package/.llm/field-content.llm.md +28 -0
- package/.llm/field-description.llm.md +28 -0
- package/.llm/field-error.llm.md +41 -0
- package/.llm/field-group.llm.md +84 -0
- package/.llm/field-label.llm.md +28 -0
- package/.llm/field-legend.llm.md +77 -0
- package/.llm/field-separator.llm.md +35 -0
- package/.llm/field-set.llm.md +80 -0
- package/.llm/field-title.llm.md +28 -0
- package/.llm/field.llm.md +35 -0
- package/.llm/h1.llm.md +108 -0
- package/.llm/h2.llm.md +108 -0
- package/.llm/h3.llm.md +106 -0
- package/.llm/h4.llm.md +104 -0
- package/.llm/h5.llm.md +105 -0
- package/.llm/h6.llm.md +105 -0
- package/.llm/hover-card-content.llm.md +167 -0
- package/.llm/hover-card-trigger.llm.md +65 -0
- package/.llm/hover-card.llm.md +121 -0
- package/.llm/input-group-addon.llm.md +91 -0
- package/.llm/input-group-button.llm.md +120 -0
- package/.llm/input-group-input.llm.md +145 -0
- package/.llm/input-group-text.llm.md +75 -0
- package/.llm/input-group-textarea.llm.md +157 -0
- package/.llm/input-group.llm.md +108 -0
- package/.llm/input.llm.md +319 -0
- package/.llm/item-actions.llm.md +77 -0
- package/.llm/item-content.llm.md +73 -0
- package/.llm/item-description.llm.md +61 -0
- package/.llm/item-footer.llm.md +68 -0
- package/.llm/item-group.llm.md +73 -0
- package/.llm/item-header.llm.md +66 -0
- package/.llm/item-media.llm.md +75 -0
- package/.llm/item-separator.llm.md +80 -0
- package/.llm/item-title.llm.md +59 -0
- package/.llm/item.llm.md +115 -0
- package/.llm/kbd-group.llm.md +71 -0
- package/.llm/kbd.llm.md +71 -0
- package/.llm/label.llm.md +145 -0
- package/.llm/lead.llm.md +114 -0
- package/.llm/menubar-checkbox-item.llm.md +66 -0
- package/.llm/menubar-content.llm.md +128 -0
- package/.llm/menubar-group.llm.md +40 -0
- package/.llm/menubar-item.llm.md +62 -0
- package/.llm/menubar-label.llm.md +40 -0
- package/.llm/menubar-menu.llm.md +32 -0
- package/.llm/menubar-portal.llm.md +38 -0
- package/.llm/menubar-radio-group.llm.md +39 -0
- package/.llm/menubar-radio-item.llm.md +59 -0
- package/.llm/menubar-separator.llm.md +35 -0
- package/.llm/menubar-shortcut.llm.md +37 -0
- package/.llm/menubar-sub-content.llm.md +127 -0
- package/.llm/menubar-sub-trigger.llm.md +51 -0
- package/.llm/menubar-sub.llm.md +53 -0
- package/.llm/menubar-trigger.llm.md +37 -0
- package/.llm/menubar.llm.md +115 -0
- package/.llm/navigation-menu-content.llm.md +116 -0
- package/.llm/navigation-menu-indicator.llm.md +68 -0
- package/.llm/navigation-menu-item.llm.md +62 -0
- package/.llm/navigation-menu-link.llm.md +109 -0
- package/.llm/navigation-menu-list.llm.md +52 -0
- package/.llm/navigation-menu-trigger-style.llm.md +22 -0
- package/.llm/navigation-menu-trigger.llm.md +57 -0
- package/.llm/navigation-menu-viewport.llm.md +51 -0
- package/.llm/navigation-menu.llm.md +184 -0
- package/.llm/p.llm.md +110 -0
- package/.llm/pagination-content.llm.md +60 -0
- package/.llm/pagination-ellipsis.llm.md +107 -0
- package/.llm/pagination-item.llm.md +59 -0
- package/.llm/pagination-link.llm.md +150 -0
- package/.llm/pagination-next.llm.md +115 -0
- package/.llm/pagination-previous.llm.md +115 -0
- package/.llm/pagination.llm.md +190 -0
- package/.llm/popover-anchor.llm.md +53 -0
- package/.llm/popover-content.llm.md +109 -0
- package/.llm/popover-trigger.llm.md +54 -0
- package/.llm/popover.llm.md +116 -0
- package/.llm/progress.llm.md +76 -0
- package/.llm/radio-group-indicator.llm.md +28 -0
- package/.llm/radio-group-item.llm.md +40 -0
- package/.llm/radio-group.llm.md +76 -0
- package/.llm/resizable-handle.llm.md +156 -0
- package/.llm/resizable-panel-group.llm.md +149 -0
- package/.llm/resizable-panel.llm.md +157 -0
- package/.llm/scroll-area-corner.llm.md +41 -0
- package/.llm/scroll-area-thumb.llm.md +39 -0
- package/.llm/scroll-area-viewport.llm.md +60 -0
- package/.llm/scroll-area.llm.md +125 -0
- package/.llm/scroll-bar.llm.md +78 -0
- package/.llm/sdk-items-registry.json +3022 -0
- package/.llm/select-content.llm.md +139 -0
- package/.llm/select-group.llm.md +60 -0
- package/.llm/select-item.llm.md +75 -0
- package/.llm/select-label.llm.md +62 -0
- package/.llm/select-scroll-down-button.llm.md +45 -0
- package/.llm/select-scroll-up-button.llm.md +45 -0
- package/.llm/select-separator.llm.md +59 -0
- package/.llm/select-trigger.llm.md +66 -0
- package/.llm/select-value.llm.md +67 -0
- package/.llm/select.llm.md +159 -0
- package/.llm/separator.llm.md +129 -0
- package/.llm/sheet-close.llm.md +49 -0
- package/.llm/sheet-content.llm.md +115 -0
- package/.llm/sheet-description.llm.md +62 -0
- package/.llm/sheet-footer.llm.md +64 -0
- package/.llm/sheet-header.llm.md +52 -0
- package/.llm/sheet-title.llm.md +53 -0
- package/.llm/sheet-trigger.llm.md +46 -0
- package/.llm/sheet.llm.md +126 -0
- package/.llm/sidebar-content.llm.md +63 -0
- package/.llm/sidebar-footer.llm.md +50 -0
- package/.llm/sidebar-group-action.llm.md +60 -0
- package/.llm/sidebar-group-content.llm.md +64 -0
- package/.llm/sidebar-group-label.llm.md +53 -0
- package/.llm/sidebar-group.llm.md +56 -0
- package/.llm/sidebar-header.llm.md +67 -0
- package/.llm/sidebar-input.llm.md +50 -0
- package/.llm/sidebar-inset.llm.md +52 -0
- package/.llm/sidebar-menu-action.llm.md +84 -0
- package/.llm/sidebar-menu-badge.llm.md +60 -0
- package/.llm/sidebar-menu-button.llm.md +103 -0
- package/.llm/sidebar-menu-item.llm.md +75 -0
- package/.llm/sidebar-menu-skeleton.llm.md +76 -0
- package/.llm/sidebar-menu-sub-button.llm.md +85 -0
- package/.llm/sidebar-menu-sub-item.llm.md +54 -0
- package/.llm/sidebar-menu-sub.llm.md +74 -0
- package/.llm/sidebar-menu.llm.md +65 -0
- package/.llm/sidebar-provider.llm.md +79 -0
- package/.llm/sidebar-rail.llm.md +34 -0
- package/.llm/sidebar-separator.llm.md +57 -0
- package/.llm/sidebar-trigger.llm.md +49 -0
- package/.llm/sidebar.llm.md +129 -0
- package/.llm/skeleton.llm.md +134 -0
- package/.llm/slider.llm.md +173 -0
- package/.llm/small.llm.md +110 -0
- package/.llm/span.llm.md +118 -0
- package/.llm/spinner.llm.md +182 -0
- package/.llm/stack.llm.md +28 -0
- package/.llm/strong.llm.md +110 -0
- package/.llm/switch.llm.md +76 -0
- package/.llm/table-body.llm.md +36 -0
- package/.llm/table-caption.llm.md +48 -0
- package/.llm/table-cell.llm.md +53 -0
- package/.llm/table-footer.llm.md +41 -0
- package/.llm/table-head.llm.md +69 -0
- package/.llm/table-header.llm.md +41 -0
- package/.llm/table-row.llm.md +42 -0
- package/.llm/table.llm.md +123 -0
- package/.llm/tabs-content.llm.md +47 -0
- package/.llm/tabs-list.llm.md +41 -0
- package/.llm/tabs-trigger.llm.md +47 -0
- package/.llm/tabs.llm.md +71 -0
- package/.llm/text-field.llm.md +327 -0
- package/.llm/textarea.llm.md +311 -0
- package/.llm/theme-preference.llm.md +25 -0
- package/.llm/theme-toggle.llm.md +57 -0
- package/.llm/theme.llm.md +14 -0
- package/.llm/toast.llm.md +32 -0
- package/.llm/toaster.llm.md +193 -0
- package/.llm/toggle-group-item.llm.md +59 -0
- package/.llm/toggle-group.llm.md +101 -0
- package/.llm/toggle.llm.md +40 -0
- package/.llm/tooltip-content.llm.md +185 -0
- package/.llm/tooltip-provider.llm.md +68 -0
- package/.llm/tooltip-trigger.llm.md +70 -0
- package/.llm/tooltip.llm.md +129 -0
- package/.llm/typography.llm.md +161 -0
- package/.llm/use-carousel.llm.md +55 -0
- package/.llm/use-command-state.llm.md +32 -0
- package/.llm/use-is-mobile.llm.md +73 -0
- package/.llm/use-sidebar.llm.md +61 -0
- package/dist/components/ui/scroll-area.d.ts +5 -5
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/stack.d.ts.map +1 -1
- package/dist/components/ui/stories/scroll-area.stories.d.ts +1 -1
- package/dist/components/ui/theme-toggle.d.ts +0 -3
- package/dist/components/ui/theme-toggle.d.ts.map +1 -1
- package/dist/components/ui/theme.d.ts.map +1 -1
- package/dist/index.js +4972 -9636
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/ui/stack.tsx +3 -1
- package/src/components/ui/theme-toggle.tsx +1 -3
- package/src/components/ui/theme.tsx +6 -1
- package/src/styles/globals.css +57 -85
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Empty
|
|
2
|
+
|
|
3
|
+
**Type**: component
|
|
4
|
+
|
|
5
|
+
Empty - Flexible container for displaying empty states with consistent layout A foundational empty state component that provides a centered, vertically-aligned container optimized for displaying empty or no-data states. Uses a composable architecture similar to Alert and Card components, allowing fine-grained control over layout and content through sub-components. ## Key Features - Composable sub-components for flexible layouts (header, media, title, description, content) - Responsive padding that adapts from mobile to desktop (p-6 to md:p-12) - Built-in flex layout with automatic centering and gap spacing - Border-dashed styling hint for visual differentiation - Maximum content width constraints for optimal readability - Text balance for improved typography on multi-line content - Fully accessible with semantic HTML structure ## When to Use - Search results with no matches - Empty data tables, lists, or dashboards - Onboarding states for new users - File uploads or content creation areas - Inbox or notification centers with no items - Error recovery or loading failure scenarios ## Component Architecture - **Empty**: Root container with flex layout, padding, and centering - **EmptyHeader**: Groups media and title with constrained width (max-w-sm) - **EmptyMedia**: Icon or illustration display with two variants - **EmptyTitle**: Prominent heading text with medium font weight - **EmptyDescription**: Muted description text with link styling - **EmptyContent**: Additional content area for buttons or secondary info
|
|
6
|
+
|
|
7
|
+
## JSX Usage
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
import { Empty } from '@neynar/ui';
|
|
11
|
+
|
|
12
|
+
<Empty
|
|
13
|
+
className="value"
|
|
14
|
+
>
|
|
15
|
+
{/* Your content here */}
|
|
16
|
+
</Empty>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Component Props
|
|
20
|
+
|
|
21
|
+
### className
|
|
22
|
+
- **Type**: `string`
|
|
23
|
+
- **Required**: No
|
|
24
|
+
- **Description**: No description available
|
|
25
|
+
|
|
26
|
+
### children
|
|
27
|
+
- **Type**: `React.ReactNode`
|
|
28
|
+
- **Required**: No
|
|
29
|
+
- **Description**: No description available
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
### Example 1
|
|
34
|
+
```tsx
|
|
35
|
+
// Basic empty state with icon, title, and description
|
|
36
|
+
import { Inbox } from 'lucide-react';
|
|
37
|
+
<Empty>
|
|
38
|
+
<EmptyHeader>
|
|
39
|
+
<EmptyMedia variant="icon">
|
|
40
|
+
<Inbox />
|
|
41
|
+
</EmptyMedia>
|
|
42
|
+
<EmptyTitle>No messages yet</EmptyTitle>
|
|
43
|
+
</EmptyHeader>
|
|
44
|
+
<EmptyDescription>
|
|
45
|
+
New messages will appear here when you receive them.
|
|
46
|
+
</EmptyDescription>
|
|
47
|
+
</Empty>
|
|
48
|
+
```
|
|
49
|
+
### Example 2
|
|
50
|
+
```tsx
|
|
51
|
+
// Search results empty state with action button
|
|
52
|
+
import { Search } from 'lucide-react';
|
|
53
|
+
import { Button } from './button';
|
|
54
|
+
<Empty>
|
|
55
|
+
<EmptyHeader>
|
|
56
|
+
<EmptyMedia variant="icon">
|
|
57
|
+
<Search />
|
|
58
|
+
</EmptyMedia>
|
|
59
|
+
<EmptyTitle>No results found</EmptyTitle>
|
|
60
|
+
</EmptyHeader>
|
|
61
|
+
<EmptyDescription>
|
|
62
|
+
Try adjusting your search or filters to find what you're looking for.
|
|
63
|
+
</EmptyDescription>
|
|
64
|
+
<EmptyContent>
|
|
65
|
+
<Button variant="outline" onClick={clearFilters}>
|
|
66
|
+
Clear filters
|
|
67
|
+
</Button>
|
|
68
|
+
</EmptyContent>
|
|
69
|
+
</Empty>
|
|
70
|
+
```
|
|
71
|
+
### Example 3
|
|
72
|
+
```tsx
|
|
73
|
+
// File upload empty state with custom illustration
|
|
74
|
+
import { Upload } from 'lucide-react';
|
|
75
|
+
import { Button } from './button';
|
|
76
|
+
<Empty className="min-h-[400px] border-2 border-dashed">
|
|
77
|
+
<EmptyHeader>
|
|
78
|
+
<EmptyMedia>
|
|
79
|
+
<Upload className="w-16 h-16 text-muted-foreground" />
|
|
80
|
+
</EmptyMedia>
|
|
81
|
+
<EmptyTitle>Drop files here</EmptyTitle>
|
|
82
|
+
</EmptyHeader>
|
|
83
|
+
<EmptyDescription>
|
|
84
|
+
Drag and drop files to upload, or click the button below.
|
|
85
|
+
</EmptyDescription>
|
|
86
|
+
<EmptyContent>
|
|
87
|
+
<Button onClick={openFilePicker}>
|
|
88
|
+
Choose files
|
|
89
|
+
</Button>
|
|
90
|
+
</EmptyContent>
|
|
91
|
+
</Empty>
|
|
92
|
+
```
|
|
93
|
+
### Example 4
|
|
94
|
+
```tsx
|
|
95
|
+
// Complex empty state with multiple actions
|
|
96
|
+
import { Users, UserPlus, Upload } from 'lucide-react';
|
|
97
|
+
import { Button } from './button';
|
|
98
|
+
<Empty>
|
|
99
|
+
<EmptyHeader>
|
|
100
|
+
<EmptyMedia variant="icon">
|
|
101
|
+
<Users />
|
|
102
|
+
</EmptyMedia>
|
|
103
|
+
<EmptyTitle>No team members</EmptyTitle>
|
|
104
|
+
</EmptyHeader>
|
|
105
|
+
<EmptyDescription>
|
|
106
|
+
Get started by <a href="/invite">inviting your first team member</a> or
|
|
107
|
+
importing from a CSV file.
|
|
108
|
+
</EmptyDescription>
|
|
109
|
+
<EmptyContent>
|
|
110
|
+
<div className="flex gap-2">
|
|
111
|
+
<Button onClick={openInviteModal}>
|
|
112
|
+
<UserPlus className="w-4 h-4 mr-2" />
|
|
113
|
+
Invite member
|
|
114
|
+
</Button>
|
|
115
|
+
<Button variant="outline" onClick={importFromCsv}>
|
|
116
|
+
<Upload className="w-4 h-4 mr-2" />
|
|
117
|
+
Import CSV
|
|
118
|
+
</Button>
|
|
119
|
+
</div>
|
|
120
|
+
</EmptyContent>
|
|
121
|
+
</Empty>
|
|
122
|
+
```
|
|
123
|
+
### Example 5
|
|
124
|
+
```tsx
|
|
125
|
+
// Minimal empty state without header grouping
|
|
126
|
+
import { Sparkles } from 'lucide-react';
|
|
127
|
+
<Empty>
|
|
128
|
+
<EmptyMedia>
|
|
129
|
+
<Sparkles className="w-12 h-12 text-primary" />
|
|
130
|
+
</EmptyMedia>
|
|
131
|
+
<EmptyTitle>All caught up!</EmptyTitle>
|
|
132
|
+
<EmptyDescription>
|
|
133
|
+
You've reviewed all pending items.
|
|
134
|
+
</EmptyDescription>
|
|
135
|
+
</Empty>
|
|
136
|
+
```
|
|
137
|
+
### Example 6
|
|
138
|
+
```tsx
|
|
139
|
+
// Error state with custom styling
|
|
140
|
+
import { AlertCircle } from 'lucide-react';
|
|
141
|
+
import { Button } from './button';
|
|
142
|
+
<Empty className="border-destructive/50 bg-destructive/5">
|
|
143
|
+
<EmptyHeader>
|
|
144
|
+
<EmptyMedia>
|
|
145
|
+
<AlertCircle className="w-12 h-12 text-destructive" />
|
|
146
|
+
</EmptyMedia>
|
|
147
|
+
<EmptyTitle>Failed to load data</EmptyTitle>
|
|
148
|
+
</EmptyHeader>
|
|
149
|
+
<EmptyDescription className="text-destructive/90">
|
|
150
|
+
There was an error loading your content. Please try again.
|
|
151
|
+
</EmptyDescription>
|
|
152
|
+
<EmptyContent>
|
|
153
|
+
<Button variant="destructive" onClick={retry}>
|
|
154
|
+
Retry
|
|
155
|
+
</Button>
|
|
156
|
+
</EmptyContent>
|
|
157
|
+
</Empty>
|
|
158
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# FieldContent
|
|
2
|
+
|
|
3
|
+
**Type**: component
|
|
4
|
+
|
|
5
|
+
FieldContent component
|
|
6
|
+
|
|
7
|
+
## JSX Usage
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
import { FieldContent } from '@neynar/ui';
|
|
11
|
+
|
|
12
|
+
<FieldContent
|
|
13
|
+
className={value}
|
|
14
|
+
...props={value}
|
|
15
|
+
/>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Component Props
|
|
19
|
+
|
|
20
|
+
### className
|
|
21
|
+
- **Type**: `unknown`
|
|
22
|
+
- **Required**: Yes
|
|
23
|
+
- **Description**: No description available
|
|
24
|
+
|
|
25
|
+
### ...props
|
|
26
|
+
- **Type**: `unknown`
|
|
27
|
+
- **Required**: Yes
|
|
28
|
+
- **Description**: No description available
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# FieldDescription
|
|
2
|
+
|
|
3
|
+
**Type**: component
|
|
4
|
+
|
|
5
|
+
FieldDescription component
|
|
6
|
+
|
|
7
|
+
## JSX Usage
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
import { FieldDescription } from '@neynar/ui';
|
|
11
|
+
|
|
12
|
+
<FieldDescription
|
|
13
|
+
className={value}
|
|
14
|
+
...props={value}
|
|
15
|
+
/>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Component Props
|
|
19
|
+
|
|
20
|
+
### className
|
|
21
|
+
- **Type**: `unknown`
|
|
22
|
+
- **Required**: Yes
|
|
23
|
+
- **Description**: No description available
|
|
24
|
+
|
|
25
|
+
### ...props
|
|
26
|
+
- **Type**: `unknown`
|
|
27
|
+
- **Required**: Yes
|
|
28
|
+
- **Description**: No description available
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# FieldError
|
|
2
|
+
|
|
3
|
+
**Type**: component
|
|
4
|
+
|
|
5
|
+
FieldError component
|
|
6
|
+
|
|
7
|
+
## JSX Usage
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
import { FieldError } from '@neynar/ui';
|
|
11
|
+
|
|
12
|
+
<FieldError
|
|
13
|
+
className={value}
|
|
14
|
+
errors={value}
|
|
15
|
+
...props={value}
|
|
16
|
+
>
|
|
17
|
+
{/* Your content here */}
|
|
18
|
+
</FieldError>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Component Props
|
|
22
|
+
|
|
23
|
+
### className
|
|
24
|
+
- **Type**: `unknown`
|
|
25
|
+
- **Required**: Yes
|
|
26
|
+
- **Description**: No description available
|
|
27
|
+
|
|
28
|
+
### children
|
|
29
|
+
- **Type**: `unknown`
|
|
30
|
+
- **Required**: Yes
|
|
31
|
+
- **Description**: No description available
|
|
32
|
+
|
|
33
|
+
### errors
|
|
34
|
+
- **Type**: `unknown`
|
|
35
|
+
- **Required**: Yes
|
|
36
|
+
- **Description**: No description available
|
|
37
|
+
|
|
38
|
+
### ...props
|
|
39
|
+
- **Type**: `unknown`
|
|
40
|
+
- **Required**: Yes
|
|
41
|
+
- **Description**: No description available
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# FieldGroup
|
|
2
|
+
|
|
3
|
+
**Type**: component
|
|
4
|
+
|
|
5
|
+
FieldGroup - Container for organizing multiple form fields A layout wrapper that vertically stacks Field components with optimized spacing. It provides container query support for responsive field orientations and automatically adjusts spacing for different control types (standard fields vs. checkbox/radio groups). The component uses CSS container queries (@container) which allows child Field components with `orientation="responsive"` to adapt their layout based on the FieldGroup's width rather than the viewport width.
|
|
6
|
+
|
|
7
|
+
## JSX Usage
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
import { FieldGroup } from '@neynar/ui';
|
|
11
|
+
|
|
12
|
+
<FieldGroup
|
|
13
|
+
className="value"
|
|
14
|
+
>
|
|
15
|
+
{/* Your content here */}
|
|
16
|
+
</FieldGroup>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Component Props
|
|
20
|
+
|
|
21
|
+
### className
|
|
22
|
+
- **Type**: `string`
|
|
23
|
+
- **Required**: No
|
|
24
|
+
- **Description**: No description available
|
|
25
|
+
|
|
26
|
+
### children
|
|
27
|
+
- **Type**: `React.ReactNode`
|
|
28
|
+
- **Required**: No
|
|
29
|
+
- **Description**: No description available
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
### Example 1
|
|
34
|
+
Basic field grouping
|
|
35
|
+
```tsx
|
|
36
|
+
<FieldSet>
|
|
37
|
+
<FieldLegend>Contact Information</FieldLegend>
|
|
38
|
+
<FieldGroup>
|
|
39
|
+
<Field>
|
|
40
|
+
<FieldLabel htmlFor="email">Email</FieldLabel>
|
|
41
|
+
<Input id="email" type="email" />
|
|
42
|
+
</Field>
|
|
43
|
+
<Field>
|
|
44
|
+
<FieldLabel htmlFor="phone">Phone</FieldLabel>
|
|
45
|
+
<Input id="phone" type="tel" />
|
|
46
|
+
</Field>
|
|
47
|
+
</FieldGroup>
|
|
48
|
+
</FieldSet>
|
|
49
|
+
```
|
|
50
|
+
### Example 2
|
|
51
|
+
Responsive field orientations with container queries
|
|
52
|
+
```tsx
|
|
53
|
+
<FieldGroup>
|
|
54
|
+
<Field orientation="responsive">
|
|
55
|
+
<FieldLabel htmlFor="name">Full Name</FieldLabel>
|
|
56
|
+
<Input id="name" />
|
|
57
|
+
<FieldDescription>As it appears on your ID</FieldDescription>
|
|
58
|
+
</Field>
|
|
59
|
+
<Field orientation="responsive">
|
|
60
|
+
<FieldLabel htmlFor="company">Company</FieldLabel>
|
|
61
|
+
<Input id="company" />
|
|
62
|
+
</Field>
|
|
63
|
+
</FieldGroup>
|
|
64
|
+
```
|
|
65
|
+
### Example 3
|
|
66
|
+
Nested field groups for complex layouts
|
|
67
|
+
```tsx
|
|
68
|
+
<FieldGroup>
|
|
69
|
+
<Field>
|
|
70
|
+
<FieldLabel htmlFor="street">Street Address</FieldLabel>
|
|
71
|
+
<Input id="street" />
|
|
72
|
+
</Field>
|
|
73
|
+
<FieldGroup>
|
|
74
|
+
<Field>
|
|
75
|
+
<FieldLabel htmlFor="city">City</FieldLabel>
|
|
76
|
+
<Input id="city" />
|
|
77
|
+
</Field>
|
|
78
|
+
<Field>
|
|
79
|
+
<FieldLabel htmlFor="zip">Zip Code</FieldLabel>
|
|
80
|
+
<Input id="zip" />
|
|
81
|
+
</Field>
|
|
82
|
+
</FieldGroup>
|
|
83
|
+
</FieldGroup>
|
|
84
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# FieldLabel
|
|
2
|
+
|
|
3
|
+
**Type**: component
|
|
4
|
+
|
|
5
|
+
FieldLabel component
|
|
6
|
+
|
|
7
|
+
## JSX Usage
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
import { FieldLabel } from '@neynar/ui';
|
|
11
|
+
|
|
12
|
+
<FieldLabel
|
|
13
|
+
className={value}
|
|
14
|
+
...props={value}
|
|
15
|
+
/>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Component Props
|
|
19
|
+
|
|
20
|
+
### className
|
|
21
|
+
- **Type**: `unknown`
|
|
22
|
+
- **Required**: Yes
|
|
23
|
+
- **Description**: No description available
|
|
24
|
+
|
|
25
|
+
### ...props
|
|
26
|
+
- **Type**: `unknown`
|
|
27
|
+
- **Required**: Yes
|
|
28
|
+
- **Description**: No description available
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# FieldLegend
|
|
2
|
+
|
|
3
|
+
**Type**: component
|
|
4
|
+
|
|
5
|
+
FieldLegend - Fieldset caption with size variants A caption element that provides a title or description for a group of related form fields within a FieldSet. Renders as a native HTML `<legend>` element with size variants to match different design contexts. The "legend" variant (default) uses standard text sizing for top-level fieldsets, while the "label" variant provides smaller text suitable for nested fieldsets or when you need the legend to visually match form labels.
|
|
6
|
+
|
|
7
|
+
## JSX Usage
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
import { FieldLegend } from '@neynar/ui';
|
|
11
|
+
|
|
12
|
+
<FieldLegend
|
|
13
|
+
className="value"
|
|
14
|
+
variant={value}
|
|
15
|
+
>
|
|
16
|
+
{/* Your content here */}
|
|
17
|
+
</FieldLegend>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Component Props
|
|
21
|
+
|
|
22
|
+
### className
|
|
23
|
+
- **Type**: `string`
|
|
24
|
+
- **Required**: No
|
|
25
|
+
- **Description**: No description available
|
|
26
|
+
|
|
27
|
+
### variant
|
|
28
|
+
- **Type**: `"legend" | "label"`
|
|
29
|
+
- **Required**: No
|
|
30
|
+
- **Description**: No description available
|
|
31
|
+
|
|
32
|
+
### children
|
|
33
|
+
- **Type**: `React.ReactNode`
|
|
34
|
+
- **Required**: No
|
|
35
|
+
- **Description**: No description available
|
|
36
|
+
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
### Example 1
|
|
40
|
+
Standard legend for top-level fieldset
|
|
41
|
+
```tsx
|
|
42
|
+
<FieldSet>
|
|
43
|
+
<FieldLegend>Personal Information</FieldLegend>
|
|
44
|
+
<FieldGroup>
|
|
45
|
+
<Field>
|
|
46
|
+
<FieldLabel htmlFor="name">Full Name</FieldLabel>
|
|
47
|
+
<Input id="name" />
|
|
48
|
+
</Field>
|
|
49
|
+
</FieldGroup>
|
|
50
|
+
</FieldSet>
|
|
51
|
+
```
|
|
52
|
+
### Example 2
|
|
53
|
+
Label-sized legend for nested fieldset
|
|
54
|
+
```tsx
|
|
55
|
+
<FieldSet>
|
|
56
|
+
<FieldLegend variant="label">Notification Preferences</FieldLegend>
|
|
57
|
+
<FieldGroup>
|
|
58
|
+
<Field orientation="horizontal">
|
|
59
|
+
<Switch id="email" />
|
|
60
|
+
<FieldLabel htmlFor="email">Email notifications</FieldLabel>
|
|
61
|
+
</Field>
|
|
62
|
+
</FieldGroup>
|
|
63
|
+
</FieldSet>
|
|
64
|
+
```
|
|
65
|
+
### Example 3
|
|
66
|
+
Legend with description
|
|
67
|
+
```tsx
|
|
68
|
+
<FieldSet>
|
|
69
|
+
<FieldLegend>Billing Address</FieldLegend>
|
|
70
|
+
<FieldDescription>
|
|
71
|
+
This address will appear on your invoices and receipts.
|
|
72
|
+
</FieldDescription>
|
|
73
|
+
<FieldGroup>
|
|
74
|
+
// fields go here
|
|
75
|
+
</FieldGroup>
|
|
76
|
+
</FieldSet>
|
|
77
|
+
```
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# FieldSeparator
|
|
2
|
+
|
|
3
|
+
**Type**: component
|
|
4
|
+
|
|
5
|
+
FieldSeparator component
|
|
6
|
+
|
|
7
|
+
## JSX Usage
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
import { FieldSeparator } from '@neynar/ui';
|
|
11
|
+
|
|
12
|
+
<FieldSeparator
|
|
13
|
+
className={value}
|
|
14
|
+
...props={value}
|
|
15
|
+
>
|
|
16
|
+
{/* Your content here */}
|
|
17
|
+
</FieldSeparator>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Component Props
|
|
21
|
+
|
|
22
|
+
### children
|
|
23
|
+
- **Type**: `unknown`
|
|
24
|
+
- **Required**: Yes
|
|
25
|
+
- **Description**: No description available
|
|
26
|
+
|
|
27
|
+
### className
|
|
28
|
+
- **Type**: `unknown`
|
|
29
|
+
- **Required**: Yes
|
|
30
|
+
- **Description**: No description available
|
|
31
|
+
|
|
32
|
+
### ...props
|
|
33
|
+
- **Type**: `unknown`
|
|
34
|
+
- **Required**: Yes
|
|
35
|
+
- **Description**: No description available
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# FieldSet
|
|
2
|
+
|
|
3
|
+
**Type**: component
|
|
4
|
+
|
|
5
|
+
FieldSet - Semantic form control grouping container A container that renders a native HTML `<fieldset>` element with optimized spacing and layout presets. It provides semantic grouping for related form controls, which improves accessibility by allowing assistive technologies to understand the relationship between form fields. The component automatically adjusts gap spacing when containing checkbox or radio groups, providing tighter spacing for these control types.
|
|
6
|
+
|
|
7
|
+
## JSX Usage
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
import { FieldSet } from '@neynar/ui';
|
|
11
|
+
|
|
12
|
+
<FieldSet
|
|
13
|
+
className="value"
|
|
14
|
+
>
|
|
15
|
+
{/* Your content here */}
|
|
16
|
+
</FieldSet>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Component Props
|
|
20
|
+
|
|
21
|
+
### className
|
|
22
|
+
- **Type**: `string`
|
|
23
|
+
- **Required**: No
|
|
24
|
+
- **Description**: No description available
|
|
25
|
+
|
|
26
|
+
### children
|
|
27
|
+
- **Type**: `React.ReactNode`
|
|
28
|
+
- **Required**: No
|
|
29
|
+
- **Description**: No description available
|
|
30
|
+
|
|
31
|
+
## Examples
|
|
32
|
+
|
|
33
|
+
### Example 1
|
|
34
|
+
Basic fieldset with legend and fields
|
|
35
|
+
```tsx
|
|
36
|
+
<FieldSet>
|
|
37
|
+
<FieldLegend>Delivery Information</FieldLegend>
|
|
38
|
+
<FieldGroup>
|
|
39
|
+
<Field>
|
|
40
|
+
<FieldLabel htmlFor="address">Address</FieldLabel>
|
|
41
|
+
<Input id="address" />
|
|
42
|
+
</Field>
|
|
43
|
+
</FieldGroup>
|
|
44
|
+
</FieldSet>
|
|
45
|
+
```
|
|
46
|
+
### Example 2
|
|
47
|
+
Fieldset with radio group
|
|
48
|
+
```tsx
|
|
49
|
+
<FieldSet>
|
|
50
|
+
<FieldLegend>Shipping Method</FieldLegend>
|
|
51
|
+
<FieldGroup data-slot="radio-group">
|
|
52
|
+
<Field orientation="horizontal">
|
|
53
|
+
<Radio id="standard" />
|
|
54
|
+
<FieldLabel htmlFor="standard">Standard</FieldLabel>
|
|
55
|
+
</Field>
|
|
56
|
+
<Field orientation="horizontal">
|
|
57
|
+
<Radio id="express" />
|
|
58
|
+
<FieldLabel htmlFor="express">Express</FieldLabel>
|
|
59
|
+
</Field>
|
|
60
|
+
</FieldGroup>
|
|
61
|
+
</FieldSet>
|
|
62
|
+
```
|
|
63
|
+
### Example 3
|
|
64
|
+
Nested fieldsets for complex forms
|
|
65
|
+
```tsx
|
|
66
|
+
<FieldSet>
|
|
67
|
+
<FieldLegend>Account Settings</FieldLegend>
|
|
68
|
+
<FieldGroup>
|
|
69
|
+
<FieldSet>
|
|
70
|
+
<FieldLegend variant="label">Profile</FieldLegend>
|
|
71
|
+
<FieldGroup>
|
|
72
|
+
<Field>
|
|
73
|
+
<FieldLabel htmlFor="username">Username</FieldLabel>
|
|
74
|
+
<Input id="username" />
|
|
75
|
+
</Field>
|
|
76
|
+
</FieldGroup>
|
|
77
|
+
</FieldSet>
|
|
78
|
+
</FieldGroup>
|
|
79
|
+
</FieldSet>
|
|
80
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# FieldTitle
|
|
2
|
+
|
|
3
|
+
**Type**: component
|
|
4
|
+
|
|
5
|
+
FieldTitle component
|
|
6
|
+
|
|
7
|
+
## JSX Usage
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
import { FieldTitle } from '@neynar/ui';
|
|
11
|
+
|
|
12
|
+
<FieldTitle
|
|
13
|
+
className={value}
|
|
14
|
+
...props={value}
|
|
15
|
+
/>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Component Props
|
|
19
|
+
|
|
20
|
+
### className
|
|
21
|
+
- **Type**: `unknown`
|
|
22
|
+
- **Required**: Yes
|
|
23
|
+
- **Description**: No description available
|
|
24
|
+
|
|
25
|
+
### ...props
|
|
26
|
+
- **Type**: `unknown`
|
|
27
|
+
- **Required**: Yes
|
|
28
|
+
- **Description**: No description available
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Field
|
|
2
|
+
|
|
3
|
+
**Type**: component
|
|
4
|
+
|
|
5
|
+
Field component
|
|
6
|
+
|
|
7
|
+
## JSX Usage
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
import { Field } from '@neynar/ui';
|
|
11
|
+
|
|
12
|
+
<Field
|
|
13
|
+
className={value}
|
|
14
|
+
orientation="vertical"
|
|
15
|
+
...props={value}
|
|
16
|
+
/>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Component Props
|
|
20
|
+
|
|
21
|
+
### className
|
|
22
|
+
- **Type**: `unknown`
|
|
23
|
+
- **Required**: Yes
|
|
24
|
+
- **Description**: No description available
|
|
25
|
+
|
|
26
|
+
### orientation
|
|
27
|
+
- **Type**: `unknown`
|
|
28
|
+
- **Required**: No
|
|
29
|
+
- **Description**: No description available
|
|
30
|
+
- **Default**: "vertical"
|
|
31
|
+
|
|
32
|
+
### ...props
|
|
33
|
+
- **Type**: `unknown`
|
|
34
|
+
- **Required**: Yes
|
|
35
|
+
- **Description**: No description available
|