@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
@@ -4,27 +4,61 @@ import * as SwitchPrimitive from "@radix-ui/react-switch";
4
4
  import { cn } from "@/lib/utils";
5
5
 
6
6
  /**
7
- * Switch component for binary toggle controls
7
+ * Props for Switch (Documentation only - NOT used in component implementation)
8
8
  *
9
- * A versatile toggle switch component built on Radix UI primitives that provides
9
+ * A comprehensive interface documenting all available props for the Switch component.
10
+ * Built on Radix UI Switch primitive, providing binary toggle functionality with
11
+ * full form integration, accessibility support, and state management capabilities.
12
+ */
13
+ // eslint-disable-next-line unused-imports/no-unused-vars
14
+ type SwitchDocsProps = {
15
+ /** Whether the switch is currently checked (controlled state) @default undefined */
16
+ checked?: boolean;
17
+ /** The initial checked state when uncontrolled @default false */
18
+ defaultChecked?: boolean;
19
+ /** Event handler called when the checked state changes @param checked - The new checked state */
20
+ onCheckedChange?: (checked: boolean) => void;
21
+ /** Whether the switch is disabled and cannot be interacted with @default false */
22
+ disabled?: boolean;
23
+ /** Whether the switch is required in form validation @default false */
24
+ required?: boolean;
25
+ /** The name attribute for form submission @default undefined */
26
+ name?: string;
27
+ /** The value attribute for form submission @default "on" */
28
+ value?: string;
29
+ /** The HTML id attribute for associating with labels @default undefined */
30
+ id?: string;
31
+ /** Render as child element, merging props and behavior @default false */
32
+ asChild?: boolean;
33
+ /** Additional CSS classes to apply to the switch */
34
+ className?: string;
35
+ } & React.ComponentProps<typeof SwitchPrimitive.Root>;
36
+
37
+ /**
38
+ * Switch - Binary toggle control for on/off states
39
+ *
40
+ * A versatile toggle switch component built on Radix UI Switch primitive that provides
10
41
  * an accessible way to toggle between on/off states. Commonly used for settings,
11
42
  * preferences, and feature toggles that have immediate effects.
12
43
  *
13
44
  * Built with Radix UI Switch primitive and styled with Tailwind CSS to ensure
14
- * consistent visual appearance across light and dark themes.
45
+ * consistent visual appearance across light and dark themes. The component
46
+ * automatically handles state management, accessibility, keyboard navigation,
47
+ * and form integration.
15
48
  *
16
- * @example
49
+ * @example Basic usage with label
17
50
  * ```tsx
18
- * // Basic usage with label
51
+ * import { Switch } from "@/components/ui/switch";
52
+ * import { Label } from "@/components/ui/label";
53
+ *
19
54
  * <div className="flex items-center space-x-2">
20
55
  * <Switch id="airplane-mode" />
21
56
  * <Label htmlFor="airplane-mode">Airplane Mode</Label>
22
57
  * </div>
23
58
  * ```
24
59
  *
25
- * @example
60
+ * @example Controlled switch with state
26
61
  * ```tsx
27
- * // Controlled switch with state
28
62
  * const [enabled, setEnabled] = useState(false);
29
63
  *
30
64
  * <Switch
@@ -34,9 +68,8 @@ import { cn } from "@/lib/utils";
34
68
  * />
35
69
  * ```
36
70
  *
37
- * @example
71
+ * @example Switch with custom handler
38
72
  * ```tsx
39
- * // Switch with custom handler
40
73
  * <Switch
41
74
  * checked={isDarkMode}
42
75
  * onCheckedChange={(checked) => {
@@ -46,44 +79,50 @@ import { cn } from "@/lib/utils";
46
79
  * />
47
80
  * ```
48
81
  *
49
- * @example
82
+ * @example Disabled states
83
+ * ```tsx
84
+ * <Switch disabled /> // Disabled unchecked
85
+ * <Switch disabled defaultChecked /> // Disabled checked
86
+ * ```
87
+ *
88
+ * @example Form integration with validation
89
+ * ```tsx
90
+ * <form>
91
+ * <Switch
92
+ * name="notifications"
93
+ * value="enabled"
94
+ * required
95
+ * onCheckedChange={(checked) => console.log('Notifications:', checked)}
96
+ * />
97
+ * </form>
98
+ * ```
99
+ *
100
+ * @example Uncontrolled with default state
50
101
  * ```tsx
51
- * // Disabled switch
52
- * <Switch disabled />
53
- * <Switch disabled defaultChecked />
102
+ * <Switch defaultChecked onCheckedChange={(checked) => {
103
+ * // Handle state changes without controlling the value
104
+ * analytics.track('switch_toggled', { checked });
105
+ * }} />
54
106
  * ```
55
107
  *
56
108
  * @accessibility
57
- * - Fully keyboard accessible with Space and Enter key support
58
- * - ARIA attributes automatically managed by Radix UI
59
- * - Screen reader announcements for state changes
60
- * - Focus indicator with visible ring
61
- * - Associates with labels via htmlFor/id pairing
62
- * - Disabled state properly communicated to assistive technology
63
- * - Follows WAI-ARIA Switch pattern
109
+ * - **Keyboard Navigation**: Space and Enter keys toggle the switch
110
+ * - **Focus Management**: Clear focus ring indicator with keyboard navigation
111
+ * - **Screen Readers**: Announces current state ("on" or "off") and changes
112
+ * - **ARIA Compliance**: Follows WAI-ARIA Switch pattern with proper role and attributes
113
+ * - **Label Association**: Works with labels via htmlFor/id pairing for proper announcements
114
+ * - **Form Integration**: Properly participates in form submission and validation
115
+ * - **Disabled State**: Clearly communicated to assistive technology with proper attributes
116
+ * - **State Attributes**: Uses data-state for styling and accessibility context
64
117
  *
65
118
  * @see {@link https://ui.shadcn.com/docs/components/switch} shadcn/ui Switch documentation
66
- * @since 1.0.0
67
119
  * @see {@link https://www.radix-ui.com/primitives/docs/components/switch} Radix UI Switch primitive
120
+ * @since 1.0.0
68
121
  */
69
- /**
70
- * Switch component props
71
- *
72
- * Extends all props from Radix UI Switch Root primitive, including:
73
- * - `checked` - The controlled checked state of the switch
74
- * - `defaultChecked` - The default checked state when uncontrolled
75
- * - `onCheckedChange` - Event handler called when the checked state changes
76
- * - `disabled` - Whether the switch is disabled
77
- * - `required` - Whether the switch is required in forms
78
- * - `name` - Name attribute for form submission
79
- * - `value` - Value attribute for form submission
80
- *
81
- * @param className - Additional CSS classes to apply to the switch
82
- * @param props - All other props from Radix UI Switch Root
83
- */
84
- type SwitchProps = React.ComponentProps<typeof SwitchPrimitive.Root>;
85
-
86
- function Switch({ className, ...props }: SwitchProps) {
122
+ function Switch({
123
+ className,
124
+ ...props
125
+ }: React.ComponentProps<typeof SwitchPrimitive.Root>) {
87
126
  return (
88
127
  <SwitchPrimitive.Root
89
128
  data-slot="switch"
@@ -2,6 +2,142 @@ import * as React from "react";
2
2
 
3
3
  import { cn } from "@/lib/utils";
4
4
 
5
+ /**
6
+ * Props for Table component (Documentation only - NOT used in component implementation)
7
+ *
8
+ * Main container for table data with responsive horizontal scrolling.
9
+ * Built on semantic HTML table element with accessibility features.
10
+ */
11
+ // eslint-disable-next-line unused-imports/no-unused-vars
12
+ type TableDocsProps = {
13
+ /** Additional CSS classes for custom styling */
14
+ className?: string;
15
+ /** Table content including headers, body, and footer */
16
+ children?: React.ReactNode;
17
+ /** Table summary for accessibility @default undefined */
18
+ summary?: string;
19
+ /** ARIA label for the table @default undefined */
20
+ "aria-label"?: string;
21
+ /** ARIA described by reference @default undefined */
22
+ "aria-describedby"?: string;
23
+ /** Role override for table semantics @default "table" */
24
+ role?: string;
25
+ } & React.ComponentProps<"table">;
26
+
27
+ /**
28
+ * Props for TableHeader component (Documentation only - NOT used in component implementation)
29
+ *
30
+ * Container for table header rows with proper semantic structure.
31
+ * Groups column headers for screen reader navigation.
32
+ */
33
+ // eslint-disable-next-line unused-imports/no-unused-vars
34
+ type TableHeaderDocsProps = {
35
+ /** Additional CSS classes for custom styling */
36
+ className?: string;
37
+ /** Header rows containing TableHead cells */
38
+ children?: React.ReactNode;
39
+ } & React.ComponentProps<"thead">;
40
+
41
+ /**
42
+ * Props for TableBody component (Documentation only - NOT used in component implementation)
43
+ *
44
+ * Main content container for table data rows. Contains all data content
45
+ * with proper border styling and row management.
46
+ */
47
+ // eslint-disable-next-line unused-imports/no-unused-vars
48
+ type TableBodyDocsProps = {
49
+ /** Additional CSS classes for custom styling */
50
+ className?: string;
51
+ /** Data rows containing TableCell elements */
52
+ children?: React.ReactNode;
53
+ } & React.ComponentProps<"tbody">;
54
+
55
+ /**
56
+ * Props for TableFooter component (Documentation only - NOT used in component implementation)
57
+ *
58
+ * Container for table footer rows containing summary information, totals,
59
+ * or additional context. Visually distinct from body content.
60
+ */
61
+ // eslint-disable-next-line unused-imports/no-unused-vars
62
+ type TableFooterDocsProps = {
63
+ /** Additional CSS classes for custom styling */
64
+ className?: string;
65
+ /** Footer rows containing summary or total information */
66
+ children?: React.ReactNode;
67
+ } & React.ComponentProps<"tfoot">;
68
+
69
+ /**
70
+ * Props for TableRow component (Documentation only - NOT used in component implementation)
71
+ *
72
+ * Individual row container with interactive states. Supports selection
73
+ * and hover effects with smooth transitions.
74
+ */
75
+ // eslint-disable-next-line unused-imports/no-unused-vars
76
+ type TableRowDocsProps = {
77
+ /** Additional CSS classes for custom styling */
78
+ className?: string;
79
+ /** Table cells or header cells */
80
+ children?: React.ReactNode;
81
+ /** Selection state for visual feedback @default undefined */
82
+ "data-state"?: "selected" | "unselected";
83
+ } & React.ComponentProps<"tr">;
84
+
85
+ /**
86
+ * Props for TableHead component (Documentation only - NOT used in component implementation)
87
+ *
88
+ * Column header cell with proper accessibility attributes. Provides
89
+ * context for screen reader navigation and sortable interactions.
90
+ */
91
+ // eslint-disable-next-line unused-imports/no-unused-vars
92
+ type TableHeadDocsProps = {
93
+ /** Additional CSS classes for custom styling */
94
+ className?: string;
95
+ /** Column header content, can include text, buttons, or interactive elements */
96
+ children?: React.ReactNode;
97
+ /** Defines header scope for accessibility @default undefined */
98
+ scope?: "col" | "row" | "colgroup" | "rowgroup";
99
+ /** Column span for grouped headers @default 1 */
100
+ colSpan?: number;
101
+ /** Row span for multi-level headers @default 1 */
102
+ rowSpan?: number;
103
+ /** Sort direction indicator for sortable columns @default undefined */
104
+ "aria-sort"?: "ascending" | "descending" | "none" | "other";
105
+ } & React.ComponentProps<"th">;
106
+
107
+ /**
108
+ * Props for TableCell component (Documentation only - NOT used in component implementation)
109
+ *
110
+ * Data cell component with flexible content support and spanning capabilities.
111
+ * Handles text, components, and interactive elements with proper alignment.
112
+ */
113
+ // eslint-disable-next-line unused-imports/no-unused-vars
114
+ type TableCellDocsProps = {
115
+ /** Additional CSS classes for custom styling */
116
+ className?: string;
117
+ /** Cell content including text, components, or interactive elements */
118
+ children?: React.ReactNode;
119
+ /** Number of columns this cell should span @default 1 */
120
+ colSpan?: number;
121
+ /** Number of rows this cell should span @default 1 */
122
+ rowSpan?: number;
123
+ /** Header association for complex tables @default undefined */
124
+ headers?: string;
125
+ } & React.ComponentProps<"td">;
126
+
127
+ /**
128
+ * Props for TableCaption component (Documentation only - NOT used in component implementation)
129
+ *
130
+ * Descriptive caption for table content and context. Essential for
131
+ * accessibility and provides overview of table purpose.
132
+ */
133
+ // eslint-disable-next-line unused-imports/no-unused-vars
134
+ type TableCaptionDocsProps = {
135
+ /** Additional CSS classes for custom styling */
136
+ className?: string;
137
+ /** Caption text or content describing the table */
138
+ children?: React.ReactNode;
139
+ } & React.ComponentProps<"caption">;
140
+
5
141
  /**
6
142
  * Table - A responsive data table component for displaying structured information
7
143
  *
@@ -81,6 +217,28 @@ import { cn } from "@/lib/utils";
81
217
  * </Table>
82
218
  * ```
83
219
  *
220
+ * @example
221
+ * ```tsx
222
+ * // Table with custom attributes for data integration
223
+ * <Table role="table" aria-label="User analytics dashboard">
224
+ * <TableCaption>Showing 1-10 of 50 users</TableCaption>
225
+ * <TableHeader>
226
+ * <TableRow>
227
+ * <TableHead scope="col">User</TableHead>
228
+ * <TableHead scope="col">FID</TableHead>
229
+ * <TableHead scope="col" className="text-right">Casts</TableHead>
230
+ * </TableRow>
231
+ * </TableHeader>
232
+ * <TableBody>
233
+ * <TableRow data-user-id="3">
234
+ * <TableCell>@dwr.eth</TableCell>
235
+ * <TableCell>3</TableCell>
236
+ * <TableCell className="text-right">1,234</TableCell>
237
+ * </TableRow>
238
+ * </TableBody>
239
+ * </Table>
240
+ * ```
241
+ *
84
242
  * @accessibility
85
243
  * - Semantic HTML table structure with thead, tbody, tfoot elements
86
244
  * - Screen reader navigation with proper table headers and data relationships
@@ -88,14 +246,19 @@ import { cn } from "@/lib/utils";
88
246
  * - Caption support for table descriptions and context
89
247
  * - Selection states communicated via data-state attributes
90
248
  * - Keyboard navigation support for interactive elements
249
+ * - TableHead components automatically provide column context for screen readers
250
+ * - Table container ensures content remains accessible during horizontal scroll
91
251
  *
92
252
  * @see {@link https://ui.shadcn.com/docs/components/table} shadcn/ui Table documentation
93
253
  * @see {@link https://ui.shadcn.com/docs/components/data-table} TanStack Table integration
254
+ * @see {@link https://tanstack.com/table} TanStack Table library for advanced features
94
255
  * @see {@link TableHeader} Table header container component
95
256
  * @see {@link TableBody} Table body container component
96
257
  * @see {@link TableRow} Table row component with hover and selection states
97
258
  * @see {@link TableCell} Table data cell component
98
259
  * @see {@link TableHead} Table header cell component
260
+ * @see {@link TableFooter} Table footer container for summary data
261
+ * @see {@link TableCaption} Table caption component for descriptions
99
262
  * @since 1.0.0
100
263
  */
101
264
  function Table({ className, ...props }: React.ComponentProps<"table">) {
@@ -254,6 +417,9 @@ function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">) {
254
417
  * - Hover state enhances interactivity and focus
255
418
  * - Semantic tr element maintains table structure
256
419
  * - Visual feedback for user interactions
420
+ * - Compatible with keyboard navigation patterns
421
+ * - Selection state changes are announced to screen readers
422
+ * - Transition animations provide smooth visual feedback
257
423
  * @since 1.0.0
258
424
  */
259
425
  function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
@@ -299,6 +465,9 @@ function TableRow({ className, ...props }: React.ComponentProps<"tr">) {
299
465
  * - Screen readers announce as column headers for navigation
300
466
  * - Supports scope attribute for complex table relationships
301
467
  * - Special checkbox styling maintains proper alignment
468
+ * - Automatically provides column context for data cells
469
+ * - Works with sorting and filtering interaction patterns
470
+ * - Maintains proper focus order for keyboard navigation
302
471
  * @since 1.0.0
303
472
  */
304
473
  function TableHead({ className, ...props }: React.ComponentProps<"th">) {
@@ -399,10 +568,7 @@ function TableCell({ className, ...props }: React.ComponentProps<"td">) {
399
568
  * - Helps users understand table purpose and scope
400
569
  * @since 1.0.0
401
570
  */
402
- function TableCaption({
403
- className,
404
- ...props
405
- }: React.ComponentProps<"caption">) {
571
+ function TableCaption({ className, ...props }: React.ComponentProps<"caption">) {
406
572
  return (
407
573
  <caption
408
574
  data-slot="table-caption"
@@ -3,6 +3,110 @@ import * as TabsPrimitive from "@radix-ui/react-tabs";
3
3
 
4
4
  import { cn } from "@/lib/utils";
5
5
 
6
+ // ============================================================================
7
+ // DOCUMENTATION-ONLY PROP TYPES (Internal - Not exported)
8
+ // ============================================================================
9
+
10
+ /**
11
+ * Props for Tabs (Documentation only - NOT used in component implementation)
12
+ * These types are for documentation generation and should not replace Radix inferred types
13
+ */
14
+ // eslint-disable-next-line unused-imports/no-unused-vars
15
+ type TabsDocsProps = {
16
+ /** The initial active tab value (uncontrolled usage). Use when you do not need to control the state of the tabs */
17
+ defaultValue?: string;
18
+ /** The currently active tab value (controlled usage). Should be used in conjunction with onValueChange */
19
+ value?: string;
20
+ /** Callback fired when the active tab changes
21
+ * @param value - The new active tab value
22
+ */
23
+ onValueChange?: (value: string) => void;
24
+ /** Layout direction of the tabs
25
+ * @default "horizontal"
26
+ */
27
+ orientation?: "horizontal" | "vertical";
28
+ /** Text direction for RTL support. If omitted, inherits globally from DirectionProvider or assumes LTR
29
+ * @default "ltr"
30
+ */
31
+ dir?: "ltr" | "rtl";
32
+ /** When tabs activate: "automatic" (on focus) or "manual" (on click/enter)
33
+ * @default "automatic"
34
+ */
35
+ activationMode?: "automatic" | "manual";
36
+ /** Additional CSS classes for styling */
37
+ className?: string;
38
+ /** Tab list, content panels, and other child elements */
39
+ children?: React.ReactNode;
40
+ /** Change the default rendered element for the one passed as a child, merging their props and behavior
41
+ * @default false
42
+ */
43
+ asChild?: boolean;
44
+ } & React.ComponentProps<typeof TabsPrimitive.Root>;
45
+
46
+ /**
47
+ * Props for TabsList (Documentation only - NOT used in component implementation)
48
+ * These types are for documentation generation and should not replace Radix inferred types
49
+ */
50
+ // eslint-disable-next-line unused-imports/no-unused-vars
51
+ type TabsListDocsProps = {
52
+ /** When true, keyboard navigation will loop from last tab to first, and vice versa
53
+ * @default true
54
+ */
55
+ loop?: boolean;
56
+ /** Additional CSS classes for custom styling */
57
+ className?: string;
58
+ /** TabsTrigger components to be grouped */
59
+ children?: React.ReactNode;
60
+ /** Change the default rendered element for the one passed as a child, merging their props and behavior
61
+ * @default false
62
+ */
63
+ asChild?: boolean;
64
+ } & React.ComponentProps<typeof TabsPrimitive.List>;
65
+
66
+ /**
67
+ * Props for TabsTrigger (Documentation only - NOT used in component implementation)
68
+ * These types are for documentation generation and should not replace Radix inferred types
69
+ */
70
+ // eslint-disable-next-line unused-imports/no-unused-vars
71
+ type TabsTriggerDocsProps = {
72
+ /** Unique identifier that associates this trigger with its content panel */
73
+ value: string;
74
+ /** When true, prevents interaction and shows disabled styling
75
+ * @default false
76
+ */
77
+ disabled?: boolean;
78
+ /** Additional CSS classes for custom styling */
79
+ className?: string;
80
+ /** Content to display within the trigger (text, icons, etc.) */
81
+ children?: React.ReactNode;
82
+ /** Change the default rendered element for the one passed as a child, merging their props and behavior
83
+ * @default false
84
+ */
85
+ asChild?: boolean;
86
+ } & React.ComponentProps<typeof TabsPrimitive.Trigger>;
87
+
88
+ /**
89
+ * Props for TabsContent (Documentation only - NOT used in component implementation)
90
+ * These types are for documentation generation and should not replace Radix inferred types
91
+ */
92
+ // eslint-disable-next-line unused-imports/no-unused-vars
93
+ type TabsContentDocsProps = {
94
+ /** Unique identifier that associates this content with its trigger */
95
+ value: string;
96
+ /** When true, content stays mounted even when inactive (useful for preserving state)
97
+ * @default false
98
+ */
99
+ forceMount?: boolean;
100
+ /** Additional CSS classes for custom styling */
101
+ className?: string;
102
+ /** The content to display when this tab is active */
103
+ children?: React.ReactNode;
104
+ /** Change the default rendered element for the one passed as a child, merging their props and behavior
105
+ * @default false
106
+ */
107
+ asChild?: boolean;
108
+ } & React.ComponentProps<typeof TabsPrimitive.Content>;
109
+
6
110
  /**
7
111
  * A tabbed interface component for organizing content into multiple sections.
8
112
  *
@@ -87,21 +191,13 @@ import { cn } from "@/lib/utils";
87
191
  * </Tabs>
88
192
  * ```
89
193
  *
90
- * @param defaultValue - The initial active tab (uncontrolled usage)
91
- * @param value - The currently active tab (controlled usage)
92
- * @param onValueChange - Callback fired when the active tab changes
93
- * @param orientation - Layout direction: "horizontal" (default) or "vertical"
94
- * @param dir - Text direction for RTL support: "ltr" or "rtl"
95
- * @param activationMode - When tabs activate: "automatic" (on focus) or "manual" (on click/enter)
96
- * @param className - Additional CSS classes to apply
97
- * @param children - Tab list, content panels, and other child elements
98
- *
99
194
  * @accessibility
100
195
  * - **Keyboard Navigation**: Arrow keys navigate between tabs, Tab/Shift+Tab moves focus into/out of tab list
101
196
  * - **Focus Management**: Home/End keys jump to first/last tab, proper focus visible indicators
102
197
  * - **Screen Readers**: Proper ARIA roles (tablist, tab, tabpanel), labels, and state announcements
103
198
  * - **Touch Support**: Touch-friendly trigger areas with appropriate spacing
104
199
  * - **RTL Support**: Respects text direction for proper layout in right-to-left languages
200
+ * - **Activation Modes**: Automatic (focus) or manual (click/enter) activation patterns
105
201
  *
106
202
  * @see {@link https://ui.shadcn.com/docs/components/tabs} shadcn/ui tabs documentation
107
203
  * @see {@link https://www.radix-ui.com/primitives/docs/components/tabs} Radix UI tabs primitive
@@ -160,13 +256,11 @@ function Tabs({
160
256
  * </TabsList>
161
257
  * ```
162
258
  *
163
- * @param className - Additional CSS classes for custom styling
164
- * @param children - TabsTrigger components to be grouped
165
- *
166
259
  * @accessibility
167
260
  * - Implements ARIA tablist role for screen readers
168
261
  * - Maintains proper tab order and focus management
169
262
  * - Supports keyboard navigation between triggers
263
+ * - Loop navigation when enabled (default: true)
170
264
  *
171
265
  * @since 1.0.0
172
266
  */
@@ -213,17 +307,13 @@ function TabsList({
213
307
  * </TabsTrigger>
214
308
  * ```
215
309
  *
216
- * @param value - Unique identifier that associates this trigger with its content panel
217
- * @param disabled - When true, prevents interaction and shows disabled styling
218
- * @param className - Additional CSS classes for custom styling
219
- * @param children - Content to display within the trigger (text, icons, etc.)
220
- *
221
310
  * @accessibility
222
311
  * - Implements ARIA tab role with proper attributes
223
312
  * - Announces selected state to screen readers
224
313
  * - Supports keyboard activation (Space, Enter)
225
314
  * - Shows focus visible indicators for keyboard users
226
315
  * - Respects disabled state for assistive technology
316
+ * - Data attributes: [data-state], [data-disabled], [data-orientation]
227
317
  *
228
318
  * @since 1.0.0
229
319
  */
@@ -287,16 +377,12 @@ function TabsTrigger({
287
377
  * </TabsContent>
288
378
  * ```
289
379
  *
290
- * @param value - Unique identifier that associates this content with its trigger
291
- * @param forceMount - When true, content stays mounted even when inactive (useful for preserving state)
292
- * @param className - Additional CSS classes for custom styling
293
- * @param children - The content to display when this tab is active
294
- *
295
380
  * @accessibility
296
381
  * - Implements ARIA tabpanel role with proper labeling
297
382
  * - Hidden from screen readers when inactive
298
383
  * - Receives focus when tab is activated via keyboard
299
384
  * - Maintains focus within panel content
385
+ * - Supports forceMount for animation control
300
386
  *
301
387
  * @since 1.0.0
302
388
  */