@neynar/ui 0.3.1 → 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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "generated": "2025-10-11T22:49:58.686Z",
2
+ "generated": "2025-10-21T18:40:20.381Z",
3
3
  "sdk": "neynar-sdk-ui",
4
4
  "tier": "ui",
5
5
  "importPrefix": "@neynar/ui",
@@ -2852,89 +2852,88 @@
2852
2852
  "tooltipprovider"
2853
2853
  ]
2854
2854
  },
2855
- "Typography": {
2856
- "description": "Typography - Comprehensive text styling component for consistent design system implementation A flexible typography component that provides semantic text variants, color options, and accessibility features. Built with class-variance-authority (CVA) for type-safe variant management and supports both semantic HTML elements and composition patterns via Radix UI Slot. Designed to handle all text styling needs across the application with consistent visual hierarchy and accessibility compliance.",
2857
- "file": "typography.llm.md",
2855
+ "PageTitle": {
2856
+ "description": "PageTitle - Primary page heading component The main heading for a page, typically used once per page. Uses text-3xl (30px) which is appropriate for web application page titles. Defaults to h1 element.",
2857
+ "file": "page-title.llm.md",
2858
2858
  "type": "component",
2859
2859
  "keywords": [
2860
2860
  "component",
2861
- "typography"
2861
+ "page title",
2862
+ "pagetitle"
2862
2863
  ]
2863
2864
  },
2864
- "H1": {
2865
- "description": "H1 - Primary page heading component The main heading for a page or major section. Uses the \"displayTitle\" variant with h1 semantic element. Should be used once per page for proper document outline and SEO.",
2866
- "file": "h1.llm.md",
2865
+ "SectionTitle": {
2866
+ "description": "SectionTitle - Secondary section heading component Section headings that divide page content into logical groups. Uses text-2xl (24px) for clear hierarchy below PageTitle. Defaults to h2 element.",
2867
+ "file": "section-title.llm.md",
2867
2868
  "type": "component",
2868
2869
  "keywords": [
2869
2870
  "component",
2870
- "h1"
2871
+ "section title",
2872
+ "sectiontitle"
2871
2873
  ]
2872
2874
  },
2873
- "H2": {
2874
- "description": "H2 - Secondary section heading component Section headings that divide page content into logical groups. Uses the \"sectionTitle\" variant with h2 semantic element. Essential for creating proper document hierarchy.",
2875
- "file": "h2.llm.md",
2875
+ "SubsectionTitle": {
2876
+ "description": "SubsectionTitle - Tertiary subsection heading component Subsection headings for further content division. Uses text-xl (20px) for subtle distinction from SectionTitle. Defaults to h3 element.",
2877
+ "file": "subsection-title.llm.md",
2876
2878
  "type": "component",
2877
2879
  "keywords": [
2878
2880
  "component",
2879
- "h2"
2881
+ "subsection title",
2882
+ "subsectiontitle"
2880
2883
  ]
2881
2884
  },
2882
- "H3": {
2883
- "description": "H3 - Tertiary subsection heading component Subsection headings for further content division. Uses the \"headline\" variant with h3 semantic element for consistent visual hierarchy.",
2884
- "file": "h3.llm.md",
2885
+ "BodyText": {
2886
+ "description": "BodyText - Primary paragraph text component Standard paragraph element for readable body text. Uses text-base (16px) with relaxed line height for optimal readability. Defaults to p element.",
2887
+ "file": "body-text.llm.md",
2885
2888
  "type": "component",
2886
2889
  "keywords": [
2887
- "component",
2888
- "h3"
2889
- ]
2890
- },
2891
- "H4": {
2892
- "description": "H4 - Minor heading component for detailed sections Minor headings for detailed content organization. Uses \"subHeadline\" variant with h4 semantic element for subtle but distinct hierarchy.",
2893
- "file": "h4.llm.md",
2894
- "type": "component",
2895
- "keywords": [
2896
- "component",
2897
- "h4"
2890
+ "body text",
2891
+ "bodytext",
2892
+ "component"
2898
2893
  ]
2899
2894
  },
2900
- "H5": {
2901
- "description": "H5 - Small heading component for micro-sections Small headings for very specific content divisions. Uses \"eyebrow\" variant with h5 semantic element.",
2902
- "file": "h5.llm.md",
2895
+ "BodyTextLarge": {
2896
+ "description": "BodyTextLarge - Emphasized body text component Larger body text for lead paragraphs and emphasized content. Uses text-lg (18px) with relaxed line height. Defaults to p element.",
2897
+ "file": "body-text-large.llm.md",
2903
2898
  "type": "component",
2904
2899
  "keywords": [
2905
- "component",
2906
- "h5"
2900
+ "body text large",
2901
+ "bodytextlarge",
2902
+ "component"
2907
2903
  ]
2908
2904
  },
2909
- "H6": {
2910
- "description": "H6 - Smallest heading component for minimal emphasis The smallest semantic heading level. Uses \"details\" variant with h6 element for minimal but semantic emphasis.",
2911
- "file": "h6.llm.md",
2905
+ "BodyTextSmall": {
2906
+ "description": "BodyTextSmall - De-emphasized body text component Smaller body text for less prominent content. Uses text-sm (14px) with normal line height. Defaults to p element.",
2907
+ "file": "body-text-small.llm.md",
2912
2908
  "type": "component",
2913
2909
  "keywords": [
2914
- "component",
2915
- "h6"
2910
+ "body text small",
2911
+ "bodytextsmall",
2912
+ "component"
2916
2913
  ]
2917
2914
  },
2918
- "P": {
2919
- "description": "P - Paragraph component for body text content Standard paragraph element for readable body text. Uses \"body\" variant with p semantic element. Optimized for readability with appropriate line height and font size.",
2920
- "file": "p.llm.md",
2915
+ "Caption": {
2916
+ "description": "Caption - Small supplementary text component Small text for metadata, timestamps, and supplementary information. Uses text-sm (14px) with muted color. Defaults to span element for inline usage.",
2917
+ "file": "caption.llm.md",
2921
2918
  "type": "component",
2922
2919
  "keywords": [
2920
+ "caption",
2923
2921
  "component",
2924
- "p"
2922
+ "format"
2925
2923
  ]
2926
2924
  },
2927
- "Span": {
2928
- "description": "Span - Inline text component for text fragments and styling Generic inline element for styling text fragments within other content. Supports all typography variants while maintaining inline display behavior.",
2929
- "file": "span.llm.md",
2925
+ "Overline": {
2926
+ "description": "Overline - Small uppercase label component Small uppercase text for category tags and eyebrow labels. Uses text-xs (12px) with uppercase transformation and wide tracking. Defaults to span element.",
2927
+ "file": "overline.llm.md",
2930
2928
  "type": "component",
2931
2929
  "keywords": [
2932
2930
  "component",
2933
- "span"
2931
+ "format",
2932
+ "overline"
2934
2933
  ]
2935
2934
  },
2936
2935
  "Code": {
2937
- "description": "Code - Inline code component for technical content Semantic code element for inline code snippets, variable names, and technical references. Uses monospace font and \"code\" variant for clear distinction from regular text.",
2936
+ "description": "Code - Inline code component Monospace text for inline code snippets and technical references. Uses text-sm with monospace font and subtle background. Defaults to code element.",
2938
2937
  "file": "code.llm.md",
2939
2938
  "type": "component",
2940
2939
  "keywords": [
@@ -2942,45 +2941,8 @@
2942
2941
  "component"
2943
2942
  ]
2944
2943
  },
2945
- "Small": {
2946
- "description": "Small - Fine print component for supplementary information Semantic small element for fine print, disclaimers, timestamps, and supplementary information. Uses \"microcopy\" variant for reduced visual prominence while maintaining readability.",
2947
- "file": "small.llm.md",
2948
- "type": "component",
2949
- "keywords": [
2950
- "component",
2951
- "format",
2952
- "small"
2953
- ]
2954
- },
2955
- "Strong": {
2956
- "description": "Strong - Emphasized text component for important content Semantic strong element for text that needs strong emphasis or importance. Uses \"bodyEmphasized\" variant with strong semantic meaning.",
2957
- "file": "strong.llm.md",
2958
- "type": "component",
2959
- "keywords": [
2960
- "component",
2961
- "strong"
2962
- ]
2963
- },
2964
- "Lead": {
2965
- "description": "Lead - Introductory paragraph component for article openings Lead paragraph for article introductions, page descriptions, and summary content. Uses \"subheading\" variant with muted color for visual hierarchy.",
2966
- "file": "lead.llm.md",
2967
- "type": "component",
2968
- "keywords": [
2969
- "component",
2970
- "lead"
2971
- ]
2972
- },
2973
- "A": {
2974
- "description": "A - Anchor component for interactive text links Semantic anchor element for links with built-in hover states and accessibility features. Uses \"body\" variant with underline and smooth color transitions.",
2975
- "file": "a.llm.md",
2976
- "type": "component",
2977
- "keywords": [
2978
- "a",
2979
- "component"
2980
- ]
2981
- },
2982
2944
  "Blockquote": {
2983
- "description": "Blockquote - Quoted text component for citations and excerpts Semantic blockquote element for extended quotations, testimonials, and excerpts. Features italic styling and left border for visual distinction.",
2945
+ "description": "Blockquote - Quoted text component Semantic blockquote element for extended quotations and excerpts. Features italic styling and left border for visual distinction. Defaults to blockquote element.",
2984
2946
  "file": "blockquote.llm.md",
2985
2947
  "type": "component",
2986
2948
  "keywords": [
@@ -0,0 +1,48 @@
1
+ # SectionTitle
2
+
3
+ **Type**: component
4
+
5
+ SectionTitle - Secondary section heading component Section headings that divide page content into logical groups. Uses text-2xl (24px) for clear hierarchy below PageTitle. Defaults to h2 element.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { SectionTitle } from '@neynar/ui';
11
+
12
+ <SectionTitle
13
+ as={value}
14
+ className="value"
15
+ >
16
+ {/* Your content here */}
17
+ </SectionTitle>
18
+ ```
19
+
20
+ ## Component Props
21
+
22
+ ### as
23
+ - **Type**: `React.ElementType`
24
+ - **Required**: No
25
+ - **Description**: HTML element to render
26
+
27
+ ### className
28
+ - **Type**: `string`
29
+ - **Required**: No
30
+ - **Description**: Additional Tailwind classes
31
+
32
+ ### children
33
+ - **Type**: `React.ReactNode`
34
+ - **Required**: No
35
+ - **Description**: Content to render
36
+
37
+ ## Examples
38
+
39
+ ```tsx
40
+ // Default usage
41
+ <SectionTitle>Recent Activity</SectionTitle>
42
+ // With custom color
43
+ <SectionTitle className="text-accent">
44
+ Featured Section
45
+ </SectionTitle>
46
+ // As h3 element
47
+ <SectionTitle as="h3">Subsection Title</SectionTitle>
48
+ ```
@@ -0,0 +1,46 @@
1
+ # SubsectionTitle
2
+
3
+ **Type**: component
4
+
5
+ SubsectionTitle - Tertiary subsection heading component Subsection headings for further content division. Uses text-xl (20px) for subtle distinction from SectionTitle. Defaults to h3 element.
6
+
7
+ ## JSX Usage
8
+
9
+ ```jsx
10
+ import { SubsectionTitle } from '@neynar/ui';
11
+
12
+ <SubsectionTitle
13
+ as={value}
14
+ className="value"
15
+ >
16
+ {/* Your content here */}
17
+ </SubsectionTitle>
18
+ ```
19
+
20
+ ## Component Props
21
+
22
+ ### as
23
+ - **Type**: `React.ElementType`
24
+ - **Required**: No
25
+ - **Description**: HTML element to render
26
+
27
+ ### className
28
+ - **Type**: `string`
29
+ - **Required**: No
30
+ - **Description**: Additional Tailwind classes
31
+
32
+ ### children
33
+ - **Type**: `React.ReactNode`
34
+ - **Required**: No
35
+ - **Description**: Content to render
36
+
37
+ ## Examples
38
+
39
+ ```tsx
40
+ // Default usage
41
+ <SubsectionTitle>Configuration Options</SubsectionTitle>
42
+ // With custom styling
43
+ <SubsectionTitle className="text-muted-foreground">
44
+ Optional Settings
45
+ </SubsectionTitle>
46
+ ```
@@ -1,16 +1,14 @@
1
1
  import type { StoryObj } from "@storybook/react-vite";
2
- import { Typography } from "../typography";
2
+ import { PageTitle } from "../typography";
3
3
  /**
4
4
  * Typography component stories for design system documentation
5
5
  *
6
- * This story file demonstrates the Typography component's capabilities through three focused stories:
7
- * - Interactive: Playground for testing all props and variants
8
- * - Variants: Systematic showcase of all available typography variants
9
- * - InContext: Real-world usage examples for business and design teams
6
+ * This story file demonstrates purpose-named typography components following 2025 best practices.
7
+ * Components are Tailwind-first with semantic HTML defaults and zero abstraction.
10
8
  */
11
9
  declare const meta: {
12
10
  title: string;
13
- component: typeof Typography;
11
+ component: typeof PageTitle;
14
12
  parameters: {
15
13
  layout: string;
16
14
  docs: {
@@ -19,118 +17,20 @@ declare const meta: {
19
17
  };
20
18
  };
21
19
  };
22
- argTypes: {
23
- variant: {
24
- control: {
25
- type: "select";
26
- };
27
- options: string[];
28
- description: string;
29
- };
30
- color: {
31
- control: {
32
- type: "select";
33
- };
34
- options: string[];
35
- description: string;
36
- };
37
- align: {
38
- control: {
39
- type: "select";
40
- };
41
- options: string[];
42
- description: string;
43
- };
44
- transform: {
45
- control: {
46
- type: "select";
47
- };
48
- options: string[];
49
- description: string;
50
- };
51
- weight: {
52
- control: {
53
- type: "select";
54
- };
55
- options: string[];
56
- description: string;
57
- };
58
- as: {
59
- control: {
60
- type: "select";
61
- };
62
- options: string[];
63
- description: string;
64
- };
65
- asChild: {
66
- control: {
67
- type: "boolean";
68
- };
69
- description: string;
70
- };
71
- italic: {
72
- control: {
73
- type: "boolean";
74
- };
75
- description: string;
76
- };
77
- underline: {
78
- control: {
79
- type: "boolean";
80
- };
81
- description: string;
82
- };
83
- strikethrough: {
84
- control: {
85
- type: "boolean";
86
- };
87
- description: string;
88
- };
89
- truncate: {
90
- control: {
91
- type: "boolean";
92
- };
93
- description: string;
94
- };
95
- srOnly: {
96
- control: {
97
- type: "boolean";
98
- };
99
- description: string;
100
- };
101
- children: {
102
- control: {
103
- type: "text";
104
- };
105
- description: string;
106
- };
107
- };
108
20
  };
109
21
  export default meta;
110
22
  type Story = StoryObj<typeof meta>;
111
23
  /**
112
- * Interactive playground for testing all Typography component features.
113
- * Use controls to experiment with different combinations of props.
24
+ * Interactive playground for testing Typography components.
114
25
  */
115
26
  export declare const Interactive: Story;
116
27
  /**
117
- * Systematic showcase of all typography variants with consistent content.
118
- * Demonstrates the visual hierarchy and size relationships between variants.
28
+ * Systematic showcase of all typography components.
29
+ * Demonstrates the visual hierarchy and appropriate sizing for web applications.
119
30
  */
120
- export declare const Variants: Story;
31
+ export declare const AllComponents: Story;
121
32
  /**
122
33
  * Real-world usage examples demonstrating Typography in practical scenarios.
123
- * Shows how to combine variants with semantic HTML and accessibility features.
124
34
  */
125
35
  export declare const InContext: Story;
126
- /**
127
- * Showcase of individual semantic typography components for better TypeScript support.
128
- * Demonstrates the recommended approach using semantic components vs generic Typography.
129
- */
130
- export declare const SemanticComponents: Story;
131
- /**
132
- * Complete reference table of all semantic typography components with their defaults and usage.
133
- * Provides a comprehensive overview for developers to quickly understand each component.
134
- */
135
- export declare const ComponentReference: Story;
136
36
  //# sourceMappingURL=typography.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typography.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/stories/typography.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,UAAU,EAeX,MAAM,eAAe,CAAC;AAUvB;;;;;;;GAOG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GyB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAezB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAqItB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAyQvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KA+PhC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAmxBhC,CAAC"}
1
+ {"version":3,"file":"typography.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/stories/typography.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,SAAS,EAUV,MAAM,eAAe,CAAC;AASvB;;;;;GAKG;AACH,QAAA,MAAM,IAAI;;;;;;;;;;;CAYwB,CAAC;AAEnC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAUzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAoF3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,KAoOvB,CAAC"}