@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,1030 @@
1
+ /** Renders the Marketing site navigation: the bar that leads to the site's sections, with their menus. @module */
2
+ import * as BaseUiDialog from '@base-ui/react/dialog'
3
+ import * as BaseUiNavigationMenu from '@base-ui/react/navigation-menu'
4
+ import { useRender } from '@base-ui/react/use-render'
5
+ import {
6
+ type ComponentPropsWithRef,
7
+ type KeyboardEvent,
8
+ useEffect,
9
+ useId,
10
+ useRef,
11
+ useState,
12
+ } from 'react'
13
+ import type * as zyzz from 'zyzz'
14
+ import { ChevronRight } from '../icons/ChevronRight.js'
15
+ import { style, variants, vars } from '../zyzz.config.js'
16
+ import { Button } from './Button.js'
17
+ import { Logo } from './Logo.js'
18
+ import * as Links from './internal/Links.js'
19
+
20
+ /**
21
+ * A `<header>` holding the site's navigation landmark: the logo that links home, the site's
22
+ * sections, and one closing action, such as Contact. A section with links under it opens them in a
23
+ * menu, built on Base UI NavigationMenu, which opens on hover or press and closes on Escape. Below
24
+ * 1080px the sections fold into Menu, a button that opens them in a dialog that traps focus. The
25
+ * dialog returns focus to Menu on close, and Escape steps back out of a section first.
26
+ *
27
+ * - Render it once, in the site's layout, and set `fixed` there so the bar stays at the top.
28
+ * - List the sections in `links`. A section with `items` opens a menu, A to Z, and one with `href`
29
+ * is a link.
30
+ * - Pass the closing action in `action`. It renders as a `Button` with `layout="navigation"`.
31
+ * - Set `skipTo` to the id of the main content, such as `#main-content`, for the skip link that
32
+ * comes first and shows on keyboard focus.
33
+ * - Pass `render` for router links, such as `<NextLink href="" />`. It renders every link.
34
+ *
35
+ * @example
36
+ * <Nav
37
+ * action={{ href: '/contact', label: 'Contact' }}
38
+ * fixed
39
+ * links={[
40
+ * { items: [{ href: '/earn', label: 'Earn' }], label: 'Products' },
41
+ * { href: '/customer-stories', label: 'Customers' },
42
+ * ]}
43
+ * skipTo="#main-content"
44
+ * />
45
+ *
46
+ * @see {@link https://base-ui.com/react/components/navigation-menu | Base UI Navigation Menu}
47
+ * @see {@link https://base-ui.com/react/components/dialog | Base UI Dialog}
48
+ * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/examples/disclosure-navigation/ | WAI-ARIA APG Disclosure Navigation Menu}
49
+ */
50
+ export function Nav(props: Nav.Props) {
51
+ const {
52
+ action,
53
+ className,
54
+ fixed,
55
+ home = '/',
56
+ links,
57
+ messages,
58
+ render,
59
+ skipTo,
60
+ vars,
61
+ ...attributes
62
+ } = props
63
+
64
+ const text = {
65
+ back: messages?.back ?? 'Back',
66
+ home: messages?.home ?? 'Tempo home',
67
+ label: messages?.label ?? 'Main navigation',
68
+ menu: messages?.menu ?? 'Menu',
69
+ skip: messages?.skip ?? 'Skip to contents',
70
+ submenu: messages?.submenu ?? '{name} submenu',
71
+ }
72
+ const [open, setOpen] = useState(false)
73
+ const [active, setActive] = useState<string | null>(null)
74
+ const navigation = useRef<HTMLElement>(null)
75
+ const bar = useRef<HTMLDivElement>(null)
76
+ const menu = useRef<HTMLButtonElement>(null)
77
+ const close = useRef<HTMLButtonElement>(null)
78
+
79
+ // Crossing 1080px swaps the bar's sections and Menu, so whichever one leaves closes.
80
+ useEffect(() => {
81
+ const media = matchMedia('(min-width: 1080px)')
82
+ const change = () => {
83
+ if (media.matches) setOpen(false)
84
+ else setActive(null)
85
+ }
86
+ media.addEventListener('change', change)
87
+ return () => media.removeEventListener('change', change)
88
+ }, [])
89
+
90
+ const menuLabel = (name: string) => text.submenu.replace('{name}', name)
91
+
92
+ return (
93
+ <header {...attributes} {...styles.root({ className, fixed, style: props.style, vars })}>
94
+ {skipTo !== undefined && (
95
+ <a href={skipTo} {...styles.skip()}>
96
+ {text.skip}
97
+ </a>
98
+ )}
99
+ <nav aria-label={text.label} ref={navigation} {...styles.navigation()}>
100
+ <div inert={open} ref={bar} {...styles.bar({ hidden: open })}>
101
+ <Anchor
102
+ aria-label={text.home}
103
+ href={home}
104
+ onClick={() => setOpen(false)}
105
+ render={render}
106
+ {...styles.home()}
107
+ >
108
+ <Logo height={20} width={90} {...styles.logo()} />
109
+ </Anchor>
110
+ <BaseUiNavigationMenu.NavigationMenu.Root
111
+ closeDelay={200}
112
+ delay={0}
113
+ onValueChange={(value) => setActive(typeof value === 'string' ? value : null)}
114
+ render={<div />}
115
+ value={active}
116
+ {...styles.desktop()}
117
+ >
118
+ <BaseUiNavigationMenu.NavigationMenu.List data-nav-list="" {...styles.list()}>
119
+ {links.map((link) => (
120
+ <BaseUiNavigationMenu.NavigationMenu.Item
121
+ key={link.label}
122
+ value={link.label}
123
+ {...styles.item()}
124
+ >
125
+ {'items' in link ? (
126
+ <>
127
+ <BaseUiNavigationMenu.NavigationMenu.Trigger {...styles.link()}>
128
+ {link.label}
129
+ </BaseUiNavigationMenu.NavigationMenu.Trigger>
130
+ <BaseUiNavigationMenu.NavigationMenu.Content {...styles.content()}>
131
+ <ul {...styles.menuList()}>
132
+ {link.items.map((item) => (
133
+ <li key={item.href}>
134
+ <BaseUiNavigationMenu.NavigationMenu.Link
135
+ closeOnClick
136
+ href={item.href}
137
+ render={<Anchor render={render} />}
138
+ {...styles.menuLink()}
139
+ >
140
+ {item.label}
141
+ </BaseUiNavigationMenu.NavigationMenu.Link>
142
+ </li>
143
+ ))}
144
+ </ul>
145
+ </BaseUiNavigationMenu.NavigationMenu.Content>
146
+ </>
147
+ ) : (
148
+ <BaseUiNavigationMenu.NavigationMenu.Link
149
+ closeOnClick
150
+ href={link.href}
151
+ // A plain section closes an open menu as it takes focus.
152
+ onFocus={() => setActive(null)}
153
+ render={<Anchor render={render} />}
154
+ {...styles.link()}
155
+ >
156
+ {link.label}
157
+ </BaseUiNavigationMenu.NavigationMenu.Link>
158
+ )}
159
+ </BaseUiNavigationMenu.NavigationMenu.Item>
160
+ ))}
161
+ {action !== undefined && (
162
+ <BaseUiNavigationMenu.NavigationMenu.Item {...styles.action()}>
163
+ <BaseUiNavigationMenu.NavigationMenu.Link
164
+ closeOnClick
165
+ href={action.href}
166
+ onFocus={() => setActive(null)}
167
+ render={<Button.Link layout="navigation" render={Links.shared(render)} />}
168
+ >
169
+ {action.label}
170
+ </BaseUiNavigationMenu.NavigationMenu.Link>
171
+ </BaseUiNavigationMenu.NavigationMenu.Item>
172
+ )}
173
+ </BaseUiNavigationMenu.NavigationMenu.List>
174
+ <BaseUiNavigationMenu.NavigationMenu.Portal>
175
+ <BaseUiNavigationMenu.NavigationMenu.Positioner
176
+ align="start"
177
+ anchor={bar}
178
+ collisionAvoidance={{ side: 'none' }}
179
+ sideOffset={8}
180
+ {...styles.positioner()}
181
+ >
182
+ <BaseUiNavigationMenu.NavigationMenu.Popup
183
+ aria-label={active === null ? undefined : menuLabel(active)}
184
+ {...styles.popup()}
185
+ >
186
+ <BaseUiNavigationMenu.NavigationMenu.Viewport {...styles.viewport()} />
187
+ </BaseUiNavigationMenu.NavigationMenu.Popup>
188
+ </BaseUiNavigationMenu.NavigationMenu.Positioner>
189
+ </BaseUiNavigationMenu.NavigationMenu.Portal>
190
+ </BaseUiNavigationMenu.NavigationMenu.Root>
191
+ <BaseUiDialog.Dialog.Root modal="trap-focus" onOpenChange={setOpen} open={open}>
192
+ <BaseUiDialog.Dialog.Trigger ref={menu} {...styles.menuButton()}>
193
+ {/* Stays an X while the open dialog covers it, so closing turns it back. */}
194
+ <MenuIcon open={open} />
195
+ <span {...styles.hidden()}>{text.menu}</span>
196
+ </BaseUiDialog.Dialog.Trigger>
197
+ <BaseUiDialog.Dialog.Portal container={navigation}>
198
+ <BaseUiDialog.Dialog.Popup
199
+ aria-label={text.menu}
200
+ finalFocus={menu}
201
+ initialFocus={close}
202
+ {...styles.dialog()}
203
+ >
204
+ <div {...styles.bar({ open: true })}>
205
+ <Anchor
206
+ aria-label={text.home}
207
+ href={home}
208
+ onClick={() => setOpen(false)}
209
+ render={render}
210
+ {...styles.home()}
211
+ >
212
+ <Logo height={20} width={90} {...styles.logo()} />
213
+ </Anchor>
214
+ <BaseUiDialog.Dialog.Close ref={close} {...styles.menuButton()}>
215
+ <MenuIcon open />
216
+ <span {...styles.hidden()}>{text.menu}</span>
217
+ </BaseUiDialog.Dialog.Close>
218
+ </div>
219
+ <div {...styles.panel()}>
220
+ <Compact
221
+ action={action}
222
+ back={text.back}
223
+ links={links}
224
+ menuLabel={menuLabel}
225
+ onNavigate={() => setOpen(false)}
226
+ render={render}
227
+ />
228
+ </div>
229
+ </BaseUiDialog.Dialog.Popup>
230
+ </BaseUiDialog.Dialog.Portal>
231
+ </BaseUiDialog.Dialog.Root>
232
+ </div>
233
+ </nav>
234
+ </header>
235
+ )
236
+ }
237
+
238
+ export namespace Nav {
239
+ /** A link in the bar or in a menu. */
240
+ export type Link = {
241
+ /** Where the link goes. */
242
+ href: string
243
+ /** The link's text, such as Customers. */
244
+ label: string
245
+ }
246
+
247
+ /** A section that opens a menu of links. */
248
+ export type Menu = {
249
+ /** The menu's links, A to Z. */
250
+ items: readonly Link[]
251
+ /** The section's name, such as Products. */
252
+ label: string
253
+ }
254
+
255
+ /** The navigation's own words, each with an English default. */
256
+ export type Messages = {
257
+ /**
258
+ * The button that steps back out of a section in the folded menu.
259
+ *
260
+ * @default 'Back'
261
+ */
262
+ back?: string | undefined
263
+ /**
264
+ * The name of the logo link.
265
+ *
266
+ * @default 'Tempo home'
267
+ */
268
+ home?: string | undefined
269
+ /**
270
+ * The name of the navigation landmark.
271
+ *
272
+ * @default 'Main navigation'
273
+ */
274
+ label?: string | undefined
275
+ /**
276
+ * The name of the button that folds the sections below 1080px, and of its dialog.
277
+ *
278
+ * @default 'Menu'
279
+ */
280
+ menu?: string | undefined
281
+ /**
282
+ * The skip link's text.
283
+ *
284
+ * @default 'Skip to contents'
285
+ */
286
+ skip?: string | undefined
287
+ /**
288
+ * The name of a section's menu, where `{name}` stands for the section.
289
+ *
290
+ * @default '{name} submenu'
291
+ */
292
+ submenu?: string | undefined
293
+ }
294
+
295
+ export type Props = Omit<ComponentPropsWithRef<'header'>, 'children'> &
296
+ zyzz.Props.Variants<typeof styles.root> & {
297
+ /** The closing action, such as Contact, drawn as a `Button`. Absent by default. */
298
+ action?: Link | undefined
299
+ /**
300
+ * Where the logo links.
301
+ *
302
+ * @default '/'
303
+ */
304
+ home?: string | undefined
305
+ /** The site's sections, in order: a `Menu` for a section with links under it, else a `Link`. */
306
+ links: readonly (Link | Menu)[]
307
+ /** Replaces the navigation's English words. */
308
+ messages?: Messages | undefined
309
+ /** Renders every link, such as `<NextLink href="" />` for client-side routing. */
310
+ render?: useRender.ComponentProps<'a'>['render']
311
+ /** The target of the skip link, such as `#main-content`. Without it there is no skip link. */
312
+ skipTo?: string | undefined
313
+ }
314
+ }
315
+
316
+ /** A link that a caller's `render` can replace, such as with a router link. */
317
+ function Anchor(props: useRender.ComponentProps<'a'>) {
318
+ const { ref, render, ...attributes } = props
319
+
320
+ return useRender({ defaultTagName: 'a', props: attributes, ref, render: Links.shared(render) })
321
+ }
322
+
323
+ /** The folded sections below 1080px, where a section's links replace the list until Back. */
324
+ function Compact(props: {
325
+ action: Nav.Link | undefined
326
+ back: string
327
+ links: readonly (Nav.Link | Nav.Menu)[]
328
+ menuLabel: (name: string) => string
329
+ onNavigate: () => void
330
+ render: useRender.ComponentProps<'a'>['render']
331
+ }) {
332
+ const { action, back, links, menuLabel, onNavigate, render } = props
333
+
334
+ const [selected, setSelected] = useState<Nav.Menu | null>(null)
335
+ const triggers = useRef(new Map<string, HTMLButtonElement>())
336
+ const left = useRef<string | null>(null)
337
+ const backButton = useRef<HTMLButtonElement>(null)
338
+ const id = useId()
339
+
340
+ // Focus moves to Back in a section, and returns to the section's button after it.
341
+ useEffect(() => {
342
+ if (selected) backButton.current?.focus()
343
+ else if (left.current) triggers.current.get(left.current)?.focus()
344
+ }, [selected])
345
+
346
+ function escape(event: KeyboardEvent) {
347
+ if (event.key !== 'Escape' || !selected) return
348
+
349
+ // Escape steps out of the section before it closes the dialog.
350
+ event.preventDefault()
351
+ event.stopPropagation()
352
+ setSelected(null)
353
+ }
354
+
355
+ return (
356
+ // oxlint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- Escape from the links and Back bubbles to the list.
357
+ <ul
358
+ aria-label={selected ? menuLabel(selected.label) : undefined}
359
+ id={id}
360
+ onKeyDown={escape}
361
+ {...styles.compactList()}
362
+ >
363
+ {selected ? (
364
+ <>
365
+ <li>
366
+ <button
367
+ onClick={() => setSelected(null)}
368
+ ref={backButton}
369
+ type="button"
370
+ {...styles.compactLink({ back: true })}
371
+ >
372
+ <ChevronRight {...styles.backIcon()} />
373
+ {back}
374
+ </button>
375
+ </li>
376
+ {selected.items.map((item) => (
377
+ <li key={item.href}>
378
+ <Anchor
379
+ href={item.href}
380
+ onClick={onNavigate}
381
+ render={render}
382
+ {...styles.compactLink()}
383
+ >
384
+ {item.label}
385
+ </Anchor>
386
+ </li>
387
+ ))}
388
+ </>
389
+ ) : (
390
+ <>
391
+ {links.map((link) => (
392
+ <li key={link.label}>
393
+ {'items' in link ? (
394
+ <button
395
+ aria-controls={id}
396
+ aria-expanded={false}
397
+ onClick={() => {
398
+ left.current = link.label
399
+ setSelected(link)
400
+ }}
401
+ ref={(element) => {
402
+ if (element) triggers.current.set(link.label, element)
403
+ else triggers.current.delete(link.label)
404
+ }}
405
+ type="button"
406
+ {...styles.compactLink()}
407
+ >
408
+ {link.label}
409
+ </button>
410
+ ) : (
411
+ <Anchor
412
+ href={link.href}
413
+ onClick={onNavigate}
414
+ render={render}
415
+ {...styles.compactLink()}
416
+ >
417
+ {link.label}
418
+ </Anchor>
419
+ )}
420
+ </li>
421
+ ))}
422
+ {action !== undefined && (
423
+ <li {...styles.compactAction()}>
424
+ <Button.Link
425
+ href={action.href}
426
+ layout="navigation"
427
+ onClick={onNavigate}
428
+ render={Links.shared(render)}
429
+ >
430
+ {action.label}
431
+ </Button.Link>
432
+ </li>
433
+ )}
434
+ </>
435
+ )}
436
+ </ul>
437
+ )
438
+ }
439
+
440
+ /** Two bars that turn into an X. */
441
+ function MenuIcon(props: { open: boolean }) {
442
+ return (
443
+ <svg aria-hidden="true" height="16" viewBox="0 0 16 16" width="16">
444
+ <rect
445
+ fill="currentColor"
446
+ height="1"
447
+ width="12"
448
+ x="2"
449
+ y="4"
450
+ {...styles.iconBar({ turn: props.open ? 'top' : 'none' })}
451
+ />
452
+ <rect
453
+ fill="currentColor"
454
+ height="1"
455
+ width="12"
456
+ x="2"
457
+ y="11"
458
+ {...styles.iconBar({ turn: props.open ? 'bottom' : 'none' })}
459
+ />
460
+ </svg>
461
+ )
462
+ }
463
+
464
+ namespace styles {
465
+ // The action keeps its own width, at the bar's end.
466
+ export const action = style(
467
+ {
468
+ display: 'flex',
469
+ flexBasis: '99px !custom',
470
+ flexGrow: '0 !custom',
471
+ flexShrink: '0 !custom',
472
+ justifyContent: 'flex-end',
473
+ },
474
+ { id: 'tds/marketing/nav/action' },
475
+ )
476
+
477
+ export const backIcon = style(
478
+ { fontSize: '16px !custom', scale: '-1 1 !custom' },
479
+ { id: 'tds/marketing/nav/back-icon' },
480
+ )
481
+
482
+ // The glass bar: 48px tall, and 52px from 1080px where the sections show in it.
483
+ export const bar = variants(
484
+ {
485
+ base: {
486
+ alignItems: 'center',
487
+ backdropFilter: `blur(${vars.blur.popover}) !custom`,
488
+ backgroundColor: `color-mix(in srgb, ${vars.color.neutral['012']} 60%, transparent) !custom`,
489
+ borderRadius: 'sm',
490
+ boxSizing: 'border-box',
491
+ display: 'flex',
492
+ gap: '4',
493
+ height: '48',
494
+ paddingBlock: '4',
495
+ paddingInlineEnd: '12',
496
+ paddingInlineStart: '24',
497
+ '@media >=1080': { height: '52px !custom', paddingInlineEnd: '4' },
498
+ },
499
+ defaultVariants: { hidden: false, open: false },
500
+ variants: {
501
+ // The bar under the open dialog hides, so the dialog's copy of it shows alone.
502
+ hidden: { false: {}, true: { visibility: 'hidden' } },
503
+ open: {
504
+ false: {},
505
+ true: {
506
+ backdropFilter: `blur(${vars.blur.control}) !custom`,
507
+ '@media >=1080': { backdropFilter: `blur(${vars.blur.popover}) !custom` },
508
+ },
509
+ },
510
+ },
511
+ },
512
+ { id: 'tds/marketing/nav/bar' },
513
+ )
514
+
515
+ export const compactAction = style(
516
+ { marginBlockStart: 'auto !custom', padding: '12', paddingBlockStart: '20' },
517
+ { id: 'tds/marketing/nav/compact-action' },
518
+ )
519
+
520
+ export const compactLink = variants(
521
+ {
522
+ base: {
523
+ alignItems: 'center',
524
+ backgroundColor: 'transparent !custom',
525
+ borderRadius: '2xs',
526
+ borderWidth: 'none',
527
+ boxSizing: 'border-box',
528
+ color: 'inherit !custom',
529
+ cursor: 'pointer',
530
+ display: 'flex',
531
+ minHeight: 'hitMin',
532
+ opacity: 'full',
533
+ outlineColor: 'neutral.100',
534
+ outlineOffset: '-2px !custom',
535
+ outlineStyle: 'none',
536
+ outlineWidth: 'ring',
537
+ paddingBlock: '0',
538
+ paddingInline: '16',
539
+ textAlign: 'start',
540
+ textDecoration: 'none !custom',
541
+ transitionDuration: 'hoverOut',
542
+ transitionProperty: 'background-color, opacity !custom',
543
+ transitionTimingFunction: 'standard',
544
+ typography: 'body.b2',
545
+ width: '100% !custom',
546
+ selectors: {
547
+ '&:active': { opacity: 'press', transitionDuration: 'press' },
548
+ '&:focus-visible': { outlineStyle: 'solid' },
549
+ },
550
+ '@media (hover: hover) and (pointer: fine)': {
551
+ selectors: {
552
+ '&:hover:not(:active)': {
553
+ backgroundColor: `color-mix(in srgb, ${vars.color.neutral['000']} 35%, transparent) !custom`,
554
+ transitionDuration: 'hoverIn',
555
+ },
556
+ },
557
+ },
558
+ '@media (forced-colors: active)': {
559
+ selectors: { '&:focus-visible': { outlineColor: 'Highlight !custom' } },
560
+ },
561
+ },
562
+ defaultVariants: { back: false },
563
+ variants: {
564
+ back: { false: {}, true: { color: 'neutral.shade.060', gap: '12' } },
565
+ },
566
+ },
567
+ { id: 'tds/marketing/nav/compact-link' },
568
+ )
569
+
570
+ export const compactList = style(
571
+ {
572
+ boxSizing: 'border-box',
573
+ display: 'flex',
574
+ flexDirection: 'column',
575
+ listStyle: 'none !custom',
576
+ margin: '0',
577
+ minHeight: '100% !custom',
578
+ padding: '8',
579
+ },
580
+ { id: 'tds/marketing/nav/compact-list' },
581
+ )
582
+
583
+ // A section's links fade in, and slide 4px in from the side of the section they replace. Under
584
+ // reduced motion they only fade.
585
+ export const content = style(
586
+ {
587
+ boxSizing: 'border-box',
588
+ opacity: 'full',
589
+ transitionDuration: 'surfaceIn',
590
+ transitionProperty: 'opacity, translate !custom',
591
+ transitionTimingFunction: 'standard',
592
+ width: '100% !custom',
593
+ selectors: {
594
+ '&[data-starting-style]': { opacity: '0 !custom' },
595
+ '&[data-ending-style]': {
596
+ opacity: '0 !custom',
597
+ transitionDuration: 'surfaceOut',
598
+ transitionTimingFunction: 'exit',
599
+ },
600
+ // Switching sections swaps inside the open popup, at one pace and on one curve.
601
+ '&[data-activation-direction]': { transitionDuration: 'state' },
602
+ '&[data-ending-style][data-activation-direction]': {
603
+ transitionDuration: 'state',
604
+ transitionTimingFunction: 'standard',
605
+ },
606
+ },
607
+ '@media (prefers-reduced-motion: no-preference)': {
608
+ selectors: {
609
+ '&[data-starting-style][data-activation-direction="left"]': {
610
+ translate: '-4px 0 !custom',
611
+ },
612
+ '&[data-starting-style][data-activation-direction="right"]': {
613
+ translate: '4px 0 !custom',
614
+ },
615
+ '&[data-ending-style][data-activation-direction="left"]': { translate: '4px 0 !custom' },
616
+ '&[data-ending-style][data-activation-direction="right"]': {
617
+ translate: '-4px 0 !custom',
618
+ },
619
+ },
620
+ },
621
+ },
622
+ { id: 'tds/marketing/nav/content' },
623
+ )
624
+
625
+ export const desktop = style(
626
+ {
627
+ display: 'none',
628
+ flexGrow: '1 !custom',
629
+ minWidth: '0 !custom',
630
+ '@media >=1080': { display: 'block' },
631
+ },
632
+ { id: 'tds/marketing/nav/desktop' },
633
+ )
634
+
635
+ export const dialog = style(
636
+ { position: 'absolute', top: '0', width: '100% !custom' },
637
+ { id: 'tds/marketing/nav/dialog' },
638
+ )
639
+
640
+ export const hidden = style(
641
+ {
642
+ clip: 'rect(0 0 0 0) !custom',
643
+ height: '1px !custom',
644
+ overflow: 'hidden',
645
+ position: 'absolute',
646
+ whiteSpace: 'nowrap',
647
+ width: '1px !custom',
648
+ },
649
+ { id: 'tds/marketing/nav/hidden' },
650
+ )
651
+
652
+ export const home = style(
653
+ {
654
+ alignItems: 'center',
655
+ borderRadius: '2xs',
656
+ color: 'inherit !custom',
657
+ display: 'flex',
658
+ flexShrink: '0 !custom',
659
+ minHeight: '40',
660
+ outlineColor: 'neutral.100',
661
+ outlineOffset: 'ringInline',
662
+ outlineStyle: 'none',
663
+ outlineWidth: 'ring',
664
+ transitionDuration: 'hoverOut',
665
+ transitionProperty: 'opacity !custom',
666
+ transitionTimingFunction: 'standard',
667
+ selectors: {
668
+ '&:active': { opacity: 'press', transitionDuration: 'press' },
669
+ '&:focus-visible': { outlineStyle: 'solid' },
670
+ },
671
+ '@media >=1080': { marginInlineEnd: '20', minHeight: '0' },
672
+ },
673
+ { id: 'tds/marketing/nav/home' },
674
+ )
675
+
676
+ // Each bar turns 45 degrees about its center at the state pace. Under reduced motion they swap at
677
+ // once.
678
+ export const iconBar = variants(
679
+ {
680
+ base: {
681
+ transformBox: 'fill-box !custom',
682
+ transformOrigin: 'center !custom',
683
+ '@media (prefers-reduced-motion: no-preference)': {
684
+ transitionDuration: 'state',
685
+ transitionProperty: 'transform !custom',
686
+ transitionTimingFunction: 'standard',
687
+ },
688
+ },
689
+ defaultVariants: { turn: 'none' },
690
+ variants: {
691
+ turn: {
692
+ bottom: {
693
+ transform: 'translateY(-3.5px) rotate(45deg) !custom',
694
+ // The close button mounts with the dialog, so it starts as two bars.
695
+ selectors: { '[data-starting-style] &': { transform: 'none !custom' } },
696
+ },
697
+ none: {},
698
+ top: {
699
+ transform: 'translateY(3.5px) rotate(-45deg) !custom',
700
+ selectors: { '[data-starting-style] &': { transform: 'none !custom' } },
701
+ },
702
+ },
703
+ },
704
+ },
705
+ { id: 'tds/marketing/nav/icon-bar' },
706
+ )
707
+
708
+ export const item = style(
709
+ { flexBasis: '0 !custom', flexGrow: '1 !custom', flexShrink: '0 !custom' },
710
+ { id: 'tds/marketing/nav/item' },
711
+ )
712
+
713
+ // A section in the bar. While another section is hovered, open, or focused from the keyboard, the
714
+ // rest dim to 70% at the hover-in pace, so the active one leads. A hovered section leads over an
715
+ // open one, and an open one over a focused one.
716
+ export const link = style(
717
+ {
718
+ alignItems: 'center',
719
+ backgroundColor: 'transparent !custom',
720
+ borderRadius: 'xs',
721
+ borderWidth: 'none',
722
+ boxSizing: 'border-box',
723
+ color: 'inherit !custom',
724
+ cursor: 'pointer',
725
+ display: 'flex',
726
+ height: 'hitMin',
727
+ justifyContent: 'center',
728
+ opacity: 'full',
729
+ outlineColor: 'neutral.100',
730
+ outlineOffset: '-2px !custom',
731
+ outlineStyle: 'none',
732
+ outlineWidth: 'ring',
733
+ paddingBlock: '4',
734
+ paddingInline: '12',
735
+ textDecoration: 'none !custom',
736
+ transitionDuration: 'hoverOut',
737
+ transitionProperty: 'color, opacity !custom',
738
+ transitionTimingFunction: 'standard',
739
+ typography: 'utility.nav',
740
+ whiteSpace: 'nowrap',
741
+ width: '100% !custom',
742
+ selectors: {
743
+ '&:active': { opacity: 'press', transitionDuration: 'press' },
744
+ '&:focus-visible': { outlineStyle: 'solid', transitionDuration: 'hoverIn' },
745
+ '[data-nav-list]:has([data-popup-open]) > li:not(:has([data-popup-open])) > &': {
746
+ color: `color-mix(in srgb, ${vars.color.neutral['100']} 70%, transparent) !custom`,
747
+ transitionDuration: 'hoverIn',
748
+ },
749
+ '[data-nav-list]:not(:has([data-popup-open])):has(:focus-visible) > li:not(:has(:focus-visible)) > &':
750
+ {
751
+ color: `color-mix(in srgb, ${vars.color.neutral['100']} 70%, transparent) !custom`,
752
+ transitionDuration: 'hoverIn',
753
+ },
754
+ },
755
+ '@media (hover: hover) and (pointer: fine)': {
756
+ selectors: {
757
+ '[data-nav-list]:has(> li:hover) > li:not(:hover) > &': {
758
+ color: `color-mix(in srgb, ${vars.color.neutral['100']} 70%, transparent) !custom`,
759
+ transitionDuration: 'hoverIn',
760
+ },
761
+ '[data-nav-list]:has(> li:hover) > li:hover > &': {
762
+ color: 'inherit !custom',
763
+ transitionDuration: 'hoverIn',
764
+ },
765
+ },
766
+ },
767
+ '@media (forced-colors: active)': {
768
+ selectors: { '&:focus-visible': { outlineColor: 'Highlight !custom' } },
769
+ },
770
+ },
771
+ { id: 'tds/marketing/nav/link' },
772
+ )
773
+
774
+ export const list = style(
775
+ {
776
+ alignItems: 'center',
777
+ display: 'flex',
778
+ gap: '4',
779
+ listStyle: 'none !custom',
780
+ margin: '0',
781
+ padding: '0',
782
+ },
783
+ { id: 'tds/marketing/nav/list' },
784
+ )
785
+
786
+ export const logo = style(
787
+ {
788
+ height: '12px !custom',
789
+ width: '54px !custom',
790
+ '@media >=1080': { height: '20px !custom', width: '90px !custom' },
791
+ },
792
+ { id: 'tds/marketing/nav/logo' },
793
+ )
794
+
795
+ export const menuButton = style(
796
+ {
797
+ alignItems: 'center',
798
+ backgroundColor: 'transparent !custom',
799
+ borderRadius: 'full',
800
+ borderWidth: 'none',
801
+ color: 'inherit !custom',
802
+ cornerShape: 'round',
803
+ cursor: 'pointer',
804
+ display: 'flex',
805
+ flexShrink: '0 !custom',
806
+ height: '36px !custom',
807
+ justifyContent: 'center',
808
+ marginInlineStart: 'auto !custom',
809
+ opacity: 'full',
810
+ outlineColor: 'neutral.100',
811
+ outlineOffset: 'ringInline',
812
+ outlineStyle: 'none',
813
+ outlineWidth: 'ring',
814
+ padding: '0',
815
+ position: 'relative',
816
+ transitionDuration: 'hoverOut',
817
+ transitionProperty: 'background-color, opacity !custom',
818
+ transitionTimingFunction: 'standard',
819
+ width: '36px !custom',
820
+ selectors: {
821
+ // A 44px hit area around the 36px circle.
822
+ '&::after': { content: '"" !custom', inset: '-4px !custom', position: 'absolute' },
823
+ '&:active': { opacity: 'press', transitionDuration: 'press' },
824
+ '&:focus-visible': { outlineStyle: 'solid' },
825
+ },
826
+ '@media (hover: hover) and (pointer: fine)': {
827
+ selectors: {
828
+ '&:hover:not(:active)': {
829
+ backgroundColor: `color-mix(in srgb, ${vars.color.neutral['000']} 35%, transparent) !custom`,
830
+ transitionDuration: 'hoverIn',
831
+ },
832
+ },
833
+ },
834
+ '@media >=1080': { display: 'none' },
835
+ '@media (forced-colors: active)': {
836
+ selectors: { '&:focus-visible': { outlineColor: 'Highlight !custom' } },
837
+ },
838
+ },
839
+ { id: 'tds/marketing/nav/menu-button' },
840
+ )
841
+
842
+ export const menuLink = style(
843
+ {
844
+ alignItems: 'center',
845
+ backgroundColor: 'transparent !custom',
846
+ borderRadius: 'xs',
847
+ boxSizing: 'border-box',
848
+ color: 'neutral.100',
849
+ display: 'flex',
850
+ minHeight: '52px !custom',
851
+ opacity: 'full',
852
+ outlineColor: 'neutral.100',
853
+ outlineOffset: '-2px !custom',
854
+ outlineStyle: 'none',
855
+ outlineWidth: 'ring',
856
+ paddingBlock: '16',
857
+ paddingInline: '20',
858
+ textDecoration: 'none !custom',
859
+ transitionDuration: 'hoverOut',
860
+ transitionProperty: 'background-color, opacity !custom',
861
+ transitionTimingFunction: 'standard',
862
+ typography: 'utility.nav',
863
+ selectors: {
864
+ '&:active': { opacity: 'press', transitionDuration: 'press' },
865
+ '&:focus-visible': { outlineStyle: 'solid' },
866
+ },
867
+ '@media (hover: hover) and (pointer: fine)': {
868
+ selectors: {
869
+ '&:hover:not(:active)': {
870
+ backgroundColor: `color-mix(in srgb, ${vars.color.neutral['000']} 35%, transparent) !custom`,
871
+ transitionDuration: 'hoverIn',
872
+ },
873
+ },
874
+ },
875
+ '@media (forced-colors: active)': {
876
+ selectors: { '&:focus-visible': { outlineColor: 'Highlight !custom' } },
877
+ },
878
+ },
879
+ { id: 'tds/marketing/nav/menu-link' },
880
+ )
881
+
882
+ export const menuList = style(
883
+ { listStyle: 'none !custom', margin: '0', padding: '0' },
884
+ { id: 'tds/marketing/nav/menu-list' },
885
+ )
886
+
887
+ export const navigation = style(
888
+ { color: 'neutral.100', fontFamily: 'sans' },
889
+ { id: 'tds/marketing/nav/navigation' },
890
+ )
891
+
892
+ // The folded sections fade in and grow from under the bar by the surface-in scale. The dialog has
893
+ // no exit transition of its own, so it closes at once and Menu's icon carries the close.
894
+ export const panel = style(
895
+ {
896
+ backdropFilter: `blur(${vars.blur.control}) !custom`,
897
+ backgroundColor: `color-mix(in srgb, ${vars.color.neutral['012']} 60%, transparent) !custom`,
898
+ borderRadius: 'sm',
899
+ height: 'calc(100dvh - 104px) !custom',
900
+ overflowY: 'auto',
901
+ overscrollBehaviorY: 'contain',
902
+ position: 'absolute',
903
+ top: '56px !custom',
904
+ transformOrigin: 'top !custom',
905
+ transitionDuration: 'surfaceIn',
906
+ transitionProperty: 'opacity, scale !custom',
907
+ transitionTimingFunction: 'standard',
908
+ width: '100% !custom',
909
+ selectors: {
910
+ '[data-starting-style] > &': { opacity: '0 !custom', scale: 'surfaceIn' },
911
+ },
912
+ '@media >=1080': { display: 'none' },
913
+ },
914
+ { id: 'tds/marketing/nav/panel' },
915
+ )
916
+
917
+ // A section's menu spans the bar, 8px under it. It fades in growing from under its trigger, at the
918
+ // surface-in pace, and leaves faster on the exit curve. Its resize between sections runs only
919
+ // without a reduced-motion preference.
920
+ export const popup = style(
921
+ {
922
+ backdropFilter: `blur(${vars.blur.popover}) !custom`,
923
+ backgroundColor: `color-mix(in srgb, ${vars.color.neutral['012']} 60%, transparent) !custom`,
924
+ borderRadius: 'sm',
925
+ boxSizing: 'border-box',
926
+ color: 'neutral.100',
927
+ height: 'var(--popup-height) !custom',
928
+ maxHeight: 'var(--available-height) !custom',
929
+ outlineStyle: 'none',
930
+ padding: '8',
931
+ transformOrigin: 'var(--transform-origin) !custom',
932
+ transitionDuration: 'surfaceIn',
933
+ transitionProperty: 'opacity, scale !custom',
934
+ transitionTimingFunction: 'standard',
935
+ width: '100% !custom',
936
+ selectors: {
937
+ '&[data-starting-style]': { opacity: '0 !custom', scale: 'surfaceIn' },
938
+ '&[data-ending-style]': {
939
+ opacity: '0 !custom',
940
+ scale: 'surfaceOut',
941
+ transitionDuration: 'surfaceOut',
942
+ transitionTimingFunction: 'exit',
943
+ },
944
+ },
945
+ '@media (prefers-reduced-motion: no-preference)': {
946
+ transitionProperty: 'opacity, scale, height !custom',
947
+ },
948
+ },
949
+ { id: 'tds/marketing/nav/popup' },
950
+ )
951
+
952
+ export const positioner = style(
953
+ {
954
+ display: 'none',
955
+ width: 'var(--anchor-width) !custom',
956
+ zIndex: '10 !custom',
957
+ '@media >=1080': { display: 'block' },
958
+ },
959
+ { id: 'tds/marketing/nav/positioner' },
960
+ )
961
+
962
+ // The bar is the page width less 24px margins, and fits the logo, six sections and the action
963
+ // from 1080px, at 986px.
964
+ export const root = variants(
965
+ {
966
+ base: {
967
+ boxSizing: 'border-box',
968
+ marginInline: 'auto !custom',
969
+ width: 'calc(100% - 48px) !custom',
970
+ '@media >=1080': { maxWidth: '986px !custom' },
971
+ },
972
+ defaultVariants: { fixed: false },
973
+ variants: {
974
+ /**
975
+ * Fixes the bar 24px under the top of the window, above the page. Leave it unset to render
976
+ * the bar in flow, such as in a preview.
977
+ *
978
+ * @default false
979
+ */
980
+ fixed: {
981
+ false: { position: 'relative' },
982
+ true: { insetInline: '0', position: 'fixed', top: '24', zIndex: '10 !custom' },
983
+ },
984
+ },
985
+ },
986
+ { id: 'tds/marketing/nav' },
987
+ )
988
+
989
+ // Hidden off the page until keyboard focus brings it into the top corner.
990
+ export const skip = style(
991
+ {
992
+ backgroundColor: 'neutral.000',
993
+ borderRadius: 'xs',
994
+ clipPath: 'inset(50%) !custom',
995
+ color: 'neutral.100',
996
+ height: '1px !custom',
997
+ insetInlineStart: '24',
998
+ outlineColor: 'neutral.100',
999
+ outlineOffset: 'ring',
1000
+ outlineWidth: 'ring',
1001
+ overflow: 'hidden',
1002
+ paddingBlock: '0',
1003
+ paddingInline: '0',
1004
+ position: 'fixed',
1005
+ textDecoration: 'none !custom',
1006
+ top: '24',
1007
+ typography: 'body.b2',
1008
+ whiteSpace: 'nowrap',
1009
+ width: '1px !custom',
1010
+ zIndex: '20 !custom',
1011
+ selectors: {
1012
+ '&:focus-visible': {
1013
+ clipPath: 'none !custom',
1014
+ height: 'auto !custom',
1015
+ outlineStyle: 'solid',
1016
+ overflow: 'visible',
1017
+ paddingBlock: '12',
1018
+ paddingInline: '20',
1019
+ width: 'max-content !custom',
1020
+ },
1021
+ },
1022
+ },
1023
+ { id: 'tds/marketing/nav/skip' },
1024
+ )
1025
+
1026
+ export const viewport = style(
1027
+ { height: '100% !custom', overflow: 'hidden', position: 'relative', width: '100% !custom' },
1028
+ { id: 'tds/marketing/nav/viewport' },
1029
+ )
1030
+ }