@leitware/composables 1.3.3 → 1.4.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.
- package/README.md +37 -0
- package/dist/presets/brutalist.css +5 -1
- package/dist/presets/default.css +4 -0
- package/dist/presets/signal-pop.css +4 -0
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +8 -0
- package/package.json +2 -1
- package/rules/composables.md +9 -7
- package/skills/use-composables/references/public-api.md +7 -2
- package/skills/use-composables/references/semantic-utilities.md +2 -0
- package/src/_internal/ai-elements/chain-of-thought.tsx +1 -1
- package/src/_internal/badge.tsx +2 -2
- package/src/_internal/button.tsx +1 -1
- package/src/_internal/calendar.tsx +1 -1
- package/src/_internal/checkbox.tsx +1 -1
- package/src/_internal/combobox.tsx +3 -3
- package/src/_internal/command.tsx +3 -3
- package/src/_internal/dropdown-menu.tsx +2 -2
- package/src/_internal/dropzone.tsx +3 -3
- package/src/_internal/field.tsx +2 -2
- package/src/_internal/grid-overlay.tsx +2 -2
- package/src/_internal/input-group.tsx +1 -1
- package/src/_internal/input.tsx +1 -1
- package/src/_internal/layout-bento.tsx +1 -1
- package/src/_internal/marker.tsx +1 -1
- package/src/_internal/radio-group.tsx +2 -2
- package/src/_internal/resizable.tsx +1 -1
- package/src/_internal/select.tsx +5 -2
- package/src/_internal/sidebar.tsx +2 -2
- package/src/_internal/switch.tsx +1 -1
- package/src/_internal/tabs.tsx +2 -2
- package/src/_internal/textarea.tsx +1 -1
- package/src/_internal/tooltip.tsx +1 -1
- package/src/index.ts +4 -0
- package/src/opinionated/blocks/content.tsx +247 -0
- package/src/opinionated/blocks/features.tsx +242 -0
- package/src/opinionated/blocks/heroes.tsx +711 -0
- package/src/opinionated/blocks/index.ts +4 -0
- package/src/opinionated/blocks/shared.tsx +185 -0
- package/src/opinionated/button.tsx +2 -0
- package/src/opinionated/collapsible.tsx +1 -1
- package/src/opinionated/form-calendar-popover.tsx +1 -1
- package/src/opinionated/form-checkbox.tsx +1 -1
- package/src/opinionated/form-combobox.tsx +1 -1
- package/src/opinionated/form-date-of-birth.tsx +1 -1
- package/src/opinionated/form-dropzone.tsx +1 -1
- package/src/opinionated/form-input-group.tsx +1 -1
- package/src/opinionated/form-input.tsx +1 -1
- package/src/opinionated/form-multi-combobox.tsx +1 -1
- package/src/opinionated/form-multi-dropzone.tsx +1 -1
- package/src/opinionated/form-radiogroup.tsx +1 -1
- package/src/opinionated/form-select.tsx +1 -1
- package/src/opinionated/form-slider.tsx +1 -1
- package/src/opinionated/form-switch.tsx +1 -1
- package/src/opinionated/form-textarea.tsx +1 -1
- package/src/opinionated/token-config-panel/color-editor.tsx +1 -1
- package/src/opinionated/token-config-panel/json-import-export.tsx +1 -1
- package/src/opinionated/window-frame.tsx +57 -0
- package/src/styles/presets/brutalist.css +5 -1
- package/src/styles/presets/default.css +4 -0
- package/src/styles/presets/signal-pop.css +4 -0
- package/src/styles/presets-data/brutalist.ts +5 -1
- package/src/styles/presets-data/default.ts +4 -0
- package/src/styles/presets-data/signal-pop.ts +4 -0
- package/src/styles/tokens/components.css +1 -0
- package/src/styles/tokens/registry.ts +15 -1
- package/src/styles/tokens/semantic-utilities.css +8 -0
- package/src/styles/tokens/semantic.css +5 -1
- package/src/styles/tokens/tailwind-color-adapter.css +3 -1
- package/src/styles/tokens/tailwind-public-utilities.css +8 -0
|
@@ -0,0 +1,711 @@
|
|
|
1
|
+
import { ArrowRightIcon, SearchIcon, SparklesIcon } from 'lucide-react'
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
import { Avatar } from '../avatar'
|
|
4
|
+
import { Button } from '../button'
|
|
5
|
+
import { Input } from '../input'
|
|
6
|
+
import { WindowFrame } from '../window-frame'
|
|
7
|
+
import { cn } from '../../lib/utils'
|
|
8
|
+
import {
|
|
9
|
+
BlockAction,
|
|
10
|
+
BlockActions,
|
|
11
|
+
BlockDashboard,
|
|
12
|
+
BlockImage,
|
|
13
|
+
BlockLogos,
|
|
14
|
+
BlockSection,
|
|
15
|
+
type BlockBaseProps,
|
|
16
|
+
type BlockCTA,
|
|
17
|
+
type BlockMedia,
|
|
18
|
+
} from './shared'
|
|
19
|
+
|
|
20
|
+
type HeroCopy = {
|
|
21
|
+
title: string
|
|
22
|
+
description: string
|
|
23
|
+
primaryCTA?: BlockCTA
|
|
24
|
+
secondaryCTA?: BlockCTA
|
|
25
|
+
}
|
|
26
|
+
type TwoLineCopy = HeroCopy & { titleLine2: string }
|
|
27
|
+
|
|
28
|
+
export interface Hero01Props extends TwoLineCopy, BlockBaseProps {
|
|
29
|
+
washImage: string
|
|
30
|
+
integrationRows?: string[][]
|
|
31
|
+
}
|
|
32
|
+
export function Hero01({
|
|
33
|
+
title,
|
|
34
|
+
titleLine2,
|
|
35
|
+
description,
|
|
36
|
+
washImage,
|
|
37
|
+
integrationRows,
|
|
38
|
+
primaryCTA,
|
|
39
|
+
className,
|
|
40
|
+
animation,
|
|
41
|
+
}: Hero01Props) {
|
|
42
|
+
return (
|
|
43
|
+
<BlockSection className={cn('min-h-[42rem] text-center', className)} animation={animation}>
|
|
44
|
+
<div className="pointer-events-none absolute inset-x-0 top-0 h-[34rem] opacity-30 [mask-image:linear-gradient(to_bottom,black,transparent)]">
|
|
45
|
+
<img src={washImage} alt="" className="h-full w-full object-cover" />
|
|
46
|
+
</div>
|
|
47
|
+
<div className="relative mx-auto max-w-4xl pt-14">
|
|
48
|
+
<h1 className="font-heading text-5xl leading-tight tracking-tight md:text-7xl">
|
|
49
|
+
{title}
|
|
50
|
+
<br />
|
|
51
|
+
{titleLine2}
|
|
52
|
+
</h1>
|
|
53
|
+
<p className="mx-auto mt-6 max-w-xl text-lg text-[var(--text-secondary)]">{description}</p>
|
|
54
|
+
<BlockActions primary={primaryCTA} centered />
|
|
55
|
+
</div>
|
|
56
|
+
{integrationRows && (
|
|
57
|
+
<div className="relative mx-auto mt-20 flex max-w-3xl flex-col items-center gap-3">
|
|
58
|
+
{integrationRows.map((row, index) => (
|
|
59
|
+
<div key={index} className="flex flex-wrap justify-center gap-3">
|
|
60
|
+
{row.map((name) => (
|
|
61
|
+
<span
|
|
62
|
+
key={name}
|
|
63
|
+
className="rounded-full border border-stroke-default bg-surface-default px-5 py-2 text-xs font-medium shadow-sm"
|
|
64
|
+
>
|
|
65
|
+
{name}
|
|
66
|
+
</span>
|
|
67
|
+
))}
|
|
68
|
+
</div>
|
|
69
|
+
))}
|
|
70
|
+
</div>
|
|
71
|
+
)}
|
|
72
|
+
</BlockSection>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface Hero02Props extends TwoLineCopy, BlockBaseProps {
|
|
77
|
+
washImage: string
|
|
78
|
+
}
|
|
79
|
+
export function Hero02({
|
|
80
|
+
title,
|
|
81
|
+
titleLine2,
|
|
82
|
+
description,
|
|
83
|
+
washImage,
|
|
84
|
+
primaryCTA,
|
|
85
|
+
className,
|
|
86
|
+
animation,
|
|
87
|
+
}: Hero02Props) {
|
|
88
|
+
return (
|
|
89
|
+
<BlockSection className={className} animation={animation}>
|
|
90
|
+
<div className="grid min-h-[35rem] items-center gap-12 lg:grid-cols-2">
|
|
91
|
+
<div>
|
|
92
|
+
<h1 className="font-heading text-5xl leading-tight tracking-tight md:text-6xl">
|
|
93
|
+
{title}
|
|
94
|
+
<br />
|
|
95
|
+
{titleLine2}
|
|
96
|
+
</h1>
|
|
97
|
+
<p className="mt-6 max-w-lg text-lg text-[var(--text-secondary)]">{description}</p>
|
|
98
|
+
<BlockActions primary={primaryCTA} />
|
|
99
|
+
</div>
|
|
100
|
+
<div className="relative min-h-96 overflow-hidden rounded-2xl bg-surface-accent">
|
|
101
|
+
<img
|
|
102
|
+
src={washImage}
|
|
103
|
+
alt=""
|
|
104
|
+
className="absolute inset-0 h-full w-full object-cover opacity-50"
|
|
105
|
+
/>
|
|
106
|
+
<BlockDashboard className="absolute inset-x-6 top-16 rotate-[-3deg]" />
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</BlockSection>
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface Hero03Props extends HeroCopy, BlockBaseProps {
|
|
114
|
+
portraitImage: string
|
|
115
|
+
portraitAlt: string
|
|
116
|
+
}
|
|
117
|
+
export function Hero03({
|
|
118
|
+
title,
|
|
119
|
+
description,
|
|
120
|
+
portraitImage,
|
|
121
|
+
portraitAlt,
|
|
122
|
+
primaryCTA,
|
|
123
|
+
secondaryCTA,
|
|
124
|
+
className,
|
|
125
|
+
animation,
|
|
126
|
+
}: Hero03Props) {
|
|
127
|
+
return (
|
|
128
|
+
<BlockSection className={cn('text-center', className)} animation={animation}>
|
|
129
|
+
<div className="mx-auto max-w-3xl">
|
|
130
|
+
<h1 className="font-heading text-5xl leading-tight tracking-tight md:text-7xl">{title}</h1>
|
|
131
|
+
<p className="mx-auto mt-6 max-w-xl text-lg text-[var(--text-secondary)]">{description}</p>
|
|
132
|
+
<BlockActions primary={primaryCTA} secondary={secondaryCTA} centered />
|
|
133
|
+
</div>
|
|
134
|
+
<div className="mx-auto mt-14 h-[30rem] max-w-4xl overflow-hidden rounded-t-[8rem] [mask-image:linear-gradient(to_bottom,black_65%,transparent)]">
|
|
135
|
+
<BlockImage media={{ src: portraitImage, alt: portraitAlt }} priority />
|
|
136
|
+
</div>
|
|
137
|
+
</BlockSection>
|
|
138
|
+
)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface Hero04Props extends TwoLineCopy, BlockBaseProps {
|
|
142
|
+
washImage: string
|
|
143
|
+
primaryImage: string
|
|
144
|
+
secondaryImage: string
|
|
145
|
+
primaryAlt: string
|
|
146
|
+
secondaryAlt: string
|
|
147
|
+
}
|
|
148
|
+
export function Hero04({
|
|
149
|
+
title,
|
|
150
|
+
titleLine2,
|
|
151
|
+
description,
|
|
152
|
+
washImage,
|
|
153
|
+
primaryImage,
|
|
154
|
+
secondaryImage,
|
|
155
|
+
primaryAlt,
|
|
156
|
+
secondaryAlt,
|
|
157
|
+
primaryCTA,
|
|
158
|
+
secondaryCTA,
|
|
159
|
+
className,
|
|
160
|
+
animation,
|
|
161
|
+
}: Hero04Props) {
|
|
162
|
+
return (
|
|
163
|
+
<BlockSection className={className} animation={animation}>
|
|
164
|
+
<img
|
|
165
|
+
src={washImage}
|
|
166
|
+
alt=""
|
|
167
|
+
className="pointer-events-none absolute inset-0 h-full w-full object-cover opacity-10"
|
|
168
|
+
/>
|
|
169
|
+
<div className="relative grid min-h-[36rem] items-center gap-10 md:grid-cols-2">
|
|
170
|
+
<div>
|
|
171
|
+
<h1 className="font-heading text-5xl leading-tight tracking-tight md:text-6xl">
|
|
172
|
+
{title}
|
|
173
|
+
<br />
|
|
174
|
+
{titleLine2}
|
|
175
|
+
</h1>
|
|
176
|
+
<p className="mt-6 max-w-md text-[var(--text-secondary)]">{description}</p>
|
|
177
|
+
<BlockActions primary={primaryCTA} secondary={secondaryCTA} />
|
|
178
|
+
</div>
|
|
179
|
+
<div className="relative h-[32rem]">
|
|
180
|
+
<div className="absolute left-0 top-0 h-4/5 w-3/4 overflow-hidden rounded-2xl shadow-lg">
|
|
181
|
+
<BlockImage media={{ src: primaryImage, alt: primaryAlt }} />
|
|
182
|
+
</div>
|
|
183
|
+
<div className="absolute bottom-0 right-0 h-3/5 w-1/2 overflow-hidden rounded-2xl border-8 border-[var(--bg-default)] shadow-lg">
|
|
184
|
+
<BlockImage media={{ src: secondaryImage, alt: secondaryAlt }} />
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
</BlockSection>
|
|
189
|
+
)
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export interface Hero05Props extends HeroCopy, BlockBaseProps {
|
|
193
|
+
tagline: string
|
|
194
|
+
landscapeImage: string
|
|
195
|
+
landscapeAlt: string
|
|
196
|
+
}
|
|
197
|
+
export function Hero05({
|
|
198
|
+
tagline,
|
|
199
|
+
title,
|
|
200
|
+
description,
|
|
201
|
+
landscapeImage,
|
|
202
|
+
landscapeAlt,
|
|
203
|
+
primaryCTA,
|
|
204
|
+
secondaryCTA,
|
|
205
|
+
className,
|
|
206
|
+
animation,
|
|
207
|
+
}: Hero05Props) {
|
|
208
|
+
return (
|
|
209
|
+
<BlockSection className={className} animation={animation}>
|
|
210
|
+
<div className="grid gap-8 border-t border-stroke-default pt-5 md:grid-cols-[1fr_2fr]">
|
|
211
|
+
<p className="max-w-xs text-xs uppercase tracking-wider text-[var(--text-muted)]">
|
|
212
|
+
{tagline}
|
|
213
|
+
</p>
|
|
214
|
+
<div>
|
|
215
|
+
<h1 className="font-heading text-4xl leading-tight tracking-tight md:text-6xl">
|
|
216
|
+
{title}
|
|
217
|
+
</h1>
|
|
218
|
+
<p className="mt-6 max-w-2xl text-[var(--text-secondary)]">{description}</p>
|
|
219
|
+
<BlockActions primary={primaryCTA} secondary={secondaryCTA} />
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
222
|
+
<div className="mt-14 h-[28rem] overflow-hidden rounded-xl">
|
|
223
|
+
<BlockImage media={{ src: landscapeImage, alt: landscapeAlt }} priority />
|
|
224
|
+
</div>
|
|
225
|
+
</BlockSection>
|
|
226
|
+
)
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export interface Hero06Props extends HeroCopy, BlockBaseProps {
|
|
230
|
+
highlight: string
|
|
231
|
+
logosLabel?: string
|
|
232
|
+
logos?: string[]
|
|
233
|
+
}
|
|
234
|
+
export function Hero06({
|
|
235
|
+
title,
|
|
236
|
+
highlight,
|
|
237
|
+
description,
|
|
238
|
+
primaryCTA,
|
|
239
|
+
secondaryCTA,
|
|
240
|
+
logosLabel,
|
|
241
|
+
logos,
|
|
242
|
+
className,
|
|
243
|
+
animation,
|
|
244
|
+
}: Hero06Props) {
|
|
245
|
+
return (
|
|
246
|
+
<BlockSection className={cn('text-center', className)} animation={animation}>
|
|
247
|
+
<div className="mx-auto max-w-4xl">
|
|
248
|
+
<p className="mx-auto mb-6 inline-flex items-center gap-2 rounded-full border border-stroke-default bg-surface-accent px-4 py-2 text-xs font-medium">
|
|
249
|
+
<SparklesIcon className="size-3 text-icon-brand" /> A better way to build
|
|
250
|
+
</p>
|
|
251
|
+
<h1 className="font-heading text-5xl leading-tight tracking-tight md:text-7xl">
|
|
252
|
+
{title} <span className="text-brand">{highlight}</span>
|
|
253
|
+
</h1>
|
|
254
|
+
<p className="mx-auto mt-6 max-w-xl text-lg text-[var(--text-secondary)]">{description}</p>
|
|
255
|
+
<BlockActions primary={primaryCTA} secondary={secondaryCTA} centered />
|
|
256
|
+
</div>
|
|
257
|
+
<div className="mx-auto mt-16 max-w-5xl rounded-2xl border border-stroke-default bg-surface-accent p-3 shadow-xl">
|
|
258
|
+
<BlockDashboard />
|
|
259
|
+
</div>
|
|
260
|
+
<BlockLogos label={logosLabel} logos={logos} />
|
|
261
|
+
</BlockSection>
|
|
262
|
+
)
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export interface Hero07Props extends Hero05Props {}
|
|
266
|
+
export function Hero07({
|
|
267
|
+
tagline,
|
|
268
|
+
title,
|
|
269
|
+
description,
|
|
270
|
+
landscapeImage,
|
|
271
|
+
landscapeAlt,
|
|
272
|
+
primaryCTA,
|
|
273
|
+
secondaryCTA,
|
|
274
|
+
className,
|
|
275
|
+
animation,
|
|
276
|
+
}: Hero07Props) {
|
|
277
|
+
return (
|
|
278
|
+
<BlockSection className={className} animation={animation}>
|
|
279
|
+
<div className="h-[30rem] overflow-hidden rounded-xl">
|
|
280
|
+
<BlockImage media={{ src: landscapeImage, alt: landscapeAlt }} priority />
|
|
281
|
+
</div>
|
|
282
|
+
<div className="mt-12 grid gap-8 border-t border-stroke-default pt-5 md:grid-cols-[1fr_2fr]">
|
|
283
|
+
<p className="max-w-xs text-xs uppercase tracking-wider text-[var(--text-muted)]">
|
|
284
|
+
{tagline}
|
|
285
|
+
</p>
|
|
286
|
+
<div>
|
|
287
|
+
<h1 className="font-heading text-4xl leading-tight tracking-tight md:text-6xl">
|
|
288
|
+
{title}
|
|
289
|
+
</h1>
|
|
290
|
+
<p className="mt-6 max-w-2xl text-[var(--text-secondary)]">{description}</p>
|
|
291
|
+
<BlockActions primary={primaryCTA} secondary={secondaryCTA} />
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
</BlockSection>
|
|
295
|
+
)
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export interface Hero08Props extends BlockBaseProps {
|
|
299
|
+
title: string
|
|
300
|
+
description: string
|
|
301
|
+
socialProof: string
|
|
302
|
+
avatars?: { src: string; fallback: string }[]
|
|
303
|
+
cards: {
|
|
304
|
+
title: string
|
|
305
|
+
subtitle: string
|
|
306
|
+
image: string
|
|
307
|
+
imageAlt: string
|
|
308
|
+
invert?: boolean
|
|
309
|
+
cta?: BlockCTA
|
|
310
|
+
}[]
|
|
311
|
+
}
|
|
312
|
+
export function Hero08({
|
|
313
|
+
title,
|
|
314
|
+
description,
|
|
315
|
+
socialProof,
|
|
316
|
+
avatars,
|
|
317
|
+
cards,
|
|
318
|
+
className,
|
|
319
|
+
animation,
|
|
320
|
+
}: Hero08Props) {
|
|
321
|
+
return (
|
|
322
|
+
<BlockSection className={className} animation={animation}>
|
|
323
|
+
<div className="grid gap-12 lg:grid-cols-[2fr_3fr]">
|
|
324
|
+
<div className="flex flex-col justify-center">
|
|
325
|
+
<h1 className="font-heading text-5xl leading-tight tracking-tight md:text-6xl">
|
|
326
|
+
{title}
|
|
327
|
+
</h1>
|
|
328
|
+
<p className="mt-6 text-lg text-[var(--text-secondary)]">{description}</p>
|
|
329
|
+
<div className="mt-10 flex items-center gap-4">
|
|
330
|
+
<div className="flex -space-x-2">
|
|
331
|
+
{avatars?.map((person, index) => (
|
|
332
|
+
<Avatar
|
|
333
|
+
key={index}
|
|
334
|
+
src={person.src}
|
|
335
|
+
fallback={person.fallback}
|
|
336
|
+
className="ring-2 ring-[var(--bg-default)]"
|
|
337
|
+
/>
|
|
338
|
+
))}
|
|
339
|
+
</div>
|
|
340
|
+
<p className="text-xs font-medium text-[var(--text-muted)]">{socialProof}</p>
|
|
341
|
+
</div>
|
|
342
|
+
</div>
|
|
343
|
+
<div className="grid gap-4 sm:grid-cols-2">
|
|
344
|
+
{cards.map((card) => (
|
|
345
|
+
<article
|
|
346
|
+
key={card.title}
|
|
347
|
+
className="relative flex min-h-[26rem] flex-col justify-end overflow-hidden rounded-xl"
|
|
348
|
+
>
|
|
349
|
+
<BlockImage
|
|
350
|
+
media={{ src: card.image, alt: card.imageAlt }}
|
|
351
|
+
className="absolute inset-0"
|
|
352
|
+
/>
|
|
353
|
+
<div
|
|
354
|
+
className={cn(
|
|
355
|
+
'absolute inset-0 bg-gradient-to-t',
|
|
356
|
+
card.invert
|
|
357
|
+
? 'from-black/80 via-black/20 to-transparent'
|
|
358
|
+
: 'from-white/90 via-white/10 to-transparent',
|
|
359
|
+
)}
|
|
360
|
+
/>
|
|
361
|
+
<div className={cn('relative p-6', card.invert ? 'text-white' : 'text-black')}>
|
|
362
|
+
<h2 className="text-2xl font-semibold">{card.title}</h2>
|
|
363
|
+
<p className="mt-1 text-sm">{card.subtitle}</p>
|
|
364
|
+
<BlockAction action={card.cta} className="mt-5" arrow />
|
|
365
|
+
</div>
|
|
366
|
+
</article>
|
|
367
|
+
))}
|
|
368
|
+
</div>
|
|
369
|
+
</div>
|
|
370
|
+
</BlockSection>
|
|
371
|
+
)
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export interface Hero09Props extends BlockBaseProps {
|
|
375
|
+
title: string
|
|
376
|
+
titleLine2: string
|
|
377
|
+
description: string
|
|
378
|
+
searchPlaceholder: string
|
|
379
|
+
searchButtonText: string
|
|
380
|
+
heroImage: string
|
|
381
|
+
heroAlt: string
|
|
382
|
+
bottomTitle: string
|
|
383
|
+
bottomTitleLine2: string
|
|
384
|
+
bottomText: string
|
|
385
|
+
onSearch?: (query: string) => void
|
|
386
|
+
}
|
|
387
|
+
export function Hero09({
|
|
388
|
+
title,
|
|
389
|
+
titleLine2,
|
|
390
|
+
description,
|
|
391
|
+
searchPlaceholder,
|
|
392
|
+
searchButtonText,
|
|
393
|
+
heroImage,
|
|
394
|
+
heroAlt,
|
|
395
|
+
bottomTitle,
|
|
396
|
+
bottomTitleLine2,
|
|
397
|
+
bottomText,
|
|
398
|
+
onSearch,
|
|
399
|
+
className,
|
|
400
|
+
animation,
|
|
401
|
+
}: Hero09Props) {
|
|
402
|
+
const [query, setQuery] = useState('')
|
|
403
|
+
return (
|
|
404
|
+
<BlockSection className={cn('text-center', className)} animation={animation}>
|
|
405
|
+
<div className="mx-auto max-w-3xl">
|
|
406
|
+
<h1 className="font-heading text-5xl leading-tight tracking-tight md:text-7xl">
|
|
407
|
+
{title}
|
|
408
|
+
<br />
|
|
409
|
+
{titleLine2}
|
|
410
|
+
</h1>
|
|
411
|
+
<p className="mx-auto mt-5 max-w-xl text-lg text-[var(--text-secondary)]">{description}</p>
|
|
412
|
+
<form
|
|
413
|
+
onSubmit={(event) => {
|
|
414
|
+
event.preventDefault()
|
|
415
|
+
onSearch?.(query)
|
|
416
|
+
}}
|
|
417
|
+
role="search"
|
|
418
|
+
className="mx-auto mt-8 flex max-w-lg gap-2 rounded-full border border-stroke-default bg-surface-default p-2 shadow-sm"
|
|
419
|
+
>
|
|
420
|
+
<SearchIcon className="ml-3 size-5 self-center text-icon-secondary" />
|
|
421
|
+
<Input
|
|
422
|
+
value={query}
|
|
423
|
+
onChange={(event) => setQuery(event.target.value)}
|
|
424
|
+
placeholder={searchPlaceholder}
|
|
425
|
+
aria-label={searchPlaceholder}
|
|
426
|
+
className="min-w-0 flex-1 border-0 bg-transparent shadow-none"
|
|
427
|
+
/>
|
|
428
|
+
<Button type="submit" shape="pill" className="min-h-10 px-5">
|
|
429
|
+
{searchButtonText}
|
|
430
|
+
</Button>
|
|
431
|
+
</form>
|
|
432
|
+
</div>
|
|
433
|
+
<div className="mx-auto mt-12 h-[29rem] max-w-5xl overflow-hidden rounded-t-[8rem] [mask-image:linear-gradient(to_bottom,black_65%,transparent)]">
|
|
434
|
+
<BlockImage media={{ src: heroImage, alt: heroAlt }} priority />
|
|
435
|
+
</div>
|
|
436
|
+
<div className="grid gap-6 border-t border-stroke-default pt-8 text-left md:grid-cols-2">
|
|
437
|
+
<h2 className="font-heading text-3xl md:text-4xl">
|
|
438
|
+
{bottomTitle}
|
|
439
|
+
<br />
|
|
440
|
+
{bottomTitleLine2}
|
|
441
|
+
</h2>
|
|
442
|
+
<p className="max-w-lg text-[var(--text-secondary)]">{bottomText}</p>
|
|
443
|
+
</div>
|
|
444
|
+
</BlockSection>
|
|
445
|
+
)
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
export interface Hero10Props extends HeroCopy, BlockBaseProps {
|
|
449
|
+
titleLine2Prefix: string
|
|
450
|
+
titleHighlight: string
|
|
451
|
+
socialProof: string
|
|
452
|
+
images: string[]
|
|
453
|
+
imageAlts: string[]
|
|
454
|
+
}
|
|
455
|
+
export function Hero10({
|
|
456
|
+
title,
|
|
457
|
+
titleLine2Prefix,
|
|
458
|
+
titleHighlight,
|
|
459
|
+
description,
|
|
460
|
+
socialProof,
|
|
461
|
+
images,
|
|
462
|
+
imageAlts,
|
|
463
|
+
primaryCTA,
|
|
464
|
+
secondaryCTA,
|
|
465
|
+
className,
|
|
466
|
+
animation,
|
|
467
|
+
}: Hero10Props) {
|
|
468
|
+
return (
|
|
469
|
+
<BlockSection className={cn('text-center', className)} animation={animation}>
|
|
470
|
+
<div className="mx-auto max-w-4xl">
|
|
471
|
+
<h1 className="font-heading text-5xl leading-tight tracking-tight md:text-7xl">
|
|
472
|
+
{title}
|
|
473
|
+
<br />
|
|
474
|
+
{titleLine2Prefix} <span className="text-brand">{titleHighlight}</span>
|
|
475
|
+
</h1>
|
|
476
|
+
<p className="mx-auto mt-6 max-w-xl text-lg text-[var(--text-secondary)]">{description}</p>
|
|
477
|
+
<BlockActions primary={primaryCTA} secondary={secondaryCTA} centered />
|
|
478
|
+
<p className="mt-8 text-xs uppercase tracking-wider text-[var(--text-muted)]">
|
|
479
|
+
{socialProof}
|
|
480
|
+
</p>
|
|
481
|
+
</div>
|
|
482
|
+
<div className="relative mx-auto mt-14 flex h-80 max-w-4xl items-center justify-center sm:h-[28rem]">
|
|
483
|
+
{images.slice(0, 3).map((src, index) => (
|
|
484
|
+
<div
|
|
485
|
+
key={src}
|
|
486
|
+
className={cn(
|
|
487
|
+
'absolute h-4/5 w-[45%] overflow-hidden rounded-xl border-4 border-[var(--bg-default)] shadow-lg',
|
|
488
|
+
index === 0 && '-translate-x-1/2 -rotate-12',
|
|
489
|
+
index === 1 && 'z-10 translate-y-3',
|
|
490
|
+
index === 2 && 'translate-x-1/2 rotate-12',
|
|
491
|
+
)}
|
|
492
|
+
>
|
|
493
|
+
<BlockImage media={{ src, alt: imageAlts[index] ?? '' }} />
|
|
494
|
+
</div>
|
|
495
|
+
))}
|
|
496
|
+
</div>
|
|
497
|
+
</BlockSection>
|
|
498
|
+
)
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
export interface Hero11Props extends BlockBaseProps {
|
|
502
|
+
title: string
|
|
503
|
+
description: string
|
|
504
|
+
featureText: string
|
|
505
|
+
featureHref: string
|
|
506
|
+
}
|
|
507
|
+
export function Hero11({
|
|
508
|
+
title,
|
|
509
|
+
description,
|
|
510
|
+
featureText,
|
|
511
|
+
featureHref,
|
|
512
|
+
className,
|
|
513
|
+
animation,
|
|
514
|
+
variant,
|
|
515
|
+
}: Hero11Props) {
|
|
516
|
+
return (
|
|
517
|
+
<BlockSection className={className} variant={variant} animation={animation}>
|
|
518
|
+
<div className="grid min-h-[34rem] items-center gap-12 lg:grid-cols-2">
|
|
519
|
+
<div>
|
|
520
|
+
<h1 className="font-heading text-5xl leading-tight tracking-tight md:text-6xl">
|
|
521
|
+
{title}
|
|
522
|
+
</h1>
|
|
523
|
+
<p className="mt-6 max-w-lg text-lg text-[var(--text-secondary)]">{description}</p>
|
|
524
|
+
<a
|
|
525
|
+
href={featureHref}
|
|
526
|
+
className="mt-8 inline-flex items-center gap-2 text-sm font-medium text-link hover:underline"
|
|
527
|
+
>
|
|
528
|
+
{featureText}
|
|
529
|
+
<ArrowRightIcon className="size-4" />
|
|
530
|
+
</a>
|
|
531
|
+
</div>
|
|
532
|
+
<WindowFrame
|
|
533
|
+
title="Product workspace"
|
|
534
|
+
contentClassName="relative min-h-96 bg-surface-accent p-5"
|
|
535
|
+
className="[mask-image:linear-gradient(to_bottom,black_80%,transparent)]"
|
|
536
|
+
>
|
|
537
|
+
<div className="grid gap-3 sm:grid-cols-[2fr_1fr]">
|
|
538
|
+
<div className="rounded-xl border border-stroke-default bg-surface-default p-4">
|
|
539
|
+
<p className="text-sm font-medium">Issues</p>
|
|
540
|
+
{['Review onboarding flow', 'Publish component docs', 'Refine navigation'].map(
|
|
541
|
+
(item, index) => (
|
|
542
|
+
<div
|
|
543
|
+
key={item}
|
|
544
|
+
className="mt-4 flex items-center gap-3 border-t border-stroke-default pt-4 text-xs"
|
|
545
|
+
>
|
|
546
|
+
<span className="text-icon-brand">●</span>
|
|
547
|
+
<span>{item}</span>
|
|
548
|
+
<span className="ml-auto text-[var(--text-muted)]">{index + 1}</span>
|
|
549
|
+
</div>
|
|
550
|
+
),
|
|
551
|
+
)}
|
|
552
|
+
</div>
|
|
553
|
+
<div className="rounded-xl border border-stroke-default bg-surface-default p-4 text-xs">
|
|
554
|
+
<p className="font-medium">Properties</p>
|
|
555
|
+
<p className="mt-5 text-[var(--text-muted)]">Status</p>
|
|
556
|
+
<p className="mt-2 rounded-full bg-surface-brand px-2 py-1 text-brand">In progress</p>
|
|
557
|
+
<p className="mt-5 text-[var(--text-muted)]">Priority</p>
|
|
558
|
+
<p className="mt-2">High</p>
|
|
559
|
+
</div>
|
|
560
|
+
</div>
|
|
561
|
+
<div className="absolute bottom-3 right-4 w-3/5 rounded-xl border border-stroke-default bg-surface-default p-4 shadow-lg">
|
|
562
|
+
<p className="flex items-center gap-2 text-xs font-medium">
|
|
563
|
+
<SparklesIcon className="size-4 text-icon-brand" /> Agent activity
|
|
564
|
+
</p>
|
|
565
|
+
<p className="mt-3 text-xs text-[var(--text-muted)]">
|
|
566
|
+
Reviewing your workspace and preparing next steps...
|
|
567
|
+
</p>
|
|
568
|
+
</div>
|
|
569
|
+
</WindowFrame>
|
|
570
|
+
</div>
|
|
571
|
+
</BlockSection>
|
|
572
|
+
)
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
export interface Hero12Props extends BlockBaseProps {
|
|
576
|
+
title: string
|
|
577
|
+
established: string
|
|
578
|
+
description: string
|
|
579
|
+
backgroundImage: string
|
|
580
|
+
backgroundAlt: string
|
|
581
|
+
primaryCTA?: BlockCTA
|
|
582
|
+
}
|
|
583
|
+
export function Hero12({
|
|
584
|
+
title,
|
|
585
|
+
established,
|
|
586
|
+
description,
|
|
587
|
+
backgroundImage,
|
|
588
|
+
backgroundAlt,
|
|
589
|
+
primaryCTA,
|
|
590
|
+
className,
|
|
591
|
+
animation,
|
|
592
|
+
}: Hero12Props) {
|
|
593
|
+
return (
|
|
594
|
+
<BlockSection
|
|
595
|
+
fullWidth
|
|
596
|
+
className={cn('flex min-h-[42rem] items-end py-0 text-white', className)}
|
|
597
|
+
animation={animation}
|
|
598
|
+
>
|
|
599
|
+
<BlockImage
|
|
600
|
+
media={{ src: backgroundImage, alt: backgroundAlt }}
|
|
601
|
+
className="absolute inset-0"
|
|
602
|
+
priority
|
|
603
|
+
/>
|
|
604
|
+
<div className="absolute inset-0 bg-gradient-to-t from-black/75 via-black/10 to-black/20" />
|
|
605
|
+
<div className="relative mx-auto flex w-full max-w-[90rem] flex-col justify-between gap-20 px-8 py-10 md:min-h-[42rem]">
|
|
606
|
+
<div className="flex items-start justify-between gap-5">
|
|
607
|
+
<h1 className="font-heading text-6xl leading-none tracking-tight md:text-8xl">{title}</h1>
|
|
608
|
+
<span className="text-xs uppercase tracking-widest">{established}</span>
|
|
609
|
+
</div>
|
|
610
|
+
<div className="flex flex-col items-start justify-between gap-8 md:flex-row md:items-end">
|
|
611
|
+
<p className="max-w-xl text-lg leading-relaxed">{description}</p>
|
|
612
|
+
<BlockAction action={primaryCTA} className="bg-white text-black" arrow />
|
|
613
|
+
</div>
|
|
614
|
+
</div>
|
|
615
|
+
</BlockSection>
|
|
616
|
+
)
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
export interface Hero13Props extends BlockBaseProps {
|
|
620
|
+
title: string
|
|
621
|
+
titleLine2: string
|
|
622
|
+
meta: string
|
|
623
|
+
eyebrow: string
|
|
624
|
+
description: string
|
|
625
|
+
primaryImage: BlockMedia
|
|
626
|
+
secondaryImage: BlockMedia
|
|
627
|
+
}
|
|
628
|
+
export function Hero13({
|
|
629
|
+
title,
|
|
630
|
+
titleLine2,
|
|
631
|
+
meta,
|
|
632
|
+
eyebrow,
|
|
633
|
+
description,
|
|
634
|
+
primaryImage,
|
|
635
|
+
secondaryImage,
|
|
636
|
+
variant,
|
|
637
|
+
animation,
|
|
638
|
+
className,
|
|
639
|
+
}: Hero13Props) {
|
|
640
|
+
return (
|
|
641
|
+
<BlockSection variant={variant} animation={animation} className={className}>
|
|
642
|
+
<div className="grid min-h-[38rem] gap-10 md:grid-cols-[3fr_2fr]">
|
|
643
|
+
<div className="flex flex-col justify-between">
|
|
644
|
+
<div className="flex items-center justify-between text-xs uppercase tracking-wider text-[var(--text-muted)]">
|
|
645
|
+
<span>{eyebrow}</span>
|
|
646
|
+
<span>{meta}</span>
|
|
647
|
+
</div>
|
|
648
|
+
<div>
|
|
649
|
+
<h1 className="font-heading text-7xl leading-none tracking-tight md:text-8xl">
|
|
650
|
+
{title}
|
|
651
|
+
<br />
|
|
652
|
+
{titleLine2}
|
|
653
|
+
</h1>
|
|
654
|
+
<p className="mt-8 max-w-md text-[var(--text-secondary)]">{description}</p>
|
|
655
|
+
</div>
|
|
656
|
+
</div>
|
|
657
|
+
<div className="relative min-h-[30rem]">
|
|
658
|
+
<div className="absolute inset-x-8 top-0 h-4/5 overflow-hidden rounded-xl">
|
|
659
|
+
<BlockImage media={primaryImage} />
|
|
660
|
+
</div>
|
|
661
|
+
<div className="absolute bottom-0 left-0 h-1/2 w-1/2 overflow-hidden rounded-xl border-8 border-[var(--bg-default)] shadow-lg">
|
|
662
|
+
<BlockImage media={secondaryImage} />
|
|
663
|
+
</div>
|
|
664
|
+
</div>
|
|
665
|
+
</div>
|
|
666
|
+
</BlockSection>
|
|
667
|
+
)
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
export interface Hero14Props extends HeroCopy, BlockBaseProps {
|
|
671
|
+
image: string
|
|
672
|
+
imageAlt: string
|
|
673
|
+
logos?: string[]
|
|
674
|
+
}
|
|
675
|
+
export function Hero14({
|
|
676
|
+
title,
|
|
677
|
+
description,
|
|
678
|
+
image,
|
|
679
|
+
imageAlt,
|
|
680
|
+
logos,
|
|
681
|
+
primaryCTA,
|
|
682
|
+
secondaryCTA,
|
|
683
|
+
variant,
|
|
684
|
+
animation,
|
|
685
|
+
className,
|
|
686
|
+
}: Hero14Props) {
|
|
687
|
+
return (
|
|
688
|
+
<BlockSection variant={variant} animation={animation} className={cn('text-center', className)}>
|
|
689
|
+
<div className="mx-auto max-w-4xl">
|
|
690
|
+
<h1 className="font-heading text-5xl leading-tight tracking-tight md:text-7xl">{title}</h1>
|
|
691
|
+
<p className="mx-auto mt-6 max-w-xl text-lg text-[var(--text-secondary)]">{description}</p>
|
|
692
|
+
<BlockActions primary={primaryCTA} secondary={secondaryCTA} centered />
|
|
693
|
+
</div>
|
|
694
|
+
<div className="relative mt-14 h-[32rem] overflow-hidden rounded-2xl">
|
|
695
|
+
<BlockImage media={{ src: image, alt: imageAlt }} priority />
|
|
696
|
+
<WindowFrame
|
|
697
|
+
title="Block builder"
|
|
698
|
+
className="absolute bottom-6 left-1/2 w-[min(90%,32rem)] -translate-x-1/2 text-left shadow-xl"
|
|
699
|
+
contentClassName="p-5"
|
|
700
|
+
>
|
|
701
|
+
<p className="mt-2 text-sm text-default">Describe the section you want to create</p>
|
|
702
|
+
<div className="mt-4 flex items-center justify-between rounded-lg border border-stroke-default bg-default p-3 text-xs text-[var(--text-muted)]">
|
|
703
|
+
<span>A responsive landing page hero...</span>
|
|
704
|
+
<ArrowRightIcon className="size-4 text-icon-default" />
|
|
705
|
+
</div>
|
|
706
|
+
</WindowFrame>
|
|
707
|
+
</div>
|
|
708
|
+
<BlockLogos logos={logos} />
|
|
709
|
+
</BlockSection>
|
|
710
|
+
)
|
|
711
|
+
}
|