@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,192 +1,333 @@
1
1
  import * as React from "react";
2
2
  /**
3
- * Props for the Stack component
3
+ * Spacing options for Stack component using Tailwind CSS spacing scale
4
4
  *
5
- * @public
5
+ * Maps to Tailwind spacing utilities:
6
+ * - 1 = 0.25rem (4px) - Ultra-tight spacing for dense layouts
7
+ * - 2 = 0.5rem (8px) - Tight spacing for compact components
8
+ * - 3 = 0.75rem (12px) - Close spacing for related items
9
+ * - 4 = 1rem (16px) - Default spacing for general layouts
10
+ * - 6 = 1.5rem (24px) - Loose spacing for section separation
11
+ * - 8 = 2rem (32px) - Wide spacing for distinct content areas
12
+ * - 12 = 3rem (48px) - Extra-wide spacing for major layout divisions
6
13
  */
7
- export type StackProps = React.HTMLAttributes<HTMLDivElement> & {
8
- /**
9
- * The spacing between stack items using Tailwind CSS spacing scale
10
- *
11
- * Controls the gap between child elements using Tailwind's space utilities.
12
- * Each value corresponds to a Tailwind spacing unit (1 = 0.25rem, 4 = 1rem, etc.)
13
- *
14
- * @defaultValue 4
15
- * @example
16
- * ```tsx
17
- * // Tight spacing for compact layouts
18
- * <Stack spacing={2}>
19
- * <Button>Save</Button>
20
- * <Button>Cancel</Button>
21
- * </Stack>
22
- *
23
- * // Generous spacing for section separation
24
- * <Stack spacing={8}>
25
- * <section>First section</section>
26
- * <section>Second section</section>
27
- * </Stack>
28
- * ```
29
- */
30
- spacing?: 1 | 2 | 3 | 4 | 6 | 8 | 12;
31
- /**
32
- * The layout direction of the stack
33
- *
34
- * - `"vertical"` - Arranges children in a column with vertical spacing
35
- * - `"horizontal"` - Arranges children in a row with horizontal spacing
36
- *
37
- * @defaultValue "vertical"
38
- * @example
39
- * ```tsx
40
- * // Vertical stack (default)
41
- * <Stack>
42
- * <Card>Item 1</Card>
43
- * <Card>Item 2</Card>
44
- * </Stack>
45
- *
46
- * // Horizontal stack for action buttons
47
- * <Stack direction="horizontal">
48
- * <Button>Primary</Button>
49
- * <Button variant="outline">Secondary</Button>
50
- * </Stack>
51
- * ```
52
- */
53
- direction?: "vertical" | "horizontal";
54
- };
14
+ type StackSpacing = 1 | 2 | 3 | 4 | 6 | 8 | 12;
15
+ /**
16
+ * Layout direction options for Stack component
17
+ *
18
+ * - "vertical" - Flex column layout with space-y-* utilities
19
+ * - "horizontal" - Flex row layout with space-x-* utilities
20
+ */
21
+ type StackDirection = "vertical" | "horizontal";
55
22
  /**
56
23
  * Stack - A flexible layout component for consistent spacing between elements
57
24
  *
58
25
  * Stack is a fundamental layout primitive that arranges child elements in either
59
26
  * vertical or horizontal direction with consistent spacing. Built on flexbox principles,
60
- * it provides a clean API for common layout patterns without requiring custom CSS.
27
+ * it provides a clean, declarative API for common layout patterns without requiring
28
+ * custom CSS or complex flex configurations.
29
+ *
30
+ * **Core Features:**
31
+ * - Consistent spacing using Tailwind's design system
32
+ * - Flexible direction control (vertical/horizontal)
33
+ * - Zero-config flexbox layouts with predictable behavior
34
+ * - Composable with other UI components and layout utilities
35
+ * - Full accessibility support with semantic HTML structure
36
+ * - TypeScript-first with comprehensive prop validation
61
37
  *
62
- * This component is particularly useful for:
38
+ * **Common Use Cases:**
63
39
  * - Form layouts with consistent field spacing
64
40
  * - Button groups and action bars
65
41
  * - Content sections with uniform gaps
66
- * - Navigation lists and menus
67
- * - Card layouts and content grids
42
+ * - Navigation lists and menu structures
43
+ * - Card layouts and dashboard grids
44
+ * - Page sections and content hierarchy
45
+ * - Responsive component layouts
68
46
  *
69
- * @example Basic vertical layout (default)
47
+ * **Design System Integration:**
48
+ * Stack integrates seamlessly with design systems by providing consistent
49
+ * spacing that aligns with Tailwind's spacing scale. This ensures visual
50
+ * harmony across your application and reduces the need for custom spacing
51
+ * utilities in most common layout scenarios.
52
+ *
53
+ * @example Basic vertical content layout (default behavior)
70
54
  * ```tsx
71
55
  * <Stack>
72
- * <Card>Profile Information</Card>
73
- * <Card>Account Settings</Card>
74
- * <Card>Privacy Controls</Card>
56
+ * <h1>Dashboard</h1>
57
+ * <Card>
58
+ * <CardHeader>Profile Information</CardHeader>
59
+ * <CardContent>User profile details</CardContent>
60
+ * </Card>
61
+ * <Card>
62
+ * <CardHeader>Account Settings</CardHeader>
63
+ * <CardContent>Account configuration options</CardContent>
64
+ * </Card>
65
+ * <Card>
66
+ * <CardHeader>Privacy Controls</CardHeader>
67
+ * <CardContent>Privacy and security settings</CardContent>
68
+ * </Card>
75
69
  * </Stack>
76
70
  * ```
77
71
  *
78
- * @example Horizontal action bar
72
+ * @example Horizontal action button bar
79
73
  * ```tsx
80
- * <Stack direction="horizontal" spacing={3}>
81
- * <Button>Save Changes</Button>
82
- * <Button variant="outline">Cancel</Button>
83
- * <Button variant="ghost">Reset</Button>
74
+ * <Stack direction="horizontal" spacing={3} className="justify-end">
75
+ * <Button variant="ghost">Cancel</Button>
76
+ * <Button variant="outline">Save Draft</Button>
77
+ * <Button>Publish</Button>
84
78
  * </Stack>
85
79
  * ```
86
80
  *
87
- * @example Form sections with custom spacing
81
+ * @example Complex form layout with nested stacks
88
82
  * ```tsx
89
- * <Stack spacing={6}>
90
- * <fieldset>
91
- * <legend>Personal Information</legend>
92
- * <Stack spacing={3}>
93
- * <Input placeholder="Full Name" />
94
- * <Input placeholder="Email Address" />
95
- * </Stack>
96
- * </fieldset>
97
- * <fieldset>
98
- * <legend>Preferences</legend>
99
- * <Stack spacing={2}>
100
- * <Checkbox>Email notifications</Checkbox>
101
- * <Checkbox>Marketing updates</Checkbox>
83
+ * <form>
84
+ * <Stack spacing={6}>
85
+ * // Personal Information Section
86
+ * <fieldset>
87
+ * <legend className="text-lg font-semibold mb-4">Personal Information</legend>
88
+ * <Stack spacing={3}>
89
+ * <Stack spacing={1}>
90
+ * <Label htmlFor="fullName">Full Name</Label>
91
+ * <Input id="fullName" placeholder="Enter your full name" />
92
+ * </Stack>
93
+ * <Stack spacing={1}>
94
+ * <Label htmlFor="email">Email Address</Label>
95
+ * <Input id="email" type="email" placeholder="you@example.com" />
96
+ * </Stack>
97
+ * </Stack>
98
+ * </fieldset>
99
+ *
100
+ * // Preferences Section
101
+ * <fieldset>
102
+ * <legend className="text-lg font-semibold mb-4">Preferences</legend>
103
+ * <Stack spacing={2}>
104
+ * <div className="flex items-center space-x-2">
105
+ * <Checkbox id="emailNotifications" />
106
+ * <Label htmlFor="emailNotifications">Email notifications</Label>
107
+ * </div>
108
+ * <div className="flex items-center space-x-2">
109
+ * <Checkbox id="marketingUpdates" />
110
+ * <Label htmlFor="marketingUpdates">Marketing updates</Label>
111
+ * </div>
112
+ * </Stack>
113
+ * </fieldset>
114
+ *
115
+ * // Form Actions
116
+ * <Stack direction="horizontal" spacing={2} className="justify-end">
117
+ * <Button type="button" variant="outline">Reset</Button>
118
+ * <Button type="submit">Save Changes</Button>
102
119
  * </Stack>
103
- * </fieldset>
104
- * </Stack>
120
+ * </Stack>
121
+ * </form>
105
122
  * ```
106
123
  *
107
- * @example Responsive layout with additional styling
124
+ * @example Responsive navigation with adaptive direction
108
125
  * ```tsx
109
126
  * <Stack
110
- * spacing={4}
111
- * className="w-full max-w-md mx-auto p-6"
127
+ * direction="horizontal"
128
+ * spacing={1}
129
+ * className="flex-col sm:flex-row overflow-x-auto sm:overflow-visible"
112
130
  * >
113
- * <h2>User Dashboard</h2>
114
- * <Stack direction="horizontal" spacing={2} className="justify-between">
115
- * <Badge>Online</Badge>
116
- * <Button size="sm">Edit Profile</Button>
117
- * </Stack>
131
+ * <Button variant="ghost" className="w-full sm:w-auto">Dashboard</Button>
132
+ * <Button variant="ghost" className="w-full sm:w-auto">Analytics</Button>
133
+ * <Button variant="ghost" className="w-full sm:w-auto">Settings</Button>
134
+ * <Button variant="ghost" className="w-full sm:w-auto">Help</Button>
118
135
  * </Stack>
119
136
  * ```
120
137
  *
138
+ * @example Dashboard layout with mixed content types
139
+ * ```tsx
140
+ * <div className="container mx-auto p-6">
141
+ * <Stack spacing={8}>
142
+ * // Page Header
143
+ * <Stack spacing={2}>
144
+ * <h1 className="text-3xl font-bold">Analytics Dashboard</h1>
145
+ * <p className="text-muted-foreground">Overview of your application metrics</p>
146
+ * </Stack>
147
+ *
148
+ * // Stats Cards
149
+ * <Stack direction="horizontal" spacing={4} className="grid grid-cols-1 md:grid-cols-3 gap-4">
150
+ * <Card>
151
+ * <CardHeader>
152
+ * <CardTitle>Total Users</CardTitle>
153
+ * </CardHeader>
154
+ * <CardContent>
155
+ * <div className="text-2xl font-bold">2,543</div>
156
+ * </CardContent>
157
+ * </Card>
158
+ * <Card>
159
+ * <CardHeader>
160
+ * <CardTitle>Revenue</CardTitle>
161
+ * </CardHeader>
162
+ * <CardContent>
163
+ * <div className="text-2xl font-bold">$12,543</div>
164
+ * </CardContent>
165
+ * </Card>
166
+ * <Card>
167
+ * <CardHeader>
168
+ * <CardTitle>Growth</CardTitle>
169
+ * </CardHeader>
170
+ * <CardContent>
171
+ * <div className="text-2xl font-bold text-green-600">+12.5%</div>
172
+ * </CardContent>
173
+ * </Card>
174
+ * </Stack>
175
+ *
176
+ * // Content Sections
177
+ * <Stack spacing={6}>
178
+ * <Card>
179
+ * <CardHeader>
180
+ * <CardTitle>Recent Activity</CardTitle>
181
+ * </CardHeader>
182
+ * <CardContent>Activity timeline content</CardContent>
183
+ * </Card>
184
+ * <Card>
185
+ * <CardHeader>
186
+ * <CardTitle>Performance Metrics</CardTitle>
187
+ * </CardHeader>
188
+ * <CardContent>Charts and graphs</CardContent>
189
+ * </Card>
190
+ * </Stack>
191
+ * </Stack>
192
+ * </div>
193
+ * ```
194
+ *
195
+ * @example Advanced usage with custom styling and semantic elements
196
+ * ```tsx
197
+ * <article className="prose max-w-none">
198
+ * <Stack spacing={6}>
199
+ * <header>
200
+ * <Stack spacing={2}>
201
+ * <h1>The Future of Web Development</h1>
202
+ * <Stack direction="horizontal" spacing={4} className="text-sm text-muted-foreground">
203
+ * <time dateTime="2024-01-15">January 15, 2024</time>
204
+ * <address className="not-italic">By Jane Developer</address>
205
+ * <span>5 min read</span>
206
+ * </Stack>
207
+ * </Stack>
208
+ * </header>
209
+ *
210
+ * <main>
211
+ * <Stack spacing={4}>
212
+ * <p>Introduction paragraph with key concepts...</p>
213
+ * <section>
214
+ * <h2>Key Technologies</h2>
215
+ * <Stack spacing={3}>
216
+ * <p>Discussion of modern web technologies...</p>
217
+ * <ul>
218
+ * <li>React and component architecture</li>
219
+ * <li>Server-side rendering with Next.js</li>
220
+ * <li>Type-safe development with TypeScript</li>
221
+ * </ul>
222
+ * </Stack>
223
+ * </section>
224
+ * <section>
225
+ * <h2>Best Practices</h2>
226
+ * <p>Guidelines for effective development...</p>
227
+ * </section>
228
+ * </Stack>
229
+ * </main>
230
+ *
231
+ * <footer>
232
+ * <Stack direction="horizontal" spacing={2} className="justify-between items-center">
233
+ * <Stack direction="horizontal" spacing={1}>
234
+ * <Badge variant="secondary">React</Badge>
235
+ * <Badge variant="secondary">TypeScript</Badge>
236
+ * <Badge variant="secondary">Next.js</Badge>
237
+ * </Stack>
238
+ * <Stack direction="horizontal" spacing={2}>
239
+ * <Button variant="outline" size="sm">Share</Button>
240
+ * <Button variant="outline" size="sm">Save</Button>
241
+ * </Stack>
242
+ * </Stack>
243
+ * </footer>
244
+ * </Stack>
245
+ * </article>
246
+ * ```
247
+ *
121
248
  * @remarks
122
249
  * **Design Philosophy:**
123
- * - Follows the principle of consistent spacing throughout the UI
124
- * - Uses Tailwind's spacing scale for predictable sizing
125
- * - Composable with other layout components
126
- * - Maintains semantic HTML structure
127
- *
128
- * **Performance:**
129
- * - Lightweight wrapper around flexbox CSS
130
- * - No JavaScript overhead for layout calculations
131
- * - Leverages Tailwind's JIT compilation for minimal CSS
132
- *
133
- * **Accessibility:**
134
- * - Preserves natural document flow and reading order
135
- * - Compatible with screen readers and keyboard navigation
136
- * - Supports semantic HTML elements as children
137
- * - Does not interfere with focus management
250
+ * Stack follows the principle of consistent spacing throughout the UI, using Tailwind's
251
+ * carefully crafted spacing scale to create visual hierarchy and rhythm. The component
252
+ * prioritizes composability, allowing complex layouts to be built from simple, predictable
253
+ * building blocks while maintaining semantic HTML structure.
254
+ *
255
+ * **Technical Implementation:**
256
+ * - Uses CSS Flexbox for reliable cross-browser layout behavior
257
+ * - Leverages Tailwind's space-* utilities for optimal performance
258
+ * - Applies margins only to children (not first child) for clean edge handling
259
+ * - Compatible with Tailwind's JIT compilation for minimal bundle size
260
+ * - Supports all standard HTML div attributes for maximum flexibility
261
+ *
262
+ * **Performance Considerations:**
263
+ * - Zero JavaScript runtime overhead - pure CSS-based layout
264
+ * - Optimized for Tailwind's purging and JIT compilation
265
+ * - Efficient rendering with no layout calculation overhead
266
+ * - Scales well with large numbers of child elements
267
+ * - Memory-efficient with minimal DOM structure impact
268
+ *
269
+ * **Responsive Design Integration:**
270
+ * Stack works seamlessly with Tailwind's responsive utilities. You can easily
271
+ * create adaptive layouts that change direction, spacing, or additional styling
272
+ * based on screen size breakpoints.
273
+ *
274
+ * **Common Patterns:**
275
+ * - **Form Layouts**: Use nested stacks for sections, fields, and actions
276
+ * - **Content Hierarchies**: Vary spacing to create visual importance levels
277
+ * - **Component Composition**: Combine with Cards, Buttons, and other components
278
+ * - **Responsive Grids**: Use with CSS Grid classes for complex layouts
279
+ * - **Navigation Patterns**: Create horizontal and vertical navigation structures
280
+ *
281
+ * @accessibility
282
+ * **Keyboard Navigation:**
283
+ * - Preserves natural document flow and tab order
284
+ * - Does not interfere with focus management of child components
285
+ * - Maintains logical reading order for screen readers
286
+ * - Supports all standard keyboard navigation patterns
287
+ *
288
+ * **Screen Reader Support:**
289
+ * - Uses semantic HTML div element with no interference
290
+ * - Preserves natural content structure and hierarchy
291
+ * - Compatible with all ARIA attributes on child elements
292
+ * - Supports landmark roles when used with semantic HTML
293
+ * - Maintains proper heading structure and content relationships
294
+ *
295
+ * **ARIA Compatibility:**
296
+ * - Accepts all ARIA attributes for enhanced accessibility
297
+ * - Does not modify or interfere with child component ARIA properties
298
+ * - Supports role attributes for semantic meaning
299
+ * - Compatible with aria-label, aria-describedby, and other ARIA properties
300
+ *
301
+ * **Focus Management:**
302
+ * - Transparent to focus behavior - delegates to child components
303
+ * - Supports tabIndex for custom focus control when needed
304
+ * - Does not trap or redirect focus automatically
305
+ * - Maintains predictable focus flow in both directions
306
+ *
307
+ * @performance
308
+ * **Bundle Impact:**
309
+ * - Minimal JavaScript bundle size (primarily TypeScript types)
310
+ * - CSS-only layout solution with no runtime calculations
311
+ * - Leverages Tailwind's tree-shaking for optimal CSS output
312
+ * - No external dependencies beyond React and utility functions
313
+ *
314
+ * **Runtime Performance:**
315
+ * - Zero-cost abstraction over native flexbox
316
+ * - No re-renders triggered by prop changes (style-based)
317
+ * - Efficient DOM structure with single wrapper element
318
+ * - Compatible with React's concurrent features and optimizations
138
319
  *
139
320
  * @public
140
321
  * @since 1.0.0
322
+ * @see {@link Button} For action elements commonly used in horizontal stacks
323
+ * @see {@link Card} For content containers commonly arranged in stacks
141
324
  * @see {@link https://tailwindcss.com/docs/space} Tailwind CSS spacing utilities
325
+ * @see {@link https://tailwindcss.com/docs/flexbox-direction} Tailwind CSS flex direction
326
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout} MDN CSS Flexbox Guide
142
327
  */
143
328
  declare const Stack: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
144
- /**
145
- * The spacing between stack items using Tailwind CSS spacing scale
146
- *
147
- * Controls the gap between child elements using Tailwind's space utilities.
148
- * Each value corresponds to a Tailwind spacing unit (1 = 0.25rem, 4 = 1rem, etc.)
149
- *
150
- * @defaultValue 4
151
- * @example
152
- * ```tsx
153
- * // Tight spacing for compact layouts
154
- * <Stack spacing={2}>
155
- * <Button>Save</Button>
156
- * <Button>Cancel</Button>
157
- * </Stack>
158
- *
159
- * // Generous spacing for section separation
160
- * <Stack spacing={8}>
161
- * <section>First section</section>
162
- * <section>Second section</section>
163
- * </Stack>
164
- * ```
165
- */
166
- spacing?: 1 | 2 | 3 | 4 | 6 | 8 | 12;
167
- /**
168
- * The layout direction of the stack
169
- *
170
- * - `"vertical"` - Arranges children in a column with vertical spacing
171
- * - `"horizontal"` - Arranges children in a row with horizontal spacing
172
- *
173
- * @defaultValue "vertical"
174
- * @example
175
- * ```tsx
176
- * // Vertical stack (default)
177
- * <Stack>
178
- * <Card>Item 1</Card>
179
- * <Card>Item 2</Card>
180
- * </Stack>
181
- *
182
- * // Horizontal stack for action buttons
183
- * <Stack direction="horizontal">
184
- * <Button>Primary</Button>
185
- * <Button variant="outline">Secondary</Button>
186
- * </Stack>
187
- * ```
188
- */
189
- direction?: "vertical" | "horizontal";
329
+ spacing?: StackSpacing;
330
+ direction?: StackDirection;
190
331
  } & React.RefAttributes<HTMLDivElement>>;
191
332
  export { Stack };
192
333
  //# sourceMappingURL=stack.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../src/components/ui/stack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IAC9D;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IAErC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;CACvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuFG;AACH,QAAA,MAAM,KAAK;IAzIT;;;;;;;;;;;;;;;;;;;;;OAqBG;cACO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE;IAEpC;;;;;;;;;;;;;;;;;;;;;OAqBG;gBACS,UAAU,GAAG,YAAY;wCAwHtC,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../src/components/ui/stack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;;;;;;;;;GAWG;AACH,KAAK,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AAE/C;;;;;GAKG;AACH,KAAK,cAAc,GAAG,UAAU,GAAG,YAAY,CAAC;AAuIhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiTG;AACH,QAAA,MAAM,KAAK;cAGG,YAAY;gBACV,cAAc;wCA6B5B,CAAC;AAIH,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -1,8 +1,7 @@
1
1
  import type { StoryObj } from "@storybook/react-vite";
2
- import { AspectRatio } from "../aspect-ratio";
3
2
  declare const meta: {
4
3
  title: string;
5
- component: typeof AspectRatio;
4
+ component: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-aspect-ratio").AspectRatioProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
6
5
  parameters: {
7
6
  layout: string;
8
7
  docs: {
@@ -1 +1 @@
1
- {"version":3,"file":"aspect-ratio.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/stories/aspect-ratio.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B0B,CAAC;AAErC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAoBzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAgDtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAiFvB,CAAC"}
1
+ {"version":3,"file":"aspect-ratio.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/stories/aspect-ratio.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B0B,CAAC;AAErC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAoBzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAgDtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAiFvB,CAAC"}
@@ -1,9 +1,8 @@
1
1
  import type { StoryObj } from "@storybook/react-vite";
2
+ import { Container } from "../container";
2
3
  declare const meta: {
3
4
  title: string;
4
- component: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & {
5
- size?: "sm" | "md" | "lg" | "xl" | "full";
6
- } & import("react").RefAttributes<HTMLDivElement>>;
5
+ component: typeof Container;
7
6
  parameters: {
8
7
  layout: string;
9
8
  docs: {
@@ -1 +1 @@
1
- {"version":3,"file":"container.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/stories/container.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI5D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BwB,CAAC;AAEnC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,WAAW,EAAE,KA6BzB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KA+DtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAmHvB,CAAC"}
1
+ {"version":3,"file":"container.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/stories/container.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BwB,CAAC;AAEnC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,WAAW,EAAE,KA6BzB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KA+DtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAmHvB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { StoryObj } from "@storybook/react-vite";
2
2
  declare const meta: {
3
3
  title: string;
4
- component: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & {
4
+ component: import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
5
5
  title: string;
6
6
  description?: string;
7
7
  icon?: React.ReactNode;
@@ -9,7 +9,7 @@ declare const meta: {
9
9
  label: string;
10
10
  onClick: () => void;
11
11
  };
12
- } & import("react").RefAttributes<HTMLDivElement>>;
12
+ }, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
13
13
  parameters: {
14
14
  layout: string;
15
15
  docs: {
@@ -1,8 +1,7 @@
1
1
  import type { StoryObj } from "@storybook/react-vite";
2
- import { ScrollArea } from "../scroll-area";
3
2
  declare const meta: {
4
3
  title: string;
5
- component: typeof ScrollArea;
4
+ component: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-scroll-area").ScrollAreaProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
6
5
  parameters: {
7
6
  layout: string;
8
7
  docs: {
@@ -1 +1 @@
1
- {"version":3,"file":"scroll-area.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/stories/scroll-area.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAa,MAAM,gBAAgB,CAAC;AAEvD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;CAuByB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,WAAW,EAAE,KA8BzB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAoDtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KA8DvB,CAAC"}
1
+ {"version":3,"file":"scroll-area.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/stories/scroll-area.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;CAuByB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,WAAW,EAAE,KA8BzB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAoDtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KA8DvB,CAAC"}
@@ -3,7 +3,7 @@ declare const meta: {
3
3
  title: string;
4
4
  component: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLDivElement> & {
5
5
  spacing?: 1 | 2 | 3 | 4 | 6 | 8 | 12;
6
- direction?: "vertical" | "horizontal";
6
+ direction?: "horizontal" | "vertical";
7
7
  } & import("react").RefAttributes<HTMLDivElement>>;
8
8
  parameters: {
9
9
  layout: string;
@@ -2,7 +2,13 @@ import type { StoryObj } from "@storybook/react-vite";
2
2
  import React from "react";
3
3
  declare const meta: {
4
4
  title: string;
5
- component: React.ForwardRefExoticComponent<Omit<import("../text-field").TextFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
5
+ component: React.ForwardRefExoticComponent<Omit<{
6
+ label?: string;
7
+ helperText?: string;
8
+ error?: string;
9
+ required?: boolean;
10
+ className?: string;
11
+ } & Omit<React.ClassAttributes<HTMLInputElement> & React.InputHTMLAttributes<HTMLInputElement>, "className">, "ref"> & React.RefAttributes<HTMLInputElement>>;
6
12
  parameters: {
7
13
  layout: string;
8
14
  docs: {
@@ -1 +1 @@
1
- {"version":3,"file":"text-field.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/stories/text-field.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CwB,CAAC;AAEnC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAczB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAiFtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAiHvB,CAAC"}
1
+ {"version":3,"file":"text-field.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/stories/text-field.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CwB,CAAC;AAEnC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAczB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAiFtB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAiHvB,CAAC"}