@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
@@ -5,283 +5,601 @@ import { type VariantProps } from "class-variance-authority";
5
5
  *
6
6
  * Defines all possible typography variants, sizes, and styling options.
7
7
  * Uses Tailwind CSS 4 with custom CSS properties for theming.
8
+ * Provides consistent text styling across the entire application.
8
9
  *
9
- * @see {@link https://cva.style/docs} - CVA documentation
10
- * @see {@link https://ui.shadcn.com/docs/components/typography} - Typography component inspiration
10
+ * @variant heading - Primary headings for page/section titles (text-lg, font-semibold, leading-tight)
11
+ * @variant subheading - Secondary headings for subsections (text-base, font-medium, leading-relaxed)
12
+ * @variant body - Standard body text for readable content (text-sm, leading-relaxed)
13
+ * @variant bodyEmphasized - Emphasized body text with medium weight for important information (text-sm, font-medium)
14
+ * @variant details - Smaller text for details, captions, and descriptions (text-xs, leading-normal)
15
+ * @variant field - Text for form fields, labels, and input elements (text-base, leading-normal)
16
+ * @variant code - Monospace text for code snippets and technical content (text-base, font-mono)
17
+ * @variant microcopy - Very small text for fine print, timestamps, and metadata (text-microcopy, leading-tight)
18
+ * @variant tableCell - Text optimized for table cell content with proper line height (text-base, leading-normal)
19
+ * @variant tableHeader - Text for table headers with medium weight for emphasis (text-base, font-medium)
20
+ *
21
+ * @see {@link https://cva.style/docs} CVA documentation for variant patterns
22
+ * @see {@link https://ui.shadcn.com/docs/components/typography} Typography component inspiration
11
23
  * @since 1.0.0
12
24
  */
13
25
  declare const typographyVariants: (props?: ({
14
- variant?: "body" | "code" | "details" | "heading" | "subheading" | "bodyEmphasized" | "field" | "microcopy" | "tableCell" | "tableHeader" | null | undefined;
26
+ variant?: "heading" | "body" | "code" | "details" | "subheading" | "bodyEmphasized" | "field" | "microcopy" | "tableCell" | "tableHeader" | null | undefined;
15
27
  color?: "accent" | "default" | "destructive" | "muted" | "success" | "warning" | null | undefined;
16
28
  align?: "left" | "right" | "center" | "justify" | null | undefined;
17
29
  transform?: "capitalize" | "lowercase" | "uppercase" | null | undefined;
18
30
  weight?: "bold" | "normal" | "medium" | "semibold" | null | undefined;
19
31
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
20
32
  /**
21
- * Props interface for the Typography component
33
+ * Base props for all Typography components
22
34
  */
23
- export interface TypographyProps extends Omit<React.HTMLAttributes<HTMLElement>, "color">, VariantProps<typeof typographyVariants> {
24
- /**
25
- * The HTML element or component to render as
26
- * @default "p"
27
- */
35
+ type TypographyBaseProps = {
36
+ /** Typography variant that determines text size, weight, and line height */
37
+ variant?: VariantProps<typeof typographyVariants>["variant"];
38
+ /** Color variant for semantic meaning and visual hierarchy */
39
+ color?: VariantProps<typeof typographyVariants>["color"];
40
+ /** Text alignment within the container */
41
+ align?: VariantProps<typeof typographyVariants>["align"];
42
+ /** Text transformation for stylistic effects */
43
+ transform?: VariantProps<typeof typographyVariants>["transform"];
44
+ /** Font weight override for visual emphasis */
45
+ weight?: VariantProps<typeof typographyVariants>["weight"];
46
+ /** The HTML element or component to render as @default "p" */
28
47
  as?: React.ElementType;
29
- /**
30
- * For label elements, the associated input ID
31
- */
48
+ /** For label elements, the associated input ID for accessibility */
32
49
  htmlFor?: string;
33
- /**
34
- * Whether to render as a Slot component for composition
35
- * @default false
36
- */
50
+ /** Whether to render as a Slot component for composition patterns @default false */
37
51
  asChild?: boolean;
38
- /**
39
- * Whether the text should be italic
40
- * @default false
41
- */
52
+ /** Whether the text should be rendered in italic style @default false */
42
53
  italic?: boolean;
43
- /**
44
- * Whether the text should be underlined
45
- * @default false
46
- */
54
+ /** Whether the text should have underline decoration @default false */
47
55
  underline?: boolean;
48
- /**
49
- * Whether the text should be struck through
50
- * @default false
51
- */
56
+ /** Whether the text should have strikethrough decoration @default false */
52
57
  strikethrough?: boolean;
53
- /**
54
- * Whether the text should have a truncated overflow with ellipsis
55
- * @default false
56
- */
58
+ /** Whether text should be truncated with ellipsis on overflow @default false */
57
59
  truncate?: boolean;
58
- /**
59
- * Screen reader only text (visually hidden but accessible)
60
- * @default false
61
- */
60
+ /** Hide visually but keep accessible to screen readers @default false */
62
61
  srOnly?: boolean;
63
- }
62
+ /** Additional CSS classes for custom styling */
63
+ className?: string;
64
+ /** Content to render within the typography element */
65
+ children?: React.ReactNode;
66
+ };
67
+ /**
68
+ * Complete props for the Typography component
69
+ */
70
+ type TypographyProps = TypographyBaseProps & Omit<React.HTMLAttributes<HTMLElement>, keyof TypographyBaseProps>;
64
71
  /**
65
- * Typography component for consistent text styling across the application
72
+ * Typography - Comprehensive text styling component for consistent design system implementation
66
73
  *
67
- * Provides a comprehensive set of typography variants based on design system
68
- * specifications. Supports semantic HTML elements, accessibility features,
69
- * and flexible styling options.
74
+ * A flexible typography component that provides semantic text variants, color options, and accessibility features.
75
+ * Built with class-variance-authority (CVA) for type-safe variant management and supports both semantic HTML
76
+ * elements and composition patterns via Radix UI Slot. Designed to handle all text styling needs across
77
+ * the application with consistent visual hierarchy and accessibility compliance.
70
78
  *
71
- * @component
72
79
  * @example
73
80
  * ```tsx
74
- * // Basic heading
81
+ * // Basic heading with semantic HTML
75
82
  * <Typography variant="heading" as="h1">
76
83
  * Welcome to Neynar
77
84
  * </Typography>
78
85
  *
79
- * // Body text with color
86
+ * // Body text with color variant
80
87
  * <Typography variant="body" color="muted">
81
- * This is some body text with muted color.
88
+ * This is secondary body text with reduced visual prominence.
82
89
  * </Typography>
83
90
  *
84
- * // Code snippet
91
+ * // Code snippet with proper semantics
85
92
  * <Typography variant="code" as="code">
86
93
  * const message = "Hello, world!";
87
94
  * </Typography>
88
- *
89
- * // Table header
90
- * <Typography variant="tableHeader" as="th">
91
- * Column Header
92
- * </Typography>
93
95
  * ```
94
96
  *
95
97
  * @example
96
98
  * ```tsx
97
- * // With additional styling
99
+ * // Advanced styling with multiple variants
98
100
  * <Typography
99
101
  * variant="subheading"
100
102
  * color="accent"
101
103
  * align="center"
104
+ * weight="semibold"
102
105
  * italic
103
106
  * underline
107
+ * className="mb-4"
104
108
  * >
105
- * Styled Subheading
109
+ * Styled Subheading with Multiple Variants
106
110
  * </Typography>
107
111
  *
108
- * // Truncated text
112
+ * // Truncated text for constrained layouts
109
113
  * <Typography variant="body" truncate className="max-w-xs">
110
- * This is a very long text that will be truncated with ellipsis
114
+ * This is a very long text that will be truncated with ellipsis when it exceeds the container width
111
115
  * </Typography>
116
+ * ```
112
117
  *
113
- * // Screen reader only
118
+ * @example
119
+ * ```tsx
120
+ * // Accessibility features
114
121
  * <Typography variant="details" srOnly>
115
- * Additional context for screen readers
122
+ * Additional context for screen readers only
116
123
  * </Typography>
117
- * ```
118
124
  *
119
- * @param props - Typography component props
120
- * @param props.variant - Typography variant for semantic styling
121
- * @param props.color - Color variant for different semantic meanings
122
- * @param props.align - Text alignment
123
- * @param props.transform - Text transformation
124
- * @param props.weight - Font weight override
125
- * @param props.as - HTML element to render as
126
- * @param props.asChild - Render as Slot for composition
127
- * @param props.italic - Apply italic styling
128
- * @param props.underline - Apply underline styling
129
- * @param props.strikethrough - Apply strikethrough styling
130
- * @param props.truncate - Apply text truncation with ellipsis
131
- * @param props.srOnly - Hide visually but keep accessible
132
- * @param props.className - Additional CSS classes
133
- * @param props.children - Content to render
125
+ * // Form label with proper association
126
+ * <Typography variant="field" as="label" htmlFor="email-input">
127
+ * Email Address
128
+ * </Typography>
129
+ *
130
+ * // Composition with asChild for complex structures
131
+ * <Typography variant="body" asChild>
132
+ * <a href="/about" className="hover:underline">
133
+ * Learn more about our platform
134
+ * </a>
135
+ * </Typography>
136
+ * ```
134
137
  *
135
138
  * @accessibility
136
- * - Uses semantic HTML elements when specified via `as` prop
137
- * - Supports screen reader only content with `srOnly` prop
138
- * - Maintains proper color contrast ratios across all color variants
139
- * - Respects user preferences for reduced motion and high contrast
139
+ * - **Semantic HTML**: Uses appropriate HTML elements via `as` prop for proper document structure
140
+ * - **Screen Reader Support**: `srOnly` prop provides content accessible only to assistive technologies
141
+ * - **Color Contrast**: All color variants meet WCAG 2.1 AA contrast requirements (4.5:1 minimum)
142
+ * - **Label Association**: `htmlFor` prop properly associates labels with form controls
143
+ * - **Focus Management**: Interactive elements receive proper focus indicators
144
+ * - **Text Scaling**: All font sizes scale appropriately with user's browser text size preferences
145
+ * - **High Contrast Mode**: Respects system high contrast mode preferences
146
+ *
147
+ * @performance
148
+ * - Uses CVA for efficient class generation and tree-shaking
149
+ * - Minimal runtime overhead with compile-time optimizations
150
+ * - Cached class combinations for repeated variant usage
140
151
  *
152
+ * @see {@link H1} Semantic H1 heading component
153
+ * @see {@link H2} Semantic H2 heading component
154
+ * @see {@link P} Semantic paragraph component
155
+ * @see {@link Code} Semantic code element component
156
+ * @see {@link https://cva.style/docs} Class Variance Authority documentation
157
+ * @see {@link https://ui.shadcn.com/docs/components/typography} shadcn/ui Typography reference
141
158
  * @since 1.0.0
142
159
  */
143
- export declare function Typography({ className, variant, color, align, transform, weight, as: Element, asChild, italic, underline, strikethrough, truncate, srOnly, ...props }: TypographyProps): import("react/jsx-runtime").JSX.Element;
160
+ declare function Typography({ className, variant, color, align, transform, weight, as: Element, asChild, italic, underline, strikethrough, truncate, srOnly, ...props }: TypographyProps): import("react/jsx-runtime").JSX.Element;
161
+ /** Props for H1 heading component */
162
+ type H1Props = Omit<TypographyProps, "as" | "variant">;
144
163
  /**
145
- * Individual semantic typography components with pre-configured defaults
146
- */
147
- /**
148
- * H1 heading component
164
+ * H1 - Primary page heading component
165
+ *
166
+ * The main heading for a page or major section. Uses the "heading" variant with h1 semantic element.
167
+ * Should be used once per page for proper document outline and SEO.
149
168
  *
150
169
  * @example
151
170
  * ```tsx
152
- * <H1>Main Page Title</H1>
153
- * <H1 color="muted">Subtle heading</H1>
171
+ * // Page title
172
+ * <H1>Welcome to Neynar Platform</H1>
173
+ *
174
+ * // With color variant
175
+ * <H1 color="muted">Draft: Article Title</H1>
176
+ *
177
+ * // With custom styling
178
+ * <H1 align="center" className="mb-8">
179
+ * Centered Page Heading
180
+ * </H1>
154
181
  * ```
182
+ *
183
+ * @accessibility
184
+ * - Creates proper document outline structure
185
+ * - Should be the first heading on the page
186
+ * - Provides main page topic for screen readers
187
+ * - Helps with keyboard navigation landmarks
188
+ *
189
+ * @see {@link H2} Secondary heading component
190
+ * @see {@link Typography} Base typography component
155
191
  */
156
- export declare function H1(props: Omit<TypographyProps, "as" | "variant">): import("react/jsx-runtime").JSX.Element;
192
+ declare function H1(props: H1Props): import("react/jsx-runtime").JSX.Element;
193
+ /** Props for H2 heading component */
194
+ type H2Props = Omit<TypographyProps, "as" | "variant">;
157
195
  /**
158
- * H2 heading component
196
+ * H2 - Secondary section heading component
197
+ *
198
+ * Section headings that divide page content into logical groups. Uses the "subheading" variant
199
+ * with h2 semantic element. Essential for creating proper document hierarchy.
159
200
  *
160
201
  * @example
161
202
  * ```tsx
162
- * <H2>Section Title</H2>
163
- * <H2 color="accent">Highlighted section</H2>
203
+ * // Section heading
204
+ * <H2>Getting Started</H2>
205
+ *
206
+ * // With accent color
207
+ * <H2 color="accent">Featured Content</H2>
208
+ *
209
+ * // With additional styling
210
+ * <H2 weight="bold" className="border-b pb-2">
211
+ * Section with Border
212
+ * </H2>
164
213
  * ```
214
+ *
215
+ * @accessibility
216
+ * - Maintains document outline hierarchy
217
+ * - Should follow H1 and precede H3 elements
218
+ * - Provides section navigation for screen readers
219
+ * - Essential for skip navigation functionality
220
+ *
221
+ * @see {@link H1} Primary heading component
222
+ * @see {@link H3} Tertiary heading component
165
223
  */
166
- export declare function H2(props: Omit<TypographyProps, "as" | "variant">): import("react/jsx-runtime").JSX.Element;
224
+ declare function H2(props: H2Props): import("react/jsx-runtime").JSX.Element;
225
+ /** Props for H3 heading component */
226
+ type H3Props = Omit<TypographyProps, "as" | "variant">;
167
227
  /**
168
- * H3 heading component
228
+ * H3 - Tertiary subsection heading component
229
+ *
230
+ * Subsection headings for further content division. Uses the "subheading" variant
231
+ * with h3 semantic element for consistent visual hierarchy.
169
232
  *
170
233
  * @example
171
234
  * ```tsx
172
- * <H3>Subsection Title</H3>
235
+ * // Subsection heading
236
+ * <H3>Installation Guide</H3>
237
+ *
238
+ * // In a card or content block
239
+ * <H3 color="muted" className="mb-3">
240
+ * Optional Configuration
241
+ * </H3>
173
242
  * ```
243
+ *
244
+ * @accessibility
245
+ * - Should follow H2 elements in document flow
246
+ * - Helps create detailed content structure
247
+ * - Improves navigation with assistive technologies
248
+ * - Supports table of contents generation
174
249
  */
175
- export declare function H3(props: Omit<TypographyProps, "as" | "variant">): import("react/jsx-runtime").JSX.Element;
250
+ declare function H3(props: H3Props): import("react/jsx-runtime").JSX.Element;
251
+ /** Props for H4 heading component */
252
+ type H4Props = Omit<TypographyProps, "as" | "variant">;
176
253
  /**
177
- * H4 heading component
254
+ * H4 - Minor heading component for detailed sections
255
+ *
256
+ * Minor headings for detailed content organization. Uses "bodyEmphasized" variant
257
+ * with h4 semantic element for subtle but distinct hierarchy.
178
258
  *
179
259
  * @example
180
260
  * ```tsx
181
- * <H4>Minor Heading</H4>
261
+ * // Minor section heading
262
+ * <H4>Configuration Options</H4>
263
+ *
264
+ * // In detailed documentation
265
+ * <H4 color="muted">Advanced Settings</H4>
182
266
  * ```
267
+ *
268
+ * @accessibility
269
+ * - Maintains proper heading hierarchy flow
270
+ * - Provides fine-grained content organization
271
+ * - Supports screen reader document navigation
183
272
  */
184
- export declare function H4(props: Omit<TypographyProps, "as" | "variant">): import("react/jsx-runtime").JSX.Element;
273
+ declare function H4(props: H4Props): import("react/jsx-runtime").JSX.Element;
274
+ /** Props for H5 heading component */
275
+ type H5Props = Omit<TypographyProps, "as" | "variant">;
185
276
  /**
186
- * H5 heading component
277
+ * H5 - Small heading component for micro-sections
278
+ *
279
+ * Small headings for very specific content divisions. Uses "bodyEmphasized" variant
280
+ * with h5 semantic element.
187
281
  *
188
282
  * @example
189
283
  * ```tsx
190
- * <H5>Small Heading</H5>
284
+ * // Small section heading
285
+ * <H5>Error Codes</H5>
286
+ *
287
+ * // In lists or detailed breakdowns
288
+ * <H5 weight="semibold">Step 1: Setup</H5>
191
289
  * ```
192
290
  */
193
- export declare function H5(props: Omit<TypographyProps, "as" | "variant">): import("react/jsx-runtime").JSX.Element;
291
+ declare function H5(props: H5Props): import("react/jsx-runtime").JSX.Element;
292
+ /** Props for H6 heading component */
293
+ type H6Props = Omit<TypographyProps, "as" | "variant">;
194
294
  /**
195
- * H6 heading component
295
+ * H6 - Smallest heading component for minimal emphasis
296
+ *
297
+ * The smallest semantic heading level. Uses "details" variant with h6 element
298
+ * for minimal but semantic emphasis.
196
299
  *
197
300
  * @example
198
301
  * ```tsx
199
- * <H6>Smallest Heading</H6>
302
+ * // Smallest heading
303
+ * <H6>Notes and Disclaimers</H6>
304
+ *
305
+ * // In deeply nested content
306
+ * <H6 color="muted">Technical Details</H6>
200
307
  * ```
201
308
  */
202
- export declare function H6(props: Omit<TypographyProps, "as" | "variant">): import("react/jsx-runtime").JSX.Element;
309
+ declare function H6(props: H6Props): import("react/jsx-runtime").JSX.Element;
310
+ /** Props for P paragraph component */
311
+ type PProps = Omit<TypographyProps, "as" | "variant">;
203
312
  /**
204
- * Paragraph component for body text
313
+ * P - Paragraph component for body text content
314
+ *
315
+ * Standard paragraph element for readable body text. Uses "body" variant with p semantic element.
316
+ * Optimized for readability with appropriate line height and font size.
205
317
  *
206
318
  * @example
207
319
  * ```tsx
208
- * <P>Standard paragraph text content.</P>
209
- * <P color="muted">Secondary paragraph text.</P>
210
- * <P className="mb-4">Paragraph with custom margin.</P>
320
+ * // Standard paragraph
321
+ * <P>This is standard body text that provides information to the user.</P>
322
+ *
323
+ * // With color variants
324
+ * <P color="muted">Secondary information with reduced visual prominence.</P>
325
+ *
326
+ * // With custom spacing
327
+ * <P className="mb-6">Paragraph with custom bottom margin for layout control.</P>
328
+ *
329
+ * // Truncated paragraph
330
+ * <P truncate className="max-w-md">
331
+ * Long paragraph content that will be truncated with ellipsis
332
+ * </P>
211
333
  * ```
334
+ *
335
+ * @accessibility
336
+ * - Provides proper semantic structure for body content
337
+ * - Maintains readable line height for accessibility
338
+ * - Supports screen reader text flow and navigation
339
+ *
340
+ * @see {@link Typography} Base typography component
212
341
  */
213
- export declare function P(props: Omit<TypographyProps, "as" | "variant">): import("react/jsx-runtime").JSX.Element;
342
+ declare function P(props: PProps): import("react/jsx-runtime").JSX.Element;
343
+ /** Props for Span inline component */
344
+ type SpanProps = Omit<TypographyProps, "as">;
214
345
  /**
215
- * Span component for inline text
346
+ * Span - Inline text component for text fragments and styling
347
+ *
348
+ * Generic inline element for styling text fragments within other content.
349
+ * Supports all typography variants while maintaining inline display behavior.
216
350
  *
217
351
  * @example
218
352
  * ```tsx
219
- * <span>Regular text with <Span color="accent">highlighted</Span> content</span>
220
- * <Span variant="details">Small inline text</Span>
353
+ * // Inline text styling
354
+ * <p>
355
+ * Regular text with <Span color="accent" weight="semibold">highlighted</Span> content
356
+ * </p>
357
+ *
358
+ * // Small inline details
359
+ * <Span variant="details" color="muted">
360
+ * Updated 5 minutes ago
361
+ * </Span>
362
+ *
363
+ * // Inline code reference
364
+ * <Span variant="code" className="bg-muted px-1 rounded">
365
+ * onClick
366
+ * </Span>
221
367
  * ```
368
+ *
369
+ * @accessibility
370
+ * - Maintains inline text flow for screen readers
371
+ * - Preserves semantic meaning within larger text blocks
372
+ * - Does not interrupt document structure or navigation
222
373
  */
223
- export declare function Span(props: Omit<TypographyProps, "as">): import("react/jsx-runtime").JSX.Element;
374
+ declare function Span(props: SpanProps): import("react/jsx-runtime").JSX.Element;
375
+ /** Props for Code component */
376
+ type CodeProps = Omit<TypographyProps, "as" | "variant">;
224
377
  /**
225
- * Code component for inline code snippets
378
+ * Code - Inline code component for technical content
379
+ *
380
+ * Semantic code element for inline code snippets, variable names, and technical references.
381
+ * Uses monospace font and "code" variant for clear distinction from regular text.
226
382
  *
227
383
  * @example
228
384
  * ```tsx
229
- * <Code>const hello = "world";</Code>
230
- * <Code color="muted">npm install</Code>
385
+ * // Inline code snippet
386
+ * <Code>const message = "Hello, world!";</Code>
387
+ *
388
+ * // Terminal command
389
+ * <Code color="muted">npm install @neynar/react</Code>
390
+ *
391
+ * // Variable reference
392
+ * <p>Set the <Code>API_KEY</Code> environment variable.</p>
393
+ *
394
+ * // With background styling
395
+ * <Code className="bg-muted px-2 py-1 rounded">
396
+ * function handleClick()
397
+ * </Code>
231
398
  * ```
399
+ *
400
+ * @accessibility
401
+ * - Uses semantic code element for proper meaning
402
+ * - Monospace font aids in code readability
403
+ * - Screen readers understand this as technical content
404
+ * - Maintains proper inline behavior within text
405
+ *
406
+ * @see {@link Typography} Base typography component for multi-line code blocks
232
407
  */
233
- export declare function Code(props: Omit<TypographyProps, "as" | "variant">): import("react/jsx-runtime").JSX.Element;
408
+ declare function Code(props: CodeProps): import("react/jsx-runtime").JSX.Element;
409
+ /** Props for Small component */
410
+ type SmallProps = Omit<TypographyProps, "as" | "variant">;
234
411
  /**
235
- * Small component for fine print and microcopy
412
+ * Small - Fine print component for supplementary information
413
+ *
414
+ * Semantic small element for fine print, disclaimers, timestamps, and supplementary information.
415
+ * Uses "microcopy" variant for reduced visual prominence while maintaining readability.
236
416
  *
237
417
  * @example
238
418
  * ```tsx
239
- * <Small>Terms and conditions apply</Small>
240
- * <Small color="muted">Updated 2 minutes ago</Small>
419
+ * // Legal disclaimer
420
+ * <Small>Terms and conditions apply. See details for more information.</Small>
421
+ *
422
+ * // Timestamp or metadata
423
+ * <Small color="muted">Last updated 2 minutes ago</Small>
424
+ *
425
+ * // Copyright notice
426
+ * <Small className="text-center">
427
+ * © 2024 Neynar. All rights reserved.
428
+ * </Small>
429
+ *
430
+ * // Form help text
431
+ * <Small color="muted">Password must be at least 8 characters long.</Small>
241
432
  * ```
433
+ *
434
+ * @accessibility
435
+ * - Uses semantic small element for proper meaning
436
+ * - Indicates fine print or less important information
437
+ * - Maintains sufficient contrast for readability
438
+ * - Works well with form help text and descriptions
242
439
  */
243
- export declare function Small(props: Omit<TypographyProps, "as" | "variant">): import("react/jsx-runtime").JSX.Element;
440
+ declare function Small(props: SmallProps): import("react/jsx-runtime").JSX.Element;
441
+ /** Props for Strong component */
442
+ type StrongProps = Omit<TypographyProps, "as" | "variant">;
244
443
  /**
245
- * Strong component for emphasized text
444
+ * Strong - Emphasized text component for important content
445
+ *
446
+ * Semantic strong element for text that needs strong emphasis or importance.
447
+ * Uses "bodyEmphasized" variant with strong semantic meaning.
246
448
  *
247
449
  * @example
248
450
  * ```tsx
249
- * <Strong>Important information</Strong>
250
- * <Strong color="destructive">Critical warning</Strong>
451
+ * // Important information
452
+ * <Strong>Important: This action cannot be undone.</Strong>
453
+ *
454
+ * // Critical warning
455
+ * <Strong color="destructive">Error: Invalid credentials provided.</Strong>
456
+ *
457
+ * // In body text
458
+ * <p>
459
+ * Make sure to <Strong>save your changes</Strong> before leaving the page.
460
+ * </p>
461
+ *
462
+ * // Success message
463
+ * <Strong color="success">Account created successfully!</Strong>
251
464
  * ```
465
+ *
466
+ * @accessibility
467
+ * - Uses semantic strong element for emphasis
468
+ * - Screen readers understand this as important content
469
+ * - Provides semantic meaning beyond visual styling
470
+ * - Maintains proper emphasis hierarchy in content
252
471
  */
253
- export declare function Strong(props: Omit<TypographyProps, "as" | "variant">): import("react/jsx-runtime").JSX.Element;
472
+ declare function Strong(props: StrongProps): import("react/jsx-runtime").JSX.Element;
473
+ /** Props for Lead component */
474
+ type LeadProps = Omit<TypographyProps, "as" | "variant" | "color"> & {
475
+ /** Color override for lead text @default "muted" */
476
+ color?: TypographyProps["color"];
477
+ };
254
478
  /**
255
- * Lead component for introductory text
479
+ * Lead - Introductory paragraph component for article openings
480
+ *
481
+ * Lead paragraph for article introductions, page descriptions, and summary content.
482
+ * Uses "subheading" variant with muted color for visual hierarchy.
256
483
  *
257
484
  * @example
258
485
  * ```tsx
259
- * <Lead>This is the introduction to the article...</Lead>
486
+ * // Article introduction
487
+ * <Lead>
488
+ * This comprehensive guide covers everything you need to know about
489
+ * building modern web applications with React and TypeScript.
490
+ * </Lead>
491
+ *
492
+ * // Page description
493
+ * <Lead className="mb-8">
494
+ * Discover powerful APIs and tools to build the next generation
495
+ * of social applications on Farcaster.
496
+ * </Lead>
497
+ *
498
+ * // With custom color
499
+ * <Lead color="default">
500
+ * This lead paragraph uses the default text color for more prominence.
501
+ * </Lead>
260
502
  * ```
503
+ *
504
+ * @accessibility
505
+ * - Provides clear content hierarchy for screen readers
506
+ * - Larger text size improves readability for introductory content
507
+ * - Maintains proper document flow and structure
261
508
  */
262
- export declare function Lead(props: Omit<TypographyProps, "as" | "variant">): import("react/jsx-runtime").JSX.Element;
509
+ declare function Lead({ color, ...props }: LeadProps): import("react/jsx-runtime").JSX.Element;
510
+ /** Props for A anchor component */
511
+ type AProps = Omit<TypographyProps, "as" | "variant"> & {
512
+ /** Link destination URL */
513
+ href?: string;
514
+ } & React.AnchorHTMLAttributes<HTMLAnchorElement>;
263
515
  /**
264
- * Anchor/Link component for interactive text links
516
+ * A - Anchor component for interactive text links
517
+ *
518
+ * Semantic anchor element for links with built-in hover states and accessibility features.
519
+ * Uses "body" variant with underline and smooth color transitions.
265
520
  *
266
521
  * @example
267
522
  * ```tsx
268
- * <A href="https://example.com">Visit our website</A>
269
- * <A href="/about" color="accent">Learn more</A>
270
- * <A asChild><Link href="/about">Learn more</Link></A>
523
+ * // External link
524
+ * <A href="https://neynar.com" target="_blank" rel="noopener noreferrer">
525
+ * Visit Neynar Website
526
+ * </A>
527
+ *
528
+ * // Internal navigation
529
+ * <A href="/dashboard" color="accent">
530
+ * Go to Dashboard
531
+ * </A>
532
+ *
533
+ * // Composition with Next.js Link
534
+ * <A asChild>
535
+ * <Link href="/about">
536
+ * Learn More About Us
537
+ * </Link>
538
+ * </A>
539
+ *
540
+ * // In paragraph text
541
+ * <P>
542
+ * For more information, <A href="/docs">check our documentation</A> or
543
+ * contact support.
544
+ * </P>
271
545
  * ```
546
+ *
547
+ * @accessibility
548
+ * - Uses semantic anchor element for proper link behavior
549
+ * - Includes hover and focus states for interaction feedback
550
+ * - Supports keyboard navigation (Enter key activation)
551
+ * - Maintains color contrast requirements for links
552
+ * - Works with screen reader link navigation modes
553
+ * - Supports external link indicators when needed
554
+ *
555
+ * @see {@link Typography} Base typography component with asChild
272
556
  */
273
- export declare function A({ href, asChild, className, ...props }: Omit<TypographyProps, "as" | "variant"> & React.AnchorHTMLAttributes<HTMLAnchorElement>): import("react/jsx-runtime").JSX.Element;
557
+ declare function A({ href, asChild, className, ...props }: AProps): import("react/jsx-runtime").JSX.Element;
558
+ /** Props for Blockquote component */
559
+ type BlockquoteProps = Omit<TypographyProps, "as" | "variant">;
274
560
  /**
275
- * Blockquote component for quoted text
561
+ * Blockquote - Quoted text component for citations and excerpts
562
+ *
563
+ * Semantic blockquote element for extended quotations, testimonials, and excerpts.
564
+ * Features italic styling and left border for visual distinction.
276
565
  *
277
566
  * @example
278
567
  * ```tsx
279
- * <Blockquote>"The best way to predict the future is to invent it."</Blockquote>
568
+ * // Simple quote
569
+ * <Blockquote>
570
+ * "The best way to predict the future is to invent it."
571
+ * </Blockquote>
572
+ *
573
+ * // With attribution
574
+ * <div>
575
+ * <Blockquote className="mb-2">
576
+ * "Building great products requires deep understanding of user needs
577
+ * and technical excellence in equal measure."
578
+ * </Blockquote>
579
+ * <Small>— Product Engineering Team</Small>
580
+ * </div>
581
+ *
582
+ * // Customer testimonial
583
+ * <Blockquote color="muted" className="bg-muted/50 p-4 rounded-lg">
584
+ * "Neynar's APIs have transformed how we build social features.
585
+ * The developer experience is exceptional."
586
+ * </Blockquote>
280
587
  * ```
588
+ *
589
+ * @accessibility
590
+ * - Uses semantic blockquote element for proper quotation meaning
591
+ * - Screen readers understand this as quoted content
592
+ * - Maintains proper text flow and readability
593
+ * - Supports citation attribution when paired with cite element
594
+ *
595
+ * @see {@link Small} For attribution text
596
+ * @see {@link Typography} Base typography component
281
597
  */
282
- export declare function Blockquote(props: Omit<TypographyProps, "as" | "variant">): import("react/jsx-runtime").JSX.Element;
598
+ declare function Blockquote({ className, ...props }: BlockquoteProps): import("react/jsx-runtime").JSX.Element;
599
+ export { Typography, H1, H2, H3, H4, H5, H6, P, Span, Code, Small, Strong, Lead, A, Blockquote, };
600
+ export type { TypographyProps, H1Props, H2Props, H3Props, H4Props, H5Props, H6Props, PProps, SpanProps, CodeProps, SmallProps, StrongProps, LeadProps, AProps, BlockquoteProps, };
283
601
  /**
284
- * Type export for external use
602
+ * Type export for CVA variant props
285
603
  */
286
604
  export type { VariantProps as TypographyVariantProps } from "class-variance-authority";
287
605
  //# sourceMappingURL=typography.d.ts.map