@docusaurus/theme-classic 0.0.0-4844 → 0.0.0-4848
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.
- package/lib/theme-classic.d.ts +5 -2
- package/lib-next/theme/BlogSidebar/Desktop/styles.module.css +1 -0
- package/lib-next/theme/Details/index.js +1 -1
- package/lib-next/theme/DocCardList/index.js +5 -3
- package/lib-next/theme/DocCategoryGeneratedIndexPage/index.js +1 -1
- package/lib-next/theme/DocCategoryGeneratedIndexPage/styles.module.css +4 -0
- package/lib-next/theme/DocItem/styles.module.css +6 -0
- package/lib-next/theme/NavbarItem/LocaleDropdownNavbarItem/index.js +1 -1
- package/lib-next/theme/TabItem/index.js +3 -1
- package/lib-next/theme/TabItem/styles.module.css +10 -0
- package/lib-next/theme/Tabs/index.js +3 -3
- package/lib-next/theme/Tabs/styles.module.css +4 -0
- package/package.json +16 -13
- package/src/theme/BlogSidebar/Desktop/styles.module.css +1 -0
- package/src/theme/Details/index.tsx +1 -1
- package/src/theme/DocCardList/index.tsx +4 -6
- package/src/theme/DocCategoryGeneratedIndexPage/index.tsx +1 -1
- package/src/theme/DocCategoryGeneratedIndexPage/styles.module.css +4 -0
- package/src/theme/DocItem/styles.module.css +6 -0
- package/src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx +1 -1
- package/src/theme/TabItem/index.tsx +7 -1
- package/src/theme/TabItem/styles.module.css +10 -0
- package/src/theme/Tabs/index.tsx +3 -3
- package/src/theme/Tabs/styles.module.css +4 -0
- package/src/theme-classic.d.ts +5 -2
package/lib/theme-classic.d.ts
CHANGED
|
@@ -176,6 +176,7 @@ declare module '@theme/DocCardList' {
|
|
|
176
176
|
|
|
177
177
|
export interface Props {
|
|
178
178
|
readonly items: PropSidebarItem[];
|
|
179
|
+
readonly className?: string;
|
|
179
180
|
}
|
|
180
181
|
|
|
181
182
|
export default function DocCardList(props: Props): JSX.Element;
|
|
@@ -568,7 +569,9 @@ declare module '@theme/MDXComponents' {
|
|
|
568
569
|
readonly h4: (props: ComponentProps<'h4'>) => JSX.Element;
|
|
569
570
|
readonly h5: (props: ComponentProps<'h5'>) => JSX.Element;
|
|
570
571
|
readonly h6: (props: ComponentProps<'h6'>) => JSX.Element;
|
|
571
|
-
|
|
572
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
573
|
+
[tagName: string]: ComponentType<any>;
|
|
574
|
+
};
|
|
572
575
|
|
|
573
576
|
const MDXComponents: MDXComponentsObject;
|
|
574
577
|
export default MDXComponents;
|
|
@@ -878,7 +881,7 @@ declare module '@theme/ThemedImage' {
|
|
|
878
881
|
}
|
|
879
882
|
|
|
880
883
|
declare module '@theme/Details' {
|
|
881
|
-
import {Details, type DetailsProps} from '@docusaurus/theme-common';
|
|
884
|
+
import {Details, type DetailsProps} from '@docusaurus/theme-common/Details';
|
|
882
885
|
|
|
883
886
|
export interface Props extends DetailsProps {}
|
|
884
887
|
export default Details;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
9
|
-
import {Details as DetailsGeneric} from '@docusaurus/theme-common';
|
|
9
|
+
import {Details as DetailsGeneric} from '@docusaurus/theme-common/Details';
|
|
10
10
|
import styles from './styles.module.css'; // Should we have a custom details/summary comp in Infima instead of reusing
|
|
11
11
|
// alert classes?
|
|
12
12
|
|
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import clsx from 'clsx';
|
|
8
9
|
import DocCard from '@theme/DocCard';
|
|
9
|
-
import {findFirstCategoryLink} from '@docusaurus/theme-common';
|
|
10
|
+
import {findFirstCategoryLink} from '@docusaurus/theme-common';
|
|
10
11
|
|
|
12
|
+
// Filter categories that don't have a link.
|
|
11
13
|
function filterItems(items) {
|
|
12
14
|
return items.filter((item) => {
|
|
13
15
|
if (item.type === 'category') {
|
|
@@ -18,9 +20,9 @@ function filterItems(items) {
|
|
|
18
20
|
});
|
|
19
21
|
}
|
|
20
22
|
|
|
21
|
-
export default function DocCardList({items}) {
|
|
23
|
+
export default function DocCardList({items, className}) {
|
|
22
24
|
return (
|
|
23
|
-
<div className=
|
|
25
|
+
<div className={clsx('row', className)}>
|
|
24
26
|
{filterItems(items).map((item, index) => (
|
|
25
27
|
<article key={index} className="col col--6 margin-bottom--lg">
|
|
26
28
|
<DocCard key={index} item={item} />
|
|
@@ -52,7 +52,7 @@ function DocCategoryGeneratedIndexPageContent({categoryGeneratedIndex}) {
|
|
|
52
52
|
)}
|
|
53
53
|
</header>
|
|
54
54
|
<main className="margin-top--lg">
|
|
55
|
-
<DocCardList items={category.items} />
|
|
55
|
+
<DocCardList items={category.items} className={styles.list} />
|
|
56
56
|
</main>
|
|
57
57
|
<footer className="margin-top--lg">
|
|
58
58
|
<DocPaginator
|
|
@@ -5,13 +5,15 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
+
import clsx from 'clsx';
|
|
9
|
+
import styles from './styles.module.css';
|
|
8
10
|
export default function TabItem({children, hidden, className}) {
|
|
9
11
|
return (
|
|
10
12
|
<div
|
|
11
13
|
role="tabpanel"
|
|
14
|
+
className={clsx(styles.tabItem, className)}
|
|
12
15
|
{...{
|
|
13
16
|
hidden,
|
|
14
|
-
className,
|
|
15
17
|
}}>
|
|
16
18
|
{children}
|
|
17
19
|
</div>
|
|
@@ -132,7 +132,7 @@ function TabsComponent(props) {
|
|
|
132
132
|
};
|
|
133
133
|
|
|
134
134
|
return (
|
|
135
|
-
<div className=
|
|
135
|
+
<div className={clsx('tabs-container', styles.tabList)}>
|
|
136
136
|
<ul
|
|
137
137
|
role="tablist"
|
|
138
138
|
aria-orientation="horizontal"
|
|
@@ -173,11 +173,11 @@ function TabsComponent(props) {
|
|
|
173
173
|
(tabItem) => tabItem.props.value === selectedValue,
|
|
174
174
|
)[0],
|
|
175
175
|
{
|
|
176
|
-
className: 'margin-
|
|
176
|
+
className: 'margin-top--md',
|
|
177
177
|
},
|
|
178
178
|
)
|
|
179
179
|
) : (
|
|
180
|
-
<div className="margin-
|
|
180
|
+
<div className="margin-top--md">
|
|
181
181
|
{children.map((tabItem, i) =>
|
|
182
182
|
cloneElement(tabItem, {
|
|
183
183
|
key: i,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/theme-classic",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-4848",
|
|
4
4
|
"description": "Classic theme for Docusaurus",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "src/theme-classic.d.ts",
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
"format:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\""
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@docusaurus/core": "0.0.0-
|
|
25
|
-
"@docusaurus/plugin-content-blog": "0.0.0-
|
|
26
|
-
"@docusaurus/plugin-content-docs": "0.0.0-
|
|
27
|
-
"@docusaurus/plugin-content-pages": "0.0.0-
|
|
28
|
-
"@docusaurus/theme-common": "0.0.0-
|
|
29
|
-
"@docusaurus/theme-translations": "0.0.0-
|
|
30
|
-
"@docusaurus/utils": "0.0.0-
|
|
31
|
-
"@docusaurus/utils-common": "0.0.0-
|
|
32
|
-
"@docusaurus/utils-validation": "0.0.0-
|
|
24
|
+
"@docusaurus/core": "0.0.0-4848",
|
|
25
|
+
"@docusaurus/plugin-content-blog": "0.0.0-4848",
|
|
26
|
+
"@docusaurus/plugin-content-docs": "0.0.0-4848",
|
|
27
|
+
"@docusaurus/plugin-content-pages": "0.0.0-4848",
|
|
28
|
+
"@docusaurus/theme-common": "0.0.0-4848",
|
|
29
|
+
"@docusaurus/theme-translations": "0.0.0-4848",
|
|
30
|
+
"@docusaurus/utils": "0.0.0-4848",
|
|
31
|
+
"@docusaurus/utils-common": "0.0.0-4848",
|
|
32
|
+
"@docusaurus/utils-validation": "0.0.0-4848",
|
|
33
33
|
"@mdx-js/react": "^1.6.22",
|
|
34
34
|
"clsx": "^1.1.1",
|
|
35
35
|
"copy-text-to-clipboard": "^3.0.1",
|
|
@@ -42,8 +42,11 @@
|
|
|
42
42
|
"rtlcss": "^3.5.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
45
|
+
"@babel/cli": "^7.17.6",
|
|
46
|
+
"@babel/core": "^7.17.9",
|
|
47
|
+
"@babel/preset-typescript": "^7.16.7",
|
|
48
|
+
"@docusaurus/module-type-aliases": "0.0.0-4848",
|
|
49
|
+
"@docusaurus/types": "0.0.0-4848",
|
|
47
50
|
"@types/mdx-js__react": "^1.5.5",
|
|
48
51
|
"@types/prismjs": "^1.26.0",
|
|
49
52
|
"@types/rtlcss": "^3.1.3",
|
|
@@ -59,5 +62,5 @@
|
|
|
59
62
|
"engines": {
|
|
60
63
|
"node": ">=14"
|
|
61
64
|
},
|
|
62
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "42eb5ce83a8718cf6d7ea6dae731898cfd86b99c"
|
|
63
66
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import clsx from 'clsx';
|
|
10
|
-
import {Details as DetailsGeneric} from '@docusaurus/theme-common';
|
|
10
|
+
import {Details as DetailsGeneric} from '@docusaurus/theme-common/Details';
|
|
11
11
|
import type {Props} from '@theme/Details';
|
|
12
12
|
import styles from './styles.module.css';
|
|
13
13
|
|
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import clsx from 'clsx';
|
|
9
10
|
|
|
10
11
|
import DocCard from '@theme/DocCard';
|
|
11
12
|
import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
|
|
12
13
|
import {findFirstCategoryLink} from '@docusaurus/theme-common';
|
|
14
|
+
import type {Props} from '@theme/DocCardList';
|
|
13
15
|
|
|
14
16
|
// Filter categories that don't have a link.
|
|
15
17
|
function filterItems(items: PropSidebarItem[]): PropSidebarItem[] {
|
|
@@ -21,13 +23,9 @@ function filterItems(items: PropSidebarItem[]): PropSidebarItem[] {
|
|
|
21
23
|
});
|
|
22
24
|
}
|
|
23
25
|
|
|
24
|
-
export default function DocCardList({
|
|
25
|
-
items,
|
|
26
|
-
}: {
|
|
27
|
-
items: PropSidebarItem[];
|
|
28
|
-
}): JSX.Element {
|
|
26
|
+
export default function DocCardList({items, className}: Props): JSX.Element {
|
|
29
27
|
return (
|
|
30
|
-
<div className=
|
|
28
|
+
<div className={clsx('row', className)}>
|
|
31
29
|
{filterItems(items).map((item, index) => (
|
|
32
30
|
<article key={index} className="col col--6 margin-bottom--lg">
|
|
33
31
|
<DocCard key={index} item={item} />
|
|
@@ -61,7 +61,7 @@ function DocCategoryGeneratedIndexPageContent({
|
|
|
61
61
|
)}
|
|
62
62
|
</header>
|
|
63
63
|
<main className="margin-top--lg">
|
|
64
|
-
<DocCardList items={category.items} />
|
|
64
|
+
<DocCardList items={category.items} className={styles.list} />
|
|
65
65
|
</main>
|
|
66
66
|
<footer className="margin-top--lg">
|
|
67
67
|
<DocPaginator
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import type {Props} from '@theme/TabItem';
|
|
10
|
+
import clsx from 'clsx';
|
|
11
|
+
|
|
12
|
+
import styles from './styles.module.css';
|
|
10
13
|
|
|
11
14
|
export default function TabItem({
|
|
12
15
|
children,
|
|
@@ -14,7 +17,10 @@ export default function TabItem({
|
|
|
14
17
|
className,
|
|
15
18
|
}: Props): JSX.Element {
|
|
16
19
|
return (
|
|
17
|
-
<div
|
|
20
|
+
<div
|
|
21
|
+
role="tabpanel"
|
|
22
|
+
className={clsx(styles.tabItem, className)}
|
|
23
|
+
{...{hidden}}>
|
|
18
24
|
{children}
|
|
19
25
|
</div>
|
|
20
26
|
);
|
package/src/theme/Tabs/index.tsx
CHANGED
|
@@ -141,7 +141,7 @@ function TabsComponent(props: Props): JSX.Element {
|
|
|
141
141
|
};
|
|
142
142
|
|
|
143
143
|
return (
|
|
144
|
-
<div className=
|
|
144
|
+
<div className={clsx('tabs-container', styles.tabList)}>
|
|
145
145
|
<ul
|
|
146
146
|
role="tablist"
|
|
147
147
|
aria-orientation="horizontal"
|
|
@@ -181,10 +181,10 @@ function TabsComponent(props: Props): JSX.Element {
|
|
|
181
181
|
children.filter(
|
|
182
182
|
(tabItem) => tabItem.props.value === selectedValue,
|
|
183
183
|
)[0]!,
|
|
184
|
-
{className: 'margin-
|
|
184
|
+
{className: 'margin-top--md'},
|
|
185
185
|
)
|
|
186
186
|
) : (
|
|
187
|
-
<div className="margin-
|
|
187
|
+
<div className="margin-top--md">
|
|
188
188
|
{children.map((tabItem, i) =>
|
|
189
189
|
cloneElement(tabItem, {
|
|
190
190
|
key: i,
|
package/src/theme-classic.d.ts
CHANGED
|
@@ -176,6 +176,7 @@ declare module '@theme/DocCardList' {
|
|
|
176
176
|
|
|
177
177
|
export interface Props {
|
|
178
178
|
readonly items: PropSidebarItem[];
|
|
179
|
+
readonly className?: string;
|
|
179
180
|
}
|
|
180
181
|
|
|
181
182
|
export default function DocCardList(props: Props): JSX.Element;
|
|
@@ -568,7 +569,9 @@ declare module '@theme/MDXComponents' {
|
|
|
568
569
|
readonly h4: (props: ComponentProps<'h4'>) => JSX.Element;
|
|
569
570
|
readonly h5: (props: ComponentProps<'h5'>) => JSX.Element;
|
|
570
571
|
readonly h6: (props: ComponentProps<'h6'>) => JSX.Element;
|
|
571
|
-
|
|
572
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
573
|
+
[tagName: string]: ComponentType<any>;
|
|
574
|
+
};
|
|
572
575
|
|
|
573
576
|
const MDXComponents: MDXComponentsObject;
|
|
574
577
|
export default MDXComponents;
|
|
@@ -878,7 +881,7 @@ declare module '@theme/ThemedImage' {
|
|
|
878
881
|
}
|
|
879
882
|
|
|
880
883
|
declare module '@theme/Details' {
|
|
881
|
-
import {Details, type DetailsProps} from '@docusaurus/theme-common';
|
|
884
|
+
import {Details, type DetailsProps} from '@docusaurus/theme-common/Details';
|
|
882
885
|
|
|
883
886
|
export interface Props extends DetailsProps {}
|
|
884
887
|
export default Details;
|