@tempoxyz/ds 0.3.19 → 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 (303) 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/document/templates/brief.html +3 -3
  17. package/dist/document/templates/essay.html +3 -3
  18. package/dist/document/templates/post.html +3 -3
  19. package/dist/marketing/components/ArticleBody.css +1 -0
  20. package/dist/marketing/components/ArticleBody.d.ts +1013 -0
  21. package/dist/marketing/components/ArticleBody.d.ts.map +1 -0
  22. package/dist/marketing/components/ArticleBody.js +120 -0
  23. package/dist/marketing/components/ArticleBody.js.map +1 -0
  24. package/dist/marketing/components/ArticleBody.js.zyzz.json +1 -0
  25. package/dist/marketing/components/ArticleHero.css +1 -0
  26. package/dist/marketing/components/ArticleHero.d.ts +168 -0
  27. package/dist/marketing/components/ArticleHero.d.ts.map +1 -0
  28. package/dist/marketing/components/ArticleHero.js +74 -0
  29. package/dist/marketing/components/ArticleHero.js.map +1 -0
  30. package/dist/marketing/components/ArticleHero.js.zyzz.json +1 -0
  31. package/dist/marketing/components/ArticleIndex.css +1 -0
  32. package/dist/marketing/components/ArticleIndex.d.ts +164 -0
  33. package/dist/marketing/components/ArticleIndex.d.ts.map +1 -0
  34. package/dist/marketing/components/ArticleIndex.js +100 -0
  35. package/dist/marketing/components/ArticleIndex.js.map +1 -0
  36. package/dist/marketing/components/ArticleIndex.js.zyzz.json +1 -0
  37. package/dist/marketing/components/ArticleRail.css +1 -0
  38. package/dist/marketing/components/ArticleRail.d.ts +105 -0
  39. package/dist/marketing/components/ArticleRail.d.ts.map +1 -0
  40. package/dist/marketing/components/ArticleRail.js +96 -0
  41. package/dist/marketing/components/ArticleRail.js.map +1 -0
  42. package/dist/marketing/components/ArticleRail.js.zyzz.json +1 -0
  43. package/dist/marketing/components/AsideLayout.css +1 -0
  44. package/dist/marketing/components/AsideLayout.d.ts +39 -0
  45. package/dist/marketing/components/AsideLayout.d.ts.map +1 -0
  46. package/dist/marketing/components/AsideLayout.js +24 -0
  47. package/dist/marketing/components/AsideLayout.js.map +1 -0
  48. package/dist/marketing/components/AsideLayout.js.zyzz.json +1 -0
  49. package/dist/marketing/components/Breadcrumbs.css +1 -0
  50. package/dist/marketing/components/Breadcrumbs.d.ts +132 -0
  51. package/dist/marketing/components/Breadcrumbs.d.ts.map +1 -0
  52. package/dist/marketing/components/Breadcrumbs.js +75 -0
  53. package/dist/marketing/components/Breadcrumbs.js.map +1 -0
  54. package/dist/marketing/components/Breadcrumbs.js.zyzz.json +1 -0
  55. package/dist/marketing/components/Button.css +1 -0
  56. package/dist/marketing/components/Button.d.ts +421 -0
  57. package/dist/marketing/components/Button.d.ts.map +1 -0
  58. package/dist/marketing/components/Button.js +87 -0
  59. package/dist/marketing/components/Button.js.map +1 -0
  60. package/dist/marketing/components/Button.js.zyzz.json +1 -0
  61. package/dist/marketing/components/Card.css +1 -0
  62. package/dist/marketing/components/Card.d.ts +563 -0
  63. package/dist/marketing/components/Card.d.ts.map +1 -0
  64. package/dist/marketing/components/Card.js +171 -0
  65. package/dist/marketing/components/Card.js.map +1 -0
  66. package/dist/marketing/components/Card.js.zyzz.json +1 -0
  67. package/dist/marketing/components/Contact.css +1 -0
  68. package/dist/marketing/components/Contact.d.ts +51 -0
  69. package/dist/marketing/components/Contact.d.ts.map +1 -0
  70. package/dist/marketing/components/Contact.js +44 -0
  71. package/dist/marketing/components/Contact.js.map +1 -0
  72. package/dist/marketing/components/Contact.js.zyzz.json +1 -0
  73. package/dist/marketing/components/Cta.css +1 -0
  74. package/dist/marketing/components/Cta.d.ts +138 -0
  75. package/dist/marketing/components/Cta.d.ts.map +1 -0
  76. package/dist/marketing/components/Cta.js +71 -0
  77. package/dist/marketing/components/Cta.js.map +1 -0
  78. package/dist/marketing/components/Cta.js.zyzz.json +1 -0
  79. package/dist/marketing/components/CustomerStoryFeature.css +1 -0
  80. package/dist/marketing/components/CustomerStoryFeature.d.ts +48 -0
  81. package/dist/marketing/components/CustomerStoryFeature.d.ts.map +1 -0
  82. package/dist/marketing/components/CustomerStoryFeature.js +58 -0
  83. package/dist/marketing/components/CustomerStoryFeature.js.map +1 -0
  84. package/dist/marketing/components/CustomerStoryFeature.js.zyzz.json +1 -0
  85. package/dist/marketing/components/Faq.css +1 -0
  86. package/dist/marketing/components/Faq.d.ts +99 -0
  87. package/dist/marketing/components/Faq.d.ts.map +1 -0
  88. package/dist/marketing/components/Faq.js +83 -0
  89. package/dist/marketing/components/Faq.js.map +1 -0
  90. package/dist/marketing/components/Faq.js.zyzz.json +1 -0
  91. package/dist/marketing/components/FeatureAccordion.css +1 -0
  92. package/dist/marketing/components/FeatureAccordion.d.ts +230 -0
  93. package/dist/marketing/components/FeatureAccordion.d.ts.map +1 -0
  94. package/dist/marketing/components/FeatureAccordion.js +117 -0
  95. package/dist/marketing/components/FeatureAccordion.js.map +1 -0
  96. package/dist/marketing/components/FeatureAccordion.js.zyzz.json +1 -0
  97. package/dist/marketing/components/Footer.css +1 -0
  98. package/dist/marketing/components/Footer.d.ts +178 -0
  99. package/dist/marketing/components/Footer.d.ts.map +1 -0
  100. package/dist/marketing/components/Footer.js +109 -0
  101. package/dist/marketing/components/Footer.js.map +1 -0
  102. package/dist/marketing/components/Footer.js.zyzz.json +1 -0
  103. package/dist/marketing/components/Hero.css +1 -0
  104. package/dist/marketing/components/Hero.d.ts +200 -0
  105. package/dist/marketing/components/Hero.d.ts.map +1 -0
  106. package/dist/marketing/components/Hero.js +67 -0
  107. package/dist/marketing/components/Hero.js.map +1 -0
  108. package/dist/marketing/components/Hero.js.zyzz.json +1 -0
  109. package/dist/marketing/components/LeadCapture.css +1 -0
  110. package/dist/marketing/components/LeadCapture.d.ts +102 -0
  111. package/dist/marketing/components/LeadCapture.d.ts.map +1 -0
  112. package/dist/marketing/components/LeadCapture.js +78 -0
  113. package/dist/marketing/components/LeadCapture.js.map +1 -0
  114. package/dist/marketing/components/LeadCapture.js.zyzz.json +1 -0
  115. package/dist/marketing/components/Link.css +1 -0
  116. package/dist/marketing/components/Link.d.ts +342 -0
  117. package/dist/marketing/components/Link.d.ts.map +1 -0
  118. package/dist/marketing/components/Link.js +152 -0
  119. package/dist/marketing/components/Link.js.map +1 -0
  120. package/dist/marketing/components/Link.js.zyzz.json +1 -0
  121. package/dist/marketing/components/Logo.css +1 -0
  122. package/dist/marketing/components/Logo.d.ts +30 -0
  123. package/dist/marketing/components/Logo.d.ts.map +1 -0
  124. package/dist/marketing/components/Logo.js +38 -0
  125. package/dist/marketing/components/Logo.js.map +1 -0
  126. package/dist/marketing/components/Logo.js.zyzz.json +1 -0
  127. package/dist/marketing/components/LogoWall.css +1 -0
  128. package/dist/marketing/components/LogoWall.d.ts +156 -0
  129. package/dist/marketing/components/LogoWall.d.ts.map +1 -0
  130. package/dist/marketing/components/LogoWall.js +41 -0
  131. package/dist/marketing/components/LogoWall.js.map +1 -0
  132. package/dist/marketing/components/LogoWall.js.zyzz.json +1 -0
  133. package/dist/marketing/components/Mark.css +1 -0
  134. package/dist/marketing/components/Mark.d.ts +30 -0
  135. package/dist/marketing/components/Mark.d.ts.map +1 -0
  136. package/dist/marketing/components/Mark.js +38 -0
  137. package/dist/marketing/components/Mark.js.map +1 -0
  138. package/dist/marketing/components/Mark.js.zyzz.json +1 -0
  139. package/dist/marketing/components/Media.css +1 -0
  140. package/dist/marketing/components/Media.d.ts +74 -0
  141. package/dist/marketing/components/Media.d.ts.map +1 -0
  142. package/dist/marketing/components/Media.js +80 -0
  143. package/dist/marketing/components/Media.js.map +1 -0
  144. package/dist/marketing/components/Media.js.zyzz.json +1 -0
  145. package/dist/marketing/components/Nav.css +1 -0
  146. package/dist/marketing/components/Nav.d.ts +303 -0
  147. package/dist/marketing/components/Nav.d.ts.map +1 -0
  148. package/dist/marketing/components/Nav.js +166 -0
  149. package/dist/marketing/components/Nav.js.map +1 -0
  150. package/dist/marketing/components/Nav.js.zyzz.json +1 -0
  151. package/dist/marketing/components/PartnersIndex.css +1 -0
  152. package/dist/marketing/components/PartnersIndex.d.ts +267 -0
  153. package/dist/marketing/components/PartnersIndex.d.ts.map +1 -0
  154. package/dist/marketing/components/PartnersIndex.js +96 -0
  155. package/dist/marketing/components/PartnersIndex.js.map +1 -0
  156. package/dist/marketing/components/PartnersIndex.js.zyzz.json +1 -0
  157. package/dist/marketing/components/QuoteBand.css +1 -0
  158. package/dist/marketing/components/QuoteBand.d.ts +128 -0
  159. package/dist/marketing/components/QuoteBand.d.ts.map +1 -0
  160. package/dist/marketing/components/QuoteBand.js +73 -0
  161. package/dist/marketing/components/QuoteBand.js.map +1 -0
  162. package/dist/marketing/components/QuoteBand.js.zyzz.json +1 -0
  163. package/dist/marketing/components/Section.css +1 -0
  164. package/dist/marketing/components/Section.d.ts +132 -0
  165. package/dist/marketing/components/Section.d.ts.map +1 -0
  166. package/dist/marketing/components/Section.js +33 -0
  167. package/dist/marketing/components/Section.js.map +1 -0
  168. package/dist/marketing/components/Section.js.zyzz.json +1 -0
  169. package/dist/marketing/components/SectionHeading.css +1 -0
  170. package/dist/marketing/components/SectionHeading.d.ts +215 -0
  171. package/dist/marketing/components/SectionHeading.d.ts.map +1 -0
  172. package/dist/marketing/components/SectionHeading.js +48 -0
  173. package/dist/marketing/components/SectionHeading.js.map +1 -0
  174. package/dist/marketing/components/SectionHeading.js.zyzz.json +1 -0
  175. package/dist/marketing/components/Showcase.css +1 -0
  176. package/dist/marketing/components/Showcase.d.ts +269 -0
  177. package/dist/marketing/components/Showcase.d.ts.map +1 -0
  178. package/dist/marketing/components/Showcase.js +67 -0
  179. package/dist/marketing/components/Showcase.js.map +1 -0
  180. package/dist/marketing/components/Showcase.js.zyzz.json +1 -0
  181. package/dist/marketing/components/Stats.css +1 -0
  182. package/dist/marketing/components/Stats.d.ts +133 -0
  183. package/dist/marketing/components/Stats.d.ts.map +1 -0
  184. package/dist/marketing/components/Stats.js +34 -0
  185. package/dist/marketing/components/Stats.js.map +1 -0
  186. package/dist/marketing/components/Stats.js.zyzz.json +1 -0
  187. package/dist/marketing/components/Steps.css +1 -0
  188. package/dist/marketing/components/Steps.d.ts +53 -0
  189. package/dist/marketing/components/Steps.d.ts.map +1 -0
  190. package/dist/marketing/components/Steps.js +78 -0
  191. package/dist/marketing/components/Steps.js.map +1 -0
  192. package/dist/marketing/components/Steps.js.zyzz.json +1 -0
  193. package/dist/marketing/components/SymbolTile.css +1 -0
  194. package/dist/marketing/components/SymbolTile.d.ts +85 -0
  195. package/dist/marketing/components/SymbolTile.d.ts.map +1 -0
  196. package/dist/marketing/components/SymbolTile.js +35 -0
  197. package/dist/marketing/components/SymbolTile.js.map +1 -0
  198. package/dist/marketing/components/SymbolTile.js.zyzz.json +1 -0
  199. package/dist/marketing/components/Tab.css +1 -0
  200. package/dist/marketing/components/Tab.d.ts +280 -0
  201. package/dist/marketing/components/Tab.d.ts.map +1 -0
  202. package/dist/marketing/components/Tab.js +43 -0
  203. package/dist/marketing/components/Tab.js.map +1 -0
  204. package/dist/marketing/components/Tab.js.zyzz.json +1 -0
  205. package/dist/marketing/components/Table.css +1 -0
  206. package/dist/marketing/components/Table.d.ts +157 -0
  207. package/dist/marketing/components/Table.d.ts.map +1 -0
  208. package/dist/marketing/components/Table.js +80 -0
  209. package/dist/marketing/components/Table.js.map +1 -0
  210. package/dist/marketing/components/Table.js.zyzz.json +1 -0
  211. package/dist/marketing/components/Tag.css +1 -0
  212. package/dist/marketing/components/Tag.d.ts +254 -0
  213. package/dist/marketing/components/Tag.d.ts.map +1 -0
  214. package/dist/marketing/components/Tag.js +59 -0
  215. package/dist/marketing/components/Tag.js.map +1 -0
  216. package/dist/marketing/components/Tag.js.zyzz.json +1 -0
  217. package/dist/marketing/components/internal/Links.d.ts +9 -0
  218. package/dist/marketing/components/internal/Links.d.ts.map +1 -0
  219. package/dist/marketing/components/internal/Links.js +15 -0
  220. package/dist/marketing/components/internal/Links.js.map +1 -0
  221. package/dist/marketing/icons/ArrowUpRight.d.ts +6 -0
  222. package/dist/marketing/icons/ArrowUpRight.d.ts.map +1 -0
  223. package/dist/marketing/icons/ArrowUpRight.js +5 -0
  224. package/dist/marketing/icons/ArrowUpRight.js.map +1 -0
  225. package/dist/marketing/icons/Checkmark.d.ts +6 -0
  226. package/dist/marketing/icons/Checkmark.d.ts.map +1 -0
  227. package/dist/marketing/icons/Checkmark.js +5 -0
  228. package/dist/marketing/icons/Checkmark.js.map +1 -0
  229. package/dist/marketing/icons/ChevronRight.d.ts +6 -0
  230. package/dist/marketing/icons/ChevronRight.d.ts.map +1 -0
  231. package/dist/marketing/icons/ChevronRight.js +5 -0
  232. package/dist/marketing/icons/ChevronRight.js.map +1 -0
  233. package/dist/marketing/icons/Link.d.ts +6 -0
  234. package/dist/marketing/icons/Link.d.ts.map +1 -0
  235. package/dist/marketing/icons/Link.js +5 -0
  236. package/dist/marketing/icons/Link.js.map +1 -0
  237. package/dist/marketing/icons/Play.d.ts +6 -0
  238. package/dist/marketing/icons/Play.d.ts.map +1 -0
  239. package/dist/marketing/icons/Play.js +5 -0
  240. package/dist/marketing/icons/Play.js.map +1 -0
  241. package/dist/marketing/icons/Spinner.d.ts +6 -0
  242. package/dist/marketing/icons/Spinner.d.ts.map +1 -0
  243. package/dist/marketing/icons/Spinner.js +5 -0
  244. package/dist/marketing/icons/Spinner.js.map +1 -0
  245. package/dist/marketing/icons/Xmark.d.ts +6 -0
  246. package/dist/marketing/icons/Xmark.d.ts.map +1 -0
  247. package/dist/marketing/icons/Xmark.js +5 -0
  248. package/dist/marketing/icons/Xmark.js.map +1 -0
  249. package/dist/marketing/index.d.ts +34 -1
  250. package/dist/marketing/index.d.ts.map +1 -1
  251. package/dist/marketing/index.js +34 -1
  252. package/dist/marketing/index.js.map +1 -1
  253. package/dist/marketing/index.js.zyzz.json +1 -1
  254. package/package.json +8 -2
  255. package/src/arsenal/icons/CATALOGUE.md +471 -0
  256. package/src/arsenal/icons/CHANGELOG.md +181 -0
  257. package/src/arsenal/icons/Icon.tsx +187 -0
  258. package/src/arsenal/icons/README.md +53 -0
  259. package/src/arsenal/icons/glyphs.ts +2901 -0
  260. package/src/arsenal/icons/index.ts +12 -0
  261. package/src/marketing/README.md +13 -1
  262. package/src/marketing/components/ArticleBody.tsx +784 -0
  263. package/src/marketing/components/ArticleHero.tsx +331 -0
  264. package/src/marketing/components/ArticleIndex.tsx +457 -0
  265. package/src/marketing/components/ArticleRail.tsx +384 -0
  266. package/src/marketing/components/AsideLayout.tsx +52 -0
  267. package/src/marketing/components/Breadcrumbs.tsx +197 -0
  268. package/src/marketing/components/Button.tsx +469 -0
  269. package/src/marketing/components/Card.tsx +865 -0
  270. package/src/marketing/components/Contact.tsx +157 -0
  271. package/src/marketing/components/Cta.tsx +297 -0
  272. package/src/marketing/components/CustomerStoryFeature.tsx +218 -0
  273. package/src/marketing/components/Faq.tsx +334 -0
  274. package/src/marketing/components/FeatureAccordion.tsx +459 -0
  275. package/src/marketing/components/Footer.tsx +440 -0
  276. package/src/marketing/components/Hero.tsx +275 -0
  277. package/src/marketing/components/LeadCapture.tsx +322 -0
  278. package/src/marketing/components/Link.tsx +508 -0
  279. package/src/marketing/components/Logo.tsx +71 -0
  280. package/src/marketing/components/LogoWall.tsx +185 -0
  281. package/src/marketing/components/Mark.tsx +67 -0
  282. package/src/marketing/components/Media.tsx +275 -0
  283. package/src/marketing/components/Nav.tsx +1030 -0
  284. package/src/marketing/components/PartnersIndex.tsx +448 -0
  285. package/src/marketing/components/QuoteBand.tsx +288 -0
  286. package/src/marketing/components/Section.tsx +110 -0
  287. package/src/marketing/components/SectionHeading.tsx +227 -0
  288. package/src/marketing/components/Showcase.tsx +301 -0
  289. package/src/marketing/components/Stats.tsx +130 -0
  290. package/src/marketing/components/Steps.tsx +215 -0
  291. package/src/marketing/components/SymbolTile.tsx +89 -0
  292. package/src/marketing/components/Tab.tsx +306 -0
  293. package/src/marketing/components/Table.tsx +255 -0
  294. package/src/marketing/components/Tag.tsx +289 -0
  295. package/src/marketing/components/internal/Links.ts +19 -0
  296. package/src/marketing/icons/ArrowUpRight.tsx +25 -0
  297. package/src/marketing/icons/Checkmark.tsx +25 -0
  298. package/src/marketing/icons/ChevronRight.tsx +25 -0
  299. package/src/marketing/icons/Link.tsx +25 -0
  300. package/src/marketing/icons/Play.tsx +25 -0
  301. package/src/marketing/icons/Spinner.tsx +25 -0
  302. package/src/marketing/icons/Xmark.tsx +25 -0
  303. package/src/marketing/index.ts +34 -1
@@ -0,0 +1,457 @@
1
+ /** Renders the Marketing article index: every article in a hub, filtered by label. @module */
2
+ import { useRender } from '@base-ui/react/use-render'
3
+ import {
4
+ type ComponentPropsWithRef,
5
+ type CSSProperties,
6
+ type ReactNode,
7
+ useId,
8
+ useState,
9
+ } from 'react'
10
+ import type * as zyzz from 'zyzz'
11
+ import { keyframes } from 'zyzz/web'
12
+ import { ChevronRight } from '../icons/ChevronRight.js'
13
+ import { style, variants, vars } from '../zyzz.config.js'
14
+ import { Tab } from './Tab.js'
15
+ import { Tag } from './Tag.js'
16
+ import * as Links from './internal/Links.js'
17
+
18
+ /**
19
+ * A `<section>` named by its heading that lists every post, guide or report in a hub as ruled rows,
20
+ * each one link to one article. From 1024px a sidebar of label filters sits beside the list and
21
+ * stays in view as the list scrolls. Each filter is a `Tab` that points to the list it controls. A
22
+ * press shows only that label's articles, and a second press shows them all again.
23
+ *
24
+ * - Use it for a hub's full list under its page header: every post on Blog, guide on Learn or report
25
+ * on Reports.
26
+ * - Set `filterable={false}` where the labels are not worth filtering, as on Reports.
27
+ * - Pass a signup block in `aside`. It sits under the filters, ruled off by a hairline.
28
+ * - Pass `render` for router links, such as `<NextLink href="" />`. It renders every row's link.
29
+ *
30
+ * @example
31
+ * <ArticleIndex
32
+ * heading="Latest posts"
33
+ * items={[{ date: 'Nov 12, 2026', href: '/blog/payouts', label: 'Product', title: 'Payouts' }]}
34
+ * />
35
+ *
36
+ * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/button/ | WAI-ARIA APG Button pattern (toggle button)}
37
+ */
38
+ export function ArticleIndex(props: ArticleIndex.Props) {
39
+ const {
40
+ aside,
41
+ className,
42
+ defaultValue = null,
43
+ filterable = true,
44
+ heading,
45
+ items,
46
+ messages,
47
+ name,
48
+ onValueChange,
49
+ render,
50
+ value: controlled,
51
+ vars,
52
+ ...attributes
53
+ } = props
54
+
55
+ const text = {
56
+ empty: messages?.empty ?? 'No articles found.',
57
+ filters: messages?.filters ?? 'Filter posts by category',
58
+ minutes: messages?.minutes ?? '{minutes} min',
59
+ }
60
+ const headingId = useId()
61
+ const generatedId = useId()
62
+ const listId = name ? `${name}-articles` : generatedId
63
+ const [uncontrolled, setUncontrolled] = useState<string | null>(defaultValue)
64
+ // Counts presses, so the rows a filter brings in rise into place, and never on first paint.
65
+ const [filterings, setFilterings] = useState(0)
66
+
67
+ const labels = [...new Set(items.flatMap((item) => (item.label ? [item.label] : [])))]
68
+ const selected = (() => {
69
+ const value = controlled === undefined ? uncontrolled : controlled
70
+ return value !== null && labels.includes(value) ? value : null
71
+ })()
72
+ const shown = selected === null ? items : items.filter((item) => item.label === selected)
73
+
74
+ function choose(label: string) {
75
+ const next = selected === label ? null : label
76
+ setUncontrolled(next)
77
+ setFilterings((count) => count + 1)
78
+ onValueChange?.(next)
79
+ }
80
+
81
+ return (
82
+ <section
83
+ {...attributes}
84
+ aria-labelledby={headingId}
85
+ {...styles.root({ className, style: props.style, vars })}
86
+ >
87
+ <div {...styles.sidebar()}>
88
+ <h2 id={headingId} {...styles.heading()}>
89
+ {heading}
90
+ </h2>
91
+ {filterable && labels.length > 0 && (
92
+ // Toggle buttons outside a form, so a named group rather than a fieldset.
93
+ // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role
94
+ <div aria-label={text.filters} role="group" {...styles.filters()}>
95
+ {labels.map((label) => (
96
+ <Tab
97
+ aria-controls={listId}
98
+ key={label}
99
+ onClick={() => choose(label)}
100
+ selected={selected === label}
101
+ size="small"
102
+ >
103
+ {label}
104
+ </Tab>
105
+ ))}
106
+ </div>
107
+ )}
108
+ {aside !== undefined && <div {...styles.aside()}>{aside}</div>}
109
+ </div>
110
+ <ul data-article-list={name ?? ''} id={listId} key={filterings} {...styles.list()}>
111
+ {shown.map((item, index) => (
112
+ <li
113
+ key={item.href}
114
+ {...styles.row({
115
+ enter: filterings > 0,
116
+ style: { '--i': Math.min(index, 7) } as CSSProperties,
117
+ })}
118
+ >
119
+ <Anchor data-article-link="" href={item.href} render={render} {...styles.link()}>
120
+ <div {...styles.meta()}>
121
+ {item.kind !== undefined && <span>{item.kind}</span>}
122
+ {item.date !== undefined && <time dateTime={item.dateTime}>{item.date}</time>}
123
+ {item.minutes !== undefined && (
124
+ <span>{text.minutes.replace('{minutes}', String(item.minutes))}</span>
125
+ )}
126
+ {item.label !== undefined && <Tag size="small">{item.label}</Tag>}
127
+ </div>
128
+ <div {...styles.titleRow()}>
129
+ <h3 {...styles.title()}>{item.title}</h3>
130
+ <span {...styles.cue()}>
131
+ <ChevronRight {...styles.chevron()} />
132
+ </span>
133
+ </div>
134
+ {item.description !== undefined && (
135
+ <p {...styles.description()}>{item.description}</p>
136
+ )}
137
+ </Anchor>
138
+ </li>
139
+ ))}
140
+ {shown.length === 0 && <li {...styles.empty()}>{text.empty}</li>}
141
+ </ul>
142
+ </section>
143
+ )
144
+ }
145
+
146
+ export namespace ArticleIndex {
147
+ /** One article row. */
148
+ export type Item = {
149
+ /** The publish date as it reads, such as Nov 12, 2026. Absent on an undated article. */
150
+ date?: string | undefined
151
+ /** The publish date as an ISO date for `<time>`, such as 2026-11-12. */
152
+ dateTime?: string | undefined
153
+ /** A line under the title, as on Reports. Absent by default. */
154
+ description?: ReactNode | undefined
155
+ /** The article's page. It also keys the row. */
156
+ href: string
157
+ /** The document type before the date, such as Report or Analysis. Absent by default. */
158
+ kind?: string | undefined
159
+ /** The article's one label, drawn as a `Tag` and offered as a filter, such as Product. */
160
+ label?: string | undefined
161
+ /** The reading time in minutes. Absent when unknown. */
162
+ minutes?: number | undefined
163
+ /** The article's title, in sentence case. */
164
+ title: string
165
+ }
166
+
167
+ /** The index's own words, each with an English default. */
168
+ export type Messages = {
169
+ /**
170
+ * The row that shows when a filter leaves no article.
171
+ *
172
+ * @default 'No articles found.'
173
+ */
174
+ empty?: string | undefined
175
+ /**
176
+ * The name of the group of filters.
177
+ *
178
+ * @default 'Filter posts by category'
179
+ */
180
+ filters?: string | undefined
181
+ /**
182
+ * The reading time, where `{minutes}` stands for the number.
183
+ *
184
+ * @default '{minutes} min'
185
+ */
186
+ minutes?: string | undefined
187
+ }
188
+
189
+ export type Props = Omit<ComponentPropsWithRef<'section'>, 'children' | 'defaultValue'> &
190
+ zyzz.Props.Variants<typeof styles.root> & {
191
+ /** A block under the filters, such as a newsletter signup. Absent by default. */
192
+ aside?: ReactNode | undefined
193
+ /** The label shown at first, when `value` is not set. `null` shows every article. */
194
+ defaultValue?: string | null | undefined
195
+ /**
196
+ * Offers each label as a filter.
197
+ *
198
+ * @default true
199
+ */
200
+ filterable?: boolean | undefined
201
+ /** The `<h2>` that names the section, such as Latest posts. */
202
+ heading: ReactNode
203
+ /** The articles, newest first. */
204
+ items: readonly Item[]
205
+ /** Replaces the index's English words. */
206
+ messages?: Messages | undefined
207
+ /**
208
+ * Names the list, such as `blog`: its `id` becomes `blog-articles` and its
209
+ * `data-article-list` takes the name, so links, filters elsewhere and scripts can reach it.
210
+ * The name is one token without spaces, unique on the page. Absent or empty, the list takes
211
+ * a generated `id` and an empty `data-article-list`.
212
+ */
213
+ name?: string | undefined
214
+ /** Called with the label a filter press shows, or `null` when it shows every article. */
215
+ onValueChange?: ((value: string | null) => void) | undefined
216
+ /** Renders every row's link, such as `<NextLink href="" />` for client-side routing. */
217
+ render?: useRender.ComponentProps<'a'>['render']
218
+ /** The label shown, for a controlled index. `null` shows every article. */
219
+ value?: string | null | undefined
220
+ }
221
+ }
222
+
223
+ /** A link that a caller's `render` can replace, such as with a router link. */
224
+ function Anchor(props: useRender.ComponentProps<'a'>) {
225
+ const { ref, render, ...attributes } = props
226
+
227
+ return useRender({ defaultTagName: 'a', props: attributes, ref, render: Links.shared(render) })
228
+ }
229
+
230
+ // Rows a filter brings in rise 8px into place.
231
+ const rise = keyframes(
232
+ { from: { opacity: '0 !custom', translate: '0 8px !custom' } },
233
+ { id: 'tds/marketing/article-index/rise' },
234
+ )
235
+
236
+ namespace styles {
237
+ // A hairline rules the block off the filters.
238
+ export const aside = style(
239
+ {
240
+ borderBlockStartColor: 'line.secondary',
241
+ borderBlockStartStyle: 'solid',
242
+ borderBlockStartWidth: 'regular',
243
+ marginBlockStart: '48',
244
+ paddingBlockStart: '24',
245
+ '@media >=1024': { marginInlineEnd: '40' },
246
+ },
247
+ { id: 'tds/marketing/article-index/aside' },
248
+ )
249
+
250
+ // The chevron shows from 1024px on hover and keyboard focus, fading in at the hover-in pace and
251
+ // out at the hover-out pace.
252
+ export const chevron = style(
253
+ {
254
+ color: 'content.tertiary',
255
+ fontSize: '24px !custom',
256
+ opacity: 'full',
257
+ transitionDuration: 'hoverOut',
258
+ transitionProperty: 'opacity !custom',
259
+ transitionTimingFunction: 'standard',
260
+ '@media >=1024': {
261
+ opacity: '0 !custom',
262
+ selectors: {
263
+ '[data-article-link]:focus-visible &': { opacity: 'full', transitionDuration: 'hoverIn' },
264
+ },
265
+ },
266
+ '@media (hover: hover) and (pointer: fine) and (min-width: 1024px)': {
267
+ selectors: {
268
+ '[data-article-link]:hover &': { opacity: 'full', transitionDuration: 'hoverIn' },
269
+ },
270
+ },
271
+ },
272
+ { id: 'tds/marketing/article-index/chevron' },
273
+ )
274
+
275
+ // One title line tall, so the chevron centers on the first line of a wrapped title.
276
+ export const cue = style(
277
+ {
278
+ alignItems: 'center',
279
+ display: 'flex',
280
+ flexShrink: '0 !custom',
281
+ height: '1lh !custom',
282
+ typography: 'heading.h3',
283
+ },
284
+ { id: 'tds/marketing/article-index/cue' },
285
+ )
286
+
287
+ export const description = style(
288
+ {
289
+ color: 'content.secondary',
290
+ margin: '0',
291
+ marginBlockStart: '12',
292
+ maxWidth: '600',
293
+ typography: 'body.b1',
294
+ },
295
+ { id: 'tds/marketing/article-index/description' },
296
+ )
297
+
298
+ export const empty = style(
299
+ { color: 'content.secondary', paddingBlock: '32', typography: 'body.b1' },
300
+ { id: 'tds/marketing/article-index/empty' },
301
+ )
302
+
303
+ export const filters = style(
304
+ {
305
+ display: 'flex',
306
+ flexWrap: 'wrap',
307
+ gap: '8',
308
+ '@media >=1024': { paddingInlineEnd: '40' },
309
+ },
310
+ { id: 'tds/marketing/article-index/filters' },
311
+ )
312
+
313
+ // 32px above the filters, and 40px from 1024px. None when it stands alone.
314
+ export const heading = style(
315
+ {
316
+ color: 'content.primary',
317
+ margin: '0',
318
+ marginBlockEnd: '32',
319
+ typography: 'heading.h2',
320
+ selectors: { '&:last-child': { marginBlockEnd: '0' } },
321
+ '@media >=1024': { marginBlockEnd: '40' },
322
+ },
323
+ { id: 'tds/marketing/article-index/heading' },
324
+ )
325
+
326
+ export const link = style(
327
+ {
328
+ borderRadius: 'xs',
329
+ color: 'inherit !custom',
330
+ display: 'block',
331
+ opacity: 'full',
332
+ outlineColor: 'neutral.100',
333
+ outlineOffset: 'ring',
334
+ outlineStyle: 'none',
335
+ outlineWidth: 'ring',
336
+ paddingBlock: '32',
337
+ textDecoration: 'none !custom',
338
+ transitionDuration: 'hoverOut',
339
+ transitionProperty: 'opacity !custom',
340
+ transitionTimingFunction: 'standard',
341
+ selectors: {
342
+ 'li:first-child > &': { paddingBlockStart: '0' },
343
+ '&:active': { opacity: 'press', transitionDuration: 'press' },
344
+ '&:focus-visible': { outlineStyle: 'solid' },
345
+ },
346
+ '@media >=768': { paddingBlock: '40' },
347
+ '@media (forced-colors: active)': {
348
+ selectors: { '&:focus-visible': { outlineColor: 'Highlight !custom' } },
349
+ },
350
+ },
351
+ { id: 'tds/marketing/article-index/link' },
352
+ )
353
+
354
+ export const list = style(
355
+ {
356
+ listStyle: 'none !custom',
357
+ margin: '0',
358
+ minWidth: '0 !custom',
359
+ padding: '0',
360
+ '@media >=1024': { gridColumn: 'span 8 !custom' },
361
+ },
362
+ { id: 'tds/marketing/article-index/list' },
363
+ )
364
+
365
+ // Date, read time, then the label. Content secondary holds 4.5:1 on the page.
366
+ export const meta = style(
367
+ {
368
+ alignItems: 'center',
369
+ color: 'content.secondary',
370
+ display: 'flex',
371
+ flexWrap: 'wrap',
372
+ gap: '16',
373
+ marginBlockEnd: '16',
374
+ typography: 'body.b2',
375
+ },
376
+ { id: 'tds/marketing/article-index/meta' },
377
+ )
378
+
379
+ // One column, then the 12-column page grid from 1024px, on the page gutter.
380
+ export const root = variants(
381
+ {
382
+ base: {
383
+ alignItems: 'start',
384
+ display: 'grid',
385
+ gap: 'page.gutter',
386
+ gridTemplateColumns: 'minmax(0, 1fr) !custom',
387
+ '@media >=1024': { gridTemplateColumns: 'repeat(12, minmax(0, 1fr)) !custom' },
388
+ },
389
+ },
390
+ { id: 'tds/marketing/article-index' },
391
+ )
392
+
393
+ // Rows ruled by hairlines. From 1024px, while the pointer is on a row the others recede at the
394
+ // hover-in pace, and come back at the hover-out pace.
395
+ export const row = variants(
396
+ {
397
+ base: {
398
+ borderBlockStartColor: 'line.secondary',
399
+ borderBlockStartStyle: 'solid',
400
+ borderBlockStartWidth: 'regular',
401
+ opacity: 'full',
402
+ transitionDuration: 'hoverOut',
403
+ transitionProperty: 'opacity !custom',
404
+ transitionTimingFunction: 'standard',
405
+ selectors: { '&:first-child': { borderBlockStartWidth: 'none' } },
406
+ '@media (hover: hover) and (pointer: fine) and (min-width: 1024px)': {
407
+ selectors: {
408
+ '[data-article-list]:hover > &:not(:hover, :focus-within)': {
409
+ opacity: 'recede',
410
+ transitionDuration: 'hoverIn',
411
+ },
412
+ },
413
+ },
414
+ },
415
+ defaultVariants: { enter: false },
416
+ variants: {
417
+ // The rows a filter brings in rise a few at a time. They hold the first frame only while
418
+ // they wait their turn, so their hover fade runs once they land.
419
+ enter: {
420
+ false: {},
421
+ true: {
422
+ '@media (prefers-reduced-motion: no-preference)': {
423
+ animation: `${rise} 300ms ${vars.ease.enter} backwards !custom`,
424
+ animationDelay: 'calc(var(--i, 0) * 25ms) !custom',
425
+ },
426
+ },
427
+ },
428
+ },
429
+ },
430
+ { id: 'tds/marketing/article-index/row' },
431
+ )
432
+
433
+ // Under 1024px the sidebar stacks over the list, 20px above it beside the page gutter. From
434
+ // 1024px it spans four columns and stays in view under the fixed navigation.
435
+ export const sidebar = style(
436
+ {
437
+ paddingBlockEnd: '20',
438
+ '@media >=1024': {
439
+ gridColumn: 'span 4 !custom',
440
+ paddingBlockEnd: '0',
441
+ position: 'sticky',
442
+ top: '128px !custom',
443
+ },
444
+ },
445
+ { id: 'tds/marketing/article-index/sidebar' },
446
+ )
447
+
448
+ export const title = style(
449
+ { color: 'content.primary', margin: '0', typography: 'heading.h3' },
450
+ { id: 'tds/marketing/article-index/title' },
451
+ )
452
+
453
+ export const titleRow = style(
454
+ { alignItems: 'flex-start', display: 'flex', gap: '16', justifyContent: 'space-between' },
455
+ { id: 'tds/marketing/article-index/title-row' },
456
+ )
457
+ }