@keystone-sites/marketing-design-system 1.0.26 → 2.0.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 +47 -67
- package/fonts/gt-america-300-italic.woff2 +0 -0
- package/fonts/gt-america-300.woff2 +0 -0
- package/fonts/gt-america-400-italic.woff2 +0 -0
- package/fonts/gt-america-400.woff2 +0 -0
- package/fonts/gt-america-500.woff2 +0 -0
- package/fonts/gt-america-extended-300.woff2 +0 -0
- package/fonts/gt-america-extended-400.woff2 +0 -0
- package/fonts/gt-america-extended-500.woff2 +0 -0
- package/fonts/gt-america-extended-700.woff2 +0 -0
- package/fonts/gt-america-mono-300.woff2 +0 -0
- package/fonts/gt-america-mono-500.woff2 +0 -0
- package/fonts/pp-kyoto-vf.woff2 +0 -0
- package/package.json +46 -203
- package/src/base.css +300 -0
- package/src/fonts.css +131 -0
- package/src/hue.ts +17 -0
- package/src/icon.tsx +56 -0
- package/src/mark.tsx +14 -0
- package/src/motion.ts +123 -0
- package/src/parts/chip.css +84 -0
- package/src/parts/chip.tsx +40 -0
- package/src/parts/composer.css +195 -0
- package/src/parts/composer.tsx +220 -0
- package/src/parts/cx.ts +2 -0
- package/src/parts/faq.css +77 -0
- package/src/parts/faq.tsx +25 -0
- package/src/parts/footer.css +51 -0
- package/src/parts/footer.tsx +27 -0
- package/src/parts/nav.css +180 -0
- package/src/parts/nav.tsx +101 -0
- package/src/parts/photo.css +15 -0
- package/src/parts/photo.tsx +24 -0
- package/src/parts/plans.css +89 -0
- package/src/parts/plans.tsx +56 -0
- package/src/parts/prose.css +86 -0
- package/src/parts/prose.tsx +49 -0
- package/src/parts/shape.css +47 -0
- package/src/parts/shape.tsx +68 -0
- package/src/parts/split.tsx +49 -0
- package/src/parts/stamp.css +85 -0
- package/src/parts/stamp.tsx +36 -0
- package/src/parts/work-card.css +51 -0
- package/src/parts/work-card.tsx +40 -0
- package/src/set.css +439 -0
- package/src/styles.css +20 -0
- package/src/tokens/color.css +471 -0
- package/src/tokens/roles.css +12 -0
- package/src/tokens/type.css +11 -0
- package/src/wordmark.tsx +34 -0
- package/AGENTS.md +0 -192
- package/assets/media/brand/ks-lockup.svg +0 -13
- package/assets/media/brand/ks-logomark.svg +0 -4
- package/assets/media/brand/ks-wordmark-inline.svg +0 -13
- package/assets/media/brand/ks-wordmark.svg +0 -11
- package/assets/media/fonts/gt-standard-standard-vf.woff2 +0 -0
- package/assets/media/fonts/pp-kyoto-variable-upright-vf.woff2 +0 -0
- package/base.css +0 -113
- package/css-vars.d.ts +0 -10
- package/grid/engine.css +0 -367
- package/grid/field-hash.ts +0 -31
- package/grid/field.tsx +0 -48
- package/grid/gates.cjs +0 -35
- package/grid/region.tsx +0 -97
- package/icons.tsx +0 -1282
- package/index.css +0 -89
- package/lib/autoplay-gate.ts +0 -88
- package/lib/focus-trap.ts +0 -42
- package/lib/grader.ts +0 -123
- package/lib/legal-data.ts +0 -1
- package/lib/legal.ts +0 -41
- package/lib/noise.tsx +0 -114
- package/lib/phone.ts +0 -294
- package/lib/render-boundary.tsx +0 -27
- package/lib/scroll-lock.ts +0 -25
- package/lib/swipe.ts +0 -124
- package/lib/use-active-section.ts +0 -43
- package/lib/use-count-up.ts +0 -26
- package/lib/use-grader-search.ts +0 -143
- package/lib/use-popover.ts +0 -30
- package/lib/use-video-carousel.ts +0 -271
- package/media.ts +0 -558
- package/primitives/breadcrumb.css +0 -51
- package/primitives/breadcrumb.tsx +0 -46
- package/primitives/business-picker.css +0 -135
- package/primitives/business-picker.tsx +0 -298
- package/primitives/button-inline.css +0 -52
- package/primitives/button-inline.tsx +0 -38
- package/primitives/buttons.css +0 -551
- package/primitives/buttons.tsx +0 -330
- package/primitives/case-study-button.css +0 -71
- package/primitives/case-study-button.tsx +0 -28
- package/primitives/case-study-card.css +0 -318
- package/primitives/case-study-card.tsx +0 -116
- package/primitives/chip.css +0 -127
- package/primitives/chip.tsx +0 -53
- package/primitives/closer-row.css +0 -14
- package/primitives/closer-row.tsx +0 -22
- package/primitives/cta-row.css +0 -41
- package/primitives/cta-row.tsx +0 -39
- package/primitives/disclosure.css +0 -302
- package/primitives/disclosure.tsx +0 -277
- package/primitives/faq-question.css +0 -220
- package/primitives/faq-question.tsx +0 -55
- package/primitives/field.css +0 -279
- package/primitives/field.tsx +0 -376
- package/primitives/footer-item.css +0 -72
- package/primitives/footer-item.tsx +0 -42
- package/primitives/glyph-toggle.css +0 -62
- package/primitives/glyph-toggle.tsx +0 -42
- package/primitives/grader-menu.tsx +0 -84
- package/primitives/grader.css +0 -369
- package/primitives/grader.tsx +0 -285
- package/primitives/keystone-score.css +0 -156
- package/primitives/keystone-score.tsx +0 -204
- package/primitives/modal.css +0 -194
- package/primitives/modal.tsx +0 -204
- package/primitives/month-range.css +0 -80
- package/primitives/month-range.tsx +0 -183
- package/primitives/notice.css +0 -39
- package/primitives/notice.tsx +0 -56
- package/primitives/persona-card.css +0 -374
- package/primitives/persona-card.tsx +0 -74
- package/primitives/picture.css +0 -11
- package/primitives/picture.tsx +0 -41
- package/primitives/plan-card.css +0 -398
- package/primitives/plan-card.tsx +0 -153
- package/primitives/prose.css +0 -164
- package/primitives/prose.tsx +0 -194
- package/primitives/ramps.css +0 -77
- package/primitives/report-nav.css +0 -382
- package/primitives/report-nav.tsx +0 -353
- package/primitives/report.css +0 -601
- package/primitives/report.tsx +0 -357
- package/primitives/skeleton.css +0 -82
- package/primitives/skeleton.tsx +0 -56
- package/primitives/slider.css +0 -179
- package/primitives/slider.tsx +0 -69
- package/primitives/slug.css +0 -87
- package/primitives/slug.tsx +0 -37
- package/primitives/status.css +0 -427
- package/primitives/status.tsx +0 -323
- package/primitives/strip.css +0 -40
- package/primitives/surface.css +0 -88
- package/primitives/surface.tsx +0 -100
- package/primitives/table.css +0 -227
- package/primitives/table.tsx +0 -122
- package/primitives/tabs.css +0 -85
- package/primitives/tabs.tsx +0 -122
- package/primitives/tag.css +0 -46
- package/primitives/tag.tsx +0 -33
- package/primitives/text.css +0 -127
- package/primitives/toc.css +0 -65
- package/primitives/toc.tsx +0 -42
- package/primitives/tooltip.css +0 -56
- package/primitives/tooltip.tsx +0 -103
- package/rules/design-system.md +0 -154
- package/rules/grid-and-layout.md +0 -166
- package/scripts/generate-exports.mjs +0 -61
- package/scripts/generate-type-css.mjs +0 -130
- package/sections/faq-island.tsx +0 -102
- package/sections/faq.css +0 -213
- package/sections/faq.tsx +0 -46
- package/sections/footer-nav.tsx +0 -95
- package/sections/footer-signature.css +0 -223
- package/sections/footer-signature.tsx +0 -127
- package/sections/footer.css +0 -735
- package/sections/footer.tsx +0 -286
- package/sections/gallery-overlay.css +0 -213
- package/sections/gallery-overlay.tsx +0 -267
- package/sections/landing-benefits.css +0 -59
- package/sections/landing-benefits.tsx +0 -81
- package/sections/landing-closer.css +0 -23
- package/sections/landing-closer.tsx +0 -26
- package/sections/landing-hero.css +0 -80
- package/sections/landing-hero.tsx +0 -69
- package/sections/landing-quote.css +0 -19
- package/sections/landing-quote.tsx +0 -30
- package/sections/landing-sample.ts +0 -66
- package/sections/landing.css +0 -45
- package/sections/landing.tsx +0 -69
- package/sections/load-orchestrator.tsx +0 -43
- package/sections/load.css +0 -138
- package/sections/nav-desktop.css +0 -530
- package/sections/nav-desktop.tsx +0 -155
- package/sections/nav-menu.css +0 -57
- package/sections/nav-menu.tsx +0 -112
- package/sections/nav-mobile.css +0 -571
- package/sections/nav-mobile.tsx +0 -222
- package/sections/nav.css +0 -127
- package/sections/nav.tsx +0 -394
- package/sections/site-chat-data.ts +0 -16
- package/sections/site-chat-open.tsx +0 -25
- package/sections/site-chat.tsx +0 -67
- package/site-links.ts +0 -41
- package/site.ts +0 -2
- package/themes/inverted.css +0 -139
- package/tokens/fonts.css +0 -38
- package/tokens/motion.css +0 -150
- package/tokens/primitives.css +0 -163
- package/tokens/semantic.css +0 -159
- package/tokens/type-styles.json +0 -145
- package/tokens/type.css +0 -1548
- package/widgets.css +0 -78
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
2
|
+
import { Wordmark } from "../wordmark";
|
|
3
|
+
import { cx } from "./cx";
|
|
4
|
+
|
|
5
|
+
type Props = {
|
|
6
|
+
/** The page's links, in a row. */
|
|
7
|
+
links: ReactNode;
|
|
8
|
+
/** The small print under them. */
|
|
9
|
+
note: ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** A page's foot: the wordmark, large, on ink, with the page's links and small print beside it. */
|
|
15
|
+
export function Footer({ links, note, className, style }: Props) {
|
|
16
|
+
return (
|
|
17
|
+
<footer className={cx("ks-footer", className)} style={style}>
|
|
18
|
+
<div className="ks-page ks-footer__inner">
|
|
19
|
+
<Wordmark className="ks-footer__word" />
|
|
20
|
+
<div className="ks-footer__meta">
|
|
21
|
+
<span className="ks-footer__links">{links}</span>
|
|
22
|
+
<span>{note}</span>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</footer>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/* The site's nav (Figma › Site › nav-item, nav-button), on a white pill fixed at the window's top;
|
|
2
|
+
on ink over a dark section. On a phone its links fold under a menu key.
|
|
3
|
+
|
|
4
|
+
As wide as what it holds: centred by its left edge, a box left to size itself would stop at half
|
|
5
|
+
the window and squeeze the mark first. */
|
|
6
|
+
.ks-nav {
|
|
7
|
+
position: fixed;
|
|
8
|
+
top: calc(var(--u) * 0.6 + env(safe-area-inset-top, 0px));
|
|
9
|
+
left: 50%;
|
|
10
|
+
width: max-content;
|
|
11
|
+
max-width: calc(100vw - var(--u));
|
|
12
|
+
z-index: 40;
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 4px;
|
|
16
|
+
padding: 8px;
|
|
17
|
+
translate: -50% 0;
|
|
18
|
+
background: var(--white);
|
|
19
|
+
border-radius: 8px;
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
}
|
|
22
|
+
.ks-nav__home {
|
|
23
|
+
flex: none;
|
|
24
|
+
display: flex;
|
|
25
|
+
}
|
|
26
|
+
.ks-nav__mark {
|
|
27
|
+
width: var(--key);
|
|
28
|
+
height: var(--key);
|
|
29
|
+
flex: none;
|
|
30
|
+
}
|
|
31
|
+
.ks-nav__links {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: 20px;
|
|
35
|
+
padding-inline: 24px;
|
|
36
|
+
}
|
|
37
|
+
.ks-nav__item {
|
|
38
|
+
padding: 2px 6px;
|
|
39
|
+
border-radius: 2px;
|
|
40
|
+
font-weight: 400;
|
|
41
|
+
font-size: 16px;
|
|
42
|
+
line-height: 24px;
|
|
43
|
+
letter-spacing: -0.02em;
|
|
44
|
+
color: var(--ink);
|
|
45
|
+
transition: color 120ms var(--out);
|
|
46
|
+
}
|
|
47
|
+
.ks-nav__item:hover {
|
|
48
|
+
color: var(--muted);
|
|
49
|
+
}
|
|
50
|
+
/* Focus is drawn inside the item's own box, so the row doesn't shift. */
|
|
51
|
+
.ks .ks-nav__item:focus-visible {
|
|
52
|
+
outline: 2px solid var(--char);
|
|
53
|
+
outline-offset: -2px;
|
|
54
|
+
}
|
|
55
|
+
.ks-nav__try {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
height: var(--key);
|
|
59
|
+
padding-inline: 12px;
|
|
60
|
+
background: var(--char);
|
|
61
|
+
color: var(--text-paper);
|
|
62
|
+
font-weight: 500;
|
|
63
|
+
font-size: 14px;
|
|
64
|
+
line-height: 21px;
|
|
65
|
+
transition: background-color 120ms var(--out);
|
|
66
|
+
}
|
|
67
|
+
.ks .ks-nav__try:hover {
|
|
68
|
+
background: var(--ink);
|
|
69
|
+
}
|
|
70
|
+
.ks .ks-nav__try:focus-visible {
|
|
71
|
+
outline: 2px solid var(--pear-400);
|
|
72
|
+
outline-offset: -2px;
|
|
73
|
+
}
|
|
74
|
+
/* Over the ink foot (Figma › nav, mode=ink). */
|
|
75
|
+
.ks-nav[data-tone="ink"] {
|
|
76
|
+
background: var(--char);
|
|
77
|
+
}
|
|
78
|
+
.ks-nav[data-tone="ink"] .ks-nav__item {
|
|
79
|
+
color: var(--text-paper);
|
|
80
|
+
}
|
|
81
|
+
.ks-nav[data-tone="ink"] .ks-nav__item:hover {
|
|
82
|
+
color: var(--gray-600);
|
|
83
|
+
}
|
|
84
|
+
.ks .ks-nav[data-tone="ink"] .ks-nav__item:focus-visible {
|
|
85
|
+
outline-color: var(--text-paper);
|
|
86
|
+
}
|
|
87
|
+
.ks-nav[data-tone="ink"] .ks-nav__try {
|
|
88
|
+
background: var(--paper);
|
|
89
|
+
color: var(--ink);
|
|
90
|
+
}
|
|
91
|
+
.ks .ks-nav[data-tone="ink"] .ks-nav__try:hover {
|
|
92
|
+
background: var(--stone);
|
|
93
|
+
}
|
|
94
|
+
.ks .ks-nav[data-tone="ink"] .ks-nav__try:focus-visible {
|
|
95
|
+
outline-color: var(--ink);
|
|
96
|
+
}
|
|
97
|
+
/* The menu key, on a phone only: a key square, the bar's own ground. */
|
|
98
|
+
.ks-nav__menu {
|
|
99
|
+
display: none;
|
|
100
|
+
place-items: center;
|
|
101
|
+
width: var(--key);
|
|
102
|
+
height: var(--key);
|
|
103
|
+
border-radius: 4px;
|
|
104
|
+
color: var(--ink);
|
|
105
|
+
font-size: var(--key-icon);
|
|
106
|
+
transition: background-color 120ms var(--out);
|
|
107
|
+
}
|
|
108
|
+
.ks .ks-nav__menu:hover {
|
|
109
|
+
background: var(--stone);
|
|
110
|
+
}
|
|
111
|
+
.ks .ks-nav__menu:focus-visible {
|
|
112
|
+
outline: 2px solid var(--char);
|
|
113
|
+
outline-offset: -2px;
|
|
114
|
+
}
|
|
115
|
+
.ks-nav[data-tone="ink"] .ks-nav__menu {
|
|
116
|
+
color: var(--text-paper);
|
|
117
|
+
}
|
|
118
|
+
.ks .ks-nav[data-tone="ink"] .ks-nav__menu:hover {
|
|
119
|
+
background: var(--line-ink);
|
|
120
|
+
}
|
|
121
|
+
.ks .ks-nav[data-tone="ink"] .ks-nav__menu:focus-visible {
|
|
122
|
+
outline-color: var(--text-paper);
|
|
123
|
+
}
|
|
124
|
+
@media (max-width: 720px) {
|
|
125
|
+
.ks-nav__menu {
|
|
126
|
+
display: grid;
|
|
127
|
+
}
|
|
128
|
+
.ks-nav__home {
|
|
129
|
+
margin-right: auto;
|
|
130
|
+
}
|
|
131
|
+
/* Open, the bar runs down to hold the links, one to a row, under the mark and the keys. */
|
|
132
|
+
.ks-nav__links {
|
|
133
|
+
display: none;
|
|
134
|
+
order: 3;
|
|
135
|
+
flex-basis: 100%;
|
|
136
|
+
flex-direction: column;
|
|
137
|
+
align-items: stretch;
|
|
138
|
+
gap: 0;
|
|
139
|
+
padding: 8px 0 0;
|
|
140
|
+
}
|
|
141
|
+
.ks-nav[data-open] {
|
|
142
|
+
flex-wrap: wrap;
|
|
143
|
+
}
|
|
144
|
+
.ks-nav[data-open] .ks-nav__links {
|
|
145
|
+
display: flex;
|
|
146
|
+
animation: ks-fade 200ms var(--out) both;
|
|
147
|
+
}
|
|
148
|
+
.ks-nav__links .ks-nav__item {
|
|
149
|
+
padding: 12px 8px;
|
|
150
|
+
font-size: 18px;
|
|
151
|
+
}
|
|
152
|
+
.ks-nav__links .ks-nav__item + .ks-nav__item {
|
|
153
|
+
border-top: 1px solid var(--line);
|
|
154
|
+
}
|
|
155
|
+
.ks-nav__links .ks-nav__login {
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
justify-content: space-between;
|
|
159
|
+
font-weight: 500;
|
|
160
|
+
}
|
|
161
|
+
.ks-nav[data-tone="ink"] .ks-nav__links .ks-nav__item + .ks-nav__item {
|
|
162
|
+
border-top-color: var(--line-ink);
|
|
163
|
+
}
|
|
164
|
+
.ks-nav {
|
|
165
|
+
left: calc(var(--u) * 0.5 + env(safe-area-inset-left, 0px));
|
|
166
|
+
right: calc(var(--u) * 0.5 + env(safe-area-inset-right, 0px));
|
|
167
|
+
width: auto;
|
|
168
|
+
max-width: none;
|
|
169
|
+
translate: none;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/* The way in, in the phone's menu only. */
|
|
173
|
+
.ks-nav__login {
|
|
174
|
+
display: none;
|
|
175
|
+
}
|
|
176
|
+
@keyframes ks-fade {
|
|
177
|
+
from {
|
|
178
|
+
opacity: 0;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { type MouseEvent, useEffect, useState } from "react";
|
|
4
|
+
import { Icon } from "../icon";
|
|
5
|
+
import { Mark } from "../mark";
|
|
6
|
+
import { prefersReducedMotion } from "../motion";
|
|
7
|
+
|
|
8
|
+
export type NavLink = { label: string; href: string };
|
|
9
|
+
|
|
10
|
+
type Props = {
|
|
11
|
+
/** Where the mark goes, and how it reads to a screen reader. */
|
|
12
|
+
home: NavLink;
|
|
13
|
+
/** A link to `#id` glides to that section; any other is followed. */
|
|
14
|
+
links: readonly NavLink[];
|
|
15
|
+
/** The way in for a customer, in the phone's menu only. */
|
|
16
|
+
login: NavLink;
|
|
17
|
+
/** The key at the end: a handler, or a page to go to. */
|
|
18
|
+
cta: { label: string } & ({ onClick: () => void } | { href: string });
|
|
19
|
+
tone?: "ink";
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The site's nav (Figma › Site › nav-item, nav-button) on a white pill, or on ink over a dark
|
|
24
|
+
* section. A section's link travels to its place on the page, which a pinned section can't report
|
|
25
|
+
* itself, so give such a section an anchor that doesn't pin.
|
|
26
|
+
*/
|
|
27
|
+
export function Nav({ home, links, login, cta, tone }: Props) {
|
|
28
|
+
// On a phone the links fold under a menu key, opened down from the bar.
|
|
29
|
+
const [open, setOpen] = useState(false);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (!open) return;
|
|
32
|
+
const close = (event: KeyboardEvent) => {
|
|
33
|
+
if (event.key === "Escape") setOpen(false);
|
|
34
|
+
};
|
|
35
|
+
window.addEventListener("keydown", close);
|
|
36
|
+
return () => {
|
|
37
|
+
window.removeEventListener("keydown", close);
|
|
38
|
+
};
|
|
39
|
+
}, [open]);
|
|
40
|
+
const go = (event: MouseEvent, href: string) => {
|
|
41
|
+
setOpen(false);
|
|
42
|
+
if (!href.startsWith("#")) return;
|
|
43
|
+
event.preventDefault();
|
|
44
|
+
document
|
|
45
|
+
.getElementById(href.slice(1))
|
|
46
|
+
?.scrollIntoView({ block: "start", behavior: prefersReducedMotion() ? "auto" : "smooth" });
|
|
47
|
+
};
|
|
48
|
+
return (
|
|
49
|
+
<nav className="ks-nav" data-tone={tone} data-open={open ? "" : undefined} aria-label="Site">
|
|
50
|
+
<a href={home.href} className="ks-nav__home" aria-label={home.label}>
|
|
51
|
+
<Mark className="ks-nav__mark" />
|
|
52
|
+
</a>
|
|
53
|
+
<div id="ks-nav-links" className="ks-nav__links">
|
|
54
|
+
{links.map((item) => (
|
|
55
|
+
<a
|
|
56
|
+
key={item.href}
|
|
57
|
+
href={item.href}
|
|
58
|
+
className="ks-nav__item"
|
|
59
|
+
onClick={(event) => {
|
|
60
|
+
go(event, item.href);
|
|
61
|
+
}}
|
|
62
|
+
>
|
|
63
|
+
{item.label}
|
|
64
|
+
</a>
|
|
65
|
+
))}
|
|
66
|
+
<a href={login.href} className="ks-nav__item ks-nav__login">
|
|
67
|
+
{login.label}
|
|
68
|
+
<Icon name="arrow-right" />
|
|
69
|
+
</a>
|
|
70
|
+
</div>
|
|
71
|
+
{"href" in cta ? (
|
|
72
|
+
<a href={cta.href} className="ks-nav__try">
|
|
73
|
+
{cta.label}
|
|
74
|
+
</a>
|
|
75
|
+
) : (
|
|
76
|
+
<button
|
|
77
|
+
type="button"
|
|
78
|
+
className="ks-nav__try"
|
|
79
|
+
onClick={() => {
|
|
80
|
+
setOpen(false);
|
|
81
|
+
cta.onClick();
|
|
82
|
+
}}
|
|
83
|
+
>
|
|
84
|
+
{cta.label}
|
|
85
|
+
</button>
|
|
86
|
+
)}
|
|
87
|
+
<button
|
|
88
|
+
type="button"
|
|
89
|
+
className="ks-nav__menu"
|
|
90
|
+
aria-expanded={open}
|
|
91
|
+
aria-controls="ks-nav-links"
|
|
92
|
+
aria-label={open ? "Close menu" : "Menu"}
|
|
93
|
+
onClick={() => {
|
|
94
|
+
setOpen((was) => !was);
|
|
95
|
+
}}
|
|
96
|
+
>
|
|
97
|
+
<Icon name={open ? "close" : "menu"} />
|
|
98
|
+
</button>
|
|
99
|
+
</nav>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* A photograph filling its box, cropped to cover; `--focus` is where its subject sits. */
|
|
2
|
+
|
|
3
|
+
.ks-photo {
|
|
4
|
+
position: relative;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
background: var(--stone);
|
|
7
|
+
}
|
|
8
|
+
.ks-photo > img {
|
|
9
|
+
position: absolute;
|
|
10
|
+
inset: 0;
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 100%;
|
|
13
|
+
object-fit: cover;
|
|
14
|
+
object-position: var(--focus, 50% 50%);
|
|
15
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { CSSProperties, HTMLAttributes } from "react";
|
|
2
|
+
import { cx } from "./cx";
|
|
3
|
+
|
|
4
|
+
type Props = HTMLAttributes<HTMLElement> & {
|
|
5
|
+
src: string;
|
|
6
|
+
alt?: string;
|
|
7
|
+
/** Where the subject sits, as an object-position. */
|
|
8
|
+
focus?: string;
|
|
9
|
+
eager?: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/** A photograph filling its box; size the box by class. */
|
|
13
|
+
export function Photo({ src, alt = "", focus, eager, className, style, children, ...rest }: Props) {
|
|
14
|
+
return (
|
|
15
|
+
<figure
|
|
16
|
+
className={cx("ks-photo", className)}
|
|
17
|
+
style={{ ...style, "--focus": focus } as CSSProperties}
|
|
18
|
+
{...rest}
|
|
19
|
+
>
|
|
20
|
+
<img src={src} alt={alt} loading={eager ? "eager" : "lazy"} decoding="async" />
|
|
21
|
+
{children}
|
|
22
|
+
</figure>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/* The plans, side by side; the featured one on pear. */
|
|
2
|
+
|
|
3
|
+
.ks-plans {
|
|
4
|
+
display: grid;
|
|
5
|
+
grid-template-columns: repeat(3, 1fr);
|
|
6
|
+
border: 1px solid var(--line);
|
|
7
|
+
background: var(--white);
|
|
8
|
+
}
|
|
9
|
+
.ks-plan {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: calc(var(--u) * 0.6);
|
|
13
|
+
padding: var(--u);
|
|
14
|
+
min-height: calc(var(--u) * 12);
|
|
15
|
+
}
|
|
16
|
+
.ks-plan + .ks-plan {
|
|
17
|
+
border-left: 1px solid var(--line);
|
|
18
|
+
}
|
|
19
|
+
.ks-plan[data-featured] {
|
|
20
|
+
background: var(--pear-400);
|
|
21
|
+
color: var(--pear-950);
|
|
22
|
+
}
|
|
23
|
+
.ks-plan__name {
|
|
24
|
+
font-family: var(--mono);
|
|
25
|
+
font-weight: var(--mono-weight);
|
|
26
|
+
font-size: var(--fs-stamp);
|
|
27
|
+
}
|
|
28
|
+
.ks-plan__price {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: baseline;
|
|
31
|
+
gap: 8px;
|
|
32
|
+
font-family: var(--serif);
|
|
33
|
+
font-weight: 200;
|
|
34
|
+
font-size: calc(var(--u) * 2);
|
|
35
|
+
line-height: 1;
|
|
36
|
+
letter-spacing: -0.03em;
|
|
37
|
+
}
|
|
38
|
+
.ks-plan__price small {
|
|
39
|
+
font-family: var(--sans);
|
|
40
|
+
font-size: var(--fs-body);
|
|
41
|
+
letter-spacing: 0;
|
|
42
|
+
color: var(--muted);
|
|
43
|
+
}
|
|
44
|
+
.ks-plan[data-featured] .ks-plan__price small {
|
|
45
|
+
color: var(--pear-800);
|
|
46
|
+
}
|
|
47
|
+
.ks-plan__for {
|
|
48
|
+
font-family: var(--ext);
|
|
49
|
+
font-weight: 500;
|
|
50
|
+
font-size: calc(var(--u) * 0.5);
|
|
51
|
+
line-height: 1.25;
|
|
52
|
+
}
|
|
53
|
+
.ks-plan__list {
|
|
54
|
+
display: grid;
|
|
55
|
+
gap: 8px;
|
|
56
|
+
font-size: var(--fs-body);
|
|
57
|
+
color: var(--soft);
|
|
58
|
+
}
|
|
59
|
+
.ks-plan[data-featured] .ks-plan__list {
|
|
60
|
+
color: var(--pear-900);
|
|
61
|
+
}
|
|
62
|
+
.ks-plan__list li {
|
|
63
|
+
display: grid;
|
|
64
|
+
grid-template-columns: 14px 1fr;
|
|
65
|
+
gap: 10px;
|
|
66
|
+
align-items: baseline;
|
|
67
|
+
}
|
|
68
|
+
.ks-plan__list li::before {
|
|
69
|
+
content: "";
|
|
70
|
+
width: 8px;
|
|
71
|
+
height: 8px;
|
|
72
|
+
background: currentColor;
|
|
73
|
+
translate: 0 -1px;
|
|
74
|
+
}
|
|
75
|
+
.ks-plan__cta {
|
|
76
|
+
margin-top: auto;
|
|
77
|
+
}
|
|
78
|
+
@media (max-width: 860px) {
|
|
79
|
+
.ks-plans {
|
|
80
|
+
grid-template-columns: 1fr;
|
|
81
|
+
}
|
|
82
|
+
.ks-plan {
|
|
83
|
+
min-height: 0;
|
|
84
|
+
}
|
|
85
|
+
.ks-plan + .ks-plan {
|
|
86
|
+
border-left: 0;
|
|
87
|
+
border-top: 1px solid var(--line);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { CSSProperties } from "react";
|
|
2
|
+
import { Chip } from "./chip";
|
|
3
|
+
import { cx } from "./cx";
|
|
4
|
+
|
|
5
|
+
export type Plan = {
|
|
6
|
+
name: string;
|
|
7
|
+
price: string;
|
|
8
|
+
/** Who it is for, in a line. */
|
|
9
|
+
line: string;
|
|
10
|
+
list: readonly string[];
|
|
11
|
+
featured?: boolean;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
type Props = {
|
|
15
|
+
plans: readonly Plan[];
|
|
16
|
+
/** Each plan's button, by the plan's name. */
|
|
17
|
+
label: (plan: string) => string;
|
|
18
|
+
onChoose: (plan: string) => void;
|
|
19
|
+
/** What follows each price. */
|
|
20
|
+
per: string;
|
|
21
|
+
className?: string;
|
|
22
|
+
style?: CSSProperties;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** The plans side by side, the featured one on pear, each with a button. */
|
|
26
|
+
export function Plans({ plans, label, onChoose, per, className, style }: Props) {
|
|
27
|
+
return (
|
|
28
|
+
<div className={cx("ks-plans", className)} style={style}>
|
|
29
|
+
{plans.map((plan) => (
|
|
30
|
+
<div key={plan.name} className="ks-plan" data-featured={plan.featured ? "" : undefined}>
|
|
31
|
+
<span className="ks-plan__name">{plan.name}</span>
|
|
32
|
+
<span className="ks-plan__price">
|
|
33
|
+
{plan.price}
|
|
34
|
+
<small>{per}</small>
|
|
35
|
+
</span>
|
|
36
|
+
<span className="ks-plan__for">{plan.line}</span>
|
|
37
|
+
<ul className="ks-plan__list">
|
|
38
|
+
{plan.list.map((line) => (
|
|
39
|
+
<li key={line}>{line}</li>
|
|
40
|
+
))}
|
|
41
|
+
</ul>
|
|
42
|
+
<Chip
|
|
43
|
+
className="ks-plan__cta"
|
|
44
|
+
variant={plan.featured ? "ink" : "stone"}
|
|
45
|
+
icon="arrow-right"
|
|
46
|
+
onClick={() => {
|
|
47
|
+
onChoose(plan.name);
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
{label(plan.name)}
|
|
51
|
+
</Chip>
|
|
52
|
+
</div>
|
|
53
|
+
))}
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/* A document as running text: a reading measure, sections under Extended headings, rules between
|
|
2
|
+
them, links underlined. */
|
|
3
|
+
|
|
4
|
+
.ks-prose {
|
|
5
|
+
max-width: 68ch;
|
|
6
|
+
font-size: var(--fs-body);
|
|
7
|
+
line-height: 1.6;
|
|
8
|
+
color: var(--ink);
|
|
9
|
+
}
|
|
10
|
+
.ks-prose :where(h2, h3, h4, h5, h6) {
|
|
11
|
+
margin: calc(var(--u) * 1.2) 0 calc(var(--u) * 0.4);
|
|
12
|
+
font-family: var(--ext);
|
|
13
|
+
font-weight: 500;
|
|
14
|
+
letter-spacing: -0.01em;
|
|
15
|
+
line-height: 1.25;
|
|
16
|
+
text-wrap: balance;
|
|
17
|
+
}
|
|
18
|
+
.ks-prose :where(h2) {
|
|
19
|
+
font-size: max(20px, calc(var(--u) * 0.55));
|
|
20
|
+
}
|
|
21
|
+
.ks-prose :where(h3, h4, h5, h6) {
|
|
22
|
+
font-size: var(--fs-lead);
|
|
23
|
+
}
|
|
24
|
+
.ks-prose > :first-child {
|
|
25
|
+
margin-top: 0;
|
|
26
|
+
}
|
|
27
|
+
.ks-prose :where(p, ul, ol, table, blockquote) {
|
|
28
|
+
margin: 0 0 calc(var(--u) * 0.4);
|
|
29
|
+
}
|
|
30
|
+
.ks-prose :where(ul, ol) {
|
|
31
|
+
padding-left: 1.25em;
|
|
32
|
+
}
|
|
33
|
+
.ks-prose :where(ul) {
|
|
34
|
+
list-style: square;
|
|
35
|
+
}
|
|
36
|
+
.ks-prose :where(ol) {
|
|
37
|
+
list-style: decimal;
|
|
38
|
+
}
|
|
39
|
+
.ks-prose :where(li) {
|
|
40
|
+
margin-bottom: calc(var(--u) * 0.15);
|
|
41
|
+
}
|
|
42
|
+
.ks-prose :where(li)::marker {
|
|
43
|
+
color: var(--muted);
|
|
44
|
+
}
|
|
45
|
+
.ks-prose :where(strong, b) {
|
|
46
|
+
font-weight: 500;
|
|
47
|
+
}
|
|
48
|
+
.ks-prose :where(a) {
|
|
49
|
+
text-decoration: underline;
|
|
50
|
+
text-decoration-thickness: 1px;
|
|
51
|
+
text-decoration-color: var(--line);
|
|
52
|
+
text-underline-offset: 4px;
|
|
53
|
+
overflow-wrap: anywhere;
|
|
54
|
+
transition: text-decoration-color 120ms var(--out);
|
|
55
|
+
}
|
|
56
|
+
.ks-prose :where(a):hover {
|
|
57
|
+
text-decoration-color: currentColor;
|
|
58
|
+
}
|
|
59
|
+
.ks-prose :where(hr) {
|
|
60
|
+
margin: var(--u) 0;
|
|
61
|
+
border: 0;
|
|
62
|
+
border-top: 1px solid var(--line);
|
|
63
|
+
}
|
|
64
|
+
.ks-prose :where(blockquote) {
|
|
65
|
+
padding-left: calc(var(--u) * 0.4);
|
|
66
|
+
border-left: 2px solid var(--line);
|
|
67
|
+
color: var(--soft);
|
|
68
|
+
}
|
|
69
|
+
.ks-prose :where(code) {
|
|
70
|
+
font-family: var(--mono);
|
|
71
|
+
font-weight: var(--mono-weight);
|
|
72
|
+
font-size: 0.9em;
|
|
73
|
+
}
|
|
74
|
+
.ks-prose :where(table) {
|
|
75
|
+
width: 100%;
|
|
76
|
+
border-collapse: collapse;
|
|
77
|
+
}
|
|
78
|
+
.ks-prose :where(th, td) {
|
|
79
|
+
padding: calc(var(--u) * 0.2) calc(var(--u) * 0.3) calc(var(--u) * 0.2) 0;
|
|
80
|
+
border-bottom: 1px solid var(--line);
|
|
81
|
+
text-align: left;
|
|
82
|
+
vertical-align: top;
|
|
83
|
+
}
|
|
84
|
+
.ks-prose :where(th) {
|
|
85
|
+
font-weight: 500;
|
|
86
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import Markdown, { type Components } from "react-markdown";
|
|
3
|
+
import remarkGfm from "remark-gfm";
|
|
4
|
+
import { cx } from "./cx";
|
|
5
|
+
|
|
6
|
+
type Level = 2 | 3;
|
|
7
|
+
|
|
8
|
+
type Props = {
|
|
9
|
+
markdown: string;
|
|
10
|
+
/** The level the document's own top heading takes under the page's; 2 under the page's h1. */
|
|
11
|
+
level?: Level;
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const TAGS = ["h1", "h2", "h3", "h4", "h5", "h6"] as const;
|
|
16
|
+
|
|
17
|
+
function heading(tag: (typeof TAGS)[number]) {
|
|
18
|
+
return function Heading({ node: _node, ...props }: ComponentProps<"h1"> & { node?: unknown }) {
|
|
19
|
+
const Tag = tag;
|
|
20
|
+
return <Tag {...props} />;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function Link({ href, children }: ComponentProps<"a">) {
|
|
25
|
+
const away = href !== undefined && /^https?:/.test(href);
|
|
26
|
+
return (
|
|
27
|
+
<a href={href} target={away ? "_blank" : undefined} rel={away ? "noreferrer" : undefined}>
|
|
28
|
+
{children}
|
|
29
|
+
</a>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function components(level: Level): Components {
|
|
34
|
+
const at = (depth: number) => heading(TAGS[Math.min(5, depth + level - 2)]!);
|
|
35
|
+
return { h1: at(1), h2: at(2), h3: at(3), h4: at(4), h5: at(5), h6: at(6), a: Link };
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const BY_LEVEL: Record<Level, Components> = { 2: components(2), 3: components(3) };
|
|
39
|
+
|
|
40
|
+
/** A document written in Markdown, set as running text on the Set's type. */
|
|
41
|
+
export function Prose({ markdown, level = 2, className }: Props) {
|
|
42
|
+
return (
|
|
43
|
+
<div className={cx("ks-prose", className)}>
|
|
44
|
+
<Markdown remarkPlugins={[remarkGfm]} components={BY_LEVEL[level]}>
|
|
45
|
+
{markdown}
|
|
46
|
+
</Markdown>
|
|
47
|
+
</div>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* The seven shapes (Figma › Seven shapes), alone or as a tile holding a glyph. */
|
|
2
|
+
|
|
3
|
+
.ks-shape {
|
|
4
|
+
width: 1em;
|
|
5
|
+
height: 1em;
|
|
6
|
+
flex: none;
|
|
7
|
+
fill: currentColor;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* A shape as a tile: the hue's full behind an ink glyph (or light / deep). */
|
|
11
|
+
.ks-tile {
|
|
12
|
+
position: relative;
|
|
13
|
+
display: grid;
|
|
14
|
+
place-items: center;
|
|
15
|
+
width: calc(var(--u) * 1.5);
|
|
16
|
+
height: calc(var(--u) * 1.5);
|
|
17
|
+
flex: none;
|
|
18
|
+
color: var(--h-full);
|
|
19
|
+
}
|
|
20
|
+
.ks-tile > .ks-shape {
|
|
21
|
+
position: absolute;
|
|
22
|
+
inset: 0;
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 100%;
|
|
25
|
+
}
|
|
26
|
+
.ks-tile__glyph {
|
|
27
|
+
position: relative;
|
|
28
|
+
display: grid;
|
|
29
|
+
place-items: center;
|
|
30
|
+
color: var(--h-ink);
|
|
31
|
+
font-size: calc(var(--u) * 0.5);
|
|
32
|
+
font-family: var(--mono);
|
|
33
|
+
font-weight: var(--mono-weight);
|
|
34
|
+
line-height: 1;
|
|
35
|
+
}
|
|
36
|
+
.ks-tile[data-strength="light"] {
|
|
37
|
+
color: var(--h-light);
|
|
38
|
+
}
|
|
39
|
+
.ks-tile[data-strength="light"] .ks-tile__glyph {
|
|
40
|
+
color: var(--h-deep);
|
|
41
|
+
}
|
|
42
|
+
.ks-tile[data-strength="deep"] {
|
|
43
|
+
color: var(--h-deep);
|
|
44
|
+
}
|
|
45
|
+
.ks-tile[data-strength="deep"] .ks-tile__glyph {
|
|
46
|
+
color: var(--h-light);
|
|
47
|
+
}
|