@atelic-action/ui 8.0.0 → 8.2.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 +187 -22
- package/bin/atelic-check-sentry.ts +5 -0
- package/dist/gate/middleware.js +15 -1
- package/dist/monitoring/server.d.ts +122 -0
- package/dist/monitoring/server.js +302 -0
- package/dist/vite/index.d.ts +1 -1
- package/dist/vite/index.js +1 -1
- package/dist/vite/marketing-config.d.ts +28 -1
- package/dist/vite/marketing-config.js +62 -0
- package/package.json +10 -2
- package/src/app/layout/DesktopRail.tsx +6 -4
- package/src/app/layout/MobileMenu.tsx +10 -5
- package/src/app/layout/MobileTabBar.tsx +3 -2
- package/src/app/layout/PageError.tsx +2 -2
- package/src/app/layout/SectionCards.tsx +7 -2
- package/src/app/layout/UserMenu.tsx +1 -1
- package/src/app/ui/alert.tsx +1 -1
- package/src/app/ui/form.tsx +2 -2
- package/src/artifact/AppErrorBoundary.tsx +12 -7
- package/src/chrome/BrandLockup.tsx +46 -7
- package/src/chrome/ContactDock.tsx +59 -13
- package/src/chrome/Footer.tsx +97 -28
- package/src/chrome/NavMegaPanel.tsx +11 -6
- package/src/chrome/SiteHeader.tsx +68 -18
- package/src/chrome/SiteMenu.tsx +207 -72
- package/src/chrome/SiteShell.tsx +25 -3
- package/src/chrome/StickyCTABar.tsx +24 -8
- package/src/chrome/index.ts +2 -0
- package/src/components/NotFound.tsx +3 -2
- package/src/gate/middleware.ts +15 -1
- package/src/lib/emailText.tsx +26 -0
- package/src/lib/phoneText.tsx +49 -0
- package/src/monitoring/ErrorCatcherScript.tsx +26 -0
- package/src/monitoring/catcher.ts +118 -0
- package/src/monitoring/index.ts +25 -0
- package/src/monitoring/sdk.ts +112 -0
- package/src/monitoring/server.ts +368 -0
- package/src/monitoring/start.ts +118 -0
- package/src/primitives/Button.tsx +3 -1
- package/src/primitives/Eyebrow.tsx +6 -2
- package/src/routing/index.ts +11 -32
- package/src/routing/miss.ts +32 -0
- package/src/routing/routerErrors.tsx +57 -0
- package/src/routing/staticNotFound.tsx +64 -0
- package/src/scripts/check-sentry.ts +98 -0
- package/src/sections/CalloutPanel.tsx +4 -1
- package/src/sections/ContactInfoCard.tsx +1 -1
- package/src/sections/FullBleedVideo.tsx +13 -4
- package/src/sections/Hero.tsx +10 -3
- package/src/sections/LinkColumns.tsx +30 -14
- package/src/sections/Locations.tsx +1 -1
- package/src/sections/LogoMarquee.tsx +1 -1
- package/src/sections/PricingBand.tsx +1 -1
- package/src/sections/ProcessSteps.tsx +1 -1
- package/src/sections/siteConfig.ts +67 -5
- package/src/styles/app.css +9 -0
- package/src/styles/base.css +34 -2
- package/src/styles/chrome.css +449 -41
- package/src/styles/defaults.css +61 -2
- package/src/styles/primitives.css +20 -7
- package/src/styles/sections.css +52 -9
- package/src/types.ts +40 -2
- package/src/vite/index.ts +4 -0
- package/src/vite/marketing-config.ts +81 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type ComponentType, createElement, type ReactElement } from "react";
|
|
2
|
+
import { CATCH_ALL_ROUTE_ID, isMiss, type MissMatch } from "./miss";
|
|
3
|
+
|
|
4
|
+
/** What the pending view needs from the site's router, handed in so this entry imports none. */
|
|
5
|
+
export interface StaticNotFoundOptions {
|
|
6
|
+
/**
|
|
7
|
+
* The router's own `useMatches` (`import { useMatches } from
|
|
8
|
+
* "@tanstack/react-router"`). With it, the pending view draws the not
|
|
9
|
+
* found page on a miss alone and nothing on any other route's pending
|
|
10
|
+
* state, so a slow client navigation never flashes a bare 404 body.
|
|
11
|
+
*/
|
|
12
|
+
useMatches: (options: { select: (matches: ReadonlyArray<MissMatch>) => boolean }) => boolean;
|
|
13
|
+
/** The catch all route's id, when it is not `/$`. */
|
|
14
|
+
catchAllId?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The router options that keep a not found page alive on a statically
|
|
19
|
+
* prerendered TanStack Start site. Spread them into createRouter:
|
|
20
|
+
*
|
|
21
|
+
* createRouter({ routeTree, ...staticNotFoundRouting(NotFoundPage, { useMatches }) })
|
|
22
|
+
*
|
|
23
|
+
* The static host serves the /404 prerender for every unknown path, and it
|
|
24
|
+
* takes a catch all route (src/routes/$.tsx rendering the same page) plus
|
|
25
|
+
* these two options to survive hydration:
|
|
26
|
+
*
|
|
27
|
+
* - The splat gives the client a match below the root. With a dedicated
|
|
28
|
+
* /404 route instead, an unknown path matches only the root, hydrate takes
|
|
29
|
+
* its SPA branch, throws, and the page goes blank.
|
|
30
|
+
* - The splat's match id still carries the path, so it differs from the
|
|
31
|
+
* dehydrated /404 match and hydrate renders the pending state first.
|
|
32
|
+
* Pending as the page itself keeps that first render identical to the
|
|
33
|
+
* server HTML; a pending view of plain null is a hydration mismatch (React
|
|
34
|
+
* error 418) and a blank body on every miss.
|
|
35
|
+
*
|
|
36
|
+
* Given the router's `useMatches` (8.2.0), the pending view draws the page
|
|
37
|
+
* on a miss (`isMiss`) and nothing otherwise, so another route's pending
|
|
38
|
+
* state on a slow client navigation shows no bare 404 body. Without it the
|
|
39
|
+
* pending view is the page itself, as before.
|
|
40
|
+
*
|
|
41
|
+
* Static sites only. On a live app the pending state is a real loading
|
|
42
|
+
* moment; an app sets defaultNotFoundComponent alone.
|
|
43
|
+
*
|
|
44
|
+
* Generic over the page so the router checks it against its own component
|
|
45
|
+
* type; the package stays free of any router import.
|
|
46
|
+
*/
|
|
47
|
+
export function staticNotFoundRouting<Page>(page: Page): {
|
|
48
|
+
defaultNotFoundComponent: Page;
|
|
49
|
+
defaultPendingComponent: Page;
|
|
50
|
+
};
|
|
51
|
+
export function staticNotFoundRouting<Page extends ComponentType>(
|
|
52
|
+
page: Page,
|
|
53
|
+
options: StaticNotFoundOptions,
|
|
54
|
+
): { defaultNotFoundComponent: Page; defaultPendingComponent: () => ReactElement | null };
|
|
55
|
+
export function staticNotFoundRouting<Page>(page: Page, options?: StaticNotFoundOptions) {
|
|
56
|
+
if (!options) return { defaultNotFoundComponent: page, defaultPendingComponent: page };
|
|
57
|
+
const { useMatches, catchAllId = CATCH_ALL_ROUTE_ID } = options;
|
|
58
|
+
const select = (matches: ReadonlyArray<MissMatch>) => isMiss(matches, catchAllId);
|
|
59
|
+
function NotFoundPending(): ReactElement | null {
|
|
60
|
+
const miss = useMatches({ select });
|
|
61
|
+
return miss ? createElement(page as ComponentType) : null;
|
|
62
|
+
}
|
|
63
|
+
return { defaultNotFoundComponent: page, defaultPendingComponent: NotFoundPending };
|
|
64
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fails a production deploy that would ship without error reporting. The
|
|
3
|
+
* first step of a marketing site's `bun run build`: on Vercel's production
|
|
4
|
+
* build (`VERCEL_ENV=production`) an empty `VITE_SENTRY_DSN` stops the build,
|
|
5
|
+
* since a site never launches without Sentry. A preview or a local build
|
|
6
|
+
* passes with a one line note. A site with a real reason to launch without
|
|
7
|
+
* it passes `--allow-missing`, which lets the build go on under a loud
|
|
8
|
+
* warning.
|
|
9
|
+
*
|
|
10
|
+
* The DSN is read the way Vite will read it for the build: the environment,
|
|
11
|
+
* then the site's `.env` files for production mode. A DSN that is set but
|
|
12
|
+
* malformed fails every build, since it would send nothing.
|
|
13
|
+
*
|
|
14
|
+
* Usage: atelic-check-sentry [--allow-missing] (from the site's root)
|
|
15
|
+
*/
|
|
16
|
+
import { loadEnv } from "vite";
|
|
17
|
+
import { parseDSN } from "../monitoring/server";
|
|
18
|
+
|
|
19
|
+
export interface SentryCheckInput {
|
|
20
|
+
/** The build's environment, where `VERCEL_ENV` and the DSN are read. */
|
|
21
|
+
env: Record<string, string | undefined>;
|
|
22
|
+
/** The command's arguments. */
|
|
23
|
+
args: readonly string[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface SentryCheckResult {
|
|
27
|
+
/** The exit code: 1 only for a production build with no DSN and no waiver. */
|
|
28
|
+
code: 0 | 1;
|
|
29
|
+
/** What the command prints, one line, or a warning block for a waiver. */
|
|
30
|
+
message: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** The check, kept pure so it can be tested without a build. */
|
|
34
|
+
export function checkSentry({ env, args }: SentryCheckInput): SentryCheckResult {
|
|
35
|
+
const production = env.VERCEL_ENV === "production";
|
|
36
|
+
const raw = env.VITE_SENTRY_DSN ?? "";
|
|
37
|
+
const dsn = raw.trim();
|
|
38
|
+
// A value of whitespace alone is set as far as the site's own checks go
|
|
39
|
+
// (`Boolean(dsn)` mounts the catcher and starts reporting) and sends
|
|
40
|
+
// nothing: it is malformed, on any environment, waiver or not.
|
|
41
|
+
if (raw !== "" && dsn === "") {
|
|
42
|
+
return {
|
|
43
|
+
code: 1,
|
|
44
|
+
message:
|
|
45
|
+
"[sentry] VITE_SENTRY_DSN is set to whitespace alone, which the site treats as set and which is not a DSN. Set it to the DSN, or remove it.",
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
// The build ships the value as it is set, untrimmed, so a DSN with a
|
|
49
|
+
// space or a line break around it is checked as shipped, not as it reads
|
|
50
|
+
// once trimmed: it fails here, on any environment, waiver or not.
|
|
51
|
+
if (dsn && raw !== dsn) {
|
|
52
|
+
return {
|
|
53
|
+
code: 1,
|
|
54
|
+
message:
|
|
55
|
+
"[sentry] VITE_SENTRY_DSN has a space or a line break around it, which the build would ship as it is. Set it again with nothing around the DSN.",
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
// A DSN that is set but cannot be read sends nothing, whatever the build:
|
|
59
|
+
// it fails here, on any environment, waiver or not.
|
|
60
|
+
if (dsn && !parseDSN(dsn)) {
|
|
61
|
+
return {
|
|
62
|
+
code: 1,
|
|
63
|
+
message:
|
|
64
|
+
"[sentry] VITE_SENTRY_DSN is set but is not a DSN (https://<key>@<host>/<project>). Copy it again from the Sentry project's Client Keys.",
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
if (dsn) return { code: 0, message: "[sentry] VITE_SENTRY_DSN is set; errors will be reported." };
|
|
68
|
+
if (!production) {
|
|
69
|
+
return {
|
|
70
|
+
code: 0,
|
|
71
|
+
message: `[sentry] no VITE_SENTRY_DSN on this ${env.VERCEL_ENV ?? "local"} build; errors are not reported, which only a production deploy forbids.`,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
if (args.includes("--allow-missing")) {
|
|
75
|
+
return {
|
|
76
|
+
code: 0,
|
|
77
|
+
message: [
|
|
78
|
+
"[sentry] ************************************************************",
|
|
79
|
+
"[sentry] WARNING: this PRODUCTION build has no VITE_SENTRY_DSN and ships with --allow-missing.",
|
|
80
|
+
"[sentry] Nothing that breaks on this site will be reported. Set the DSN on the Vercel project.",
|
|
81
|
+
].join("\n"),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
code: 1,
|
|
86
|
+
message:
|
|
87
|
+
"[sentry] this production build has no VITE_SENTRY_DSN. Set it on the Vercel project (README, Error Reporting), or pass --allow-missing for a site with a real reason to launch without Sentry.",
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** The command: checks the build in the working directory and exits with the result. */
|
|
92
|
+
export function main(args: readonly string[] = process.argv.slice(2)): void {
|
|
93
|
+
const env = { ...loadEnv("production", process.cwd(), "VITE_"), ...process.env };
|
|
94
|
+
const result = checkSentry({ env, args });
|
|
95
|
+
if (result.code === 0) console.log(result.message);
|
|
96
|
+
else console.error(result.message);
|
|
97
|
+
process.exit(result.code);
|
|
98
|
+
}
|
|
@@ -21,7 +21,10 @@ export interface CalloutPanelProps {
|
|
|
21
21
|
*/
|
|
22
22
|
export function CalloutPanel({ items, className }: CalloutPanelProps) {
|
|
23
23
|
return (
|
|
24
|
-
<ul
|
|
24
|
+
<ul
|
|
25
|
+
className={["callout-panel", "on-primary", className].filter(Boolean).join(" ")}
|
|
26
|
+
data-ground="primary"
|
|
27
|
+
>
|
|
25
28
|
{items.map((item, i) => (
|
|
26
29
|
// biome-ignore lint/suspicious/noArrayIndexKey: callouts are static content in a fixed order
|
|
27
30
|
<li key={i}>
|
|
@@ -40,7 +40,7 @@ export function ContactInfoCard({
|
|
|
40
40
|
const withBase = useWithBase();
|
|
41
41
|
const portal = site.footerLinks?.find((link) => link.label.toLowerCase().includes("portal"));
|
|
42
42
|
return (
|
|
43
|
-
<div className="contact-info-card">
|
|
43
|
+
<div className="contact-info-card" data-ground="dark">
|
|
44
44
|
<h3>{title}</h3>
|
|
45
45
|
<div className="ci-rows">
|
|
46
46
|
{phones?.length
|
|
@@ -11,7 +11,11 @@ export interface FullBleedVideoProps {
|
|
|
11
11
|
poster?: string;
|
|
12
12
|
/** What the video shows, for a screen reader. Site copy, so it always comes in as a prop. */
|
|
13
13
|
label: string;
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* A shot brief rendered as a labeled block until the first frame exists.
|
|
16
|
+
* Given without a `poster`, it says the footage does not exist yet, so the
|
|
17
|
+
* band draws the brief alone and never requests `src`.
|
|
18
|
+
*/
|
|
15
19
|
placeholder?: string;
|
|
16
20
|
/** The band's height, any CSS length. Defaults to clamp(260px, 42vw, 560px). */
|
|
17
21
|
height?: string;
|
|
@@ -60,10 +64,15 @@ export function FullBleedVideo({
|
|
|
60
64
|
// A pause the reader asked for holds until they ask to play again.
|
|
61
65
|
const [held, setHeld] = useState(false);
|
|
62
66
|
|
|
67
|
+
// A brief with no first frame is a band whose footage is not shot yet:
|
|
68
|
+
// there is no clip to fetch, so the video never mounts.
|
|
69
|
+
const footage = src !== "" && (poster !== undefined || placeholder === undefined);
|
|
70
|
+
|
|
63
71
|
useEffect(() => {
|
|
72
|
+
if (!footage) return;
|
|
64
73
|
if (window.matchMedia?.("(prefers-reduced-motion: reduce)").matches) return;
|
|
65
74
|
setLoad(true);
|
|
66
|
-
}, []);
|
|
75
|
+
}, [footage]);
|
|
67
76
|
|
|
68
77
|
useEffect(() => {
|
|
69
78
|
const band = bandRef.current;
|
|
@@ -127,7 +136,7 @@ export function FullBleedVideo({
|
|
|
127
136
|
{placeholder ?? label}
|
|
128
137
|
</div>
|
|
129
138
|
)}
|
|
130
|
-
{load && near && (
|
|
139
|
+
{footage && load && near && (
|
|
131
140
|
<video
|
|
132
141
|
ref={ref}
|
|
133
142
|
className={["fbv-video", playing && "is-on"].filter(Boolean).join(" ")}
|
|
@@ -143,7 +152,7 @@ export function FullBleedVideo({
|
|
|
143
152
|
<source src={withBase(src)} type={type} />
|
|
144
153
|
</video>
|
|
145
154
|
)}
|
|
146
|
-
{controls && load && near && (
|
|
155
|
+
{controls && footage && load && near && (
|
|
147
156
|
<button
|
|
148
157
|
type="button"
|
|
149
158
|
className="fbv-toggle"
|
package/src/sections/Hero.tsx
CHANGED
|
@@ -16,6 +16,8 @@ export interface HeroTrustItem {
|
|
|
16
16
|
|
|
17
17
|
export interface HeroProps {
|
|
18
18
|
eyebrow?: string;
|
|
19
|
+
/** Draws the eyebrow's trailing rule. Defaults to true; false sets the kicker alone. */
|
|
20
|
+
eyebrowRule?: boolean;
|
|
19
21
|
/** Headline; use <em className="serif"> spans for the serif accent. */
|
|
20
22
|
title: ReactNode;
|
|
21
23
|
subtitle?: ReactNode;
|
|
@@ -48,6 +50,7 @@ export interface HeroProps {
|
|
|
48
50
|
/** Full-bleed image hero with scrim, headline, CTA pair, and trust stats. */
|
|
49
51
|
export function Hero({
|
|
50
52
|
eyebrow,
|
|
53
|
+
eyebrowRule = true,
|
|
51
54
|
title,
|
|
52
55
|
subtitle,
|
|
53
56
|
image,
|
|
@@ -66,7 +69,11 @@ export function Hero({
|
|
|
66
69
|
|
|
67
70
|
const copy = (
|
|
68
71
|
<>
|
|
69
|
-
{eyebrow &&
|
|
72
|
+
{eyebrow && (
|
|
73
|
+
<Eyebrow onDark rule={eyebrowRule}>
|
|
74
|
+
{eyebrow}
|
|
75
|
+
</Eyebrow>
|
|
76
|
+
)}
|
|
70
77
|
<h1>{title}</h1>
|
|
71
78
|
{subtitle && <p className="hero-sub">{subtitle}</p>}
|
|
72
79
|
{(primaryCTA || secondaryCTA) && (
|
|
@@ -108,7 +115,7 @@ export function Hero({
|
|
|
108
115
|
|
|
109
116
|
if (layout === "split") {
|
|
110
117
|
return (
|
|
111
|
-
<section className="hero is-split">
|
|
118
|
+
<section className="hero is-split" data-ground="dark">
|
|
112
119
|
<div className="hero-split-copy on-primary">
|
|
113
120
|
<div className="hero-split-inner">{copy}</div>
|
|
114
121
|
</div>
|
|
@@ -118,7 +125,7 @@ export function Hero({
|
|
|
118
125
|
}
|
|
119
126
|
|
|
120
127
|
return (
|
|
121
|
-
<section className="hero">
|
|
128
|
+
<section className="hero" data-ground="dark">
|
|
122
129
|
<div className="hero-media">
|
|
123
130
|
{media}
|
|
124
131
|
<div className="hero-scrim" />
|
|
@@ -5,7 +5,11 @@ import { useWithBase } from "../routing/BasePathProvider";
|
|
|
5
5
|
/** One link in a column, with a figure set right aligned on its line when it has one. */
|
|
6
6
|
export interface LinkColumnLink {
|
|
7
7
|
label: string;
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The row's page. Left out, the row is plain words (its name and its
|
|
10
|
+
* count) with no link, for a page that does not exist yet.
|
|
11
|
+
*/
|
|
12
|
+
href?: string;
|
|
9
13
|
/**
|
|
10
14
|
* A figure the row carries, e.g. a city's count of finished jobs. It sits
|
|
11
15
|
* right aligned on the label's line in tabular numerals, so a column of
|
|
@@ -32,28 +36,40 @@ export interface LinkColumnsProps {
|
|
|
32
36
|
* Columns of links under a section's heading, each column a heading over
|
|
33
37
|
* its links, as many across as fit: a site's service areas by region, or a
|
|
34
38
|
* hub page's children. A link can carry a figure on its own line, right
|
|
35
|
-
* aligned, so a list of cities reads with their counts in one column.
|
|
39
|
+
* aligned, so a list of cities reads with their counts in one column. A
|
|
40
|
+
* row with no `href` is words alone. The least a column narrows to is
|
|
41
|
+
* `--link-columns-min` (170px), so a theme can fit two across a phone.
|
|
36
42
|
*/
|
|
37
43
|
export function LinkColumns({ columns, className }: LinkColumnsProps) {
|
|
38
44
|
const withBase = useWithBase();
|
|
39
45
|
return (
|
|
40
46
|
<div className={["link-columns", className].filter(Boolean).join(" ")}>
|
|
41
|
-
{columns.map((column) => (
|
|
42
|
-
|
|
47
|
+
{columns.map((column, place) => (
|
|
48
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: two columns may share a heading, so the place keeps the key unique; columns never reorder
|
|
49
|
+
<div className="lc-col" key={`${place} ${column.heading}`}>
|
|
43
50
|
<h3 className="lc-head">
|
|
44
51
|
{column.href ? <a href={withBase(column.href)}>{column.heading}</a> : column.heading}
|
|
45
52
|
</h3>
|
|
46
53
|
<ul>
|
|
47
|
-
{column.links.map((link) => (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
{column.links.map((link, at) => (
|
|
55
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: a column may link one page twice, so the place keeps the key unique; links never reorder
|
|
56
|
+
<li key={`${at} ${link.href ?? ""}`}>
|
|
57
|
+
{link.href ? (
|
|
58
|
+
<a
|
|
59
|
+
className="lc-link"
|
|
60
|
+
href={withBase(link.href)}
|
|
61
|
+
{...newTabProps(link.href, link.external)}
|
|
62
|
+
>
|
|
63
|
+
<span className="lc-label">{link.label}</span>
|
|
64
|
+
{link.count != null && <span className="lc-count">{link.count}</span>}
|
|
65
|
+
</a>
|
|
66
|
+
) : (
|
|
67
|
+
// No page yet: the name and its count as words, nothing to follow.
|
|
68
|
+
<span className="lc-link">
|
|
69
|
+
<span className="lc-label">{link.label}</span>
|
|
70
|
+
{link.count != null && <span className="lc-count">{link.count}</span>}
|
|
71
|
+
</span>
|
|
72
|
+
)}
|
|
57
73
|
</li>
|
|
58
74
|
))}
|
|
59
75
|
</ul>
|
|
@@ -67,7 +67,7 @@ export function Locations({
|
|
|
67
67
|
<div className="loc-links">
|
|
68
68
|
<a href={`tel:${loc.phoneE164}`}>
|
|
69
69
|
<Phone size={14} aria-hidden />
|
|
70
|
-
{loc.phoneDisplay}
|
|
70
|
+
<span className="tel-number">{loc.phoneDisplay}</span>
|
|
71
71
|
</a>
|
|
72
72
|
<a href={loc.mapLink} {...newTabProps(loc.mapLink, true)}>
|
|
73
73
|
<Navigation size={14} aria-hidden />
|
|
@@ -38,7 +38,7 @@ export function LogoMarquee({
|
|
|
38
38
|
</div>
|
|
39
39
|
);
|
|
40
40
|
return (
|
|
41
|
-
<section className="creds" aria-label={ariaLabel}>
|
|
41
|
+
<section className="creds" data-ground="dark" aria-label={ariaLabel}>
|
|
42
42
|
<div className="marquee" data-paused={paused || undefined}>
|
|
43
43
|
<div className="marquee-track">
|
|
44
44
|
{row(false)}
|
|
@@ -21,7 +21,7 @@ export interface PricingBandProps {
|
|
|
21
21
|
export function PricingBand({ eyebrow, title, lead, price, unit, detail }: PricingBandProps) {
|
|
22
22
|
const withBase = useWithBase();
|
|
23
23
|
return (
|
|
24
|
-
<section className="price-band">
|
|
24
|
+
<section className="price-band" data-ground="primary">
|
|
25
25
|
<div className="wrap price-inner">
|
|
26
26
|
<div>
|
|
27
27
|
{eyebrow && <Eyebrow onDark>{eyebrow}</Eyebrow>}
|
|
@@ -36,7 +36,7 @@ export function ProcessSteps({
|
|
|
36
36
|
}: ProcessStepsProps) {
|
|
37
37
|
const Title = `h${headingLevel}` as const;
|
|
38
38
|
return (
|
|
39
|
-
<section className="section process" id={id}>
|
|
39
|
+
<section className="section process" data-ground="dark" id={id}>
|
|
40
40
|
<div className="wrap process-grid">
|
|
41
41
|
<div>
|
|
42
42
|
{eyebrow && <Eyebrow onDark>{eyebrow}</Eyebrow>}
|
|
@@ -12,9 +12,11 @@ import type {
|
|
|
12
12
|
ContactDockConfig,
|
|
13
13
|
FooterColumn,
|
|
14
14
|
HeaderPhone,
|
|
15
|
+
MenuBurgerStyle,
|
|
15
16
|
NavFeature,
|
|
16
17
|
NavPanelSection,
|
|
17
18
|
SiteLink,
|
|
19
|
+
SiteMenuSurface,
|
|
18
20
|
SocialLink,
|
|
19
21
|
} from "../types";
|
|
20
22
|
|
|
@@ -60,6 +62,27 @@ export interface CTA {
|
|
|
60
62
|
href: string;
|
|
61
63
|
/** Opens in a new tab with rel="noopener" when true (e.g. a booking portal). */
|
|
62
64
|
external?: boolean;
|
|
65
|
+
/** The header's button carries the arrow the hero's primary button shows. Defaults to false. */
|
|
66
|
+
arrow?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* The phone's sticky bar's own words, when they should differ from
|
|
69
|
+
* `label` (a shorter "Book" where the header says "Book a visit").
|
|
70
|
+
* Defaults to `label`.
|
|
71
|
+
*/
|
|
72
|
+
stickyLabel?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Whether the phone's sticky bar shows from the first paint. Defaults to
|
|
75
|
+
* true on a page without a hero under the bar (`heroNav` off) and false on
|
|
76
|
+
* one with, where it slides in once the page scrolls; a page with a hero
|
|
77
|
+
* under a solid bar sets false to slide it in there too.
|
|
78
|
+
*/
|
|
79
|
+
stickyFromTop?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* The phone menu's own words, when they should differ from `label` (a
|
|
82
|
+
* fuller "Order ahead for Saturday" where the bar says "Order
|
|
83
|
+
* ahead"). Defaults to `label`.
|
|
84
|
+
*/
|
|
85
|
+
menuLabel?: string;
|
|
63
86
|
}
|
|
64
87
|
|
|
65
88
|
/** How opening hours print: "12h" reads "9a to 5p", "24h" reads "09:00 to 17:00". */
|
|
@@ -68,7 +91,7 @@ export type Clock = "12h" | "24h";
|
|
|
68
91
|
export interface OpeningHours {
|
|
69
92
|
/** Row label as displayed, e.g. "Monday" or "Friday to Sunday". */
|
|
70
93
|
label: string;
|
|
71
|
-
/** Compact label for the footer, e.g. "Mon" or "Fri to Sun". */
|
|
94
|
+
/** Compact label for the footer's hours column, e.g. "Mon" or "Fri to Sun". */
|
|
72
95
|
labelShort: string;
|
|
73
96
|
/** schema.org day names covered by this row (empty for closed spans). */
|
|
74
97
|
days: string[];
|
|
@@ -217,14 +240,25 @@ export interface SiteConfig {
|
|
|
217
240
|
attribution?: string;
|
|
218
241
|
/**
|
|
219
242
|
* What the footer needs beyond the fields above. The default footer is a
|
|
220
|
-
* brand column (the logo, the rating
|
|
221
|
-
* `phone`, `email`)
|
|
222
|
-
*
|
|
243
|
+
* brand column (the logo, the rating linked to the Google profile,
|
|
244
|
+
* `address` linked to `mapLinkURL`, `phone`, `email`), the `hours` as a
|
|
245
|
+
* column of their own, and four link columns: Company from `nav`,
|
|
246
|
+
* Resources from `footerLinks`, Social from `socialLinks`, and Legal from
|
|
223
247
|
* `legalLinks`.
|
|
224
248
|
*/
|
|
225
249
|
footer?: {
|
|
226
|
-
/** The Google rating as printed, e.g. "4.8 on Google".
|
|
250
|
+
/** The Google rating as printed, e.g. "4.8 on Google". */
|
|
227
251
|
rating?: string;
|
|
252
|
+
/**
|
|
253
|
+
* Where the rating links, the profile holding the reviews. Defaults to
|
|
254
|
+
* `mapLinkURL`, the business's Google profile, whenever a rating is set.
|
|
255
|
+
*/
|
|
256
|
+
ratingHref?: string;
|
|
257
|
+
/**
|
|
258
|
+
* The rating link's accessible name when it should say more than the
|
|
259
|
+
* rating's words, e.g. "4.8 on Google, opens the Google profile".
|
|
260
|
+
*/
|
|
261
|
+
ratingLabel?: string;
|
|
228
262
|
/** The link columns, named outright, in place of the four the config derives. */
|
|
229
263
|
columns?: FooterColumn[];
|
|
230
264
|
/** The site's own words for the closing bar's right side, in place of the practice's credit. */
|
|
@@ -235,6 +269,12 @@ export interface SiteConfig {
|
|
|
235
269
|
* visit). Defaults to true.
|
|
236
270
|
*/
|
|
237
271
|
showAddress?: boolean;
|
|
272
|
+
/**
|
|
273
|
+
* Set false to keep the hours out of the footer while `hours` still
|
|
274
|
+
* feeds the structured data and the sections that print them. Defaults
|
|
275
|
+
* to true: a site whose config holds hours shows them in its footer.
|
|
276
|
+
*/
|
|
277
|
+
showHours?: boolean;
|
|
238
278
|
};
|
|
239
279
|
ogImage?: string;
|
|
240
280
|
/** Profile URLs for the schema.org sameAs entity graph (socials, listings). */
|
|
@@ -273,6 +313,28 @@ export interface SiteConfig {
|
|
|
273
313
|
gate?: GateConfig;
|
|
274
314
|
/** The section spacing every page wears (see Density). Defaults to `default`. */
|
|
275
315
|
density?: Density;
|
|
316
|
+
/**
|
|
317
|
+
* Words shown beside the burger on a phone, e.g. "Menu", which then also
|
|
318
|
+
* name the button. Absent, the burger stands alone as it always has.
|
|
319
|
+
*/
|
|
320
|
+
menuLabel?: string;
|
|
321
|
+
/** The phone menu (the sheet the burger opens). */
|
|
322
|
+
menu?: {
|
|
323
|
+
/**
|
|
324
|
+
* The sheet's look: `dark` (the default) is the full screen sheet on
|
|
325
|
+
* the dark surface; `light` is the page's ground with the lockup and a
|
|
326
|
+
* round close button across the top, the entries as rows, and the
|
|
327
|
+
* call to action and the header's numbers in a foot on the alternate
|
|
328
|
+
* ground.
|
|
329
|
+
*/
|
|
330
|
+
surface?: SiteMenuSurface;
|
|
331
|
+
/**
|
|
332
|
+
* How the burger is drawn: `labelAfter` sets the lines before the
|
|
333
|
+
* words beside it (`menuLabel`), `outlined` sets it in an outlined
|
|
334
|
+
* pill. Both off by default.
|
|
335
|
+
*/
|
|
336
|
+
burger?: MenuBurgerStyle;
|
|
337
|
+
};
|
|
276
338
|
/** What the header shows beyond the nav and the CTA. */
|
|
277
339
|
header?: {
|
|
278
340
|
/** Up to two numbers in the bar, each a tel link; the first is the phone's call button. */
|
package/src/styles/app.css
CHANGED
|
@@ -46,6 +46,11 @@
|
|
|
46
46
|
grey highlight: darker than the fill, never lighter, so white words on
|
|
47
47
|
it and it on the grey both stay above 4.5 to 1. */
|
|
48
48
|
--color-destructive-hover: color-mix(in srgb, hsl(var(--destructive)) 85%, black);
|
|
49
|
+
/* Destructive words, as against the destructive fill: the light theme's
|
|
50
|
+
one red does both, so it falls back to --destructive, and the dark
|
|
51
|
+
theme, whose fill is too deep to read as words on a dark card, sets its
|
|
52
|
+
own. */
|
|
53
|
+
--color-destructive-ink: hsl(var(--destructive-ink, var(--destructive)));
|
|
49
54
|
|
|
50
55
|
--color-muted: hsl(var(--muted));
|
|
51
56
|
--color-muted-foreground: hsl(var(--muted-foreground));
|
|
@@ -146,6 +151,10 @@
|
|
|
146
151
|
--accent-foreground: 30 8% 95%;
|
|
147
152
|
--destructive: 0 62.8% 30.6%;
|
|
148
153
|
--destructive-foreground: 30 8% 95%;
|
|
154
|
+
/* #f87171 (red 400) for destructive words: the fill above reads 1.79
|
|
155
|
+
to 1 as words on the card; this reads 6.48 on the card and 5.62 on
|
|
156
|
+
the grey highlight. */
|
|
157
|
+
--destructive-ink: 0 90.6% 70.8%;
|
|
149
158
|
--border: 30 5% 18%;
|
|
150
159
|
--input: 30 5% 18%;
|
|
151
160
|
--ring: 30 4.9% 83.9%;
|
package/src/styles/base.css
CHANGED
|
@@ -110,6 +110,40 @@
|
|
|
110
110
|
text-wrap: balance;
|
|
111
111
|
margin: 0;
|
|
112
112
|
}
|
|
113
|
+
/* A brand's headline style, set by tokens rather than a site's rules: the
|
|
114
|
+
page and section headings (h1, h2) take the case, the weight, the
|
|
115
|
+
tracking, and the color a theme sets, each defaulting to the look
|
|
116
|
+
above. The color never reaches a heading on a filled or dark ground,
|
|
117
|
+
which resets it below, nor one a component colors itself (the hero's,
|
|
118
|
+
a dark section heading's). */
|
|
119
|
+
.atelic-ui h1,
|
|
120
|
+
.atelic-ui h2 {
|
|
121
|
+
text-transform: var(--heading-transform);
|
|
122
|
+
font-weight: var(--heading-weight, var(--weight-heavy));
|
|
123
|
+
letter-spacing: var(--heading-tracking);
|
|
124
|
+
color: var(--heading-color);
|
|
125
|
+
}
|
|
126
|
+
/* A ground that is dark or the primary fill says so with data-ground
|
|
127
|
+
("dark" or "primary"), which every such section the package draws
|
|
128
|
+
wears (the heroes, the credentials band, the callout panel, the price
|
|
129
|
+
band, the process band, the contact card), and a site's own dark band
|
|
130
|
+
may wear too; .on-primary and .on-dark say the same. Headings there
|
|
131
|
+
keep the ground's own words. A new section needs only the attribute.
|
|
132
|
+
The second list is those sections' classes, as 8.1.0 matched them, so
|
|
133
|
+
markup carrying a class without the attribute behaves as it did. */
|
|
134
|
+
.atelic-ui :is([data-ground="dark"], [data-ground="primary"], .on-primary, .on-dark),
|
|
135
|
+
.atelic-ui :is(.hero, .creds, .callout-panel, .price-band, .process, .contact-info-card) {
|
|
136
|
+
--heading-color: currentColor;
|
|
137
|
+
}
|
|
138
|
+
/* The smaller headings take the brand's tracking the same way: h3 at
|
|
139
|
+
--subheading-tracking, h4 at two thirds of it, the proportion they
|
|
140
|
+
always had (-0.015em and -0.01em). */
|
|
141
|
+
.atelic-ui h3 {
|
|
142
|
+
letter-spacing: var(--subheading-tracking);
|
|
143
|
+
}
|
|
144
|
+
.atelic-ui h4 {
|
|
145
|
+
letter-spacing: calc(var(--subheading-tracking) * 2 / 3);
|
|
146
|
+
}
|
|
113
147
|
.atelic-ui h1 {
|
|
114
148
|
font-size: clamp(2.6rem, 8vw, 5rem);
|
|
115
149
|
}
|
|
@@ -118,12 +152,10 @@
|
|
|
118
152
|
}
|
|
119
153
|
.atelic-ui h3 {
|
|
120
154
|
font-size: clamp(1.35rem, 3vw, 1.85rem);
|
|
121
|
-
letter-spacing: -0.015em;
|
|
122
155
|
}
|
|
123
156
|
.atelic-ui h4 {
|
|
124
157
|
font-size: 1.15rem;
|
|
125
158
|
font-weight: var(--weight-bold);
|
|
126
|
-
letter-spacing: -0.01em;
|
|
127
159
|
}
|
|
128
160
|
.atelic-ui p {
|
|
129
161
|
text-wrap: pretty;
|