@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,448 @@
1
+ /** Renders the Marketing partners index: the partners or assets a page covers, as cards with filters. @module */
2
+ import { useRender } from '@base-ui/react/use-render'
3
+ import { type ComponentPropsWithRef, type CSSProperties, type ReactNode, useState } from 'react'
4
+ import type * as zyzz from 'zyzz'
5
+ import { keyframes } from 'zyzz/web'
6
+ import { ArrowUpRight } from '../icons/ArrowUpRight.js'
7
+ import { ChevronRight } from '../icons/ChevronRight.js'
8
+ import { style, variants, vars } from '../zyzz.config.js'
9
+ import { Button } from './Button.js'
10
+ import { Tab } from './Tab.js'
11
+ import * as Links from './internal/Links.js'
12
+
13
+ /**
14
+ * A grid of white cards, each one link to a partner or asset, under one row of category filters.
15
+ * Each filter is a `Tab` in a named group: All lists every partner, and a category lists its own.
16
+ * The row never wraps and scrolls sideways where it is wider than the column. The grid shows a page
17
+ * of cards at a time, and Show more adds the next page. Cards rise into place as they mount.
18
+ *
19
+ * - Use it for every partner on the Partners index, filtered by category, or for the providers that
20
+ * carry an asset.
21
+ * - Pass each partner's mark as a `SymbolTile` in `logo`.
22
+ * - Set `size="large"` for a short list read card by card, and leave `compact` for a long list to
23
+ * scan.
24
+ * - Pass `render` for router links, such as `<NextLink href="" />`. A card whose `href` starts with
25
+ * `http` opens in a new tab and ends in an arrow up right.
26
+ *
27
+ * @example
28
+ * <PartnersIndex
29
+ * categories={[{ label: 'Wallets', value: 'wallets' }]}
30
+ * items={[{ categories: ['wallets'], href: '/partners/acme', line: 'Wallets for teams.', name: 'Acme' }]}
31
+ * />
32
+ *
33
+ * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/button/ | WAI-ARIA APG Button pattern (toggle button)}
34
+ */
35
+ export function PartnersIndex(props: PartnersIndex.Props) {
36
+ const {
37
+ categories = [],
38
+ className,
39
+ defaultValue = null,
40
+ items,
41
+ messages,
42
+ onValueChange,
43
+ pageSize = 12,
44
+ render,
45
+ size,
46
+ value: controlled,
47
+ vars,
48
+ ...attributes
49
+ } = props
50
+
51
+ const text = {
52
+ all: messages?.all ?? 'All',
53
+ empty: messages?.empty ?? 'No partners match these filters.',
54
+ filters: messages?.filters ?? 'Filter by category',
55
+ more: messages?.more ?? 'Show {count} more',
56
+ newTab: messages?.newTab ?? '(opens in a new tab)',
57
+ }
58
+ const [uncontrolled, setUncontrolled] = useState<string | null>(defaultValue)
59
+ const [shown, setShown] = useState(pageSize)
60
+
61
+ const selected = controlled === undefined ? uncontrolled : controlled
62
+ const listed =
63
+ selected === null ? items : items.filter((item) => item.categories.includes(selected))
64
+ const rest = Math.min(pageSize, listed.length - shown)
65
+
66
+ // A change of category starts again from the first page.
67
+ function choose(next: string | null) {
68
+ if (next === selected) return
69
+ setUncontrolled(next)
70
+ setShown(pageSize)
71
+ onValueChange?.(next)
72
+ }
73
+
74
+ return (
75
+ <div {...attributes} {...styles.root({ className, size, style: props.style, vars })}>
76
+ {categories.length > 0 && (
77
+ // Toggle buttons outside a form, so a named group rather than a fieldset.
78
+ // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role
79
+ <div aria-label={text.filters} role="group" {...styles.filters()}>
80
+ <Tab onClick={() => choose(null)} selected={selected === null} size="large">
81
+ {text.all}
82
+ </Tab>
83
+ {categories.map((category) => (
84
+ <Tab
85
+ key={category.value}
86
+ onClick={() => choose(category.value)}
87
+ selected={selected === category.value}
88
+ size="large"
89
+ >
90
+ {category.label}
91
+ </Tab>
92
+ ))}
93
+ </div>
94
+ )}
95
+ <div>
96
+ <ul {...styles.grid()}>
97
+ {listed.slice(0, shown).map((item, index) => {
98
+ const external = /^https?:/.test(item.href)
99
+ const Cue = external ? ArrowUpRight : ChevronRight
100
+
101
+ return (
102
+ <li
103
+ key={item.href}
104
+ {...styles.item({ style: { '--i': Math.min(index, 7) } as CSSProperties })}
105
+ >
106
+ <Anchor
107
+ href={item.href}
108
+ render={render}
109
+ {...(external ? { rel: 'noreferrer', target: '_blank' } : {})}
110
+ {...styles.card({ size })}
111
+ >
112
+ {item.logo}
113
+ <span {...styles.copy({ size })}>
114
+ <span {...styles.name({ size })}>
115
+ {item.name}
116
+ <Cue {...styles.cue()} />
117
+ </span>
118
+ <span {...styles.line({ size })}>{item.line}</span>
119
+ </span>
120
+ {external && <span {...styles.hidden()}> {text.newTab}</span>}
121
+ </Anchor>
122
+ </li>
123
+ )
124
+ })}
125
+ </ul>
126
+ {listed.length === 0 && <p {...styles.empty()}>{text.empty}</p>}
127
+ {rest > 0 && (
128
+ <div {...styles.more()}>
129
+ <Button onClick={() => setShown(shown + pageSize)} variant="secondary">
130
+ {text.more.replace('{count}', String(rest))}
131
+ </Button>
132
+ </div>
133
+ )}
134
+ </div>
135
+ </div>
136
+ )
137
+ }
138
+
139
+ export namespace PartnersIndex {
140
+ /** One filter. */
141
+ export type Category = {
142
+ /** The filter's text, such as Wallets & custody. */
143
+ label: string
144
+ /** Identifies the category in an item's `categories` and in `value`. */
145
+ value: string
146
+ }
147
+
148
+ /** One partner or asset card. */
149
+ export type Item = {
150
+ /** The `value` of each category that lists it. */
151
+ categories: readonly string[]
152
+ /** The partner's page, or its own site when it starts with `http`. It also keys the card. */
153
+ href: string
154
+ /** What the partner does for a business on Tempo, in one line. It clamps at two lines. */
155
+ line: string
156
+ /** The partner's mark, as a `SymbolTile`. Absent by default. */
157
+ logo?: ReactNode | undefined
158
+ /** The partner's name. */
159
+ name: string
160
+ }
161
+
162
+ /** The index's own words, each with an English default. */
163
+ export type Messages = {
164
+ /**
165
+ * The filter that lists every partner.
166
+ *
167
+ * @default 'All'
168
+ */
169
+ all?: string | undefined
170
+ /**
171
+ * The line that shows when a category lists no partner.
172
+ *
173
+ * @default 'No partners match these filters.'
174
+ */
175
+ empty?: string | undefined
176
+ /**
177
+ * The name of the group of filters.
178
+ *
179
+ * @default 'Filter by category'
180
+ */
181
+ filters?: string | undefined
182
+ /**
183
+ * The button that adds the next page, where `{count}` stands for the cards it adds.
184
+ *
185
+ * @default 'Show {count} more'
186
+ */
187
+ more?: string | undefined
188
+ /**
189
+ * The hidden end of the name of a card that opens another site in a new tab.
190
+ *
191
+ * @default '(opens in a new tab)'
192
+ */
193
+ newTab?: string | undefined
194
+ }
195
+
196
+ export type Props = Omit<ComponentPropsWithRef<'div'>, 'children' | 'defaultValue'> &
197
+ zyzz.Props.Variants<typeof styles.root> & {
198
+ /** The filters, in order, after All. Without them there is no filter row. */
199
+ categories?: readonly Category[] | undefined
200
+ /** The category listed at first, when `value` is not set. `null` lists every partner. */
201
+ defaultValue?: string | null | undefined
202
+ /** The partners, in the order the grid lists them. */
203
+ items: readonly Item[]
204
+ /** Replaces the index's English words. */
205
+ messages?: Messages | undefined
206
+ /** Called with the category a filter press lists, or `null` for All. */
207
+ onValueChange?: ((value: string | null) => void) | undefined
208
+ /**
209
+ * The cards per page. Show more adds this many.
210
+ *
211
+ * @default 12
212
+ */
213
+ pageSize?: number | undefined
214
+ /** Renders every card's link, such as `<NextLink href="" />` for client-side routing. */
215
+ render?: useRender.ComponentProps<'a'>['render']
216
+ /** The category listed, for a controlled index. `null` lists every partner. */
217
+ value?: string | null | undefined
218
+ }
219
+ }
220
+
221
+ /** A link that a caller's `render` can replace, such as with a router link. */
222
+ function Anchor(props: useRender.ComponentProps<'a'>) {
223
+ const { ref, render, ...attributes } = props
224
+
225
+ return useRender({ defaultTagName: 'a', props: attributes, ref, render: Links.shared(render) })
226
+ }
227
+
228
+ // Cards rise 8px into place as they mount, on load and as a filter or Show more brings them in.
229
+ const rise = keyframes(
230
+ { from: { opacity: '0 !custom', translate: '0 8px !custom' } },
231
+ { id: 'tds/marketing/partners-index/rise' },
232
+ )
233
+
234
+ namespace styles {
235
+ // A white tile, the whole of it one link. On a fine pointer hover nudges the cue toward where the
236
+ // link goes and darkens it, and a press dims the card to 72%. Keyboard focus draws the ring outside
237
+ // its corner.
238
+ export const card = variants(
239
+ {
240
+ base: {
241
+ backgroundColor: 'background.secondary',
242
+ boxSizing: 'border-box',
243
+ color: 'content.primary',
244
+ display: 'flex',
245
+ height: '100% !custom',
246
+ opacity: 'full',
247
+ outlineColor: 'neutral.100',
248
+ outlineOffset: 'ring',
249
+ outlineStyle: 'none',
250
+ outlineWidth: 'ring',
251
+ textDecoration: 'none !custom',
252
+ transitionDuration: 'hoverOut',
253
+ transitionProperty: 'opacity !custom',
254
+ transitionTimingFunction: 'standard',
255
+ width: '100% !custom',
256
+ selectors: {
257
+ '&:active': { opacity: 'pressSurface', transitionDuration: 'press' },
258
+ '&:focus-visible': { outlineStyle: 'solid' },
259
+ },
260
+ // Forced colors drop the white fill, so an edge draws the card.
261
+ '@media (forced-colors: active)': {
262
+ borderColor: 'CanvasText !custom',
263
+ borderStyle: 'solid',
264
+ borderWidth: 'regular',
265
+ selectors: { '&:focus-visible': { outlineColor: 'Highlight !custom' } },
266
+ },
267
+ },
268
+ defaultVariants: { size: 'compact' },
269
+ variants: {
270
+ size: {
271
+ // The mark leads, top-aligned with the copy, so names line up across a row.
272
+ compact: {
273
+ alignItems: 'flex-start',
274
+ borderRadius: 'sm',
275
+ gap: '16',
276
+ padding: '16',
277
+ '@media >=768': { padding: '20' },
278
+ },
279
+ // The mark on top and the copy at the foot.
280
+ large: {
281
+ alignItems: 'flex-start',
282
+ borderRadius: 'md',
283
+ flexDirection: 'column',
284
+ gap: '24',
285
+ padding: '24',
286
+ '@media >=768': { borderRadius: 'lg', gap: '32', padding: '32' },
287
+ },
288
+ },
289
+ },
290
+ },
291
+ { id: 'tds/marketing/partners-index/card' },
292
+ )
293
+
294
+ export const copy = variants(
295
+ {
296
+ base: { display: 'flex', flexDirection: 'column', minWidth: '0 !custom' },
297
+ defaultVariants: { size: 'compact' },
298
+ variants: {
299
+ size: {
300
+ compact: { gap: '2' },
301
+ large: { gap: 'textPair.h4B1', marginBlockStart: 'auto !custom' },
302
+ },
303
+ },
304
+ },
305
+ { id: 'tds/marketing/partners-index/copy' },
306
+ )
307
+
308
+ // The cue nudges toward where the link goes and darkens, out and back at the state pace. Under
309
+ // reduced motion it only darkens.
310
+ export const cue = style(
311
+ {
312
+ color: 'content.tertiary',
313
+ flexShrink: '0 !custom',
314
+ fontSize: '16px !custom',
315
+ transitionDuration: 'state',
316
+ transitionProperty: 'translate, color !custom',
317
+ transitionTimingFunction: 'standard',
318
+ selectors: { ':dir(rtl) &': { scale: '-1 1 !custom' } },
319
+ '@media (hover: hover) and (pointer: fine)': {
320
+ selectors: { 'a:hover &': { color: 'neutral.100', translate: 'nudge' } },
321
+ },
322
+ },
323
+ { id: 'tds/marketing/partners-index/cue' },
324
+ )
325
+
326
+ export const empty = style(
327
+ {
328
+ color: 'content.secondary',
329
+ margin: '0',
330
+ maxWidth: '320',
331
+ paddingBlock: '24',
332
+ typography: 'body.b2',
333
+ },
334
+ { id: 'tds/marketing/partners-index/empty' },
335
+ )
336
+
337
+ // One row that never wraps, so no filter is left alone on a second line. Where the row is wider
338
+ // than the column it scrolls sideways, with room inside it for the focus ring.
339
+ export const filters = style(
340
+ {
341
+ display: 'flex',
342
+ gap: '8',
343
+ marginBlock: '-6px !custom',
344
+ marginInline: '-6px !custom',
345
+ minWidth: '0 !custom',
346
+ overflowX: 'auto',
347
+ paddingBlock: '6px !custom',
348
+ paddingInline: '6px !custom',
349
+ scrollbarWidth: 'none',
350
+ '@media >=1024': { selectors: { '& > button': { paddingInline: '24' } } },
351
+ },
352
+ { id: 'tds/marketing/partners-index/filters' },
353
+ )
354
+
355
+ export const grid = style(
356
+ {
357
+ display: 'grid',
358
+ gap: '24',
359
+ gridTemplateColumns: 'minmax(0, 1fr) !custom',
360
+ listStyle: 'none !custom',
361
+ margin: '0',
362
+ padding: '0',
363
+ '@media >=768': { gridTemplateColumns: 'repeat(2, minmax(0, 1fr)) !custom' },
364
+ '@media >=1024': { gridTemplateColumns: 'repeat(3, minmax(0, 1fr)) !custom' },
365
+ '@media >=1512': { gridTemplateColumns: 'repeat(4, minmax(0, 1fr)) !custom' },
366
+ },
367
+ { id: 'tds/marketing/partners-index/grid' },
368
+ )
369
+
370
+ export const hidden = style(
371
+ {
372
+ clip: 'rect(0 0 0 0) !custom',
373
+ height: '1px !custom',
374
+ overflow: 'hidden',
375
+ position: 'absolute',
376
+ whiteSpace: 'nowrap',
377
+ width: '1px !custom',
378
+ },
379
+ { id: 'tds/marketing/partners-index/hidden' },
380
+ )
381
+
382
+ // A few cards at a time, 25ms apart, eight at most.
383
+ export const item = style(
384
+ {
385
+ '@media (prefers-reduced-motion: no-preference)': {
386
+ animation: `${rise} 300ms ${vars.ease.enter} both !custom`,
387
+ animationDelay: 'calc(var(--i, 0) * 25ms) !custom',
388
+ },
389
+ },
390
+ { id: 'tds/marketing/partners-index/item' },
391
+ )
392
+
393
+ // Two lines at most.
394
+ export const line = variants(
395
+ {
396
+ base: {
397
+ color: 'content.secondary',
398
+ display: '-webkit-box !custom',
399
+ overflow: 'hidden',
400
+ textWrap: 'pretty',
401
+ typography: 'body.b2',
402
+ WebkitBoxOrient: 'vertical',
403
+ WebkitLineClamp: '2 !custom',
404
+ },
405
+ defaultVariants: { size: 'compact' },
406
+ variants: { size: { compact: {}, large: { maxWidth: '320' } } },
407
+ },
408
+ { id: 'tds/marketing/partners-index/line' },
409
+ )
410
+
411
+ export const more = style(
412
+ { display: 'flex', justifyContent: 'center', paddingBlockStart: '32' },
413
+ { id: 'tds/marketing/partners-index/more' },
414
+ )
415
+
416
+ export const name = variants(
417
+ {
418
+ base: { alignItems: 'center', display: 'inline-flex', gap: '2' },
419
+ defaultVariants: { size: 'compact' },
420
+ variants: {
421
+ size: { compact: { typography: 'body.b1' }, large: { typography: 'heading.h4' } },
422
+ },
423
+ },
424
+ { id: 'tds/marketing/partners-index/name' },
425
+ )
426
+
427
+ export const root = variants(
428
+ {
429
+ base: {
430
+ display: 'flex',
431
+ flexDirection: 'column',
432
+ gap: 'layoutGap.content',
433
+ minWidth: '0 !custom',
434
+ },
435
+ defaultVariants: { size: 'compact' },
436
+ variants: {
437
+ /**
438
+ * The cards: `compact`, the mark beside the name over its line, for a long list to scan, or
439
+ * `large`, the mark over the name and line with room for each, for a short list.
440
+ *
441
+ * @default 'compact'
442
+ */
443
+ size: { compact: {}, large: {} },
444
+ },
445
+ },
446
+ { id: 'tds/marketing/partners-index' },
447
+ )
448
+ }