@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,114 +1,266 @@
1
1
  import * as React from "react";
2
+ import { cva, type VariantProps } from "class-variance-authority";
3
+
2
4
  import { cn } from "@/lib/utils";
3
5
 
4
6
  /**
5
- * Props for the Container component
7
+ * Container variant configuration using class-variance-authority
8
+ *
9
+ * Defines responsive layout container with consistent horizontal centering and padding
10
+ * across different viewport sizes. Uses Tailwind CSS for responsive design patterns
11
+ * and maintains consistent spacing throughout the application.
6
12
  *
7
- * @public
13
+ * @variant sm - Optimal reading width (48rem) for articles, blog posts, and long-form content
14
+ * @variant md - Medium container (64rem) suitable for forms, documentation, and structured layouts
15
+ * @variant lg - Large container (80rem) ideal for main application content, dashboards, and data tables
16
+ * @variant xl - Extra-large container with no max-width but maintains responsive padding for specialized layouts
17
+ * @variant full - Full-width container for edge-to-edge designs, hero sections, and complex grid layouts
18
+ *
19
+ * @see {@link https://cva.style/docs} - CVA documentation
20
+ * @see {@link https://tailwindcss.com/docs/container} - Tailwind CSS container documentation
21
+ * @since 1.0.0
8
22
  */
9
- export type ContainerProps = React.HTMLAttributes<HTMLDivElement> & {
23
+ const containerVariants = cva("mx-auto w-full px-4 sm:px-6 lg:px-8", {
24
+ variants: {
25
+ size: {
26
+ sm: "max-w-3xl",
27
+ md: "max-w-5xl",
28
+ lg: "max-w-7xl",
29
+ xl: "max-w-none",
30
+ full: "max-w-full",
31
+ },
32
+ },
33
+ defaultVariants: {
34
+ size: "lg",
35
+ },
36
+ });
37
+
38
+ /**
39
+ * Props for Container (Documentation only - NOT used in component implementation)
40
+ * These types are for documentation generation and should not replace CVA inferred types
41
+ */
42
+ // eslint-disable-next-line unused-imports/no-unused-vars
43
+ type ContainerDocsProps = {
10
44
  /**
11
- * The maximum width size of the container
45
+ * Container size variant that determines the maximum width and responsive behavior
12
46
  *
13
- * - `sm`: max-w-3xl (48rem) - Optimal for reading content, articles, and blog posts
14
- * - `md`: max-w-5xl (64rem) - Suitable for forms, documentation, and medium-width layouts
15
- * - `lg`: max-w-7xl (80rem) - Default size, ideal for main application content and dashboards
16
- * - `xl`: max-w-none - No max-width constraint but maintains responsive padding
17
- * - `full`: max-w-full - Full width container for edge-to-edge designs
47
+ * Controls the container's max-width while maintaining consistent horizontal padding
48
+ * across all breakpoints. Each size is optimized for different content types and layouts.
18
49
  *
19
50
  * @default "lg"
20
51
  */
21
52
  size?: "sm" | "md" | "lg" | "xl" | "full";
22
- };
53
+ /** Content to display inside the container (text, components, or React elements) */
54
+ children?: React.ReactNode;
55
+ /** Additional CSS classes to apply to the container for custom styling */
56
+ className?: string;
57
+ /** Unique identifier for the container element */
58
+ id?: string;
59
+ /** ARIA role to define the semantic purpose of the container */
60
+ role?: string;
61
+ /** ARIA label for screen reader accessibility */
62
+ "aria-label"?: string;
63
+ /** Associates the container with elements that label it */
64
+ "aria-labelledby"?: string;
65
+ /** Associates the container with elements that describe it */
66
+ "aria-describedby"?: string;
67
+ /** Indicates if the container holds live content that should be announced to screen readers */
68
+ "aria-live"?: "off" | "polite" | "assertive";
69
+ /** Tab index for focus management @default undefined (not focusable) */
70
+ tabIndex?: number;
71
+ /** Click handler function called when the container is clicked */
72
+ onClick?: React.MouseEventHandler<HTMLDivElement>;
73
+ /** Focus handler called when the container receives focus */
74
+ onFocus?: React.FocusEventHandler<HTMLDivElement>;
75
+ /** Blur handler called when the container loses focus */
76
+ onBlur?: React.FocusEventHandler<HTMLDivElement>;
77
+ /** Key down handler for keyboard interactions */
78
+ onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
79
+ /** Mouse enter handler for hover interactions */
80
+ onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
81
+ /** Mouse leave handler for hover interactions */
82
+ onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
83
+ } & React.HTMLAttributes<HTMLDivElement>;
23
84
 
24
85
  /**
25
- * A responsive content wrapper component that provides consistent max-width constraints and horizontal padding
86
+ * Container - A responsive layout wrapper with flexible width constraints and consistent padding
87
+ *
88
+ * A fundamental layout component built with class-variance-authority (CVA) that provides consistent
89
+ * horizontal centering, responsive padding, and flexible max-width constraints. Designed to be the
90
+ * primary content wrapper for pages, sections, and layout regions throughout the application.
26
91
  *
27
- * Container is inspired by layout patterns from shadcn/ui and Tailwind UI, offering a flexible foundation
28
- * for page layouts. It automatically centers content horizontally and applies responsive padding that
29
- * adapts gracefully across different screen sizes (px-4 on mobile, px-6 on small screens, px-8 on large screens).
92
+ * The component automatically applies responsive horizontal padding (px-4 on mobile, px-6 on small
93
+ * screens, px-8 on large screens) and centers content using mx-auto. Five size variants accommodate
94
+ * different content types from optimal reading widths to full-width layouts.
30
95
  *
31
- * The component supports five size variants optimized for different content types:
32
- * - Small containers for optimal reading experiences
33
- * - Medium containers for forms and documentation
34
- * - Large containers for application dashboards
35
- * - Extra-large and full-width for specialized layouts
96
+ * Built following shadcn/ui and Tailwind UI patterns for maximum compatibility and consistency
97
+ * with modern React applications and design systems.
36
98
  *
37
- * @example Basic usage with default large size
99
+ * @example
38
100
  * ```tsx
101
+ * // Basic usage with default large size (80rem max-width)
39
102
  * <Container>
40
- * <h1>Dashboard Title</h1>
41
- * <p>Main application content with optimal width constraints</p>
103
+ * <h1>Dashboard Overview</h1>
104
+ * <p>Main application content with balanced width constraints</p>
105
+ * <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
106
+ * <Card>Dashboard Widget</Card>
107
+ * <Card>Analytics Panel</Card>
108
+ * <Card>Recent Activity</Card>
109
+ * </div>
42
110
  * </Container>
43
111
  * ```
44
112
  *
45
- * @example Reading-optimized container for articles
113
+ * @example
46
114
  * ```tsx
115
+ * // Reading-optimized container for articles and blog posts
47
116
  * <Container size="sm">
48
- * <article>
49
- * <h1>Blog Post Title</h1>
50
- * <p>Long-form content with line lengths optimized for readability</p>
117
+ * <article className="prose prose-lg max-w-none">
118
+ * <h1>The Future of Web Development</h1>
119
+ * <p>
120
+ * Long-form content with line lengths optimized for readability
121
+ * and comfortable reading experience across all device sizes.
122
+ * </p>
123
+ * <p>
124
+ * The small container (48rem) provides the ideal measure for
125
+ * typography-focused content and sustained reading.
126
+ * </p>
51
127
  * </article>
52
128
  * </Container>
53
129
  * ```
54
130
  *
55
- * @example Full-width layout for complex interfaces
131
+ * @example
56
132
  * ```tsx
133
+ * // Medium container for forms and structured layouts
134
+ * <Container size="md">
135
+ * <div className="space-y-8">
136
+ * <div className="text-center">
137
+ * <h2>Account Settings</h2>
138
+ * <p>Manage your account preferences and profile information</p>
139
+ * </div>
140
+ *
141
+ * <form className="space-y-6">
142
+ * <div className="grid grid-cols-1 md:grid-cols-2 gap-6">
143
+ * <Input label="First Name" />
144
+ * <Input label="Last Name" />
145
+ * </div>
146
+ * <Input label="Email Address" type="email" />
147
+ * <Button type="submit" className="w-full">Update Profile</Button>
148
+ * </form>
149
+ * </div>
150
+ * </Container>
151
+ * ```
152
+ *
153
+ * @example
154
+ * ```tsx
155
+ * // Full-width container for complex layouts and hero sections
57
156
  * <Container size="full">
58
- * <div className="grid grid-cols-1 md:grid-cols-3 gap-6">
59
- * <DashboardWidget />
60
- * <DashboardWidget />
61
- * <DashboardWidget />
157
+ * <div className="bg-gradient-to-r from-blue-600 to-purple-600 text-white py-20">
158
+ * <div className="text-center space-y-6">
159
+ * <h1 className="text-4xl md:text-6xl font-bold">
160
+ * Welcome to Our Platform
161
+ * </h1>
162
+ * <p className="text-xl md:text-2xl opacity-90 max-w-3xl mx-auto">
163
+ * Edge-to-edge hero section with full viewport width
164
+ * </p>
165
+ * <Button size="lg" variant="secondary">
166
+ * Get Started
167
+ * </Button>
168
+ * </div>
169
+ * </div>
170
+ * </Container>
171
+ * ```
172
+ *
173
+ * @example
174
+ * ```tsx
175
+ * // Extra-large container for data-heavy interfaces
176
+ * <Container size="xl" className="py-8">
177
+ * <div className="space-y-6">
178
+ * <div className="flex justify-between items-center">
179
+ * <h1 className="text-3xl font-bold">Analytics Dashboard</h1>
180
+ * <Button variant="outline">Export Data</Button>
181
+ * </div>
182
+ *
183
+ * // Wide data table that needs maximum available width
184
+ * <DataTable
185
+ * columns={analyticsColumns}
186
+ * data={analyticsData}
187
+ * className="min-w-[1200px]"
188
+ * />
189
+ *
190
+ * <div className="grid grid-cols-1 lg:grid-cols-4 gap-6">
191
+ * <MetricCard />
192
+ * <MetricCard />
193
+ * <MetricCard />
194
+ * <MetricCard />
195
+ * </div>
62
196
  * </div>
63
197
  * </Container>
64
198
  * ```
65
199
  *
66
- * @example Composing with other layout components
200
+ * @example
67
201
  * ```tsx
68
- * <Container size="lg" className="py-8">
69
- * <Stack spacing="lg">
70
- * <Heading size="xl">Section Title</Heading>
71
- * <Text>Section description</Text>
72
- * <Card>Content card</Card>
73
- * </Stack>
202
+ * // Advanced usage with custom styling and ARIA landmarks
203
+ * <Container
204
+ * size="lg"
205
+ * className="min-h-screen py-12 bg-gray-50 dark:bg-gray-900"
206
+ * role="main"
207
+ * aria-label="Application content"
208
+ * >
209
+ * <div className="space-y-10">
210
+ * <header className="text-center space-y-4">
211
+ * <Badge variant="secondary">New Feature</Badge>
212
+ * <h1 className="text-4xl font-bold tracking-tight">
213
+ * Product Announcement
214
+ * </h1>
215
+ * <p className="text-lg text-muted-foreground max-w-2xl mx-auto">
216
+ * Discover the latest improvements to our platform
217
+ * </p>
218
+ * </header>
219
+ *
220
+ * <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
221
+ * <FeatureCard />
222
+ * <FeatureCard />
223
+ * <FeatureCard />
224
+ * </div>
225
+ * </div>
74
226
  * </Container>
75
227
  * ```
76
228
  *
77
229
  * @accessibility
78
- * - Uses semantic HTML `div` element that works well with screen readers
230
+ * - Uses semantic HTML `div` element with proper ARIA support
231
+ * - Supports all ARIA landmark roles (main, section, article, etc.)
79
232
  * - Maintains proper focus management and keyboard navigation flow
80
- * - Responsive design ensures content remains accessible across all device sizes
233
+ * - Responsive design ensures content accessibility across all device sizes
81
234
  * - Text content automatically reflows for optimal readability
82
- * - Compatible with high contrast themes and browser zoom levels up to 200%
235
+ * - Compatible with screen readers and assistive technologies
236
+ * - Supports high contrast themes and respects user preference settings
237
+ * - Browser zoom support up to 200% with maintained usability
238
+ * - Responsive padding prevents content from touching screen edges
239
+ * - Container centering provides consistent visual balance
83
240
  *
241
+ * @variant sm - Small container (48rem max-width) for optimal reading and articles
242
+ * @variant md - Medium container (64rem max-width) for forms and documentation
243
+ * @variant lg - Large container (80rem max-width) for main app content and dashboards
244
+ * @variant xl - Extra-large container (no max-width) for data-heavy interfaces
245
+ * @variant full - Full-width container for hero sections and edge-to-edge layouts
246
+ *
247
+ * @see {@link containerVariants} CVA configuration with all styling variants
84
248
  * @see {@link https://ui.shadcn.com/docs/components/sidebar} Sidebar component for app layouts
85
249
  * @see {@link https://ui.shadcn.com/blocks} shadcn/ui blocks for complete layout examples
86
- *
87
- * @public
250
+ * @see {@link https://tailwindcss.com/docs/container} Tailwind CSS container patterns
251
+ * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/landmarks/} ARIA Landmark Patterns
88
252
  * @since 1.0.0
89
253
  */
90
- const Container = React.forwardRef<HTMLDivElement, ContainerProps>(
91
- ({ className, size = "lg", ...props }, ref) => {
92
- return (
93
- <div
94
- ref={ref}
95
- className={cn(
96
- "mx-auto w-full px-4 sm:px-6 lg:px-8",
97
- {
98
- "max-w-3xl": size === "sm",
99
- "max-w-5xl": size === "md",
100
- "max-w-7xl": size === "lg",
101
- "max-w-none": size === "xl",
102
- "max-w-full": size === "full",
103
- },
104
- className,
105
- )}
106
- {...props}
107
- />
108
- );
109
- },
110
- );
254
+ function Container({
255
+ className,
256
+ size,
257
+ ...props
258
+ }: React.ComponentProps<"div"> & VariantProps<typeof containerVariants>) {
259
+ return (
260
+ <div className={cn(containerVariants({ size, className }))} {...props} />
261
+ );
262
+ }
111
263
 
112
264
  Container.displayName = "Container";
113
265
 
114
- export { Container };
266
+ export { Container, containerVariants };