@redocly/theme 0.1.9 → 0.1.12

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 (259) 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/NavbarMenu.js +1 -1
  35. package/Navbar/index.d.ts +3 -0
  36. package/Navbar/index.js +19 -0
  37. package/NavbarLogo/NavbarLogo.d.ts +6 -0
  38. package/{Logo/Logo.js → NavbarLogo/NavbarLogo.js} +8 -5
  39. package/NavbarLogo/index.d.ts +1 -0
  40. package/{Logo → NavbarLogo}/index.js +1 -1
  41. package/OperationBadge/index.d.ts +1 -1
  42. package/OperationBadge/index.js +1 -1
  43. package/PageNavigation/index.d.ts +3 -0
  44. package/PageNavigation/index.js +19 -0
  45. package/Panel/index.d.ts +8 -8
  46. package/Panel/index.js +8 -8
  47. package/REAMDE.md +1 -0
  48. package/SamplesPanelControls/index.d.ts +1 -1
  49. package/SamplesPanelControls/index.js +1 -1
  50. package/Search/Autocomplete.js +1 -1
  51. package/Search/ClearIcon.js +2 -2
  52. package/Search/Input.js +1 -1
  53. package/Search/Parameters.js +2 -2
  54. package/Search/Popover.js +1 -1
  55. package/Search/SearchIcon.js +2 -2
  56. package/Search/SearchItem.js +2 -2
  57. package/Search/index.d.ts +9 -9
  58. package/Search/index.js +9 -9
  59. package/Search/utils.js +1 -1
  60. package/Sidebar/ApiCallItem.js +1 -1
  61. package/Sidebar/BackButton.js +1 -1
  62. package/Sidebar/DrilldownMenuItem.js +3 -3
  63. package/Sidebar/Menu.js +1 -1
  64. package/Sidebar/MenuItemLabel.js +2 -2
  65. package/Sidebar/MenuLink.js +1 -1
  66. package/Sidebar/MobileSidebarButton.js +1 -1
  67. package/Sidebar/Sidebar.js +1 -1
  68. package/Sidebar/index.d.ts +19 -19
  69. package/Sidebar/index.js +19 -19
  70. package/Sidebar/types/index.d.ts +5 -5
  71. package/Sidebar/types/index.js +5 -5
  72. package/SidebarLogo/index.d.ts +1 -1
  73. package/SidebarLogo/index.js +1 -1
  74. package/SourceCode/index.d.ts +1 -1
  75. package/SourceCode/index.js +1 -1
  76. package/TableOfContent/TableOfContent.js +7 -8
  77. package/TableOfContent/index.d.ts +1 -1
  78. package/TableOfContent/index.js +1 -1
  79. package/Tooltip/index.d.ts +1 -1
  80. package/Tooltip/index.js +1 -1
  81. package/globalStyle.d.ts +1 -0
  82. package/globalStyle.js +25 -3
  83. package/hooks/index.d.ts +7 -7
  84. package/hooks/index.js +7 -7
  85. package/hooks/useActiveSectionId.d.ts +2 -2
  86. package/hooks/useActiveSectionId.js +1 -0
  87. package/icons/ShelfIcon/index.d.ts +2 -2
  88. package/icons/ShelfIcon/index.js +1 -1
  89. package/icons/index.d.ts +1 -1
  90. package/icons/index.js +1 -1
  91. package/mocks/Link.js +4 -1
  92. package/mocks/hooks/usePageData.js +4 -1
  93. package/package.json +1 -1
  94. package/src/Button/index.ts +1 -1
  95. package/src/CodeBlock/index.ts +1 -1
  96. package/src/CopyButton/index.ts +2 -2
  97. package/src/Footer/Footer.tsx +5 -8
  98. package/src/Footer/FooterColumn.tsx +7 -7
  99. package/src/Footer/FooterColumns.tsx +3 -1
  100. package/src/Footer/FooterCopyright.tsx +5 -3
  101. package/src/Footer/index.ts +4 -4
  102. package/src/Headings/index.ts +1 -1
  103. package/src/JsonViewer/index.ts +2 -2
  104. package/src/Layout/index.ts +2 -2
  105. package/src/Markdown/Admonition.tsx +15 -15
  106. package/src/Markdown/CodeSample/index.ts +3 -3
  107. package/src/Markdown/Heading.tsx +4 -1
  108. package/src/Markdown/MarkdownLayout.tsx +2 -2
  109. package/src/Markdown/StyledMarkdown.tsx +27 -27
  110. package/src/Markdown/Tabs/index.ts +2 -2
  111. package/src/Markdown/index.ts +9 -9
  112. package/src/Navbar/Navbar.tsx +2 -3
  113. package/src/Navbar/NavbarItem.tsx +1 -1
  114. package/src/Navbar/NavbarMenu.tsx +1 -1
  115. package/src/Navbar/index.ts +3 -0
  116. package/src/NavbarLogo/NavbarLogo.tsx +24 -0
  117. package/src/NavbarLogo/index.ts +1 -0
  118. package/src/OperationBadge/index.ts +1 -1
  119. package/src/PageNavigation/index.ts +3 -0
  120. package/src/Panel/index.ts +8 -8
  121. package/src/SamplesPanelControls/index.ts +1 -1
  122. package/src/Search/Autocomplete.tsx +1 -1
  123. package/src/Search/ClearIcon.tsx +12 -13
  124. package/src/Search/Input.tsx +7 -7
  125. package/src/Search/Parameters.tsx +2 -2
  126. package/src/Search/Popover.tsx +2 -2
  127. package/src/Search/SearchIcon.tsx +12 -13
  128. package/src/Search/SearchItem.tsx +2 -2
  129. package/src/Search/index.ts +9 -9
  130. package/src/Search/utils.tsx +1 -1
  131. package/src/Sidebar/ApiCallItem.tsx +1 -2
  132. package/src/Sidebar/BackButton.tsx +2 -2
  133. package/src/Sidebar/DrilldownMenuItem.tsx +4 -4
  134. package/src/Sidebar/Menu.tsx +1 -1
  135. package/src/Sidebar/MenuItemLabel.tsx +4 -4
  136. package/src/Sidebar/MenuLink.tsx +1 -1
  137. package/src/Sidebar/MobileSidebarButton.tsx +2 -2
  138. package/src/Sidebar/Sidebar.tsx +1 -1
  139. package/src/Sidebar/index.ts +19 -19
  140. package/src/Sidebar/types/index.ts +5 -5
  141. package/src/SidebarLogo/index.ts +1 -1
  142. package/src/SourceCode/index.ts +1 -1
  143. package/src/TableOfContent/TableOfContent.tsx +12 -10
  144. package/src/TableOfContent/index.ts +1 -1
  145. package/src/Tooltip/index.ts +1 -1
  146. package/src/globalStyle.ts +793 -441
  147. package/src/hooks/index.ts +7 -7
  148. package/src/hooks/useActiveSectionId.ts +3 -3
  149. package/src/icons/ShelfIcon/index.ts +2 -2
  150. package/src/icons/index.ts +1 -1
  151. package/src/mocks/Link.tsx +5 -2
  152. package/src/mocks/hooks/usePageData.ts +4 -1
  153. package/src/types/portal/index.d.ts +0 -1
  154. package/src/types/portal/src/client/app/Sidebar/types.d.ts +32 -41
  155. package/src/types/portal/src/client/app/media-css.d.ts +4 -4
  156. package/src/types/portal/src/client/styling/default.d.ts +585 -391
  157. package/src/types/portal/src/client/styling/index.d.ts +2 -6
  158. package/src/types/portal/src/server/constants.d.ts +5 -9
  159. package/src/types/portal/src/server/plugins/markdown/types.d.ts +14 -19
  160. package/src/types/portal/src/server/plugins/portal-config/types.d.ts +12 -12
  161. package/src/types/portal/src/server/plugins/types.d.ts +55 -0
  162. package/src/types/portal/src/server/store.d.ts +49 -97
  163. package/src/types/portal/src/server/utils/async.d.ts +1 -5
  164. package/src/types/portal/src/server/utils/content-provider.d.ts +51 -0
  165. package/src/types/portal/src/server/utils/index.d.ts +1 -1
  166. package/src/types/portal/src/server/utils/paths.d.ts +10 -13
  167. package/src/types/portal/src/server/utils/reporter/formatter.d.ts +8 -8
  168. package/src/types/portal/src/server/utils/reporter/reporter.d.ts +15 -15
  169. package/src/types/portal/src/server/version-store.d.ts +35 -0
  170. package/src/types/portal/src/shared/constants.d.ts +6 -6
  171. package/src/types/portal/src/shared/types.d.ts +97 -58
  172. package/src/types/portal/src/shared/urls.d.ts +2 -1
  173. package/src/ui/AlertIcon.tsx +8 -7
  174. package/src/ui/Background.tsx +3 -3
  175. package/src/ui/Dropdown.tsx +4 -4
  176. package/src/ui/Jumbotron.tsx +3 -3
  177. package/src/ui/Tiles/TileHeader.ts +1 -1
  178. package/src/ui/Tiles/TileText.tsx +2 -2
  179. package/src/ui/Tiles/index.ts +4 -4
  180. package/src/ui/Typography.tsx +27 -27
  181. package/src/ui/UniversalLink.tsx +3 -8
  182. package/src/utils/isUrl.ts +4 -4
  183. package/ui/AlertIcon.d.ts +3 -2
  184. package/ui/AlertIcon.js +2 -2
  185. package/ui/Background.js +1 -1
  186. package/ui/Dropdown.js +3 -3
  187. package/ui/Jumbotron.js +3 -3
  188. package/ui/Tiles/TileHeader.js +1 -1
  189. package/ui/Tiles/TileText.js +1 -1
  190. package/ui/Tiles/index.d.ts +4 -4
  191. package/ui/Tiles/index.js +4 -4
  192. package/ui/Typography.js +23 -23
  193. package/ui/UniversalLink.js +1 -5
  194. package/utils/isUrl.d.ts +2 -2
  195. package/utils/isUrl.js +4 -4
  196. package/Logo/Logo.d.ts +0 -5
  197. package/Logo/index.d.ts +0 -1
  198. package/src/Button/Button.stories.tsx +0 -74
  199. package/src/Button/__tests__/Button.test.tsx +0 -42
  200. package/src/Button/__tests__/__snapshots__/Button.test.tsx.snap +0 -274
  201. package/src/CodeBlock/__tests__/CodeBlock.test.tsx +0 -12
  202. package/src/CodeBlock/__tests__/__snapshots__/CodeBlock.test.tsx.snap +0 -140
  203. package/src/CopyButton/CopyButton.stories.tsx +0 -18
  204. package/src/CopyButton/__tests__/CopyButton.test.tsx +0 -35
  205. package/src/CopyButton/__tests__/CopyButtonWrapper.test.tsx +0 -17
  206. package/src/CopyButton/__tests__/__snapshots__/CopyButton.test.tsx.snap +0 -55
  207. package/src/CopyButton/__tests__/__snapshots__/CopyButtonWrapper.test.tsx.snap +0 -46
  208. package/src/Headings/Headings.stories.tsx +0 -36
  209. package/src/Headings/__tests__/Headings.test.tsx +0 -24
  210. package/src/Headings/__tests__/__snapshots__/Headings.test.tsx.snap +0 -57
  211. package/src/Introduction.stories.mdx +0 -7
  212. package/src/JsonViewer/JsonViewer.stories.tsx +0 -57
  213. package/src/JsonViewer/__tests__/JsonViewer.test.tsx +0 -83
  214. package/src/JsonViewer/__tests__/__snapshots__/JsonViewer.test.tsx.snap +0 -2728
  215. package/src/Logo/Logo.tsx +0 -17
  216. package/src/Logo/index.ts +0 -1
  217. package/src/Navbar/Navbar.stories.tsx +0 -28
  218. package/src/OperationBadge/OperationBadge.stories.tsx +0 -35
  219. package/src/OperationBadge/__tests__/OperationBadge.test.tsx +0 -59
  220. package/src/OperationBadge/__tests__/__snapshots__/OperationBadge.test.tsx.snap +0 -651
  221. package/src/Panel/CodePanel.stories.tsx +0 -26
  222. package/src/Panel/ContentPanel.stories.tsx +0 -26
  223. package/src/Panel/Panel.stories.tsx +0 -56
  224. package/src/Panel/__tests__/CodePanel.test.tsx +0 -26
  225. package/src/Panel/__tests__/ContentPanel.test.tsx +0 -26
  226. package/src/Panel/__tests__/Panel.test.tsx +0 -53
  227. package/src/Panel/__tests__/__snapshots__/CodePanel.test.tsx.snap +0 -258
  228. package/src/Panel/__tests__/__snapshots__/ContentPanel.test.tsx.snap +0 -278
  229. package/src/Panel/__tests__/__snapshots__/Panel.test.tsx.snap +0 -398
  230. package/src/SamplesPanelControls/SamplesControlButton.stories.tsx +0 -18
  231. package/src/SamplesPanelControls/__tests__/SamplesPanelControls.test.tsx +0 -36
  232. package/src/SamplesPanelControls/__tests__/__snapshots__/SamplesPanelControls.test.tsx.snap +0 -228
  233. package/src/SidebarLogo/SidebarLogo.stories.tsx +0 -21
  234. package/src/SidebarLogo/__tests__/SidebarLogo.test.tsx +0 -32
  235. package/src/SidebarLogo/__tests__/__snapshots__/SidebarLogo.test.tsx.snap +0 -62
  236. package/src/SourceCode/SourceCode.stories.tsx +0 -29
  237. package/src/SourceCode/__tests__/SourceCode.test.tsx +0 -48
  238. package/src/SourceCode/__tests__/__snapshots__/SourceCode.test.tsx.snap +0 -786
  239. package/src/TableOfContent/TableOfContent.stories.tsx +0 -39
  240. package/src/Tooltip/Tooltip.stories.tsx +0 -27
  241. package/src/Tooltip/__tests__/Tooltip.test.tsx +0 -41
  242. package/src/Tooltip/__tests__/__snapshots__/Tooltip.test.tsx.snap +0 -83
  243. package/src/icons/ShelfIcon/ShelfIcon.stories.tsx +0 -36
  244. package/src/icons/ShelfIcon/__tests__/ShelfIcon.test.tsx +0 -54
  245. package/src/icons/ShelfIcon/__tests__/__snapshots__/ShelfIcon.test.tsx.snap +0 -235
  246. package/src/types/portal/src/server/plugins/nav-utils.d.ts +0 -19
  247. package/src/types/portal/src/server/plugins/sidebars/index.d.ts +0 -16
  248. package/src/types/portal/src/server/plugins/versions/index.d.ts +0 -15
  249. package/src/types/portal/src/server/plugins/versions/types.d.ts +0 -23
  250. package/src/types/portal/src/server/plugins/versions/utils.d.ts +0 -10
  251. package/src/types/portal/src/server/utils/watcher.d.ts +0 -16
  252. package/src/utils/__tests__/ClipboardService.test.ts +0 -24
  253. package/src/utils/__tests__/__snapshots__/highlight.test.ts.snap +0 -5
  254. package/src/utils/__tests__/__snapshots__/jsonToHtml.test.ts.snap +0 -5
  255. package/src/utils/__tests__/css-variables.test.ts +0 -20
  256. package/src/utils/__tests__/highlight.test.ts +0 -51
  257. package/src/utils/__tests__/jsonToHtml.test.ts +0 -40
  258. package/src/utils/__tests__/media-css.test.ts +0 -20
  259. package/src/utils/__tests__/theme-helpers.test.ts +0 -25
@@ -1,449 +1,801 @@
1
- import { createGlobalStyle } from 'styled-components';
1
+ import { createGlobalStyle, css } from 'styled-components';
2
2
 
3
- export const GlobalStyle = createGlobalStyle`
3
+ const baseColors = css`
4
+ /* === Palette === */
5
+
6
+ /**
7
+ * @tokens Base Colors
8
+ * @presenter Color
9
+ */
10
+ --color-primary-100: #62a1ff;
11
+ --color-primary-200: #4892ff;
12
+ --color-primary-300: #2f83ff;
13
+ --color-primary-400: #1573ff;
14
+ --color-primary-500: #0065fb;
15
+ --color-primary-600: #005be2;
16
+ --color-primary-700: #0050c8;
17
+ --color-primary-800: #0046af;
18
+ --color-primary-900: #003c95;
19
+
20
+ --color-secondary-100: #ffffff;
21
+ --color-secondary-200: #f5f7fa;
22
+ --color-secondary-300: #f3f4f6;
23
+ --color-secondary-400: #e4e7eb;
24
+ --color-secondary-500: #d5dae0;
25
+ --color-secondary-600: #c7cdd5;
26
+ --color-secondary-700: #b8c0ca;
27
+ --color-secondary-800: #a9b3c0;
28
+ --color-secondary-900: #9ba6b5;
29
+
30
+ --color-emphasis-100: #ffffff;
31
+ --color-emphasis-200: #e9eaec;
32
+ --color-emphasis-300: #cdd0d5;
33
+ --color-emphasis-400: #b2b6bd;
34
+ --color-emphasis-500: #969ca6;
35
+ --color-emphasis-600: #7a828f;
36
+ --color-emphasis-700: #626974;
37
+ --color-emphasis-800: #4b5058;
38
+ --color-emphasis-900: #1c1e21;
39
+
40
+ --color-accent-100: #b3dcf3;
41
+ --color-accent-200: #a6dfff;
42
+ --color-accent-300: #8cd5ff;
43
+ --color-accent-400: #73ccff;
44
+ --color-accent-500: #59c3ff;
45
+ --color-accent-600: #40baff;
46
+ --color-accent-700: #26b1ff;
47
+ --color-accent-800: #0da7ff;
48
+ --color-accent-900: #009bf2;
49
+
50
+ --color-success-100: #98eda0;
51
+ --color-success-200: #82e98c;
52
+ --color-success-300: #6ce678;
53
+ --color-success-400: #57e264;
54
+ --color-success-500: #41de50;
55
+ --color-success-600: #2bda3c;
56
+ --color-success-700: #23c933;
57
+ --color-success-800: #1fb32d;
58
+ --color-success-900: #1b9e28;
59
+
60
+ --color-warning-100: #ffc966;
61
+ --color-warning-200: #ffc04d;
62
+ --color-warning-300: #ffb733;
63
+ --color-warning-400: #ffae1a;
64
+ --color-warning-500: #ffa500;
65
+ --color-warning-600: #e69400;
66
+ --color-warning-700: #cc8400;
67
+ --color-warning-800: #b37300;
68
+ --color-warning-900: #996300;
69
+
70
+ --color-error-100: #ffc7c7;
71
+ --color-error-200: #ffaeae;
72
+ --color-error-300: #ff9494;
73
+ --color-error-400: #ff7b7b;
74
+ --color-error-500: #ff6161;
75
+ --color-error-600: #ff4747;
76
+ --color-error-700: #ff2e2e;
77
+ --color-error-800: #ff1414;
78
+ --color-error-900: #ff0000;
79
+
80
+ // @tokens End
81
+ `;
82
+
83
+ const httpColors = css`
84
+ /**
85
+ * @tokens HTTP Colors
86
+ * @presenter Color
87
+ */
88
+ --color-http-get: #3a9601;
89
+ --color-http-post: #0065fb;
90
+ --color-http-put: #93527b;
91
+ --color-http-options: #947014;
92
+ --color-http-patch: #bf581d;
93
+ --color-http-delete: #c83637;
94
+ --color-http-basic: #707070;
95
+ --color-http-link: #07818f;
96
+ --color-http-head: #a23dad;
97
+ --color-http-hook: var(--color-http-post);
98
+ // @tokens End
99
+ `;
100
+
101
+ const responseColors = css`
102
+ /**
103
+ * @tokens Response colors
104
+ * @presenter Color
105
+ */
106
+ --response-success-border-color: #b1e996;
107
+ --response-success-background-color: #f6fff4;
108
+ --response-success-text-color: var(--response-success-border-color);
109
+
110
+ --response-error-border-color: #ffc9c9;
111
+ --response-error-background-color: #fff4f4;
112
+ --response-error-text-color: var(--response-error-border-color);
113
+
114
+ --response-redirect-border-color: var(--color-warning-500);
115
+ --response-redirect-background-color: #ffa5001a;
116
+ --response-redirect-text-color: var(--response-redirect-border-color);
117
+
118
+ --response-info-border-color: #87ceeb;
119
+ --response-info-background-color: #87ceeb1a;
120
+ --response-info-text-color: var(--response-info-border-color);
121
+
122
+ // @tokens End
123
+ `;
124
+
125
+ const typography = css`
126
+ /* === Typography === */
127
+
128
+ /**
129
+ * @tokens Typography Colors
130
+ * @presenter Color
131
+ */
132
+ --color-content: #1f2933;
133
+ --color-content-inverse: var(--color-secondary-200);
134
+ --color-content-secondary: #7b8794;
135
+
136
+ /**
137
+ * @tokens Font Sizes
138
+ * @presenter FontSize
139
+ */
140
+ --font-size-base: 14px;
141
+ --font-size-small: 12px;
142
+
143
+ /**
144
+ * @tokens Line Heights
145
+ * @presenter LineHeight
146
+ */
147
+ --line-height-base: 1.5em;
148
+
149
+ /**
150
+ * @tokens Font Weights
151
+ * @presenter FontWeight
152
+ */
153
+ --font-weight-regular: 400;
154
+ --font-weight-bold: 600;
155
+ --font-weight-bolder: 700;
156
+
157
+ /**
158
+ * @tokens Font Families
159
+ * @presenter FontFamily
160
+ */
161
+ --font-family-base: Source Sans Pro, sans-serif;
162
+ --font-family-monospaced: Source Code Pro, monospace;
163
+
164
+ /**
165
+ * @tokens Rendering
166
+ */
167
+ --smoothing: antialiased; // text-smoothing
168
+ --text-rendering: optimizeSpeed; // text-rendering
169
+
170
+ // TODO: Not sure if Spacing should be in typography
171
+ /**
172
+ * @tokens Spacings
173
+ * @presenter Spacing
174
+ */
175
+ --spacing-unit: 5px;
176
+ --spacing-horizontal: calc(var(--spacing-unit) * 8);
177
+ --spacing-vertical: calc(var(--spacing-unit) * 4);
178
+
179
+ // @tokens End
180
+ `;
181
+
182
+ const headingsTypography = css`
183
+ // --h-{css-property-name} is fallback for h1...h6
184
+
185
+ /**
186
+ * @tokens Typography headings font
187
+ */
188
+ --h-font-family: Source Sans Pro, sans-serif; // @presenter FontFamily
189
+ --h-font-weight: var(--font-weight-bolder); // @presenter FontWeight
190
+ --h2-font-weight: var(--font-weight-bold); // @presenter FontWeight
191
+
192
+ /**
193
+ * @tokens Typography headings color
194
+ * @presenter Color
195
+ */
196
+ --h-color: var(--color-content);
197
+
198
+ /**
199
+ * @tokens Typography headings font size
200
+ * @presenter FontSize
201
+ */
202
+ --h1-font-size: 36px;
203
+ --h2-font-size: 28px;
204
+ --h3-font-size: 18px;
205
+ --h4-font-size: 16px;
206
+ --h5-font-size: 14px;
207
+ --h6-font-size: 12px;
208
+
209
+ /**
210
+ * @tokens Typography headings line height
211
+ * @presenter LineHeight
212
+ */
213
+ --h1-line-height: 36px;
214
+ --h2-line-height: 28px;
215
+ --h3-line-height: 18px;
216
+ --h4-line-height: 16px;
217
+ --h5-line-height: 14px;
218
+ --h6-line-height: 12px;
219
+
220
+ /**
221
+ * @tokens Typography headings margin
222
+ * @presenter Spacing
223
+ */
224
+ --h1-margin-top: 1.35em;
225
+ --h1-margin-bottom: 0.9em;
226
+ --h2-margin-top: 1.25em;
227
+ --h2-margin-bottom: 0.8em;
228
+ --h3-margin-top: 1.25em;
229
+ --h3-margin-bottom: 0.8em;
230
+ // @tokens End
231
+ `;
232
+
233
+ const borders = css`
234
+ /**
235
+ * @tokens Borders
236
+ * @presenter Border
237
+ */
238
+ --global-border-width: 1px;
239
+
240
+ /**
241
+ * @tokens Border Radius
242
+ * @presenter BorderRadius
243
+ */
244
+ --global-border-radius: 4px;
245
+
246
+ /**
247
+ * @tokens Border Colors
248
+ * @presenter Color
249
+ */
250
+ --global-border-color: var(--color-secondary-400);
251
+ --global-border-color-secondary: #616e7c;
252
+ --global-background-color: transparent;
253
+
254
+ // @tokens End
255
+ `;
256
+
257
+ const buttons = css`
4
258
  /*
5
259
  * Static classnames that can be used to override styles for components:
6
260
  * download-specification-button, next-section-button, button-base
7
261
  */
262
+
263
+ /**
264
+ * @tokens Button default colors
265
+ */
266
+ --button-color: white; // @presenter Color
267
+ --button-background-color: var(--color-emphasis-500); // @presenter Color
268
+ --button-hover-background-color: var(--color-emphasis-600); // @presenter Color
269
+ --button-active-background-color: var(--color-emphasis-700); // @presenter Color
270
+ --button-outlined-active-border-color: var(--color-emphasis-800); // @presenter Color
271
+
272
+ /**
273
+ * @tokens Button primary colors
274
+ */
275
+ .button-color-primary {
276
+ --button-color: white; // @presenter Color
277
+ --button-background-color: var(--color-primary-500); // @presenter Color
278
+ --button-hover-background-color: var(--color-primary-600); // @presenter Color
279
+ --button-active-background-color: var(--color-primary-700); // @presenter Color
280
+ --button-outlined-active-border-color: var(--color-primary-800); // @presenter Color
281
+ }
282
+
283
+ /**
284
+ * @tokens Button secondary colors
285
+ */
286
+ .button-color-secondary {
287
+ --button-color: var(--color-emphasis-800); // @presenter Color
288
+ --button-background-color: var(--color-secondary-400); // @presenter Color
289
+ --button-hover-background-color: var(--color-secondary-500); // @presenter Color
290
+ --button-active-background-color: var(--color-secondary-600); // @presenter Color
291
+ --button-outlined-active-border-color: var(--color-secondary-700); // @presenter Color
292
+ }
293
+
294
+ /**
295
+ * @tokens Button borders
296
+ */
297
+ --button-border-radius: var(--global-border-radius); // @presenter BorderRadius
298
+ --button-box-shadow: none; // @presenter Shadow
299
+ --button-active-box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.1); // @presenter Shadow
300
+
301
+ /**
302
+ * @tokens Button typography
303
+ */
304
+ --button-font-family: inherit; // @presenter FontFamily
305
+ --button-font-weight: var(--font-weight-bold); // @presenter FontWeight
306
+ --button-small-font-size: 12px; // @presenter FontSize
307
+ --button-small-padding: 8px 10px;
308
+ --button-small-min-width: 90px; // @presenter Spacing
309
+ --button-medium-font-size: 14px; // @presenter FontSize
310
+ --button-medium-padding: 8px 20px;
311
+ --button-medium-min-width: 120px; // @presenter Spacing
312
+ --button-large-font-size: 14px; // @presenter FontSize
313
+ --button-large-padding: 12px 24px;
314
+ --button-large-min-width: 150px; // @presenter Spacing
315
+ --button-xlarge-font-size: 16px; // @presenter FontSize
316
+ --button-xlarge-padding: 20px 24px;
317
+ --button-xlarge-min-width: 200px; // @presenter Spacing
318
+
319
+ // @tokens End
320
+ `;
321
+
322
+ const sidebar = css`
323
+ /* === Sidebar === */
324
+
325
+ /**
326
+ * @tokens Sidebar typography
327
+ */
328
+ --sidebar-font-size: var(--font-size-base);
329
+ --sidebar-font-family: var(--font-family-base);
330
+ --sidebar-word-break: 'inherit';
331
+
332
+ /**
333
+ * @tokens Sidebar colors
334
+ * @presenter Color
335
+ */
336
+ --sidebar-background-color: #fff;
337
+ --sidebar-right-line-color: var(--global-border-color);
338
+ --sidebar-separator-label-color: var(--sidebar-item-color);
339
+ --sidebar-separator-line-color: #dadada;
340
+ --sidebar-chevron-color: var(--sidebar-item-color);
341
+
342
+ /**
343
+ * @tokens Sidebar spacing
344
+ * @presenter Spacing
345
+ */
346
+ --sidebar-width: 285px; // @presenter NO
347
+
348
+ --sidebar-spacing-unit: 8px;
349
+ --sidebar-spacing-horizontal: var(--sidebar-spacing-unit);
350
+ --sidebar-spacing-vertical: var(--sidebar-spacing-unit);
351
+ --sidebar-spacing-offset-top: calc(var(--sidebar-spacing-unit) * 2);
352
+ --sidebar-spacing-offset-left: calc(var(--sidebar-spacing-unit) * 2);
353
+ --sidebar-spacing-offset-nesting: calc(var(--sidebar-spacing-unit) * 2);
354
+
355
+ --sidebar-margin-left: calc(var(--sidebar-spacing-unit) * 2);
356
+ --sidebar-padding-horizontal: var(--sidebar-spacing-unit);
357
+ --sidebar-padding-vertical: var(--sidebar-spacing-unit);
358
+ --sidebar-spacing-padding-vertical: var(--sidebar-spacing-unit); // TODO: seems like duplicated
359
+ --sidebar-spacing-padding-horizontal: var(--sidebar-spacing-unit); // TODO: seems like duplicated
360
+
361
+ --sidebar-chevron-size: var(--sidebar-spacing-unit);
362
+
363
+ /**
364
+ * @tokens Sidebar border
365
+ */
366
+ --sidebar-border-radius: 4px; // @presenter BorderRadius
367
+
368
+ /* === Sidebar Item === */
369
+
370
+ /**
371
+ * @tokens Sidebar item typography
372
+ */
373
+ --sidebar-item-font-family: var(--font-family-base); // @presenter FontFamily
374
+ --sidebar-item-font-size: var(--font-size-base); // @presenter FontSize
375
+
376
+ /**
377
+ * @tokens Sidebar item colors
378
+ * @presenter Color
379
+ */
380
+ --sidebar-item-color: var(--color-content);
381
+ --sidebar-item-active-color: var(--color-content);
382
+ --sidebar-item-background-color: #fff;
383
+ --sidebar-item-active-background-color: var(--global-border-color);
384
+
385
+ /**
386
+ * @tokens Sidebar item spacing
387
+ * @presenter Spacing
388
+ */
389
+ --sidebar-item-spacing-offset-top: calc(var(--sidebar-spacing-unit) * 2);
390
+ --sidebar-item-spacing-offset-left: calc(var(--sidebar-spacing-unit) * 2);
391
+ --sidebar-item-spacing-offset-nesting: calc(var(--sidebar-spacing-unit) * 2);
392
+
393
+ /**
394
+ * @tokens Sidebar item border
395
+ */
396
+ --sidebar-item-border-radius: 4px; // @presenter BorderRadius
397
+
398
+ // @tokens End
399
+ `;
400
+
401
+ const admonition = css`
402
+ /**
403
+ * @tokens Admonition colors
404
+ * @presenter Color
405
+ */
406
+
407
+ /* info */
408
+ --admonition-info-background-color: #ebedf0;
409
+ --admonition-info-text-color: var(--color-content);
410
+ --admonition-info-icon-color: #4782cb;
411
+
412
+ /* attention */
413
+ --admonition-attention-background-color: #e6eef8;
414
+ --admonition-attention-text-color: var(--color-content);
415
+ --admonition-attention-icon-color: #4782cb;
416
+
417
+ /* warning */
418
+ --admonition-warning-background-color: #feeda5;
419
+ --admonition-warning-text-color: var(--color-content);
420
+ --admonition-warning-icon-color: #d4ad03;
421
+
422
+ /* danger */
423
+ --admonition-danger-background-color: #fceaea;
424
+ --admonition-danger-text-color: var(--color-content);
425
+ --admonition-danger-icon-color: #e53935;
426
+
427
+ /* success */
428
+ --admonition-success-background-color: #ddffe1;
429
+ --admonition-success-text-color: var(--color-content);
430
+ --admonition-success-icon-color: #00aa13;
431
+
432
+ /**
433
+ * @tokens Admonition typography
434
+ */
435
+ --admonition-font-size: 16px; // @presenter FontSize
436
+ --admonition-font-weight: normal; // @presenter FontWeight
437
+ --admonition-line-height: 1.5em; // @presenter LineHeight
438
+ --admonition-heading-font-size: 16px; // @presenter FontSize
439
+ --admonition-heading-font-weight: var(--font-weight-bold); // @presenter FontWeight
440
+ --admonition-heading-letter-spacing: 0.3px; // @presenter LetterSpacing
441
+ --admonition-heading-transform: uppercase;
442
+
443
+ /**
444
+ * @tokens Admonition spacing
445
+ * @presenter Spacing
446
+ */
447
+ --admonition-margin-horizontal: 0;
448
+ --admonition-margin-vertical: calc(var(--spacing-unit) * 2);
449
+ --admonition-padding-horizontal: calc(var(--spacing-unit) * 4);
450
+ --admonition-padding-vertical: calc(var(--spacing-unit) * 4);
451
+ --admonition-icon-size: 25px;
452
+
453
+ /**
454
+ * @tokens Admonition border
455
+ */
456
+ --admonition-border-radius: 8px; // @presenter BorderRadius
457
+
458
+ // @tokens End
459
+ `;
460
+
461
+ const panels = css`
462
+ /**
463
+ * @tokens Panel border
464
+ */
465
+ --panels-border-radius: 8px; // @presenter BorderRadius
466
+
467
+ /**
468
+ * @tokens Samples panel
469
+ * @presenter Color
470
+ */
471
+ --samples-panel-gap: 20px;
472
+ --samples-panel-width: 50%;
473
+
474
+ --panels-background-color: #fff;
475
+ --samples-panel-block-background-color: #fff;
476
+ --samples-panel-background-color: #52606d;
477
+ --samples-panel-callback-background-color: var(--color-secondary-300);
478
+ --samples-panel-controls-background-color: #323f4b;
479
+ --samples-panel-controls-hover-background-color: #3c4c5a;
480
+ --samples-panel-controls-active-border-color: var(--color-accent-500);
481
+ --samples-panel-text-color: #fff;
482
+ --samples-panel-heading-color: #fff;
483
+
484
+ --samples-panel-markdown-background-color: #3c4c5a;
485
+ --samples-panel-markdown-border-color: #46596a;
486
+
487
+ /**
488
+ * @tokens Try It panel
489
+ * @presenter Color
490
+ */
491
+
492
+ --try-it-panel-tab-background-color: var(--samples-panel-background-color);
493
+ --try-it-panel-active-tab-background-color: #47535e;
494
+ --try-it-panel-active-tab-border-color: var(--color-accent-500);
495
+ --try-it-panel-disabled-tab-color: rgba(245, 247, 250, 0.7);
496
+ --try-it-panel-controls-background-color: var(--samples-panel-controls-background-color);
497
+ --try-it-panel-action-button-width: auto;
498
+
499
+ /**
500
+ * @tokens Request and Response panel
501
+ * @presenter Color
502
+ */
503
+ --request-and-response-panel-background-color: #fff;
504
+
505
+ // @tokens End
506
+ `;
507
+
508
+ const tooltip = css`
509
+ /**
510
+ * @tokens Tooltip Base
511
+ * @presenter Color
512
+ */
513
+ --tooltip-color: var(--color-secondary-300);
514
+ --tooltip-background-color: #52606d;
515
+
516
+ /**
517
+ * @tokens Tooltip Copy Button
518
+ * @presenter Color
519
+ */
520
+ .tooltip-copy-button {
521
+ --tooltip-color: #000;
522
+ --tooltip-background-color: #fff;
523
+ }
524
+
525
+ // @tokens End
526
+ `;
527
+
528
+ const code = css`
529
+ /**
530
+ * @tokens Code base styles
531
+ */
532
+ --code-font-size: 13px; // @presenter FontSize
533
+ --code-font-family: var(--font-family-monospaced); // @presenter FontFamily
534
+ --code-font-weight: 400; // @presenter FontWeight
535
+ --code-wrap: pre;
536
+
537
+ /**
538
+ * @tokens Inline Code
539
+ */
540
+ --inline-code-font-size: var(--code-font-size); // @presenter FontSize
541
+ --inline-code-font-family: var(--code-font-family); // @presenter FontFamily
542
+ --inline-code-color: #e53935; // @presenter Color
543
+ --inline-code-background-color: var(--color-secondary-200); // @presenter Color
544
+ --inline-code-border-color: var(--global-border-color); // @presenter Color
545
+ --inline-code-border-radius: var(--global-border-radius); // @presenter BorderRadius
546
+
547
+ /**
548
+ * @tokens Code Block
549
+ */
550
+ --code-block-font-size: var(--code-font-size); // @presenter FontSize
551
+ --code-block-font-family: var(--code-font-family); // @presenter FontFamily
552
+ --code-block-color: #f1928f; // @presenter Color
553
+ --code-block-background-color: rgba(217, 205, 199, 0.05); // @presenter Color
554
+ --code-block-border-color: var(--global-border-color); // @presenter Color
555
+ --code-block-border-radius: 8px; // @presenter BorderRadius
556
+ --code-block-max-height: 600px;
557
+ --code-block-word-break: initial;
558
+ --code-block-preformatted-background-color: #323f4b; // @presenter Color
559
+
560
+ // @tokens End
561
+ `;
562
+
563
+ const links = css`
564
+ /**
565
+ * @tokens Links
566
+ */
567
+ --link-color: var(--color-primary-500); // @presenter Color
568
+ --link-decoration: none;
569
+ --link-hover-color: var(--color-primary-100); // @presenter Color
570
+ --link-hover-decoration: underline;
571
+
572
+ // @tokens End
573
+ `;
574
+
575
+ const openapiAndGraphqlDocs = css`
576
+ /* === ref docs and graphql docs specific === */
577
+
578
+ /**
579
+ * @tokens OpenAPI-GraphQL Logo
580
+ */
581
+ --logo-max-height: 285px;
582
+ --logo-max-width: 285px;
583
+ --logo-padding: 2px;
584
+
585
+ /**
586
+ * @tokens OpenAPI-GraphQL Layout
587
+ */
588
+ --layout-buttons-top-offset: 20px; // @presenter Spacing
589
+ --layout-buttons-height: 36px; // @presenter Spacing
590
+ --layout-buttons-width: 36px; // @presenter Spacing
591
+
592
+ --layout-stacked-small-max-width: 90%;
593
+ --layout-stacked-medium-max-width: 75%;
594
+ --layout-stacked-large-max-width: 1200px;
595
+
596
+ --layout-three-panel-small-max-width: 100%;
597
+ --layout-three-panel-medium-max-width: 100%;
598
+ --layout-three-panel-large-max-width: 1800px;
599
+
600
+ --layout-middle-panel-small-max-width: none;
601
+ --layout-middle-panel-medium-max-width: none;
602
+ --layout-middle-panel-large-max-width: none;
603
+
604
+ /**
605
+ * @tokens OpenAPI-GraphQL Schema
606
+ */
607
+ --schema-lines-color: var(--global-border-color); // @presenter Color
608
+ --schema-default-details-width: 70%;
609
+ --schema-type-name-color: var(--color-content-secondary); // @presenter Color
610
+ --schema-type-title-color: var(--color-content-secondary); // @presenter Color
611
+ --schema-require-label-color: var(--color-error-900); // @presenter Color
612
+ --schema-labels-text-size: 0.9em; // @presenter Spacing
613
+ --schema-nesting-spacing: 1em; // @presenter Spacing
614
+ --schema-nested-background-color: var(--color-secondary-200); // @presenter Color
615
+ --schema-chevron-color: var(--color-content); // @presenter Color
616
+ --schema-chevron-size: 9px; // @presenter Spacing
617
+
618
+ --schema-controls-color: var(--color-emphasis-800); // @presenter Color
619
+ --schema-controls-background-color: var(--color-secondary-400); // @presenter Color
620
+ --schema-controls-hover-background-color: var(--color-secondary-500); // @presenter Color
621
+ --schema-controls-border-color: var(--color-secondary-600); // @presenter Color
622
+
623
+ --field-name-font-size: var(--code-font-size); // @presenter FontSize
624
+ --field-name-font-family: var(--code-font-family); // @presenter FontFamily
625
+ --field-example-color: var(--color-content); // @presenter Color
626
+ --field-example-background-color: var(--inline-code-background-color); // @presenter Color
627
+ --field-constraint-color: var(--color-content); // @presenter Color
628
+ --field-constraint-background-color: var(--inline-code-background-color); // @presenter Color
629
+
630
+ /**
631
+ * @tokens OpenAPI-GraphQL Search
632
+ * @presenter Color
633
+ */
634
+ --search-input-border-bottom: #e6e6e6;
635
+ --search-results-background-color: #f2f2f2;
636
+ --search-results-active-item-background-color: #e6e6e6;
637
+ --search-marked-background-color: #ffff03;
638
+ --search-popup-header-background-color: var(--color-secondary-200);
639
+ --search-clear-button-background-color: var(--color-secondary-400);
640
+ --search-clear-button-hover-background-color: var(--color-secondary-600);
641
+
642
+ /*
643
+ * @tokens OpenAPI-GraphQL Badge
644
+ */
645
+ --badge-color: var(--color-emphasis-100); // @presenter Color
646
+ --badge-background-color: var(--color-primary-500); // @presenter Color
647
+ --deprecated-badge-color: var(--color-emphasis-100); // @presenter Color
648
+ --deprecated-badge-background-color: var(--color-warning-500); // @presenter Color
649
+
650
+ --http-badge-font-size: 12px; // @presenter FontSize
651
+ --http-badge-line-height: 20px; // @presenter LineHeight
652
+ --http-badge-font-family: var(--code-font-family); // @presenter FontFamily
653
+ --http-badge-font-weight: var(--font-weight-bold); // @presenter FontWeight
654
+ --http-badge-border-radius: 16px; // @presenter BorderRadius
655
+ --http-badge-color: var(--color-content-inverse); // @presenter Color
656
+
657
+ --http-badge-menu-font-size: 8px; // @presenter FontSize
658
+ --http-badge-menu-line-height: 14px; // @presenter FontSize
659
+
660
+ /**
661
+ * @tokens OpenAPI-GraphQL Other
662
+ */
663
+ --recursive-label-color: var(--color-warning-500); // @presenter Color
664
+ --spinner-color: var(--color-primary-500); // @presenter Color
665
+ --linear-progress-color: var(--color-accent-500); // @presenter Color
666
+ --linear-progress-background-color: var(--color-accent-100); // @presenter Color
667
+
668
+ /* Floating action button */
669
+ --fab-color: #0065fb; // @presenter Color
670
+ --fab-background-color: #f2f2f2; // @presenter Color
671
+
672
+ // @tokens End
673
+ `;
674
+
675
+ const footer = css`
676
+ /**
677
+ * @tokens Footer
678
+ */
679
+ --footer-background-color: var(--color-primary-500); // @presenter Color
680
+ --footer-text-color: #fff; // @presenter Color
681
+
682
+ // @tokens End
683
+ `;
684
+
685
+ const logo = css`
686
+ /**
687
+ * @tokens Logo
688
+ */
689
+ --logo-height: 2rem; // @presenter Spacing
690
+ --logo-margin: var(--sidebar-margin-left); // @presenter Spacing
691
+
692
+ // @tokens End
693
+ `;
694
+
695
+ const navbar = css`
696
+ /**
697
+ * @tokens Navbar
698
+ */
699
+ --navbar-height: 60px; // @presenter Spacing
700
+ --navbar-text-color: #fff; // @presenter Color
701
+ --navbar-background-color: var(--color-primary-500); // @presenter Color
702
+
703
+ /**
704
+ * @tokens Navbar Item
705
+ * */
706
+ --navbar-item-font-size: 16px; // @presenter FontSize
707
+ --navbar-item-margin-horizontal: 0; // @presenter Spacing
708
+ --navbar-item-margin-vertical: 0; // @presenter Spacing
709
+ --navbar-item-border-radius: 10px; // @presenter BorderRadius
710
+ --navbar-item-font-weight: var(--font-weight-bold); // @presenter FontWeight
711
+ --navbar-item-active-background-color: #1b75fa; // @presenter Color
712
+ --navbar-item-active-text-color: var(--navbar-text-color); // @presenter Color
713
+ --navbar-item-active-text-decoration: none;
714
+
715
+ // @tokens End
716
+ `;
717
+
718
+ const toc = css`
719
+ /**
720
+ * @tokens TOC
721
+ * */
722
+ --toc-width: 240px;
723
+
724
+ // @tokens End
725
+ `;
726
+
727
+ const markdown = css`
728
+ /**
729
+ * @tokens Markdown
730
+ * */
731
+ --content-wrapper-max-width: 910px;
732
+ --content-wrapper-padding-vertical: 25px; // @presenter Spacing
733
+ --content-wrapper-padding-horizontal: 0px; // @presenter Spacing
734
+
735
+ // @tokens End
736
+ `;
737
+
738
+ const blockquote = css`
739
+ /**
740
+ * @tokens Blockquote
741
+ * */
742
+ // TODO: fix typo
743
+ --bloquote-margin-vertical: 1.5em; // @presenter Spacing
744
+ --bloquote-margin-horizontal: 0; // @presenter Spacing
745
+ --bloquote-padding-vertical: 0; // @presenter Spacing
746
+ --bloquote-padding-horizontal: calc(var(--spacing-unit) * 4); // @presenter Spacing
747
+ --bloquote-background-color: transparent; // @presenter Color
748
+
749
+ // @tokens End
750
+ `;
751
+
752
+ const portalSearch = css`
753
+ /**
754
+ * @tokens Portal Search
755
+ */
756
+ --search-input-background-color: rgba(255, 255, 255, 0.1); // @presenter Color
757
+ --search-input-text-color: #fff; // @presenter Color
758
+ --search-input-border-radius: var(--global-border-radius); // @presenter BorderRadius
759
+ --search-input-font-size: var(--navbar-item-font-size); // @presenter FontSize
760
+ --search-input-font-family: var(--font-family-base); // @presenter FontFamily
761
+ --search-input-line-height: 1.15em; // @presenter LineHeight
762
+ // TODO: fix typo
763
+ --search-popover-backgrond-color: #fff; // @presenter Color
764
+ --search-popover-border-radius: var(--search-input-border-radius); // @presenter BorderRadius
765
+ --search-item-text-color: var(--color-content-secondary); // @presenter Color
766
+ --search-item-title-text-color: var(--color-content); // @presenter Color
767
+ --search-item-active-background-color: rgba(0, 68, 212, 0.1); // @presenter Color
768
+
769
+ // @tokens End
770
+ `;
771
+
772
+ export const styles = css`
8
773
  :root {
9
- /* === Palette === */
10
-
11
- /*
12
- * Color palette
13
- */
14
- --color-primary-100: #62a1ff;
15
- --color-primary-200: #4892ff;
16
- --color-primary-300: #2f83ff;
17
- --color-primary-400: #1573ff;
18
- --color-primary-500: #0065fb;
19
- --color-primary-600: #005be2;
20
- --color-primary-700: #0050c8;
21
- --color-primary-800: #0046af;
22
- --color-primary-900: #003c95;
23
-
24
- --color-secondary-100: #ffffff;
25
- --color-secondary-200: #f5f7fa;
26
- --color-secondary-300: #f3f4f6;
27
- --color-secondary-400: #e4e7eb;
28
- --color-secondary-500: #d5dae0;
29
- --color-secondary-600: #c7cdd5;
30
- --color-secondary-700: #b8c0ca;
31
- --color-secondary-800: #a9b3c0;
32
- --color-secondary-900: #9ba6b5;
33
-
34
- --color-emphasis-100: #ffffff;
35
- --color-emphasis-200: #e9eaec;
36
- --color-emphasis-300: #cdd0d5;
37
- --color-emphasis-400: #b2b6bd;
38
- --color-emphasis-500: #969ca6;
39
- --color-emphasis-600: #7a828f;
40
- --color-emphasis-700: #626974;
41
- --color-emphasis-800: #4b5058;
42
- --color-emphasis-900: #1c1e21;
43
-
44
- --color-accent-100: #b3dcf3;
45
- --color-accent-200: #a6dfff;
46
- --color-accent-300: #8cd5ff;
47
- --color-accent-400: #73ccff;
48
- --color-accent-500: #59c3ff;
49
- --color-accent-600: #40baff;
50
- --color-accent-700: #26b1ff;
51
- --color-accent-800: #0da7ff;
52
- --color-accent-900: #009bf2;
53
-
54
- --color-success-100: #98eda0;
55
- --color-success-200: #82e98c;
56
- --color-success-300: #6ce678;
57
- --color-success-400: #57e264;
58
- --color-success-500: #41de50;
59
- --color-success-600: #2bda3c;
60
- --color-success-700: #23c933;
61
- --color-success-800: #1fb32d;
62
- --color-success-900: #1b9e28;
63
-
64
- --color-warning-100: #ffc966;
65
- --color-warning-200: #ffc04d;
66
- --color-warning-300: #ffb733;
67
- --color-warning-400: #ffae1a;
68
- --color-warning-500: #ffa500;
69
- --color-warning-600: #e69400;
70
- --color-warning-700: #cc8400;
71
- --color-warning-800: #b37300;
72
- --color-warning-900: #996300;
73
-
74
- --color-error-100: #ffc7c7;
75
- --color-error-200: #ffaeae;
76
- --color-error-300: #ff9494;
77
- --color-error-400: #ff7b7b;
78
- --color-error-500: #ff6161;
79
- --color-error-600: #ff4747;
80
- --color-error-700: #ff2e2e;
81
- --color-error-800: #ff1414;
82
- --color-error-900: #ff0000;
83
-
84
- /* === Typography === */
85
-
86
- --color-content: #1f2933;
87
- --color-content-inverse: var(--color-secondary-200);
88
- --color-content-secondary: #7b8794;
89
-
90
- --font-size-base: 14px;
91
- --line-height-base: 1.5em;
92
- --font-weight-regular: 400;
93
- --font-weight-bold: 600;
94
- --font-weight-bolder: 700;
95
- --font-family-base: Source Sans Pro, sans-serif;
96
- --font-family-monospaced: Source Code Pro, monospace;
97
-
98
- --smoothing: antialiased; // text-smoothing
99
- --text-rendering: optimizeSpeed; // text-rendering
100
-
101
- /*
102
- * Spacing
103
- */
104
- --spacing-unit: 5px;
105
- --spacing-horizontal: calc(var(--spacing-unit) * 8);
106
- --spacing-vertical: calc(var(--spacing-unit) * 4);
107
-
108
- /*
109
- * Global
110
- */
111
- --global-border-radius: 4px;
112
- --global-border-width: 1px;
113
- --global-border-color: var(--color-secondary-400);
114
- --global-border-color-secondary: #616e7c;
115
- --global-background-color: transparent;
116
-
117
- /* === Page layout === */
118
- //TBD
119
- /* === Navbar === */
120
- //--navbar-height:
121
- //TBD
122
-
123
- /* === Menu (sidebar) === */
124
-
125
- --sidebar-width: 285px;
126
- --sidebar-background-color: #fff;
127
- --sidebar-right-line-color: var(--global-border-color);
128
- --sidebar-spacing-unit: 8px;
129
- --sidebar-spacing-horizontal: var(--sidebar-spacing-unit);
130
- --sidebar-spacing-vertical: var(--sidebar-spacing-unit);
131
-
132
- --sidebar-margin-left: calc(var(--sidebar-spacing-unit) * 2);
133
- --sidebar-spacing-offset-top: calc(var(--sidebar-spacing-unit) * 2);
134
- --sidebar-spacing-offset-left: calc(var(--sidebar-spacing-unit) * 2);
135
- --sidebar-spacing-offset-nesting: calc(var(--sidebar-spacing-unit) * 2);
136
-
137
- --sidebar-word-break: 'inherit';
138
- --sidebar-separator-label-color: var(--sidebar-item-color);
139
- --sidebar-separator-line-color: #dadada;
140
- --sidebar-chevron-color: var(--sidebar-item-color);
141
- --sidebar-chevron-size: var(--sidebar-spacing-unit);
142
-
143
- --sidebar-item-spacing-offset-top: calc(var(--sidebar-spacing-unit) * 2);
144
- --sidebar-item-spacing-offset-left: calc(var(--sidebar-spacing-unit) * 2);
145
- --sidebar-item-spacing-offset-nesting: calc(var(--sidebar-spacing-unit) * 2);
146
- --sidebar-item-border-radius: 4px;
147
- --sidebar-item-font-family: var(--font-family-base);
148
- --sidebar-item-font-size: var(--font-size-base);
149
- --sidebar-item-color: var(--color-content);
150
- --sidebar-item-active-color: var(--color-content);
151
- --sidebar-item-background-color: #fff;
152
- --sidebar-item-active-background-color: var(--global-border-color);
153
-
154
- //TBD
155
- /* === Footer === */
156
- //TBD
157
- /* === Table of contents === */
158
- //TBD
159
- /* === Various components: buttons, inputs, alerts, tooltip === */
160
-
161
- /*
162
- * Buttons
163
- */
164
- --button-color: white;
165
- --button-background-color: var(--color-emphasis-500);
166
- --button-hover-background-color: var(--color-emphasis-600);
167
- --button-active-background-color: var(--color-emphasis-700);
168
- --button-outlined-active-border-color: var(--color-emphasis-800);
169
- --button-border-radius: var(--global-border-radius);
170
- --button-font-family: inherit;
171
- --button-font-weight: var(--font-weight-bold);
172
- --button-box-shadow: none;
173
- --button-active-box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.1);
174
-
175
- .button-color-primary {
176
- --button-color: white;
177
- --button-background-color: var(--color-primary-500);
178
- --button-hover-background-color: var(--color-primary-600);
179
- --button-active-background-color: var(--color-primary-700);
180
- --button-outlined-active-border-color: var(--color-primary-800);
181
- }
182
-
183
- .button-color-secondary {
184
- --button-color: var(--color-emphasis-800);
185
- --button-background-color: var(--color-secondary-400);
186
- --button-hover-background-color: var(--color-secondary-500);
187
- --button-active-background-color: var(--color-secondary-600);
188
- --button-outlined-active-border-color: var(--color-secondary-700);
189
- }
190
-
191
- --button-small-font-size: 12px;
192
- --button-small-padding: 8px 10px;
193
- --button-small-min-width: 90px;
194
- --button-medium-font-size: 14px;
195
- --button-medium-padding: 8px 20px;
196
- --button-medium-min-width: 120px;
197
- --button-large-font-size: 14px;
198
- --button-large-padding: 12px 24px;
199
- --button-large-min-width: 150px;
200
- --button-xlarge-font-size: 16px;
201
- --button-xlarge-padding: 20px 24px;
202
- --button-xlarge-min-width: 200px;
203
-
204
- /*
205
- * Tooltip
206
- */
207
- --tooltip-color: var(--color-secondary-300);
208
- --tooltip-background-color: #52606d;
209
-
210
- .tooltip-copy-button {
211
- --tooltip-color: #000;
212
- --tooltip-background-color: #fff;
213
- }
214
-
215
- /* === Markdown/Page content (tables, inline code, blockquotes) === */
216
-
217
- /*
218
- * Headings
219
- * --h-{css-property-name} is fallback for h1...h6
220
- */
221
- --h-font-family: Source Sans Pro, sans-serif;
222
- --h-font-weight: var(--font-weight-bolder);
223
- --h-color: var(--color-content);
224
-
225
- --h1-font-size: 36px;
226
- --h2-font-size: 28px;
227
- --h3-font-size: 18px;
228
- --h4-font-size: 16px;
229
- --h5-font-size: 14px;
230
- --h6-font-size: 12px;
231
-
232
- --h1-line-height: 36px;
233
- --h2-line-height: 28px;
234
- --h3-line-height: 18px;
235
- --h4-line-height: 16px;
236
- --h5-line-height: 14px;
237
- --h6-line-height: 12px;
238
-
239
- --code-font-size: 13px;
240
- --code-font-family: var(--font-family-monospaced);
241
- --code-font-weight: 400;
242
- --code-wrap: pre;
243
-
244
- --inline-code-font-size: var(--code-font-size);
245
- --inline-code-font-family: var(--code-font-family);
246
- --inline-code-color: #e53935;
247
- --inline-code-background-color: var(--color-secondary-200);
248
- --inline-code-border-color: var(--global-border-color);
249
- --inline-code-border-radius: var(--global-border-radius);
250
-
251
- --code-block-font-size: var(--code-font-size);
252
- --code-block-font-family: var(--code-font-family);
253
- --code-block-color: #f1928f;
254
- --code-block-background-color: rgba(217, 205, 199, 0.05);
255
- --code-block-border-color: var(--global-border-color);
256
- --code-block-border-radius: 8px;
257
- --code-block-max-height: 600px;
258
- --code-block-word-break: initial;
259
- --code-block-preformatted-background-color: #323f4b;
260
-
261
- /*
262
- * Links
263
- */
264
- --link-color: var(--color-primary-500);
265
- --link-decoration: none;
266
- --link-hover-color: var(--color-primary-100);
267
- --link-hover-decoration: underline;
268
-
269
- /* === ref docs and graphql docs specific === */
270
- /*
271
- * Logo
272
- */
273
- --logo-max-height: 285px;
274
- --logo-max-width: 285px;
275
- --logo-padding: 2px;
276
-
277
- /*
278
- * Http colors
279
- */
280
- --color-http-get: #3a9601;
281
- --color-http-post: #0065fb;
282
- --color-http-put: #93527b;
283
- --color-http-options: #947014;
284
- --color-http-patch: #bf581d;
285
- --color-http-delete: #c83637;
286
- --color-http-basic: #707070;
287
- --color-http-link: #07818f;
288
- --color-http-head: #a23dad;
289
- --color-http-hook: var(--color-http-post);
290
-
291
- /*
292
- * Response colors
293
- */
294
- --response-success-border-color: #b1e996;
295
- --response-success-background-color: #f6fff4;
296
- --response-success-text-color: var(--response-success-border-color);
297
-
298
- --response-error-border-color: #ffc9c9;
299
- --response-error-background-color: #fff4f4;
300
- --response-error-text-color: var(--response-error-border-color);
301
-
302
- --response-redirect-border-color: var(--color-warning-500);
303
- --response-redirect-background-color: #ffa5001a;
304
- --response-redirect-text-color: var(--response-redirect-border-color);
305
-
306
- --response-info-border-color: #87ceeb;
307
- --response-info-background-color: #87ceeb1a;
308
- --response-info-text-color: var(--response-info-border-color);
309
-
310
- /*
311
- * Panels
312
- */
313
- --panels-border-radius: 8px;
314
- --panels-background-color: #fff;
315
-
316
- --samples-panel-gap: 20px;
317
- --samples-panel-width: 50%;
318
- --samples-panel-block-background-color: #fff;
319
- --samples-panel-background-color: #52606d;
320
- --samples-panel-callback-background-color: var(--samples-panel-callback-background-color);
321
- --samples-panel-controls-background-color: #323f4b;
322
- --samples-panel-controls-hover-background-color: #3c4c5a;
323
- --samples-panel-controls-active-border-color: var(--color-accent-500);
324
- --samples-panel-text-color: #fff;
325
- --samples-panel-heading-color: #fff;
326
-
327
- --samples-panel-markdown-background-color: #3c4c5a;
328
- --samples-panel-markdown-border-color: #46596a;
329
-
330
- --try-it-panel-tab-background-color: var(--samples-panel-background-color);
331
- --try-it-panel-active-tab-background-color: #47535e;
332
- --try-it-panel-active-tab-border-color: var(--color-accent-500);
333
- --try-it-panel-disabled-tab-color: rgba(245, 247, 250, 0.7);
334
- --try-it-panel-controls-background-color: var(--samples-panel-controls-background-color);
335
- --try-it-panel-action-button-width: auto;
336
-
337
- --request-and-response-panel-background-color: #fff;
338
-
339
- /*
340
- * Layout
341
- */
342
- --layout-buttons-top-offset: 20px;
343
- --layout-buttons-height: 36px;
344
- --layout-buttons-width: 36px;
345
-
346
- --layout-stacked-small-max-width: 90%;
347
- --layout-stacked-medium-max-width: 75%;
348
- --layout-stacked-large-max-width: 1200px;
349
-
350
- --layout-three-panel-small-max-width: 100%;
351
- --layout-three-panel-medium-max-width: 100%;
352
- --layout-three-panel-large-max-width: 1800px;
353
-
354
- --layout-middle-panel-small-max-width: none;
355
- --layout-middle-panel-medium-max-width: none;
356
- --layout-middle-panel-large-max-width: none;
357
-
358
- /*
359
- * Schema
360
- */
361
- --schema-lines-color: var(--global-border-color);
362
- --schema-default-details-width: 70%;
363
- --schema-type-name-color: var(--color-content-secondary);
364
- --schema-type-title-color: var(--color-content-secondary);
365
- --schema-require-label-color: var(--color-error-900);
366
- --schema-labels-text-size: 0.9em;
367
- --schema-nesting-spacing: 1em;
368
- --schema-nested-background-color: var(--color-secondary-200);
369
- --schema-chevron-color: var(--color-content);
370
- --schema-chevron-size: 9px;
371
-
372
- --schema-controls-color: var(--color-emphasis-800);
373
- --schema-controls-background-color: var(--color-secondary-400);
374
- --schema-controls-hover-background-color: var(--color-secondary-500);
375
- --schema-controls-border-color: var(--color-secondary-600);
376
-
377
- --field-name-font-size: var(--code-font-size);
378
- --field-name-font-family: var(--code-font-family);
379
- --field-example-color: var(--color-content);
380
- --field-example-background-color: var(--inline-code-background-color);
381
- --field-constraint-color: var(--color-content);
382
- --field-constraint-background-color: var(--inline-code-background-color);
383
-
384
- /*
385
- * Search
386
- */
387
- --search-input-border-bottom: #e6e6e6;
388
- --search-results-background-color: #f2f2f2;
389
- --search-results-active-item-background-color: #e6e6e6;
390
- --search-marked-background-color: #ffff03;
391
- --search-popup-header-background-color: var(--color-secondary-200);
392
- --search-clear-button-background-color: var(--color-secondary-400);
393
- --search-clear-button-hover-background-color: var(--color-secondary-600);
394
-
395
- /*
396
- * Other
397
- */
398
- --badge-color: var(--color-emphasis-100);
399
- --badge-background-color: var(--color-primary-500);
400
- --deprecated-badge-color: var(--color-emphasis-100);
401
- --deprecated-badge-background-color: var(--color-warning-500);
402
-
403
- --recursive-label-color: var(--color-warning-500);
404
-
405
- --http-badge-font-size: 12px;
406
- --http-badge-line-height: 20px;
407
- --http-badge-font-family: var(--code-font-family);
408
- --http-badge-font-weight: var(--font-weight-bold);
409
- --http-badge-border-radius: 16px;
410
- --http-badge-color: var(--color-content-inverse);
411
-
412
- --http-badge-menu-font-size: 8px;
413
- --http-badge-menu-line-height: 14px;
414
-
415
- --spinner-color: var(--color-primary-500);
416
-
417
- --linear-progress-color: var(--color-accent-500);
418
- --linear-progress-background-color: var(--color-accent-100);
419
-
420
- /* Floating action button */
421
- --fab-color: #0065FB;
422
- --fab-background-color: #f2f2f2;
423
-
424
- /**
425
- * Portal Logo
426
- * */
427
- --logo-height: 2rem;
428
- --logo-margin: var(--sidebar-margin-left);
429
-
430
- /**
431
- * Portal Navbar
432
- * */
433
- --navbar-height: 60px;
434
- --navbar-color-text: var(--color-content-inverse);
435
- --navbar-color-background: var(--color-primary-500);
436
-
437
- /**
438
- * Portal Navbar Item
439
- * */
440
- --navbar-item-font-size: 16px;
441
- --navbar-item-margin-horizontal: 0;
442
- --navbar-item-margin-vertical: 0;
443
- --navbar-item-border-radius: 10px;
444
- --navbar-item-font-weight: var(--font-weight-bold);
445
- --navbar-item-active-background-color: #1b75fa;
446
- --navbar-item-active-text-color: var(--color-primary-contrast);
447
- --navbar-item-active-text-decoration: none;
774
+ ${baseColors}
775
+ ${httpColors}
776
+ ${responseColors}
777
+ ${typography}
778
+ ${headingsTypography}
779
+ ${borders}
780
+ ${admonition}
781
+ ${buttons}
782
+ ${sidebar}
783
+ ${panels}
784
+ ${navbar}
785
+ ${footer}
786
+ ${logo}
787
+ ${toc}
788
+ ${tooltip}
789
+ ${code}
790
+ ${links}
791
+ ${markdown}
792
+ ${blockquote}
793
+ ${portalSearch}
794
+
795
+ ${openapiAndGraphqlDocs}
448
796
  }
449
797
  `;
798
+
799
+ export const GlobalStyle = createGlobalStyle`
800
+ ${styles}
801
+ `;