@neynar/ui 0.3.0 → 0.4.0
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.
- package/.llm/accordion-content.llm.md +67 -0
- package/.llm/accordion-item.llm.md +61 -0
- package/.llm/accordion-trigger.llm.md +69 -0
- package/.llm/accordion.llm.md +88 -0
- package/.llm/alert-description.llm.md +78 -0
- package/.llm/alert-dialog-action.llm.md +51 -0
- package/.llm/alert-dialog-cancel.llm.md +48 -0
- package/.llm/alert-dialog-content.llm.md +88 -0
- package/.llm/alert-dialog-description.llm.md +53 -0
- package/.llm/alert-dialog-footer.llm.md +41 -0
- package/.llm/alert-dialog-header.llm.md +39 -0
- package/.llm/alert-dialog-overlay.llm.md +44 -0
- package/.llm/alert-dialog-portal.llm.md +41 -0
- package/.llm/alert-dialog-title.llm.md +46 -0
- package/.llm/alert-dialog-trigger.llm.md +40 -0
- package/.llm/alert-dialog.llm.md +80 -0
- package/.llm/alert-title.llm.md +48 -0
- package/.llm/alert.llm.md +92 -0
- package/.llm/aspect-ratio.llm.md +41 -0
- package/.llm/avatar-fallback.llm.md +41 -0
- package/.llm/avatar-image.llm.md +48 -0
- package/.llm/avatar.llm.md +35 -0
- package/.llm/badge.llm.md +117 -0
- package/.llm/blockquote.llm.md +55 -0
- package/.llm/body-text-large.llm.md +49 -0
- package/.llm/body-text-small.llm.md +49 -0
- package/.llm/body-text.llm.md +52 -0
- package/.llm/breadcrumb-ellipsis.llm.md +73 -0
- package/.llm/breadcrumb-item.llm.md +53 -0
- package/.llm/breadcrumb-link.llm.md +84 -0
- package/.llm/breadcrumb-list.llm.md +54 -0
- package/.llm/breadcrumb-page.llm.md +52 -0
- package/.llm/breadcrumb-separator.llm.md +60 -0
- package/.llm/breadcrumb.llm.md +110 -0
- package/.llm/button-group-separator.llm.md +53 -0
- package/.llm/button-group-text.llm.md +56 -0
- package/.llm/button-group.llm.md +81 -0
- package/.llm/button.llm.md +281 -0
- package/.llm/calendar-day-button.llm.md +57 -0
- package/.llm/calendar.llm.md +340 -0
- package/.llm/caption.llm.md +48 -0
- package/.llm/card-action.llm.md +64 -0
- package/.llm/card-content.llm.md +48 -0
- package/.llm/card-description.llm.md +46 -0
- package/.llm/card-footer.llm.md +56 -0
- package/.llm/card-header.llm.md +53 -0
- package/.llm/card-title.llm.md +43 -0
- package/.llm/card.llm.md +100 -0
- package/.llm/carousel-content.llm.md +77 -0
- package/.llm/carousel-item.llm.md +96 -0
- package/.llm/carousel-next.llm.md +95 -0
- package/.llm/carousel-previous.llm.md +95 -0
- package/.llm/carousel.llm.md +211 -0
- package/.llm/chart-config.llm.md +71 -0
- package/.llm/chart-container.llm.md +148 -0
- package/.llm/chart-legend-content.llm.md +85 -0
- package/.llm/chart-legend.llm.md +144 -0
- package/.llm/chart-style.llm.md +28 -0
- package/.llm/chart-tooltip-content.llm.md +149 -0
- package/.llm/chart-tooltip.llm.md +184 -0
- package/.llm/checkbox.llm.md +100 -0
- package/.llm/cn.llm.md +46 -0
- package/.llm/code.llm.md +45 -0
- package/.llm/collapsible-content.llm.md +109 -0
- package/.llm/collapsible-trigger.llm.md +75 -0
- package/.llm/collapsible.llm.md +109 -0
- package/.llm/combobox-option.llm.md +53 -0
- package/.llm/combobox.llm.md +208 -0
- package/.llm/command-dialog.llm.md +112 -0
- package/.llm/command-empty.llm.md +63 -0
- package/.llm/command-group.llm.md +83 -0
- package/.llm/command-input.llm.md +82 -0
- package/.llm/command-item.llm.md +97 -0
- package/.llm/command-list.llm.md +53 -0
- package/.llm/command-loading.llm.md +48 -0
- package/.llm/command-separator.llm.md +44 -0
- package/.llm/command-shortcut.llm.md +63 -0
- package/.llm/command.llm.md +147 -0
- package/.llm/container.llm.md +236 -0
- package/.llm/context-menu-checkbox-item.llm.md +97 -0
- package/.llm/context-menu-content.llm.md +91 -0
- package/.llm/context-menu-group.llm.md +61 -0
- package/.llm/context-menu-item.llm.md +94 -0
- package/.llm/context-menu-label.llm.md +60 -0
- package/.llm/context-menu-portal.llm.md +49 -0
- package/.llm/context-menu-radio-group.llm.md +66 -0
- package/.llm/context-menu-radio-item.llm.md +76 -0
- package/.llm/context-menu-separator.llm.md +51 -0
- package/.llm/context-menu-shortcut.llm.md +57 -0
- package/.llm/context-menu-sub-content.llm.md +90 -0
- package/.llm/context-menu-sub-trigger.llm.md +73 -0
- package/.llm/context-menu-sub.llm.md +61 -0
- package/.llm/context-menu-trigger.llm.md +53 -0
- package/.llm/context-menu.llm.md +103 -0
- package/.llm/date-picker.llm.md +90 -0
- package/.llm/dialog-close.llm.md +61 -0
- package/.llm/dialog-content.llm.md +128 -0
- package/.llm/dialog-description.llm.md +44 -0
- package/.llm/dialog-footer.llm.md +38 -0
- package/.llm/dialog-header.llm.md +40 -0
- package/.llm/dialog-overlay.llm.md +57 -0
- package/.llm/dialog-portal.llm.md +47 -0
- package/.llm/dialog-title.llm.md +41 -0
- package/.llm/dialog-trigger.llm.md +51 -0
- package/.llm/dialog.llm.md +113 -0
- package/.llm/drawer-close.llm.md +53 -0
- package/.llm/drawer-content.llm.md +58 -0
- package/.llm/drawer-description.llm.md +54 -0
- package/.llm/drawer-footer.llm.md +67 -0
- package/.llm/drawer-header.llm.md +60 -0
- package/.llm/drawer-overlay.llm.md +40 -0
- package/.llm/drawer-portal.llm.md +42 -0
- package/.llm/drawer-title.llm.md +51 -0
- package/.llm/drawer-trigger.llm.md +44 -0
- package/.llm/drawer.llm.md +194 -0
- package/.llm/dropdown-menu-checkbox-item.llm.md +111 -0
- package/.llm/dropdown-menu-content.llm.md +109 -0
- package/.llm/dropdown-menu-group.llm.md +38 -0
- package/.llm/dropdown-menu-item.llm.md +94 -0
- package/.llm/dropdown-menu-label.llm.md +66 -0
- package/.llm/dropdown-menu-portal.llm.md +32 -0
- package/.llm/dropdown-menu-radio-group.llm.md +73 -0
- package/.llm/dropdown-menu-radio-item.llm.md +92 -0
- package/.llm/dropdown-menu-separator.llm.md +55 -0
- package/.llm/dropdown-menu-shortcut.llm.md +74 -0
- package/.llm/dropdown-menu-sub-content.llm.md +80 -0
- package/.llm/dropdown-menu-sub-trigger.llm.md +84 -0
- package/.llm/dropdown-menu-sub.llm.md +74 -0
- package/.llm/dropdown-menu-trigger.llm.md +48 -0
- package/.llm/dropdown-menu.llm.md +120 -0
- package/.llm/empty-content.llm.md +103 -0
- package/.llm/empty-description.llm.md +70 -0
- package/.llm/empty-header.llm.md +64 -0
- package/.llm/empty-media.llm.md +81 -0
- package/.llm/empty-state.llm.md +174 -0
- package/.llm/empty-title.llm.md +54 -0
- package/.llm/empty.llm.md +158 -0
- package/.llm/field-content.llm.md +28 -0
- package/.llm/field-description.llm.md +28 -0
- package/.llm/field-error.llm.md +41 -0
- package/.llm/field-group.llm.md +84 -0
- package/.llm/field-label.llm.md +28 -0
- package/.llm/field-legend.llm.md +77 -0
- package/.llm/field-separator.llm.md +35 -0
- package/.llm/field-set.llm.md +80 -0
- package/.llm/field-title.llm.md +28 -0
- package/.llm/field.llm.md +35 -0
- package/.llm/hover-card-content.llm.md +167 -0
- package/.llm/hover-card-trigger.llm.md +65 -0
- package/.llm/hover-card.llm.md +121 -0
- package/.llm/input-group-addon.llm.md +91 -0
- package/.llm/input-group-button.llm.md +120 -0
- package/.llm/input-group-input.llm.md +145 -0
- package/.llm/input-group-text.llm.md +75 -0
- package/.llm/input-group-textarea.llm.md +157 -0
- package/.llm/input-group.llm.md +108 -0
- package/.llm/input.llm.md +319 -0
- package/.llm/item-actions.llm.md +77 -0
- package/.llm/item-content.llm.md +73 -0
- package/.llm/item-description.llm.md +61 -0
- package/.llm/item-footer.llm.md +68 -0
- package/.llm/item-group.llm.md +73 -0
- package/.llm/item-header.llm.md +66 -0
- package/.llm/item-media.llm.md +75 -0
- package/.llm/item-separator.llm.md +80 -0
- package/.llm/item-title.llm.md +59 -0
- package/.llm/item.llm.md +115 -0
- package/.llm/kbd-group.llm.md +71 -0
- package/.llm/kbd.llm.md +71 -0
- package/.llm/label.llm.md +145 -0
- package/.llm/menubar-checkbox-item.llm.md +66 -0
- package/.llm/menubar-content.llm.md +128 -0
- package/.llm/menubar-group.llm.md +40 -0
- package/.llm/menubar-item.llm.md +62 -0
- package/.llm/menubar-label.llm.md +40 -0
- package/.llm/menubar-menu.llm.md +32 -0
- package/.llm/menubar-portal.llm.md +38 -0
- package/.llm/menubar-radio-group.llm.md +39 -0
- package/.llm/menubar-radio-item.llm.md +59 -0
- package/.llm/menubar-separator.llm.md +35 -0
- package/.llm/menubar-shortcut.llm.md +37 -0
- package/.llm/menubar-sub-content.llm.md +127 -0
- package/.llm/menubar-sub-trigger.llm.md +51 -0
- package/.llm/menubar-sub.llm.md +53 -0
- package/.llm/menubar-trigger.llm.md +37 -0
- package/.llm/menubar.llm.md +115 -0
- package/.llm/navigation-menu-content.llm.md +116 -0
- package/.llm/navigation-menu-indicator.llm.md +68 -0
- package/.llm/navigation-menu-item.llm.md +62 -0
- package/.llm/navigation-menu-link.llm.md +109 -0
- package/.llm/navigation-menu-list.llm.md +52 -0
- package/.llm/navigation-menu-trigger-style.llm.md +22 -0
- package/.llm/navigation-menu-trigger.llm.md +57 -0
- package/.llm/navigation-menu-viewport.llm.md +51 -0
- package/.llm/navigation-menu.llm.md +184 -0
- package/.llm/overline.llm.md +51 -0
- package/.llm/page-title.llm.md +52 -0
- package/.llm/pagination-content.llm.md +60 -0
- package/.llm/pagination-ellipsis.llm.md +107 -0
- package/.llm/pagination-item.llm.md +59 -0
- package/.llm/pagination-link.llm.md +150 -0
- package/.llm/pagination-next.llm.md +115 -0
- package/.llm/pagination-previous.llm.md +115 -0
- package/.llm/pagination.llm.md +190 -0
- package/.llm/popover-anchor.llm.md +53 -0
- package/.llm/popover-content.llm.md +109 -0
- package/.llm/popover-trigger.llm.md +54 -0
- package/.llm/popover.llm.md +116 -0
- package/.llm/progress.llm.md +76 -0
- package/.llm/radio-group-indicator.llm.md +28 -0
- package/.llm/radio-group-item.llm.md +40 -0
- package/.llm/radio-group.llm.md +76 -0
- package/.llm/resizable-handle.llm.md +156 -0
- package/.llm/resizable-panel-group.llm.md +149 -0
- package/.llm/resizable-panel.llm.md +157 -0
- package/.llm/scroll-area-corner.llm.md +41 -0
- package/.llm/scroll-area-thumb.llm.md +39 -0
- package/.llm/scroll-area-viewport.llm.md +60 -0
- package/.llm/scroll-area.llm.md +125 -0
- package/.llm/scroll-bar.llm.md +78 -0
- package/.llm/sdk-items-registry.json +2984 -0
- package/.llm/section-title.llm.md +48 -0
- package/.llm/select-content.llm.md +139 -0
- package/.llm/select-group.llm.md +60 -0
- package/.llm/select-item.llm.md +75 -0
- package/.llm/select-label.llm.md +62 -0
- package/.llm/select-scroll-down-button.llm.md +45 -0
- package/.llm/select-scroll-up-button.llm.md +45 -0
- package/.llm/select-separator.llm.md +59 -0
- package/.llm/select-trigger.llm.md +66 -0
- package/.llm/select-value.llm.md +67 -0
- package/.llm/select.llm.md +159 -0
- package/.llm/separator.llm.md +129 -0
- package/.llm/sheet-close.llm.md +49 -0
- package/.llm/sheet-content.llm.md +115 -0
- package/.llm/sheet-description.llm.md +62 -0
- package/.llm/sheet-footer.llm.md +64 -0
- package/.llm/sheet-header.llm.md +52 -0
- package/.llm/sheet-title.llm.md +53 -0
- package/.llm/sheet-trigger.llm.md +46 -0
- package/.llm/sheet.llm.md +126 -0
- package/.llm/sidebar-content.llm.md +63 -0
- package/.llm/sidebar-footer.llm.md +50 -0
- package/.llm/sidebar-group-action.llm.md +60 -0
- package/.llm/sidebar-group-content.llm.md +64 -0
- package/.llm/sidebar-group-label.llm.md +53 -0
- package/.llm/sidebar-group.llm.md +56 -0
- package/.llm/sidebar-header.llm.md +67 -0
- package/.llm/sidebar-input.llm.md +50 -0
- package/.llm/sidebar-inset.llm.md +52 -0
- package/.llm/sidebar-menu-action.llm.md +84 -0
- package/.llm/sidebar-menu-badge.llm.md +60 -0
- package/.llm/sidebar-menu-button.llm.md +103 -0
- package/.llm/sidebar-menu-item.llm.md +75 -0
- package/.llm/sidebar-menu-skeleton.llm.md +76 -0
- package/.llm/sidebar-menu-sub-button.llm.md +85 -0
- package/.llm/sidebar-menu-sub-item.llm.md +54 -0
- package/.llm/sidebar-menu-sub.llm.md +74 -0
- package/.llm/sidebar-menu.llm.md +65 -0
- package/.llm/sidebar-provider.llm.md +79 -0
- package/.llm/sidebar-rail.llm.md +34 -0
- package/.llm/sidebar-separator.llm.md +57 -0
- package/.llm/sidebar-trigger.llm.md +49 -0
- package/.llm/sidebar.llm.md +129 -0
- package/.llm/skeleton.llm.md +134 -0
- package/.llm/slider.llm.md +173 -0
- package/.llm/spinner.llm.md +182 -0
- package/.llm/stack.llm.md +28 -0
- package/.llm/subsection-title.llm.md +46 -0
- package/.llm/switch.llm.md +76 -0
- package/.llm/table-body.llm.md +36 -0
- package/.llm/table-caption.llm.md +48 -0
- package/.llm/table-cell.llm.md +53 -0
- package/.llm/table-footer.llm.md +41 -0
- package/.llm/table-head.llm.md +69 -0
- package/.llm/table-header.llm.md +41 -0
- package/.llm/table-row.llm.md +42 -0
- package/.llm/table.llm.md +123 -0
- package/.llm/tabs-content.llm.md +47 -0
- package/.llm/tabs-list.llm.md +41 -0
- package/.llm/tabs-trigger.llm.md +47 -0
- package/.llm/tabs.llm.md +71 -0
- package/.llm/text-field.llm.md +327 -0
- package/.llm/textarea.llm.md +311 -0
- package/.llm/theme-preference.llm.md +25 -0
- package/.llm/theme-toggle.llm.md +57 -0
- package/.llm/theme.llm.md +14 -0
- package/.llm/toaster.llm.md +193 -0
- package/.llm/toggle-group-item.llm.md +59 -0
- package/.llm/toggle-group.llm.md +101 -0
- package/.llm/toggle.llm.md +40 -0
- package/.llm/tooltip-content.llm.md +185 -0
- package/.llm/tooltip-provider.llm.md +68 -0
- package/.llm/tooltip-trigger.llm.md +70 -0
- package/.llm/tooltip.llm.md +129 -0
- package/.llm/use-carousel.llm.md +55 -0
- package/.llm/use-command-state.llm.md +32 -0
- package/.llm/use-is-mobile.llm.md +73 -0
- package/.llm/use-sidebar.llm.md +61 -0
- package/dist/components/ui/scroll-area.d.ts +5 -5
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/stack.d.ts.map +1 -1
- package/dist/components/ui/stories/scroll-area.stories.d.ts +1 -1
- package/dist/components/ui/stories/typography.stories.d.ts +8 -108
- package/dist/components/ui/stories/typography.stories.d.ts.map +1 -1
- package/dist/components/ui/theme-toggle.d.ts +0 -3
- package/dist/components/ui/theme-toggle.d.ts.map +1 -1
- package/dist/components/ui/theme.d.ts.map +1 -1
- package/dist/components/ui/typography.d.ts +211 -474
- package/dist/components/ui/typography.d.ts.map +1 -1
- package/dist/index.js +5160 -9875
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/ui/stack.tsx +3 -1
- package/src/components/ui/stories/typography.stories.tsx +261 -1512
- package/src/components/ui/theme-toggle.tsx +1 -3
- package/src/components/ui/theme.tsx +6 -1
- package/src/components/ui/typography.tsx +416 -1136
- package/src/styles/globals.css +57 -106
|
@@ -1,569 +1,317 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { type VariantProps } from "class-variance-authority";
|
|
3
2
|
/**
|
|
4
|
-
* Typography
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* @
|
|
18
|
-
* @
|
|
19
|
-
* @variant pageTitle - Page titles (text-5xl, leading-relaxed)
|
|
20
|
-
* @variant displayTitle - Display titles (text-6xl, leading-snug)
|
|
21
|
-
* @variant heroTitle - Hero titles (text-7xl, leading-snug)
|
|
22
|
-
* @variant code - Monospace font for inline code, terminal commands, and technical references (text-base, font-mono)
|
|
23
|
-
*
|
|
24
|
-
* @see {@link https://cva.style/docs} CVA documentation for variant patterns
|
|
25
|
-
* @see {@link https://ui.shadcn.com/docs/components/typography} Typography component inspiration
|
|
26
|
-
* @since 1.0.0
|
|
3
|
+
* Typography Components - Purpose-named, Tailwind-first text components
|
|
4
|
+
*
|
|
5
|
+
* This module provides semantic typography components for web applications.
|
|
6
|
+
* Each component has a clear purpose and sensible Tailwind CSS defaults that
|
|
7
|
+
* can be fully overridden via the className prop.
|
|
8
|
+
*
|
|
9
|
+
* Design Philosophy:
|
|
10
|
+
* - Purpose-obvious naming (PageTitle, BodyText, Caption)
|
|
11
|
+
* - Semantic HTML defaults (h1, h2, p, etc.)
|
|
12
|
+
* - Tailwind-first with zero abstraction
|
|
13
|
+
* - Full className override control
|
|
14
|
+
* - Appropriate sizing for web apps (not marketing sites)
|
|
15
|
+
*
|
|
16
|
+
* @see {@link https://tailwindcss.com} Tailwind CSS documentation
|
|
17
|
+
* @since 2.0.0
|
|
27
18
|
*/
|
|
28
|
-
declare const typographyVariants: (props?: ({
|
|
29
|
-
variant?: "body" | "code" | "microcopy" | "detail" | "blogBody" | "paragraphLead" | "eyebrow" | "subHeadline" | "headline" | "sectionTitle" | "pageTitle" | "displayTitle" | "heroTitle" | null | undefined;
|
|
30
|
-
color?: "accent" | "default" | "destructive" | "muted" | "faint" | "success" | "warning" | null | undefined;
|
|
31
|
-
align?: "left" | "right" | "center" | "justify" | null | undefined;
|
|
32
|
-
transform?: "capitalize" | "lowercase" | "uppercase" | null | undefined;
|
|
33
|
-
weight?: "bold" | "normal" | "medium" | "semibold" | null | undefined;
|
|
34
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
35
|
-
type TypographyVariant = "microcopy" | "detail" | "body" | "blogBody" | "paragraphLead" | "eyebrow" | "subHeadline" | "headline" | "sectionTitle" | "pageTitle" | "displayTitle" | "heroTitle" | "code";
|
|
36
|
-
type TypographyColor = "default" | "muted" | "faint" | "accent" | "destructive" | "success" | "warning";
|
|
37
19
|
/**
|
|
38
|
-
* Base
|
|
20
|
+
* Base typography component props
|
|
21
|
+
*
|
|
22
|
+
* All typography components accept these props:
|
|
23
|
+
* - `as` - The HTML element to render (each component has a sensible default)
|
|
24
|
+
* - `className` - Additional Tailwind classes to merge with defaults
|
|
25
|
+
* - `children` - Content to render
|
|
26
|
+
* - All standard HTML attributes for the underlying element
|
|
39
27
|
*/
|
|
40
|
-
type TypographyBaseProps = {
|
|
41
|
-
/**
|
|
42
|
-
|
|
43
|
-
/** Color variant for semantic meaning and visual hierarchy */
|
|
44
|
-
color?: TypographyColor;
|
|
45
|
-
/** Text alignment within the container */
|
|
46
|
-
align?: VariantProps<typeof typographyVariants>["align"];
|
|
47
|
-
/** Text transformation for stylistic effects */
|
|
48
|
-
transform?: VariantProps<typeof typographyVariants>["transform"];
|
|
49
|
-
/** Font weight override for visual emphasis */
|
|
50
|
-
weight?: VariantProps<typeof typographyVariants>["weight"];
|
|
51
|
-
/** The HTML element or component to render as @default "p" */
|
|
52
|
-
as?: React.ElementType;
|
|
53
|
-
/** For label elements, the associated input ID for accessibility */
|
|
54
|
-
htmlFor?: string;
|
|
55
|
-
/** Whether to render as a Slot component for composition patterns @default false */
|
|
56
|
-
asChild?: boolean;
|
|
57
|
-
/** Whether the text should be rendered in italic style @default false */
|
|
58
|
-
italic?: boolean;
|
|
59
|
-
/** Whether the text should have underline decoration @default false */
|
|
60
|
-
underline?: boolean;
|
|
61
|
-
/** Whether the text should have strikethrough decoration @default false */
|
|
62
|
-
strikethrough?: boolean;
|
|
63
|
-
/** Whether text should be truncated with ellipsis on overflow @default false */
|
|
64
|
-
truncate?: boolean;
|
|
65
|
-
/** Hide visually but keep accessible to screen readers @default false */
|
|
66
|
-
srOnly?: boolean;
|
|
28
|
+
type TypographyBaseProps<T extends React.ElementType> = {
|
|
29
|
+
/** The HTML element or component to render as */
|
|
30
|
+
as?: T;
|
|
67
31
|
/** Additional CSS classes for custom styling */
|
|
68
32
|
className?: string;
|
|
69
33
|
/** Content to render within the typography element */
|
|
70
34
|
children?: React.ReactNode;
|
|
71
35
|
};
|
|
36
|
+
type TypographyProps<T extends React.ElementType> = TypographyBaseProps<T> & Omit<React.ComponentPropsWithoutRef<T>, keyof TypographyBaseProps<T>>;
|
|
72
37
|
/**
|
|
73
|
-
*
|
|
74
|
-
*/
|
|
75
|
-
type TypographyProps = TypographyBaseProps & Omit<React.HTMLAttributes<HTMLElement>, keyof TypographyBaseProps>;
|
|
76
|
-
/**
|
|
77
|
-
* Typography - Comprehensive text styling component for consistent design system implementation
|
|
38
|
+
* PageTitle - Primary page heading component
|
|
78
39
|
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* elements and composition patterns via Radix UI Slot. Designed to handle all text styling needs across
|
|
82
|
-
* the application with consistent visual hierarchy and accessibility compliance.
|
|
40
|
+
* The main heading for a page, typically used once per page. Uses text-3xl (30px)
|
|
41
|
+
* which is appropriate for web application page titles. Defaults to h1 element.
|
|
83
42
|
*
|
|
84
|
-
* @
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* Welcome to Neynar
|
|
89
|
-
* </Typography>
|
|
90
|
-
*
|
|
91
|
-
* // Body text with color variant
|
|
92
|
-
* <Typography variant="body" color="muted">
|
|
93
|
-
* This is secondary body text with reduced visual prominence.
|
|
94
|
-
* </Typography>
|
|
95
|
-
*
|
|
96
|
-
* // Code snippet with proper semantics
|
|
97
|
-
* <Typography variant="code" as="code">
|
|
98
|
-
* const message = "Hello, world!";
|
|
99
|
-
* </Typography>
|
|
100
|
-
* ```
|
|
101
|
-
*
|
|
102
|
-
* @example
|
|
103
|
-
* ```tsx
|
|
104
|
-
* // Advanced styling with multiple variants
|
|
105
|
-
* <Typography
|
|
106
|
-
* variant="subheading"
|
|
107
|
-
* color="accent"
|
|
108
|
-
* align="center"
|
|
109
|
-
* weight="semibold"
|
|
110
|
-
* italic
|
|
111
|
-
* underline
|
|
112
|
-
* className="mb-4"
|
|
113
|
-
* >
|
|
114
|
-
* Styled Subheading with Multiple Variants
|
|
115
|
-
* </Typography>
|
|
116
|
-
*
|
|
117
|
-
* // Truncated text for constrained layouts
|
|
118
|
-
* <Typography variant="body" truncate className="max-w-xs">
|
|
119
|
-
* This is a very long text that will be truncated with ellipsis when it exceeds the container width
|
|
120
|
-
* </Typography>
|
|
121
|
-
* ```
|
|
43
|
+
* @param as - HTML element to render @default "h1"
|
|
44
|
+
* @param className - Additional Tailwind classes (e.g., "text-4xl text-accent")
|
|
45
|
+
* @param children - Content to render
|
|
46
|
+
* @param ...props - All standard HTMLHeadingElement attributes
|
|
122
47
|
*
|
|
123
48
|
* @example
|
|
124
49
|
* ```tsx
|
|
125
|
-
* //
|
|
126
|
-
* <
|
|
127
|
-
* Additional context for screen readers only
|
|
128
|
-
* </Typography>
|
|
129
|
-
*
|
|
130
|
-
* // Form label with proper association
|
|
131
|
-
* <Typography variant="field" as="label" htmlFor="email-input">
|
|
132
|
-
* Email Address
|
|
133
|
-
* </Typography>
|
|
134
|
-
*
|
|
135
|
-
* // Composition with asChild for complex structures
|
|
136
|
-
* <Typography variant="body" asChild>
|
|
137
|
-
* <a href="/about" className="hover:underline">
|
|
138
|
-
* Learn more about our platform
|
|
139
|
-
* </a>
|
|
140
|
-
* </Typography>
|
|
141
|
-
* ```
|
|
50
|
+
* // Default usage
|
|
51
|
+
* <PageTitle>User Dashboard</PageTitle>
|
|
142
52
|
*
|
|
143
|
-
*
|
|
144
|
-
* -
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* - **Label Association**: `htmlFor` prop properly associates labels with form controls
|
|
148
|
-
* - **Focus Management**: Interactive elements receive proper focus indicators
|
|
149
|
-
* - **Text Scaling**: All font sizes scale appropriately with user's browser text size preferences
|
|
150
|
-
* - **High Contrast Mode**: Respects system high contrast mode preferences
|
|
151
|
-
*
|
|
152
|
-
* @performance
|
|
153
|
-
* - Uses CVA for efficient class generation and tree-shaking
|
|
154
|
-
* - Minimal runtime overhead with compile-time optimizations
|
|
155
|
-
* - Cached class combinations for repeated variant usage
|
|
156
|
-
*
|
|
157
|
-
* @see {@link H1} Semantic H1 heading component
|
|
158
|
-
* @see {@link H2} Semantic H2 heading component
|
|
159
|
-
* @see {@link P} Semantic paragraph component
|
|
160
|
-
* @see {@link Code} Semantic code element component
|
|
161
|
-
* @see {@link https://cva.style/docs} Class Variance Authority documentation
|
|
162
|
-
* @see {@link https://ui.shadcn.com/docs/components/typography} shadcn/ui Typography reference
|
|
163
|
-
* @since 1.0.0
|
|
164
|
-
*/
|
|
165
|
-
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;
|
|
166
|
-
/** Props for H1 heading component */
|
|
167
|
-
type H1Props = Omit<TypographyProps, "as">;
|
|
168
|
-
/**
|
|
169
|
-
* H1 - Primary page heading component
|
|
170
|
-
*
|
|
171
|
-
* The main heading for a page or major section. Uses the "displayTitle" variant with h1 semantic element.
|
|
172
|
-
* Should be used once per page for proper document outline and SEO.
|
|
173
|
-
*
|
|
174
|
-
* @example
|
|
175
|
-
* ```tsx
|
|
176
|
-
* // Page title
|
|
177
|
-
* <H1>Welcome to Neynar Platform</H1>
|
|
53
|
+
* // With custom styling
|
|
54
|
+
* <PageTitle className="text-4xl text-accent">
|
|
55
|
+
* Custom Styled Title
|
|
56
|
+
* </PageTitle>
|
|
178
57
|
*
|
|
179
|
-
* //
|
|
180
|
-
* <
|
|
58
|
+
* // As different element
|
|
59
|
+
* <PageTitle as="h2">Section Title as H2</PageTitle>
|
|
181
60
|
*
|
|
182
|
-
* //
|
|
183
|
-
* <
|
|
184
|
-
*
|
|
185
|
-
* </
|
|
61
|
+
* // Responsive sizing
|
|
62
|
+
* <PageTitle className="text-2xl md:text-3xl lg:text-4xl">
|
|
63
|
+
* Responsive Title
|
|
64
|
+
* </PageTitle>
|
|
186
65
|
* ```
|
|
187
66
|
*
|
|
188
67
|
* @accessibility
|
|
189
|
-
* -
|
|
190
|
-
* - Should be the first heading on the page
|
|
68
|
+
* - Should be used once per page for proper document outline
|
|
191
69
|
* - Provides main page topic for screen readers
|
|
192
70
|
* - Helps with keyboard navigation landmarks
|
|
193
|
-
*
|
|
194
|
-
* @see {@link H2} Secondary heading component
|
|
195
|
-
* @see {@link Typography} Base typography component
|
|
196
71
|
*/
|
|
197
|
-
declare function
|
|
198
|
-
/** Props for H2 heading component */
|
|
199
|
-
type H2Props = Omit<TypographyProps, "as">;
|
|
72
|
+
export declare function PageTitle<T extends React.ElementType = "h1">({ className, as, ...props }: TypographyProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
200
73
|
/**
|
|
201
|
-
*
|
|
74
|
+
* SectionTitle - Secondary section heading component
|
|
75
|
+
*
|
|
76
|
+
* Section headings that divide page content into logical groups. Uses text-2xl (24px)
|
|
77
|
+
* for clear hierarchy below PageTitle. Defaults to h2 element.
|
|
202
78
|
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
79
|
+
* @param as - HTML element to render @default "h2"
|
|
80
|
+
* @param className - Additional Tailwind classes
|
|
81
|
+
* @param children - Content to render
|
|
82
|
+
* @param ...props - All standard HTMLHeadingElement attributes
|
|
205
83
|
*
|
|
206
84
|
* @example
|
|
207
85
|
* ```tsx
|
|
208
|
-
* //
|
|
209
|
-
* <
|
|
86
|
+
* // Default usage
|
|
87
|
+
* <SectionTitle>Recent Activity</SectionTitle>
|
|
210
88
|
*
|
|
211
|
-
* // With
|
|
212
|
-
* <
|
|
89
|
+
* // With custom color
|
|
90
|
+
* <SectionTitle className="text-accent">
|
|
91
|
+
* Featured Section
|
|
92
|
+
* </SectionTitle>
|
|
213
93
|
*
|
|
214
|
-
* //
|
|
215
|
-
* <
|
|
216
|
-
* Section with Border
|
|
217
|
-
* </H2>
|
|
94
|
+
* // As h3 element
|
|
95
|
+
* <SectionTitle as="h3">Subsection Title</SectionTitle>
|
|
218
96
|
* ```
|
|
219
97
|
*
|
|
220
98
|
* @accessibility
|
|
221
99
|
* - Maintains document outline hierarchy
|
|
222
|
-
* - Should follow
|
|
100
|
+
* - Should follow PageTitle (h1) in document flow
|
|
223
101
|
* - Provides section navigation for screen readers
|
|
224
|
-
* - Essential for skip navigation functionality
|
|
225
|
-
*
|
|
226
|
-
* @see {@link H1} Primary heading component
|
|
227
|
-
* @see {@link H3} Tertiary heading component
|
|
228
102
|
*/
|
|
229
|
-
declare function
|
|
230
|
-
/** Props for H3 heading component */
|
|
231
|
-
type H3Props = Omit<TypographyProps, "as">;
|
|
103
|
+
export declare function SectionTitle<T extends React.ElementType = "h2">({ className, as, ...props }: TypographyProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
232
104
|
/**
|
|
233
|
-
*
|
|
105
|
+
* SubsectionTitle - Tertiary subsection heading component
|
|
106
|
+
*
|
|
107
|
+
* Subsection headings for further content division. Uses text-xl (20px) for
|
|
108
|
+
* subtle distinction from SectionTitle. Defaults to h3 element.
|
|
234
109
|
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
110
|
+
* @param as - HTML element to render @default "h3"
|
|
111
|
+
* @param className - Additional Tailwind classes
|
|
112
|
+
* @param children - Content to render
|
|
113
|
+
* @param ...props - All standard HTMLHeadingElement attributes
|
|
237
114
|
*
|
|
238
115
|
* @example
|
|
239
116
|
* ```tsx
|
|
240
|
-
* //
|
|
241
|
-
* <
|
|
117
|
+
* // Default usage
|
|
118
|
+
* <SubsectionTitle>Configuration Options</SubsectionTitle>
|
|
242
119
|
*
|
|
243
|
-
* //
|
|
244
|
-
* <
|
|
245
|
-
* Optional
|
|
246
|
-
* </
|
|
120
|
+
* // With custom styling
|
|
121
|
+
* <SubsectionTitle className="text-muted-foreground">
|
|
122
|
+
* Optional Settings
|
|
123
|
+
* </SubsectionTitle>
|
|
247
124
|
* ```
|
|
248
125
|
*
|
|
249
126
|
* @accessibility
|
|
250
|
-
* - Should follow
|
|
127
|
+
* - Should follow SectionTitle (h2) in document flow
|
|
251
128
|
* - Helps create detailed content structure
|
|
252
|
-
* -
|
|
253
|
-
* - Supports table of contents generation
|
|
129
|
+
* - Supports screen reader document navigation
|
|
254
130
|
*/
|
|
255
|
-
declare function
|
|
256
|
-
/** Props for H4 heading component */
|
|
257
|
-
type H4Props = Omit<TypographyProps, "as">;
|
|
131
|
+
export declare function SubsectionTitle<T extends React.ElementType = "h3">({ className, as, ...props }: TypographyProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
258
132
|
/**
|
|
259
|
-
*
|
|
133
|
+
* BodyText - Primary paragraph text component
|
|
260
134
|
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
135
|
+
* Standard paragraph element for readable body text. Uses text-base (16px) with
|
|
136
|
+
* relaxed line height for optimal readability. Defaults to p element.
|
|
137
|
+
*
|
|
138
|
+
* @param as - HTML element to render @default "p"
|
|
139
|
+
* @param className - Additional Tailwind classes
|
|
140
|
+
* @param children - Content to render
|
|
141
|
+
* @param ...props - All standard HTMLParagraphElement attributes
|
|
263
142
|
*
|
|
264
143
|
* @example
|
|
265
144
|
* ```tsx
|
|
266
|
-
* //
|
|
267
|
-
* <
|
|
145
|
+
* // Default usage
|
|
146
|
+
* <BodyText>
|
|
147
|
+
* This is standard body text that provides information to the user.
|
|
148
|
+
* </BodyText>
|
|
268
149
|
*
|
|
269
|
-
* //
|
|
270
|
-
* <
|
|
150
|
+
* // With custom styling
|
|
151
|
+
* <BodyText className="text-muted-foreground">
|
|
152
|
+
* Secondary information with reduced visual prominence.
|
|
153
|
+
* </BodyText>
|
|
154
|
+
*
|
|
155
|
+
* // As different element
|
|
156
|
+
* <BodyText as="div">
|
|
157
|
+
* Body text in a div container.
|
|
158
|
+
* </BodyText>
|
|
271
159
|
* ```
|
|
272
160
|
*
|
|
273
161
|
* @accessibility
|
|
274
|
-
* -
|
|
275
|
-
* -
|
|
276
|
-
* - Supports screen reader
|
|
162
|
+
* - Provides proper semantic structure for body content
|
|
163
|
+
* - Maintains readable line height for accessibility
|
|
164
|
+
* - Supports screen reader text flow and navigation
|
|
277
165
|
*/
|
|
278
|
-
declare function
|
|
279
|
-
/** Props for H5 heading component */
|
|
280
|
-
type H5Props = Omit<TypographyProps, "as">;
|
|
166
|
+
export declare function BodyText<T extends React.ElementType = "p">({ className, as, ...props }: TypographyProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
281
167
|
/**
|
|
282
|
-
*
|
|
168
|
+
* BodyTextLarge - Emphasized body text component
|
|
283
169
|
*
|
|
284
|
-
*
|
|
285
|
-
* with
|
|
170
|
+
* Larger body text for lead paragraphs and emphasized content. Uses text-lg (18px)
|
|
171
|
+
* with relaxed line height. Defaults to p element.
|
|
172
|
+
*
|
|
173
|
+
* @param as - HTML element to render @default "p"
|
|
174
|
+
* @param className - Additional Tailwind classes
|
|
175
|
+
* @param children - Content to render
|
|
176
|
+
* @param ...props - All standard HTMLParagraphElement attributes
|
|
286
177
|
*
|
|
287
178
|
* @example
|
|
288
179
|
* ```tsx
|
|
289
|
-
* //
|
|
290
|
-
* <
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
180
|
+
* // Lead paragraph
|
|
181
|
+
* <BodyTextLarge>
|
|
182
|
+
* This is a lead paragraph that introduces the main content.
|
|
183
|
+
* </BodyTextLarge>
|
|
184
|
+
*
|
|
185
|
+
* // Emphasized content
|
|
186
|
+
* <BodyTextLarge className="font-medium text-accent">
|
|
187
|
+
* Important announcement text.
|
|
188
|
+
* </BodyTextLarge>
|
|
294
189
|
* ```
|
|
295
190
|
*/
|
|
296
|
-
declare function
|
|
297
|
-
/** Props for H6 heading component */
|
|
298
|
-
type H6Props = Omit<TypographyProps, "as">;
|
|
191
|
+
export declare function BodyTextLarge<T extends React.ElementType = "p">({ className, as, ...props }: TypographyProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
299
192
|
/**
|
|
300
|
-
*
|
|
193
|
+
* BodyTextSmall - De-emphasized body text component
|
|
194
|
+
*
|
|
195
|
+
* Smaller body text for less prominent content. Uses text-sm (14px) with
|
|
196
|
+
* normal line height. Defaults to p element.
|
|
301
197
|
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
198
|
+
* @param as - HTML element to render @default "p"
|
|
199
|
+
* @param className - Additional Tailwind classes
|
|
200
|
+
* @param children - Content to render
|
|
201
|
+
* @param ...props - All standard HTMLParagraphElement attributes
|
|
304
202
|
*
|
|
305
203
|
* @example
|
|
306
204
|
* ```tsx
|
|
307
|
-
* //
|
|
308
|
-
* <
|
|
309
|
-
*
|
|
310
|
-
*
|
|
311
|
-
*
|
|
205
|
+
* // Small body text
|
|
206
|
+
* <BodyTextSmall>
|
|
207
|
+
* This is smaller, less prominent body text.
|
|
208
|
+
* </BodyTextSmall>
|
|
209
|
+
*
|
|
210
|
+
* // Helper text
|
|
211
|
+
* <BodyTextSmall className="text-muted-foreground">
|
|
212
|
+
* Additional context or helper information.
|
|
213
|
+
* </BodyTextSmall>
|
|
312
214
|
* ```
|
|
313
215
|
*/
|
|
314
|
-
declare function
|
|
315
|
-
/** Props for P paragraph component */
|
|
316
|
-
type PProps = Omit<TypographyProps, "as">;
|
|
216
|
+
export declare function BodyTextSmall<T extends React.ElementType = "p">({ className, as, ...props }: TypographyProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
317
217
|
/**
|
|
318
|
-
*
|
|
218
|
+
* Caption - Small supplementary text component
|
|
219
|
+
*
|
|
220
|
+
* Small text for metadata, timestamps, and supplementary information. Uses text-sm (14px)
|
|
221
|
+
* with muted color. Defaults to span element for inline usage.
|
|
319
222
|
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
223
|
+
* @param as - HTML element to render @default "span"
|
|
224
|
+
* @param className - Additional Tailwind classes
|
|
225
|
+
* @param children - Content to render
|
|
226
|
+
* @param ...props - All standard HTMLSpanElement attributes
|
|
322
227
|
*
|
|
323
228
|
* @example
|
|
324
229
|
* ```tsx
|
|
325
|
-
* //
|
|
326
|
-
* <
|
|
327
|
-
*
|
|
328
|
-
* // With color variants
|
|
329
|
-
* <P color="muted">Secondary information with reduced visual prominence.</P>
|
|
230
|
+
* // Timestamp
|
|
231
|
+
* <Caption>Last updated 2 minutes ago</Caption>
|
|
330
232
|
*
|
|
331
|
-
* //
|
|
332
|
-
* <
|
|
233
|
+
* // Image caption
|
|
234
|
+
* <Caption>Figure 1: System architecture diagram</Caption>
|
|
333
235
|
*
|
|
334
|
-
* //
|
|
335
|
-
* <
|
|
336
|
-
*
|
|
337
|
-
* </
|
|
236
|
+
* // Metadata
|
|
237
|
+
* <Caption className="block mt-2">
|
|
238
|
+
* Created by John Doe on Jan 15, 2025
|
|
239
|
+
* </Caption>
|
|
338
240
|
* ```
|
|
339
241
|
*
|
|
340
242
|
* @accessibility
|
|
341
|
-
* -
|
|
342
|
-
* -
|
|
343
|
-
* -
|
|
344
|
-
*
|
|
345
|
-
* @see {@link Typography} Base typography component
|
|
243
|
+
* - Maintains inline text flow for screen readers
|
|
244
|
+
* - Sufficient contrast with muted color
|
|
245
|
+
* - Works well for supplementary information
|
|
346
246
|
*/
|
|
347
|
-
declare function
|
|
348
|
-
/** Props for Span inline component */
|
|
349
|
-
type SpanProps = Omit<TypographyProps, "as">;
|
|
247
|
+
export declare function Caption<T extends React.ElementType = "span">({ className, as, ...props }: TypographyProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
350
248
|
/**
|
|
351
|
-
*
|
|
249
|
+
* Overline - Small uppercase label component
|
|
250
|
+
*
|
|
251
|
+
* Small uppercase text for category tags and eyebrow labels. Uses text-xs (12px)
|
|
252
|
+
* with uppercase transformation and wide tracking. Defaults to span element.
|
|
352
253
|
*
|
|
353
|
-
*
|
|
354
|
-
*
|
|
254
|
+
* @param as - HTML element to render @default "span"
|
|
255
|
+
* @param className - Additional Tailwind classes
|
|
256
|
+
* @param children - Content to render
|
|
257
|
+
* @param ...props - All standard HTMLSpanElement attributes
|
|
355
258
|
*
|
|
356
259
|
* @example
|
|
357
260
|
* ```tsx
|
|
358
|
-
* //
|
|
359
|
-
* <
|
|
360
|
-
*
|
|
361
|
-
*
|
|
362
|
-
*
|
|
363
|
-
*
|
|
364
|
-
*
|
|
365
|
-
*
|
|
366
|
-
*
|
|
367
|
-
*
|
|
368
|
-
*
|
|
369
|
-
*
|
|
370
|
-
* onClick
|
|
371
|
-
* </Span>
|
|
261
|
+
* // Category label
|
|
262
|
+
* <Overline>Featured</Overline>
|
|
263
|
+
*
|
|
264
|
+
* // Section eyebrow
|
|
265
|
+
* <Overline className="text-accent-foreground">
|
|
266
|
+
* New Feature
|
|
267
|
+
* </Overline>
|
|
268
|
+
*
|
|
269
|
+
* // Tag
|
|
270
|
+
* <Overline className="bg-accent px-2 py-1 rounded">
|
|
271
|
+
* Beta
|
|
272
|
+
* </Overline>
|
|
372
273
|
* ```
|
|
373
|
-
*
|
|
374
|
-
* @accessibility
|
|
375
|
-
* - Maintains inline text flow for screen readers
|
|
376
|
-
* - Preserves semantic meaning within larger text blocks
|
|
377
|
-
* - Does not interrupt document structure or navigation
|
|
378
274
|
*/
|
|
379
|
-
declare function
|
|
380
|
-
/** Props for Code component */
|
|
381
|
-
type CodeProps = Omit<TypographyProps, "as" | "variant">;
|
|
275
|
+
export declare function Overline<T extends React.ElementType = "span">({ className, as, ...props }: TypographyProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
382
276
|
/**
|
|
383
|
-
* Code - Inline code component
|
|
277
|
+
* Code - Inline code component
|
|
384
278
|
*
|
|
385
|
-
*
|
|
386
|
-
*
|
|
279
|
+
* Monospace text for inline code snippets and technical references. Uses text-sm
|
|
280
|
+
* with monospace font and subtle background. Defaults to code element.
|
|
281
|
+
*
|
|
282
|
+
* @param as - HTML element to render @default "code"
|
|
283
|
+
* @param className - Additional Tailwind classes
|
|
284
|
+
* @param children - Content to render
|
|
285
|
+
* @param ...props - All standard HTMLElement attributes
|
|
387
286
|
*
|
|
388
287
|
* @example
|
|
389
288
|
* ```tsx
|
|
390
|
-
* // Inline code
|
|
289
|
+
* // Inline code
|
|
391
290
|
* <Code>const message = "Hello, world!";</Code>
|
|
392
291
|
*
|
|
393
|
-
* // Terminal command
|
|
394
|
-
* <Code color="muted">npm install @neynar/react</Code>
|
|
395
|
-
*
|
|
396
292
|
* // Variable reference
|
|
397
293
|
* <p>Set the <Code>API_KEY</Code> environment variable.</p>
|
|
398
294
|
*
|
|
399
|
-
* //
|
|
400
|
-
* <Code className="bg-
|
|
401
|
-
* function handleClick()
|
|
402
|
-
* </Code>
|
|
295
|
+
* // Terminal command
|
|
296
|
+
* <Code className="bg-accent">npm install @neynar/ui</Code>
|
|
403
297
|
* ```
|
|
404
298
|
*
|
|
405
299
|
* @accessibility
|
|
406
300
|
* - Uses semantic code element for proper meaning
|
|
407
301
|
* - Monospace font aids in code readability
|
|
408
302
|
* - Screen readers understand this as technical content
|
|
409
|
-
* - Maintains proper inline behavior within text
|
|
410
|
-
*
|
|
411
|
-
* @see {@link Typography} Base typography component for multi-line code blocks
|
|
412
303
|
*/
|
|
413
|
-
declare function Code(props:
|
|
414
|
-
/** Props for Small component */
|
|
415
|
-
type SmallProps = Omit<TypographyProps, "as">;
|
|
304
|
+
export declare function Code<T extends React.ElementType = "code">({ className, as, ...props }: TypographyProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
416
305
|
/**
|
|
417
|
-
*
|
|
418
|
-
*
|
|
419
|
-
* Semantic small element for fine print, disclaimers, timestamps, and supplementary information.
|
|
420
|
-
* Uses "microcopy" variant for reduced visual prominence while maintaining readability.
|
|
421
|
-
*
|
|
422
|
-
* @example
|
|
423
|
-
* ```tsx
|
|
424
|
-
* // Legal disclaimer
|
|
425
|
-
* <Small>Terms and conditions apply. See details for more information.</Small>
|
|
426
|
-
*
|
|
427
|
-
* // Timestamp or metadata
|
|
428
|
-
* <Small color="muted">Last updated 2 minutes ago</Small>
|
|
429
|
-
*
|
|
430
|
-
* // Copyright notice
|
|
431
|
-
* <Small className="text-center">
|
|
432
|
-
* © 2024 Neynar. All rights reserved.
|
|
433
|
-
* </Small>
|
|
434
|
-
*
|
|
435
|
-
* // Form help text
|
|
436
|
-
* <Small color="muted">Password must be at least 8 characters long.</Small>
|
|
437
|
-
* ```
|
|
306
|
+
* Blockquote - Quoted text component
|
|
438
307
|
*
|
|
439
|
-
*
|
|
440
|
-
*
|
|
441
|
-
* - Indicates fine print or less important information
|
|
442
|
-
* - Maintains sufficient contrast for readability
|
|
443
|
-
* - Works well with form help text and descriptions
|
|
444
|
-
*/
|
|
445
|
-
declare function Small({ variant, ...props }: SmallProps): import("react/jsx-runtime").JSX.Element;
|
|
446
|
-
/** Props for Strong component */
|
|
447
|
-
type StrongProps = Omit<TypographyProps, "as">;
|
|
448
|
-
/**
|
|
449
|
-
* Strong - Emphasized text component for important content
|
|
308
|
+
* Semantic blockquote element for extended quotations and excerpts. Features
|
|
309
|
+
* italic styling and left border for visual distinction. Defaults to blockquote element.
|
|
450
310
|
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
*
|
|
454
|
-
* @
|
|
455
|
-
* ```tsx
|
|
456
|
-
* // Important information
|
|
457
|
-
* <Strong>Important: This action cannot be undone.</Strong>
|
|
458
|
-
*
|
|
459
|
-
* // Critical warning
|
|
460
|
-
* <Strong color="destructive">Error: Invalid credentials provided.</Strong>
|
|
461
|
-
*
|
|
462
|
-
* // In body text
|
|
463
|
-
* <p>
|
|
464
|
-
* Make sure to <Strong>save your changes</Strong> before leaving the page.
|
|
465
|
-
* </p>
|
|
466
|
-
*
|
|
467
|
-
* // Success message
|
|
468
|
-
* <Strong color="success">Account created successfully!</Strong>
|
|
469
|
-
* ```
|
|
470
|
-
*
|
|
471
|
-
* @accessibility
|
|
472
|
-
* - Uses semantic strong element for emphasis
|
|
473
|
-
* - Screen readers understand this as important content
|
|
474
|
-
* - Provides semantic meaning beyond visual styling
|
|
475
|
-
* - Maintains proper emphasis hierarchy in content
|
|
476
|
-
*/
|
|
477
|
-
declare function Strong(props: StrongProps): import("react/jsx-runtime").JSX.Element;
|
|
478
|
-
/** Props for Lead component */
|
|
479
|
-
type LeadProps = Omit<TypographyProps, "as">;
|
|
480
|
-
/**
|
|
481
|
-
* Lead - Introductory paragraph component for article openings
|
|
482
|
-
*
|
|
483
|
-
* Lead paragraph for article introductions, page descriptions, and summary content.
|
|
484
|
-
* Uses "subheading" variant with muted color for visual hierarchy.
|
|
485
|
-
*
|
|
486
|
-
* @example
|
|
487
|
-
* ```tsx
|
|
488
|
-
* // Article introduction
|
|
489
|
-
* <Lead>
|
|
490
|
-
* This comprehensive guide covers everything you need to know about
|
|
491
|
-
* building modern web applications with React and TypeScript.
|
|
492
|
-
* </Lead>
|
|
493
|
-
*
|
|
494
|
-
* // Page description
|
|
495
|
-
* <Lead className="mb-8">
|
|
496
|
-
* Discover powerful APIs and tools to build the next generation
|
|
497
|
-
* of social applications on Farcaster.
|
|
498
|
-
* </Lead>
|
|
499
|
-
*
|
|
500
|
-
* // With custom color
|
|
501
|
-
* <Lead color="default">
|
|
502
|
-
* This lead paragraph uses the default text color for more prominence.
|
|
503
|
-
* </Lead>
|
|
504
|
-
* ```
|
|
505
|
-
*
|
|
506
|
-
* @accessibility
|
|
507
|
-
* - Provides clear content hierarchy for screen readers
|
|
508
|
-
* - Larger text size improves readability for introductory content
|
|
509
|
-
* - Maintains proper document flow and structure
|
|
510
|
-
*/
|
|
511
|
-
declare function Lead({ variant, color, ...props }: LeadProps): import("react/jsx-runtime").JSX.Element;
|
|
512
|
-
/** Props for A anchor component */
|
|
513
|
-
type AProps = Omit<TypographyProps, "as"> & {
|
|
514
|
-
/** Link destination URL */
|
|
515
|
-
href?: string;
|
|
516
|
-
} & React.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
517
|
-
/**
|
|
518
|
-
* A - Anchor component for interactive text links
|
|
519
|
-
*
|
|
520
|
-
* Semantic anchor element for links with built-in hover states and accessibility features.
|
|
521
|
-
* Uses "body" variant with underline and smooth color transitions.
|
|
522
|
-
*
|
|
523
|
-
* @example
|
|
524
|
-
* ```tsx
|
|
525
|
-
* // External link
|
|
526
|
-
* <A href="https://neynar.com" target="_blank" rel="noopener noreferrer">
|
|
527
|
-
* Visit Neynar Website
|
|
528
|
-
* </A>
|
|
529
|
-
*
|
|
530
|
-
* // Internal navigation
|
|
531
|
-
* <A href="/dashboard" color="accent">
|
|
532
|
-
* Go to Dashboard
|
|
533
|
-
* </A>
|
|
534
|
-
*
|
|
535
|
-
* // Composition with Next.js Link
|
|
536
|
-
* <A asChild>
|
|
537
|
-
* <Link href="/about">
|
|
538
|
-
* Learn More About Us
|
|
539
|
-
* </Link>
|
|
540
|
-
* </A>
|
|
541
|
-
*
|
|
542
|
-
* // In paragraph text
|
|
543
|
-
* <P>
|
|
544
|
-
* For more information, <A href="/docs">check our documentation</A> or
|
|
545
|
-
* contact support.
|
|
546
|
-
* </P>
|
|
547
|
-
* ```
|
|
548
|
-
*
|
|
549
|
-
* @accessibility
|
|
550
|
-
* - Uses semantic anchor element for proper link behavior
|
|
551
|
-
* - Includes hover and focus states for interaction feedback
|
|
552
|
-
* - Supports keyboard navigation (Enter key activation)
|
|
553
|
-
* - Maintains color contrast requirements for links
|
|
554
|
-
* - Works with screen reader link navigation modes
|
|
555
|
-
* - Supports external link indicators when needed
|
|
556
|
-
*
|
|
557
|
-
* @see {@link Typography} Base typography component with asChild
|
|
558
|
-
*/
|
|
559
|
-
declare function A({ href, asChild, className, ...props }: AProps): import("react/jsx-runtime").JSX.Element;
|
|
560
|
-
/** Props for Blockquote component */
|
|
561
|
-
type BlockquoteProps = Omit<TypographyProps, "as">;
|
|
562
|
-
/**
|
|
563
|
-
* Blockquote - Quoted text component for citations and excerpts
|
|
564
|
-
*
|
|
565
|
-
* Semantic blockquote element for extended quotations, testimonials, and excerpts.
|
|
566
|
-
* Features italic styling and left border for visual distinction.
|
|
311
|
+
* @param as - HTML element to render @default "blockquote"
|
|
312
|
+
* @param className - Additional Tailwind classes
|
|
313
|
+
* @param children - Content to render
|
|
314
|
+
* @param ...props - All standard HTMLQuoteElement attributes
|
|
567
315
|
*
|
|
568
316
|
* @example
|
|
569
317
|
* ```tsx
|
|
@@ -574,17 +322,15 @@ type BlockquoteProps = Omit<TypographyProps, "as">;
|
|
|
574
322
|
*
|
|
575
323
|
* // With attribution
|
|
576
324
|
* <div>
|
|
577
|
-
* <Blockquote
|
|
578
|
-
* "Building great products requires deep understanding of user needs
|
|
579
|
-
* and technical excellence in equal measure."
|
|
325
|
+
* <Blockquote>
|
|
326
|
+
* "Building great products requires deep understanding of user needs."
|
|
580
327
|
* </Blockquote>
|
|
581
|
-
* <
|
|
328
|
+
* <Caption className="mt-2">— Product Team</Caption>
|
|
582
329
|
* </div>
|
|
583
330
|
*
|
|
584
|
-
* //
|
|
585
|
-
* <Blockquote
|
|
586
|
-
*
|
|
587
|
-
* The developer experience is exceptional."
|
|
331
|
+
* // Custom styling
|
|
332
|
+
* <Blockquote className="bg-muted/50 p-4 rounded-lg">
|
|
333
|
+
* Customer testimonial or feedback.
|
|
588
334
|
* </Blockquote>
|
|
589
335
|
* ```
|
|
590
336
|
*
|
|
@@ -592,16 +338,7 @@ type BlockquoteProps = Omit<TypographyProps, "as">;
|
|
|
592
338
|
* - Uses semantic blockquote element for proper quotation meaning
|
|
593
339
|
* - Screen readers understand this as quoted content
|
|
594
340
|
* - Maintains proper text flow and readability
|
|
595
|
-
* - Supports citation attribution when paired with cite element
|
|
596
|
-
*
|
|
597
|
-
* @see {@link Small} For attribution text
|
|
598
|
-
* @see {@link Typography} Base typography component
|
|
599
|
-
*/
|
|
600
|
-
declare function Blockquote({ className, ...props }: BlockquoteProps): import("react/jsx-runtime").JSX.Element;
|
|
601
|
-
export { Typography, H1, H2, H3, H4, H5, H6, P, Span, Code, Small, Strong, Lead, A, Blockquote, };
|
|
602
|
-
export type { TypographyProps, H1Props, H2Props, H3Props, H4Props, H5Props, H6Props, PProps, SpanProps, CodeProps, SmallProps, StrongProps, LeadProps, AProps, BlockquoteProps, };
|
|
603
|
-
/**
|
|
604
|
-
* Type export for CVA variant props
|
|
605
341
|
*/
|
|
606
|
-
export
|
|
342
|
+
export declare function Blockquote<T extends React.ElementType = "blockquote">({ className, as, ...props }: TypographyProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
343
|
+
export {};
|
|
607
344
|
//# sourceMappingURL=typography.d.ts.map
|