@leitware/composables 1.3.3 → 1.5.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 +54 -6
- package/dist/presets/brutalist.css +5 -1
- package/dist/presets/default.css +4 -0
- package/dist/presets/editorial-grid.css +329 -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/editorial-grid.css +329 -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/editorial-grid.ts +281 -0
- package/src/styles/presets-data/index.ts +9 -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,247 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Code2Icon,
|
|
3
|
+
LayoutDashboardIcon,
|
|
4
|
+
Layers3Icon,
|
|
5
|
+
PaletteIcon,
|
|
6
|
+
SparklesIcon,
|
|
7
|
+
UsersIcon,
|
|
8
|
+
ZapIcon,
|
|
9
|
+
type LucideIcon,
|
|
10
|
+
} from 'lucide-react'
|
|
11
|
+
import { Card } from '../card'
|
|
12
|
+
import { cn } from '../../lib/utils'
|
|
13
|
+
import {
|
|
14
|
+
BlockAction,
|
|
15
|
+
BlockDashboard,
|
|
16
|
+
BlockHeading,
|
|
17
|
+
BlockImage,
|
|
18
|
+
BlockSection,
|
|
19
|
+
type BlockBaseProps,
|
|
20
|
+
type BlockCTA,
|
|
21
|
+
type BlockMedia,
|
|
22
|
+
} from './shared'
|
|
23
|
+
|
|
24
|
+
type IconName = 'Palette' | 'Layers' | 'Code' | 'Users' | 'Zap' | 'LayoutDashboard' | 'Sparkles'
|
|
25
|
+
const icons: Record<IconName, LucideIcon> = {
|
|
26
|
+
Palette: PaletteIcon,
|
|
27
|
+
Layers: Layers3Icon,
|
|
28
|
+
Code: Code2Icon,
|
|
29
|
+
Users: UsersIcon,
|
|
30
|
+
Zap: ZapIcon,
|
|
31
|
+
LayoutDashboard: LayoutDashboardIcon,
|
|
32
|
+
Sparkles: SparklesIcon,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function ItemIcon({ name }: { name?: IconName }) {
|
|
36
|
+
const Icon = name ? icons[name] : SparklesIcon
|
|
37
|
+
return <Icon aria-hidden="true" className="size-5 text-icon-brand" />
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
type ContentHead = BlockBaseProps & { title: string; description: string }
|
|
41
|
+
type ContentItem = { title: string; description: string; media: BlockMedia; icon?: IconName }
|
|
42
|
+
|
|
43
|
+
export interface Content02Props extends ContentHead {
|
|
44
|
+
items: ContentItem[]
|
|
45
|
+
}
|
|
46
|
+
export function Content02({
|
|
47
|
+
title,
|
|
48
|
+
description,
|
|
49
|
+
items,
|
|
50
|
+
variant,
|
|
51
|
+
animation,
|
|
52
|
+
className,
|
|
53
|
+
}: Content02Props) {
|
|
54
|
+
return (
|
|
55
|
+
<BlockSection variant={variant} animation={animation} className={className}>
|
|
56
|
+
<BlockHeading title={title} description={description} />
|
|
57
|
+
<div className="mt-12 grid gap-8 md:grid-cols-3">
|
|
58
|
+
{items.map((item) => (
|
|
59
|
+
<article key={item.title}>
|
|
60
|
+
<div className="aspect-[4/3] overflow-hidden rounded-xl bg-surface-accent">
|
|
61
|
+
<BlockImage media={item.media} />
|
|
62
|
+
</div>
|
|
63
|
+
<div className="mt-5 flex items-start gap-3">
|
|
64
|
+
<span className="rounded-lg bg-surface-brand p-2">
|
|
65
|
+
<ItemIcon name={item.icon} />
|
|
66
|
+
</span>
|
|
67
|
+
<div>
|
|
68
|
+
<h3 className="text-lg font-semibold">{item.title}</h3>
|
|
69
|
+
<p className="mt-2 text-sm leading-relaxed text-[var(--text-secondary)]">
|
|
70
|
+
{item.description}
|
|
71
|
+
</p>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</article>
|
|
75
|
+
))}
|
|
76
|
+
</div>
|
|
77
|
+
</BlockSection>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface Content04Props extends ContentHead {
|
|
82
|
+
items: ContentItem[]
|
|
83
|
+
}
|
|
84
|
+
export function Content04({
|
|
85
|
+
title,
|
|
86
|
+
description,
|
|
87
|
+
items,
|
|
88
|
+
variant,
|
|
89
|
+
animation,
|
|
90
|
+
className,
|
|
91
|
+
}: Content04Props) {
|
|
92
|
+
return (
|
|
93
|
+
<BlockSection variant={variant} animation={animation} className={className}>
|
|
94
|
+
<BlockHeading title={title} description={description} />
|
|
95
|
+
<div className="mt-12 grid gap-8 md:grid-cols-2">
|
|
96
|
+
{items.map((item) => (
|
|
97
|
+
<article key={item.title} className="border-t border-stroke-default pt-5">
|
|
98
|
+
<h3 className="text-xl font-semibold">{item.title}</h3>
|
|
99
|
+
<p className="mt-3 max-w-lg text-sm leading-relaxed text-[var(--text-secondary)]">
|
|
100
|
+
{item.description}
|
|
101
|
+
</p>
|
|
102
|
+
<div className="mt-7 aspect-[4/3] overflow-hidden rounded-xl bg-surface-accent">
|
|
103
|
+
<BlockImage media={item.media} />
|
|
104
|
+
</div>
|
|
105
|
+
</article>
|
|
106
|
+
))}
|
|
107
|
+
</div>
|
|
108
|
+
</BlockSection>
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface Content06Props extends ContentHead {
|
|
113
|
+
media: BlockMedia
|
|
114
|
+
cta?: BlockCTA
|
|
115
|
+
}
|
|
116
|
+
export function Content06({
|
|
117
|
+
title,
|
|
118
|
+
description,
|
|
119
|
+
media,
|
|
120
|
+
cta,
|
|
121
|
+
variant,
|
|
122
|
+
animation,
|
|
123
|
+
className,
|
|
124
|
+
}: Content06Props) {
|
|
125
|
+
return (
|
|
126
|
+
<BlockSection variant={variant} animation={animation} className={className}>
|
|
127
|
+
<div className="grid items-center gap-10 md:grid-cols-2">
|
|
128
|
+
<div>
|
|
129
|
+
<BlockHeading title={title} description={description} />
|
|
130
|
+
<BlockAction action={cta} className="mt-8" />
|
|
131
|
+
</div>
|
|
132
|
+
<div className="aspect-[4/3] overflow-hidden rounded-xl bg-surface-accent">
|
|
133
|
+
<BlockImage media={media} />
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</BlockSection>
|
|
137
|
+
)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface Content07Props extends ContentHead {
|
|
141
|
+
items: { title: string; content: string; media: BlockMedia; cta?: BlockCTA }[]
|
|
142
|
+
}
|
|
143
|
+
export function Content07({
|
|
144
|
+
title,
|
|
145
|
+
description,
|
|
146
|
+
items,
|
|
147
|
+
variant,
|
|
148
|
+
animation,
|
|
149
|
+
className,
|
|
150
|
+
}: Content07Props) {
|
|
151
|
+
return (
|
|
152
|
+
<BlockSection variant={variant} animation={animation} className={className}>
|
|
153
|
+
<BlockHeading title={title} description={description} />
|
|
154
|
+
<div className="mt-12 grid gap-10 md:grid-cols-2">
|
|
155
|
+
{items.map((item) => (
|
|
156
|
+
<article key={item.title}>
|
|
157
|
+
<div className="aspect-[4/3] overflow-hidden rounded-xl bg-surface-accent">
|
|
158
|
+
<BlockImage media={item.media} />
|
|
159
|
+
</div>
|
|
160
|
+
<h3 className="mt-6 text-xl font-semibold">{item.title}</h3>
|
|
161
|
+
<p className="mt-3 max-w-lg text-sm leading-relaxed text-[var(--text-secondary)]">
|
|
162
|
+
{item.content}
|
|
163
|
+
</p>
|
|
164
|
+
<BlockAction action={item.cta} className="mt-6" arrow />
|
|
165
|
+
</article>
|
|
166
|
+
))}
|
|
167
|
+
</div>
|
|
168
|
+
</BlockSection>
|
|
169
|
+
)
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export interface Content09Props extends ContentHead {
|
|
173
|
+
items: { title: string; description: string; icon?: IconName }[]
|
|
174
|
+
}
|
|
175
|
+
export function Content09({
|
|
176
|
+
title,
|
|
177
|
+
description,
|
|
178
|
+
items,
|
|
179
|
+
variant,
|
|
180
|
+
animation,
|
|
181
|
+
className,
|
|
182
|
+
}: Content09Props) {
|
|
183
|
+
return (
|
|
184
|
+
<BlockSection variant={variant} animation={animation} className={className}>
|
|
185
|
+
<BlockHeading title={title} description={description} />
|
|
186
|
+
<div className="mt-12 grid gap-4 md:grid-cols-2">
|
|
187
|
+
{items.map((item) => (
|
|
188
|
+
<Card key={item.title} className="min-h-48 border-stroke-default bg-surface-default">
|
|
189
|
+
<div className="flex items-start gap-4">
|
|
190
|
+
<span className="rounded-lg bg-surface-brand p-3">
|
|
191
|
+
<ItemIcon name={item.icon} />
|
|
192
|
+
</span>
|
|
193
|
+
<div>
|
|
194
|
+
<h3 className="text-lg font-semibold">{item.title}</h3>
|
|
195
|
+
<p className="mt-3 text-sm leading-relaxed text-[var(--text-secondary)]">
|
|
196
|
+
{item.description}
|
|
197
|
+
</p>
|
|
198
|
+
</div>
|
|
199
|
+
</div>
|
|
200
|
+
</Card>
|
|
201
|
+
))}
|
|
202
|
+
</div>
|
|
203
|
+
</BlockSection>
|
|
204
|
+
)
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface Content11Props extends ContentHead {
|
|
208
|
+
feature1: { icon?: IconName; title: string; description: string }
|
|
209
|
+
feature2: { icon?: IconName; title: string; description: string }
|
|
210
|
+
}
|
|
211
|
+
export function Content11({
|
|
212
|
+
title,
|
|
213
|
+
description,
|
|
214
|
+
feature1,
|
|
215
|
+
feature2,
|
|
216
|
+
variant,
|
|
217
|
+
animation,
|
|
218
|
+
className,
|
|
219
|
+
}: Content11Props) {
|
|
220
|
+
return (
|
|
221
|
+
<BlockSection variant={variant} animation={animation} className={className}>
|
|
222
|
+
<div className="grid items-center gap-12 lg:grid-cols-2">
|
|
223
|
+
<div>
|
|
224
|
+
<BlockHeading title={title} description={description} />
|
|
225
|
+
<div className="mt-10 space-y-8">
|
|
226
|
+
{[feature1, feature2].map((feature) => (
|
|
227
|
+
<div key={feature.title} className="flex gap-4 border-t border-stroke-default pt-5">
|
|
228
|
+
<span className="rounded-lg bg-surface-brand p-3">
|
|
229
|
+
<ItemIcon name={feature.icon} />
|
|
230
|
+
</span>
|
|
231
|
+
<div>
|
|
232
|
+
<h3 className="font-semibold">{feature.title}</h3>
|
|
233
|
+
<p className="mt-2 text-sm leading-relaxed text-[var(--text-secondary)]">
|
|
234
|
+
{feature.description}
|
|
235
|
+
</p>
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
238
|
+
))}
|
|
239
|
+
</div>
|
|
240
|
+
</div>
|
|
241
|
+
<div className={cn('rounded-2xl bg-surface-accent p-5 md:p-8')}>
|
|
242
|
+
<BlockDashboard />
|
|
243
|
+
</div>
|
|
244
|
+
</div>
|
|
245
|
+
</BlockSection>
|
|
246
|
+
)
|
|
247
|
+
}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { useState } from 'react'
|
|
2
|
+
import { ArrowRightIcon } from 'lucide-react'
|
|
3
|
+
import { Avatar } from '../avatar'
|
|
4
|
+
import { BentoCell, BentoGrid } from '../layout-bento'
|
|
5
|
+
import { cn } from '../../lib/utils'
|
|
6
|
+
import {
|
|
7
|
+
BlockAction,
|
|
8
|
+
BlockHeading,
|
|
9
|
+
BlockImage,
|
|
10
|
+
BlockSection,
|
|
11
|
+
type BlockBaseProps,
|
|
12
|
+
type BlockCTA,
|
|
13
|
+
type BlockMedia,
|
|
14
|
+
} from './shared'
|
|
15
|
+
|
|
16
|
+
type FeatureItem = { id: string; title: string; description: string; media: BlockMedia }
|
|
17
|
+
|
|
18
|
+
export interface Feature01Props extends BlockBaseProps {
|
|
19
|
+
items: FeatureItem[]
|
|
20
|
+
}
|
|
21
|
+
export function Feature01({ items, variant, animation, className }: Feature01Props) {
|
|
22
|
+
const [active, setActive] = useState(0)
|
|
23
|
+
const current = items[active]
|
|
24
|
+
return (
|
|
25
|
+
<BlockSection variant={variant} animation={animation} className={className}>
|
|
26
|
+
<div className="grid gap-10 md:grid-cols-2">
|
|
27
|
+
<div className="divide-y divide-[var(--border-default)] border-y border-stroke-default">
|
|
28
|
+
{items.map((item, index) => (
|
|
29
|
+
<button
|
|
30
|
+
key={item.id}
|
|
31
|
+
type="button"
|
|
32
|
+
onClick={() => setActive(index)}
|
|
33
|
+
aria-pressed={active === index}
|
|
34
|
+
className={cn(
|
|
35
|
+
'group flex w-full items-start gap-5 py-6 text-left transition-colors',
|
|
36
|
+
active === index ? 'text-default' : 'text-[var(--text-muted)] hover:text-default',
|
|
37
|
+
)}
|
|
38
|
+
>
|
|
39
|
+
<span className="pt-1 text-xs tabular-nums">{item.id}</span>
|
|
40
|
+
<span className="flex-1">
|
|
41
|
+
<span className="block font-heading text-2xl">{item.title}</span>
|
|
42
|
+
{active === index && (
|
|
43
|
+
<span className="mt-3 block max-w-md text-sm leading-relaxed text-[var(--text-secondary)]">
|
|
44
|
+
{item.description}
|
|
45
|
+
</span>
|
|
46
|
+
)}
|
|
47
|
+
</span>
|
|
48
|
+
<ArrowRightIcon className="mt-1 size-4" />
|
|
49
|
+
</button>
|
|
50
|
+
))}
|
|
51
|
+
</div>
|
|
52
|
+
<div className="aspect-[4/3] overflow-hidden rounded-xl bg-surface-accent">
|
|
53
|
+
{current && <BlockImage media={current.media} />}
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</BlockSection>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface Feature02Props extends BlockBaseProps {
|
|
61
|
+
title: string
|
|
62
|
+
description: string
|
|
63
|
+
image: string
|
|
64
|
+
imageAlt: string
|
|
65
|
+
steps: { number: string; title: string; description: string }[]
|
|
66
|
+
}
|
|
67
|
+
export function Feature02({
|
|
68
|
+
title,
|
|
69
|
+
description,
|
|
70
|
+
image,
|
|
71
|
+
imageAlt,
|
|
72
|
+
steps,
|
|
73
|
+
animation,
|
|
74
|
+
className,
|
|
75
|
+
}: Feature02Props) {
|
|
76
|
+
const midpoint = Math.ceil(steps.length / 2)
|
|
77
|
+
const Step = ({
|
|
78
|
+
number,
|
|
79
|
+
title: stepTitle,
|
|
80
|
+
description: stepDescription,
|
|
81
|
+
}: (typeof steps)[number]) => (
|
|
82
|
+
<div className="border-t border-stroke-default pt-5">
|
|
83
|
+
<span className="text-xs text-brand">{number}</span>
|
|
84
|
+
<h3 className="mt-4 text-xl font-semibold">{stepTitle}</h3>
|
|
85
|
+
<p className="mt-3 text-sm leading-relaxed text-[var(--text-secondary)]">{stepDescription}</p>
|
|
86
|
+
</div>
|
|
87
|
+
)
|
|
88
|
+
return (
|
|
89
|
+
<BlockSection animation={animation} className={className}>
|
|
90
|
+
<div className="grid gap-8 md:grid-cols-2">
|
|
91
|
+
<BlockHeading title={title} />
|
|
92
|
+
<p className="self-end text-[var(--text-secondary)]">{description}</p>
|
|
93
|
+
</div>
|
|
94
|
+
<div className="mt-14 grid gap-8 lg:grid-cols-[1fr_1.2fr_1fr]">
|
|
95
|
+
<div className="flex flex-col justify-around gap-8">
|
|
96
|
+
{steps.slice(0, midpoint).map((step) => (
|
|
97
|
+
<Step key={step.number} {...step} />
|
|
98
|
+
))}
|
|
99
|
+
</div>
|
|
100
|
+
<div className="min-h-[34rem] overflow-hidden rounded-xl bg-surface-accent">
|
|
101
|
+
<BlockImage media={{ src: image, alt: imageAlt }} />
|
|
102
|
+
</div>
|
|
103
|
+
<div className="flex flex-col justify-around gap-8">
|
|
104
|
+
{steps.slice(midpoint).map((step) => (
|
|
105
|
+
<Step key={step.number} {...step} />
|
|
106
|
+
))}
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</BlockSection>
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface Feature03Props extends BlockBaseProps {
|
|
114
|
+
title: string
|
|
115
|
+
description: string
|
|
116
|
+
items: FeatureItem[]
|
|
117
|
+
}
|
|
118
|
+
export function Feature03({
|
|
119
|
+
title,
|
|
120
|
+
description,
|
|
121
|
+
items,
|
|
122
|
+
variant,
|
|
123
|
+
animation,
|
|
124
|
+
className,
|
|
125
|
+
}: Feature03Props) {
|
|
126
|
+
return (
|
|
127
|
+
<BlockSection variant={variant} animation={animation} className={className}>
|
|
128
|
+
<div className="grid gap-12 lg:grid-cols-2">
|
|
129
|
+
<div className="self-start lg:sticky lg:top-12">
|
|
130
|
+
<BlockHeading title={title} description={description} />
|
|
131
|
+
</div>
|
|
132
|
+
<div className="space-y-14">
|
|
133
|
+
{items.map((item) => (
|
|
134
|
+
<article key={item.id}>
|
|
135
|
+
<div className="aspect-[4/3] overflow-hidden rounded-xl bg-surface-accent">
|
|
136
|
+
<BlockImage media={item.media} />
|
|
137
|
+
</div>
|
|
138
|
+
<div className="mt-5 flex gap-5 border-t border-stroke-default pt-5">
|
|
139
|
+
<span className="text-xs text-[var(--text-muted)]">{item.id}</span>
|
|
140
|
+
<div>
|
|
141
|
+
<h3 className="text-xl font-semibold">{item.title}</h3>
|
|
142
|
+
<p className="mt-3 text-sm leading-relaxed text-[var(--text-secondary)]">
|
|
143
|
+
{item.description}
|
|
144
|
+
</p>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
</article>
|
|
148
|
+
))}
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
</BlockSection>
|
|
152
|
+
)
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export interface Cta01Props extends BlockBaseProps {
|
|
156
|
+
title: string
|
|
157
|
+
description: string
|
|
158
|
+
cta?: BlockCTA
|
|
159
|
+
}
|
|
160
|
+
export function Cta01({ title, description, cta, className }: Cta01Props) {
|
|
161
|
+
return (
|
|
162
|
+
<BlockSection className={cn('text-center', className)}>
|
|
163
|
+
<BlockHeading title={title} description={description} centered className="[&_p]:mx-auto" />
|
|
164
|
+
<BlockAction action={cta} className="mt-8" />
|
|
165
|
+
</BlockSection>
|
|
166
|
+
)
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
type BentoMedia = { src: string; title: string }
|
|
170
|
+
type BentoItem = { title: string; description: string; media: BentoMedia }
|
|
171
|
+
export interface BentoGrids01Props extends BlockBaseProps {
|
|
172
|
+
primary: BentoItem & { cta?: BlockCTA }
|
|
173
|
+
items: BentoItem[]
|
|
174
|
+
}
|
|
175
|
+
export function BentoGrids01({ primary, items, className }: BentoGrids01Props) {
|
|
176
|
+
return (
|
|
177
|
+
<BlockSection className={className}>
|
|
178
|
+
<BentoGrid cols={3} className="gap-3 bg-transparent p-0">
|
|
179
|
+
<BentoCell
|
|
180
|
+
colSpan={2}
|
|
181
|
+
rowSpan={2}
|
|
182
|
+
className="relative flex min-h-[32rem] flex-col justify-end overflow-hidden p-0"
|
|
183
|
+
>
|
|
184
|
+
<BlockImage
|
|
185
|
+
media={{ src: primary.media.src, alt: primary.media.title }}
|
|
186
|
+
className="absolute inset-0"
|
|
187
|
+
/>
|
|
188
|
+
<div className="absolute inset-0 bg-gradient-to-t from-black/85 via-black/20 to-transparent" />
|
|
189
|
+
<div className="relative p-8 text-white">
|
|
190
|
+
<h2 className="font-heading text-3xl">{primary.title}</h2>
|
|
191
|
+
<p className="mt-3 max-w-md text-sm">{primary.description}</p>
|
|
192
|
+
<BlockAction action={primary.cta} className="mt-6" />
|
|
193
|
+
</div>
|
|
194
|
+
</BentoCell>
|
|
195
|
+
{items.map((item) => (
|
|
196
|
+
<BentoCell
|
|
197
|
+
key={item.title}
|
|
198
|
+
className="relative flex min-h-56 flex-col justify-end overflow-hidden p-0"
|
|
199
|
+
>
|
|
200
|
+
<BlockImage
|
|
201
|
+
media={{ src: item.media.src, alt: item.media.title }}
|
|
202
|
+
className="absolute inset-0"
|
|
203
|
+
/>
|
|
204
|
+
<div className="absolute inset-0 bg-gradient-to-t from-black/80 to-transparent" />
|
|
205
|
+
<div className="relative p-5 text-white">
|
|
206
|
+
<h3 className="text-lg font-semibold">{item.title}</h3>
|
|
207
|
+
<p className="mt-2 text-xs">{item.description}</p>
|
|
208
|
+
</div>
|
|
209
|
+
</BentoCell>
|
|
210
|
+
))}
|
|
211
|
+
</BentoGrid>
|
|
212
|
+
</BlockSection>
|
|
213
|
+
)
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export interface Testimonials01Props extends BlockBaseProps {
|
|
217
|
+
quote: string
|
|
218
|
+
author: { name: string; role: string; avatar: { src?: string; alt?: string; fallback: string } }
|
|
219
|
+
}
|
|
220
|
+
export function Testimonials01({ quote, author, className }: Testimonials01Props) {
|
|
221
|
+
return (
|
|
222
|
+
<BlockSection className={cn('text-center', className)}>
|
|
223
|
+
<figure className="mx-auto max-w-3xl py-12">
|
|
224
|
+
<blockquote className="font-heading text-2xl leading-snug tracking-tight md:text-4xl">
|
|
225
|
+
“{quote}”
|
|
226
|
+
</blockquote>
|
|
227
|
+
<figcaption className="mt-9 flex items-center justify-center gap-4 text-left">
|
|
228
|
+
<Avatar
|
|
229
|
+
src={author.avatar.src}
|
|
230
|
+
alt={author.avatar.alt ?? author.name}
|
|
231
|
+
fallback={author.avatar.fallback}
|
|
232
|
+
size="lg"
|
|
233
|
+
/>
|
|
234
|
+
<span>
|
|
235
|
+
<span className="block text-sm font-semibold">{author.name}</span>
|
|
236
|
+
<span className="mt-1 block text-xs text-[var(--text-muted)]">{author.role}</span>
|
|
237
|
+
</span>
|
|
238
|
+
</figcaption>
|
|
239
|
+
</figure>
|
|
240
|
+
</BlockSection>
|
|
241
|
+
)
|
|
242
|
+
}
|