@redocly/theme 0.4.15 → 0.5.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 (553) hide show
  1. package/{REAMDE.md → README.md} +0 -0
  2. package/lib/ApiOnboarding/AppCustomAttributes.d.ts +5 -0
  3. package/lib/ApiOnboarding/AppCustomAttributes.js +8 -0
  4. package/{Button → lib/Button}/Button.d.ts +0 -0
  5. package/lib/Button/Button.js +156 -0
  6. package/{Button → lib/Button}/index.d.ts +0 -0
  7. package/{Button → lib/Button}/index.js +1 -0
  8. package/{Cards → lib/Cards}/Card.d.ts +0 -0
  9. package/lib/Cards/Card.js +36 -0
  10. package/{Cards → lib/Cards}/CardsBlock.d.ts +0 -0
  11. package/lib/Cards/CardsBlock.js +15 -0
  12. package/{CodeBlock → lib/CodeBlock}/CodeBlock.d.ts +0 -0
  13. package/lib/CodeBlock/CodeBlock.js +103 -0
  14. package/{CodeBlock → lib/CodeBlock}/index.d.ts +0 -0
  15. package/{CodeBlock → lib/CodeBlock}/index.js +1 -0
  16. package/{ColorModeSwitcher → lib/ColorModeSwitcher}/ColorModeSwitcher.d.ts +0 -0
  17. package/{ColorModeSwitcher → lib/ColorModeSwitcher}/ColorModeSwitcher.js +22 -36
  18. package/{ColorModeSwitcher → lib/ColorModeSwitcher}/index.d.ts +0 -0
  19. package/{ColorModeSwitcher → lib/ColorModeSwitcher}/index.js +1 -0
  20. package/{CopyButton → lib/CopyButton}/CopyButton.d.ts +0 -0
  21. package/lib/CopyButton/CopyButton.js +50 -0
  22. package/{CopyButton → lib/CopyButton}/CopyButtonWrapper.d.ts +0 -0
  23. package/{CopyButton → lib/CopyButton}/CopyButtonWrapper.js +14 -15
  24. package/{CopyButton → lib/CopyButton}/index.d.ts +0 -0
  25. package/{CopyButton → lib/CopyButton}/index.js +1 -0
  26. package/{EditPageButton → lib/EditPageButton}/EditPageButton.d.ts +0 -0
  27. package/lib/EditPageButton/EditPageButton.js +36 -0
  28. package/{EditPageButton → lib/EditPageButton}/index.d.ts +0 -0
  29. package/{EditPageButton → lib/EditPageButton}/index.js +1 -0
  30. package/{Footer → lib/Footer}/CustomFooter.d.ts +0 -0
  31. package/lib/Footer/CustomFooter.js +35 -0
  32. package/{Footer → lib/Footer}/CustomFooterNavItem.d.ts +0 -0
  33. package/lib/Footer/CustomFooterNavItem.js +33 -0
  34. package/{Footer → lib/Footer}/Footer.d.ts +0 -0
  35. package/lib/Footer/Footer.js +35 -0
  36. package/{Footer → lib/Footer}/FooterColumn.d.ts +0 -0
  37. package/lib/Footer/FooterColumn.js +54 -0
  38. package/{Footer → lib/Footer}/FooterColumns.d.ts +0 -0
  39. package/lib/Footer/FooterColumns.js +44 -0
  40. package/{Footer → lib/Footer}/FooterCopyright.d.ts +0 -0
  41. package/lib/Footer/FooterCopyright.js +26 -0
  42. package/{Footer → lib/Footer}/index.d.ts +0 -0
  43. package/{Footer → lib/Footer}/index.js +1 -0
  44. package/{JsonViewer → lib/JsonViewer}/JsonViewer.d.ts +0 -0
  45. package/lib/JsonViewer/JsonViewer.js +240 -0
  46. package/{JsonViewer → lib/JsonViewer}/index.d.ts +0 -0
  47. package/{JsonViewer → lib/JsonViewer}/index.js +1 -0
  48. package/lib/LastUpdated/LastUpdated.d.ts +14 -0
  49. package/lib/LastUpdated/LastUpdated.js +52 -0
  50. package/{Layout → lib/Layout}/PageLayout.d.ts +0 -0
  51. package/lib/Layout/PageLayout.js +29 -0
  52. package/{Layout → lib/Layout}/RootLayout.d.ts +0 -0
  53. package/lib/Layout/RootLayout.js +19 -0
  54. package/{Layout → lib/Layout}/index.d.ts +0 -0
  55. package/{Layout → lib/Layout}/index.js +1 -0
  56. package/{Markdown → lib/Markdown}/Admonition.d.ts +0 -0
  57. package/lib/Markdown/Admonition.js +56 -0
  58. package/{Markdown → lib/Markdown}/CodeSample/CodeSample.d.ts +0 -0
  59. package/lib/Markdown/CodeSample/CodeSample.js +219 -0
  60. package/{Markdown → lib/Markdown}/CodeSample/index.d.ts +0 -0
  61. package/{Markdown → lib/Markdown}/CodeSample/index.js +1 -0
  62. package/{Markdown → lib/Markdown}/ContainerWrapper.d.ts +0 -0
  63. package/lib/Markdown/ContainerWrapper.js +26 -0
  64. package/{Markdown → lib/Markdown}/Details.d.ts +0 -0
  65. package/lib/Markdown/Details.js +17 -0
  66. package/{Markdown → lib/Markdown}/Heading.d.ts +0 -0
  67. package/{Markdown → lib/Markdown}/Heading.js +9 -9
  68. package/{Markdown → lib/Markdown}/MarkdownLayout.d.ts +1 -0
  69. package/lib/Markdown/MarkdownLayout.js +30 -0
  70. package/{Markdown → lib/Markdown}/MarkdownWrapper.d.ts +0 -0
  71. package/lib/Markdown/MarkdownWrapper.js +391 -0
  72. package/{Markdown → lib/Markdown}/Mermaid.d.ts +0 -0
  73. package/lib/Markdown/Mermaid.js +19 -0
  74. package/{Markdown → lib/Markdown}/PageWrapper.d.ts +0 -0
  75. package/lib/Markdown/PageWrapper.js +15 -0
  76. package/{Markdown → lib/Markdown}/Sup.d.ts +0 -0
  77. package/lib/Markdown/Sup.js +14 -0
  78. package/{Markdown → lib/Markdown}/Tabs/Tab.d.ts +0 -0
  79. package/lib/Markdown/Tabs/Tab.js +28 -0
  80. package/{Markdown → lib/Markdown}/Tabs/Tabs.d.ts +0 -0
  81. package/lib/Markdown/Tabs/Tabs.js +62 -0
  82. package/{Markdown → lib/Markdown}/Tabs/index.d.ts +0 -0
  83. package/{Markdown → lib/Markdown}/Tabs/index.js +1 -0
  84. package/{Markdown → lib/Markdown}/index.d.ts +0 -0
  85. package/{Markdown → lib/Markdown}/index.js +1 -0
  86. package/{Navbar → lib/Navbar}/MobileNavbarDropdown.d.ts +0 -0
  87. package/lib/Navbar/MobileNavbarDropdown.js +30 -0
  88. package/{Navbar → lib/Navbar}/MobileNavbarItem.d.ts +1 -1
  89. package/lib/Navbar/MobileNavbarItem.js +106 -0
  90. package/{Navbar → lib/Navbar}/MobileNavbarMenu.d.ts +0 -0
  91. package/lib/Navbar/MobileNavbarMenu.js +92 -0
  92. package/{Navbar → lib/Navbar}/MobileNavbarMenuButton.d.ts +0 -0
  93. package/lib/Navbar/MobileNavbarMenuButton.js +18 -0
  94. package/{Navbar → lib/Navbar}/Navbar.d.ts +0 -0
  95. package/lib/Navbar/Navbar.js +75 -0
  96. package/{Navbar → lib/Navbar}/NavbarDropdown.d.ts +0 -0
  97. package/lib/Navbar/NavbarDropdown.js +38 -0
  98. package/{Navbar → lib/Navbar}/NavbarItem.d.ts +1 -1
  99. package/lib/Navbar/NavbarItem.js +72 -0
  100. package/{Navbar → lib/Navbar}/NavbarMenu.d.ts +0 -0
  101. package/lib/Navbar/NavbarMenu.js +34 -0
  102. package/{Navbar → lib/Navbar}/index.d.ts +0 -0
  103. package/{Navbar → lib/Navbar}/index.js +1 -0
  104. package/{NavbarLogo → lib/NavbarLogo}/NavbarLogo.d.ts +0 -0
  105. package/lib/NavbarLogo/NavbarLogo.js +24 -0
  106. package/{NavbarLogo → lib/NavbarLogo}/index.d.ts +0 -0
  107. package/{NavbarLogo → lib/NavbarLogo}/index.js +1 -0
  108. package/{OperationBadge → lib/OperationBadge}/OperationBadge.d.ts +0 -0
  109. package/lib/OperationBadge/OperationBadge.js +68 -0
  110. package/{OperationBadge → lib/OperationBadge}/index.d.ts +0 -0
  111. package/{OperationBadge → lib/OperationBadge}/index.js +1 -0
  112. package/{PageNavigation → lib/PageNavigation}/NextPageLink.d.ts +0 -0
  113. package/lib/PageNavigation/NextPageLink.js +26 -0
  114. package/{PageNavigation → lib/PageNavigation}/PageNavigation.d.ts +0 -0
  115. package/lib/PageNavigation/PageNavigation.js +31 -0
  116. package/{PageNavigation → lib/PageNavigation}/PreviousPageLink.d.ts +0 -0
  117. package/lib/PageNavigation/PreviousPageLink.js +26 -0
  118. package/{PageNavigation → lib/PageNavigation}/index.d.ts +0 -0
  119. package/{PageNavigation → lib/PageNavigation}/index.js +1 -0
  120. package/{Panel → lib/Panel}/Panel.d.ts +0 -0
  121. package/lib/Panel/Panel.js +39 -0
  122. package/{Panel → lib/Panel}/PanelBody.d.ts +0 -0
  123. package/lib/Panel/PanelBody.js +59 -0
  124. package/{Panel → lib/Panel}/PanelComponent.d.ts +1 -1
  125. package/{Panel → lib/Panel}/PanelComponent.js +21 -36
  126. package/{Panel → lib/Panel}/PanelHeader.d.ts +0 -0
  127. package/lib/Panel/PanelHeader.js +33 -0
  128. package/{Panel → lib/Panel}/PanelHeaderTitle.d.ts +0 -0
  129. package/lib/Panel/PanelHeaderTitle.js +21 -0
  130. package/{Panel → lib/Panel}/index.d.ts +0 -0
  131. package/{Panel → lib/Panel}/index.js +1 -0
  132. package/{Profile → lib/Profile}/Profile.d.ts +0 -0
  133. package/lib/Profile/Profile.js +87 -0
  134. package/{Profile → lib/Profile}/index.d.ts +0 -0
  135. package/{Profile → lib/Profile}/index.js +1 -0
  136. package/{SamplesPanelControls → lib/SamplesPanelControls}/SamplesPanelControls.d.ts +0 -0
  137. package/lib/SamplesPanelControls/SamplesPanelControls.js +74 -0
  138. package/{SamplesPanelControls → lib/SamplesPanelControls}/index.d.ts +0 -0
  139. package/{SamplesPanelControls → lib/SamplesPanelControls}/index.js +1 -0
  140. package/{Search → lib/Search}/Autocomplete.d.ts +0 -0
  141. package/lib/Search/Autocomplete.js +105 -0
  142. package/{Search → lib/Search}/ClearIcon.d.ts +0 -0
  143. package/lib/Search/ClearIcon.js +26 -0
  144. package/{Search → lib/Search}/Input.d.ts +0 -0
  145. package/lib/Search/Input.js +30 -0
  146. package/{Search → lib/Search}/Parameters.d.ts +0 -0
  147. package/lib/Search/Parameters.js +55 -0
  148. package/{Search → lib/Search}/Popover.d.ts +0 -0
  149. package/lib/Search/Popover.js +26 -0
  150. package/{Search → lib/Search}/Search.d.ts +0 -0
  151. package/lib/Search/Search.js +27 -0
  152. package/{Search → lib/Search}/SearchIcon.d.ts +0 -0
  153. package/lib/Search/SearchIcon.js +27 -0
  154. package/{Search → lib/Search}/SearchItem.d.ts +0 -0
  155. package/lib/Search/SearchItem.js +98 -0
  156. package/{Search → lib/Search}/SidebarSearch.d.ts +0 -0
  157. package/lib/Search/SidebarSearch.js +20 -0
  158. package/{Search → lib/Search}/index.d.ts +0 -0
  159. package/{Search → lib/Search}/index.js +1 -0
  160. package/{Search → lib/Search}/utils.d.ts +0 -0
  161. package/{Search → lib/Search}/utils.js +8 -26
  162. package/{Sidebar → lib/Sidebar}/ApiCallItem.d.ts +0 -0
  163. package/lib/Sidebar/ApiCallItem.js +34 -0
  164. package/{Sidebar → lib/Sidebar}/ArrowBack.d.ts +0 -0
  165. package/lib/Sidebar/ArrowBack.js +22 -0
  166. package/{Sidebar → lib/Sidebar}/BackButton.d.ts +0 -0
  167. package/lib/Sidebar/BackButton.js +39 -0
  168. package/{Sidebar → lib/Sidebar}/Drilldown.d.ts +0 -0
  169. package/lib/Sidebar/Drilldown.js +43 -0
  170. package/{Sidebar → lib/Sidebar}/DrilldownMenu.d.ts +0 -0
  171. package/lib/Sidebar/DrilldownMenu.js +71 -0
  172. package/{Sidebar → lib/Sidebar}/DrilldownMenuItem.d.ts +0 -0
  173. package/lib/Sidebar/DrilldownMenuItem.js +42 -0
  174. package/{Sidebar → lib/Sidebar}/ExternalIcon.d.ts +0 -0
  175. package/lib/Sidebar/ExternalIcon.js +21 -0
  176. package/{Sidebar → lib/Sidebar}/Menu.d.ts +0 -0
  177. package/lib/Sidebar/Menu.js +17 -0
  178. package/{Sidebar → lib/Sidebar}/MenuContainer.d.ts +0 -0
  179. package/lib/Sidebar/MenuContainer.js +16 -0
  180. package/{Sidebar → lib/Sidebar}/MenuGroup.d.ts +0 -0
  181. package/lib/Sidebar/MenuGroup.js +88 -0
  182. package/{Sidebar → lib/Sidebar}/MenuItem.d.ts +0 -0
  183. package/{Sidebar → lib/Sidebar}/MenuItem.js +9 -14
  184. package/{Sidebar → lib/Sidebar}/MenuItemLabel.d.ts +0 -0
  185. package/lib/Sidebar/MenuItemLabel.js +46 -0
  186. package/lib/Sidebar/MenuLink.d.ts +4 -0
  187. package/lib/Sidebar/MenuLink.js +15 -0
  188. package/{Sidebar → lib/Sidebar}/MenuLinkItem.d.ts +0 -0
  189. package/lib/Sidebar/MenuLinkItem.js +15 -0
  190. package/{Sidebar → lib/Sidebar}/MobileSidebarButton.d.ts +0 -0
  191. package/lib/Sidebar/MobileSidebarButton.js +46 -0
  192. package/{Sidebar → lib/Sidebar}/Separator.d.ts +0 -0
  193. package/lib/Sidebar/Separator.js +18 -0
  194. package/{Sidebar → lib/Sidebar}/SeparatorItem.d.ts +0 -0
  195. package/lib/Sidebar/SeparatorItem.js +25 -0
  196. package/{Sidebar → lib/Sidebar}/SeparatorLine.d.ts +0 -0
  197. package/lib/Sidebar/SeparatorLine.js +15 -0
  198. package/{Sidebar → lib/Sidebar}/Sidebar.d.ts +0 -0
  199. package/lib/Sidebar/Sidebar.js +55 -0
  200. package/{Sidebar → lib/Sidebar}/SidebarLayout.d.ts +0 -0
  201. package/lib/Sidebar/SidebarLayout.js +31 -0
  202. package/{Sidebar → lib/Sidebar}/index.d.ts +0 -0
  203. package/{Sidebar → lib/Sidebar}/index.js +1 -0
  204. package/{Sidebar → lib/Sidebar}/types/DrilldownMenuProps.d.ts +0 -0
  205. package/{Sidebar → lib/Sidebar}/types/DrilldownMenuProps.js +1 -0
  206. package/{Sidebar → lib/Sidebar}/types/ItemState.d.ts +0 -0
  207. package/{Sidebar → lib/Sidebar}/types/ItemState.js +1 -0
  208. package/{Sidebar → lib/Sidebar}/types/MenuItemProps.d.ts +0 -0
  209. package/{Sidebar → lib/Sidebar}/types/MenuItemProps.js +1 -0
  210. package/{Sidebar → lib/Sidebar}/types/MenuStyle.d.ts +0 -0
  211. package/{Sidebar → lib/Sidebar}/types/MenuStyle.js +1 -0
  212. package/{Sidebar → lib/Sidebar}/types/NavItem.d.ts +0 -0
  213. package/{Sidebar → lib/Sidebar}/types/NavItem.js +1 -0
  214. package/{Sidebar → lib/Sidebar}/types/index.d.ts +0 -0
  215. package/{Sidebar → lib/Sidebar}/types/index.js +1 -0
  216. package/{SidebarLogo → lib/SidebarLogo}/SidebarLogo.d.ts +0 -0
  217. package/lib/SidebarLogo/SidebarLogo.js +31 -0
  218. package/{SidebarLogo → lib/SidebarLogo}/index.d.ts +0 -0
  219. package/{SidebarLogo → lib/SidebarLogo}/index.js +1 -0
  220. package/{SourceCode → lib/SourceCode}/SourceCode.d.ts +0 -0
  221. package/{SourceCode → lib/SourceCode}/SourceCode.js +14 -34
  222. package/{SourceCode → lib/SourceCode}/index.d.ts +0 -0
  223. package/{SourceCode → lib/SourceCode}/index.js +1 -0
  224. package/{TableOfContent → lib/TableOfContent}/TableOfContent.d.ts +0 -0
  225. package/lib/TableOfContent/TableOfContent.js +116 -0
  226. package/{TableOfContent → lib/TableOfContent}/index.d.ts +0 -0
  227. package/{TableOfContent → lib/TableOfContent}/index.js +1 -0
  228. package/{TableOfContent → lib/TableOfContent}/utils.d.ts +0 -0
  229. package/lib/TableOfContent/utils.js +41 -0
  230. package/{Tooltip → lib/Tooltip}/Tooltip.d.ts +0 -0
  231. package/lib/Tooltip/Tooltip.js +173 -0
  232. package/{Tooltip → lib/Tooltip}/index.d.ts +0 -0
  233. package/{Tooltip → lib/Tooltip}/index.js +1 -0
  234. package/{Typography → lib/Typography}/CompactTypography.d.ts +0 -0
  235. package/lib/Typography/CompactTypography.js +14 -0
  236. package/{Typography → lib/Typography}/Emphasis.d.ts +0 -0
  237. package/lib/Typography/Emphasis.js +13 -0
  238. package/{Typography → lib/Typography}/H1.d.ts +0 -0
  239. package/lib/Typography/H1.js +17 -0
  240. package/{Typography → lib/Typography}/H2.d.ts +0 -0
  241. package/lib/Typography/H2.js +17 -0
  242. package/{Typography → lib/Typography}/H3.d.ts +0 -0
  243. package/lib/Typography/H3.js +17 -0
  244. package/{Typography → lib/Typography}/SectionHeader.d.ts +0 -0
  245. package/lib/Typography/SectionHeader.js +19 -0
  246. package/{Typography → lib/Typography}/Typography.d.ts +0 -0
  247. package/lib/Typography/Typography.js +22 -0
  248. package/{Typography → lib/Typography}/index.d.ts +0 -0
  249. package/{Typography → lib/Typography}/index.js +1 -0
  250. package/{globalStyle.d.ts → lib/globalStyle.d.ts} +0 -0
  251. package/lib/globalStyle.js +1924 -0
  252. package/{hooks → lib/hooks}/__tests__/mocks/MockIntersectionObserver.d.ts +0 -0
  253. package/lib/hooks/__tests__/mocks/MockIntersectionObserver.js +79 -0
  254. package/{hooks → lib/hooks}/index.d.ts +0 -0
  255. package/{hooks → lib/hooks}/index.js +1 -0
  256. package/{hooks → lib/hooks}/useActiveHeading.d.ts +0 -0
  257. package/lib/hooks/useActiveHeading.js +85 -0
  258. package/{hooks → lib/hooks}/useActiveSectionId.d.ts +0 -0
  259. package/lib/hooks/useActiveSectionId.js +47 -0
  260. package/{hooks → lib/hooks}/useControl.d.ts +0 -0
  261. package/lib/hooks/useControl.js +16 -0
  262. package/{hooks → lib/hooks}/useDefaultThemeSettings.d.ts +0 -0
  263. package/{hooks → lib/hooks}/useDefaultThemeSettings.js +3 -2
  264. package/{hooks → lib/hooks}/useFullHeight.d.ts +0 -0
  265. package/{hooks → lib/hooks}/useFullHeight.js +13 -12
  266. package/{hooks → lib/hooks}/useMobileMenu.d.ts +0 -0
  267. package/lib/hooks/useMobileMenu.js +13 -0
  268. package/{hooks → lib/hooks}/useMount.d.ts +0 -0
  269. package/{hooks → lib/hooks}/useMount.js +4 -3
  270. package/{hooks → lib/hooks}/useNavbarHeight.d.ts +0 -0
  271. package/lib/hooks/useNavbarHeight.js +21 -0
  272. package/{hooks → lib/hooks}/useOutsideClick.d.ts +0 -0
  273. package/{hooks → lib/hooks}/useOutsideClick.js +5 -4
  274. package/{hooks → lib/hooks}/useUnmount.d.ts +0 -0
  275. package/{hooks → lib/hooks}/useUnmount.js +5 -4
  276. package/{icons → lib/icons}/AlertIcon/AlertIcon.d.ts +0 -0
  277. package/{icons → lib/icons}/AlertIcon/AlertIcon.js +22 -17
  278. package/{icons → lib/icons}/AlertIcon/index.d.ts +0 -0
  279. package/{icons → lib/icons}/AlertIcon/index.js +1 -0
  280. package/{icons → lib/icons}/ArrowIcon/ArrowIcon.d.ts +0 -0
  281. package/lib/icons/ArrowIcon/ArrowIcon.js +32 -0
  282. package/{icons → lib/icons}/ArrowIcon/index.d.ts +0 -0
  283. package/{icons → lib/icons}/ArrowIcon/index.js +1 -0
  284. package/{icons → lib/icons}/ColorModeIcon/ColorModeIcon.d.ts +0 -0
  285. package/{icons → lib/icons}/ColorModeIcon/ColorModeIcon.js +10 -11
  286. package/{icons → lib/icons}/ColorModeIcon/index.d.ts +0 -0
  287. package/{icons → lib/icons}/ColorModeIcon/index.js +1 -0
  288. package/{icons → lib/icons}/ShelfIcon/ShelfIcon.d.ts +0 -0
  289. package/lib/icons/ShelfIcon/ShelfIcon.js +52 -0
  290. package/{icons → lib/icons}/ShelfIcon/index.d.ts +0 -0
  291. package/{icons → lib/icons}/ShelfIcon/index.js +1 -0
  292. package/{icons → lib/icons}/index.d.ts +0 -0
  293. package/{icons → lib/icons}/index.js +1 -0
  294. package/{index.d.ts → lib/index.d.ts} +0 -0
  295. package/{index.js → lib/index.js} +1 -0
  296. package/{mocks → lib/mocks}/Link.d.ts +0 -0
  297. package/lib/mocks/Link.js +27 -0
  298. package/{mocks → lib/mocks}/constants/index.d.ts +0 -0
  299. package/{mocks → lib/mocks}/constants/index.js +1 -0
  300. package/{mocks → lib/mocks}/hooks/index.d.ts +0 -0
  301. package/{mocks → lib/mocks}/hooks/index.js +2 -1
  302. package/{mocks → lib/mocks}/hooks/usePageData.d.ts +0 -0
  303. package/{mocks → lib/mocks}/hooks/usePageData.js +1 -0
  304. package/{mocks → lib/mocks}/search.d.ts +0 -0
  305. package/{mocks → lib/mocks}/search.js +2 -1
  306. package/{mocks → lib/mocks}/types/index.d.ts +0 -0
  307. package/{mocks → lib/mocks}/types/index.js +1 -0
  308. package/lib/mocks/types.d.ts +14 -0
  309. package/{mocks → lib/mocks}/types.js +1 -0
  310. package/{mocks → lib/mocks}/usePreloadHistory.d.ts +0 -0
  311. package/{mocks → lib/mocks}/usePreloadHistory.js +3 -2
  312. package/{mocks → lib/mocks}/utils.d.ts +0 -0
  313. package/{mocks → lib/mocks}/utils.js +3 -2
  314. package/{ui → lib/ui}/Background.d.ts +0 -0
  315. package/lib/ui/Background.js +21 -0
  316. package/{ui → lib/ui}/Box.d.ts +0 -0
  317. package/lib/ui/Box.js +21 -0
  318. package/{ui → lib/ui}/Burger.d.ts +0 -0
  319. package/lib/ui/Burger.js +31 -0
  320. package/{ui → lib/ui}/Dropdown.d.ts +0 -0
  321. package/lib/ui/Dropdown.js +115 -0
  322. package/{ui → lib/ui}/Flex.d.ts +0 -0
  323. package/lib/ui/Flex.js +21 -0
  324. package/{ui → lib/ui}/Jumbotron.d.ts +0 -0
  325. package/lib/ui/Jumbotron.js +51 -0
  326. package/{ui → lib/ui}/Tiles/ThinTile.d.ts +1 -1
  327. package/lib/ui/Tiles/ThinTile.js +124 -0
  328. package/{ui → lib/ui}/Tiles/TileHeader.d.ts +0 -0
  329. package/lib/ui/Tiles/TileHeader.js +19 -0
  330. package/{ui → lib/ui}/Tiles/TileText.d.ts +0 -0
  331. package/lib/ui/Tiles/TileText.js +18 -0
  332. package/{ui → lib/ui}/Tiles/WideTile.d.ts +0 -0
  333. package/lib/ui/Tiles/WideTile.js +114 -0
  334. package/{ui → lib/ui}/Tiles/index.d.ts +0 -0
  335. package/{ui → lib/ui}/Tiles/index.js +1 -0
  336. package/{ui → lib/ui}/darkColors.d.ts +0 -0
  337. package/lib/ui/darkColors.js +70 -0
  338. package/{ui → lib/ui}/index.d.ts +0 -1
  339. package/{ui → lib/ui}/index.js +2 -5
  340. package/{utils → lib/utils}/ClipboardService.d.ts +0 -0
  341. package/{utils → lib/utils}/ClipboardService.js +11 -13
  342. package/{utils → lib/utils}/args-typecheck.d.ts +0 -0
  343. package/{utils → lib/utils}/args-typecheck.js +1 -0
  344. package/{utils → lib/utils}/class-names.d.ts +0 -0
  345. package/lib/utils/class-names.js +12 -0
  346. package/{utils → lib/utils}/color.d.ts +0 -0
  347. package/{utils → lib/utils}/color.js +7 -6
  348. package/{utils → lib/utils}/css-variables.d.ts +0 -0
  349. package/lib/utils/css-variables.js +6 -0
  350. package/{utils → lib/utils}/getNavbarElement.d.ts +0 -0
  351. package/{utils → lib/utils}/getNavbarElement.js +3 -2
  352. package/{utils → lib/utils}/highlight.d.ts +0 -0
  353. package/{utils → lib/utils}/highlight.js +10 -11
  354. package/{utils → lib/utils}/index.d.ts +0 -0
  355. package/{utils → lib/utils}/index.js +1 -0
  356. package/{utils → lib/utils}/isUrl.d.ts +0 -0
  357. package/{utils → lib/utils}/isUrl.js +6 -5
  358. package/{utils → lib/utils}/jsonToHtml.d.ts +0 -0
  359. package/lib/utils/jsonToHtml.js +180 -0
  360. package/{utils → lib/utils}/media-css.d.ts +0 -0
  361. package/lib/utils/media-css.js +13 -0
  362. package/{utils → lib/utils}/replaceHashInColor.d.ts +0 -0
  363. package/{utils → lib/utils}/replaceHashInColor.js +1 -0
  364. package/{utils → lib/utils}/theme-helpers.d.ts +0 -0
  365. package/lib/utils/theme-helpers.js +75 -0
  366. package/package.json +104 -5
  367. package/src/ApiOnboarding/AppCustomAttributes.tsx +6 -0
  368. package/src/Button/Button.tsx +2 -1
  369. package/src/Cards/Card.tsx +1 -2
  370. package/src/CopyButton/CopyButtonWrapper.tsx +1 -2
  371. package/src/EditPageButton/EditPageButton.tsx +4 -0
  372. package/src/Footer/CustomFooter.tsx +1 -2
  373. package/src/Footer/CustomFooterNavItem.tsx +1 -2
  374. package/src/Footer/Footer.tsx +1 -2
  375. package/src/Footer/FooterColumn.tsx +8 -3
  376. package/src/Footer/FooterColumns.tsx +1 -2
  377. package/src/JsonViewer/JsonViewer.tsx +2 -1
  378. package/src/LastUpdated/LastUpdated.tsx +41 -5
  379. package/src/Markdown/Admonition.tsx +3 -0
  380. package/src/Markdown/CodeSample/CodeSample.tsx +8 -0
  381. package/src/Markdown/Heading.tsx +2 -1
  382. package/src/Markdown/MarkdownLayout.tsx +2 -1
  383. package/src/Markdown/MarkdownWrapper.tsx +2 -1
  384. package/src/Markdown/Sup.tsx +2 -1
  385. package/src/Markdown/Tabs/Tabs.tsx +2 -1
  386. package/src/Navbar/MobileNavbarDropdown.tsx +1 -2
  387. package/src/Navbar/MobileNavbarItem.tsx +3 -4
  388. package/src/Navbar/MobileNavbarMenu.tsx +1 -2
  389. package/src/Navbar/Navbar.tsx +1 -2
  390. package/src/Navbar/NavbarDropdown.tsx +1 -2
  391. package/src/Navbar/NavbarItem.tsx +4 -5
  392. package/src/Navbar/NavbarMenu.tsx +1 -2
  393. package/src/NavbarLogo/NavbarLogo.tsx +1 -2
  394. package/src/PageNavigation/NextPageLink.tsx +1 -2
  395. package/src/PageNavigation/PageNavigation.tsx +4 -0
  396. package/src/PageNavigation/PreviousPageLink.tsx +1 -2
  397. package/src/Panel/PanelComponent.tsx +2 -2
  398. package/src/Panel/PanelHeader.ts +2 -1
  399. package/src/Search/Autocomplete.tsx +2 -2
  400. package/src/Search/ClearIcon.tsx +2 -1
  401. package/src/Search/Parameters.tsx +1 -2
  402. package/src/Search/SearchIcon.tsx +2 -1
  403. package/src/Search/SearchItem.tsx +1 -2
  404. package/src/Sidebar/ApiCallItem.tsx +1 -2
  405. package/src/Sidebar/Drilldown.tsx +1 -2
  406. package/src/Sidebar/DrilldownMenu.tsx +1 -2
  407. package/src/Sidebar/MenuGroup.tsx +1 -2
  408. package/src/Sidebar/MenuItem.tsx +1 -2
  409. package/src/Sidebar/MenuLink.tsx +3 -9
  410. package/src/Sidebar/MenuLinkItem.tsx +1 -2
  411. package/src/Sidebar/Separator.tsx +1 -2
  412. package/src/TableOfContent/TableOfContent.tsx +3 -4
  413. package/src/Tooltip/Tooltip.tsx +1 -0
  414. package/src/globalStyle.ts +28 -28
  415. package/src/hooks/__tests__/mocks/MockIntersectionObserver.ts +48 -0
  416. package/src/hooks/useActiveSectionId.ts +1 -0
  417. package/src/hooks/useDefaultThemeSettings.ts +1 -2
  418. package/src/hooks/useFullHeight.ts +2 -1
  419. package/src/hooks/useMobileMenu.ts +2 -1
  420. package/src/hooks/useNavbarHeight.ts +1 -0
  421. package/src/hooks/useOutsideClick.ts +2 -1
  422. package/src/mocks/Link.tsx +1 -2
  423. package/src/mocks/hooks/index.ts +1 -1
  424. package/src/mocks/types.ts +8 -1
  425. package/src/settings.yaml +1 -1
  426. package/src/types/portal/src/shared/constants.d.ts +33 -33
  427. package/src/types/portal/src/shared/types/markdown.d.ts +3 -3
  428. package/src/types/portal/src/shared/types/nav.d.ts +119 -106
  429. package/src/ui/Box.tsx +3 -2
  430. package/src/ui/Burger.tsx +2 -1
  431. package/src/ui/Dropdown.tsx +1 -2
  432. package/src/ui/Flex.tsx +2 -1
  433. package/src/ui/Tiles/ThinTile.tsx +2 -1
  434. package/src/ui/Tiles/WideTile.tsx +1 -2
  435. package/src/ui/index.tsx +0 -1
  436. package/src/utils/theme-helpers.ts +1 -0
  437. package/Button/Button.js +0 -87
  438. package/Cards/Card.js +0 -25
  439. package/Cards/CardsBlock.js +0 -15
  440. package/CodeBlock/CodeBlock.js +0 -16
  441. package/CopyButton/CopyButton.js +0 -100
  442. package/EditPageButton/EditPageButton.js +0 -24
  443. package/Footer/CustomFooter.js +0 -31
  444. package/Footer/CustomFooterNavItem.js +0 -25
  445. package/Footer/Footer.js +0 -29
  446. package/Footer/FooterColumn.js +0 -31
  447. package/Footer/FooterColumns.js +0 -34
  448. package/Footer/FooterCopyright.js +0 -19
  449. package/JsonViewer/JsonViewer.js +0 -147
  450. package/LastUpdated/LastUpdated.d.ts +0 -5
  451. package/LastUpdated/LastUpdated.js +0 -27
  452. package/Layout/PageLayout.js +0 -22
  453. package/Layout/RootLayout.js +0 -24
  454. package/Markdown/Admonition.js +0 -31
  455. package/Markdown/CodeSample/CodeSample.js +0 -93
  456. package/Markdown/ContainerWrapper.js +0 -21
  457. package/Markdown/Details.js +0 -22
  458. package/Markdown/MarkdownLayout.js +0 -31
  459. package/Markdown/MarkdownWrapper.js +0 -43
  460. package/Markdown/Mermaid.js +0 -19
  461. package/Markdown/PageWrapper.js +0 -15
  462. package/Markdown/Sup.js +0 -19
  463. package/Markdown/Tabs/Tab.js +0 -24
  464. package/Markdown/Tabs/Tabs.js +0 -72
  465. package/Navbar/MobileNavbarDropdown.js +0 -21
  466. package/Navbar/MobileNavbarItem.js +0 -102
  467. package/Navbar/MobileNavbarMenu.js +0 -32
  468. package/Navbar/MobileNavbarMenuButton.js +0 -19
  469. package/Navbar/Navbar.js +0 -64
  470. package/Navbar/NavbarDropdown.js +0 -21
  471. package/Navbar/NavbarItem.js +0 -53
  472. package/Navbar/NavbarMenu.js +0 -29
  473. package/NavbarLogo/NavbarLogo.js +0 -24
  474. package/OperationBadge/OperationBadge.js +0 -16
  475. package/PageNavigation/NextPageLink.js +0 -28
  476. package/PageNavigation/PageNavigation.js +0 -27
  477. package/PageNavigation/PreviousPageLink.js +0 -28
  478. package/Panel/Panel.js +0 -23
  479. package/Panel/PanelBody.js +0 -43
  480. package/Panel/PanelHeader.js +0 -24
  481. package/Panel/PanelHeaderTitle.js +0 -15
  482. package/Profile/Profile.js +0 -59
  483. package/SamplesPanelControls/SamplesPanelControls.js +0 -27
  484. package/Search/Autocomplete.js +0 -122
  485. package/Search/ClearIcon.js +0 -32
  486. package/Search/Input.js +0 -15
  487. package/Search/Parameters.js +0 -42
  488. package/Search/Popover.js +0 -15
  489. package/Search/Search.js +0 -29
  490. package/Search/SearchIcon.js +0 -32
  491. package/Search/SearchItem.js +0 -64
  492. package/Search/SidebarSearch.js +0 -17
  493. package/Sidebar/ApiCallItem.js +0 -29
  494. package/Sidebar/ArrowBack.js +0 -21
  495. package/Sidebar/BackButton.js +0 -22
  496. package/Sidebar/Drilldown.js +0 -50
  497. package/Sidebar/DrilldownMenu.js +0 -52
  498. package/Sidebar/DrilldownMenuItem.js +0 -25
  499. package/Sidebar/ExternalIcon.js +0 -23
  500. package/Sidebar/Menu.js +0 -15
  501. package/Sidebar/MenuContainer.js +0 -15
  502. package/Sidebar/MenuGroup.js +0 -95
  503. package/Sidebar/MenuItemLabel.js +0 -19
  504. package/Sidebar/MenuLink.d.ts +0 -5
  505. package/Sidebar/MenuLink.js +0 -16
  506. package/Sidebar/MenuLinkItem.js +0 -31
  507. package/Sidebar/MobileSidebarButton.js +0 -25
  508. package/Sidebar/Separator.js +0 -23
  509. package/Sidebar/SeparatorItem.js +0 -16
  510. package/Sidebar/SeparatorLine.js +0 -15
  511. package/Sidebar/Sidebar.js +0 -24
  512. package/Sidebar/SidebarLayout.js +0 -52
  513. package/SidebarLogo/SidebarLogo.js +0 -25
  514. package/TableOfContent/TableOfContent.js +0 -81
  515. package/TableOfContent/utils.js +0 -62
  516. package/Tooltip/Tooltip.js +0 -98
  517. package/Typography/CompactTypography.js +0 -18
  518. package/Typography/Emphasis.js +0 -15
  519. package/Typography/H1.js +0 -16
  520. package/Typography/H2.js +0 -16
  521. package/Typography/H3.js +0 -16
  522. package/Typography/SectionHeader.js +0 -15
  523. package/Typography/Typography.js +0 -45
  524. package/globalStyle.js +0 -38
  525. package/hooks/__tests__/mocks/MockIntersectionObserver.js +0 -39
  526. package/hooks/useActiveHeading.js +0 -100
  527. package/hooks/useActiveSectionId.js +0 -65
  528. package/hooks/useControl.js +0 -32
  529. package/hooks/useMobileMenu.js +0 -29
  530. package/hooks/useNavbarHeight.js +0 -36
  531. package/icons/ArrowIcon/ArrowIcon.js +0 -33
  532. package/icons/ShelfIcon/ShelfIcon.js +0 -52
  533. package/mocks/Link.js +0 -27
  534. package/mocks/types.d.ts +0 -7
  535. package/src/ui/UniversalLink.tsx +0 -96
  536. package/ui/Background.js +0 -16
  537. package/ui/Box.js +0 -16
  538. package/ui/Burger.js +0 -23
  539. package/ui/Dropdown.js +0 -89
  540. package/ui/Flex.js +0 -31
  541. package/ui/Jumbotron.js +0 -44
  542. package/ui/Tiles/ThinTile.js +0 -114
  543. package/ui/Tiles/TileHeader.js +0 -15
  544. package/ui/Tiles/TileText.js +0 -15
  545. package/ui/Tiles/WideTile.js +0 -109
  546. package/ui/UniversalLink.d.ts +0 -17
  547. package/ui/UniversalLink.js +0 -97
  548. package/ui/darkColors.js +0 -10
  549. package/utils/class-names.js +0 -15
  550. package/utils/css-variables.js +0 -8
  551. package/utils/jsonToHtml.js +0 -324
  552. package/utils/media-css.js +0 -50
  553. package/utils/theme-helpers.js +0 -121
@@ -1,65 +0,0 @@
1
- "use strict";
2
- var __read = (this && this.__read) || function (o, n) {
3
- var m = typeof Symbol === "function" && o[Symbol.iterator];
4
- if (!m) return o;
5
- var i = m.call(o), r, ar = [], e;
6
- try {
7
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8
- }
9
- catch (error) { e = { error: error }; }
10
- finally {
11
- try {
12
- if (r && !r.done && (m = i["return"])) m.call(i);
13
- }
14
- finally { if (e) throw e.error; }
15
- }
16
- return ar;
17
- };
18
- var __importDefault = (this && this.__importDefault) || function (mod) {
19
- return (mod && mod.__esModule) ? mod : { "default": mod };
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.useActiveSectionId = void 0;
23
- var react_1 = require("react");
24
- var lodash_throttle_1 = __importDefault(require("lodash.throttle"));
25
- var useNavbarHeight_1 = require("../hooks/useNavbarHeight");
26
- function useActiveSectionId(location, hasOverviewPage) {
27
- if (hasOverviewPage === void 0) { hasOverviewPage = false; }
28
- var _a = __read((0, react_1.useState)(''), 2), itemId = _a[0], setItemId = _a[1];
29
- var navbarHeight = (0, useNavbarHeight_1.useNavbarHeight)(location);
30
- var scrollListener = (0, react_1.useMemo)(function () {
31
- return (0, lodash_throttle_1.default)(function () {
32
- var sections = document.querySelectorAll('[data-section-id]');
33
- if (sections.length < 2) {
34
- setItemId('');
35
- return;
36
- }
37
- for (var i = 0; i < sections.length; i++) {
38
- var section = sections[i];
39
- var rect = section.getBoundingClientRect();
40
- if (rect.y < navbarHeight + 5 && rect.bottom > navbarHeight + 5) {
41
- // use small padding 5px to account for rounding
42
- setItemId(section.getAttribute('data-section-id') || '');
43
- return;
44
- }
45
- }
46
- if (hasOverviewPage) {
47
- setItemId('');
48
- }
49
- else {
50
- setItemId((sections[0] && sections[0].getAttribute('data-section-id')) || '');
51
- }
52
- }, 150);
53
- }, [navbarHeight, hasOverviewPage]);
54
- (0, react_1.useEffect)(function () {
55
- window.addEventListener('scroll', scrollListener, { capture: false });
56
- setTimeout(function () {
57
- scrollListener();
58
- }, 0);
59
- return function () {
60
- window.removeEventListener('scroll', scrollListener); // TODO: add throttle
61
- };
62
- }, [location, navbarHeight, scrollListener]);
63
- return itemId;
64
- }
65
- exports.useActiveSectionId = useActiveSectionId;
@@ -1,32 +0,0 @@
1
- "use strict";
2
- var __read = (this && this.__read) || function (o, n) {
3
- var m = typeof Symbol === "function" && o[Symbol.iterator];
4
- if (!m) return o;
5
- var i = m.call(o), r, ar = [], e;
6
- try {
7
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8
- }
9
- catch (error) { e = { error: error }; }
10
- finally {
11
- try {
12
- if (r && !r.done && (m = i["return"])) m.call(i);
13
- }
14
- finally { if (e) throw e.error; }
15
- }
16
- return ar;
17
- };
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.useControl = void 0;
20
- var react_1 = require("react");
21
- var useControl = function (initialVal) {
22
- if (initialVal === void 0) { initialVal = false; }
23
- var _a = __read((0, react_1.useState)(initialVal), 2), isOpened = _a[0], setIsOpened = _a[1];
24
- var handleOpen = (0, react_1.useCallback)(function () { return setIsOpened(true); }, []);
25
- var handleClose = (0, react_1.useCallback)(function () { return setIsOpened(false); }, []);
26
- return {
27
- isOpened: isOpened,
28
- handleOpen: handleOpen,
29
- handleClose: handleClose,
30
- };
31
- };
32
- exports.useControl = useControl;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- var __read = (this && this.__read) || function (o, n) {
3
- var m = typeof Symbol === "function" && o[Symbol.iterator];
4
- if (!m) return o;
5
- var i = m.call(o), r, ar = [], e;
6
- try {
7
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8
- }
9
- catch (error) { e = { error: error }; }
10
- finally {
11
- try {
12
- if (r && !r.done && (m = i["return"])) m.call(i);
13
- }
14
- finally { if (e) throw e.error; }
15
- }
16
- return ar;
17
- };
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.useMobileMenu = void 0;
20
- var react_1 = require("react");
21
- var react_router_dom_1 = require("react-router-dom");
22
- function useMobileMenu(initialState) {
23
- if (initialState === void 0) { initialState = false; }
24
- var location = (0, react_router_dom_1.useHistory)().location;
25
- var _a = __read((0, react_1.useState)(initialState), 2), isOpen = _a[0], setIsOpen = _a[1];
26
- (0, react_1.useEffect)(function () { return setIsOpen(false); }, [location.pathname]);
27
- return [isOpen, setIsOpen];
28
- }
29
- exports.useMobileMenu = useMobileMenu;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- var __read = (this && this.__read) || function (o, n) {
3
- var m = typeof Symbol === "function" && o[Symbol.iterator];
4
- if (!m) return o;
5
- var i = m.call(o), r, ar = [], e;
6
- try {
7
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
8
- }
9
- catch (error) { e = { error: error }; }
10
- finally {
11
- try {
12
- if (r && !r.done && (m = i["return"])) m.call(i);
13
- }
14
- finally { if (e) throw e.error; }
15
- }
16
- return ar;
17
- };
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.useNavbarHeight = void 0;
20
- var react_1 = require("react");
21
- var getNavbarElement_1 = require("../utils/getNavbarElement");
22
- function useNavbarHeight(location) {
23
- var _a = __read((0, react_1.useState)(0), 2), height = _a[0], setHeight = _a[1];
24
- (0, react_1.useEffect)(function () {
25
- var navbar = (0, getNavbarElement_1.getNavbarElement)();
26
- setHeight((navbar && navbar.clientHeight) || 0);
27
- }, [location.pathname]);
28
- (0, react_1.useEffect)(function () {
29
- window.requestAnimationFrame(function () {
30
- var navbar = (0, getNavbarElement_1.getNavbarElement)();
31
- setHeight((navbar && navbar.clientHeight) || 0);
32
- });
33
- }, []);
34
- return height;
35
- }
36
- exports.useNavbarHeight = useNavbarHeight;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __importDefault = (this && this.__importDefault) || function (mod) {
7
- return (mod && mod.__esModule) ? mod : { "default": mod };
8
- };
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ArrowIcon = void 0;
11
- var react_1 = __importDefault(require("react"));
12
- var styled_components_1 = __importDefault(require("styled-components"));
13
- function directionToTransform(_a) {
14
- var direction = _a.direction;
15
- switch (direction) {
16
- case 'up':
17
- return 180;
18
- case 'right':
19
- return -90;
20
- case 'left':
21
- return 90;
22
- default:
23
- return 0;
24
- }
25
- }
26
- var Icon = function (_a) {
27
- var className = _a.className;
28
- return (react_1.default.createElement("span", { "data-component-name": "icons/ArrowIcon/ArrowIcon" },
29
- react_1.default.createElement("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 7 5", className: className },
30
- react_1.default.createElement("path", { d: "M3.5 2.51L5.806.205a.7.7 0 01.99.99l-2.8 2.8a.698.698 0 01-.99 0l-2.8-2.8a.7.7 0 11.99-.99L3.5 2.51z" }))));
31
- };
32
- exports.ArrowIcon = (0, styled_components_1.default)(Icon)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: var(--sidebar-group-item-chevron-size);\n height: var(--sidebar-group-item-chevron-size);\n fill: var(--sidebar-group-item-chevron-color);\n transform: rotate(", "deg);\n\n vertical-align: middle;\n"], ["\n width: var(--sidebar-group-item-chevron-size);\n height: var(--sidebar-group-item-chevron-size);\n fill: var(--sidebar-group-item-chevron-color);\n transform: rotate(", "deg);\n\n vertical-align: middle;\n"])), directionToTransform);
33
- var templateObject_1;
@@ -1,52 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- var desc = Object.getOwnPropertyDescriptor(m, k);
9
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
- desc = { enumerable: true, get: function() { return m[k]; } };
11
- }
12
- Object.defineProperty(o, k2, desc);
13
- }) : (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- o[k2] = m[k];
16
- }));
17
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
- Object.defineProperty(o, "default", { enumerable: true, value: v });
19
- }) : function(o, v) {
20
- o["default"] = v;
21
- });
22
- var __importStar = (this && this.__importStar) || function (mod) {
23
- if (mod && mod.__esModule) return mod;
24
- var result = {};
25
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
- __setModuleDefault(result, mod);
27
- return result;
28
- };
29
- Object.defineProperty(exports, "__esModule", { value: true });
30
- exports.ShelfIcon = void 0;
31
- var React = __importStar(require("react"));
32
- var styled_components_1 = __importStar(require("styled-components"));
33
- var utils_1 = require("../../utils");
34
- var directionMap = {
35
- right: '0deg',
36
- down: '90deg',
37
- left: '180deg',
38
- up: '270deg',
39
- };
40
- var IntShelfIcon = function (_a) {
41
- var className = _a.className, style = _a.style;
42
- return (React.createElement("svg", { className: className, style: style, viewBox: "0 0 4.25 7", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" },
43
- React.createElement("path", { d: "M0.205025 1.19467L3.00503 3.99467C3.27839 4.26804 3.72161 4.26804 3.99497 3.99467C4.26834 3.7213 4.26834 3.27809 3.99497 3.00472L1.19497 0.20472C0.921608 -0.0686469 0.478392 -0.0686469 0.205025 0.20472C-0.0683418 0.478087 -0.0683417 0.921303 0.205025 1.19467Z" }),
44
- React.createElement("path", { d: "M3.00503 3.00501L0.205025 5.80501C-0.0683417 6.07838 -0.0683417 6.5216 0.205025 6.79496C0.478392 7.06833 0.921608 7.06833 1.19497 6.79496L3.99497 3.99496C4.26834 3.7216 4.26834 3.27838 3.99497 3.00501C3.72161 2.73165 3.27839 2.73165 3.00503 3.00501Z" })));
45
- };
46
- exports.ShelfIcon = (0, styled_components_1.default)(IntShelfIcon).attrs(function () { return ({
47
- 'data-component-name': 'icons/ShelfIcon/ShelfIcon',
48
- }); })(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n vertical-align: middle;\n transition: transform 0.2s ease-out;\n"], ["\n ", "\n vertical-align: middle;\n transition: transform 0.2s ease-out;\n"])), function (_a) {
49
- var _b = _a.size, size = _b === void 0 ? '9px' : _b, _c = _a.float, float = _c === void 0 ? '' : _c, direction = _a.direction, color = _a.color;
50
- return (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: ", ";\n width: ", ";\n float: ", ";\n transform: rotateZ(", ");\n fill: ", ";\n "], ["\n height: ", ";\n width: ", ";\n float: ", ";\n transform: rotateZ(", ");\n fill: ", ";\n "])), size, size, float, directionMap[direction], (0, utils_1.getCssColorVariable)(color));
51
- });
52
- var templateObject_1, templateObject_2;
package/mocks/Link.js DELETED
@@ -1,27 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.Link = void 0;
18
- var react_1 = __importDefault(require("react"));
19
- var lodash_1 = require("lodash");
20
- // TODO: use real typings here
21
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
22
- function Link(props) {
23
- // We omit "active" property to avoid "Warning: Received `false` for a non-boolean attribute `active`."
24
- var filteredProps = (0, lodash_1.omit)(props, ['active', 'httpVerb', 'hasActiveSubItem']);
25
- return react_1.default.createElement("a", __assign({ href: filteredProps.to }, filteredProps));
26
- }
27
- exports.Link = Link;
package/mocks/types.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export declare type ActiveItem<T> = T;
2
- export declare type SearchDocument = any;
3
- export declare type OperationParameter = any;
4
- export interface RawTheme {
5
- name: string;
6
- settings: any;
7
- }
@@ -1,96 +0,0 @@
1
- import * as React from 'react';
2
- import type { LinkProps } from 'react-router-dom';
3
- import { useLocation } from 'react-router-dom';
4
- import styled from 'styled-components';
5
-
6
- import { isUrl } from '@theme/utils/isUrl';
7
- import { Link } from '@portal/Link';
8
-
9
- const StyledExternalLink = styled.a`
10
- &.external-url {
11
- position: relative;
12
-
13
- :after {
14
- content: '';
15
- display: inline-block;
16
- position: absolute;
17
- background: var(--text-color);
18
- mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' version='1.1' x='0' y='0' viewBox='0 0 100 125' enable-background='new 0 0 100 100' xml:space='preserve'%3E%3Cpath d='M-408.2-318.5 98.6 4.8c0-0.1 0-0.2-0.1-0.3 0-0.1-0.1-0.2-0.1-0.3 0-0.1 0-0.1-0.1-0.2 0 0 0-0.1 0-0.1 0-0.1-0.1-0.2-0.2-0.3 0-0.1-0.1-0.2-0.2-0.3 -0.1-0.1-0.1-0.2-0.2-0.3C97.7 2.9 97.6 2.8 97.5 2.7c-0.1-0.1-0.2-0.2-0.3-0.3 -0.1-0.1-0.1-0.1-0.2-0.2 -0.1-0.1-0.2-0.2-0.3-0.2 -0.1-0.1-0.2-0.1-0.2-0.2 -0.1-0.1-0.2-0.1-0.3-0.2 -0.1 0-0.2-0.1-0.3-0.1 0 0-0.1 0-0.1-0.1 -0.1 0-0.2 0-0.2-0.1 -0.1 0-0.2-0.1-0.3-0.1 -0.1 0-0.2-0.1-0.4-0.1 -0.1 0-0.2 0-0.3 0 -0.1 0-0.3 0-0.4 0 -0.1 0-0.1 0-0.2 0L63.8 1.3c-2.5 0-4.6 2.1-4.6 4.6 0 2.5 2.1 4.6 4.6 4.5l19.3-0.1 -29.8 30.2c-1.1 1.1-1.5 2.7-1.2 4.1 0.2 0.9 0.6 1.7 1.3 2.4 0.9 0.9 2.1 1.3 3.2 1.3 1.2 0 2.3-0.5 3.2-1.4l0 0 29.8-30.2 0.1 19.3c0 2.5 2.1 4.6 4.6 4.5 1.3 0 2.4-0.5 3.2-1.4 0.8-0.8 1.3-2 1.3-3.2L98.7 5.7c0-0.1 0-0.1 0-0.2 0-0.1 0-0.2 0-0.4C98.6 5 98.6 4.9 98.6 4.8zM6.5 83.3c0 5.7 4.6 10.4 10.4 10.4l55.6 0.1c5.7 0 10.4-4.6 10.4-10.4l-0.1-40.8h6.1v40.8c0 9-7.3 16.3-16.3 16.3l-56.4-0.1c-8.6 0-15.6-7-15.6-15.6L0.6 27.8c0-9 7.3-16.3 16.3-16.3l41.1-0.1v6.1L17 17.5c-5.7 0-10.4 4.6-10.4 10.4L6.5 83.3z'/%3E%3C/svg%3E");
19
- mask-repeat: no-repeat;
20
- width: 10px;
21
- height: 10px;
22
- top: 50%;
23
- right: -15px;
24
- transform: translateY(-50%);
25
- }
26
- }
27
- `;
28
-
29
- // TODO: We're using our own Link component so probably filtering is not necessary here.
30
- // filter out unnecessary props
31
- const propsList = [
32
- 'color',
33
- 'size',
34
- 'variant',
35
- 'bgColor',
36
- 'bgImage',
37
- 'disableArrow',
38
- 'withIcon',
39
- 'maxWidth',
40
- 'inversed',
41
- 'transparent',
42
- 'large',
43
- ];
44
-
45
- export const withPropsFilter =
46
- (filterList: string[]) => (WrappedComponent: React.FunctionComponent) =>
47
- function WithPropsFilter(props: React.PropsWithChildren<object>): JSX.Element {
48
- const filteredProps = Object.fromEntries(
49
- Object.entries(props).filter(([key]) => !filterList.includes(key)),
50
- );
51
-
52
- return <WrappedComponent {...filteredProps} />;
53
- };
54
-
55
- export interface PortalLinkProps<TState> extends LinkProps<TState> {
56
- activeClassName?: string;
57
- activeStyle?: object;
58
- onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
59
- partiallyActive?: boolean;
60
- replace?: boolean;
61
- state?: TState;
62
- to: string;
63
- }
64
-
65
- export interface UniversalLinkProps extends Partial<PortalLinkProps<object>> {
66
- external?: boolean;
67
- ref?: any;
68
- }
69
-
70
- export const UniversalLink = withPropsFilter(propsList)((props: UniversalLinkProps) => {
71
- return (typeof props.to === 'string' && (isUrl(props.to) || props.to.startsWith('mailto:'))) ||
72
- props.external ? (
73
- <StyledExternalLink
74
- style={props.style}
75
- href={props.to}
76
- target={props.target || (props.external && '_blank') || '_self'}
77
- className={`${props.external ? 'external-url' : ''} ${props.className}`}
78
- rel={props.rel}
79
- data-cy={`universalLink-${
80
- typeof props.children === 'string' ? props.children : 'with-nested-jsx'
81
- }`}
82
- >
83
- {props.children}
84
- </StyledExternalLink>
85
- ) : props.to == null ? (
86
- <a onClick={props.onClick} className={props.className} style={props.style}>
87
- {props.children}
88
- </a>
89
- ) : (
90
- <Link
91
- {...props}
92
- to={props.to}
93
- state={{ previousPath: useLocation()?.pathname, ...props.state }}
94
- />
95
- );
96
- });
package/ui/Background.js DELETED
@@ -1,16 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __importDefault = (this && this.__importDefault) || function (mod) {
7
- return (mod && mod.__esModule) ? mod : { "default": mod };
8
- };
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.Background = void 0;
11
- var styled_components_1 = __importDefault(require("styled-components"));
12
- var Flex_1 = require("../ui/Flex");
13
- exports.Background = (0, styled_components_1.default)(Flex_1.Flex).attrs(function () { return ({
14
- 'data-component-name': 'ui/Background',
15
- }); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: var(--navbar-background-color);\n color: var(--navbar-text-color);\n font-family: var(--heading-font-family);\n\n a:not([role='button']),\n a:not([role='button']):hover {\n color: var(--navbar-text-color);\n }\n"], ["\n background: var(--navbar-background-color);\n color: var(--navbar-text-color);\n font-family: var(--heading-font-family);\n\n a:not([role='button']),\n a:not([role='button']):hover {\n color: var(--navbar-text-color);\n }\n"])));
16
- var templateObject_1;
package/ui/Box.js DELETED
@@ -1,16 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __importDefault = (this && this.__importDefault) || function (mod) {
7
- return (mod && mod.__esModule) ? mod : { "default": mod };
8
- };
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.Box = void 0;
11
- var styled_system_1 = require("styled-system");
12
- var styled_components_1 = __importDefault(require("styled-components"));
13
- exports.Box = styled_components_1.default.div.attrs(function () { return ({
14
- 'data-component-name': 'ui/Box',
15
- }); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n max-width: 100%;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"], ["\n max-width: 100%;\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), styled_system_1.space, styled_system_1.layout, styled_system_1.position, styled_system_1.flex, styled_system_1.textAlign, styled_system_1.color, styled_system_1.border);
16
- var templateObject_1;
package/ui/Burger.js DELETED
@@ -1,23 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __importDefault = (this && this.__importDefault) || function (mod) {
7
- return (mod && mod.__esModule) ? mod : { "default": mod };
8
- };
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.Burger = void 0;
11
- var react_1 = __importDefault(require("react"));
12
- var styled_components_1 = __importDefault(require("styled-components"));
13
- function BurgerComponent(_a) {
14
- var onClick = _a.onClick, className = _a.className;
15
- return (react_1.default.createElement(Button, { onClick: onClick, className: className, "data-component-name": "ui/Burger" },
16
- react_1.default.createElement(Line, null),
17
- react_1.default.createElement(Line, null),
18
- react_1.default.createElement(Line, null)));
19
- }
20
- var Button = styled_components_1.default.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n all: unset;\n max-width: 30px;\n width: 100%;\n min-width: 10px;\n display: block;\n cursor: pointer;\n"], ["\n all: unset;\n max-width: 30px;\n width: 100%;\n min-width: 10px;\n display: block;\n cursor: pointer;\n"])));
21
- var Line = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin: 4px 0;\n width: 100%;\n height: 2px;\n background: #fff;\n border-radius: 1px;\n"], ["\n margin: 4px 0;\n width: 100%;\n height: 2px;\n background: #fff;\n border-radius: 1px;\n"])));
22
- exports.Burger = (0, styled_components_1.default)(BurgerComponent)(templateObject_3 || (templateObject_3 = __makeTemplateObject([""], [""])));
23
- var templateObject_1, templateObject_2, templateObject_3;
package/ui/Dropdown.js DELETED
@@ -1,89 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
- if (k2 === undefined) k2 = k;
8
- var desc = Object.getOwnPropertyDescriptor(m, k);
9
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
- desc = { enumerable: true, get: function() { return m[k]; } };
11
- }
12
- Object.defineProperty(o, k2, desc);
13
- }) : (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- o[k2] = m[k];
16
- }));
17
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
- Object.defineProperty(o, "default", { enumerable: true, value: v });
19
- }) : function(o, v) {
20
- o["default"] = v;
21
- });
22
- var __importStar = (this && this.__importStar) || function (mod) {
23
- if (mod && mod.__esModule) return mod;
24
- var result = {};
25
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
- __setModuleDefault(result, mod);
27
- return result;
28
- };
29
- var __read = (this && this.__read) || function (o, n) {
30
- var m = typeof Symbol === "function" && o[Symbol.iterator];
31
- if (!m) return o;
32
- var i = m.call(o), r, ar = [], e;
33
- try {
34
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
35
- }
36
- catch (error) { e = { error: error }; }
37
- finally {
38
- try {
39
- if (r && !r.done && (m = i["return"])) m.call(i);
40
- }
41
- finally { if (e) throw e.error; }
42
- }
43
- return ar;
44
- };
45
- var __importDefault = (this && this.__importDefault) || function (mod) {
46
- return (mod && mod.__esModule) ? mod : { "default": mod };
47
- };
48
- Object.defineProperty(exports, "__esModule", { value: true });
49
- exports.Dropdown = void 0;
50
- var react_1 = __importStar(require("react"));
51
- var styled_components_1 = __importDefault(require("styled-components"));
52
- var Link_1 = require("../mocks/Link");
53
- var Icon = function () { return (react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" },
54
- react_1.default.createElement("polyline", { points: "6 9 12 15 18 9" }))); };
55
- var DropDownContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);\n"], ["\n position: relative;\n padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 4);\n"])));
56
- var DropDownHeader = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: #fff;\n padding: 8px 10px;\n border-radius: 4px;\n border: 1px solid #e4e7eb;\n font-weight: 600;\n color: var(--text-color);\n background: var(--color-secondary-200);\n"], ["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: #fff;\n padding: 8px 10px;\n border-radius: 4px;\n border: 1px solid #e4e7eb;\n font-weight: 600;\n color: var(--text-color);\n background: var(--color-secondary-200);\n"])));
57
- var DropDownList = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n background: var(--color-secondary-200);\n margin: 2px 20px 0 20px;\n padding: 0;\n border-radius: 4px;\n border: 1px solid rgba(38, 50, 56, 0.2);\n z-index: 9999;\n left: 0;\n right: 0;\n"], ["\n position: absolute;\n background: var(--color-secondary-200);\n margin: 2px 20px 0 20px;\n padding: 0;\n border-radius: 4px;\n border: 1px solid rgba(38, 50, 56, 0.2);\n z-index: 9999;\n left: 0;\n right: 0;\n"])));
58
- var IconWrapper = styled_components_1.default.span(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n transition: transform 0.2s;\n display: inline-block;\n font-size: 0;\n &.active {\n transform: rotate(-180deg);\n }\n"], ["\n transition: transform 0.2s;\n display: inline-block;\n font-size: 0;\n &.active {\n transform: rotate(-180deg);\n }\n"])));
59
- var ListItem = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: #fff;\n padding: 0.4em 10px;\n font-size: 1em;\n color: var(--text-color);\n cursor: pointer;\n &:hover {\n background-color: rgba(38, 50, 56, 0.12);\n }\n &.active {\n background-color: rgba(0, 0, 0, 0.05);\n }\n"], ["\n background-color: #fff;\n padding: 0.4em 10px;\n font-size: 1em;\n color: var(--text-color);\n cursor: pointer;\n &:hover {\n background-color: rgba(38, 50, 56, 0.12);\n }\n &.active {\n background-color: rgba(0, 0, 0, 0.05);\n }\n"])));
60
- var DropDownLink = (0, styled_components_1.default)(Link_1.Link)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: block;\n text-decoration: none;\n color: var(--text-color);\n"], ["\n display: block;\n text-decoration: none;\n color: var(--text-color);\n"])));
61
- function Dropdown(_a) {
62
- var items = _a.items, activeItem = _a.activeItem;
63
- var ref = (0, react_1.useRef)(null);
64
- var _b = __read((0, react_1.useState)(false), 2), isOpen = _b[0], setIsOpen = _b[1];
65
- var toggling = function () { return setIsOpen(!isOpen); };
66
- (0, react_1.useEffect)(function () {
67
- var checkIfClickedOutside = function (e) {
68
- if (!(e.target instanceof HTMLElement)) {
69
- return;
70
- }
71
- if (isOpen && ref.current && !ref.current.contains(e.target)) {
72
- setIsOpen(false);
73
- }
74
- };
75
- document.addEventListener('mousedown', checkIfClickedOutside);
76
- return function () {
77
- document.removeEventListener('mousedown', checkIfClickedOutside);
78
- };
79
- }, [isOpen]);
80
- return (react_1.default.createElement(DropDownContainer, { ref: ref, "data-component-name": "ui/Dropdown" },
81
- react_1.default.createElement(DropDownHeader, { onClick: toggling },
82
- (activeItem === null || activeItem === void 0 ? void 0 : activeItem.label) || activeItem.version,
83
- react_1.default.createElement(IconWrapper, { className: isOpen ? 'active' : '' },
84
- react_1.default.createElement(Icon, null))),
85
- isOpen && (react_1.default.createElement(DropDownList, null, items.map(function (item) { return (react_1.default.createElement(ListItem, { className: activeItem.version === item.version ? 'active' : '', onClick: toggling, key: (item === null || item === void 0 ? void 0 : item.link) + (item === null || item === void 0 ? void 0 : item.version) },
86
- react_1.default.createElement(DropDownLink, { to: (item === null || item === void 0 ? void 0 : item.link) || '#' }, (item === null || item === void 0 ? void 0 : item.label) || item.version))); })))));
87
- }
88
- exports.Dropdown = Dropdown;
89
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
package/ui/Flex.js DELETED
@@ -1,31 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __assign = (this && this.__assign) || function () {
7
- __assign = Object.assign || function(t) {
8
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9
- s = arguments[i];
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
- t[p] = s[p];
12
- }
13
- return t;
14
- };
15
- return __assign.apply(this, arguments);
16
- };
17
- var __importDefault = (this && this.__importDefault) || function (mod) {
18
- return (mod && mod.__esModule) ? mod : { "default": mod };
19
- };
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.FlexSection = exports.Flex = void 0;
22
- var react_1 = __importDefault(require("react"));
23
- var styled_components_1 = __importDefault(require("styled-components"));
24
- var styled_system_1 = require("styled-system");
25
- var Box_1 = require("../ui/Box");
26
- exports.Flex = (0, styled_components_1.default)(Box_1.Box).attrs({ 'data-component-name': 'ui/Flex' })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n ", "\n ", "\n"], ["\n display: flex;\n flex-wrap: wrap;\n ", "\n ", "\n"])), styled_system_1.flexbox, styled_system_1.width);
27
- function FlexSection(props) {
28
- return (react_1.default.createElement(exports.Flex, __assign({}, props, { width: props.width || { xs: '90%', large: 910 } }), props.children));
29
- }
30
- exports.FlexSection = FlexSection;
31
- var templateObject_1;
package/ui/Jumbotron.js DELETED
@@ -1,44 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __importDefault = (this && this.__importDefault) || function (mod) {
7
- return (mod && mod.__esModule) ? mod : { "default": mod };
8
- };
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.Jumbotron = void 0;
11
- var styled_system_1 = require("styled-system");
12
- var styled_components_1 = __importDefault(require("styled-components"));
13
- var Typography_1 = require("../Typography");
14
- var Background_1 = require("../ui/Background");
15
- exports.Jumbotron = (0, styled_components_1.default)(Background_1.Background).attrs(function () { return ({
16
- 'data-component-name': 'ui/Jumbotron',
17
- }); })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: column;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n ", ";\n ", ";\n ", ";\n ", "\n ", ", ", " {\n color: ", ";\n text-align: center;\n padding: 0;\n }\n h1 {\n font-size: 3.5em;\n line-height: 1.2;\n font-weight: var(--font-weight-bold);\n margin: 1.75em 0 0.5em 0;\n }\n h2 {\n font-size: 1.875em;\n line-height: 1;\n font-weight: var(--font-weight-regular);\n margin: 0;\n margin-bottom: 2em;\n }\n"], ["\n flex-direction: column;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n ", ";\n ", ";\n ", ";\n ", "\n ", ", ", " {\n color: ", ";\n text-align: center;\n padding: 0;\n }\n h1 {\n font-size: 3.5em;\n line-height: 1.2;\n font-weight: var(--font-weight-bold);\n margin: 1.75em 0 0.5em 0;\n }\n h2 {\n font-size: 1.875em;\n line-height: 1;\n font-weight: var(--font-weight-regular);\n margin: 0;\n margin-bottom: 2em;\n }\n"])), function (_a) {
18
- var pt = _a.pt;
19
- return pt || '0';
20
- }, function (_a) {
21
- var pb = _a.pb;
22
- return pb || '8em';
23
- }, function (_a) {
24
- var pl = _a.pl;
25
- return pl || '0';
26
- }, function (_a) {
27
- var pr = _a.pr;
28
- return pr || '0';
29
- }, function (_a) {
30
- var bgColor = _a.bgColor;
31
- return bgColor && "background: ".concat(bgColor);
32
- }, function (_a) {
33
- var bgImage = _a.bgImage, bgColor = _a.bgColor;
34
- return bgImage &&
35
- "\n background: ".concat(bgColor || 'var(--text-color)', " url(").concat(bgImage, ");\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n ");
36
- }, function (_a) {
37
- var parallaxEffect = _a.parallaxEffect;
38
- return parallaxEffect &&
39
- "\n background-attachment: scroll, fixed;\n ";
40
- }, styled_system_1.space, Typography_1.H1, Typography_1.H2, function (_a) {
41
- var textColor = _a.textColor;
42
- return textColor || 'var(--navbar-text-color)';
43
- });
44
- var templateObject_1;