@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,186 @@
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
+ /*
13
+ * Where the panel hangs, which is three offsets a contract cannot hold: two of them
14
+ * negate the bar's own padding and the third is a percentage of nothing.
15
+ *
16
+ * `inset-block-start: 100%` puts it under the trigger. The inline half centres it on that
17
+ * trigger rather than hanging it from the trigger's leading edge — an 846px panel dropped
18
+ * from the left of a one-word name runs off the end of the page for the last section in the
19
+ * row, and reads as belonging to whatever is to its right rather than to the name above it.
20
+ *
21
+ * Centred on the trigger rather than on the bar, which is the same thing in practice and a
22
+ * far smaller claim. The destinations sit in a pill the bar centres, so a panel centred on
23
+ * one of them lands near the middle of the page anyway — and doing it this way keeps the
24
+ * component positioning against its own root, so a menu used outside a Navbar still knows
25
+ * where to put its panel.
26
+ *
27
+ * `translate` rather than a negative margin: it is the transform property, so it composes
28
+ * with anything else the panel is given instead of fighting a layout value for the same
29
+ * axis, and it costs no layout pass.
30
+ */
31
+ :where([data-dds-context="marketing"]) .dds-navbarmenu .dds-navbarmenu__surface {
32
+ inset-block-start: 100%;
33
+ inset-inline-start: 50%;
34
+ translate: -50%;
35
+ }
36
+
37
+ /*
38
+ * Above the bar it hangs from, which a contract cannot hold: an integer with no unit.
39
+ *
40
+ * `layer.popup` is the role for what leaves the flow and floats over the page. It sits
41
+ * below anything that interrupts the reader, so NavbarPanel at `layer.overlay` still
42
+ * covers this — which is right: the two never show at the same width, and if they ever
43
+ * did, the one covering the page should win.
44
+ */
45
+ :where([data-dds-context="marketing"]) .dds-navbarmenu .dds-navbarmenu__surface {
46
+ z-index: var(--layer-popup);
47
+ }
48
+
49
+ /*
50
+ * The chevron turns.
51
+ *
52
+ * A rotation is a transform, which is neither a token nor a structural keyword — no
53
+ * contract can hold it. How long it takes and on what curve are decisions, and those are
54
+ * in the contract as motion.duration.fast and motion.easing.standard; this is only the
55
+ * shape of the movement.
56
+ *
57
+ * `rotate` rather than `transform`, so it composes with anything else the glyph is given
58
+ * rather than replacing it. The reduced-motion guard the generator writes covers
59
+ * `.dds-navbarmenu *`, so this is switched off with everything else — and switched off it
60
+ * leaves the chevron pointing the way it always did, which is the end state rather than a
61
+ * frame of the travel.
62
+ */
63
+ :where([data-dds-context="marketing"]) .dds-navbarmenu__trigger[data-expanded='true'] .dds-navbarmenu__chevron {
64
+ rotate: 180deg;
65
+ }
66
+
67
+ /*
68
+ * Two columns, whatever the number of sets.
69
+ *
70
+ * A row of groups makes the panel as wide as however many sets it happens to hold — add a fourth
71
+ * and the feature card is pushed out of an 846px surface. Two columns is a decision about the
72
+ * panel rather than about the content, and it is the arrangement the design asks for: sets flow
73
+ * into the pair and a third wraps beneath the first.
74
+ *
75
+ * `columns` and not a grid track list, which is the correction rather than a preference. A grid
76
+ * aligns its rows: a set of one beside a set of seven is stretched to the taller one, and the next
77
+ * set down starts below both, leaving a hand's width of nothing under the short one. Multi-column
78
+ * packs each column in turn, so a set begins where the set above it ended and the two columns
79
+ * balance to roughly equal height.
80
+ *
81
+ * What it costs is the row gap, which multi-column does not have — the space under a set belongs
82
+ * to the set, as a margin on the group. `column-gap` still applies here and is bound in the
83
+ * contract, so only the one axis moved.
84
+ *
85
+ * Not expressible in the contract. The count is an integer with no unit, the same reason a
86
+ * stacking order lives here.
87
+ */
88
+ :where([data-dds-context="marketing"]) .dds-navbarmenu .dds-navbarmenu__groups {
89
+ columns: 2;
90
+ }
91
+
92
+ /*
93
+ * The column ends where its last set ends.
94
+ *
95
+ * A set carries the space beneath it as a margin, because multi-column has no row gap to put it
96
+ * in. That is right for every set with another below it and wrong for the last one in a column,
97
+ * which has nothing to be separated from — so the panel gained a set's worth of empty space under
98
+ * its tallest column, and read as taller than its contents for a reason nothing on screen
99
+ * explained.
100
+ *
101
+ * Pulled back on the container rather than cleared on the group, because the group cannot be
102
+ * picked out: `:last-child` is the last in the DOM, which is the last in the *second* column, and
103
+ * the column that sets the height is usually the first. A negative margin on the box cancels
104
+ * whichever group happens to be last in whichever column turned out tallest.
105
+ *
106
+ * Reads its own value rather than repeating it, so retuning the step moves both halves together.
107
+ * TabList closes the seam between its rail and its bar the same way, and for the same reason: no
108
+ * contract can hold a negative dimension.
109
+ *
110
+ * Floating only, which was found rather than reasoned. The trailing margin counts towards the
111
+ * column's height here because the sets sit inside their own padding — there is a box edge after it
112
+ * for the margin to push against. Inline there is no such padding, and multi-column truncates a
113
+ * margin that ends a column, so the space this cancels was never taken in the first place: the
114
+ * cancellation landed on the picture below instead and pulled it up by a full step. The gap between
115
+ * the sets and the picture was specified at thirty-two and drawn at about eight, which is what sent
116
+ * this looking.
117
+ */
118
+ :where([data-dds-context="marketing"]) .dds-navbarmenu[data-presentation='floating'] .dds-navbarmenu__groups {
119
+ margin-block-end: calc(var(--space-gap-lg) * -1);
120
+ }
121
+
122
+ /*
123
+ * Inside the panel, a section takes the whole row.
124
+ *
125
+ * In the bar a trigger is one name among several across a line, so it is as wide as its word. In
126
+ * the panel it is one row of a list read down, and a name that stopped at its own text would leave
127
+ * the rest of the row dead: nothing to press where a reader is already aiming, and a shape that
128
+ * reads as a chip rather than as a row.
129
+ *
130
+ * The root stretches on its own — it is a flex item in the panel's column and takes the cross axis
131
+ * by default — but the trigger inside it does not: it sits on that root's main axis, where a flex
132
+ * item is as wide as its contents and nothing stretches it. So the width has to be said twice, once
133
+ * for the box and once for the control in it.
134
+ *
135
+ * `space-between` sends the chevron to the far end, which is where a list puts the mark that says a
136
+ * row opens. Against the words it reads as punctuation; against the edge it reads as an affordance,
137
+ * and it lines up with every other row's.
138
+ */
139
+ :where([data-dds-context="marketing"]) .dds-navbarmenu[data-presentation='inline'] {
140
+ inline-size: 100%;
141
+ }
142
+
143
+ :where([data-dds-context="marketing"]) .dds-navbarmenu[data-presentation='inline'] .dds-navbarmenu__trigger {
144
+ inline-size: 100%;
145
+ justify-content: space-between;
146
+ }
147
+
148
+ /*
149
+ * In the panel the surface is in the flow, which is the whole difference between the two
150
+ * presentations and was the one part of it the stylesheet never said.
151
+ *
152
+ * `position: absolute` above is right for the bar and wrong here in a way that renders as
153
+ * nothing at all: taken out of the flow, hung at `inset-block-start: 100%` from a row whose
154
+ * containing block is the panel's scrolling body, and shrink-to-fit because the width the
155
+ * floating half is given is bound to that presentation only. The trigger turned its chevron and
156
+ * reported `aria-expanded`, so every signal said the section had opened while the sets sat in a
157
+ * zero-width box under the fold. The contract has said "opens in the flow and pushes what
158
+ * follows it down" since it was written; this is the CSS finally agreeing with it.
159
+ *
160
+ * `translate: none` and not just a change of `position`, because `translate` applies to any
161
+ * element whatever its position — the -50% that centres the floating panel on its trigger would
162
+ * otherwise drag this one half its own width off the leading edge of the panel, which is the
163
+ * kind of half-fixed that looks like a different bug.
164
+ *
165
+ * The insets and the stacking order above need no undoing: `inset-*` is ignored on a static box
166
+ * and so is `z-index`. They are left where they are rather than reset here, because a rule that
167
+ * clears something already inert reads as load-bearing to whoever edits it next.
168
+ */
169
+ :where([data-dds-context="marketing"]) .dds-navbarmenu[data-presentation='inline'] .dds-navbarmenu__surface {
170
+ position: static;
171
+ translate: none;
172
+ flex-direction: column;
173
+ inline-size: 100%;
174
+ }
175
+
176
+ /*
177
+ * And the root becomes a column, so the surface lands under the trigger rather than beside it.
178
+ *
179
+ * The root is `inline-flex`, which is a row: in the bar that holds one control and the direction
180
+ * never comes up, because the panel beside it is out of the flow and takes no place in the line.
181
+ * Put the surface back in the flow without this and the two share a row — the sets appear to the
182
+ * right of the name that opened them, each squeezed to half a phone.
183
+ */
184
+ :where([data-dds-context="marketing"]) .dds-navbarmenu[data-presentation='inline'] {
185
+ flex-direction: column;
186
+ }
@@ -0,0 +1,26 @@
1
+ /* GENERATED from navbarmenugroup.contract.json. Do not edit. */
2
+
3
+ :where([data-dds-context="marketing"]) .dds-navbarmenugroup {
4
+ break-inside: avoid;
5
+ display: flex;
6
+ flex-direction: column;
7
+ min-inline-size: 0;
8
+ gap: var(--space-gap-md);
9
+ margin-block-end: var(--space-gap-lg);
10
+ }
11
+
12
+ :where([data-dds-context="marketing"]) .dds-navbarmenugroup .dds-navbarmenugroup__list {
13
+ display: flex;
14
+ flex-direction: column;
15
+ gap: var(--space-gap-md);
16
+ }
17
+
18
+ :where([data-dds-context="marketing"]) .dds-navbarmenugroup .dds-navbarmenugroup__label {
19
+ color: var(--color-fg-muted);
20
+ font-family: var(--font-label-sm-family);
21
+ font-size: var(--font-label-sm-size);
22
+ font-weight: var(--font-label-sm-weight);
23
+ letter-spacing: var(--font-label-sm-letter-spacing);
24
+ line-height: var(--font-label-sm-line-height);
25
+ }
26
+
@@ -0,0 +1,17 @@
1
+ import './NavbarMenuGroup.css';
2
+ import { type NavbarMenuGroupProps } from './NavbarMenuGroup.types.js';
3
+ export type { NavbarMenuGroupProps };
4
+ /**
5
+ * A named handful of destinations inside a section's panel.
6
+ *
7
+ * `role="group"` named through `aria-labelledby` rather than `aria-label`, so the
8
+ * word a reader sees and the name a reader hears are one string. An aria-label
9
+ * repeating the label is two copies of the same thing, and they come apart the
10
+ * first time somebody edits one of them.
11
+ *
12
+ * The label is a `<div>`. It reads as a heading and is not one: the panel is
13
+ * navigation furniture inside a page with its own outline, and an h-element here
14
+ * would put a level into that outline for a word which exists only while a panel
15
+ * is open.
16
+ */
17
+ export declare function NavbarMenuGroup({ label, children, ...rest }: NavbarMenuGroupProps): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useId } from 'react';
4
+ import './NavbarMenuGroup.css';
5
+ import { navbarMenuGroupParts } from './NavbarMenuGroup.types.js';
6
+ /**
7
+ * A named handful of destinations inside a section's panel.
8
+ *
9
+ * `role="group"` named through `aria-labelledby` rather than `aria-label`, so the
10
+ * word a reader sees and the name a reader hears are one string. An aria-label
11
+ * repeating the label is two copies of the same thing, and they come apart the
12
+ * first time somebody edits one of them.
13
+ *
14
+ * The label is a `<div>`. It reads as a heading and is not one: the panel is
15
+ * navigation furniture inside a page with its own outline, and an h-element here
16
+ * would put a level into that outline for a word which exists only while a panel
17
+ * is open.
18
+ */
19
+ export function NavbarMenuGroup({ label, children, ...rest }) {
20
+ const labelId = useId();
21
+ return (_jsxs("div", { ...rest, className: navbarMenuGroupParts.root, role: "group", "aria-labelledby": labelId, children: [_jsx("div", { id: labelId, className: navbarMenuGroupParts.label, children: label }), _jsx("div", { className: navbarMenuGroupParts.list, children: children })] }));
22
+ }
@@ -0,0 +1,14 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export interface NavbarMenuGroupOwnProps {
3
+ /** Always — it is the word over the list and the group's accessible name. Name what the set is rather than what to do with it: 'Markets', not 'Browse markets' */
4
+ label: string;
5
+ /** Allowed: Link */
6
+ children: ReactNode;
7
+ }
8
+ export type NavbarMenuGroupProps = NavbarMenuGroupOwnProps & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'label'>;
9
+ /** The class each part carries. Apply these — do not retype them. */
10
+ export declare const navbarMenuGroupParts: {
11
+ readonly root: "dds-navbarmenugroup";
12
+ readonly label: "dds-navbarmenugroup__label";
13
+ readonly list: "dds-navbarmenugroup__list";
14
+ };
@@ -0,0 +1,7 @@
1
+ // GENERATED from navbar-menu-group.contract.json. Do not edit.
2
+ /** The class each part carries. Apply these — do not retype them. */
3
+ export const navbarMenuGroupParts = {
4
+ root: 'dds-navbarmenugroup',
5
+ label: 'dds-navbarmenugroup__label',
6
+ list: 'dds-navbarmenugroup__list',
7
+ };
@@ -0,0 +1,87 @@
1
+ /* GENERATED from navbarpanel.contract.json. Do not edit. */
2
+
3
+ :where([data-dds-context="marketing"]) .dds-navbarpanel {
4
+ box-sizing: border-box;
5
+ display: flex;
6
+ flex-direction: column;
7
+ inset: 0;
8
+ position: fixed;
9
+ background-color: var(--color-bg-page);
10
+ color: var(--color-fg-default);
11
+ gap: var(--space-gap-sm);
12
+ padding-block-end: var(--space-inset-md);
13
+ padding-block-start: var(--space-inset-xs);
14
+ padding-inline: var(--space-inset-md);
15
+ }
16
+
17
+ :where([data-dds-context="marketing"]) .dds-navbarpanel .dds-navbarpanel__header {
18
+ align-items: center;
19
+ display: flex;
20
+ flex-shrink: 0;
21
+ justify-content: space-between;
22
+ gap: var(--space-gap-sm);
23
+ min-block-size: var(--size-control-md);
24
+ padding-inline: var(--space-inset-xs);
25
+ }
26
+
27
+ :where([data-dds-context="marketing"]) .dds-navbarpanel .dds-navbarpanel__mark {
28
+ align-items: center;
29
+ display: flex;
30
+ block-size: var(--icon-size-md);
31
+ gap: var(--space-gap-sm);
32
+ }
33
+
34
+ :where([data-dds-context="marketing"]) .dds-navbarpanel .dds-navbarpanel__close {
35
+ align-items: center;
36
+ appearance: none;
37
+ border-style: none;
38
+ color: inherit;
39
+ cursor: pointer;
40
+ display: inline-flex;
41
+ flex-shrink: 0;
42
+ justify-content: center;
43
+ outline-style: solid;
44
+ padding: 0;
45
+ background-color: var(--color-bg-transparent);
46
+ border-radius: var(--radius-control-sm);
47
+ min-block-size: var(--size-target-min);
48
+ min-inline-size: var(--size-target-min);
49
+ outline-width: var(--border-width-none);
50
+ }
51
+
52
+ :where([data-dds-context="marketing"]) .dds-navbarpanel .dds-navbarpanel__body {
53
+ display: flex;
54
+ flex: auto;
55
+ flex-direction: column;
56
+ min-block-size: 0;
57
+ overflow-y: auto;
58
+ position: relative;
59
+ gap: var(--space-gap-xs);
60
+ }
61
+
62
+ :where([data-dds-context="marketing"]) .dds-navbarpanel .dds-navbarpanel__destinations {
63
+ display: flex;
64
+ flex-direction: column;
65
+ gap: var(--space-gap-xs);
66
+ padding-block-start: var(--space-inset-sm);
67
+ }
68
+
69
+ :where([data-dds-context="marketing"]) .dds-navbarpanel .dds-navbarpanel__preferences {
70
+ display: flex;
71
+ flex-direction: column;
72
+ gap: var(--space-gap-xs);
73
+ }
74
+
75
+ :where([data-dds-context="marketing"]) .dds-navbarpanel .dds-navbarpanel__footer {
76
+ display: flex;
77
+ flex-direction: column;
78
+ flex-shrink: 0;
79
+ gap: var(--space-gap-sm);
80
+ padding-block-start: var(--space-inset-md);
81
+ }
82
+
83
+ :where([data-dds-context="marketing"]) .dds-navbarpanel .dds-navbarpanel__close:focus-visible {
84
+ outline-color: var(--color-border-focus);
85
+ outline-width: var(--border-width-focus);
86
+ }
87
+
@@ -0,0 +1,34 @@
1
+ import { type RefObject } from 'react';
2
+ import './NavbarPanel.css';
3
+ import './navbar-panel-impl.css';
4
+ import { type NavbarPanelProps } from './NavbarPanel.types.js';
5
+ export type { NavbarPanelProps };
6
+ /**
7
+ * What opened the panel, so focus can go back to it.
8
+ *
9
+ * Optional, and absent is not a failure: a panel opened by something that has
10
+ * since unmounted — a route change, a bar that collapsed — has nowhere to return
11
+ * focus to, and the hook declines rather than sending it to the body, which is
12
+ * the top of a document the reader had scrolled away from.
13
+ */
14
+ export interface NavbarPanelOwnerProps extends NavbarPanelProps {
15
+ openerRef?: RefObject<HTMLElement | null>;
16
+ }
17
+ /**
18
+ * The whole of a site's navigation at a width the bar cannot hold it.
19
+ *
20
+ * Rendered by Navbar rather than by a page. A page composing this itself would be
21
+ * wiring an open state to a threshold it cannot see — the bar is the thing that
22
+ * knows when its ends stopped fitting. It is contracted separately because it is
23
+ * a separate thing to judge, not a separate thing to assemble.
24
+ *
25
+ * The three obligations of a surface covering the page — focus held inside,
26
+ * Escape closing it, the document beneath holding still — are the hook's. They
27
+ * begin and end together, which is why they are one hook and not three.
28
+ *
29
+ * The `<nav>` is here, and the bar does not render its own at the widths this
30
+ * appears at. Two landmarks naming the same destinations tells a reader the site
31
+ * has two navigations, and the one they cannot see is the one they are offered
32
+ * first.
33
+ */
34
+ export declare function NavbarPanel({ label, preferences, closeLabel, onClose, brand, footer, openerRef, children, ...rest }: NavbarPanelOwnerProps): import("react").JSX.Element;
@@ -0,0 +1,46 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Children, cloneElement, isValidElement, useRef } from 'react';
4
+ import { XmarkRegularIcon } from '@deriv-com/quill-icons-web';
5
+ import './NavbarPanel.css';
6
+ import './navbar-panel-impl.css';
7
+ import { Icon } from '../icon/Icon.js';
8
+ import { NavbarMenu } from '../navbar-menu/NavbarMenu.js';
9
+ import { NavbarSwitcher } from '../navbar-switcher/NavbarSwitcher.js';
10
+ import { navbarPanelParts } from './NavbarPanel.types.js';
11
+ import { useNavbarPanel } from './use-navbar-panel.js';
12
+ /**
13
+ * The whole of a site's navigation at a width the bar cannot hold it.
14
+ *
15
+ * Rendered by Navbar rather than by a page. A page composing this itself would be
16
+ * wiring an open state to a threshold it cannot see — the bar is the thing that
17
+ * knows when its ends stopped fitting. It is contracted separately because it is
18
+ * a separate thing to judge, not a separate thing to assemble.
19
+ *
20
+ * The three obligations of a surface covering the page — focus held inside,
21
+ * Escape closing it, the document beneath holding still — are the hook's. They
22
+ * begin and end together, which is why they are one hook and not three.
23
+ *
24
+ * The `<nav>` is here, and the bar does not render its own at the widths this
25
+ * appears at. Two landmarks naming the same destinations tells a reader the site
26
+ * has two navigations, and the one they cannot see is the one they are offered
27
+ * first.
28
+ */
29
+ export function NavbarPanel({ label, preferences, closeLabel, onClose, brand, footer, openerRef, children, ...rest }) {
30
+ const panelRef = useRef(null);
31
+ const fallbackOpener = useRef(null);
32
+ useNavbarPanel({
33
+ // Always open: this component is not rendered otherwise, which is what keeps
34
+ // the bar's `aria-expanded` honest — there is no state here that could
35
+ // disagree with whether the element exists.
36
+ open: true,
37
+ panelRef,
38
+ triggerRef: openerRef ?? fallbackOpener,
39
+ onClose,
40
+ });
41
+ return (_jsxs("div", { ...rest, ref: panelRef, className: navbarPanelParts.root, children: [_jsxs("div", { className: navbarPanelParts.header, children: [brand !== undefined && brand !== null && (_jsx("div", { className: navbarPanelParts.mark, children: brand })), _jsx("button", { type: "button", className: navbarPanelParts.close, "aria-label": closeLabel, onClick: onClose, children: _jsx(Icon, { size: "md", children: _jsx(XmarkRegularIcon, {}) }) })] }), _jsxs("div", { className: navbarPanelParts.body, children: [_jsx("nav", { className: navbarPanelParts.destinations, "aria-label": label, children: Children.map(children, (child) => isValidElement(child) && child.type === NavbarMenu
42
+ ? cloneElement(child, { presentation: 'inline' })
43
+ : child) }), preferences !== undefined && preferences !== null && (_jsx("div", { className: navbarPanelParts.preferences, children: Children.map(preferences, (child) => isValidElement(child) && child.type === NavbarSwitcher
44
+ ? cloneElement(child, { presentation: 'panel' })
45
+ : child) }))] }), footer !== undefined && footer !== null && (_jsx("div", { className: navbarPanelParts.footer, children: footer }))] }));
46
+ }
@@ -0,0 +1,29 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export interface NavbarPanelOwnProps {
3
+ /** Always — it names the navigation landmark inside the panel, and this is the only one on the page while the panel is open. Name the set rather than the act: 'Main', not 'Main navigation', because the role already supplies the word */
4
+ label: string;
5
+ /** Always — it names the close button, which draws a glyph and no text and is the only visible way out of a surface covering the whole page. 'Close' is enough; what it closes is the only thing open */
6
+ closeLabel: string;
7
+ /** Always. It is called by the close button and by Escape, so whatever holds the panel open hears both ways it can be dismissed */
8
+ onClose: () => void;
9
+ /** Whatever the bar carries as its mark, passed straight through. Absent only where the bar has none either */
10
+ brand?: ReactNode;
11
+ /** The bar has switchers, which it hands over when it collapses. They are drawn under the destinations and above the foot */
12
+ preferences?: ReactNode;
13
+ /** The bar's utility end has something worth keeping at this width — the conversion, and the language or theme controls. They are drawn across the foot here rather than in a row, because there is width for one control and no room for three */
14
+ footer?: ReactNode;
15
+ /** Allowed: NavbarItem, NavbarMenu */
16
+ children: ReactNode;
17
+ }
18
+ export type NavbarPanelProps = NavbarPanelOwnProps & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'label' | 'closeLabel' | 'onClose' | 'brand' | 'preferences' | 'footer'>;
19
+ /** The class each part carries. Apply these — do not retype them. */
20
+ export declare const navbarPanelParts: {
21
+ readonly root: "dds-navbarpanel";
22
+ readonly header: "dds-navbarpanel__header";
23
+ readonly mark: "dds-navbarpanel__mark";
24
+ readonly close: "dds-navbarpanel__close";
25
+ readonly body: "dds-navbarpanel__body";
26
+ readonly destinations: "dds-navbarpanel__destinations";
27
+ readonly preferences: "dds-navbarpanel__preferences";
28
+ readonly footer: "dds-navbarpanel__footer";
29
+ };
@@ -0,0 +1,12 @@
1
+ // GENERATED from navbar-panel.contract.json. Do not edit.
2
+ /** The class each part carries. Apply these — do not retype them. */
3
+ export const navbarPanelParts = {
4
+ root: 'dds-navbarpanel',
5
+ header: 'dds-navbarpanel__header',
6
+ mark: 'dds-navbarpanel__mark',
7
+ close: 'dds-navbarpanel__close',
8
+ body: 'dds-navbarpanel__body',
9
+ destinations: 'dds-navbarpanel__destinations',
10
+ preferences: 'dds-navbarpanel__preferences',
11
+ footer: 'dds-navbarpanel__footer',
12
+ };
@@ -0,0 +1,104 @@
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
+ /*
13
+ * Above everything the page lays out, which a contract cannot hold: an integer with no
14
+ * unit.
15
+ *
16
+ * A fixed box at `z-index: auto` still loses to any positioned element painted after it,
17
+ * and this one is rendered inside a sticky bar near the top of the document — so every
18
+ * positioned section below it in source order outranks it. The failure is not subtle: a
19
+ * surface meant to cover the page has the page showing through it.
20
+ *
21
+ * `layer.overlay` is the role for what interrupts the reader, and it is the one
22
+ * BottomSheet takes. Sitting level with a sheet is correct rather than a collision: the
23
+ * two are alternatives, and a site that opened both at once has a bug this ordering would
24
+ * only hide.
25
+ */
26
+ :where([data-dds-context="marketing"]) .dds-navbarpanel {
27
+ z-index: var(--layer-overlay);
28
+ }
29
+
30
+ /*
31
+ * And whatever the slot was given fills that height, keeping its own shape.
32
+ *
33
+ * The height is bound on the part, and the part is a wrapper — so alone it would constrain a box
34
+ * around a mark that went on drawing itself at whatever size it arrived at. Quill's marks carry
35
+ * `width` and `height` attributes, and a presentation attribute is what a CSS declaration outranks.
36
+ *
37
+ * `inline-size: auto` against a bound block size is what keeps the ratio: a wordmark is three times
38
+ * wider than it is tall, and pinning both axes would letterbox it.
39
+ *
40
+ * The bar says the same thing about its own copy. Two components drawing one mark have to agree on
41
+ * its measure separately, because neither contains the other.
42
+ */
43
+ :where([data-dds-context="marketing"]) .dds-navbarpanel .dds-navbarpanel__mark > * {
44
+ align-items: center;
45
+ block-size: 100%;
46
+ display: flex;
47
+ inline-size: auto;
48
+ }
49
+
50
+ /*
51
+ * And it survives the anchor around it, which is the shape the contract asks for.
52
+ *
53
+ * The rule above reaches one level. That was enough while the slot held a mark and stopped being
54
+ * enough the moment it held the thing the guidance actually describes — "an `<a href="/">` around
55
+ * an SVG, in practice" — because the child it sizes is then the link rather than the picture. A
56
+ * link is `display: inline`, and `block-size` does not apply to a non-replaced inline box: the
57
+ * height was not overridden so much as ignored, the mark went on drawing itself at whatever size
58
+ * the page handed it, and an inline box sits on a text baseline, so it was off centre as well as
59
+ * too big.
60
+ *
61
+ * `display: flex` on the wrapper is what makes the height apply at all, and centres what is in it.
62
+ * Then the same two declarations again, one level deeper, for the mark itself.
63
+ *
64
+ * Two levels and not a descendant selector. A wrapper around the mark is the documented case and
65
+ * worth handling; anything deeper is a structure this component cannot reason about, and a rule
66
+ * that reset the size of everything inside the slot would be one that reached into a page's markup
67
+ * without knowing what it was touching.
68
+ */
69
+ :where([data-dds-context="marketing"]) .dds-navbarpanel .dds-navbarpanel__mark > * > * {
70
+ block-size: 100%;
71
+ inline-size: auto;
72
+ }
73
+
74
+ /*
75
+ * The destinations line up with the mark above them.
76
+ *
77
+ * The panel insets its contents, and a destination insets its own words on top of that — so the
78
+ * mark sat on the panel's measure and every row sat a step further in, which reads as a list that
79
+ * has been indented under a heading it does not belong to.
80
+ *
81
+ * Pulled back by exactly what a row pads itself, so the words land on the panel's own edge while
82
+ * the row keeps the padding its hover and current fills are drawn against. Clearing the padding
83
+ * instead would align the words and collapse the fills onto them.
84
+ *
85
+ * It pulls back by half what a row pads itself, not all of it, and that half is the whole argument.
86
+ *
87
+ * Pulled back by the full measure the words landed exactly under the mark — and the fill a row
88
+ * draws when it is hovered or open ran to the panel's own edge, because the row's box started
89
+ * there. An expanded section is a filled pill bleeding off both sides of the surface, which reads
90
+ * as a mistake whatever it was traded for.
91
+ *
92
+ * At half, every fill sits `space.inset.xs` inside the panel and every word sits the same step in
93
+ * from the mark. The words no longer line up with it, which is a real loss and the smaller one:
94
+ * they line up with each other, and a column of rows that agree is what a reader is actually
95
+ * scanning. Closing both would mean the panel's rows padding themselves less than the bar's do,
96
+ * which needs a presentation on NavbarItem that it does not have.
97
+ *
98
+ * Reads the step rather than repeating the number, so retuning it moves both halves together —
99
+ * the same reason TabList closes the seam between its rail and its bar this way. No contract can
100
+ * hold a negative dimension.
101
+ */
102
+ :where([data-dds-context="marketing"]) .dds-navbarpanel .dds-navbarpanel__body {
103
+ margin-inline: calc(var(--space-inset-xs) * -1);
104
+ }
@@ -0,0 +1,26 @@
1
+ import { type RefObject } from 'react';
2
+ /**
3
+ * What a surface covering the page owes the reader.
4
+ *
5
+ * Three obligations, kept together because they begin and end at the same moment
6
+ * and because separating them is how one of them gets forgotten: focus stays
7
+ * inside the panel, Escape closes it, and the document underneath holds still.
8
+ *
9
+ * Exported from the package. A site building its own covering surface needs the
10
+ * same three, and the alternative to handing them this is a fourth
11
+ * implementation with a different set of mistakes in it.
12
+ */
13
+ export interface NavbarPanelOptions {
14
+ /** Whether the panel is showing. Everything here is inert while it is not. */
15
+ open: boolean;
16
+ /** The panel element. Focus is held inside this subtree. */
17
+ panelRef: RefObject<HTMLElement | null>;
18
+ /**
19
+ * What opened the panel. Focus returns here on close — to the control the
20
+ * reader pressed, rather than to the top of a document they have not seen.
21
+ */
22
+ triggerRef: RefObject<HTMLElement | null>;
23
+ /** Called by Escape. The panel's own close button calls it directly. */
24
+ onClose: () => void;
25
+ }
26
+ export declare function useNavbarPanel({ open, panelRef, triggerRef, onClose }: NavbarPanelOptions): void;