@docusaurus/theme-classic 0.0.0-4702 → 0.0.0-4708

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 (43) hide show
  1. package/lib/theme-classic.d.ts +36 -0
  2. package/lib-next/theme/BackToTopButton/index.js +1 -3
  3. package/lib-next/theme/BlogPostItem/index.js +4 -3
  4. package/lib-next/theme/ColorModeToggle/index.js +7 -5
  5. package/lib-next/theme/DocItem/index.js +1 -4
  6. package/lib-next/theme/DocPage/index.js +7 -10
  7. package/lib-next/theme/DocSidebar/Desktop/CollapseButton/index.js +34 -0
  8. package/lib-next/theme/DocSidebar/Desktop/CollapseButton/styles.module.css +44 -0
  9. package/lib-next/theme/DocSidebar/Desktop/Content/index.js +46 -0
  10. package/lib-next/theme/DocSidebar/Desktop/Content/styles.module.css +17 -0
  11. package/lib-next/theme/DocSidebar/Desktop/index.js +34 -0
  12. package/lib-next/theme/DocSidebar/Desktop/styles.module.css +50 -0
  13. package/lib-next/theme/DocSidebar/Mobile/index.js +45 -0
  14. package/lib-next/theme/DocSidebar/index.js +6 -113
  15. package/lib-next/theme/Heading/index.js +6 -4
  16. package/lib-next/theme/MDXComponents/index.js +1 -1
  17. package/lib-next/theme/Navbar/index.js +13 -7
  18. package/lib-next/theme/TOCCollapsible/index.js +1 -3
  19. package/lib-next/theme/Tabs/index.js +2 -2
  20. package/lib-next/theme/Tag/index.js +4 -4
  21. package/package.json +13 -13
  22. package/src/theme/BackToTopButton/index.tsx +1 -3
  23. package/src/theme/BlogPostItem/index.tsx +4 -3
  24. package/src/theme/ColorModeToggle/index.tsx +7 -5
  25. package/src/theme/DocItem/index.tsx +1 -4
  26. package/src/theme/DocPage/index.tsx +7 -10
  27. package/src/theme/DocSidebar/Desktop/CollapseButton/index.tsx +38 -0
  28. package/src/theme/DocSidebar/Desktop/CollapseButton/styles.module.css +44 -0
  29. package/src/theme/DocSidebar/Desktop/Content/index.tsx +55 -0
  30. package/src/theme/DocSidebar/Desktop/Content/styles.module.css +17 -0
  31. package/src/theme/DocSidebar/Desktop/index.tsx +38 -0
  32. package/src/theme/DocSidebar/Desktop/styles.module.css +50 -0
  33. package/src/theme/DocSidebar/Mobile/index.tsx +51 -0
  34. package/src/theme/DocSidebar/index.tsx +6 -121
  35. package/src/theme/Heading/index.tsx +6 -4
  36. package/src/theme/MDXComponents/index.tsx +2 -2
  37. package/src/theme/Navbar/index.tsx +13 -7
  38. package/src/theme/TOCCollapsible/index.tsx +1 -3
  39. package/src/theme/Tabs/index.tsx +1 -2
  40. package/src/theme/Tag/index.tsx +4 -4
  41. package/src/theme-classic.d.ts +36 -0
  42. package/lib-next/theme/DocSidebar/styles.module.css +0 -107
  43. package/src/theme/DocSidebar/styles.module.css +0 -107
@@ -18,10 +18,10 @@ export default function Tag(props: Props): JSX.Element {
18
18
  return (
19
19
  <Link
20
20
  href={permalink}
21
- className={clsx(styles.tag, {
22
- [styles.tagRegular!]: !count,
23
- [styles.tagWithCount!]: count,
24
- })}>
21
+ className={clsx(
22
+ styles.tag,
23
+ count ? styles.tagWithCount : styles.tagRegular,
24
+ )}>
25
25
  {name}
26
26
  {count && <span>{count}</span>}
27
27
  </Link>
@@ -180,6 +180,42 @@ declare module '@theme/DocSidebar' {
180
180
  export default function DocSidebar(props: Props): JSX.Element;
181
181
  }
182
182
 
183
+ declare module '@theme/DocSidebar/Mobile' {
184
+ import type {Props as DocSidebarProps} from '@theme/DocSidebar';
185
+
186
+ export interface Props extends DocSidebarProps {}
187
+
188
+ export default function DocSidebarMobile(props: Props): JSX.Element;
189
+ }
190
+
191
+ declare module '@theme/DocSidebar/Desktop' {
192
+ import type {Props as DocSidebarProps} from '@theme/DocSidebar';
193
+
194
+ export interface Props extends DocSidebarProps {}
195
+
196
+ export default function DocSidebarDesktop(props: Props): JSX.Element;
197
+ }
198
+
199
+ declare module '@theme/DocSidebar/Desktop/Content' {
200
+ import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
201
+
202
+ export interface Props {
203
+ readonly className?: string;
204
+ readonly path: string;
205
+ readonly sidebar: readonly PropSidebarItem[];
206
+ }
207
+
208
+ export default function CollapseButton(props: Props): JSX.Element;
209
+ }
210
+
211
+ declare module '@theme/DocSidebar/Desktop/CollapseButton' {
212
+ export interface Props {
213
+ onClick: React.MouseEventHandler;
214
+ }
215
+
216
+ export default function CollapseButton(props: Props): JSX.Element;
217
+ }
218
+
183
219
  declare module '@theme/DocSidebarItem' {
184
220
  import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
185
221
 
@@ -1,107 +0,0 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- :root {
9
- --collapse-button-bg-color-dark: #2e333a;
10
- }
11
-
12
- @media (min-width: 997px) {
13
- .sidebar {
14
- display: flex;
15
- flex-direction: column;
16
- max-height: 100vh;
17
- height: 100%;
18
- position: sticky;
19
- top: 0;
20
- padding-top: var(--ifm-navbar-height);
21
- width: var(--doc-sidebar-width);
22
- transition: opacity 50ms ease;
23
- }
24
-
25
- .sidebarWithHideableNavbar {
26
- padding-top: 0;
27
- }
28
-
29
- .sidebarHidden {
30
- opacity: 0;
31
- height: 0;
32
- overflow: hidden;
33
- visibility: hidden;
34
- }
35
-
36
- .sidebarLogo {
37
- display: flex !important;
38
- align-items: center;
39
- margin: 0 var(--ifm-navbar-padding-horizontal);
40
- min-height: var(--ifm-navbar-height);
41
- max-height: var(--ifm-navbar-height);
42
- color: inherit !important;
43
- text-decoration: none !important;
44
- }
45
-
46
- .sidebarLogo img {
47
- margin-right: 0.5rem;
48
- height: 2rem;
49
- }
50
-
51
- .menu {
52
- flex-grow: 1;
53
- padding: 0.5rem;
54
- }
55
-
56
- .menuWithAnnouncementBar {
57
- margin-bottom: var(--docusaurus-announcement-bar-height);
58
- }
59
-
60
- .collapseSidebarButton {
61
- display: block !important;
62
- background-color: var(--ifm-button-background-color);
63
- height: 40px;
64
- position: sticky;
65
- bottom: 0;
66
- border-radius: 0;
67
- border: 1px solid var(--ifm-toc-border-color);
68
- }
69
-
70
- .collapseSidebarButtonIcon {
71
- transform: rotate(180deg);
72
- margin-top: 4px;
73
- }
74
-
75
- [dir='rtl'] .collapseSidebarButtonIcon {
76
- transform: rotate(0);
77
- }
78
-
79
- [data-theme='dark'] .collapseSidebarButton {
80
- background-color: var(--collapse-button-bg-color-dark);
81
- }
82
-
83
- [data-theme='dark'] .collapseSidebarButton:hover,
84
- [data-theme='dark'] .collapseSidebarButton:focus {
85
- background-color: var(--ifm-color-emphasis-200);
86
- }
87
- }
88
-
89
- .sidebarLogo,
90
- .collapseSidebarButton {
91
- display: none;
92
- }
93
-
94
- .sidebarMenuIcon {
95
- vertical-align: middle;
96
- }
97
-
98
- .sidebarMenuCloseIcon {
99
- display: inline-flex;
100
- justify-content: center;
101
- align-items: center;
102
- height: 24px;
103
- font-size: 1.5rem;
104
- font-weight: var(--ifm-font-weight-bold);
105
- line-height: 0.9;
106
- width: 24px;
107
- }
@@ -1,107 +0,0 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
-
8
- :root {
9
- --collapse-button-bg-color-dark: #2e333a;
10
- }
11
-
12
- @media (min-width: 997px) {
13
- .sidebar {
14
- display: flex;
15
- flex-direction: column;
16
- max-height: 100vh;
17
- height: 100%;
18
- position: sticky;
19
- top: 0;
20
- padding-top: var(--ifm-navbar-height);
21
- width: var(--doc-sidebar-width);
22
- transition: opacity 50ms ease;
23
- }
24
-
25
- .sidebarWithHideableNavbar {
26
- padding-top: 0;
27
- }
28
-
29
- .sidebarHidden {
30
- opacity: 0;
31
- height: 0;
32
- overflow: hidden;
33
- visibility: hidden;
34
- }
35
-
36
- .sidebarLogo {
37
- display: flex !important;
38
- align-items: center;
39
- margin: 0 var(--ifm-navbar-padding-horizontal);
40
- min-height: var(--ifm-navbar-height);
41
- max-height: var(--ifm-navbar-height);
42
- color: inherit !important;
43
- text-decoration: none !important;
44
- }
45
-
46
- .sidebarLogo img {
47
- margin-right: 0.5rem;
48
- height: 2rem;
49
- }
50
-
51
- .menu {
52
- flex-grow: 1;
53
- padding: 0.5rem;
54
- }
55
-
56
- .menuWithAnnouncementBar {
57
- margin-bottom: var(--docusaurus-announcement-bar-height);
58
- }
59
-
60
- .collapseSidebarButton {
61
- display: block !important;
62
- background-color: var(--ifm-button-background-color);
63
- height: 40px;
64
- position: sticky;
65
- bottom: 0;
66
- border-radius: 0;
67
- border: 1px solid var(--ifm-toc-border-color);
68
- }
69
-
70
- .collapseSidebarButtonIcon {
71
- transform: rotate(180deg);
72
- margin-top: 4px;
73
- }
74
-
75
- [dir='rtl'] .collapseSidebarButtonIcon {
76
- transform: rotate(0);
77
- }
78
-
79
- [data-theme='dark'] .collapseSidebarButton {
80
- background-color: var(--collapse-button-bg-color-dark);
81
- }
82
-
83
- [data-theme='dark'] .collapseSidebarButton:hover,
84
- [data-theme='dark'] .collapseSidebarButton:focus {
85
- background-color: var(--ifm-color-emphasis-200);
86
- }
87
- }
88
-
89
- .sidebarLogo,
90
- .collapseSidebarButton {
91
- display: none;
92
- }
93
-
94
- .sidebarMenuIcon {
95
- vertical-align: middle;
96
- }
97
-
98
- .sidebarMenuCloseIcon {
99
- display: inline-flex;
100
- justify-content: center;
101
- align-items: center;
102
- height: 24px;
103
- font-size: 1.5rem;
104
- font-weight: var(--ifm-font-weight-bold);
105
- line-height: 0.9;
106
- width: 24px;
107
- }