@neynar/ui 0.1.1 → 0.1.2

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.
Files changed (173) hide show
  1. package/dist/components/ui/accordion.d.ts +1 -25
  2. package/dist/components/ui/accordion.d.ts.map +1 -1
  3. package/dist/components/ui/alert-dialog.d.ts +240 -46
  4. package/dist/components/ui/alert-dialog.d.ts.map +1 -1
  5. package/dist/components/ui/alert.d.ts +73 -11
  6. package/dist/components/ui/alert.d.ts.map +1 -1
  7. package/dist/components/ui/aspect-ratio.d.ts +44 -10
  8. package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
  9. package/dist/components/ui/avatar.d.ts +117 -33
  10. package/dist/components/ui/avatar.d.ts.map +1 -1
  11. package/dist/components/ui/badge.d.ts +50 -71
  12. package/dist/components/ui/badge.d.ts.map +1 -1
  13. package/dist/components/ui/breadcrumb.d.ts +231 -49
  14. package/dist/components/ui/breadcrumb.d.ts.map +1 -1
  15. package/dist/components/ui/button.d.ts +189 -71
  16. package/dist/components/ui/button.d.ts.map +1 -1
  17. package/dist/components/ui/calendar.d.ts +197 -40
  18. package/dist/components/ui/calendar.d.ts.map +1 -1
  19. package/dist/components/ui/card.d.ts +7 -22
  20. package/dist/components/ui/card.d.ts.map +1 -1
  21. package/dist/components/ui/carousel.d.ts +369 -99
  22. package/dist/components/ui/carousel.d.ts.map +1 -1
  23. package/dist/components/ui/chart.d.ts.map +1 -1
  24. package/dist/components/ui/checkbox.d.ts +110 -38
  25. package/dist/components/ui/checkbox.d.ts.map +1 -1
  26. package/dist/components/ui/collapsible.d.ts +246 -61
  27. package/dist/components/ui/collapsible.d.ts.map +1 -1
  28. package/dist/components/ui/combobox.d.ts +207 -159
  29. package/dist/components/ui/combobox.d.ts.map +1 -1
  30. package/dist/components/ui/command.d.ts +336 -67
  31. package/dist/components/ui/command.d.ts.map +1 -1
  32. package/dist/components/ui/container.d.ts +159 -64
  33. package/dist/components/ui/container.d.ts.map +1 -1
  34. package/dist/components/ui/context-menu.d.ts +321 -39
  35. package/dist/components/ui/context-menu.d.ts.map +1 -1
  36. package/dist/components/ui/date-picker.d.ts +113 -86
  37. package/dist/components/ui/date-picker.d.ts.map +1 -1
  38. package/dist/components/ui/dialog.d.ts +106 -25
  39. package/dist/components/ui/dialog.d.ts.map +1 -1
  40. package/dist/components/ui/drawer.d.ts +388 -59
  41. package/dist/components/ui/drawer.d.ts.map +1 -1
  42. package/dist/components/ui/dropdown-menu.d.ts +521 -74
  43. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  44. package/dist/components/ui/empty-state.d.ts +148 -76
  45. package/dist/components/ui/empty-state.d.ts.map +1 -1
  46. package/dist/components/ui/hover-card.d.ts +253 -34
  47. package/dist/components/ui/hover-card.d.ts.map +1 -1
  48. package/dist/components/ui/input.d.ts +143 -44
  49. package/dist/components/ui/input.d.ts.map +1 -1
  50. package/dist/components/ui/label.d.ts +0 -8
  51. package/dist/components/ui/label.d.ts.map +1 -1
  52. package/dist/components/ui/menubar.d.ts +288 -46
  53. package/dist/components/ui/menubar.d.ts.map +1 -1
  54. package/dist/components/ui/navigation-menu.d.ts +444 -127
  55. package/dist/components/ui/navigation-menu.d.ts.map +1 -1
  56. package/dist/components/ui/pagination.d.ts +342 -66
  57. package/dist/components/ui/pagination.d.ts.map +1 -1
  58. package/dist/components/ui/popover.d.ts +0 -8
  59. package/dist/components/ui/popover.d.ts.map +1 -1
  60. package/dist/components/ui/progress.d.ts +88 -30
  61. package/dist/components/ui/progress.d.ts.map +1 -1
  62. package/dist/components/ui/radio-group.d.ts +189 -45
  63. package/dist/components/ui/radio-group.d.ts.map +1 -1
  64. package/dist/components/ui/resizable.d.ts +178 -62
  65. package/dist/components/ui/resizable.d.ts.map +1 -1
  66. package/dist/components/ui/scroll-area.d.ts +180 -21
  67. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  68. package/dist/components/ui/select.d.ts +382 -60
  69. package/dist/components/ui/select.d.ts.map +1 -1
  70. package/dist/components/ui/separator.d.ts +52 -39
  71. package/dist/components/ui/separator.d.ts.map +1 -1
  72. package/dist/components/ui/sheet.d.ts +144 -27
  73. package/dist/components/ui/sheet.d.ts.map +1 -1
  74. package/dist/components/ui/sidebar.d.ts +81 -31
  75. package/dist/components/ui/sidebar.d.ts.map +1 -1
  76. package/dist/components/ui/skeleton.d.ts +94 -32
  77. package/dist/components/ui/skeleton.d.ts.map +1 -1
  78. package/dist/components/ui/slider.d.ts +37 -31
  79. package/dist/components/ui/slider.d.ts.map +1 -1
  80. package/dist/components/ui/sonner.d.ts +280 -46
  81. package/dist/components/ui/sonner.d.ts.map +1 -1
  82. package/dist/components/ui/stack.d.ts +289 -148
  83. package/dist/components/ui/stack.d.ts.map +1 -1
  84. package/dist/components/ui/stories/aspect-ratio.stories.d.ts +1 -2
  85. package/dist/components/ui/stories/aspect-ratio.stories.d.ts.map +1 -1
  86. package/dist/components/ui/stories/container.stories.d.ts +2 -3
  87. package/dist/components/ui/stories/container.stories.d.ts.map +1 -1
  88. package/dist/components/ui/stories/empty-state.stories.d.ts +2 -2
  89. package/dist/components/ui/stories/scroll-area.stories.d.ts +1 -2
  90. package/dist/components/ui/stories/scroll-area.stories.d.ts.map +1 -1
  91. package/dist/components/ui/stories/stack.stories.d.ts +1 -1
  92. package/dist/components/ui/stories/text-field.stories.d.ts +7 -1
  93. package/dist/components/ui/stories/text-field.stories.d.ts.map +1 -1
  94. package/dist/components/ui/switch.d.ts +44 -38
  95. package/dist/components/ui/switch.d.ts.map +1 -1
  96. package/dist/components/ui/table.d.ts +33 -0
  97. package/dist/components/ui/table.d.ts.map +1 -1
  98. package/dist/components/ui/tabs.d.ts +4 -22
  99. package/dist/components/ui/tabs.d.ts.map +1 -1
  100. package/dist/components/ui/text-field.d.ts +170 -84
  101. package/dist/components/ui/text-field.d.ts.map +1 -1
  102. package/dist/components/ui/textarea.d.ts +106 -29
  103. package/dist/components/ui/textarea.d.ts.map +1 -1
  104. package/dist/components/ui/theme-toggle.d.ts +190 -65
  105. package/dist/components/ui/theme-toggle.d.ts.map +1 -1
  106. package/dist/components/ui/theme.d.ts +107 -23
  107. package/dist/components/ui/theme.d.ts.map +1 -1
  108. package/dist/components/ui/toggle-group.d.ts +143 -67
  109. package/dist/components/ui/toggle-group.d.ts.map +1 -1
  110. package/dist/components/ui/toggle.d.ts +118 -30
  111. package/dist/components/ui/toggle.d.ts.map +1 -1
  112. package/dist/components/ui/tooltip.d.ts +152 -28
  113. package/dist/components/ui/tooltip.d.ts.map +1 -1
  114. package/dist/components/ui/typography.d.ts +452 -134
  115. package/dist/components/ui/typography.d.ts.map +1 -1
  116. package/dist/index.js +9388 -8281
  117. package/dist/index.js.map +1 -1
  118. package/dist/tsconfig.tsbuildinfo +1 -1
  119. package/llms.txt +173 -3
  120. package/package.json +5 -2
  121. package/src/components/ui/accordion.tsx +112 -27
  122. package/src/components/ui/alert-dialog.tsx +401 -46
  123. package/src/components/ui/alert.tsx +114 -11
  124. package/src/components/ui/aspect-ratio.tsx +69 -14
  125. package/src/components/ui/avatar.tsx +179 -33
  126. package/src/components/ui/badge.tsx +74 -75
  127. package/src/components/ui/breadcrumb.tsx +335 -50
  128. package/src/components/ui/button.tsx +198 -90
  129. package/src/components/ui/calendar.tsx +867 -43
  130. package/src/components/ui/card.tsx +140 -33
  131. package/src/components/ui/carousel.tsx +529 -98
  132. package/src/components/ui/chart.tsx +222 -1
  133. package/src/components/ui/checkbox.tsx +176 -38
  134. package/src/components/ui/collapsible.tsx +321 -67
  135. package/src/components/ui/combobox.tsx +284 -83
  136. package/src/components/ui/command.tsx +527 -67
  137. package/src/components/ui/container.tsx +217 -65
  138. package/src/components/ui/context-menu.tsx +716 -51
  139. package/src/components/ui/date-picker.tsx +228 -38
  140. package/src/components/ui/dialog.tsx +270 -33
  141. package/src/components/ui/drawer.tsx +546 -67
  142. package/src/components/ui/dropdown-menu.tsx +657 -74
  143. package/src/components/ui/empty-state.tsx +241 -82
  144. package/src/components/ui/hover-card.tsx +328 -39
  145. package/src/components/ui/input.tsx +207 -44
  146. package/src/components/ui/label.tsx +98 -8
  147. package/src/components/ui/menubar.tsx +587 -54
  148. package/src/components/ui/navigation-menu.tsx +557 -128
  149. package/src/components/ui/pagination.tsx +561 -79
  150. package/src/components/ui/popover.tsx +119 -8
  151. package/src/components/ui/progress.tsx +131 -29
  152. package/src/components/ui/radio-group.tsx +260 -51
  153. package/src/components/ui/resizable.tsx +289 -63
  154. package/src/components/ui/scroll-area.tsx +377 -66
  155. package/src/components/ui/select.tsx +545 -60
  156. package/src/components/ui/separator.tsx +146 -40
  157. package/src/components/ui/sheet.tsx +348 -31
  158. package/src/components/ui/sidebar.tsx +471 -29
  159. package/src/components/ui/skeleton.tsx +114 -32
  160. package/src/components/ui/slider.tsx +77 -31
  161. package/src/components/ui/sonner.tsx +574 -46
  162. package/src/components/ui/stack.tsx +423 -101
  163. package/src/components/ui/switch.tsx +78 -39
  164. package/src/components/ui/table.tsx +170 -4
  165. package/src/components/ui/tabs.tsx +108 -22
  166. package/src/components/ui/text-field.tsx +226 -81
  167. package/src/components/ui/textarea.tsx +180 -29
  168. package/src/components/ui/theme-toggle.tsx +313 -65
  169. package/src/components/ui/theme.tsx +117 -23
  170. package/src/components/ui/toggle-group.tsx +280 -69
  171. package/src/components/ui/toggle.tsx +124 -35
  172. package/src/components/ui/tooltip.tsx +239 -29
  173. package/src/components/ui/typography.tsx +1115 -165
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/components/ui/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AAKvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AACH,iBAAS,YAAY,CAAC,EACpB,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AAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC,GAAG;IACjE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAeA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AACH,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,UAAU,CAAC,GAAG;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAWA;AAED,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACvB,CAAC"}
@@ -1,70 +1,56 @@
1
1
  import * as React from "react";
2
2
  /**
3
- * Props for the EmptyState component
3
+ * EmptyState - Displays empty or no-data states with consistent UX patterns
4
4
  *
5
- * Extends standard HTML div attributes to support all native div functionality
6
- * while providing specific props for empty state content and behavior.
5
+ * A comprehensive component for handling empty states across applications. Provides
6
+ * a standardized way to communicate when content is unavailable, data is missing,
7
+ * or initial setup is required. Built with accessibility-first principles and
8
+ * follows established empty state design patterns to guide users toward resolution.
7
9
  *
8
- * @type EmptyStateProps
9
- * @extends {React.HTMLAttributes<HTMLDivElement>}
10
- */
11
- export type EmptyStateProps = React.HTMLAttributes<HTMLDivElement> & {
12
- /** Main title text displayed prominently in the empty state */
13
- title: string;
14
- /** Optional descriptive text providing additional context or guidance */
15
- description?: string;
16
- /** Optional icon, illustration, or React element displayed above the title */
17
- icon?: React.ReactNode;
18
- /** Optional action button configuration for primary user action */
19
- action?: {
20
- /** Text label for the action button */
21
- label: string;
22
- /** Click handler function executed when the action button is pressed */
23
- onClick: () => void;
24
- };
25
- };
26
- /**
27
- * EmptyState component for displaying empty or no-data states
10
+ * **Common Use Cases:**
11
+ * - Search results with no matches
12
+ * - Empty lists, tables, or dashboards
13
+ * - Inbox or notification centers with no items
14
+ * - Data visualization with no data
15
+ * - Onboarding states for new users
16
+ * - Error recovery scenarios
28
17
  *
29
- * A versatile component that provides a consistent way to show empty states when there's
30
- * no content to display. Commonly used in lists, tables, search results, dashboards,
31
- * or any area where data might be absent. Follows standard empty state UX patterns
32
- * with support for icons, descriptions, and call-to-action buttons to guide users.
18
+ * **Component Structure:**
19
+ * The component follows a top-down visual hierarchy: Icon Title Description → Action.
20
+ * All elements except the title are optional, allowing for flexible implementation
21
+ * across different contexts while maintaining visual consistency.
33
22
  *
34
23
  * @example
35
24
  * ```tsx
36
- * // Basic empty state with title and description
37
- * <EmptyState
38
- * title="No results found"
39
- * description="Try adjusting your search or filters to find what you're looking for"
40
- * />
25
+ * // Minimal empty state with just title
26
+ * <EmptyState title="No notifications" />
41
27
  * ```
42
28
  *
43
29
  * @example
44
30
  * ```tsx
45
- * // Empty state with icon and action button
31
+ * // Search results empty state
46
32
  * import { Search } from 'lucide-react';
47
33
  *
48
34
  * <EmptyState
49
35
  * icon={<Search className="w-12 h-12" />}
50
- * title="No search results"
51
- * description="We couldn't find anything matching your search criteria"
36
+ * title="No results found"
37
+ * description="Try adjusting your search terms or filters"
52
38
  * action={{
53
- * label: "Clear search",
54
- * onClick: () => handleClearSearch()
39
+ * label: "Clear filters",
40
+ * onClick: () => resetFilters()
55
41
  * }}
56
42
  * />
57
43
  * ```
58
44
  *
59
45
  * @example
60
46
  * ```tsx
61
- * // Inbox empty state with contextual messaging
62
- * import { Inbox } from 'lucide-react';
47
+ * // Inbox empty state with call-to-action
48
+ * import { Inbox, Plus } from 'lucide-react';
63
49
  *
64
50
  * <EmptyState
65
51
  * icon={<Inbox className="w-16 h-16" />}
66
52
  * title="Your inbox is empty"
67
- * description="When you receive new messages, they'll appear here"
53
+ * description="New messages and notifications will appear here"
68
54
  * action={{
69
55
  * label: "Compose message",
70
56
  * onClick: () => openComposer()
@@ -74,60 +60,146 @@ export type EmptyStateProps = React.HTMLAttributes<HTMLDivElement> & {
74
60
  *
75
61
  * @example
76
62
  * ```tsx
77
- * // Custom styled empty state for data visualization
78
- * import { Database } from 'lucide-react';
63
+ * // Data dashboard empty state with custom styling
64
+ * import { BarChart3, TrendingUp } from 'lucide-react';
79
65
  *
80
66
  * <EmptyState
81
- * className="min-h-[400px] bg-muted/30 rounded-lg"
82
- * icon={<Database className="w-14 h-14 opacity-50" />}
83
- * title="No data available"
84
- * description="Import data or connect a data source to get started"
67
+ * className="min-h-[400px] bg-gradient-to-br from-muted/20 to-muted/10 rounded-lg border border-dashed border-muted-foreground/20"
68
+ * icon={<BarChart3 className="w-14 h-14 opacity-60" />}
69
+ * title="No analytics data"
70
+ * description="Connect your data source or import historical data to view insights"
85
71
  * action={{
86
- * label: "Import data",
87
- * onClick: () => showImportDialog()
72
+ * label: "Connect data source",
73
+ * onClick: () => showDataSourceModal()
88
74
  * }}
89
75
  * />
90
76
  * ```
91
77
  *
78
+ * @example
79
+ * ```tsx
80
+ * // File manager empty state
81
+ * import { FolderOpen, Upload } from 'lucide-react';
82
+ *
83
+ * <EmptyState
84
+ * icon={<FolderOpen className="w-12 h-12" />}
85
+ * title="This folder is empty"
86
+ * description="Drag and drop files here or use the upload button"
87
+ * action={{
88
+ * label: "Upload files",
89
+ * onClick: () => triggerFileUpload()
90
+ * }}
91
+ * />
92
+ * ```
93
+ *
94
+ * @example
95
+ * ```tsx
96
+ * // Error recovery empty state
97
+ * import { AlertTriangle, RefreshCw } from 'lucide-react';
98
+ *
99
+ * <EmptyState
100
+ * icon={<AlertTriangle className="w-12 h-12 text-destructive" />}
101
+ * title="Failed to load data"
102
+ * description="There was a problem loading your content. Please try again."
103
+ * action={{
104
+ * label: "Retry",
105
+ * onClick: () => refetchData()
106
+ * }}
107
+ * />
108
+ * ```
109
+ *
110
+ * @example
111
+ * ```tsx
112
+ * // Team members empty state with multiple actions
113
+ * import { Users, UserPlus, Mail } from 'lucide-react';
114
+ *
115
+ * function TeamEmptyState() {
116
+ * return (
117
+ * <div className="space-y-4">
118
+ * <EmptyState
119
+ * icon={<Users className="w-16 h-16" />}
120
+ * title="No team members yet"
121
+ * description="Invite colleagues to collaborate on projects"
122
+ * action={{
123
+ * label: "Invite members",
124
+ * onClick: () => openInviteModal()
125
+ * }}
126
+ * />
127
+ * <div className="flex justify-center gap-2">
128
+ * <Button variant="outline" size="sm" onClick={() => importFromCsv()}>
129
+ * <Mail className="w-4 h-4 mr-2" />
130
+ * Import from CSV
131
+ * </Button>
132
+ * </div>
133
+ * </div>
134
+ * );
135
+ * }
136
+ * ```
137
+ *
92
138
  * @param props - Component props extending HTMLDivElement attributes
93
- * @param props.title - Main title text displayed prominently (required)
94
- * @param props.description - Optional descriptive text providing context
95
- * @param props.icon - Optional icon or React element displayed above title
96
- * @param props.action - Optional action button configuration
97
- * @param props.className - Additional CSS classes for styling
98
- * @param ref - Forwarded ref to the container div element
139
+ * @param props.title - Main heading text that describes the empty state
140
+ * @param props.description - Optional explanatory text or guidance for users
141
+ * @param props.icon - Optional visual element (icon, illustration, or custom React element)
142
+ * @param props.action - Optional primary action button configuration
143
+ * @param props.className - Additional CSS classes for custom styling
144
+ * @param props.children - Not used; component has fixed content structure
145
+ * @param ref - Forwarded ref to the root div element for DOM access
146
+ *
147
+ * @accessibility
148
+ * - **Semantic Structure**: Uses proper heading hierarchy with h3 for screen readers
149
+ * - **Keyboard Navigation**: Action button fully keyboard accessible with Tab/Enter/Space
150
+ * - **Screen Readers**: Title and description are properly associated and announced
151
+ * - **Focus Management**: Action button receives proper focus indicators (3px ring)
152
+ * - **Landmark Navigation**: No explicit landmark roles; inherits from container context
153
+ * - **Content Flow**: Logical reading order from icon → title → description → action
154
+ * - **Icon Accessibility**: Decorative icons don't interfere with screen readers
155
+ * - **Button Integration**: Inherits full Button component accessibility features
156
+ * - **High Contrast**: Text colors meet WCAG 2.1 AA contrast requirements
157
+ * - **Responsive Design**: Adapts to different viewport sizes maintaining readability
99
158
  *
100
159
  * @remarks
101
- * **Accessibility Features:**
102
- * - Uses semantic HTML structure with proper heading hierarchy
103
- * - Title rendered as h3 element for screen reader navigation
104
- * - Action button follows Button component accessibility patterns
105
- * - Supports keyboard navigation and focus management
106
- * - Screen reader friendly text content structure
107
- *
108
- * **Design Guidelines:**
109
- * - Icon should be 48-64px (w-12 h-12 to w-16 h-16) for optimal visual balance
110
- * - Keep titles concise and action-oriented
111
- * - Use descriptions to provide helpful context or next steps
112
- * - Action buttons should have clear, specific labels
113
- *
114
- * @see {@link Button} for action button styling and behavior
160
+ * **Visual Design:**
161
+ * - Default padding of py-12 px-4 provides generous whitespace
162
+ * - Centered alignment (flex-col items-center justify-center text-center)
163
+ * - Icon rendered with muted foreground color for subtle prominence
164
+ * - Title uses text-lg font-semibold with foreground color for prominence
165
+ * - Description limited to max-w-sm (24rem) for optimal readability
166
+ * - Action button positioned with mb-6 spacing from description
167
+ * - Responsive spacing adapts to content presence (conditional margins)
168
+ *
169
+ * **Performance Considerations:**
170
+ * - Lightweight component with minimal re-renders
171
+ * - Icon rendering optimized for various React element types
172
+ * - Button component lazy-loaded only when action is provided
173
+ * - No state management or effects, purely presentational
174
+ * - Supports React 18 concurrent features
175
+ *
176
+ * **Customization:**
177
+ * - All Tailwind utility classes can be overridden via className
178
+ * - Icon styling can be customized at the element level
179
+ * - Button inherits default variant but supports additional props via composition
180
+ * - Container div accepts all standard HTML attributes for event handling
181
+ * - Supports ref forwarding for programmatic DOM manipulation
182
+ *
183
+ * **Design System Integration:**
184
+ * - Uses design tokens (foreground, muted-foreground, etc.) for consistent theming
185
+ * - Follows spacing scale (mb-2, mb-4, mb-6, py-12, px-4)
186
+ * - Typography scale integration (text-lg for title, default for description)
187
+ * - Color system compatibility with light/dark mode switching
188
+ * - Button component integration maintains design system consistency
189
+ *
190
+ * @see {@link Button} for action button styling, variants, and accessibility
191
+ * @see {@link https://ui.patterns.build/empty-states} Empty state design patterns
192
+ * @see {@link https://www.nngroup.com/articles/empty-state-interface-design/} Nielsen Norman Group empty state guidelines
115
193
  * @since 1.0.0
116
194
  */
117
- declare const EmptyState: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
118
- /** Main title text displayed prominently in the empty state */
195
+ declare const EmptyState: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
119
196
  title: string;
120
- /** Optional descriptive text providing additional context or guidance */
121
197
  description?: string;
122
- /** Optional icon, illustration, or React element displayed above the title */
123
198
  icon?: React.ReactNode;
124
- /** Optional action button configuration for primary user action */
125
199
  action?: {
126
- /** Text label for the action button */
127
200
  label: string;
128
- /** Click handler function executed when the action button is pressed */
129
201
  onClick: () => void;
130
202
  };
131
- } & React.RefAttributes<HTMLDivElement>>;
203
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
132
204
  export { EmptyState };
133
205
  //# sourceMappingURL=empty-state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../../src/components/ui/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;GAQG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IACnE,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,mEAAmE;IACnE,MAAM,CAAC,EAAE;QACP,uCAAuC;QACvC,KAAK,EAAE,MAAM,CAAC;QACd,wEAAwE;QACxE,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;AACH,QAAA,MAAM,UAAU;IA1Gd,+DAA+D;WACxD,MAAM;IACb,yEAAyE;kBAC3D,MAAM;IACpB,8EAA8E;WACvE,KAAK,CAAC,SAAS;IACtB,mEAAmE;aAC1D;QACP,uCAAuC;QACvC,KAAK,EAAE,MAAM,CAAC;QACd,wEAAwE;QACxE,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB;wCAkHF,CAAC;AAIF,OAAO,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../../src/components/ui/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA6E/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgMG;AACH,QAAA,MAAM,UAAU;WAGL,MAAM;kBACC,MAAM;WACb,KAAK,CAAC,SAAS;aACb;QACP,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;KACrB;gDAoBH,CAAC;AAIH,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,13 +1,16 @@
1
1
  import * as React from "react";
2
2
  import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
3
3
  /**
4
- * HoverCard component for previewing content available behind a link
4
+ * HoverCard - Preview content that appears on hover for rich contextual information
5
5
  *
6
- * For sighted users to preview content available behind a link. Displays rich content
7
- * when users hover over a trigger element. Ideal for showing previews, user profiles,
8
- * repository information, or contextual details without requiring navigation.
6
+ * A floating card component that reveals rich content when users hover over a trigger element.
7
+ * Designed specifically for sighted users to preview content available behind links without
8
+ * requiring navigation. Built on Radix UI primitives with smooth animations and intelligent
9
+ * positioning to avoid viewport boundaries.
9
10
  *
10
- * Built on Radix UI Hover Card primitive with custom styling and animations.
11
+ * Perfect for user profiles, repository information, link previews, tooltips with complex
12
+ * content, and any contextual details that enhance the user experience without interrupting
13
+ * their current workflow.
11
14
  *
12
15
  * @example
13
16
  * ```tsx
@@ -51,58 +54,274 @@ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
51
54
  *
52
55
  * @example
53
56
  * ```tsx
54
- * // Interactive content
57
+ * // Interactive hover card with buttons
55
58
  * <HoverCard>
56
59
  * <HoverCardTrigger asChild>
57
- * <Button>Settings</Button>
60
+ * <Button variant="ghost">Quick Actions</Button>
58
61
  * </HoverCardTrigger>
59
62
  * <HoverCardContent>
60
63
  * <div className="space-y-2">
61
- * <h4 className="font-semibold">Quick Actions</h4>
62
- * <Button size="sm">Manage Team</Button>
63
- * <Button size="sm">View Reports</Button>
64
+ * <h4 className="font-semibold">Available Actions</h4>
65
+ * <div className="flex flex-col gap-1">
66
+ * <Button size="sm" variant="ghost">Edit Profile</Button>
67
+ * <Button size="sm" variant="ghost">View Analytics</Button>
68
+ * <Button size="sm" variant="ghost">Manage Settings</Button>
69
+ * </div>
70
+ * </div>
71
+ * </HoverCardContent>
72
+ * </HoverCard>
73
+ * ```
74
+ *
75
+ * @example
76
+ * ```tsx
77
+ * // Link preview with rich content
78
+ * <HoverCard openDelay={300}>
79
+ * <HoverCardTrigger asChild>
80
+ * <a href="/article/123" className="text-blue-600 hover:underline">
81
+ * Advanced React Patterns
82
+ * </a>
83
+ * </HoverCardTrigger>
84
+ * <HoverCardContent className="w-96">
85
+ * <div className="space-y-3">
86
+ * <img src="/article-thumbnail.jpg" className="rounded w-full h-32 object-cover" />
87
+ * <div>
88
+ * <h4 className="font-semibold">Advanced React Patterns</h4>
89
+ * <p className="text-sm text-muted-foreground">
90
+ * Learn modern React patterns including render props, compound components,
91
+ * and advanced hook compositions for scalable applications.
92
+ * </p>
93
+ * <div className="flex items-center gap-2 mt-2 text-xs text-muted-foreground">
94
+ * <span>12 min read</span>
95
+ * <span>•</span>
96
+ * <span>Published Mar 15, 2024</span>
97
+ * </div>
98
+ * </div>
64
99
  * </div>
65
100
  * </HoverCardContent>
66
101
  * </HoverCard>
67
102
  * ```
68
103
  *
69
104
  * @accessibility
70
- * **Important**: Hover cards are intended for sighted users only. The content will be
71
- * inaccessible to keyboard users. Consider providing alternative access methods.
105
+ * **Important Limitations**: Hover cards are intended for sighted users only and present
106
+ * significant accessibility challenges. The content is inaccessible to keyboard-only users
107
+ * and screen reader users who cannot hover. Consider these alternatives:
72
108
  *
73
- * - Opens on hover with configurable `openDelay`
74
- * - Stays open when hovering over content
75
- * - Closes with configurable `closeDelay`
76
- * - Auto-positions to avoid viewport overflow
77
- * - Supports focus-based interactions for some accessibility
109
+ * - Provide keyboard-accessible alternatives (buttons, modals, expanded sections)
110
+ * - Ensure all essential information is available through other means
111
+ * - Use hover cards only for supplementary, non-critical content
112
+ * - Consider implementing focus-based triggers for keyboard users
78
113
  *
79
- * @see {@link https://ui.shadcn.com/docs/components/hover-card} shadcn/ui documentation
114
+ * **Current Accessibility Features**:
115
+ * - Opens on mouse hover with configurable delay
116
+ * - Stays open when hovering over the content area
117
+ * - Closes automatically when mouse leaves with configurable delay
118
+ * - Intelligent positioning to avoid viewport overflow
119
+ * - Smooth animations that respect prefers-reduced-motion
120
+ * - Proper focus management within interactive content
121
+ *
122
+ * @see {@link HoverCardTrigger} Element that triggers the hover card on hover
123
+ * @see {@link HoverCardContent} Container for the hover card content and positioning
124
+ * @see {@link https://ui.shadcn.com/docs/components/hover-card} shadcn/ui Hover Card Documentation
125
+ * @see {@link https://www.radix-ui.com/primitives/docs/components/hover-card} Radix UI Hover Card Primitive
126
+ * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/} WAI-ARIA Tooltip Pattern (for accessibility considerations)
80
127
  * @since 1.0.0
81
- * @see {@link https://www.radix-ui.com/primitives/docs/components/hover-card} Radix UI Hover Card
82
128
  */
83
129
  /**
84
- * Root container for the hover card component
130
+ * HoverCard - Root container that manages hover card state and timing
131
+ *
132
+ * The main wrapper component that provides context to all hover card subcomponents.
133
+ * Controls the opening and closing behavior, timing delays, and overall state management.
134
+ * Must contain HoverCardTrigger and HoverCardContent as children.
135
+ *
136
+ * @example
137
+ * ```tsx
138
+ * // Basic usage with default timing
139
+ * <HoverCard>
140
+ * <HoverCardTrigger>Hover me</HoverCardTrigger>
141
+ * <HoverCardContent>Content appears here</HoverCardContent>
142
+ * </HoverCard>
143
+ * ```
144
+ *
145
+ * @example
146
+ * ```tsx
147
+ * // Custom timing and controlled state
148
+ * <HoverCard
149
+ * openDelay={200}
150
+ * closeDelay={500}
151
+ * open={isOpen}
152
+ * onValueChange={setIsOpen}
153
+ * >
154
+ * <HoverCardTrigger>Controlled hover card</HoverCardTrigger>
155
+ * <HoverCardContent>This hover card is controlled externally</HoverCardContent>
156
+ * </HoverCard>
157
+ * ```
85
158
  *
86
- * @param openDelay - Delay in milliseconds before the hover card opens (default: 700)
87
- * @param closeDelay - Delay in milliseconds before the hover card closes (default: 300)
88
- * @param open - Controlled open state
89
- * @param onOpenChange - Callback when open state changes
159
+ * @see {@link HoverCardTrigger} The element that triggers the hover behavior
160
+ * @see {@link HoverCardContent} The content container with positioning logic
90
161
  */
91
- declare function HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
162
+ declare function HoverCard(props: React.ComponentProps<typeof HoverCardPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
92
163
  /**
93
- * Trigger element that opens the hover card on hover
164
+ * HoverCardTrigger - Interactive element that activates the hover card on mouse hover
165
+ *
166
+ * The trigger component that users hover over to reveal the hover card content.
167
+ * Can wrap any element or render as its child using the asChild prop. Automatically
168
+ * manages hover detection and integrates with the parent HoverCard's timing configuration.
94
169
  *
95
- * @param asChild - When true, merges props with immediate child element
170
+ * When using asChild, the trigger merges its props with the immediate child element,
171
+ * allowing for seamless integration with buttons, links, or any other interactive elements.
172
+ *
173
+ * @example
174
+ * ```tsx
175
+ * // Basic trigger with text
176
+ * <HoverCardTrigger>
177
+ * <span className="text-blue-600 cursor-pointer">Hover for details</span>
178
+ * </HoverCardTrigger>
179
+ * ```
180
+ *
181
+ * @example
182
+ * ```tsx
183
+ * // Using asChild with a button
184
+ * <HoverCardTrigger asChild>
185
+ * <Button variant="outline">User Profile</Button>
186
+ * </HoverCardTrigger>
187
+ * ```
188
+ *
189
+ * @example
190
+ * ```tsx
191
+ * // With a link element
192
+ * <HoverCardTrigger asChild>
193
+ * <a href="/profile/john" className="font-medium hover:underline">
194
+ * @johndoe
195
+ * </a>
196
+ * </HoverCardTrigger>
197
+ * ```
198
+ *
199
+ * @example
200
+ * ```tsx
201
+ * // Complex trigger with icon
202
+ * <HoverCardTrigger className="inline-flex items-center gap-2">
203
+ * <UserIcon className="h-4 w-4" />
204
+ * <span>View Profile</span>
205
+ * </HoverCardTrigger>
206
+ * ```
207
+ *
208
+ * @accessibility
209
+ * - Responds to mouse hover events to show/hide content
210
+ * - Maintains keyboard focus when asChild is used with focusable elements
211
+ * - Does not provide keyboard-only access to hover card content
212
+ * - Consider providing alternative access methods for keyboard users
213
+ *
214
+ * @see {@link HoverCardContent} The content that appears when this trigger is hovered
96
215
  */
97
- declare function HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
216
+ declare function HoverCardTrigger(props: React.ComponentProps<typeof HoverCardPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
98
217
  /**
99
- * Content container with built-in styling and animations
218
+ * HoverCardContent - Floating content container with intelligent positioning and animations
219
+ *
220
+ * The content area that appears when the trigger is hovered. Features built-in animations,
221
+ * intelligent positioning to avoid viewport boundaries, and customizable alignment options.
222
+ * Automatically portaled to prevent z-index and overflow issues, with smooth fade and scale
223
+ * transitions that respect user motion preferences.
224
+ *
225
+ * The content supports rich layouts including text, images, buttons, and complex components.
226
+ * Positioning is automatically calculated based on available space, with collision detection
227
+ * to ensure the content remains visible within the viewport.
228
+ *
229
+ * @example
230
+ * ```tsx
231
+ * // Simple text content
232
+ * <HoverCardContent>
233
+ * <p>This is a simple hover card with text content.</p>
234
+ * </HoverCardContent>
235
+ * ```
236
+ *
237
+ * @example
238
+ * ```tsx
239
+ * // Positioned above the trigger with custom alignment
240
+ * <HoverCardContent side="top" align="start" sideOffset={8}>
241
+ * <div className="text-sm">
242
+ * Content appears above the trigger, aligned to the start edge
243
+ * </div>
244
+ * </HoverCardContent>
245
+ * ```
246
+ *
247
+ * @example
248
+ * ```tsx
249
+ * // Rich content with custom width and complex layout
250
+ * <HoverCardContent className="w-80">
251
+ * <div className="space-y-3">
252
+ * <div className="flex items-center gap-3">
253
+ * <Avatar className="h-12 w-12">
254
+ * <AvatarImage src="/avatar.jpg" />
255
+ * <AvatarFallback>JD</AvatarFallback>
256
+ * </Avatar>
257
+ * <div>
258
+ * <h4 className="font-semibold">John Doe</h4>
259
+ * <p className="text-sm text-muted-foreground">Software Engineer</p>
260
+ * </div>
261
+ * </div>
262
+ * <Separator />
263
+ * <div className="grid grid-cols-2 gap-4 text-sm">
264
+ * <div>
265
+ * <p className="font-medium">Repositories</p>
266
+ * <p className="text-muted-foreground">42</p>
267
+ * </div>
268
+ * <div>
269
+ * <p className="font-medium">Followers</p>
270
+ * <p className="text-muted-foreground">1.2k</p>
271
+ * </div>
272
+ * </div>
273
+ * </div>
274
+ * </HoverCardContent>
275
+ * ```
276
+ *
277
+ * @example
278
+ * ```tsx
279
+ * // Interactive content with buttons
280
+ * <HoverCardContent>
281
+ * <div className="space-y-3">
282
+ * <h4 className="font-semibold">Quick Actions</h4>
283
+ * <div className="flex flex-col gap-2">
284
+ * <Button size="sm" variant="ghost" className="justify-start">
285
+ * <EditIcon className="mr-2 h-4 w-4" />
286
+ * Edit Details
287
+ * </Button>
288
+ * <Button size="sm" variant="ghost" className="justify-start">
289
+ * <ShareIcon className="mr-2 h-4 w-4" />
290
+ * Share Profile
291
+ * </Button>
292
+ * <Button size="sm" variant="ghost" className="justify-start">
293
+ * <SettingsIcon className="mr-2 h-4 w-4" />
294
+ * Settings
295
+ * </Button>
296
+ * </div>
297
+ * </div>
298
+ * </HoverCardContent>
299
+ * ```
300
+ *
301
+ * @accessibility
302
+ * - Content is rendered in a portal to avoid z-index conflicts
303
+ * - Smooth animations that respect prefers-reduced-motion settings
304
+ * - Interactive content within the hover card remains functional
305
+ * - Focus management for interactive elements when content is open
306
+ * - Proper contrast ratios with popover color scheme
307
+ * - Content stays open when hovering over it, allowing interaction
308
+ *
309
+ * @animation
310
+ * - Fade in/out animations using data-[state] attributes
311
+ * - Scale animations (zoom-in-95/zoom-out-95) for smooth appearance
312
+ * - Directional slide animations based on positioning side
313
+ * - Origin-based scaling using CSS custom properties from Radix UI
314
+ * - Animations automatically disabled when prefers-reduced-motion is set
315
+ *
316
+ * @positioning
317
+ * - Auto-positioning with collision detection to stay within viewport
318
+ * - Supports all four sides (top, right, bottom, left) relative to trigger
319
+ * - Three alignment options (start, center, end) for each side
320
+ * - Configurable offsets for fine-tuned positioning
321
+ * - Boundary detection with customizable collision boundaries
322
+ * - Sticky positioning when content would overflow viewport
100
323
  *
101
- * @param side - Side of the trigger to position content ("top" | "right" | "bottom" | "left")
102
- * @param align - Alignment relative to trigger ("start" | "center" | "end")
103
- * @param sideOffset - Distance in pixels from the trigger (default: 4)
104
- * @param alignOffset - Offset in pixels from the alignment axis
105
- * @param className - Additional CSS classes
324
+ * @see {@link HoverCardTrigger} The element that activates this content
106
325
  */
107
326
  declare function HoverCardContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
108
327
  export { HoverCard, HoverCardTrigger, HoverCardContent };
@@ -1 +1 @@
1
- {"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../../src/components/ui/hover-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,4BAA4B,CAAC;AAIjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AACH;;;;;;;GAOG;AACH,iBAAS,SAAS,CAAC,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,2CAEtD;AAED;;;;GAIG;AACH,iBAAS,gBAAgB,CAAC,EACxB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,2CAIzD;AAED;;;;;;;;GAQG;AACH,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,KAAgB,EAChB,UAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,2CAezD;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../../src/components/ui/hover-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,4BAA4B,CAAC;AA0EjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6HG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,iBAAS,S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