@deriv-com/dds-marketing 1.0.2 → 1.1.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 (315) hide show
  1. package/.llm/components/awards.md +209 -0
  2. package/.llm/components/background.md +89 -40
  3. package/.llm/components/bottomsheet.md +5 -0
  4. package/.llm/components/comparisoncards.md +257 -0
  5. package/.llm/components/comparisontable.md +231 -0
  6. package/.llm/components/ctabanner.md +9 -12
  7. package/.llm/components/ctabannerslider.md +15 -2
  8. package/.llm/components/datatable.md +273 -0
  9. package/.llm/components/downloadbanner.md +283 -0
  10. package/.llm/components/featurecards.md +41 -3
  11. package/.llm/components/featurecardscarousel.md +311 -0
  12. package/.llm/components/featuresplit.md +5 -0
  13. package/.llm/components/featurestack.md +227 -0
  14. package/.llm/components/illustrationcard.md +2 -2
  15. package/.llm/components/illustrationscene.md +6 -10
  16. package/.llm/components/imagebanner.md +278 -0
  17. package/.llm/components/navbar.md +1 -1
  18. package/.llm/components/navbaritem.md +4 -0
  19. package/.llm/components/pageheader.md +4 -3
  20. package/.llm/components/paginationdots.md +6 -1
  21. package/.llm/components/producthero.md +35 -11
  22. package/.llm/components/resourcebanner.md +247 -0
  23. package/.llm/components/scenescroll.md +222 -0
  24. package/.llm/components/select.md +17 -0
  25. package/.llm/components/stats.md +219 -0
  26. package/.llm/components/steps.md +286 -0
  27. package/.llm/components/stickycards.md +251 -0
  28. package/.llm/components/tableheadercell.md +19 -0
  29. package/.llm/components/teamgrid.md +243 -0
  30. package/.llm/components/testimonialrow.md +5 -0
  31. package/.llm/components/testimonialslider.md +14 -1
  32. package/.llm/components/textarea.md +13 -0
  33. package/.llm/components/textinput.md +13 -0
  34. package/.llm/components/textscroll.md +187 -0
  35. package/.llm/components/tiers.md +227 -0
  36. package/.llm/digest/awards.md +45 -0
  37. package/.llm/digest/background.md +11 -10
  38. package/.llm/digest/bottomsheet.md +2 -0
  39. package/.llm/digest/comparisoncards.md +51 -0
  40. package/.llm/digest/comparisontable.md +53 -0
  41. package/.llm/digest/ctabanner.md +4 -4
  42. package/.llm/digest/ctabannerslider.md +4 -0
  43. package/.llm/digest/datatable.md +65 -0
  44. package/.llm/digest/downloadbanner.md +65 -0
  45. package/.llm/digest/featurecards.md +1 -1
  46. package/.llm/digest/featurecardscarousel.md +54 -0
  47. package/.llm/digest/featuresplit.md +1 -0
  48. package/.llm/digest/featurestack.md +48 -0
  49. package/.llm/digest/illustrationscene.md +2 -3
  50. package/.llm/digest/imagebanner.md +64 -0
  51. package/.llm/digest/navbaritem.md +1 -0
  52. package/.llm/digest/pageheader.md +2 -1
  53. package/.llm/digest/paginationdots.md +3 -1
  54. package/.llm/digest/producthero.md +4 -2
  55. package/.llm/digest/resourcebanner.md +53 -0
  56. package/.llm/digest/scenescroll.md +49 -0
  57. package/.llm/digest/select.md +5 -0
  58. package/.llm/digest/stats.md +46 -0
  59. package/.llm/digest/steps.md +55 -0
  60. package/.llm/digest/stickycards.md +52 -0
  61. package/.llm/digest/tableheadercell.md +4 -0
  62. package/.llm/digest/teamgrid.md +53 -0
  63. package/.llm/digest/testimonialrow.md +2 -0
  64. package/.llm/digest/testimonialslider.md +4 -0
  65. package/.llm/digest/textarea.md +4 -0
  66. package/.llm/digest/textinput.md +4 -0
  67. package/.llm/digest/textscroll.md +43 -0
  68. package/.llm/digest/tiers.md +50 -0
  69. package/.llm/index.md +19 -3
  70. package/.llm/tokens.md +26 -1
  71. package/AGENTS.md +17 -1
  72. package/dist/components/awards-data.d.ts +24 -0
  73. package/dist/components/awards-data.js +11 -0
  74. package/dist/components/block-image-data.d.ts +24 -0
  75. package/dist/components/block-image-data.js +9 -0
  76. package/dist/components/blocks/awards/Awards.css +134 -0
  77. package/dist/components/blocks/awards/Awards.d.ts +24 -0
  78. package/dist/components/blocks/awards/Awards.js +114 -0
  79. package/dist/components/blocks/awards/Awards.types.d.ts +31 -0
  80. package/dist/components/blocks/awards/Awards.types.js +16 -0
  81. package/dist/components/blocks/awards/awards-impl.css +222 -0
  82. package/dist/components/blocks/cards-of.d.ts +16 -0
  83. package/dist/components/blocks/cards-of.js +23 -0
  84. package/dist/components/blocks/comparison-cards/ComparisonCards.css +195 -0
  85. package/dist/components/blocks/comparison-cards/ComparisonCards.d.ts +24 -0
  86. package/dist/components/blocks/comparison-cards/ComparisonCards.js +75 -0
  87. package/dist/components/blocks/comparison-cards/ComparisonCards.types.d.ts +49 -0
  88. package/dist/components/blocks/comparison-cards/ComparisonCards.types.js +26 -0
  89. package/dist/components/blocks/comparison-cards/comparison-cards-impl.css +262 -0
  90. package/dist/components/blocks/comparison-table/ComparisonTable.css +111 -0
  91. package/dist/components/blocks/comparison-table/ComparisonTable.d.ts +25 -0
  92. package/dist/components/blocks/comparison-table/ComparisonTable.js +100 -0
  93. package/dist/components/blocks/comparison-table/ComparisonTable.types.d.ts +36 -0
  94. package/dist/components/blocks/comparison-table/ComparisonTable.types.js +15 -0
  95. package/dist/components/blocks/comparison-table/comparison-table-impl.css +143 -0
  96. package/dist/components/blocks/cta-banner/CtaBanner.css +1 -0
  97. package/dist/components/blocks/cta-banner/CtaBanner.js +2 -2
  98. package/dist/components/blocks/cta-banner/CtaBanner.types.d.ts +4 -3
  99. package/dist/components/blocks/cta-banner/CtaBanner.types.js +1 -1
  100. package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.css +1 -0
  101. package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.d.ts +1 -1
  102. package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.js +6 -2
  103. package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.d.ts +8 -0
  104. package/dist/components/blocks/cta-banner-slider/CtaBannerSlider.types.js +1 -1
  105. package/dist/components/blocks/data-table/DataTable.css +170 -0
  106. package/dist/components/blocks/data-table/DataTable.d.ts +29 -0
  107. package/dist/components/blocks/data-table/DataTable.js +84 -0
  108. package/dist/components/blocks/data-table/DataTable.types.d.ts +69 -0
  109. package/dist/components/blocks/data-table/DataTable.types.js +19 -0
  110. package/dist/components/blocks/data-table/data-table-impl.css +155 -0
  111. package/dist/components/blocks/download-banner/DownloadBanner.css +228 -0
  112. package/dist/components/blocks/download-banner/DownloadBanner.d.ts +28 -0
  113. package/dist/components/blocks/download-banner/DownloadBanner.js +75 -0
  114. package/dist/components/blocks/download-banner/DownloadBanner.types.d.ts +56 -0
  115. package/dist/components/blocks/download-banner/DownloadBanner.types.js +23 -0
  116. package/dist/components/blocks/download-banner/download-banner-impl.css +216 -0
  117. package/dist/components/blocks/faq-accordion/FaqAccordion.css +1 -0
  118. package/dist/components/blocks/faq-accordion/faq-accordion-impl.css +3 -7
  119. package/dist/components/blocks/feature-bullets/FeatureBullets.css +1 -0
  120. package/dist/components/blocks/feature-bullets/feature-bullets-impl.css +14 -1
  121. package/dist/components/blocks/feature-cards/FeatureCards.css +1 -0
  122. package/dist/components/blocks/feature-cards/FeatureCards.d.ts +2 -1
  123. package/dist/components/blocks/feature-cards/FeatureCards.js +4 -21
  124. package/dist/components/blocks/feature-cards/feature-cards-impl.css +10 -9
  125. package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.css +115 -0
  126. package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.d.ts +30 -0
  127. package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.js +160 -0
  128. package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.types.d.ts +52 -0
  129. package/dist/components/blocks/feature-cards-carousel/FeatureCardsCarousel.types.js +17 -0
  130. package/dist/components/blocks/feature-cards-carousel/feature-cards-carousel-impl.css +207 -0
  131. package/dist/components/blocks/feature-scroll/FeatureScroll.css +1 -0
  132. package/dist/components/blocks/feature-split/FeatureSplit.css +1 -0
  133. package/dist/components/blocks/feature-split/feature-split-impl.css +14 -1
  134. package/dist/components/blocks/feature-stack/FeatureStack.css +86 -0
  135. package/dist/components/blocks/feature-stack/FeatureStack.d.ts +19 -0
  136. package/dist/components/blocks/feature-stack/FeatureStack.js +27 -0
  137. package/dist/components/blocks/feature-stack/FeatureStack.types.d.ts +34 -0
  138. package/dist/components/blocks/feature-stack/FeatureStack.types.js +14 -0
  139. package/dist/components/blocks/feature-stack/feature-stack-impl.css +87 -0
  140. package/dist/components/blocks/image-banner/ImageBanner.css +133 -0
  141. package/dist/components/blocks/image-banner/ImageBanner.d.ts +32 -0
  142. package/dist/components/blocks/image-banner/ImageBanner.js +41 -0
  143. package/dist/components/blocks/image-banner/ImageBanner.types.d.ts +54 -0
  144. package/dist/components/blocks/image-banner/ImageBanner.types.js +14 -0
  145. package/dist/components/blocks/image-banner/image-banner-impl.css +281 -0
  146. package/dist/components/blocks/landing-hero/LandingHero.css +1 -0
  147. package/dist/components/blocks/logo-columns/LogoColumns.css +1 -0
  148. package/dist/components/blocks/logo-rows/LogoRows.css +1 -0
  149. package/dist/components/blocks/page-header/PageHeader.css +1 -0
  150. package/dist/components/blocks/page-header/PageHeader.js +2 -2
  151. package/dist/components/blocks/page-header/PageHeader.types.d.ts +4 -2
  152. package/dist/components/blocks/page-header/PageHeader.types.js +1 -1
  153. package/dist/components/blocks/page-header/page-header-impl.css +5 -3
  154. package/dist/components/blocks/product-hero/ProductHero.css +8 -3
  155. package/dist/components/blocks/product-hero/ProductHero.d.ts +1 -1
  156. package/dist/components/blocks/product-hero/ProductHero.js +5 -2
  157. package/dist/components/blocks/product-hero/ProductHero.types.d.ts +5 -1
  158. package/dist/components/blocks/product-hero/ProductHero.types.js +1 -0
  159. package/dist/components/blocks/product-hero/product-hero-impl.css +43 -12
  160. package/dist/components/blocks/resource-banner/ResourceBanner.css +106 -0
  161. package/dist/components/blocks/resource-banner/ResourceBanner.d.ts +32 -0
  162. package/dist/components/blocks/resource-banner/ResourceBanner.js +51 -0
  163. package/dist/components/blocks/resource-banner/ResourceBanner.types.d.ts +44 -0
  164. package/dist/components/blocks/resource-banner/ResourceBanner.types.js +14 -0
  165. package/dist/components/blocks/resource-banner/resource-banner-impl.css +69 -0
  166. package/dist/components/blocks/scene-scroll/SceneScroll.css +93 -0
  167. package/dist/components/blocks/scene-scroll/SceneScroll.d.ts +36 -0
  168. package/dist/components/blocks/scene-scroll/SceneScroll.js +54 -0
  169. package/dist/components/blocks/scene-scroll/SceneScroll.types.d.ts +32 -0
  170. package/dist/components/blocks/scene-scroll/SceneScroll.types.js +15 -0
  171. package/dist/components/blocks/scene-scroll/scene-scroll-impl.css +275 -0
  172. package/dist/components/blocks/stats/Stats.css +139 -0
  173. package/dist/components/blocks/stats/Stats.d.ts +24 -0
  174. package/dist/components/blocks/stats/Stats.js +120 -0
  175. package/dist/components/blocks/stats/Stats.types.d.ts +36 -0
  176. package/dist/components/blocks/stats/Stats.types.js +19 -0
  177. package/dist/components/blocks/stats/stats-count.d.ts +34 -0
  178. package/dist/components/blocks/stats/stats-count.js +61 -0
  179. package/dist/components/blocks/stats/stats-impl.css +284 -0
  180. package/dist/components/blocks/stats/use-wheel.d.ts +37 -0
  181. package/dist/components/blocks/stats/use-wheel.js +126 -0
  182. package/dist/components/blocks/steps/Steps.css +202 -0
  183. package/dist/components/blocks/steps/Steps.d.ts +32 -0
  184. package/dist/components/blocks/steps/Steps.js +65 -0
  185. package/dist/components/blocks/steps/Steps.types.d.ts +48 -0
  186. package/dist/components/blocks/steps/Steps.types.js +21 -0
  187. package/dist/components/blocks/steps/steps-impl.css +216 -0
  188. package/dist/components/blocks/steps/use-turn.d.ts +33 -0
  189. package/dist/components/blocks/steps/use-turn.js +75 -0
  190. package/dist/components/blocks/sticky-cards/StickyCards.css +154 -0
  191. package/dist/components/blocks/sticky-cards/StickyCards.d.ts +35 -0
  192. package/dist/components/blocks/sticky-cards/StickyCards.js +153 -0
  193. package/dist/components/blocks/sticky-cards/StickyCards.types.d.ts +43 -0
  194. package/dist/components/blocks/sticky-cards/StickyCards.types.js +18 -0
  195. package/dist/components/blocks/sticky-cards/sticky-cards-impl.css +393 -0
  196. package/dist/components/blocks/team-grid/TeamGrid.css +159 -0
  197. package/dist/components/blocks/team-grid/TeamGrid.d.ts +28 -0
  198. package/dist/components/blocks/team-grid/TeamGrid.js +74 -0
  199. package/dist/components/blocks/team-grid/TeamGrid.types.d.ts +51 -0
  200. package/dist/components/blocks/team-grid/TeamGrid.types.js +20 -0
  201. package/dist/components/blocks/team-grid/team-grid-impl.css +129 -0
  202. package/dist/components/blocks/testimonial-row/TestimonialRow.css +1 -0
  203. package/dist/components/blocks/testimonial-row/TestimonialRow.d.ts +1 -1
  204. package/dist/components/blocks/testimonial-row/TestimonialRow.js +4 -3
  205. package/dist/components/blocks/testimonial-row/TestimonialRow.types.d.ts +3 -0
  206. package/dist/components/blocks/testimonial-row/TestimonialRow.types.js +1 -1
  207. package/dist/components/blocks/testimonial-row/testimonial-row-impl.css +8 -0
  208. package/dist/components/blocks/testimonial-slider/TestimonialSlider.css +1 -0
  209. package/dist/components/blocks/testimonial-slider/TestimonialSlider.d.ts +1 -1
  210. package/dist/components/blocks/testimonial-slider/TestimonialSlider.js +2 -2
  211. package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.d.ts +8 -0
  212. package/dist/components/blocks/testimonial-slider/TestimonialSlider.types.js +1 -1
  213. package/dist/components/blocks/text-scroll/TextScroll.css +53 -0
  214. package/dist/components/blocks/text-scroll/TextScroll.d.ts +5 -0
  215. package/dist/components/blocks/text-scroll/TextScroll.js +71 -0
  216. package/dist/components/blocks/text-scroll/TextScroll.types.d.ts +22 -0
  217. package/dist/components/blocks/text-scroll/TextScroll.types.js +10 -0
  218. package/dist/components/blocks/text-scroll/text-scroll-impl.css +115 -0
  219. package/dist/components/blocks/tiers/Tiers.css +233 -0
  220. package/dist/components/blocks/tiers/Tiers.d.ts +32 -0
  221. package/dist/components/blocks/tiers/Tiers.js +68 -0
  222. package/dist/components/blocks/tiers/Tiers.types.d.ts +45 -0
  223. package/dist/components/blocks/tiers/Tiers.types.js +25 -0
  224. package/dist/components/blocks/tiers/tiers-impl.css +185 -0
  225. package/dist/components/blocks/use-rotation.d.ts +12 -2
  226. package/dist/components/blocks/use-rotation.js +6 -28
  227. package/dist/components/comparison-cards-data.d.ts +59 -0
  228. package/dist/components/comparison-cards-data.js +12 -0
  229. package/dist/components/comparison-table-data.d.ts +39 -0
  230. package/dist/components/comparison-table-data.js +11 -0
  231. package/dist/components/core/accordion-item/AccordionItem.css +1 -5
  232. package/dist/components/core/background/Background.css +23 -0
  233. package/dist/components/core/background/Background.d.ts +10 -4
  234. package/dist/components/core/background/Background.js +16 -7
  235. package/dist/components/core/background/Background.types.d.ts +11 -8
  236. package/dist/components/core/background/Background.types.js +3 -1
  237. package/dist/components/core/background/background-impl.css +334 -1
  238. package/dist/components/core/background/halftone.d.ts +11 -0
  239. package/dist/components/core/background/halftone.js +43 -3
  240. package/dist/components/core/background/patterns.d.ts +66 -0
  241. package/dist/components/core/background/patterns.js +244 -0
  242. package/dist/components/core/background/shader.d.ts +44 -0
  243. package/dist/components/core/background/shader.js +307 -0
  244. package/dist/components/core/background/use-shader.d.ts +11 -0
  245. package/dist/components/core/background/use-shader.js +25 -0
  246. package/dist/components/core/background/use-spotlight.d.ts +2 -1
  247. package/dist/components/core/background/use-spotlight.js +9 -1
  248. package/dist/components/core/bottom-sheet/BottomSheet.js +2 -2
  249. package/dist/components/core/bottom-sheet/BottomSheet.types.d.ts +3 -1
  250. package/dist/components/core/breadcrumb/Breadcrumb.d.ts +1 -0
  251. package/dist/components/core/breadcrumb/Breadcrumb.js +1 -0
  252. package/dist/components/core/breadcrumb/breadcrumb-impl.css +11 -0
  253. package/dist/components/core/button/button-impl.css +14 -1
  254. package/dist/components/core/illustration-card/IllustrationCard.js +1 -1
  255. package/dist/components/core/illustration-card/illustration-card-impl.css +20 -0
  256. package/dist/components/core/illustration-scene/IllustrationScene.css +4 -7
  257. package/dist/components/core/illustration-scene/IllustrationScene.types.d.ts +2 -3
  258. package/dist/components/core/illustration-scene/illustration-scene-impl.css +7 -1
  259. package/dist/components/core/link/Link.js +7 -3
  260. package/dist/components/core/link/link-impl.css +29 -2
  261. package/dist/components/core/navbar/Navbar.css +2 -2
  262. package/dist/components/core/navbar/Navbar.types.d.ts +1 -1
  263. package/dist/components/core/navbar-item/NavbarItem.d.ts +2 -1
  264. package/dist/components/core/navbar-item/NavbarItem.js +3 -10
  265. package/dist/components/core/navbar-item/NavbarItem.types.d.ts +4 -1
  266. package/dist/components/core/navbar-item/NavbarItem.types.js +1 -1
  267. package/dist/components/core/navbar-item/navbar-item-impl.css +10 -0
  268. package/dist/components/core/navbar-menu/navbar-menu-impl.css +9 -0
  269. package/dist/components/core/navbar-switcher/navbar-switcher-impl.css +19 -0
  270. package/dist/components/core/pagination/Pagination.js +1 -1
  271. package/dist/components/core/pagination/pagination-impl.css +9 -0
  272. package/dist/components/core/pagination-dots/PaginationDots.d.ts +1 -1
  273. package/dist/components/core/pagination-dots/PaginationDots.js +3 -3
  274. package/dist/components/core/pagination-dots/PaginationDots.types.d.ts +3 -1
  275. package/dist/components/core/segmented-control/SegmentedControl.css +4 -3
  276. package/dist/components/core/segmented-control/SegmentedControl.js +17 -3
  277. package/dist/components/core/segmented-control-item/SegmentedControlItem.css +2 -1
  278. package/dist/components/core/select/Select.js +3 -3
  279. package/dist/components/core/select/Select.types.d.ts +11 -1
  280. package/dist/components/core/select/Select.types.js +1 -1
  281. package/dist/components/core/tab-list/TabList.js +9 -1
  282. package/dist/components/core/table-header-cell/TableHeaderCell.d.ts +1 -1
  283. package/dist/components/core/table-header-cell/TableHeaderCell.js +5 -2
  284. package/dist/components/core/table-header-cell/TableHeaderCell.types.d.ts +7 -1
  285. package/dist/components/core/table-header-cell/TableHeaderCell.types.js +1 -1
  286. package/dist/components/core/text-area/TextArea.d.ts +1 -1
  287. package/dist/components/core/text-area/TextArea.js +2 -2
  288. package/dist/components/core/text-area/TextArea.types.d.ts +9 -1
  289. package/dist/components/core/text-area/TextArea.types.js +1 -1
  290. package/dist/components/core/text-input/TextInput.d.ts +1 -1
  291. package/dist/components/core/text-input/TextInput.js +2 -2
  292. package/dist/components/core/text-input/TextInput.types.d.ts +9 -1
  293. package/dist/components/core/text-input/TextInput.types.js +1 -1
  294. package/dist/components/data-table-data.d.ts +33 -0
  295. package/dist/components/data-table-data.js +12 -0
  296. package/dist/components/download-banner-data.d.ts +52 -0
  297. package/dist/components/download-banner-data.js +11 -0
  298. package/dist/components/index.d.ts +45 -0
  299. package/dist/components/index.js +32 -0
  300. package/dist/components/resource-banner-data.d.ts +34 -0
  301. package/dist/components/resource-banner-data.js +13 -0
  302. package/dist/components/scene-scroll-data.d.ts +24 -0
  303. package/dist/components/scene-scroll-data.js +9 -0
  304. package/dist/components/stats-data.d.ts +28 -0
  305. package/dist/components/stats-data.js +11 -0
  306. package/dist/components/steps-data.d.ts +38 -0
  307. package/dist/components/steps-data.js +13 -0
  308. package/dist/components/sticky-cards-data.d.ts +43 -0
  309. package/dist/components/sticky-cards-data.js +12 -0
  310. package/dist/components/team-grid-data.d.ts +38 -0
  311. package/dist/components/team-grid-data.js +11 -0
  312. package/dist/components/tiers-data.d.ts +47 -0
  313. package/dist/components/tiers-data.js +13 -0
  314. package/dist/marketing.css +77 -28
  315. package/package.json +1 -1
@@ -0,0 +1,185 @@
1
+ /*
2
+ * Scoped to this package, like the generated sheet beside it.
3
+ *
4
+ * `:where([data-dds-context="marketing"])` confines these rules without contributing specificity,
5
+ * so each is decided against the generated rule on its own terms.
6
+ *
7
+ * The section has no motion of its own beyond the arrival every block shares, which block-reveal.css
8
+ * states once and turns off under reduced motion. Nothing here animates.
9
+ */
10
+
11
+ /*
12
+ * The header and the way on start on a phone and are centred once the band is wide enough.
13
+ *
14
+ * PageHeader's rule and FeatureCards' copy of it: centred text starts every line at a different
15
+ * edge, which costs little across a wide measure and a great deal across a narrow one. The header
16
+ * and the line under it are capped narrower than the column, so `margin-inline: auto` is what
17
+ * centres those boxes rather than their words inside a box left at the start edge.
18
+ *
19
+ * `48rem` longhand because `var()` is not permitted in a container query condition, and it is the
20
+ * width the rest of this package folds at.
21
+ */
22
+ @container (min-width: 48rem) {
23
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__header {
24
+ align-items: center;
25
+ margin-inline: auto;
26
+ text-align: center;
27
+ }
28
+
29
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__description {
30
+ margin-inline: auto;
31
+ }
32
+
33
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__footer {
34
+ justify-content: center;
35
+ }
36
+ }
37
+
38
+ /*
39
+ * One column on a phone, two from the fold, and at full width one row holding every tier.
40
+ *
41
+ * `minmax(0, 1fr)` rather than `1fr`, so a long unbroken word in a benefit shrinks to the column
42
+ * instead of pushing the row past the page. At full width the row is as many columns as there are
43
+ * tiers — two, three, or four, the most this draws — read from the markup with `:has()`, the way
44
+ * FeatureCards counts its cards, so the ladder is always one row and the track through the medals
45
+ * always has every medal on it. Where `:has()` is not supported every count takes four columns: a
46
+ * shorter ladder leaves the end of the row empty, and still reads.
47
+ */
48
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__list {
49
+ grid-template-columns: minmax(0, 1fr);
50
+ }
51
+
52
+ @container (min-width: 48rem) {
53
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__list {
54
+ grid-template-columns: repeat(2, minmax(0, 1fr));
55
+ }
56
+ }
57
+
58
+ @container (min-width: 64rem) {
59
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__list {
60
+ grid-template-columns: repeat(4, minmax(0, 1fr));
61
+ }
62
+
63
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__list:has(> :nth-child(3):last-child) {
64
+ grid-template-columns: repeat(3, minmax(0, 1fr));
65
+ }
66
+
67
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__list:has(> :nth-child(2):last-child) {
68
+ grid-template-columns: repeat(2, minmax(0, 1fr));
69
+ }
70
+ }
71
+
72
+ /*
73
+ * A tier starts at the edge on a phone and is centred from the fold.
74
+ *
75
+ * On a phone the medal, the name and the card all start where the heading above them starts, and
76
+ * the name and its stage share a line — the reference design's narrow arrangement, which keeps a
77
+ * column of four tiers from running to four screens. From the fold each tier is a column of its
78
+ * own, centred under its medal, with the stage under the name.
79
+ */
80
+ @container (min-width: 48rem) {
81
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__tier {
82
+ text-align: center;
83
+ }
84
+
85
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__medal-row {
86
+ justify-content: center;
87
+ }
88
+
89
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__heading {
90
+ align-items: center;
91
+ flex-direction: column;
92
+ }
93
+ }
94
+
95
+ /*
96
+ * From the fold, the tiers in a row share their rows: the medals on one line, the names on the
97
+ * next, the cards level, and the qualifications under them starting on one line.
98
+ *
99
+ * Each tier spans four of the list's rows and lays its parts on them as a subgrid, so the card row
100
+ * is as tall as the tallest card in it and every card stretches to it. Growing the card to fill the
101
+ * tier instead made the entry tier's card — the one with no qualification under it — the tallest in
102
+ * the row, by exactly the qualification it does not have. The tier keeps its own gap between its
103
+ * parts; the list's gutter is still what separates one row of tiers from the next.
104
+ *
105
+ * Where subgrid is not supported the tier stays a column: the cards end ragged, and still read.
106
+ */
107
+ @container (min-width: 48rem) {
108
+ @supports (grid-template-rows: subgrid) {
109
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__tier {
110
+ display: grid;
111
+ grid-row: span 4;
112
+ grid-template-rows: subgrid;
113
+ }
114
+ }
115
+ }
116
+
117
+ /*
118
+ * The track through the medals, at full width only.
119
+ *
120
+ * Each tier draws its own two halves, either side of its medal, and the row they sit in reaches
121
+ * half a gutter past the tier at each end — so one tier's outgoing half meets the next one's
122
+ * incoming half in the middle of the gutter, and the rule reads as one line through every medal
123
+ * rather than a dash under each. Below this width the tiers are stacked or in two columns, and a
124
+ * line would join a medal to nothing.
125
+ *
126
+ * The first tier's incoming half and the last one's outgoing half are kept for their width and not
127
+ * drawn: kept, so every medal sits in the middle of its tier; not drawn, so the track starts at the
128
+ * first medal and stops at the last rather than running to the edges of the page.
129
+ *
130
+ * `64rem` longhand for the reason the fold is.
131
+ */
132
+ @container (min-width: 64rem) {
133
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__medal-row {
134
+ margin-inline: calc(var(--space-grid-gutter) / -2);
135
+ }
136
+
137
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__medal-row > :is(.dds-tiers__line-start, .dds-tiers__line-end) {
138
+ display: block;
139
+ flex: 1 1 0;
140
+ }
141
+
142
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__tier:first-child .dds-tiers__line-start,
143
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__tier:last-child .dds-tiers__line-end {
144
+ visibility: hidden;
145
+ }
146
+ }
147
+
148
+ /*
149
+ * The benefit card on the painted grounds — FeatureCards' and ComparisonCards' rules for the same
150
+ * card, and their reasons.
151
+ *
152
+ * Card's surface is the recessed grey made for the page. On the grey band that is the band's own
153
+ * grey and the card vanishes, so it takes the raised fill, color.bg.surface-card-raised. On the
154
+ * dark band its fill and ink are made for a light page — dark words on near-black — so it turns
155
+ * round to the inverse surface and white ink, the values Card's own inverse uses. The block knows
156
+ * its ground and the card does not, so the answer is here rather than in Card.
157
+ */
158
+ :where([data-dds-context="marketing"])
159
+ .dds-tiers[data-ground="subtle"]
160
+ .dds-tiers__tier
161
+ > .dds-card[data-variant="surface"] {
162
+ background-color: var(--color-bg-surface-card-raised);
163
+ }
164
+
165
+ :where([data-dds-context="marketing"])
166
+ .dds-tiers[data-ground="strong"]
167
+ .dds-tiers__tier
168
+ > .dds-card[data-variant="surface"] {
169
+ background-color: var(--color-bg-surface-inverse);
170
+ color: var(--color-fg-on-brand-strong);
171
+ }
172
+
173
+ /*
174
+ * Stacked — one to a row on a phone, two to a row before the full width — the tiers are held further
175
+ * apart than a tier's own parts: the grid's gutter alone left one tier's qualification about as close
176
+ * to the next tier's medal as to its own card, and the ladder ran together. space.gap.2xl between
177
+ * rungs; from 64rem they stand in one row and the gutter is the gap between columns again.
178
+ *
179
+ * `63.9375rem` is the last width below the full-width fold.
180
+ */
181
+ @container (max-width: 63.9375rem) {
182
+ :where([data-dds-context="marketing"]) .dds-tiers .dds-tiers__list {
183
+ row-gap: var(--space-gap-2xl);
184
+ }
185
+ }
@@ -17,13 +17,23 @@ import { type FocusEvent, type MouseEvent, type PointerEvent } from 'react';
17
17
  * - `region`, spread on that element: the carousel's role description and the hold and stop
18
18
  * handlers;
19
19
  * - `track`, spread on the element holding the items: the swipe and what is announced;
20
- * - `item(at)`, spread on each item: its group role, its "2 / 3" name and its inert state;
20
+ * - `item(at)`, spread on each item: its group role, its "2 of 3" name and its inert state;
21
21
  * - `dots`, spread on PaginationDots alongside the block's own label.
22
22
  *
23
23
  * Fewer than two items is a set with nothing to move to, drawn still rather than broken: every
24
24
  * attribute that says "carousel" is left off and the dots are the block's to omit.
25
25
  */
26
- export declare function useRotation(count: number, autoplay: boolean): {
26
+ /**
27
+ * The words the set is announced in. Every one is the page's to translate: a role description is
28
+ * read out exactly as given, so one left in English is heard in English on a page in any language.
29
+ */
30
+ export interface RotationWords {
31
+ roleDescription: string;
32
+ slideRoleDescription: string;
33
+ /** An item's name from its place, counting from one. */
34
+ positionLabel?: (position: number, count: number) => string;
35
+ }
36
+ export declare function useRotation(count: number, autoplay: boolean, words: RotationWords): {
27
37
  current: number;
28
38
  rotating: boolean;
29
39
  root: import("react").RefObject<HTMLElement | null>;
@@ -9,31 +9,7 @@ const SWIPE_CLICK_MS = 300;
9
9
  function tokenOn(element, name) {
10
10
  return element === null ? '' : getComputedStyle(element).getPropertyValue(name);
11
11
  }
12
- /**
13
- * One block rotating between a few things in place — which one is in view, and every way a reader
14
- * moves it, holds it or stops it.
15
- *
16
- * Shared because two blocks rotate, CtaBannerSlider and TestimonialSlider, and a carousel is the
17
- * kind of thing that drifts: one stops on a press and the other does not, one swallows the click a swipe
18
- * ends in and the other follows the link. The rules are stated once here and each block spreads
19
- * what this hands back onto its own parts.
20
- *
21
- * The clock is not here. PaginationDots holds the timer and the reduced-motion stillness, and this
22
- * tells it when to wait — so there is one clock per block, and it is the one a reader can see.
23
- *
24
- * What it hands back:
25
- * - `root`, the ref for the block's own element, which the swipe threshold and the reading
26
- * direction are read off;
27
- * - `region`, spread on that element: the carousel's role description and the hold and stop
28
- * handlers;
29
- * - `track`, spread on the element holding the items: the swipe and what is announced;
30
- * - `item(at)`, spread on each item: its group role, its "2 / 3" name and its inert state;
31
- * - `dots`, spread on PaginationDots alongside the block's own label.
32
- *
33
- * Fewer than two items is a set with nothing to move to, drawn still rather than broken: every
34
- * attribute that says "carousel" is left off and the dots are the block's to omit.
35
- */
36
- export function useRotation(count, autoplay) {
12
+ export function useRotation(count, autoplay, words) {
37
13
  const rotating = count > 1;
38
14
  const root = useRef(null);
39
15
  const [index, setIndex] = useState(0);
@@ -122,7 +98,7 @@ export function useRotation(count, autoplay) {
122
98
  rotating,
123
99
  root,
124
100
  region: {
125
- 'aria-roledescription': rotating ? 'carousel' : undefined,
101
+ 'aria-roledescription': rotating ? words.roleDescription : undefined,
126
102
  onPointerEnter: (event) => {
127
103
  if (event.pointerType === 'mouse')
128
104
  setHeld(true);
@@ -159,8 +135,10 @@ export function useRotation(count, autoplay) {
159
135
  const away = rotating && at !== current;
160
136
  return {
161
137
  role: rotating ? 'group' : undefined,
162
- 'aria-roledescription': rotating ? 'slide' : undefined,
163
- 'aria-label': rotating ? `${at + 1} / ${count}` : undefined,
138
+ 'aria-roledescription': rotating ? words.slideRoleDescription : undefined,
139
+ 'aria-label': rotating
140
+ ? words.positionLabel?.(at + 1, count) ?? `${at + 1} of ${count}`
141
+ : undefined,
164
142
  'aria-hidden': away || undefined,
165
143
  inert: away || undefined,
166
144
  };
@@ -0,0 +1,59 @@
1
+ /**
2
+ * The cards a ComparisonCards sets side by side, and the rows each one repeats.
3
+ *
4
+ * Exported from the package for the reason `testimonial-row-data.ts` is: a block whose content is a
5
+ * list is one whose consumer builds a value before passing it.
6
+ *
7
+ * Records rather than a Card per option, because what a comparison is made of is structured — a
8
+ * name, a sentence, and the same few labels each answered with a value — and the block has to lay
9
+ * those rows out against the rows of the card beside it. A Card handed in whole is a box the block
10
+ * cannot see into, so its rows could never line up with anyone else's.
11
+ */
12
+ /** One line of a comparison card: what is being compared, and this option's answer to it. */
13
+ export interface ComparisonCardsRow {
14
+ /**
15
+ * What the row compares — "Leverage", "Cost per trade". Written on every card rather than once
16
+ * for the set: each card is read on its own, and a phone stacks them out of sight of each other.
17
+ */
18
+ label: string;
19
+ /** This option's answer, short enough to sit at the end of the row — "Up to 1:1000", "None". */
20
+ value: string;
21
+ }
22
+ /** A way on from one card to the page about that option, written as a standalone link. */
23
+ export interface ComparisonCardsAction {
24
+ /** The words of the link — "Explore Futures", "Open a Spot account". */
25
+ label: string;
26
+ /** Where it goes, as a URL. */
27
+ href: string;
28
+ }
29
+ /** One option in a ComparisonCards: its name, a sentence, its rows, and the surface it is drawn on. */
30
+ export interface ComparisonCardsCard {
31
+ /** The option's name — "Spot", "Futures", "Standard account". */
32
+ title: string;
33
+ /** What the option is, in a sentence or two, under its name. */
34
+ description?: string;
35
+ /**
36
+ * This is the option the page recommends. In the highlighted variant it is drawn coral, the one
37
+ * card set against the light ones; only the first card marked is. Ignored by the standard variant.
38
+ */
39
+ recommended?: boolean;
40
+ /**
41
+ * A word on a badge over the recommended card's top edge — "Most popular", "Recommended". Optional:
42
+ * the coral already says which card it is, and a badge is for a page that wants to say why. Drawn
43
+ * only on the recommended card, in the highlighted variant.
44
+ */
45
+ badge?: string;
46
+ /**
47
+ * The rows, in the order they are read. Keep the same labels in the same order on every card in
48
+ * the set, so a row lines up with its counterpart beside it.
49
+ */
50
+ rows: ComparisonCardsRow[];
51
+ /**
52
+ * A disclaimer that belongs to this option alone — a risk warning, a condition on a value — at
53
+ * the foot of its card. Never the section's: a note under the heading would read as true of every
54
+ * option.
55
+ */
56
+ footnote?: string;
57
+ /** A way on to the page about this option, at the foot of its card under any footnote. */
58
+ action?: ComparisonCardsAction;
59
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The cards a ComparisonCards sets side by side, and the rows each one repeats.
3
+ *
4
+ * Exported from the package for the reason `testimonial-row-data.ts` is: a block whose content is a
5
+ * list is one whose consumer builds a value before passing it.
6
+ *
7
+ * Records rather than a Card per option, because what a comparison is made of is structured — a
8
+ * name, a sentence, and the same few labels each answered with a value — and the block has to lay
9
+ * those rows out against the rows of the card beside it. A Card handed in whole is a box the block
10
+ * cannot see into, so its rows could never line up with anyone else's.
11
+ */
12
+ export {};
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The columns a ComparisonTable compares and the rows it compares them on.
3
+ *
4
+ * Exported from the package for the reason `testimonial-row-data.ts` and `banner-data.ts` are: a block
5
+ * whose content is a list is one whose consumer builds a value before passing it.
6
+ *
7
+ * Records rather than a component per row, because a row of a comparison is a label and a few short
8
+ * values — nothing in it is an element a page composes — and the block has to draw every row against
9
+ * the same columns, which it cannot check inside rows it was handed whole.
10
+ */
11
+ /**
12
+ * One column of a ComparisonTable: the key its values are filed under in every row, and the name
13
+ * written over it.
14
+ *
15
+ * The first column is the labels' own: its `label` names what the rows are — "Features", "Market" —
16
+ * and its `key` files nothing, since each row carries its label itself. The columns after it are the
17
+ * options being compared, two or three of them.
18
+ */
19
+ export interface ComparisonTableColumn {
20
+ /** What this column's values are filed under in each row's `values`: "web", "desktop". */
21
+ key: string;
22
+ /** The name over the column, one short line: "Web terminal", "Desktop". */
23
+ label: string;
24
+ }
25
+ /**
26
+ * One cell's value. A string is one line; a list of strings is several, each its own line — a
27
+ * schedule's sessions, a platform's operating systems — and is announced as a list of that many.
28
+ */
29
+ export type ComparisonTableValue = string | string[];
30
+ /** One row of a ComparisonTable: what is being compared, and each option's answer to it. */
31
+ export interface ComparisonTableRow {
32
+ /** What the row compares, in a few words: "Charts", "Expert Advisors". Drawn as the row's header. */
33
+ label: string;
34
+ /**
35
+ * Each option's answer, filed under its column's `key`. A column the row has no value for is an
36
+ * empty cell rather than a missing one, so the row keeps the table's shape.
37
+ */
38
+ values: Record<string, ComparisonTableValue | undefined>;
39
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The columns a ComparisonTable compares and the rows it compares them on.
3
+ *
4
+ * Exported from the package for the reason `testimonial-row-data.ts` and `banner-data.ts` are: a block
5
+ * whose content is a list is one whose consumer builds a value before passing it.
6
+ *
7
+ * Records rather than a component per row, because a row of a comparison is a label and a few short
8
+ * values — nothing in it is an element a page composes — and the block has to draw every row against
9
+ * the same columns, which it cannot check inside rows it was handed whole.
10
+ */
11
+ export {};
@@ -13,7 +13,7 @@
13
13
  }
14
14
 
15
15
  :where([data-dds-context="marketing"]) .dds-accordionitem .dds-accordionitem__trigger {
16
- transition-property: color, outline-color, outline-width;
16
+ transition-property: outline-color, outline-width;
17
17
  align-items: center;
18
18
  appearance: none;
19
19
  background: none;
@@ -73,10 +73,6 @@
73
73
  transition-timing-function: var(--motion-easing-enter);
74
74
  }
75
75
 
76
- :where([data-dds-context="marketing"]) .dds-accordionitem .dds-accordionitem__trigger:hover:where(:not(:disabled)) {
77
- color: var(--color-fg-muted);
78
- }
79
-
80
76
  :where([data-dds-context="marketing"]) .dds-accordionitem .dds-accordionitem__trigger:focus-visible {
81
77
  outline-color: var(--color-border-focus);
82
78
  outline-width: var(--border-width-focus);
@@ -10,6 +10,17 @@
10
10
  position: relative;
11
11
  }
12
12
 
13
+ :where([data-dds-context="marketing"]) .dds-background .dds-background__mesh {
14
+ pointer-events: none;
15
+ position: absolute;
16
+ }
17
+
18
+ :where([data-dds-context="marketing"]) .dds-background .dds-background__pool {
19
+ position: absolute;
20
+ background-color: var(--color-bg-brand-active);
21
+ transition-timing-function: var(--motion-easing-standard);
22
+ }
23
+
13
24
  :where([data-dds-context="marketing"]) .dds-background .dds-background__content {
14
25
  box-sizing: border-box;
15
26
  inline-size: 100%;
@@ -36,6 +47,10 @@
36
47
  color: var(--color-fg-on-brand);
37
48
  }
38
49
 
50
+ :where([data-dds-context="marketing"]) .dds-background[data-tone="brand"] .dds-background__mesh {
51
+ background-color: var(--color-bg-brand);
52
+ }
53
+
39
54
  :where([data-dds-context="marketing"]) .dds-background[data-tone="dark"] {
40
55
  background-color: var(--color-bg-brand-strong);
41
56
  }
@@ -49,6 +64,10 @@
49
64
  color: var(--color-fg-on-brand-strong);
50
65
  }
51
66
 
67
+ :where([data-dds-context="marketing"]) .dds-background[data-tone="dark"] .dds-background__mesh {
68
+ background-color: var(--color-bg-brand-strong);
69
+ }
70
+
52
71
  :where([data-dds-context="marketing"]) .dds-background[data-tone="light"] {
53
72
  background-color: var(--color-bg-page);
54
73
  }
@@ -62,6 +81,10 @@
62
81
  color: var(--color-fg-default);
63
82
  }
64
83
 
84
+ :where([data-dds-context="marketing"]) .dds-background[data-tone="light"] .dds-background__mesh {
85
+ background-color: var(--color-bg-page);
86
+ }
87
+
65
88
  @media (prefers-reduced-motion: reduce) {
66
89
  :where([data-dds-context="marketing"]) .dds-background,
67
90
  :where([data-dds-context="marketing"]) .dds-background * { transition: none !important; }
@@ -9,10 +9,16 @@ export type { BackgroundProps };
9
9
  * The flat colour is what shows before anything has drawn — on a server-rendered page, until
10
10
  * hydration — so the band is finished from the first paint and the pattern only ever adds to it.
11
11
  *
12
- * Four patterns. The halftone is drawn by script on a canvas, through `useHalftone`, which owns
13
- * every question of its cost: it draws only while something moves, pauses out of view and holds
14
- * the bitmap to twice the pixel density. The aurora, the grid and the rings are painted by the
15
- * stylesheet, with no canvas; `useSpotlight` only tells them where the pointer is.
12
+ * Five patterns, drawn two ways. The halftone is drawn by script on a 2D canvas, through
13
+ * `useHalftone`, which owns every question of its cost. The aurora, the mesh, the grid and the
14
+ * rings are fragment shaders on a WebGL canvas, through `useShader` — light with structure
15
+ * in it, and a grain over it — with the same rules: drawn only while something moves, paused out of
16
+ * view, held still for a reader who asked for less motion.
17
+ *
18
+ * Each shaded pattern has a stylesheet version as well, which is what shows before the shader has
19
+ * drawn and wherever WebGL cannot run: the root is marked `data-shaded` once the canvas has a frame,
20
+ * and the stylesheet's paint steps aside. `useSpotlight` and `useOffscreen` serve that version. The
21
+ * mesh's is the one that needs elements of its own — five pools, each moving on its own loops.
16
22
  *
17
23
  * With nothing to hold it is a layer: it fills its positioned parent behind that parent's own
18
24
  * content, and listens for the pointer on the parent, because the content covers it. That is how a
@@ -5,6 +5,7 @@ import './background-impl.css';
5
5
  import { backgroundDefaults, backgroundParts } from './Background.types.js';
6
6
  import { useHalftone } from './use-halftone.js';
7
7
  import { useOffscreen } from './use-offscreen.js';
8
+ import { useShader } from './use-shader.js';
8
9
  import { useSpotlight } from './use-spotlight.js';
9
10
  /**
10
11
  * A ground a section or a block sits on, painted with a pattern.
@@ -13,10 +14,16 @@ import { useSpotlight } from './use-spotlight.js';
13
14
  * The flat colour is what shows before anything has drawn — on a server-rendered page, until
14
15
  * hydration — so the band is finished from the first paint and the pattern only ever adds to it.
15
16
  *
16
- * Four patterns. The halftone is drawn by script on a canvas, through `useHalftone`, which owns
17
- * every question of its cost: it draws only while something moves, pauses out of view and holds
18
- * the bitmap to twice the pixel density. The aurora, the grid and the rings are painted by the
19
- * stylesheet, with no canvas; `useSpotlight` only tells them where the pointer is.
17
+ * Five patterns, drawn two ways. The halftone is drawn by script on a 2D canvas, through
18
+ * `useHalftone`, which owns every question of its cost. The aurora, the mesh, the grid and the
19
+ * rings are fragment shaders on a WebGL canvas, through `useShader` — light with structure
20
+ * in it, and a grain over it — with the same rules: drawn only while something moves, paused out of
21
+ * view, held still for a reader who asked for less motion.
22
+ *
23
+ * Each shaded pattern has a stylesheet version as well, which is what shows before the shader has
24
+ * drawn and wherever WebGL cannot run: the root is marked `data-shaded` once the canvas has a frame,
25
+ * and the stylesheet's paint steps aside. `useSpotlight` and `useOffscreen` serve that version. The
26
+ * mesh's is the one that needs elements of its own — five pools, each moving on its own loops.
20
27
  *
21
28
  * With nothing to hold it is a layer: it fills its positioned parent behind that parent's own
22
29
  * content, and listens for the pointer on the parent, because the content covers it. That is how a
@@ -26,11 +33,13 @@ export function Background({ tone = backgroundDefaults.tone, pattern = backgroun
26
33
  // Nothing to hold: a layer under the parent's own content. See above.
27
34
  const layer = children === undefined || children === null || children === false;
28
35
  const [root, canvas] = useHalftone(pattern === 'halftone', interactive, animated, tone, layer);
29
- // The patterns the stylesheet paints answer the pointer from where it is: the grid's lines and
30
- // the rings brighten around it, and the aurora carries a pool of its light after it.
36
+ const shaded = useShader(root, pattern === 'halftone' ? undefined : pattern, interactive, animated, tone, layer);
37
+ // The stylesheet's versions of the patterns answer the pointer from where it is: the grid's lines and
38
+ // the rings brighten around it, the aurora carries a pool of its light after it, and the mesh's
39
+ // pools lean towards it.
31
40
  useSpotlight(root, pattern !== 'halftone' && interactive, layer);
32
41
  // The patterns the stylesheet moves at rest wait while the band is off screen; the halftone's
33
42
  // painter has its own observer.
34
43
  useOffscreen(root, pattern !== 'halftone' && animated);
35
- return (_jsxs("div", { ...rest, ref: root, className: backgroundParts.root, "data-tone": tone, "data-pattern": pattern, "data-animated": animated ? undefined : 'false', "data-layer": layer || undefined, "aria-hidden": layer || undefined, children: [pattern === 'halftone' ? (_jsx("canvas", { ref: canvas, className: backgroundParts.canvas, "aria-hidden": "true" })) : null, layer ? null : _jsx("div", { className: backgroundParts.content, children: children })] }));
44
+ return (_jsxs("div", { ...rest, ref: root, className: backgroundParts.root, "data-tone": tone, "data-pattern": pattern, "data-animated": animated ? undefined : 'false', "data-layer": layer || undefined, "aria-hidden": layer || undefined, children: [_jsx("canvas", { ref: pattern === 'halftone' ? canvas : shaded, className: backgroundParts.canvas, "aria-hidden": "true" }, pattern), pattern === 'mesh' ? (_jsx("div", { className: backgroundParts.mesh, "aria-hidden": "true", children: [0, 1, 2, 3, 4].map((at) => (_jsx("span", { className: backgroundParts.pool }, at))) })) : null, layer ? null : _jsx("div", { className: backgroundParts.content, children: children })] }));
36
45
  }
@@ -1,18 +1,19 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
2
  export interface BackgroundOwnProps {
3
3
  /**
4
- * `dark` — The default, and the band the pattern was drawn for: coral dots glowing on color.bg.brand-strong, which is dark in both modes. Reach for it for the band a page opens or closes on, where the glow gives the band a centre
4
+ * `dark` — The band the halftone was drawn for: coral dots glowing on color.bg.brand-strong, which is dark in both modes. Reach for it for the band a page opens or closes on, where the glow gives the band a centre
5
5
  * `light` — Coral dots on the page's own ground, for a light page that wants one moment of brand colour without a solid coral band. The glow reads as warmth rather than light, so keep it for a section that is not competing with a dark one nearby
6
- * `brand` — White dots on the coral brand fill, for a call to action standing on it. The heading is white too, and the glow rises from the foot of the band towards it, so check the words read on the coral alone — the dots can only add to what is behind them
6
+ * `brand` — The default: the brand's own coral, the ground the mesh was made for and the one a call to action stands on. White dots on it for the halftone. The heading is white too, and the glow rises from the foot of the band towards it, so check the words read on the coral alone — the pattern can only add to what is behind them
7
7
  */
8
8
  tone?: 'dark' | 'light' | 'brand';
9
9
  /**
10
- * `halftone` — A grid of dots across the whole band that grow towards a soft glow and settle to a fine screen away from it. The default, and the one that moves most
11
- * `aurora` — Broad soft pools of the brand's colour rising from the band's foot and drifting slowly into one another — light as colour rather than as points. Drawn by the stylesheet: no canvas. At rest the pools wander, there and back, over motion.duration.drift; on an interactive band a smaller pool trails the pointer. Reach for it where the halftone would be too busy — an opening band with a picture or a product on it, where dots behind the picture fight it and a wash of colour does not
12
- * `grid` — A fine rule grid of hairlines, fading in towards the band's foot — the grid PageHeader paints, offered for any band. Drawn by the stylesheet: no canvas. On an interactive band the lines brighten in a soft circle around the pointer and fade back when it leaves; at rest the rules rise slowly, a pitch over motion.duration.drift. Reach for it where the band should read as deliberate and quiet rather than lit
13
- * `rings` — Hairline circles spreading out from the middle of the band's foot, fading in towards it, at size.rings.pitch. Drawn by the stylesheet: no canvas. On an interactive band the rings brighten in a soft circle around the pointer and fade back when it leaves; at rest the rings spread slowly outward, a pitch over motion.duration.drift. As quiet as the grid, but round: reach for it where the band should feel open and centred rather than ruled — a call to action, a closing band with one thing to say
10
+ * `halftone` — A grid of dots across the whole band that grow towards a soft glow and settle to a fine screen away from it, over a faint wash of their own ink. The glow's edge wanders from a plain ellipse as it drifts, so it reads as light on a surface rather than a spotlight. The default, and the one that moves most
11
+ * `aurora` — Curtains of light rising from the band's foot: sheets of the brand's colour swaying and folding, with a ragged crest and fine rays running up through them — light falling through folds rather than pools of colour. Drawn by a shader with a grain over it; before it has drawn, and where it cannot, soft pools of the same colour painted by the stylesheet. At rest the curtains sway over motion.duration.drift; on an interactive band the pointer bends them towards it and brightens them. Reach for it where the halftone would be too busy — an opening band with a picture or a product on it, where dots behind the picture fight it and a wash of light does not
12
+ * `mesh` — The whole band in the brand's reds, folded into one another like a liquid — the design system's own front page. A noise warped by a noise, so the colours run in ribbons and eddies with a sheen on their crests, turning slowly. Drawn by a shader with a grain over it; before it has drawn, and where it cannot, five blurred pools painted by the stylesheet. On an interactive band the pointer draws the field towards it, as a hand drawn through paint; with `animated` off it rests until the pointer is over the band and flows only while it is. Made for the coral ground, where it is the brand at its loudest; on the dark ground it is red smoke on near-black, on the light one a faint marbling. Reach for it for the one band a page is remembered by, and keep the words on it few and large
13
+ * `grid` — Hairlines a pitch apart, size.rule-grid.pitch, rising from a soft bloom at the band's foot — the grid PageHeader paints, offered for any band, now lit: a brighter point where two lines cross, and every few lines a short dash of light running along it. Drawn by a shader at up to twice the pixel density, so a hairline stays a hairline; before it has drawn, and where it cannot, the same rules painted by the stylesheet. At rest the rules rise slowly, a pitch over motion.duration.drift; on an interactive band the lines brighten around the pointer. Reach for it where the band should read as deliberate and quiet rather than lit
14
+ * `rings` — Hairline circles spreading out from the middle of the band's foot at size.rings.pitch, out of a soft bloom there, with arcs of light travelling round each ring at its own pace and direction. Drawn by a shader at up to twice the pixel density; before it has drawn, and where it cannot, the same rings painted by the stylesheet. At rest the rings spread slowly outward, a pitch over motion.duration.drift; on an interactive band they brighten around the pointer. As quiet as the grid, but round: reach for it where the band should feel open and centred rather than ruled — a call to action, a closing band with one thing to say
14
15
  */
15
- pattern?: 'halftone' | 'aurora' | 'grid' | 'rings';
16
+ pattern?: 'halftone' | 'aurora' | 'mesh' | 'grid' | 'rings';
16
17
  /** On by default: every pattern moves slowly at rest, whether or not anybody is pointing at it — the halftone's glow and the aurora's pools drift along the band's foot, the grid's rules rise and the rings spread outward, each over motion.duration.drift. Turn it off for a band that should be still until somebody reaches for it — a band beside a video or an animation of its own, or one a page repeats further down — and the pattern rests where it is. What the pattern does under the pointer is `interactive`, which is set apart from this. */
17
18
  animated?: boolean;
18
19
  /** On by default: the pattern answers a pointer over the band. The halftone's glow follows it, gathers into a smaller pool and parts the dots it crosses, and a click sends a small ripple through them; the aurora sends a pool of its light after it; the grid's rules and the rings brighten around it. Turn it off for a band whose content is itself interactive enough that a moving ground would compete with it — a band of controls, a form — and the pattern ignores the pointer. Touch has no hover, so on a touch screen nothing follows a finger. Whether it moves at rest is `animated`, which is set apart from this. */
@@ -25,11 +26,13 @@ export type BackgroundProps = BackgroundOwnProps & Omit<HTMLAttributes<HTMLDivEl
25
26
  export declare const backgroundParts: {
26
27
  readonly root: "dds-background";
27
28
  readonly canvas: "dds-background__canvas";
29
+ readonly mesh: "dds-background__mesh";
30
+ readonly pool: "dds-background__pool";
28
31
  readonly content: "dds-background__content";
29
32
  };
30
33
  /** Generated so defaults cannot drift from the contract. */
31
34
  export declare const backgroundDefaults: {
32
- readonly tone: "dark";
35
+ readonly tone: "brand";
33
36
  readonly pattern: "halftone";
34
37
  readonly animated: true;
35
38
  readonly interactive: true;
@@ -3,7 +3,9 @@
3
3
  export const backgroundParts = {
4
4
  root: 'dds-background',
5
5
  canvas: 'dds-background__canvas',
6
+ mesh: 'dds-background__mesh',
7
+ pool: 'dds-background__pool',
6
8
  content: 'dds-background__content',
7
9
  };
8
10
  /** Generated so defaults cannot drift from the contract. */
9
- export const backgroundDefaults = { tone: 'dark', pattern: 'halftone', animated: true, interactive: true };
11
+ export const backgroundDefaults = { tone: 'brand', pattern: 'halftone', animated: true, interactive: true };