@vvedantb/ui 0.8.0 → 0.9.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 +89 -1
- package/app/README.md +193 -0
- package/package.json +14 -11
- package/shell/src/SidebarAccountMenu.tsx +78 -2
- package/shell/src/SidebarRail.tsx +20 -0
- package/shell/src/index.ts +2 -2
- package/src/index.ts +52 -2
- package/src/marketing/PricingModal.tsx +126 -0
- package/src/marketing/SiteFooter.tsx +135 -0
- package/src/marketing/createLandingKit.tsx +214 -0
- package/src/marketing/landing.css +271 -0
- package/src/marketing/landing.tsx +217 -0
- package/src/marketing/marketing-classes.ts +115 -0
- package/tokens/README.md +98 -0
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
/* Instrument Serif ships only regular (+ italic). Disable faux-bold. */
|
|
2
|
+
.landing-wordmark-text {
|
|
3
|
+
font-family: var(--font-instrumentSerif);
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
font-synthesis: none;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@keyframes landing-graph-dash {
|
|
9
|
+
to {
|
|
10
|
+
stroke-dashoffset: -20;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.landing-graph-dash {
|
|
15
|
+
animation: landing-graph-dash 12s linear infinite;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@keyframes landing-preview-pulse {
|
|
19
|
+
0%,
|
|
20
|
+
100% {
|
|
21
|
+
opacity: 0.35;
|
|
22
|
+
}
|
|
23
|
+
50% {
|
|
24
|
+
opacity: 1;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.landing-preview-pulse {
|
|
29
|
+
animation: landing-preview-pulse 2.8s ease-in-out infinite;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@keyframes landing-pulse-dot {
|
|
33
|
+
0%,
|
|
34
|
+
100% {
|
|
35
|
+
opacity: 0.45;
|
|
36
|
+
box-shadow: 0 0 0 0 color-mix(in oklch, var(--foreground) 35%, transparent);
|
|
37
|
+
}
|
|
38
|
+
50% {
|
|
39
|
+
opacity: 1;
|
|
40
|
+
box-shadow: 0 0 0 6px color-mix(in oklch, var(--foreground) 0%, transparent);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.landing-pulse-dot {
|
|
45
|
+
animation: landing-pulse-dot 2.4s ease-in-out infinite;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.landing-grain::after {
|
|
49
|
+
content: "";
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
position: absolute;
|
|
52
|
+
inset: 0;
|
|
53
|
+
opacity: 0.22;
|
|
54
|
+
mix-blend-mode: overlay;
|
|
55
|
+
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
|
|
56
|
+
background-size: 128px 128px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.landing-atmosphere {
|
|
60
|
+
background-color: var(--background);
|
|
61
|
+
background-image:
|
|
62
|
+
radial-gradient(
|
|
63
|
+
ellipse 90% 55% at 50% -12%,
|
|
64
|
+
color-mix(in oklch, var(--foreground) 8%, transparent),
|
|
65
|
+
transparent 58%
|
|
66
|
+
),
|
|
67
|
+
radial-gradient(
|
|
68
|
+
ellipse 45% 35% at 100% 100%,
|
|
69
|
+
color-mix(in oklch, var(--foreground) 4%, transparent),
|
|
70
|
+
transparent 55%
|
|
71
|
+
),
|
|
72
|
+
linear-gradient(
|
|
73
|
+
color-mix(in oklch, var(--foreground) 5.5%, transparent) 1px,
|
|
74
|
+
transparent 1px
|
|
75
|
+
),
|
|
76
|
+
linear-gradient(
|
|
77
|
+
90deg,
|
|
78
|
+
color-mix(in oklch, var(--foreground) 5.5%, transparent) 1px,
|
|
79
|
+
transparent 1px
|
|
80
|
+
);
|
|
81
|
+
background-size:
|
|
82
|
+
100% 100%,
|
|
83
|
+
100% 100%,
|
|
84
|
+
56px 56px,
|
|
85
|
+
56px 56px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Centered hero: keep a readable well, graph atmosphere around the edges */
|
|
89
|
+
.landing-hero-read-scrim {
|
|
90
|
+
background: radial-gradient(
|
|
91
|
+
ellipse 72% 58% at 50% 42%,
|
|
92
|
+
var(--background) 0%,
|
|
93
|
+
color-mix(in oklch, var(--background) 82%, transparent) 46%,
|
|
94
|
+
transparent 74%
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.landing-ambient-graph-mask {
|
|
99
|
+
mask-image: radial-gradient(
|
|
100
|
+
ellipse 88% 78% at 50% 48%,
|
|
101
|
+
transparent 8%,
|
|
102
|
+
black 62%
|
|
103
|
+
);
|
|
104
|
+
-webkit-mask-image: radial-gradient(
|
|
105
|
+
ellipse 88% 78% at 50% 48%,
|
|
106
|
+
transparent 8%,
|
|
107
|
+
black 62%
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@keyframes landing-ambient-drift {
|
|
112
|
+
0%,
|
|
113
|
+
100% {
|
|
114
|
+
transform: translate3d(0, 0, 0);
|
|
115
|
+
}
|
|
116
|
+
50% {
|
|
117
|
+
transform: translate3d(0, -10px, 0);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.landing-ambient-drift {
|
|
122
|
+
animation: landing-ambient-drift 14s ease-in-out infinite;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@keyframes landing-ambient-node-a {
|
|
126
|
+
0%,
|
|
127
|
+
100% {
|
|
128
|
+
opacity: 0.35;
|
|
129
|
+
}
|
|
130
|
+
50% {
|
|
131
|
+
opacity: 1;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@keyframes landing-ambient-node-b {
|
|
136
|
+
0%,
|
|
137
|
+
100% {
|
|
138
|
+
opacity: 0.5;
|
|
139
|
+
}
|
|
140
|
+
50% {
|
|
141
|
+
opacity: 1;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@keyframes landing-ambient-node-c {
|
|
146
|
+
0%,
|
|
147
|
+
100% {
|
|
148
|
+
opacity: 0.4;
|
|
149
|
+
}
|
|
150
|
+
50% {
|
|
151
|
+
opacity: 0.95;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@keyframes landing-ambient-node-d {
|
|
156
|
+
0%,
|
|
157
|
+
100% {
|
|
158
|
+
opacity: 0.3;
|
|
159
|
+
}
|
|
160
|
+
50% {
|
|
161
|
+
opacity: 0.9;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@keyframes landing-ambient-node-e {
|
|
166
|
+
0%,
|
|
167
|
+
100% {
|
|
168
|
+
opacity: 0.45;
|
|
169
|
+
}
|
|
170
|
+
50% {
|
|
171
|
+
opacity: 1;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@keyframes landing-ambient-node-f {
|
|
176
|
+
0%,
|
|
177
|
+
100% {
|
|
178
|
+
opacity: 0.35;
|
|
179
|
+
}
|
|
180
|
+
50% {
|
|
181
|
+
opacity: 0.85;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@keyframes landing-ambient-node-g {
|
|
186
|
+
0%,
|
|
187
|
+
100% {
|
|
188
|
+
opacity: 0.4;
|
|
189
|
+
}
|
|
190
|
+
50% {
|
|
191
|
+
opacity: 1;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@keyframes landing-ambient-node-h {
|
|
196
|
+
0%,
|
|
197
|
+
100% {
|
|
198
|
+
opacity: 0.25;
|
|
199
|
+
}
|
|
200
|
+
50% {
|
|
201
|
+
opacity: 0.75;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.landing-ambient-node-a {
|
|
206
|
+
animation: landing-ambient-node-a 5s ease-in-out infinite;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.landing-ambient-node-b {
|
|
210
|
+
animation: landing-ambient-node-b 4s ease-in-out infinite;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.landing-ambient-node-c {
|
|
214
|
+
animation: landing-ambient-node-c 6s ease-in-out infinite;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.landing-ambient-node-d {
|
|
218
|
+
animation: landing-ambient-node-d 5.5s ease-in-out infinite;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.landing-ambient-node-e {
|
|
222
|
+
animation: landing-ambient-node-e 4.5s ease-in-out infinite;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.landing-ambient-node-f {
|
|
226
|
+
animation: landing-ambient-node-f 5.2s ease-in-out infinite;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.landing-ambient-node-g {
|
|
230
|
+
animation: landing-ambient-node-g 4.8s ease-in-out infinite;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.landing-ambient-node-h {
|
|
234
|
+
animation: landing-ambient-node-h 5.8s ease-in-out infinite;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
html:has(#top) {
|
|
238
|
+
scroll-behavior: smooth;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
@media (max-width: 1023px) {
|
|
242
|
+
.landing-hero-read-scrim {
|
|
243
|
+
background: radial-gradient(
|
|
244
|
+
ellipse 90% 70% at 50% 28%,
|
|
245
|
+
var(--background) 0%,
|
|
246
|
+
color-mix(in oklch, var(--background) 88%, transparent) 52%,
|
|
247
|
+
transparent 78%
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
@media (prefers-reduced-motion: reduce) {
|
|
253
|
+
html:has(#top) {
|
|
254
|
+
scroll-behavior: auto;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.landing-graph-dash,
|
|
258
|
+
.landing-preview-pulse,
|
|
259
|
+
.landing-pulse-dot,
|
|
260
|
+
.landing-ambient-drift,
|
|
261
|
+
.landing-ambient-node-a,
|
|
262
|
+
.landing-ambient-node-b,
|
|
263
|
+
.landing-ambient-node-c,
|
|
264
|
+
.landing-ambient-node-d,
|
|
265
|
+
.landing-ambient-node-e,
|
|
266
|
+
.landing-ambient-node-f,
|
|
267
|
+
.landing-ambient-node-g,
|
|
268
|
+
.landing-ambient-node-h {
|
|
269
|
+
animation: none !important;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import type { ComponentType, ReactNode } from "react";
|
|
2
|
+
import { IconMenu2 } from "@tabler/icons-react";
|
|
3
|
+
import type { Variants } from "motion/react";
|
|
4
|
+
import { motionDuration, motionEase } from "../motion/presets";
|
|
5
|
+
import { Button } from "../ui/button";
|
|
6
|
+
import {
|
|
7
|
+
DropdownMenu,
|
|
8
|
+
DropdownMenuContent,
|
|
9
|
+
DropdownMenuItem,
|
|
10
|
+
DropdownMenuSeparator,
|
|
11
|
+
DropdownMenuTrigger,
|
|
12
|
+
} from "../ui/dropdown-menu";
|
|
13
|
+
import { cn } from "../utils/cn";
|
|
14
|
+
import { landingClasses, landingFooterLinkClass, landingShellClass } from "./marketing-classes";
|
|
15
|
+
|
|
16
|
+
export type LandingLink = { href: string; label: string };
|
|
17
|
+
|
|
18
|
+
/** Variants for one revealed child: fade, rise 14px and unblur. */
|
|
19
|
+
export const landingItemVariants: Variants = {
|
|
20
|
+
hidden: { opacity: 0, y: 14, filter: "blur(4px)" },
|
|
21
|
+
show: {
|
|
22
|
+
opacity: 1,
|
|
23
|
+
y: 0,
|
|
24
|
+
filter: "blur(0px)",
|
|
25
|
+
transition: { duration: motionDuration.slow, ease: motionEase },
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type LandingSectionProps = {
|
|
30
|
+
id?: string;
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
className?: string;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** Landing column with section spacing and a `scroll-mt-24` anchor offset. */
|
|
36
|
+
export function LandingSection({ id, children, className }: LandingSectionProps) {
|
|
37
|
+
return (
|
|
38
|
+
<section
|
|
39
|
+
id={id}
|
|
40
|
+
className={cn(landingShellClass, "scroll-mt-24 py-20 sm:py-28 lg:py-32", className)}
|
|
41
|
+
>
|
|
42
|
+
{children}
|
|
43
|
+
</section>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type LandingSectionHeadingProps = {
|
|
48
|
+
eyebrow: string;
|
|
49
|
+
heading: string;
|
|
50
|
+
intro?: string;
|
|
51
|
+
className?: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** Mono eyebrow, large heading and optional intro. */
|
|
55
|
+
export function LandingSectionHeading({ eyebrow, heading, intro, className }: LandingSectionHeadingProps) {
|
|
56
|
+
return (
|
|
57
|
+
<div className={cn("max-w-2xl", className)}>
|
|
58
|
+
<p className={landingClasses.eyebrow}>{eyebrow}</p>
|
|
59
|
+
<h2 className="text-balance font-semibold text-3xl leading-[1.08] tracking-[-0.03em] text-foreground sm:text-5xl">
|
|
60
|
+
{heading}
|
|
61
|
+
</h2>
|
|
62
|
+
{intro ? <p className={landingClasses.sectionIntro}>{intro}</p> : null}
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type LandingLatticeProps = { children: ReactNode; className?: string };
|
|
68
|
+
|
|
69
|
+
/** Shared border through 1px gaps so adjacent cells don't double a hairline. */
|
|
70
|
+
export function LandingLattice({ children, className }: LandingLatticeProps) {
|
|
71
|
+
return (
|
|
72
|
+
<div className="overflow-hidden rounded-2xl border border-separator">
|
|
73
|
+
<div className={cn("grid gap-px bg-separator", className)}>{children}</div>
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type LandingFeature = {
|
|
79
|
+
/** Rendered with `size={18} stroke={1.5}`, for example a Tabler icon. */
|
|
80
|
+
icon: ComponentType<{ size?: number; stroke?: number }>;
|
|
81
|
+
title: string;
|
|
82
|
+
description: string;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/** Feature tile: inverted icon square, title and description, with a hover lift and edge bar. */
|
|
86
|
+
export function LandingFeatureCard({ icon: Icon, title, description }: LandingFeature) {
|
|
87
|
+
return (
|
|
88
|
+
<div className="group relative flex gap-3 overflow-hidden rounded-2xl border border-separator bg-surface px-3.5 py-3.5 transition-[transform,background-color] duration-200 ease-out hover:-translate-y-0.5 hover:bg-surface-secondary sm:gap-4 sm:px-5 sm:py-4">
|
|
89
|
+
<div
|
|
90
|
+
className="absolute inset-y-3 left-0 w-1 rounded-full bg-foreground/0 transition-[background-color] duration-200 group-hover:bg-foreground/20"
|
|
91
|
+
aria-hidden
|
|
92
|
+
/>
|
|
93
|
+
<div className="flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-foreground text-background transition-transform duration-200 ease-out group-hover:scale-[1.04]">
|
|
94
|
+
<Icon size={18} stroke={1.5} />
|
|
95
|
+
</div>
|
|
96
|
+
<div className="min-w-0 pt-0.5">
|
|
97
|
+
<p className="text-sm font-medium text-foreground">{title}</p>
|
|
98
|
+
<p className={landingClasses.featureDescription}>{description}</p>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export type LandingNavMenuProps = {
|
|
105
|
+
links: readonly LandingLink[];
|
|
106
|
+
/** Last item, after a separator: opens in a new tab and reads "GitHub". */
|
|
107
|
+
github: { href: string; icon: ReactNode };
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Overflow menu below `md`. Section links do not fit a phone-width bar;
|
|
112
|
+
* the auth buttons stay in the bar itself.
|
|
113
|
+
*/
|
|
114
|
+
export function LandingNavMenu({ links, github }: LandingNavMenuProps) {
|
|
115
|
+
return (
|
|
116
|
+
<DropdownMenu>
|
|
117
|
+
<DropdownMenuTrigger asChild>
|
|
118
|
+
<Button variant="ghost" size="icon-sm" aria-label="Open menu" className="md:hidden">
|
|
119
|
+
<IconMenu2 size={18} />
|
|
120
|
+
</Button>
|
|
121
|
+
</DropdownMenuTrigger>
|
|
122
|
+
<DropdownMenuContent
|
|
123
|
+
align="end"
|
|
124
|
+
className="max-h-[70dvh] w-56 max-w-[calc(100vw-2rem)] overflow-y-auto"
|
|
125
|
+
>
|
|
126
|
+
{links.map((link) => (
|
|
127
|
+
<DropdownMenuItem key={link.href} asChild className="max-sm:py-2.5">
|
|
128
|
+
<a href={link.href}>{link.label}</a>
|
|
129
|
+
</DropdownMenuItem>
|
|
130
|
+
))}
|
|
131
|
+
<DropdownMenuSeparator />
|
|
132
|
+
<DropdownMenuItem asChild className="max-sm:py-2.5">
|
|
133
|
+
<a href={github.href} target="_blank" rel="noreferrer">
|
|
134
|
+
{github.icon}
|
|
135
|
+
GitHub
|
|
136
|
+
</a>
|
|
137
|
+
</DropdownMenuItem>
|
|
138
|
+
</DropdownMenuContent>
|
|
139
|
+
</DropdownMenu>
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export type LandingFooterProps = {
|
|
144
|
+
/** Wordmark above the tagline. */
|
|
145
|
+
brand: ReactNode;
|
|
146
|
+
tagline: ReactNode;
|
|
147
|
+
links: readonly LandingLink[];
|
|
148
|
+
/** After the links, before GitHub. Style with `landingFooterLinkClass` or `landingFooterButtonClass`. */
|
|
149
|
+
actions?: ReactNode;
|
|
150
|
+
/** `label` is the link's `aria-label`. */
|
|
151
|
+
github: { href: string; label: string; icon: ReactNode };
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
/** Footer row: brand and tagline, then section links, app actions and a GitHub icon link. */
|
|
155
|
+
export function LandingFooter({ brand, tagline, links, actions, github }: LandingFooterProps) {
|
|
156
|
+
return (
|
|
157
|
+
<footer className="border-t border-separator">
|
|
158
|
+
<div
|
|
159
|
+
className={`${landingShellClass} flex flex-col gap-6 pb-[max(2.5rem,env(safe-area-inset-bottom))] pt-10 sm:flex-row sm:items-center sm:justify-between`}
|
|
160
|
+
>
|
|
161
|
+
<div>
|
|
162
|
+
{brand}
|
|
163
|
+
<p className={landingClasses.footerTagline}>{tagline}</p>
|
|
164
|
+
</div>
|
|
165
|
+
<nav className="flex flex-wrap items-center gap-x-5 gap-y-2" aria-label="Footer">
|
|
166
|
+
{links.map((link) => (
|
|
167
|
+
<a key={link.href} href={link.href} className={landingFooterLinkClass}>
|
|
168
|
+
{link.label}
|
|
169
|
+
</a>
|
|
170
|
+
))}
|
|
171
|
+
{actions}
|
|
172
|
+
<a
|
|
173
|
+
href={github.href}
|
|
174
|
+
target="_blank"
|
|
175
|
+
rel="noreferrer"
|
|
176
|
+
aria-label={github.label}
|
|
177
|
+
className={landingClasses.footerGithub}
|
|
178
|
+
>
|
|
179
|
+
{github.icon}
|
|
180
|
+
</a>
|
|
181
|
+
</nav>
|
|
182
|
+
</div>
|
|
183
|
+
</footer>
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export type LandingPageLayoutProps = {
|
|
188
|
+
/** Sticky header, usually `LandingNav`. */
|
|
189
|
+
nav: ReactNode;
|
|
190
|
+
/** Inside the hero's atmosphere block, before `hero` (for example an ambient graphic). */
|
|
191
|
+
heroBackdrop?: ReactNode;
|
|
192
|
+
hero: ReactNode;
|
|
193
|
+
/** Sections after the hero, inside `<main>`. */
|
|
194
|
+
children?: ReactNode;
|
|
195
|
+
footer: ReactNode;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Page frame: `#top` root, nav, a `<main>` whose first block is the hero on the
|
|
200
|
+
* grid-and-grain atmosphere, then the sections and the footer. Import
|
|
201
|
+
* `@vvedantb/ui/landing.css` for the atmosphere, grain and pulse classes.
|
|
202
|
+
*/
|
|
203
|
+
export function LandingPageLayout({ nav, heroBackdrop, hero, children, footer }: LandingPageLayoutProps) {
|
|
204
|
+
return (
|
|
205
|
+
<div id="top" className="relative min-h-[100dvh] bg-background text-foreground">
|
|
206
|
+
{nav}
|
|
207
|
+
<main>
|
|
208
|
+
<div className="landing-atmosphere landing-grain relative overflow-hidden border-b border-separator">
|
|
209
|
+
{heroBackdrop}
|
|
210
|
+
{hero}
|
|
211
|
+
</div>
|
|
212
|
+
{children}
|
|
213
|
+
</main>
|
|
214
|
+
{footer}
|
|
215
|
+
</div>
|
|
216
|
+
);
|
|
217
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// Class strings for the landing kit, `SiteFooter` and `PricingModal`, copied
|
|
2
|
+
// from the apps' markup. Some read the bare muted text colour the apps already
|
|
3
|
+
// ship (apps map `--color-muted` to the secondary text colour), so each such
|
|
4
|
+
// line carries the token check's allow marker. Every string is a literal so
|
|
5
|
+
// Tailwind's source scan sees it.
|
|
6
|
+
|
|
7
|
+
/** Centred landing column: `max-w-6xl` with responsive side padding. */
|
|
8
|
+
export const landingShellClass = "relative mx-auto w-full max-w-6xl px-5 sm:px-8 lg:px-10";
|
|
9
|
+
|
|
10
|
+
/** Bordered surface card used by landing product mocks. */
|
|
11
|
+
export const landingPanelClass = "overflow-hidden rounded-2xl border border-separator bg-surface";
|
|
12
|
+
|
|
13
|
+
/** Text link in `LandingFooter`, also for app links placed in its `actions` slot. */
|
|
14
|
+
export const landingFooterLinkClass = "max-sm:py-1 text-sm text-muted hover:text-foreground"; // check-tokens-allow: text-muted
|
|
15
|
+
|
|
16
|
+
/** `Button variant="link"` in `LandingFooter`'s `actions` slot (for example Sign in). */
|
|
17
|
+
export const landingFooterButtonClass = "h-auto p-0 text-sm text-muted hover:text-foreground"; // check-tokens-allow: text-muted
|
|
18
|
+
|
|
19
|
+
export const landingClasses = {
|
|
20
|
+
eyebrow:
|
|
21
|
+
"mb-3 font-mono text-[11px] font-medium uppercase tracking-[0.22em] text-muted sm:text-xs sm:tracking-[0.28em]", // check-tokens-allow: text-muted
|
|
22
|
+
sectionIntro:
|
|
23
|
+
"mt-4 max-w-xl text-pretty text-sm leading-relaxed text-muted sm:mt-5 sm:text-base", // check-tokens-allow: text-muted
|
|
24
|
+
featureDescription:
|
|
25
|
+
"mt-1 text-pretty text-xs leading-relaxed text-muted sm:text-[0.8125rem]", // check-tokens-allow: text-muted
|
|
26
|
+
navLink:
|
|
27
|
+
"inline-flex h-10 items-center rounded-lg px-3 text-sm text-muted transition-[color,background-color] duration-150 hover:bg-surface-tertiary hover:text-foreground", // check-tokens-allow: text-muted
|
|
28
|
+
heroEyebrow:
|
|
29
|
+
"mb-6 inline-flex items-center gap-2 rounded-full border border-separator bg-surface/70 px-3 py-1 text-xs text-muted", // check-tokens-allow: text-muted
|
|
30
|
+
heroDescription:
|
|
31
|
+
"mx-auto mt-5 max-w-xl text-pretty text-[0.9375rem] leading-relaxed text-muted sm:mt-6 sm:text-lg", // check-tokens-allow: text-muted
|
|
32
|
+
heroCapability:
|
|
33
|
+
"rounded-full border border-separator bg-surface/60 px-3 py-1 font-mono text-[11px] text-muted", // check-tokens-allow: text-muted
|
|
34
|
+
ctaDescription:
|
|
35
|
+
"mt-4 max-w-xl text-pretty text-sm leading-relaxed text-muted sm:text-base", // check-tokens-allow: text-muted
|
|
36
|
+
footerTagline:
|
|
37
|
+
"mt-3 max-w-sm text-pretty text-xs leading-relaxed text-muted", // check-tokens-allow: text-muted
|
|
38
|
+
footerGithub: "max-sm:py-1 text-muted hover:text-foreground", // check-tokens-allow: text-muted
|
|
39
|
+
} as const;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* `SiteFooter` class sets. `muted` and `muted-foreground` differ only in the
|
|
43
|
+
* secondary text colour; `touch` adds `max-sm:hit-target` targets and a
|
|
44
|
+
* safe-area bottom padding.
|
|
45
|
+
*/
|
|
46
|
+
export const siteFooterClasses = {
|
|
47
|
+
muted: {
|
|
48
|
+
footer: "bg-background text-foreground py-8 md:py-16 max-w-5xl mx-auto",
|
|
49
|
+
tagline: "text-sm text-muted mb-4 md:mb-6 max-w-sm", // check-tokens-allow: text-muted
|
|
50
|
+
socialButton:
|
|
51
|
+
"w-9 h-9 md:w-8 md:h-8 bg-default rounded-lg flex items-center justify-center hover:bg-surface-tertiary transition-[background-color]",
|
|
52
|
+
socialIcon: "w-4 h-4 text-muted", // check-tokens-allow: text-muted
|
|
53
|
+
heading: "font-thin tracking-wide mb-3 md:mb-4 text-muted", // check-tokens-allow: text-muted
|
|
54
|
+
links: "flex flex-col gap-2 md:gap-3 text-sm text-muted font-thin tracking-wide", // check-tokens-allow: text-muted
|
|
55
|
+
link: "hover:text-foreground transition-[color]",
|
|
56
|
+
imageLink: "hover:text-foreground transition-[color] flex flex-row items-center gap-2",
|
|
57
|
+
copyright: "text-xs md:text-sm text-muted", // check-tokens-allow: text-muted
|
|
58
|
+
rights: "text-xs md:text-sm text-muted/80", // check-tokens-allow: text-muted
|
|
59
|
+
legalLink:
|
|
60
|
+
"underline text-xs md:text-sm text-muted hover:text-foreground transition-[color]", // check-tokens-allow: text-muted
|
|
61
|
+
},
|
|
62
|
+
"muted-foreground": {
|
|
63
|
+
footer: "bg-background text-foreground py-8 md:py-16 max-w-5xl mx-auto",
|
|
64
|
+
tagline: "text-sm text-muted-foreground mb-4 md:mb-6 max-w-sm",
|
|
65
|
+
socialButton:
|
|
66
|
+
"w-9 h-9 md:w-8 md:h-8 bg-default rounded-lg flex items-center justify-center hover:bg-surface-tertiary transition-[background-color]",
|
|
67
|
+
socialIcon: "w-4 h-4 text-muted-foreground",
|
|
68
|
+
heading: "font-thin tracking-wide mb-3 md:mb-4 text-muted-foreground",
|
|
69
|
+
links: "flex flex-col gap-2 md:gap-3 text-sm text-muted-foreground font-thin tracking-wide",
|
|
70
|
+
link: "hover:text-foreground transition-[color]",
|
|
71
|
+
imageLink: "hover:text-foreground transition-[color] flex flex-row items-center gap-2",
|
|
72
|
+
copyright: "text-xs md:text-sm text-muted-foreground",
|
|
73
|
+
rights: "text-xs md:text-sm text-muted-foreground/80",
|
|
74
|
+
legalLink:
|
|
75
|
+
"underline text-xs md:text-sm text-muted-foreground hover:text-foreground transition-[color]",
|
|
76
|
+
},
|
|
77
|
+
touch: {
|
|
78
|
+
footer:
|
|
79
|
+
"mx-auto max-w-5xl bg-background pt-8 text-foreground pb-[max(2rem,env(safe-area-inset-bottom))] md:pt-16 md:pb-16",
|
|
80
|
+
tagline: "text-sm text-muted-foreground mb-4 md:mb-6 max-w-sm",
|
|
81
|
+
socialButton:
|
|
82
|
+
"max-sm:hit-target h-9 w-9 rounded-lg bg-default hover:bg-surface-tertiary md:h-8 md:w-8",
|
|
83
|
+
socialIcon: "h-4 w-4 text-muted-foreground",
|
|
84
|
+
heading: "font-thin tracking-wide mb-3 md:mb-4 text-muted-foreground",
|
|
85
|
+
links: "flex flex-col gap-2 text-sm font-thin tracking-wide text-muted-foreground md:gap-3",
|
|
86
|
+
link: "max-sm:hit-target max-sm:py-1 hover:text-foreground",
|
|
87
|
+
imageLink: "max-sm:hit-target flex flex-row items-center gap-2 max-sm:py-1 hover:text-foreground",
|
|
88
|
+
copyright: "text-xs md:text-sm text-muted-foreground",
|
|
89
|
+
rights: "text-xs md:text-sm text-muted-foreground/80",
|
|
90
|
+
legalLink:
|
|
91
|
+
"max-sm:hit-target text-xs underline text-muted-foreground hover:text-foreground md:text-sm",
|
|
92
|
+
},
|
|
93
|
+
} as const;
|
|
94
|
+
|
|
95
|
+
export type SiteFooterVariant = keyof typeof siteFooterClasses;
|
|
96
|
+
|
|
97
|
+
/** `PricingModal` class sets for the two secondary text colours. */
|
|
98
|
+
export const pricingModalClasses = {
|
|
99
|
+
muted: {
|
|
100
|
+
period: "pb-1 text-sm text-muted", // check-tokens-allow: text-muted
|
|
101
|
+
/** After `mt-4 max-w-[28ch]` and the optional font class. */
|
|
102
|
+
tagline: "text-lg italic leading-snug text-muted", // check-tokens-allow: text-muted
|
|
103
|
+
note: "mt-3 text-center text-xs text-muted", // check-tokens-allow: text-muted
|
|
104
|
+
featuresHeading:
|
|
105
|
+
"mb-4 text-[11px] font-medium uppercase tracking-[0.2em] text-muted", // check-tokens-allow: text-muted
|
|
106
|
+
},
|
|
107
|
+
"muted-foreground": {
|
|
108
|
+
period: "pb-1 text-sm text-muted-foreground",
|
|
109
|
+
tagline: "text-lg italic leading-snug text-muted-foreground",
|
|
110
|
+
note: "mt-3 text-center text-xs text-muted-foreground",
|
|
111
|
+
featuresHeading: "mb-4 text-[11px] font-medium uppercase tracking-[0.2em] text-muted-foreground",
|
|
112
|
+
},
|
|
113
|
+
} as const;
|
|
114
|
+
|
|
115
|
+
export type PricingModalTone = keyof typeof pricingModalClasses;
|