@redocly/theme 0.15.1 → 0.17.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 (348) hide show
  1. package/lib/I18n/LanguagePicker.js +2 -1
  2. package/lib/components/Breadcrumbs/Breadcrumb.js +0 -1
  3. package/lib/components/Breadcrumbs/Breadcrumbs.js +6 -0
  4. package/lib/components/Cards/Card.d.ts +1 -0
  5. package/lib/components/Cards/Card.js +1 -1
  6. package/lib/components/Cards/CardsBlock.d.ts +1 -3
  7. package/lib/components/Cards/CardsBlock.js +2 -1
  8. package/lib/components/Catalog/Catalog.js +1 -1
  9. package/lib/components/CodeBlock/CodeBlock.d.ts +1 -3
  10. package/lib/components/CodeBlock/CodeBlock.js +2 -1
  11. package/lib/components/CodeSample/CodeSample.d.ts +2 -1
  12. package/lib/components/CodeSample/CodeSample.js +3 -2
  13. package/lib/components/ColorModeSwitcher/ColorModeSwitcher.d.ts +5 -1
  14. package/lib/components/ColorModeSwitcher/ColorModeSwitcher.js +3 -2
  15. package/lib/components/Feedback/Comment.d.ts +1 -1
  16. package/lib/components/Feedback/Comment.js +3 -3
  17. package/lib/components/Feedback/Rating.d.ts +1 -1
  18. package/lib/components/Feedback/Rating.js +2 -2
  19. package/lib/components/Feedback/Reasons.d.ts +1 -1
  20. package/lib/components/Feedback/Reasons.js +2 -2
  21. package/lib/components/Feedback/ReportDialog.js +1 -1
  22. package/lib/components/Feedback/Sentiment.d.ts +1 -1
  23. package/lib/components/Feedback/Sentiment.js +2 -2
  24. package/lib/components/Feedback/types.d.ts +5 -0
  25. package/lib/components/Footer/CustomFooter.d.ts +2 -1
  26. package/lib/components/Footer/CustomFooter.js +2 -2
  27. package/lib/components/Footer/CustomFooterNavItem.d.ts +2 -1
  28. package/lib/components/Footer/CustomFooterNavItem.js +2 -2
  29. package/lib/components/Footer/Footer.d.ts +2 -1
  30. package/lib/components/Footer/Footer.js +2 -2
  31. package/lib/components/Footer/FooterColumn.d.ts +2 -1
  32. package/lib/components/Footer/FooterColumn.js +2 -2
  33. package/lib/components/Footer/FooterColumns.d.ts +2 -1
  34. package/lib/components/Footer/FooterColumns.js +2 -2
  35. package/lib/components/Footer/FooterCopyright.d.ts +2 -1
  36. package/lib/components/Footer/FooterCopyright.js +2 -2
  37. package/lib/components/JsonViewer/JsonViewer.d.ts +1 -3
  38. package/lib/components/LastUpdated/LastUpdated.d.ts +1 -0
  39. package/lib/components/LastUpdated/LastUpdated.js +1 -1
  40. package/lib/components/Markdown/ContainerWrapper.d.ts +1 -3
  41. package/lib/components/Markdown/ContainerWrapper.js +2 -1
  42. package/lib/components/Markdown/Heading.d.ts +2 -1
  43. package/lib/components/Markdown/Heading.js +2 -2
  44. package/lib/components/Markdown/MarkdownLayout.d.ts +2 -1
  45. package/lib/components/Markdown/MarkdownLayout.js +2 -2
  46. package/lib/components/Markdown/MarkdownWrapper.d.ts +1 -3
  47. package/lib/components/Markdown/MarkdownWrapper.js +2 -1
  48. package/lib/components/Markdown/Mermaid.d.ts +2 -1
  49. package/lib/components/Markdown/Mermaid.js +3 -2
  50. package/lib/components/Markdown/PageWrapper.d.ts +1 -3
  51. package/lib/components/Markdown/PageWrapper.js +2 -1
  52. package/lib/components/Markdown/Sup.d.ts +3 -1
  53. package/lib/components/Markdown/Sup.js +2 -2
  54. package/lib/components/Menu/Menu.d.ts +3 -1
  55. package/lib/components/Menu/Menu.js +6 -4
  56. package/lib/components/Menu/MenuContainer.d.ts +1 -0
  57. package/lib/components/Menu/MenuContainer.js +2 -1
  58. package/lib/components/Menu/MenuGroup.d.ts +2 -1
  59. package/lib/components/Menu/MenuGroup.js +3 -3
  60. package/lib/components/Menu/MenuItem.d.ts +1 -1
  61. package/lib/components/Menu/MenuItem.js +19 -3
  62. package/lib/components/Menu/MenuItemLabel.d.ts +1 -3
  63. package/lib/components/Menu/MenuItemLabel.js +18 -9
  64. package/lib/components/Menu/MenuItemSwitch.js +4 -2
  65. package/lib/components/Menu/MenuLink.d.ts +1 -3
  66. package/lib/components/Menu/MenuLink.js +2 -1
  67. package/lib/components/Menu/MenuLinkItem.d.ts +1 -1
  68. package/lib/components/Menu/MenuLinkItem.js +2 -2
  69. package/lib/components/Menu/MobileMenu.d.ts +11 -0
  70. package/lib/components/Menu/MobileMenu.js +179 -0
  71. package/lib/components/Menu/MobileMenuGroup.d.ts +9 -0
  72. package/lib/components/Menu/MobileMenuGroup.js +53 -0
  73. package/lib/components/Menu/index.d.ts +1 -0
  74. package/lib/components/Menu/index.js +1 -0
  75. package/lib/components/Navbar/BurgerButton.d.ts +5 -0
  76. package/lib/components/Navbar/BurgerButton.js +29 -0
  77. package/lib/components/Navbar/MobileUserProfile.d.ts +2 -0
  78. package/lib/components/Navbar/MobileUserProfile.js +78 -0
  79. package/lib/components/Navbar/Navbar.d.ts +1 -0
  80. package/lib/components/Navbar/Navbar.js +29 -9
  81. package/lib/components/Navbar/NavbarDropdown.d.ts +2 -1
  82. package/lib/components/Navbar/NavbarDropdown.js +2 -2
  83. package/lib/components/Navbar/NavbarMenu.d.ts +2 -1
  84. package/lib/components/Navbar/NavbarMenu.js +2 -2
  85. package/lib/components/NavbarLogo/NavbarLogo.d.ts +2 -1
  86. package/lib/components/NavbarLogo/NavbarLogo.js +2 -2
  87. package/lib/components/OpenApiDocs/DevOnboardingTryItSecurity.d.ts +1 -1
  88. package/lib/components/OpenApiDocs/DevOnboardingTryItSecurity.js +1 -1
  89. package/lib/components/PageNavigation/NextButton.d.ts +2 -1
  90. package/lib/components/PageNavigation/NextButton.js +2 -2
  91. package/lib/components/PageNavigation/PageNavigation.d.ts +2 -1
  92. package/lib/components/PageNavigation/PageNavigation.js +2 -2
  93. package/lib/components/PageNavigation/PreviousButton.d.ts +2 -1
  94. package/lib/components/PageNavigation/PreviousButton.js +2 -2
  95. package/lib/components/Panel/PanelBody.d.ts +1 -3
  96. package/lib/components/Panel/PanelBody.js +2 -1
  97. package/lib/components/Panel/PanelHeader.d.ts +1 -3
  98. package/lib/components/Panel/PanelHeader.js +2 -1
  99. package/lib/components/Panel/PanelHeaderTitle.d.ts +1 -3
  100. package/lib/components/Panel/PanelHeaderTitle.js +2 -1
  101. package/lib/components/Profile/Profile.d.ts +6 -0
  102. package/lib/components/Profile/Profile.js +7 -7
  103. package/lib/components/Profile/types.d.ts +1 -0
  104. package/lib/components/SamplesPanelControls/SamplesPanelControls.d.ts +2 -6
  105. package/lib/components/SamplesPanelControls/SamplesPanelControls.js +2 -1
  106. package/lib/components/Search/CancelSearch.d.ts +2 -1
  107. package/lib/components/Search/CancelSearch.js +2 -2
  108. package/lib/components/Search/ClearIcon.d.ts +1 -3
  109. package/lib/components/Search/ClearIcon.js +2 -1
  110. package/lib/components/Search/ClockBackwardsIcon.d.ts +1 -4
  111. package/lib/components/Search/Input.d.ts +1 -3
  112. package/lib/components/Search/Input.js +2 -1
  113. package/lib/components/Search/InputWrapper.d.ts +2 -1
  114. package/lib/components/Search/InputWrapper.js +2 -2
  115. package/lib/components/Search/MobileSearchTrigger.d.ts +2 -1
  116. package/lib/components/Search/MobileSearchTrigger.js +6 -5
  117. package/lib/components/Search/Popover.d.ts +1 -3
  118. package/lib/components/Search/Popover.js +3 -2
  119. package/lib/components/Search/RecentSearches.d.ts +2 -1
  120. package/lib/components/Search/RecentSearches.js +3 -3
  121. package/lib/components/Search/Search.d.ts +3 -1
  122. package/lib/components/Search/Search.js +2 -2
  123. package/lib/components/Search/SearchDialog.d.ts +2 -1
  124. package/lib/components/Search/SearchDialog.js +4 -3
  125. package/lib/components/Search/SearchIcon.d.ts +1 -3
  126. package/lib/components/Search/SearchIcon.js +2 -1
  127. package/lib/components/Search/SearchItem.d.ts +2 -1
  128. package/lib/components/Search/SearchItem.js +3 -3
  129. package/lib/components/Search/SearchTrigger.d.ts +2 -1
  130. package/lib/components/Search/SearchTrigger.js +2 -2
  131. package/lib/components/Search/Shortcut.d.ts +2 -1
  132. package/lib/components/Search/Shortcut.js +2 -2
  133. package/lib/components/Search/ShortcutKey.d.ts +1 -0
  134. package/lib/components/Search/ShortcutKey.js +1 -1
  135. package/lib/components/Search/SidebarSearch.d.ts +1 -3
  136. package/lib/components/Search/SidebarSearch.js +2 -1
  137. package/lib/components/Search/SuggestedPages.d.ts +3 -1
  138. package/lib/components/Search/SuggestedPages.js +2 -2
  139. package/lib/components/Separator/Separator.d.ts +1 -1
  140. package/lib/components/Separator/Separator.js +2 -2
  141. package/lib/components/Separator/SeparatorItem.d.ts +1 -5
  142. package/lib/components/Separator/SeparatorItem.js +7 -2
  143. package/lib/components/Separator/SeparatorLine.d.ts +1 -3
  144. package/lib/components/Separator/SeparatorLine.js +2 -1
  145. package/lib/components/Sidebar/ApiCallItem.d.ts +1 -1
  146. package/lib/components/Sidebar/ApiCallItem.js +10 -3
  147. package/lib/components/Sidebar/BackButton.d.ts +2 -1
  148. package/lib/components/Sidebar/BackButton.js +2 -2
  149. package/lib/components/Sidebar/Drilldown.d.ts +2 -1
  150. package/lib/components/Sidebar/Drilldown.js +2 -2
  151. package/lib/components/Sidebar/DrilldownMenu.d.ts +1 -1
  152. package/lib/components/Sidebar/DrilldownMenu.js +3 -3
  153. package/lib/components/Sidebar/DrilldownMenuItem.d.ts +1 -1
  154. package/lib/components/Sidebar/DrilldownMenuItem.js +2 -2
  155. package/lib/components/Sidebar/HeaderWrapper.d.ts +1 -3
  156. package/lib/components/Sidebar/HeaderWrapper.js +2 -1
  157. package/lib/components/Sidebar/MobileSidebarButton.d.ts +1 -3
  158. package/lib/components/Sidebar/MobileSidebarButton.js +3 -2
  159. package/lib/components/Sidebar/Sidebar.d.ts +1 -3
  160. package/lib/components/Sidebar/Sidebar.js +2 -1
  161. package/lib/components/Sidebar/SidebarLayout.d.ts +2 -1
  162. package/lib/components/Sidebar/SidebarLayout.js +2 -4
  163. package/lib/components/Sidebar/types.d.ts +3 -0
  164. package/lib/components/SidebarActions/SidebarActions.d.ts +2 -1
  165. package/lib/components/SidebarActions/SidebarActions.js +2 -2
  166. package/lib/components/SidebarLogo/SidebarLogo.d.ts +2 -1
  167. package/lib/components/SidebarLogo/SidebarLogo.js +2 -2
  168. package/lib/components/TableOfContent/TableOfContent.d.ts +1 -0
  169. package/lib/components/TableOfContent/TableOfContent.js +2 -2
  170. package/lib/components/Tags/Tags.d.ts +2 -1
  171. package/lib/components/Tags/Tags.js +2 -2
  172. package/lib/components/Tiles/TileHeader.d.ts +1 -3
  173. package/lib/components/Tiles/TileHeader.js +2 -1
  174. package/lib/components/Tiles/TileText.d.ts +1 -3
  175. package/lib/components/Tiles/TileText.js +2 -1
  176. package/lib/components/Typography/CompactTypography.d.ts +1 -3
  177. package/lib/components/Typography/Emphasis.d.ts +1 -3
  178. package/lib/components/Typography/Emphasis.js +2 -1
  179. package/lib/components/Typography/H1.d.ts +1 -3
  180. package/lib/components/Typography/H1.js +2 -1
  181. package/lib/components/Typography/H2.d.ts +1 -3
  182. package/lib/components/Typography/H2.js +2 -1
  183. package/lib/components/Typography/H3.d.ts +1 -3
  184. package/lib/components/Typography/H3.js +2 -1
  185. package/lib/components/Typography/SectionHeader.d.ts +1 -3
  186. package/lib/components/Typography/SectionHeader.js +2 -1
  187. package/lib/components/Typography/Typography.d.ts +1 -3
  188. package/lib/components/Typography/Typography.js +2 -1
  189. package/lib/config.d.ts +496 -1
  190. package/lib/config.js +134 -1
  191. package/lib/globalStyle.js +62 -2
  192. package/lib/hooks/useMobileMenu.js +7 -1
  193. package/lib/icons/BurgerIcon/BurgerIcon.d.ts +5 -0
  194. package/lib/icons/BurgerIcon/BurgerIcon.js +15 -0
  195. package/lib/icons/BurgerIcon/index.d.ts +1 -0
  196. package/lib/icons/BurgerIcon/index.js +6 -0
  197. package/lib/icons/CloseIcon/CloseIcon.d.ts +5 -0
  198. package/lib/icons/CloseIcon/CloseIcon.js +16 -0
  199. package/lib/icons/CloseIcon/index.d.ts +1 -0
  200. package/lib/icons/CloseIcon/index.js +6 -0
  201. package/lib/icons/ColorModeIcon/ColorModeIcon.js +5 -1
  202. package/lib/icons/ExpandIcon/ExpandIcon.d.ts +8 -0
  203. package/lib/icons/ExpandIcon/ExpandIcon.js +31 -0
  204. package/lib/icons/ExpandIcon/index.d.ts +1 -0
  205. package/lib/icons/ExpandIcon/index.js +6 -0
  206. package/lib/icons/LogoutIcon/LogoutIcon.d.ts +5 -0
  207. package/lib/icons/LogoutIcon/LogoutIcon.js +17 -0
  208. package/lib/icons/LogoutIcon/index.d.ts +1 -0
  209. package/lib/icons/LogoutIcon/index.js +6 -0
  210. package/lib/icons/index.d.ts +4 -0
  211. package/lib/icons/index.js +4 -0
  212. package/lib/mocks/Sidebar/useSidebarItems.d.ts +3 -0
  213. package/lib/mocks/Sidebar/useSidebarItems.js +8 -0
  214. package/lib/mocks/hooks/index.d.ts +4 -1
  215. package/lib/mocks/hooks/index.js +16 -1
  216. package/lib/mocks/media-css.d.ts +5 -0
  217. package/lib/mocks/media-css.js +5 -0
  218. package/lib/ui/Dropdown.js +1 -1
  219. package/lib/ui/darkColors.js +11 -3
  220. package/package.json +5 -4
  221. package/src/I18n/LanguagePicker.tsx +2 -1
  222. package/src/components/Breadcrumbs/Breadcrumb.tsx +0 -1
  223. package/src/components/Breadcrumbs/Breadcrumbs.tsx +6 -0
  224. package/src/components/Cards/Card.tsx +2 -1
  225. package/src/components/Cards/CardsBlock.tsx +2 -1
  226. package/src/components/Catalog/Catalog.tsx +1 -1
  227. package/src/components/CodeBlock/CodeBlock.ts +2 -1
  228. package/src/components/CodeSample/CodeSample.tsx +4 -1
  229. package/src/components/ColorModeSwitcher/ColorModeSwitcher.tsx +7 -1
  230. package/src/components/Feedback/Comment.tsx +3 -3
  231. package/src/components/Feedback/Rating.tsx +2 -2
  232. package/src/components/Feedback/Reasons.tsx +6 -2
  233. package/src/components/Feedback/ReportDialog.tsx +1 -1
  234. package/src/components/Feedback/Sentiment.tsx +2 -2
  235. package/src/components/Feedback/types.ts +5 -0
  236. package/src/components/Footer/CustomFooter.tsx +3 -2
  237. package/src/components/Footer/CustomFooterNavItem.tsx +3 -2
  238. package/src/components/Footer/Footer.tsx +3 -1
  239. package/src/components/Footer/FooterColumn.tsx +3 -2
  240. package/src/components/Footer/FooterColumns.tsx +3 -2
  241. package/src/components/Footer/FooterCopyright.tsx +6 -1
  242. package/src/components/LastUpdated/LastUpdated.tsx +2 -0
  243. package/src/components/Markdown/ContainerWrapper.tsx +2 -1
  244. package/src/components/Markdown/Heading.tsx +3 -1
  245. package/src/components/Markdown/MarkdownLayout.tsx +3 -1
  246. package/src/components/Markdown/MarkdownWrapper.tsx +2 -1
  247. package/src/components/Markdown/Mermaid.tsx +5 -1
  248. package/src/components/Markdown/PageWrapper.tsx +2 -1
  249. package/src/components/Markdown/Sup.tsx +9 -2
  250. package/src/components/Menu/Menu.tsx +16 -5
  251. package/src/components/Menu/MenuContainer.tsx +3 -1
  252. package/src/components/Menu/MenuGroup.tsx +4 -5
  253. package/src/components/Menu/MenuItem.tsx +22 -4
  254. package/src/components/Menu/MenuItemLabel.tsx +19 -10
  255. package/src/components/Menu/MenuItemSwitch.tsx +7 -5
  256. package/src/components/Menu/MenuLink.tsx +2 -1
  257. package/src/components/Menu/MenuLinkItem.tsx +2 -1
  258. package/src/components/Menu/MobileMenu.tsx +209 -0
  259. package/src/components/Menu/MobileMenuGroup.tsx +73 -0
  260. package/src/components/Menu/index.ts +1 -0
  261. package/src/components/Navbar/BurgerButton.tsx +34 -0
  262. package/src/components/Navbar/MobileUserProfile.tsx +90 -0
  263. package/src/components/Navbar/Navbar.tsx +43 -14
  264. package/src/components/Navbar/NavbarDropdown.tsx +3 -2
  265. package/src/components/Navbar/NavbarMenu.tsx +8 -2
  266. package/src/components/NavbarLogo/NavbarLogo.tsx +11 -3
  267. package/src/components/OpenApiDocs/DevOnboardingTryItSecurity.tsx +2 -4
  268. package/src/components/PageNavigation/NextButton.tsx +3 -1
  269. package/src/components/PageNavigation/PageNavigation.tsx +10 -2
  270. package/src/components/PageNavigation/PreviousButton.tsx +3 -1
  271. package/src/components/Panel/PanelBody.ts +2 -1
  272. package/src/components/Panel/PanelHeader.ts +2 -1
  273. package/src/components/Panel/PanelHeaderTitle.ts +2 -1
  274. package/src/components/Profile/Profile.tsx +2 -2
  275. package/src/components/Profile/types.ts +1 -0
  276. package/src/components/SamplesPanelControls/SamplesPanelControls.ts +6 -3
  277. package/src/components/Search/CancelSearch.tsx +8 -2
  278. package/src/components/Search/ClearIcon.tsx +2 -1
  279. package/src/components/Search/ClockBackwardsIcon.tsx +1 -1
  280. package/src/components/Search/Input.tsx +2 -1
  281. package/src/components/Search/InputWrapper.tsx +3 -1
  282. package/src/components/Search/MobileSearchTrigger.tsx +16 -5
  283. package/src/components/Search/Popover.tsx +3 -2
  284. package/src/components/Search/RecentSearches.tsx +9 -3
  285. package/src/components/Search/Search.tsx +2 -2
  286. package/src/components/Search/SearchDialog.tsx +10 -3
  287. package/src/components/Search/SearchIcon.tsx +2 -1
  288. package/src/components/Search/SearchItem.tsx +4 -1
  289. package/src/components/Search/SearchTrigger.tsx +8 -2
  290. package/src/components/Search/Shortcut.tsx +3 -1
  291. package/src/components/Search/ShortcutKey.tsx +2 -1
  292. package/src/components/Search/SidebarSearch.tsx +2 -1
  293. package/src/components/Search/SuggestedPages.tsx +2 -2
  294. package/src/components/Separator/Separator.tsx +2 -2
  295. package/src/components/Separator/SeparatorItem.tsx +11 -4
  296. package/src/components/Separator/SeparatorLine.tsx +2 -1
  297. package/src/components/Sidebar/ApiCallItem.tsx +12 -4
  298. package/src/components/Sidebar/BackButton.tsx +3 -1
  299. package/src/components/Sidebar/Drilldown.tsx +3 -1
  300. package/src/components/Sidebar/DrilldownMenu.tsx +3 -2
  301. package/src/components/Sidebar/DrilldownMenuItem.tsx +2 -2
  302. package/src/components/Sidebar/HeaderWrapper.tsx +2 -1
  303. package/src/components/Sidebar/MobileSidebarButton.tsx +3 -2
  304. package/src/components/Sidebar/Sidebar.tsx +2 -1
  305. package/src/components/Sidebar/SidebarLayout.tsx +3 -4
  306. package/src/components/Sidebar/types.ts +3 -0
  307. package/src/components/SidebarActions/SidebarActions.tsx +3 -0
  308. package/src/components/SidebarLogo/SidebarLogo.tsx +3 -0
  309. package/src/components/TableOfContent/TableOfContent.tsx +3 -2
  310. package/src/components/Tags/Tags.tsx +2 -2
  311. package/src/components/Tiles/TileHeader.ts +2 -1
  312. package/src/components/Tiles/TileText.tsx +2 -1
  313. package/src/components/Typography/Emphasis.ts +2 -1
  314. package/src/components/Typography/H1.ts +2 -1
  315. package/src/components/Typography/H2.ts +2 -1
  316. package/src/components/Typography/H3.ts +2 -1
  317. package/src/components/Typography/SectionHeader.ts +2 -1
  318. package/src/components/Typography/Typography.ts +2 -1
  319. package/src/config.ts +150 -1
  320. package/src/globalStyle.ts +66 -3
  321. package/src/hooks/useMobileMenu.ts +5 -1
  322. package/src/icons/BurgerIcon/BurgerIcon.tsx +12 -0
  323. package/src/icons/BurgerIcon/index.ts +1 -0
  324. package/src/icons/CloseIcon/CloseIcon.tsx +13 -0
  325. package/src/icons/CloseIcon/index.ts +1 -0
  326. package/src/icons/ColorModeIcon/ColorModeIcon.tsx +5 -1
  327. package/src/icons/ExpandIcon/ExpandIcon.tsx +46 -0
  328. package/src/icons/ExpandIcon/index.ts +1 -0
  329. package/src/icons/LogoutIcon/LogoutIcon.tsx +20 -0
  330. package/src/icons/LogoutIcon/index.ts +1 -0
  331. package/src/icons/index.ts +4 -0
  332. package/src/mocks/Sidebar/useSidebarItems.tsx +7 -0
  333. package/src/mocks/hooks/index.ts +16 -1
  334. package/src/mocks/media-css.ts +1 -0
  335. package/src/ui/Dropdown.tsx +1 -1
  336. package/src/ui/darkColors.tsx +11 -3
  337. package/lib/components/Navbar/MobileNavbarDropdown.d.ts +0 -8
  338. package/lib/components/Navbar/MobileNavbarDropdown.js +0 -30
  339. package/lib/components/Navbar/MobileNavbarItem.d.ts +0 -15
  340. package/lib/components/Navbar/MobileNavbarItem.js +0 -110
  341. package/lib/components/Navbar/MobileNavbarMenu.d.ts +0 -6
  342. package/lib/components/Navbar/MobileNavbarMenu.js +0 -92
  343. package/lib/components/Navbar/MobileNavbarMenuButton.d.ts +0 -4
  344. package/lib/components/Navbar/MobileNavbarMenuButton.js +0 -18
  345. package/src/components/Navbar/MobileNavbarDropdown.tsx +0 -37
  346. package/src/components/Navbar/MobileNavbarItem.tsx +0 -121
  347. package/src/components/Navbar/MobileNavbarMenu.tsx +0 -111
  348. package/src/components/Navbar/MobileNavbarMenuButton.tsx +0 -13
@@ -8,8 +8,9 @@ export interface PanelHeaderProps {
8
8
  toggle?: (e: BaseSyntheticEvent) => void;
9
9
  }
10
10
 
11
- export const PanelHeader = styled.div.attrs(() => ({
11
+ export const PanelHeader = styled.div.attrs<{ className?: string }>(({ className }) => ({
12
12
  'data-component-name': 'Panel/PanelHeader',
13
+ className,
13
14
  }))<PanelHeaderProps>`
14
15
  position: relative;
15
16
  z-index: 1;
@@ -1,7 +1,8 @@
1
1
  import styled from 'styled-components';
2
2
 
3
- export const PanelHeaderTitle = styled.span.attrs(() => ({
3
+ export const PanelHeaderTitle = styled.span.attrs<{ className?: string }>(({ className }) => ({
4
4
  'data-component-name': 'Panel/PanelHeaderTitle',
5
+ className,
5
6
  }))`
6
7
  margin-right: 5px;
7
8
  font-weight: var(--panel-heading-font-weight-local);
@@ -44,7 +44,7 @@ function ProfileComponent({ name = 'User', imageUrl, onClick, color }: ProfilePr
44
44
 
45
45
  export const Profile = memo<ProfileProps>(ProfileComponent);
46
46
 
47
- const ProfileWrapper = styled.div.attrs(() => ({
47
+ export const ProfileWrapper = styled.div.attrs(() => ({
48
48
  'data-component-name': 'Profile/Profile',
49
49
  }))`
50
50
  display: flex;
@@ -69,7 +69,7 @@ const StyledUserName = styled.span`
69
69
  }
70
70
  `;
71
71
 
72
- const AvatarWrapper = styled.div<{ background?: string }>`
72
+ export const AvatarWrapper = styled.div<{ background?: string }>`
73
73
  width: var(--profile-avatar-width);
74
74
  height: var(--profile-avatar-height);
75
75
  display: flex;
@@ -8,4 +8,5 @@ export interface UserProfileProps {
8
8
  handleLogout: (logoutRedirect?: string) => void;
9
9
  hasDeveloperOnboarding?: boolean;
10
10
  loginUrl?: string;
11
+ className?: string;
11
12
  }
@@ -2,9 +2,12 @@ import styled from 'styled-components';
2
2
 
3
3
  import { CodeBlock } from '@theme/components/CodeBlock';
4
4
 
5
- export const SamplesControlButton = styled.button.attrs(() => ({
6
- 'data-component-name': 'SamplesPanelControls/SamplesPanelControls',
7
- }))`
5
+ export const SamplesControlButton = styled.button.attrs<{ className?: string }>(
6
+ ({ className }) => ({
7
+ 'data-component-name': 'SamplesPanelControls/SamplesPanelControls',
8
+ className: className,
9
+ }),
10
+ )`
8
11
  background-color: var(--panel-samples-controls-background-color);
9
12
  border: 0;
10
13
  outline: 0;
@@ -3,14 +3,20 @@ import styled from 'styled-components';
3
3
 
4
4
  import { useTranslate } from '@theme/mocks/hooks';
5
5
 
6
- export function CancelSearch({ onClick }: { onClick: () => void }): JSX.Element {
6
+ export function CancelSearch({
7
+ onClick,
8
+ className,
9
+ }: {
10
+ onClick: () => void;
11
+ className?: string;
12
+ }): JSX.Element {
7
13
  const { translate } = useTranslate();
8
14
  const translationKeys = {
9
15
  cancel: 'theme.search.cancel',
10
16
  };
11
17
 
12
18
  return (
13
- <Wrapper data-component-name="Search/CancelSearch" onClick={onClick}>
19
+ <Wrapper data-component-name="Search/CancelSearch" onClick={onClick} className={className}>
14
20
  <Button data-translation-keys={translationKeys.cancel}>
15
21
  {translate(translationKeys.cancel, 'Cancel')}
16
22
  </Button>
@@ -17,8 +17,9 @@ const Icon = (props: SVGProps<SVGSVGElement>) => (
17
17
  </svg>
18
18
  );
19
19
 
20
- export const ClearIcon = styled(Icon).attrs(() => ({
20
+ export const ClearIcon = styled(Icon).attrs<{ className?: string }>(({ className }) => ({
21
21
  'data-component-name': 'Search/ClearIcon',
22
+ className,
22
23
  }))`
23
24
  cursor: pointer;
24
25
  width: 0.5em;
@@ -10,7 +10,7 @@ const Icon = (props: SVGProps<SVGSVGElement>) => (
10
10
  </svg>
11
11
  );
12
12
 
13
- export const ClockBackwardsIcon = styled(Icon).attrs(({ className }: { className?: string }) => ({
13
+ export const ClockBackwardsIcon = styled(Icon).attrs<{ className?: string }>(({ className }) => ({
14
14
  'data-component-name': 'Search/RecentlyViewedIcon',
15
15
  className,
16
16
  }))`
@@ -1,7 +1,8 @@
1
1
  import styled from 'styled-components';
2
2
 
3
- export const FormInput = styled.input.attrs(() => ({
3
+ export const FormInput = styled.input.attrs<{ className?: string }>(({ className }) => ({
4
4
  'data-component-name': 'Search/Input',
5
+ className,
5
6
  }))`
6
7
  padding: 1em 2.5em 1em 2.5em;
7
8
  background-color: var(--search-input-background-color);
@@ -14,6 +14,7 @@ interface InputWrapperProps {
14
14
  change(value: string): void;
15
15
  inputRef?: React.RefObject<HTMLInputElement>;
16
16
  isLoading: boolean;
17
+ className?: string;
17
18
  }
18
19
 
19
20
  export function InputWrapper({
@@ -21,6 +22,7 @@ export function InputWrapper({
21
22
  value,
22
23
  change,
23
24
  isLoading,
25
+ className,
24
26
  }: InputWrapperProps): JSX.Element {
25
27
  const [isFocused, setIsFocused] = useState(false);
26
28
 
@@ -45,7 +47,7 @@ export function InputWrapper({
45
47
  };
46
48
 
47
49
  return (
48
- <Wrapper data-component-name="Search/InputContainer">
50
+ <Wrapper data-component-name="Search/InputContainer" className={className}>
49
51
  {isFocused && isLoading ? <SpinnerIcon /> : <SearchIcon />}
50
52
  <FormInput
51
53
  value={value}
@@ -3,23 +3,34 @@ import styled from 'styled-components';
3
3
 
4
4
  import { SearchIcon as ThemeSearchIcon } from '@theme/components/Search/SearchIcon';
5
5
 
6
- export function MobileSearchTrigger({ onClick }: { onClick: () => void }): JSX.Element {
6
+ export function MobileSearchTrigger({
7
+ onClick,
8
+ className,
9
+ }: {
10
+ onClick: () => void;
11
+ className?: string;
12
+ }): JSX.Element {
7
13
  return (
8
- <Wrapper data-component-name="Search/MobileSearchTrigger" onClick={onClick}>
14
+ <Wrapper
15
+ data-component-name="Search/MobileSearchTrigger"
16
+ onClick={onClick}
17
+ className={className}
18
+ >
9
19
  <SearchIcon />
10
20
  </Wrapper>
11
21
  );
12
22
  }
13
23
 
14
24
  const SearchIcon = styled(ThemeSearchIcon)`
15
- width: 20px;
16
- height: 20px;
17
- fill: #8d8d8d;
25
+ width: var(--mobile-menu-search-icon-size);
26
+ height: var(--mobile-menu-search-icon-size);
27
+ fill: var(--navbar-text-color);
18
28
  `;
19
29
 
20
30
  const Wrapper = styled.div`
21
31
  display: block;
22
32
  user-select: none;
33
+ height: var(--mobile-menu-search-icon-size);
23
34
 
24
35
  ${({ theme }) => theme.mediaQueries.small} {
25
36
  display: none;
@@ -1,12 +1,13 @@
1
1
  import styled from 'styled-components';
2
2
 
3
- export const Popover = styled.div.attrs(() => ({
3
+ export const Popover = styled.div.attrs<{ className?: string }>(({ className }) => ({
4
4
  'data-component-name': 'Search/Popover',
5
+ className,
5
6
  }))`
6
7
  position: absolute;
7
8
  top: calc(100% + 10px);
8
9
  right: 0;
9
- z-index: 100;
10
+ z-index: var(--z-index-raised);
10
11
  min-width: 100%;
11
12
  max-width: 90vw;
12
13
  max-height: 400px;
@@ -6,7 +6,13 @@ import { ClearIcon as ThemeClearIcon } from '@theme/components/Search/ClearIcon'
6
6
  import { useRecentSearches } from '@portal/search';
7
7
  import { useTranslate } from '@portal/hooks';
8
8
 
9
- export function RecentSearches({ onSelect }: { onSelect: (value: string) => void }) {
9
+ export function RecentSearches({
10
+ onSelect,
11
+ className,
12
+ }: {
13
+ onSelect: (value: string) => void;
14
+ className?: string;
15
+ }) {
10
16
  const { items, removeSearchHistoryItem } = useRecentSearches();
11
17
  const { translate } = useTranslate();
12
18
  const translationKeys = {
@@ -27,7 +33,7 @@ export function RecentSearches({ onSelect }: { onSelect: (value: string) => void
27
33
  };
28
34
 
29
35
  return (
30
- <Wrapper data-component-name="Search/RecentSearches">
36
+ <Wrapper data-component-name="Search/RecentSearches" className={className}>
31
37
  <Title data-translation-key={translationKeys.title}>
32
38
  {translate(translationKeys.title, 'Recent searches')}
33
39
  </Title>
@@ -82,7 +88,7 @@ const ClearIcon = styled(ThemeClearIcon)`
82
88
  display: inline;
83
89
  width: 10px;
84
90
  height: 10px;
85
- fill: var(--search-item-active-text-color))
91
+ fill: var(--search-item-active-text-color);
86
92
  `;
87
93
 
88
94
  const Item = styled.div`
@@ -8,7 +8,7 @@ import { MobileSearchTrigger } from '@theme/components/Search/MobileSearchTrigge
8
8
  import { SearchDialog } from '@theme/components/Search/SearchDialog';
9
9
  import { useThemeConfig } from '@theme/hooks';
10
10
 
11
- export function Search(): JSX.Element {
11
+ export function Search({ className }: { className?: string }): JSX.Element {
12
12
  const [isOpen, setIsOpen] = useState(false);
13
13
  const themeSettings = useThemeConfig();
14
14
  const location = useLocation();
@@ -33,7 +33,7 @@ export function Search(): JSX.Element {
33
33
  useEffect(onClose, [location, onClose]);
34
34
 
35
35
  return (
36
- <Wrapper data-component-name="Search/Search">
36
+ <Wrapper data-component-name="Search/Search" className={className}>
37
37
  <SearchTrigger onClick={() => setIsOpen(true)} />
38
38
  <MobileSearchTrigger onClick={() => setIsOpen(true)} />
39
39
 
@@ -3,6 +3,7 @@ import styled from 'styled-components';
3
3
 
4
4
  import type { MouseEvent } from 'react';
5
5
 
6
+ import { concatClassNames } from '@theme/utils';
6
7
  import { useFuseSearch } from '@portal/search';
7
8
  import { InputWrapper } from '@theme/components/Search/InputWrapper';
8
9
  import { SearchItem } from '@theme/components/Search/SearchItem';
@@ -14,7 +15,13 @@ import { SuggestedPages } from '@theme/components/Search/SuggestedPages';
14
15
  import { CancelSearch } from '@theme/components/Search/CancelSearch';
15
16
  import { useDialogHotKeys } from '@theme/hooks/useDialogHotKeys';
16
17
 
17
- export const SearchDialog = ({ onClose }: { onClose: () => void }): JSX.Element => {
18
+ export const SearchDialog = ({
19
+ onClose,
20
+ className,
21
+ }: {
22
+ onClose: () => void;
23
+ className?: string;
24
+ }): JSX.Element => {
18
25
  const { query, setQuery, items, isLoading } = useFuseSearch();
19
26
  const modalRef = useRef<HTMLDivElement>(null);
20
27
  const { translate } = useTranslate();
@@ -45,7 +52,7 @@ export const SearchDialog = ({ onClose }: { onClose: () => void }): JSX.Element
45
52
  data-component-name="Search/SearchDialog"
46
53
  ref={modalRef}
47
54
  onClick={handleOverlayClick}
48
- className="overlay"
55
+ className={concatClassNames('overlay', className)}
49
56
  >
50
57
  <Container>
51
58
  <TopContainer>
@@ -105,7 +112,7 @@ const Overlay = styled.div`
105
112
  width: 100vw;
106
113
  height: 100vh;
107
114
  background: var(--modal-overlay-background-color);
108
- z-index: 10000;
115
+ z-index: var(--z-index-overlay);
109
116
  display: flex;
110
117
  align-items: center;
111
118
  justify-content: center;
@@ -17,8 +17,9 @@ const Icon = (props: SVGProps<SVGSVGElement>) => (
17
17
  </svg>
18
18
  );
19
19
 
20
- export const SearchIcon = styled(Icon).attrs(() => ({
20
+ export const SearchIcon = styled(Icon).attrs<{ className?: string }>(({ className }) => ({
21
21
  'data-component-name': 'Search/SearchIcon',
22
+ className,
22
23
  }))`
23
24
  cursor: pointer;
24
25
  width: 1em;
@@ -9,9 +9,10 @@ import type { SearchDocument } from '@theme/types/portal/src/shared/types/search
9
9
 
10
10
  interface SearchItemProps {
11
11
  item: ActiveItem<SearchDocument>;
12
+ className?: string;
12
13
  }
13
14
 
14
- export function SearchItem({ item }: SearchItemProps): JSX.Element {
15
+ export function SearchItem({ item, className }: SearchItemProps): JSX.Element {
15
16
  const ref = useRef<HTMLAnchorElement>();
16
17
 
17
18
  useEffect(() => {
@@ -43,6 +44,7 @@ export function SearchItem({ item }: SearchItemProps): JSX.Element {
43
44
  }`;
44
45
  return (
45
46
  <SearchLink
47
+ className={className}
46
48
  key={`${item.id}-${index}`}
47
49
  to={item.url}
48
50
  tabIndex={0}
@@ -63,6 +65,7 @@ export function SearchItem({ item }: SearchItemProps): JSX.Element {
63
65
  </>
64
66
  ) : (
65
67
  <SearchLink
68
+ className={className}
66
69
  to={item.url}
67
70
  tabIndex={0}
68
71
  innerRef={ref}
@@ -6,7 +6,13 @@ import { useTranslate } from '@portal/hooks';
6
6
  import { SearchIcon } from '@theme/components/Search/SearchIcon';
7
7
  import { ShortcutKey } from '@theme/components/Search/ShortcutKey';
8
8
 
9
- export function SearchTrigger({ onClick }: { onClick: () => void }): JSX.Element {
9
+ export function SearchTrigger({
10
+ onClick,
11
+ className,
12
+ }: {
13
+ onClick: () => void;
14
+ className?: string;
15
+ }): JSX.Element {
10
16
  const themeSettings = useThemeConfig();
11
17
  const { translate } = useTranslate();
12
18
  const translationKeys = {
@@ -15,7 +21,7 @@ export function SearchTrigger({ onClick }: { onClick: () => void }): JSX.Element
15
21
  const keyShortcuts = themeSettings?.search?.shortcuts ?? ['/'];
16
22
 
17
23
  return (
18
- <Wrapper data-component-name="Search/SearchTrigger" onClick={onClick}>
24
+ <Wrapper data-component-name="Search/SearchTrigger" onClick={onClick} className={className}>
19
25
  <SearchIconSmall />
20
26
  <Label data-translation-key={translationKeys.label}>
21
27
  {translate(translationKeys.label, 'Search')}
@@ -4,12 +4,14 @@ import styled from 'styled-components';
4
4
  export function Shortcut({
5
5
  combination,
6
6
  text,
7
+ className,
7
8
  }: {
8
9
  combination: string;
9
10
  text: string;
11
+ className?: string;
10
12
  }): JSX.Element {
11
13
  return (
12
- <Wrapper data-component-name="Search/Shortcut">
14
+ <Wrapper data-component-name="Search/Shortcut" className={className}>
13
15
  <Key>{combination}</Key>
14
16
  {text}
15
17
  </Wrapper>
@@ -3,6 +3,7 @@ import styled from 'styled-components';
3
3
 
4
4
  interface ShortcutKeyProps {
5
5
  keyShortcuts?: string | string[];
6
+ className?: string;
6
7
  }
7
8
 
8
9
  export function ShortcutKey(props: ShortcutKeyProps): JSX.Element {
@@ -18,7 +19,7 @@ export function ShortcutKey(props: ShortcutKeyProps): JSX.Element {
18
19
 
19
20
  mainShortcutKey = mainShortcutKey?.toUpperCase();
20
21
 
21
- return <Wrapper>{mainShortcutKey}</Wrapper>;
22
+ return <Wrapper className={props.className}>{mainShortcutKey}</Wrapper>;
22
23
  }
23
24
 
24
25
  export const Wrapper = styled.div`
@@ -3,8 +3,9 @@ import styled from 'styled-components';
3
3
  import { Search } from '@theme/components/Search/Search';
4
4
  import { Popover } from '@theme/components/Search/Popover';
5
5
 
6
- export const SidebarSearch = styled(Search).attrs(() => ({
6
+ export const SidebarSearch = styled(Search).attrs<{ className?: string }>(({ className }) => ({
7
7
  'data-component-name': 'Search/SidebarSearch',
8
+ className,
8
9
  }))`
9
10
  --search-input-text-color: var(--sidebar-item-active-color);
10
11
 
@@ -6,7 +6,7 @@ import { useSuggestedPages } from '@portal/search';
6
6
  import { Link } from '@portal/Link';
7
7
  import { useTranslate } from '@portal/hooks';
8
8
 
9
- export function SuggestedPages() {
9
+ export function SuggestedPages({ className }: { className?: string }) {
10
10
  const pages = useSuggestedPages();
11
11
  const { translate } = useTranslate();
12
12
  const translationKeys = {
@@ -16,7 +16,7 @@ export function SuggestedPages() {
16
16
  if (!pages.length) return null;
17
17
 
18
18
  return (
19
- <Wrapper data-component-name="Search/SuggestedPages">
19
+ <Wrapper data-component-name="Search/SuggestedPages" className={className}>
20
20
  <Title data-translation-key={translationKeys.title}>
21
21
  {translate(translationKeys.title, 'Suggested pages')}
22
22
  </Title>
@@ -6,11 +6,11 @@ import { SeparatorItem } from '@theme/components/Separator/SeparatorItem';
6
6
  import type { MenuItemProps } from '@theme/components/Sidebar/types';
7
7
  import { useTranslate } from '@portal/hooks';
8
8
 
9
- export function Separator({ item }: MenuItemProps): JSX.Element {
9
+ export function Separator({ item, className }: MenuItemProps): JSX.Element {
10
10
  const { translate } = useTranslate();
11
11
 
12
12
  return (
13
- <Wrapper data-component-name="Sidebar/Separator">
13
+ <Wrapper data-component-name="Sidebar/Separator" className={className}>
14
14
  <SeparatorItem>{translate(item.labelTranslationKey, item.label)}</SeparatorItem>
15
15
  {item.separatorLine ? <SeparatorLine /> : null}
16
16
  </Wrapper>
@@ -2,16 +2,23 @@ import styled from 'styled-components';
2
2
 
3
3
  import { MenuItemLabel } from '@theme/components/Menu/MenuItemLabel';
4
4
 
5
- export const SeparatorItem = styled(MenuItemLabel).attrs(() => ({
6
- 'data-component-name': 'Sidebar/SeparatorItem',
7
- }))`
5
+ export const SeparatorItem = styled(MenuItemLabel).attrs<{ className?: string }>(
6
+ ({ className }) => ({
7
+ 'data-component-name': 'Sidebar/SeparatorItem',
8
+ className,
9
+ }),
10
+ )`
8
11
  cursor: default;
9
12
  font-weight: var(--font-weight-bold);
10
13
  color: var(--sidebar-separator-item-color);
11
14
  font-family: var(--sidebar-item-separator-font-family);
12
15
  font-size: var(--sidebar-item-separator-font-size);
13
16
  text-transform: var(--sidebar-item-separator-text-transform);
14
- background: var(--sidebar-item-separator-background-color);
17
+ background: var(--mobile-menu-background);
18
+
19
+ ${({ theme }) => theme.mediaQueries.medium} {
20
+ background: var(--sidebar-item-separator-background-color);
21
+ }
15
22
 
16
23
  *:not(:first-child) > & {
17
24
  margin-top: var(--sidebar-item-separator-offset);
@@ -1,7 +1,8 @@
1
1
  import styled from 'styled-components';
2
2
 
3
- export const SeparatorLine = styled.div.attrs(() => ({
3
+ export const SeparatorLine = styled.div.attrs<{ className?: string }>(({ className }) => ({
4
4
  'data-component-name': 'Sidebar/SeparatorLine',
5
+ className,
5
6
  }))`
6
7
  height: 1px;
7
8
  background-color: var(--sidebar-item-separator-line-color);
@@ -7,16 +7,16 @@ import { SeparatorLine } from '@theme/components/Separator/SeparatorLine';
7
7
  import { MenuItemLabel } from '@theme/components/Menu/MenuItemLabel';
8
8
  import type { MenuItemProps } from '@theme/components/Sidebar/types';
9
9
 
10
- export function ApiCallItem({ item }: MenuItemProps): JSX.Element {
10
+ export function ApiCallItem({ item, className }: MenuItemProps): JSX.Element {
11
11
  return (
12
- <Wrapper data-component-name="Sidebar/ApiCallItem">
12
+ <Wrapper data-component-name="Sidebar/ApiCallItem" className={className}>
13
13
  <MenuLinkItem item={item}>
14
- <MenuItemLabel active={item.active}>
14
+ <Label active={item.active}>
15
15
  <Badge type={item.httpVerb || ''}>
16
16
  {item.httpVerb === 'hook' ? 'event' : item.httpVerb}
17
17
  </Badge>
18
18
  {item.label}
19
- </MenuItemLabel>
19
+ </Label>
20
20
  </MenuLinkItem>
21
21
 
22
22
  {item.separatorLine ? <SeparatorLine /> : null}
@@ -24,6 +24,14 @@ export function ApiCallItem({ item }: MenuItemProps): JSX.Element {
24
24
  );
25
25
  }
26
26
 
27
+ const Label = styled(MenuItemLabel)`
28
+ color: var(--mobile-menu-item-text-color);
29
+
30
+ ${({ theme }) => theme.mediaQueries.medium} {
31
+ color: var(--sidebar-item-text-color);
32
+ }
33
+ `;
34
+
27
35
  const Wrapper = styled.div``;
28
36
 
29
37
  export const Badge = styled(OperationBadge)`
@@ -5,14 +5,16 @@ import { ArrowBack } from '@theme/ui/ArrowBack';
5
5
 
6
6
  interface BackButtonProps {
7
7
  back: () => void;
8
+ className?: string;
8
9
  }
9
10
 
10
11
  export function BackButton({
11
12
  children,
12
13
  back,
14
+ className,
13
15
  }: React.PropsWithChildren<BackButtonProps>): JSX.Element {
14
16
  return (
15
- <Button onClick={back} data-component-name="Sidebar/BackButton">
17
+ <Button onClick={back} data-component-name="Sidebar/BackButton" className={className}>
16
18
  <ArrowBack dataComponentName="Sidebar/ArrowBack" />
17
19
  {children}
18
20
  </Button>
@@ -10,16 +10,18 @@ import type { DrilldownMenuProps } from '@theme/components/Sidebar/types';
10
10
  interface DrilldownProps extends DrilldownMenuProps {
11
11
  isExpanded: boolean;
12
12
  expand: () => void;
13
+ className?: string;
13
14
  }
14
15
 
15
16
  export function Drilldown({
16
17
  isExpanded,
17
18
  item,
18
19
  expand,
20
+ className,
19
21
  ...props
20
22
  }: React.PropsWithChildren<DrilldownProps>): JSX.Element {
21
23
  return (
22
- <Wrapper data-component-name="Sidebar/Drilldown">
24
+ <Wrapper data-component-name="Sidebar/Drilldown" className={className}>
23
25
  <DrilldownLabel onClick={expand}>
24
26
  <DrilldownMenuItem item={item} />
25
27
  </DrilldownLabel>
@@ -11,13 +11,14 @@ export function DrilldownMenu({
11
11
  back,
12
12
  prevActiveItem,
13
13
  children,
14
+ className,
14
15
  }: React.PropsWithChildren<DrilldownMenuProps>): JSX.Element {
15
16
  const { translate } = useTranslate();
16
17
  const translationKeys = {
17
18
  backLabel: 'theme.sidebar.menu.backLabel',
18
19
  };
19
20
  return (
20
- <MenuContainer data-component-name="Sidebar/DrilldownMenu">
21
+ <MenuContainer data-component-name="Sidebar/DrilldownMenu" className={className}>
21
22
  <MenuContent>
22
23
  <MenuWrapper>
23
24
  <BackButton back={back} data-translation-key={translationKeys.backLabel}>
@@ -37,7 +38,7 @@ const MenuContainer = styled.div`
37
38
  top: 0;
38
39
  bottom: 0;
39
40
  width: 100%;
40
- z-index: 100;
41
+ z-index: var(--z-index-raised);
41
42
  background-color: var(--sidebar-item-drilldown-background-color);
42
43
  `;
43
44
 
@@ -4,11 +4,11 @@ import styled from 'styled-components';
4
4
  import type { MenuItemProps } from '@theme/components/Sidebar/types';
5
5
  import { useTranslate } from '@portal/hooks';
6
6
 
7
- export function DrilldownMenuItem({ item }: MenuItemProps): JSX.Element {
7
+ export function DrilldownMenuItem({ item, className }: MenuItemProps): JSX.Element {
8
8
  const { translate } = useTranslate();
9
9
 
10
10
  return (
11
- <Container data-component-name="Sidebar/DrilldownMenuItem">
11
+ <Container data-component-name="Sidebar/DrilldownMenuItem" className={className}>
12
12
  {item.icon ? <Icon src={item.icon} /> : null}
13
13
  <div>
14
14
  {translate(item.labelTranslationKey, item.label)}
@@ -1,7 +1,8 @@
1
1
  import styled from 'styled-components';
2
2
 
3
- export const HeaderWrapper = styled.div.attrs(() => ({
3
+ export const HeaderWrapper = styled.div.attrs<{ className?: string }>(({ className }) => ({
4
4
  'data-component-name': 'Sidebar/HeaderWrapper',
5
+ className,
5
6
  }))`
6
7
  margin: var(--sidebar-offset-top) 0 0 var(--sidebar-offset-left);
7
8
  padding-bottom: var(--sidebar-spacing-unit);
@@ -1,7 +1,8 @@
1
1
  import styled from 'styled-components';
2
2
 
3
- export const MobileSidebarButton = styled.span.attrs(() => ({
3
+ export const MobileSidebarButton = styled.span.attrs<{ className?: string }>(({ className }) => ({
4
4
  'data-component-name': 'Sidebar/MobileSidebarButton',
5
+ className,
5
6
  }))<{ opened?: boolean }>`
6
7
  background-color: var(
7
8
  ${(props) => (props.opened ? '--fab-active-background' : '--fab-background-color')}
@@ -13,7 +14,7 @@ export const MobileSidebarButton = styled.span.attrs(() => ({
13
14
  cursor: pointer;
14
15
  position: fixed;
15
16
  right: 20px;
16
- z-index: 3;
17
+ z-index: var(--z-index-surface);
17
18
  box-shadow: ${(props) =>
18
19
  props.opened ? 'var(--fab-active-box-shadow)' : 'var(--fab-box-shadow)'};
19
20
  border-radius: 50%;
@@ -5,8 +5,9 @@ interface SidebarProps {
5
5
  animate?: boolean;
6
6
  }
7
7
 
8
- export const Sidebar = styled.aside.attrs(() => ({
8
+ export const Sidebar = styled.aside.attrs<{ className?: string }>(({ className }) => ({
9
9
  'data-component-name': 'Sidebar/Sidebar',
10
+ className,
10
11
  }))<SidebarProps>`
11
12
  border-right: 1px solid var(--sidebar-border-color);
12
13
  position: fixed;