@redocly/theme 0.15.1 → 0.16.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 (345) 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/globalStyle.js +62 -2
  190. package/lib/hooks/useMobileMenu.js +7 -1
  191. package/lib/icons/BurgerIcon/BurgerIcon.d.ts +5 -0
  192. package/lib/icons/BurgerIcon/BurgerIcon.js +15 -0
  193. package/lib/icons/BurgerIcon/index.d.ts +1 -0
  194. package/lib/icons/BurgerIcon/index.js +6 -0
  195. package/lib/icons/CloseIcon/CloseIcon.d.ts +5 -0
  196. package/lib/icons/CloseIcon/CloseIcon.js +16 -0
  197. package/lib/icons/CloseIcon/index.d.ts +1 -0
  198. package/lib/icons/CloseIcon/index.js +6 -0
  199. package/lib/icons/ColorModeIcon/ColorModeIcon.js +5 -1
  200. package/lib/icons/ExpandIcon/ExpandIcon.d.ts +8 -0
  201. package/lib/icons/ExpandIcon/ExpandIcon.js +31 -0
  202. package/lib/icons/ExpandIcon/index.d.ts +1 -0
  203. package/lib/icons/ExpandIcon/index.js +6 -0
  204. package/lib/icons/LogoutIcon/LogoutIcon.d.ts +5 -0
  205. package/lib/icons/LogoutIcon/LogoutIcon.js +17 -0
  206. package/lib/icons/LogoutIcon/index.d.ts +1 -0
  207. package/lib/icons/LogoutIcon/index.js +6 -0
  208. package/lib/icons/index.d.ts +4 -0
  209. package/lib/icons/index.js +4 -0
  210. package/lib/mocks/Sidebar/useSidebarItems.d.ts +3 -0
  211. package/lib/mocks/Sidebar/useSidebarItems.js +8 -0
  212. package/lib/mocks/hooks/index.d.ts +4 -1
  213. package/lib/mocks/hooks/index.js +16 -1
  214. package/lib/mocks/media-css.d.ts +5 -0
  215. package/lib/mocks/media-css.js +5 -0
  216. package/lib/ui/Dropdown.js +1 -1
  217. package/lib/ui/darkColors.js +11 -3
  218. package/package.json +4 -3
  219. package/src/I18n/LanguagePicker.tsx +2 -1
  220. package/src/components/Breadcrumbs/Breadcrumb.tsx +0 -1
  221. package/src/components/Breadcrumbs/Breadcrumbs.tsx +6 -0
  222. package/src/components/Cards/Card.tsx +2 -1
  223. package/src/components/Cards/CardsBlock.tsx +2 -1
  224. package/src/components/Catalog/Catalog.tsx +1 -1
  225. package/src/components/CodeBlock/CodeBlock.ts +2 -1
  226. package/src/components/CodeSample/CodeSample.tsx +4 -1
  227. package/src/components/ColorModeSwitcher/ColorModeSwitcher.tsx +7 -1
  228. package/src/components/Feedback/Comment.tsx +3 -3
  229. package/src/components/Feedback/Rating.tsx +2 -2
  230. package/src/components/Feedback/Reasons.tsx +6 -2
  231. package/src/components/Feedback/ReportDialog.tsx +1 -1
  232. package/src/components/Feedback/Sentiment.tsx +2 -2
  233. package/src/components/Feedback/types.ts +5 -0
  234. package/src/components/Footer/CustomFooter.tsx +3 -2
  235. package/src/components/Footer/CustomFooterNavItem.tsx +3 -2
  236. package/src/components/Footer/Footer.tsx +3 -1
  237. package/src/components/Footer/FooterColumn.tsx +3 -2
  238. package/src/components/Footer/FooterColumns.tsx +3 -2
  239. package/src/components/Footer/FooterCopyright.tsx +6 -1
  240. package/src/components/LastUpdated/LastUpdated.tsx +2 -0
  241. package/src/components/Markdown/ContainerWrapper.tsx +2 -1
  242. package/src/components/Markdown/Heading.tsx +3 -1
  243. package/src/components/Markdown/MarkdownLayout.tsx +3 -1
  244. package/src/components/Markdown/MarkdownWrapper.tsx +2 -1
  245. package/src/components/Markdown/Mermaid.tsx +5 -1
  246. package/src/components/Markdown/PageWrapper.tsx +2 -1
  247. package/src/components/Markdown/Sup.tsx +9 -2
  248. package/src/components/Menu/Menu.tsx +16 -5
  249. package/src/components/Menu/MenuContainer.tsx +3 -1
  250. package/src/components/Menu/MenuGroup.tsx +4 -5
  251. package/src/components/Menu/MenuItem.tsx +22 -4
  252. package/src/components/Menu/MenuItemLabel.tsx +19 -10
  253. package/src/components/Menu/MenuItemSwitch.tsx +7 -5
  254. package/src/components/Menu/MenuLink.tsx +2 -1
  255. package/src/components/Menu/MenuLinkItem.tsx +2 -1
  256. package/src/components/Menu/MobileMenu.tsx +209 -0
  257. package/src/components/Menu/MobileMenuGroup.tsx +73 -0
  258. package/src/components/Menu/index.ts +1 -0
  259. package/src/components/Navbar/BurgerButton.tsx +34 -0
  260. package/src/components/Navbar/MobileUserProfile.tsx +90 -0
  261. package/src/components/Navbar/Navbar.tsx +43 -14
  262. package/src/components/Navbar/NavbarDropdown.tsx +3 -2
  263. package/src/components/Navbar/NavbarMenu.tsx +8 -2
  264. package/src/components/NavbarLogo/NavbarLogo.tsx +11 -3
  265. package/src/components/OpenApiDocs/DevOnboardingTryItSecurity.tsx +2 -4
  266. package/src/components/PageNavigation/NextButton.tsx +3 -1
  267. package/src/components/PageNavigation/PageNavigation.tsx +10 -2
  268. package/src/components/PageNavigation/PreviousButton.tsx +3 -1
  269. package/src/components/Panel/PanelBody.ts +2 -1
  270. package/src/components/Panel/PanelHeader.ts +2 -1
  271. package/src/components/Panel/PanelHeaderTitle.ts +2 -1
  272. package/src/components/Profile/Profile.tsx +2 -2
  273. package/src/components/Profile/types.ts +1 -0
  274. package/src/components/SamplesPanelControls/SamplesPanelControls.ts +6 -3
  275. package/src/components/Search/CancelSearch.tsx +8 -2
  276. package/src/components/Search/ClearIcon.tsx +2 -1
  277. package/src/components/Search/ClockBackwardsIcon.tsx +1 -1
  278. package/src/components/Search/Input.tsx +2 -1
  279. package/src/components/Search/InputWrapper.tsx +3 -1
  280. package/src/components/Search/MobileSearchTrigger.tsx +16 -5
  281. package/src/components/Search/Popover.tsx +3 -2
  282. package/src/components/Search/RecentSearches.tsx +9 -3
  283. package/src/components/Search/Search.tsx +2 -2
  284. package/src/components/Search/SearchDialog.tsx +10 -3
  285. package/src/components/Search/SearchIcon.tsx +2 -1
  286. package/src/components/Search/SearchItem.tsx +4 -1
  287. package/src/components/Search/SearchTrigger.tsx +8 -2
  288. package/src/components/Search/Shortcut.tsx +3 -1
  289. package/src/components/Search/ShortcutKey.tsx +2 -1
  290. package/src/components/Search/SidebarSearch.tsx +2 -1
  291. package/src/components/Search/SuggestedPages.tsx +2 -2
  292. package/src/components/Separator/Separator.tsx +2 -2
  293. package/src/components/Separator/SeparatorItem.tsx +11 -4
  294. package/src/components/Separator/SeparatorLine.tsx +2 -1
  295. package/src/components/Sidebar/ApiCallItem.tsx +12 -4
  296. package/src/components/Sidebar/BackButton.tsx +3 -1
  297. package/src/components/Sidebar/Drilldown.tsx +3 -1
  298. package/src/components/Sidebar/DrilldownMenu.tsx +3 -2
  299. package/src/components/Sidebar/DrilldownMenuItem.tsx +2 -2
  300. package/src/components/Sidebar/HeaderWrapper.tsx +2 -1
  301. package/src/components/Sidebar/MobileSidebarButton.tsx +3 -2
  302. package/src/components/Sidebar/Sidebar.tsx +2 -1
  303. package/src/components/Sidebar/SidebarLayout.tsx +3 -4
  304. package/src/components/Sidebar/types.ts +3 -0
  305. package/src/components/SidebarActions/SidebarActions.tsx +3 -0
  306. package/src/components/SidebarLogo/SidebarLogo.tsx +3 -0
  307. package/src/components/TableOfContent/TableOfContent.tsx +3 -2
  308. package/src/components/Tags/Tags.tsx +2 -2
  309. package/src/components/Tiles/TileHeader.ts +2 -1
  310. package/src/components/Tiles/TileText.tsx +2 -1
  311. package/src/components/Typography/Emphasis.ts +2 -1
  312. package/src/components/Typography/H1.ts +2 -1
  313. package/src/components/Typography/H2.ts +2 -1
  314. package/src/components/Typography/H3.ts +2 -1
  315. package/src/components/Typography/SectionHeader.ts +2 -1
  316. package/src/components/Typography/Typography.ts +2 -1
  317. package/src/globalStyle.ts +66 -3
  318. package/src/hooks/useMobileMenu.ts +5 -1
  319. package/src/icons/BurgerIcon/BurgerIcon.tsx +12 -0
  320. package/src/icons/BurgerIcon/index.ts +1 -0
  321. package/src/icons/CloseIcon/CloseIcon.tsx +13 -0
  322. package/src/icons/CloseIcon/index.ts +1 -0
  323. package/src/icons/ColorModeIcon/ColorModeIcon.tsx +5 -1
  324. package/src/icons/ExpandIcon/ExpandIcon.tsx +46 -0
  325. package/src/icons/ExpandIcon/index.ts +1 -0
  326. package/src/icons/LogoutIcon/LogoutIcon.tsx +20 -0
  327. package/src/icons/LogoutIcon/index.ts +1 -0
  328. package/src/icons/index.ts +4 -0
  329. package/src/mocks/Sidebar/useSidebarItems.tsx +7 -0
  330. package/src/mocks/hooks/index.ts +16 -1
  331. package/src/mocks/media-css.ts +1 -0
  332. package/src/ui/Dropdown.tsx +1 -1
  333. package/src/ui/darkColors.tsx +11 -3
  334. package/lib/components/Navbar/MobileNavbarDropdown.d.ts +0 -8
  335. package/lib/components/Navbar/MobileNavbarDropdown.js +0 -30
  336. package/lib/components/Navbar/MobileNavbarItem.d.ts +0 -15
  337. package/lib/components/Navbar/MobileNavbarItem.js +0 -110
  338. package/lib/components/Navbar/MobileNavbarMenu.d.ts +0 -6
  339. package/lib/components/Navbar/MobileNavbarMenu.js +0 -92
  340. package/lib/components/Navbar/MobileNavbarMenuButton.d.ts +0 -4
  341. package/lib/components/Navbar/MobileNavbarMenuButton.js +0 -18
  342. package/src/components/Navbar/MobileNavbarDropdown.tsx +0 -37
  343. package/src/components/Navbar/MobileNavbarItem.tsx +0 -121
  344. package/src/components/Navbar/MobileNavbarMenu.tsx +0 -111
  345. package/src/components/Navbar/MobileNavbarMenuButton.tsx +0 -13
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.MobileUserProfile = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const styled_components_1 = __importDefault(require("styled-components"));
9
+ const useProfileProps_1 = require("../../mocks/Profile/useProfileProps");
10
+ const LogoutIcon_1 = require("../../icons/LogoutIcon");
11
+ const Profile_1 = require("../../components/Profile/Profile");
12
+ const useThemeConfig_1 = require("../../hooks/useThemeConfig");
13
+ const hooks_1 = require("../../mocks/hooks");
14
+ function MobileUserProfile() {
15
+ const { userProfile } = (0, useThemeConfig_1.useThemeConfig)();
16
+ const { userData, handleLogout, loginUrl } = (0, useProfileProps_1.useProfileProps)();
17
+ const { translate } = (0, hooks_1.useTranslate)();
18
+ const translationKeys = {
19
+ login: 'theme.profile.login',
20
+ };
21
+ if (!(userData === null || userData === void 0 ? void 0 : userData.isAuthenticated)) {
22
+ return (react_1.default.createElement(MobileProfileWrapper, { "data-component-name": "Navbar/MobileUserProfile" },
23
+ react_1.default.createElement(LoginButton, { href: loginUrl, "data-cy": "login-btn" }, translate(translationKeys.login, (userProfile === null || userProfile === void 0 ? void 0 : userProfile.loginLabel) || 'Login'))));
24
+ }
25
+ return (react_1.default.createElement(MobileProfileWrapper, { "data-component-name": "Navbar/MobileUserProfile" },
26
+ react_1.default.createElement(UserDataWrapper, null,
27
+ react_1.default.createElement(ProfilePicture, null,
28
+ react_1.default.createElement(Profile_1.Profile, { name: userData.name, imageUrl: userData.picture })),
29
+ react_1.default.createElement(UserName, null, userData.name)),
30
+ react_1.default.createElement(LogoutButton, { onClick: () => handleLogout() },
31
+ react_1.default.createElement(LogoutIcon_1.LogoutIcon, null))));
32
+ }
33
+ exports.MobileUserProfile = MobileUserProfile;
34
+ const LoginButton = styled_components_1.default.a `
35
+ background: var(--mobile-menu-login-button-background);
36
+ border-radius: 6px;
37
+ width: 100%;
38
+ margin: 0;
39
+ padding: 5px 0;
40
+ color: var(--mobile-menu-login-button-color);
41
+ font-size: 14px;
42
+ text-align: center;
43
+ line-height: 22px;
44
+ cursor: pointer;
45
+ text-decoration: none;
46
+ `;
47
+ const MobileProfileWrapper = styled_components_1.default.div `
48
+ display: flex;
49
+ justify-content: space-between;
50
+ align-items: center;
51
+ width: 100%;
52
+ position: fixed;
53
+ bottom: 0;
54
+ padding: 18px 16px;
55
+ border-top: 1px solid var(--mobile-menu-profile-border-color);
56
+ background: var(--mobile-menu-profile-background);
57
+ `;
58
+ const UserDataWrapper = styled_components_1.default.div `
59
+ display: flex;
60
+ align-items: center;
61
+ `;
62
+ const ProfilePicture = styled_components_1.default.div `
63
+ margin-right: 16px;
64
+
65
+ ${Profile_1.AvatarWrapper} {
66
+ margin: 0;
67
+ }
68
+
69
+ ${Profile_1.ProfileWrapper} {
70
+ padding: 0;
71
+ }
72
+ `;
73
+ const UserName = styled_components_1.default.div ``;
74
+ const LogoutButton = styled_components_1.default.div `
75
+ cursor: pointer;
76
+ user-select: none;
77
+ `;
78
+ //# sourceMappingURL=MobileUserProfile.js.map
@@ -11,6 +11,7 @@ interface NavbarPresentationalProps extends NavbarLogoProps {
11
11
  menu: ResolvedConfigLinks;
12
12
  hideUserProfile: boolean | string | undefined;
13
13
  changeLanguage: (value: string) => void;
14
+ className?: string;
14
15
  }
15
16
  export declare function NavbarPresentational(props: NavbarPresentationalProps): JSX.Element | null;
16
17
  export declare const NavbarContainer: import("styled-components").StyledComponent<"nav", any, {}, never>;
@@ -32,14 +32,15 @@ const styled_components_1 = __importStar(require("styled-components"));
32
32
  const Navbar_1 = require("../../components/Navbar");
33
33
  const useMobileMenu_1 = require("../../hooks/useMobileMenu");
34
34
  const utils_1 = require("../../utils");
35
- const MobileNavbarMenuButton_1 = require("../../components/Navbar/MobileNavbarMenuButton");
36
35
  const NavbarLogo_1 = require("../../components/NavbarLogo");
37
- const MobileNavbarMenu_1 = require("../../components/Navbar/MobileNavbarMenu");
36
+ const MobileMenu_1 = require("../../components/Menu/MobileMenu");
38
37
  const ColorModeSwitcher_1 = require("../../components/ColorModeSwitcher/ColorModeSwitcher");
39
38
  const useThemeConfig_1 = require("../../hooks/useThemeConfig");
40
39
  const Search_1 = require("../../components/Search/Search");
41
40
  const AuthUserProfile_1 = require("../../components/Profile/AuthUserProfile");
42
41
  const hooks_1 = require("../../mocks/hooks");
42
+ const BurgerButton_1 = require("../../components/Navbar/BurgerButton");
43
+ const useSidebarItems_1 = require("../../mocks/Sidebar/useSidebarItems");
43
44
  const LanguagePicker_1 = require("../../I18n/LanguagePicker");
44
45
  const EmptyNavbarHack = (0, styled_components_1.createGlobalStyle) `
45
46
  :root {
@@ -79,19 +80,38 @@ function Navbar() {
79
80
  }
80
81
  exports.Navbar = Navbar;
81
82
  function NavbarPresentational(props) {
82
- const { menuItemsExist, closeMobileMenu, openMobileMenu, isOpen, hideSearch, logo, menu, hideUserProfile, changeLanguage, } = props;
83
- return (react_1.default.createElement(exports.NavbarContainer, { "data-component-name": "Navbar/Navbar" },
84
- menuItemsExist && react_1.default.createElement(MobileNavbarMenuButton_1.MobileNavbarMenuButton, { onClick: openMobileMenu }),
85
- isOpen && (react_1.default.createElement(MobileNavbarMenu_1.MobileNavbarMenu, { closeMenu: closeMobileMenu, menuItems: menu })),
83
+ const { versions = [] } = (0, hooks_1.usePageVersions)() || {};
84
+ const activeVersion = versions.find((version) => version === null || version === void 0 ? void 0 : version.active);
85
+ const sidebarItems = (0, useSidebarItems_1.useSidebarItems)(activeVersion);
86
+ const { menuItemsExist, closeMobileMenu, openMobileMenu, isOpen, hideSearch, logo, menu, hideUserProfile, changeLanguage, className, } = props;
87
+ return (react_1.default.createElement(exports.NavbarContainer, { "data-component-name": "Navbar/Navbar", className: className },
88
+ isOpen && react_1.default.createElement(MobileMenu_1.MobileMenu, { navItems: menu, sidebarItems: sidebarItems }),
86
89
  react_1.default.createElement(exports.NavbarRow, null,
90
+ menuItemsExist && (react_1.default.createElement(BurgerButton_1.BurgerButton, { onClick: isOpen ? closeMobileMenu : openMobileMenu, isOpen: isOpen })),
87
91
  react_1.default.createElement(NavbarLogo_1.NavbarLogo, { logo: logo }),
88
92
  react_1.default.createElement(Navbar_1.NavbarMenu, { menuItems: menu }),
89
93
  hideSearch ? null : react_1.default.createElement(Search_1.Search, null),
90
94
  react_1.default.createElement(LanguagePicker_1.LanguagePicker, { onChangeLanguage: changeLanguage }),
91
- hideUserProfile ? null : react_1.default.createElement(AuthUserProfile_1.AuthUserProfile, null),
92
- react_1.default.createElement(ColorModeSwitcher_1.ColorModeSwitcher, null))));
95
+ hideUserProfile ? null : (react_1.default.createElement(AuthUserProfileWrapper, null,
96
+ react_1.default.createElement(AuthUserProfile_1.AuthUserProfile, null))),
97
+ react_1.default.createElement(ColorModeSwitcherWrapper, { isVisible: isOpen },
98
+ react_1.default.createElement(ColorModeSwitcher_1.ColorModeSwitcher, null)))));
93
99
  }
94
100
  exports.NavbarPresentational = NavbarPresentational;
101
+ const ColorModeSwitcherWrapper = styled_components_1.default.div `
102
+ display: ${({ isVisible }) => (isVisible ? 'block' : 'none')};
103
+
104
+ ${({ theme }) => theme.mediaQueries.medium} {
105
+ display: block;
106
+ }
107
+ `;
108
+ const AuthUserProfileWrapper = styled_components_1.default.div `
109
+ display: none;
110
+
111
+ ${({ theme }) => theme.mediaQueries.medium} {
112
+ display: block;
113
+ }
114
+ `;
95
115
  exports.NavbarContainer = styled_components_1.default.nav `
96
116
  --text-color: var(--navbar-text-color);
97
117
 
@@ -104,7 +124,7 @@ exports.NavbarContainer = styled_components_1.default.nav `
104
124
  font-size: 0.875rem;
105
125
  position: sticky;
106
126
  top: 0;
107
- z-index: 200;
127
+ z-index: var(--z-index-raised);
108
128
  padding: var(--navbar-item-padding-vertical) var(--navbar-item-padding-horizontal);
109
129
  background: var(--navbar-background-color);
110
130
  font-family: var(--navbar-item-font-family);
@@ -2,7 +2,8 @@
2
2
  import type { ResolvedNavLinkItem } from '../../types/portal';
3
3
  interface NavbarDropdownProps {
4
4
  items: ResolvedNavLinkItem[];
5
+ className?: string;
5
6
  }
6
- export declare function NavbarDropdown({ items }: NavbarDropdownProps): JSX.Element;
7
+ export declare function NavbarDropdown({ items, className }: NavbarDropdownProps): JSX.Element;
7
8
  export declare const DropdownWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
8
9
  export {};
@@ -8,9 +8,9 @@ const react_1 = __importDefault(require("react"));
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
9
  const Link_1 = require("../../mocks/Link");
10
10
  const hooks_1 = require("../../mocks/hooks");
11
- function NavbarDropdown({ items }) {
11
+ function NavbarDropdown({ items, className }) {
12
12
  const { translate } = (0, hooks_1.useTranslate)();
13
- return (react_1.default.createElement(exports.DropdownWrapper, { "data-component-name": "Navbar/NavbarDropdown" }, items.map((item, index) => (react_1.default.createElement("div", { key: `${item.label}_${index}` },
13
+ return (react_1.default.createElement(exports.DropdownWrapper, { "data-component-name": "Navbar/NavbarDropdown", className: className }, items.map((item, index) => (react_1.default.createElement("div", { key: `${item.label}_${index}` },
14
14
  react_1.default.createElement(Link_1.Link, { to: item.link }, translate(item.labelTranslationKey, item.label)))))));
15
15
  }
16
16
  exports.NavbarDropdown = NavbarDropdown;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { ResolvedConfigLinks } from '../../types/portal';
3
- export declare function NavbarMenu({ menuItems }: {
3
+ export declare function NavbarMenu({ menuItems, className, }: {
4
4
  menuItems: ResolvedConfigLinks;
5
+ className?: string;
5
6
  }): JSX.Element | null;
@@ -8,11 +8,11 @@ const react_1 = __importDefault(require("react"));
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
9
  const NavbarItem_1 = require("../../components/Navbar/NavbarItem");
10
10
  const utils_1 = require("../../utils");
11
- function NavbarMenu({ menuItems }) {
11
+ function NavbarMenu({ menuItems, className, }) {
12
12
  if ((0, utils_1.isPrimitive)(menuItems)) {
13
13
  return null;
14
14
  }
15
- return (react_1.default.createElement(NavItemsContainer, { "data-component-name": "Navbar/NavbarMenu" }, menuItems.map((navItem, index) => {
15
+ return (react_1.default.createElement(NavItemsContainer, { "data-component-name": "Navbar/NavbarMenu", className: className }, menuItems.map((navItem, index) => {
16
16
  return (react_1.default.createElement(NavbarItem_1.NavbarItem, { key: `${navItem.label}_${index}`, "data-cy": navItem.label, navItem: navItem }));
17
17
  })));
18
18
  }
@@ -2,5 +2,6 @@
2
2
  import type { LogoConfig } from '../../types/portal';
3
3
  export type NavbarLogoProps = {
4
4
  logo: Pick<LogoConfig, 'image' | 'link' | 'altText'>;
5
+ className?: string;
5
6
  };
6
- export declare function NavbarLogo({ logo }: NavbarLogoProps): JSX.Element | null;
7
+ export declare function NavbarLogo({ logo, className }: NavbarLogoProps): JSX.Element | null;
@@ -7,11 +7,11 @@ exports.NavbarLogo = void 0;
7
7
  const react_1 = __importDefault(require("react"));
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
9
  const Link_1 = require("../../mocks/Link");
10
- function NavbarLogo({ logo }) {
10
+ function NavbarLogo({ logo, className }) {
11
11
  if (!logo.image) {
12
12
  return null;
13
13
  }
14
- const img = (react_1.default.createElement(NavLogo, { src: logo.image, alt: logo.altText, "data-component-name": "NavbarLogo/NavbarLogo" }));
14
+ const img = (react_1.default.createElement(NavLogo, { className: className, src: logo.image, alt: logo.altText, "data-component-name": "NavbarLogo/NavbarLogo" }));
15
15
  return logo.link ? react_1.default.createElement(Link_1.Link, { to: logo.link }, img) : img;
16
16
  }
17
17
  exports.NavbarLogo = NavbarLogo;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { TryItSecurityAppsProps } from './TryItSecurityApps';
2
+ import type { TryItSecurityAppsProps } from '../../components/OpenApiDocs/TryItSecurityApps';
3
3
  export declare function DevOnboardingTryItSecurity(props: TryItSecurityAppsProps): JSX.Element | null;
@@ -32,7 +32,7 @@ const styled_components_1 = __importDefault(require("styled-components"));
32
32
  const Button_1 = require("../../components/Button/Button");
33
33
  const usePreloadHistory_1 = require("../../mocks/usePreloadHistory");
34
34
  const usePageData_1 = require("../../mocks/hooks/usePageData");
35
- const Dropdown_1 = require("./Dropdown");
35
+ const Dropdown_1 = require("../../components/OpenApiDocs/Dropdown");
36
36
  function DevOnboardingTryItSecurity(props) {
37
37
  const apiId = props.apiId;
38
38
  const history = (0, usePreloadHistory_1.usePreloadHistory)();
@@ -2,6 +2,7 @@
2
2
  import type { ResolvedNavItemWithLink } from '../../types/portal';
3
3
  interface NextPageType {
4
4
  nextPage?: ResolvedNavItemWithLink | null;
5
+ className?: string;
5
6
  }
6
- export declare function NextButton({ nextPage }: NextPageType): JSX.Element;
7
+ export declare function NextButton({ nextPage, className }: NextPageType): JSX.Element;
7
8
  export {};
@@ -32,7 +32,7 @@ const styled_components_1 = __importDefault(require("styled-components"));
32
32
  const Button_1 = require("../../components/Button");
33
33
  const useThemeConfig_1 = require("../../hooks/useThemeConfig");
34
34
  const hooks_1 = require("../../mocks/hooks");
35
- function NextButton({ nextPage }) {
35
+ function NextButton({ nextPage, className }) {
36
36
  var _a, _b;
37
37
  const { navigation } = (0, useThemeConfig_1.useThemeConfig)();
38
38
  const { translate } = (0, hooks_1.useTranslate)();
@@ -43,7 +43,7 @@ function NextButton({ nextPage }) {
43
43
  const defaultText = (((_b = navigation === null || navigation === void 0 ? void 0 : navigation.nextButton) === null || _b === void 0 ? void 0 : _b.text) || 'Next to {label}').replace('{label}', nextPageText);
44
44
  const translationKey = 'theme.page.nextButton';
45
45
  const text = translate(translationKey, { label: nextPageText, defaultValue: defaultText });
46
- return (React.createElement(StyledButton, { variant: "outlined", size: "large", to: nextPage.link, "data-component-name": "PageNavigation/NextPageLink", "data-translation-key": translationKey }, text));
46
+ return (React.createElement(StyledButton, { variant: "outlined", size: "large", to: nextPage.link, "data-component-name": "PageNavigation/NextPageLink", "data-translation-key": translationKey, extraClass: className }, text));
47
47
  }
48
48
  exports.NextButton = NextButton;
49
49
  const StyledButton = (0, styled_components_1.default)(Button_1.Button) `
@@ -3,6 +3,7 @@ import type { ResolvedNavItemWithLink } from '../../types/portal';
3
3
  interface PageNavigationType {
4
4
  nextPage?: ResolvedNavItemWithLink | null;
5
5
  prevPage?: ResolvedNavItemWithLink | null;
6
+ className?: string;
6
7
  }
7
- export declare function PageNavigation({ nextPage, prevPage }: PageNavigationType): JSX.Element | null;
8
+ export declare function PageNavigation({ nextPage, prevPage, className, }: PageNavigationType): JSX.Element | null;
8
9
  export {};
@@ -9,13 +9,13 @@ const styled_components_1 = __importDefault(require("styled-components"));
9
9
  const PreviousButton_1 = require("../../components/PageNavigation/PreviousButton");
10
10
  const NextButton_1 = require("../../components/PageNavigation/NextButton");
11
11
  const useThemeConfig_1 = require("../../hooks/useThemeConfig");
12
- function PageNavigation({ nextPage, prevPage }) {
12
+ function PageNavigation({ nextPage, prevPage, className, }) {
13
13
  var _a, _b;
14
14
  const { navigation } = (0, useThemeConfig_1.useThemeConfig)();
15
15
  if (((_a = navigation === null || navigation === void 0 ? void 0 : navigation.previousButton) === null || _a === void 0 ? void 0 : _a.hide) && ((_b = navigation === null || navigation === void 0 ? void 0 : navigation.nextButton) === null || _b === void 0 ? void 0 : _b.hide)) {
16
16
  return null;
17
17
  }
18
- return (react_1.default.createElement(PageNavigationWrapper, { "data-component-name": "PageNavigation/PageNavigation" },
18
+ return (react_1.default.createElement(PageNavigationWrapper, { "data-component-name": "PageNavigation/PageNavigation", className: className },
19
19
  react_1.default.createElement(PreviousButton_1.PreviousButton, { prevPage: prevPage }),
20
20
  react_1.default.createElement(NextButton_1.NextButton, { nextPage: nextPage })));
21
21
  }
@@ -2,6 +2,7 @@
2
2
  import type { ResolvedNavItemWithLink } from '../../types/portal';
3
3
  interface PreviousPageType {
4
4
  prevPage?: ResolvedNavItemWithLink | null;
5
+ className?: string;
5
6
  }
6
- export declare function PreviousButton({ prevPage }: PreviousPageType): JSX.Element;
7
+ export declare function PreviousButton({ prevPage, className }: PreviousPageType): JSX.Element;
7
8
  export {};
@@ -9,7 +9,7 @@ const styled_components_1 = __importDefault(require("styled-components"));
9
9
  const Button_1 = require("../../components/Button");
10
10
  const useThemeConfig_1 = require("../../hooks/useThemeConfig");
11
11
  const hooks_1 = require("../../mocks/hooks");
12
- function PreviousButton({ prevPage }) {
12
+ function PreviousButton({ prevPage, className }) {
13
13
  var _a, _b;
14
14
  const { navigation } = (0, useThemeConfig_1.useThemeConfig)();
15
15
  const { translate } = (0, hooks_1.useTranslate)();
@@ -23,7 +23,7 @@ function PreviousButton({ prevPage }) {
23
23
  label: prevPageText,
24
24
  defaultValue: defaultText,
25
25
  });
26
- return (react_1.default.createElement(StyledButton, { variant: "outlined", size: "large", to: prevPage.link, "data-component-name": "PageNavigation/PreviousPageLink", "data-translation-key": translationKey }, text));
26
+ return (react_1.default.createElement(StyledButton, { variant: "outlined", size: "large", to: prevPage.link, "data-component-name": "PageNavigation/PreviousPageLink", "data-translation-key": translationKey, extraClass: className }, text));
27
27
  }
28
28
  exports.PreviousButton = PreviousButton;
29
29
  const StyledButton = (0, styled_components_1.default)(Button_1.Button) `
@@ -2,7 +2,5 @@ interface PanelBodyProps {
2
2
  animate?: boolean;
3
3
  hidden?: boolean;
4
4
  }
5
- export declare const PanelBody: import("styled-components").StyledComponent<"div", any, {
6
- 'data-component-name': string;
7
- } & PanelBodyProps, "data-component-name">;
5
+ export declare const PanelBody: import("styled-components").StyledComponent<"div", any, PanelBodyProps, never>;
8
6
  export {};
@@ -36,8 +36,9 @@ const showPanel = (0, styled_components_1.keyframes) `
36
36
  const showPanelAnimation = (0, styled_components_1.css) `
37
37
  animation: ${showPanel} 0.2s;
38
38
  `;
39
- exports.PanelBody = styled_components_1.default.div.attrs(() => ({
39
+ exports.PanelBody = styled_components_1.default.div.attrs(({ className }) => ({
40
40
  'data-component-name': 'Panel/PanelBody',
41
+ className,
41
42
  })) `
42
43
  ${({ animate }) => animate && showPanelAnimation};
43
44
  ${({ hidden }) => hidden && 'visibility: hidden'};
@@ -4,6 +4,4 @@ export interface PanelHeaderProps {
4
4
  disabled?: boolean;
5
5
  toggle?: (e: BaseSyntheticEvent) => void;
6
6
  }
7
- export declare const PanelHeader: import("styled-components").StyledComponent<"div", any, {
8
- 'data-component-name': string;
9
- } & PanelHeaderProps, "data-component-name">;
7
+ export declare const PanelHeader: import("styled-components").StyledComponent<"div", any, PanelHeaderProps, never>;
@@ -5,8 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PanelHeader = void 0;
7
7
  const styled_components_1 = __importDefault(require("styled-components"));
8
- exports.PanelHeader = styled_components_1.default.div.attrs(() => ({
8
+ exports.PanelHeader = styled_components_1.default.div.attrs(({ className }) => ({
9
9
  'data-component-name': 'Panel/PanelHeader',
10
+ className,
10
11
  })) `
11
12
  position: relative;
12
13
  z-index: 1;
@@ -1,3 +1 @@
1
- export declare const PanelHeaderTitle: import("styled-components").StyledComponent<"span", any, {
2
- 'data-component-name': string;
3
- }, "data-component-name">;
1
+ export declare const PanelHeaderTitle: import("styled-components").StyledComponent<"span", any, {}, never>;
@@ -5,8 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PanelHeaderTitle = void 0;
7
7
  const styled_components_1 = __importDefault(require("styled-components"));
8
- exports.PanelHeaderTitle = styled_components_1.default.span.attrs(() => ({
8
+ exports.PanelHeaderTitle = styled_components_1.default.span.attrs(({ className }) => ({
9
9
  'data-component-name': 'Panel/PanelHeaderTitle',
10
+ className,
10
11
  })) `
11
12
  margin-right: 5px;
12
13
  font-weight: var(--panel-heading-font-weight-local);
@@ -6,3 +6,9 @@ export interface ProfileProps {
6
6
  onClick?: () => void;
7
7
  }
8
8
  export declare const Profile: React.NamedExoticComponent<ProfileProps>;
9
+ export declare const ProfileWrapper: import("styled-components").StyledComponent<"div", any, {
10
+ 'data-component-name': string;
11
+ }, "data-component-name">;
12
+ export declare const AvatarWrapper: import("styled-components").StyledComponent<"div", any, {
13
+ background?: string | undefined;
14
+ }, never>;
@@ -23,26 +23,26 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.Profile = void 0;
26
+ exports.AvatarWrapper = exports.ProfileWrapper = exports.Profile = void 0;
27
27
  const react_1 = __importStar(require("react"));
28
28
  const styled_components_1 = __importStar(require("styled-components"));
29
29
  const utils_1 = require("../../utils");
30
30
  function ProfileComponent({ name = 'User', imageUrl, onClick, color }) {
31
31
  var _a;
32
32
  if (imageUrl) {
33
- return (react_1.default.createElement(ProfileWrapper, { onClick: onClick, role: "link" },
33
+ return (react_1.default.createElement(exports.ProfileWrapper, { onClick: onClick, role: "link" },
34
34
  react_1.default.createElement(StyledUserName, { "data-cy": "user-name", color: color }, name),
35
- imageUrl && (react_1.default.createElement(AvatarWrapper, null,
35
+ imageUrl && (react_1.default.createElement(exports.AvatarWrapper, null,
36
36
  react_1.default.createElement("img", { "data-cy": "user-avatar", src: imageUrl, alt: "profile" })))));
37
37
  }
38
38
  const avatarLetters = `${name.charAt(0).toUpperCase()}${((_a = name.split(' ')[1]) === null || _a === void 0 ? void 0 : _a.charAt(0).toUpperCase()) || ''}`;
39
- return (react_1.default.createElement(ProfileWrapper, { onClick: onClick, role: "link" },
39
+ return (react_1.default.createElement(exports.ProfileWrapper, { onClick: onClick, role: "link" },
40
40
  react_1.default.createElement(StyledUserName, { "data-cy": "user-name", color: color }, name),
41
- react_1.default.createElement(AvatarWrapper, { background: (0, utils_1.stringToHslColor)(name) },
41
+ react_1.default.createElement(exports.AvatarWrapper, { background: (0, utils_1.stringToHslColor)(name) },
42
42
  react_1.default.createElement("span", null, avatarLetters))));
43
43
  }
44
44
  exports.Profile = (0, react_1.memo)(ProfileComponent);
45
- const ProfileWrapper = styled_components_1.default.div.attrs(() => ({
45
+ exports.ProfileWrapper = styled_components_1.default.div.attrs(() => ({
46
46
  'data-component-name': 'Profile/Profile',
47
47
  })) `
48
48
  display: flex;
@@ -65,7 +65,7 @@ const StyledUserName = styled_components_1.default.span `
65
65
  display: block;
66
66
  }
67
67
  `;
68
- const AvatarWrapper = styled_components_1.default.div `
68
+ exports.AvatarWrapper = styled_components_1.default.div `
69
69
  width: var(--profile-avatar-width);
70
70
  height: var(--profile-avatar-height);
71
71
  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
  }
@@ -1,8 +1,4 @@
1
- export declare const SamplesControlButton: import("styled-components").StyledComponent<"button", any, {
2
- 'data-component-name': string;
3
- }, "data-component-name">;
1
+ export declare const SamplesControlButton: import("styled-components").StyledComponent<"button", any, {}, never>;
4
2
  export declare const SampleControls: import("styled-components").StyledComponent<"div", any, {}, never>;
5
3
  export declare const SampleControlsWrap: import("styled-components").StyledComponent<"div", any, {}, never>;
6
- export declare const PreformattedCodeBlock: import("styled-components").StyledComponent<"pre", any, {
7
- 'data-component-name': string;
8
- }, "data-component-name">;
4
+ export declare const PreformattedCodeBlock: import("styled-components").StyledComponent<"pre", any, {}, never>;
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PreformattedCodeBlock = exports.SampleControlsWrap = exports.SampleControls = exports.SamplesControlButton = void 0;
7
7
  const styled_components_1 = __importDefault(require("styled-components"));
8
8
  const CodeBlock_1 = require("../../components/CodeBlock");
9
- exports.SamplesControlButton = styled_components_1.default.button.attrs(() => ({
9
+ exports.SamplesControlButton = styled_components_1.default.button.attrs(({ className }) => ({
10
10
  'data-component-name': 'SamplesPanelControls/SamplesPanelControls',
11
+ className: className,
11
12
  })) `
12
13
  background-color: var(--panel-samples-controls-background-color);
13
14
  border: 0;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare function CancelSearch({ onClick }: {
2
+ export declare function CancelSearch({ onClick, className, }: {
3
3
  onClick: () => void;
4
+ className?: string;
4
5
  }): JSX.Element;
@@ -30,12 +30,12 @@ exports.CancelSearch = void 0;
30
30
  const React = __importStar(require("react"));
31
31
  const styled_components_1 = __importDefault(require("styled-components"));
32
32
  const hooks_1 = require("../../mocks/hooks");
33
- function CancelSearch({ onClick }) {
33
+ function CancelSearch({ onClick, className, }) {
34
34
  const { translate } = (0, hooks_1.useTranslate)();
35
35
  const translationKeys = {
36
36
  cancel: 'theme.search.cancel',
37
37
  };
38
- return (React.createElement(Wrapper, { "data-component-name": "Search/CancelSearch", onClick: onClick },
38
+ return (React.createElement(Wrapper, { "data-component-name": "Search/CancelSearch", onClick: onClick, className: className },
39
39
  React.createElement(Button, { "data-translation-keys": translationKeys.cancel }, translate(translationKeys.cancel, 'Cancel'))));
40
40
  }
41
41
  exports.CancelSearch = CancelSearch;
@@ -1,4 +1,2 @@
1
1
  import type { SVGProps } from 'react';
2
- export declare const ClearIcon: import("styled-components").StyledComponent<(props: SVGProps<SVGSVGElement>) => JSX.Element, any, {
3
- 'data-component-name': string;
4
- }, "data-component-name">;
2
+ export declare const ClearIcon: import("styled-components").StyledComponent<(props: SVGProps<SVGSVGElement>) => JSX.Element, any, {}, never>;
@@ -8,8 +8,9 @@ const react_1 = __importDefault(require("react"));
8
8
  const styled_components_1 = __importDefault(require("styled-components"));
9
9
  const Icon = (props) => (react_1.default.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", version: "1.1", x: "0", y: "0", viewBox: "0 0 298.7 298.7", "data-component-name": "Search/ClearIcon" }, props),
10
10
  react_1.default.createElement("polygon", { points: "298.7 30.2 268.5 0 149.3 119.1 30.2 0 0 30.2 119.1 149.3 0 268.5 30.2 298.7 149.3 179.5 268.5 298.7 298.7 268.5 179.5 149.3 " })));
11
- exports.ClearIcon = (0, styled_components_1.default)(Icon).attrs(() => ({
11
+ exports.ClearIcon = (0, styled_components_1.default)(Icon).attrs(({ className }) => ({
12
12
  'data-component-name': 'Search/ClearIcon',
13
+ className,
13
14
  })) `
14
15
  cursor: pointer;
15
16
  width: 0.5em;
@@ -1,5 +1,2 @@
1
1
  import type { SVGProps } from 'react';
2
- export declare const ClockBackwardsIcon: import("styled-components").StyledComponent<(props: SVGProps<SVGSVGElement>) => JSX.Element, any, {
3
- 'data-component-name': string;
4
- className: string | undefined;
5
- }, "className" | "data-component-name">;
2
+ export declare const ClockBackwardsIcon: import("styled-components").StyledComponent<(props: SVGProps<SVGSVGElement>) => JSX.Element, any, {}, never>;
@@ -1,3 +1 @@
1
- export declare const FormInput: import("styled-components").StyledComponent<"input", any, {
2
- 'data-component-name': string;
3
- }, "data-component-name">;
1
+ export declare const FormInput: import("styled-components").StyledComponent<"input", any, {}, never>;
@@ -5,8 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.FormInput = void 0;
7
7
  const styled_components_1 = __importDefault(require("styled-components"));
8
- exports.FormInput = styled_components_1.default.input.attrs(() => ({
8
+ exports.FormInput = styled_components_1.default.input.attrs(({ className }) => ({
9
9
  'data-component-name': 'Search/Input',
10
+ className,
10
11
  })) `
11
12
  padding: 1em 2.5em 1em 2.5em;
12
13
  background-color: var(--search-input-background-color);
@@ -5,6 +5,7 @@ interface InputWrapperProps {
5
5
  change(value: string): void;
6
6
  inputRef?: React.RefObject<HTMLInputElement>;
7
7
  isLoading: boolean;
8
+ className?: string;
8
9
  }
9
- export declare function InputWrapper({ placeholder, value, change, isLoading, }: InputWrapperProps): JSX.Element;
10
+ export declare function InputWrapper({ placeholder, value, change, isLoading, className, }: InputWrapperProps): JSX.Element;
10
11
  export {};
@@ -33,7 +33,7 @@ const Input_1 = require("../../components/Search/Input");
33
33
  const SearchIcon_1 = require("../../components/Search/SearchIcon");
34
34
  const SpinnerIcon_1 = require("../../icons/SpinnerIcon");
35
35
  const ClearIcon_1 = require("../../components/Search/ClearIcon");
36
- function InputWrapper({ placeholder, value, change, isLoading, }) {
36
+ function InputWrapper({ placeholder, value, change, isLoading, className, }) {
37
37
  const [isFocused, setIsFocused] = (0, react_1.useState)(false);
38
38
  const refInput = (0, react_1.useRef)(null);
39
39
  const onFocus = () => setIsFocused(true);
@@ -49,7 +49,7 @@ function InputWrapper({ placeholder, value, change, isLoading, }) {
49
49
  setIsFocused(true);
50
50
  change(event.target.value);
51
51
  };
52
- return (react_1.default.createElement(Wrapper, { "data-component-name": "Search/InputContainer" },
52
+ return (react_1.default.createElement(Wrapper, { "data-component-name": "Search/InputContainer", className: className },
53
53
  isFocused && isLoading ? react_1.default.createElement(SpinnerIcon, null) : react_1.default.createElement(SearchIcon, null),
54
54
  react_1.default.createElement(Input_1.FormInput, { value: value, placeholder: placeholder, onChange: onChange, onFocus: onFocus, onClick: stopPropagation, ref: refInput }),
55
55
  !!value && react_1.default.createElement(ClearIcon, { onClick: reset })));
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare function MobileSearchTrigger({ onClick }: {
2
+ export declare function MobileSearchTrigger({ onClick, className, }: {
3
3
  onClick: () => void;
4
+ className?: string;
4
5
  }): JSX.Element;
@@ -30,19 +30,20 @@ exports.MobileSearchTrigger = void 0;
30
30
  const React = __importStar(require("react"));
31
31
  const styled_components_1 = __importDefault(require("styled-components"));
32
32
  const SearchIcon_1 = require("../../components/Search/SearchIcon");
33
- function MobileSearchTrigger({ onClick }) {
34
- return (React.createElement(Wrapper, { "data-component-name": "Search/MobileSearchTrigger", onClick: onClick },
33
+ function MobileSearchTrigger({ onClick, className, }) {
34
+ return (React.createElement(Wrapper, { "data-component-name": "Search/MobileSearchTrigger", onClick: onClick, className: className },
35
35
  React.createElement(SearchIcon, null)));
36
36
  }
37
37
  exports.MobileSearchTrigger = MobileSearchTrigger;
38
38
  const SearchIcon = (0, styled_components_1.default)(SearchIcon_1.SearchIcon) `
39
- width: 20px;
40
- height: 20px;
41
- fill: #8d8d8d;
39
+ width: var(--mobile-menu-search-icon-size);
40
+ height: var(--mobile-menu-search-icon-size);
41
+ fill: var(--navbar-text-color);
42
42
  `;
43
43
  const Wrapper = styled_components_1.default.div `
44
44
  display: block;
45
45
  user-select: none;
46
+ height: var(--mobile-menu-search-icon-size);
46
47
 
47
48
  ${({ theme }) => theme.mediaQueries.small} {
48
49
  display: none;