@redocly/theme 0.1.16 → 0.1.21

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 (163) hide show
  1. package/Button/Button.d.ts +4 -3
  2. package/Button/Button.js +28 -1
  3. package/Footer/CustomFooter.d.ts +7 -0
  4. package/Footer/CustomFooter.js +31 -0
  5. package/Footer/CustomFooterNavItem.d.ts +7 -0
  6. package/Footer/CustomFooterNavItem.js +25 -0
  7. package/Footer/Footer.d.ts +6 -2
  8. package/Footer/Footer.js +1 -1
  9. package/Footer/FooterColumn.d.ts +2 -2
  10. package/Footer/FooterColumn.js +3 -2
  11. package/Footer/FooterColumns.d.ts +6 -4
  12. package/Footer/FooterColumns.js +3 -3
  13. package/Footer/FooterCopyright.d.ts +6 -4
  14. package/JsonViewer/JsonViewer.js +1 -2
  15. package/JsonViewer/index.d.ts +0 -1
  16. package/JsonViewer/index.js +0 -1
  17. package/Markdown/Admonition.js +1 -1
  18. package/Markdown/CodeSample/CodeSample.js +15 -5
  19. package/Markdown/CodeSample/index.d.ts +0 -1
  20. package/Markdown/CodeSample/index.js +0 -1
  21. package/Navbar/Navbar.d.ts +2 -1
  22. package/Navbar/Navbar.js +9 -2
  23. package/Navbar/NavbarDropdown.d.ts +8 -0
  24. package/Navbar/NavbarDropdown.js +21 -0
  25. package/Navbar/NavbarItem.d.ts +3 -36
  26. package/Navbar/NavbarItem.js +22 -13
  27. package/Navbar/NavbarMenu.d.ts +2 -1
  28. package/Navbar/NavbarMenu.js +1 -1
  29. package/PageNavigation/NextPageLink.js +8 -5
  30. package/PageNavigation/PreviousPageLink.js +8 -5
  31. package/Search/SidebarSearch.d.ts +2 -0
  32. package/Search/SidebarSearch.js +15 -0
  33. package/Sidebar/MenuGroup.js +2 -2
  34. package/Sidebar/SidebarLayout.js +5 -0
  35. package/TableOfContent/TableOfContent.js +8 -1
  36. package/Typography/CompactTypography.d.ts +11 -0
  37. package/Typography/CompactTypography.js +18 -0
  38. package/Typography/Emphasis.d.ts +3 -0
  39. package/Typography/Emphasis.js +15 -0
  40. package/Typography/H1.d.ts +3 -0
  41. package/Typography/H1.js +16 -0
  42. package/Typography/H2.d.ts +3 -0
  43. package/Typography/H2.js +16 -0
  44. package/Typography/H3.d.ts +3 -0
  45. package/Typography/H3.js +16 -0
  46. package/Typography/SectionHeader.d.ts +1 -0
  47. package/Typography/SectionHeader.js +13 -0
  48. package/Typography/Typography.d.ts +8 -0
  49. package/Typography/Typography.js +22 -0
  50. package/Typography/index.d.ts +7 -0
  51. package/{Headings → Typography}/index.js +7 -1
  52. package/globalStyle.js +1 -1
  53. package/{ui → icons/AlertIcon}/AlertIcon.d.ts +2 -2
  54. package/{ui → icons/AlertIcon}/AlertIcon.js +1 -1
  55. package/icons/AlertIcon/index.d.ts +2 -0
  56. package/icons/AlertIcon/index.js +5 -0
  57. package/icons/ArrowIcon/ArrowIcon.d.ts +7 -0
  58. package/{ui/Arrow.js → icons/ArrowIcon/ArrowIcon.js} +3 -3
  59. package/icons/ArrowIcon/index.d.ts +2 -0
  60. package/icons/ArrowIcon/index.js +5 -0
  61. package/icons/index.d.ts +2 -0
  62. package/icons/index.js +2 -0
  63. package/index.d.ts +1 -1
  64. package/index.js +1 -1
  65. package/mocks/constants/index.d.ts +2 -0
  66. package/mocks/constants/index.js +5 -0
  67. package/mocks/hooks/index.d.ts +6 -0
  68. package/mocks/hooks/index.js +16 -0
  69. package/package.json +1 -1
  70. package/settings.yaml +9 -0
  71. package/src/Button/Button.tsx +19 -1
  72. package/src/Footer/CustomFooter.tsx +45 -0
  73. package/src/Footer/CustomFooterNavItem.tsx +40 -0
  74. package/src/Footer/Footer.tsx +6 -2
  75. package/src/Footer/FooterColumn.tsx +4 -4
  76. package/src/Footer/FooterColumns.tsx +9 -9
  77. package/src/Footer/FooterCopyright.tsx +6 -6
  78. package/src/JsonViewer/JsonViewer.tsx +106 -2
  79. package/src/JsonViewer/index.ts +0 -1
  80. package/src/Markdown/Admonition.tsx +1 -1
  81. package/src/Markdown/CodeSample/CodeSample.tsx +160 -6
  82. package/src/Markdown/CodeSample/index.ts +0 -1
  83. package/src/Navbar/Navbar.tsx +13 -3
  84. package/src/Navbar/NavbarDropdown.tsx +44 -0
  85. package/src/Navbar/NavbarItem.tsx +44 -51
  86. package/src/Navbar/NavbarMenu.tsx +6 -3
  87. package/src/PageNavigation/NextPageLink.tsx +9 -3
  88. package/src/PageNavigation/PreviousPageLink.tsx +9 -3
  89. package/src/Search/SidebarSearch.tsx +13 -0
  90. package/src/Sidebar/MenuGroup.tsx +2 -2
  91. package/src/Sidebar/SidebarLayout.tsx +5 -0
  92. package/src/TableOfContent/TableOfContent.tsx +7 -1
  93. package/src/Typography/CompactTypography.ts +9 -0
  94. package/src/Typography/Emphasis.ts +7 -0
  95. package/src/Typography/H1.ts +12 -0
  96. package/src/Typography/H2.ts +12 -0
  97. package/src/Typography/H3.ts +11 -0
  98. package/src/Typography/SectionHeader.ts +11 -0
  99. package/src/Typography/Typography.ts +21 -0
  100. package/src/Typography/index.ts +7 -0
  101. package/src/globalStyle.ts +1 -0
  102. package/src/{ui → icons/AlertIcon}/AlertIcon.tsx +3 -3
  103. package/src/icons/AlertIcon/index.ts +2 -0
  104. package/src/{ui/Arrow.tsx → icons/ArrowIcon/ArrowIcon.tsx} +5 -5
  105. package/src/icons/ArrowIcon/index.ts +2 -0
  106. package/src/icons/index.ts +2 -0
  107. package/src/index.ts +1 -1
  108. package/src/mocks/constants/index.ts +2 -0
  109. package/src/mocks/hooks/index.ts +17 -0
  110. package/src/types/portal/index.d.ts +0 -1
  111. package/src/types/portal/src/client/app/Sidebar/types.d.ts +1 -1
  112. package/src/types/portal/src/server/{utils → content}/content-provider.d.ts +9 -9
  113. package/src/types/portal/src/server/{version-store.d.ts → content/versions-config.d.ts} +7 -7
  114. package/src/types/portal/src/server/plugins/markdown/types.d.ts +14 -11
  115. package/src/types/portal/src/server/plugins/portal-config/types.d.ts +16 -19
  116. package/src/types/portal/src/server/plugins/types.d.ts +23 -15
  117. package/src/types/portal/src/server/store.d.ts +32 -33
  118. package/src/types/portal/src/server/utils/fs.d.ts +2 -1
  119. package/src/types/portal/src/server/utils/index.d.ts +0 -1
  120. package/src/types/portal/src/server/utils/paths.d.ts +3 -3
  121. package/src/types/portal/src/server/utils/reporter/formatter.d.ts +2 -1
  122. package/src/types/portal/src/server/utils/reporter/reporter.d.ts +2 -1
  123. package/src/types/portal/src/shared/constants.d.ts +2 -0
  124. package/src/types/portal/src/shared/models/active-item.d.ts +3 -0
  125. package/src/types/portal/src/shared/models/config.d.ts +28 -0
  126. package/src/types/portal/src/shared/models/index.d.ts +6 -0
  127. package/src/types/portal/src/shared/models/json-index.d.ts +5 -0
  128. package/src/types/portal/src/shared/models/operation-parameter.d.ts +6 -0
  129. package/src/types/portal/src/shared/models/search-data.d.ts +5 -0
  130. package/src/types/portal/src/shared/models/search-document.d.ts +11 -0
  131. package/src/types/portal/src/shared/types.d.ts +8 -2
  132. package/src/types/portal/src/shared/urls.d.ts +2 -0
  133. package/src/types/portal/src/shared/utils.d.ts +8 -2
  134. package/src/ui/Jumbotron.tsx +1 -1
  135. package/src/ui/index.tsx +0 -4
  136. package/src/utils/ClipboardService.ts +19 -0
  137. package/ui/Jumbotron.js +1 -1
  138. package/ui/index.d.ts +0 -4
  139. package/ui/index.js +0 -4
  140. package/utils/ClipboardService.d.ts +1 -0
  141. package/utils/ClipboardService.js +19 -0
  142. package/Headings/Headings.d.ts +0 -3
  143. package/Headings/Headings.js +0 -16
  144. package/Headings/index.d.ts +0 -1
  145. package/JsonViewer/styled.d.ts +0 -1
  146. package/JsonViewer/styled.js +0 -10
  147. package/Markdown/CodeSample/styled.d.ts +0 -4
  148. package/Markdown/CodeSample/styled.js +0 -85
  149. package/src/Headings/Headings.ts +0 -23
  150. package/src/Headings/index.ts +0 -1
  151. package/src/JsonViewer/styled.ts +0 -103
  152. package/src/Markdown/CodeSample/styled.ts +0 -209
  153. package/src/types/portal/src/client/app/media-css.d.ts +0 -7
  154. package/src/types/portal/src/client/styling/default.d.ts +0 -601
  155. package/src/types/portal/src/client/styling/index.d.ts +0 -10
  156. package/src/types/portal/src/client/styling/resolve.d.ts +0 -1
  157. package/src/ui/Button.tsx +0 -19
  158. package/src/ui/Typography.tsx +0 -90
  159. package/ui/Arrow.d.ts +0 -7
  160. package/ui/Button.d.ts +0 -7
  161. package/ui/Button.js +0 -30
  162. package/ui/Typography.d.ts +0 -41
  163. package/ui/Typography.js +0 -59
@@ -1,103 +0,0 @@
1
- import { css } from 'styled-components';
2
-
3
- export const jsonStyles = css`
4
- .redoc-json code > .collapser {
5
- display: none;
6
- pointer-events: none;
7
- }
8
-
9
- contain: content;
10
- overflow-x: auto;
11
- padding: 10px;
12
- border-radius: var(--global-border-radius);
13
- background-color: var(--samples-panel-controls-background-color);
14
- color: var(--color-content-inverse);
15
- font-size: var(--code-font-size);
16
- font-family: var(--code-font-family);
17
- white-space: var(--code-wrap, pre);
18
-
19
- .callback-function {
20
- color: gray;
21
- }
22
-
23
- .collapser:after {
24
- content: '-';
25
- cursor: pointer;
26
- }
27
-
28
- .collapsed > .collapser:after {
29
- content: '+';
30
- cursor: pointer;
31
- }
32
-
33
- .ellipsis:after {
34
- content: ' … ';
35
- }
36
-
37
- .collapsible {
38
- margin-left: 2ch;
39
- }
40
-
41
- .hoverable {
42
- padding: 1px 2px;
43
- }
44
-
45
- .hovered {
46
- background-color: rgba(235, 238, 249, 1);
47
- }
48
-
49
- .collapser {
50
- background-color: transparent;
51
- border: 0;
52
- color: #fff;
53
- display: flex;
54
- align-items: center;
55
- justify-content: center;
56
- width: 15px;
57
- height: 15px;
58
- position: absolute;
59
- top: 4px;
60
- left: -1.5em;
61
- cursor: default;
62
- user-select: none;
63
- -webkit-user-select: none;
64
- padding: 2px;
65
- font-family: var(--code-font-family);
66
- font-size: var(--code-font-size);
67
- &:focus {
68
- outline: #fff dotted 1px;
69
- }
70
- }
71
-
72
- ul {
73
- list-style-type: none;
74
- padding: 0;
75
- margin: 0 0 0 26px;
76
- }
77
-
78
- li {
79
- position: relative;
80
- display: block;
81
- }
82
-
83
- .hoverable {
84
- display: inline-block;
85
- }
86
-
87
- .selected {
88
- outline-width: 1px;
89
- outline-style: dotted;
90
- }
91
-
92
- .collapsed > .collapsible {
93
- display: none;
94
- }
95
-
96
- .ellipsis {
97
- display: none;
98
- }
99
-
100
- .collapsed > .ellipsis {
101
- display: inherit;
102
- }
103
- `;
@@ -1,209 +0,0 @@
1
- import styled, { css } from 'styled-components';
2
-
3
- export const CodeSampleButtonContainer = styled.div`
4
- position: absolute;
5
- top: 12px;
6
- right: 5px;
7
- `;
8
-
9
- export const CopyCodeButton = styled.div`
10
- padding: 0 5px;
11
- border-radius: 4px;
12
- display: none;
13
- &:hover {
14
- cursor: pointer;
15
- }
16
- `;
17
-
18
- export const DoneIndicator = styled.div`
19
- padding: 0 5px;
20
- border-radius: 4px;
21
- cursor: default;
22
- `;
23
-
24
- // const lightStyleTokens = css`
25
- // .token.comment,
26
- // .token.prolog,
27
- // .token.doctype,
28
- // .token.cdata {
29
- // color: #999988;
30
- // font-style: italic;
31
- // }
32
- // .token.namespace {
33
- // opacity: 0.7;
34
- // }
35
- // .token.string,
36
- // .token.attr-value {
37
- // color: #e3116c;
38
- // }
39
- // .token.punctuation,
40
- // .token.operator {
41
- // color: #393a34; /* no highlight */
42
- // }
43
- // .token.entity,
44
- // .token.url,
45
- // .token.symbol,
46
- // .token.number,
47
- // .token.boolean,
48
- // .token.variable,
49
- // .token.constant,
50
- // .token.property,
51
- // .token.regex,
52
- // .token.inserted {
53
- // color: #36acaa;
54
- // }
55
- // .token.atrule,
56
- // .token.keyword,
57
- // .token.attr-name,
58
- // .language-autohotkey .token.selector {
59
- // color: #00a4db;
60
- // }
61
- // .token.function,
62
- // .token.deleted,
63
- // .language-autohotkey .token.tag {
64
- // color: #9a050f;
65
- // }
66
- // .token.tag,
67
- // .token.selector,
68
- // .language-autohotkey .token.keyword {
69
- // color: #00009f;
70
- // }
71
- // `;
72
-
73
- const darkStyleTokens = css`
74
- .token.comment,
75
- .token.prolog,
76
- .token.doctype,
77
- .token.cdata {
78
- color: hsl(30, 20%, 50%);
79
- }
80
- .token.property,
81
- .token.tag,
82
- .token.number,
83
- .token.constant,
84
- .token.symbol {
85
- color: #62bff9;
86
- }
87
- .token.boolean {
88
- color: firebrick;
89
- }
90
- .token.selector,
91
- .token.attr-name,
92
- .token.string,
93
- .token.char,
94
- .token.builtin,
95
- .token.inserted {
96
- color: #a0fbaa;
97
- & + a,
98
- & + a:visited {
99
- color: #4ed2ba;
100
- text-decoration: underline;
101
- }
102
- }
103
- .token.operator,
104
- .token.entity,
105
- .token.url,
106
- .token.variable {
107
- color: hsl(40, 90%, 60%);
108
- }
109
- .token.atrule,
110
- .token.attr-value,
111
- .token.keyword {
112
- color: hsl(350, 40%, 70%);
113
- }
114
- .token.regex,
115
- .token.important {
116
- color: #e90;
117
- }
118
- .token.deleted {
119
- color: red;
120
- }
121
- `;
122
-
123
- export const Wrapper = styled.div`
124
- overflow: auto;
125
- border-radius: 4px;
126
- position: relative;
127
-
128
- ${CopyCodeButton},
129
- ${DoneIndicator} {
130
- color: rgba(255, 255, 255, 0.15);
131
- }
132
- ${CopyCodeButton}:hover {
133
- color: #fff;
134
- background-color: rgba(255, 255, 255, 0.15);
135
- }
136
-
137
- &:hover {
138
- ${CodeSampleButtonContainer} ${CopyCodeButton} {
139
- display: block;
140
- }
141
- }
142
- pre {
143
- white-space: var(--code-wrap);
144
- color: white;
145
- padding: 12px 14px 15px 14px;
146
- overflow-x: auto;
147
- line-height: normal;
148
- border-radius: 4px;
149
- font-family: var(--code-font-family);
150
- background-color: var(--code-block-preformatted-background-color);
151
- code {
152
- background-color: transparent;
153
- border: 0;
154
- padding: 0;
155
- color: white;
156
- &:before,
157
- &:after {
158
- content: none;
159
- }
160
- }
161
- }
162
- pre[class*='language-'] {
163
- padding: 1em;
164
- margin: 0.5em 0;
165
- overflow: auto;
166
- border: 0;
167
- border-radius: var(--global-border-radius);
168
- }
169
- code[class='language-text'] {
170
- line-height: 1.2em;
171
- display: inline-flex;
172
- white-space: pre-wrap;
173
- overflow-wrap: anywhere;
174
- }
175
- code[class*='language-'],
176
- pre[class*='language-'] {
177
- text-align: left;
178
- white-space: pre;
179
- word-spacing: normal;
180
- word-break: normal;
181
- word-wrap: normal;
182
- line-height: 1.5;
183
- -moz-tab-size: 4;
184
- -o-tab-size: 4;
185
- tab-size: 4;
186
- -webkit-hyphens: none;
187
- -moz-hyphens: none;
188
- -ms-hyphens: none;
189
- hyphens: none;
190
- .token.important,
191
- .token.bold {
192
- font-weight: bold;
193
- }
194
- .token.italic {
195
- font-style: italic;
196
- }
197
- .token.entity {
198
- cursor: help;
199
- }
200
- .token.punctuation {
201
- opacity: 0.7;
202
- }
203
- .namespace {
204
- opacity: 0.7;
205
- }
206
-
207
- ${darkStyleTokens};
208
- }
209
- `;
@@ -1,7 +0,0 @@
1
- export declare const breakpoints: {
2
- small: string;
3
- medium: string;
4
- large: string;
5
- };
6
- export declare const mediaQueries: import("@theme/utils/media-css").MediaQueries;
7
- export type { MediaQueries } from '@theme/utils/media-css';