@deriv-com/dds-marketing 0.1.0 → 0.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 (460) hide show
  1. package/.llm/components/accordion.md +193 -0
  2. package/.llm/components/accordionitem.md +236 -0
  3. package/.llm/components/aspectratio.md +212 -0
  4. package/.llm/components/badge.md +231 -0
  5. package/.llm/components/bottomsheet.md +404 -0
  6. package/.llm/components/breadcrumb.md +197 -0
  7. package/.llm/components/breadcrumbitem.md +178 -0
  8. package/.llm/components/button.md +271 -0
  9. package/.llm/components/buttonicon.md +313 -0
  10. package/.llm/components/card.md +313 -0
  11. package/.llm/components/cardbody.md +409 -0
  12. package/.llm/components/cardbutton.md +259 -0
  13. package/.llm/components/checkbox.md +285 -0
  14. package/.llm/components/divider.md +230 -0
  15. package/.llm/components/dropdownmenu.md +453 -0
  16. package/.llm/components/filterchip.md +314 -0
  17. package/.llm/components/footer.md +408 -0
  18. package/.llm/components/footergroup.md +241 -0
  19. package/.llm/components/grid.md +659 -0
  20. package/.llm/components/icon.md +194 -0
  21. package/.llm/components/link.md +354 -0
  22. package/.llm/components/menuitem.md +218 -0
  23. package/.llm/components/navbar.md +458 -0
  24. package/.llm/components/navbaritem.md +238 -0
  25. package/.llm/components/navbarmenu.md +319 -0
  26. package/.llm/components/navbarmenugroup.md +184 -0
  27. package/.llm/components/navbarpanel.md +255 -0
  28. package/.llm/components/navbarswitcher.md +343 -0
  29. package/.llm/components/navbarswitcheroption.md +156 -0
  30. package/.llm/components/option.md +268 -0
  31. package/.llm/components/pagination.md +361 -0
  32. package/.llm/components/removablechip.md +247 -0
  33. package/.llm/components/row.md +381 -0
  34. package/.llm/components/scroller.md +470 -0
  35. package/.llm/components/searchinput.md +279 -0
  36. package/.llm/components/segmentedcontrol.md +358 -0
  37. package/.llm/components/segmentedcontrolitem.md +272 -0
  38. package/.llm/components/select.md +509 -0
  39. package/.llm/components/selectchip.md +334 -0
  40. package/.llm/components/spinner.md +222 -0
  41. package/.llm/components/stack.md +334 -0
  42. package/.llm/components/statusdot.md +205 -0
  43. package/.llm/components/subdomainnavbar.md +327 -0
  44. package/.llm/components/tab.md +291 -0
  45. package/.llm/components/table.md +660 -0
  46. package/.llm/components/tablebody.md +258 -0
  47. package/.llm/components/tablecell.md +248 -0
  48. package/.llm/components/tablehead.md +248 -0
  49. package/.llm/components/tableheadercell.md +298 -0
  50. package/.llm/components/tablerow.md +285 -0
  51. package/.llm/components/tablist.md +210 -0
  52. package/.llm/components/textarea.md +362 -0
  53. package/.llm/components/textinput.md +467 -0
  54. package/.llm/components/tooltip.md +267 -0
  55. package/.llm/components/typography.md +245 -0
  56. package/.llm/digest/accordion.md +43 -0
  57. package/.llm/digest/accordionitem.md +47 -0
  58. package/.llm/digest/aspectratio.md +47 -0
  59. package/.llm/digest/badge.md +45 -0
  60. package/.llm/digest/bottomsheet.md +69 -0
  61. package/.llm/digest/breadcrumb.md +38 -0
  62. package/.llm/digest/breadcrumbitem.md +43 -0
  63. package/.llm/digest/button.md +48 -0
  64. package/.llm/digest/buttonicon.md +61 -0
  65. package/.llm/digest/card.md +50 -0
  66. package/.llm/digest/cardbody.md +68 -0
  67. package/.llm/digest/cardbutton.md +49 -0
  68. package/.llm/digest/checkbox.md +63 -0
  69. package/.llm/digest/divider.md +52 -0
  70. package/.llm/digest/dropdownmenu.md +67 -0
  71. package/.llm/digest/filterchip.md +68 -0
  72. package/.llm/digest/footer.md +57 -0
  73. package/.llm/digest/footergroup.md +42 -0
  74. package/.llm/digest/grid.md +62 -0
  75. package/.llm/digest/icon.md +45 -0
  76. package/.llm/digest/link.md +59 -0
  77. package/.llm/digest/menuitem.md +46 -0
  78. package/.llm/digest/navbar.md +60 -0
  79. package/.llm/digest/navbaritem.md +54 -0
  80. package/.llm/digest/navbarmenu.md +54 -0
  81. package/.llm/digest/navbarmenugroup.md +40 -0
  82. package/.llm/digest/navbarpanel.md +53 -0
  83. package/.llm/digest/navbarswitcher.md +51 -0
  84. package/.llm/digest/navbarswitcheroption.md +37 -0
  85. package/.llm/digest/option.md +54 -0
  86. package/.llm/digest/pagination.md +71 -0
  87. package/.llm/digest/removablechip.md +51 -0
  88. package/.llm/digest/row.md +60 -0
  89. package/.llm/digest/scroller.md +59 -0
  90. package/.llm/digest/searchinput.md +56 -0
  91. package/.llm/digest/segmentedcontrol.md +59 -0
  92. package/.llm/digest/segmentedcontrolitem.md +59 -0
  93. package/.llm/digest/select.md +92 -0
  94. package/.llm/digest/selectchip.md +68 -0
  95. package/.llm/digest/spinner.md +52 -0
  96. package/.llm/digest/stack.md +56 -0
  97. package/.llm/digest/statusdot.md +46 -0
  98. package/.llm/digest/subdomainnavbar.md +54 -0
  99. package/.llm/digest/tab.md +60 -0
  100. package/.llm/digest/table.md +71 -0
  101. package/.llm/digest/tablebody.md +49 -0
  102. package/.llm/digest/tablecell.md +55 -0
  103. package/.llm/digest/tablehead.md +50 -0
  104. package/.llm/digest/tableheadercell.md +65 -0
  105. package/.llm/digest/tablerow.md +56 -0
  106. package/.llm/digest/tablist.md +46 -0
  107. package/.llm/digest/textarea.md +78 -0
  108. package/.llm/digest/textinput.md +95 -0
  109. package/.llm/digest/tooltip.md +58 -0
  110. package/.llm/digest/typography.md +59 -0
  111. package/.llm/index.md +86 -0
  112. package/.llm/rules.md +122 -0
  113. package/.llm/tokens.md +341 -0
  114. package/AGENTS.md +164 -0
  115. package/LICENSE +21 -0
  116. package/README.md +63 -15
  117. package/dist/components/core/accordion/Accordion.css +10 -0
  118. package/dist/components/core/accordion/Accordion.d.ts +20 -0
  119. package/dist/components/core/accordion/Accordion.js +69 -0
  120. package/dist/components/core/accordion/Accordion.types.d.ts +20 -0
  121. package/dist/components/core/accordion/Accordion.types.js +7 -0
  122. package/dist/components/core/accordion-item/AccordionItem.css +98 -0
  123. package/dist/components/core/accordion-item/AccordionItem.d.ts +44 -0
  124. package/dist/components/core/accordion-item/AccordionItem.js +63 -0
  125. package/dist/components/core/accordion-item/AccordionItem.types.d.ts +32 -0
  126. package/dist/components/core/accordion-item/AccordionItem.types.js +13 -0
  127. package/dist/components/core/accordion-item/accordion-item-impl.css +107 -0
  128. package/dist/components/core/badge/Badge.css +37 -0
  129. package/dist/components/core/badge/Badge.d.ts +37 -0
  130. package/dist/components/core/badge/Badge.js +40 -0
  131. package/dist/components/core/badge/Badge.types.d.ts +24 -0
  132. package/dist/components/core/badge/Badge.types.js +8 -0
  133. package/dist/components/core/badge/badge-impl.css +32 -0
  134. package/dist/components/core/bottom-sheet/BottomSheet.css +178 -0
  135. package/dist/components/core/bottom-sheet/BottomSheet.d.ts +22 -0
  136. package/dist/components/core/bottom-sheet/BottomSheet.js +359 -0
  137. package/dist/components/core/bottom-sheet/BottomSheet.types.d.ts +67 -0
  138. package/dist/components/core/bottom-sheet/BottomSheet.types.js +18 -0
  139. package/dist/components/core/bottom-sheet/bottom-sheet-impl.css +57 -0
  140. package/dist/components/core/breadcrumb/Breadcrumb.css +19 -0
  141. package/dist/components/core/breadcrumb/Breadcrumb.d.ts +16 -0
  142. package/dist/components/core/breadcrumb/Breadcrumb.js +22 -0
  143. package/dist/components/core/breadcrumb/Breadcrumb.types.d.ts +18 -0
  144. package/dist/components/core/breadcrumb/Breadcrumb.types.js +9 -0
  145. package/dist/components/core/breadcrumb-item/BreadcrumbItem.css +34 -0
  146. package/dist/components/core/breadcrumb-item/BreadcrumbItem.d.ts +12 -0
  147. package/dist/components/core/breadcrumb-item/BreadcrumbItem.js +15 -0
  148. package/dist/components/core/breadcrumb-item/BreadcrumbItem.types.d.ts +22 -0
  149. package/dist/components/core/breadcrumb-item/BreadcrumbItem.types.js +9 -0
  150. package/dist/components/core/button/Button.css +141 -0
  151. package/dist/components/core/button/Button.d.ts +25 -0
  152. package/dist/components/core/button/Button.js +28 -0
  153. package/dist/components/core/button/Button.types.d.ts +40 -0
  154. package/dist/components/core/button/Button.types.js +9 -0
  155. package/dist/components/core/button/button-impl.css +46 -0
  156. package/dist/components/core/button-icon/ButtonIcon.css +135 -0
  157. package/dist/components/core/button-icon/ButtonIcon.d.ts +34 -0
  158. package/dist/components/core/button-icon/ButtonIcon.js +117 -0
  159. package/dist/components/core/button-icon/ButtonIcon.types.d.ts +41 -0
  160. package/dist/components/core/button-icon/ButtonIcon.types.js +8 -0
  161. package/dist/components/core/card/Card.css +65 -0
  162. package/dist/components/core/card/Card.d.ts +24 -0
  163. package/dist/components/core/card/Card.js +26 -0
  164. package/dist/components/core/card/Card.types.d.ts +33 -0
  165. package/dist/components/core/card/Card.types.js +7 -0
  166. package/dist/components/core/card-body/CardBody.css +139 -0
  167. package/dist/components/core/card-body/CardBody.d.ts +62 -0
  168. package/dist/components/core/card-body/CardBody.js +97 -0
  169. package/dist/components/core/card-body/CardBody.types.d.ts +61 -0
  170. package/dist/components/core/card-body/CardBody.types.js +15 -0
  171. package/dist/components/core/card-body/card-body-impl.css +87 -0
  172. package/dist/components/core/card-button/CardButton.css +73 -0
  173. package/dist/components/core/card-button/CardButton.d.ts +27 -0
  174. package/dist/components/core/card-button/CardButton.js +37 -0
  175. package/dist/components/core/card-button/CardButton.types.d.ts +24 -0
  176. package/dist/components/core/card-button/CardButton.types.js +7 -0
  177. package/dist/components/core/card-button/card-button-impl.css +39 -0
  178. package/dist/components/core/checkbox/Checkbox.css +149 -0
  179. package/dist/components/core/checkbox/Checkbox.d.ts +21 -0
  180. package/dist/components/core/checkbox/Checkbox.js +97 -0
  181. package/dist/components/core/checkbox/Checkbox.types.d.ts +46 -0
  182. package/dist/components/core/checkbox/Checkbox.types.js +15 -0
  183. package/dist/components/core/checkbox/checkbox-impl.css +90 -0
  184. package/dist/components/core/divider/Divider.css +41 -0
  185. package/dist/components/core/divider/Divider.d.ts +46 -0
  186. package/dist/components/core/divider/Divider.js +51 -0
  187. package/dist/components/core/divider/Divider.types.d.ts +25 -0
  188. package/dist/components/core/divider/Divider.types.js +9 -0
  189. package/dist/components/core/dropdown-menu/DropdownMenu.css +146 -0
  190. package/dist/components/core/dropdown-menu/DropdownMenu.d.ts +22 -0
  191. package/dist/components/core/dropdown-menu/DropdownMenu.js +309 -0
  192. package/dist/components/core/dropdown-menu/DropdownMenu.types.d.ts +62 -0
  193. package/dist/components/core/dropdown-menu/DropdownMenu.types.js +12 -0
  194. package/dist/components/core/dropdown-menu/dropdown-menu-impl.css +70 -0
  195. package/dist/components/core/filter-chip/FilterChip.css +149 -0
  196. package/dist/components/core/filter-chip/FilterChip.d.ts +23 -0
  197. package/dist/components/core/filter-chip/FilterChip.js +37 -0
  198. package/dist/components/core/filter-chip/FilterChip.types.d.ts +53 -0
  199. package/dist/components/core/filter-chip/FilterChip.types.js +12 -0
  200. package/dist/components/core/footer/Footer.css +104 -0
  201. package/dist/components/core/footer/Footer.d.ts +43 -0
  202. package/dist/components/core/footer/Footer.js +53 -0
  203. package/dist/components/core/footer/Footer.types.d.ts +47 -0
  204. package/dist/components/core/footer/Footer.types.js +18 -0
  205. package/dist/components/core/footer/footer-impl.css +218 -0
  206. package/dist/components/core/footer-group/FooterGroup.css +90 -0
  207. package/dist/components/core/footer-group/FooterGroup.d.ts +32 -0
  208. package/dist/components/core/footer-group/FooterGroup.js +64 -0
  209. package/dist/components/core/footer-group/FooterGroup.types.d.ts +25 -0
  210. package/dist/components/core/footer-group/FooterGroup.types.js +12 -0
  211. package/dist/components/core/footer-group/footer-group-impl.css +78 -0
  212. package/dist/components/core/icon/Icon.css +40 -0
  213. package/dist/components/core/icon/Icon.d.ts +23 -0
  214. package/dist/components/core/icon/Icon.js +79 -0
  215. package/dist/components/core/icon/Icon.types.d.ts +24 -0
  216. package/dist/components/core/icon/Icon.types.js +7 -0
  217. package/dist/components/core/link/Link.css +89 -0
  218. package/dist/components/core/link/Link.d.ts +37 -0
  219. package/dist/components/core/link/Link.js +141 -0
  220. package/dist/components/core/link/Link.types.d.ts +41 -0
  221. package/dist/components/core/link/Link.types.js +9 -0
  222. package/dist/components/core/link/link-impl.css +168 -0
  223. package/dist/components/core/menu-item/MenuItem.css +70 -0
  224. package/dist/components/core/menu-item/MenuItem.d.ts +11 -0
  225. package/dist/components/core/menu-item/MenuItem.js +26 -0
  226. package/dist/components/core/menu-item/MenuItem.types.d.ts +28 -0
  227. package/dist/components/core/menu-item/MenuItem.types.js +9 -0
  228. package/dist/components/core/navbar/Navbar.css +135 -0
  229. package/dist/components/core/navbar/Navbar.d.ts +36 -0
  230. package/dist/components/core/navbar/Navbar.js +371 -0
  231. package/dist/components/core/navbar/Navbar.types.d.ts +49 -0
  232. package/dist/components/core/navbar/Navbar.types.js +17 -0
  233. package/dist/components/core/navbar/navbar-impl.css +590 -0
  234. package/dist/components/core/navbar-item/NavbarItem.css +75 -0
  235. package/dist/components/core/navbar-item/NavbarItem.d.ts +22 -0
  236. package/dist/components/core/navbar-item/NavbarItem.js +40 -0
  237. package/dist/components/core/navbar-item/NavbarItem.types.d.ts +34 -0
  238. package/dist/components/core/navbar-item/NavbarItem.types.js +10 -0
  239. package/dist/components/core/navbar-menu/NavbarMenu.css +128 -0
  240. package/dist/components/core/navbar-menu/NavbarMenu.d.ts +5 -0
  241. package/dist/components/core/navbar-menu/NavbarMenu.js +186 -0
  242. package/dist/components/core/navbar-menu/NavbarMenu.types.d.ts +45 -0
  243. package/dist/components/core/navbar-menu/NavbarMenu.types.js +12 -0
  244. package/dist/components/core/navbar-menu/navbar-menu-impl.css +186 -0
  245. package/dist/components/core/navbar-menu-group/NavbarMenuGroup.css +26 -0
  246. package/dist/components/core/navbar-menu-group/NavbarMenuGroup.d.ts +17 -0
  247. package/dist/components/core/navbar-menu-group/NavbarMenuGroup.js +22 -0
  248. package/dist/components/core/navbar-menu-group/NavbarMenuGroup.types.d.ts +14 -0
  249. package/dist/components/core/navbar-menu-group/NavbarMenuGroup.types.js +7 -0
  250. package/dist/components/core/navbar-panel/NavbarPanel.css +87 -0
  251. package/dist/components/core/navbar-panel/NavbarPanel.d.ts +34 -0
  252. package/dist/components/core/navbar-panel/NavbarPanel.js +46 -0
  253. package/dist/components/core/navbar-panel/NavbarPanel.types.d.ts +29 -0
  254. package/dist/components/core/navbar-panel/NavbarPanel.types.js +12 -0
  255. package/dist/components/core/navbar-panel/navbar-panel-impl.css +104 -0
  256. package/dist/components/core/navbar-panel/use-navbar-panel.d.ts +26 -0
  257. package/dist/components/core/navbar-panel/use-navbar-panel.js +135 -0
  258. package/dist/components/core/navbar-switcher/NavbarSwitcher.css +117 -0
  259. package/dist/components/core/navbar-switcher/NavbarSwitcher.d.ts +20 -0
  260. package/dist/components/core/navbar-switcher/NavbarSwitcher.js +90 -0
  261. package/dist/components/core/navbar-switcher/NavbarSwitcher.types.d.ts +46 -0
  262. package/dist/components/core/navbar-switcher/NavbarSwitcher.types.js +13 -0
  263. package/dist/components/core/navbar-switcher/navbar-switcher-impl.css +179 -0
  264. package/dist/components/core/navbar-switcher-option/NavbarSwitcherOption.css +39 -0
  265. package/dist/components/core/navbar-switcher-option/NavbarSwitcherOption.d.ts +16 -0
  266. package/dist/components/core/navbar-switcher-option/NavbarSwitcherOption.js +19 -0
  267. package/dist/components/core/navbar-switcher-option/NavbarSwitcherOption.types.d.ts +18 -0
  268. package/dist/components/core/navbar-switcher-option/NavbarSwitcherOption.types.js +7 -0
  269. package/dist/components/core/option/Option.css +133 -0
  270. package/dist/components/core/option/Option.d.ts +25 -0
  271. package/dist/components/core/option/Option.js +31 -0
  272. package/dist/components/core/option/Option.types.d.ts +44 -0
  273. package/dist/components/core/option/Option.types.js +14 -0
  274. package/dist/components/core/pagination/Pagination.css +237 -0
  275. package/dist/components/core/pagination/Pagination.d.ts +30 -0
  276. package/dist/components/core/pagination/Pagination.js +406 -0
  277. package/dist/components/core/pagination/Pagination.types.d.ts +59 -0
  278. package/dist/components/core/pagination/Pagination.types.js +14 -0
  279. package/dist/components/core/pagination/pagination-impl.css +17 -0
  280. package/dist/components/core/removable-chip/RemovableChip.css +125 -0
  281. package/dist/components/core/removable-chip/RemovableChip.d.ts +25 -0
  282. package/dist/components/core/removable-chip/RemovableChip.js +36 -0
  283. package/dist/components/core/removable-chip/RemovableChip.types.d.ts +38 -0
  284. package/dist/components/core/removable-chip/RemovableChip.types.js +13 -0
  285. package/dist/components/core/search-input/SearchInput.css +205 -0
  286. package/dist/components/core/search-input/SearchInput.d.ts +5 -0
  287. package/dist/components/core/search-input/SearchInput.js +81 -0
  288. package/dist/components/core/search-input/SearchInput.types.d.ts +43 -0
  289. package/dist/components/core/search-input/SearchInput.types.js +13 -0
  290. package/dist/components/core/search-input/search-input-impl.css +20 -0
  291. package/dist/components/core/segmented-control/SegmentedControl.css +57 -0
  292. package/dist/components/core/segmented-control/SegmentedControl.d.ts +37 -0
  293. package/dist/components/core/segmented-control/SegmentedControl.js +269 -0
  294. package/dist/components/core/segmented-control/SegmentedControl.types.d.ts +38 -0
  295. package/dist/components/core/segmented-control/SegmentedControl.types.js +8 -0
  296. package/dist/components/core/segmented-control/segmented-control-impl.css +57 -0
  297. package/dist/components/core/segmented-control-item/SegmentedControlItem.css +151 -0
  298. package/dist/components/core/segmented-control-item/SegmentedControlItem.d.ts +50 -0
  299. package/dist/components/core/segmented-control-item/SegmentedControlItem.js +101 -0
  300. package/dist/components/core/segmented-control-item/SegmentedControlItem.types.d.ts +37 -0
  301. package/dist/components/core/segmented-control-item/SegmentedControlItem.types.js +10 -0
  302. package/dist/components/core/segmented-control-item/segmented-control-item-impl.css +69 -0
  303. package/dist/components/core/select/Select.css +400 -0
  304. package/dist/components/core/select/Select.d.ts +29 -0
  305. package/dist/components/core/select/Select.js +524 -0
  306. package/dist/components/core/select/Select.types.d.ts +96 -0
  307. package/dist/components/core/select/Select.types.js +26 -0
  308. package/dist/components/core/select/select-impl.css +114 -0
  309. package/dist/components/core/select-chip/SelectChip.css +155 -0
  310. package/dist/components/core/select-chip/SelectChip.d.ts +20 -0
  311. package/dist/components/core/select-chip/SelectChip.js +273 -0
  312. package/dist/components/core/select-chip/SelectChip.types.d.ts +56 -0
  313. package/dist/components/core/select-chip/SelectChip.types.js +14 -0
  314. package/dist/components/core/select-chip/select-chip-impl.css +38 -0
  315. package/dist/components/core/spinner/Spinner.css +76 -0
  316. package/dist/components/core/spinner/Spinner.d.ts +5 -0
  317. package/dist/components/core/spinner/Spinner.js +29 -0
  318. package/dist/components/core/spinner/Spinner.types.d.ts +37 -0
  319. package/dist/components/core/spinner/Spinner.types.js +10 -0
  320. package/dist/components/core/spinner/spinner-impl.css +27 -0
  321. package/dist/components/core/status-dot/StatusDot.css +43 -0
  322. package/dist/components/core/status-dot/StatusDot.d.ts +35 -0
  323. package/dist/components/core/status-dot/StatusDot.js +46 -0
  324. package/dist/components/core/status-dot/StatusDot.types.d.ts +29 -0
  325. package/dist/components/core/status-dot/StatusDot.types.js +7 -0
  326. package/dist/components/core/status-dot/status-dot-impl.css +42 -0
  327. package/dist/components/core/subdomain-navbar/SubdomainNavbar.css +89 -0
  328. package/dist/components/core/subdomain-navbar/SubdomainNavbar.d.ts +21 -0
  329. package/dist/components/core/subdomain-navbar/SubdomainNavbar.js +127 -0
  330. package/dist/components/core/subdomain-navbar/SubdomainNavbar.types.d.ts +43 -0
  331. package/dist/components/core/subdomain-navbar/SubdomainNavbar.types.js +13 -0
  332. package/dist/components/core/subdomain-navbar/subdomain-navbar-impl.css +147 -0
  333. package/dist/components/core/tab/Tab.css +113 -0
  334. package/dist/components/core/tab/Tab.d.ts +36 -0
  335. package/dist/components/core/tab/Tab.js +53 -0
  336. package/dist/components/core/tab/Tab.types.d.ts +42 -0
  337. package/dist/components/core/tab/Tab.types.js +13 -0
  338. package/dist/components/core/tab/tab-impl.css +49 -0
  339. package/dist/components/core/tab-list/TabList.css +40 -0
  340. package/dist/components/core/tab-list/TabList.d.ts +26 -0
  341. package/dist/components/core/tab-list/TabList.js +124 -0
  342. package/dist/components/core/tab-list/TabList.types.d.ts +20 -0
  343. package/dist/components/core/tab-list/TabList.types.js +7 -0
  344. package/dist/components/core/tab-list/tab-list-impl.css +56 -0
  345. package/dist/components/core/table/Table.css +40 -0
  346. package/dist/components/core/table/Table.d.ts +19 -0
  347. package/dist/components/core/table/Table.js +55 -0
  348. package/dist/components/core/table/Table.types.d.ts +59 -0
  349. package/dist/components/core/table/Table.types.js +9 -0
  350. package/dist/components/core/table/table-impl.css +75 -0
  351. package/dist/components/core/table/use-table-sort.d.ts +43 -0
  352. package/dist/components/core/table/use-table-sort.js +51 -0
  353. package/dist/components/core/table-body/TableBody.css +6 -0
  354. package/dist/components/core/table-body/TableBody.d.ts +12 -0
  355. package/dist/components/core/table-body/TableBody.js +26 -0
  356. package/dist/components/core/table-body/TableBody.types.d.ts +36 -0
  357. package/dist/components/core/table-body/TableBody.types.js +7 -0
  358. package/dist/components/core/table-cell/TableCell.css +76 -0
  359. package/dist/components/core/table-cell/TableCell.d.ts +21 -0
  360. package/dist/components/core/table-cell/TableCell.js +31 -0
  361. package/dist/components/core/table-cell/TableCell.types.d.ts +43 -0
  362. package/dist/components/core/table-cell/TableCell.types.js +7 -0
  363. package/dist/components/core/table-head/TableHead.css +6 -0
  364. package/dist/components/core/table-head/TableHead.d.ts +22 -0
  365. package/dist/components/core/table-head/TableHead.js +52 -0
  366. package/dist/components/core/table-head/TableHead.types.d.ts +39 -0
  367. package/dist/components/core/table-head/TableHead.types.js +7 -0
  368. package/dist/components/core/table-head/table-head-impl.css +51 -0
  369. package/dist/components/core/table-header-cell/TableHeaderCell.css +126 -0
  370. package/dist/components/core/table-header-cell/TableHeaderCell.d.ts +21 -0
  371. package/dist/components/core/table-header-cell/TableHeaderCell.js +34 -0
  372. package/dist/components/core/table-header-cell/TableHeaderCell.types.d.ts +56 -0
  373. package/dist/components/core/table-header-cell/TableHeaderCell.types.js +9 -0
  374. package/dist/components/core/table-header-cell/table-header-cell-impl.css +74 -0
  375. package/dist/components/core/table-row/TableRow.css +18 -0
  376. package/dist/components/core/table-row/TableRow.d.ts +17 -0
  377. package/dist/components/core/table-row/TableRow.js +32 -0
  378. package/dist/components/core/table-row/TableRow.types.d.ts +45 -0
  379. package/dist/components/core/table-row/TableRow.types.js +7 -0
  380. package/dist/components/core/table-row/table-row-impl.css +31 -0
  381. package/dist/components/core/text-area/TextArea.css +325 -0
  382. package/dist/components/core/text-area/TextArea.d.ts +13 -0
  383. package/dist/components/core/text-area/TextArea.js +133 -0
  384. package/dist/components/core/text-area/TextArea.types.d.ts +67 -0
  385. package/dist/components/core/text-area/TextArea.types.js +19 -0
  386. package/dist/components/core/text-area/text-area-impl.css +36 -0
  387. package/dist/components/core/text-input/TextInput.css +400 -0
  388. package/dist/components/core/text-input/TextInput.d.ts +5 -0
  389. package/dist/components/core/text-input/TextInput.js +130 -0
  390. package/dist/components/core/text-input/TextInput.types.d.ts +96 -0
  391. package/dist/components/core/text-input/TextInput.types.js +24 -0
  392. package/dist/components/core/text-input/text-input-impl.css +36 -0
  393. package/dist/components/core/tooltip/Tooltip.css +101 -0
  394. package/dist/components/core/tooltip/Tooltip.d.ts +51 -0
  395. package/dist/components/core/tooltip/Tooltip.js +87 -0
  396. package/dist/components/core/tooltip/Tooltip.types.d.ts +38 -0
  397. package/dist/components/core/tooltip/Tooltip.types.js +9 -0
  398. package/dist/components/core/tooltip/TooltipAnchor.d.ts +52 -0
  399. package/dist/components/core/tooltip/TooltipAnchor.js +69 -0
  400. package/dist/components/core/tooltip/tooltip-anchor.css +145 -0
  401. package/dist/components/core/tooltip/tooltip-impl.css +54 -0
  402. package/dist/components/core/tooltip/use-tooltip.d.ts +111 -0
  403. package/dist/components/core/tooltip/use-tooltip.js +189 -0
  404. package/dist/components/core/typography/Typography.css +96 -0
  405. package/dist/components/core/typography/Typography.d.ts +297 -0
  406. package/dist/components/core/typography/Typography.js +28 -0
  407. package/dist/components/core/typography/Typography.types.d.ts +40 -0
  408. package/dist/components/core/typography/Typography.types.js +7 -0
  409. package/dist/components/css-time.d.ts +20 -0
  410. package/dist/components/css-time.js +30 -0
  411. package/dist/components/given.d.ts +7 -0
  412. package/dist/components/given.js +9 -0
  413. package/dist/components/hover-open.d.ts +34 -0
  414. package/dist/components/hover-open.js +90 -0
  415. package/dist/components/index.d.ts +114 -1
  416. package/dist/components/index.js +115 -2
  417. package/dist/components/layout/aspect-ratio/AspectRatio.css +29 -0
  418. package/dist/components/layout/aspect-ratio/AspectRatio.d.ts +24 -0
  419. package/dist/components/layout/aspect-ratio/AspectRatio.js +26 -0
  420. package/dist/components/layout/aspect-ratio/AspectRatio.types.d.ts +22 -0
  421. package/dist/components/layout/aspect-ratio/AspectRatio.types.js +7 -0
  422. package/dist/components/layout/aspect-ratio/aspect-ratio-impl.css +44 -0
  423. package/dist/components/layout/grid/Grid.css +76 -0
  424. package/dist/components/layout/grid/Grid.d.ts +31 -0
  425. package/dist/components/layout/grid/Grid.js +33 -0
  426. package/dist/components/layout/grid/Grid.types.d.ts +48 -0
  427. package/dist/components/layout/grid/Grid.types.js +7 -0
  428. package/dist/components/layout/grid/grid-impl.css +62 -0
  429. package/dist/components/layout/row/Row.css +85 -0
  430. package/dist/components/layout/row/Row.d.ts +32 -0
  431. package/dist/components/layout/row/Row.js +34 -0
  432. package/dist/components/layout/row/Row.types.d.ts +45 -0
  433. package/dist/components/layout/row/Row.types.js +7 -0
  434. package/dist/components/layout/scroller/Scroller.css +59 -0
  435. package/dist/components/layout/scroller/Scroller.d.ts +34 -0
  436. package/dist/components/layout/scroller/Scroller.js +36 -0
  437. package/dist/components/layout/scroller/Scroller.types.d.ts +38 -0
  438. package/dist/components/layout/scroller/Scroller.types.js +7 -0
  439. package/dist/components/layout/scroller/scroller-impl.css +45 -0
  440. package/dist/components/layout/stack/Stack.css +73 -0
  441. package/dist/components/layout/stack/Stack.d.ts +28 -0
  442. package/dist/components/layout/stack/Stack.js +30 -0
  443. package/dist/components/layout/stack/Stack.types.d.ts +41 -0
  444. package/dist/components/layout/stack/Stack.types.js +7 -0
  445. package/dist/components/visually-hidden.d.ts +22 -0
  446. package/dist/components/visually-hidden.js +31 -0
  447. package/dist/fonts/LICENSE-inter.txt +93 -0
  448. package/dist/fonts/LICENSE-red-hat-mono.txt +93 -0
  449. package/dist/fonts/fonts.css +111 -0
  450. package/dist/fonts/inter-cyrillic-ext-wght-normal.woff2 +0 -0
  451. package/dist/fonts/inter-cyrillic-wght-normal.woff2 +0 -0
  452. package/dist/fonts/inter-greek-ext-wght-normal.woff2 +0 -0
  453. package/dist/fonts/inter-greek-wght-normal.woff2 +0 -0
  454. package/dist/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
  455. package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
  456. package/dist/fonts/inter-vietnamese-wght-normal.woff2 +0 -0
  457. package/dist/fonts/red-hat-mono-latin-ext-wght-normal.woff2 +0 -0
  458. package/dist/fonts/red-hat-mono-latin-wght-normal.woff2 +0 -0
  459. package/dist/marketing.css +289 -241
  460. package/package.json +18 -4
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { given } from '../../given.js';
3
+ import './BreadcrumbItem.css';
4
+ import { breadcrumbItemDefaults, breadcrumbItemParts, } from './BreadcrumbItem.types.js';
5
+ /**
6
+ * One level of a trail: a link back to it, or the current page as plain text.
7
+ *
8
+ * `current` wins over `href`. The two together ask for a link from the page to
9
+ * itself — a tab stop that goes nowhere — so the component declines.
10
+ *
11
+ * `aria-current="page"` is what identifies the current level to a screen reader.
12
+ */
13
+ export function BreadcrumbItem({ label, href, current = breadcrumbItemDefaults.current, ...rest }) {
14
+ return (_jsx("li", { className: breadcrumbItemParts.root, ...rest, children: current ? (_jsx("span", { className: breadcrumbItemParts.current, "aria-current": "page", children: label })) : given(href) ? (_jsx("a", { className: breadcrumbItemParts.link, href: href, children: label })) : (label) }));
15
+ }
@@ -0,0 +1,22 @@
1
+ import type { LiHTMLAttributes } from 'react';
2
+ export interface BreadcrumbItemOwnProps {
3
+ /** Always — it is the level's name, and the item renders nothing without it. The word the parent level would use for this place: "Forex", not "Forex markets and instruments" */
4
+ label: string;
5
+ }
6
+ export type BreadcrumbItemProps = BreadcrumbItemOwnProps & Omit<LiHTMLAttributes<HTMLLIElement>, 'className' | 'label' | 'href' | 'current'> & ({
7
+ current?: boolean;
8
+ href?: undefined;
9
+ } | {
10
+ current?: false;
11
+ href?: string;
12
+ });
13
+ /** The class each part carries. Apply these — do not retype them. */
14
+ export declare const breadcrumbItemParts: {
15
+ readonly root: "dds-breadcrumbitem";
16
+ readonly link: "dds-breadcrumbitem__link";
17
+ readonly current: "dds-breadcrumbitem__current";
18
+ };
19
+ /** Generated so defaults cannot drift from the contract. */
20
+ export declare const breadcrumbItemDefaults: {
21
+ readonly current: false;
22
+ };
@@ -0,0 +1,9 @@
1
+ // GENERATED from breadcrumb-item.contract.json. Do not edit.
2
+ /** The class each part carries. Apply these — do not retype them. */
3
+ export const breadcrumbItemParts = {
4
+ root: 'dds-breadcrumbitem',
5
+ link: 'dds-breadcrumbitem__link',
6
+ current: 'dds-breadcrumbitem__current',
7
+ };
8
+ /** Generated so defaults cannot drift from the contract. */
9
+ export const breadcrumbItemDefaults = { current: false };
@@ -0,0 +1,141 @@
1
+ /* GENERATED from button.contract.json. Do not edit. */
2
+
3
+ :where([data-dds-context="marketing"]) .dds-button {
4
+ transition-property: background-color, background-image, outline-color, outline-width;
5
+ align-items: center;
6
+ background-color: transparent;
7
+ border-color: transparent;
8
+ border-style: solid;
9
+ box-sizing: border-box;
10
+ cursor: pointer;
11
+ display: inline-flex;
12
+ flex-direction: row;
13
+ justify-content: center;
14
+ outline-style: solid;
15
+ position: relative;
16
+ text-decoration-line: none;
17
+ white-space: nowrap;
18
+ border-radius: var(--radius-pill);
19
+ border-width: var(--border-width-emphasis);
20
+ gap: var(--space-gap-sm);
21
+ outline-width: var(--border-width-none);
22
+ transition-duration: var(--motion-duration-normal);
23
+ transition-timing-function: var(--motion-easing-standard);
24
+ }
25
+
26
+ :where([data-dds-context="marketing"]) .dds-button .dds-button__label {
27
+ display: block;
28
+ }
29
+
30
+ :where([data-dds-context="marketing"]) .dds-button .dds-button__icon {
31
+ flex: none;
32
+ }
33
+
34
+ :where([data-dds-context="marketing"]) .dds-button[data-variant="secondary"][data-tone="inherit"] {
35
+ border-color: currentcolor;
36
+ color: inherit;
37
+ }
38
+
39
+ :where([data-dds-context="marketing"]) .dds-button:focus-visible {
40
+ outline-color: var(--color-border-focus);
41
+ outline-width: var(--border-width-focus);
42
+ }
43
+
44
+ :where([data-dds-context="marketing"]) .dds-button[data-size="lg"] {
45
+ block-size: var(--size-control-lg);
46
+ padding-inline: var(--space-control-lg);
47
+ }
48
+
49
+ :where([data-dds-context="marketing"]) .dds-button[data-size="lg"] .dds-button__icon {
50
+ block-size: var(--icon-control-lg);
51
+ inline-size: var(--icon-control-lg);
52
+ }
53
+
54
+ :where([data-dds-context="marketing"]) .dds-button[data-size="lg"] .dds-button__label {
55
+ font-family: var(--font-label-md-family);
56
+ font-size: var(--font-label-md-size);
57
+ font-weight: var(--font-label-md-weight);
58
+ letter-spacing: var(--font-label-md-letter-spacing);
59
+ line-height: var(--font-label-md-line-height);
60
+ }
61
+
62
+ :where([data-dds-context="marketing"]) .dds-button[data-size="md"] {
63
+ block-size: var(--size-control-md);
64
+ padding-inline: var(--space-control-md);
65
+ }
66
+
67
+ :where([data-dds-context="marketing"]) .dds-button[data-size="md"] .dds-button__icon {
68
+ block-size: var(--icon-control-md);
69
+ inline-size: var(--icon-control-md);
70
+ }
71
+
72
+ :where([data-dds-context="marketing"]) .dds-button[data-size="md"] .dds-button__label {
73
+ font-family: var(--font-label-sm-family);
74
+ font-size: var(--font-label-sm-size);
75
+ font-weight: var(--font-label-sm-weight);
76
+ letter-spacing: var(--font-label-sm-letter-spacing);
77
+ line-height: var(--font-label-sm-line-height);
78
+ }
79
+
80
+ :where([data-dds-context="marketing"]) .dds-button[data-size="sm"] {
81
+ block-size: var(--size-control-sm);
82
+ padding-inline: var(--space-control-sm);
83
+ }
84
+
85
+ :where([data-dds-context="marketing"]) .dds-button[data-size="sm"] .dds-button__icon {
86
+ block-size: var(--icon-control-sm);
87
+ inline-size: var(--icon-control-sm);
88
+ }
89
+
90
+ :where([data-dds-context="marketing"]) .dds-button[data-size="sm"] .dds-button__label {
91
+ font-family: var(--font-label-sm-family);
92
+ font-size: var(--font-label-sm-size);
93
+ font-weight: var(--font-label-sm-weight);
94
+ letter-spacing: var(--font-label-sm-letter-spacing);
95
+ line-height: var(--font-label-sm-line-height);
96
+ }
97
+
98
+ :where([data-dds-context="marketing"]) .dds-button[data-variant="inverse"] {
99
+ background-color: var(--color-bg-strong);
100
+ color: var(--color-fg-on-strong);
101
+ }
102
+
103
+ :where([data-dds-context="marketing"]) .dds-button[data-variant="primary"] {
104
+ background-color: var(--color-bg-brand);
105
+ color: var(--color-fg-on-solid);
106
+ }
107
+
108
+ :where([data-dds-context="marketing"]) .dds-button[data-variant="secondary"] {
109
+ border-color: var(--color-border-strong);
110
+ color: var(--color-fg-default);
111
+ }
112
+
113
+ :where([data-dds-context="marketing"]) .dds-button[data-variant="inverse"]:hover {
114
+ background-image: linear-gradient(var(--color-bg-hover-inverse), var(--color-bg-hover-inverse));
115
+ }
116
+
117
+ :where([data-dds-context="marketing"]) .dds-button[data-variant="primary"]:hover {
118
+ background-color: var(--color-bg-brand-hover);
119
+ }
120
+
121
+ :where([data-dds-context="marketing"]) .dds-button[data-variant="secondary"]:hover {
122
+ background-color: var(--color-bg-hover);
123
+ }
124
+
125
+ :where([data-dds-context="marketing"]) .dds-button[data-variant="inverse"]:active {
126
+ background-image: linear-gradient(var(--color-bg-active-inverse), var(--color-bg-active-inverse));
127
+ }
128
+
129
+ :where([data-dds-context="marketing"]) .dds-button[data-variant="primary"]:active {
130
+ background-color: var(--color-bg-brand-active);
131
+ }
132
+
133
+ :where([data-dds-context="marketing"]) .dds-button[data-variant="secondary"]:active {
134
+ background-color: var(--color-bg-active);
135
+ }
136
+
137
+ @media (prefers-reduced-motion: reduce) {
138
+ :where([data-dds-context="marketing"]) .dds-button,
139
+ :where([data-dds-context="marketing"]) .dds-button * { transition: none; }
140
+ }
141
+
@@ -0,0 +1,25 @@
1
+ import './Button.css';
2
+ import './button-impl.css';
3
+ import { type ButtonProps } from './Button.types.js';
4
+ export type { ButtonProps };
5
+ /**
6
+ * Three parts, declared in the contract and styled by the generated stylesheet.
7
+ * The classes come from `buttonParts` rather than being typed here — the CSS is
8
+ * generated from the same anatomy, and a class retyped slightly differently
9
+ * renders a part bare with its rule sitting unused.
10
+ *
11
+ * An anchor, not a button, and that is the whole shape of this component. It
12
+ * navigates a visitor to the next step of a funnel, so the element has to be the
13
+ * one the browser already knows how to navigate with: cmd-click and middle-click
14
+ * open a new tab, the status bar shows the destination on hover, and assistive
15
+ * tech announces a link rather than a control that fires something in place.
16
+ * `href` is required in the generated type for the same reason — an anchor
17
+ * without one is not focusable and is announced as plain text, so the control
18
+ * simply disappears for anyone not using a mouse.
19
+ *
20
+ * There is no `loading` and no `disabled`, unlike product's Button. Neither has
21
+ * an honest anchor form: the browser owns the pending state and shows it in the
22
+ * chrome, and `aria-disabled` on a link still follows the link when pressed, so
23
+ * a disabled prop here would style a control that keeps working.
24
+ */
25
+ export declare function Button({ variant, size, tone, href, showIcon, children, ...rest }: ButtonProps): import("react").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ArrowRightRegularIcon } from '@deriv-com/quill-icons-web';
3
+ import './Button.css';
4
+ import './button-impl.css';
5
+ import { buttonDefaults, buttonParts } from './Button.types.js';
6
+ /**
7
+ * Three parts, declared in the contract and styled by the generated stylesheet.
8
+ * The classes come from `buttonParts` rather than being typed here — the CSS is
9
+ * generated from the same anatomy, and a class retyped slightly differently
10
+ * renders a part bare with its rule sitting unused.
11
+ *
12
+ * An anchor, not a button, and that is the whole shape of this component. It
13
+ * navigates a visitor to the next step of a funnel, so the element has to be the
14
+ * one the browser already knows how to navigate with: cmd-click and middle-click
15
+ * open a new tab, the status bar shows the destination on hover, and assistive
16
+ * tech announces a link rather than a control that fires something in place.
17
+ * `href` is required in the generated type for the same reason — an anchor
18
+ * without one is not focusable and is announced as plain text, so the control
19
+ * simply disappears for anyone not using a mouse.
20
+ *
21
+ * There is no `loading` and no `disabled`, unlike product's Button. Neither has
22
+ * an honest anchor form: the browser owns the pending state and shows it in the
23
+ * chrome, and `aria-disabled` on a link still follows the link when pressed, so
24
+ * a disabled prop here would style a control that keeps working.
25
+ */
26
+ export function Button({ variant = buttonDefaults.variant, size = buttonDefaults.size, tone = buttonDefaults.tone, href, showIcon = buttonDefaults.showIcon, children, ...rest }) {
27
+ return (_jsxs("a", { className: buttonParts.root, href: href, "data-variant": variant, "data-tone": tone, "data-size": size, ...rest, children: [_jsx("span", { className: buttonParts.label, children: children }), showIcon ? (_jsx(ArrowRightRegularIcon, { className: buttonParts.icon, "aria-hidden": "true" })) : null] }));
28
+ }
@@ -0,0 +1,40 @@
1
+ import type { AnchorHTMLAttributes, ReactNode } from 'react';
2
+ export interface ButtonOwnProps {
3
+ /**
4
+ * `primary` — The step the page was built to produce. Carries the brand fill, which is what makes it findable at a glance and what makes it meaningless once there are two — a section offering two brand fills has said nothing about either.
5
+ * `secondary` — A real destination that is not the one being pushed — compare plans, read the docs, talk to sales. An outline rather than a quiet fill: this package has color.bg.hover for the wash but no hover partner for color.bg.subtle, so a filled secondary would get lighter on hover instead of darker. The outline keeps the shape, the inset and the target size, and gives up only the fill.
6
+ * `inverse` — A section that paints its own ground — a brand-coloured hero, a photo band, a dark takeover. There the brand fill is invisible against the fill behind it and a neutral edge is the wrong ink, so the only thing that reads is a solid at the far end of the neutral ramp: pure black in light, pure white in dark. It outranks everything near it, which is what makes it right there and wrong anywhere else.
7
+ */
8
+ variant?: 'primary' | 'secondary' | 'inverse';
9
+ /**
10
+ * `sm` — A dense band where the button is one control among several — a filter row, a utility bar, an action beside body copy. size.control.sm tall against space.control.sm on the sides, half of it as at every step. The label holds at font.label.sm, md's own 14px: the label ramp has no step below it, so what separates these two is the box. Desktop only — at thirty-two it is below what a finger reliably hits.
11
+ * `md` — The default, and everything that is not a hero — navigation bars, pricing rows, feature sections, footer bands. size.control.md tall against space.control.md on the sides, which is half of it, and font.label.sm — the 14px step, so the label matches product's default button rather than running a size above it.
12
+ * `lg` — A hero, or a full-width conversion band that is the only control in view. size.control.lg tall against space.control.lg on the sides, again half the height, so the label starts where the pill's curve stops. font.label.md at 16px, product's own large-button measure. One per page, usually: a page of lg CTAs has no hero.
13
+ */
14
+ size?: 'sm' | 'md' | 'lg';
15
+ /**
16
+ * `default` — The page's own ground, which sets the ink this component was drawn against — every button on a white page
17
+ * `inherit` — A section that painted its own ground and set its own ink: a dark hero, a brand band, a photo. The button stops naming a colour and takes the one around it, so the edge and the label are whatever the band decided was legible on itself
18
+ */
19
+ tone?: 'default' | 'inherit';
20
+ /** Always. The destination is the component — an anchor without an href is not a link, is not reachable by keyboard, and is announced as plain text, so there is no default that could stand in for one. It takes no default and is not optional for exactly that reason. */
21
+ href: string;
22
+ /** Where the destination continues a sequence rather than being simply somewhere else to go — the hero CTA that starts a signup, the button at the foot of a step. Named for the part it renders rather than for the mark inside it: which glyph that is belongs to the component, the way showClose and showTitle name their parts elsewhere. Today it is a forward arrow, and it slides on hover. */
23
+ showIcon?: boolean;
24
+ /** Allowed: text */
25
+ children: ReactNode;
26
+ }
27
+ export type ButtonProps = ButtonOwnProps & Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'className' | 'variant' | 'size' | 'tone' | 'href' | 'showIcon'>;
28
+ /** The class each part carries. Apply these — do not retype them. */
29
+ export declare const buttonParts: {
30
+ readonly root: "dds-button";
31
+ readonly label: "dds-button__label";
32
+ readonly icon: "dds-button__icon";
33
+ };
34
+ /** Generated so defaults cannot drift from the contract. */
35
+ export declare const buttonDefaults: {
36
+ readonly variant: "primary";
37
+ readonly size: "lg";
38
+ readonly tone: "default";
39
+ readonly showIcon: false;
40
+ };
@@ -0,0 +1,9 @@
1
+ // GENERATED from button.contract.json. Do not edit.
2
+ /** The class each part carries. Apply these — do not retype them. */
3
+ export const buttonParts = {
4
+ root: 'dds-button',
5
+ label: 'dds-button__label',
6
+ icon: 'dds-button__icon',
7
+ };
8
+ /** Generated so defaults cannot drift from the contract. */
9
+ export const buttonDefaults = { variant: 'primary', size: 'lg', tone: 'default', showIcon: false };
@@ -0,0 +1,46 @@
1
+ /*
2
+ * Scoped to this package, like the generated sheet beside it.
3
+ *
4
+ * `:where([data-dds-context="marketing"])` confines these rules without contributing
5
+ * specificity, so every override below still ties or beats exactly what it did
6
+ * before — several here are written a class deeper than they look in order to
7
+ * match generated CSS, and a scope that carried weight would break all of them.
8
+ */
9
+
10
+ /**
11
+ * One rule the contract has no way to write.
12
+ *
13
+ * The arrow slides forward while the *button* is hovered, and `tokens` are keyed on the part
14
+ * the state is declared on: the contract can say "the arrow is hovered" and cannot say "the
15
+ * button is". Bound in the contract it generated `.dds-button__icon:hover`, which moves the
16
+ * mark only while the pointer sits on the sixteen pixels of the arrow itself — a hover the
17
+ * reader would find by accident and never on purpose. NotificationItem's archive control took
18
+ * this same division for the same reason, and records it in its own impl file.
19
+ *
20
+ * The transition lives here too, and has to. The generated sheet puts duration and easing on
21
+ * the root, and transition properties do not inherit — so the icon carried a transition
22
+ * property with no duration and jumped the four pixels instead of travelling them.
23
+ *
24
+ * Every value is a token. The distance is the smallest gap step, which is the same measure
25
+ * that separates the arrow from the words: the mark moves by exactly the space it sits in.
26
+ */
27
+ :where([data-dds-context="marketing"]) .dds-button .dds-button__icon {
28
+ transition-property: translate;
29
+ transition-duration: var(--motion-duration-normal);
30
+ transition-timing-function: var(--motion-easing-standard);
31
+ }
32
+
33
+ :where([data-dds-context="marketing"]) .dds-button:hover .dds-button__icon {
34
+ translate: var(--space-gap-xs);
35
+ }
36
+
37
+ /**
38
+ * A reader who asked for less motion gets none, rather than the same distance travelled
39
+ * instantly. The generated sheet already drops the transition under this query, which on its
40
+ * own would leave the four-pixel jump — the movement, minus the part that made it legible.
41
+ */
42
+ @media (prefers-reduced-motion: reduce) {
43
+ :where([data-dds-context="marketing"]) .dds-button:hover .dds-button__icon {
44
+ translate: 0;
45
+ }
46
+ }
@@ -0,0 +1,135 @@
1
+ /* GENERATED from buttonicon.contract.json. Do not edit. */
2
+
3
+ :where([data-dds-context="marketing"]) .dds-buttonicon {
4
+ transition-property: background-color, background-image, outline-color, outline-width;
5
+ align-items: center;
6
+ background-color: transparent;
7
+ border-color: transparent;
8
+ border-style: solid;
9
+ box-sizing: border-box;
10
+ cursor: pointer;
11
+ display: inline-flex;
12
+ flex: none;
13
+ font-family: inherit;
14
+ justify-content: center;
15
+ outline-style: solid;
16
+ padding: 0;
17
+ text-decoration-line: none;
18
+ border-radius: var(--radius-pill);
19
+ border-width: var(--border-width-emphasis);
20
+ outline-width: var(--border-width-none);
21
+ transition-duration: var(--motion-duration-normal);
22
+ transition-timing-function: var(--motion-easing-standard);
23
+ }
24
+
25
+ :where([data-dds-context="marketing"]) .dds-buttonicon .dds-buttonicon__icon {
26
+ flex: none;
27
+ }
28
+
29
+ :where([data-dds-context="marketing"]) .dds-buttonicon:focus-visible {
30
+ outline-color: var(--color-border-focus);
31
+ outline-width: var(--border-width-focus);
32
+ }
33
+
34
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-size="lg"] {
35
+ block-size: var(--size-control-lg);
36
+ inline-size: var(--size-control-lg);
37
+ }
38
+
39
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-size="lg"] .dds-buttonicon__icon {
40
+ block-size: var(--icon-control-lg);
41
+ inline-size: var(--icon-control-lg);
42
+ }
43
+
44
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-size="md"] {
45
+ block-size: var(--size-control-md);
46
+ inline-size: var(--size-control-md);
47
+ }
48
+
49
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-size="md"] .dds-buttonicon__icon {
50
+ block-size: var(--icon-control-md);
51
+ inline-size: var(--icon-control-md);
52
+ }
53
+
54
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-size="sm"] {
55
+ block-size: var(--size-control-sm);
56
+ inline-size: var(--size-control-sm);
57
+ }
58
+
59
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-size="sm"] .dds-buttonicon__icon {
60
+ block-size: var(--icon-control-sm);
61
+ inline-size: var(--icon-control-sm);
62
+ }
63
+
64
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="inverse"] {
65
+ background-color: var(--color-bg-strong);
66
+ color: var(--color-fg-on-strong);
67
+ }
68
+
69
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="plain"] {
70
+ color: var(--color-fg-default);
71
+ }
72
+
73
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="primary"] {
74
+ background-color: var(--color-bg-brand);
75
+ color: var(--color-fg-on-solid);
76
+ }
77
+
78
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="secondary"] {
79
+ border-color: var(--color-border-strong);
80
+ color: var(--color-fg-default);
81
+ }
82
+
83
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="inverse"]:hover:where(:not(:disabled)) {
84
+ background-image: linear-gradient(var(--color-bg-hover-inverse), var(--color-bg-hover-inverse));
85
+ }
86
+
87
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="plain"]:hover:where(:not(:disabled)) {
88
+ background-color: var(--color-bg-hover);
89
+ }
90
+
91
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="primary"]:hover:where(:not(:disabled)) {
92
+ background-color: var(--color-bg-brand-hover);
93
+ }
94
+
95
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="secondary"]:hover:where(:not(:disabled)) {
96
+ background-color: var(--color-bg-hover);
97
+ }
98
+
99
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="inverse"]:active {
100
+ background-image: linear-gradient(var(--color-bg-active-inverse), var(--color-bg-active-inverse));
101
+ }
102
+
103
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="plain"]:active {
104
+ background-color: var(--color-bg-active);
105
+ }
106
+
107
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="primary"]:active {
108
+ background-color: var(--color-bg-brand-active);
109
+ }
110
+
111
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="secondary"]:active {
112
+ background-color: var(--color-bg-active);
113
+ }
114
+
115
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-tone="inverse"]:focus-visible {
116
+ outline-color: var(--color-border-focus-inverse);
117
+ }
118
+
119
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="plain"][data-tone="inverse"] {
120
+ color: var(--color-fg-on-strong);
121
+ }
122
+
123
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="plain"][data-tone="inverse"]:hover:where(:not(:disabled)) {
124
+ background-color: var(--color-bg-hover-inverse);
125
+ }
126
+
127
+ :where([data-dds-context="marketing"]) .dds-buttonicon[data-variant="plain"][data-tone="inverse"]:active {
128
+ background-color: var(--color-bg-active-inverse);
129
+ }
130
+
131
+ @media (prefers-reduced-motion: reduce) {
132
+ :where([data-dds-context="marketing"]) .dds-buttonicon,
133
+ :where([data-dds-context="marketing"]) .dds-buttonicon * { transition: none; }
134
+ }
135
+
@@ -0,0 +1,34 @@
1
+ import './ButtonIcon.css';
2
+ import { type ButtonIconProps } from './ButtonIcon.types.js';
3
+ export type { ButtonIconProps };
4
+ /**
5
+ * One press carried by a glyph alone.
6
+ *
7
+ * Which element it renders is decided by `href` and nothing else, which is CardButton's
8
+ * shape rather than Button's. Button could not take it: its job is defined as moving a
9
+ * visitor along a funnel, so it is an anchor always. A glyph-alone control has no such
10
+ * single job — a footer's social row goes somewhere and a promotional bar's dismiss does
11
+ * not, and both are one press with one mark. An `<a>` gives cmd-click, a destination in
12
+ * the status bar and a copyable link; a `<button>` answers Space and does what the page
13
+ * says. Two components for that would be two names for one gesture.
14
+ *
15
+ * The classes come from `buttonIconParts` rather than being typed here — the stylesheet is
16
+ * generated from the same anatomy, and a class retyped slightly differently renders a part
17
+ * bare with its rule sitting unused.
18
+ *
19
+ * It is typed against `AnchorHTMLAttributes`, which is the branch it takes in the ordinary
20
+ * case, and it is what puts `target` and `rel` in reach — a marketing destination leaves the
21
+ * site often enough that the pairing is the consumer's decision rather than an axis of this
22
+ * component, which is the ruling Button already recorded. The generator takes one interface,
23
+ * so this is a choice rather than a union: what it gives up is the form-participation
24
+ * attributes a `<button>` carries — `form`, `name`, `value` — which an icon-only control in a
25
+ * form wants far less often than an external link wants `rel="noopener"`. `type` survives as
26
+ * a string, so an intentional submit still compiles.
27
+ *
28
+ * There is no `loading` and no `disabled`, which is where this stops following product's
29
+ * ButtonIcon. Neither has an honest anchor form: the browser owns a link's pending state
30
+ * and shows it in the chrome, and `aria-disabled` on a link still follows the link when it
31
+ * is pressed. A prop that meant one thing on one branch and nothing on the other would be
32
+ * worse than its absence.
33
+ */
34
+ export declare function ButtonIcon({ icon, label, variant, size, tone, href, ...rest }: ButtonIconProps): import("react").JSX.Element;
@@ -0,0 +1,117 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cloneElement, isValidElement } from 'react';
3
+ import './ButtonIcon.css';
4
+ import { buttonIconDefaults, buttonIconParts } from './ButtonIcon.types.js';
5
+ /**
6
+ * One press carried by a glyph alone.
7
+ *
8
+ * Which element it renders is decided by `href` and nothing else, which is CardButton's
9
+ * shape rather than Button's. Button could not take it: its job is defined as moving a
10
+ * visitor along a funnel, so it is an anchor always. A glyph-alone control has no such
11
+ * single job — a footer's social row goes somewhere and a promotional bar's dismiss does
12
+ * not, and both are one press with one mark. An `<a>` gives cmd-click, a destination in
13
+ * the status bar and a copyable link; a `<button>` answers Space and does what the page
14
+ * says. Two components for that would be two names for one gesture.
15
+ *
16
+ * The classes come from `buttonIconParts` rather than being typed here — the stylesheet is
17
+ * generated from the same anatomy, and a class retyped slightly differently renders a part
18
+ * bare with its rule sitting unused.
19
+ *
20
+ * It is typed against `AnchorHTMLAttributes`, which is the branch it takes in the ordinary
21
+ * case, and it is what puts `target` and `rel` in reach — a marketing destination leaves the
22
+ * site often enough that the pairing is the consumer's decision rather than an axis of this
23
+ * component, which is the ruling Button already recorded. The generator takes one interface,
24
+ * so this is a choice rather than a union: what it gives up is the form-participation
25
+ * attributes a `<button>` carries — `form`, `name`, `value` — which an icon-only control in a
26
+ * form wants far less often than an external link wants `rel="noopener"`. `type` survives as
27
+ * a string, so an intentional submit still compiles.
28
+ *
29
+ * There is no `loading` and no `disabled`, which is where this stops following product's
30
+ * ButtonIcon. Neither has an honest anchor form: the browser owns a link's pending state
31
+ * and shows it in the chrome, and `aria-disabled` on a link still follows the link when it
32
+ * is pressed. A prop that meant one thing on one branch and nothing on the other would be
33
+ * worse than its absence.
34
+ */
35
+ export function ButtonIcon({ icon, label, variant = buttonIconDefaults.variant, size = buttonIconDefaults.size, tone = buttonIconDefaults.tone, href, ...rest }) {
36
+ /*
37
+ What both branches carry. Spread after `rest` so none of it can be written over from
38
+ the call site: the classes are how the generated stylesheet finds its parts, and the
39
+ accessible name is the only name this control has.
40
+ */
41
+ const shared = {
42
+ className: buttonIconParts.root,
43
+ // Read from data attributes rather than folded into the class, the way Button and Card do.
44
+ 'data-variant': variant,
45
+ 'data-tone': tone,
46
+ 'data-size': size,
47
+ /*
48
+ The entire accessible name. Button gets one from its children; this draws no text, so
49
+ without this attribute there is nothing to announce and the control is a shape with a
50
+ press on it.
51
+ */
52
+ 'aria-label': label,
53
+ };
54
+ /*
55
+ aria-hidden because the mark names nothing: `label` has already named the control, and a
56
+ footer row of these would otherwise announce the picture on every one.
57
+ */
58
+ const applied = { 'aria-hidden': 'true' };
59
+ /*
60
+ The glyph, cloned rather than wrapped.
61
+
62
+ The class has to reach the `<svg>` itself. Every glyph in the icon package ships `width`
63
+ and `height` presentation attributes defaulting to 24, so a box around it keeps its own
64
+ measure and the mark keeps the package's — and the only thing that overrides an attribute
65
+ is a CSS length on the element carrying it. Product's Icon clones for exactly this reason
66
+ and says so; Marketing Button puts its arrow's class in the same place, the difference
67
+ being only that Button chose its own glyph and so had the element in hand.
68
+
69
+ A wrapper was the first shape here and it was wrong twice: the mark stood at whatever size
70
+ it was imported at, and the hand-written rule dragging it back to the box's measure was a
71
+ second place the size was decided — in a file beside the generated one, where the next
72
+ person to change `icon.control.*` would not think to look.
73
+
74
+ Not a clone that injects a size, which is the thing product's ButtonIcon pulled out: that
75
+ reached only glyphs which happen to read a `size` prop and did nothing for a bare one. A
76
+ className reaches every element in the package, and any the caller set is kept.
77
+
78
+ Nor Marketing's own Icon, which Badge and Tab wrap their glyphs in. Icon draws from
79
+ `icon.size`, and that ramp steps 16 then 20 while the control ramp is 18 then 20 — so
80
+ there is no step an md control could ask it for, and rounding to either neighbour would
81
+ put this mark a measure away from the same glyph beside a label in the same band. The
82
+ contract's `icon` part records the same reasoning.
83
+ */
84
+ const mark = isValidElement(icon) ? (cloneElement(icon, {
85
+ className: [buttonIconParts.icon, icon.props.className].filter(Boolean).join(' '),
86
+ ...applied,
87
+ })) : (
88
+ /*
89
+ Anything that is not a single element cannot be cloned, and the preview hands every node
90
+ slot a sample string. Product's Icon keeps a box for that case rather than throwing —
91
+ `Children.only` took the whole preview down there — so the class lands on something and
92
+ the part is still findable.
93
+ */
94
+ _jsx("span", { className: buttonIconParts.icon, ...applied, children: icon }));
95
+ if (href !== undefined) {
96
+ // No cast: `rest` is already the anchor's own attribute set, so `target` and `rel`
97
+ // arrive typed and land on the element that understands them.
98
+ return (_jsx("a", { ...rest, ...shared, href: href, children: mark }));
99
+ }
100
+ return (
101
+ /*
102
+ A button, not a submit. The element's own default is `submit`, so one of these dropped
103
+ into a newsletter form would send it — and a dismiss that submitted a form is the kind
104
+ of fault nobody looks for in an icon.
105
+
106
+ Above the spread rather than below it, which is where this differs from CardButton: an
107
+ icon-only submit beside an email field is a real thing to want, so a consumer who says
108
+ so still wins. A card is never a form's submit, which is why it can afford to force it.
109
+
110
+ The cast is on this branch rather than the other, which is the mirror of CardButton and
111
+ follows from the props being the anchor's: an `<a>`'s `type` is the destination's MIME
112
+ type and so is a plain string, which a `<button>`'s own `type` will not accept. Runtime
113
+ is unaffected — a consumer writing "submit" still gets a submit — but the two elements
114
+ disagree about what the word means, and TypeScript is right to say so.
115
+ */
116
+ _jsx("button", { type: "button", ...rest, ...shared, children: mark }));
117
+ }