@redocly/theme 0.1.9 → 0.1.10

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 (204) hide show
  1. package/Button/index.d.ts +1 -1
  2. package/Button/index.js +1 -1
  3. package/CodeBlock/index.d.ts +1 -1
  4. package/CodeBlock/index.js +1 -1
  5. package/CopyButton/index.d.ts +2 -2
  6. package/CopyButton/index.js +2 -2
  7. package/Footer/Footer.d.ts +2 -2
  8. package/Footer/Footer.js +1 -1
  9. package/Footer/FooterColumn.js +6 -6
  10. package/Footer/FooterColumns.d.ts +3 -3
  11. package/Footer/FooterCopyright.d.ts +3 -3
  12. package/Footer/FooterCopyright.js +1 -1
  13. package/Footer/index.d.ts +4 -4
  14. package/Footer/index.js +4 -4
  15. package/Headings/index.d.ts +1 -1
  16. package/Headings/index.js +1 -1
  17. package/JsonViewer/index.d.ts +2 -2
  18. package/JsonViewer/index.js +2 -2
  19. package/Layout/index.d.ts +2 -2
  20. package/Layout/index.js +2 -2
  21. package/Markdown/Admonition.js +4 -4
  22. package/Markdown/CodeSample/index.d.ts +3 -3
  23. package/Markdown/CodeSample/index.js +3 -3
  24. package/Markdown/Heading.js +1 -1
  25. package/Markdown/MarkdownLayout.d.ts +2 -2
  26. package/Markdown/StyledMarkdown.js +2 -2
  27. package/Markdown/Tabs/index.d.ts +2 -2
  28. package/Markdown/Tabs/index.js +2 -2
  29. package/Markdown/index.d.ts +9 -9
  30. package/Markdown/index.js +9 -9
  31. package/Navbar/Navbar.d.ts +0 -1
  32. package/Navbar/Navbar.js +1 -1
  33. package/Navbar/NavbarItem.js +1 -1
  34. package/Navbar/index.d.ts +3 -0
  35. package/Navbar/index.js +19 -0
  36. package/NavbarLogo/NavbarLogo.d.ts +6 -0
  37. package/{Logo/Logo.js → NavbarLogo/NavbarLogo.js} +8 -5
  38. package/NavbarLogo/index.d.ts +1 -0
  39. package/{Logo → NavbarLogo}/index.js +1 -1
  40. package/OperationBadge/index.d.ts +1 -1
  41. package/OperationBadge/index.js +1 -1
  42. package/PageNavigation/index.d.ts +3 -0
  43. package/PageNavigation/index.js +19 -0
  44. package/Panel/index.d.ts +8 -8
  45. package/Panel/index.js +8 -8
  46. package/REAMDE.md +1 -0
  47. package/SamplesPanelControls/index.d.ts +1 -1
  48. package/SamplesPanelControls/index.js +1 -1
  49. package/Search/Autocomplete.js +1 -1
  50. package/Search/Parameters.js +2 -2
  51. package/Search/SearchItem.js +2 -2
  52. package/Search/index.d.ts +9 -9
  53. package/Search/index.js +9 -9
  54. package/Search/utils.js +1 -1
  55. package/Sidebar/BackButton.js +1 -1
  56. package/Sidebar/DrilldownMenuItem.js +3 -3
  57. package/Sidebar/Menu.js +1 -1
  58. package/Sidebar/MenuItemLabel.js +2 -2
  59. package/Sidebar/MenuLink.js +1 -1
  60. package/Sidebar/MobileSidebarButton.js +1 -1
  61. package/Sidebar/Sidebar.js +1 -1
  62. package/Sidebar/index.d.ts +19 -19
  63. package/Sidebar/index.js +19 -19
  64. package/Sidebar/types/index.d.ts +5 -5
  65. package/Sidebar/types/index.js +5 -5
  66. package/SidebarLogo/index.d.ts +1 -1
  67. package/SidebarLogo/index.js +1 -1
  68. package/SourceCode/index.d.ts +1 -1
  69. package/SourceCode/index.js +1 -1
  70. package/TableOfContent/TableOfContent.js +3 -3
  71. package/TableOfContent/index.d.ts +1 -1
  72. package/TableOfContent/index.js +1 -1
  73. package/Tooltip/index.d.ts +1 -1
  74. package/Tooltip/index.js +1 -1
  75. package/globalStyle.js +1 -1
  76. package/hooks/index.d.ts +7 -7
  77. package/hooks/index.js +7 -7
  78. package/hooks/useActiveSectionId.d.ts +2 -2
  79. package/hooks/useActiveSectionId.js +1 -0
  80. package/icons/ShelfIcon/index.d.ts +2 -2
  81. package/icons/ShelfIcon/index.js +1 -1
  82. package/icons/index.d.ts +1 -1
  83. package/icons/index.js +1 -1
  84. package/package.json +1 -1
  85. package/src/Button/Button.stories.tsx +1 -1
  86. package/src/Button/index.ts +1 -1
  87. package/src/CodeBlock/index.ts +1 -1
  88. package/src/CopyButton/CopyButton.stories.tsx +1 -1
  89. package/src/CopyButton/index.ts +2 -2
  90. package/src/Footer/Footer.stories.tsx +57 -0
  91. package/src/Footer/Footer.tsx +5 -8
  92. package/src/Footer/FooterColumn.tsx +7 -7
  93. package/src/Footer/FooterColumns.tsx +3 -1
  94. package/src/Footer/FooterCopyright.tsx +5 -3
  95. package/src/Footer/__tests__/Footer.test.tsx +55 -0
  96. package/src/Footer/__tests__/__snapshots__/Footer.test.tsx.snap +253 -0
  97. package/src/Footer/index.ts +4 -4
  98. package/src/Headings/index.ts +1 -1
  99. package/src/JsonViewer/JsonViewer.stories.tsx +1 -1
  100. package/src/JsonViewer/index.ts +2 -2
  101. package/src/Layout/__tests__/PageLayout.test.tsx +17 -0
  102. package/src/Layout/__tests__/RootLayout.test.tsx +17 -0
  103. package/src/Layout/__tests__/__snapshots__/PageLayout.test.tsx.snap +38 -0
  104. package/src/Layout/__tests__/__snapshots__/RootLayout.test.tsx.snap +18 -0
  105. package/src/Layout/index.ts +2 -2
  106. package/src/Markdown/Admonition.tsx +15 -15
  107. package/src/Markdown/CodeSample/index.ts +3 -3
  108. package/src/Markdown/Heading.tsx +4 -1
  109. package/src/Markdown/MarkdownLayout.tsx +2 -2
  110. package/src/Markdown/StyledMarkdown.tsx +27 -27
  111. package/src/Markdown/Tabs/index.ts +2 -2
  112. package/src/Markdown/index.ts +9 -9
  113. package/src/Navbar/Navbar.stories.tsx +7 -3
  114. package/src/Navbar/Navbar.tsx +2 -3
  115. package/src/Navbar/NavbarItem.tsx +1 -1
  116. package/src/Navbar/index.ts +3 -0
  117. package/src/NavbarLogo/NavbarLogo.stories.tsx +20 -0
  118. package/src/NavbarLogo/NavbarLogo.tsx +24 -0
  119. package/src/NavbarLogo/__tests__/NavbarLogo.test.tsx +47 -0
  120. package/src/NavbarLogo/__tests__/__snapshots__/NavbarLogo.test.tsx.snap +38 -0
  121. package/src/NavbarLogo/index.ts +1 -0
  122. package/src/OperationBadge/OperationBadge.stories.tsx +1 -1
  123. package/src/OperationBadge/index.ts +1 -1
  124. package/src/PageNavigation/index.ts +3 -0
  125. package/src/Panel/index.ts +8 -8
  126. package/src/SamplesPanelControls/SamplesControlButton.stories.tsx +1 -1
  127. package/src/SamplesPanelControls/index.ts +1 -1
  128. package/src/Search/Autocomplete.tsx +1 -1
  129. package/src/Search/Parameters.tsx +2 -2
  130. package/src/Search/SearchItem.tsx +2 -2
  131. package/src/Search/index.ts +9 -9
  132. package/src/Search/utils.tsx +1 -1
  133. package/src/Sidebar/BackButton.tsx +2 -2
  134. package/src/Sidebar/DrilldownMenuItem.tsx +4 -4
  135. package/src/Sidebar/Menu.tsx +1 -1
  136. package/src/Sidebar/MenuItemLabel.tsx +4 -4
  137. package/src/Sidebar/MenuLink.tsx +1 -1
  138. package/src/Sidebar/MobileSidebarButton.tsx +2 -2
  139. package/src/Sidebar/Sidebar.tsx +1 -1
  140. package/src/Sidebar/index.ts +19 -19
  141. package/src/Sidebar/types/index.ts +5 -5
  142. package/src/SidebarLogo/SidebarLogo.stories.tsx +1 -1
  143. package/src/SidebarLogo/index.ts +1 -1
  144. package/src/SourceCode/SourceCode.stories.tsx +1 -1
  145. package/src/SourceCode/index.ts +1 -1
  146. package/src/TableOfContent/TableOfContent.tsx +6 -6
  147. package/src/TableOfContent/index.ts +1 -1
  148. package/src/Tooltip/Tooltip.stories.tsx +1 -1
  149. package/src/Tooltip/index.ts +1 -1
  150. package/src/Welcome.stories.mdx +7 -0
  151. package/src/globalStyle.ts +102 -7
  152. package/src/hooks/index.ts +7 -7
  153. package/src/hooks/useActiveSectionId.ts +3 -3
  154. package/src/icons/ShelfIcon/index.ts +2 -2
  155. package/src/icons/index.ts +1 -1
  156. package/src/types/portal/index.d.ts +0 -1
  157. package/src/types/portal/src/client/app/Sidebar/types.d.ts +32 -41
  158. package/src/types/portal/src/client/app/media-css.d.ts +4 -4
  159. package/src/types/portal/src/client/styling/default.d.ts +585 -391
  160. package/src/types/portal/src/client/styling/index.d.ts +2 -6
  161. package/src/types/portal/src/server/constants.d.ts +5 -9
  162. package/src/types/portal/src/server/plugins/markdown/types.d.ts +14 -19
  163. package/src/types/portal/src/server/plugins/portal-config/types.d.ts +12 -12
  164. package/src/types/portal/src/server/plugins/types.d.ts +55 -0
  165. package/src/types/portal/src/server/store.d.ts +49 -97
  166. package/src/types/portal/src/server/utils/async.d.ts +1 -5
  167. package/src/types/portal/src/server/utils/content-provider.d.ts +51 -0
  168. package/src/types/portal/src/server/utils/index.d.ts +1 -1
  169. package/src/types/portal/src/server/utils/paths.d.ts +10 -13
  170. package/src/types/portal/src/server/utils/reporter/formatter.d.ts +8 -8
  171. package/src/types/portal/src/server/utils/reporter/reporter.d.ts +15 -15
  172. package/src/types/portal/src/server/version-store.d.ts +35 -0
  173. package/src/types/portal/src/shared/constants.d.ts +6 -6
  174. package/src/types/portal/src/shared/types.d.ts +97 -58
  175. package/src/types/portal/src/shared/urls.d.ts +2 -1
  176. package/src/ui/AlertIcon.tsx +8 -7
  177. package/src/ui/Background.tsx +3 -3
  178. package/src/ui/Dropdown.tsx +4 -4
  179. package/src/ui/Jumbotron.tsx +3 -3
  180. package/src/ui/Tiles/TileHeader.ts +1 -1
  181. package/src/ui/Tiles/TileText.tsx +2 -2
  182. package/src/ui/Tiles/index.ts +4 -4
  183. package/src/ui/Typography.tsx +22 -22
  184. package/ui/AlertIcon.d.ts +3 -2
  185. package/ui/AlertIcon.js +2 -2
  186. package/ui/Background.js +1 -1
  187. package/ui/Dropdown.js +3 -3
  188. package/ui/Jumbotron.js +3 -3
  189. package/ui/Tiles/TileHeader.js +1 -1
  190. package/ui/Tiles/TileText.js +1 -1
  191. package/ui/Tiles/index.d.ts +4 -4
  192. package/ui/Tiles/index.js +4 -4
  193. package/ui/Typography.js +20 -20
  194. package/Logo/Logo.d.ts +0 -5
  195. package/Logo/index.d.ts +0 -1
  196. package/src/Introduction.stories.mdx +0 -7
  197. package/src/Logo/Logo.tsx +0 -17
  198. package/src/Logo/index.ts +0 -1
  199. package/src/types/portal/src/server/plugins/nav-utils.d.ts +0 -19
  200. package/src/types/portal/src/server/plugins/sidebars/index.d.ts +0 -16
  201. package/src/types/portal/src/server/plugins/versions/index.d.ts +0 -15
  202. package/src/types/portal/src/server/plugins/versions/types.d.ts +0 -23
  203. package/src/types/portal/src/server/plugins/versions/utils.d.ts +0 -10
  204. package/src/types/portal/src/server/utils/watcher.d.ts +0 -16
@@ -25,7 +25,7 @@ const Button = styled.button`
25
25
  padding: 0;
26
26
  border: 0;
27
27
  outline: 0;
28
- color: var(--color-secondary-contrast);
28
+ color: var(--color-content);
29
29
  display: flex;
30
30
  align-items: center;
31
31
  cursor: pointer;
@@ -39,6 +39,6 @@ const Button = styled.button`
39
39
  }
40
40
 
41
41
  &:hover {
42
- color: var(--sidebar-text-color);
42
+ color: var(--sidebar-item-color);
43
43
  }
44
44
  `;
@@ -9,7 +9,7 @@ export function DrilldownMenuItem({ item }: MenuItemProps): JSX.Element {
9
9
  {item.icon ? <Icon src={item.icon} /> : null}
10
10
  <div>
11
11
  {item.label}
12
- {item.sublabel ? <Sublabel>{item.sublabel}</Sublabel> : null}
12
+ {item.sublabel ? <SubLabel>{item.sublabel}</SubLabel> : null}
13
13
  </div>
14
14
  </Container>
15
15
  );
@@ -18,7 +18,7 @@ export function DrilldownMenuItem({ item }: MenuItemProps): JSX.Element {
18
18
  const Container = styled.div`
19
19
  display: flex;
20
20
  align-items: center;
21
- color: var(--sidebar-text-color);
21
+ color: var(--sidebar-item-color);
22
22
  font-size: var(--sidebar-font-size);
23
23
  font-weight: var(--font-weight-bold);
24
24
  `;
@@ -32,9 +32,9 @@ const Icon = styled.img`
32
32
  overflow: hidden;
33
33
  `;
34
34
 
35
- const Sublabel = styled.div`
35
+ const SubLabel = styled.div`
36
36
  margin-top: 2px;
37
37
  font-size: 0.85rem;
38
- color: var(--color-secondary-contrast);
38
+ color: var(--color-content);
39
39
  font-weight: var(--font-weight-regular);
40
40
  `;
@@ -6,6 +6,6 @@ export const Menu = styled.ul.attrs(() => ({
6
6
  padding: 0;
7
7
  margin: 0;
8
8
  list-style: none;
9
- color: var(--sidebar-text-color);
9
+ color: var(--sidebar-item-color);
10
10
  position: relative;
11
11
  `;
@@ -25,14 +25,14 @@ export const MenuItemLabel = styled.li.attrs(() => ({
25
25
  ${(props) =>
26
26
  props.active
27
27
  ? `
28
- color: var(--sidebar-text-active-color);
29
- background-color: var(--sidebar-text-active-background-color);
28
+ color: var(--sidebar-item-active-color);
29
+ background-color: var(--sidebar-item-active-background-color);
30
30
  `
31
31
  : null};
32
32
 
33
33
  :hover {
34
- color: var(--sidebar-text-active-color);
35
- background-color: var(--sidebar-text-active-background-color);
34
+ color: var(--sidebar-item-active-color);
35
+ background-color: var(--sidebar-item-active-background-color);
36
36
  }
37
37
 
38
38
  :empty {
@@ -6,7 +6,7 @@ export const MenuLink = styled(UniversalLink).attrs(() => ({
6
6
  'data-component-name': 'Sidebar/MenuLink',
7
7
  }))<UniversalLinkProps>`
8
8
  text-decoration: none;
9
- color: var(--sidebar-text-color);
9
+ color: var(--sidebar-item-color);
10
10
 
11
11
  &&.external-url:after {
12
12
  content: none;
@@ -12,7 +12,7 @@ export const MobileSidebarButton = styled.span.attrs(() => ({
12
12
  position: fixed;
13
13
  right: 20px;
14
14
  z-index: 3;
15
- box-shadow: rgba(0, 0, 0, 0.3) 0px 0px 20px;
15
+ box-shadow: rgba(0, 0, 0, 0.3) 0 0 20px;
16
16
  border-radius: 50%;
17
17
  transform: ${(props) => (props.opened ? 'rotate(180deg)' : 'rotate(0deg)')};
18
18
  transition: transform 0.75s;
@@ -35,7 +35,7 @@ export const MobileSidebarButton = styled.span.attrs(() => ({
35
35
  left: 50%;
36
36
  width: 25px;
37
37
  height: 25px;
38
- background-color: var(--color-primary-contrast);
38
+ background-color: #fff;
39
39
  -webkit-mask: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='iso-8859-1'%3F%3E%3C!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 294.842 294.842' style='enable-background:new 0 0 294.842 294.842;' xml:space='preserve'%3E%3Cg%3E%3Cpath fill='%23fff' d='M292.128,214.846c-2.342-2.344-6.143-2.344-8.484,0l-59.512,59.511V6c0-3.313-2.687-6-6-6s-6,2.687-6,6v268.356 l-59.513-59.512c-2.342-2.342-6.142-2.343-8.485,0.001c-2.343,2.343-2.343,6.142,0.001,8.485l69.755,69.754 c1.171,1.171,2.707,1.757,4.242,1.757s3.071-0.586,4.242-1.758l69.754-69.754C294.472,220.987,294.472,217.188,292.128,214.846z'/%3E%3Cpath fill='%23fff' d='M6.956,12h180.137c3.313,0,6-2.687,6-6s-2.687-6-6-6H6.956c-3.313,0-6,2.687-6,6S3.643,12,6.956,12z'/%3E%3Cpath fill='%23fff' d='M6.956,82.228h180.137c3.313,0,6-2.687,6-6s-2.687-6-6-6H6.956c-3.313,0-6,2.687-6,6S3.643,82.228,6.956,82.228z'/%3E%3Cpath fill='%23fff' d='M6.956,152.456h180.137c3.313,0,6-2.687,6-6s-2.687-6-6-6H6.956c-3.313,0-6,2.687-6,6S3.643,152.456,6.956,152.456z'/%3E%3Cpath fill='%23fff' d='M124.438,210.685H6.956c-3.313,0-6,2.687-6,6s2.687,6,6,6h117.482c3.313,0,6-2.687,6-6S127.752,210.685,124.438,210.685z' /%3E%3Cpath fill='%23fff' d='M124.438,280.912H6.956c-3.313,0-6,2.687-6,6s2.687,6,6,6h117.482c3.313,0,6-2.687,6-6S127.752,280.912,124.438,280.912z' /%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3C/svg%3E%0A")
40
40
  no-repeat 50% 50%;
41
41
  mask: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='iso-8859-1'%3F%3E%3C!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3E%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 294.842 294.842' style='enable-background:new 0 0 294.842 294.842;' xml:space='preserve'%3E%3Cg%3E%3Cpath fill='%23fff' d='M292.128,214.846c-2.342-2.344-6.143-2.344-8.484,0l-59.512,59.511V6c0-3.313-2.687-6-6-6s-6,2.687-6,6v268.356 l-59.513-59.512c-2.342-2.342-6.142-2.343-8.485,0.001c-2.343,2.343-2.343,6.142,0.001,8.485l69.755,69.754 c1.171,1.171,2.707,1.757,4.242,1.757s3.071-0.586,4.242-1.758l69.754-69.754C294.472,220.987,294.472,217.188,292.128,214.846z'/%3E%3Cpath fill='%23fff' d='M6.956,12h180.137c3.313,0,6-2.687,6-6s-2.687-6-6-6H6.956c-3.313,0-6,2.687-6,6S3.643,12,6.956,12z'/%3E%3Cpath fill='%23fff' d='M6.956,82.228h180.137c3.313,0,6-2.687,6-6s-2.687-6-6-6H6.956c-3.313,0-6,2.687-6,6S3.643,82.228,6.956,82.228z'/%3E%3Cpath fill='%23fff' d='M6.956,152.456h180.137c3.313,0,6-2.687,6-6s-2.687-6-6-6H6.956c-3.313,0-6,2.687-6,6S3.643,152.456,6.956,152.456z'/%3E%3Cpath fill='%23fff' d='M124.438,210.685H6.956c-3.313,0-6,2.687-6,6s2.687,6,6,6h117.482c3.313,0,6-2.687,6-6S127.752,210.685,124.438,210.685z' /%3E%3Cpath fill='%23fff' d='M124.438,280.912H6.956c-3.313,0-6,2.687-6,6s2.687,6,6,6h117.482c3.313,0,6-2.687,6-6S127.752,280.912,124.438,280.912z' /%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3Cg%3E%3C/g%3E%3C/svg%3E%0A")
@@ -17,7 +17,7 @@ export const Sidebar = styled.aside.attrs(() => ({
17
17
  background: var(--sidebar-background-color);
18
18
  font-size: var(--sidebar-font-size);
19
19
  font-family: var(--sidebar-font-family);
20
- color: var(--sidebar-text-color);
20
+ color: var(--sidebar-item-color);
21
21
  top: var(--navbar-height);
22
22
  height: calc(100vh - var(--navbar-height));
23
23
  display: flex;
@@ -1,19 +1,19 @@
1
- export * from './ApiCallItem';
2
- export * from './ArrowBack';
3
- export * from './BackButton';
4
- export * from './Drilldown';
5
- export * from './DrilldownMenu';
6
- export * from './DrilldownMenuItem';
7
- export * from './ExternalIcon';
8
- export * from './Menu';
9
- export * from './MenuContainer';
10
- export * from './MenuGroup';
11
- export * from './MenuItem';
12
- export * from './MenuItemLabel';
13
- export * from './MenuLink';
14
- export * from './MenuLinkItem';
15
- export * from './MobileSidebarButton';
16
- export * from './Separator';
17
- export * from './SeparatorItem';
18
- export * from './Sidebar';
19
- export * from './SidebarLayout';
1
+ export * from '@theme/Sidebar/ApiCallItem';
2
+ export * from '@theme/Sidebar/ArrowBack';
3
+ export * from '@theme/Sidebar/BackButton';
4
+ export * from '@theme/Sidebar/Drilldown';
5
+ export * from '@theme/Sidebar/DrilldownMenu';
6
+ export * from '@theme/Sidebar/DrilldownMenuItem';
7
+ export * from '@theme/Sidebar/ExternalIcon';
8
+ export * from '@theme/Sidebar/Menu';
9
+ export * from '@theme/Sidebar/MenuContainer';
10
+ export * from '@theme/Sidebar/MenuGroup';
11
+ export * from '@theme/Sidebar/MenuItem';
12
+ export * from '@theme/Sidebar/MenuItemLabel';
13
+ export * from '@theme/Sidebar/MenuLink';
14
+ export * from '@theme/Sidebar/MenuLinkItem';
15
+ export * from '@theme/Sidebar/MobileSidebarButton';
16
+ export * from '@theme/Sidebar/Separator';
17
+ export * from '@theme/Sidebar/SeparatorItem';
18
+ export * from '@theme/Sidebar/Sidebar';
19
+ export * from '@theme/Sidebar/SidebarLayout';
@@ -1,5 +1,5 @@
1
- export * from './DrilldownMenuProps';
2
- export * from './ItemState';
3
- export * from './MenuItemProps';
4
- export * from './MenuStyle';
5
- export * from './NavItem';
1
+ export * from '@theme/Sidebar/types/DrilldownMenuProps';
2
+ export * from '@theme/Sidebar/types/ItemState';
3
+ export * from '@theme/Sidebar/types/MenuItemProps';
4
+ export * from '@theme/Sidebar/types/MenuStyle';
5
+ export * from '@theme/Sidebar/types/NavItem';
@@ -4,7 +4,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
4
4
  import { SidebarLogo } from '@theme/SidebarLogo';
5
5
 
6
6
  export default {
7
- title: 'SidebarLogo',
7
+ title: 'Components/SidebarLogo',
8
8
  component: SidebarLogo,
9
9
  argTypes: {
10
10
  backgroundColor: { control: 'color' },
@@ -1 +1 @@
1
- export * from './SidebarLogo';
1
+ export * from '@theme/SidebarLogo/SidebarLogo';
@@ -4,7 +4,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
4
4
  import { SourceCode } from '@theme/SourceCode';
5
5
 
6
6
  export default {
7
- title: 'SourceCode',
7
+ title: 'Components/SourceCode',
8
8
  component: SourceCode,
9
9
  } as ComponentMeta<typeof SourceCode>;
10
10
 
@@ -1 +1 @@
1
- export * from './SourceCode';
1
+ export * from '@theme/SourceCode/SourceCode';
@@ -70,7 +70,7 @@ const TocHeader = styled.div`
70
70
 
71
71
  const MenuItem = styled.a<{ depth: number }>`
72
72
  display: block;
73
- color: var(--color-text-main);
73
+ color: var(--color-content);
74
74
  cursor: pointer;
75
75
  font-size: 0.8em;
76
76
  padding: 10px 15px;
@@ -78,11 +78,11 @@ const MenuItem = styled.a<{ depth: number }>`
78
78
  transition: background-color 0.3s, color 0.3s;
79
79
  text-decoration: none;
80
80
  word-break: break-word;
81
- font-family: var(--font-family-h);
81
+ font-family: var(--h-font-family);
82
82
  :hover,
83
83
  &.active {
84
- color: var(--sidebar-text-active-color);
85
- background-color: var(--sidebar-text-active-background-color);
84
+ color: var(--sidebar-item-active-color);
85
+ background-color: var(--sidebar-item-active-background-color);
86
86
  }
87
87
  :empty {
88
88
  padding: 0;
@@ -94,7 +94,7 @@ const TableOfContentMenu = styled.aside`
94
94
  background-color: transparent;
95
95
  flex-shrink: 0;
96
96
  display: none !important;
97
- font-family: var(--font-family-primary);
97
+ font-family: var(--font-family-base);
98
98
 
99
99
  ${({ theme }) => theme.mediaQueries.medium} {
100
100
  width: var(--toc-width);
@@ -106,7 +106,7 @@ const TableOfContentItems = styled.div`
106
106
  position: sticky;
107
107
  top: calc(var(--navbar-height) + 20px);
108
108
  max-height: calc(100vh - var(--navbar-height) - 20px);
109
- border-left: 1px solid var(--color-border-light);
109
+ border-left: 1px solid var(--global-border-color);
110
110
  overflow-y: auto;
111
111
  width: var(--toc-width); ;
112
112
  `;
@@ -1 +1 @@
1
- export * from './TableOfContent';
1
+ export * from '@theme/TableOfContent/TableOfContent';
@@ -4,7 +4,7 @@ import { ComponentStory, ComponentMeta } from '@storybook/react';
4
4
  import { Tooltip } from '@theme/Tooltip';
5
5
 
6
6
  export default {
7
- title: 'Tooltip',
7
+ title: 'Components/Tooltip',
8
8
  component: Tooltip,
9
9
  } as ComponentMeta<typeof Tooltip>;
10
10
 
@@ -1 +1 @@
1
- export * from './Tooltip';
1
+ export * from '@theme/Tooltip/Tooltip';
@@ -0,0 +1,7 @@
1
+ import { Meta } from '@storybook/addon-docs';
2
+
3
+ <Meta title="Welcome" />
4
+
5
+ # @redocly/theme
6
+
7
+ Welcome to storybook for [@redocly/theme](https://www.npmjs.com/package/@redocly/theme) package.
@@ -317,7 +317,7 @@ export const GlobalStyle = createGlobalStyle`
317
317
  --samples-panel-width: 50%;
318
318
  --samples-panel-block-background-color: #fff;
319
319
  --samples-panel-background-color: #52606d;
320
- --samples-panel-callback-background-color: var(--samples-panel-callback-background-color);
320
+ --samples-panel-callback-background-color: var(--color-secondary-300);
321
321
  --samples-panel-controls-background-color: #323f4b;
322
322
  --samples-panel-controls-hover-background-color: #3c4c5a;
323
323
  --samples-panel-controls-active-border-color: var(--color-accent-500);
@@ -421,21 +421,53 @@ export const GlobalStyle = createGlobalStyle`
421
421
  --fab-color: #0065FB;
422
422
  --fab-background-color: #f2f2f2;
423
423
 
424
+ //* PORTAL settings *//
424
425
  /**
425
- * Portal Logo
426
+ * Headings
427
+ * */
428
+ --h2-font-weight: var(--font-weight-bold);
429
+
430
+ --h1-margin-top: 1.35em;
431
+ --h1-margin-bottom: 0.9em;
432
+ --h2-margin-top: 1.25em;
433
+ --h2-margin-bottom: 0.8em;
434
+ --h3-margin-top: 1.25em;
435
+ --h3-margin-bottom: 0.8em;
436
+
437
+ /**
438
+ * Footer
439
+ * */
440
+ --footer-background-color: var(--color-primary-500);
441
+ --footer-text-color: #fff;
442
+
443
+ /**
444
+ * Sidebar
445
+ * */
446
+ --sidebar-padding-horizontal: var(--sidebar-spacing-unit);
447
+ --sidebar-padding-vertical: var(--sidebar-spacing-unit);
448
+
449
+ --sidebar-spacing-padding-vertical: var(--sidebar-spacing-unit);
450
+ --sidebar-spacing-padding-horizontal: var(--sidebar-spacing-unit);
451
+
452
+ --sidebar-border-radius: 4px;
453
+ --sidebar-font-size: var(--font-size-base);
454
+ --sidebar-font-family: var(--font-family-base);
455
+
456
+ /**
457
+ * Logo
426
458
  * */
427
459
  --logo-height: 2rem;
428
460
  --logo-margin: var(--sidebar-margin-left);
429
461
 
430
462
  /**
431
- * Portal Navbar
463
+ * Navbar
432
464
  * */
433
465
  --navbar-height: 60px;
434
- --navbar-color-text: var(--color-content-inverse);
435
- --navbar-color-background: var(--color-primary-500);
466
+ --navbar-text-color: #fff;
467
+ --navbar-background-color: var(--color-primary-500);
436
468
 
437
469
  /**
438
- * Portal Navbar Item
470
+ * Navbar Item
439
471
  * */
440
472
  --navbar-item-font-size: 16px;
441
473
  --navbar-item-margin-horizontal: 0;
@@ -443,7 +475,70 @@ export const GlobalStyle = createGlobalStyle`
443
475
  --navbar-item-border-radius: 10px;
444
476
  --navbar-item-font-weight: var(--font-weight-bold);
445
477
  --navbar-item-active-background-color: #1b75fa;
446
- --navbar-item-active-text-color: var(--color-primary-contrast);
478
+ --navbar-item-active-text-color: var(--navbar-text-color);
447
479
  --navbar-item-active-text-decoration: none;
480
+
481
+ /**
482
+ * TOC
483
+ * */
484
+ --toc-width: 240px;
485
+
486
+ /**
487
+ * Markdown
488
+ * */
489
+ --content-wrapper-max-width: 910px;
490
+ --content-wrapper-padding-vertical: 25px;
491
+ --content-wrapper-padding-horizontal: 0px;
492
+
493
+ /**
494
+ * Bloquote
495
+ * */
496
+ --bloquote-margin-vertical: 1.5em;
497
+ --bloquote-margin-horizontal: 0;
498
+ --bloquote-padding-vertical: 0;
499
+ --bloquote-padding-horizontal: calc(var(--spacing-unit) * 4);
500
+ --bloquote-background-color: transparent;
501
+
502
+ /**
503
+ * Admonition
504
+ * */
505
+ --admonition-margin-horizontal: 0;
506
+ --admonition-margin-vertical: calc(var(--spacing-unit) * 2);
507
+ --admonition-padding-horizontal: calc(var(--spacing-unit) * 4);
508
+ --admonition-padding-vertical: calc(var(--spacing-unit) * 4);
509
+ --admonition-icon-size: 25px;
510
+ --admonition-border-radius: 8px;
511
+ --admonition-font-size: 16px;
512
+ --admonition-font-weight: normal;
513
+ --admonition-line-height: 1.5em;
514
+ --admonition-heading-font-size: 16px;
515
+ --admonition-heading-font-weight: var(--font-weight-bold);
516
+ --admonition-heading-letter-spacing: 0.3px;
517
+ --admonition-heading-transform: uppercase;
518
+
519
+ /* info */
520
+ --admonition-info-background-color: #ebedf0;
521
+ --admonition-info-text-color: var(--color-content);
522
+ --admonition-info-icon-color: #4782cb;
523
+
524
+ /* attention */
525
+ --admonition-attention-background-color: #e6eef8;
526
+ --admonition-attention-text-color: var(--color-content);
527
+ --admonition-attention-icon-color: #4782cb;
528
+
529
+ /* warning */
530
+ --admonition-warning-background-color: #feeda5;
531
+ --admonition-warning-text-color: var(--color-content);
532
+ --admonition-warning-icon-color: #d4ad03;
533
+
534
+ /* danger */
535
+ --admonition-danger-background-color: #fceaea;
536
+ --admonition-danger-text-color: var(--color-content);
537
+ --admonition-danger-icon-color: #e53935;
538
+
539
+ /* success */
540
+ --admonition-success-background-color: #ddffe1;
541
+ --admonition-success-text-color: var(--color-content);
542
+ --admonition-success-icon-color: #00aa13;
448
543
  }
449
544
  `;
@@ -1,7 +1,7 @@
1
- export * from './useControl';
2
- export * from './useMount';
3
- export * from './useUnmount';
4
- export * from './useActiveHeading';
5
- export * from './useActiveSectionId';
6
- export * from './useFullHeight';
7
- export * from './useNavbarHeight';
1
+ export * from '@theme/hooks/useControl';
2
+ export * from '@theme/hooks/useMount';
3
+ export * from '@theme/hooks/useUnmount';
4
+ export * from '@theme/hooks/useActiveHeading';
5
+ export * from '@theme/hooks/useActiveSectionId';
6
+ export * from '@theme/hooks/useFullHeight';
7
+ export * from '@theme/hooks/useNavbarHeight';
@@ -1,14 +1,14 @@
1
+ import { Location } from 'history';
1
2
  import { useEffect, useState, useMemo } from 'react';
2
3
  import throttle from 'lodash.throttle';
3
4
 
4
5
  import { useNavbarHeight } from '@theme/hooks/useNavbarHeight';
5
- import type { MenuProps } from '@theme/types/portal';
6
6
 
7
7
  export type UseActiveSectionIdReturnType = string;
8
8
 
9
9
  export function useActiveSectionId(
10
- location: MenuProps['location'],
11
- hasOverviewPage: boolean,
10
+ location: Location,
11
+ hasOverviewPage = false,
12
12
  ): UseActiveSectionIdReturnType {
13
13
  const [itemId, setItemId] = useState<string>('');
14
14
  const navbarHeight = useNavbarHeight(location);
@@ -1,2 +1,2 @@
1
- export { ShelfIcon } from './ShelfIcon';
2
- export type { ShelfIconProps } from './ShelfIcon';
1
+ export { ShelfIcon } from '@theme/icons/ShelfIcon/ShelfIcon';
2
+ export type { ShelfIconProps } from '@theme/icons/ShelfIcon/ShelfIcon';
@@ -1 +1 @@
1
- export * from './ShelfIcon';
1
+ export * from '@theme/icons/ShelfIcon';
@@ -2,5 +2,4 @@ export * from './src/client/styling';
2
2
  export * from './src/client/app/Sidebar/types';
3
3
  export * from './src/server/plugins/portal-config/types';
4
4
  export * from './src/shared/types';
5
- export * from './src/server/plugins/versions/types';
6
5
  export type { MdHeading } from './src/server/plugins/markdown/types';
@@ -1,50 +1,41 @@
1
- import { Location } from 'history';
2
1
  import { MenuStyle } from '../../../shared/types';
3
- import type { Version } from '../../../server/plugins/versions/types';
4
2
  export interface SidebarNavItem {
5
- label?: string;
6
- sublabel?: string;
7
- icon?: string;
8
- link?: string;
9
- type?: string;
10
- httpVerb?: string;
11
- expanded?: string;
12
- selectFirstItemOnExpand?: boolean;
13
- pageId?: string;
14
- redocPrevLink?: string;
15
- redocPrevLabel?: string;
16
- redocNextLink?: string;
17
- redocNextLabel?: string;
18
- redocFakePage?: boolean;
19
- redocInfoPageId?: string;
20
- target?: string;
21
- external?: boolean;
22
- items?: SidebarNavItem[];
23
- permission?: string;
24
- menuStyle?: MenuStyle;
25
- separatorLine?: boolean;
26
- version?: string;
27
- default?: boolean;
3
+ label?: string;
4
+ sublabel?: string;
5
+ icon?: string;
6
+ link?: string;
7
+ type?: string;
8
+ httpVerb?: string;
9
+ expanded?: string;
10
+ selectFirstItemOnExpand?: boolean;
11
+ pageId?: string;
12
+ redocPrevLink?: string;
13
+ redocPrevLabel?: string;
14
+ redocNextLink?: string;
15
+ redocNextLabel?: string;
16
+ redocFakePage?: boolean;
17
+ redocInfoPageId?: string;
18
+ target?: string;
19
+ external?: boolean;
20
+ items?: SidebarNavItem[];
21
+ permission?: string;
22
+ menuStyle?: MenuStyle;
23
+ separatorLine?: boolean;
24
+ version?: string;
28
25
  }
29
26
  export interface ItemState extends SidebarNavItem {
30
- items: ItemState[];
31
- active: boolean;
32
- hasActiveSubItem: boolean;
33
- menuStyle?: MenuStyle | null;
34
- }
35
- export interface MenuProps {
36
- items: SidebarNavItem[];
37
- location: Location;
38
- pageId: string;
39
- versions?: Version[];
27
+ items: ItemState[];
28
+ active: boolean;
29
+ hasActiveSubItem: boolean;
30
+ menuStyle?: MenuStyle | null;
40
31
  }
41
32
  export declare enum MenuType {
42
- Separator = 'separator',
43
- DrillDown = 'drilldown',
44
- Group = 'group',
45
- Operation = 'operation',
33
+ Separator = "separator",
34
+ DrillDown = "drilldown",
35
+ Group = "group",
36
+ Operation = "operation"
46
37
  }
47
38
  export interface MenuItemProps {
48
- item: ItemState;
49
- activeItem?: ItemState;
39
+ item: ItemState;
40
+ activeItem?: ItemState;
50
41
  }
@@ -1,7 +1,7 @@
1
1
  export declare const breakpoints: {
2
- small: string;
3
- medium: string;
4
- large: string;
2
+ small: string;
3
+ medium: string;
4
+ large: string;
5
5
  };
6
- export declare const mediaQueries: import('@theme/utils/media-css').MediaQueries;
6
+ export declare const mediaQueries: import("@theme/utils/media-css").MediaQueries;
7
7
  export type { MediaQueries } from '@theme/utils/media-css';