@foundrykit/blocks 0.1.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.
@@ -0,0 +1,18 @@
1
+
2
+ 
3
+ > @foundrykit/blocks@0.1.0 build /Users/isaacsneddon-jenkins/Desktop/projects/umi/projects/foundrykit/packages/blocks
4
+ > tsup
5
+
6
+ CLI Building entry: src/index.ts
7
+ CLI Using tsconfig: tsconfig.json
8
+ CLI tsup v8.5.0
9
+ CLI Using tsup config: /Users/isaacsneddon-jenkins/Desktop/projects/umi/projects/foundrykit/packages/blocks/tsup.config.ts
10
+ CLI Target: es2022
11
+ CLI Cleaning output folder
12
+ ESM Build start
13
+ ESM dist/index.js 6.97 KB
14
+ ESM dist/index.js.map 10.79 KB
15
+ ESM ⚡️ Build success in 13ms
16
+ DTS Build start
17
+ DTS ⚡️ Build success in 1270ms
18
+ DTS dist/index.d.ts 1.30 KB
@@ -0,0 +1,5 @@
1
+
2
+ 
3
+ > @foundrykit/blocks@0.1.0 type-check /Users/isaacsneddon-jenkins/Desktop/projects/umi/projects/foundrykit/packages/blocks
4
+ > tsc --noEmit
5
+
package/README.md ADDED
@@ -0,0 +1,277 @@
1
+ # @foundrykit/blocks
2
+
3
+ A collection of pre-built page sections and content blocks for rapid website development. These blocks provide complete, customizable sections that can be easily integrated into any page layout.
4
+
5
+ ## Features
6
+
7
+ - **Complete page sections** - Ready-to-use blocks for common page layouts
8
+ - **Highly customizable** - Easy to modify content, styling, and behavior
9
+ - **Responsive design** - Mobile-first responsive layouts
10
+ - **Accessible** - Built with accessibility best practices
11
+ - **TypeScript support** - Full type safety for all block props
12
+ - **SEO optimized** - Proper semantic HTML and meta tags
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ pnpm add @foundrykit/blocks
18
+ ```
19
+
20
+ ## Available Blocks
21
+
22
+ ### Hero Sections
23
+ - **HeroMinimal** - Clean, minimal hero section with title and CTA
24
+ - **HeroWithImage** - Hero section with background image
25
+ - **HeroWithVideo** - Hero section with video background
26
+
27
+ ### Content Sections
28
+ - **Testimonials** - Customer testimonial carousel
29
+ - **Pricing** - Pricing table with multiple tiers
30
+ - **Features** - Feature showcase with icons and descriptions
31
+ - **FAQ** - Frequently asked questions accordion
32
+
33
+ ### Marketing Sections
34
+ - **Newsletter** - Email newsletter signup form
35
+ - **CTA** - Call-to-action section
36
+ - **SocialProof** - Social proof with logos and stats
37
+
38
+ ## Usage
39
+
40
+ ### Basic Example
41
+
42
+ ```tsx
43
+ import { HeroMinimal, Testimonials, Pricing } from '@foundrykit/blocks'
44
+
45
+ function HomePage() {
46
+ return (
47
+ <div>
48
+ <HeroMinimal
49
+ title="Build amazing websites"
50
+ subtitle="Create beautiful, responsive websites with our component library"
51
+ ctaText="Get Started"
52
+ ctaHref="/signup"
53
+ />
54
+
55
+ <Testimonials
56
+ testimonials={[
57
+ {
58
+ name: "John Doe",
59
+ role: "CEO",
60
+ company: "Tech Corp",
61
+ content: "Amazing product that saved us months of development time."
62
+ }
63
+ ]}
64
+ />
65
+
66
+ <Pricing
67
+ plans={[
68
+ {
69
+ name: "Starter",
70
+ price: "$9",
71
+ features: ["Feature 1", "Feature 2"]
72
+ }
73
+ ]}
74
+ />
75
+ </div>
76
+ )
77
+ }
78
+ ```
79
+
80
+ ### Customizing Blocks
81
+
82
+ ```tsx
83
+ import { HeroMinimal } from '@foundrykit/blocks'
84
+
85
+ function CustomHero() {
86
+ return (
87
+ <HeroMinimal
88
+ title="Custom Title"
89
+ subtitle="Custom subtitle text"
90
+ ctaText="Custom Button"
91
+ ctaHref="/custom-link"
92
+ className="bg-gradient-to-r from-blue-500 to-purple-600"
93
+ titleClassName="text-4xl font-bold text-white"
94
+ subtitleClassName="text-xl text-gray-200"
95
+ />
96
+ )
97
+ }
98
+ ```
99
+
100
+ ### Block Configuration
101
+
102
+ Each block can be configured through its config file:
103
+
104
+ ```tsx
105
+ import { Testimonials } from '@foundrykit/blocks'
106
+
107
+ // Use default configuration
108
+ <Testimonials testimonials={data} />
109
+
110
+ // Override with custom configuration
111
+ <Testimonials
112
+ testimonials={data}
113
+ autoPlay={false}
114
+ showDots={true}
115
+ className="my-custom-styles"
116
+ />
117
+ ```
118
+
119
+ ## Block Structure
120
+
121
+ Each block is organized as follows:
122
+
123
+ ```
124
+ block/
125
+ ├── config.ts # Block configuration and variants
126
+ ├── index.tsx # Main block component
127
+ ├── variants-grid.tsx # Block variants for documentation
128
+ └── README.md # Block-specific documentation
129
+ ```
130
+
131
+ ## Content Management
132
+
133
+ ### Dynamic Content
134
+
135
+ Blocks support dynamic content through props:
136
+
137
+ ```tsx
138
+ import { Testimonials } from '@foundrykit/blocks'
139
+
140
+ function DynamicTestimonials({ testimonials }) {
141
+ return (
142
+ <Testimonials
143
+ testimonials={testimonials}
144
+ title="What our customers say"
145
+ subtitle="Real feedback from real users"
146
+ />
147
+ )
148
+ }
149
+ ```
150
+
151
+ ### CMS Integration
152
+
153
+ Blocks are designed to work with headless CMS systems:
154
+
155
+ ```tsx
156
+ import { HeroMinimal } from '@foundrykit/blocks'
157
+
158
+ function CMSHero({ cmsData }) {
159
+ return (
160
+ <HeroMinimal
161
+ title={cmsData.title}
162
+ subtitle={cmsData.subtitle}
163
+ ctaText={cmsData.ctaText}
164
+ ctaHref={cmsData.ctaLink}
165
+ backgroundImage={cmsData.backgroundImage}
166
+ />
167
+ )
168
+ }
169
+ ```
170
+
171
+ ## Styling and Theming
172
+
173
+ ### Theme Integration
174
+
175
+ Blocks automatically use your theme tokens:
176
+
177
+ ```tsx
178
+ import { Pricing } from '@foundrykit/blocks'
179
+
180
+ // Automatically uses theme colors and spacing
181
+ <Pricing
182
+ plans={plans}
183
+ className="bg-background text-foreground"
184
+ />
185
+ ```
186
+
187
+ ### Custom Styling
188
+
189
+ Override default styles with custom classes:
190
+
191
+ ```tsx
192
+ import { Testimonials } from '@foundrykit/blocks'
193
+ import { cn } from '@foundrykit/utils'
194
+
195
+ function StyledTestimonials({ className, ...props }) {
196
+ return (
197
+ <Testimonials
198
+ className={cn(
199
+ "bg-gradient-to-br from-blue-50 to-indigo-100",
200
+ "border border-blue-200 rounded-xl",
201
+ className
202
+ )}
203
+ {...props}
204
+ />
205
+ )
206
+ }
207
+ ```
208
+
209
+ ## Responsive Design
210
+
211
+ All blocks are mobile-first and responsive:
212
+
213
+ ```tsx
214
+ import { HeroMinimal } from '@foundrykit/blocks'
215
+
216
+ // Automatically responsive
217
+ <HeroMinimal
218
+ title="Responsive Title"
219
+ subtitle="This block looks great on all devices"
220
+ className="
221
+ text-center md:text-left
222
+ px-4 md:px-8 lg:px-16
223
+ py-8 md:py-12 lg:py-20
224
+ "
225
+ />
226
+ ```
227
+
228
+ ## Accessibility
229
+
230
+ Blocks include comprehensive accessibility features:
231
+
232
+ - Semantic HTML structure
233
+ - Proper ARIA attributes
234
+ - Keyboard navigation support
235
+ - Screen reader compatibility
236
+ - Color contrast compliance
237
+ - Focus management
238
+
239
+ ## Performance
240
+
241
+ ### Optimized Rendering
242
+
243
+ - Lazy loading for images and videos
244
+ - Optimized bundle sizes
245
+ - Efficient re-rendering
246
+ - Minimal JavaScript overhead
247
+
248
+ ### SEO Optimization
249
+
250
+ - Proper heading hierarchy
251
+ - Meta tag support
252
+ - Structured data markup
253
+ - Fast loading times
254
+
255
+ ## Dependencies
256
+
257
+ - **@foundrykit/primitives** - Base UI components
258
+ - **@foundrykit/components** - Higher-level components
259
+ - **@foundrykit/animation** - Animation utilities
260
+ - **React** - UI framework
261
+ - **TypeScript** - Type safety
262
+
263
+ ## Contributing
264
+
265
+ When adding new blocks:
266
+
267
+ 1. Follow the established block structure
268
+ 2. Ensure mobile-first responsive design
269
+ 3. Include comprehensive accessibility features
270
+ 4. Add TypeScript definitions
271
+ 5. Provide usage examples
272
+ 6. Test across different screen sizes
273
+ 7. Update this README
274
+
275
+ ## License
276
+
277
+ MIT
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema.json",
3
+ "style": "new-york",
4
+ "rsc": true,
5
+ "tsx": true,
6
+ "tailwind": {
7
+ "config": "",
8
+ "css": "src/styles/globals.css",
9
+ "baseColor": "neutral",
10
+ "cssVariables": true
11
+ },
12
+ "iconLibrary": "lucide",
13
+ "aliases": {
14
+ "components": "@workspace/ui/components",
15
+ "utils": "@workspace/ui/lib/utils",
16
+ "hooks": "@workspace/ui/hooks",
17
+ "lib": "@workspace/ui/lib",
18
+ "ui": "@workspace/ui/components"
19
+ }
20
+ }
@@ -0,0 +1,47 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ export { cn } from '@foundrykit/utils';
3
+
4
+ interface HeroMinimalProps {
5
+ title?: string;
6
+ description?: string;
7
+ primaryCta?: string;
8
+ secondaryCta?: string;
9
+ onPrimaryClick?: () => void;
10
+ onSecondaryClick?: () => void;
11
+ className?: string;
12
+ }
13
+ declare function HeroMinimal({ title, description, primaryCta, secondaryCta, onPrimaryClick, onSecondaryClick, className, }: HeroMinimalProps): react_jsx_runtime.JSX.Element;
14
+
15
+ interface PricingTier {
16
+ name: string;
17
+ price: string;
18
+ description: string;
19
+ features: string[];
20
+ popular?: boolean;
21
+ cta: string;
22
+ }
23
+ interface PricingProps {
24
+ tiers: PricingTier[];
25
+ title?: string;
26
+ subtitle?: string;
27
+ className?: string;
28
+ }
29
+ declare function Pricing({ tiers, title, subtitle, className, }: PricingProps): react_jsx_runtime.JSX.Element;
30
+
31
+ interface Testimonial {
32
+ name: string;
33
+ role: string;
34
+ company: string;
35
+ content: string;
36
+ avatar?: string;
37
+ rating?: number;
38
+ }
39
+ interface TestimonialsProps {
40
+ testimonials: Testimonial[];
41
+ title?: string;
42
+ subtitle?: string;
43
+ className?: string;
44
+ }
45
+ declare function Testimonials({ testimonials, title, subtitle, className, }: TestimonialsProps): react_jsx_runtime.JSX.Element;
46
+
47
+ export { HeroMinimal, Pricing, Testimonials };
package/dist/index.js ADDED
@@ -0,0 +1,148 @@
1
+ // src/components/hero-minimal/index.tsx
2
+ import { Button } from "@foundrykit/primitives";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ function HeroMinimal({
5
+ title = "Welcome to FoundryKit",
6
+ description = "Build beautiful, accessible React components with our comprehensive design system. Fast, flexible, and ready for production.",
7
+ primaryCta = "Get Started",
8
+ secondaryCta = "Learn More",
9
+ onPrimaryClick,
10
+ onSecondaryClick,
11
+ className
12
+ }) {
13
+ return /* @__PURE__ */ jsx("section", { className: `w-full py-12 md:py-24 lg:py-32 ${className}`, children: /* @__PURE__ */ jsx("div", { className: "container px-4 md:px-6", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center space-y-4 text-center", children: [
14
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
15
+ /* @__PURE__ */ jsx("h1", { className: "text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl lg:text-6xl/none", children: title }),
16
+ /* @__PURE__ */ jsx("p", { className: "mx-auto max-w-[700px] text-gray-500 md:text-xl dark:text-gray-400", children: description })
17
+ ] }),
18
+ /* @__PURE__ */ jsxs("div", { className: "space-x-4", children: [
19
+ /* @__PURE__ */ jsx(Button, { onClick: onPrimaryClick, children: primaryCta }),
20
+ /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: onSecondaryClick, children: secondaryCta })
21
+ ] })
22
+ ] }) }) });
23
+ }
24
+
25
+ // src/components/pricing/index.tsx
26
+ import { Check } from "lucide-react";
27
+ import { Button as Button2 } from "@foundrykit/primitives";
28
+ import {
29
+ Card,
30
+ CardContent,
31
+ CardDescription,
32
+ CardHeader,
33
+ CardTitle
34
+ } from "@foundrykit/primitives";
35
+ import { Badge } from "@foundrykit/primitives";
36
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
37
+ function Pricing({
38
+ tiers,
39
+ title = "Simple, transparent pricing",
40
+ subtitle = "Choose the plan that's right for you",
41
+ className
42
+ }) {
43
+ return /* @__PURE__ */ jsx2("section", { className: `w-full py-12 md:py-24 lg:py-32 ${className}`, children: /* @__PURE__ */ jsxs2("div", { className: "container px-4 md:px-6", children: [
44
+ /* @__PURE__ */ jsx2("div", { className: "flex flex-col items-center space-y-4 text-center", children: /* @__PURE__ */ jsxs2("div", { className: "space-y-2", children: [
45
+ /* @__PURE__ */ jsx2("h2", { className: "text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl", children: title }),
46
+ /* @__PURE__ */ jsx2("p", { className: "mx-auto max-w-[700px] text-gray-500 md:text-xl dark:text-gray-400", children: subtitle })
47
+ ] }) }),
48
+ /* @__PURE__ */ jsx2("div", { className: "mx-auto mt-8 grid max-w-5xl grid-cols-1 gap-6 md:grid-cols-3 lg:gap-8", children: tiers.map((tier, index) => /* @__PURE__ */ jsxs2(
49
+ Card,
50
+ {
51
+ className: `relative ${tier.popular ? "border-primary shadow-lg" : ""}`,
52
+ children: [
53
+ tier.popular && /* @__PURE__ */ jsx2(Badge, { className: "absolute -top-3 left-1/2 -translate-x-1/2", children: "Most Popular" }),
54
+ /* @__PURE__ */ jsxs2(CardHeader, { children: [
55
+ /* @__PURE__ */ jsx2(CardTitle, { children: tier.name }),
56
+ /* @__PURE__ */ jsx2(CardDescription, { children: tier.description }),
57
+ /* @__PURE__ */ jsx2("div", { className: "mt-4", children: /* @__PURE__ */ jsx2("span", { className: "text-4xl font-bold", children: tier.price }) })
58
+ ] }),
59
+ /* @__PURE__ */ jsxs2(CardContent, { children: [
60
+ /* @__PURE__ */ jsx2("ul", { className: "space-y-3", children: tier.features.map((feature, featureIndex) => /* @__PURE__ */ jsxs2(
61
+ "li",
62
+ {
63
+ className: "flex items-center space-x-2",
64
+ children: [
65
+ /* @__PURE__ */ jsx2(Check, { className: "h-4 w-4 text-green-500" }),
66
+ /* @__PURE__ */ jsx2("span", { className: "text-sm", children: feature })
67
+ ]
68
+ },
69
+ featureIndex
70
+ )) }),
71
+ /* @__PURE__ */ jsx2(
72
+ Button2,
73
+ {
74
+ className: "mt-6 w-full",
75
+ variant: tier.popular ? "default" : "outline",
76
+ children: tier.cta
77
+ }
78
+ )
79
+ ] })
80
+ ]
81
+ },
82
+ index
83
+ )) })
84
+ ] }) });
85
+ }
86
+
87
+ // src/components/testimonials/index.tsx
88
+ import { Star } from "lucide-react";
89
+ import { Avatar, AvatarFallback, AvatarImage } from "@foundrykit/primitives";
90
+ import { Card as Card2, CardContent as CardContent2 } from "@foundrykit/primitives";
91
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
92
+ function Testimonials({
93
+ testimonials,
94
+ title = "What our customers say",
95
+ subtitle = "Don't just take our word for it",
96
+ className
97
+ }) {
98
+ return /* @__PURE__ */ jsx3("section", { className: `w-full py-12 md:py-24 lg:py-32 ${className}`, children: /* @__PURE__ */ jsxs3("div", { className: "container px-4 md:px-6", children: [
99
+ /* @__PURE__ */ jsx3("div", { className: "flex flex-col items-center space-y-4 text-center", children: /* @__PURE__ */ jsxs3("div", { className: "space-y-2", children: [
100
+ /* @__PURE__ */ jsx3("h2", { className: "text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl", children: title }),
101
+ /* @__PURE__ */ jsx3("p", { className: "mx-auto max-w-[700px] text-gray-500 md:text-xl dark:text-gray-400", children: subtitle })
102
+ ] }) }),
103
+ /* @__PURE__ */ jsx3("div", { className: "mx-auto mt-8 grid max-w-5xl grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3", children: testimonials.map((testimonial, index) => /* @__PURE__ */ jsx3(Card2, { className: "relative", children: /* @__PURE__ */ jsxs3(CardContent2, { className: "p-6", children: [
104
+ testimonial.rating && /* @__PURE__ */ jsx3("div", { className: "mb-4 flex items-center space-x-1", children: Array.from({ length: testimonial.rating }).map((_, i) => /* @__PURE__ */ jsx3(
105
+ Star,
106
+ {
107
+ className: "h-4 w-4 fill-yellow-400 text-yellow-400"
108
+ },
109
+ i
110
+ )) }),
111
+ /* @__PURE__ */ jsxs3("blockquote", { className: "mb-4 text-sm leading-relaxed", children: [
112
+ '"',
113
+ testimonial.content,
114
+ '"'
115
+ ] }),
116
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center space-x-3", children: [
117
+ /* @__PURE__ */ jsxs3(Avatar, { children: [
118
+ /* @__PURE__ */ jsx3(
119
+ AvatarImage,
120
+ {
121
+ src: testimonial.avatar,
122
+ alt: testimonial.name
123
+ }
124
+ ),
125
+ /* @__PURE__ */ jsx3(AvatarFallback, { children: testimonial.name.split(" ").map((n) => n[0]).join("") })
126
+ ] }),
127
+ /* @__PURE__ */ jsxs3("div", { children: [
128
+ /* @__PURE__ */ jsx3("div", { className: "font-semibold", children: testimonial.name }),
129
+ /* @__PURE__ */ jsxs3("div", { className: "text-muted-foreground text-sm", children: [
130
+ testimonial.role,
131
+ " at ",
132
+ testimonial.company
133
+ ] })
134
+ ] })
135
+ ] })
136
+ ] }) }, index)) })
137
+ ] }) });
138
+ }
139
+
140
+ // src/index.ts
141
+ import { cn } from "@foundrykit/utils";
142
+ export {
143
+ HeroMinimal,
144
+ Pricing,
145
+ Testimonials,
146
+ cn
147
+ };
148
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/hero-minimal/index.tsx","../src/components/pricing/index.tsx","../src/components/testimonials/index.tsx","../src/index.ts"],"sourcesContent":["import { Button } from '@foundrykit/primitives';\n\nexport interface HeroMinimalProps {\n title?: string;\n description?: string;\n primaryCta?: string;\n secondaryCta?: string;\n onPrimaryClick?: () => void;\n onSecondaryClick?: () => void;\n className?: string;\n}\n\nexport function HeroMinimal({\n title = 'Welcome to FoundryKit',\n description = 'Build beautiful, accessible React components with our comprehensive design system. Fast, flexible, and ready for production.',\n primaryCta = 'Get Started',\n secondaryCta = 'Learn More',\n onPrimaryClick,\n onSecondaryClick,\n className,\n}: HeroMinimalProps) {\n return (\n <section className={`w-full py-12 md:py-24 lg:py-32 ${className}`}>\n <div className='container px-4 md:px-6'>\n <div className='flex flex-col items-center space-y-4 text-center'>\n <div className='space-y-2'>\n <h1 className='text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl lg:text-6xl/none'>\n {title}\n </h1>\n <p className='mx-auto max-w-[700px] text-gray-500 md:text-xl dark:text-gray-400'>\n {description}\n </p>\n </div>\n <div className='space-x-4'>\n <Button onClick={onPrimaryClick}>{primaryCta}</Button>\n <Button variant='outline' onClick={onSecondaryClick}>\n {secondaryCta}\n </Button>\n </div>\n </div>\n </div>\n </section>\n );\n}\n","import { Check } from 'lucide-react';\n\nimport { Button } from '@foundrykit/primitives';\nimport {\n Card,\n CardContent,\n CardDescription,\n CardHeader,\n CardTitle,\n} from '@foundrykit/primitives';\nimport { Badge } from '@foundrykit/primitives';\n\nexport interface PricingTier {\n name: string;\n price: string;\n description: string;\n features: string[];\n popular?: boolean;\n cta: string;\n}\n\nexport interface PricingProps {\n tiers: PricingTier[];\n title?: string;\n subtitle?: string;\n className?: string;\n}\n\nexport function Pricing({\n tiers,\n title = 'Simple, transparent pricing',\n subtitle = \"Choose the plan that's right for you\",\n className,\n}: PricingProps) {\n return (\n <section className={`w-full py-12 md:py-24 lg:py-32 ${className}`}>\n <div className='container px-4 md:px-6'>\n <div className='flex flex-col items-center space-y-4 text-center'>\n <div className='space-y-2'>\n <h2 className='text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl'>\n {title}\n </h2>\n <p className='mx-auto max-w-[700px] text-gray-500 md:text-xl dark:text-gray-400'>\n {subtitle}\n </p>\n </div>\n </div>\n <div className='mx-auto mt-8 grid max-w-5xl grid-cols-1 gap-6 md:grid-cols-3 lg:gap-8'>\n {tiers.map((tier, index) => (\n <Card\n key={index}\n className={`relative ${tier.popular ? 'border-primary shadow-lg' : ''}`}\n >\n {tier.popular && (\n <Badge className='absolute -top-3 left-1/2 -translate-x-1/2'>\n Most Popular\n </Badge>\n )}\n <CardHeader>\n <CardTitle>{tier.name}</CardTitle>\n <CardDescription>{tier.description}</CardDescription>\n <div className='mt-4'>\n <span className='text-4xl font-bold'>{tier.price}</span>\n </div>\n </CardHeader>\n <CardContent>\n <ul className='space-y-3'>\n {tier.features.map((feature, featureIndex) => (\n <li\n key={featureIndex}\n className='flex items-center space-x-2'\n >\n <Check className='h-4 w-4 text-green-500' />\n <span className='text-sm'>{feature}</span>\n </li>\n ))}\n </ul>\n <Button\n className='mt-6 w-full'\n variant={tier.popular ? 'default' : 'outline'}\n >\n {tier.cta}\n </Button>\n </CardContent>\n </Card>\n ))}\n </div>\n </div>\n </section>\n );\n}\n","import { Star } from 'lucide-react';\n\nimport { Avatar, AvatarFallback, AvatarImage } from '@foundrykit/primitives';\nimport { Card, CardContent } from '@foundrykit/primitives';\n\nexport interface Testimonial {\n name: string;\n role: string;\n company: string;\n content: string;\n avatar?: string;\n rating?: number;\n}\n\nexport interface TestimonialsProps {\n testimonials: Testimonial[];\n title?: string;\n subtitle?: string;\n className?: string;\n}\n\nexport function Testimonials({\n testimonials,\n title = 'What our customers say',\n subtitle = \"Don't just take our word for it\",\n className,\n}: TestimonialsProps) {\n return (\n <section className={`w-full py-12 md:py-24 lg:py-32 ${className}`}>\n <div className='container px-4 md:px-6'>\n <div className='flex flex-col items-center space-y-4 text-center'>\n <div className='space-y-2'>\n <h2 className='text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl'>\n {title}\n </h2>\n <p className='mx-auto max-w-[700px] text-gray-500 md:text-xl dark:text-gray-400'>\n {subtitle}\n </p>\n </div>\n </div>\n <div className='mx-auto mt-8 grid max-w-5xl grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3'>\n {testimonials.map((testimonial, index) => (\n <Card key={index} className='relative'>\n <CardContent className='p-6'>\n {testimonial.rating && (\n <div className='mb-4 flex items-center space-x-1'>\n {Array.from({ length: testimonial.rating }).map((_, i) => (\n <Star\n key={i}\n className='h-4 w-4 fill-yellow-400 text-yellow-400'\n />\n ))}\n </div>\n )}\n <blockquote className='mb-4 text-sm leading-relaxed'>\n \"{testimonial.content}\"\n </blockquote>\n <div className='flex items-center space-x-3'>\n <Avatar>\n <AvatarImage\n src={testimonial.avatar}\n alt={testimonial.name}\n />\n <AvatarFallback>\n {testimonial.name\n .split(' ')\n .map(n => n[0])\n .join('')}\n </AvatarFallback>\n </Avatar>\n <div>\n <div className='font-semibold'>{testimonial.name}</div>\n <div className='text-muted-foreground text-sm'>\n {testimonial.role} at {testimonial.company}\n </div>\n </div>\n </div>\n </CardContent>\n </Card>\n ))}\n </div>\n </div>\n </section>\n );\n}\n","// Export all blocks\nexport { HeroMinimal } from './components/hero-minimal/index.js';\nexport { Pricing } from './components/pricing/index.js';\nexport { Testimonials } from './components/testimonials/index.js';\n\n// Export utilities from utils package\nexport { cn } from '@foundrykit/utils';\n"],"mappings":"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","names":["Button","jsx","jsxs","Card","CardContent","jsx","jsxs"]}
@@ -0,0 +1,4 @@
1
+ import { config } from "@foundrykit/eslint-config/react-internal"
2
+
3
+ /** @type {import("eslint").Linter.Config} */
4
+ export default config
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@foundrykit/blocks",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "private": false,
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/index.js"
16
+ },
17
+ "./components/*": "./src/components/*.tsx",
18
+ "./lib/*": "./src/lib/*.ts"
19
+ },
20
+ "dependencies": {
21
+ "clsx": "^2.1.1",
22
+ "lucide-react": "^0.475.0",
23
+ "react": "^19.1.1",
24
+ "react-dom": "^19.1.1",
25
+ "tailwind-merge": "^3.3.1",
26
+ "@foundrykit/primitives": "0.1.0",
27
+ "@foundrykit/components": "0.1.0",
28
+ "@foundrykit/animation": "0.1.0",
29
+ "@foundrykit/types": "0.1.0",
30
+ "@foundrykit/utils": "0.1.0"
31
+ },
32
+ "devDependencies": {
33
+ "@types/node": "^20.19.9",
34
+ "@types/react": "^19.1.9",
35
+ "@types/react-dom": "^19.1.7",
36
+ "eslint": "^9.0.0",
37
+ "tsup": "^8.0.0",
38
+ "typescript": "^5.9.2",
39
+ "@foundrykit/eslint-config": "0.1.0",
40
+ "@foundrykit/typescript-config": "0.1.0"
41
+ },
42
+ "peerDependencies": {
43
+ "react": "^19.1.1",
44
+ "react-dom": "^19.1.1"
45
+ },
46
+ "scripts": {
47
+ "build": "tsup",
48
+ "dev": "tsup --watch",
49
+ "lint": "eslint . --max-warnings 0",
50
+ "type-check": "tsc --noEmit"
51
+ }
52
+ }
@@ -0,0 +1,59 @@
1
+ import { ComponentConfig } from '@foundrykit/types';
2
+
3
+ export const heroMinimalConfig: ComponentConfig = {
4
+ name: 'Hero Minimal',
5
+ description: 'Minimal hero section for landing pages',
6
+ category: 'blocks',
7
+ tags: ['hero', 'landing', 'header', 'minimal'],
8
+ preview: {
9
+ type: 'static',
10
+ html: '<div class="flex h-12 w-full flex-col justify-center rounded-md bg-gray-50 p-2"><div class="mb-1 h-2 w-3/4 rounded bg-gray-300"></div><div class="mb-2 h-1 w-1/2 rounded bg-gray-200"></div><div class="flex space-x-1"><div class="h-4 w-8 rounded bg-gray-800"></div><div class="h-4 w-10 rounded border border-gray-300"></div></div></div>',
11
+ },
12
+ variants: [
13
+ {
14
+ name: 'Default',
15
+ description: 'Default minimal hero layout',
16
+ code: '<HeroMinimal title="Welcome" description="A beautiful minimal hero section" primaryCta="Get Started" onPrimaryClick={() => console.log("CTA clicked")} />',
17
+ preview: {
18
+ type: 'component',
19
+ component: 'HeroMinimal',
20
+ props: {
21
+ title: 'Welcome',
22
+ description: 'A beautiful minimal hero section',
23
+ primaryCta: 'Get Started',
24
+ onPrimaryClick: () => console.log('CTA clicked'),
25
+ },
26
+ },
27
+ },
28
+ {
29
+ name: 'With Image',
30
+ description: 'Hero with background image',
31
+ code: '<HeroMinimal title="Welcome" description="With background image" primaryCta="Learn More" />',
32
+ preview: {
33
+ type: 'component',
34
+ component: 'HeroMinimal',
35
+ props: {
36
+ title: 'Welcome',
37
+ description: 'With background image',
38
+ primaryCta: 'Learn More',
39
+ },
40
+ },
41
+ },
42
+ {
43
+ name: 'Centered',
44
+ description: 'Centered hero layout',
45
+ code: '<HeroMinimal title="Centered Hero" description="Perfectly centered content" primaryCta="Explore" />',
46
+ preview: {
47
+ type: 'component',
48
+ component: 'HeroMinimal',
49
+ props: {
50
+ title: 'Centered Hero',
51
+ description: 'Perfectly centered content',
52
+ primaryCta: 'Explore',
53
+ },
54
+ },
55
+ },
56
+ ],
57
+ dependencies: ['primitives', 'utils'],
58
+ files: ['components/hero-minimal/index.tsx'],
59
+ };
@@ -0,0 +1,44 @@
1
+ import { Button } from '@foundrykit/primitives';
2
+
3
+ export interface HeroMinimalProps {
4
+ title?: string;
5
+ description?: string;
6
+ primaryCta?: string;
7
+ secondaryCta?: string;
8
+ onPrimaryClick?: () => void;
9
+ onSecondaryClick?: () => void;
10
+ className?: string;
11
+ }
12
+
13
+ export function HeroMinimal({
14
+ title = 'Welcome to FoundryKit',
15
+ description = 'Build beautiful, accessible React components with our comprehensive design system. Fast, flexible, and ready for production.',
16
+ primaryCta = 'Get Started',
17
+ secondaryCta = 'Learn More',
18
+ onPrimaryClick,
19
+ onSecondaryClick,
20
+ className,
21
+ }: HeroMinimalProps) {
22
+ return (
23
+ <section className={`w-full py-12 md:py-24 lg:py-32 ${className}`}>
24
+ <div className='container px-4 md:px-6'>
25
+ <div className='flex flex-col items-center space-y-4 text-center'>
26
+ <div className='space-y-2'>
27
+ <h1 className='text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl lg:text-6xl/none'>
28
+ {title}
29
+ </h1>
30
+ <p className='mx-auto max-w-[700px] text-gray-500 md:text-xl dark:text-gray-400'>
31
+ {description}
32
+ </p>
33
+ </div>
34
+ <div className='space-x-4'>
35
+ <Button onClick={onPrimaryClick}>{primaryCta}</Button>
36
+ <Button variant='outline' onClick={onSecondaryClick}>
37
+ {secondaryCta}
38
+ </Button>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ </section>
43
+ );
44
+ }
@@ -0,0 +1,106 @@
1
+ import { ComponentConfig } from '@foundrykit/types';
2
+
3
+ export const pricingConfig: ComponentConfig = {
4
+ name: 'Pricing',
5
+ description: 'Pricing table component for subscription plans',
6
+ category: 'blocks',
7
+ tags: ['pricing', 'subscription', 'plans', 'billing'],
8
+ preview: {
9
+ type: 'static',
10
+ html: '<div class="flex h-12 w-full flex-col justify-center rounded-md border border-gray-200 bg-white p-2"><div class="mb-1 h-1 w-1/2 rounded bg-gray-300"></div><div class="mb-1 h-2 w-1/4 rounded bg-gray-800"></div><div class="space-y-0.5"><div class="flex items-center space-x-1"><div class="h-1 w-1 rounded-full bg-green-500"></div><div class="h-0.5 w-8 rounded bg-gray-200"></div></div><div class="flex items-center space-x-1"><div class="h-1 w-1 rounded-full bg-green-500"></div><div class="h-0.5 w-8 rounded bg-gray-200"></div></div></div></div>',
11
+ },
12
+ variants: [
13
+ {
14
+ name: 'Default',
15
+ description: 'Default pricing table',
16
+ code: '<Pricing tiers={[{ name: "Basic", price: "$9", description: "Perfect for getting started", features: ["Feature 1", "Feature 2"], cta: "Get Started" }, { name: "Pro", price: "$19", description: "Best for growing teams", features: ["All Basic", "Feature 3"], cta: "Start Free Trial" }]} />',
17
+ preview: {
18
+ type: 'component',
19
+ component: 'Pricing',
20
+ props: {
21
+ tiers: [
22
+ {
23
+ name: 'Basic',
24
+ price: '$9',
25
+ description: 'Perfect for getting started',
26
+ features: ['Feature 1', 'Feature 2'],
27
+ cta: 'Get Started',
28
+ },
29
+ {
30
+ name: 'Pro',
31
+ price: '$19',
32
+ description: 'Best for growing teams',
33
+ features: ['All Basic', 'Feature 3'],
34
+ cta: 'Start Free Trial',
35
+ },
36
+ ],
37
+ },
38
+ },
39
+ },
40
+ {
41
+ name: 'With Popular',
42
+ description: 'Pricing with popular plan highlight',
43
+ code: '<Pricing tiers={[{ name: "Basic", price: "$9", description: "Perfect for getting started", features: ["Feature 1", "Feature 2"], cta: "Get Started" }, { name: "Pro", price: "$19", description: "Best for growing teams", features: ["All Basic", "Feature 3"], popular: true, cta: "Start Free Trial" }]} />',
44
+ preview: {
45
+ type: 'component',
46
+ component: 'Pricing',
47
+ props: {
48
+ tiers: [
49
+ {
50
+ name: 'Basic',
51
+ price: '$9',
52
+ description: 'Perfect for getting started',
53
+ features: ['Feature 1', 'Feature 2'],
54
+ cta: 'Get Started',
55
+ },
56
+ {
57
+ name: 'Pro',
58
+ price: '$19',
59
+ description: 'Best for growing teams',
60
+ features: ['All Basic', 'Feature 3'],
61
+ popular: true,
62
+ cta: 'Start Free Trial',
63
+ },
64
+ ],
65
+ },
66
+ },
67
+ },
68
+ {
69
+ name: 'Three Tiers',
70
+ description: 'Complete pricing with three tiers',
71
+ code: '<Pricing tiers={[{ name: "Starter", price: "$9", description: "Perfect for individuals", features: ["5 Projects", "10GB Storage"], cta: "Get Started" }, { name: "Pro", price: "$29", description: "Best for teams", features: ["50 Projects", "100GB Storage", "Priority Support"], popular: true, cta: "Start Free Trial" }, { name: "Enterprise", price: "$99", description: "For large organizations", features: ["Unlimited Projects", "1TB Storage", "24/7 Support"], cta: "Contact Sales" }]} />',
72
+ preview: {
73
+ type: 'component',
74
+ component: 'Pricing',
75
+ props: {
76
+ tiers: [
77
+ {
78
+ name: 'Starter',
79
+ price: '$9',
80
+ description: 'Perfect for individuals',
81
+ features: ['5 Projects', '10GB Storage'],
82
+ cta: 'Get Started',
83
+ },
84
+ {
85
+ name: 'Pro',
86
+ price: '$29',
87
+ description: 'Best for teams',
88
+ features: ['50 Projects', '100GB Storage', 'Priority Support'],
89
+ popular: true,
90
+ cta: 'Start Free Trial',
91
+ },
92
+ {
93
+ name: 'Enterprise',
94
+ price: '$99',
95
+ description: 'For large organizations',
96
+ features: ['Unlimited Projects', '1TB Storage', '24/7 Support'],
97
+ cta: 'Contact Sales',
98
+ },
99
+ ],
100
+ },
101
+ },
102
+ },
103
+ ],
104
+ dependencies: ['primitives', 'utils'],
105
+ files: ['components/pricing/index.tsx'],
106
+ };
@@ -0,0 +1,91 @@
1
+ import { Check } from 'lucide-react';
2
+
3
+ import { Button } from '@foundrykit/primitives';
4
+ import {
5
+ Card,
6
+ CardContent,
7
+ CardDescription,
8
+ CardHeader,
9
+ CardTitle,
10
+ } from '@foundrykit/primitives';
11
+ import { Badge } from '@foundrykit/primitives';
12
+
13
+ export interface PricingTier {
14
+ name: string;
15
+ price: string;
16
+ description: string;
17
+ features: string[];
18
+ popular?: boolean;
19
+ cta: string;
20
+ }
21
+
22
+ export interface PricingProps {
23
+ tiers: PricingTier[];
24
+ title?: string;
25
+ subtitle?: string;
26
+ className?: string;
27
+ }
28
+
29
+ export function Pricing({
30
+ tiers,
31
+ title = 'Simple, transparent pricing',
32
+ subtitle = "Choose the plan that's right for you",
33
+ className,
34
+ }: PricingProps) {
35
+ return (
36
+ <section className={`w-full py-12 md:py-24 lg:py-32 ${className}`}>
37
+ <div className='container px-4 md:px-6'>
38
+ <div className='flex flex-col items-center space-y-4 text-center'>
39
+ <div className='space-y-2'>
40
+ <h2 className='text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl'>
41
+ {title}
42
+ </h2>
43
+ <p className='mx-auto max-w-[700px] text-gray-500 md:text-xl dark:text-gray-400'>
44
+ {subtitle}
45
+ </p>
46
+ </div>
47
+ </div>
48
+ <div className='mx-auto mt-8 grid max-w-5xl grid-cols-1 gap-6 md:grid-cols-3 lg:gap-8'>
49
+ {tiers.map((tier, index) => (
50
+ <Card
51
+ key={index}
52
+ className={`relative ${tier.popular ? 'border-primary shadow-lg' : ''}`}
53
+ >
54
+ {tier.popular && (
55
+ <Badge className='absolute -top-3 left-1/2 -translate-x-1/2'>
56
+ Most Popular
57
+ </Badge>
58
+ )}
59
+ <CardHeader>
60
+ <CardTitle>{tier.name}</CardTitle>
61
+ <CardDescription>{tier.description}</CardDescription>
62
+ <div className='mt-4'>
63
+ <span className='text-4xl font-bold'>{tier.price}</span>
64
+ </div>
65
+ </CardHeader>
66
+ <CardContent>
67
+ <ul className='space-y-3'>
68
+ {tier.features.map((feature, featureIndex) => (
69
+ <li
70
+ key={featureIndex}
71
+ className='flex items-center space-x-2'
72
+ >
73
+ <Check className='h-4 w-4 text-green-500' />
74
+ <span className='text-sm'>{feature}</span>
75
+ </li>
76
+ ))}
77
+ </ul>
78
+ <Button
79
+ className='mt-6 w-full'
80
+ variant={tier.popular ? 'default' : 'outline'}
81
+ >
82
+ {tier.cta}
83
+ </Button>
84
+ </CardContent>
85
+ </Card>
86
+ ))}
87
+ </div>
88
+ </div>
89
+ </section>
90
+ );
91
+ }
@@ -0,0 +1,94 @@
1
+ import { ComponentConfig } from '@foundrykit/types';
2
+
3
+ export const testimonialsConfig: ComponentConfig = {
4
+ name: 'Testimonials',
5
+ description: 'Customer testimonials and reviews component',
6
+ category: 'blocks',
7
+ tags: ['testimonials', 'reviews', 'social-proof', 'customers'],
8
+ preview: {
9
+ type: 'static',
10
+ html: '<div class="flex h-12 w-full items-center justify-center rounded-md bg-gray-50 p-2"><div class="flex items-start space-x-2"><div class="h-4 w-4 rounded-full bg-gray-300"></div><div class="flex-1"><div class="mb-1 h-1 w-full rounded bg-gray-300"></div><div class="h-0.5 w-3/4 rounded bg-gray-200"></div></div></div></div>',
11
+ },
12
+ variants: [
13
+ {
14
+ name: 'Default',
15
+ description: 'Default testimonials grid',
16
+ code: '<Testimonials testimonials={[{ name: "John Doe", role: "CEO", company: "Company", content: "Great product!" }, { name: "Jane Smith", role: "Designer", company: "Studio", content: "Amazing experience!" }]} />',
17
+ preview: {
18
+ type: 'component',
19
+ component: 'Testimonials',
20
+ props: {
21
+ testimonials: [
22
+ {
23
+ name: 'John Doe',
24
+ role: 'CEO',
25
+ company: 'Company',
26
+ content: 'Great product!',
27
+ },
28
+ {
29
+ name: 'Jane Smith',
30
+ role: 'Designer',
31
+ company: 'Studio',
32
+ content: 'Amazing experience!',
33
+ },
34
+ ],
35
+ },
36
+ },
37
+ },
38
+ {
39
+ name: 'With Avatars',
40
+ description: 'Testimonials with user avatars',
41
+ code: '<Testimonials testimonials={testimonials} showAvatars />',
42
+ preview: {
43
+ type: 'component',
44
+ component: 'Testimonials',
45
+ props: {
46
+ testimonials: [
47
+ {
48
+ name: 'John Doe',
49
+ role: 'CEO',
50
+ company: 'Company',
51
+ content: 'Great product!',
52
+ },
53
+ {
54
+ name: 'Jane Smith',
55
+ role: 'Designer',
56
+ company: 'Studio',
57
+ content: 'Amazing experience!',
58
+ },
59
+ ],
60
+ showAvatars: true,
61
+ },
62
+ },
63
+ },
64
+ {
65
+ name: 'Carousel',
66
+ description: 'Testimonials in carousel format',
67
+ code: '<Testimonials testimonials={testimonials} variant="carousel" autoPlay />',
68
+ preview: {
69
+ type: 'component',
70
+ component: 'Testimonials',
71
+ props: {
72
+ testimonials: [
73
+ {
74
+ name: 'John Doe',
75
+ role: 'CEO',
76
+ company: 'Company',
77
+ content: 'Great product!',
78
+ },
79
+ {
80
+ name: 'Jane Smith',
81
+ role: 'Designer',
82
+ company: 'Studio',
83
+ content: 'Amazing experience!',
84
+ },
85
+ ],
86
+ variant: 'carousel',
87
+ autoPlay: true,
88
+ },
89
+ },
90
+ },
91
+ ],
92
+ dependencies: ['primitives', 'utils'],
93
+ files: ['components/testimonials/index.tsx'],
94
+ };
@@ -0,0 +1,85 @@
1
+ import { Star } from 'lucide-react';
2
+
3
+ import { Avatar, AvatarFallback, AvatarImage } from '@foundrykit/primitives';
4
+ import { Card, CardContent } from '@foundrykit/primitives';
5
+
6
+ export interface Testimonial {
7
+ name: string;
8
+ role: string;
9
+ company: string;
10
+ content: string;
11
+ avatar?: string;
12
+ rating?: number;
13
+ }
14
+
15
+ export interface TestimonialsProps {
16
+ testimonials: Testimonial[];
17
+ title?: string;
18
+ subtitle?: string;
19
+ className?: string;
20
+ }
21
+
22
+ export function Testimonials({
23
+ testimonials,
24
+ title = 'What our customers say',
25
+ subtitle = "Don't just take our word for it",
26
+ className,
27
+ }: TestimonialsProps) {
28
+ return (
29
+ <section className={`w-full py-12 md:py-24 lg:py-32 ${className}`}>
30
+ <div className='container px-4 md:px-6'>
31
+ <div className='flex flex-col items-center space-y-4 text-center'>
32
+ <div className='space-y-2'>
33
+ <h2 className='text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl'>
34
+ {title}
35
+ </h2>
36
+ <p className='mx-auto max-w-[700px] text-gray-500 md:text-xl dark:text-gray-400'>
37
+ {subtitle}
38
+ </p>
39
+ </div>
40
+ </div>
41
+ <div className='mx-auto mt-8 grid max-w-5xl grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3'>
42
+ {testimonials.map((testimonial, index) => (
43
+ <Card key={index} className='relative'>
44
+ <CardContent className='p-6'>
45
+ {testimonial.rating && (
46
+ <div className='mb-4 flex items-center space-x-1'>
47
+ {Array.from({ length: testimonial.rating }).map((_, i) => (
48
+ <Star
49
+ key={i}
50
+ className='h-4 w-4 fill-yellow-400 text-yellow-400'
51
+ />
52
+ ))}
53
+ </div>
54
+ )}
55
+ <blockquote className='mb-4 text-sm leading-relaxed'>
56
+ "{testimonial.content}"
57
+ </blockquote>
58
+ <div className='flex items-center space-x-3'>
59
+ <Avatar>
60
+ <AvatarImage
61
+ src={testimonial.avatar}
62
+ alt={testimonial.name}
63
+ />
64
+ <AvatarFallback>
65
+ {testimonial.name
66
+ .split(' ')
67
+ .map(n => n[0])
68
+ .join('')}
69
+ </AvatarFallback>
70
+ </Avatar>
71
+ <div>
72
+ <div className='font-semibold'>{testimonial.name}</div>
73
+ <div className='text-muted-foreground text-sm'>
74
+ {testimonial.role} at {testimonial.company}
75
+ </div>
76
+ </div>
77
+ </div>
78
+ </CardContent>
79
+ </Card>
80
+ ))}
81
+ </div>
82
+ </div>
83
+ </section>
84
+ );
85
+ }
package/src/index.ts ADDED
@@ -0,0 +1,7 @@
1
+ // Export all blocks
2
+ export { HeroMinimal } from './components/hero-minimal/index.js';
3
+ export { Pricing } from './components/pricing/index.js';
4
+ export { Testimonials } from './components/testimonials/index.js';
5
+
6
+ // Export utilities from utils package
7
+ export { cn } from '@foundrykit/utils';
package/tsconfig.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "@foundrykit/typescript-config/react-library.json",
3
+ "compilerOptions": {
4
+ "baseUrl": ".",
5
+ "paths": {
6
+ "@foundrykit/blocks/*": ["./src/*"]
7
+ }
8
+ },
9
+ "include": ["."],
10
+ "exclude": ["node_modules", "dist"]
11
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "@foundrykit/typescript-config/react-library.json",
3
+ "compilerOptions": {
4
+ "outDir": "dist"
5
+ },
6
+ "include": ["src", "turbo"],
7
+ "exclude": ["node_modules", "dist"]
8
+ }
@@ -0,0 +1,15 @@
1
+ // tsup.config.ts
2
+ import { defineConfig } from "tsup";
3
+ var tsup_config_default = defineConfig({
4
+ entry: ["src/index.ts"],
5
+ format: ["esm"],
6
+ dts: true,
7
+ splitting: false,
8
+ sourcemap: true,
9
+ clean: true,
10
+ external: ["react", "react-dom"]
11
+ });
12
+ export {
13
+ tsup_config_default as default
14
+ };
15
+ //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidHN1cC5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9faW5qZWN0ZWRfZmlsZW5hbWVfXyA9IFwiL1VzZXJzL2lzYWFjc25lZGRvbi1qZW5raW5zL0Rlc2t0b3AvcHJvamVjdHMvdW1pL3Byb2plY3RzL2ZvdW5kcnlraXQvcGFja2FnZXMvYmxvY2tzL3RzdXAuY29uZmlnLnRzXCI7Y29uc3QgX19pbmplY3RlZF9kaXJuYW1lX18gPSBcIi9Vc2Vycy9pc2FhY3NuZWRkb24tamVua2lucy9EZXNrdG9wL3Byb2plY3RzL3VtaS9wcm9qZWN0cy9mb3VuZHJ5a2l0L3BhY2thZ2VzL2Jsb2Nrc1wiO2NvbnN0IF9faW5qZWN0ZWRfaW1wb3J0X21ldGFfdXJsX18gPSBcImZpbGU6Ly8vVXNlcnMvaXNhYWNzbmVkZG9uLWplbmtpbnMvRGVza3RvcC9wcm9qZWN0cy91bWkvcHJvamVjdHMvZm91bmRyeWtpdC9wYWNrYWdlcy9ibG9ja3MvdHN1cC5jb25maWcudHNcIjtpbXBvcnQgeyBkZWZpbmVDb25maWcgfSBmcm9tICd0c3VwJztcblxuZXhwb3J0IGRlZmF1bHQgZGVmaW5lQ29uZmlnKHtcbiAgZW50cnk6IFsnc3JjL2luZGV4LnRzJ10sXG4gIGZvcm1hdDogWydlc20nXSxcbiAgZHRzOiB0cnVlLFxuICBzcGxpdHRpbmc6IGZhbHNlLFxuICBzb3VyY2VtYXA6IHRydWUsXG4gIGNsZWFuOiB0cnVlLFxuICBleHRlcm5hbDogWydyZWFjdCcsICdyZWFjdC1kb20nXSxcbn0pO1xuIl0sCiAgIm1hcHBpbmdzIjogIjtBQUEwWSxTQUFTLG9CQUFvQjtBQUV2YSxJQUFPLHNCQUFRLGFBQWE7QUFBQSxFQUMxQixPQUFPLENBQUMsY0FBYztBQUFBLEVBQ3RCLFFBQVEsQ0FBQyxLQUFLO0FBQUEsRUFDZCxLQUFLO0FBQUEsRUFDTCxXQUFXO0FBQUEsRUFDWCxXQUFXO0FBQUEsRUFDWCxPQUFPO0FBQUEsRUFDUCxVQUFVLENBQUMsU0FBUyxXQUFXO0FBQ2pDLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg==
package/tsup.config.ts ADDED
@@ -0,0 +1,11 @@
1
+ import { defineConfig } from 'tsup';
2
+
3
+ export default defineConfig({
4
+ entry: ['src/index.ts'],
5
+ format: ['esm'],
6
+ dts: true,
7
+ splitting: false,
8
+ sourcemap: true,
9
+ clean: true,
10
+ external: ['react', 'react-dom'],
11
+ });