@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
@@ -2,6 +2,90 @@ import * as React from "react";
2
2
 
3
3
  import { cn } from "@/lib/utils";
4
4
 
5
+ /**
6
+ * Props for Card component (Documentation only - NOT used in component implementation)
7
+ * These types are for documentation generation and should not replace HTML element inferred types
8
+ */
9
+ // eslint-disable-next-line unused-imports/no-unused-vars
10
+ type CardDocsProps = {
11
+ /** Additional CSS classes for custom styling */
12
+ className?: string;
13
+ /** Card content including headers, content, and footers */
14
+ children?: React.ReactNode;
15
+ } & React.HTMLAttributes<HTMLDivElement>;
16
+
17
+ /**
18
+ * Props for CardHeader component (Documentation only - NOT used in component implementation)
19
+ * These types are for documentation generation and should not replace HTML element inferred types
20
+ */
21
+ // eslint-disable-next-line unused-imports/no-unused-vars
22
+ type CardHeaderDocsProps = {
23
+ /** Additional CSS classes for custom styling */
24
+ className?: string;
25
+ /** Header content including title, description, and actions */
26
+ children?: React.ReactNode;
27
+ } & React.HTMLAttributes<HTMLDivElement>;
28
+
29
+ /**
30
+ * Props for CardTitle component (Documentation only - NOT used in component implementation)
31
+ * These types are for documentation generation and should not replace HTML element inferred types
32
+ */
33
+ // eslint-disable-next-line unused-imports/no-unused-vars
34
+ type CardTitleDocsProps = {
35
+ /** Additional CSS classes for custom styling */
36
+ className?: string;
37
+ /** The title text or content */
38
+ children?: React.ReactNode;
39
+ } & React.HTMLAttributes<HTMLDivElement>;
40
+
41
+ /**
42
+ * Props for CardDescription component (Documentation only - NOT used in component implementation)
43
+ * These types are for documentation generation and should not replace HTML element inferred types
44
+ */
45
+ // eslint-disable-next-line unused-imports/no-unused-vars
46
+ type CardDescriptionDocsProps = {
47
+ /** Additional CSS classes for custom styling */
48
+ className?: string;
49
+ /** The description text or content */
50
+ children?: React.ReactNode;
51
+ } & React.HTMLAttributes<HTMLDivElement>;
52
+
53
+ /**
54
+ * Props for CardAction component (Documentation only - NOT used in component implementation)
55
+ * These types are for documentation generation and should not replace HTML element inferred types
56
+ */
57
+ // eslint-disable-next-line unused-imports/no-unused-vars
58
+ type CardActionDocsProps = {
59
+ /** Additional CSS classes for custom styling */
60
+ className?: string;
61
+ /** Action elements like buttons, badges, or dropdown menus */
62
+ children?: React.ReactNode;
63
+ } & React.HTMLAttributes<HTMLDivElement>;
64
+
65
+ /**
66
+ * Props for CardContent component (Documentation only - NOT used in component implementation)
67
+ * These types are for documentation generation and should not replace HTML element inferred types
68
+ */
69
+ // eslint-disable-next-line unused-imports/no-unused-vars
70
+ type CardContentDocsProps = {
71
+ /** Additional CSS classes for custom styling */
72
+ className?: string;
73
+ /** Main content of the card */
74
+ children?: React.ReactNode;
75
+ } & React.HTMLAttributes<HTMLDivElement>;
76
+
77
+ /**
78
+ * Props for CardFooter component (Documentation only - NOT used in component implementation)
79
+ * These types are for documentation generation and should not replace HTML element inferred types
80
+ */
81
+ // eslint-disable-next-line unused-imports/no-unused-vars
82
+ type CardFooterDocsProps = {
83
+ /** Additional CSS classes for custom styling */
84
+ className?: string;
85
+ /** Footer content including actions and supplementary information */
86
+ children?: React.ReactNode;
87
+ } & React.HTMLAttributes<HTMLDivElement>;
88
+
5
89
  /**
6
90
  * Card - A flexible container component for grouping related content
7
91
  *
@@ -96,9 +180,6 @@ import { cn } from "@/lib/utils";
96
180
  * - Screen reader friendly with clear content structure
97
181
  * - Focus management handled by interactive child components
98
182
  *
99
- * @param {string} [className] - Additional CSS classes to apply to the card
100
- * @param {React.HTMLAttributes<HTMLDivElement>} props - Standard HTML div attributes
101
- *
102
183
  * @see {@link CardHeader} - Card header container with grid layout support
103
184
  * @see {@link CardTitle} - Card title component for main headings
104
185
  * @see {@link CardDescription} - Card description component for supplementary text
@@ -108,7 +189,11 @@ import { cn } from "@/lib/utils";
108
189
  * @see {@link https://ui.shadcn.com/docs/components/card} - shadcn/ui Card documentation
109
190
  * @since 1.0.0
110
191
  */
111
- function Card({ className, ...props }: React.ComponentProps<"div">) {
192
+ function Card({
193
+ className,
194
+ children,
195
+ ...props
196
+ }: React.HTMLAttributes<HTMLDivElement>) {
112
197
  return (
113
198
  <div
114
199
  data-slot="card"
@@ -117,7 +202,9 @@ function Card({ className, ...props }: React.ComponentProps<"div">) {
117
202
  className,
118
203
  )}
119
204
  {...props}
120
- />
205
+ >
206
+ {children}
207
+ </div>
121
208
  );
122
209
  }
123
210
 
@@ -164,11 +251,13 @@ function Card({ className, ...props }: React.ComponentProps<"div">) {
164
251
  * - Grid layout preserves reading order for screen readers
165
252
  * - Action buttons maintain focus order
166
253
  *
167
- * @param {string} [className] - Additional CSS classes to apply
168
- * @param {React.HTMLAttributes<HTMLDivElement>} props - Standard HTML div attributes
169
254
  * @since 1.0.0
170
255
  */
171
- function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
256
+ function CardHeader({
257
+ className,
258
+ children,
259
+ ...props
260
+ }: React.HTMLAttributes<HTMLDivElement>) {
172
261
  return (
173
262
  <div
174
263
  data-slot="card-header"
@@ -177,7 +266,9 @@ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
177
266
  className,
178
267
  )}
179
268
  {...props}
180
- />
269
+ >
270
+ {children}
271
+ </div>
181
272
  );
182
273
  }
183
274
 
@@ -207,17 +298,21 @@ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
207
298
  * - Should maintain logical heading hierarchy in the document
208
299
  * - Screen readers will identify this as the card's main topic
209
300
  *
210
- * @param {string} [className] - Additional CSS classes to apply
211
- * @param {React.HTMLAttributes<HTMLDivElement>} props - Standard HTML div attributes
212
301
  * @since 1.0.0
213
302
  */
214
- function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
303
+ function CardTitle({
304
+ className,
305
+ children,
306
+ ...props
307
+ }: React.HTMLAttributes<HTMLDivElement>) {
215
308
  return (
216
309
  <div
217
310
  data-slot="card-title"
218
311
  className={cn("leading-none font-semibold", className)}
219
312
  {...props}
220
- />
313
+ >
314
+ {children}
315
+ </div>
221
316
  );
222
317
  }
223
318
 
@@ -250,17 +345,21 @@ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
250
345
  * - Uses muted color that maintains sufficient contrast
251
346
  * - Should be descriptive and concise
252
347
  *
253
- * @param {string} [className] - Additional CSS classes to apply
254
- * @param {React.HTMLAttributes<HTMLDivElement>} props - Standard HTML div attributes
255
348
  * @since 1.0.0
256
349
  */
257
- function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
350
+ function CardDescription({
351
+ className,
352
+ children,
353
+ ...props
354
+ }: React.HTMLAttributes<HTMLDivElement>) {
258
355
  return (
259
356
  <div
260
357
  data-slot="card-description"
261
358
  className={cn("text-muted-foreground text-sm", className)}
262
359
  {...props}
263
- />
360
+ >
361
+ {children}
362
+ </div>
264
363
  );
265
364
  }
266
365
 
@@ -318,11 +417,13 @@ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
318
417
  * - Maintains logical tab order
319
418
  * - Icon-only buttons should include aria-label
320
419
  *
321
- * @param {string} [className] - Additional CSS classes to apply
322
- * @param {React.HTMLAttributes<HTMLDivElement>} props - Standard HTML div attributes
323
420
  * @since 1.0.0
324
421
  */
325
- function CardAction({ className, ...props }: React.ComponentProps<"div">) {
422
+ function CardAction({
423
+ className,
424
+ children,
425
+ ...props
426
+ }: React.HTMLAttributes<HTMLDivElement>) {
326
427
  return (
327
428
  <div
328
429
  data-slot="card-action"
@@ -331,7 +432,9 @@ function CardAction({ className, ...props }: React.ComponentProps<"div">) {
331
432
  className,
332
433
  )}
333
434
  {...props}
334
- />
435
+ >
436
+ {children}
437
+ </div>
335
438
  );
336
439
  }
337
440
 
@@ -367,17 +470,17 @@ function CardAction({ className, ...props }: React.ComponentProps<"div">) {
367
470
  * - Should maintain logical content structure
368
471
  * - Interactive elements should have proper focus management
369
472
  *
370
- * @param {string} [className] - Additional CSS classes to apply
371
- * @param {React.HTMLAttributes<HTMLDivElement>} props - Standard HTML div attributes
372
473
  * @since 1.0.0
373
474
  */
374
- function CardContent({ className, ...props }: React.ComponentProps<"div">) {
475
+ function CardContent({
476
+ className,
477
+ children,
478
+ ...props
479
+ }: React.HTMLAttributes<HTMLDivElement>) {
375
480
  return (
376
- <div
377
- data-slot="card-content"
378
- className={cn("px-6", className)}
379
- {...props}
380
- />
481
+ <div data-slot="card-content" className={cn("px-6", className)} {...props}>
482
+ {children}
483
+ </div>
381
484
  );
382
485
  }
383
486
 
@@ -422,17 +525,21 @@ function CardContent({ className, ...props }: React.ComponentProps<"div">) {
422
525
  * - Maintains logical tab order for interactive elements
423
526
  * - Consider aria-label for icon-only buttons
424
527
  *
425
- * @param {string} [className] - Additional CSS classes to apply
426
- * @param {React.HTMLAttributes<HTMLDivElement>} props - Standard HTML div attributes
427
528
  * @since 1.0.0
428
529
  */
429
- function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
530
+ function CardFooter({
531
+ className,
532
+ children,
533
+ ...props
534
+ }: React.HTMLAttributes<HTMLDivElement>) {
430
535
  return (
431
536
  <div
432
537
  data-slot="card-footer"
433
538
  className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
434
539
  {...props}
435
- />
540
+ >
541
+ {children}
542
+ </div>
436
543
  );
437
544
  }
438
545