@foundrykit/blocks 2.0.10 → 2.0.13

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
- > @foundrykit/blocks@2.0.9 build /Users/isj/Desktop/work/projects/foundry/packages/blocks
2
+ > @foundrykit/blocks@2.0.12 build /Users/isj/Desktop/work/projects/foundry/packages/blocks
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,8 +10,8 @@ CLI Target: es2022
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  ESM dist/index.js 7.05 KB
13
- ESM dist/index.js.map 10.88 KB
14
- ESM ⚡️ Build success in 11ms
13
+ ESM dist/index.js.map 11.45 KB
14
+ ESM ⚡️ Build success in 6ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 929ms
17
- DTS dist/index.d.ts 1.34 KB
16
+ DTS ⚡️ Build success in 715ms
17
+ DTS dist/index.d.ts 1.90 KB
@@ -0,0 +1,4 @@
1
+
2
+ > @foundrykit/blocks@2.0.12 lint /Users/isj/Desktop/work/projects/foundry/packages/blocks
3
+ > eslint . --max-warnings 0
4
+
@@ -1,4 +1,4 @@
1
1
 
2
- > @foundrykit/blocks@2.0.9 type-check /Users/isj/Desktop/work/projects/foundry/packages/blocks
2
+ > @foundrykit/blocks@2.0.12 type-check /Users/isj/Desktop/work/projects/foundry/packages/blocks
3
3
  > tsc --noEmit
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @foundrykit/blocks
2
2
 
3
+ ## 2.0.13
4
+
5
+ ### Patch Changes
6
+
7
+ - @foundrykit/maps@3.0.3
8
+
9
+ ## 2.0.12
10
+
11
+ ### Patch Changes
12
+
13
+ - @foundrykit/maps@3.0.2
14
+
15
+ ## 2.0.11
16
+
17
+ ### Patch Changes
18
+
19
+ - @foundrykit/maps@3.0.1
20
+
3
21
  ## 2.0.10
4
22
 
5
23
  ### Patch Changes
package/README.md CHANGED
@@ -1,280 +1,73 @@
1
1
  # @foundrykit/blocks
2
2
 
3
- A collection of pre-built page sections and content blocks for rapid website
4
- development. These blocks provide complete, customizable sections that can be
5
- easily integrated into any page layout.
6
-
7
- ## Features
8
-
9
- - **Complete page sections** - Ready-to-use blocks for common page layouts
10
- - **Highly customizable** - Easy to modify content, styling, and behaviour
11
- - **Responsive design** - Mobile-first responsive layouts
12
- - **Accessible** - Built with accessibility best practices
13
- - **TypeScript support** - Full type safety for all block props
14
- - **SEO optimized** - Proper semantic HTML and meta tags
3
+ Pre-built, composable page sections for building marketing and product pages
4
+ quickly — hero, pricing, testimonials, and an interactive world map, styled with
5
+ the FoundryKit design system.
15
6
 
16
7
  ## Installation
17
8
 
18
9
  ```bash
19
- pnpm add @foundrykit/blocks
10
+ pnpm add @foundrykit/blocks @foundrykit/tailwind
20
11
  ```
21
12
 
22
- ## Available Blocks
23
-
24
- ### Hero Sections
25
-
26
- - **HeroMinimal** - Clean, minimal hero section with title and CTA
27
- - **HeroWithImage** - Hero section with background image
28
- - **HeroWithVideo** - Hero section with video background
29
-
30
- ### Content Sections
31
-
32
- - **Testimonials** - Customer testimonial carousel
33
- - **Pricing** - Pricing table with multiple tiers
34
- - **Features** - Feature showcase with icons and descriptions
35
- - **FAQ** - Frequently asked questions accordion
13
+ Import the design-token stylesheet once at your app root so the blocks are styled
14
+ and themeable:
36
15
 
37
- ### Marketing Sections
38
-
39
- - **Newsletter** - Email newsletter signup form
40
- - **CTA** - Call-to-action section
41
- - **SocialProof** - Social proof with logos and stats
16
+ ```tsx
17
+ import '@foundrykit/tailwind/globals.css';
18
+ ```
42
19
 
43
20
  ## Usage
44
21
 
45
- ### Basic Example
46
-
47
22
  ```tsx
48
- import { HeroMinimal, Testimonials, Pricing } from '@foundrykit/blocks';
23
+ import { HeroMinimal, Pricing } from '@foundrykit/blocks';
49
24
 
50
25
  function HomePage() {
51
26
  return (
52
- <div>
27
+ <>
53
28
  <HeroMinimal
54
- title='Build amazing websites'
55
- subtitle='Create beautiful, responsive websites with our component library'
56
- ctaText='Get Started'
57
- ctaHref='/signup'
29
+ title="Build amazing products"
30
+ description="Ship faster with the FoundryKit design system."
31
+ primaryCta="Get Started"
32
+ onPrimaryClick={() => {}}
58
33
  />
59
-
60
- <Testimonials
61
- testimonials={[
62
- {
63
- name: 'John Doe',
64
- role: 'CEO',
65
- company: 'Tech Corp',
66
- content:
67
- 'Amazing product that saved us months of development time.',
68
- },
69
- ]}
70
- />
71
-
72
34
  <Pricing
73
- plans={[
35
+ tiers={[
74
36
  {
75
37
  name: 'Starter',
76
38
  price: '$9',
77
- features: ['Feature 1', 'Feature 2'],
39
+ description: 'For small teams',
40
+ features: ['Feature one', 'Feature two'],
41
+ cta: 'Choose Starter',
78
42
  },
79
43
  ]}
80
44
  />
81
- </div>
82
- );
83
- }
84
- ```
85
-
86
- ### Customizing Blocks
87
-
88
- ```tsx
89
- import { HeroMinimal } from '@foundrykit/blocks';
90
-
91
- function CustomHero() {
92
- return (
93
- <HeroMinimal
94
- title='Custom Title'
95
- subtitle='Custom subtitle text'
96
- ctaText='Custom Button'
97
- ctaHref='/custom-link'
98
- className='bg-gradient-to-r from-blue-500 to-purple-600'
99
- titleClassName='text-4xl font-bold text-white'
100
- subtitleClassName='text-xl text-gray-200'
101
- />
102
- );
103
- }
104
- ```
105
-
106
- ### Block Configuration
107
-
108
- Each block can be configured through its config file:
109
-
110
- ```tsx
111
- import { Testimonials } from '@foundrykit/blocks'
112
-
113
- // Use default configuration
114
- <Testimonials testimonials={data} />
115
-
116
- // Override with custom configuration
117
- <Testimonials
118
- testimonials={data}
119
- autoPlay={false}
120
- showDots={true}
121
- className="my-custom-styles"
122
- />
123
- ```
124
-
125
- ## Block Structure
126
-
127
- Each block is organized as follows:
128
-
129
- ```
130
- block/
131
- ├── config.ts # Block configuration and variants
132
- ├── index.tsx # Main block component
133
- ├── variants-grid.tsx # Block variants for documentation
134
- └── README.md # Block-specific documentation
135
- ```
136
-
137
- ## Content Management
138
-
139
- ### Dynamic Content
140
-
141
- Blocks support dynamic content through props:
142
-
143
- ```tsx
144
- import { Testimonials } from '@foundrykit/blocks';
145
-
146
- function DynamicTestimonials({ testimonials }) {
147
- return (
148
- <Testimonials
149
- testimonials={testimonials}
150
- title='What our customers say'
151
- subtitle='Real feedback from real users'
152
- />
45
+ </>
153
46
  );
154
47
  }
155
48
  ```
156
49
 
157
- ### CMS Integration
158
-
159
- Blocks are designed to work with headless CMS systems:
160
-
161
- ```tsx
162
- import { HeroMinimal } from '@foundrykit/blocks';
163
-
164
- function CMSHero({ cmsData }) {
165
- return (
166
- <HeroMinimal
167
- title={cmsData.title}
168
- subtitle={cmsData.subtitle}
169
- ctaText={cmsData.ctaText}
170
- ctaHref={cmsData.ctaLink}
171
- backgroundImage={cmsData.backgroundImage}
172
- />
173
- );
174
- }
175
- ```
176
-
177
- ## Styling and Theming
178
-
179
- ### Theme Integration
180
-
181
- Blocks automatically use your theme tokens:
182
-
183
- ```tsx
184
- import { Pricing } from '@foundrykit/blocks';
185
-
186
- // Automatically uses theme colors and spacing
187
- <Pricing plans={plans} className='bg-background text-foreground' />;
188
- ```
189
-
190
- ### Custom Styling
191
-
192
- Override default styles with custom classes:
50
+ ## Available blocks
193
51
 
194
- ```tsx
195
- import { Testimonials } from '@foundrykit/blocks';
196
- import { cn } from '@foundrykit/utils';
52
+ - **`HeroMinimal`** — centered hero section with title, description, and primary
53
+ / secondary call-to-action buttons
54
+ - **`Pricing`** — responsive pricing grid driven by a `tiers` array
55
+ (`PricingTier[]`), with an optional "Most Popular" highlight
56
+ - **`Testimonials`** — responsive testimonial grid driven by a `testimonials`
57
+ array (`Testimonial[]`), with optional avatars and star ratings
58
+ - **`WorldMap`** — interactive world map, re-exported from
59
+ [`@foundrykit/maps`](../maps)
197
60
 
198
- function StyledTestimonials({ className, ...props }) {
199
- return (
200
- <Testimonials
201
- className={cn(
202
- 'bg-gradient-to-br from-blue-50 to-indigo-100',
203
- 'rounded-xl border border-blue-200',
204
- className
205
- )}
206
- {...props}
207
- />
208
- );
209
- }
210
- ```
61
+ The `cn` class-merge helper is also re-exported.
211
62
 
212
- ## Responsive Design
63
+ ## Documentation
213
64
 
214
- All blocks are mobile-first and responsive:
65
+ Explore every block and its variants live in Storybook:
215
66
 
216
- ```tsx
217
- import { HeroMinimal } from '@foundrykit/blocks';
218
-
219
- // Automatically responsive
220
- <HeroMinimal
221
- title='Responsive Title'
222
- subtitle='This block looks great on all devices'
223
- className='
224
- px-4 py-8
225
- text-center md:px-8 md:py-12
226
- md:text-left lg:px-16 lg:py-20
227
- '
228
- />;
67
+ ```bash
68
+ pnpm --filter @foundrykit/storybook dev
229
69
  ```
230
70
 
231
- ## Accessibility
232
-
233
- Blocks include comprehensive accessibility features:
234
-
235
- - Semantic HTML structure
236
- - Proper ARIA attributes
237
- - Keyboard navigation support
238
- - Screen reader compatibility
239
- - Color contrast compliance
240
- - Focus management
241
-
242
- ## Performance
243
-
244
- ### Optimized Rendering
245
-
246
- - Lazy loading for images and videos
247
- - Optimized bundle sizes
248
- - Efficient re-rendering
249
- - Minimal JavaScript overhead
250
-
251
- ### SEO Optimization
252
-
253
- - Proper heading hierarchy
254
- - Meta tag support
255
- - Structured data markup
256
- - Fast loading times
257
-
258
- ## Dependencies
259
-
260
- - **@foundrykit/primitives** - Base UI components
261
- - **@foundrykit/components** - Higher-level components
262
- - **@foundrykit/animation** - Animation utilities
263
- - **React** - UI framework
264
- - **TypeScript** - Type safety
265
-
266
- ## Contributing
267
-
268
- When adding new blocks:
269
-
270
- 1. Follow the established block structure
271
- 2. Ensure mobile-first responsive design
272
- 3. Include comprehensive accessibility features
273
- 4. Add TypeScript definitions
274
- 5. Provide usage examples
275
- 6. Test across different screen sizes
276
- 7. Update this README
277
-
278
71
  ## License
279
72
 
280
73
  MIT
package/dist/index.d.ts CHANGED
@@ -11,6 +11,11 @@ interface HeroMinimalProps {
11
11
  onSecondaryClick?: () => void;
12
12
  className?: string;
13
13
  }
14
+ /**
15
+ * Centered hero section with a title, description, and primary/secondary
16
+ * call-to-action buttons. All text and click handlers are optional and fall
17
+ * back to sensible defaults.
18
+ */
14
19
  declare function HeroMinimal({ title, description, primaryCta, secondaryCta, onPrimaryClick, onSecondaryClick, className, }: HeroMinimalProps): react_jsx_runtime.JSX.Element;
15
20
 
16
21
  interface PricingTier {
@@ -27,6 +32,11 @@ interface PricingProps {
27
32
  subtitle?: string;
28
33
  className?: string;
29
34
  }
35
+ /**
36
+ * Responsive pricing section that renders a grid of cards from the `tiers`
37
+ * array. A tier marked `popular` is highlighted with a "Most Popular" badge and
38
+ * an emphasised border.
39
+ */
30
40
  declare function Pricing({ tiers, title, subtitle, className, }: PricingProps): react_jsx_runtime.JSX.Element;
31
41
 
32
42
  interface Testimonial {
@@ -43,6 +53,11 @@ interface TestimonialsProps {
43
53
  subtitle?: string;
44
54
  className?: string;
45
55
  }
56
+ /**
57
+ * Responsive testimonials section that renders a grid of quote cards from the
58
+ * `testimonials` array. Each card shows the quote, author, and optional avatar
59
+ * and star rating.
60
+ */
46
61
  declare function Testimonials({ testimonials, title, subtitle, className, }: TestimonialsProps): react_jsx_runtime.JSX.Element;
47
62
 
48
63
  export { HeroMinimal, Pricing, Testimonials };
package/dist/index.js.map CHANGED
@@ -1 +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 mx-auto 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 mx-auto 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 mx-auto 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 &quot;{testimonial.content}&quot;\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';\nexport { WorldMap } from '@foundrykit/maps';\n\n// Export utilities from utils package\nexport { cn } from '@foundrykit/utils';\n"],"mappings":";AAAA,SAAS,cAAc;AAyBb,SACE,KADF;AAbH,SAAS,YAAY;AAAA,EAC1B,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,aAAa;AAAA,EACb,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AACF,GAAqB;AACnB,SACE,oBAAC,aAAQ,WAAW,kCAAkC,SAAS,IAC7D,8BAAC,SAAI,WAAU,kCACb,+BAAC,SAAI,WAAU,oDACb;AAAA,yBAAC,SAAI,WAAU,aACb;AAAA,0BAAC,QAAG,WAAU,gFACX,iBACH;AAAA,MACA,oBAAC,OAAE,WAAU,qEACV,uBACH;AAAA,OACF;AAAA,IACA,qBAAC,SAAI,WAAU,aACb;AAAA,0BAAC,UAAO,SAAS,gBAAiB,sBAAW;AAAA,MAC7C,oBAAC,UAAO,SAAQ,WAAU,SAAS,kBAChC,wBACH;AAAA,OACF;AAAA,KACF,GACF,GACF;AAEJ;;;AC3CA,SAAS,aAAa;AAEtB,SAAS,UAAAA,eAAc;AACvB;AAAA,EACE;AAAA,EACA;AAAA,E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A,0BAAAD;AAAA,YAAC;AAAA;AAAA,cACC,KAAK,YAAY;AAAA,cACjB,KAAK,YAAY;AAAA;AAAA,UACnB;AAAA,UACA,gBAAAA,KAAC,kBACE,sBAAY,KACV,MAAM,GAAG,EACT,IAAI,OAAK,EAAE,CAAC,CAAC,EACb,KAAK,EAAE,GACZ;AAAA,WACF;AAAA,QACA,gBAAAC,MAAC,SACC;AAAA,0BAAAD,KAAC,SAAI,WAAU,iBAAiB,sBAAY,MAAK;AAAA,UACjD,gBAAAC,MAAC,SAAI,WAAU,iCACZ;AAAA,wBAAY;AAAA,YAAK;AAAA,YAAK,YAAY;AAAA,aACrC;AAAA,WACF;AAAA,SACF;AAAA,OACF,KAnCS,KAoCX,CACD,GACH;AAAA,KACF,GACF;AAEJ;;;AChFA,SAAS,gBAAgB;AAGzB,SAAS,UAAU;","names":["Button","jsx","jsxs","Card","CardContent","jsx","jsxs"]}
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\n/**\n * Centered hero section with a title, description, and primary/secondary\n * call-to-action buttons. All text and click handlers are optional and fall\n * back to sensible defaults.\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 mx-auto 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\n/**\n * Responsive pricing section that renders a grid of cards from the `tiers`\n * array. A tier marked `popular` is highlighted with a \"Most Popular\" badge and\n * an emphasised border.\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 mx-auto 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\n/**\n * Responsive testimonials section that renders a grid of quote cards from the\n * `testimonials` array. Each card shows the quote, author, and optional avatar\n * and star rating.\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 mx-auto 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 &quot;{testimonial.content}&quot;\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';\nexport { WorldMap } from '@foundrykit/maps';\n\n// Export utilities from utils package\nexport { cn } from '@foundrykit/utils';\n"],"mappings":";AAAA,SAAS,cAAc;AA8Bb,SACE,KADF;AAbH,SAAS,YAAY;AAAA,EAC1B,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,aAAa;AAAA,EACb,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AACF,GAAqB;AACnB,SACE,oBAAC,aAAQ,WAAW,kCAAkC,SAAS,IAC7D,8BAAC,SAAI,WAAU,kCACb,+BAAC,SAAI,WAAU,oDACb;AAAA,yBAAC,SAAI,WAAU,aACb;AAAA,0BAAC,QAAG,WAAU,gFACX,iBACH;AAAA,MACA,oBAAC,OAAE,WAAU,qEACV,uBACH;AAAA,OACF;AAAA,IACA,qBAAC,SAAI,WAAU,aACb;AAAA,0BAAC,UAAO,SAAS,gBAAiB,sBAAW;AAAA,MAC7C,oBAAC,UAAO,SAAQ,WAAU,SAAS,kBAChC,wBACH;AAAA,OACF;AAAA,KACF,GACF,GACF;AAEJ;;;AChDA,SAAS,aAAa;AAEtB,SAAS,UAAAA,eAAc;AACvB;AAAA,EACE;AAA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MAAC,UACC;AAAA,0BAAAD;AAAA,YAAC;AAAA;AAAA,cACC,KAAK,YAAY;AAAA,cACjB,KAAK,YAAY;AAAA;AAAA,UACnB;AAAA,UACA,gBAAAA,KAAC,kBACE,sBAAY,KACV,MAAM,GAAG,EACT,IAAI,OAAK,EAAE,CAAC,CAAC,EACb,KAAK,EAAE,GACZ;AAAA,WACF;AAAA,QACA,gBAAAC,MAAC,SACC;AAAA,0BAAAD,KAAC,SAAI,WAAU,iBAAiB,sBAAY,MAAK;AAAA,UACjD,gBAAAC,MAAC,SAAI,WAAU,iCACZ;AAAA,wBAAY;AAAA,YAAK;AAAA,YAAK,YAAY;AAAA,aACrC;AAAA,WACF;AAAA,SACF;AAAA,OACF,KAnCS,KAoCX,CACD,GACH;AAAA,KACF,GACF;AAEJ;;;ACrFA,SAAS,gBAAgB;AAGzB,SAAS,UAAU;","names":["Button","jsx","jsxs","Card","CardContent","jsx","jsxs"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foundrykit/blocks",
3
- "version": "2.0.10",
3
+ "version": "2.0.13",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
@@ -24,12 +24,12 @@
24
24
  "react": "^19.1.1",
25
25
  "react-dom": "^19.1.1",
26
26
  "tailwind-merge": "^3.3.1",
27
+ "@foundrykit/maps": "3.0.3",
27
28
  "@foundrykit/animation": "2.0.6",
28
- "@foundrykit/components": "2.1.1",
29
- "@foundrykit/maps": "3.0.0",
29
+ "@foundrykit/utils": "1.0.6",
30
30
  "@foundrykit/primitives": "2.0.6",
31
- "@foundrykit/types": "2.0.6",
32
- "@foundrykit/utils": "1.0.6"
31
+ "@foundrykit/components": "2.1.1",
32
+ "@foundrykit/types": "2.0.6"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/node": "^20.19.9",
@@ -10,6 +10,11 @@ export interface HeroMinimalProps {
10
10
  className?: string;
11
11
  }
12
12
 
13
+ /**
14
+ * Centered hero section with a title, description, and primary/secondary
15
+ * call-to-action buttons. All text and click handlers are optional and fall
16
+ * back to sensible defaults.
17
+ */
13
18
  export function HeroMinimal({
14
19
  title = 'Welcome to FoundryKit',
15
20
  description = 'Build beautiful, accessible React components with our comprehensive design system. Fast, flexible, and ready for production.',
@@ -26,6 +26,11 @@ export interface PricingProps {
26
26
  className?: string;
27
27
  }
28
28
 
29
+ /**
30
+ * Responsive pricing section that renders a grid of cards from the `tiers`
31
+ * array. A tier marked `popular` is highlighted with a "Most Popular" badge and
32
+ * an emphasised border.
33
+ */
29
34
  export function Pricing({
30
35
  tiers,
31
36
  title = 'Simple, transparent pricing',
@@ -19,6 +19,11 @@ export interface TestimonialsProps {
19
19
  className?: string;
20
20
  }
21
21
 
22
+ /**
23
+ * Responsive testimonials section that renders a grid of quote cards from the
24
+ * `testimonials` array. Each card shows the quote, author, and optional avatar
25
+ * and star rating.
26
+ */
22
27
  export function Testimonials({
23
28
  testimonials,
24
29
  title = 'What our customers say',