@atelic-action/ui 7.1.0 → 8.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 +313 -127
- package/package.json +14 -10
- package/src/app/ErrorFallback.tsx +6 -2
- package/src/app/context/AppContext.tsx +10 -1
- package/src/app/index.ts +0 -1
- package/src/app/layout/AppPage.tsx +36 -7
- package/src/app/layout/DesktopRail.tsx +9 -2
- package/src/app/layout/MobileMenu.tsx +5 -1
- package/src/app/layout/PageError.tsx +6 -3
- package/src/app/layout/PageSkeleton.tsx +33 -26
- package/src/app/layout/UserMenu.tsx +12 -6
- package/src/app/ui/alert.tsx +41 -11
- package/src/app/ui/badge.tsx +1 -1
- package/src/app/ui/button.tsx +2 -1
- package/src/app/ui/command.tsx +86 -21
- package/src/app/ui/country-dropdown.tsx +26 -47
- package/src/app/ui/form.tsx +46 -7
- package/src/app/ui/pagination.tsx +1 -1
- package/src/app/ui/progress.tsx +26 -12
- package/src/app/ui/search-input.tsx +16 -3
- package/src/app/ui/select.tsx +8 -3
- package/src/app/ui/slider.tsx +62 -15
- package/src/artifact/ArtifactShell.tsx +8 -3
- package/src/artifact/ErrorFallback.tsx +8 -1
- package/src/artifact/artifactConfig.ts +1 -1
- package/src/chrome/BrandLockup.tsx +71 -16
- package/src/chrome/ClosingBar.tsx +8 -5
- package/src/chrome/ContactDock.tsx +329 -0
- package/src/chrome/Footer.tsx +32 -9
- package/src/chrome/NavBadge.tsx +8 -0
- package/src/chrome/NavMegaPanel.tsx +388 -0
- package/src/chrome/SiteHeader.tsx +235 -18
- package/src/chrome/SiteMenu.tsx +197 -19
- package/src/chrome/SiteShell.tsx +130 -13
- package/src/chrome/StickyCTABar.tsx +56 -2
- package/src/chrome/brandMark.ts +56 -0
- package/src/chrome/icons.ts +58 -0
- package/src/chrome/index.ts +16 -0
- package/src/chrome/navSections.ts +55 -0
- package/src/components/ColumnChart.tsx +27 -2
- package/src/components/DataTable.tsx +104 -85
- package/src/components/Disclosure.tsx +3 -1
- package/src/components/Hint.tsx +3 -24
- package/src/components/NotFound.tsx +4 -1
- package/src/components/StarRating.tsx +45 -19
- package/src/components/ThresholdScale.tsx +36 -26
- package/src/email/atoms.tsx +13 -57
- package/src/email/frame.tsx +4 -6
- package/src/email/index.ts +4 -10
- package/src/email/scoreboard.tsx +107 -186
- package/src/email/text.ts +30 -0
- package/src/email/theme.tsx +76 -9
- package/src/hooks/useDismiss.ts +39 -0
- package/src/lib/useScrollsSideways.ts +26 -0
- package/src/primitives/Button.tsx +2 -0
- package/src/primitives/ProseBlocks.tsx +6 -1
- package/src/primitives/SectionHeading.tsx +3 -1
- package/src/primitives/StarRow.tsx +23 -8
- package/src/sections/BlogIndex.tsx +17 -3
- package/src/sections/BlogPost.tsx +10 -1
- package/src/sections/CTASection.tsx +2 -2
- package/src/sections/CalloutPanel.tsx +34 -0
- package/src/sections/ComparisonTable.tsx +23 -2
- package/src/sections/ContactForm.tsx +61 -17
- package/src/sections/FAQBrowser.tsx +11 -2
- package/src/sections/FeatureGrid.tsx +6 -2
- package/src/sections/FullBleedVideo.tsx +158 -0
- package/src/sections/Gallery.tsx +6 -4
- package/src/sections/Hero.tsx +63 -39
- package/src/sections/JumpRail.tsx +7 -0
- package/src/sections/LegalPage.tsx +10 -2
- package/src/sections/LinkColumns.tsx +64 -0
- package/src/sections/LocationSection.tsx +28 -5
- package/src/sections/Locations.tsx +17 -4
- package/src/sections/LogoMarquee.tsx +43 -11
- package/src/sections/MapEmbed.tsx +13 -9
- package/src/sections/PageHero.tsx +16 -2
- package/src/sections/ProcessSteps.tsx +27 -4
- package/src/sections/ProfileCards.tsx +12 -2
- package/src/sections/ProofStrip.tsx +44 -0
- package/src/sections/RevealSlider.tsx +28 -7
- package/src/sections/ReviewCarousel.tsx +17 -4
- package/src/sections/ReviewWall.tsx +2 -2
- package/src/sections/SplitSection.tsx +2 -1
- package/src/sections/index.ts +15 -6
- package/src/sections/siteConfig.ts +66 -3
- package/src/styles/app.css +24 -2
- package/src/styles/artifact.css +20 -8
- package/src/styles/base.css +42 -13
- package/src/styles/chrome.css +938 -48
- package/src/styles/components.css +104 -65
- package/src/styles/defaults.css +137 -0
- package/src/styles/gate.css +21 -10
- package/src/styles/primitives.css +97 -35
- package/src/styles/sections.css +477 -437
- package/src/styles/star-rating.css +1 -4
- package/src/tokens/palettes.ts +24 -4
- package/src/types.ts +212 -2
- package/src/app/CardErrorBoundary.tsx +0 -39
- package/src/sections/CTABanner.tsx +0 -93
- package/src/sections/DeviceShowcase.tsx +0 -39
- package/src/sections/MediaBand.tsx +0 -20
- package/src/sections/MenuList.tsx +0 -44
- package/src/sections/PressQuotes.tsx +0 -51
- package/src/sections/SocialStrip.tsx +0 -83
|
@@ -48,14 +48,11 @@
|
|
|
48
48
|
.star-rating-fill svg {
|
|
49
49
|
fill: currentColor;
|
|
50
50
|
}
|
|
51
|
+
/* A half star's hit area: a plain area the slider reads its rating from. */
|
|
51
52
|
.star-rating-hit {
|
|
52
53
|
position: absolute;
|
|
53
54
|
inset-block: 0;
|
|
54
55
|
width: 50%;
|
|
55
|
-
margin: 0;
|
|
56
|
-
padding: 0;
|
|
57
|
-
border: 0;
|
|
58
|
-
background: none;
|
|
59
56
|
cursor: pointer;
|
|
60
57
|
}
|
|
61
58
|
.star-rating-hit.is-left {
|
package/src/tokens/palettes.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* The palette the runner emails are painted in, ported one to one from
|
|
3
3
|
* homebase `runners/lib/email.jq` (the tokens section). Cream ground, paper
|
|
4
4
|
* cards on a hairline, near black ink, the orange reserved for the one number
|
|
5
|
-
* that matters on a row.
|
|
5
|
+
* that matters on a row. The bright orange marks (a rule, a dot, a link's
|
|
6
|
+
* underline) and never colors small words: those take the accent's ink.
|
|
6
7
|
*
|
|
7
8
|
* A client branded email passes its own Palette to EmailThemeProvider; the
|
|
8
9
|
* values below are the default.
|
|
@@ -18,8 +19,19 @@ export type Palette = {
|
|
|
18
19
|
dim: string;
|
|
19
20
|
/** Eyebrows, captions, and anything deliberately quiet. */
|
|
20
21
|
faint: string;
|
|
21
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* The single accent, as a mark: a rule, a dot, a link's underline, a
|
|
24
|
+
* callout's edge. Never the color of small words; see `accentInk`.
|
|
25
|
+
*/
|
|
22
26
|
accent: string;
|
|
27
|
+
/**
|
|
28
|
+
* The accent as the color of small words: the value on a title line, a
|
|
29
|
+
* short count, a group's name, a hot cell, a pill. It must read 4.5 to 1
|
|
30
|
+
* on both `paper` and `ground`. Optional (8.0.0): a palette without it
|
|
31
|
+
* gets one derived from `accent`, darkened toward black until it passes
|
|
32
|
+
* on both, which is the accent itself when that already passes.
|
|
33
|
+
*/
|
|
34
|
+
accentInk?: string;
|
|
23
35
|
/** A card's border and the heavier rule. */
|
|
24
36
|
line: string;
|
|
25
37
|
/** The lighter rule inside a card. */
|
|
@@ -44,13 +56,21 @@ export const atelicPalette: Palette = {
|
|
|
44
56
|
paper: "#FDFBF6",
|
|
45
57
|
ink: "#151515",
|
|
46
58
|
dim: "#55503f",
|
|
47
|
-
|
|
59
|
+
// The brand kit's Faint, darkened from the jq's #8a8272 (3.38 to 1 on the
|
|
60
|
+
// ground, 3.68 on paper) to pass text contrast at the 11px a masthead's
|
|
61
|
+
// title and meta are set in: 4.99 to 1 on the ground, 5.43 on paper (8.0.0).
|
|
62
|
+
faint: "#6e6757",
|
|
63
|
+
// The mark. As words it reads 3.31 to 1 on paper and 3.04 on the ground.
|
|
48
64
|
accent: "#FC4A1A",
|
|
65
|
+
// The brand kit's Orange Ink: 5.86 to 1 on paper, 5.38 on the ground (8.0.0).
|
|
66
|
+
accentInk: "#B8300B",
|
|
49
67
|
line: "#E6DFD2",
|
|
50
68
|
hair: "#F0EAE0",
|
|
51
69
|
up: "#2F7A4B",
|
|
52
70
|
down: "#B23A2E",
|
|
53
|
-
|
|
71
|
+
// Darkened from the jq's #B7791F (3.52 to 1 on paper) along the same hue:
|
|
72
|
+
// 4.96 on paper, 4.55 on the ground (8.0.0).
|
|
73
|
+
warm: "#966319",
|
|
54
74
|
};
|
|
55
75
|
|
|
56
76
|
/**
|
package/src/types.ts
CHANGED
|
@@ -10,14 +10,28 @@
|
|
|
10
10
|
* bearing the character in the brand's own webfont, which an SVG loaded
|
|
11
11
|
* through an img cannot do). `wordmark` overrides the rendered text when it
|
|
12
12
|
* should differ from the name, and `run` appends the trailing fade bar.
|
|
13
|
+
*
|
|
14
|
+
* A mark given as `onLight` and `onDark` is the brand's own artwork, cut
|
|
15
|
+
* once for each surface: `onLight` is drawn on a light bar, `onDark` on a
|
|
16
|
+
* dark bar, over a hero, and in the footer. The chrome never recolors either,
|
|
17
|
+
* and either alone serves every surface. A mark given as `src` alone is a
|
|
18
|
+
* light mark the header tints to ink on a light bar, as it always has. Every
|
|
19
|
+
* header mark stands at `--brand-mark-height` (30px unless the theme says
|
|
20
|
+
* otherwise), as wide as its own ratio makes it. `wordmark: false` drops the
|
|
21
|
+
* live name beside the mark, for artwork that already spells it.
|
|
13
22
|
*/
|
|
14
23
|
export interface BrandLogo {
|
|
15
24
|
src?: string;
|
|
16
25
|
/** Alt text where the mark stands alone, as in the footer. */
|
|
17
26
|
alt?: string;
|
|
18
27
|
tile?: string;
|
|
19
|
-
|
|
28
|
+
/** The live name beside the mark; `false` leaves it out. Defaults to the brand's name. */
|
|
29
|
+
wordmark?: string | false;
|
|
20
30
|
run?: boolean;
|
|
31
|
+
/** The mark drawn on a light bar, as given. */
|
|
32
|
+
onLight?: string;
|
|
33
|
+
/** The mark drawn on a dark bar, over a hero, and in the footer, as given. */
|
|
34
|
+
onDark?: string;
|
|
21
35
|
}
|
|
22
36
|
|
|
23
37
|
/**
|
|
@@ -42,10 +56,152 @@ export interface Brand {
|
|
|
42
56
|
recipient?: BrandRecipient;
|
|
43
57
|
}
|
|
44
58
|
|
|
45
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* An entry in a site's primary nav: a plain link, or a group. A group is an
|
|
61
|
+
* entry with `columns`: on a desktop its label is a control that opens a
|
|
62
|
+
* mega menu panel holding its sections left to right (and the `feature` card
|
|
63
|
+
* at the right when it has one), and on a phone the menu opens it as an
|
|
64
|
+
* accordion. `href` is the group's own page, which `allLabel` links to from
|
|
65
|
+
* inside the group.
|
|
66
|
+
*/
|
|
46
67
|
export interface NavLink {
|
|
47
68
|
label: string;
|
|
48
69
|
href: string;
|
|
70
|
+
/**
|
|
71
|
+
* The group's panel, left to right: link columns, and the picture, icon
|
|
72
|
+
* row, and card sections beside them. An entry with none is a plain link.
|
|
73
|
+
*/
|
|
74
|
+
columns?: NavPanelSection[];
|
|
75
|
+
/** A card at the panel's right on a desktop: a picture, a headline, ticked points, and a button. */
|
|
76
|
+
feature?: NavFeature;
|
|
77
|
+
/**
|
|
78
|
+
* The words of a link to the group's own page (`href`), set first in the
|
|
79
|
+
* group, e.g. "All services". Off unless given.
|
|
80
|
+
*/
|
|
81
|
+
allLabel?: string;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** A link indented under a column link, joined to it by an elbow. */
|
|
85
|
+
export interface NavGroupChildLink {
|
|
86
|
+
label: string;
|
|
87
|
+
href: string;
|
|
88
|
+
/** Opens in a new tab, except on mailto, tel, and sms links. */
|
|
89
|
+
external?: boolean;
|
|
90
|
+
/** A short word in a pill after the label, e.g. "Popular". */
|
|
91
|
+
badge?: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** One link in a nav group's column, with a short line under it when it has one. */
|
|
95
|
+
export interface NavGroupLink extends NavGroupChildLink {
|
|
96
|
+
/** A short line under the link, e.g. what the page covers. */
|
|
97
|
+
description?: string;
|
|
98
|
+
/** Links drawn indented under this one on a desktop and a phone alike. */
|
|
99
|
+
children?: NavGroupChildLink[];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* A link column of a nav group: a heading, itself a link when it has an
|
|
104
|
+
* `href`, over its links. `kind` may be left out; a section without one is
|
|
105
|
+
* a link column.
|
|
106
|
+
*/
|
|
107
|
+
export interface NavGroupColumn {
|
|
108
|
+
kind?: "links";
|
|
109
|
+
heading: string;
|
|
110
|
+
href?: string;
|
|
111
|
+
links: NavGroupLink[];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** A picture section of a nav group: one photo under its caption, the whole of it a link. */
|
|
115
|
+
export interface NavPictureSection {
|
|
116
|
+
kind: "picture";
|
|
117
|
+
/** The photo. Its alt defaults to empty, since the caption names the link. */
|
|
118
|
+
image: { src: string; alt?: string };
|
|
119
|
+
caption: string;
|
|
120
|
+
href: string;
|
|
121
|
+
external?: boolean;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** The icons a nav row can lead with, each a lucide icon. */
|
|
125
|
+
export type NavIcon =
|
|
126
|
+
| "calculator"
|
|
127
|
+
| "calendar"
|
|
128
|
+
| "card"
|
|
129
|
+
| "chat"
|
|
130
|
+
| "document"
|
|
131
|
+
| "help"
|
|
132
|
+
| "home"
|
|
133
|
+
| "mail"
|
|
134
|
+
| "map"
|
|
135
|
+
| "phone"
|
|
136
|
+
| "pin"
|
|
137
|
+
| "play"
|
|
138
|
+
| "shield"
|
|
139
|
+
| "star"
|
|
140
|
+
| "tool"
|
|
141
|
+
| "truck"
|
|
142
|
+
| "users";
|
|
143
|
+
|
|
144
|
+
/** One icon row: an icon, a label, and a short line, the whole row a link. */
|
|
145
|
+
export interface NavIconRow {
|
|
146
|
+
label: string;
|
|
147
|
+
description?: string;
|
|
148
|
+
icon: NavIcon;
|
|
149
|
+
href: string;
|
|
150
|
+
external?: boolean;
|
|
151
|
+
/** Sets the row on the primary field, as the way most people should take. One per section. */
|
|
152
|
+
highlight?: boolean;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/** A section of icon rows under a heading, two across on a desktop. */
|
|
156
|
+
export interface NavIconRowsSection {
|
|
157
|
+
kind: "rows";
|
|
158
|
+
heading?: string;
|
|
159
|
+
rows: NavIconRow[];
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** One small card: a kicker, a title, and a meta line beside an optional square picture. */
|
|
163
|
+
export interface NavCard {
|
|
164
|
+
kicker?: string;
|
|
165
|
+
title: string;
|
|
166
|
+
meta?: string;
|
|
167
|
+
/** A square picture at the card's left; a quiet tile stands in without one. */
|
|
168
|
+
image?: { src: string; alt?: string };
|
|
169
|
+
href: string;
|
|
170
|
+
external?: boolean;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** A section of small cards under a heading, such as the latest article and the latest job. */
|
|
174
|
+
export interface NavCardsSection {
|
|
175
|
+
kind: "cards";
|
|
176
|
+
heading?: string;
|
|
177
|
+
cards: NavCard[];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** One section of a nav group's panel. */
|
|
181
|
+
export type NavPanelSection =
|
|
182
|
+
| NavGroupColumn
|
|
183
|
+
| NavPictureSection
|
|
184
|
+
| NavIconRowsSection
|
|
185
|
+
| NavCardsSection;
|
|
186
|
+
|
|
187
|
+
/** The card a nav group can carry at the right of its panel on a desktop. */
|
|
188
|
+
export interface NavFeature {
|
|
189
|
+
/** A small label over the headline. */
|
|
190
|
+
eyebrow?: string;
|
|
191
|
+
title: string;
|
|
192
|
+
/** One line under the headline. */
|
|
193
|
+
text?: string;
|
|
194
|
+
/** Short reasons, each set beside a tick under the headline. */
|
|
195
|
+
points?: string[];
|
|
196
|
+
cta: CallToAction;
|
|
197
|
+
/** The picture that fills the card above the words. */
|
|
198
|
+
image?: { src: string; alt: string };
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** A number the header shows, with the words that say whose line it is. */
|
|
202
|
+
export interface HeaderPhone extends Phone {
|
|
203
|
+
/** Printed small over the number and read with it, e.g. "Mountain office". */
|
|
204
|
+
label?: string;
|
|
49
205
|
}
|
|
50
206
|
|
|
51
207
|
/** A conversion action rendered as a button link. */
|
|
@@ -122,3 +278,57 @@ export interface MenuContact {
|
|
|
122
278
|
email?: string;
|
|
123
279
|
address?: PostalAddress;
|
|
124
280
|
}
|
|
281
|
+
|
|
282
|
+
/** The pictures a dock item can lead with. */
|
|
283
|
+
export type ContactDockIcon =
|
|
284
|
+
| "chat"
|
|
285
|
+
| "phone"
|
|
286
|
+
| "calendar"
|
|
287
|
+
| "mail"
|
|
288
|
+
| "form"
|
|
289
|
+
| "calculator"
|
|
290
|
+
| "map";
|
|
291
|
+
|
|
292
|
+
/** What every dock item has, whichever way it acts. */
|
|
293
|
+
interface ContactDockItemBase {
|
|
294
|
+
label: string;
|
|
295
|
+
/** One short line under the label. */
|
|
296
|
+
description?: string;
|
|
297
|
+
icon?: ContactDockIcon;
|
|
298
|
+
/** Sets the item apart on a tinted ground, as the way most people should take. */
|
|
299
|
+
lead?: boolean;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* One way to reach the business: a link (`href`, where a `tel:` dials and a
|
|
304
|
+
* form page opens) or a button (`onSelect`, which hands off to something
|
|
305
|
+
* already on the page, such as a chat vendor's own window), and never
|
|
306
|
+
* neither. A prototype never implies a system the business does not run, so
|
|
307
|
+
* an item always points at the business's existing flow.
|
|
308
|
+
*/
|
|
309
|
+
export type ContactDockItem =
|
|
310
|
+
| (ContactDockItemBase & {
|
|
311
|
+
href: string;
|
|
312
|
+
/** Opens in a new tab, except on mailto, tel, and sms links. */
|
|
313
|
+
external?: boolean;
|
|
314
|
+
onSelect?: never;
|
|
315
|
+
})
|
|
316
|
+
| (ContactDockItemBase & {
|
|
317
|
+
/** Called on select in place of following a link; the dock closes first. */
|
|
318
|
+
onSelect: () => void;
|
|
319
|
+
href?: never;
|
|
320
|
+
external?: never;
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
/** What a site's config gives the dock; `SiteShell` mounts it when present. */
|
|
324
|
+
export interface ContactDockConfig {
|
|
325
|
+
/** The launcher's words, e.g. "Talk to us". On a phone the launcher shows its icon alone. */
|
|
326
|
+
label: string;
|
|
327
|
+
/** The panel's heading. Defaults to the launcher's words. */
|
|
328
|
+
title?: string;
|
|
329
|
+
/** One line under the heading. */
|
|
330
|
+
subtitle?: string;
|
|
331
|
+
items: ContactDockItem[];
|
|
332
|
+
/** A small line at the panel's foot, such as the hours someone answers. */
|
|
333
|
+
footnote?: string;
|
|
334
|
+
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Component, type ErrorInfo, type ReactNode } from "react";
|
|
2
|
-
import { Card, CardContent } from "./ui/card";
|
|
3
|
-
|
|
4
|
-
interface Props {
|
|
5
|
-
children: ReactNode;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface State {
|
|
9
|
-
hasError: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export class CardErrorBoundary extends Component<Props, State> {
|
|
13
|
-
constructor(props: Props) {
|
|
14
|
-
super(props);
|
|
15
|
-
this.state = { hasError: false };
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
static getDerivedStateFromError(): State {
|
|
19
|
-
return { hasError: true };
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
componentDidCatch(error: Error, info: ErrorInfo) {
|
|
23
|
-
console.error("CardErrorBoundary caught:", error, info.componentStack);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
render() {
|
|
27
|
-
if (this.state.hasError) {
|
|
28
|
-
return (
|
|
29
|
-
<Card className="border-destructive/30">
|
|
30
|
-
<CardContent className="py-6 text-center text-sm text-muted-foreground">
|
|
31
|
-
Unable to display this item
|
|
32
|
-
</CardContent>
|
|
33
|
-
</Card>
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return this.props.children;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
import { Eyebrow, Lead } from "../primitives";
|
|
3
|
-
import { Button } from "../primitives/Button";
|
|
4
|
-
import { useWithBase } from "../routing/BasePathProvider";
|
|
5
|
-
|
|
6
|
-
export interface CTABannerCTA {
|
|
7
|
-
label: string;
|
|
8
|
-
href: string;
|
|
9
|
-
newTab?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface CTABannerProps {
|
|
13
|
-
id?: string;
|
|
14
|
-
eyebrow?: string;
|
|
15
|
-
/** Headline; use <em className="serif"> spans for the script accent. */
|
|
16
|
-
title: ReactNode;
|
|
17
|
-
lead?: ReactNode;
|
|
18
|
-
/**
|
|
19
|
-
* Full-bleed background image behind the content. Omit it and the banner
|
|
20
|
-
* renders the token gradient fallback (the Hero treatment), so the section
|
|
21
|
-
* works before photography exists.
|
|
22
|
-
*/
|
|
23
|
-
image?: { src: string; alt?: string };
|
|
24
|
-
primaryCTA?: CTABannerCTA;
|
|
25
|
-
secondaryCTA?: CTABannerCTA;
|
|
26
|
-
/**
|
|
27
|
-
* Wash over the image so the copy pops: "dark" (light text over a dark
|
|
28
|
-
* gradient, the hero treatment) or "light" (ink text over a surface wash,
|
|
29
|
-
* for bright imagery). The wash fades toward the far side so the image
|
|
30
|
-
* still reads.
|
|
31
|
-
*/
|
|
32
|
-
tone?: "dark" | "light";
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Mid-page full-bleed CTA banner: the image spans the viewport as a backdrop
|
|
37
|
-
* with eyebrow, title, lead, and actions overlaid. The section-scale sibling
|
|
38
|
-
* of Hero — same treatment, banner height, usable anywhere in the page flow.
|
|
39
|
-
*/
|
|
40
|
-
export function CTABanner({
|
|
41
|
-
id,
|
|
42
|
-
eyebrow,
|
|
43
|
-
title,
|
|
44
|
-
lead,
|
|
45
|
-
image,
|
|
46
|
-
primaryCTA,
|
|
47
|
-
secondaryCTA,
|
|
48
|
-
tone = "dark",
|
|
49
|
-
}: CTABannerProps) {
|
|
50
|
-
const withBase = useWithBase();
|
|
51
|
-
const onDark = tone === "dark";
|
|
52
|
-
return (
|
|
53
|
-
<section className={["cta-banner", tone].join(" ")} id={id}>
|
|
54
|
-
{image ? (
|
|
55
|
-
<img
|
|
56
|
-
className="cta-banner-media"
|
|
57
|
-
src={withBase(image.src)}
|
|
58
|
-
alt={image.alt ?? ""}
|
|
59
|
-
loading="lazy"
|
|
60
|
-
/>
|
|
61
|
-
) : (
|
|
62
|
-
<div className="cta-banner-media cta-banner-fallback" aria-hidden="true" />
|
|
63
|
-
)}
|
|
64
|
-
<div className="cta-banner-wash" aria-hidden="true" />
|
|
65
|
-
<div className="wrap">
|
|
66
|
-
<div className="cta-banner-content">
|
|
67
|
-
{eyebrow && <Eyebrow onDark={onDark}>{eyebrow}</Eyebrow>}
|
|
68
|
-
<h2>{title}</h2>
|
|
69
|
-
{lead && <Lead>{lead}</Lead>}
|
|
70
|
-
{(primaryCTA || secondaryCTA) && (
|
|
71
|
-
<div className="cta-banner-actions">
|
|
72
|
-
{primaryCTA && (
|
|
73
|
-
<Button href={primaryCTA.href} newTab={primaryCTA.newTab} arrow>
|
|
74
|
-
{primaryCTA.label}
|
|
75
|
-
</Button>
|
|
76
|
-
)}
|
|
77
|
-
{secondaryCTA && (
|
|
78
|
-
<Button
|
|
79
|
-
variant="ghost"
|
|
80
|
-
onDark={onDark}
|
|
81
|
-
href={secondaryCTA.href}
|
|
82
|
-
newTab={secondaryCTA.newTab}
|
|
83
|
-
>
|
|
84
|
-
{secondaryCTA.label}
|
|
85
|
-
</Button>
|
|
86
|
-
)}
|
|
87
|
-
</div>
|
|
88
|
-
)}
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
</section>
|
|
92
|
-
);
|
|
93
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { useWithBase } from "../routing/BasePathProvider";
|
|
2
|
-
|
|
3
|
-
export interface DeviceImage {
|
|
4
|
-
src: string;
|
|
5
|
-
alt: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface DeviceShowcaseProps {
|
|
9
|
-
/** Desktop screenshot, shown inside a browser window frame. */
|
|
10
|
-
desktop: DeviceImage;
|
|
11
|
-
/** Phone screenshot, shown in a device frame overlapping the desktop. */
|
|
12
|
-
phone: DeviceImage;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* A desktop browser mockup with a phone mockup overlapping its lower-left,
|
|
17
|
-
* for showing a rebuilt site the way it will actually look. Reusable; both
|
|
18
|
-
* images arrive via props.
|
|
19
|
-
*/
|
|
20
|
-
export function DeviceShowcase({ desktop, phone }: DeviceShowcaseProps) {
|
|
21
|
-
const withBase = useWithBase();
|
|
22
|
-
return (
|
|
23
|
-
<div className="devices">
|
|
24
|
-
<div className="dv-desktop">
|
|
25
|
-
<div className="dv-bar">
|
|
26
|
-
<i />
|
|
27
|
-
<i />
|
|
28
|
-
<i />
|
|
29
|
-
</div>
|
|
30
|
-
<div className="dv-screen">
|
|
31
|
-
<img src={withBase(desktop.src)} alt={desktop.alt} loading="lazy" />
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
<div className="dv-phone">
|
|
35
|
-
<img src={withBase(phone.src)} alt={phone.alt} loading="lazy" />
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { useWithBase } from "../routing/BasePathProvider";
|
|
2
|
-
|
|
3
|
-
export interface MediaBandProps {
|
|
4
|
-
image: { src: string; alt: string };
|
|
5
|
-
/**
|
|
6
|
-
* CSS aspect-ratio for the band (viewport-width : height), e.g. "8/3" for
|
|
7
|
-
* a wide strip. The image covers the band and crops from center.
|
|
8
|
-
*/
|
|
9
|
-
aspectRatio?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/** Full-bleed image band: edge to edge, no frame, no radius. */
|
|
13
|
-
export function MediaBand({ image, aspectRatio = "8/3" }: MediaBandProps) {
|
|
14
|
-
const withBase = useWithBase();
|
|
15
|
-
return (
|
|
16
|
-
<div className="media-band" style={{ aspectRatio }}>
|
|
17
|
-
<img src={withBase(image.src)} alt={image.alt} loading="lazy" />
|
|
18
|
-
</div>
|
|
19
|
-
);
|
|
20
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A priced menu group: uppercase heading over dotted rows of name, optional
|
|
5
|
-
* note, and price, with an optional fine-print foot line. Composes into a
|
|
6
|
-
* page column; pair with Menu structured data in the route's head().
|
|
7
|
-
* Styles live in menu-list.css beside it, with the `.menu-stack` and
|
|
8
|
-
* `.menu-cols` layouts a page stacks its groups in.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
export interface MenuListItem {
|
|
12
|
-
name: string;
|
|
13
|
-
/** Modifier or description line under the name. */
|
|
14
|
-
note?: string;
|
|
15
|
-
/** Rendered as text so ranges ("Small 5 / Large 6") stay expressible. */
|
|
16
|
-
price: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface MenuListProps {
|
|
20
|
-
heading: string;
|
|
21
|
-
items: MenuListItem[];
|
|
22
|
-
/** Fine print after the rows, e.g. "All sandwiches available as a salad." */
|
|
23
|
-
foot?: ReactNode;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function MenuList({ heading, items, foot }: MenuListProps) {
|
|
27
|
-
return (
|
|
28
|
-
<div className="menu-list">
|
|
29
|
-
<h3>{heading}</h3>
|
|
30
|
-
<ul>
|
|
31
|
-
{items.map((item) => (
|
|
32
|
-
<li key={item.name}>
|
|
33
|
-
<span className="ml-item">
|
|
34
|
-
<span className="ml-name">{item.name}</span>
|
|
35
|
-
{item.note && <span className="ml-note">{item.note}</span>}
|
|
36
|
-
</span>
|
|
37
|
-
<span className="ml-price">{item.price}</span>
|
|
38
|
-
</li>
|
|
39
|
-
))}
|
|
40
|
-
</ul>
|
|
41
|
-
{foot && <p className="ml-foot">{foot}</p>}
|
|
42
|
-
</div>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
export interface PressItem {
|
|
2
|
-
/** The quote or award title, e.g. "Best Coffeehouse for Food". */
|
|
3
|
-
quote: string;
|
|
4
|
-
/** Publication name, e.g. "Westword". */
|
|
5
|
-
source: string;
|
|
6
|
-
year: string | number;
|
|
7
|
-
/** Link to the article; rows without one render unlinked. */
|
|
8
|
-
href?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface PressQuotesProps {
|
|
12
|
-
items: PressItem[];
|
|
13
|
-
/** Display order by year; newest first unless told otherwise. */
|
|
14
|
-
order?: "newest" | "oldest";
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/** Sort press items by year; exported for tests. */
|
|
19
|
-
export function sortPress(items: PressItem[], order: "newest" | "oldest"): PressItem[] {
|
|
20
|
-
const dir = order === "newest" ? -1 : 1;
|
|
21
|
-
return [...items].sort((a, b) => dir * (Number(a.year) - Number(b.year)));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/** Rule separated rows of press quotes and awards, each citing its publication and year and linking to the article. */
|
|
25
|
-
export function PressQuotes({ items, order = "newest", className }: PressQuotesProps) {
|
|
26
|
-
return (
|
|
27
|
-
<ul className={["press-quotes", className].filter(Boolean).join(" ")}>
|
|
28
|
-
{sortPress(items, order).map((item) => {
|
|
29
|
-
const body = (
|
|
30
|
-
<>
|
|
31
|
-
<span className="pq-quote">{item.quote}</span>
|
|
32
|
-
<span className="pq-src">
|
|
33
|
-
{item.source} · {item.year}
|
|
34
|
-
</span>
|
|
35
|
-
</>
|
|
36
|
-
);
|
|
37
|
-
return (
|
|
38
|
-
<li key={item.source + item.year + item.quote}>
|
|
39
|
-
{item.href ? (
|
|
40
|
-
<a className="pq-row" href={item.href} target="_blank" rel="noopener noreferrer">
|
|
41
|
-
{body}
|
|
42
|
-
</a>
|
|
43
|
-
) : (
|
|
44
|
-
<div className="pq-row">{body}</div>
|
|
45
|
-
)}
|
|
46
|
-
</li>
|
|
47
|
-
);
|
|
48
|
-
})}
|
|
49
|
-
</ul>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { AtSign } from "lucide-react";
|
|
2
|
-
import type { ReactNode } from "react";
|
|
3
|
-
import { SectionHeading } from "../primitives";
|
|
4
|
-
import { Button } from "../primitives/Button";
|
|
5
|
-
import { useWithBase } from "../routing/BasePathProvider";
|
|
6
|
-
|
|
7
|
-
export interface SocialPhoto {
|
|
8
|
-
src?: string;
|
|
9
|
-
alt?: string;
|
|
10
|
-
/** Placeholder shot brief rendered when no src exists yet. */
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface SocialStripProps {
|
|
15
|
-
eyebrow?: string;
|
|
16
|
-
/** Deprecated no-op: the eyebrow's trailing fade is now its only rendering. */
|
|
17
|
-
eyebrowRun?: boolean;
|
|
18
|
-
title: ReactNode;
|
|
19
|
-
lead?: string;
|
|
20
|
-
/** Display handle, e.g. "@platformstrength". */
|
|
21
|
-
handle: string;
|
|
22
|
-
/** The profile the strip links out to. */
|
|
23
|
-
profileURL: string;
|
|
24
|
-
photos: SocialPhoto[];
|
|
25
|
-
/** Follow button label; defaults to "Follow {handle}". */
|
|
26
|
-
followLabel?: string;
|
|
27
|
-
surface?: "default" | "alt";
|
|
28
|
-
id?: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* A static strip of the business's own social photos with a follow link out.
|
|
33
|
-
* Deliberately not a live embed: third-party embed scripts are heavy,
|
|
34
|
-
* render-blocking, and break silently on static exports. Photos ship as local
|
|
35
|
-
* assets; the platform link carries the relationship.
|
|
36
|
-
*/
|
|
37
|
-
export function SocialStrip({
|
|
38
|
-
eyebrow,
|
|
39
|
-
title,
|
|
40
|
-
lead,
|
|
41
|
-
handle,
|
|
42
|
-
profileURL,
|
|
43
|
-
photos,
|
|
44
|
-
followLabel,
|
|
45
|
-
surface = "default",
|
|
46
|
-
id,
|
|
47
|
-
}: SocialStripProps) {
|
|
48
|
-
const withBase = useWithBase();
|
|
49
|
-
const sectionClasses = ["section", surface === "alt" && "surface-alt"].filter(Boolean).join(" ");
|
|
50
|
-
return (
|
|
51
|
-
<section className={sectionClasses} id={id}>
|
|
52
|
-
<div className="wrap">
|
|
53
|
-
<SectionHeading eyebrow={eyebrow} title={title} lead={lead} />
|
|
54
|
-
<div className="social-strip">
|
|
55
|
-
{photos.map((photo) =>
|
|
56
|
-
photo.src ? (
|
|
57
|
-
<a
|
|
58
|
-
key={photo.src}
|
|
59
|
-
className="social-tile"
|
|
60
|
-
href={profileURL}
|
|
61
|
-
target="_blank"
|
|
62
|
-
rel="noopener"
|
|
63
|
-
aria-label={photo.alt ? `${photo.alt} (opens ${handle})` : `Opens ${handle}`}
|
|
64
|
-
>
|
|
65
|
-
<img src={withBase(photo.src)} alt={photo.alt ?? ""} loading="lazy" />
|
|
66
|
-
</a>
|
|
67
|
-
) : (
|
|
68
|
-
<div key={photo.placeholder} className="social-tile ph">
|
|
69
|
-
{photo.placeholder ?? "Photo"}
|
|
70
|
-
</div>
|
|
71
|
-
),
|
|
72
|
-
)}
|
|
73
|
-
</div>
|
|
74
|
-
<div className="social-follow">
|
|
75
|
-
<Button href={profileURL} newTab variant="dark">
|
|
76
|
-
<AtSign size={17} aria-hidden />
|
|
77
|
-
{followLabel ?? `Follow ${handle}`}
|
|
78
|
-
</Button>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</section>
|
|
82
|
-
);
|
|
83
|
-
}
|