@atelic-action/ui 7.2.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.
Files changed (105) hide show
  1. package/README.md +312 -126
  2. package/package.json +14 -10
  3. package/src/app/ErrorFallback.tsx +6 -2
  4. package/src/app/context/AppContext.tsx +10 -1
  5. package/src/app/index.ts +0 -1
  6. package/src/app/layout/AppPage.tsx +36 -7
  7. package/src/app/layout/DesktopRail.tsx +9 -2
  8. package/src/app/layout/MobileMenu.tsx +5 -1
  9. package/src/app/layout/PageError.tsx +6 -3
  10. package/src/app/layout/PageSkeleton.tsx +33 -26
  11. package/src/app/layout/UserMenu.tsx +12 -6
  12. package/src/app/ui/alert.tsx +41 -11
  13. package/src/app/ui/badge.tsx +1 -1
  14. package/src/app/ui/button.tsx +2 -1
  15. package/src/app/ui/command.tsx +86 -21
  16. package/src/app/ui/country-dropdown.tsx +26 -47
  17. package/src/app/ui/form.tsx +46 -7
  18. package/src/app/ui/pagination.tsx +1 -1
  19. package/src/app/ui/progress.tsx +26 -12
  20. package/src/app/ui/search-input.tsx +16 -3
  21. package/src/app/ui/select.tsx +8 -3
  22. package/src/app/ui/slider.tsx +62 -15
  23. package/src/artifact/ArtifactShell.tsx +5 -1
  24. package/src/artifact/ErrorFallback.tsx +8 -1
  25. package/src/artifact/artifactConfig.ts +1 -1
  26. package/src/chrome/BrandLockup.tsx +71 -16
  27. package/src/chrome/ClosingBar.tsx +5 -3
  28. package/src/chrome/ContactDock.tsx +329 -0
  29. package/src/chrome/Footer.tsx +32 -9
  30. package/src/chrome/NavBadge.tsx +8 -0
  31. package/src/chrome/NavMegaPanel.tsx +388 -0
  32. package/src/chrome/SiteHeader.tsx +235 -18
  33. package/src/chrome/SiteMenu.tsx +197 -19
  34. package/src/chrome/SiteShell.tsx +130 -13
  35. package/src/chrome/StickyCTABar.tsx +56 -2
  36. package/src/chrome/brandMark.ts +56 -0
  37. package/src/chrome/icons.ts +58 -0
  38. package/src/chrome/index.ts +16 -0
  39. package/src/chrome/navSections.ts +55 -0
  40. package/src/components/ColumnChart.tsx +27 -2
  41. package/src/components/DataTable.tsx +104 -85
  42. package/src/components/Disclosure.tsx +3 -1
  43. package/src/components/Hint.tsx +3 -24
  44. package/src/components/NotFound.tsx +4 -1
  45. package/src/components/StarRating.tsx +45 -19
  46. package/src/components/ThresholdScale.tsx +36 -26
  47. package/src/email/atoms.tsx +13 -57
  48. package/src/email/frame.tsx +4 -6
  49. package/src/email/index.ts +4 -10
  50. package/src/email/scoreboard.tsx +107 -186
  51. package/src/email/text.ts +30 -0
  52. package/src/email/theme.tsx +76 -9
  53. package/src/hooks/useDismiss.ts +39 -0
  54. package/src/lib/useScrollsSideways.ts +26 -0
  55. package/src/primitives/Button.tsx +2 -0
  56. package/src/primitives/ProseBlocks.tsx +6 -1
  57. package/src/primitives/SectionHeading.tsx +3 -1
  58. package/src/primitives/StarRow.tsx +23 -8
  59. package/src/sections/BlogIndex.tsx +17 -3
  60. package/src/sections/BlogPost.tsx +10 -1
  61. package/src/sections/CTASection.tsx +2 -2
  62. package/src/sections/CalloutPanel.tsx +34 -0
  63. package/src/sections/ComparisonTable.tsx +23 -2
  64. package/src/sections/ContactForm.tsx +61 -17
  65. package/src/sections/FAQBrowser.tsx +11 -2
  66. package/src/sections/FeatureGrid.tsx +6 -2
  67. package/src/sections/FullBleedVideo.tsx +158 -0
  68. package/src/sections/Gallery.tsx +6 -4
  69. package/src/sections/Hero.tsx +63 -39
  70. package/src/sections/JumpRail.tsx +7 -0
  71. package/src/sections/LegalPage.tsx +10 -2
  72. package/src/sections/LinkColumns.tsx +64 -0
  73. package/src/sections/LocationSection.tsx +28 -5
  74. package/src/sections/Locations.tsx +17 -4
  75. package/src/sections/LogoMarquee.tsx +43 -11
  76. package/src/sections/MapEmbed.tsx +13 -9
  77. package/src/sections/PageHero.tsx +16 -2
  78. package/src/sections/ProcessSteps.tsx +27 -4
  79. package/src/sections/ProfileCards.tsx +12 -2
  80. package/src/sections/ProofStrip.tsx +44 -0
  81. package/src/sections/RevealSlider.tsx +28 -7
  82. package/src/sections/ReviewCarousel.tsx +17 -4
  83. package/src/sections/ReviewWall.tsx +2 -2
  84. package/src/sections/SplitSection.tsx +2 -1
  85. package/src/sections/index.ts +15 -6
  86. package/src/sections/siteConfig.ts +66 -3
  87. package/src/styles/app.css +24 -2
  88. package/src/styles/artifact.css +20 -8
  89. package/src/styles/base.css +42 -13
  90. package/src/styles/chrome.css +935 -47
  91. package/src/styles/components.css +104 -65
  92. package/src/styles/defaults.css +137 -0
  93. package/src/styles/gate.css +21 -10
  94. package/src/styles/primitives.css +97 -35
  95. package/src/styles/sections.css +477 -437
  96. package/src/styles/star-rating.css +1 -4
  97. package/src/tokens/palettes.ts +24 -4
  98. package/src/types.ts +212 -2
  99. package/src/app/CardErrorBoundary.tsx +0 -39
  100. package/src/sections/CTABanner.tsx +0 -93
  101. package/src/sections/DeviceShowcase.tsx +0 -39
  102. package/src/sections/MediaBand.tsx +0 -20
  103. package/src/sections/MenuList.tsx +0 -44
  104. package/src/sections/PressQuotes.tsx +0 -51
  105. package/src/sections/SocialStrip.tsx +0 -83
@@ -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";
@@ -8,15 +8,53 @@
8
8
  * render from it, so standing up a new site means writing one of these plus
9
9
  * a theme.css, never touching the components themselves.
10
10
  */
11
- import type { FooterColumn, SiteLink, SocialLink } from "../types";
11
+ import type {
12
+ ContactDockConfig,
13
+ FooterColumn,
14
+ HeaderPhone,
15
+ NavFeature,
16
+ NavPanelSection,
17
+ SiteLink,
18
+ SocialLink,
19
+ } from "../types";
12
20
 
13
21
  export type { SiteLink, SocialLink };
14
22
 
23
+ /**
24
+ * An entry in the site's nav: a page, or a group of pages. An entry with
25
+ * `columns` is a group; the header opens it as a mega menu panel on a
26
+ * desktop and an accordion on a phone, and `to` is the group's own page.
27
+ * The footer's Company column lists only the entries, never a group's links.
28
+ */
15
29
  export interface NavItem {
16
30
  label: string;
17
31
  to: string;
32
+ /**
33
+ * The group's panel, left to right: link columns (a heading over its
34
+ * links), and the picture, icon row, and card sections beside them.
35
+ */
36
+ columns?: NavPanelSection[];
37
+ /** The card beside a group's columns on a desktop. */
38
+ feature?: NavFeature;
39
+ /** The words of a link to `to` set first inside the group, e.g. "All services". */
40
+ allLabel?: string;
18
41
  }
19
42
 
43
+ /**
44
+ * How much room the sections leave above and below themselves, set on the
45
+ * `.atelic-ui` root as `data-density`. `default` is the trades site rhythm
46
+ * (`--section-space` runs 36 to 64px), `comfortable` the roomier one sites
47
+ * had before 8.0.0, approximately (56 to 120px), and `compact` tighter still (24 to
48
+ * 44px). README.md, Density, holds the companion values.
49
+ */
50
+ export type Density = "default" | "comfortable" | "compact";
51
+
52
+ /**
53
+ * The band a section sits on: the page's own `--surface`, or the alternate
54
+ * `--surface-alt`. Every section that takes `surface` takes this one type.
55
+ */
56
+ export type Surface = "default" | "alt";
57
+
20
58
  export interface CTA {
21
59
  label: string;
22
60
  href: string;
@@ -92,7 +130,7 @@ export interface SiteConfig {
92
130
  /**
93
131
  * Canonical URL, no trailing slash, e.g. "https://example.com". For a cut
94
132
  * with a `basePath` it is the full URL including the prefix
95
- * ("https://atwood.atelic.me/proto"), and the build fails if it does not
133
+ * ("https://example.atelic.me/proto"), and the build fails if it does not
96
134
  * end with the base.
97
135
  */
98
136
  url: string;
@@ -119,7 +157,20 @@ export interface SiteConfig {
119
157
  * (e.g. a lowercase brand treatment); `run` appends the trailing fade bar
120
158
  * after the wordmark (the Eyebrow's signature, worn by the brand itself).
121
159
  */
122
- logo: { src?: string; alt: string; tile?: string; wordmark?: string; run?: boolean };
160
+ /**
161
+ * The mark. `onLight` and `onDark` are the brand's own artwork for each
162
+ * surface, drawn as given; `src` alone is a light mark the header tints
163
+ * to ink on a light bar. `wordmark: false` drops the live name beside it.
164
+ */
165
+ logo: {
166
+ src?: string;
167
+ alt: string;
168
+ tile?: string;
169
+ wordmark?: string | false;
170
+ run?: boolean;
171
+ onLight?: string;
172
+ onDark?: string;
173
+ };
123
174
  /** Google Fonts stylesheet URL for the theme's font stack. */
124
175
  fontsHref?: string;
125
176
  nav: NavItem[];
@@ -220,4 +271,16 @@ export interface SiteConfig {
220
271
  };
221
272
  /** Copy for the access-gate login screen (see GateConfig). */
222
273
  gate?: GateConfig;
274
+ /** The section spacing every page wears (see Density). Defaults to `default`. */
275
+ density?: Density;
276
+ /** What the header shows beyond the nav and the CTA. */
277
+ header?: {
278
+ /** Up to two numbers in the bar, each a tel link; the first is the phone's call button. */
279
+ phones?: HeaderPhone[];
280
+ };
281
+ /**
282
+ * The floating Get in Touch launcher. Present, `SiteShell` mounts the
283
+ * dock on every page; absent, there is none.
284
+ */
285
+ contactDock?: ContactDockConfig;
223
286
  }
@@ -42,6 +42,10 @@
42
42
 
43
43
  --color-destructive: hsl(var(--destructive));
44
44
  --color-destructive-foreground: hsl(var(--destructive-foreground));
45
+ /* A destructive fill's hover and press, and destructive words on the
46
+ grey highlight: darker than the fill, never lighter, so white words on
47
+ it and it on the grey both stay above 4.5 to 1. */
48
+ --color-destructive-hover: color-mix(in srgb, hsl(var(--destructive)) 85%, black);
45
49
 
46
50
  --color-muted: hsl(var(--muted));
47
51
  --color-muted-foreground: hsl(var(--muted-foreground));
@@ -86,10 +90,15 @@
86
90
  --secondary: 240 4.8% 95.9%;
87
91
  --secondary-foreground: 240 5.9% 10%;
88
92
  --muted: 240 4.8% 95.9%;
89
- --muted-foreground: 240 3.8% 46.1%;
93
+ /* #6b6b73, a step darker than shadcn's #71717a, so muted words pass
94
+ on the grey highlight too: 4.81 to 1 on --muted and --accent. */
95
+ --muted-foreground: 240 3.6% 43.5%;
90
96
  --accent: 240 4.8% 95.9%;
91
97
  --accent-foreground: 240 5.9% 10%;
92
- --destructive: 0 84.2% 60.2%;
98
+ /* #dc2626 (red 600), not shadcn's #ef4444, whose white words read 3.6
99
+ to 1 and which reads 3.76 as words on a card: 4.63 under the
100
+ foreground, 4.83 on a card, 4.66 on the ground. */
101
+ --destructive: 0 72.2% 50.6%;
93
102
  --destructive-foreground: 0 0% 98%;
94
103
  --border: 240 5.9% 90%;
95
104
  --input: 240 5.9% 90%;
@@ -156,6 +165,19 @@
156
165
  }
157
166
  }
158
167
 
168
+ /* ---- toasts ----
169
+ The provider's toaster is sonner with rich colors, whose light tones read
170
+ 4.25 (success) and 4.34 (error) to 1 at 13px. Its own variables carry the
171
+ words' color; these darken each tone's words to pass on its own tint. One
172
+ element more specific than sonner's rule, so the order the two sheets
173
+ load in does not matter. */
174
+ html [data-sonner-toaster][data-sonner-theme="light"] {
175
+ --success-text: hsl(140, 100%, 24%);
176
+ --info-text: hsl(210, 92%, 40%);
177
+ --warning-text: hsl(31, 92%, 32%);
178
+ --error-text: hsl(360, 100%, 41%);
179
+ }
180
+
159
181
  /* ============================================================
160
182
  AppPage scaffold: ap-*
161
183
  ------------------------------------------------------------
@@ -1,3 +1,4 @@
1
+ @import "./defaults.css";
1
2
  /* The pieces the artifact documents are built from, under src/artifact: the
2
3
  sign off, the shot, and the shell's logo and print rules (the grade chip's
3
4
  rules sit in components.css, since ReportCard wears it there). The
@@ -34,14 +35,23 @@
34
35
  object-fit: cover;
35
36
  flex-shrink: 0;
36
37
  }
38
+ /* The words beside the photograph shrink to the page, and the address
39
+ moves whole to its own line, breaking only when it is longer than the
40
+ column (defaults.css, Long words); nowrap ran a phone sideways. */
41
+ .atelic-ui .op-who > div {
42
+ min-width: 0;
43
+ }
37
44
  .atelic-ui .op-who a {
38
45
  display: inline-flex;
39
46
  align-items: center;
40
47
  gap: 0.3em;
41
- white-space: nowrap;
48
+ max-width: 100%;
49
+ }
50
+ .atelic-ui .op-who a svg {
51
+ flex: none;
42
52
  }
43
53
  .atelic-ui .op-who b {
44
- font-weight: 500;
54
+ font-weight: var(--weight-medium);
45
55
  color: var(--ink);
46
56
  }
47
57
  .atelic-ui .op-sign {
@@ -62,12 +72,14 @@
62
72
  }
63
73
  }
64
74
 
65
- /* The sender's logo is the outlined wordmark, an image wider than the square
66
- slot the shared header cuts for a mark, so it keeps its own width, and the
67
- empty text wordmark beside it takes no room. */
68
- .atelic-ui .nav-logo .mark {
69
- width: auto;
70
- height: 20px;
75
+ /* The sender's logo is the outlined wordmark, an image wider than it is
76
+ tall, which a document's header sets at 20px. The shell sets the token
77
+ rather than the height, so a mark keeps its own ratio, a theme's own
78
+ --brand-mark-height still wins, and a site that imports this sheet for
79
+ its documents keeps its own header's mark size elsewhere. The empty text
80
+ wordmark beside it takes no room. */
81
+ .atelic-ui[data-shell="artifact"] {
82
+ --brand-mark-height: 20px;
71
83
  }
72
84
  .atelic-ui .nav-logo .wordmark:empty {
73
85
  display: none;