@foundrykit/blocks 0.1.1 → 0.2.1
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/CHANGELOG.md +29 -0
- package/README.md +56 -53
- package/dist/index.d.ts +17 -1
- package/dist/index.js +449 -0
- package/dist/index.js.map +1 -1
- package/package.json +9 -8
- package/src/components/interactive-regions-map/config.ts +178 -0
- package/src/components/interactive-regions-map/index.tsx +572 -0
- package/src/index.ts +1 -0
- package/.turbo/turbo-build.log +0 -18
- package/.turbo/turbo-type-check.log +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @foundrykit/blocks
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updating versions to ensure they are inline
|
|
8
|
+
- Updated dependencies [015ff5f]
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @foundrykit/types@0.1.2
|
|
11
|
+
- @foundrykit/animation@0.1.2
|
|
12
|
+
- @foundrykit/components@0.1.2
|
|
13
|
+
- @foundrykit/primitives@0.1.2
|
|
14
|
+
- @foundrykit/utils@0.1.2
|
|
15
|
+
|
|
16
|
+
## 0.2.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- adding interactive regions map
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Adding interactive regions map
|
|
25
|
+
- Adding an interactive regions map component
|
|
26
|
+
- @foundrykit/animation@0.1.1
|
|
27
|
+
- @foundrykit/components@0.1.1
|
|
28
|
+
- @foundrykit/primitives@0.1.1
|
|
29
|
+
- @foundrykit/types@0.1.1
|
|
30
|
+
- @foundrykit/utils@0.1.1
|
|
31
|
+
|
|
3
32
|
## 0.1.1
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @foundrykit/blocks
|
|
2
2
|
|
|
3
|
-
A collection of pre-built page sections and content blocks for rapid website
|
|
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.
|
|
4
6
|
|
|
5
7
|
## Features
|
|
6
8
|
|
|
@@ -20,17 +22,20 @@ pnpm add @foundrykit/blocks
|
|
|
20
22
|
## Available Blocks
|
|
21
23
|
|
|
22
24
|
### Hero Sections
|
|
25
|
+
|
|
23
26
|
- **HeroMinimal** - Clean, minimal hero section with title and CTA
|
|
24
27
|
- **HeroWithImage** - Hero section with background image
|
|
25
28
|
- **HeroWithVideo** - Hero section with video background
|
|
26
29
|
|
|
27
30
|
### Content Sections
|
|
31
|
+
|
|
28
32
|
- **Testimonials** - Customer testimonial carousel
|
|
29
33
|
- **Pricing** - Pricing table with multiple tiers
|
|
30
34
|
- **Features** - Feature showcase with icons and descriptions
|
|
31
35
|
- **FAQ** - Frequently asked questions accordion
|
|
32
36
|
|
|
33
37
|
### Marketing Sections
|
|
38
|
+
|
|
34
39
|
- **Newsletter** - Email newsletter signup form
|
|
35
40
|
- **CTA** - Call-to-action section
|
|
36
41
|
- **SocialProof** - Social proof with logos and stats
|
|
@@ -40,60 +45,61 @@ pnpm add @foundrykit/blocks
|
|
|
40
45
|
### Basic Example
|
|
41
46
|
|
|
42
47
|
```tsx
|
|
43
|
-
import { HeroMinimal, Testimonials, Pricing } from '@foundrykit/blocks'
|
|
48
|
+
import { HeroMinimal, Testimonials, Pricing } from '@foundrykit/blocks';
|
|
44
49
|
|
|
45
50
|
function HomePage() {
|
|
46
51
|
return (
|
|
47
52
|
<div>
|
|
48
53
|
<HeroMinimal
|
|
49
|
-
title=
|
|
50
|
-
subtitle=
|
|
51
|
-
ctaText=
|
|
52
|
-
ctaHref=
|
|
54
|
+
title='Build amazing websites'
|
|
55
|
+
subtitle='Create beautiful, responsive websites with our component library'
|
|
56
|
+
ctaText='Get Started'
|
|
57
|
+
ctaHref='/signup'
|
|
53
58
|
/>
|
|
54
|
-
|
|
59
|
+
|
|
55
60
|
<Testimonials
|
|
56
61
|
testimonials={[
|
|
57
62
|
{
|
|
58
|
-
name:
|
|
59
|
-
role:
|
|
60
|
-
company:
|
|
61
|
-
content:
|
|
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
|
+
},
|
|
63
69
|
]}
|
|
64
70
|
/>
|
|
65
|
-
|
|
71
|
+
|
|
66
72
|
<Pricing
|
|
67
73
|
plans={[
|
|
68
74
|
{
|
|
69
|
-
name:
|
|
70
|
-
price:
|
|
71
|
-
features: [
|
|
72
|
-
}
|
|
75
|
+
name: 'Starter',
|
|
76
|
+
price: '$9',
|
|
77
|
+
features: ['Feature 1', 'Feature 2'],
|
|
78
|
+
},
|
|
73
79
|
]}
|
|
74
80
|
/>
|
|
75
81
|
</div>
|
|
76
|
-
)
|
|
82
|
+
);
|
|
77
83
|
}
|
|
78
84
|
```
|
|
79
85
|
|
|
80
86
|
### Customizing Blocks
|
|
81
87
|
|
|
82
88
|
```tsx
|
|
83
|
-
import { HeroMinimal } from '@foundrykit/blocks'
|
|
89
|
+
import { HeroMinimal } from '@foundrykit/blocks';
|
|
84
90
|
|
|
85
91
|
function CustomHero() {
|
|
86
92
|
return (
|
|
87
93
|
<HeroMinimal
|
|
88
|
-
title=
|
|
89
|
-
subtitle=
|
|
90
|
-
ctaText=
|
|
91
|
-
ctaHref=
|
|
92
|
-
className=
|
|
93
|
-
titleClassName=
|
|
94
|
-
subtitleClassName=
|
|
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'
|
|
95
101
|
/>
|
|
96
|
-
)
|
|
102
|
+
);
|
|
97
103
|
}
|
|
98
104
|
```
|
|
99
105
|
|
|
@@ -108,7 +114,7 @@ import { Testimonials } from '@foundrykit/blocks'
|
|
|
108
114
|
<Testimonials testimonials={data} />
|
|
109
115
|
|
|
110
116
|
// Override with custom configuration
|
|
111
|
-
<Testimonials
|
|
117
|
+
<Testimonials
|
|
112
118
|
testimonials={data}
|
|
113
119
|
autoPlay={false}
|
|
114
120
|
showDots={true}
|
|
@@ -135,16 +141,16 @@ block/
|
|
|
135
141
|
Blocks support dynamic content through props:
|
|
136
142
|
|
|
137
143
|
```tsx
|
|
138
|
-
import { Testimonials } from '@foundrykit/blocks'
|
|
144
|
+
import { Testimonials } from '@foundrykit/blocks';
|
|
139
145
|
|
|
140
146
|
function DynamicTestimonials({ testimonials }) {
|
|
141
147
|
return (
|
|
142
148
|
<Testimonials
|
|
143
149
|
testimonials={testimonials}
|
|
144
|
-
title=
|
|
145
|
-
subtitle=
|
|
150
|
+
title='What our customers say'
|
|
151
|
+
subtitle='Real feedback from real users'
|
|
146
152
|
/>
|
|
147
|
-
)
|
|
153
|
+
);
|
|
148
154
|
}
|
|
149
155
|
```
|
|
150
156
|
|
|
@@ -153,7 +159,7 @@ function DynamicTestimonials({ testimonials }) {
|
|
|
153
159
|
Blocks are designed to work with headless CMS systems:
|
|
154
160
|
|
|
155
161
|
```tsx
|
|
156
|
-
import { HeroMinimal } from '@foundrykit/blocks'
|
|
162
|
+
import { HeroMinimal } from '@foundrykit/blocks';
|
|
157
163
|
|
|
158
164
|
function CMSHero({ cmsData }) {
|
|
159
165
|
return (
|
|
@@ -164,7 +170,7 @@ function CMSHero({ cmsData }) {
|
|
|
164
170
|
ctaHref={cmsData.ctaLink}
|
|
165
171
|
backgroundImage={cmsData.backgroundImage}
|
|
166
172
|
/>
|
|
167
|
-
)
|
|
173
|
+
);
|
|
168
174
|
}
|
|
169
175
|
```
|
|
170
176
|
|
|
@@ -175,13 +181,10 @@ function CMSHero({ cmsData }) {
|
|
|
175
181
|
Blocks automatically use your theme tokens:
|
|
176
182
|
|
|
177
183
|
```tsx
|
|
178
|
-
import { Pricing } from '@foundrykit/blocks'
|
|
184
|
+
import { Pricing } from '@foundrykit/blocks';
|
|
179
185
|
|
|
180
186
|
// Automatically uses theme colors and spacing
|
|
181
|
-
<Pricing
|
|
182
|
-
plans={plans}
|
|
183
|
-
className="bg-background text-foreground"
|
|
184
|
-
/>
|
|
187
|
+
<Pricing plans={plans} className='bg-background text-foreground' />;
|
|
185
188
|
```
|
|
186
189
|
|
|
187
190
|
### Custom Styling
|
|
@@ -189,20 +192,20 @@ import { Pricing } from '@foundrykit/blocks'
|
|
|
189
192
|
Override default styles with custom classes:
|
|
190
193
|
|
|
191
194
|
```tsx
|
|
192
|
-
import { Testimonials } from '@foundrykit/blocks'
|
|
193
|
-
import { cn } from '@foundrykit/utils'
|
|
195
|
+
import { Testimonials } from '@foundrykit/blocks';
|
|
196
|
+
import { cn } from '@foundrykit/utils';
|
|
194
197
|
|
|
195
198
|
function StyledTestimonials({ className, ...props }) {
|
|
196
199
|
return (
|
|
197
200
|
<Testimonials
|
|
198
201
|
className={cn(
|
|
199
|
-
|
|
200
|
-
|
|
202
|
+
'bg-gradient-to-br from-blue-50 to-indigo-100',
|
|
203
|
+
'rounded-xl border border-blue-200',
|
|
201
204
|
className
|
|
202
205
|
)}
|
|
203
206
|
{...props}
|
|
204
207
|
/>
|
|
205
|
-
)
|
|
208
|
+
);
|
|
206
209
|
}
|
|
207
210
|
```
|
|
208
211
|
|
|
@@ -211,18 +214,18 @@ function StyledTestimonials({ className, ...props }) {
|
|
|
211
214
|
All blocks are mobile-first and responsive:
|
|
212
215
|
|
|
213
216
|
```tsx
|
|
214
|
-
import { HeroMinimal } from '@foundrykit/blocks'
|
|
217
|
+
import { HeroMinimal } from '@foundrykit/blocks';
|
|
215
218
|
|
|
216
219
|
// Automatically responsive
|
|
217
220
|
<HeroMinimal
|
|
218
|
-
title=
|
|
219
|
-
subtitle=
|
|
220
|
-
className=
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
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
|
+
/>;
|
|
226
229
|
```
|
|
227
230
|
|
|
228
231
|
## Accessibility
|
package/dist/index.d.ts
CHANGED
|
@@ -44,4 +44,20 @@ interface TestimonialsProps {
|
|
|
44
44
|
}
|
|
45
45
|
declare function Testimonials({ testimonials, title, subtitle, className, }: TestimonialsProps): react_jsx_runtime.JSX.Element;
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
interface Region {
|
|
48
|
+
countries: string[];
|
|
49
|
+
name: string;
|
|
50
|
+
color?: string;
|
|
51
|
+
href?: string;
|
|
52
|
+
}
|
|
53
|
+
interface InteractiveRegionsMapProps {
|
|
54
|
+
title: string;
|
|
55
|
+
content?: string;
|
|
56
|
+
regions: Region[];
|
|
57
|
+
onRegionClick?: (region: Region) => void;
|
|
58
|
+
onRegionHover?: (region: Region | null) => void;
|
|
59
|
+
className?: string;
|
|
60
|
+
}
|
|
61
|
+
declare function InteractiveRegionsMap({ title, content, regions, onRegionClick, onRegionHover, className }: InteractiveRegionsMapProps): react_jsx_runtime.JSX.Element;
|
|
62
|
+
|
|
63
|
+
export { HeroMinimal, InteractiveRegionsMap, Pricing, Testimonials };
|