@atelic-action/ui 7.2.0 → 8.1.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.
Files changed (131) hide show
  1. package/README.md +439 -132
  2. package/bin/atelic-check-sentry.ts +5 -0
  3. package/dist/gate/middleware.js +15 -1
  4. package/dist/monitoring/server.d.ts +72 -0
  5. package/dist/monitoring/server.js +201 -0
  6. package/dist/vite/index.d.ts +1 -1
  7. package/dist/vite/index.js +1 -1
  8. package/dist/vite/marketing-config.d.ts +28 -1
  9. package/dist/vite/marketing-config.js +62 -0
  10. package/package.json +23 -11
  11. package/src/app/ErrorFallback.tsx +6 -2
  12. package/src/app/context/AppContext.tsx +10 -1
  13. package/src/app/index.ts +0 -1
  14. package/src/app/layout/AppPage.tsx +36 -7
  15. package/src/app/layout/DesktopRail.tsx +15 -6
  16. package/src/app/layout/MobileMenu.tsx +14 -5
  17. package/src/app/layout/MobileTabBar.tsx +3 -2
  18. package/src/app/layout/PageError.tsx +7 -4
  19. package/src/app/layout/PageSkeleton.tsx +33 -26
  20. package/src/app/layout/SectionCards.tsx +7 -2
  21. package/src/app/layout/UserMenu.tsx +13 -7
  22. package/src/app/ui/alert.tsx +42 -12
  23. package/src/app/ui/badge.tsx +1 -1
  24. package/src/app/ui/button.tsx +2 -1
  25. package/src/app/ui/command.tsx +86 -21
  26. package/src/app/ui/country-dropdown.tsx +26 -47
  27. package/src/app/ui/form.tsx +48 -9
  28. package/src/app/ui/pagination.tsx +1 -1
  29. package/src/app/ui/progress.tsx +26 -12
  30. package/src/app/ui/search-input.tsx +16 -3
  31. package/src/app/ui/select.tsx +8 -3
  32. package/src/app/ui/slider.tsx +62 -15
  33. package/src/artifact/AppErrorBoundary.tsx +12 -7
  34. package/src/artifact/ArtifactShell.tsx +5 -1
  35. package/src/artifact/ErrorFallback.tsx +8 -1
  36. package/src/artifact/artifactConfig.ts +1 -1
  37. package/src/chrome/BrandLockup.tsx +102 -17
  38. package/src/chrome/ClosingBar.tsx +5 -3
  39. package/src/chrome/ContactDock.tsx +361 -0
  40. package/src/chrome/Footer.tsx +126 -31
  41. package/src/chrome/NavBadge.tsx +8 -0
  42. package/src/chrome/NavMegaPanel.tsx +399 -0
  43. package/src/chrome/SiteHeader.tsx +268 -23
  44. package/src/chrome/SiteMenu.tsx +200 -19
  45. package/src/chrome/SiteShell.tsx +151 -14
  46. package/src/chrome/StickyCTABar.tsx +60 -2
  47. package/src/chrome/brandMark.ts +56 -0
  48. package/src/chrome/icons.ts +58 -0
  49. package/src/chrome/index.ts +16 -0
  50. package/src/chrome/navSections.ts +55 -0
  51. package/src/components/ColumnChart.tsx +27 -2
  52. package/src/components/DataTable.tsx +104 -85
  53. package/src/components/Disclosure.tsx +3 -1
  54. package/src/components/Hint.tsx +3 -24
  55. package/src/components/NotFound.tsx +7 -3
  56. package/src/components/StarRating.tsx +45 -19
  57. package/src/components/ThresholdScale.tsx +36 -26
  58. package/src/email/atoms.tsx +13 -57
  59. package/src/email/frame.tsx +4 -6
  60. package/src/email/index.ts +4 -10
  61. package/src/email/scoreboard.tsx +107 -186
  62. package/src/email/text.ts +30 -0
  63. package/src/email/theme.tsx +76 -9
  64. package/src/gate/middleware.ts +15 -1
  65. package/src/hooks/useDismiss.ts +39 -0
  66. package/src/lib/emailText.tsx +26 -0
  67. package/src/lib/phoneText.tsx +40 -0
  68. package/src/lib/useScrollsSideways.ts +26 -0
  69. package/src/monitoring/ErrorCatcherScript.tsx +15 -0
  70. package/src/monitoring/catcher.ts +118 -0
  71. package/src/monitoring/index.ts +25 -0
  72. package/src/monitoring/sdk.ts +112 -0
  73. package/src/monitoring/server.ts +244 -0
  74. package/src/monitoring/start.ts +118 -0
  75. package/src/primitives/Button.tsx +5 -1
  76. package/src/primitives/Eyebrow.tsx +6 -2
  77. package/src/primitives/ProseBlocks.tsx +6 -1
  78. package/src/primitives/SectionHeading.tsx +3 -1
  79. package/src/primitives/StarRow.tsx +23 -8
  80. package/src/routing/index.ts +1 -0
  81. package/src/routing/miss.ts +32 -0
  82. package/src/scripts/check-sentry.ts +77 -0
  83. package/src/sections/BlogIndex.tsx +17 -3
  84. package/src/sections/BlogPost.tsx +10 -1
  85. package/src/sections/CTASection.tsx +2 -2
  86. package/src/sections/CalloutPanel.tsx +34 -0
  87. package/src/sections/ComparisonTable.tsx +23 -2
  88. package/src/sections/ContactForm.tsx +61 -17
  89. package/src/sections/FAQBrowser.tsx +11 -2
  90. package/src/sections/FeatureGrid.tsx +6 -2
  91. package/src/sections/FullBleedVideo.tsx +167 -0
  92. package/src/sections/Gallery.tsx +6 -4
  93. package/src/sections/Hero.tsx +70 -39
  94. package/src/sections/JumpRail.tsx +7 -0
  95. package/src/sections/LegalPage.tsx +10 -2
  96. package/src/sections/LinkColumns.tsx +80 -0
  97. package/src/sections/LocationSection.tsx +28 -5
  98. package/src/sections/Locations.tsx +18 -5
  99. package/src/sections/LogoMarquee.tsx +43 -11
  100. package/src/sections/MapEmbed.tsx +13 -9
  101. package/src/sections/PageHero.tsx +16 -2
  102. package/src/sections/ProcessSteps.tsx +27 -4
  103. package/src/sections/ProfileCards.tsx +12 -2
  104. package/src/sections/ProofStrip.tsx +44 -0
  105. package/src/sections/RevealSlider.tsx +28 -7
  106. package/src/sections/ReviewCarousel.tsx +17 -4
  107. package/src/sections/ReviewWall.tsx +2 -2
  108. package/src/sections/SplitSection.tsx +2 -1
  109. package/src/sections/index.ts +15 -6
  110. package/src/sections/siteConfig.ts +101 -8
  111. package/src/styles/app.css +33 -2
  112. package/src/styles/artifact.css +20 -8
  113. package/src/styles/base.css +68 -13
  114. package/src/styles/chrome.css +1134 -56
  115. package/src/styles/components.css +104 -65
  116. package/src/styles/defaults.css +140 -0
  117. package/src/styles/gate.css +21 -10
  118. package/src/styles/primitives.css +108 -39
  119. package/src/styles/sections.css +500 -437
  120. package/src/styles/star-rating.css +1 -4
  121. package/src/tokens/palettes.ts +24 -4
  122. package/src/types.ts +220 -3
  123. package/src/vite/index.ts +4 -0
  124. package/src/vite/marketing-config.ts +81 -1
  125. package/src/app/CardErrorBoundary.tsx +0 -39
  126. package/src/sections/CTABanner.tsx +0 -93
  127. package/src/sections/DeviceShowcase.tsx +0 -39
  128. package/src/sections/MediaBand.tsx +0 -20
  129. package/src/sections/MenuList.tsx +0 -44
  130. package/src/sections/PressQuotes.tsx +0 -51
  131. package/src/sections/SocialStrip.tsx +0 -83
@@ -3,7 +3,7 @@ import { Eyebrow, Lead } from "../primitives";
3
3
  import { Button } from "../primitives/Button";
4
4
  import { HoursTable } from "./HoursTable";
5
5
  import { MapEmbed, type MapEmbedSite } from "./MapEmbed";
6
- import type { SiteConfig } from "./siteConfig";
6
+ import type { SiteConfig, Surface } from "./siteConfig";
7
7
 
8
8
  /** The keys of the site config the section reads; a whole `SiteConfig` passes as it is. */
9
9
  export type LocationSectionSite = MapEmbedSite &
@@ -14,6 +14,13 @@ export interface LocationSectionProps {
14
14
  eyebrow?: string;
15
15
  title: ReactNode;
16
16
  lead?: ReactNode;
17
+ /** The band's background, so adjacent sections never wear the same one. Defaults to the page surface. */
18
+ surface?: Surface;
19
+ /**
20
+ * The level of the section's title; the hours heading sits one below it,
21
+ * so the outline never skips a level. Defaults to 2.
22
+ */
23
+ headingLevel?: 2 | 3 | 4 | 5;
17
24
  }
18
25
 
19
26
  /** Joins service areas into readable prose: "A, B, and C". */
@@ -27,20 +34,36 @@ function areasSentence(areas: string[]): string {
27
34
  * map embed. Identical on every page that uses it — the service areas
28
35
  * render as plain prose (crawlable text) from the site config.
29
36
  */
30
- export function LocationSection({ site, eyebrow = "Find us", title, lead }: LocationSectionProps) {
37
+ export function LocationSection({
38
+ site,
39
+ eyebrow = "Find us",
40
+ title,
41
+ lead,
42
+ surface = "default",
43
+ headingLevel = 2,
44
+ }: LocationSectionProps) {
45
+ const Title = `h${headingLevel}` as const;
31
46
  return (
32
- <section className="section location">
47
+ <section
48
+ className={["section location", surface === "alt" && "surface-alt"].filter(Boolean).join(" ")}
49
+ >
33
50
  <div className="wrap location-grid">
34
51
  <div>
35
52
  <Eyebrow>{eyebrow}</Eyebrow>
36
- <h2>{title}</h2>
53
+ <Title className="location-title">{title}</Title>
37
54
  {lead && <Lead>{lead}</Lead>}
38
55
  {site.serviceAreas.length > 0 && (
39
56
  <p className="loc-areas">Proudly serving {areasSentence(site.serviceAreas)}.</p>
40
57
  )}
41
58
 
42
59
  <div className="loc-block">
43
- <h4>Hours</h4>
60
+ {/* A heading by role, as the footer's column labels are
61
+ (Footer.tsx): a site's own bare heading rules would
62
+ restyle this small mono label. */}
63
+ {/* biome-ignore lint/a11y/useSemanticElements: a heading element would take a site's bare heading rules, see above */}
64
+ <div className="loc-heading" role="heading" aria-level={headingLevel + 1}>
65
+ Hours
66
+ </div>
44
67
  <HoursTable hours={site.hours} clock={site.clock} />
45
68
  </div>
46
69
 
@@ -1,7 +1,9 @@
1
1
  import { Navigation, Phone } from "lucide-react";
2
2
  import type { ReactNode } from "react";
3
+ import { newTabProps } from "../lib/newTabProps";
3
4
  import { Eyebrow, Lead } from "../primitives";
4
5
  import { MapEmbed, type MapEmbedSite } from "./MapEmbed";
6
+ import type { Surface } from "./siteConfig";
5
7
 
6
8
  export interface LocationEntry {
7
9
  name: string;
@@ -22,6 +24,8 @@ export interface LocationsProps {
22
24
  title: ReactNode;
23
25
  lead?: ReactNode;
24
26
  locations: LocationEntry[];
27
+ /** The band's background, so adjacent sections never wear the same one. Defaults to the page surface. */
28
+ surface?: Surface;
25
29
  }
26
30
 
27
31
  /**
@@ -29,13 +33,22 @@ export interface LocationsProps {
29
33
  * cards (address, hours, call, directions). Reusable for any business that
30
34
  * runs more than one address.
31
35
  */
32
- export function Locations({ site, eyebrow = "Find us", title, lead, locations }: LocationsProps) {
36
+ export function Locations({
37
+ site,
38
+ eyebrow = "Find us",
39
+ title,
40
+ lead,
41
+ locations,
42
+ surface = "default",
43
+ }: LocationsProps) {
33
44
  return (
34
- <section className="section locs">
45
+ <section
46
+ className={["section locs", surface === "alt" && "surface-alt"].filter(Boolean).join(" ")}
47
+ >
35
48
  <div className="wrap">
36
49
  <Eyebrow>{eyebrow}</Eyebrow>
37
50
  <h2>{title}</h2>
38
- {lead && <Lead style={{ maxWidth: "58ch" }}>{lead}</Lead>}
51
+ {lead && <Lead>{lead}</Lead>}
39
52
  <div className="locs-layout">
40
53
  <div className="locs-map">
41
54
  <MapEmbed site={site} />
@@ -54,9 +67,9 @@ export function Locations({ site, eyebrow = "Find us", title, lead, locations }:
54
67
  <div className="loc-links">
55
68
  <a href={`tel:${loc.phoneE164}`}>
56
69
  <Phone size={14} aria-hidden />
57
- {loc.phoneDisplay}
70
+ <span className="tel-number">{loc.phoneDisplay}</span>
58
71
  </a>
59
- <a href={loc.mapLink} target="_blank" rel="noopener">
72
+ <a href={loc.mapLink} {...newTabProps(loc.mapLink, true)}>
60
73
  <Navigation size={14} aria-hidden />
61
74
  Directions
62
75
  </a>
@@ -1,27 +1,59 @@
1
+ import { Pause, Play } from "lucide-react";
2
+ import { useState } from "react";
1
3
  import { Chip } from "../primitives/Chip";
2
4
 
3
5
  export interface LogoMarqueeProps {
4
6
  /** Items scrolled across the band (credentials, client names, press). */
5
7
  items: string[];
6
8
  ariaLabel?: string;
9
+ /**
10
+ * What a screen reader calls the control that stops and restarts the
11
+ * row; defaults to "Pause". It is a toggle, pressed while the row is
12
+ * still, so one name serves both ways.
13
+ */
14
+ pauseLabel?: string;
7
15
  }
8
16
 
9
- /** Dark band with an infinitely scrolling row of chips. */
10
- export function LogoMarquee({ items, ariaLabel = "Credentials" }: LogoMarqueeProps) {
11
- // The track is duplicated so the -50% translate loops seamlessly.
12
- const track = [...items, ...items];
17
+ /**
18
+ * Dark band with an infinitely scrolling row of chips. The row is drawn
19
+ * twice so the loop is seamless; the copy is hidden from assistive tech, so
20
+ * each item is read once, and is not drawn at all under reduced motion,
21
+ * where the row stands still and wraps. A quiet control pauses the row
22
+ * (WCAG 2.2.2, moving content that runs past five seconds).
23
+ */
24
+ export function LogoMarquee({
25
+ items,
26
+ ariaLabel = "Credentials",
27
+ pauseLabel = "Pause",
28
+ }: LogoMarqueeProps) {
29
+ const [paused, setPaused] = useState(false);
30
+ const row = (copy: boolean) => (
31
+ <div className="marquee-group" aria-hidden={copy || undefined}>
32
+ {items.map((item, i) => (
33
+ // biome-ignore lint/suspicious/noArrayIndexKey: two items may share a label
34
+ <Chip key={`${item}-${i}`} dot onDark>
35
+ {item}
36
+ </Chip>
37
+ ))}
38
+ </div>
39
+ );
13
40
  return (
14
41
  <section className="creds" aria-label={ariaLabel}>
15
- <div className="marquee">
42
+ <div className="marquee" data-paused={paused || undefined}>
16
43
  <div className="marquee-track">
17
- {track.map((item, i) => (
18
- // biome-ignore lint/suspicious/noArrayIndexKey: intentional duplicates for the loop
19
- <Chip key={`${item}-${i}`} dot onDark>
20
- {item}
21
- </Chip>
22
- ))}
44
+ {row(false)}
45
+ {row(true)}
23
46
  </div>
24
47
  </div>
48
+ <button
49
+ type="button"
50
+ className="marquee-pause"
51
+ aria-label={pauseLabel}
52
+ aria-pressed={paused}
53
+ onClick={() => setPaused((current) => !current)}
54
+ >
55
+ {paused ? <Play size={14} aria-hidden="true" /> : <Pause size={14} aria-hidden="true" />}
56
+ </button>
25
57
  </section>
26
58
  );
27
59
  }
@@ -1,5 +1,6 @@
1
1
  import { MapPin, Navigation } from "lucide-react";
2
2
  import { useState } from "react";
3
+ import { newTabProps } from "../lib/newTabProps";
3
4
  import { useWithBase } from "../routing/BasePathProvider";
4
5
  import type { SiteConfig } from "./siteConfig";
5
6
 
@@ -27,14 +28,20 @@ export function MapEmbed({ site }: MapEmbedProps) {
27
28
  const address = `${site.address.street}, ${site.address.locality} ${site.address.region} ${site.address.postalCode}`;
28
29
 
29
30
  if (site.mapImage) {
31
+ const image = (
32
+ <img src={withBase(site.mapImage)} alt={`Map to ${site.name}, ${address}`} loading="lazy" />
33
+ );
34
+ // With nowhere to send a reader, the screenshot is a plain picture:
35
+ // a link to "#" would only jump to the top of the page.
36
+ if (!site.mapLinkURL) return <div className="map-frame map-static">{image}</div>;
30
37
  return (
31
38
  <a
32
39
  className="map-frame map-static"
33
- href={site.mapLinkURL ?? "#"}
34
- {...(site.mapLinkURL ? { target: "_blank", rel: "noopener" } : {})}
40
+ href={site.mapLinkURL}
41
+ {...newTabProps(site.mapLinkURL, true)}
35
42
  aria-label={`Get directions to ${site.name}, ${address}`}
36
43
  >
37
- <img src={withBase(site.mapImage)} alt={`Map to ${site.name}, ${address}`} loading="lazy" />
44
+ {image}
38
45
  <span className="map-directions">
39
46
  <Navigation size={15} aria-hidden />
40
47
  Get Directions
@@ -48,12 +55,9 @@ export function MapEmbed({ site }: MapEmbedProps) {
48
55
  if (!loaded) {
49
56
  return (
50
57
  <div className="map-frame">
51
- <button
52
- type="button"
53
- className="map-facade"
54
- onClick={() => setLoaded(true)}
55
- aria-label={`Load the map to ${site.name}, ${address}`}
56
- >
58
+ <button type="button" className="map-facade" onClick={() => setLoaded(true)}>
59
+ {/* Named by its own words, the address and the hint, so a reader
60
+ who presses it by voice says what they see. */}
57
61
  <MapPin size={28} aria-hidden />
58
62
  <span className="map-facade-address">{address}</span>
59
63
  <span className="map-facade-hint">Tap to load the map</span>
@@ -1,5 +1,6 @@
1
1
  import type { ReactNode } from "react";
2
2
  import { Eyebrow, Lead } from "../primitives";
3
+ import type { Surface } from "./siteConfig";
3
4
 
4
5
  export interface PageHeroProps {
5
6
  eyebrow?: string;
@@ -8,12 +9,25 @@ export interface PageHeroProps {
8
9
  center?: boolean;
9
10
  /** Extra content under the lead (e.g. jump-link chips). */
10
11
  children?: ReactNode;
12
+ /** The band's background. Defaults to `alt`, the band an interior page opens on. */
13
+ surface?: Surface;
11
14
  }
12
15
 
13
16
  /** Interior page opener on the alternate surface band. */
14
- export function PageHero({ eyebrow, title, lead, center = false, children }: PageHeroProps) {
17
+ export function PageHero({
18
+ eyebrow,
19
+ title,
20
+ lead,
21
+ center = false,
22
+ children,
23
+ surface = "alt",
24
+ }: PageHeroProps) {
15
25
  return (
16
- <section className={["page-hero", center && "center"].filter(Boolean).join(" ")}>
26
+ <section
27
+ className={["page-hero", center && "center", surface === "default" && "surface-default"]
28
+ .filter(Boolean)
29
+ .join(" ")}
30
+ >
17
31
  <div className="wrap">
18
32
  {eyebrow && <Eyebrow center={center}>{eyebrow}</Eyebrow>}
19
33
  <h1>{title}</h1>
@@ -14,22 +14,45 @@ export interface ProcessStepsProps {
14
14
  image?: { src: string; alt: string };
15
15
  /** Placeholder label rendered in the media frame until a real image exists. */
16
16
  placeholder?: string;
17
+ /** The band's id, so a nav entry or a jump link can land on it. */
18
+ id?: string;
19
+ /**
20
+ * The level of the band's title; each step's title sits one below it, so
21
+ * the outline never skips a level. Defaults to 2, a band on a page whose
22
+ * `h1` is the hero's; a band inside a deeper outline passes its own.
23
+ */
24
+ headingLevel?: 2 | 3 | 4 | 5;
17
25
  }
18
26
 
19
27
  /** Dark band with numbered steps and supporting media. */
20
- export function ProcessSteps({ eyebrow, title, steps, image, placeholder }: ProcessStepsProps) {
28
+ export function ProcessSteps({
29
+ eyebrow,
30
+ title,
31
+ steps,
32
+ image,
33
+ placeholder,
34
+ id,
35
+ headingLevel = 2,
36
+ }: ProcessStepsProps) {
37
+ const Title = `h${headingLevel}` as const;
21
38
  return (
22
- <section className="section process">
39
+ <section className="section process" id={id}>
23
40
  <div className="wrap process-grid">
24
41
  <div>
25
42
  {eyebrow && <Eyebrow onDark>{eyebrow}</Eyebrow>}
26
- <h2>{title}</h2>
43
+ <Title className="process-title">{title}</Title>
27
44
  <ol className="steps">
28
45
  {steps.map((step, i) => (
29
46
  <li key={step.title}>
30
47
  <span className="step-n">{i + 1}</span>
31
48
  <div>
32
- <h4>{step.title}</h4>
49
+ {/* A heading by role, as the footer's column labels are
50
+ (Footer.tsx): a site's own bare heading rules would
51
+ restyle a small label set inside the band. */}
52
+ {/* biome-ignore lint/a11y/useSemanticElements: a heading element would take a site's bare heading rules, see above */}
53
+ <div className="step-title" role="heading" aria-level={headingLevel + 1}>
54
+ {step.title}
55
+ </div>
33
56
  <p>{step.description}</p>
34
57
  </div>
35
58
  </li>
@@ -1,6 +1,7 @@
1
1
  import type { ReactNode } from "react";
2
2
  import { SectionHeading } from "../primitives";
3
3
  import { useWithBase } from "../routing/BasePathProvider";
4
+ import type { Surface } from "./siteConfig";
4
5
 
5
6
  export interface ProfileItem {
6
7
  name: string;
@@ -23,6 +24,8 @@ export interface ProfileCardsProps {
23
24
  title: ReactNode;
24
25
  lead?: ReactNode;
25
26
  items: ProfileItem[];
27
+ /** The band's background, so adjacent sections never wear the same one. Defaults to the page surface. */
28
+ surface?: Surface;
26
29
  }
27
30
 
28
31
  /**
@@ -30,10 +33,17 @@ export interface ProfileCardsProps {
30
33
  * numbering. For rosters and teams where every member carries the same
31
34
  * weight (contrast FeatureGrid, whose numbered cards imply an ordering).
32
35
  */
33
- export function ProfileCards({ id, eyebrow, title, lead, items }: ProfileCardsProps) {
36
+ export function ProfileCards({
37
+ id,
38
+ eyebrow,
39
+ title,
40
+ lead,
41
+ items,
42
+ surface = "default",
43
+ }: ProfileCardsProps) {
34
44
  const withBase = useWithBase();
35
45
  return (
36
- <section className="section" id={id}>
46
+ <section className={surface === "alt" ? "section surface-alt" : "section"} id={id}>
37
47
  <div className="wrap">
38
48
  <SectionHeading eyebrow={eyebrow} title={title} lead={lead} />
39
49
  <ul className="profile-cards">
@@ -0,0 +1,44 @@
1
+ import type { ReactNode } from "react";
2
+ import type { Surface } from "./siteConfig";
3
+
4
+ /** One proof fact: a short figure or claim, and the line that says what it is. */
5
+ export interface ProofItem {
6
+ /** The figure or the claim, e.g. "4.9" with a star row, or "Since 2009". */
7
+ value: ReactNode;
8
+ /** What it is, e.g. "312 Google reviews". */
9
+ label: ReactNode;
10
+ }
11
+
12
+ export interface ProofStripProps {
13
+ items: ProofItem[];
14
+ /** The band's background. Defaults to the page surface. */
15
+ surface?: Surface;
16
+ /** The list's accessible name, e.g. "Why people choose us". Omit for none. */
17
+ ariaLabel?: string;
18
+ id?: string;
19
+ }
20
+
21
+ /**
22
+ * A single row of short proof facts set right under a hero: a figure over
23
+ * its label, as many as fit across, wrapping to a clean grid on a phone.
24
+ * The facts are the business's own and arrive as data; a strip carries no
25
+ * claim of its own.
26
+ */
27
+ export function ProofStrip({ items, surface = "default", ariaLabel, id }: ProofStripProps) {
28
+ return (
29
+ <section
30
+ className={["proof-strip", surface === "alt" && "surface-alt"].filter(Boolean).join(" ")}
31
+ id={id}
32
+ >
33
+ <ul className="wrap proof-strip-list" aria-label={ariaLabel}>
34
+ {items.map((item, i) => (
35
+ // biome-ignore lint/suspicious/noArrayIndexKey: proof facts are static content in a fixed order
36
+ <li key={i}>
37
+ <strong className="proof-strip-value">{item.value}</strong>
38
+ <span className="proof-strip-label">{item.label}</span>
39
+ </li>
40
+ ))}
41
+ </ul>
42
+ </section>
43
+ );
44
+ }
@@ -38,8 +38,27 @@ export interface RevealSliderProps {
38
38
  * than the component's. Name them when the page can be specific.
39
39
  */
40
40
  ariaLabel?: string;
41
+ /**
42
+ * What the handle's position means, as a screen reader hears it, given
43
+ * the whole percent of the frame the before covers. Defaults to each
44
+ * side's share by its corner label ("40% Today, 60% The rebuild"), so it
45
+ * names whatever the page named the halves.
46
+ */
47
+ valueText?: (value: number) => string;
41
48
  }
42
49
 
50
+ /** How far each key moves the divider, in percent of the frame. */
51
+ const SLIDER_KEYS: Record<string, (position: number) => number> = {
52
+ ArrowLeft: (p) => p - 3,
53
+ ArrowDown: (p) => p - 3,
54
+ ArrowRight: (p) => p + 3,
55
+ ArrowUp: (p) => p + 3,
56
+ PageDown: (p) => p - 10,
57
+ PageUp: (p) => p + 10,
58
+ Home: () => 0,
59
+ End: () => 100,
60
+ };
61
+
43
62
  /** One side of the frame: the photograph, or its shot brief until one exists. */
44
63
  function Layer({
45
64
  slide,
@@ -85,6 +104,7 @@ export function RevealSlider({
85
104
  startAt = 50,
86
105
  aspectRatio = "16/10",
87
106
  ariaLabel = "Drag to compare before and after",
107
+ valueText = (value) => `${value}% ${before.label}, ${100 - value}% ${after.label}`,
88
108
  }: RevealSliderProps) {
89
109
  const [pos, setPos] = useState(startAt);
90
110
  const frameRef = useRef<HTMLDivElement>(null);
@@ -109,14 +129,14 @@ export function RevealSlider({
109
129
  const endDrag = () => {
110
130
  dragging.current = false;
111
131
  };
132
+ // The platform's slider keys: the arrows step, Page Up and Page Down
133
+ // take a larger step, and Home and End go to the ends. Up and Right
134
+ // grow the before, Down and Left shrink it.
112
135
  const onKeyDown = (e: KeyboardEvent<HTMLButtonElement>) => {
113
- if (e.key === "ArrowLeft") {
114
- setPos((p) => Math.max(0, p - 3));
115
- e.preventDefault();
116
- } else if (e.key === "ArrowRight") {
117
- setPos((p) => Math.min(100, p + 3));
118
- e.preventDefault();
119
- }
136
+ const step = SLIDER_KEYS[e.key];
137
+ if (!step) return;
138
+ e.preventDefault();
139
+ setPos((p) => Math.max(0, Math.min(100, step(p))));
120
140
  };
121
141
 
122
142
  return (
@@ -143,6 +163,7 @@ export function RevealSlider({
143
163
  aria-valuemin={0}
144
164
  aria-valuemax={100}
145
165
  aria-valuenow={Math.round(pos)}
166
+ aria-valuetext={valueText(Math.round(pos))}
146
167
  onPointerDown={onPointerDown}
147
168
  onKeyDown={onKeyDown}
148
169
  >
@@ -4,6 +4,7 @@ import { newTabProps } from "../lib/newTabProps";
4
4
  import { Eyebrow } from "../primitives";
5
5
  import { StarRow } from "../primitives/StarRow";
6
6
  import type { ReviewItem } from "./ReviewWall";
7
+ import type { Surface } from "./siteConfig";
7
8
 
8
9
  export type { ReviewItem };
9
10
 
@@ -46,6 +47,8 @@ export interface ReviewCarouselProps {
46
47
  ariaLabel?: string;
47
48
  id?: string;
48
49
  className?: string;
50
+ /** The band's background, so adjacent sections never wear the same one. Defaults to the page surface. */
51
+ surface?: Surface;
49
52
  }
50
53
 
51
54
  /**
@@ -93,10 +96,15 @@ export function ReviewCarousel({
93
96
  ariaLabel = "Customer reviews",
94
97
  id,
95
98
  className,
99
+ surface = "default",
96
100
  }: ReviewCarouselProps) {
97
101
  const [rawIndex, setIndex] = useState(0);
98
102
  const count = items.length;
99
103
  const index = Math.min(rawIndex, Math.max(count - 1, 0));
104
+ // The profile link's new tab attributes, worked out once for the link and its name.
105
+ const profileTab: ReturnType<typeof newTabProps> = profileURL
106
+ ? newTabProps(profileURL, true)
107
+ : {};
100
108
 
101
109
  function go(next: number) {
102
110
  if (count === 0) return;
@@ -120,7 +128,9 @@ export function ReviewCarousel({
120
128
 
121
129
  return (
122
130
  <section
123
- className={["section", "review-carousel", className].filter(Boolean).join(" ")}
131
+ className={["section", "review-carousel", surface === "alt" && "surface-alt", className]
132
+ .filter(Boolean)
133
+ .join(" ")}
124
134
  id={id}
125
135
  >
126
136
  <div className="wrap rvc-grid">
@@ -138,9 +148,12 @@ export function ReviewCarousel({
138
148
  <a
139
149
  className="rvc-caption"
140
150
  href={profileURL}
141
- target="_blank"
142
- rel="noopener"
143
- aria-label={`${caption}, opens the review profile in a new tab`}
151
+ {...profileTab}
152
+ aria-label={
153
+ profileTab.target
154
+ ? `${caption}, opens the review profile in a new tab`
155
+ : caption
156
+ }
144
157
  >
145
158
  {caption}
146
159
  <ArrowUpRight size={14} strokeWidth={2} aria-hidden="true" />
@@ -1,5 +1,6 @@
1
1
  import { ArrowUpRight } from "lucide-react";
2
2
  import { type ReactNode, useMemo, useState } from "react";
3
+ import { newTabProps } from "../lib/newTabProps";
3
4
  import { SectionHeading } from "../primitives";
4
5
  import { StarRow } from "../primitives/StarRow";
5
6
 
@@ -77,8 +78,7 @@ function ReviewCard({ item, clampAt }: { item: ReviewItem; clampAt: number }) {
77
78
  <a
78
79
  className="rw-date"
79
80
  href={item.sourceURL}
80
- target="_blank"
81
- rel="noopener"
81
+ {...newTabProps(item.sourceURL, true)}
82
82
  aria-label={`Read the ${item.date} review from ${item.by} at its source`}
83
83
  >
84
84
  {item.date}
@@ -1,4 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
+ import type { Surface } from "./siteConfig";
2
3
 
3
4
  export interface SplitSectionProps {
4
5
  left: ReactNode;
@@ -13,7 +14,7 @@ export interface SplitSectionProps {
13
14
  ratio?: "even" | "narrow-first" | "media";
14
15
  align?: "start" | "center";
15
16
  /** Section background band. */
16
- surface?: "default" | "alt";
17
+ surface?: Surface;
17
18
  /** Compact top padding for sections directly under a page hero. */
18
19
  tightTop?: boolean;
19
20
  /**
@@ -10,6 +10,11 @@ export { type ClockOptions, formatClock, formatHoursRange, isClosed } from "../l
10
10
  export { type EventParams, trackEvent } from "../lib/trackEvent";
11
11
  export { BlogIndex, type BlogIndexItem, type BlogIndexProps } from "./BlogIndex";
12
12
  export { BlogPost, type BlogPostDoc, type BlogPostProps } from "./BlogPost";
13
+ export {
14
+ CalloutPanel,
15
+ type CalloutPanelItem,
16
+ type CalloutPanelProps,
17
+ } from "./CalloutPanel";
13
18
  export {
14
19
  type ComparisonRow,
15
20
  type ComparisonState,
@@ -24,9 +29,7 @@ export {
24
29
  type ContactPhone,
25
30
  } from "./ContactInfoCard";
26
31
  export { type Credential, CredentialList, type CredentialListProps } from "./CredentialList";
27
- export { CTABanner, type CTABannerCTA, type CTABannerProps } from "./CTABanner";
28
32
  export { CTASection, type CTASectionProps } from "./CTASection";
29
- export { type DeviceImage, DeviceShowcase, type DeviceShowcaseProps } from "./DeviceShowcase";
30
33
  export { ExpandList, type ExpandListItem, type ExpandListProps } from "./ExpandList";
31
34
  export {
32
35
  FAQBrowser,
@@ -37,11 +40,18 @@ export {
37
40
  } from "./FAQBrowser";
38
41
  export { FeatureDetail, type FeatureDetailProps } from "./FeatureDetail";
39
42
  export { type FeatureCard, FeatureGrid, type FeatureGridProps } from "./FeatureGrid";
43
+ export { FullBleedVideo, type FullBleedVideoProps } from "./FullBleedVideo";
40
44
  export { Gallery, type GalleryPhoto, type GalleryProps } from "./Gallery";
41
45
  export { Hero, type HeroCTA, type HeroProps, type HeroTrustItem } from "./Hero";
42
46
  export { HoursTable, type HoursTableProps } from "./HoursTable";
43
47
  export { JumpRail, type JumpRailItem, type JumpRailProps } from "./JumpRail";
44
48
  export { type LegalBlock, type LegalDoc, LegalPage, type LegalPageProps } from "./LegalPage";
49
+ export {
50
+ type LinkColumn,
51
+ type LinkColumnLink,
52
+ LinkColumns,
53
+ type LinkColumnsProps,
54
+ } from "./LinkColumns";
45
55
  export {
46
56
  LocationSection,
47
57
  type LocationSectionProps,
@@ -50,23 +60,21 @@ export {
50
60
  export { type LocationEntry, Locations, type LocationsProps } from "./Locations";
51
61
  export { LogoMarquee, type LogoMarqueeProps } from "./LogoMarquee";
52
62
  export { MapEmbed, type MapEmbedProps, type MapEmbedSite } from "./MapEmbed";
53
- export { MediaBand, type MediaBandProps } from "./MediaBand";
54
- export { MenuList, type MenuListItem, type MenuListProps } from "./MenuList";
55
63
  export { PageHero, type PageHeroProps } from "./PageHero";
56
- export { type PressItem, PressQuotes, type PressQuotesProps, sortPress } from "./PressQuotes";
57
64
  export { PricingBand, type PricingBandProps } from "./PricingBand";
58
65
  export { PricingCard, type PricingCardProps } from "./PricingCard";
59
66
  export { type ProcessStep, ProcessSteps, type ProcessStepsProps } from "./ProcessSteps";
60
67
  export { ProfileCards, type ProfileCardsProps, type ProfileItem } from "./ProfileCards";
68
+ export { type ProofItem, ProofStrip, type ProofStripProps } from "./ProofStrip";
61
69
  export { type RevealSlide, RevealSlider, type RevealSliderProps } from "./RevealSlider";
62
70
  export { ReviewCarousel, type ReviewCarouselProps, type ReviewStat } from "./ReviewCarousel";
63
71
  export { type ReviewItem, ReviewWall, type ReviewWallProps } from "./ReviewWall";
64
- export { type SocialPhoto, SocialStrip, type SocialStripProps } from "./SocialStrip";
65
72
  export { SplitSection, type SplitSectionProps } from "./SplitSection";
66
73
  export type {
67
74
  Address,
68
75
  Clock,
69
76
  CTA,
77
+ Density,
70
78
  Founder,
71
79
  GateConfig,
72
80
  NavItem,
@@ -74,4 +82,5 @@ export type {
74
82
  SiteConfig,
75
83
  SiteLink,
76
84
  SocialLink,
85
+ Surface,
77
86
  } from "./siteConfig";