@docusaurus/theme-classic 0.0.0-5318 → 0.0.0-5323

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.
@@ -15,8 +15,16 @@
15
15
  height: var(--docusaurus-announcement-bar-height);
16
16
  background-color: var(--ifm-color-white);
17
17
  color: var(--ifm-color-black);
18
+
19
+ /*
20
+ Unfortunately we can't make announcement bar render above the navbar
21
+ IE need to use border-bottom instead of shadow
22
+ See https://github.com/facebookincubator/infima/issues/275
23
+
18
24
  box-shadow: var(--ifm-global-shadow-lw);
19
- z-index: calc(var(--ifm-z-index-fixed) + 1); /* just above the navbar */
25
+ z-index: calc(var(--ifm-z-index-fixed) + 1);
26
+ */
27
+ border-bottom: 1px solid var(--ifm-color-emphasis-100);
20
28
  }
21
29
 
22
30
  html[data-announcement-bar-initially-dismissed='true'] .announcementBar {
@@ -102,6 +102,10 @@ function TabsComponent(props) {
102
102
  const handleKeydown = (event) => {
103
103
  let focusElement = null;
104
104
  switch (event.key) {
105
+ case 'Enter': {
106
+ handleTabChange(event);
107
+ break;
108
+ }
105
109
  case 'ArrowRight': {
106
110
  const nextTab = tabRefs.indexOf(event.currentTarget) + 1;
107
111
  focusElement = tabRefs[nextTab] ?? tabRefs[0];
@@ -137,7 +141,6 @@ function TabsComponent(props) {
137
141
  key={value}
138
142
  ref={(tabControl) => tabRefs.push(tabControl)}
139
143
  onKeyDown={handleKeydown}
140
- onFocus={handleTabChange}
141
144
  onClick={handleTabChange}
142
145
  {...attributes}
143
146
  className={clsx(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-classic",
3
- "version": "0.0.0-5318",
3
+ "version": "0.0.0-5323",
4
4
  "description": "Classic theme for Docusaurus",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/theme-classic.d.ts",
@@ -20,18 +20,18 @@
20
20
  "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
21
21
  },
22
22
  "dependencies": {
23
- "@docusaurus/core": "0.0.0-5318",
24
- "@docusaurus/mdx-loader": "0.0.0-5318",
25
- "@docusaurus/module-type-aliases": "0.0.0-5318",
26
- "@docusaurus/plugin-content-blog": "0.0.0-5318",
27
- "@docusaurus/plugin-content-docs": "0.0.0-5318",
28
- "@docusaurus/plugin-content-pages": "0.0.0-5318",
29
- "@docusaurus/theme-common": "0.0.0-5318",
30
- "@docusaurus/theme-translations": "0.0.0-5318",
31
- "@docusaurus/types": "0.0.0-5318",
32
- "@docusaurus/utils": "0.0.0-5318",
33
- "@docusaurus/utils-common": "0.0.0-5318",
34
- "@docusaurus/utils-validation": "0.0.0-5318",
23
+ "@docusaurus/core": "0.0.0-5323",
24
+ "@docusaurus/mdx-loader": "0.0.0-5323",
25
+ "@docusaurus/module-type-aliases": "0.0.0-5323",
26
+ "@docusaurus/plugin-content-blog": "0.0.0-5323",
27
+ "@docusaurus/plugin-content-docs": "0.0.0-5323",
28
+ "@docusaurus/plugin-content-pages": "0.0.0-5323",
29
+ "@docusaurus/theme-common": "0.0.0-5323",
30
+ "@docusaurus/theme-translations": "0.0.0-5323",
31
+ "@docusaurus/types": "0.0.0-5323",
32
+ "@docusaurus/utils": "0.0.0-5323",
33
+ "@docusaurus/utils-common": "0.0.0-5323",
34
+ "@docusaurus/utils-validation": "0.0.0-5323",
35
35
  "@mdx-js/react": "^1.6.22",
36
36
  "clsx": "^1.2.1",
37
37
  "copy-text-to-clipboard": "^3.0.1",
@@ -62,5 +62,5 @@
62
62
  "engines": {
63
63
  "node": ">=16.14"
64
64
  },
65
- "gitHead": "cf69ed170f230cd78645aa3d2239a713b649ecdb"
65
+ "gitHead": "b3bf0c65788712e31086fa88e20f00a24cef2314"
66
66
  }
@@ -15,8 +15,16 @@
15
15
  height: var(--docusaurus-announcement-bar-height);
16
16
  background-color: var(--ifm-color-white);
17
17
  color: var(--ifm-color-black);
18
+
19
+ /*
20
+ Unfortunately we can't make announcement bar render above the navbar
21
+ IE need to use border-bottom instead of shadow
22
+ See https://github.com/facebookincubator/infima/issues/275
23
+
18
24
  box-shadow: var(--ifm-global-shadow-lw);
19
- z-index: calc(var(--ifm-z-index-fixed) + 1); /* just above the navbar */
25
+ z-index: calc(var(--ifm-z-index-fixed) + 1);
26
+ */
27
+ border-bottom: 1px solid var(--ifm-color-emphasis-100);
20
28
  }
21
29
 
22
30
  html[data-announcement-bar-initially-dismissed='true'] .announcementBar {
@@ -104,7 +104,10 @@ function TabsComponent(props: Props): JSX.Element {
104
104
  }
105
105
 
106
106
  const handleTabChange = (
107
- event: React.FocusEvent<HTMLLIElement> | React.MouseEvent<HTMLLIElement>,
107
+ event:
108
+ | React.FocusEvent<HTMLLIElement>
109
+ | React.MouseEvent<HTMLLIElement>
110
+ | React.KeyboardEvent<HTMLLIElement>,
108
111
  ) => {
109
112
  const newTab = event.currentTarget;
110
113
  const newTabIndex = tabRefs.indexOf(newTab);
@@ -124,6 +127,10 @@ function TabsComponent(props: Props): JSX.Element {
124
127
  let focusElement: HTMLLIElement | null = null;
125
128
 
126
129
  switch (event.key) {
130
+ case 'Enter': {
131
+ handleTabChange(event);
132
+ break;
133
+ }
127
134
  case 'ArrowRight': {
128
135
  const nextTab = tabRefs.indexOf(event.currentTarget) + 1;
129
136
  focusElement = tabRefs[nextTab] ?? tabRefs[0]!;
@@ -161,7 +168,6 @@ function TabsComponent(props: Props): JSX.Element {
161
168
  key={value}
162
169
  ref={(tabControl) => tabRefs.push(tabControl)}
163
170
  onKeyDown={handleKeydown}
164
- onFocus={handleTabChange}
165
171
  onClick={handleTabChange}
166
172
  {...attributes}
167
173
  className={clsx(