@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,508 @@
1
+ /** Renders Marketing text links that end in an icon, and the cue a linked card or row ends in. @module */
2
+ import { useRender } from '@base-ui/react/use-render'
3
+ import {
4
+ Children,
5
+ cloneElement,
6
+ type ComponentPropsWithRef,
7
+ isValidElement,
8
+ type ReactNode,
9
+ } from 'react'
10
+ import type * as zyzz from 'zyzz'
11
+ import { ArrowUpRight } from '../icons/ArrowUpRight.js'
12
+ import { ChevronRight } from '../icons/ChevronRight.js'
13
+ import { style, variants, vars } from '../zyzz.config.js'
14
+
15
+ /**
16
+ * A link in the type around it that ends in a chevron, or in an arrow up right when it leaves the
17
+ * site. The icon is 1.125em and mirrors in right-to-left text. On a fine pointer, hover eases the
18
+ * color or opacity, and the icon travels toward where the link goes. A press dims the link to 72%
19
+ * and keeps the hover color.
20
+ *
21
+ * - Use `Link` at the end of a section or under a card, and for a link to another site.
22
+ * - Set `icon="external"` for another site. The link then ends its name with a hidden "(external
23
+ * site)". With `target="_blank"` it ends with "(opens in a new tab)" instead.
24
+ * - Set `tone="inverse"` in a dark section.
25
+ * - Put a `Link.Cue` at the end of a card or row that is itself the link.
26
+ * - Use `Button.Link` for the main action of a hero or a closing band, and a plain underlined link
27
+ * inside a sentence.
28
+ *
29
+ * Words of link text up to 32 characters join with no-break spaces, so a short link never splits
30
+ * across lines.
31
+ *
32
+ * @example
33
+ * <Link href="/partners" tone="primary">
34
+ * Explore the full Tempo ecosystem
35
+ * </Link>
36
+ *
37
+ * @see {@link https://base-ui.com/react/utils/use-render | Base UI useRender}
38
+ * @see {@link https://www.w3.org/WAI/WCAG22/Understanding/link-purpose-in-context.html | WCAG 2.2 Link Purpose (In Context)}
39
+ * @see {@link https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html | WCAG 2.2 Target Size (Minimum)}
40
+ */
41
+ export function Link(props: Link.Props) {
42
+ const {
43
+ children,
44
+ className,
45
+ externalHint,
46
+ icon = 'chevron',
47
+ newTabHint,
48
+ ref,
49
+ render,
50
+ tone,
51
+ vars,
52
+ ...attributes
53
+ } = props
54
+
55
+ const Icon = (() => {
56
+ if (icon === 'external') return ArrowUpRight
57
+ if (icon === 'chevron') return ChevronRight
58
+ return undefined
59
+ })()
60
+
61
+ return useRender({
62
+ defaultTagName: 'a',
63
+ props: {
64
+ ...attributes,
65
+ ...styles.root({ className, style: props.style, tone, vars }),
66
+ children: (
67
+ <>
68
+ {nbsp(children)}
69
+ {Icon && (
70
+ <Icon
71
+ {...styles.icon({ travel: icon === 'external' ? 'out' : 'along' })}
72
+ height="1.125em"
73
+ width="1.125em"
74
+ />
75
+ )}
76
+ <Hint
77
+ external={icon === 'external'}
78
+ externalHint={externalHint}
79
+ newTab={attributes.target === '_blank'}
80
+ newTabHint={newTabHint}
81
+ />
82
+ </>
83
+ ),
84
+ },
85
+ ref,
86
+ render,
87
+ })
88
+ }
89
+
90
+ export namespace Link {
91
+ export type Props = useRender.ComponentProps<'a'> &
92
+ zyzz.Props.Variants<typeof styles.root> &
93
+ Hints & {
94
+ /**
95
+ * The icon that ends the link: `chevron` within the site, `external` (an arrow up right) for
96
+ * another site, or `none` where an icon would repeat.
97
+ *
98
+ * @default 'chevron'
99
+ */
100
+ icon?: 'chevron' | 'external' | 'none' | undefined
101
+ }
102
+
103
+ /** The hidden words that end the name of a link that leaves the site or opens a new tab. */
104
+ export type Hints = {
105
+ /**
106
+ * The hidden words that end the name of a link to another site, such as a translation.
107
+ *
108
+ * @default '(external site)'
109
+ */
110
+ externalHint?: string | undefined
111
+ /**
112
+ * The hidden words that end the name of a link with `target="_blank"`, such as a translation.
113
+ *
114
+ * @default '(opens in a new tab)'
115
+ */
116
+ newTabHint?: string | undefined
117
+ }
118
+
119
+ /**
120
+ * The label and icon a linked card or row ends in. A link cannot hold another, so it is a `span`
121
+ * that follows its host: the nearest link around it, or an ancestor marked `data-cue-host` beside
122
+ * a stretched link. It reads 56% black at rest, and black with its icon nudged on while the
123
+ * pointer is on the host, a press holds it, or keyboard focus is in it. It never dims.
124
+ *
125
+ * - Put it inside the link it speaks for, so its hidden hint joins that link's name. Beside a
126
+ * stretched link, name an external site or a new tab on the link itself.
127
+ * - Set `reveal` on a bare cue in a long list, so a mouse or trackpad shows it only while its row
128
+ * is on.
129
+ *
130
+ * @example
131
+ * <a href="/customer-stories/arq">
132
+ * Arq settles treasury on Tempo
133
+ * <Link.Cue>Read story</Link.Cue>
134
+ * </a>
135
+ */
136
+ export function Cue(props: Cue.Props) {
137
+ const {
138
+ children,
139
+ className,
140
+ externalHint,
141
+ icon = 'chevron',
142
+ newTab = false,
143
+ newTabHint,
144
+ reveal,
145
+ vars,
146
+ ...attributes
147
+ } = props
148
+
149
+ const Icon = icon === 'external' ? ArrowUpRight : ChevronRight
150
+
151
+ return (
152
+ <span {...attributes} {...styles.cue({ className, reveal, style: props.style, vars })}>
153
+ {children !== undefined && nbsp(children)}
154
+ <Icon
155
+ {...styles.cueIcon({ travel: icon === 'external' ? 'out' : 'along' })}
156
+ height="1.125em"
157
+ width="1.125em"
158
+ />
159
+ <Hint
160
+ external={icon === 'external'}
161
+ externalHint={externalHint}
162
+ newTab={newTab}
163
+ newTabHint={newTabHint}
164
+ />
165
+ </span>
166
+ )
167
+ }
168
+
169
+ export namespace Cue {
170
+ export type Props = Omit<ComponentPropsWithRef<'span'>, 'children'> &
171
+ Omit<zyzz.Props.Variants<typeof styles.cue>, 'reveal'> &
172
+ Hints & {
173
+ /**
174
+ * The icon: `chevron` when the host link stays on the site, `external` when it leaves.
175
+ *
176
+ * @default 'chevron'
177
+ */
178
+ icon?: 'chevron' | 'external' | undefined
179
+ /**
180
+ * Marks a host link that opens a new tab, so the hidden hint says so.
181
+ *
182
+ * @default false
183
+ */
184
+ newTab?: boolean | undefined
185
+ } & (
186
+ | {
187
+ /** The label that shows at rest, such as Read story. */
188
+ children: ReactNode
189
+ reveal?: never
190
+ }
191
+ | {
192
+ children?: never
193
+ /**
194
+ * Hides a bare arrow on a mouse or trackpad until its host is on. A touch screen always
195
+ * shows it.
196
+ *
197
+ * @default false
198
+ */
199
+ reveal?: boolean | undefined
200
+ }
201
+ )
202
+ }
203
+ }
204
+
205
+ /** Link text up to this many characters keeps its words together. */
206
+ const nbspLength = 32
207
+
208
+ // U+00A0, written as a code so it stays visible in source.
209
+ const noBreakSpace = String.fromCharCode(0xa0)
210
+
211
+ const whitespace = /[ \t\r\n]+/g
212
+
213
+ /**
214
+ * Joins the words of short link text with no-break spaces, recursing into inline elements such as
215
+ * `<code>`. Longer text, such as a sentence-length link in an article, wraps as usual.
216
+ */
217
+ function nbsp(children: ReactNode): ReactNode {
218
+ return text(children).trim().length > nbspLength ? children : join(children)
219
+ }
220
+
221
+ function join(node: ReactNode): ReactNode {
222
+ if (typeof node === 'string') return node.replace(whitespace, noBreakSpace)
223
+ if (Array.isArray(node)) return Children.map(node, join)
224
+ if (isValidElement<{ children?: ReactNode }>(node)) {
225
+ const inner = node.props.children
226
+ return inner === undefined ? node : cloneElement(node, undefined, join(inner))
227
+ }
228
+ return node
229
+ }
230
+
231
+ function text(node: ReactNode): string {
232
+ if (typeof node === 'string' || typeof node === 'number') return String(node)
233
+ if (Array.isArray(node)) return node.map(text).join('')
234
+ if (isValidElement<{ children?: ReactNode }>(node)) return text(node.props.children)
235
+ return ''
236
+ }
237
+
238
+ /**
239
+ * The hidden words that end a link's name. A link that opens a new tab says so, and one that leaves
240
+ * the site in this tab names an external site. An English default is marked as English, since a
241
+ * caller's own words take the page's language.
242
+ */
243
+ function Hint(props: Hint.Props) {
244
+ const { external, externalHint, newTab, newTabHint } = props
245
+
246
+ const hint = (() => {
247
+ if (newTab)
248
+ return {
249
+ lang: newTabHint === undefined ? 'en' : undefined,
250
+ text: newTabHint ?? '(opens in a new tab)',
251
+ }
252
+ if (external)
253
+ return {
254
+ lang: externalHint === undefined ? 'en' : undefined,
255
+ text: externalHint ?? '(external site)',
256
+ }
257
+ return undefined
258
+ })()
259
+
260
+ if (!hint) return null
261
+
262
+ return (
263
+ <span lang={hint.lang} {...styles.hint()}>
264
+ {' '}
265
+ {hint.text}
266
+ </span>
267
+ )
268
+ }
269
+
270
+ declare namespace Hint {
271
+ type Props = Link.Hints & { external: boolean; newTab: boolean }
272
+ }
273
+
274
+ namespace styles {
275
+ // The cue follows its host: 56% black at rest, and black while the pointer is on the host, a press
276
+ // holds it, or keyboard focus is in it. `--cue-on` carries that state to its icon.
277
+ export const cue = variants(
278
+ {
279
+ base: {
280
+ '--cue-on': '0',
281
+ alignItems: 'center',
282
+ color: 'content.secondary',
283
+ columnGap: '2',
284
+ display: 'inline-flex',
285
+ // At rest is where hover out lands.
286
+ transitionDuration: 'hoverOut',
287
+ transitionProperty: 'color, opacity !custom',
288
+ transitionTimingFunction: 'standard',
289
+ selectors: {
290
+ 'a:focus-visible &, [data-cue-host]:has(:focus-visible) &': {
291
+ '--cue-on': '1',
292
+ color: 'content.primary',
293
+ opacity: 'full',
294
+ transitionDuration: 'hoverIn',
295
+ },
296
+ },
297
+ '@media (hover: hover) and (pointer: fine)': {
298
+ selectors: {
299
+ 'a:hover:not(:active) &, [data-cue-host]:hover:not(:active) &, a:active &, [data-cue-host]:active &':
300
+ {
301
+ '--cue-on': '1',
302
+ color: 'content.primary',
303
+ opacity: 'full',
304
+ transitionDuration: 'hoverIn',
305
+ },
306
+ },
307
+ },
308
+ },
309
+ defaultVariants: { reveal: false },
310
+ variants: {
311
+ /**
312
+ * Hides a bare arrow on a mouse or trackpad until its host is on.
313
+ *
314
+ * @default false
315
+ */
316
+ reveal: {
317
+ false: {},
318
+ true: { '@media (hover: hover) and (pointer: fine)': { opacity: '0 !custom' } },
319
+ },
320
+ },
321
+ },
322
+ { id: 'tds/marketing/link/cue' },
323
+ )
324
+
325
+ // The cue's icon nudges on with it. In right-to-left text it mirrors, and its travel along the
326
+ // line, `--nudge`, turns with it.
327
+ export const cueIcon = variants(
328
+ {
329
+ base: {
330
+ '--lift': `calc(-1 * ${vars.translate.nudge})`,
331
+ '--nudge': `${vars.translate.nudge}`,
332
+ flexShrink: '0 !custom',
333
+ transitionDuration: 'state',
334
+ transitionProperty: 'translate !custom',
335
+ transitionTimingFunction: 'standard',
336
+ selectors: {
337
+ '[dir="rtl"] &': {
338
+ '--nudge': `calc(-1 * ${vars.translate.nudge})`,
339
+ transform: 'scaleX(-1) !custom',
340
+ },
341
+ },
342
+ },
343
+ defaultVariants: { travel: 'along' },
344
+ variants: {
345
+ travel: {
346
+ along: { translate: 'calc(var(--cue-on) * var(--nudge)) 0 !custom' },
347
+ out: {
348
+ translate:
349
+ 'calc(var(--cue-on) * var(--nudge)) calc(var(--cue-on) * var(--lift)) !custom',
350
+ },
351
+ },
352
+ },
353
+ },
354
+ { id: 'tds/marketing/link/cue-icon' },
355
+ )
356
+
357
+ export const hint = style(
358
+ {
359
+ borderWidth: 'none',
360
+ clip: 'rect(0 0 0 0) !custom',
361
+ height: '1px !custom',
362
+ margin: '-1px !custom',
363
+ overflow: 'hidden',
364
+ padding: '0',
365
+ position: 'absolute',
366
+ whiteSpace: 'nowrap',
367
+ width: '1px !custom',
368
+ },
369
+ { id: 'tds/marketing/link/hint' },
370
+ )
371
+
372
+ // The icon answers the pointer as it arrives and while a press holds, over the state duration.
373
+ // In right-to-left text it mirrors, and its travel along the line, `--nudge`, turns with it.
374
+ export const icon = variants(
375
+ {
376
+ base: {
377
+ '--lift': `calc(-1 * ${vars.translate.nudge})`,
378
+ '--nudge': `${vars.translate.nudge}`,
379
+ flexShrink: '0 !custom',
380
+ transitionDuration: 'state',
381
+ transitionProperty: 'translate !custom',
382
+ transitionTimingFunction: 'standard',
383
+ selectors: {
384
+ '[dir="rtl"] &': {
385
+ '--nudge': `calc(-1 * ${vars.translate.nudge})`,
386
+ transform: 'scaleX(-1) !custom',
387
+ },
388
+ },
389
+ },
390
+ defaultVariants: { travel: 'along' },
391
+ variants: {
392
+ travel: {
393
+ // Toward the end of the line.
394
+ along: {
395
+ '@media (hover: hover) and (pointer: fine)': {
396
+ selectors: {
397
+ ':hover:not(:active) > &, :active > &': { translate: 'var(--nudge) 0 !custom' },
398
+ },
399
+ },
400
+ },
401
+ // Up and out, the way the arrow points.
402
+ out: {
403
+ '@media (hover: hover) and (pointer: fine)': {
404
+ selectors: {
405
+ ':hover:not(:active) > &, :active > &': {
406
+ translate: 'var(--nudge) var(--lift) !custom',
407
+ },
408
+ },
409
+ },
410
+ },
411
+ },
412
+ },
413
+ },
414
+ { id: 'tds/marketing/link/icon' },
415
+ )
416
+
417
+ export const root = variants(
418
+ {
419
+ base: {
420
+ alignItems: 'center',
421
+ columnGap: '2',
422
+ display: 'inline-flex',
423
+ // The ring takes the link's own color.
424
+ outlineColor: 'currentColor !custom',
425
+ outlineOffset: 'ring',
426
+ outlineStyle: 'none',
427
+ outlineWidth: 'ring',
428
+ position: 'relative',
429
+ textDecoration: 'none !custom',
430
+ // At rest is where hover out and a release land.
431
+ transitionDuration: 'hoverOut',
432
+ transitionProperty: 'color, opacity !custom',
433
+ transitionTimingFunction: 'standard',
434
+ width: 'fit-content !custom',
435
+ selectors: {
436
+ // A hit area that leaves the visible size alone. Centered, it grows toward 44px, but
437
+ // reaches at most 4px past an edge, half the 8px that the tightest lists leave between
438
+ // links.
439
+ '&::after': {
440
+ content: '"" !custom',
441
+ insetBlock: `max(-4px, min(0px, (100% - ${vars.spacing.hitMin}) / 2)) !custom`,
442
+ insetInline: `max(-4px, min(0px, (100% - ${vars.spacing.hitMin}) / 2)) !custom`,
443
+ position: 'absolute',
444
+ },
445
+ // A press dims the link and keeps the color its hover set.
446
+ '&:active': { opacity: 'pressSurface', transitionDuration: 'press' },
447
+ '&:focus-visible': { outlineStyle: 'solid' },
448
+ },
449
+ // Forced colors drop the color, so an underline marks the link.
450
+ '@media (forced-colors: active)': {
451
+ textDecorationLine: 'underline',
452
+ selectors: { '&:focus-visible': { outlineColor: 'Highlight !custom' } },
453
+ },
454
+ },
455
+ defaultVariants: { tone: 'inherit' },
456
+ variants: {
457
+ /**
458
+ * The link's color: `inherit` takes the text color around it and turns black on hover,
459
+ * `primary` is black and fades on hover, `secondary` is 56% black and turns black on hover,
460
+ * and `inverse` is near-white for a dark section and fades on hover.
461
+ *
462
+ * @default 'inherit'
463
+ */
464
+ tone: {
465
+ inherit: {
466
+ color: 'inherit !custom',
467
+ selectors: { '&:active': { color: 'content.primary' } },
468
+ '@media (hover: hover) and (pointer: fine)': {
469
+ selectors: {
470
+ '&:hover:not(:active)': { color: 'content.primary', transitionDuration: 'hoverIn' },
471
+ },
472
+ },
473
+ },
474
+ inverse: {
475
+ color: 'inverse.content.primary',
476
+ '@media (hover: hover) and (pointer: fine)': {
477
+ selectors: {
478
+ '&:hover:not(:active)': { opacity: '0.64 !custom', transitionDuration: 'hoverIn' },
479
+ },
480
+ },
481
+ },
482
+ primary: {
483
+ color: 'content.primary',
484
+ '@media (hover: hover) and (pointer: fine)': {
485
+ selectors: {
486
+ '&:hover:not(:active)': { opacity: 'recede', transitionDuration: 'hoverIn' },
487
+ },
488
+ },
489
+ },
490
+ secondary: {
491
+ color: 'content.secondary',
492
+ selectors: { '&:active': { color: 'content.primary' } },
493
+ '@media (hover: hover) and (pointer: fine)': {
494
+ selectors: {
495
+ '&:hover:not(:active)': { color: 'content.primary', transitionDuration: 'hoverIn' },
496
+ },
497
+ },
498
+ // Its ring takes the page's ink, not its own 56%. Forced colors keep theirs.
499
+ '@media (forced-colors: none)': {
500
+ selectors: { '&:focus-visible': { outlineColor: 'content.primary' } },
501
+ },
502
+ },
503
+ },
504
+ },
505
+ },
506
+ { id: 'tds/marketing/link' },
507
+ )
508
+ }
@@ -0,0 +1,71 @@
1
+ /** Renders the Tempo wordmark as an inline SVG. @module */
2
+ import type { ComponentPropsWithRef } from 'react'
3
+ import { style } from '../zyzz.config.js'
4
+
5
+ /**
6
+ * The Tempo wordmark, black at 207 by 46, its drawing's ratio, unless `width`, `height` or `fill`
7
+ * set otherwise. Without a `fill` of its own, it takes the system text color in forced colors. It is
8
+ * hidden from assistive technology and never takes focus, so the link around it carries the name.
9
+ * It has no states or motion.
10
+ *
11
+ * - Use `Logo` for a link home where the whole name fits, as in the navigation, and `Mark` in a
12
+ * square or small space.
13
+ * - Set `width` and `height` together in the 207 to 46 ratio. A box of another ratio leaves space
14
+ * beside the drawing.
15
+ * - Leave `fill` unset for black, and set it to `white` on a dark ground.
16
+ *
17
+ * @example
18
+ * <a aria-label="Tempo home" href="/">
19
+ * <Logo height={20} width={91} />
20
+ * </a>
21
+ *
22
+ * @see {@link https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html | WCAG 2.2 Non-text Content}
23
+ */
24
+ export function Logo(props: Logo.Props) {
25
+ const { className, ...attributes } = props
26
+
27
+ // Without a fill of its own, it follows forced colors.
28
+ const forced = props.fill === undefined
29
+
30
+ return (
31
+ <svg
32
+ aria-hidden="true"
33
+ fill="black"
34
+ focusable="false"
35
+ height={46}
36
+ viewBox="0 0 3478 773"
37
+ width={207}
38
+ xmlns="http://www.w3.org/2000/svg"
39
+ {...attributes}
40
+ {...(forced ? styles.root({ className, style: props.style }) : { className })}
41
+ >
42
+ <path d="M258 761 447 181H677L730 11H53L0 181H243L53 761Z" />
43
+ <path d="M1021 761 1066 618H787L838 456H1111L1157 315H885L936 154H1217L1263 11H779L535 761Z" />
44
+ <path d="M1241 761 1409 251H1411L1406 761H1527L1860 257H1863L1701 761H1905L2149 11H1851L1586 416L1595 11H1323L1078 761Z" />
45
+ <path d="M2378 150H2417Q2478 150 2501 173.5Q2524 197 2511 255Q2496 322 2450.5 357Q2405 392 2331 392H2299ZM2180 761 2255 529H2322Q2427 529 2513 495Q2599 461 2655 398.5Q2711 336 2725 253Q2738 178 2710.5 123.5Q2683 69 2620.5 40Q2558 11 2468 11H2219L1975 761Z" />
46
+ <path d="M3473 341Q3488 241 3457 163.5Q3426 86 3355 43Q3284 0 3183 0H3181Q3068 0 2967.5 57Q2867 114 2799.5 213Q2732 312 2714 433Q2700 530 2732.5 607.5Q2765 685 2836 729Q2907 773 3005 773H3007Q3122 773 3222 715.5Q3322 658 3388.5 559Q3455 460 3473 341ZM2925 448Q2940 361 2975 290.5Q3010 220 3056.5 179.5Q3103 139 3152 139H3154Q3218 139 3246.5 188.5Q3275 238 3262 326Q3246 417 3212 487.5Q3178 558 3131.5 596.5Q3085 635 3034 635H3032Q2967 635 2938.5 585Q2910 535 2925 448Z" />
47
+ </svg>
48
+ )
49
+ }
50
+
51
+ export namespace Logo {
52
+ /**
53
+ * The SVG's own attributes. `width` defaults to 207, `height` to 46, and `fill` to black, which
54
+ * forced colors replace with the system text color.
55
+ */
56
+ export type Props = Omit<ComponentPropsWithRef<'svg'>, 'children'>
57
+ }
58
+
59
+ namespace styles {
60
+ // In forced colors a drawing without a fill of its own takes the system text color, so it shows on
61
+ // the system background, light or dark, and it drops any filter that recolors it, such as an
62
+ // invert. `:is(svg)` lifts the rule above a class its caller adds.
63
+ export const root = style(
64
+ {
65
+ '@media (forced-colors: active)': {
66
+ selectors: { '&:is(svg)': { fill: 'CanvasText !custom', filter: 'none !custom' } },
67
+ },
68
+ },
69
+ { id: 'tds/marketing/logo' },
70
+ )
71
+ }