@deriv-com/dds-marketing 1.1.3 → 1.2.0

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 (295) hide show
  1. package/.llm/components/accordion.md +6 -0
  2. package/.llm/components/accordionitem.md +6 -0
  3. package/.llm/components/aspectratio.md +6 -0
  4. package/.llm/components/awards.md +6 -0
  5. package/.llm/components/background.md +49 -10
  6. package/.llm/components/badge.md +6 -0
  7. package/.llm/components/bottomsheet.md +6 -0
  8. package/.llm/components/breadcrumb.md +6 -0
  9. package/.llm/components/breadcrumbitem.md +6 -0
  10. package/.llm/components/button.md +9 -3
  11. package/.llm/components/buttonicon.md +7 -1
  12. package/.llm/components/card.md +6 -0
  13. package/.llm/components/cardbody.md +7 -1
  14. package/.llm/components/cardbutton.md +6 -0
  15. package/.llm/components/checkbox.md +6 -0
  16. package/.llm/components/comparisoncards.md +9 -3
  17. package/.llm/components/comparisontable.md +6 -0
  18. package/.llm/components/ctabanner.md +6 -0
  19. package/.llm/components/ctabannerslider.md +6 -0
  20. package/.llm/components/datatable.md +6 -0
  21. package/.llm/components/divider.md +6 -0
  22. package/.llm/components/documentlink.md +237 -0
  23. package/.llm/components/documents.md +268 -0
  24. package/.llm/components/downloadbanner.md +7 -1
  25. package/.llm/components/dropdownmenu.md +6 -0
  26. package/.llm/components/estimator.md +6 -0
  27. package/.llm/components/faqaccordion.md +6 -0
  28. package/.llm/components/featurebullets.md +6 -0
  29. package/.llm/components/featurecards.md +42 -2
  30. package/.llm/components/featurecardscarousel.md +7 -1
  31. package/.llm/components/featurescroll.md +6 -0
  32. package/.llm/components/featuresplit.md +6 -0
  33. package/.llm/components/featurestack.md +6 -0
  34. package/.llm/components/featuretabs.md +369 -0
  35. package/.llm/components/filterchip.md +6 -0
  36. package/.llm/components/footer.md +6 -0
  37. package/.llm/components/footergroup.md +6 -0
  38. package/.llm/components/grid.md +30 -1
  39. package/.llm/components/icon.md +6 -0
  40. package/.llm/components/illustrationcard.md +52 -2
  41. package/.llm/components/illustrationcheck.md +193 -0
  42. package/.llm/components/illustrationchoice.md +187 -0
  43. package/.llm/components/illustrationcode.md +192 -0
  44. package/.llm/components/illustrationlist.md +175 -0
  45. package/.llm/components/illustrationscene.md +29 -3
  46. package/.llm/components/imagebanner.md +30 -5
  47. package/.llm/components/landinghero.md +6 -0
  48. package/.llm/components/link.md +7 -1
  49. package/.llm/components/logocolumns.md +7 -1
  50. package/.llm/components/logorows.md +42 -2
  51. package/.llm/components/menuitem.md +6 -0
  52. package/.llm/components/navbar.md +6 -0
  53. package/.llm/components/navbaritem.md +6 -0
  54. package/.llm/components/navbarmenu.md +6 -0
  55. package/.llm/components/navbarmenugroup.md +6 -0
  56. package/.llm/components/navbarpanel.md +6 -0
  57. package/.llm/components/navbarswitcher.md +6 -0
  58. package/.llm/components/navbarswitcheroption.md +6 -0
  59. package/.llm/components/option.md +6 -0
  60. package/.llm/components/pageheader.md +6 -0
  61. package/.llm/components/pagination.md +6 -0
  62. package/.llm/components/paginationdots.md +6 -0
  63. package/.llm/components/producthero.md +29 -4
  64. package/.llm/components/progressbar.md +305 -0
  65. package/.llm/components/removablechip.md +6 -0
  66. package/.llm/components/resourcebanner.md +6 -0
  67. package/.llm/components/row.md +6 -0
  68. package/.llm/components/scenescroll.md +38 -24
  69. package/.llm/components/scenescrollword.md +267 -0
  70. package/.llm/components/scroller.md +6 -0
  71. package/.llm/components/searchinput.md +6 -0
  72. package/.llm/components/segmentedcontrol.md +28 -1
  73. package/.llm/components/segmentedcontrolitem.md +6 -0
  74. package/.llm/components/select.md +6 -0
  75. package/.llm/components/selectchip.md +6 -0
  76. package/.llm/components/spinner.md +6 -0
  77. package/.llm/components/stack.md +6 -0
  78. package/.llm/components/stats.md +46 -1
  79. package/.llm/components/statscarousel.md +227 -0
  80. package/.llm/components/statusdot.md +41 -1
  81. package/.llm/components/steps.md +6 -0
  82. package/.llm/components/stickycards.md +6 -0
  83. package/.llm/components/subdomainnavbar.md +6 -0
  84. package/.llm/components/tab.md +6 -0
  85. package/.llm/components/table.md +6 -0
  86. package/.llm/components/tablebody.md +6 -0
  87. package/.llm/components/tablecell.md +6 -0
  88. package/.llm/components/tablehead.md +6 -0
  89. package/.llm/components/tableheadercell.md +6 -0
  90. package/.llm/components/tablerow.md +6 -0
  91. package/.llm/components/tablist.md +6 -0
  92. package/.llm/components/teamgrid.md +6 -0
  93. package/.llm/components/testimonialrow.md +43 -3
  94. package/.llm/components/testimonialslider.md +8 -2
  95. package/.llm/components/textarea.md +6 -0
  96. package/.llm/components/textinput.md +6 -0
  97. package/.llm/components/textscroll.md +6 -0
  98. package/.llm/components/tiers.md +13 -7
  99. package/.llm/components/tooltip.md +6 -0
  100. package/.llm/components/typography.md +63 -1
  101. package/.llm/digest/background.md +14 -6
  102. package/.llm/digest/button.md +1 -1
  103. package/.llm/digest/buttonicon.md +1 -1
  104. package/.llm/digest/documentlink.md +52 -0
  105. package/.llm/digest/documents.md +51 -0
  106. package/.llm/digest/downloadbanner.md +1 -1
  107. package/.llm/digest/featurecards.md +7 -0
  108. package/.llm/digest/featuretabs.md +50 -0
  109. package/.llm/digest/grid.md +1 -0
  110. package/.llm/digest/illustrationcard.md +6 -1
  111. package/.llm/digest/illustrationcheck.md +42 -0
  112. package/.llm/digest/illustrationchoice.md +43 -0
  113. package/.llm/digest/illustrationcode.md +41 -0
  114. package/.llm/digest/illustrationlist.md +38 -0
  115. package/.llm/digest/illustrationscene.md +4 -2
  116. package/.llm/digest/imagebanner.md +9 -3
  117. package/.llm/digest/logocolumns.md +1 -1
  118. package/.llm/digest/logorows.md +8 -1
  119. package/.llm/digest/producthero.md +8 -2
  120. package/.llm/digest/progressbar.md +56 -0
  121. package/.llm/digest/scenescroll.md +6 -5
  122. package/.llm/digest/scenescrollword.md +56 -0
  123. package/.llm/digest/segmentedcontrol.md +3 -0
  124. package/.llm/digest/stats.md +8 -0
  125. package/.llm/digest/statscarousel.md +48 -0
  126. package/.llm/digest/statusdot.md +7 -0
  127. package/.llm/digest/testimonialrow.md +8 -1
  128. package/.llm/digest/testimonialslider.md +1 -1
  129. package/.llm/digest/typography.md +18 -0
  130. package/.llm/index.md +14 -4
  131. package/.llm/rules.md +10 -0
  132. package/.llm/tokens.md +12 -3
  133. package/AGENTS.md +13 -2
  134. package/dist/components/arrival.d.ts +32 -0
  135. package/dist/components/arrival.js +140 -0
  136. package/dist/components/arrives.d.ts +17 -0
  137. package/dist/components/arrives.js +14 -0
  138. package/dist/components/blocks/awards/Awards.js +2 -27
  139. package/dist/components/blocks/block-pattern.css +23 -0
  140. package/dist/components/blocks/comparison-cards/comparison-cards-impl.css +29 -0
  141. package/dist/components/blocks/documents/Documents.css +90 -0
  142. package/dist/components/blocks/documents/Documents.d.ts +22 -0
  143. package/dist/components/blocks/documents/Documents.js +30 -0
  144. package/dist/components/blocks/documents/Documents.types.d.ts +37 -0
  145. package/dist/components/blocks/documents/Documents.types.js +14 -0
  146. package/dist/components/blocks/documents/documents-impl.css +103 -0
  147. package/dist/components/blocks/download-banner/DownloadBanner.css +1 -1
  148. package/dist/components/blocks/download-banner/DownloadBanner.types.d.ts +1 -1
  149. package/dist/components/blocks/feature-cards/FeatureCards.d.ts +2 -1
  150. package/dist/components/blocks/feature-cards/FeatureCards.js +10 -7
  151. package/dist/components/blocks/feature-cards/FeatureCards.types.d.ts +9 -1
  152. package/dist/components/blocks/feature-cards/feature-cards-impl.css +15 -3
  153. package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.types.d.ts +1 -1
  154. package/dist/components/blocks/feature-cards-carousel/feature-cards-carousel-impl.css +12 -0
  155. package/dist/components/blocks/feature-tabs/FeatureTabs.css +100 -0
  156. package/dist/components/blocks/feature-tabs/FeatureTabs.d.ts +23 -0
  157. package/dist/components/blocks/feature-tabs/FeatureTabs.js +38 -0
  158. package/dist/components/blocks/feature-tabs/FeatureTabs.types.d.ts +35 -0
  159. package/dist/components/blocks/feature-tabs/FeatureTabs.types.js +14 -0
  160. package/dist/components/blocks/feature-tabs/feature-tabs-impl.css +53 -0
  161. package/dist/components/blocks/image-banner/ImageBanner.css +1 -1
  162. package/dist/components/blocks/image-banner/ImageBanner.d.ts +1 -1
  163. package/dist/components/blocks/image-banner/ImageBanner.js +2 -2
  164. package/dist/components/blocks/image-banner/ImageBanner.types.d.ts +9 -7
  165. package/dist/components/blocks/image-banner/ImageBanner.types.js +1 -1
  166. package/dist/components/blocks/image-banner/image-banner-impl.css +77 -26
  167. package/dist/components/blocks/laurel.d.ts +16 -0
  168. package/dist/components/blocks/laurel.js +28 -0
  169. package/dist/components/blocks/logo-columns/LogoColumns.css +1 -1
  170. package/dist/components/blocks/logo-columns/LogoColumns.types.d.ts +1 -1
  171. package/dist/components/blocks/logo-rows/LogoRows.css +1 -1
  172. package/dist/components/blocks/logo-rows/LogoRows.d.ts +2 -1
  173. package/dist/components/blocks/logo-rows/LogoRows.js +7 -4
  174. package/dist/components/blocks/logo-rows/LogoRows.types.d.ts +9 -1
  175. package/dist/components/blocks/pattern-tone.d.ts +11 -0
  176. package/dist/components/blocks/pattern-tone.js +7 -0
  177. package/dist/components/blocks/product-hero/ProductHero.d.ts +1 -1
  178. package/dist/components/blocks/product-hero/ProductHero.js +2 -2
  179. package/dist/components/blocks/product-hero/ProductHero.types.d.ts +8 -3
  180. package/dist/components/blocks/product-hero/ProductHero.types.js +1 -1
  181. package/dist/components/blocks/product-hero/product-hero-impl.css +54 -0
  182. package/dist/components/blocks/resource-banner/ResourceBanner.css +1 -1
  183. package/dist/components/blocks/scene-scroll/SceneScroll.css +1 -1
  184. package/dist/components/blocks/scene-scroll/SceneScroll.d.ts +6 -5
  185. package/dist/components/blocks/scene-scroll/SceneScroll.js +8 -7
  186. package/dist/components/blocks/scene-scroll/SceneScroll.types.d.ts +5 -5
  187. package/dist/components/blocks/scene-scroll/SceneScroll.types.js +1 -1
  188. package/dist/components/blocks/scene-scroll/scene-scroll-impl.css +61 -44
  189. package/dist/components/blocks/scene-scroll-word/SceneScrollWord.css +105 -0
  190. package/dist/components/blocks/scene-scroll-word/SceneScrollWord.d.ts +31 -0
  191. package/dist/components/blocks/scene-scroll-word/SceneScrollWord.js +67 -0
  192. package/dist/components/blocks/scene-scroll-word/SceneScrollWord.types.d.ts +39 -0
  193. package/dist/components/blocks/scene-scroll-word/SceneScrollWord.types.js +18 -0
  194. package/dist/components/blocks/scene-scroll-word/scene-scroll-word-impl.css +370 -0
  195. package/dist/components/blocks/stats/Stats.d.ts +2 -1
  196. package/dist/components/blocks/stats/Stats.js +17 -14
  197. package/dist/components/blocks/stats/Stats.types.d.ts +8 -0
  198. package/dist/components/blocks/stats/stats-impl.css +4 -1
  199. package/dist/components/blocks/stats/use-wheel.d.ts +1 -1
  200. package/dist/components/blocks/stats/use-wheel.js +8 -4
  201. package/dist/components/blocks/stats-carousel/StatsCarousel.css +209 -0
  202. package/dist/components/blocks/stats-carousel/StatsCarousel.d.ts +20 -0
  203. package/dist/components/blocks/stats-carousel/StatsCarousel.js +48 -0
  204. package/dist/components/blocks/stats-carousel/StatsCarousel.types.d.ts +43 -0
  205. package/dist/components/blocks/stats-carousel/StatsCarousel.types.js +23 -0
  206. package/dist/components/blocks/stats-carousel/stats-carousel-impl.css +233 -0
  207. package/dist/components/blocks/sticky-cards/sticky-cards-impl.css +8 -0
  208. package/dist/components/blocks/testimonial-row/TestimonialRow.css +1 -1
  209. package/dist/components/blocks/testimonial-row/TestimonialRow.d.ts +2 -1
  210. package/dist/components/blocks/testimonial-row/TestimonialRow.js +16 -13
  211. package/dist/components/blocks/testimonial-row/TestimonialRow.types.d.ts +9 -1
  212. package/dist/components/blocks/testimonial-slider/TestimonialSlider.css +1 -1
  213. package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.d.ts +1 -1
  214. package/dist/components/blocks/tiers/Tiers.types.d.ts +1 -1
  215. package/dist/components/core/background/Background.css +19 -0
  216. package/dist/components/core/background/Background.types.d.ts +2 -1
  217. package/dist/components/core/background/background-impl.css +47 -15
  218. package/dist/components/core/background/halftone.js +1 -1
  219. package/dist/components/core/button/Button.css +5 -5
  220. package/dist/components/core/button-icon/ButtonIcon.types.d.ts +1 -1
  221. package/dist/components/core/card-body/CardBody.css +5 -0
  222. package/dist/components/core/card-body/CardBody.types.d.ts +1 -1
  223. package/dist/components/core/document-link/DocumentLink.css +59 -0
  224. package/dist/components/core/document-link/DocumentLink.d.ts +19 -0
  225. package/dist/components/core/document-link/DocumentLink.js +21 -0
  226. package/dist/components/core/document-link/DocumentLink.types.d.ts +41 -0
  227. package/dist/components/core/document-link/DocumentLink.types.js +11 -0
  228. package/dist/components/core/document-link/document-link-impl.css +23 -0
  229. package/dist/components/core/illustration-card/IllustrationCard.css +7 -0
  230. package/dist/components/core/illustration-card/IllustrationCard.d.ts +5 -1
  231. package/dist/components/core/illustration-card/IllustrationCard.js +34 -8
  232. package/dist/components/core/illustration-card/IllustrationCard.types.d.ts +8 -1
  233. package/dist/components/core/illustration-card/IllustrationCard.types.js +1 -0
  234. package/dist/components/core/illustration-card/illustration-card-impl.css +113 -0
  235. package/dist/components/core/illustration-check/IllustrationCheck.css +25 -0
  236. package/dist/components/core/illustration-check/IllustrationCheck.d.ts +16 -0
  237. package/dist/components/core/illustration-check/IllustrationCheck.js +22 -0
  238. package/dist/components/core/illustration-check/IllustrationCheck.types.d.ts +25 -0
  239. package/dist/components/core/illustration-check/IllustrationCheck.types.js +9 -0
  240. package/dist/components/core/illustration-check/illustration-check-impl.css +76 -0
  241. package/dist/components/core/illustration-choice/IllustrationChoice.css +62 -0
  242. package/dist/components/core/illustration-choice/IllustrationChoice.d.ts +16 -0
  243. package/dist/components/core/illustration-choice/IllustrationChoice.js +31 -0
  244. package/dist/components/core/illustration-choice/IllustrationChoice.types.d.ts +25 -0
  245. package/dist/components/core/illustration-choice/IllustrationChoice.types.js +11 -0
  246. package/dist/components/core/illustration-choice/illustration-choice-impl.css +103 -0
  247. package/dist/components/core/illustration-code/IllustrationCode.css +25 -0
  248. package/dist/components/core/illustration-code/IllustrationCode.d.ts +12 -0
  249. package/dist/components/core/illustration-code/IllustrationCode.js +20 -0
  250. package/dist/components/core/illustration-code/IllustrationCode.types.d.ts +23 -0
  251. package/dist/components/core/illustration-code/IllustrationCode.types.js +8 -0
  252. package/dist/components/core/illustration-code/illustration-code-impl.css +42 -0
  253. package/dist/components/core/illustration-list/IllustrationList.css +19 -0
  254. package/dist/components/core/illustration-list/IllustrationList.d.ts +16 -0
  255. package/dist/components/core/illustration-list/IllustrationList.js +18 -0
  256. package/dist/components/core/illustration-list/IllustrationList.types.d.ts +15 -0
  257. package/dist/components/core/illustration-list/IllustrationList.types.js +6 -0
  258. package/dist/components/core/illustration-list/illustration-list-impl.css +52 -0
  259. package/dist/components/core/illustration-scene/IllustrationScene.css +6 -0
  260. package/dist/components/core/illustration-scene/IllustrationScene.d.ts +3 -2
  261. package/dist/components/core/illustration-scene/IllustrationScene.js +4 -3
  262. package/dist/components/core/illustration-scene/IllustrationScene.types.d.ts +5 -1
  263. package/dist/components/core/illustration-scene/IllustrationScene.types.js +2 -1
  264. package/dist/components/core/illustration-scene/illustration-scene-impl.css +65 -0
  265. package/dist/components/core/link/link-impl.css +5 -19
  266. package/dist/components/core/progress-bar/ProgressBar.css +101 -0
  267. package/dist/components/core/progress-bar/ProgressBar.d.ts +5 -0
  268. package/dist/components/core/progress-bar/ProgressBar.js +34 -0
  269. package/dist/components/core/progress-bar/ProgressBar.types.d.ts +52 -0
  270. package/dist/components/core/progress-bar/ProgressBar.types.js +12 -0
  271. package/dist/components/core/progress-bar/progress-bar-impl.css +45 -0
  272. package/dist/components/core/segmented-control/SegmentedControl.d.ts +1 -1
  273. package/dist/components/core/segmented-control/SegmentedControl.js +13 -5
  274. package/dist/components/core/segmented-control/SegmentedControl.types.d.ts +5 -1
  275. package/dist/components/core/segmented-control/segmented-control-impl.css +35 -0
  276. package/dist/components/core/status-dot/StatusDot.d.ts +1 -1
  277. package/dist/components/core/status-dot/StatusDot.js +7 -4
  278. package/dist/components/core/status-dot/StatusDot.types.d.ts +9 -1
  279. package/dist/components/core/status-dot/status-dot-impl.css +101 -0
  280. package/dist/components/core/typography/Typography.d.ts +3 -283
  281. package/dist/components/core/typography/Typography.js +9 -1
  282. package/dist/components/core/typography/Typography.types.d.ts +9 -15
  283. package/dist/components/core/typography/TypographyMotion.d.ts +28 -0
  284. package/dist/components/core/typography/TypographyMotion.js +43 -0
  285. package/dist/components/core/typography/typography-impl.css +106 -0
  286. package/dist/components/illustration-data.d.ts +15 -0
  287. package/dist/components/illustration-data.js +7 -0
  288. package/dist/components/index.d.ts +22 -1
  289. package/dist/components/index.js +20 -0
  290. package/dist/components/layout/grid/Grid.css +5 -0
  291. package/dist/components/layout/grid/Grid.types.d.ts +2 -1
  292. package/dist/components/scene-scroll-data.d.ts +35 -0
  293. package/dist/components/tiers-data.d.ts +3 -2
  294. package/dist/marketing.css +24 -6
  295. package/package.json +1 -1
@@ -0,0 +1,140 @@
1
+ 'use client';
2
+ import { useLayoutEffect, useRef, useState } from 'react';
3
+ /**
4
+ * When a part with a motion of its own — a figure that rolls, a word that swaps, a bar that fills —
5
+ * plays it. The part sets the answer on itself as `data-arrival`, and its stylesheet holds its
6
+ * animation paused while that reads `waiting` and lets it run at `playing`. Nothing about the
7
+ * motion itself is here: the steps, the timings and the easing are the stylesheet's, in the
8
+ * package's motion tokens.
9
+ *
10
+ * A part plays where it is, which is what makes the same motion usable anywhere:
11
+ *
12
+ * - inside a host that is itself arriving — an IllustrationCard, which marks itself
13
+ * `data-arrival-host` — it follows that, so a pane's parts play when the pane has landed rather
14
+ * than each on its own;
15
+ * - inside a block's reveal (`data-revealed`, see use-reveal.ts) it waits for the block to bring
16
+ * it in, and for the part of the block that holds it to finish moving, so it plays on something
17
+ * that has come to rest;
18
+ * - anywhere else it plays once it is well into view — six tenths of it showing — so a figure at
19
+ * the foot of a section is not over before a reader reaches it.
20
+ *
21
+ * It answers `still` until it is running, for use-reveal's reason: a motion that held a part at
22
+ * its first frame until a script arrived would leave a reader with no script looking at zeros and
23
+ * empty boxes. And it fires once, then lets go.
24
+ */
25
+ export function useArrival(enabled = true) {
26
+ const held = useRef(null);
27
+ const [arrival, setArrival] = useState('still');
28
+ useLayoutEffect(() => {
29
+ const element = held.current;
30
+ if (!enabled || element === null)
31
+ return undefined;
32
+ if (typeof window.matchMedia === 'function' && window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
33
+ return undefined;
34
+ }
35
+ if (typeof IntersectionObserver === 'undefined' || typeof MutationObserver === 'undefined')
36
+ return undefined;
37
+ if (element.getClientRects().length === 0)
38
+ return undefined;
39
+ let cancelled = false;
40
+ const cleanups = [];
41
+ const play = () => {
42
+ // The next frame, for use-reveal's reason: a transition or an animation needs its first
43
+ // frame painted before it has anything to move from.
44
+ const frame = requestAnimationFrame(() => {
45
+ if (!cancelled)
46
+ setArrival('playing');
47
+ });
48
+ cleanups.push(() => cancelAnimationFrame(frame));
49
+ };
50
+ // Following something that is itself arriving — a pane — its answer is this part's answer. The
51
+ // host is found by a mark it carries from its first render, because its own answer is set in a
52
+ // layout effect that runs after this one: a child's effects run before its parent's.
53
+ const leader = element.parentElement?.closest('[data-arrival-host]') ?? null;
54
+ if (leader !== null) {
55
+ // No frame put off here, unlike playing on its own below: a part following its host has been
56
+ // painted waiting beside it all along, so it has its first frame already — and a frame asked
57
+ // for from inside the host's own switch can be one the browser never draws.
58
+ const follow = () => {
59
+ if (leader.dataset['arrival'] !== 'playing')
60
+ return false;
61
+ if (!cancelled)
62
+ setArrival('playing');
63
+ return true;
64
+ };
65
+ setArrival('waiting');
66
+ if (!follow()) {
67
+ const watch = new MutationObserver(() => {
68
+ if (follow())
69
+ watch.disconnect();
70
+ });
71
+ watch.observe(leader, { attributes: true, attributeFilter: ['data-arrival'] });
72
+ cleanups.push(() => watch.disconnect());
73
+ }
74
+ return () => {
75
+ cancelled = true;
76
+ cleanups.forEach((clean) => clean());
77
+ };
78
+ }
79
+ setArrival('waiting');
80
+ const landed = () => {
81
+ // Inside a block's reveal, the part of the block that holds this one — or this one itself —
82
+ // is moving in on a transition. The motion starts when that has come to rest.
83
+ const mover = element.closest('[data-reveal-at]');
84
+ const settle = Math.max(restingIn(element), mover === null ? 0 : restingIn(mover));
85
+ if (settle === 0) {
86
+ play();
87
+ return;
88
+ }
89
+ const timer = window.setTimeout(play, settle);
90
+ cleanups.push(() => window.clearTimeout(timer));
91
+ };
92
+ const watchReveal = () => {
93
+ const block = element.closest('[data-revealed]');
94
+ if (block === null || block.dataset['revealed'] === 'true') {
95
+ landed();
96
+ return;
97
+ }
98
+ const watch = new MutationObserver(() => {
99
+ if (block.dataset['revealed'] === 'true') {
100
+ watch.disconnect();
101
+ landed();
102
+ }
103
+ });
104
+ watch.observe(block, { attributes: true, attributeFilter: ['data-revealed'] });
105
+ cleanups.push(() => watch.disconnect());
106
+ };
107
+ // Seen once most of it is on screen — or, for a part taller than the screen, once it fills most
108
+ // of the screen. Six-tenths of a part three screens tall is never on screen at once, and a part
109
+ // that waited for that would wait at its first frame forever. The finer thresholds are what let
110
+ // the callback hear a tall part fill the screen, which no single crossing of 0.6 would report.
111
+ const seen = new IntersectionObserver((entries) => {
112
+ const landedOnScreen = entries.some((entry) => entry.isIntersecting &&
113
+ (entry.intersectionRatio >= 0.6 ||
114
+ (entry.rootBounds !== null && entry.intersectionRect.height >= entry.rootBounds.height * 0.6)));
115
+ if (!landedOnScreen)
116
+ return;
117
+ seen.disconnect();
118
+ watchReveal();
119
+ }, { threshold: [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6] });
120
+ seen.observe(element);
121
+ cleanups.push(() => seen.disconnect());
122
+ return () => {
123
+ cancelled = true;
124
+ cleanups.forEach((clean) => clean());
125
+ };
126
+ }, [enabled]);
127
+ return [held, arrival];
128
+ }
129
+ /** How long an element's own transition takes to finish from now: its first delay and duration. */
130
+ function restingIn(element) {
131
+ const style = getComputedStyle(element);
132
+ const seconds = (value) => {
133
+ const first = value.split(',')[0]?.trim() ?? '0s';
134
+ const amount = Number.parseFloat(first);
135
+ if (!Number.isFinite(amount))
136
+ return 0;
137
+ return first.endsWith('ms') ? amount : amount * 1000;
138
+ };
139
+ return seconds(style.transitionDelay) + seconds(style.transitionDuration);
140
+ }
@@ -0,0 +1,17 @@
1
+ import { type ReactElement, type Ref } from 'react';
2
+ type Element = ReactElement<Record<string, unknown> & {
3
+ ref?: Ref<HTMLElement>;
4
+ }>;
5
+ /**
6
+ * Gives one element its arrival — `data-arrival`, from useArrival — so a component with no script
7
+ * of its own can move once on arrival without becoming a client component: it wraps the element it
8
+ * draws only when a motion has been asked for. The element keeps everything it was given, and
9
+ * anything handed to this wrapper — a tooltip's handlers, cloned onto what it holds — is passed on
10
+ * to it.
11
+ */
12
+ export declare function Arrives({ children, ...handed }: {
13
+ children: Element;
14
+ } & Record<string, unknown>): ReactElement<Record<string, unknown> & {
15
+ ref?: Ref<HTMLElement>;
16
+ }, string | import("react").JSXElementConstructor<any>>;
17
+ export {};
@@ -0,0 +1,14 @@
1
+ 'use client';
2
+ import { cloneElement } from 'react';
3
+ import { useArrival } from './arrival.js';
4
+ /**
5
+ * Gives one element its arrival — `data-arrival`, from useArrival — so a component with no script
6
+ * of its own can move once on arrival without becoming a client component: it wraps the element it
7
+ * draws only when a motion has been asked for. The element keeps everything it was given, and
8
+ * anything handed to this wrapper — a tooltip's handlers, cloned onto what it holds — is passed on
9
+ * to it.
10
+ */
11
+ export function Arrives({ children, ...handed }) {
12
+ const [held, arrival] = useArrival();
13
+ return cloneElement(children, { ...handed, ref: held, 'data-arrival': arrival === 'still' ? undefined : arrival });
14
+ }
@@ -5,6 +5,7 @@ import './Awards.css';
5
5
  import './awards-impl.css';
6
6
  import '../block-reveal.css';
7
7
  import { arriving, useReveal } from '../use-reveal.js';
8
+ import { Laurel } from '../laurel.js';
8
9
  import { awardsDefaults, awardsParts, } from './Awards.types.js';
9
10
  /**
10
11
  * Where an award comes in the arrival, capped so a long list does not keep a reader waiting.
@@ -15,32 +16,6 @@ import { awardsDefaults, awardsParts, } from './Awards.types.js';
15
16
  */
16
17
  const FIRST_AWARD = 1;
17
18
  const LAST_STEP = FIRST_AWARD + 4;
18
- /**
19
- * The reference design's laurel, the vector its Stats section draws, in one colour.
20
- *
21
- * The left-hand branch: its leaves curl up and in toward whatever stands to its right. The second
22
- * branch is this one mirrored, by the stylesheet, so one drawing serves both sides and a right-to-left
23
- * page can swap which side is mirrored without a second picture. The reference laid it at a fifth of
24
- * its strength; here it takes the band's quieter ink instead, a colour role rather than an alpha, so
25
- * it follows the ground the way every other quiet thing in the package does.
26
- */
27
- const LAUREL_PATHS = [
28
- 'M20.8655 76.0151C21.3631 78.5487 22.4577 80.4673 23.4245 81.7447C23.7945 82.2337 24.145 82.6275 24.4343 82.9245C24.5003 81.0424 24.5392 77.0209 23.854 73.543C23.3836 71.2282 22.6189 69.4263 21.9723 68.1997C21.7486 67.7754 21.539 67.42 21.3608 67.1361C21.2158 67.6487 21.042 68.3446 20.8935 69.1718C20.5634 71.0111 20.3623 73.4782 20.8655 76.0151Z',
29
- 'M9.19518 69.4464C8.5612 69.2311 8.01354 69.0792 7.6041 68.9776C7.77674 69.5261 8.03563 70.2542 8.40971 71.0711C9.16156 72.713 10.3603 74.6729 12.1472 76.0342C13.9141 77.3864 15.8077 77.7752 17.2669 77.8239C17.9963 77.8483 18.6126 77.7873 19.0419 77.7209C18.3715 76.5307 16.6347 73.8279 14.0892 71.9349C12.4167 70.7081 10.6015 69.924 9.19518 69.4464Z',
30
- 'M14.1789 62.4853C14.1095 65.0056 14.7018 67.1343 15.3106 68.6265C15.5268 69.1563 15.7445 69.6045 15.9342 69.9597C16.0737 69.4242 16.2473 68.7196 16.4239 67.9038C16.8294 66.0308 17.2467 63.5892 17.309 61.2688C17.3584 58.9612 17.0322 57.019 16.6942 55.65C16.5809 55.1908 16.4663 54.7965 16.3643 54.4749C16.1414 54.8952 15.8702 55.4487 15.5956 56.1107C14.9268 57.7233 14.2444 59.9642 14.1789 62.4853Z',
31
- 'M6.16644 56.5363L5.92729 56.2113C4.18123 53.9739 2.10237 52.4221 0.99942 51.685C1.0448 52.2219 1.13195 52.9558 1.29599 53.7969C1.6458 55.5904 2.33816 57.834 3.68889 59.699C5.02796 61.5534 6.66938 62.5331 7.97363 63.0496C8.56984 63.2857 9.09434 63.4244 9.48448 63.5049C9.08235 62.1271 8.06278 59.1136 6.16644 56.5363Z',
32
- 'M12.9202 41.9556C12.9103 41.468 12.8857 41.0438 12.8578 40.6964C12.5852 41.0139 12.2554 41.4254 11.9043 41.9234C10.9787 43.2365 9.91222 45.1415 9.34811 47.5086L9.21888 48.0509C8.78948 50.2094 8.89878 52.2002 9.13088 53.6853C9.21855 54.2463 9.32345 54.7333 9.42253 55.1275C10.2101 53.5777 11.6117 50.5783 12.3444 47.5177C12.8519 45.3454 12.9491 43.3817 12.9202 41.9556Z',
33
- 'M4.26838 40.1575C3.16507 37.3338 1.55966 35.0449 0.658674 33.8839C0.595099 34.3962 0.53299 35.0674 0.509766 35.8425C0.454879 37.6743 0.618233 40.0556 1.46849 42.2871C2.30759 44.5064 3.60611 45.9871 4.68907 46.9107C5.12959 47.2864 5.53393 47.5694 5.85602 47.7717C5.82536 47.3041 5.77132 46.6715 5.67501 45.9295C5.46619 44.3205 5.06044 42.211 4.27156 40.1569L4.26838 40.1575Z',
34
- 'M12.6632 27.4606C11.6314 28.3597 10.3804 29.7129 9.40352 31.5834L9.20135 32.004C8.19489 34.0975 7.83678 36.2499 7.73379 37.8807C7.69736 38.4576 7.693 38.9667 7.70264 39.3814C7.98105 39.0479 8.31846 38.6306 8.68777 38.1462C9.68653 36.8365 10.9078 35.0512 11.829 33.1204C12.7356 31.1936 13.238 29.3215 13.5154 27.9233C13.6157 27.4178 13.6864 26.9753 13.7361 26.6158C13.4324 26.8302 13.0648 27.1106 12.6632 27.4606Z',
35
- 'M7.15889 23.0454L7.23043 22.5253C7.54518 19.6881 7.36017 17.0948 7.19664 15.6517C6.9244 16.0575 6.59747 16.5777 6.25738 17.1905C5.37216 18.7855 4.41002 20.986 4.07631 23.4177C3.74032 25.8399 4.108 27.8499 4.55657 29.25C4.7215 29.7648 4.89717 30.1965 5.05235 30.5349C5.64762 29.1157 6.71893 26.2445 7.15889 23.0454Z',
36
- 'M20.7056 14.8951C19.4372 15.269 17.7724 15.9875 16.1554 17.3693L16.021 17.4932C14.3576 18.9542 13.2217 20.7665 12.5041 22.2202C12.2403 22.7546 12.0346 23.2374 11.8812 23.6318C12.2297 23.4596 12.6507 23.2423 13.1195 22.9822C14.4495 22.2442 16.1506 21.1686 17.6705 19.808C19.177 18.446 20.3493 16.9414 21.1512 15.7693C21.4549 15.3255 21.7047 14.9307 21.8987 14.6109C21.5673 14.6707 21.1626 14.7604 20.7056 14.8951Z',
37
- 'M15.246 9.89451L15.3989 9.48769C16.3817 6.71545 16.8681 4.08928 17.0948 2.56556C16.7641 2.88544 16.3703 3.28963 15.9481 3.76978C14.7583 5.12276 13.3571 7.06214 12.4902 9.40367C11.6163 11.7394 11.483 13.8564 11.5665 15.3854C11.595 15.9081 11.6489 16.3613 11.7069 16.7298C11.9415 16.3768 12.2271 15.9318 12.5414 15.4103C13.3841 14.0121 14.4266 12.0747 15.246 9.89451Z',
38
- 'M24.236 2.86551C22.4046 4.24716 21.0854 6.09763 20.225 7.6144C19.8673 8.24502 19.5916 8.81333 19.3933 9.25894C19.765 9.11933 20.2233 8.93634 20.7396 8.70812C22.1292 8.09394 23.9267 7.15785 25.5896 5.86671C27.2408 4.56435 28.6049 3.04428 29.5633 1.84034C29.9762 1.32163 30.3123 0.863542 30.5622 0.509562C30.206 0.526204 29.7564 0.567871 29.2396 0.659382C27.8788 0.900297 26.0564 1.48555 24.236 2.86551Z',
39
- ];
40
- /** One laurel branch. Decoration: hidden from assistive technology and never focusable. */
41
- function Laurel({ side }) {
42
- return (_jsx("svg", { className: awardsParts.laurel, "data-side": side, viewBox: "0 0 32 84", fill: "none", "aria-hidden": "true", focusable: "false", children: LAUREL_PATHS.map((d) => (_jsx("path", { d: d, fill: "currentColor", stroke: "currentColor" }, d))) }));
43
- }
44
19
  /**
45
20
  * Whether the list is wider than the room it has — the phone's row, and only while it runs on past
46
21
  * the band's edge.
@@ -78,7 +53,7 @@ function useOverflowing(list) {
78
53
  }
79
54
  /** One award's badge: the award's words between its two laurels. */
80
55
  function Badge({ award }) {
81
- return (_jsxs(_Fragment, { children: [_jsx(Laurel, { side: "leading" }), _jsxs("div", { className: awardsParts.copy, children: [_jsx("p", { className: awardsParts.name, children: award.title }), _jsx("p", { className: awardsParts.issuer, children: award.issuer })] }), _jsx(Laurel, { side: "trailing" })] }));
56
+ return (_jsxs(_Fragment, { children: [_jsx(Laurel, { className: awardsParts.laurel, side: "leading" }), _jsxs("div", { className: awardsParts.copy, children: [_jsx("p", { className: awardsParts.name, children: award.title }), _jsx("p", { className: awardsParts.issuer, children: award.issuer })] }), _jsx(Laurel, { className: awardsParts.laurel, side: "trailing" })] }));
82
57
  }
83
58
  /**
84
59
  * A heading over the awards a company has won, each between two laurels — the reference design's
@@ -0,0 +1,23 @@
1
+ /*
2
+ * The page's one patterned band, drawn as a block's first layer.
3
+ *
4
+ * A block that offers `background` places a Background with nothing to hold as its section's first
5
+ * child, and Background, as a layer, fills its positioned parent behind that parent's content. So
6
+ * the section is positioned and isolated, and its own content is lifted over the layer by being
7
+ * positioned after it: the pattern is under the content and over nothing — the section's first
8
+ * layer, not a wrapper round it.
9
+ *
10
+ * Defined once, as block-reveal.css is, and imported by each block that offers the pattern, so a fix
11
+ * to how the layer stacks lands in every one of them. Keyed on the layer being there rather than on
12
+ * each block's name, so a block that comes to offer the pattern needs nothing added here — and not
13
+ * on `data-background` alone, which CtaBanner, LandingHero and PageHeader set too, for a ground of
14
+ * their own: this sheet is global once any block loads it, and theirs must not be repositioned.
15
+ */
16
+ :where([data-dds-context="marketing"]) [data-background]:has(> .dds-background[data-layer='true']) {
17
+ isolation: isolate;
18
+ position: relative;
19
+ }
20
+
21
+ :where([data-dds-context="marketing"]) [data-background]:has(> .dds-background[data-layer='true']) > :not(.dds-background) {
22
+ position: relative;
23
+ }
@@ -209,6 +209,35 @@
209
209
  color: var(--color-fg-on-brand-strong);
210
210
  }
211
211
 
212
+ /*
213
+ * The standard card's supporting words recede, so its title and its values read first.
214
+ *
215
+ * The line under the card's title, each row's label and the footnote take the muted ink — the
216
+ * answers are what a reader compares across the cards, and the labels only say which question each
217
+ * answers. On the page and the subtle band that is color.fg.muted, which follows the theme as the
218
+ * standard card's surface does; on the dark band, where that card has turned to the inverse surface
219
+ * and white ink above, it is color.fg.muted-inverse. CardBody's eyebrow takes the same two.
220
+ *
221
+ * Only the standard card, which is Card's own `surface`. The highlighted set's light card is gray.50
222
+ * in both themes and the page's muted grey turns pale with dark mode, and the coral card's white is
223
+ * already at the edge of its contrast, so neither has a muted ink to recede to and both keep their own.
224
+ */
225
+ :where([data-dds-context="marketing"])
226
+ .dds-comparisoncards:is([data-ground="page"], [data-ground="subtle"])
227
+ .dds-comparisoncards__item
228
+ > .dds-card[data-variant="surface"]
229
+ :is(.dds-comparisoncards__card-description, .dds-comparisoncards__row-label, .dds-comparisoncards__footnote) {
230
+ color: var(--color-fg-muted);
231
+ }
232
+
233
+ :where([data-dds-context="marketing"])
234
+ .dds-comparisoncards[data-ground="strong"]
235
+ .dds-comparisoncards__item
236
+ > .dds-card[data-variant="surface"]
237
+ :is(.dds-comparisoncards__card-description, .dds-comparisoncards__row-label, .dds-comparisoncards__footnote) {
238
+ color: var(--color-fg-muted-inverse);
239
+ }
240
+
212
241
  /*
213
242
  * The highlighted variant: the recommended card lifted off the page.
214
243
  *
@@ -0,0 +1,90 @@
1
+ /* GENERATED from documents.contract.json. Do not edit. */
2
+
3
+ :where([data-dds-context="marketing"]) .dds-documents {
4
+ box-sizing: border-box;
5
+ container-type: inline-size;
6
+ display: flex;
7
+ inline-size: 100%;
8
+ justify-content: center;
9
+ overflow-wrap: anywhere;
10
+ }
11
+
12
+ :where([data-dds-context="marketing"]) .dds-documents .dds-documents__inner {
13
+ box-sizing: border-box;
14
+ display: flex;
15
+ flex-direction: column;
16
+ inline-size: 100%;
17
+ min-inline-size: 0;
18
+ max-inline-size: var(--size-content-max);
19
+ padding-block: var(--space-section-default);
20
+ padding-inline: var(--space-inset-page);
21
+ row-gap: var(--space-heading-content);
22
+ }
23
+
24
+ :where([data-dds-context="marketing"]) .dds-documents .dds-documents__title {
25
+ margin-block: 0;
26
+ text-wrap: balance;
27
+ font-family: var(--font-h2-family);
28
+ font-size: var(--font-h2-size);
29
+ font-weight: var(--font-h2-weight);
30
+ letter-spacing: var(--font-h2-letter-spacing);
31
+ line-height: var(--font-h2-line-height);
32
+ max-inline-size: var(--size-measure-heading);
33
+ }
34
+
35
+ :where([data-dds-context="marketing"]) .dds-documents .dds-documents__header {
36
+ display: flex;
37
+ flex-direction: column;
38
+ min-inline-size: 0;
39
+ row-gap: var(--space-heading-title-description);
40
+ }
41
+
42
+ :where([data-dds-context="marketing"]) .dds-documents .dds-documents__description {
43
+ margin-block: 0;
44
+ font-family: var(--font-body-md-family);
45
+ font-size: var(--font-body-md-size);
46
+ font-weight: var(--font-body-md-weight);
47
+ letter-spacing: var(--font-body-md-letter-spacing);
48
+ line-height: var(--font-body-md-line-height);
49
+ max-inline-size: var(--size-measure-description);
50
+ }
51
+
52
+ :where([data-dds-context="marketing"]) .dds-documents .dds-documents__body {
53
+ inline-size: 100%;
54
+ min-inline-size: 0;
55
+ row-gap: var(--space-gap-none);
56
+ }
57
+
58
+ :where([data-dds-context="marketing"]) .dds-documents .dds-documents__list {
59
+ display: grid;
60
+ list-style: none;
61
+ margin-block: 0;
62
+ padding-inline: 0;
63
+ column-gap: var(--space-gap-lg);
64
+ row-gap: var(--space-gap-lg);
65
+ }
66
+
67
+ :where([data-dds-context="marketing"]) .dds-documents .dds-documents__item {
68
+ min-inline-size: 0;
69
+ }
70
+
71
+ :where([data-dds-context="marketing"]) .dds-documents[data-layout="grid"] .dds-documents__inner {
72
+ display: grid;
73
+ }
74
+
75
+ :where([data-dds-context="marketing"]) .dds-documents[data-ground="page"] {
76
+ background-color: var(--color-bg-page);
77
+ color: var(--color-fg-default);
78
+ }
79
+
80
+ :where([data-dds-context="marketing"]) .dds-documents[data-ground="strong"] {
81
+ background-color: var(--color-bg-brand-strong);
82
+ color: var(--color-fg-on-brand-strong);
83
+ }
84
+
85
+ :where([data-dds-context="marketing"]) .dds-documents[data-ground="subtle"] {
86
+ background-color: var(--color-bg-page);
87
+ background-image: linear-gradient(var(--color-bg-band-subtle), var(--color-bg-band-subtle));
88
+ color: var(--color-fg-default);
89
+ }
90
+
@@ -0,0 +1,22 @@
1
+ import { type ReactNode } from 'react';
2
+ import './Documents.css';
3
+ import './documents-impl.css';
4
+ import '../block-reveal.css';
5
+ import { type DocumentsProps } from './Documents.types.js';
6
+ export type { DocumentsProps };
7
+ /**
8
+ * A section of documents — the reference design's DocumentChips and CountryLinkGrid, one block
9
+ * because they are one job.
10
+ *
11
+ * Under `groups` the children are AccordionItems, each holding DocumentLink chips, drawn as one
12
+ * Accordion: one group open at a time, the documents two to a row from the fold. Under `grid` the
13
+ * children are DocumentLinks, laid as a list beside the heading. Built from children rather than
14
+ * records so a page writes the documents it has — and a country's flag is the package's own icon,
15
+ * not an image fetched from elsewhere.
16
+ *
17
+ * It arrives the way every block does: the heading and its line, then the documents. `'use client'`
18
+ * for that and for `useId`, which names the region by its heading.
19
+ */
20
+ export declare function Documents({ ground, layout, title, description, children, }: DocumentsProps & {
21
+ children?: ReactNode;
22
+ }): import("react").JSX.Element;
@@ -0,0 +1,30 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Children, useId } from 'react';
4
+ import './Documents.css';
5
+ import './documents-impl.css';
6
+ import '../block-reveal.css';
7
+ import { Accordion } from '../../core/accordion/Accordion.js';
8
+ import { given } from '../../given.js';
9
+ import { arriving, useReveal } from '../use-reveal.js';
10
+ import { documentsDefaults, documentsParts } from './Documents.types.js';
11
+ /**
12
+ * A section of documents — the reference design's DocumentChips and CountryLinkGrid, one block
13
+ * because they are one job.
14
+ *
15
+ * Under `groups` the children are AccordionItems, each holding DocumentLink chips, drawn as one
16
+ * Accordion: one group open at a time, the documents two to a row from the fold. Under `grid` the
17
+ * children are DocumentLinks, laid as a list beside the heading. Built from children rather than
18
+ * records so a page writes the documents it has — and a country's flag is the package's own icon,
19
+ * not an image fetched from elsewhere.
20
+ *
21
+ * It arrives the way every block does: the heading and its line, then the documents. `'use client'`
22
+ * for that and for `useId`, which names the region by its heading.
23
+ */
24
+ export function Documents({ ground = documentsDefaults.ground, layout = documentsDefaults.layout, title, description, children, }) {
25
+ const titleId = useId();
26
+ const [band, revealed] = useReveal();
27
+ return (_jsx("section", { className: documentsParts.root, "data-ground": ground, "data-layout": layout, "aria-labelledby": titleId, children: _jsxs("div", { className: documentsParts.inner, ref: band, "data-revealed": revealed, children: [_jsxs("div", { className: documentsParts.header, children: [_jsx("h2", { className: documentsParts.title, id: titleId, ...arriving(0), children: title }), given(description) ? (_jsx("p", { className: documentsParts.description, ...arriving(1), children: description })) : null] }), _jsx("div", { className: documentsParts.body, ...arriving(2), children: layout === 'grid' ? (
28
+ // `role="list"` spelled out: Safari drops a list's role once its markers are styled away.
29
+ _jsx("ul", { className: documentsParts.list, role: "list", children: Children.toArray(children).map((child, at) => (_jsx("li", { className: documentsParts.item, children: child }, at))) })) : (_jsx(Accordion, { children: children })) })] }) }));
30
+ }
@@ -0,0 +1,37 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface DocumentsOwnProps {
3
+ /**
4
+ * `page` — The default, and the page's own white. A section that has nothing to separate itself from what is above it — most of them — and the ground a reader is already on
5
+ * `subtle` — A quiet step off the page, for a band that wants to read as its own section without changing the page's voice — the reference design's slate FAQ. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section.
6
+ * `strong` — `color.bg.brand-strong`, the dark band. It stops the page rather than dividing it, so it is for a section a reader should arrive at — and one per page is usually one more than enough. The documents turn round with it: white group headings, a muted chevron, rules in the band's own veil and a focus ring drawn for the dark, fixed like the band
7
+ */
8
+ ground?: 'page' | 'subtle' | 'strong';
9
+ /**
10
+ * `groups` — The default: the documents under headings that expand, one group open at a time — AccordionItem children, each holding DocumentLink chips, two to a row from the fold. The reference design's DocumentChips
11
+ * `grid` — Many short entries of one kind — a document per country, each behind its flag — DocumentLink children with `variant="plain"`, in a grid beside the heading from 62rem and under it below. The reference design's CountryLinkGrid
12
+ */
13
+ layout?: 'groups' | 'grid';
14
+ /** Always. What the documents are, in a few words — "Regulatory documents", "Licences by country". It names the section */
15
+ title: string;
16
+ /** A line under the heading saying what the documents are for or who they apply to */
17
+ description?: string;
18
+ /** Allowed: AccordionItem, DocumentLink */
19
+ children: ReactNode;
20
+ }
21
+ export type DocumentsProps = DocumentsOwnProps;
22
+ /** The class each part carries. Apply these — do not retype them. */
23
+ export declare const documentsParts: {
24
+ readonly root: "dds-documents";
25
+ readonly inner: "dds-documents__inner";
26
+ readonly title: "dds-documents__title";
27
+ readonly header: "dds-documents__header";
28
+ readonly description: "dds-documents__description";
29
+ readonly body: "dds-documents__body";
30
+ readonly list: "dds-documents__list";
31
+ readonly item: "dds-documents__item";
32
+ };
33
+ /** Generated so defaults cannot drift from the contract. */
34
+ export declare const documentsDefaults: {
35
+ readonly ground: "page";
36
+ readonly layout: "groups";
37
+ };
@@ -0,0 +1,14 @@
1
+ // GENERATED from documents.contract.json. Do not edit.
2
+ /** The class each part carries. Apply these — do not retype them. */
3
+ export const documentsParts = {
4
+ root: 'dds-documents',
5
+ inner: 'dds-documents__inner',
6
+ title: 'dds-documents__title',
7
+ header: 'dds-documents__header',
8
+ description: 'dds-documents__description',
9
+ body: 'dds-documents__body',
10
+ list: 'dds-documents__list',
11
+ item: 'dds-documents__item',
12
+ };
13
+ /** Generated so defaults cannot drift from the contract. */
14
+ export const documentsDefaults = { ground: 'page', layout: 'groups' };
@@ -0,0 +1,103 @@
1
+ /*
2
+ * Scoped to this package, like the generated sheet beside it.
3
+ *
4
+ * `groups`: the heading is centred from the fold over the groups it names, FaqAccordion's rule; and
5
+ * inside an open group the documents stand two to a row from 62rem, a lone one across the whole row
6
+ * rather than half of it with a hole beside it. `62rem` longhand because `var()` is not permitted in
7
+ * a container query condition; it is the reference's 992px.
8
+ */
9
+ @container (min-width: 48rem) {
10
+ :where([data-dds-context="marketing"]) .dds-documents[data-layout="groups"] .dds-documents__header {
11
+ align-items: center;
12
+ margin-inline: auto;
13
+ text-align: center;
14
+ }
15
+ }
16
+
17
+ :where([data-dds-context="marketing"]) .dds-documents .dds-accordionitem__content:has(> .dds-documentlink) {
18
+ display: grid;
19
+ gap: var(--space-gap-sm);
20
+ grid-template-columns: minmax(0, 1fr);
21
+ }
22
+
23
+ @container (min-width: 62rem) {
24
+ :where([data-dds-context="marketing"]) .dds-documents .dds-accordionitem__content:has(> .dds-documentlink) {
25
+ grid-template-columns: repeat(2, minmax(0, 1fr));
26
+ }
27
+
28
+ :where([data-dds-context="marketing"]) .dds-documents .dds-accordionitem__content > .dds-documentlink:only-child {
29
+ grid-column: 1 / -1;
30
+ }
31
+ }
32
+
33
+ /* On the strong band, the accordion takes the band's inks, as FaqAccordion's does. */
34
+ :where([data-dds-context="marketing"]) .dds-documents[data-ground="strong"] .dds-accordionitem {
35
+ border-color: var(--color-border-subtle-inverse);
36
+ }
37
+
38
+ :where([data-dds-context="marketing"]) .dds-documents[data-ground="strong"] .dds-accordionitem .dds-accordionitem__trigger {
39
+ color: var(--color-fg-on-brand-strong);
40
+ }
41
+
42
+ :where([data-dds-context="marketing"]) .dds-documents[data-ground="strong"] .dds-accordionitem .dds-accordionitem__marker {
43
+ color: var(--color-fg-muted-inverse);
44
+ }
45
+
46
+ /*
47
+ * `grid`: the heading over the entries below 62rem and beside them from there, the two columns
48
+ * sharing the width; the entries two across on a phone, three from 35rem and four from 48rem, then
49
+ * two again from 62rem, where they share the width with the heading, and three from 75rem — the
50
+ * reference's own measured steps, each the narrowest at which a country's name keeps to one line.
51
+ */
52
+ :where([data-dds-context="marketing"]) .dds-documents[data-layout="grid"] .dds-documents__list {
53
+ grid-template-columns: repeat(2, minmax(0, 1fr));
54
+ }
55
+
56
+ @container (min-width: 35rem) {
57
+ :where([data-dds-context="marketing"]) .dds-documents[data-layout="grid"] .dds-documents__list {
58
+ grid-template-columns: repeat(3, minmax(0, 1fr));
59
+ }
60
+ }
61
+
62
+ @container (min-width: 48rem) {
63
+ :where([data-dds-context="marketing"]) .dds-documents[data-layout="grid"] .dds-documents__list {
64
+ grid-template-columns: repeat(4, minmax(0, 1fr));
65
+ }
66
+ }
67
+
68
+ @container (min-width: 62rem) {
69
+ :where([data-dds-context="marketing"]) .dds-documents[data-layout="grid"] .dds-documents__inner {
70
+ align-items: start;
71
+ column-gap: var(--space-grid-gutter);
72
+ grid-template-columns: repeat(2, minmax(0, 1fr));
73
+ }
74
+
75
+ :where([data-dds-context="marketing"]) .dds-documents[data-layout="grid"] .dds-documents__list {
76
+ grid-template-columns: repeat(2, minmax(0, 1fr));
77
+ }
78
+ }
79
+
80
+ @container (min-width: 75rem) {
81
+ :where([data-dds-context="marketing"]) .dds-documents[data-layout="grid"] .dds-documents__list {
82
+ grid-template-columns: repeat(3, minmax(0, 1fr));
83
+ }
84
+ }
85
+
86
+ /*
87
+ * And the focus ring with them, as FaqAccordion's does: color.border.focus is near-black in light
88
+ * mode, a ring nobody can see on the dark band. A chip keeps its own light fill, so only the group
89
+ * headings and a plain entry change.
90
+ */
91
+ :where([data-dds-context="marketing"])
92
+ .dds-documents[data-ground="strong"]
93
+ .dds-accordionitem
94
+ .dds-accordionitem__trigger:focus-visible {
95
+ outline-color: var(--color-border-focus-on-brand-strong);
96
+ }
97
+
98
+ :where([data-dds-context="marketing"])
99
+ .dds-documents[data-ground="strong"]
100
+ .dds-documentlink[data-variant="plain"]
101
+ .dds-documentlink__link:focus-visible {
102
+ outline-color: var(--color-border-focus-on-brand-strong);
103
+ }
@@ -195,7 +195,7 @@
195
195
  }
196
196
 
197
197
  :where([data-dds-context="marketing"]) .dds-downloadbanner[data-ground="strong"] .dds-downloadbanner__card {
198
- background-color: var(--color-bg-surface-card-strong);
198
+ background-color: var(--color-bg-surface-card-strong-on-brand-strong);
199
199
  color: var(--color-fg-on-brand-strong);
200
200
  }
201
201
 
@@ -4,7 +4,7 @@ export interface DownloadBannerOwnProps {
4
4
  /**
5
5
  * `page` — The default, and the page's own white. The card is the recessed gray that sets it off — the reference design's light-2
6
6
  * `subtle` — The grey band, with the card white on it — the reference design's light. Painted as the band's tint laid over the page's own ground, so it is the same grey whatever is behind the section
7
- * `strong` — `color.bg.brand-strong`, the dark band, with the card at color.bg.surface-card-strong and white words on it — the reference design's dark. For a download section a reader should arrive at; the badges are black and keep their own edge on it
7
+ * `strong` — `color.bg.brand-strong`, the dark band, with the card at color.bg.surface-card-strong-on-brand-strong and white words on it — the reference design's dark. For a download section a reader should arrive at; the badges are black and keep their own edge on it
8
8
  */
9
9
  ground?: 'page' | 'subtle' | 'strong';
10
10
  /** The featured card only: the app itself — a screenshot of it in a phone, the page's own image. It stands at the card's end, rising out of the card's top edge and resting on its bottom one, so the card reads as the app being held out to the reader. On a phone it sits under the badges. */
@@ -1,6 +1,7 @@
1
1
  import './FeatureCards.css';
2
2
  import './feature-cards-impl.css';
3
3
  import '../block-reveal.css';
4
+ import '../block-pattern.css';
4
5
  import '../block-parallax.css';
5
6
  import { type FeatureCardsProps } from './FeatureCards.types.js';
6
7
  export type { FeatureCardsProps };
@@ -23,4 +24,4 @@ export type { FeatureCardsProps };
23
24
  * a step behind the one before, in reading order. `'use client'` for that and for `useId`, which
24
25
  * names the region by its heading.
25
26
  */
26
- export declare function FeatureCards({ ground, title, description, link, children, }: FeatureCardsProps): import("react").JSX.Element;
27
+ export declare function FeatureCards({ ground, background, title, description, link, children, }: FeatureCardsProps): import("react").JSX.Element;