@tempoxyz/ds 0.3.18 → 0.3.20

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 (311) hide show
  1. package/dist/arsenal/icons/Icon.d.ts +57 -0
  2. package/dist/arsenal/icons/Icon.d.ts.map +1 -0
  3. package/dist/arsenal/icons/Icon.js +117 -0
  4. package/dist/arsenal/icons/Icon.js.map +1 -0
  5. package/dist/arsenal/icons/glyphs.d.ts +5238 -0
  6. package/dist/arsenal/icons/glyphs.d.ts.map +1 -0
  7. package/dist/arsenal/icons/glyphs.js +2888 -0
  8. package/dist/arsenal/icons/glyphs.js.map +1 -0
  9. package/dist/arsenal/icons/index.d.ts +4 -0
  10. package/dist/arsenal/icons/index.d.ts.map +1 -0
  11. package/dist/arsenal/icons/index.js +4 -0
  12. package/dist/arsenal/icons/index.js.map +1 -0
  13. package/dist/docs/AGENTS.md +2 -2
  14. package/dist/docs/arsenal.md +4555 -0
  15. package/dist/docs/marketing.md +7082 -480
  16. package/dist/docs/product/documents.md +17 -1
  17. package/dist/document/Document.d.ts +1 -1
  18. package/dist/document/Document.d.ts.map +1 -1
  19. package/dist/document/Document.js +1 -0
  20. package/dist/document/Document.js.map +1 -1
  21. package/dist/document/document.css +12 -1
  22. package/dist/document/templates/brief.html +3 -3
  23. package/dist/document/templates/essay.html +3 -3
  24. package/dist/document/templates/post.html +3 -3
  25. package/dist/marketing/components/ArticleBody.css +1 -0
  26. package/dist/marketing/components/ArticleBody.d.ts +1013 -0
  27. package/dist/marketing/components/ArticleBody.d.ts.map +1 -0
  28. package/dist/marketing/components/ArticleBody.js +120 -0
  29. package/dist/marketing/components/ArticleBody.js.map +1 -0
  30. package/dist/marketing/components/ArticleBody.js.zyzz.json +1 -0
  31. package/dist/marketing/components/ArticleHero.css +1 -0
  32. package/dist/marketing/components/ArticleHero.d.ts +168 -0
  33. package/dist/marketing/components/ArticleHero.d.ts.map +1 -0
  34. package/dist/marketing/components/ArticleHero.js +74 -0
  35. package/dist/marketing/components/ArticleHero.js.map +1 -0
  36. package/dist/marketing/components/ArticleHero.js.zyzz.json +1 -0
  37. package/dist/marketing/components/ArticleIndex.css +1 -0
  38. package/dist/marketing/components/ArticleIndex.d.ts +164 -0
  39. package/dist/marketing/components/ArticleIndex.d.ts.map +1 -0
  40. package/dist/marketing/components/ArticleIndex.js +100 -0
  41. package/dist/marketing/components/ArticleIndex.js.map +1 -0
  42. package/dist/marketing/components/ArticleIndex.js.zyzz.json +1 -0
  43. package/dist/marketing/components/ArticleRail.css +1 -0
  44. package/dist/marketing/components/ArticleRail.d.ts +105 -0
  45. package/dist/marketing/components/ArticleRail.d.ts.map +1 -0
  46. package/dist/marketing/components/ArticleRail.js +96 -0
  47. package/dist/marketing/components/ArticleRail.js.map +1 -0
  48. package/dist/marketing/components/ArticleRail.js.zyzz.json +1 -0
  49. package/dist/marketing/components/AsideLayout.css +1 -0
  50. package/dist/marketing/components/AsideLayout.d.ts +39 -0
  51. package/dist/marketing/components/AsideLayout.d.ts.map +1 -0
  52. package/dist/marketing/components/AsideLayout.js +24 -0
  53. package/dist/marketing/components/AsideLayout.js.map +1 -0
  54. package/dist/marketing/components/AsideLayout.js.zyzz.json +1 -0
  55. package/dist/marketing/components/Breadcrumbs.css +1 -0
  56. package/dist/marketing/components/Breadcrumbs.d.ts +132 -0
  57. package/dist/marketing/components/Breadcrumbs.d.ts.map +1 -0
  58. package/dist/marketing/components/Breadcrumbs.js +75 -0
  59. package/dist/marketing/components/Breadcrumbs.js.map +1 -0
  60. package/dist/marketing/components/Breadcrumbs.js.zyzz.json +1 -0
  61. package/dist/marketing/components/Button.css +1 -0
  62. package/dist/marketing/components/Button.d.ts +421 -0
  63. package/dist/marketing/components/Button.d.ts.map +1 -0
  64. package/dist/marketing/components/Button.js +87 -0
  65. package/dist/marketing/components/Button.js.map +1 -0
  66. package/dist/marketing/components/Button.js.zyzz.json +1 -0
  67. package/dist/marketing/components/Card.css +1 -0
  68. package/dist/marketing/components/Card.d.ts +563 -0
  69. package/dist/marketing/components/Card.d.ts.map +1 -0
  70. package/dist/marketing/components/Card.js +171 -0
  71. package/dist/marketing/components/Card.js.map +1 -0
  72. package/dist/marketing/components/Card.js.zyzz.json +1 -0
  73. package/dist/marketing/components/Contact.css +1 -0
  74. package/dist/marketing/components/Contact.d.ts +51 -0
  75. package/dist/marketing/components/Contact.d.ts.map +1 -0
  76. package/dist/marketing/components/Contact.js +44 -0
  77. package/dist/marketing/components/Contact.js.map +1 -0
  78. package/dist/marketing/components/Contact.js.zyzz.json +1 -0
  79. package/dist/marketing/components/Cta.css +1 -0
  80. package/dist/marketing/components/Cta.d.ts +138 -0
  81. package/dist/marketing/components/Cta.d.ts.map +1 -0
  82. package/dist/marketing/components/Cta.js +71 -0
  83. package/dist/marketing/components/Cta.js.map +1 -0
  84. package/dist/marketing/components/Cta.js.zyzz.json +1 -0
  85. package/dist/marketing/components/CustomerStoryFeature.css +1 -0
  86. package/dist/marketing/components/CustomerStoryFeature.d.ts +48 -0
  87. package/dist/marketing/components/CustomerStoryFeature.d.ts.map +1 -0
  88. package/dist/marketing/components/CustomerStoryFeature.js +58 -0
  89. package/dist/marketing/components/CustomerStoryFeature.js.map +1 -0
  90. package/dist/marketing/components/CustomerStoryFeature.js.zyzz.json +1 -0
  91. package/dist/marketing/components/Faq.css +1 -0
  92. package/dist/marketing/components/Faq.d.ts +99 -0
  93. package/dist/marketing/components/Faq.d.ts.map +1 -0
  94. package/dist/marketing/components/Faq.js +83 -0
  95. package/dist/marketing/components/Faq.js.map +1 -0
  96. package/dist/marketing/components/Faq.js.zyzz.json +1 -0
  97. package/dist/marketing/components/FeatureAccordion.css +1 -0
  98. package/dist/marketing/components/FeatureAccordion.d.ts +230 -0
  99. package/dist/marketing/components/FeatureAccordion.d.ts.map +1 -0
  100. package/dist/marketing/components/FeatureAccordion.js +117 -0
  101. package/dist/marketing/components/FeatureAccordion.js.map +1 -0
  102. package/dist/marketing/components/FeatureAccordion.js.zyzz.json +1 -0
  103. package/dist/marketing/components/Footer.css +1 -0
  104. package/dist/marketing/components/Footer.d.ts +178 -0
  105. package/dist/marketing/components/Footer.d.ts.map +1 -0
  106. package/dist/marketing/components/Footer.js +109 -0
  107. package/dist/marketing/components/Footer.js.map +1 -0
  108. package/dist/marketing/components/Footer.js.zyzz.json +1 -0
  109. package/dist/marketing/components/Hero.css +1 -0
  110. package/dist/marketing/components/Hero.d.ts +200 -0
  111. package/dist/marketing/components/Hero.d.ts.map +1 -0
  112. package/dist/marketing/components/Hero.js +67 -0
  113. package/dist/marketing/components/Hero.js.map +1 -0
  114. package/dist/marketing/components/Hero.js.zyzz.json +1 -0
  115. package/dist/marketing/components/LeadCapture.css +1 -0
  116. package/dist/marketing/components/LeadCapture.d.ts +102 -0
  117. package/dist/marketing/components/LeadCapture.d.ts.map +1 -0
  118. package/dist/marketing/components/LeadCapture.js +78 -0
  119. package/dist/marketing/components/LeadCapture.js.map +1 -0
  120. package/dist/marketing/components/LeadCapture.js.zyzz.json +1 -0
  121. package/dist/marketing/components/Link.css +1 -0
  122. package/dist/marketing/components/Link.d.ts +342 -0
  123. package/dist/marketing/components/Link.d.ts.map +1 -0
  124. package/dist/marketing/components/Link.js +152 -0
  125. package/dist/marketing/components/Link.js.map +1 -0
  126. package/dist/marketing/components/Link.js.zyzz.json +1 -0
  127. package/dist/marketing/components/Logo.css +1 -0
  128. package/dist/marketing/components/Logo.d.ts +30 -0
  129. package/dist/marketing/components/Logo.d.ts.map +1 -0
  130. package/dist/marketing/components/Logo.js +38 -0
  131. package/dist/marketing/components/Logo.js.map +1 -0
  132. package/dist/marketing/components/Logo.js.zyzz.json +1 -0
  133. package/dist/marketing/components/LogoWall.css +1 -0
  134. package/dist/marketing/components/LogoWall.d.ts +156 -0
  135. package/dist/marketing/components/LogoWall.d.ts.map +1 -0
  136. package/dist/marketing/components/LogoWall.js +41 -0
  137. package/dist/marketing/components/LogoWall.js.map +1 -0
  138. package/dist/marketing/components/LogoWall.js.zyzz.json +1 -0
  139. package/dist/marketing/components/Mark.css +1 -0
  140. package/dist/marketing/components/Mark.d.ts +30 -0
  141. package/dist/marketing/components/Mark.d.ts.map +1 -0
  142. package/dist/marketing/components/Mark.js +38 -0
  143. package/dist/marketing/components/Mark.js.map +1 -0
  144. package/dist/marketing/components/Mark.js.zyzz.json +1 -0
  145. package/dist/marketing/components/Media.css +1 -0
  146. package/dist/marketing/components/Media.d.ts +74 -0
  147. package/dist/marketing/components/Media.d.ts.map +1 -0
  148. package/dist/marketing/components/Media.js +80 -0
  149. package/dist/marketing/components/Media.js.map +1 -0
  150. package/dist/marketing/components/Media.js.zyzz.json +1 -0
  151. package/dist/marketing/components/Nav.css +1 -0
  152. package/dist/marketing/components/Nav.d.ts +303 -0
  153. package/dist/marketing/components/Nav.d.ts.map +1 -0
  154. package/dist/marketing/components/Nav.js +166 -0
  155. package/dist/marketing/components/Nav.js.map +1 -0
  156. package/dist/marketing/components/Nav.js.zyzz.json +1 -0
  157. package/dist/marketing/components/PartnersIndex.css +1 -0
  158. package/dist/marketing/components/PartnersIndex.d.ts +267 -0
  159. package/dist/marketing/components/PartnersIndex.d.ts.map +1 -0
  160. package/dist/marketing/components/PartnersIndex.js +96 -0
  161. package/dist/marketing/components/PartnersIndex.js.map +1 -0
  162. package/dist/marketing/components/PartnersIndex.js.zyzz.json +1 -0
  163. package/dist/marketing/components/QuoteBand.css +1 -0
  164. package/dist/marketing/components/QuoteBand.d.ts +128 -0
  165. package/dist/marketing/components/QuoteBand.d.ts.map +1 -0
  166. package/dist/marketing/components/QuoteBand.js +73 -0
  167. package/dist/marketing/components/QuoteBand.js.map +1 -0
  168. package/dist/marketing/components/QuoteBand.js.zyzz.json +1 -0
  169. package/dist/marketing/components/Section.css +1 -0
  170. package/dist/marketing/components/Section.d.ts +132 -0
  171. package/dist/marketing/components/Section.d.ts.map +1 -0
  172. package/dist/marketing/components/Section.js +33 -0
  173. package/dist/marketing/components/Section.js.map +1 -0
  174. package/dist/marketing/components/Section.js.zyzz.json +1 -0
  175. package/dist/marketing/components/SectionHeading.css +1 -0
  176. package/dist/marketing/components/SectionHeading.d.ts +215 -0
  177. package/dist/marketing/components/SectionHeading.d.ts.map +1 -0
  178. package/dist/marketing/components/SectionHeading.js +48 -0
  179. package/dist/marketing/components/SectionHeading.js.map +1 -0
  180. package/dist/marketing/components/SectionHeading.js.zyzz.json +1 -0
  181. package/dist/marketing/components/Showcase.css +1 -0
  182. package/dist/marketing/components/Showcase.d.ts +269 -0
  183. package/dist/marketing/components/Showcase.d.ts.map +1 -0
  184. package/dist/marketing/components/Showcase.js +67 -0
  185. package/dist/marketing/components/Showcase.js.map +1 -0
  186. package/dist/marketing/components/Showcase.js.zyzz.json +1 -0
  187. package/dist/marketing/components/Stats.css +1 -0
  188. package/dist/marketing/components/Stats.d.ts +133 -0
  189. package/dist/marketing/components/Stats.d.ts.map +1 -0
  190. package/dist/marketing/components/Stats.js +34 -0
  191. package/dist/marketing/components/Stats.js.map +1 -0
  192. package/dist/marketing/components/Stats.js.zyzz.json +1 -0
  193. package/dist/marketing/components/Steps.css +1 -0
  194. package/dist/marketing/components/Steps.d.ts +53 -0
  195. package/dist/marketing/components/Steps.d.ts.map +1 -0
  196. package/dist/marketing/components/Steps.js +78 -0
  197. package/dist/marketing/components/Steps.js.map +1 -0
  198. package/dist/marketing/components/Steps.js.zyzz.json +1 -0
  199. package/dist/marketing/components/SymbolTile.css +1 -0
  200. package/dist/marketing/components/SymbolTile.d.ts +85 -0
  201. package/dist/marketing/components/SymbolTile.d.ts.map +1 -0
  202. package/dist/marketing/components/SymbolTile.js +35 -0
  203. package/dist/marketing/components/SymbolTile.js.map +1 -0
  204. package/dist/marketing/components/SymbolTile.js.zyzz.json +1 -0
  205. package/dist/marketing/components/Tab.css +1 -0
  206. package/dist/marketing/components/Tab.d.ts +280 -0
  207. package/dist/marketing/components/Tab.d.ts.map +1 -0
  208. package/dist/marketing/components/Tab.js +43 -0
  209. package/dist/marketing/components/Tab.js.map +1 -0
  210. package/dist/marketing/components/Tab.js.zyzz.json +1 -0
  211. package/dist/marketing/components/Table.css +1 -0
  212. package/dist/marketing/components/Table.d.ts +157 -0
  213. package/dist/marketing/components/Table.d.ts.map +1 -0
  214. package/dist/marketing/components/Table.js +80 -0
  215. package/dist/marketing/components/Table.js.map +1 -0
  216. package/dist/marketing/components/Table.js.zyzz.json +1 -0
  217. package/dist/marketing/components/Tag.css +1 -0
  218. package/dist/marketing/components/Tag.d.ts +254 -0
  219. package/dist/marketing/components/Tag.d.ts.map +1 -0
  220. package/dist/marketing/components/Tag.js +59 -0
  221. package/dist/marketing/components/Tag.js.map +1 -0
  222. package/dist/marketing/components/Tag.js.zyzz.json +1 -0
  223. package/dist/marketing/components/internal/Links.d.ts +9 -0
  224. package/dist/marketing/components/internal/Links.d.ts.map +1 -0
  225. package/dist/marketing/components/internal/Links.js +15 -0
  226. package/dist/marketing/components/internal/Links.js.map +1 -0
  227. package/dist/marketing/icons/ArrowUpRight.d.ts +6 -0
  228. package/dist/marketing/icons/ArrowUpRight.d.ts.map +1 -0
  229. package/dist/marketing/icons/ArrowUpRight.js +5 -0
  230. package/dist/marketing/icons/ArrowUpRight.js.map +1 -0
  231. package/dist/marketing/icons/Checkmark.d.ts +6 -0
  232. package/dist/marketing/icons/Checkmark.d.ts.map +1 -0
  233. package/dist/marketing/icons/Checkmark.js +5 -0
  234. package/dist/marketing/icons/Checkmark.js.map +1 -0
  235. package/dist/marketing/icons/ChevronRight.d.ts +6 -0
  236. package/dist/marketing/icons/ChevronRight.d.ts.map +1 -0
  237. package/dist/marketing/icons/ChevronRight.js +5 -0
  238. package/dist/marketing/icons/ChevronRight.js.map +1 -0
  239. package/dist/marketing/icons/Link.d.ts +6 -0
  240. package/dist/marketing/icons/Link.d.ts.map +1 -0
  241. package/dist/marketing/icons/Link.js +5 -0
  242. package/dist/marketing/icons/Link.js.map +1 -0
  243. package/dist/marketing/icons/Play.d.ts +6 -0
  244. package/dist/marketing/icons/Play.d.ts.map +1 -0
  245. package/dist/marketing/icons/Play.js +5 -0
  246. package/dist/marketing/icons/Play.js.map +1 -0
  247. package/dist/marketing/icons/Spinner.d.ts +6 -0
  248. package/dist/marketing/icons/Spinner.d.ts.map +1 -0
  249. package/dist/marketing/icons/Spinner.js +5 -0
  250. package/dist/marketing/icons/Spinner.js.map +1 -0
  251. package/dist/marketing/icons/Xmark.d.ts +6 -0
  252. package/dist/marketing/icons/Xmark.d.ts.map +1 -0
  253. package/dist/marketing/icons/Xmark.js +5 -0
  254. package/dist/marketing/icons/Xmark.js.map +1 -0
  255. package/dist/marketing/index.d.ts +34 -1
  256. package/dist/marketing/index.d.ts.map +1 -1
  257. package/dist/marketing/index.js +34 -1
  258. package/dist/marketing/index.js.map +1 -1
  259. package/dist/marketing/index.js.zyzz.json +1 -1
  260. package/package.json +8 -2
  261. package/src/arsenal/icons/CATALOGUE.md +471 -0
  262. package/src/arsenal/icons/CHANGELOG.md +181 -0
  263. package/src/arsenal/icons/Icon.tsx +187 -0
  264. package/src/arsenal/icons/README.md +53 -0
  265. package/src/arsenal/icons/glyphs.ts +2901 -0
  266. package/src/arsenal/icons/index.ts +12 -0
  267. package/src/document/Document.ts +1 -0
  268. package/src/document/document.css +12 -1
  269. package/src/marketing/README.md +13 -1
  270. package/src/marketing/components/ArticleBody.tsx +784 -0
  271. package/src/marketing/components/ArticleHero.tsx +331 -0
  272. package/src/marketing/components/ArticleIndex.tsx +457 -0
  273. package/src/marketing/components/ArticleRail.tsx +384 -0
  274. package/src/marketing/components/AsideLayout.tsx +52 -0
  275. package/src/marketing/components/Breadcrumbs.tsx +197 -0
  276. package/src/marketing/components/Button.tsx +469 -0
  277. package/src/marketing/components/Card.tsx +865 -0
  278. package/src/marketing/components/Contact.tsx +157 -0
  279. package/src/marketing/components/Cta.tsx +297 -0
  280. package/src/marketing/components/CustomerStoryFeature.tsx +218 -0
  281. package/src/marketing/components/Faq.tsx +334 -0
  282. package/src/marketing/components/FeatureAccordion.tsx +459 -0
  283. package/src/marketing/components/Footer.tsx +440 -0
  284. package/src/marketing/components/Hero.tsx +275 -0
  285. package/src/marketing/components/LeadCapture.tsx +322 -0
  286. package/src/marketing/components/Link.tsx +508 -0
  287. package/src/marketing/components/Logo.tsx +71 -0
  288. package/src/marketing/components/LogoWall.tsx +185 -0
  289. package/src/marketing/components/Mark.tsx +67 -0
  290. package/src/marketing/components/Media.tsx +275 -0
  291. package/src/marketing/components/Nav.tsx +1030 -0
  292. package/src/marketing/components/PartnersIndex.tsx +448 -0
  293. package/src/marketing/components/QuoteBand.tsx +288 -0
  294. package/src/marketing/components/Section.tsx +110 -0
  295. package/src/marketing/components/SectionHeading.tsx +227 -0
  296. package/src/marketing/components/Showcase.tsx +301 -0
  297. package/src/marketing/components/Stats.tsx +130 -0
  298. package/src/marketing/components/Steps.tsx +215 -0
  299. package/src/marketing/components/SymbolTile.tsx +89 -0
  300. package/src/marketing/components/Tab.tsx +306 -0
  301. package/src/marketing/components/Table.tsx +255 -0
  302. package/src/marketing/components/Tag.tsx +289 -0
  303. package/src/marketing/components/internal/Links.ts +19 -0
  304. package/src/marketing/icons/ArrowUpRight.tsx +25 -0
  305. package/src/marketing/icons/Checkmark.tsx +25 -0
  306. package/src/marketing/icons/ChevronRight.tsx +25 -0
  307. package/src/marketing/icons/Link.tsx +25 -0
  308. package/src/marketing/icons/Play.tsx +25 -0
  309. package/src/marketing/icons/Spinner.tsx +25 -0
  310. package/src/marketing/icons/Xmark.tsx +25 -0
  311. package/src/marketing/index.ts +34 -1
@@ -0,0 +1,440 @@
1
+ /** Renders the site footer: the whole site map, the sign-up and the social and legal links on a black band. @module */
2
+ import { useRender } from '@base-ui/react/use-render'
3
+ import { type ComponentPropsWithRef, type CSSProperties, type ReactNode, useId } from 'react'
4
+ import type * as zyzz from 'zyzz'
5
+ import { style, variants } from '../zyzz.config.js'
6
+ import { Mark } from './Mark.js'
7
+ import * as Links from './internal/Links.js'
8
+
9
+ /**
10
+ * Ends every page with the whole site map on a black band. Renders a `footer` that holds one `nav`
11
+ * named Footer navigation: the Tempo mark that links home, the sign-up, a section of links for each
12
+ * group named by its `h2`, then the social links, the legal links and the language picker.
13
+ *
14
+ * Groups fill lanes left to right: one column on a phone, two lanes from 768px, and four lanes from
15
+ * column 5 of the 12-column grid from 1280px. A group past the lane count stacks under the first
16
+ * lane's groups, the next under the second's, and so on. While the pointer or keyboard focus is on
17
+ * a link, the group headings recede, so the link stands out.
18
+ *
19
+ * - Pass the groups in reading order. Add a new product or solution page to its group's links.
20
+ * - Pass the sign-up form in `newsletter` and the language picker in `language`. The footer lays
21
+ * them out and never posts or routes.
22
+ * - Pass `linkRender` for a router link, such as `<NextLink href="" />`. Every link renders through
23
+ * it with its own `href`.
24
+ * - Use the site navigation for the way into the site's sections from the top, and a `Cta` for a
25
+ * page's own sign-up.
26
+ *
27
+ * @example
28
+ * <Footer
29
+ * groups={[{ links: [{ href: '/earn', label: 'Earn' }], title: 'Products' }]}
30
+ * legal={[{ href: '/privacy-policy', label: 'Privacy policy' }]}
31
+ * socials={[{ href: 'https://x.com/tempo', label: 'X' }]}
32
+ * />
33
+ *
34
+ * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/landmarks/examples/contentinfo.html | WAI-ARIA APG Contentinfo landmark}
35
+ * @see {@link https://www.w3.org/WAI/WCAG22/Understanding/multiple-ways.html | WCAG 2.2 Multiple Ways}
36
+ */
37
+ export function Footer(props: Footer.Props) {
38
+ const {
39
+ className,
40
+ groups,
41
+ homeHref = '/',
42
+ homeLabel = 'Tempo home',
43
+ language,
44
+ legal = [],
45
+ linkRender,
46
+ navigationLabel = 'Footer navigation',
47
+ newsletter,
48
+ socials = [],
49
+ vars,
50
+ ...attributes
51
+ } = props
52
+
53
+ const id = useId()
54
+ const levels = Math.ceil(groups.length / 4)
55
+
56
+ return (
57
+ <footer {...attributes} {...styles.root({ className, style: props.style, vars })}>
58
+ <div {...styles.panel()}>
59
+ <nav
60
+ aria-label={navigationLabel}
61
+ data-footer-map=""
62
+ {...styles.map({
63
+ // From 1280px the sign-up takes the row under the lanes, and the meta links the next.
64
+ style: {
65
+ '--footer-last-row': `${levels + 2}`,
66
+ '--footer-newsletter-row': `${levels + 1}`,
67
+ } as CSSProperties,
68
+ })}
69
+ >
70
+ <FooterLink aria-label={homeLabel} href={homeHref} kind="mark" render={linkRender}>
71
+ <Mark {...styles.markImage()} />
72
+ </FooterLink>
73
+
74
+ {newsletter && <div {...styles.newsletter()}>{newsletter}</div>}
75
+
76
+ {groups.map((group, index) => (
77
+ <section
78
+ aria-labelledby={`${id}-${index}`}
79
+ key={index}
80
+ {...styles.group({ style: placement(index, groups.length) })}
81
+ >
82
+ <h2 id={`${id}-${index}`} {...styles.heading()}>
83
+ {group.title}
84
+ </h2>
85
+ <ul {...styles.links()}>
86
+ {group.links.map((link) => (
87
+ <li key={link.href}>
88
+ <FooterLink href={link.href} kind="list" render={linkRender}>
89
+ {link.label}
90
+ </FooterLink>
91
+ </li>
92
+ ))}
93
+ </ul>
94
+ </section>
95
+ ))}
96
+
97
+ <div {...styles.meta()}>
98
+ {socials.length > 0 && (
99
+ <div {...styles.row()}>
100
+ {socials.map((link) => (
101
+ <FooterLink href={link.href} key={link.href} kind="inline" render={linkRender}>
102
+ {link.label}
103
+ </FooterLink>
104
+ ))}
105
+ </div>
106
+ )}
107
+ {(legal.length > 0 || language) && (
108
+ <div {...styles.legal()}>
109
+ {legal.map((link) => (
110
+ <FooterLink href={link.href} key={link.href} kind="inline" render={linkRender}>
111
+ {link.label}
112
+ </FooterLink>
113
+ ))}
114
+ {language}
115
+ </div>
116
+ )}
117
+ </div>
118
+ </nav>
119
+ </div>
120
+ </footer>
121
+ )
122
+ }
123
+
124
+ export namespace Footer {
125
+ /** One group of the site map, such as Products, with its links. */
126
+ export type Group = {
127
+ /** The group's links, in reading order. */
128
+ links: readonly Link[]
129
+ /** The group's `h2`, which names its section. */
130
+ title: ReactNode
131
+ }
132
+
133
+ /** One link of the footer. */
134
+ export type Link = {
135
+ /** Where the link goes. */
136
+ href: string
137
+ /** The link's text. */
138
+ label: ReactNode
139
+ }
140
+
141
+ export type Props = Omit<ComponentPropsWithRef<'footer'>, 'children'> &
142
+ zyzz.Props.Variants<typeof styles.root> & {
143
+ /** The site map's groups, in reading order. */
144
+ groups: readonly Group[]
145
+ /**
146
+ * Where the mark links.
147
+ * @default '/'
148
+ */
149
+ homeHref?: string | undefined
150
+ /**
151
+ * The name of the mark's link home.
152
+ * @default 'Tempo home'
153
+ */
154
+ homeLabel?: string | undefined
155
+ /** The language picker, after the legal links, such as a menu of this page in each language. */
156
+ language?: ReactNode | undefined
157
+ /** The legal links, such as Privacy policy, before the language picker. */
158
+ legal?: readonly Link[] | undefined
159
+ /** An element every link renders as, such as a router link. Each link sets its own `href`. */
160
+ linkRender?: useRender.ComponentProps<'a'>['render'] | undefined
161
+ /**
162
+ * The name of the footer's navigation landmark.
163
+ * @default 'Footer navigation'
164
+ */
165
+ navigationLabel?: string | undefined
166
+ /** The sign-up form, under the mark below 1280px and under the lanes from 1280px. */
167
+ newsletter?: ReactNode | undefined
168
+ /** The social links, such as LinkedIn and X, at the start of the last row. */
169
+ socials?: readonly Link[] | undefined
170
+ }
171
+ }
172
+
173
+ /** One link of the footer, as an `a` or through the caller's router link. */
174
+ function FooterLink(props: FooterLink.Props) {
175
+ const { kind, render, ...attributes } = props
176
+
177
+ return useRender({
178
+ defaultTagName: 'a',
179
+ props: { ...attributes, ...styles.link({ kind }) },
180
+ render: Links.shared(render),
181
+ })
182
+ }
183
+
184
+ declare namespace FooterLink {
185
+ type Props = ComponentPropsWithRef<'a'> &
186
+ Pick<zyzz.Props.Variants<typeof styles.link>, 'kind'> & {
187
+ render?: useRender.ComponentProps<'a'>['render'] | undefined
188
+ }
189
+ }
190
+
191
+ /**
192
+ * The lane and rows of the group at `index` of `count`, in `lanes` lanes from row `firstRow`. A
193
+ * group past the lane count stacks under its lane's groups at the same level as its neighbors, and
194
+ * each lane's last group spans the rows left, so a group holds a row open only for the group under
195
+ * it.
196
+ */
197
+ function lane(index: number, count: number, lanes: number, firstRow: number) {
198
+ const level = Math.floor(index / lanes)
199
+ const levels = index + lanes >= count ? Math.ceil(count / lanes) - level : 1
200
+
201
+ return { column: index % lanes, row: `${firstRow + level} / span ${levels}` }
202
+ }
203
+
204
+ /**
205
+ * The custom properties that place the group at `index`: two lanes from 768px, under the mark and
206
+ * the sign-up, and four lanes of two columns each from column 5 from 1280px.
207
+ */
208
+ function placement(index: number, count: number) {
209
+ const tablet = lane(index, count, 2, 3)
210
+ const desktop = lane(index, count, 4, 1)
211
+
212
+ return {
213
+ '--footer-desktop-column': `${5 + desktop.column * 2} / span 2`,
214
+ '--footer-desktop-row': desktop.row,
215
+ '--footer-tablet-column': `${tablet.column + 1}`,
216
+ '--footer-tablet-row': tablet.row,
217
+ } as CSSProperties
218
+ }
219
+
220
+ namespace styles {
221
+ export const root = variants(
222
+ {
223
+ base: {
224
+ boxSizing: 'border-box',
225
+ // Centers the 2560px footer on a wider window.
226
+ marginInline: 'auto !custom',
227
+ maxWidth: '2560',
228
+ typography: 'body.b2',
229
+ width: '100% !custom',
230
+ },
231
+ },
232
+ { id: 'tds/marketing/footer' },
233
+ )
234
+
235
+ export const group = style(
236
+ {
237
+ alignSelf: 'start',
238
+ display: 'flex',
239
+ flexDirection: 'column',
240
+ gap: '16',
241
+ overflowWrap: 'anywhere',
242
+ '@media >=768': {
243
+ gridColumn: 'var(--footer-tablet-column) !custom',
244
+ gridRow: 'var(--footer-tablet-row) !custom',
245
+ },
246
+ '@media >=1280': {
247
+ gridColumn: 'var(--footer-desktop-column) !custom',
248
+ gridRow: 'var(--footer-desktop-row) !custom',
249
+ },
250
+ },
251
+ { id: 'tds/marketing/footer/group' },
252
+ )
253
+
254
+ // The headings recede while the pointer or keyboard focus is on a link of the site map, or a menu
255
+ // in it is open: hover in as they dim, hover out as they return.
256
+ export const heading = style(
257
+ {
258
+ color: 'neutral.000',
259
+ margin: '0',
260
+ transitionDuration: 'hoverOut',
261
+ transitionProperty: 'color !custom',
262
+ transitionTimingFunction: 'standard',
263
+ typography: 'body.b2',
264
+ selectors: {
265
+ '[data-footer-map]:has(a:focus-visible, button:focus-visible, [data-popup-open]) &': {
266
+ color: 'inverse.content.secondary',
267
+ transitionDuration: 'hoverIn',
268
+ },
269
+ },
270
+ '@media (hover: hover) and (pointer: fine)': {
271
+ selectors: {
272
+ '[data-footer-map]:has(a:hover, button:hover) &': {
273
+ color: 'inverse.content.secondary',
274
+ transitionDuration: 'hoverIn',
275
+ },
276
+ },
277
+ },
278
+ },
279
+ { id: 'tds/marketing/footer/heading' },
280
+ )
281
+
282
+ export const legal = style(
283
+ { alignItems: 'center', display: 'flex', flexWrap: 'wrap', gap: '24', whiteSpace: 'nowrap' },
284
+ { id: 'tds/marketing/footer/legal' },
285
+ )
286
+
287
+ // Links rest at 60% white and turn white on hover and keyboard focus. A press dims them.
288
+ export const link = variants(
289
+ {
290
+ base: {
291
+ color: 'inverse.content.secondary',
292
+ opacity: 'full',
293
+ outlineColor: 'neutral.000',
294
+ outlineOffset: 'ringInline',
295
+ outlineStyle: 'none',
296
+ outlineWidth: 'ring',
297
+ textDecoration: 'none !custom',
298
+ // At rest is where hover out and a release land.
299
+ transitionDuration: 'hoverOut',
300
+ transitionProperty: 'color, opacity !custom',
301
+ transitionTimingFunction: 'standard',
302
+ selectors: {
303
+ '&:active': { opacity: 'pressSurface', transitionDuration: 'press' },
304
+ '&:focus-visible': {
305
+ color: 'neutral.000',
306
+ outlineStyle: 'solid',
307
+ transitionDuration: 'hoverIn',
308
+ },
309
+ },
310
+ '@media (hover: hover) and (pointer: fine)': {
311
+ selectors: {
312
+ '&:hover:not(:active)': { color: 'neutral.000', transitionDuration: 'hoverIn' },
313
+ },
314
+ },
315
+ '@media (forced-colors: active)': {
316
+ textDecorationLine: 'underline',
317
+ selectors: { '&:focus-visible': { outlineColor: 'Highlight !custom' } },
318
+ },
319
+ },
320
+ defaultVariants: { kind: 'inline' },
321
+ variants: {
322
+ // A link in a social or legal row, in a group's list, or the mark home.
323
+ kind: {
324
+ inline: {},
325
+ list: { display: 'block', paddingBlock: '4', width: 'fit-content !custom' },
326
+ mark: {
327
+ display: 'block',
328
+ gridColumn: '1 / -1 !custom',
329
+ height: '20',
330
+ marginBlockEnd: '64',
331
+ outlineOffset: 'ring',
332
+ width: '20',
333
+ '@media >=1280': {
334
+ gridColumn: '1 / span 2 !custom',
335
+ gridRow: '1 !custom',
336
+ marginBlockEnd: '0',
337
+ },
338
+ // The mark keeps its ink, so its hover is the opacity.
339
+ '@media (hover: hover) and (pointer: fine)': {
340
+ selectors: { '&:hover:not(:active)': { opacity: '0.64 !custom' } },
341
+ },
342
+ '@media (forced-colors: active)': { textDecorationLine: 'none' },
343
+ },
344
+ },
345
+ },
346
+ },
347
+ { id: 'tds/marketing/footer/link' },
348
+ )
349
+
350
+ // Each list link pads 4px above and below, so the list pulls 4px out to keep its edges.
351
+ export const links = style(
352
+ {
353
+ display: 'flex',
354
+ flexDirection: 'column',
355
+ listStyle: 'none !custom',
356
+ marginBlock: '-4px !custom',
357
+ marginInline: '0',
358
+ padding: '0',
359
+ },
360
+ { id: 'tds/marketing/footer/links' },
361
+ )
362
+
363
+ // One column, two lanes from 768px, and the 12-column grid from 1280px.
364
+ export const map = style(
365
+ {
366
+ columnGap: '12',
367
+ display: 'grid',
368
+ gridTemplateColumns: 'minmax(0, 1fr) !custom',
369
+ rowGap: '48',
370
+ '@media >=768': { gridTemplateColumns: 'repeat(2, minmax(0, 1fr)) !custom' },
371
+ '@media >=1280': {
372
+ columnGap: '20',
373
+ gridTemplateColumns: 'repeat(12, minmax(0, 1fr)) !custom',
374
+ },
375
+ },
376
+ { id: 'tds/marketing/footer/map' },
377
+ )
378
+
379
+ // The mark draws black, which the invert turns white. Forced colors drop the invert and draw it
380
+ // in the system text color.
381
+ export const markImage = style(
382
+ {
383
+ display: 'block',
384
+ filter: 'invert(1) !custom',
385
+ height: '20px !custom',
386
+ width: '20px !custom',
387
+ },
388
+ { id: 'tds/marketing/footer/mark-image' },
389
+ )
390
+
391
+ export const meta = style(
392
+ {
393
+ alignItems: 'start',
394
+ color: 'inverse.content.secondary',
395
+ display: 'flex',
396
+ flexDirection: 'column',
397
+ flexWrap: 'wrap',
398
+ gap: '24',
399
+ gridColumn: '1 / -1 !custom',
400
+ paddingBlockStart: '48',
401
+ '@media >=768': { alignItems: 'center', flexDirection: 'row' },
402
+ // With the site map's 48px row gap, 80px under the sign-up.
403
+ '@media >=1280': {
404
+ gridColumn: '5 / -1 !custom',
405
+ gridRow: 'var(--footer-last-row) !custom',
406
+ paddingBlockStart: '32',
407
+ },
408
+ },
409
+ { id: 'tds/marketing/footer/meta' },
410
+ )
411
+
412
+ // Under the mark until 1280px. From there it takes its own row between the lanes and the meta
413
+ // links, in the lanes' columns, 80px from each with the site map's 48px row gap.
414
+ export const newsletter = style(
415
+ {
416
+ gridColumn: '1 / -1 !custom',
417
+ paddingBlockEnd: '32',
418
+ '@media >=768': { gridRow: '2 !custom' },
419
+ '@media >=1280': {
420
+ gridColumn: '5 / -1 !custom',
421
+ gridRow: 'var(--footer-newsletter-row) !custom',
422
+ paddingBlockEnd: '0',
423
+ paddingBlockStart: '32',
424
+ },
425
+ },
426
+ { id: 'tds/marketing/footer/newsletter' },
427
+ )
428
+
429
+ export const panel = style(
430
+ {
431
+ backgroundColor: 'inverse.background.primary',
432
+ color: 'neutral.000',
433
+ padding: '48',
434
+ '@media >=1280': { padding: '80px !custom' },
435
+ },
436
+ { id: 'tds/marketing/footer/panel' },
437
+ )
438
+
439
+ export const row = style({ display: 'flex', gap: '24' }, { id: 'tds/marketing/footer/row' })
440
+ }