@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,76 @@
1
+ /* GENERATED from spinner.contract.json. Do not edit. */
2
+
3
+ :where([data-dds-context="marketing"]) .dds-spinner {
4
+ align-items: center;
5
+ display: inline-flex;
6
+ flex-direction: column;
7
+ position: relative;
8
+ gap: var(--space-gap-sm);
9
+ }
10
+
11
+ :where([data-dds-context="marketing"]) .dds-spinner[data-variant="inherit"] .dds-spinner__circle {
12
+ color: inherit;
13
+ }
14
+
15
+ :where([data-dds-context="marketing"]) .dds-spinner[data-variant="inherit"] .dds-spinner__label {
16
+ color: inherit;
17
+ }
18
+
19
+ :where([data-dds-context="marketing"]) .dds-spinner .dds-spinner__label {
20
+ color: var(--color-fg-default);
21
+ }
22
+
23
+ :where([data-dds-context="marketing"]) .dds-spinner .dds-spinner__track {
24
+ stroke-opacity: var(--opacity-track);
25
+ }
26
+
27
+ :where([data-dds-context="marketing"]) .dds-spinner[data-size="lg"] .dds-spinner__circle {
28
+ block-size: var(--size-spinner-lg);
29
+ inline-size: var(--size-spinner-lg);
30
+ stroke-width: var(--size-spinner-stroke-lg);
31
+ }
32
+
33
+ :where([data-dds-context="marketing"]) .dds-spinner[data-size="lg"] .dds-spinner__label {
34
+ font-family: var(--font-label-lg-family);
35
+ font-size: var(--font-label-lg-size);
36
+ font-weight: var(--font-label-lg-weight);
37
+ letter-spacing: var(--font-label-lg-letter-spacing);
38
+ line-height: var(--font-label-lg-line-height);
39
+ }
40
+
41
+ :where([data-dds-context="marketing"]) .dds-spinner[data-size="md"] .dds-spinner__circle {
42
+ block-size: var(--size-spinner-md);
43
+ inline-size: var(--size-spinner-md);
44
+ stroke-width: var(--size-spinner-stroke-md);
45
+ }
46
+
47
+ :where([data-dds-context="marketing"]) .dds-spinner[data-size="md"] .dds-spinner__label {
48
+ font-family: var(--font-label-md-family);
49
+ font-size: var(--font-label-md-size);
50
+ font-weight: var(--font-label-md-weight);
51
+ letter-spacing: var(--font-label-md-letter-spacing);
52
+ line-height: var(--font-label-md-line-height);
53
+ }
54
+
55
+ :where([data-dds-context="marketing"]) .dds-spinner[data-size="sm"] .dds-spinner__circle {
56
+ block-size: var(--size-spinner-sm);
57
+ inline-size: var(--size-spinner-sm);
58
+ stroke-width: var(--size-spinner-stroke-sm);
59
+ }
60
+
61
+ :where([data-dds-context="marketing"]) .dds-spinner[data-size="sm"] .dds-spinner__label {
62
+ font-family: var(--font-label-sm-family);
63
+ font-size: var(--font-label-sm-size);
64
+ font-weight: var(--font-label-sm-weight);
65
+ letter-spacing: var(--font-label-sm-letter-spacing);
66
+ line-height: var(--font-label-sm-line-height);
67
+ }
68
+
69
+ :where([data-dds-context="marketing"]) .dds-spinner[data-variant="accent"] .dds-spinner__circle {
70
+ color: var(--color-bg-brand);
71
+ }
72
+
73
+ :where([data-dds-context="marketing"]) .dds-spinner[data-variant="neutral"] .dds-spinner__circle {
74
+ color: var(--color-bg-strong);
75
+ }
76
+
@@ -0,0 +1,5 @@
1
+ import './Spinner.css';
2
+ import './spinner-impl.css';
3
+ import { type SpinnerProps } from './Spinner.types.js';
4
+ export type { SpinnerProps };
5
+ export declare function Spinner({ size, variant, label, showLabel, ...rest }: SpinnerProps): import("react").JSX.Element;
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import './Spinner.css';
3
+ import { given } from '../../given.js';
4
+ import { visuallyHidden } from '../../visually-hidden.js';
5
+ import './spinner-impl.css';
6
+ import { spinnerDefaults, spinnerParts } from './Spinner.types.js';
7
+ export function Spinner({ size = spinnerDefaults.size, variant = spinnerDefaults.variant, label, showLabel = spinnerDefaults.showLabel, ...rest }) {
8
+ /**
9
+ * Whether this spinner is the thing being waited on, or part of one.
10
+ *
11
+ * `role="status"` is a live region, so an unnamed one is not a quiet spinner — it is a
12
+ * region that fires with nothing to say. An absent label is therefore the decorative
13
+ * mode, and a real mode rather than a workaround: no role, no name, hidden outright.
14
+ * That is the right one wherever the copy beside the ring already names the wait, which
15
+ * on a marketing page is most of them.
16
+ */
17
+ const named = given(label);
18
+ return (
19
+ /*
20
+ `rest` first, the way ButtonIcon and CardButton spread theirs.
21
+
22
+ Last, it let a call site pass `role` or `aria-label` and overrule what this component
23
+ just decided — including naming a spinner that had deliberately made itself decorative,
24
+ which is the one state the label guidance exists to protect. Everything a consumer
25
+ legitimately sets (`id`, `style`, handlers, `data-*` of its own) still lands; only the
26
+ four attributes this component owns are now beyond reach.
27
+ */
28
+ _jsxs("div", { ...rest, className: spinnerParts.root, ...(named ? { role: 'status', 'aria-label': label } : { 'aria-hidden': true }), "data-size": size, "data-variant": variant, children: [_jsxs("svg", { className: spinnerParts.circle, viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [_jsx("circle", { className: spinnerParts.track, cx: "12", cy: "12", r: "10", stroke: "currentColor", vectorEffect: "non-scaling-stroke" }), _jsx("path", { d: "M12 2a10 10 0 0 1 10 10", stroke: "currentColor", strokeLinecap: "round", vectorEffect: "non-scaling-stroke" })] }), named ? (_jsx("span", { className: spinnerParts.label, style: showLabel ? undefined : visuallyHidden, children: label })) : null] }));
29
+ }
@@ -0,0 +1,37 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ export interface SpinnerOwnProps {
3
+ /**
4
+ * `sm` — In a line of body copy, or inside a control the reader has just pressed. Sixteen, the size of the words beside it, so it sits on the line rather than in front of it
5
+ * `md` — The default. A form that has been submitted, a card waiting on the figure it is going to show
6
+ * `lg` — A section holding space for something that arrives separately — an embed, a demo, a band of live figures. Sized to be found from where the reader is looking, which is the whole section rather than one control in it
7
+ */
8
+ size?: 'sm' | 'md' | 'lg';
9
+ /**
10
+ * `accent` — The default, and what a page nearly always wants. The wait is the one thing happening, and the brand colour is what says the page is doing it rather than failing to
11
+ * `neutral` — The wait is incidental to what the reader came for — a figure refreshing inside a card that is otherwise readable. Brand colour on a wait nobody is watching spends attention the page needs further down
12
+ * `inherit` — Inside something that has already set a colour: a filled button, a dark band, a coloured panel. `currentColor` reaches the ring and the label together.
13
+
14
+ This is also how a spinner on a dark section or a photograph gets its colour. There is no fixed-light or fixed-dark role in this package, and adding one would be asking a second time a question the section has already answered by setting its text colour
15
+ */
16
+ variant?: 'accent' | 'neutral' | 'inherit';
17
+ }
18
+ export type SpinnerProps = SpinnerOwnProps & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'size' | 'variant' | 'label' | 'showLabel'> & ({
19
+ showLabel?: boolean;
20
+ label: string;
21
+ } | {
22
+ showLabel?: false;
23
+ label?: string;
24
+ });
25
+ /** The class each part carries. Apply these — do not retype them. */
26
+ export declare const spinnerParts: {
27
+ readonly root: "dds-spinner";
28
+ readonly circle: "dds-spinner__circle";
29
+ readonly track: "dds-spinner__track";
30
+ readonly label: "dds-spinner__label";
31
+ };
32
+ /** Generated so defaults cannot drift from the contract. */
33
+ export declare const spinnerDefaults: {
34
+ readonly size: "md";
35
+ readonly variant: "accent";
36
+ readonly showLabel: false;
37
+ };
@@ -0,0 +1,10 @@
1
+ // GENERATED from spinner.contract.json. Do not edit.
2
+ /** The class each part carries. Apply these — do not retype them. */
3
+ export const spinnerParts = {
4
+ root: 'dds-spinner',
5
+ circle: 'dds-spinner__circle',
6
+ track: 'dds-spinner__track',
7
+ label: 'dds-spinner__label',
8
+ };
9
+ /** Generated so defaults cannot drift from the contract. */
10
+ export const spinnerDefaults = { size: 'md', variant: 'accent', showLabel: false };
@@ -0,0 +1,27 @@
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 each one still ties or beats exactly what it did before.
6
+ */
7
+
8
+ /* Implementation CSS that the contract's staticCss cannot express. */
9
+
10
+ @keyframes dds-spinner-rotate {
11
+ to { transform: rotate(360deg); }
12
+ }
13
+
14
+ :where([data-dds-context="marketing"]) .dds-spinner__circle {
15
+ animation: dds-spinner-rotate var(--motion-duration-spinner) var(--motion-easing-spinner) infinite;
16
+ }
17
+
18
+ /*
19
+ * The ring stands still rather than disappearing. What is left is a full track with one
20
+ * arc drawn over it — still visibly an indicator, and still named by its label, which is
21
+ * what a reader who has turned motion off is relying on.
22
+ */
23
+ @media (prefers-reduced-motion: reduce) {
24
+ :where([data-dds-context="marketing"]) .dds-spinner__circle {
25
+ animation: none;
26
+ }
27
+ }
@@ -0,0 +1,43 @@
1
+ /* GENERATED from statusdot.contract.json. Do not edit. */
2
+
3
+ :where([data-dds-context="marketing"]) .dds-statusdot {
4
+ transition-property: outline-color, outline-width;
5
+ display: inline-block;
6
+ outline-style: solid;
7
+ border-radius: var(--radius-pill);
8
+ height: var(--size-dot-diameter);
9
+ outline-width: var(--border-width-none);
10
+ transition-duration: var(--motion-duration-fast);
11
+ transition-timing-function: var(--motion-easing-standard);
12
+ width: var(--size-dot-diameter);
13
+ }
14
+
15
+ :where([data-dds-context="marketing"]) .dds-statusdot:focus-visible {
16
+ outline-color: var(--color-border-focus);
17
+ outline-width: var(--border-width-focus);
18
+ }
19
+
20
+ :where([data-dds-context="marketing"]) .dds-statusdot[data-variant="accent"] {
21
+ background-color: var(--color-bg-brand);
22
+ }
23
+
24
+ :where([data-dds-context="marketing"]) .dds-statusdot[data-variant="error"] {
25
+ background-color: var(--color-bg-danger);
26
+ }
27
+
28
+ :where([data-dds-context="marketing"]) .dds-statusdot[data-variant="info"] {
29
+ background-color: var(--color-bg-info);
30
+ }
31
+
32
+ :where([data-dds-context="marketing"]) .dds-statusdot[data-variant="success"] {
33
+ background-color: var(--color-bg-success);
34
+ }
35
+
36
+ :where([data-dds-context="marketing"]) .dds-statusdot[data-variant="warning"] {
37
+ background-color: var(--color-bg-warning);
38
+ }
39
+
40
+ @media (prefers-reduced-motion: reduce) {
41
+ :where([data-dds-context="marketing"]) .dds-statusdot { transition: none; }
42
+ }
43
+
@@ -0,0 +1,35 @@
1
+ import './StatusDot.css';
2
+ import './status-dot-impl.css';
3
+ import { type StatusDotProps } from './StatusDot.types.js';
4
+ export type { StatusDotProps };
5
+ /**
6
+ * The dot, and — when it has something to explain — the description attached to it.
7
+ *
8
+ * `tooltip` is the whole of the difference. Without it this renders one span and
9
+ * nothing else, which is what a dot in a list of twenty should cost. With it the dot
10
+ * becomes a tooltip anchor, and that brings two consequences the contract names and
11
+ * this file has to deliver.
12
+ *
13
+ * The first is the tab stop. `TooltipAnchor` reveals on pointer and on focus, and a
14
+ * span is not somewhere focus can rest — so the description would be one only a mouse
15
+ * ever reached. `tabIndex` is therefore set exactly when there is a tooltip to reach,
16
+ * and left alone otherwise: a dot with nothing to say is not a stop on the way to
17
+ * anything. It sits before the spread so a consumer with a reason to move the dot out
18
+ * of the tab order still can.
19
+ *
20
+ * The second is that the outermost element stops being the dot. `TooltipAnchor`'s own
21
+ * positioning wrapper goes around it, which is why the flex guard in
22
+ * status-dot-impl.css has to reach that box as well as this one — the flex child is
23
+ * whichever of the two the parent actually sees.
24
+ *
25
+ * And it carries no role and no name unless it is given one. The contract asks for a
26
+ * visible text label beside every dot and says outright that the text is what states
27
+ * the meaning — so a dot naming itself as well is heard twice. It was `role="status"`
28
+ * with a name defaulting to "Status", which made every dot on a page a live region
29
+ * announcing a word that says nothing: "Status, Online".
30
+ *
31
+ * `label` is the escape hatch for the rare dot standing alone, and it is what a dot
32
+ * carrying a tooltip must have — a tooltip makes it a tab stop, and a focusable thing
33
+ * with no name is announced as nothing at all.
34
+ */
35
+ export declare function StatusDot({ variant, pulse, label, tooltip, ...rest }: StatusDotProps): import("react").JSX.Element;
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import './StatusDot.css';
3
+ import './status-dot-impl.css';
4
+ import { TooltipAnchor } from '../tooltip/TooltipAnchor.js';
5
+ import { given } from '../../given.js';
6
+ import { statusDotDefaults, statusDotParts } from './StatusDot.types.js';
7
+ /**
8
+ * The dot, and — when it has something to explain — the description attached to it.
9
+ *
10
+ * `tooltip` is the whole of the difference. Without it this renders one span and
11
+ * nothing else, which is what a dot in a list of twenty should cost. With it the dot
12
+ * becomes a tooltip anchor, and that brings two consequences the contract names and
13
+ * this file has to deliver.
14
+ *
15
+ * The first is the tab stop. `TooltipAnchor` reveals on pointer and on focus, and a
16
+ * span is not somewhere focus can rest — so the description would be one only a mouse
17
+ * ever reached. `tabIndex` is therefore set exactly when there is a tooltip to reach,
18
+ * and left alone otherwise: a dot with nothing to say is not a stop on the way to
19
+ * anything. It sits before the spread so a consumer with a reason to move the dot out
20
+ * of the tab order still can.
21
+ *
22
+ * The second is that the outermost element stops being the dot. `TooltipAnchor`'s own
23
+ * positioning wrapper goes around it, which is why the flex guard in
24
+ * status-dot-impl.css has to reach that box as well as this one — the flex child is
25
+ * whichever of the two the parent actually sees.
26
+ *
27
+ * And it carries no role and no name unless it is given one. The contract asks for a
28
+ * visible text label beside every dot and says outright that the text is what states
29
+ * the meaning — so a dot naming itself as well is heard twice. It was `role="status"`
30
+ * with a name defaulting to "Status", which made every dot on a page a live region
31
+ * announcing a word that says nothing: "Status, Online".
32
+ *
33
+ * `label` is the escape hatch for the rare dot standing alone, and it is what a dot
34
+ * carrying a tooltip must have — a tooltip makes it a tab stop, and a focusable thing
35
+ * with no name is announced as nothing at all.
36
+ */
37
+ export function StatusDot({ variant = statusDotDefaults.variant, pulse = statusDotDefaults.pulse, label, tooltip, ...rest }) {
38
+ const described = given(tooltip);
39
+ const dot = (_jsx("span", { className: statusDotParts.root, "aria-label": label, "aria-hidden": label === undefined || undefined, "data-variant": variant, "data-pulse": pulse || undefined, tabIndex: described ? 0 : undefined, ...rest }));
40
+ if (!described)
41
+ return dot;
42
+ // The anchor clones the dot to attach its handlers and the aria-describedby, so the
43
+ // description belongs to the element carrying the role — not to the wrapper, which
44
+ // no assistive technology has any reason to visit.
45
+ return _jsx(TooltipAnchor, { content: tooltip, children: dot });
46
+ }
@@ -0,0 +1,29 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ export interface StatusDotOwnProps {
3
+ /**
4
+ * `accent` — A mark in the brand colour, for something worth noticing that is not a state — a feature that is new, an item the page is pointing at. It is the default because most dots on a marketing page are drawing attention rather than reporting a condition, which is the opposite of the balance an application view has.
5
+ * `success` — Available, online, healthy, or passing
6
+ * `warning` — Away, degraded, or approaching a limit
7
+ * `error` — Busy, offline, failed, or critical
8
+ * `info` — In progress, syncing, or informational
9
+ */
10
+ variant?: 'accent' | 'success' | 'warning' | 'error' | 'info';
11
+ /** The status is live or actively changing — draws attention to an ongoing state */
12
+ pulse?: boolean;
13
+ }
14
+ export type StatusDotProps = StatusDotOwnProps & Omit<HTMLAttributes<HTMLSpanElement>, 'className' | 'variant' | 'pulse' | 'label' | 'tooltip'> & ({
15
+ tooltip?: string;
16
+ label: string;
17
+ } | {
18
+ tooltip?: undefined;
19
+ label?: string;
20
+ });
21
+ /** The class each part carries. Apply these — do not retype them. */
22
+ export declare const statusDotParts: {
23
+ readonly root: "dds-statusdot";
24
+ };
25
+ /** Generated so defaults cannot drift from the contract. */
26
+ export declare const statusDotDefaults: {
27
+ readonly variant: "accent";
28
+ readonly pulse: false;
29
+ };
@@ -0,0 +1,7 @@
1
+ // GENERATED from status-dot.contract.json. Do not edit.
2
+ /** The class each part carries. Apply these — do not retype them. */
3
+ export const statusDotParts = {
4
+ root: 'dds-statusdot',
5
+ };
6
+ /** Generated so defaults cannot drift from the contract. */
7
+ export const statusDotDefaults = { variant: 'accent', pulse: false };
@@ -0,0 +1,42 @@
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
+ /* Implementation CSS that the contract's staticCss cannot express. */
11
+
12
+ :where([data-dds-context="marketing"]) .dds-statusdot {
13
+ flex-shrink: 0;
14
+ }
15
+
16
+ @keyframes dds-statusdot-pulse {
17
+ 0%, 100% { opacity: 1; }
18
+ 50% { opacity: 0.5; }
19
+ }
20
+
21
+ :where([data-dds-context="marketing"]) .dds-statusdot[data-pulse] {
22
+ animation: dds-statusdot-pulse var(--motion-duration-pulse) var(--motion-easing-enter) infinite;
23
+ }
24
+
25
+ @media (prefers-reduced-motion: reduce) {
26
+ :where([data-dds-context="marketing"]) .dds-statusdot[data-pulse] {
27
+ animation: none;
28
+ }
29
+ }
30
+
31
+ /*
32
+ * The flex guard, again, one box out.
33
+ *
34
+ * A tooltip puts TooltipAnchor's positioning wrapper between the dot and whatever row
35
+ * it sits in, so the flex child stops being the dot and the rule above stops reaching
36
+ * it — a dot beside a long name would be squashed into an ellipse by the text rather
37
+ * than holding its diameter. The wrapper is another module's DOM and carries no class
38
+ * of ours, so it is matched by what it contains.
39
+ */
40
+ :where([data-dds-context="marketing"]) .dds-tooltip-anchor:has(> .dds-statusdot) {
41
+ flex-shrink: 0;
42
+ }
@@ -0,0 +1,89 @@
1
+ /* GENERATED from subdomainnavbar.contract.json. Do not edit. */
2
+
3
+ :where([data-dds-context="marketing"]) .dds-subdomainnavbar {
4
+ align-items: center;
5
+ box-sizing: border-box;
6
+ display: flex;
7
+ inline-size: 100%;
8
+ inset-block-start: 0;
9
+ justify-content: center;
10
+ position: sticky;
11
+ background-color: var(--color-bg-page);
12
+ box-shadow: var(--elevation-edge-bottom);
13
+ color: var(--color-fg-default);
14
+ }
15
+
16
+ :where([data-dds-context="marketing"]) .dds-subdomainnavbar .dds-subdomainnavbar__inner {
17
+ align-items: center;
18
+ box-sizing: border-box;
19
+ container-type: inline-size;
20
+ display: flex;
21
+ inline-size: 100%;
22
+ justify-content: flex-start;
23
+ min-inline-size: 0;
24
+ block-size: var(--size-bar-height);
25
+ gap: var(--space-gap-xl);
26
+ padding-block: var(--space-inset-2xs);
27
+ padding-inline: var(--space-inset-lg);
28
+ }
29
+
30
+ :where([data-dds-context="marketing"]) .dds-subdomainnavbar .dds-subdomainnavbar__brand {
31
+ align-items: center;
32
+ display: flex;
33
+ flex-shrink: 0;
34
+ block-size: var(--icon-size-md);
35
+ gap: var(--space-gap-sm);
36
+ }
37
+
38
+ :where([data-dds-context="marketing"]) .dds-subdomainnavbar .dds-subdomainnavbar__nav {
39
+ align-items: center;
40
+ display: flex;
41
+ min-inline-size: 0;
42
+ position: relative;
43
+ gap: var(--space-gap-xs);
44
+ }
45
+
46
+ :where([data-dds-context="marketing"]) .dds-subdomainnavbar .dds-subdomainnavbar__utilities {
47
+ align-items: center;
48
+ display: flex;
49
+ flex-shrink: 0;
50
+ gap: var(--space-gap-sm);
51
+ }
52
+
53
+ :where([data-dds-context="marketing"]) .dds-subdomainnavbar .dds-subdomainnavbar__trigger {
54
+ align-items: center;
55
+ appearance: none;
56
+ border-style: none;
57
+ color: inherit;
58
+ cursor: pointer;
59
+ display: inline-flex;
60
+ flex-shrink: 0;
61
+ justify-content: center;
62
+ outline-style: solid;
63
+ padding: 0;
64
+ background-color: var(--color-bg-transparent);
65
+ border-radius: var(--radius-control-sm);
66
+ min-block-size: var(--size-target-min);
67
+ min-inline-size: var(--size-target-min);
68
+ outline-width: var(--border-width-none);
69
+ }
70
+
71
+ :where([data-dds-context="marketing"]) .dds-subdomainnavbar .dds-subdomainnavbar__panel-host {
72
+ display: contents;
73
+ color: var(--color-fg-default);
74
+ }
75
+
76
+ :where([data-dds-context="marketing"]) .dds-subdomainnavbar .dds-subdomainnavbar__trigger:focus-visible {
77
+ outline-color: var(--color-border-focus);
78
+ outline-width: var(--border-width-focus);
79
+ }
80
+
81
+ :where([data-dds-context="marketing"]) .dds-subdomainnavbar[data-tone="inverse"] {
82
+ background-color: var(--color-bg-strong);
83
+ color: var(--color-fg-on-strong);
84
+ }
85
+
86
+ :where([data-dds-context="marketing"]) .dds-subdomainnavbar[data-tone="inverse"] .dds-subdomainnavbar__trigger:focus-visible {
87
+ outline-color: var(--color-border-focus-inverse);
88
+ }
89
+
@@ -0,0 +1,21 @@
1
+ import './SubdomainNavbar.css';
2
+ import './subdomain-navbar-impl.css';
3
+ import { type SubdomainNavbarProps } from './SubdomainNavbar.types.js';
4
+ export type { SubdomainNavbarProps };
5
+ /**
6
+ * The bar across the top of a subdomain, and the plain sibling of Navbar.
7
+ *
8
+ * What it does not do is the point of it. There is no pill, nothing gathers, and nothing here reads
9
+ * the scroll position — a subdomain is somewhere a reader works, and chrome that rearranged itself
10
+ * while they read would be motion answering nothing. The marketing bar's behaviour is that site's
11
+ * signature and belongs to that site.
12
+ *
13
+ * What it shares is everything below the bar itself: the destinations are NavbarItem, the sections
14
+ * that open are NavbarMenu, and the surface it collapses into is NavbarPanel, which brings its own
15
+ * focus trap, its Escape and its scroll lock. That sharing is the argument for this being a second
16
+ * component rather than a variant of the first — the parts that carry the design were already
17
+ * separate, so a second bar costs a contract and a row.
18
+ *
19
+ * No `role="banner"`: a `<header>` outside a sectioning element already is that landmark.
20
+ */
21
+ export declare function SubdomainNavbar({ tone, label, menuLabel, closeLabel, brand, utilities, menuOpen, onMenuOpenChange, children, ...rest }: SubdomainNavbarProps): import("react").JSX.Element;
@@ -0,0 +1,127 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Children, cloneElement, isValidElement, useCallback, useRef, useState, } from 'react';
4
+ import { BarsRegularIcon, XmarkRegularIcon } from '@deriv-com/quill-icons-web';
5
+ import './SubdomainNavbar.css';
6
+ import './subdomain-navbar-impl.css';
7
+ import { ButtonIcon } from '../button-icon/ButtonIcon.js';
8
+ import { DropdownMenu } from '../dropdown-menu/DropdownMenu.js';
9
+ import { Icon } from '../icon/Icon.js';
10
+ import { NavbarItem } from '../navbar-item/NavbarItem.js';
11
+ import { NavbarMenu } from '../navbar-menu/NavbarMenu.js';
12
+ import { NavbarPanel } from '../navbar-panel/NavbarPanel.js';
13
+ import { NavbarSwitcher } from '../navbar-switcher/NavbarSwitcher.js';
14
+ import { subdomainNavbarDefaults, subdomainNavbarParts, } from './SubdomainNavbar.types.js';
15
+ /** The two of this package's own components a page is likely to put at the far end. */
16
+ const TONED = [DropdownMenu, ButtonIcon, NavbarSwitcher];
17
+ /** What the panel draws under the destinations rather than in its foot. */
18
+ const SWITCHERS = [NavbarSwitcher, ButtonIcon];
19
+ /**
20
+ * Both handlers, the menu's own first.
21
+ *
22
+ * `cloneElement` replaces rather than merges, so a menu already reporting its own state would
23
+ * silently stop — and that is the handler a page is most likely to have written.
24
+ */
25
+ function chain(theirs, ours) {
26
+ if (theirs === undefined)
27
+ return ours;
28
+ return (open) => {
29
+ theirs(open);
30
+ ours(open);
31
+ };
32
+ }
33
+ /**
34
+ * The bar across the top of a subdomain, and the plain sibling of Navbar.
35
+ *
36
+ * What it does not do is the point of it. There is no pill, nothing gathers, and nothing here reads
37
+ * the scroll position — a subdomain is somewhere a reader works, and chrome that rearranged itself
38
+ * while they read would be motion answering nothing. The marketing bar's behaviour is that site's
39
+ * signature and belongs to that site.
40
+ *
41
+ * What it shares is everything below the bar itself: the destinations are NavbarItem, the sections
42
+ * that open are NavbarMenu, and the surface it collapses into is NavbarPanel, which brings its own
43
+ * focus trap, its Escape and its scroll lock. That sharing is the argument for this being a second
44
+ * component rather than a variant of the first — the parts that carry the design were already
45
+ * separate, so a second bar costs a contract and a row.
46
+ *
47
+ * No `role="banner"`: a `<header>` outside a sectioning element already is that landmark.
48
+ */
49
+ export function SubdomainNavbar({ tone = subdomainNavbarDefaults.tone, label, menuLabel, closeLabel, brand, utilities, menuOpen, onMenuOpenChange, children, ...rest }) {
50
+ const triggerRef = useRef(null);
51
+ /*
52
+ Controlled when told, its own answer otherwise. A private copy alongside a passed one would be
53
+ two answers to a question with one truth, and would show the stale one for a frame the first
54
+ time a page set it from anywhere else.
55
+ */
56
+ const [held, setHeld] = useState(false);
57
+ const controlled = menuOpen !== undefined;
58
+ const open = controlled ? menuOpen : held;
59
+ const setOpen = useCallback((next) => {
60
+ if (!controlled)
61
+ setHeld(next);
62
+ onMenuOpenChange?.(next);
63
+ }, [controlled, onMenuOpenChange]);
64
+ const close = useCallback(() => setOpen(false), [setOpen]);
65
+ // Which section is showing, by position in the row. Positions rather than labels: two sections
66
+ // can share a name in a way nothing here should have an opinion about.
67
+ const [section, setSection] = useState(null);
68
+ const items = Children.toArray(children);
69
+ const governed = items.map((child, index) => {
70
+ if (!isValidElement(child))
71
+ return child;
72
+ /*
73
+ The tone travels to everything this component owns. A row where one destination is inverse and
74
+ its neighbours are not is a row whose hovers half disappear — and the bar is the only thing
75
+ that knows what ground it painted, so it tells them rather than asking the page to tell each.
76
+ */
77
+ if (child.type === NavbarItem)
78
+ return cloneElement(child, { tone });
79
+ if (child.type !== NavbarMenu)
80
+ return child;
81
+ return cloneElement(child, {
82
+ tone,
83
+ open: section === index,
84
+ onOpenChange: chain(child.props.onOpenChange, (next) => {
85
+ setSection(next ? index : null);
86
+ }),
87
+ });
88
+ });
89
+ /*
90
+ And the far end, which is a slot rather than children — so only the two components the bar can
91
+ speak to are spoken to. Anything else goes through untouched: pressing a prop on a component
92
+ that does not declare it puts an unknown attribute on a DOM node, which React says out loud.
93
+
94
+ `openOnHover` is not set here, unlike the marketing bar's switcher. Nothing else in this row
95
+ opens under the pointer, so a control that did would be the odd one rather than the consistent
96
+ one.
97
+ */
98
+ const trailing = Children.map(utilities, (child) => isValidElement(child) && TONED.includes(child.type)
99
+ ? cloneElement(child, { tone })
100
+ : child);
101
+ /*
102
+ And the same set again, split for the panel.
103
+
104
+ A switcher belongs under the destinations there and the action belongs in the foot — the foot
105
+ is for the one thing the subdomain wants pressed, and a preference sitting beside it competes
106
+ for the last word. The bar has one slot, so the split is made by type: the two components that
107
+ are switchers go one way and everything else goes the other.
108
+
109
+ At no tone. The panel paints paper whatever the bar is standing on, so what it holds takes the
110
+ default — the same element is inverse a few pixels away in the bar, and one of the two would
111
+ otherwise be wrong.
112
+ */
113
+ const settings = [];
114
+ const actions = [];
115
+ Children.forEach(utilities, (child) => {
116
+ const isSwitcher = isValidElement(child) && SWITCHERS.includes(child.type);
117
+ (isSwitcher ? settings : actions).push(child);
118
+ });
119
+ return (_jsxs("header", { ...rest, className: subdomainNavbarParts.root, "data-tone": tone, "data-dds-pinned-surface": open ? 'open' : undefined, children: [_jsxs("div", { className: subdomainNavbarParts.inner, children: [brand !== undefined && brand !== null && (_jsx("div", { className: subdomainNavbarParts.brand, children: brand })), _jsx("nav", { className: subdomainNavbarParts.nav, "aria-label": label, children: governed }), utilities !== undefined && utilities !== null && (_jsx("div", { className: subdomainNavbarParts.utilities, children: trailing })), _jsx("button", { ref: triggerRef, type: "button", className: subdomainNavbarParts.trigger, "aria-label": menuLabel, "aria-expanded": open, onClick: () => setOpen(!open), children: _jsx(Icon, { size: "md", children: open ? _jsx(XmarkRegularIcon, {}) : _jsx(BarsRegularIcon, {}) }) })] }), open && (_jsx("div", { className: subdomainNavbarParts['panel-host'], children: _jsx(NavbarPanel, { label: label, closeLabel: closeLabel, onClose: close, brand: brand,
120
+ /*
121
+ The far end is one slot here, and the panel wants it in two places: what a reader
122
+ sets goes under the destinations, and what the subdomain wants pressed goes in the
123
+ foot. Split by type rather than by another prop — a switcher is a NavbarSwitcher or a
124
+ ButtonIcon, and anything else is the action.
125
+ */
126
+ preferences: settings, footer: actions, openerRef: triggerRef, children: children }) }))] }));
127
+ }