@foundrykit/blocks 2.1.0 → 3.0.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.
@@ -1,94 +0,0 @@
1
- import type { 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: ['card', 'avatar', 'utils'],
93
- files: ['components/testimonials/index.tsx'],
94
- };
@@ -1,108 +0,0 @@
1
- import {
2
- Avatar,
3
- AvatarFallback,
4
- AvatarImage,
5
- Card,
6
- CardContent,
7
- } from '@foundrykit/primitives';
8
- import { cn } from '@foundrykit/utils';
9
- import { Star } from 'lucide-react';
10
-
11
- export interface Testimonial {
12
- name: string;
13
- role: string;
14
- company: string;
15
- content: string;
16
- avatar?: string;
17
- /** Star rating out of 5. Hidden when 0 or missing. */
18
- rating?: number;
19
- }
20
-
21
- export interface TestimonialsProps {
22
- testimonials: Testimonial[];
23
- title?: string;
24
- subtitle?: string;
25
- className?: string;
26
- }
27
-
28
- /**
29
- * Responsive testimonials section that renders a grid of quote cards from the
30
- * `testimonials` array. Each card shows the quote, author, and optional avatar
31
- * and star rating. The heading and subtitle render only when provided.
32
- */
33
- export function Testimonials({
34
- testimonials,
35
- title,
36
- subtitle,
37
- className,
38
- }: TestimonialsProps) {
39
- return (
40
- <section className={cn('w-full py-12 md:py-24 lg:py-32', className)}>
41
- <div className='container mx-auto px-4 md:px-6'>
42
- <div className='flex flex-col items-center space-y-4 text-center'>
43
- <div className='space-y-2'>
44
- {title && (
45
- <h2 className='text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl'>
46
- {title}
47
- </h2>
48
- )}
49
- {subtitle && (
50
- <p className='text-muted-foreground mx-auto max-w-[700px] md:text-xl'>
51
- {subtitle}
52
- </p>
53
- )}
54
- </div>
55
- </div>
56
- <div className='mx-auto mt-8 grid max-w-5xl grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3'>
57
- {testimonials.map(testimonial => (
58
- <Card key={testimonial.name} className='relative'>
59
- <CardContent className='p-6'>
60
- <figure>
61
- {testimonial.rating != null && testimonial.rating > 0 && (
62
- <div
63
- role='img'
64
- aria-label={`${testimonial.rating} out of 5 stars`}
65
- className='mb-4 flex items-center space-x-1'
66
- >
67
- {Array.from({ length: testimonial.rating }, (_, i) => (
68
- <Star
69
- // biome-ignore lint/suspicious/noArrayIndexKey: identical static icons
70
- key={i}
71
- aria-hidden='true'
72
- className='fill-warning text-warning h-4 w-4'
73
- />
74
- ))}
75
- </div>
76
- )}
77
- <blockquote className='mb-4 text-sm leading-relaxed'>
78
- <p>&ldquo;{testimonial.content}&rdquo;</p>
79
- </blockquote>
80
- <figcaption className='flex items-center space-x-3'>
81
- <Avatar>
82
- <AvatarImage
83
- src={testimonial.avatar}
84
- alt={testimonial.name}
85
- />
86
- <AvatarFallback>
87
- {testimonial.name
88
- .split(' ')
89
- .map(n => n[0])
90
- .join('')}
91
- </AvatarFallback>
92
- </Avatar>
93
- <div>
94
- <div className='font-semibold'>{testimonial.name}</div>
95
- <div className='text-muted-foreground text-sm'>
96
- {testimonial.role} at {testimonial.company}
97
- </div>
98
- </div>
99
- </figcaption>
100
- </figure>
101
- </CardContent>
102
- </Card>
103
- ))}
104
- </div>
105
- </div>
106
- </section>
107
- );
108
- }
package/src/index.ts DELETED
@@ -1,8 +0,0 @@
1
- // Export all blocks
2
-
3
- export { WorldMap } from '@foundrykit/maps';
4
- // Export utilities from utils package
5
- export { cn } from '@foundrykit/utils';
6
- export { HeroMinimal } from './components/hero-minimal/index.js';
7
- export { Pricing } from './components/pricing/index.js';
8
- export { Testimonials } from './components/testimonials/index.js';
package/tsconfig.json DELETED
@@ -1,11 +0,0 @@
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
- }
@@ -1,8 +0,0 @@
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
- }
@@ -1,15 +0,0 @@
1
- // tsup.config.ts
2
- import { defineConfig } from 'tsup';
3
-
4
- var tsup_config_default = defineConfig({
5
- entry: ['src/index.ts'],
6
- format: ['esm'],
7
- dts: true,
8
- splitting: false,
9
- sourcemap: true,
10
- clean: true,
11
- external: ['react', 'react-dom'],
12
- });
13
-
14
- export { tsup_config_default as default };
15
- //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidHN1cC5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9faW5qZWN0ZWRfZmlsZW5hbWVfXyA9IFwiL1VzZXJzL2lzYWFjc25lZGRvbi1qZW5raW5zL0Rlc2t0b3AvcHJvamVjdHMvdW1pL3Byb2plY3RzL2ZvdW5kcnlraXQvcGFja2FnZXMvYmxvY2tzL3RzdXAuY29uZmlnLnRzXCI7Y29uc3QgX19pbmplY3RlZF9kaXJuYW1lX18gPSBcIi9Vc2Vycy9pc2FhY3NuZWRkb24tamVua2lucy9EZXNrdG9wL3Byb2plY3RzL3VtaS9wcm9qZWN0cy9mb3VuZHJ5a2l0L3BhY2thZ2VzL2Jsb2Nrc1wiO2NvbnN0IF9faW5qZWN0ZWRfaW1wb3J0X21ldGFfdXJsX18gPSBcImZpbGU6Ly8vVXNlcnMvaXNhYWNzbmVkZG9uLWplbmtpbnMvRGVza3RvcC9wcm9qZWN0cy91bWkvcHJvamVjdHMvZm91bmRyeWtpdC9wYWNrYWdlcy9ibG9ja3MvdHN1cC5jb25maWcudHNcIjtpbXBvcnQgeyBkZWZpbmVDb25maWcgfSBmcm9tICd0c3VwJztcblxuZXhwb3J0IGRlZmF1bHQgZGVmaW5lQ29uZmlnKHtcbiAgZW50cnk6IFsnc3JjL2luZGV4LnRzJ10sXG4gIGZvcm1hdDogWydlc20nXSxcbiAgZHRzOiB0cnVlLFxuICBzcGxpdHRpbmc6IGZhbHNlLFxuICBzb3VyY2VtYXA6IHRydWUsXG4gIGNsZWFuOiB0cnVlLFxuICBleHRlcm5hbDogWydyZWFjdCcsICdyZWFjdC1kb20nXSxcbn0pO1xuIl0sCiAgIm1hcHBpbmdzIjogIjtBQUEwWSxTQUFTLG9CQUFvQjtBQUV2YSxJQUFPLHNCQUFRLGFBQWE7QUFBQSxFQUMxQixPQUFPLENBQUMsY0FBYztBQUFBLEVBQ3RCLFFBQVEsQ0FBQyxLQUFLO0FBQUEsRUFDZCxLQUFLO0FBQUEsRUFDTCxXQUFXO0FBQUEsRUFDWCxXQUFXO0FBQUEsRUFDWCxPQUFPO0FBQUEsRUFDUCxVQUFVLENBQUMsU0FBUyxXQUFXO0FBQ2pDLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg==
package/tsup.config.ts DELETED
@@ -1,11 +0,0 @@
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
- });