@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,89 @@
1
+ /** Renders a partner's mark on a square tile in its brand color. @module */
2
+ import type { ComponentPropsWithRef } from 'react'
3
+ import type * as zyzz from 'zyzz'
4
+ import { variants } from '../zyzz.config.js'
5
+
6
+ /**
7
+ * A partner's own mark on a square tile in its brand color: 40px on cards and rows, or 64px beside
8
+ * a profile's title. The mark, an `img` or an inline SVG, fills the whole tile, so it sits where
9
+ * its drawing puts it. A tile without a `color` keeps the 4% grey. It is decorative and always
10
+ * hidden from assistive technology, so the partner's name follows it as text. Forced colors leave
11
+ * the tile and its mark as they are, as they leave an image. It has no states or motion.
12
+ *
13
+ * - Set `color` to the partner's brand color, and `mark` to `light` when the tile is dark, so an
14
+ * inline SVG drawn in `currentColor` turns white.
15
+ * - Use the partner's own vector mark, never a traced picture.
16
+ * - Use `Logo` or `Mark` for Tempo's own marks.
17
+ *
18
+ * @example
19
+ * <SymbolTile color="#363ff9" mark="light">
20
+ * <img alt="" src="/partners/alchemy.svg" />
21
+ * </SymbolTile>
22
+ */
23
+ export function SymbolTile(props: SymbolTile.Props) {
24
+ const { className, color, mark, size, vars, ...attributes } = props
25
+
26
+ return (
27
+ <span
28
+ {...attributes}
29
+ {...styles.root({
30
+ className,
31
+ mark,
32
+ size,
33
+ style: color === undefined ? props.style : { backgroundColor: color, ...props.style },
34
+ vars,
35
+ })}
36
+ aria-hidden="true"
37
+ />
38
+ )
39
+ }
40
+
41
+ export namespace SymbolTile {
42
+ export type Props = Omit<ComponentPropsWithRef<'span'>, 'aria-hidden' | 'color'> &
43
+ zyzz.Props.Variants<typeof styles.root> & {
44
+ /** The partner's brand color, such as `#363ff9`. Without it, the tile keeps the 4% grey. */
45
+ color?: string | undefined
46
+ }
47
+ }
48
+
49
+ namespace styles {
50
+ export const root = variants(
51
+ {
52
+ base: {
53
+ backgroundColor: 'container.control',
54
+ display: 'block',
55
+ flexShrink: '0 !custom',
56
+ forcedColorAdjust: 'none',
57
+ overflow: 'hidden',
58
+ // The mark is drawn across the whole tile.
59
+ selectors: {
60
+ '& > *': { display: 'block', height: '100% !custom', width: '100% !custom' },
61
+ },
62
+ },
63
+ defaultVariants: { mark: 'dark', size: 'small' },
64
+ variants: {
65
+ /**
66
+ * The color a one-color mark drawn in `currentColor` takes: black on a light tile, or white
67
+ * on a dark one. A mark in its own colors keeps them.
68
+ *
69
+ * @default 'dark'
70
+ */
71
+ mark: {
72
+ dark: { color: 'neutral.100' },
73
+ light: { color: 'neutral.000' },
74
+ },
75
+ /**
76
+ * The tile's size: `small` is 40px with 8px corners on cards and rows, and `large` 64px with
77
+ * 12px corners beside a profile's title.
78
+ *
79
+ * @default 'small'
80
+ */
81
+ size: {
82
+ large: { borderRadius: 'xs', height: '64', width: '64' },
83
+ small: { borderRadius: '2xs', height: '40', width: '40' },
84
+ },
85
+ },
86
+ },
87
+ { id: 'tds/marketing/symbol-tile' },
88
+ )
89
+ }
@@ -0,0 +1,306 @@
1
+ /** Renders Marketing toggle buttons for a choice that changes a page in place, such as a filter. @module */
2
+ import * as BaseUi from '@base-ui/react/toggle'
3
+ import type { ComponentPropsWithRef } from 'react'
4
+ import type * as zyzz from 'zyzz'
5
+ import { variants, vars } from '../zyzz.config.js'
6
+
7
+ /**
8
+ * A native toggle `<button>` that reports its state with `aria-pressed`, built on Base UI Toggle.
9
+ * It is never a tab in a tablist, so it has no arrow keys and each tab is its own stop in the tab
10
+ * order. On a fine pointer, hover eases a tint onto an unselected tab. A press deepens the tint, or
11
+ * dims a selected tab.
12
+ *
13
+ * - Use `Tab` for a choice that changes what a page shows in place, such as an index's filters.
14
+ * - Set the row in a named group, such as `role="group"` with `aria-label="Filter posts by
15
+ * category"`.
16
+ * - Let a visitor clear a filter, with a second press on the selected tab or an All tab first.
17
+ * - Set `size` by place: `small` for an index's filters, and `medium` or `large` for a directory's
18
+ * rows.
19
+ * - Set `appearance="inverse"` in a dark section and `appearance="overlay"` over a photo or video.
20
+ * - Set `aria-disabled` to keep an unavailable tab focusable and named. A press then does nothing.
21
+ *
22
+ * @example
23
+ * <div aria-label="Filter posts by category" role="group">
24
+ * <Tab onPressedChange={() => setCategory('Partners')} selected={category === 'Partners'} size="small">
25
+ * Partners
26
+ * </Tab>
27
+ * </div>
28
+ *
29
+ * @see {@link https://base-ui.com/react/components/toggle | Base UI Toggle}
30
+ * @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/button/ | WAI-ARIA APG Button pattern (toggle button)}
31
+ * @see {@link https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html | WCAG 2.2 Target Size (Minimum)}
32
+ */
33
+ export function Tab(props: Tab.Props) {
34
+ const {
35
+ appearance,
36
+ className,
37
+ onClick,
38
+ onPressedChange,
39
+ selected = false,
40
+ size,
41
+ vars,
42
+ ...attributes
43
+ } = props
44
+
45
+ const inert = attributes['aria-disabled'] === true || attributes['aria-disabled'] === 'true'
46
+
47
+ // `selected` always controls Base UI's `pressed`, so a press on an inert tab changes nothing once
48
+ // its handlers are dropped.
49
+ return (
50
+ <BaseUi.Toggle
51
+ {...attributes}
52
+ {...styles.root({ appearance, className, size, style: props.style, vars })}
53
+ onClick={inert ? undefined : onClick}
54
+ onPressedChange={inert ? undefined : onPressedChange}
55
+ pressed={selected}
56
+ />
57
+ )
58
+ }
59
+
60
+ export namespace Tab {
61
+ export type Props = Omit<ComponentPropsWithRef<'button'>, 'role' | 'value'> &
62
+ zyzz.Props.Variants<typeof styles.root> &
63
+ Pick<BaseUi.Toggle.Props, 'onPressedChange' | 'value'> & {
64
+ /** A tab is a toggle, never a tab in a tablist. */
65
+ role?: never
66
+ /**
67
+ * Marks the chosen tab. It fills, black on the page and near-white on a dark ground or media,
68
+ * and reports `aria-pressed="true"`.
69
+ *
70
+ * @default false
71
+ */
72
+ selected?: boolean | undefined
73
+ }
74
+ }
75
+
76
+ namespace styles {
77
+ export const root = variants(
78
+ {
79
+ base: {
80
+ alignItems: 'center',
81
+ backgroundColor: 'container.control',
82
+ borderRadius: 'xs',
83
+ borderWidth: 'none',
84
+ boxSizing: 'border-box',
85
+ color: 'content.primary',
86
+ columnGap: '4',
87
+ cursor: 'pointer',
88
+ display: 'inline-flex',
89
+ flexShrink: '0 !custom',
90
+ justifyContent: 'center',
91
+ outlineColor: 'neutral.100',
92
+ outlineOffset: 'ring',
93
+ outlineStyle: 'none',
94
+ outlineWidth: 'ring',
95
+ paddingBlock: '4',
96
+ position: 'relative',
97
+ textAlign: 'center',
98
+ // At rest is where hover out and a release land.
99
+ transitionDuration: 'hoverOut',
100
+ transitionProperty: 'background-color, color, opacity !custom',
101
+ transitionTimingFunction: 'standard',
102
+ typography: 'body.b2',
103
+ whiteSpace: 'nowrap',
104
+ selectors: {
105
+ // A hit area that leaves the visible size alone. Centered, it grows toward 44px, but
106
+ // reaches at most 4px past an edge, half the 8px between tabs in a row.
107
+ '&::after': {
108
+ content: '"" !custom',
109
+ insetBlock: `max(-4px, min(0px, (100% - ${vars.spacing.hitMin}) / 2)) !custom`,
110
+ insetInline: `max(-4px, min(0px, (100% - ${vars.spacing.hitMin}) / 2)) !custom`,
111
+ position: 'absolute',
112
+ },
113
+ // Selecting is a toggle, so the fill changes at the state pace.
114
+ '&[data-pressed]': {
115
+ backgroundColor: 'neutral.100',
116
+ color: 'neutral.004',
117
+ transitionDuration: 'state',
118
+ },
119
+ '&:disabled': { cursor: 'not-allowed', opacity: 'disabled' },
120
+ // `aria-disabled` keeps the tab focusable, so its colors dim to 40% rather than the whole
121
+ // tab, which would dim its focus ring too. Each appearance dims its own rest colors.
122
+ '&[aria-disabled="true"]': { cursor: 'not-allowed' },
123
+ '&:active:not(:disabled, [aria-disabled="true"])': { transitionDuration: 'press' },
124
+ // Hover adds a tint, so a press deepens it a step instead of dimming it.
125
+ '&:active:not(:disabled, [aria-disabled="true"], [data-pressed])': {
126
+ backgroundColor: 'neutral.shade.020',
127
+ },
128
+ // A selected tab is a dark fill, so a press dims it, as it does a primary button.
129
+ '&[data-pressed]:active:not(:disabled, [aria-disabled="true"])': { opacity: 'press' },
130
+ '&:focus-visible': { outlineStyle: 'solid' },
131
+ },
132
+ '@media (forced-colors: none)': {
133
+ selectors: {
134
+ '&[aria-disabled="true"]': {
135
+ backgroundColor: `color-mix(in srgb, ${vars.color.container.control} 40%, transparent) !custom`,
136
+ color: 'content.tertiary',
137
+ },
138
+ // On the page a selected tab's label is the ground's color, so dimming its fill alone
139
+ // draws what dimming the whole tab would.
140
+ '&[data-pressed][aria-disabled="true"]': {
141
+ backgroundColor: 'neutral.shade.040',
142
+ color: 'neutral.004',
143
+ },
144
+ },
145
+ },
146
+ '@media (hover: hover) and (pointer: fine)': {
147
+ selectors: {
148
+ // The tint arrives at the hover-in pace.
149
+ '&:hover:not(:disabled, [aria-disabled="true"], :active, [data-pressed])': {
150
+ backgroundColor: 'neutral.shade.012',
151
+ transitionDuration: 'hoverIn',
152
+ },
153
+ // Under the pointer, selecting runs at the pace clearing does, so the toggle takes the
154
+ // same time both ways.
155
+ '&[data-pressed]:hover:not(:disabled, [aria-disabled="true"], :active)': {
156
+ transitionDuration: 'hoverIn',
157
+ },
158
+ },
159
+ },
160
+ // Forced colors drop fills, so an edge draws the tab.
161
+ '@media (forced-colors: active)': {
162
+ borderColor: 'ButtonText !custom',
163
+ borderStyle: 'solid',
164
+ borderWidth: 'regular',
165
+ selectors: {
166
+ '&:disabled, &[aria-disabled="true"]': {
167
+ borderColor: 'GrayText !custom',
168
+ color: 'GrayText !custom',
169
+ },
170
+ '&:focus-visible': { outlineColor: 'Highlight !custom' },
171
+ },
172
+ },
173
+ },
174
+ compoundVariants: [
175
+ // In forced colors the selected pill takes the system highlight on every appearance. It
176
+ // comes after the appearances' own selected fills, and opts out of the forced palette, which
177
+ // would drop it. An `aria-disabled` one keeps its ring at full strength and fills with
178
+ // GrayText instead.
179
+ {
180
+ when: { appearance: ['base', 'inverse', 'overlay'] },
181
+ style: {
182
+ '@media (forced-colors: active)': {
183
+ selectors: {
184
+ '&[data-pressed]': {
185
+ backgroundColor: 'Highlight !custom',
186
+ color: 'HighlightText !custom',
187
+ forcedColorAdjust: 'none',
188
+ },
189
+ '&[data-pressed][aria-disabled="true"]': {
190
+ backgroundColor: 'GrayText !custom',
191
+ color: 'Canvas !custom',
192
+ },
193
+ },
194
+ },
195
+ },
196
+ },
197
+ ],
198
+ defaultVariants: { appearance: 'base', size: 'medium' },
199
+ variants: {
200
+ /**
201
+ * The ground under the tab: the page for `base`, a dark section for `inverse`, and a photo
202
+ * or video for `overlay`. On both of the last two, a tab takes a white tint and a selected
203
+ * tab fills with the page's near-white.
204
+ *
205
+ * @default 'base'
206
+ */
207
+ appearance: {
208
+ base: {},
209
+ inverse: {
210
+ backgroundColor: 'inverse.container.control',
211
+ color: 'neutral.004',
212
+ outlineColor: 'neutral.004',
213
+ selectors: {
214
+ '&:active:not(:disabled, [aria-disabled="true"], [data-pressed])': {
215
+ backgroundColor: 'neutral.tint.028',
216
+ },
217
+ '&[data-pressed]': { backgroundColor: 'neutral.004', color: 'neutral.100' },
218
+ },
219
+ '@media (hover: hover) and (pointer: fine)': {
220
+ selectors: {
221
+ '&:hover:not(:disabled, [aria-disabled="true"], :active, [data-pressed])': {
222
+ backgroundColor: 'neutral.tint.020',
223
+ },
224
+ },
225
+ },
226
+ '@media (forced-colors: none)': {
227
+ selectors: {
228
+ '&[aria-disabled="true"]': {
229
+ backgroundColor: `color-mix(in srgb, ${vars.color.neutral.tint['012']} 40%, transparent) !custom`,
230
+ color: `color-mix(in srgb, ${vars.color.neutral['004']} 40%, transparent) !custom`,
231
+ },
232
+ '&[data-pressed][aria-disabled="true"]': {
233
+ backgroundColor: `color-mix(in srgb, ${vars.color.neutral['004']} 40%, transparent) !custom`,
234
+ color: 'neutral.100',
235
+ },
236
+ },
237
+ },
238
+ },
239
+ overlay: {
240
+ backdropFilter: `blur(${vars.blur.control}) !custom`,
241
+ backgroundColor: 'neutral.glass.032',
242
+ color: 'neutral.004',
243
+ outlineColor: 'neutral.004',
244
+ selectors: {
245
+ '&:active:not(:disabled, [aria-disabled="true"], [data-pressed])': {
246
+ backgroundColor: 'neutral.tint.028',
247
+ },
248
+ '&[data-pressed]': { backgroundColor: 'neutral.004', color: 'neutral.100' },
249
+ },
250
+ '@media (hover: hover) and (pointer: fine)': {
251
+ selectors: {
252
+ '&:hover:not(:disabled, [aria-disabled="true"], :active, [data-pressed])': {
253
+ backgroundColor: 'neutral.tint.020',
254
+ },
255
+ },
256
+ },
257
+ '@media (forced-colors: none)': {
258
+ selectors: {
259
+ // Over a photo or video the light ring is two-tone: a black hairline just inside
260
+ // it, on the tab's own corner, holds it to 3:1 on any picture.
261
+ '&:focus-visible::before': {
262
+ borderRadius: 'inherit !custom',
263
+ content: '"" !custom',
264
+ inset: '0',
265
+ outlineColor: 'content.primary',
266
+ outlineOffset: 'ringInline',
267
+ outlineStyle: 'solid',
268
+ outlineWidth: '1px !custom',
269
+ pointerEvents: 'none',
270
+ position: 'absolute',
271
+ },
272
+ // Over media the label is not the ground's color, so a selected tab dims its label
273
+ // with its fill.
274
+ '&[aria-disabled="true"]': {
275
+ backgroundColor: `color-mix(in srgb, ${vars.color.neutral.glass['032']} 40%, transparent) !custom`,
276
+ color: `color-mix(in srgb, ${vars.color.neutral['004']} 40%, transparent) !custom`,
277
+ },
278
+ '&[data-pressed][aria-disabled="true"]': {
279
+ backgroundColor: `color-mix(in srgb, ${vars.color.neutral['004']} 40%, transparent) !custom`,
280
+ color: 'neutral.shade.040',
281
+ },
282
+ },
283
+ },
284
+ },
285
+ },
286
+ /**
287
+ * The height and padding: `small` is 32px in Body B3 for an index's filters, `medium` 40px
288
+ * and `large` 48px in Body B2.
289
+ *
290
+ * @default 'medium'
291
+ */
292
+ size: {
293
+ large: { minHeight: '48', paddingInline: '32' },
294
+ medium: { minHeight: '40', paddingInline: '24' },
295
+ small: {
296
+ borderRadius: '2xs',
297
+ minHeight: '32',
298
+ paddingInline: '16',
299
+ typography: 'body.b3',
300
+ },
301
+ },
302
+ },
303
+ },
304
+ { id: 'tds/marketing/tab' },
305
+ )
306
+ }
@@ -0,0 +1,255 @@
1
+ /** Renders a page section that sets a few linked entries side by side, such as articles as cards. @module */
2
+ import { useRender } from '@base-ui/react/use-render'
3
+ import { type ReactNode, useId } from 'react'
4
+ import type * as zyzz from 'zyzz'
5
+ import { style, variants } from '../zyzz.config.js'
6
+ import { Section } from './Section.js'
7
+ import { SectionHeading } from './SectionHeading.js'
8
+
9
+ /**
10
+ * A page section that sets a few linked entries side by side under its heading. Renders a
11
+ * `Section` named by its title, over one column of `Table.Item`s, and three from 768px.
12
+ *
13
+ * The API is deliberately small: one `articles` variant, which links a few articles as cards, each
14
+ * with its title, a line and its label, as Home's Stablecoin basics and the related articles that
15
+ * close a blog post do. More variants join only once a page needs them.
16
+ *
17
+ * - Link three articles. Every article in a hub belongs in an article index.
18
+ * - Give every card an image, or none, so the row reads as one set.
19
+ * - Use Marketing `Card`s for linked cards that are not articles.
20
+ *
21
+ * @example
22
+ * <Table eyebrow="Stablecoin basics" title="Transform your business with stablecoins">
23
+ * <Table.Item href="/learn/what-are-stablecoins" label="Stablecoins" title="What are stablecoins?">
24
+ * Stablecoins settle instantly, 24/7, across borders.
25
+ * </Table.Item>
26
+ * </Table>
27
+ *
28
+ * @see {@link https://www.w3.org/WAI/WCAG22/Understanding/link-purpose-in-context.html | WCAG 2.2 Link Purpose (In Context)}
29
+ * @see {@link https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html | WCAG 2.2 Info and Relationships}
30
+ */
31
+ export function Table(props: Table.Props) {
32
+ const { action, children, description, eyebrow, title, titleId, variant, ...attributes } = props
33
+
34
+ const generated = useId()
35
+ const id = titleId ?? generated
36
+
37
+ return (
38
+ <Section aria-labelledby={id} {...attributes}>
39
+ <SectionHeading
40
+ description={description}
41
+ eyebrow={eyebrow}
42
+ subtitle="body"
43
+ title={title}
44
+ titleId={id}
45
+ >
46
+ {action}
47
+ </SectionHeading>
48
+ <div {...styles.root({ variant })}>{children}</div>
49
+ </Section>
50
+ )
51
+ }
52
+
53
+ export namespace Table {
54
+ export type Props = Omit<Section.Props, 'title'> &
55
+ Omit<zyzz.Props.Variants<typeof styles.root>, 'className' | 'style' | 'vars'> & {
56
+ /** The section's one action under the heading, such as a link to every article. */
57
+ action?: ReactNode | undefined
58
+ /** The entries, each a `Table.Item`. */
59
+ children: ReactNode
60
+ /** A line under the title, in Body B1. */
61
+ description?: ReactNode | undefined
62
+ /** A few uppercase words above the title that name the section, such as Stablecoin basics. */
63
+ eyebrow?: ReactNode | undefined
64
+ /** The `h2`, which names the section. */
65
+ title: ReactNode
66
+ /** The title's `id`. Absent by default, when the table generates one. */
67
+ titleId?: string | undefined
68
+ }
69
+
70
+ /**
71
+ * One article as a card that is one link: an optional 16:9 image, the title as an `h3`, a line,
72
+ * and the article's label. Renders an `article` around an `a`. `ref`, `className` and `style`
73
+ * reach the `a`. Pass `render` for a router link, such as `<NextLink href="/learn" />`.
74
+ *
75
+ * On a fine pointer, hover grows the image inside its frame. Focus grows it too, with the focus
76
+ * ring, and a press dims the card. Without an image the card sits under a hairline.
77
+ *
78
+ * @example
79
+ * <Table.Item href="/learn/stablecoins-for-business" label="Enterprise" title="Stablecoins for business">
80
+ * Faster payroll funding and cheaper cross-border payouts.
81
+ * </Table.Item>
82
+ */
83
+ export function Item(props: Item.Props) {
84
+ const { children, className, image, label, ref, render, title, vars, ...attributes } = props
85
+
86
+ return (
87
+ <article {...styles.item()}>
88
+ {useRender({
89
+ defaultTagName: 'a',
90
+ props: {
91
+ ...attributes,
92
+ ...styles.link({ className, media: Boolean(image), style: props.style, vars }),
93
+ children: (
94
+ <>
95
+ {image && (
96
+ <div aria-hidden="true" {...styles.image()}>
97
+ {image}
98
+ </div>
99
+ )}
100
+ <div {...styles.copy()}>
101
+ <h3 {...styles.title()}>{title}</h3>
102
+ {children && <p {...styles.text()}>{children}</p>}
103
+ {label && <p {...styles.label()}>{label}</p>}
104
+ </div>
105
+ </>
106
+ ),
107
+ },
108
+ ref,
109
+ render,
110
+ })}
111
+ </article>
112
+ )
113
+ }
114
+
115
+ export namespace Item {
116
+ export type Props = Omit<useRender.ComponentProps<'a'>, 'children' | 'title'> &
117
+ Omit<zyzz.Props.Variants<typeof styles.link>, 'media'> & {
118
+ /** One line on the article, in Body B2. */
119
+ children?: ReactNode | undefined
120
+ /** A decorative 16:9 image over the copy, such as an `img` with an empty `alt`. */
121
+ image?: ReactNode | undefined
122
+ /** The article's label under the line, such as its topic. */
123
+ label?: ReactNode | undefined
124
+ /** The article's title, set as an `h3`. */
125
+ title: ReactNode
126
+ }
127
+ }
128
+ }
129
+
130
+ namespace styles {
131
+ export const root = variants(
132
+ {
133
+ base: { display: 'grid', gridTemplateColumns: 'minmax(0, 1fr) !custom' },
134
+ defaultVariants: { variant: 'articles' },
135
+ variants: {
136
+ /**
137
+ * What the entries are: `articles` links a few articles as cards, 48px apart in a column and
138
+ * three across, 24px apart, from 768px.
139
+ *
140
+ * @default 'articles'
141
+ */
142
+ variant: {
143
+ articles: {
144
+ gap: '48',
145
+ '@media >=768': { gap: '24', gridTemplateColumns: 'repeat(3, minmax(0, 1fr)) !custom' },
146
+ },
147
+ },
148
+ },
149
+ },
150
+ { id: 'tds/marketing/table' },
151
+ )
152
+
153
+ export const copy = style({ maxWidth: '360' }, { id: 'tds/marketing/table/copy' })
154
+
155
+ // The image grows inside its frame at the media pace. Reduced motion holds its scale at 1.
156
+ export const image = style(
157
+ {
158
+ aspectRatio: '16 / 9 !custom',
159
+ borderRadius: 'sm',
160
+ overflow: 'hidden',
161
+ position: 'relative',
162
+ width: '100% !custom',
163
+ selectors: {
164
+ '& > *': {
165
+ display: 'block',
166
+ height: '100% !custom',
167
+ objectFit: 'cover',
168
+ transitionDuration: 'media',
169
+ transitionProperty: 'scale !custom',
170
+ transitionTimingFunction: 'standard',
171
+ width: '100% !custom',
172
+ },
173
+ 'a:focus-visible > & > *': { scale: 'mediaHover' },
174
+ },
175
+ '@media (hover: hover) and (pointer: fine)': {
176
+ selectors: { 'a:hover > & > *': { scale: 'mediaHover' } },
177
+ },
178
+ },
179
+ { id: 'tds/marketing/table/image' },
180
+ )
181
+
182
+ export const item = style({ display: 'flex', minWidth: '0' }, { id: 'tds/marketing/table/item' })
183
+
184
+ export const label = style(
185
+ {
186
+ color: 'content.secondary',
187
+ margin: '0',
188
+ marginBlockStart: '16',
189
+ textTransform: 'uppercase',
190
+ typography: 'utility.eyebrow',
191
+ },
192
+ { id: 'tds/marketing/table/label' },
193
+ )
194
+
195
+ export const link = variants(
196
+ {
197
+ base: {
198
+ color: 'inherit !custom',
199
+ display: 'flex',
200
+ flexDirection: 'column',
201
+ gap: '16',
202
+ opacity: 'full',
203
+ outlineColor: 'content.primary',
204
+ outlineOffset: 'ring',
205
+ outlineStyle: 'none',
206
+ outlineWidth: 'ring',
207
+ textDecoration: 'none !custom',
208
+ // At rest is where a release lands.
209
+ transitionDuration: 'hoverOut',
210
+ transitionProperty: 'opacity !custom',
211
+ transitionTimingFunction: 'standard',
212
+ width: '100% !custom',
213
+ selectors: {
214
+ '&:active': { opacity: 'pressSurface', transitionDuration: 'press' },
215
+ '&:focus-visible': { outlineStyle: 'solid' },
216
+ },
217
+ '@media >=768': { gap: '24' },
218
+ '@media (forced-colors: active)': {
219
+ selectors: { '&:focus-visible': { outlineColor: 'Highlight !custom' } },
220
+ },
221
+ },
222
+ defaultVariants: { media: true },
223
+ variants: {
224
+ // Set from `image`: without one the card sits under a hairline, which takes 1px of its 24px
225
+ // inset.
226
+ media: {
227
+ false: {
228
+ borderBlockStartColor: 'line.primary',
229
+ borderBlockStartStyle: 'solid',
230
+ borderBlockStartWidth: 'regular',
231
+ paddingBlockStart: '23px !custom',
232
+ },
233
+ true: {},
234
+ },
235
+ },
236
+ },
237
+ { id: 'tds/marketing/table/link' },
238
+ )
239
+
240
+ export const text = style(
241
+ {
242
+ color: 'content.secondary',
243
+ margin: '0',
244
+ marginBlockStart: '12',
245
+ maxWidth: '320',
246
+ typography: 'body.b2',
247
+ },
248
+ { id: 'tds/marketing/table/text' },
249
+ )
250
+
251
+ export const title = style(
252
+ { color: 'content.primary', margin: '0', maxWidth: '600', typography: 'heading.h4' },
253
+ { id: 'tds/marketing/table/title' },
254
+ )
255
+ }