@docusaurus/theme-classic 0.0.0-4773 → 0.0.0-4776
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-next/theme/CodeBlock/CopyButton/index.js +1 -1
- package/lib-next/theme/CodeBlock/index.js +1 -3
- package/lib-next/theme/CodeBlock/styles.module.css +1 -3
- package/lib-next/theme/NavbarItem/DropdownNavbarItem.js +9 -1
- package/package.json +13 -13
- package/src/theme/CodeBlock/CopyButton/index.tsx +0 -1
- package/src/theme/CodeBlock/index.tsx +1 -3
- package/src/theme/CodeBlock/styles.module.css +1 -3
- package/src/theme/NavbarItem/DropdownNavbarItem.tsx +10 -1
|
@@ -35,7 +35,7 @@ export default function CopyButton({code}) {
|
|
|
35
35
|
message: 'Copy code to clipboard',
|
|
36
36
|
description: 'The ARIA label for copy code blocks button',
|
|
37
37
|
})
|
|
38
|
-
}
|
|
38
|
+
}
|
|
39
39
|
title={translate({
|
|
40
40
|
id: 'theme.CodeBlock.copy',
|
|
41
41
|
message: 'Copy',
|
|
@@ -99,9 +99,7 @@ export default function CodeBlock({
|
|
|
99
99
|
{codeBlockTitle}
|
|
100
100
|
</div>
|
|
101
101
|
)}
|
|
102
|
-
<div
|
|
103
|
-
className={clsx(styles.codeBlockContent, language)}
|
|
104
|
-
style={style}>
|
|
102
|
+
<div className={styles.codeBlockContent} style={style}>
|
|
105
103
|
<pre
|
|
106
104
|
/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */
|
|
107
105
|
tabIndex={0}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
.codeBlockContainer {
|
|
9
9
|
margin-bottom: var(--ifm-leading);
|
|
10
|
-
border-radius: var(--ifm-global-radius);
|
|
11
10
|
box-shadow: var(--ifm-global-shadow-lw);
|
|
12
11
|
}
|
|
13
12
|
|
|
@@ -15,6 +14,7 @@
|
|
|
15
14
|
position: relative;
|
|
16
15
|
/* rtl:ignore */
|
|
17
16
|
direction: ltr;
|
|
17
|
+
border-radius: var(--ifm-global-radius);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.codeBlockTitle {
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
.codeBlock {
|
|
30
30
|
margin: 0;
|
|
31
31
|
padding: 0;
|
|
32
|
-
border-radius: var(--ifm-global-radius);
|
|
33
32
|
background-color: inherit;
|
|
34
33
|
}
|
|
35
34
|
|
|
@@ -40,7 +39,6 @@
|
|
|
40
39
|
|
|
41
40
|
.codeBlockStandalone {
|
|
42
41
|
padding: 0;
|
|
43
|
-
border-radius: var(--ifm-global-radius);
|
|
44
42
|
}
|
|
45
43
|
|
|
46
44
|
.codeBlockLines {
|
|
@@ -64,6 +64,9 @@ function DropdownNavbarItemDesktop({items, position, className, ...props}) {
|
|
|
64
64
|
'dropdown--show': showDropdown,
|
|
65
65
|
})}>
|
|
66
66
|
<NavbarNavLink
|
|
67
|
+
aria-haspopup="true"
|
|
68
|
+
aria-expanded={showDropdown}
|
|
69
|
+
role="button"
|
|
67
70
|
href={props.to ? undefined : '#'}
|
|
68
71
|
className={clsx('navbar__link', className)}
|
|
69
72
|
{...props}
|
|
@@ -87,7 +90,12 @@ function DropdownNavbarItemDesktop({items, position, className, ...props}) {
|
|
|
87
90
|
const nextNavbarItem = dropdownRef.current.nextElementSibling;
|
|
88
91
|
|
|
89
92
|
if (nextNavbarItem) {
|
|
90
|
-
|
|
93
|
+
const targetItem =
|
|
94
|
+
nextNavbarItem instanceof HTMLAnchorElement
|
|
95
|
+
? nextNavbarItem // Next item is another dropdown; focus on the inner
|
|
96
|
+
: // anchor element instead so there's outline
|
|
97
|
+
nextNavbarItem.querySelector('a');
|
|
98
|
+
targetItem.focus();
|
|
91
99
|
}
|
|
92
100
|
}
|
|
93
101
|
}}
|
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-4776",
|
|
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-4776",
|
|
25
|
+
"@docusaurus/plugin-content-blog": "0.0.0-4776",
|
|
26
|
+
"@docusaurus/plugin-content-docs": "0.0.0-4776",
|
|
27
|
+
"@docusaurus/plugin-content-pages": "0.0.0-4776",
|
|
28
|
+
"@docusaurus/theme-common": "0.0.0-4776",
|
|
29
|
+
"@docusaurus/theme-translations": "0.0.0-4776",
|
|
30
|
+
"@docusaurus/utils": "0.0.0-4776",
|
|
31
|
+
"@docusaurus/utils-common": "0.0.0-4776",
|
|
32
|
+
"@docusaurus/utils-validation": "0.0.0-4776",
|
|
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,8 @@
|
|
|
42
42
|
"rtlcss": "^3.5.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@docusaurus/module-type-aliases": "0.0.0-
|
|
46
|
-
"@docusaurus/types": "0.0.0-
|
|
45
|
+
"@docusaurus/module-type-aliases": "0.0.0-4776",
|
|
46
|
+
"@docusaurus/types": "0.0.0-4776",
|
|
47
47
|
"@types/mdx-js__react": "^1.5.5",
|
|
48
48
|
"@types/prismjs": "^1.26.0",
|
|
49
49
|
"@types/rtlcss": "^3.1.2",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"engines": {
|
|
60
60
|
"node": ">=14"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "e90f70f332f44d7c29a5a363552d9cf0136f6b23"
|
|
63
63
|
}
|
|
@@ -111,9 +111,7 @@ export default function CodeBlock({
|
|
|
111
111
|
{codeBlockTitle}
|
|
112
112
|
</div>
|
|
113
113
|
)}
|
|
114
|
-
<div
|
|
115
|
-
className={clsx(styles.codeBlockContent, language)}
|
|
116
|
-
style={style}>
|
|
114
|
+
<div className={styles.codeBlockContent} style={style}>
|
|
117
115
|
<pre
|
|
118
116
|
/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */
|
|
119
117
|
tabIndex={0}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
.codeBlockContainer {
|
|
9
9
|
margin-bottom: var(--ifm-leading);
|
|
10
|
-
border-radius: var(--ifm-global-radius);
|
|
11
10
|
box-shadow: var(--ifm-global-shadow-lw);
|
|
12
11
|
}
|
|
13
12
|
|
|
@@ -15,6 +14,7 @@
|
|
|
15
14
|
position: relative;
|
|
16
15
|
/* rtl:ignore */
|
|
17
16
|
direction: ltr;
|
|
17
|
+
border-radius: var(--ifm-global-radius);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.codeBlockTitle {
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
.codeBlock {
|
|
30
30
|
margin: 0;
|
|
31
31
|
padding: 0;
|
|
32
|
-
border-radius: var(--ifm-global-radius);
|
|
33
32
|
background-color: inherit;
|
|
34
33
|
}
|
|
35
34
|
|
|
@@ -40,7 +39,6 @@
|
|
|
40
39
|
|
|
41
40
|
.codeBlockStandalone {
|
|
42
41
|
padding: 0;
|
|
43
|
-
border-radius: var(--ifm-global-radius);
|
|
44
42
|
}
|
|
45
43
|
|
|
46
44
|
.codeBlockLines {
|
|
@@ -85,6 +85,9 @@ function DropdownNavbarItemDesktop({
|
|
|
85
85
|
'dropdown--show': showDropdown,
|
|
86
86
|
})}>
|
|
87
87
|
<NavbarNavLink
|
|
88
|
+
aria-haspopup="true"
|
|
89
|
+
aria-expanded={showDropdown}
|
|
90
|
+
role="button"
|
|
88
91
|
href={props.to ? undefined : '#'}
|
|
89
92
|
className={clsx('navbar__link', className)}
|
|
90
93
|
{...props}
|
|
@@ -107,7 +110,13 @@ function DropdownNavbarItemDesktop({
|
|
|
107
110
|
setShowDropdown(false);
|
|
108
111
|
const nextNavbarItem = dropdownRef.current!.nextElementSibling;
|
|
109
112
|
if (nextNavbarItem) {
|
|
110
|
-
|
|
113
|
+
const targetItem =
|
|
114
|
+
nextNavbarItem instanceof HTMLAnchorElement
|
|
115
|
+
? nextNavbarItem
|
|
116
|
+
: // Next item is another dropdown; focus on the inner
|
|
117
|
+
// anchor element instead so there's outline
|
|
118
|
+
nextNavbarItem.querySelector('a');
|
|
119
|
+
(targetItem as HTMLElement).focus();
|
|
111
120
|
}
|
|
112
121
|
}
|
|
113
122
|
}}
|