@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,16 +1,20 @@
1
1
  import * as React from "react";
2
2
  import { Drawer as DrawerPrimitive } from "vaul";
3
3
  /**
4
- * Drawer component for mobile-optimized sliding panels
4
+ * Drawer - Mobile-optimized sliding panel component
5
5
  *
6
6
  * A flexible drawer component built on Vaul that creates sliding panel interfaces
7
7
  * from screen edges. Designed primarily for mobile experiences with touch gestures,
8
8
  * swipe-to-dismiss functionality, and natural drag interactions. Supports multiple
9
- * directions (top, bottom, left, right) and responsive behavior patterns.
9
+ * directions (top, bottom, left, right) with snap points and responsive behavior.
10
+ *
11
+ * Built on Vaul library which provides excellent performance, accessibility, and
12
+ * natural touch interactions. The drawer automatically handles focus management,
13
+ * scroll locking, and ARIA attributes for screen readers.
10
14
  *
11
15
  * @example
12
16
  * ```tsx
13
- * // Basic usage with trigger and content
17
+ * // Basic drawer with trigger and content
14
18
  * <Drawer>
15
19
  * <DrawerTrigger asChild>
16
20
  * <Button>Open Settings</Button>
@@ -23,7 +27,7 @@ import { Drawer as DrawerPrimitive } from "vaul";
23
27
  * </DrawerDescription>
24
28
  * </DrawerHeader>
25
29
  * <div className="p-4">
26
- * Content goes here
30
+ * <p>Content goes here</p>
27
31
  * </div>
28
32
  * <DrawerFooter>
29
33
  * <Button>Save</Button>
@@ -52,102 +56,427 @@ import { Drawer as DrawerPrimitive } from "vaul";
52
56
  * </Drawer>
53
57
  * ```
54
58
  *
59
+ * @example
60
+ * ```tsx
61
+ * // Drawer with snap points for multiple heights
62
+ * <Drawer snapPoints={[0.4, 0.8]} fadeFromIndex={0}>
63
+ * <DrawerTrigger asChild>
64
+ * <Button>Open with Snap Points</Button>
65
+ * </DrawerTrigger>
66
+ * <DrawerContent>
67
+ * <DrawerHeader>
68
+ * <DrawerTitle>Expandable Drawer</DrawerTitle>
69
+ * <DrawerDescription>
70
+ * Drag to resize between 40% and 80% heights
71
+ * </DrawerDescription>
72
+ * </DrawerHeader>
73
+ * <div className="flex-1 p-4">
74
+ * <p>Content that can be viewed at different heights</p>
75
+ * </div>
76
+ * </DrawerContent>
77
+ * </Drawer>
78
+ * ```
79
+ *
80
+ * @example
81
+ * ```tsx
82
+ * // Side drawer from left or right
83
+ * <Drawer direction="right">
84
+ * <DrawerTrigger asChild>
85
+ * <Button>Open Side Panel</Button>
86
+ * </DrawerTrigger>
87
+ * <DrawerContent>
88
+ * <DrawerHeader>
89
+ * <DrawerTitle>Side Navigation</DrawerTitle>
90
+ * </DrawerHeader>
91
+ * <div className="flex-1 p-4">
92
+ * <nav>Navigation items here</nav>
93
+ * </div>
94
+ * </DrawerContent>
95
+ * </Drawer>
96
+ * ```
97
+ *
55
98
  * @accessibility
56
- * - Focus management with focus trap when open
57
- * - Keyboard navigation with Escape to close
99
+ * - Focus management with focus trap when drawer is open
100
+ * - Keyboard navigation with Escape key to close
58
101
  * - Screen reader announcements for state changes
59
- * - Touch gestures for swipe-to-dismiss
60
- * - Backdrop click to close
61
- * - ARIA attributes for modal behavior
62
- * - Scroll lock on background content
102
+ * - Touch gestures for intuitive swipe-to-dismiss
103
+ * - Backdrop click to close (when dismissible)
104
+ * - ARIA attributes for proper modal behavior
105
+ * - Scroll lock prevents background scrolling
106
+ * - DrawerTitle required for accessibility
107
+ * - Sequential keyboard navigation within drawer content
63
108
  *
109
+ * @see {@link https://vaul.emilkowal.ski} Vaul drawer library documentation
64
110
  * @see {@link https://ui.shadcn.com/docs/components/drawer} shadcn/ui Drawer documentation
65
- * @since 1.0.0
66
111
  * @see {@link Dialog} For modal overlays without slide animation
67
112
  * @see {@link Sheet} For desktop-optimized side panels
113
+ * @since 1.0.0
68
114
  */
115
+ declare function Drawer(props: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
69
116
  /**
70
- * Root drawer component that manages the drawer state and context
71
- *
72
- * @param props - All props from Vaul's Drawer.Root component
73
- * @param props.open - Whether the drawer is open (controlled mode)
74
- * @param props.onOpenChange - Callback when drawer open state changes
75
- * @param props.direction - Direction from which drawer slides ("bottom" | "top" | "left" | "right")
76
- * @param props.modal - Whether drawer should be modal (default: true)
77
- * @param props.dismissible - Whether drawer can be dismissed by dragging (default: true)
78
- */
79
- declare function Drawer({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
80
- /**
81
- * Trigger element that opens the drawer when activated
117
+ * DrawerTrigger - Interactive element that opens the drawer
118
+ *
119
+ * The trigger element that users interact with to open the drawer. By default
120
+ * renders as a button, but can be composed with other elements using asChild.
121
+ * Supports all standard button attributes and event handlers.
82
122
  *
83
- * @param props.asChild - Render as child element instead of button
123
+ * @example
124
+ * ```tsx
125
+ * // Default button trigger
126
+ * <DrawerTrigger>Open Drawer</DrawerTrigger>
127
+ * ```
128
+ *
129
+ * @example
130
+ * ```tsx
131
+ * // Composed with custom button component
132
+ * <DrawerTrigger asChild>
133
+ * <Button variant="outline">Open Settings</Button>
134
+ * </DrawerTrigger>
135
+ * ```
136
+ *
137
+ * @accessibility
138
+ * - Announces drawer state to screen readers
139
+ * - Receives keyboard focus
140
+ * - Activates on Space and Enter keys
141
+ *
142
+ * @see {@link https://vaul.emilkowal.ski/api} Vaul Trigger API
84
143
  */
85
- declare function DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
144
+ declare function DrawerTrigger(props: React.ComponentProps<typeof DrawerPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
86
145
  /**
87
- * Portal component for rendering drawer content outside the normal DOM tree
146
+ * DrawerPortal - Portal component for rendering drawer outside DOM hierarchy
147
+ *
148
+ * Renders the drawer content into a different part of the DOM tree, typically
149
+ * document.body, to ensure proper stacking context and avoid z-index issues.
150
+ * Automatically used by DrawerContent but can be used manually for custom layouts.
88
151
  *
89
- * @param props.container - Container element to render into (default: document.body)
152
+ * @example
153
+ * ```tsx
154
+ * // Custom portal container
155
+ * const portalContainer = document.getElementById('drawer-root')
156
+ *
157
+ * <DrawerPortal container={portalContainer}>
158
+ * <DrawerOverlay />
159
+ * <DrawerContent>
160
+ * Drawer content
161
+ * </DrawerContent>
162
+ * </DrawerPortal>
163
+ * ```
164
+ *
165
+ * @accessibility
166
+ * - Maintains proper focus management across portal boundaries
167
+ * - Preserves screen reader navigation context
168
+ *
169
+ * @see {@link https://vaul.emilkowal.ski/api} Vaul Portal API
90
170
  */
91
- declare function DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
171
+ declare function DrawerPortal(props: React.ComponentProps<typeof DrawerPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
92
172
  /**
93
- * Close trigger that dismisses the drawer when activated
173
+ * DrawerClose - Interactive element that closes the drawer
174
+ *
175
+ * Trigger element that closes the drawer when activated. Can be placed anywhere
176
+ * within the drawer content. By default renders as a button but can be composed
177
+ * with other elements using asChild. Multiple close triggers can exist within
178
+ * a single drawer.
179
+ *
180
+ * @example
181
+ * ```tsx
182
+ * // Default close button
183
+ * <DrawerClose>Close</DrawerClose>
184
+ * ```
94
185
  *
95
- * @param props.asChild - Render as child element instead of button
186
+ * @example
187
+ * ```tsx
188
+ * // Composed with custom button
189
+ * <DrawerClose asChild>
190
+ * <Button variant="ghost">Cancel</Button>
191
+ * </DrawerClose>
192
+ * ```
193
+ *
194
+ * @example
195
+ * ```tsx
196
+ * // Icon-only close button
197
+ * <DrawerClose asChild>
198
+ * <Button size="icon" variant="ghost">
199
+ * <X className="h-4 w-4" />
200
+ * </Button>
201
+ * </DrawerClose>
202
+ * ```
203
+ *
204
+ * @accessibility
205
+ * - Receives keyboard focus
206
+ * - Activates on Space and Enter keys
207
+ * - Announces close action to screen readers
208
+ *
209
+ * @see {@link https://vaul.emilkowal.ski/api} Vaul Close API
96
210
  */
97
- declare function DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
211
+ declare function DrawerClose(props: React.ComponentProps<typeof DrawerPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
98
212
  /**
99
- * Overlay backdrop that appears behind the drawer content
213
+ * DrawerOverlay - Semi-transparent backdrop behind the drawer
214
+ *
215
+ * Creates a semi-transparent overlay that covers the entire viewport behind
216
+ * the drawer content. Provides visual separation and can be clicked to close
217
+ * the drawer (when dismissible is true). Automatically fades in/out with
218
+ * smooth animations.
100
219
  *
101
- * @param props.className - Additional CSS classes to apply
220
+ * @example
221
+ * ```tsx
222
+ * // Default overlay with standard opacity
223
+ * <DrawerOverlay />
224
+ * ```
225
+ *
226
+ * @example
227
+ * ```tsx
228
+ * // Custom overlay with different opacity
229
+ * <DrawerOverlay className="bg-black/30" />
230
+ * ```
231
+ *
232
+ * @example
233
+ * ```tsx
234
+ * // Overlay with blur effect
235
+ * <DrawerOverlay className="bg-black/20 backdrop-blur-sm" />
236
+ * ```
237
+ *
238
+ * @accessibility
239
+ * - Click target for closing drawer (when dismissible)
240
+ * - Prevents interaction with background content
241
+ * - Does not interfere with screen reader navigation
242
+ *
243
+ * @see {@link https://vaul.emilkowal.ski/api} Vaul Overlay API
102
244
  */
103
245
  declare function DrawerOverlay({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
104
246
  /**
105
- * Main content container for the drawer with responsive positioning
247
+ * DrawerContent - Main container for drawer content with responsive positioning
248
+ *
249
+ * The primary content container that holds all drawer elements. Automatically
250
+ * handles portal rendering, overlay display, and responsive positioning based
251
+ * on the drawer direction. Includes a drag handle for bottom drawers and
252
+ * responsive styling for all four directions.
106
253
  *
107
- * Automatically includes overlay and portal rendering. Supports four directions:
108
- * - bottom: Slides up from bottom (default mobile pattern)
109
- * - top: Slides down from top
110
- * - left: Slides in from left edge
111
- * - right: Slides in from right edge
254
+ * Supports flexible layouts with proper spacing for headers, content areas,
255
+ * and footers. Automatically constrains height/width based on direction and
256
+ * viewport size.
112
257
  *
113
- * @param props.className - Additional CSS classes to apply
114
- * @param props.children - Content to render inside the drawer
258
+ * @example
259
+ * ```tsx
260
+ * // Basic content structure
261
+ * <DrawerContent>
262
+ * <DrawerHeader>
263
+ * <DrawerTitle>Title</DrawerTitle>
264
+ * <DrawerDescription>Description</DrawerDescription>
265
+ * </DrawerHeader>
266
+ * <div className="p-4">
267
+ * Main content area
268
+ * </div>
269
+ * <DrawerFooter>
270
+ * <Button>Action</Button>
271
+ * </DrawerFooter>
272
+ * </DrawerContent>
273
+ * ```
274
+ *
275
+ * @example
276
+ * ```tsx
277
+ * // Custom styled content
278
+ * <DrawerContent className="max-w-md mx-auto">
279
+ * <div className="flex-1 overflow-y-auto p-6">
280
+ * <h2>Custom Layout</h2>
281
+ * <p>Scrollable content area</p>
282
+ * </div>
283
+ * </DrawerContent>
284
+ * ```
285
+ *
286
+ * @accessibility
287
+ * - Focus trap keeps focus within drawer content
288
+ * - Proper ARIA modal attributes
289
+ * - Sequential keyboard navigation
290
+ * - Screen reader content announcements
291
+ *
292
+ * @see {@link https://vaul.emilkowal.ski/api} Vaul Content API
115
293
  */
116
294
  declare function DrawerContent({ className, children, ...props }: React.ComponentProps<typeof DrawerPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
117
295
  /**
118
- * Header section of the drawer containing title and description
296
+ * DrawerHeader - Header section containing title and description
119
297
  *
120
- * Automatically centers text for bottom/top drawers and left-aligns for side drawers
121
- * on larger screens. Should contain DrawerTitle and optionally DrawerDescription.
298
+ * Standardized header area for drawer content with proper spacing and responsive
299
+ * text alignment. Centers text for bottom/top drawers on mobile and left-aligns
300
+ * on larger screens. Should contain DrawerTitle and optionally DrawerDescription
301
+ * for accessibility compliance.
122
302
  *
123
- * @param props.className - Additional CSS classes to apply
303
+ * @example
304
+ * ```tsx
305
+ * // Standard header with title and description
306
+ * <DrawerHeader>
307
+ * <DrawerTitle>Settings</DrawerTitle>
308
+ * <DrawerDescription>
309
+ * Manage your account preferences and settings
310
+ * </DrawerDescription>
311
+ * </DrawerHeader>
312
+ * ```
313
+ *
314
+ * @example
315
+ * ```tsx
316
+ * // Title-only header
317
+ * <DrawerHeader>
318
+ * <DrawerTitle>Notifications</DrawerTitle>
319
+ * </DrawerHeader>
320
+ * ```
321
+ *
322
+ * @example
323
+ * ```tsx
324
+ * // Custom header with additional content
325
+ * <DrawerHeader className="border-b">
326
+ * <DrawerTitle>Profile</DrawerTitle>
327
+ * <DrawerDescription>Update your profile information</DrawerDescription>
328
+ * <div className="mt-2">
329
+ * <Badge variant="outline">Pro User</Badge>
330
+ * </div>
331
+ * </DrawerHeader>
332
+ * ```
333
+ *
334
+ * @accessibility
335
+ * - Should contain DrawerTitle for screen reader identification
336
+ * - Optional DrawerDescription provides additional context
337
+ * - Proper heading hierarchy maintained
338
+ *
339
+ * @see {@link DrawerTitle} For accessible drawer titles
340
+ * @see {@link DrawerDescription} For additional context
124
341
  */
125
- declare function DrawerHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
342
+ declare function DrawerHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
126
343
  /**
127
- * Footer section of the drawer containing action buttons
344
+ * DrawerFooter - Footer section for action buttons and controls
345
+ *
346
+ * Standardized footer area positioned at the bottom of the drawer with automatic
347
+ * top margin to push content down. Typically contains primary actions, secondary
348
+ * actions, and DrawerClose triggers. Uses flexbox column layout with consistent
349
+ * spacing between elements.
350
+ *
351
+ * @example
352
+ * ```tsx
353
+ * // Standard footer with primary and secondary actions
354
+ * <DrawerFooter>
355
+ * <Button>Save Changes</Button>
356
+ * <DrawerClose asChild>
357
+ * <Button variant="outline">Cancel</Button>
358
+ * </DrawerClose>
359
+ * </DrawerFooter>
360
+ * ```
128
361
  *
129
- * Positioned at the bottom of the drawer with automatic top margin to push
130
- * content to the bottom. Typically contains primary actions and DrawerClose.
362
+ * @example
363
+ * ```tsx
364
+ * // Footer with multiple action groups
365
+ * <DrawerFooter>
366
+ * <div className="flex gap-2">
367
+ * <Button className="flex-1">Save</Button>
368
+ * <Button variant="outline" className="flex-1">Save as Draft</Button>
369
+ * </div>
370
+ * <DrawerClose asChild>
371
+ * <Button variant="ghost" size="sm">Cancel</Button>
372
+ * </DrawerClose>
373
+ * </DrawerFooter>
374
+ * ```
375
+ *
376
+ * @example
377
+ * ```tsx
378
+ * // Footer with text and actions
379
+ * <DrawerFooter>
380
+ * <p className="text-sm text-muted-foreground text-center">
381
+ * Changes will be saved automatically
382
+ * </p>
383
+ * <DrawerClose asChild>
384
+ * <Button>Done</Button>
385
+ * </DrawerClose>
386
+ * </DrawerFooter>
387
+ * ```
131
388
  *
132
- * @param props.className - Additional CSS classes to apply
389
+ * @accessibility
390
+ * - Action buttons receive proper focus order
391
+ * - Primary actions should be visually prominent
392
+ * - Close actions clearly labeled for screen readers
393
+ *
394
+ * @see {@link DrawerClose} For close action triggers
395
+ * @see {@link Button} For consistent action button styling
133
396
  */
134
- declare function DrawerFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
397
+ declare function DrawerFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
135
398
  /**
136
- * Accessible title element for the drawer
399
+ * DrawerTitle - Accessible title element for the drawer
137
400
  *
138
- * Required for accessibility - announces the drawer purpose to screen readers.
139
- * Automatically styled with semibold font weight.
401
+ * Required accessibility element that announces the drawer's purpose to screen
402
+ * readers and provides a clear heading for the content. Should be included in
403
+ * every drawer for proper accessibility compliance. Automatically styled with
404
+ * appropriate font weight and color.
140
405
  *
141
- * @param props.className - Additional CSS classes to apply
406
+ * @example
407
+ * ```tsx
408
+ * // Standard drawer title
409
+ * <DrawerTitle>Account Settings</DrawerTitle>
410
+ * ```
411
+ *
412
+ * @example
413
+ * ```tsx
414
+ * // Custom styled title
415
+ * <DrawerTitle className="text-lg font-bold text-primary">
416
+ * Welcome Back!
417
+ * </DrawerTitle>
418
+ * ```
419
+ *
420
+ * @example
421
+ * ```tsx
422
+ * // Title with dynamic content
423
+ * <DrawerTitle>
424
+ * {isEditing ? "Edit Profile" : "View Profile"}
425
+ * </DrawerTitle>
426
+ * ```
427
+ *
428
+ * @accessibility
429
+ * - REQUIRED for screen reader accessibility
430
+ * - Announces drawer content purpose
431
+ * - Provides semantic heading structure
432
+ * - Should be descriptive and concise
433
+ * - Automatically receives proper ARIA attributes
434
+ *
435
+ * @see {@link https://vaul.emilkowal.ski/api} Vaul Title API
436
+ * @see {@link DrawerDescription} For additional context
142
437
  */
143
438
  declare function DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
144
439
  /**
145
- * Optional description element providing additional context
440
+ * DrawerDescription - Optional description providing additional context
441
+ *
442
+ * Supplementary text element that provides additional information about the
443
+ * drawer's content, purpose, or instructions. Enhances accessibility by giving
444
+ * users more context about what they'll find in the drawer. Styled with muted
445
+ * colors and smaller text to maintain visual hierarchy.
446
+ *
447
+ * @example
448
+ * ```tsx
449
+ * // Basic description
450
+ * <DrawerDescription>
451
+ * Manage your account preferences and privacy settings
452
+ * </DrawerDescription>
453
+ * ```
146
454
  *
147
- * Provides supplementary information about the drawer's content or purpose.
148
- * Styled with muted foreground color and smaller text size.
455
+ * @example
456
+ * ```tsx
457
+ * // Description with instructions
458
+ * <DrawerDescription>
459
+ * Select the options below to customize your experience.
460
+ * Changes will be saved automatically.
461
+ * </DrawerDescription>
462
+ * ```
463
+ *
464
+ * @example
465
+ * ```tsx
466
+ * // Custom styled description
467
+ * <DrawerDescription className="text-xs text-orange-600">
468
+ * Warning: These changes cannot be undone
469
+ * </DrawerDescription>
470
+ * ```
471
+ *
472
+ * @accessibility
473
+ * - Provides additional context for screen readers
474
+ * - Automatically linked to DrawerTitle via ARIA
475
+ * - Should be concise and informative
476
+ * - Enhances understanding of drawer purpose
149
477
  *
150
- * @param props.className - Additional CSS classes to apply
478
+ * @see {@link https://vaul.emilkowal.ski/api} Vaul Description API
479
+ * @see {@link DrawerTitle} For primary drawer identification
151
480
  */
152
481
  declare function DrawerDescription({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
153
482
  export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../src/components/ui/drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,M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