blocks-dusted 0.1.1 → 0.1.2

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.
Files changed (50) hide show
  1. package/README.md +967 -3
  2. package/package.json +2 -2
  3. package/src/commands/add.js +143 -45
  4. package/src/commands/list.js +2 -2
  5. package/src/installers/checkRequirements.js +1 -0
  6. package/src/installers/copyTemplateFiles.js +23 -2
  7. package/src/installers/patchPayloadConfigCollections.js +92 -0
  8. package/src/installers/writeInstalledBlockReadme.js +17 -4
  9. package/src/registry/listTemplates.js +16 -7
  10. package/src/registry/loadTemplateManifest.js +20 -11
  11. package/src/registry/validateTemplateManifest.js +6 -5
  12. package/src/utils/paths.js +7 -0
  13. package/templates/blocks/DD-BookCall/Component.tsx +535 -573
  14. package/templates/blocks/DD-CardTemplate01/Component.tsx +45 -49
  15. package/templates/blocks/DD-Carousel-A/Component.tsx +249 -266
  16. package/templates/blocks/DD-Carousel-B/Component.tsx +403 -432
  17. package/templates/blocks/DD-ComparisonTable/Component.tsx +256 -272
  18. package/templates/blocks/DD-Contact/Component.tsx +434 -439
  19. package/templates/blocks/DD-Contact/config.ts +8 -3
  20. package/templates/blocks/DD-FeatCat/Component.tsx +302 -361
  21. package/templates/blocks/DD-FeatCat/config.ts +201 -204
  22. package/templates/blocks/DD-FeatStrip/Component.tsx +171 -201
  23. package/templates/blocks/DD-Hero/Component.tsx +297 -317
  24. package/templates/blocks/DD-HorizontalScroll/Component.tsx +244 -303
  25. package/templates/blocks/DD-MasonaryMedia/Component.tsx +202 -228
  26. package/templates/blocks/DD-MasonaryMedia/config.ts +13 -14
  27. package/templates/blocks/DD-Pricing/Component.tsx +372 -380
  28. package/templates/blocks/DD-Process/Component.tsx +149 -155
  29. package/templates/blocks/DD-Section/Component.tsx +266 -327
  30. package/templates/blocks/DD-Services/Component.tsx +176 -188
  31. package/templates/blocks/DD-ShowcaseGrid/Component.tsx +307 -317
  32. package/templates/blocks/DD-Slider-A/Component.tsx +237 -252
  33. package/templates/blocks/DD-StackCards/Component.tsx +137 -160
  34. package/templates/blocks/DD-Team/Component.tsx +247 -265
  35. package/templates/blocks/DD-TechStack/Component.tsx +57 -72
  36. package/templates/blocks/DD-Testimonials/Component.tsx +147 -147
  37. package/templates/blocks/DD-Testimonials/config.ts +66 -66
  38. package/templates/blocks/DD-Work/Component.tsx +315 -328
  39. package/templates/blocks/DD-Work-B/Component.tsx +294 -320
  40. package/templates/collections/Testimonials/README.md +11 -0
  41. package/templates/collections/Testimonials/Testimonials.ts +161 -0
  42. package/templates/collections/Testimonials/manifest.json +55 -0
  43. package/templates/components/RichText/README.md +13 -0
  44. package/templates/components/RichText/converter/componentConverter/blocks.tsx +43 -0
  45. package/templates/components/RichText/converter/componentConverter/types.ts +11 -0
  46. package/templates/components/RichText/converter/index.tsx +18 -0
  47. package/templates/components/RichText/converter/internalLinks.tsx +45 -0
  48. package/templates/components/RichText/converter/textConverter.tsx +27 -0
  49. package/templates/components/RichText/index.tsx +35 -0
  50. package/templates/components/RichText/manifest.json +80 -0
@@ -1,327 +1,266 @@
1
- "use client";
2
- import React from "react";
3
- import Link from "next/link";
4
- import Image from "next/image";
5
- import { ArrowUpRight, CheckCheck } from "lucide-react";
6
- import { motion, type Variants } from "framer-motion";
7
- import * as LucideIcons from "lucide-react";
8
- export type DDSectionProps = Record<string, any>;
9
- type ServiceItem = {
10
- id?: string | null;
11
- iconName?: string | null;
12
- title?: string | null;
13
- description?: string | null;
14
- };
15
- type ButtonItem = {
16
- href?: string | null;
17
- class?: string | null;
18
- label?: string | null;
19
- };
20
-
21
- function isLocalImageSrc(src?: string | null): src is string {
22
- return typeof src === "string" && src.startsWith("/api/media/file/");
23
- }
24
-
25
- function SectionImagePlaceholder() {
26
- return (
27
- <svg
28
- aria-hidden="true"
29
- className="h-full w-full"
30
- viewBox="0 0 900 700"
31
- preserveAspectRatio="none"
32
- >
33
- <defs>
34
- <linearGradient id="dd-section-placeholder" x1="0" y1="0" x2="1" y2="1">
35
- <stop offset="0%" stopColor="#111827" />
36
- <stop offset="50%" stopColor="#251644" />
37
- <stop offset="100%" stopColor="#09090b" />
38
- </linearGradient>
39
- <pattern
40
- id="dd-section-grid"
41
- width="72"
42
- height="72"
43
- patternUnits="userSpaceOnUse"
44
- >
45
- <path
46
- d="M 72 0 L 0 0 0 72"
47
- fill="none"
48
- stroke="#ffffff"
49
- strokeOpacity="0.07"
50
- />
51
- </pattern>
52
- </defs>
53
- <rect width="900" height="700" fill="url(#dd-section-placeholder)" />
54
- <rect width="900" height="700" fill="url(#dd-section-grid)" />
55
- <rect
56
- x="155"
57
- y="150"
58
- width="590"
59
- height="360"
60
- rx="32"
61
- fill="#ffffff"
62
- fillOpacity="0.08"
63
- />
64
- <rect
65
- x="210"
66
- y="215"
67
- width="270"
68
- height="28"
69
- rx="14"
70
- fill="#ffffff"
71
- fillOpacity="0.18"
72
- />
73
- <rect
74
- x="210"
75
- y="275"
76
- width="430"
77
- height="22"
78
- rx="11"
79
- fill="#ffffff"
80
- fillOpacity="0.12"
81
- />
82
- <rect
83
- x="210"
84
- y="325"
85
- width="360"
86
- height="22"
87
- rx="11"
88
- fill="#ffffff"
89
- fillOpacity="0.1"
90
- />
91
- <rect
92
- x="210"
93
- y="410"
94
- width="150"
95
- height="46"
96
- rx="23"
97
- fill="#a3e635"
98
- fillOpacity="0.16"
99
- />
100
- </svg>
101
- );
102
- }
103
-
104
- const containerVariants: Variants = {
105
- hidden: {},
106
- show: { transition: { staggerChildren: 0.1, delayChildren: 0.05 } },
107
- };
108
-
109
- const itemVariants: Variants = {
110
- hidden: { opacity: 0, y: 20 },
111
- show: { opacity: 1, y: 0, transition: { duration: 0.45, ease: "easeOut" } },
112
- };
113
-
114
- function DynamicIcon({
115
- name,
116
- ...props
117
- }: { name?: string | null } & Omit<LucideIcons.LucideProps, "name">) {
118
- if (!name) return null;
119
- const Icon = (
120
- LucideIcons as unknown as Record<string, React.FC<LucideIcons.LucideProps>>
121
- )[name];
122
- if (!Icon) return null;
123
- return <Icon {...props} />;
124
- }
125
-
126
- export const DDSection: React.FC<DDSectionProps> = ({
127
- eyebrow,
128
- headlineMain,
129
- headlineAccent,
130
- description,
131
- ctaLabel,
132
- ctaHref,
133
- services,
134
- image,
135
- imageFallbackUrl,
136
- imageAlt,
137
- badgeTitle,
138
- badgeSubtitle,
139
- showBadge,
140
- sectionId,
141
- customCSS,
142
- showButtons = true,
143
- buttons = [
144
- { variant: "v1", icon: "Goal", label: "Choose Lane" },
145
- { variant: "v1", icon: "Feather", label: "How it works" },
146
- ],
147
- }) => {
148
- const serviceItems = (services ?? []) as ServiceItem[];
149
- const buttonItems = buttons as ButtonItem[];
150
- const imgSrc =
151
- image && typeof image === "object" && "url" in image && image.url
152
- ? image.url
153
- : (imageFallbackUrl ?? "");
154
- const safeImgSrc = isLocalImageSrc(imgSrc) ? imgSrc : null;
155
-
156
- return (
157
- <>
158
- {customCSS && <style dangerouslySetInnerHTML={{ __html: customCSS }} />}
159
-
160
- <div id={sectionId ?? "studio-section"} className="py-24 overflow-hidden">
161
- <div className="max-w-6xl lg:max-w-7xl mx-auto px-4 md:px-6">
162
- <div className="grid grid-cols-1 lg:grid-cols-2 gap-16 items-center">
163
- {/* Left Content */}
164
- <motion.div
165
- variants={containerVariants}
166
- initial="hidden"
167
- whileInView="show"
168
- viewport={{ once: false, amount: 0.15 }}
169
- >
170
- {eyebrow && (
171
- <motion.p
172
- variants={itemVariants}
173
- className="text-[11.5px] font-semibold text-stone-400 tracking-widest uppercase mb-3 top-caption"
174
- >
175
- {eyebrow}
176
- </motion.p>
177
- )}
178
-
179
- <motion.h2
180
- variants={itemVariants}
181
- className="text-3d text-4xl md:text-5xl font-bold text-stone-900 dark:text-stone-50 leading-tight mb-6"
182
- >
183
- {headlineMain}
184
- <br />
185
- <span className="text-stone-400">{headlineAccent}</span>
186
- </motion.h2>
187
-
188
- {description && (
189
- <motion.p
190
- variants={itemVariants}
191
- className="text-stone-700 dark:text-stone-300 text-base leading-relaxed mb-10"
192
- >
193
- {description}
194
- </motion.p>
195
- )}
196
-
197
- {serviceItems.length > 0 && (
198
- <motion.div
199
- variants={containerVariants}
200
- className="grid grid-cols-1 sm:grid-cols-2 gap-5 mb-10"
201
- >
202
- {serviceItems.map((svc) => (
203
- <motion.div
204
- key={svc.id ?? svc.title}
205
- variants={itemVariants}
206
- className="flex gap-3"
207
- >
208
- <div className="w-8 h-8 flex items-center justify-center rounded-lg bg-stone-200/50 dark:bg-stone-800/50 text-stone-400 shrink-0 mt-0.5 border border-stone-200 dark:border-stone-600 hover:border-lime-500 duration-150">
209
- <DynamicIcon
210
- className="text-stone-400"
211
- name={svc.iconName}
212
- size={14}
213
- />
214
- </div>
215
- <div>
216
- <h3 className="text-sm font-semibold text-stone-800 dark:text-stone-50 mb-1">
217
- {svc.title}
218
- </h3>
219
- <p className="text-sm text-stone-700 dark:text-stone-300 leading-relaxed">
220
- {svc.description}
221
- </p>
222
- </div>
223
- </motion.div>
224
- ))}
225
- </motion.div>
226
- )}
227
-
228
- {/* {ctaLabel && ctaHref && (
229
- <motion.div variants={itemVariants}>
230
- <Link
231
- href={ctaHref}
232
- className="inline-flex items-center gap-2 bg-stone-50 text-stone-900 px-6 py-3 rounded-lg text-sm font-semibold hover:bg-stone-100 transition-colors cursor-pointer whitespace-nowrap"
233
- >
234
- {ctaLabel}
235
- <ArrowUpRight size={15} />
236
- </Link>
237
- </motion.div>
238
- )} */}
239
-
240
- {/* Dusted CTA Buttons */}
241
- {showButtons && buttonItems.length > 0 && (
242
- <motion.div
243
- className="dusted-hero-cta-col flex col-start-2 col-span-2 gap-4"
244
- variants={itemVariants}
245
- >
246
- {buttonItems.map((button, index) => (
247
- <a
248
- key={index}
249
- href={(button as any).href ?? "#"}
250
- className={
251
- button.class ??
252
- "inline-flex items-center gap-1.5 bg-indigo-700 text-stone-50 text-xs font-semibold px-3 py-1.5 rounded-lg hover:bg-indigo-600 group-hover:scale-[1.05] hover:shadow-xl transition-all duration-150 whitespace-nowrap"
253
- }
254
- style={{ cornerShape: "squircle" } as React.CSSProperties}
255
- >
256
- {/* TODO: Reconnect ButtonDustedFluid if this project provides it. */}
257
- {button.label || "Button"}
258
- </a>
259
- ))}
260
- </motion.div>
261
- )}
262
- </motion.div>
263
-
264
- {/* Right Image */}
265
- {(safeImgSrc || imgSrc) && (
266
- <motion.div
267
- className="relative"
268
- initial={{ opacity: 0, x: 40 }}
269
- whileInView={{ opacity: 1, x: 0 }}
270
- viewport={{ once: false, amount: 0.15 }}
271
- transition={{ duration: 0.6, ease: "easeOut" }}
272
- >
273
- <div
274
- className="rounded-3xl overflow-hidden w-full h-125 relative shadow-xl"
275
- style={{ cornerShape: "squircle" } as React.CSSProperties}
276
- >
277
- {safeImgSrc ? (
278
- <Image
279
- src={safeImgSrc}
280
- alt={imageAlt ?? "DesignsDusted Studio"}
281
- fill
282
- sizes="(max-width: 768px) 100vw, 50vw"
283
- className="object-cover object-top squircle"
284
- style={{ cornerShape: "squircle" } as React.CSSProperties}
285
- />
286
- ) : (
287
- <SectionImagePlaceholder />
288
- )}
289
- <div
290
- className="absolute inset-0 bg-linear-to-t from-stone-950/70 via-transparent to-transparent rounded-2xl"
291
- style={{ cornerShape: "squircle" } as React.CSSProperties}
292
- />
293
- </div>
294
-
295
- {showBadge && (
296
- <div
297
- className="absolute bottom-6 left-6 right-6 bg-indigo-900/50 shadow-inner backdrop-blur-sm rounded-2xl p-4 border border-indigo-700"
298
- style={{ cornerShape: "squircle" } as React.CSSProperties}
299
- >
300
- <div className="flex items-center gap-3">
301
- <div className="w-10 h-10 flex items-center justify-center rounded-lg bg-stone-50 text-stone-900 shrink-0">
302
- <CheckCheck size={16} />
303
- </div>
304
- <div>
305
- {badgeTitle && (
306
- <div className="text-sm font-semibold text-stone-50 dark:text-stone-50">
307
- {badgeTitle}
308
- </div>
309
- )}
310
- {badgeSubtitle && (
311
- <div className="text-xs text-stone-300">
312
- {badgeSubtitle}
313
- </div>
314
- )}
315
- </div>
316
- <div className="ml-auto w-2 h-2 rounded-full bg-lime-400 animate-pulse shrink-0" />
317
- </div>
318
- </div>
319
- )}
320
- </motion.div>
321
- )}
322
- </div>
323
- </div>
324
- </div>
325
- </>
326
- );
327
- };
1
+ 'use client'
2
+ import React from 'react'
3
+ import Link from 'next/link'
4
+ import Image from 'next/image'
5
+ import { ArrowUpRight, CheckCheck } from 'lucide-react'
6
+ import { motion, type Variants } from 'framer-motion'
7
+ import * as LucideIcons from 'lucide-react'
8
+ export type DDSectionProps = Record<string, any>
9
+ type ServiceItem = {
10
+ id?: string | null
11
+ iconName?: string | null
12
+ title?: string | null
13
+ description?: string | null
14
+ }
15
+ type ButtonItem = { href?: string | null; class?: string | null; label?: string | null }
16
+
17
+ function isLocalImageSrc(src?: string | null): src is string {
18
+ return typeof src === 'string' && src.startsWith('/api/media/file/')
19
+ }
20
+
21
+ function SectionImagePlaceholder() {
22
+ return (
23
+ <svg
24
+ aria-hidden="true"
25
+ className="h-full w-full"
26
+ viewBox="0 0 900 700"
27
+ preserveAspectRatio="none"
28
+ >
29
+ <defs>
30
+ <linearGradient id="dd-section-placeholder" x1="0" y1="0" x2="1" y2="1">
31
+ <stop offset="0%" stopColor="#111827" />
32
+ <stop offset="50%" stopColor="#251644" />
33
+ <stop offset="100%" stopColor="#09090b" />
34
+ </linearGradient>
35
+ <pattern id="dd-section-grid" width="72" height="72" patternUnits="userSpaceOnUse">
36
+ <path d="M 72 0 L 0 0 0 72" fill="none" stroke="#ffffff" strokeOpacity="0.07" />
37
+ </pattern>
38
+ </defs>
39
+ <rect width="900" height="700" fill="url(#dd-section-placeholder)" />
40
+ <rect width="900" height="700" fill="url(#dd-section-grid)" />
41
+ <rect x="155" y="150" width="590" height="360" rx="32" fill="#ffffff" fillOpacity="0.08" />
42
+ <rect x="210" y="215" width="270" height="28" rx="14" fill="#ffffff" fillOpacity="0.18" />
43
+ <rect x="210" y="275" width="430" height="22" rx="11" fill="#ffffff" fillOpacity="0.12" />
44
+ <rect x="210" y="325" width="360" height="22" rx="11" fill="#ffffff" fillOpacity="0.1" />
45
+ <rect x="210" y="410" width="150" height="46" rx="23" fill="#a3e635" fillOpacity="0.16" />
46
+ </svg>
47
+ )
48
+ }
49
+
50
+ const containerVariants: Variants = {
51
+ hidden: {},
52
+ show: { transition: { staggerChildren: 0.1, delayChildren: 0.05 } },
53
+ }
54
+
55
+ const itemVariants: Variants = {
56
+ hidden: { opacity: 0, y: 20 },
57
+ show: { opacity: 1, y: 0, transition: { duration: 0.45, ease: 'easeOut' } },
58
+ }
59
+
60
+ function DynamicIcon({
61
+ name,
62
+ ...props
63
+ }: { name?: string | null } & Omit<LucideIcons.LucideProps, 'name'>) {
64
+ if (!name) return null
65
+ const Icon = (LucideIcons as unknown as Record<string, React.FC<LucideIcons.LucideProps>>)[name]
66
+ if (!Icon) return null
67
+ return <Icon {...props} />
68
+ }
69
+
70
+ export const DDSection: React.FC<DDSectionProps> = ({
71
+ eyebrow,
72
+ headlineMain,
73
+ headlineAccent,
74
+ description,
75
+ ctaLabel,
76
+ ctaHref,
77
+ services,
78
+ image,
79
+ imageFallbackUrl,
80
+ imageAlt,
81
+ badgeTitle,
82
+ badgeSubtitle,
83
+ showBadge,
84
+ sectionId,
85
+ customCSS,
86
+ showButtons = true,
87
+ buttons = [
88
+ { variant: 'v1', icon: 'Goal', label: 'Choose Lane' },
89
+ { variant: 'v1', icon: 'Feather', label: 'How it works' },
90
+ ],
91
+ }) => {
92
+ const serviceItems = (services ?? []) as ServiceItem[]
93
+ const buttonItems = buttons as ButtonItem[]
94
+ const imgSrc =
95
+ image && typeof image === 'object' && 'url' in image && image.url
96
+ ? image.url
97
+ : (imageFallbackUrl ?? '')
98
+ const safeImgSrc = isLocalImageSrc(imgSrc) ? imgSrc : null
99
+
100
+ return (
101
+ <>
102
+ {customCSS && <style dangerouslySetInnerHTML={{ __html: customCSS }} />}
103
+
104
+ <div id={sectionId ?? 'studio-section'} className="py-24 overflow-hidden">
105
+ #BlockName-DDSection
106
+ <div className="max-w-6xl lg:max-w-7xl mx-auto px-4 md:px-6">
107
+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-16 items-center">
108
+ {/* Left Content */}
109
+ <motion.div
110
+ variants={containerVariants}
111
+ initial="hidden"
112
+ whileInView="show"
113
+ viewport={{ once: false, amount: 0.15 }}
114
+ >
115
+ {eyebrow && (
116
+ <motion.p
117
+ variants={itemVariants}
118
+ className="text-[11.5px] font-semibold text-stone-400 tracking-widest uppercase mb-3 top-caption"
119
+ >
120
+ {eyebrow}
121
+ </motion.p>
122
+ )}
123
+
124
+ <motion.h2
125
+ variants={itemVariants}
126
+ className="text-3d text-4xl md:text-5xl font-bold text-stone-900 dark:text-stone-50 leading-tight mb-6"
127
+ >
128
+ {headlineMain}
129
+ <br />
130
+ <span className="text-stone-400">{headlineAccent}</span>
131
+ </motion.h2>
132
+
133
+ {description && (
134
+ <motion.p
135
+ variants={itemVariants}
136
+ className="text-stone-700 dark:text-stone-300 text-base leading-relaxed mb-10"
137
+ >
138
+ {description}
139
+ </motion.p>
140
+ )}
141
+
142
+ {serviceItems.length > 0 && (
143
+ <motion.div
144
+ variants={containerVariants}
145
+ className="grid grid-cols-1 sm:grid-cols-2 gap-5 mb-10"
146
+ >
147
+ {serviceItems.map((svc) => (
148
+ <motion.div
149
+ key={svc.id ?? svc.title}
150
+ variants={itemVariants}
151
+ className="flex gap-3"
152
+ >
153
+ <div className="w-8 h-8 flex items-center justify-center rounded-lg bg-stone-200/50 dark:bg-stone-800/50 text-stone-400 shrink-0 mt-0.5 border border-stone-200 dark:border-stone-600 hover:border-lime-500 duration-150">
154
+ <DynamicIcon className="text-stone-400" name={svc.iconName} size={14} />
155
+ </div>
156
+ <div>
157
+ <h3 className="text-sm font-semibold text-stone-800 dark:text-stone-50 mb-1">
158
+ {svc.title}
159
+ </h3>
160
+ <p className="text-sm text-stone-700 dark:text-stone-300 leading-relaxed">
161
+ {svc.description}
162
+ </p>
163
+ </div>
164
+ </motion.div>
165
+ ))}
166
+ </motion.div>
167
+ )}
168
+
169
+ {/* {ctaLabel && ctaHref && (
170
+ <motion.div variants={itemVariants}>
171
+ <Link
172
+ href={ctaHref}
173
+ className="inline-flex items-center gap-2 bg-stone-50 text-stone-900 px-6 py-3 rounded-lg text-sm font-semibold hover:bg-stone-100 transition-colors cursor-pointer whitespace-nowrap"
174
+ >
175
+ {ctaLabel}
176
+ <ArrowUpRight size={15} />
177
+ </Link>
178
+ </motion.div>
179
+ )} */}
180
+
181
+ {/* Dusted CTA Buttons */}
182
+ {showButtons && buttonItems.length > 0 && (
183
+ <motion.div
184
+ className="dusted-hero-cta-col flex col-start-2 col-span-2 gap-4"
185
+ variants={itemVariants}
186
+ >
187
+ {buttonItems.map((button, index) => (
188
+ <a
189
+ key={index}
190
+ href={(button as any).href ?? '#'}
191
+ className={
192
+ button.class ??
193
+ 'inline-flex items-center gap-1.5 bg-indigo-700 text-stone-50 text-xs font-semibold px-3 py-1.5 rounded-lg hover:bg-indigo-600 group-hover:scale-[1.05] hover:shadow-xl transition-all duration-150 whitespace-nowrap'
194
+ }
195
+ style={{ cornerShape: 'squircle' } as React.CSSProperties}
196
+ >
197
+ {/* TODO: Reconnect ButtonDustedFluid if this project provides it. */}
198
+ {button.label || 'Button'}
199
+ </a>
200
+ ))}
201
+ </motion.div>
202
+ )}
203
+ </motion.div>
204
+
205
+ {/* Right Image */}
206
+ {(safeImgSrc || imgSrc) && (
207
+ <motion.div
208
+ className="relative"
209
+ initial={{ opacity: 0, x: 40 }}
210
+ whileInView={{ opacity: 1, x: 0 }}
211
+ viewport={{ once: false, amount: 0.15 }}
212
+ transition={{ duration: 0.6, ease: 'easeOut' }}
213
+ >
214
+ <div
215
+ className="rounded-3xl overflow-hidden w-full h-125 relative shadow-xl"
216
+ style={{ cornerShape: 'squircle' } as React.CSSProperties}
217
+ >
218
+ {safeImgSrc ? (
219
+ <Image
220
+ src={safeImgSrc}
221
+ alt={imageAlt ?? 'DesignsDusted Studio'}
222
+ fill
223
+ sizes="(max-width: 768px) 100vw, 50vw"
224
+ className="object-cover object-top squircle"
225
+ style={{ cornerShape: 'squircle' } as React.CSSProperties}
226
+ />
227
+ ) : (
228
+ <SectionImagePlaceholder />
229
+ )}
230
+ <div
231
+ className="absolute inset-0 bg-linear-to-t from-stone-950/70 via-transparent to-transparent rounded-2xl"
232
+ style={{ cornerShape: 'squircle' } as React.CSSProperties}
233
+ />
234
+ </div>
235
+
236
+ {showBadge && (
237
+ <div
238
+ className="absolute bottom-6 left-6 right-6 bg-indigo-900/50 shadow-inner backdrop-blur-sm rounded-2xl p-4 border border-indigo-700"
239
+ style={{ cornerShape: 'squircle' } as React.CSSProperties}
240
+ >
241
+ <div className="flex items-center gap-3">
242
+ <div className="w-10 h-10 flex items-center justify-center rounded-lg bg-stone-50 text-stone-900 shrink-0">
243
+ <CheckCheck size={16} />
244
+ </div>
245
+ <div>
246
+ {badgeTitle && (
247
+ <div className="text-sm font-semibold text-stone-50 dark:text-stone-50">
248
+ {badgeTitle}
249
+ </div>
250
+ )}
251
+ {badgeSubtitle && (
252
+ <div className="text-xs text-stone-300">{badgeSubtitle}</div>
253
+ )}
254
+ </div>
255
+ <div className="ml-auto w-2 h-2 rounded-full bg-lime-400 animate-pulse shrink-0" />
256
+ </div>
257
+ </div>
258
+ )}
259
+ </motion.div>
260
+ )}
261
+ </div>
262
+ </div>
263
+ </div>
264
+ </>
265
+ )
266
+ }